diff --git a/.gitignore b/.gitignore index d60a2fb243..e2a884db38 100755 --- a/.gitignore +++ b/.gitignore @@ -12,12 +12,8 @@ *.gb # rgbds extras -*.map *.sym -# generated -*.tx - # converted image data *.2bpp *.1bpp diff --git a/INSTALL.md b/INSTALL.md index a1527ab8c7..11450d93d4 100755 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,72 +1,57 @@ # Linux -Dependencies: - sudo apt-get install make gcc bison git python python-setuptools - sudo easy_install pip - -The assembler used is [**rgbds**](https://github.com/bentley/rgbds). + sudo easy_install pypng git clone git://github.com/bentley/rgbds.git cd rgbds - sudo mkdir -p /usr/local/man/man{1,7} sudo make install cd .. - rm -rf rgbds - -Set up the repository. - git clone git://github.com/iimarckus/pokered.git + git clone --recursive git://github.com/iimarckus/pokered.git cd pokered - git submodule init - git submodule update - sudo pip install -r extras/requirements.txt To build **pokered.gbc** and **pokeblue.gbc**: make -This should take about 10 seconds. Subsequent builds are faster. - To build them individually: make red make blue -# OS X +# Mac -Download and install **Command Line Tools for Xcode**. -Then open a terminal and follow the Linux instructions. +In the shell, run: + xcode-select --install + sudo easy_install pypng -# Windows + git clone git://github.com/bentley/rgbds.git + cd rgbds + sudo make install + cd .. -It's recommended that you use a virtual machine running Linux or OS X. + git clone --recursive git://github.com/iimarckus/pokered.git + cd pokered -If you insist on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit). + make -Dependencies are downloaded in the installer rather than the command line. -Select the following packages: -* make -* git -* gettext -* python -* python-setuptools -To install rgbds, extract the contents of -**http://iimarck.us/etc/rgbds.zip** -and put them in `C:\cygwin\usr\local\bin`. +# Windows -Then set up the repository. In the **Cygwin terminal**: +To build on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit). - git clone git://github.com/iimarckus/pokered.git - cd pokered - git submodule init - git submodule update - easy_install git://github.com/drj11/pypng.git@master#egg=pypng +In the installer, select the following packages: `make` `git` `gettext` `python` `python-setuptools` -To build: +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`. - make +In the **Cygwin terminal**: + + easy_install pypng + git clone --recursive git://github.com/iimarckus/pokered.git + cd pokered + make diff --git a/Makefile b/Makefile index ec1ca45511..5cc485c118 100755 --- a/Makefile +++ b/Makefile @@ -1,21 +1,61 @@ +# 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 -MD5 := md5sum -c --quiet +# md5sum -c is used to compare rom hashes. The options may vary across platforms. +MD5 := md5sum -c --quiet + + +# 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 + + +# Clear the default suffixes. .SUFFIXES: -.SUFFIXES: .asm .tx .o .gbc -.PHONY: all clean red blue yellow compare -.PRECIOUS: %.2bpp +.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 + +# 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 -pre := $(PYTHON) prequeue.py -versions := red blue yellow +# 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)) \ @@ -26,56 +66,32 @@ $(foreach obj, $(all_obj), \ ) -roms := pokered.gbc pokeblue.gbc +# 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 $@ -all: $(roms) -red: pokered.gbc -blue: pokeblue.gbc -yellow: pokeyellow.gbc - -compare: - @$(MD5) roms.md5 -clean: - rm -f $(roms) $(all_obj) - find . \( -iname '*.tx' -o -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} + - - -%.asm: ; -%.tx: %.asm - $(eval txq += $<) - @rm -f $@ - -$(all_obj): $$*.tx $$(patsubst %.asm, %.tx, $$($$*_dep)) - @$(pre) $(txq); $(eval txq :=) +# 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 $@ $*.tx + rgbasm -h -o $@ $*.asm -link = rgblink -n $*.sym -m $*.map -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 +# Link objects together to build a rom. -pokered.gbc: $(red_obj) - $(link) -o $@ $^ - rgbfix $(dmg_opt) -t "POKEMON RED" $@ +# Make a symfile for debugging. +link = rgblink -n poke$*.sym -pokeblue.gbc: $(blue_obj) +poke%.gbc: $$(%_obj) $(link) -o $@ $^ - rgbfix $(dmg_opt) -t "POKEMON BLUE" $@ + rgbfix $($*_opt) $@ -pokeyellow.gbc: $(yellow_obj) - $(link) -o $@ $^ - rgbfix $(cgb_opt) -t "POKEMON YELLOW" $@ - - -%.2bpp: %.png - $(eval 2bppq += $<) - @rm -f $@ -%.1bpp: %.png - $(eval 1bppq += $<) - @rm -f $@ -%.pic: %.2bpp - $(eval picq += $<) - @rm -f $@ + +clean: + rm -f $(roms) $(all_obj) poke*.sym + find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} + diff --git a/README.md b/README.md index 0b29e40947..abaaa65302 100755 --- a/README.md +++ b/README.md @@ -13,8 +13,7 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md). ## See also * Disassembly of [**Pokémon Crystal**][pokecrystal] -* irc: **nucleus.kafuka.org** [**#skeetendo**][irc] +* irc: **irc.freenode.net** [**#pret**][irc] [pokecrystal]: https://github.com/kanzure/pokecrystal -[irc]: https://kiwiirc.com/client/irc.nolimitzone.com/?#skeetendo - +[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret diff --git a/audio.asm b/audio.asm index 6dffd23a12..2f161426ba 100755 --- a/audio.asm +++ b/audio.asm @@ -563,7 +563,7 @@ Func_7d13b:: ; 7d13b (1f:513b) ld a, [hli] ld c, [hl] call PlayMusic - jp Func_2307 + jp PlayDefaultMusic PokedexRatingSfxPointers: ; 7d162 (1f:5162) db (SFX_1f_51 - SFX_Headers_1f) / 3, BANK(SFX_1f_51) diff --git a/audio/sfx/sfx_1f_5d.asm b/audio/sfx/sfx_1f_5d.asm index 297f826d68..f0606032c3 100755 --- a/audio/sfx/sfx_1f_5d.asm +++ b/audio/sfx/sfx_1f_5d.asm @@ -1,6 +1,6 @@ SFX_1f_5d_Ch1: ; 7c45e (1f:445e) duty 2 -IF _RED +IF DEF(_RED) unknownsfx0x20 4, 244, 0, 7 unknownsfx0x20 3, 228, 128, 6 unknownsfx0x20 3, 228, 192, 6 @@ -18,7 +18,7 @@ ENDC SFX_1f_5d_Ch2: ; 7c475 (1f:4475) duty 2 -IF _RED +IF DEF(_RED) unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 3, 212, 1, 7 unknownsfx0x20 3, 196, 129, 6 diff --git a/blue.asm b/blue.asm index fe2d945272..c8c50a5d5e 100755 --- a/blue.asm +++ b/blue.asm @@ -1 +1,2 @@ _BLUE EQU 1 +INCLUDE "charmap.asm" diff --git a/charmap.asm b/charmap.asm new file mode 100644 index 0000000000..980c79a3c4 --- /dev/null +++ b/charmap.asm @@ -0,0 +1,252 @@ +charmap "ガ", $05 +charmap "ギ", $06 +charmap "グ", $07 +charmap "ゲ", $08 +charmap "ゴ", $09 +charmap "ザ", $0A +charmap "ジ", $0B +charmap "ズ", $0C +charmap "ゼ", $0D +charmap "ゾ", $0E +charmap "ダ", $0F +charmap "ヂ", $10 +charmap "ヅ", $11 +charmap "デ", $12 +charmap "ド", $13 +charmap "バ", $19 +charmap "ビ", $1A +charmap "ブ", $1B +charmap "ボ", $1C +charmap "が", $26 +charmap "ぎ", $27 +charmap "ぐ", $28 +charmap "げ", $29 +charmap "ご", $2A +charmap "ざ", $2B +charmap "じ", $2C +charmap "ず", $2D +charmap "ぜ", $2E +charmap "ぞ", $2F +charmap "だ", $30 +charmap "ぢ", $31 +charmap "づ", $32 +charmap "で", $33 +charmap "ど", $34 +charmap "ば", $3A +charmap "び", $3B +charmap "ぶ", $3C +charmap "べ", $3D +charmap "ぼ", $3E +charmap "パ", $40 +charmap "ピ", $41 +charmap "プ", $42 +charmap "ポ", $43 +charmap "ぱ", $44 +charmap "ぴ", $45 +charmap "ぷ", $46 +charmap "ぺ", $47 +charmap "ぽ", $48 +charmap "ア", $80 +charmap "イ", $81 +charmap "ウ", $82 +charmap "エ", $83 +charmap "ォ", $84 +charmap "カ", $85 +charmap "キ", $86 +charmap "ク", $87 +charmap "ケ", $88 +charmap "コ", $89 +charmap "サ", $8A +charmap "シ", $8B +charmap "ス", $8C +charmap "セ", $8D +charmap "ソ", $8E +charmap "タ", $8F +charmap "チ", $90 +charmap "ツ", $91 +charmap "テ", $92 +charmap "ト", $93 +charmap "ナ", $94 +charmap "ニ", $95 +charmap "ヌ", $96 +charmap "ネ", $97 +charmap "ノ", $98 +charmap "ハ", $99 +charmap "ヒ", $9A +charmap "フ", $9B +charmap "ホ", $9C +charmap "マ", $9D +charmap "ミ", $9E +charmap "ム", $9F +charmap "メ", $A0 +charmap "モ", $A1 +charmap "ヤ", $A2 +charmap "ユ", $A3 +charmap "ヨ", $A4 +charmap "ラ", $A5 +charmap "ル", $A6 +charmap "レ", $A7 +charmap "ロ", $A8 +charmap "ワ", $A9 +charmap "ヲ", $AA +charmap "ン", $AB +charmap "ッ", $AC +charmap "ャ", $AD +charmap "ュ", $AE +charmap "ョ", $AF +charmap "ィ", $B0 +charmap "あ", $B1 +charmap "い", $B2 +charmap "う", $B3 +charmap "え", $B4 +charmap "お", $B5 +charmap "か", $B6 +charmap "き", $B7 +charmap "く", $B8 +charmap "け", $B9 +charmap "こ", $BA +charmap "さ", $BB +charmap "し", $BC +charmap "す", $BD +charmap "せ", $BE +charmap "そ", $BF +charmap "た", $C0 +charmap "ち", $C1 +charmap "つ", $C2 +charmap "て", $C3 +charmap "と", $C4 +charmap "な", $C5 +charmap "に", $C6 +charmap "ぬ", $C7 +charmap "ね", $C8 +charmap "の", $C9 +charmap "は", $CA +charmap "ひ", $CB +charmap "ふ", $CC +charmap "へ", $CD +charmap "ほ", $CE +charmap "ま", $CF +charmap "み", $D0 +charmap "む", $D1 +charmap "め", $D2 +charmap "も", $D3 +charmap "や", $D4 +charmap "ゆ", $D5 +charmap "よ", $D6 +charmap "ら", $D7 +charmap "り", $D8 +charmap "る", $D9 +charmap "れ", $DA +charmap "ろ", $DB +charmap "わ", $DC +charmap "を", $DD +charmap "ん", $DE +charmap "っ", $DF +charmap "ゃ", $E0 +charmap "ゅ", $E1 +charmap "ょ", $E2 +charmap "ー", $E3 + +charmap "@", $50 +charmap "#", $54 +;charmap "POKé", $54 +charmap "…", $75 + +charmap "┌", $79 +charmap "─", $7A +charmap "┐", $7B +charmap "│", $7C +charmap "└", $7D +charmap "┘", $7E + +charmap "№", $74 + +charmap " ", $7F +charmap "A", $80 +charmap "B", $81 +charmap "C", $82 +charmap "D", $83 +charmap "E", $84 +charmap "F", $85 +charmap "G", $86 +charmap "H", $87 +charmap "I", $88 +charmap "J", $89 +charmap "K", $8A +charmap "L", $8B +charmap "M", $8C +charmap "N", $8D +charmap "O", $8E +charmap "P", $8F +charmap "Q", $90 +charmap "R", $91 +charmap "S", $92 +charmap "T", $93 +charmap "U", $94 +charmap "V", $95 +charmap "W", $96 +charmap "X", $97 +charmap "Y", $98 +charmap "Z", $99 +charmap "(", $9A +charmap ")", $9B +charmap ":", $9C +charmap ";", $9D +charmap "[", $9E +charmap "]", $9F +charmap "a", $A0 +charmap "b", $A1 +charmap "c", $A2 +charmap "d", $A3 +charmap "e", $A4 +charmap "f", $A5 +charmap "g", $A6 +charmap "h", $A7 +charmap "i", $A8 +charmap "j", $A9 +charmap "k", $AA +charmap "l", $AB +charmap "m", $AC +charmap "n", $AD +charmap "o", $AE +charmap "p", $AF +charmap "q", $B0 +charmap "r", $B1 +charmap "s", $B2 +charmap "t", $B3 +charmap "u", $B4 +charmap "v", $B5 +charmap "w", $B6 +charmap "x", $B7 +charmap "y", $B8 +charmap "z", $B9 +charmap "é", $BA +charmap "'d", $BB +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 "▶", $ED +charmap "♂", $EF +charmap "¥", $F0 +charmap "×", $F1 +charmap "/", $F3 +charmap ",", $F4 +charmap "♀", $F5 +charmap "0", $F6 +charmap "1", $F7 +charmap "2", $F8 +charmap "3", $F9 +charmap "4", $FA +charmap "5", $FB +charmap "6", $FC +charmap "7", $FD +charmap "8", $FE +charmap "9", $FF diff --git a/constants.asm b/constants.asm index b427e3c705..0b24ea0572 100755 --- a/constants.asm +++ b/constants.asm @@ -1,5 +1,3 @@ -INCLUDE "version.asm" - INCLUDE "macros.asm" INCLUDE "hram.asm" @@ -27,6 +25,7 @@ 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" diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm index 8e926a117e..f9e3fe19b7 100755 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -2,27 +2,17 @@ GBC EQU $11 -; MBC3 -MBC3SRamEnable EQU $0000 -MBC3RomBank EQU $2000 -MBC3SRamBank EQU $4000 -MBC3LatchClock EQU $6000 -MBC3RTC EQU $a000 +; MBC1 +MBC1SRamEnable EQU $0000 +MBC1RomBank EQU $2000 +MBC1SRamBank EQU $4000 +MBC1SRamBankingMode EQU $6000 SRAM_DISABLE EQU $00 SRAM_ENABLE EQU $0a NUM_SRAM_BANKS EQU 4 -RTC_S EQU $08 ; Seconds 0-59 (0-3Bh) -RTC_M EQU $09 ; Minutes 0-59 (0-3Bh) -RTC_H EQU $0a ; Hours 0-23 (0-17h) -RTC_DL EQU $0b ; Lower 8 bits of Day Counter (0-FFh) -RTC_DH EQU $0c ; Upper 1 bit of Day Counter, Carry Bit, Halt Flag - ; Bit 0 Most significant bit of Day Counter (Bit 8) - ; Bit 6 Halt (0=Active, 1=Stop Timer) - ; Bit 7 Day Counter Carry Bit (1=Counter Overflow) - ; interrupt flags VBLANK EQU 0 LCD_STAT EQU 1 @@ -40,6 +30,9 @@ OAM_X_FLIP EQU 5 OAM_Y_FLIP EQU 6 OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) +; serial +START_TRANSFER_EXTERNAL_CLOCK EQU $80 +START_TRANSFER_INTERNAL_CLOCK EQU $81 ; Hardware registers rJOYP EQU $ff00 ; Joypad (R/W) diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm new file mode 100755 index 0000000000..1c5beb779f --- /dev/null +++ b/constants/hide_show_constants.asm @@ -0,0 +1,236 @@ +; this is a list of the sprites that can be enabled/disabled during the game +; 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) + +const_value = 0 + + const HS_PALLET_TOWN_OAK ; 00 + const HS_LYING_OLD_MAN ; 01 + const HS_OLD_MAN ; 02 + const HS_MUSEUM_GUY ; 03 + const HS_GYM_GUY ; 04 + const HS_CERULEAN_RIVAL ; 05 + const HS_CERULEAN_ROCKET ; 06 + const HS_CERULEAN_GUARD_1 ; 07 + const HS_UNKNOWN_DUNGEON_GUY ; 08 + const HS_CERULEAN_GUARD_2 ; 09 + const HS_SAFFRON_CITY_1 ; 0A + const HS_SAFFRON_CITY_2 ; 0B + const HS_SAFFRON_CITY_3 ; 0C + const HS_SAFFRON_CITY_4 ; 0D + const HS_SAFFRON_CITY_5 ; 0E + const HS_SAFFRON_CITY_6 ; 0F + const HS_SAFFRON_CITY_7 ; 10 + const HS_SAFFRON_CITY_8 ; 11 + const HS_SAFFRON_CITY_9 ; 12 + const HS_SAFFRON_CITY_A ; 13 + const HS_SAFFRON_CITY_B ; 14 + const HS_SAFFRON_CITY_C ; 15 + const HS_SAFFRON_CITY_D ; 16 + const HS_SAFFRON_CITY_E ; 17 + const HS_SAFFRON_CITY_F ; 18 + const HS_ROUTE_2_ITEM_1 ; 19 X + const HS_ROUTE_2_ITEM_2 ; 1A X + const HS_ROUTE_4_ITEM ; 1B X + const HS_ROUTE_9_ITEM ; 1C X + const HS_ROUTE_12_SNORLAX ; 1D + const HS_ROUTE_12_ITEM_1 ; 1E X + const HS_ROUTE_12_ITEM_2 ; 1F X + const HS_ROUTE_15_ITEM ; 20 X + const HS_ROUTE_16_SNORLAX ; 21 + const HS_ROUTE_22_RIVAL_1 ; 22 + const HS_ROUTE_22_RIVAL_2 ; 23 + const HS_NUGGET_BRIDGE_GUY ; 24 + const HS_ROUTE_24_ITEM ; 25 X + const HS_ROUTE_25_ITEM ; 26 X + const HS_DAISY_SITTING ; 27 + const HS_DAISY_WALKING ; 28 + const HS_TOWN_MAP ; 29 + const HS_OAKS_LAB_RIVAL ; 2A + const HS_STARTER_BALL_1 ; 2B + const HS_STARTER_BALL_2 ; 2C + const HS_STARTER_BALL_3 ; 2D + const HS_OAKS_LAB_OAK_1 ; 2E + const HS_POKEDEX_1 ; 2F + const HS_POKEDEX_2 ; 30 + const HS_OAKS_LAB_OAK_2 ; 31 + const HS_VIRIDIAN_GYM_GIOVANNI ; 32 + const HS_VIRIDIAN_GYM_ITEM ; 33 X + const HS_OLD_AMBER ; 34 + const HS_UNKNOWN_DUNGEON_1_ITEM_1 ; 35 X + const HS_UNKNOWN_DUNGEON_1_ITEM_2 ; 36 X + const HS_UNKNOWN_DUNGEON_1_ITEM_3 ; 37 X + const HS_POKEMONTOWER_2_RIVAL ; 38 + const HS_POKEMONTOWER_3_ITEM ; 39 X + const HS_POKEMONTOWER_4_ITEM_1 ; 3A X + const HS_POKEMONTOWER_4_ITEM_2 ; 3B X + const HS_POKEMONTOWER_4_ITEM_3 ; 3C X + const HS_POKEMONTOWER_5_ITEM ; 3D X + const HS_POKEMONTOWER_6_ITEM_1 ; 3E X + const HS_POKEMONTOWER_6_ITEM_2 ; 3F X + const HS_POKEMONTOWER_7_ROCKET_1 ; 40 X + const HS_POKEMONTOWER_7_ROCKET_2 ; 41 X + const HS_POKEMONTOWER_7_ROCKET_3 ; 42 X + const HS_POKEMONTOWER_7_MR_FUJI ; 43 + const HS_LAVENDER_HOUSE_1_MR_FUJI ; 44 + const HS_CELADON_MANSION_5_GIFT ; 45 + const HS_GAME_CORNER_ROCKET ; 46 + const HS_FUCHSIA_HOUSE_2_ITEM ; 47 X + const HS_MANSION_1_ITEM_1 ; 48 X + 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_VOLTORB_1 ; 4D X + const HS_VOLTORB_2 ; 4E X + const HS_VOLTORB_3 ; 4F X + const HS_ELECTRODE_1 ; 50 X + const HS_VOLTORB_4 ; 51 X + const HS_VOLTORB_5 ; 52 X + const HS_ELECTRODE_2 ; 53 X + const HS_VOLTORB_6 ; 54 X + const HS_ZAPDOS ; 55 X + const HS_POWER_PLANT_ITEM_1 ; 56 X + const HS_POWER_PLANT_ITEM_2 ; 57 X + const HS_POWER_PLANT_ITEM_3 ; 58 X + const HS_POWER_PLANT_ITEM_4 ; 59 X + const HS_POWER_PLANT_ITEM_5 ; 5A X + const HS_MOLTRES ; 5B X + const HS_VICTORY_ROAD_2_ITEM_1 ; 5C X + const HS_VICTORY_ROAD_2_ITEM_2 ; 5D X + const HS_VICTORY_ROAD_2_ITEM_3 ; 5E X + const HS_VICTORY_ROAD_2_ITEM_4 ; 5F X + const HS_VICTORY_ROAD_2_BOULDER ; 60 + const HS_BILL_POKEMON ; 61 + const HS_BILL_1 ; 62 + const HS_BILL_2 ; 63 + const HS_VIRIDIAN_FOREST_ITEM_1 ; 64 X + const HS_VIRIDIAN_FOREST_ITEM_2 ; 65 X + const HS_VIRIDIAN_FOREST_ITEM_3 ; 66 X + const HS_MT_MOON_1_ITEM_1 ; 67 X + const HS_MT_MOON_1_ITEM_2 ; 68 X + const HS_MT_MOON_1_ITEM_3 ; 69 X + const HS_MT_MOON_1_ITEM_4 ; 6A X + const HS_MT_MOON_1_ITEM_5 ; 6B X + const HS_MT_MOON_1_ITEM_6 ; 6C X + const HS_MT_MOON_3_FOSSIL_1 ; 6D + const HS_MT_MOON_3_FOSSIL_2 ; 6E + const HS_MT_MOON_3_ITEM_1 ; 6F X + const HS_MT_MOON_3_ITEM_2 ; 70 X + const HS_SS_ANNE_2_RIVAL ; 71 + const HS_SS_ANNE_8_ITEM ; 72 X + const HS_SS_ANNE_9_ITEM_1 ; 73 X + const HS_SS_ANNE_9_ITEM_2 ; 74 X + const HS_SS_ANNE_10_ITEM_1 ; 75 X + const HS_SS_ANNE_10_ITEM_2 ; 76 X + const HS_SS_ANNE_10_ITEM_3 ; 77 X + const HS_VICTORY_ROAD_3_ITEM_1 ; 78 X + const HS_VICTORY_ROAD_3_ITEM_2 ; 79 X + const HS_VICTORY_ROAD_3_BOULDER ; 7A + const HS_ROCKET_HIDEOUT_1_ITEM_1 ; 7B X + const HS_ROCKET_HIDEOUT_1_ITEM_2 ; 7C X + const HS_ROCKET_HIDEOUT_2_ITEM_1 ; 7D X + const HS_ROCKET_HIDEOUT_2_ITEM_2 ; 7E X + const HS_ROCKET_HIDEOUT_2_ITEM_3 ; 7F X + const HS_ROCKET_HIDEOUT_2_ITEM_4 ; 80 X + const HS_ROCKET_HIDEOUT_3_ITEM_1 ; 81 X + const HS_ROCKET_HIDEOUT_3_ITEM_2 ; 82 X + const HS_ROCKET_HIDEOUT_4_GIOVANNI ; 83 + const HS_ROCKET_HIDEOUT_4_ITEM_1 ; 84 X + const HS_ROCKET_HIDEOUT_4_ITEM_2 ; 85 X + const HS_ROCKET_HIDEOUT_4_ITEM_3 ; 86 X + const HS_ROCKET_HIDEOUT_4_ITEM_4 ; 87 + const HS_ROCKET_HIDEOUT_4_ITEM_5 ; 88 + const HS_SILPH_CO_2F_1 ; 89 XXX never (de)activated? + const HS_SILPH_CO_2F_2 ; 8A + const HS_SILPH_CO_2F_3 ; 8B + const HS_SILPH_CO_2F_4 ; 8C + const HS_SILPH_CO_2F_5 ; 8D + const HS_SILPH_CO_3F_1 ; 8E + const HS_SILPH_CO_3F_2 ; 8F + const HS_SILPH_CO_3F_ITEM ; 90 X + const HS_SILPH_CO_4F_1 ; 91 + const HS_SILPH_CO_4F_2 ; 92 + const HS_SILPH_CO_4F_3 ; 93 + const HS_SILPH_CO_4F_ITEM_1 ; 94 X + const HS_SILPH_CO_4F_ITEM_2 ; 95 X + const HS_SILPH_CO_4F_ITEM_3 ; 96 X + const HS_SILPH_CO_5F_1 ; 97 + const HS_SILPH_CO_5F_2 ; 98 + const HS_SILPH_CO_5F_3 ; 99 + const HS_SILPH_CO_5F_4 ; 9A + const HS_SILPH_CO_5F_ITEM_1 ; 9B X + const HS_SILPH_CO_5F_ITEM_2 ; 9C X + const HS_SILPH_CO_5F_ITEM_3 ; 9D X + const HS_SILPH_CO_6F_1 ; 9E + const HS_SILPH_CO_6F_2 ; 9F + const HS_SILPH_CO_6F_3 ; A0 + const HS_SILPH_CO_6F_ITEM_1 ; A1 X + const HS_SILPH_CO_6F_ITEM_2 ; A2 X + const HS_SILPH_CO_7F_1 ; A3 + const HS_SILPH_CO_7F_2 ; A4 + const HS_SILPH_CO_7F_3 ; A5 + const HS_SILPH_CO_7F_4 ; A6 + const HS_SILPH_CO_7F_RIVAL ; A7 + const HS_SILPH_CO_7F_ITEM_1 ; A8 X + const HS_SILPH_CO_7F_ITEM_2 ; A9 X + const HS_SILPH_CO_7F_8 ; AA XXX sprite doesn't exist + const HS_SILPH_CO_8F_1 ; AB + const HS_SILPH_CO_8F_2 ; AC + const HS_SILPH_CO_8F_3 ; AD + const HS_SILPH_CO_9F_1 ; AE + const HS_SILPH_CO_9F_2 ; AF + const HS_SILPH_CO_9F_3 ; B0 + const HS_SILPH_CO_10F_1 ; B1 + const HS_SILPH_CO_10F_2 ; B2 + const HS_SILPH_CO_10F_3 ; B3 XXX never (de)activated? + const HS_SILPH_CO_10F_ITEM_1 ; B4 X + const HS_SILPH_CO_10F_ITEM_2 ; B5 X + const HS_SILPH_CO_10F_ITEM_3 ; B6 X + const HS_SILPH_CO_11F_1 ; B7 + const HS_SILPH_CO_11F_2 ; B8 + const HS_SILPH_CO_11F_3 ; B9 + const HS_MAP_F4_1 ; BA XXX sprite doesn't exist + const HS_MANSION_2_ITEM ; BB X + const HS_MANSION_3_ITEM_1 ; BC X + const HS_MANSION_3_ITEM_2 ; BD X + const HS_MANSION_4_ITEM_1 ; BE X + const HS_MANSION_4_ITEM_2 ; BF X + const HS_MANSION_4_ITEM_3 ; C0 X + const HS_MANSION_4_ITEM_4 ; C1 X + const HS_MANSION_4_ITEM_5 ; C2 X + const HS_SAFARI_ZONE_EAST_ITEM_1 ; C3 X + const HS_SAFARI_ZONE_EAST_ITEM_2 ; C4 X + const HS_SAFARI_ZONE_EAST_ITEM_3 ; C5 X + const HS_SAFARI_ZONE_EAST_ITEM_4 ; C6 X + const HS_SAFARI_ZONE_NORTH_ITEM_1 ; C7 X + const HS_SAFARI_ZONE_NORTH_ITEM_2 ; C8 X + const HS_SAFARI_ZONE_WEST_ITEM_1 ; C9 X + const HS_SAFARI_ZONE_WEST_ITEM_2 ; CA X + const HS_SAFARI_ZONE_WEST_ITEM_3 ; CB X + const HS_SAFARI_ZONE_WEST_ITEM_4 ; CC X + const HS_SAFARI_ZONE_CENTER_ITEM ; CD X + const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; CE X + const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; CF X + const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D0 X + const HS_MEWTWO ; D1 X + const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D2 X + const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D3 X + const HS_VICTORY_ROAD_1_ITEM_1 ; D4 X + const HS_VICTORY_ROAD_1_ITEM_2 ; D5 X + const HS_CHAMPIONS_ROOM_OAK ; D6 + const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; D7 + const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; D8 + const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; D9 + const HS_SEAFOAM_ISLANDS_2_BOULDER_2 ; DA + const HS_SEAFOAM_ISLANDS_3_BOULDER_1 ; DB + const HS_SEAFOAM_ISLANDS_3_BOULDER_2 ; DC + const HS_SEAFOAM_ISLANDS_4_BOULDER_1 ; DD + const HS_SEAFOAM_ISLANDS_4_BOULDER_2 ; DE + const HS_SEAFOAM_ISLANDS_4_BOULDER_3 ; DF + const HS_SEAFOAM_ISLANDS_4_BOULDER_4 ; E0 + const HS_SEAFOAM_ISLANDS_5_BOULDER_1 ; E1 + const HS_SEAFOAM_ISLANDS_5_BOULDER_2 ; E2 + const HS_ARTICUNO ; E3 X diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 4e4e314f38..11deedd057 100755 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -246,4 +246,6 @@ TRADE_CENTER EQU $F0 LORELEIS_ROOM EQU $F5 BRUNOS_ROOM EQU $F6 AGATHAS_ROOM EQU $F7 -BEACH_HOUSE EQU $F8 ; Yellow only \ No newline at end of file +IF DEF(_OPTION_BEACH_HOUSE) +BEACH_HOUSE EQU $F8 +ENDC diff --git a/constants/map_dimensions.asm b/constants/map_dimensions.asm index 7339e153e6..236ccac4c3 100755 --- a/constants/map_dimensions.asm +++ b/constants/map_dimensions.asm @@ -890,4 +890,9 @@ BRUNOS_ROOM_WIDTH EQU $05 ; Agatha_h map_id=247 AGATHAS_ROOM_HEIGHT EQU $06 -AGATHAS_ROOM_WIDTH EQU $05 \ No newline at end of file +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 29f15035d5..3452a393dd 100755 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -1,3 +1,16 @@ +MAX_LEVEL EQU 100 +NUM_MOVES EQU 4 + +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 + + A_BUTTON EQU %00000001 B_BUTTON EQU %00000010 SELECT EQU %00000100 @@ -7,14 +20,66 @@ D_LEFT EQU %00100000 D_UP EQU %01000000 D_DOWN EQU %10000000 -MAX_LEVEL EQU 100 -NUM_MOVES EQU 4 +SCREEN_WIDTH EQU 20 +SCREEN_HEIGHT EQU 18 -PARTY_LENGTH EQU 6 +NPC_MOVEMENT_DOWN EQU $00 +NPC_MOVEMENT_UP EQU $40 +NPC_MOVEMENT_LEFT EQU $80 +NPC_MOVEMENT_RIGHT EQU $C0 -MONS_PER_BOX EQU 20 -NUM_BOXES EQU 12 +; text box IDs +MESSAGE_BOX EQU $01 +FIELD_MOVE_MON_MENU EQU $04 +JP_MOCHIMONO_MENU_TEMPLATE EQU $05 +USE_TOSS_MENU_TEMPLATE EQU $06 +JP_SAVE_MESSAGE_MENU_TEMPLATE EQU $08 +JP_SPEED_OPTIONS_MENU_TEMPLATE EQU $09 +BATTLE_MENU_TEMPLATE EQU $0b +SWITCH_STATS_CANCEL_MENU_TEMPLATE EQU $0c +LIST_MENU_BOX EQU $0d +BUY_SELL_QUIT_MENU_TEMPLATE EQU $0e +MONEY_BOX_TEMPLATE EQU $0f +MON_SPRITE_POPUP EQU $11 +JP_AH_MENU_TEMPLATE EQU $12 +MONEY_BOX EQU $13 +TWO_OPTION_MENU EQU $14 +BUY_SELL_QUIT_MENU EQU $15 +JP_POKEDEX_MENU_TEMPLATE EQU $1a +SAFARI_BATTLE_MENU_TEMPLATE EQU $1b -HOF_MON EQU $10 -HOF_TEAM EQU PARTY_LENGTH * HOF_MON -NUM_HOF_TEAMS EQU 50 +; two option menu constants +YES_NO_MENU EQU 0 +NORTH_WEST_MENU EQU 1 +SOUTH_EAST_MENU EQU 2 +WIDE_YES_NO_MENU EQU 3 +NORTH_EAST_MENU EQU 4 +TRADE_CANCEL_MENU EQU 5 +HEAL_CANCEL_MENU EQU 6 +NO_YES_MENU EQU 7 + +; serial + +ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 +ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02 + +USING_EXTERNAL_CLOCK EQU $01 +USING_INTERNAL_CLOCK EQU $02 +CONNECTION_NOT_ESTABLISHED EQU $ff + +; signals the start of an array of bytes transferred over the link cable +SERIAL_PREAMBLE_BYTE EQU $FD + +; this byte is used when there is no data to send +SERIAL_NO_DATA_BYTE EQU $FE + +; signals the end of one part of a patch list (there are two parts) for player/enemy party data +SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF + +LINK_STATE_NONE EQU $00 ; not using link +LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre) +LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation +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 diff --git a/constants/move_constants.asm b/constants/move_constants.asm index d85f6bc1de..e3800b1583 100755 --- a/constants/move_constants.asm +++ b/constants/move_constants.asm @@ -1,269 +1,297 @@ -NUM_ATTACKS EQU $A4 +const_value = 1 -POUND EQU $01 -KARATE_CHOP EQU $02 -DOUBLESLAP EQU $03 -COMET_PUNCH EQU $04 -MEGA_PUNCH EQU $05 -PAY_DAY EQU $06 -FIRE_PUNCH EQU $07 -ICE_PUNCH EQU $08 -THUNDERPUNCH EQU $09 -SCRATCH EQU $0A -VICEGRIP EQU $0B -GUILLOTINE EQU $0C -RAZOR_WIND EQU $0D -SWORDS_DANCE EQU $0E -CUT EQU $0F -GUST EQU $10 -WING_ATTACK EQU $11 -WHIRLWIND EQU $12 -FLY EQU $13 -BIND EQU $14 -SLAM EQU $15 -VINE_WHIP EQU $16 -STOMP EQU $17 -DOUBLE_KICK EQU $18 -MEGA_KICK EQU $19 -JUMP_KICK EQU $1A -ROLLING_KICK EQU $1B -SAND_ATTACK EQU $1C -HEADBUTT EQU $1D -HORN_ATTACK EQU $1E -FURY_ATTACK EQU $1F -HORN_DRILL EQU $20 -TACKLE EQU $21 -BODY_SLAM EQU $22 -WRAP EQU $23 -TAKE_DOWN EQU $24 -THRASH EQU $25 -DOUBLE_EDGE EQU $26 -TAIL_WHIP EQU $27 -POISON_STING EQU $28 -TWINEEDLE EQU $29 -PIN_MISSILE EQU $2A -LEER EQU $2B -BITE EQU $2C -GROWL EQU $2D -ROAR EQU $2E -SING EQU $2F -SUPERSONIC EQU $30 -SONICBOOM EQU $31 -DISABLE EQU $32 -ACID EQU $33 -EMBER EQU $34 -FLAMETHROWER EQU $35 -MIST EQU $36 -WATER_GUN EQU $37 -HYDRO_PUMP EQU $38 -SURF EQU $39 -ICE_BEAM EQU $3A -BLIZZARD EQU $3B -PSYBEAM EQU $3C -BUBBLEBEAM EQU $3D -AURORA_BEAM EQU $3E -HYPER_BEAM EQU $3F -PECK EQU $40 -DRILL_PECK EQU $41 -SUBMISSION EQU $42 -LOW_KICK EQU $43 -COUNTER EQU $44 -SEISMIC_TOSS EQU $45 -STRENGTH EQU $46 -ABSORB EQU $47 -MEGA_DRAIN EQU $48 -LEECH_SEED EQU $49 -GROWTH EQU $4A -RAZOR_LEAF EQU $4B -SOLARBEAM EQU $4C -POISONPOWDER EQU $4D -STUN_SPORE EQU $4E -SLEEP_POWDER EQU $4F -PETAL_DANCE EQU $50 -STRING_SHOT EQU $51 -DRAGON_RAGE EQU $52 -FIRE_SPIN EQU $53 -THUNDERSHOCK EQU $54 -THUNDERBOLT EQU $55 -THUNDER_WAVE EQU $56 -THUNDER EQU $57 -ROCK_THROW EQU $58 -EARTHQUAKE EQU $59 -FISSURE EQU $5A -DIG EQU $5B -TOXIC EQU $5C -CONFUSION EQU $5D -PSYCHIC_M EQU $5E -HYPNOSIS EQU $5F -MEDITATE EQU $60 -AGILITY EQU $61 -QUICK_ATTACK EQU $62 -RAGE EQU $63 -TELEPORT EQU $64 -NIGHT_SHADE EQU $65 -MIMIC EQU $66 -SCREECH EQU $67 -DOUBLE_TEAM EQU $68 -RECOVER EQU $69 -HARDEN EQU $6A -MINIMIZE EQU $6B -SMOKESCREEN EQU $6C -CONFUSE_RAY EQU $6D -WITHDRAW EQU $6E -DEFENSE_CURL EQU $6F -BARRIER EQU $70 -LIGHT_SCREEN EQU $71 -HAZE EQU $72 -REFLECT EQU $73 -FOCUS_ENERGY EQU $74 -BIDE EQU $75 -METRONOME EQU $76 -MIRROR_MOVE EQU $77 -SELFDESTRUCT EQU $78 -EGG_BOMB EQU $79 -LICK EQU $7A -SMOG EQU $7B -SLUDGE EQU $7C -BONE_CLUB EQU $7D -FIRE_BLAST EQU $7E -WATERFALL EQU $7F -CLAMP EQU $80 -SWIFT EQU $81 -SKULL_BASH EQU $82 -SPIKE_CANNON EQU $83 -CONSTRICT EQU $84 -AMNESIA EQU $85 -KINESIS EQU $86 -SOFTBOILED EQU $87 -HI_JUMP_KICK EQU $88 -GLARE EQU $89 -DREAM_EATER EQU $8A -POISON_GAS EQU $8B -BARRAGE EQU $8C -LEECH_LIFE EQU $8D -LOVELY_KISS EQU $8E -SKY_ATTACK EQU $8F -TRANSFORM EQU $90 -BUBBLE EQU $91 -DIZZY_PUNCH EQU $92 -SPORE EQU $93 -FLASH EQU $94 -PSYWAVE EQU $95 -SPLASH EQU $96 -ACID_ARMOR EQU $97 -CRABHAMMER EQU $98 -EXPLOSION EQU $99 -FURY_SWIPES EQU $9A -BONEMERANG EQU $9B -REST EQU $9C -ROCK_SLIDE EQU $9D -HYPER_FANG EQU $9E -SHARPEN EQU $9F -CONVERSION EQU $A0 -TRI_ATTACK EQU $A1 -SUPER_FANG EQU $A2 -SLASH EQU $A3 -SUBSTITUTE EQU $A4 -STRUGGLE EQU $A5 -METAL_CLAW EQU $A6 -BULLET_PUNCH EQU $A7 -FLASH_CANNON EQU $A8 -IRON_TAIL EQU $A9 -METEOR_MASH EQU $AA -CRUNCH EQU $AB -DARK_PULSE EQU $AC -FEINT_ATTACK EQU $AD -NIGHT_SLASH EQU $AE -MOONBLAST EQU $AF -DRAININGKISS EQU $B0 -DISARM_VOICE EQU $B1 -DAZZLINGLEAM EQU $B2 -DRACO_METEOR EQU $B3 -DRAGONBREATH EQU $B4 -DRAGON_CLAW EQU $B5 -DRAGON_PULSE EQU $B6 -TWISTER EQU $B7 -OUTRAGE EQU $B8 -SHADOW_CLAW EQU $B9 -STEEL_WING EQU $BA -IRON_DEFENSE EQU $BB -AIR_SLASH EQU $BC -FIRE_FANG EQU $BD -FLARE_BLITZ EQU $BE -BLAST_BURN EQU $BF -ICE_FANG EQU $C0 -THUNDER_FANG EQU $C1 -WATER_PULSE EQU $C2 -AQUA_TAIL EQU $C3 -HYDRO_CANNON EQU $C4 -FRENZY_PLANT EQU $C5 -SUCKER_PUNCH EQU $C6 -SHADOW_BALL EQU $C7 -FLAME_WHEEL EQU $C8 -MOONLIGHT EQU $C9 -HEX EQU $CA -SHADOW_PUNCH EQU $CB -AERIAL_ACE EQU $CC -ACROBATICS EQU $CD -AIR_CUTTER EQU $CE -ICY_WIND EQU $CF -ICE_SHARD EQU $D0 -SHEER_COLD EQU $D1 -ELECTRO_BALL EQU $D2 -NUZZLE EQU $D3 -DISCHARGE EQU $D4 -VOLT_TACKLE EQU $D5 -MUDDY_WATER EQU $D6 -WHIRLPOOL EQU $D7 -GIGA_DRAIN EQU $D8 -PETALBLIZARD EQU $D9 -LEAF_BLADE EQU $DA -WOOD_HAMMER EQU $DB -POISON_JAB EQU $DC -GUNK_SHOT EQU $DD -POISON_FANG EQU $DE -SLUDGE_WAVE EQU $DF -SILVER_WIND EQU $E0 -BUG_BUZZ EQU $E1 -MEGAHORN EQU $E2 -X_SCISSOR EQU $E3 -SIGNAL_BEAM EQU $E4 -EARTH_POWER EQU $E5 -MUD_SLAP EQU $E6 -MUD_BOMB EQU $E7 -EXTRASENSORY EQU $E8 -ZEN_HEADBUTT EQU $E9 -PSYCHO_CUT EQU $EA -HYPER_VOICE EQU $EB -EXTREMESPEED EQU $EC -GIGA_IMPACT EQU $ED -POWER_GEM EQU $EE -ROCK_BLAST EQU $EF -ROCK_POLISH EQU $F0 -ROCK_TOMB EQU $F1 -DYNAMICPUNCH EQU $F2 -CIRCLE_THROW EQU $F3 -CROSS_CHOP EQU $F4 -LOW_SWEEP EQU $F5 -HURRICANE EQU $F6 -BABYDOLLEYES EQU $F7 -BONE_RUSH EQU $F8 -AEROBLAST EQU $F9 + const POUND ; 01 + const KARATE_CHOP ; 02 + const DOUBLESLAP ; 03 + const COMET_PUNCH ; 04 + const MEGA_PUNCH ; 05 + const PAY_DAY ; 06 + const FIRE_PUNCH ; 07 + const ICE_PUNCH ; 08 + const THUNDERPUNCH ; 09 + const SCRATCH ; 0a + const VICEGRIP ; 0b + const GUILLOTINE ; 0c + const RAZOR_WIND ; 0d + const SWORDS_DANCE ; 0e + const CUT ; 0f + const GUST ; 10 + const WING_ATTACK ; 11 + const WHIRLWIND ; 12 + const FLY ; 13 + const BIND ; 14 + const SLAM ; 15 + const VINE_WHIP ; 16 + const STOMP ; 17 + const DOUBLE_KICK ; 18 + const MEGA_KICK ; 19 + const JUMP_KICK ; 1a + const ROLLING_KICK ; 1b + const SAND_ATTACK ; 1c + const HEADBUTT ; 1d + const HORN_ATTACK ; 1e + const FURY_ATTACK ; 1f + const HORN_DRILL ; 20 + const TACKLE ; 21 + const BODY_SLAM ; 22 + const WRAP ; 23 + const TAKE_DOWN ; 24 + const THRASH ; 25 + const DOUBLE_EDGE ; 26 + const TAIL_WHIP ; 27 + const POISON_STING ; 28 + const TWINEEDLE ; 29 + const PIN_MISSILE ; 2a + const LEER ; 2b + const BITE ; 2c + const GROWL ; 2d + const ROAR ; 2e + const SING ; 2f + const SUPERSONIC ; 30 + const SONICBOOM ; 31 + const DISABLE ; 32 + const ACID ; 33 + const EMBER ; 34 + const FLAMETHROWER ; 35 + const MIST ; 36 + const WATER_GUN ; 37 + const HYDRO_PUMP ; 38 + const SURF ; 39 + const ICE_BEAM ; 3a + const BLIZZARD ; 3b + const PSYBEAM ; 3c + const BUBBLEBEAM ; 3d + const AURORA_BEAM ; 3e + const HYPER_BEAM ; 3f + const PECK ; 40 + const DRILL_PECK ; 41 + const SUBMISSION ; 42 + const LOW_KICK ; 43 + const COUNTER ; 44 + const SEISMIC_TOSS ; 45 + const STRENGTH ; 46 + const ABSORB ; 47 + const MEGA_DRAIN ; 48 + const LEECH_SEED ; 49 + const GROWTH ; 4a + const RAZOR_LEAF ; 4b + const SOLARBEAM ; 4c + const POISONPOWDER ; 4d + const STUN_SPORE ; 4e + const SLEEP_POWDER ; 4f + const PETAL_DANCE ; 50 + const STRING_SHOT ; 51 + const DRAGON_RAGE ; 52 + const FIRE_SPIN ; 53 + const THUNDERSHOCK ; 54 + const THUNDERBOLT ; 55 + const THUNDER_WAVE ; 56 + const THUNDER ; 57 + const ROCK_THROW ; 58 + const EARTHQUAKE ; 59 + const FISSURE ; 5a + const DIG ; 5b + const TOXIC ; 5c + const CONFUSION ; 5d + const PSYCHIC_M ; 5e + const HYPNOSIS ; 5f + const MEDITATE ; 60 + const AGILITY ; 61 + const QUICK_ATTACK ; 62 + const RAGE ; 63 + const TELEPORT ; 64 + const NIGHT_SHADE ; 65 + const MIMIC ; 66 + const SCREECH ; 67 + const DOUBLE_TEAM ; 68 + const RECOVER ; 69 + const HARDEN ; 6a + const MINIMIZE ; 6b + const SMOKESCREEN ; 6c + const CONFUSE_RAY ; 6d + const WITHDRAW ; 6e + const DEFENSE_CURL ; 6f + const BARRIER ; 70 + const LIGHT_SCREEN ; 71 + const HAZE ; 72 + const REFLECT ; 73 + const FOCUS_ENERGY ; 74 + const BIDE ; 75 + const METRONOME ; 76 + const MIRROR_MOVE ; 77 + const SELFDESTRUCT ; 78 + const EGG_BOMB ; 79 + const LICK ; 7a + const SMOG ; 7b + const SLUDGE ; 7c + const BONE_CLUB ; 7d + const FIRE_BLAST ; 7e + const WATERFALL ; 7f + const CLAMP ; 80 + const SWIFT ; 81 + const SKULL_BASH ; 82 + const SPIKE_CANNON ; 83 + const CONSTRICT ; 84 + const AMNESIA ; 85 + const KINESIS ; 86 + const SOFTBOILED ; 87 + const HI_JUMP_KICK ; 88 + const GLARE ; 89 + const DREAM_EATER ; 8a + const POISON_GAS ; 8b + const BARRAGE ; 8c + const LEECH_LIFE ; 8d + const LOVELY_KISS ; 8e + const SKY_ATTACK ; 8f + const TRANSFORM ; 90 + const BUBBLE ; 91 + const DIZZY_PUNCH ; 92 + const SPORE ; 93 + const FLASH ; 94 + const PSYWAVE ; 95 + const SPLASH ; 96 + const ACID_ARMOR ; 97 + const CRABHAMMER ; 98 + const EXPLOSION ; 99 + const FURY_SWIPES ; 9a + const BONEMERANG ; 9b + const REST ; 9c + const ROCK_SLIDE ; 9d + const HYPER_FANG ; 9e + const SHARPEN ; 9f + const CONVERSION ; a0 + const TRI_ATTACK ; a1 + const SUPER_FANG ; a2 + const SLASH ; a3 + const SUBSTITUTE ; a4 + const STRUGGLE + const METAL_CLAW + const BULLET_PUNCH + const FLASH_CANNON + const IRON_TAIL + const METEOR_MASH + const CRUNCH + const DARK_PULSE + const FEINT_ATTACK + const NIGHT_SLASH + const MOONBLAST + const DRAININGKISS + const DISARM_VOICE + const DAZZLINGLEAM + const DRACO_METEOR + const DRAGONBREATH + const DRAGON_CLAW + const DRAGON_PULSE + const TWISTER + const OUTRAGE + const SHADOW_CLAW + const STEEL_WING + const IRON_DEFENSE + const AIR_SLASH + const FIRE_FANG + const FLARE_BLITZ + const BLAST_BURN + const ICE_FANG + const THUNDER_FANG + const WATER_PULSE + const AQUA_TAIL + const HYDRO_CANNON + const FRENZY_PLANT + const SUCKER_PUNCH + const SHADOW_BALL + const FLAME_WHEEL + const MOONLIGHT + const HEX + const SHADOW_PUNCH + const AERIAL_ACE + const ACROBATICS + const AIR_CUTTER + const ICY_WIND + const ICE_SHARD + const SHEER_COLD + const ELECTRO_BALL + const NUZZLE + const DISCHARGE + const VOLT_TACKLE + const MUDDY_WATER + const WHIRLPOOL + const GIGA_DRAIN + const PETALBLIZARD + const LEAF_BLADE + const WOOD_HAMMER + const POISON_JAB + const GUNK_SHOT + const POISON_FANG + const SLUDGE_WAVE + const SILVER_WIND + const BUG_BUZZ + const MEGAHORN + const X_SCISSOR + const SIGNAL_BEAM + const EARTH_POWER + const MUD_SLAP + const MUD_BOMB + const EXTRASENSORY + const ZEN_HEADBUTT + const PSYCHO_CUT + const HYPER_VOICE + const EXTREMESPEED + const GIGA_IMPACT + const POWER_GEM + const ROCK_BLAST + const ROCK_POLISH + const ROCK_TOMB + const DYNAMICPUNCH + const CIRCLE_THROW + const CROSS_CHOP + const LOW_SWEEP + const HURRICANE + const BABYDOLLEYES + const BONE_RUSH + const AEROBLAST +NUM_ATTACKS EQU const_value +const_value = STRUGGLE + 1 -; these do double duty as animation identifiers -SHOWPIC_ANIM EQU $A6 ; redraw monster pic -STATUS_AFFECTED_ANIM EQU $A7 ; effect when monster receives a status aliment -XSTATITEM_ANIM EQU $AE ; use X Attack/Defense/Speed/Special -BURN_PSN_ANIM EQU $BA ; Plays when a monster is burned or poisoned -SLP_ANIM EQU $BD ; sleeping monster -CONF_ANIM EQU $BF ; confused monster -TOSS_ANIM EQU $C1 ; toss Poké Ball -SHAKE_ANIM EQU $C2 ; shaking Poké Ball when catching monster -POOF_ANIM EQU $C3 ; puff of smoke -BLOCKBALL_ANIM EQU $C4 ; trainer knocks away Poké Ball -GREATTOSS_ANIM EQU $C5 ; toss Great Ball -ULTRATOSS_ANIM EQU $C6 ; toss Ultra Ball or Master Ball -HIDEPIC_ANIM EQU $C8 ; monster disappears -ROCK_ANIM EQU $C9 ; throw rock -BAIT_ANIM EQU $CA ; throw bait + + ; Moves do double duty as animation identifiers. + + const SHOWPIC_ANIM + const STATUS_AFFECTED_ANIM + const ANIM_A8 + const ANIM_A9 + const TRADE_BALL_DROP_ANIM + const TRADE_BALL_SHAKE_ANIM + const TRADE_BALL_TILT_ANIM + const TRADE_BALL_POOF_ANIM + const XSTATITEM_ANIM ; use X Attack/Defense/Speed/Special + const ANIM_AF + const ANIM_B0 + const ANIM_B1 + const ANIM_B2 + const ANIM_B3 + const ANIM_B4 + const ANIM_B5 + const ANIM_B6 + const ANIM_B7 + const ANIM_B8 + const ANIM_B9 + const BURN_PSN_ANIM ; Plays when a monster is burned or poisoned + const ANIM_BB + const ANIM_BC + const SLP_ANIM ; sleeping monster + const ANIM_BE + const CONF_ANIM ; confused monster + const ANIM_C0 + const TOSS_ANIM ; toss Poké Ball + const SHAKE_ANIM ; shaking Poké Ball when catching monster + const POOF_ANIM ; puff of smoke + const BLOCKBALL_ANIM ; trainer knocks away Poké Ball + const GREATTOSS_ANIM ; toss Great Ball + const ULTRATOSS_ANIM ; toss Ultra Ball or Master Ball + const ANIM_C7 + const HIDEPIC_ANIM ; monster disappears + const ROCK_ANIM ; throw rock + const BAIT_ANIM ; throw bait + + \ No newline at end of file diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index efc13443e2..347796cd88 100755 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -86,4 +86,12 @@ SPRITE_LYING_OLD_MAN EQU $48 ; different kinds of people events ITEM EQU $80 -TRAINER EQU $40 \ No newline at end of file +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 diff --git a/constants/status_constants.asm b/constants/status_constants.asm index 866ea03c17..3b5aee0686 100755 --- a/constants/status_constants.asm +++ b/constants/status_constants.asm @@ -1,6 +1,32 @@ -; status ailments -SLP EQU %111 ; mask +; 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/tilesets.asm b/constants/tilesets.asm index e364db76ae..bf15f24e9c 100755 --- a/constants/tilesets.asm +++ b/constants/tilesets.asm @@ -22,4 +22,6 @@ LAB EQU 20 CLUB EQU 21 FACILITY EQU 22 PLATEAU EQU 23 - +IF DEF(_OPTION_BEACH_HOUSE) +BEACH_HOUSE_TILESET EQU 24 +ENDC diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index e06ca2ce2c..067c8707ac 100755 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -2,13 +2,9 @@ SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile) ; Overload W_GRASSMONS -wd893 EQU $d893 ; W_GRASSMONS + 11 -wd896 EQU $d896 ; W_GRASSMONS + 14 +wSerialEnemyDataBlock EQU $d893 ; W_GRASSMONS + 11 ; Overload enemy party data W_WATERRATE EQU $d8a4 ; wEnemyMon1Species W_WATERMONS EQU $d8a5 ; wEnemyMon1Species + 1 -; Overload enemy stat modifiers -wTradeMonNick EQU $cd1e ; wPlayerMonAccuracyMod - diff --git a/data/baseStats/abra.asm b/data/baseStats/abra.asm index 11df3b215b..fee2c0c5af 100755 --- a/data/baseStats/abra.asm +++ b/data/baseStats/abra.asm @@ -9,7 +9,7 @@ db PSYCHIC ; species type 1 db PSYCHIC ; species type 2 db 200 ; catch rate db 73 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/abra.pic",0,1 ; 55, sprite dimensions dw AbraPicFront dw AbraPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/aerodactyl.asm b/data/baseStats/aerodactyl.asm index 32f6ddb822..065a5bc336 100755 --- a/data/baseStats/aerodactyl.asm +++ b/data/baseStats/aerodactyl.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 202 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/aerodactyl.pic",0,1 ; 77, sprite dimensions dw AerodactylPicFront dw AerodactylPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/alakazam.asm b/data/baseStats/alakazam.asm index e89da3cc06..1b927fd6e4 100755 --- a/data/baseStats/alakazam.asm +++ b/data/baseStats/alakazam.asm @@ -9,18 +9,17 @@ db PSYCHIC ; species type 1 db PSYCHIC ; species type 2 db 50 ; catch rate db 186 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/alakazam.pic",0,1 ; 77, sprite dimensions dw AlakazamPicFront dw AlakazamPicBack ; attacks known at lvl 0 db TELEPORT -IF !_YELLOW - db CONFUSION - db DISABLE -ENDC -IF _YELLOW +IF DEF(_YELLOW) db KINESIS db 0 +ELSE + db CONFUSION + db DISABLE ENDC db 0 db 3 ; growth rate diff --git a/data/baseStats/arbok.asm b/data/baseStats/arbok.asm index ea8457b73a..05e57c8676 100755 --- a/data/baseStats/arbok.asm +++ b/data/baseStats/arbok.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 90 ; catch rate db 147 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/arbok.pic",0,1 ; 77, sprite dimensions dw ArbokPicFront dw ArbokPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/arcanine.asm b/data/baseStats/arcanine.asm index 10648ffa1f..3f755c9b3d 100755 --- a/data/baseStats/arcanine.asm +++ b/data/baseStats/arcanine.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 75 ; catch rate db 213 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/arcanine.pic",0,1 ; 77, sprite dimensions dw ArcaninePicFront dw ArcaninePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/articuno.asm b/data/baseStats/articuno.asm index 51ca7b12bc..d476520246 100755 --- a/data/baseStats/articuno.asm +++ b/data/baseStats/articuno.asm @@ -9,7 +9,7 @@ db ICE ; species type 1 db FLYING ; species type 2 db 3 ; catch rate db 215 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/articuno.pic",0,1 ; 77, sprite dimensions dw ArticunoPicFront dw ArticunoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/beedrill.asm b/data/baseStats/beedrill.asm index f2b93694b0..0e2426b6fb 100755 --- a/data/baseStats/beedrill.asm +++ b/data/baseStats/beedrill.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db POISON ; species type 2 db 45 ; catch rate db 159 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/beedrill.pic",0,1 ; 77, sprite dimensions dw BeedrillPicFront dw BeedrillPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/bellsprout.asm b/data/baseStats/bellsprout.asm index 40cb3c5f51..acb0e4161f 100755 --- a/data/baseStats/bellsprout.asm +++ b/data/baseStats/bellsprout.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 255 ; catch rate db 84 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/bellsprout.pic",0,1 ; 55, sprite dimensions dw BellsproutPicFront dw BellsproutPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/blastoise.asm b/data/baseStats/blastoise.asm index 29d5aa4abb..7028a3a8ff 100755 --- a/data/baseStats/blastoise.asm +++ b/data/baseStats/blastoise.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 210 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/blastoise.pic",0,1 ; 77, sprite dimensions dw BlastoisePicFront dw BlastoisePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/bulbasaur.asm b/data/baseStats/bulbasaur.asm index b808260636..4253604590 100755 --- a/data/baseStats/bulbasaur.asm +++ b/data/baseStats/bulbasaur.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 45 ; catch rate db 64 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/bulbasaur.pic",0,1 ; 55, sprite dimensions dw BulbasaurPicFront dw BulbasaurPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/butterfree.asm b/data/baseStats/butterfree.asm index 7127958722..e26e11e913 100755 --- a/data/baseStats/butterfree.asm +++ b/data/baseStats/butterfree.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 160 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/butterfree.pic",0,1 ; 77, sprite dimensions dw ButterfreePicFront dw ButterfreePicBack ; attacks known at lvl 0 @@ -25,10 +25,9 @@ db %00111000 db %11110000 db %01000011 db %00101000 -IF !_YELLOW - db %00000010 -ENDC -IF _YELLOW +IF DEF(_YELLOW) db %01000010 +ELSE + db %00000010 ENDC db BANK(ButterfreePicFront) diff --git a/data/baseStats/caterpie.asm b/data/baseStats/caterpie.asm index 4c2bdcfbef..620340c7ac 100755 --- a/data/baseStats/caterpie.asm +++ b/data/baseStats/caterpie.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db BUG ; species type 2 db 255 ; catch rate db 53 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/caterpie.pic",0,1 ; 55, sprite dimensions dw CaterpiePicFront dw CaterpiePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/chansey.asm b/data/baseStats/chansey.asm index 3097ee82a4..295953827a 100755 --- a/data/baseStats/chansey.asm +++ b/data/baseStats/chansey.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 30 ; catch rate db 255 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/chansey.pic",0,1 ; 66, sprite dimensions dw ChanseyPicFront dw ChanseyPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/charizard.asm b/data/baseStats/charizard.asm index 111ec58a5d..0e5d5c67fe 100755 --- a/data/baseStats/charizard.asm +++ b/data/baseStats/charizard.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 209 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/charizard.pic",0,1 ; 77, sprite dimensions dw CharizardPicFront dw CharizardPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/charmander.asm b/data/baseStats/charmander.asm index 994a1e597e..ee64601a4c 100755 --- a/data/baseStats/charmander.asm +++ b/data/baseStats/charmander.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 45 ; catch rate db 65 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/charmander.pic",0,1 ; 55, sprite dimensions dw CharmanderPicFront dw CharmanderPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/charmeleon.asm b/data/baseStats/charmeleon.asm index dc5e442980..ecf05c785f 100755 --- a/data/baseStats/charmeleon.asm +++ b/data/baseStats/charmeleon.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 45 ; catch rate db 142 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/charmeleon.pic",0,1 ; 66, sprite dimensions dw CharmeleonPicFront dw CharmeleonPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/clefable.asm b/data/baseStats/clefable.asm index acb4d2dd57..aa8988e4cf 100755 --- a/data/baseStats/clefable.asm +++ b/data/baseStats/clefable.asm @@ -9,7 +9,7 @@ db FAIRY ; species type 1 db FAIRY ; species type 2 db 25 ; catch rate db 129 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/clefable.pic",0,1 ; 66, sprite dimensions dw ClefablePicFront dw ClefablePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/clefairy.asm b/data/baseStats/clefairy.asm index 0017b4dfc4..526dd7e8f8 100755 --- a/data/baseStats/clefairy.asm +++ b/data/baseStats/clefairy.asm @@ -9,7 +9,7 @@ db FAIRY ; species type 1 db FAIRY ; species type 2 db 150 ; catch rate db 68 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/clefairy.pic",0,1 ; 55, sprite dimensions dw ClefairyPicFront dw ClefairyPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/cloyster.asm b/data/baseStats/cloyster.asm index e602145cca..f0e4e5088a 100755 --- a/data/baseStats/cloyster.asm +++ b/data/baseStats/cloyster.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db ICE ; species type 2 db 60 ; catch rate db 203 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/cloyster.pic",0,1 ; 77, sprite dimensions dw CloysterPicFront dw CloysterPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/cubone.asm b/data/baseStats/cubone.asm index 39223fe7b1..d7fafba8c7 100755 --- a/data/baseStats/cubone.asm +++ b/data/baseStats/cubone.asm @@ -9,7 +9,7 @@ db GROUND ; species type 1 db GROUND ; species type 2 db 190 ; catch rate db 87 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/cubone.pic",0,1 ; 55, sprite dimensions dw CubonePicFront dw CubonePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/dewgong.asm b/data/baseStats/dewgong.asm index 2f7b411460..337ccd4a18 100755 --- a/data/baseStats/dewgong.asm +++ b/data/baseStats/dewgong.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db ICE ; species type 2 db 75 ; catch rate db 176 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/dewgong.pic",0,1 ; 66, sprite dimensions dw DewgongPicFront dw DewgongPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/diglett.asm b/data/baseStats/diglett.asm index 2c6b5ab761..f5c1b81685 100755 --- a/data/baseStats/diglett.asm +++ b/data/baseStats/diglett.asm @@ -9,7 +9,7 @@ db GROUND ; species type 1 db GROUND ; species type 2 db 255 ; catch rate db 81 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/diglett.pic",0,1 ; 55, sprite dimensions dw DiglettPicFront dw DiglettPicBack ; attacks known at lvl 0 @@ -25,10 +25,9 @@ db %00001000 db %11001110 db %00000010 db %10001000 -IF !_YELLOW - db %00000010 -ENDC -IF _YELLOW +IF DEF(_YELLOW) db %00000110 +ELSE + db %00000010 ENDC db BANK(DiglettPicFront) diff --git a/data/baseStats/ditto.asm b/data/baseStats/ditto.asm index e44f2f48bf..2199ef319c 100755 --- a/data/baseStats/ditto.asm +++ b/data/baseStats/ditto.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 35 ; catch rate db 61 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/ditto.pic",0,1 ; 55, sprite dimensions dw DittoPicFront dw DittoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/dodrio.asm b/data/baseStats/dodrio.asm index 89c4789f1c..1ec835989b 100755 --- a/data/baseStats/dodrio.asm +++ b/data/baseStats/dodrio.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 158 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/dodrio.pic",0,1 ; 77, sprite dimensions dw DodrioPicFront dw DodrioPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/doduo.asm b/data/baseStats/doduo.asm index 43297a3f1f..c3201098c6 100755 --- a/data/baseStats/doduo.asm +++ b/data/baseStats/doduo.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 190 ; catch rate db 96 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/doduo.pic",0,1 ; 55, sprite dimensions dw DoduoPicFront dw DoduoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/dragonair.asm b/data/baseStats/dragonair.asm index c13a48e2d8..047767480f 100755 --- a/data/baseStats/dragonair.asm +++ b/data/baseStats/dragonair.asm @@ -9,7 +9,7 @@ db DRAGON ; species type 1 db DRAGON ; species type 2 db 45 ; catch rate db 144 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/dragonair.pic",0,1 ; 66, sprite dimensions dw DragonairPicFront dw DragonairPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/dragonite.asm b/data/baseStats/dragonite.asm index 197dc8a84c..dc387065be 100755 --- a/data/baseStats/dragonite.asm +++ b/data/baseStats/dragonite.asm @@ -9,7 +9,7 @@ db DRAGON ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 218 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/dragonite.pic",0,1 ; 77, sprite dimensions dw DragonitePicFront dw DragonitePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/dratini.asm b/data/baseStats/dratini.asm index 822866a8ff..ab1cfd4d98 100755 --- a/data/baseStats/dratini.asm +++ b/data/baseStats/dratini.asm @@ -9,7 +9,7 @@ db DRAGON ; species type 1 db DRAGON ; species type 2 db 45 ; catch rate db 67 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/dratini.pic",0,1 ; 55, sprite dimensions dw DratiniPicFront dw DratiniPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/drowzee.asm b/data/baseStats/drowzee.asm index 18cbc0e26d..0c228e3241 100755 --- a/data/baseStats/drowzee.asm +++ b/data/baseStats/drowzee.asm @@ -9,7 +9,7 @@ db PSYCHIC ; species type 1 db PSYCHIC ; species type 2 db 190 ; catch rate db 102 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/drowzee.pic",0,1 ; 66, sprite dimensions dw DrowzeePicFront dw DrowzeePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/dugtrio.asm b/data/baseStats/dugtrio.asm index a61b4599be..71df354d0f 100755 --- a/data/baseStats/dugtrio.asm +++ b/data/baseStats/dugtrio.asm @@ -9,7 +9,7 @@ db GROUND ; species type 1 db GROUND ; species type 2 db 50 ; catch rate db 153 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/dugtrio.pic",0,1 ; 66, sprite dimensions dw DugtrioPicFront dw DugtrioPicBack ; attacks known at lvl 0 @@ -25,10 +25,9 @@ db %00001000 db %11001110 db %00000010 db %10001000 -IF !_YELLOW - db %00000010 -ENDC -IF _YELLOW +IF DEF(_YELLOW) db %00000110 +ELSE + db %00000010 ENDC db BANK(DugtrioPicFront) diff --git a/data/baseStats/eevee.asm b/data/baseStats/eevee.asm index 58bb417933..2170230770 100755 --- a/data/baseStats/eevee.asm +++ b/data/baseStats/eevee.asm @@ -9,16 +9,15 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 45 ; catch rate db 92 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/eevee.pic",0,1 ; 55, sprite dimensions dw EeveePicFront dw EeveePicBack ; attacks known at lvl 0 db TACKLE -IF !_YELLOW - db SAND_ATTACK -ENDC -IF _YELLOW +IF DEF(_YELLOW) db TAIL_WHIP +ELSE + db SAND_ATTACK ENDC db 0 db 0 diff --git a/data/baseStats/ekans.asm b/data/baseStats/ekans.asm index bbbbfafc3b..20ee162856 100755 --- a/data/baseStats/ekans.asm +++ b/data/baseStats/ekans.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 255 ; catch rate db 62 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/ekans.pic",0,1 ; 55, sprite dimensions dw EkansPicFront dw EkansPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/electabuzz.asm b/data/baseStats/electabuzz.asm index 0807f8d3c5..4818aeb972 100755 --- a/data/baseStats/electabuzz.asm +++ b/data/baseStats/electabuzz.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db ELECTRIC ; species type 2 db 45 ; catch rate db 156 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/electabuzz.pic",0,1 ; 66, sprite dimensions dw ElectabuzzPicFront dw ElectabuzzPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/electrode.asm b/data/baseStats/electrode.asm index 424c4c424f..dfd4aae9e7 100755 --- a/data/baseStats/electrode.asm +++ b/data/baseStats/electrode.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db ELECTRIC ; species type 2 db 60 ; catch rate db 150 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/electrode.pic",0,1 ; 55, sprite dimensions dw ElectrodePicFront dw ElectrodePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/exeggcute.asm b/data/baseStats/exeggcute.asm index 0445e9fa6b..cbe52fa0a8 100755 --- a/data/baseStats/exeggcute.asm +++ b/data/baseStats/exeggcute.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db PSYCHIC ; species type 2 db 90 ; catch rate db 98 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/exeggcute.pic",0,1 ; 77, sprite dimensions dw ExeggcutePicFront dw ExeggcutePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/exeggutor.asm b/data/baseStats/exeggutor.asm index 1fc9d65482..037c01ebcf 100755 --- a/data/baseStats/exeggutor.asm +++ b/data/baseStats/exeggutor.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db PSYCHIC ; species type 2 db 45 ; catch rate db 212 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/exeggutor.pic",0,1 ; 77, sprite dimensions dw ExeggutorPicFront dw ExeggutorPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/farfetchd.asm b/data/baseStats/farfetchd.asm index 1cf671f8f8..6ff0e2cd51 100755 --- a/data/baseStats/farfetchd.asm +++ b/data/baseStats/farfetchd.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 94 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/farfetchd.pic",0,1 ; 66, sprite dimensions dw FarfetchdPicFront dw FarfetchdPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/fearow.asm b/data/baseStats/fearow.asm index c4eaf95ea9..46171a81d4 100755 --- a/data/baseStats/fearow.asm +++ b/data/baseStats/fearow.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 90 ; catch rate db 162 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/fearow.pic",0,1 ; 77, sprite dimensions dw FearowPicFront dw FearowPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/flareon.asm b/data/baseStats/flareon.asm index 6597747ef2..11cb112f3e 100755 --- a/data/baseStats/flareon.asm +++ b/data/baseStats/flareon.asm @@ -9,16 +9,15 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 45 ; catch rate db 198 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/flareon.pic",0,1 ; 66, sprite dimensions dw FlareonPicFront dw FlareonPicBack ; attacks known at lvl 0 db TACKLE -IF !_YELLOW - db SAND_ATTACK -ENDC -IF _YELLOW +IF DEF(_YELLOW) db TAIL_WHIP +ELSE + db SAND_ATTACK ENDC db QUICK_ATTACK db EMBER diff --git a/data/baseStats/gastly.asm b/data/baseStats/gastly.asm index 33ca47c869..cfeceaf983 100755 --- a/data/baseStats/gastly.asm +++ b/data/baseStats/gastly.asm @@ -9,7 +9,7 @@ db GHOST ; species type 1 db POISON ; species type 2 db 190 ; catch rate db 95 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/gastly.pic",0,1 ; 77, sprite dimensions dw GastlyPicFront dw GastlyPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/gengar.asm b/data/baseStats/gengar.asm index fa9dc63b7b..203358d4e6 100755 --- a/data/baseStats/gengar.asm +++ b/data/baseStats/gengar.asm @@ -9,7 +9,7 @@ db GHOST ; species type 1 db POISON ; species type 2 db 45 ; catch rate db 190 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/gengar.pic",0,1 ; 66, sprite dimensions dw GengarPicFront dw GengarPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/geodude.asm b/data/baseStats/geodude.asm index 7277236d32..6f0df2c0d8 100755 --- a/data/baseStats/geodude.asm +++ b/data/baseStats/geodude.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db GROUND ; species type 2 db 255 ; catch rate db 86 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/geodude.pic",0,1 ; 55, sprite dimensions dw GeodudePicFront dw GeodudePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/gloom.asm b/data/baseStats/gloom.asm index 93a5f73c21..232524699d 100755 --- a/data/baseStats/gloom.asm +++ b/data/baseStats/gloom.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 120 ; catch rate db 132 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/gloom.pic",0,1 ; 66, sprite dimensions dw GloomPicFront dw GloomPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/golbat.asm b/data/baseStats/golbat.asm index c8c11046b7..f9589eb97b 100755 --- a/data/baseStats/golbat.asm +++ b/data/baseStats/golbat.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db FLYING ; species type 2 db 90 ; catch rate db 171 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/golbat.pic",0,1 ; 77, sprite dimensions dw GolbatPicFront dw GolbatPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/goldeen.asm b/data/baseStats/goldeen.asm index 50153e8114..c3a4dc8dfe 100755 --- a/data/baseStats/goldeen.asm +++ b/data/baseStats/goldeen.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 225 ; catch rate db 111 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/goldeen.pic",0,1 ; 66, sprite dimensions dw GoldeenPicFront dw GoldeenPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/golduck.asm b/data/baseStats/golduck.asm index ce3f10e129..402dd8f5a5 100755 --- a/data/baseStats/golduck.asm +++ b/data/baseStats/golduck.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 75 ; catch rate db 174 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/golduck.pic",0,1 ; 77, sprite dimensions dw GolduckPicFront dw GolduckPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/golem.asm b/data/baseStats/golem.asm index 5d12787d88..4c96bc5666 100755 --- a/data/baseStats/golem.asm +++ b/data/baseStats/golem.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db GROUND ; species type 2 db 45 ; catch rate db 177 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/golem.pic",0,1 ; 66, sprite dimensions dw GolemPicFront dw GolemPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/graveler.asm b/data/baseStats/graveler.asm index c568a305d5..476d5ed2e6 100755 --- a/data/baseStats/graveler.asm +++ b/data/baseStats/graveler.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db GROUND ; species type 2 db 120 ; catch rate db 134 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/graveler.pic",0,1 ; 66, sprite dimensions dw GravelerPicFront dw GravelerPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/grimer.asm b/data/baseStats/grimer.asm index 5b840261a0..52bb943bea 100755 --- a/data/baseStats/grimer.asm +++ b/data/baseStats/grimer.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 190 ; catch rate db 90 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/grimer.pic",0,1 ; 55, sprite dimensions dw GrimerPicFront dw GrimerPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/growlithe.asm b/data/baseStats/growlithe.asm index dd62fe77b1..c8ee93e05d 100755 --- a/data/baseStats/growlithe.asm +++ b/data/baseStats/growlithe.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 190 ; catch rate db 91 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/growlithe.pic",0,1 ; 55, sprite dimensions dw GrowlithePicFront dw GrowlithePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/gyarados.asm b/data/baseStats/gyarados.asm index 1c02ce9ad6..098878b9a6 100755 --- a/data/baseStats/gyarados.asm +++ b/data/baseStats/gyarados.asm @@ -9,21 +9,20 @@ db WATER ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 214 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/gyarados.pic",0,1 ; 77, sprite dimensions dw GyaradosPicFront dw GyaradosPicBack ; attacks known at lvl 0 -IF !_YELLOW -db BITE -db DRAGON_RAGE -db LEER -db HYDRO_PUMP -ENDC -IF _YELLOW +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 diff --git a/data/baseStats/haunter.asm b/data/baseStats/haunter.asm index 40f368cb5e..aeccdd0402 100755 --- a/data/baseStats/haunter.asm +++ b/data/baseStats/haunter.asm @@ -9,7 +9,7 @@ db GHOST ; species type 1 db POISON ; species type 2 db 90 ; catch rate db 126 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/haunter.pic",0,1 ; 66, sprite dimensions dw HaunterPicFront dw HaunterPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/hitmonchan.asm b/data/baseStats/hitmonchan.asm index aa9f97424a..fe13b0811e 100755 --- a/data/baseStats/hitmonchan.asm +++ b/data/baseStats/hitmonchan.asm @@ -9,7 +9,7 @@ db FIGHTING ; species type 1 db FIGHTING ; species type 2 db 45 ; catch rate db 140 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/hitmonchan.pic",0,1 ; 66, sprite dimensions dw HitmonchanPicFront dw HitmonchanPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/hitmonlee.asm b/data/baseStats/hitmonlee.asm index 8d7ee79ce1..8632d47f03 100755 --- a/data/baseStats/hitmonlee.asm +++ b/data/baseStats/hitmonlee.asm @@ -9,7 +9,7 @@ db FIGHTING ; species type 1 db FIGHTING ; species type 2 db 45 ; catch rate db 139 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/hitmonlee.pic",0,1 ; 77, sprite dimensions dw HitmonleePicFront dw HitmonleePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/horsea.asm b/data/baseStats/horsea.asm index 35699939ae..bfe541996f 100755 --- a/data/baseStats/horsea.asm +++ b/data/baseStats/horsea.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 225 ; catch rate db 83 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/horsea.pic",0,1 ; 55, sprite dimensions dw HorseaPicFront dw HorseaPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/hypno.asm b/data/baseStats/hypno.asm index 141373f1ec..7bfc92b7f8 100755 --- a/data/baseStats/hypno.asm +++ b/data/baseStats/hypno.asm @@ -9,7 +9,7 @@ db PSYCHIC ; species type 1 db PSYCHIC ; species type 2 db 75 ; catch rate db 165 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/hypno.pic",0,1 ; 77, sprite dimensions dw HypnoPicFront dw HypnoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/ivysaur.asm b/data/baseStats/ivysaur.asm index 150e83f537..b03d71a105 100755 --- a/data/baseStats/ivysaur.asm +++ b/data/baseStats/ivysaur.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 45 ; catch rate db 141 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/ivysaur.pic",0,1 ; 66, sprite dimensions dw IvysaurPicFront dw IvysaurPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/jigglypuff.asm b/data/baseStats/jigglypuff.asm index 973eb7f2d2..52b07eef6d 100755 --- a/data/baseStats/jigglypuff.asm +++ b/data/baseStats/jigglypuff.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FAIRY ; species type 2 db 170 ; catch rate db 76 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/jigglypuff.pic",0,1 ; 55, sprite dimensions dw JigglypuffPicFront dw JigglypuffPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/jolteon.asm b/data/baseStats/jolteon.asm index b519d02404..dd2fe09387 100755 --- a/data/baseStats/jolteon.asm +++ b/data/baseStats/jolteon.asm @@ -9,16 +9,15 @@ db ELECTRIC ; species type 1 db ELECTRIC ; species type 2 db 45 ; catch rate db 197 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/jolteon.pic",0,1 ; 66, sprite dimensions dw JolteonPicFront dw JolteonPicBack ; attacks known at lvl 0 db TACKLE -IF !_YELLOW - db SAND_ATTACK -ENDC -IF _YELLOW +IF DEF(_YELLOW) db TAIL_WHIP +ELSE + db SAND_ATTACK ENDC db QUICK_ATTACK db THUNDERSHOCK diff --git a/data/baseStats/jynx.asm b/data/baseStats/jynx.asm index 23b1a4ce19..dd9d76cc9b 100755 --- a/data/baseStats/jynx.asm +++ b/data/baseStats/jynx.asm @@ -9,7 +9,7 @@ db ICE ; species type 1 db PSYCHIC ; species type 2 db 45 ; catch rate db 137 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/jynx.pic",0,1 ; 66, sprite dimensions dw JynxPicFront dw JynxPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/kabuto.asm b/data/baseStats/kabuto.asm index 9193ba3491..32eb63a111 100755 --- a/data/baseStats/kabuto.asm +++ b/data/baseStats/kabuto.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 119 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/kabuto.pic",0,1 ; 55, sprite dimensions dw KabutoPicFront dw KabutoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/kabutops.asm b/data/baseStats/kabutops.asm index ff97d2a73c..5ef987ec7a 100755 --- a/data/baseStats/kabutops.asm +++ b/data/baseStats/kabutops.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 201 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/kabutops.pic",0,1 ; 66, sprite dimensions dw KabutopsPicFront dw KabutopsPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/kadabra.asm b/data/baseStats/kadabra.asm index 6372e61161..0792e39898 100755 --- a/data/baseStats/kadabra.asm +++ b/data/baseStats/kadabra.asm @@ -9,18 +9,17 @@ db PSYCHIC ; species type 1 db PSYCHIC ; species type 2 db 100 ; catch rate db 145 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/kadabra.pic",0,1 ; 66, sprite dimensions dw KadabraPicFront dw KadabraPicBack ; attacks known at lvl 0 db TELEPORT -IF !_YELLOW - db CONFUSION - db DISABLE -ENDC -IF _YELLOW +IF DEF(_YELLOW) DB KINESIS db 0 +ELSE + db CONFUSION + db DISABLE ENDC db 0 db 3 ; growth rate diff --git a/data/baseStats/kakuna.asm b/data/baseStats/kakuna.asm index 90ad586d10..55030b1cd3 100755 --- a/data/baseStats/kakuna.asm +++ b/data/baseStats/kakuna.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db POISON ; species type 2 db 120 ; catch rate db 71 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/kakuna.pic",0,1 ; 55, sprite dimensions dw KakunaPicFront dw KakunaPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/kangaskhan.asm b/data/baseStats/kangaskhan.asm index 3b8c098337..60eedaa783 100755 --- a/data/baseStats/kangaskhan.asm +++ b/data/baseStats/kangaskhan.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 45 ; catch rate db 175 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/kangaskhan.pic",0,1 ; 77, sprite dimensions dw KangaskhanPicFront dw KangaskhanPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/kingler.asm b/data/baseStats/kingler.asm index f423615750..d8fe3038cd 100755 --- a/data/baseStats/kingler.asm +++ b/data/baseStats/kingler.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 60 ; catch rate db 206 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/kingler.pic",0,1 ; 77, sprite dimensions dw KinglerPicFront dw KinglerPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/koffing.asm b/data/baseStats/koffing.asm index 8008e6ab43..4ea9da1b7f 100755 --- a/data/baseStats/koffing.asm +++ b/data/baseStats/koffing.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 190 ; catch rate db 114 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/koffing.pic",0,1 ; 66, sprite dimensions dw KoffingPicFront dw KoffingPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/krabby.asm b/data/baseStats/krabby.asm index 0d787630ec..39ff5d31f2 100755 --- a/data/baseStats/krabby.asm +++ b/data/baseStats/krabby.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 225 ; catch rate db 115 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/krabby.pic",0,1 ; 55, sprite dimensions dw KrabbyPicFront dw KrabbyPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/lapras.asm b/data/baseStats/lapras.asm index a92acdef0c..a362229bf4 100755 --- a/data/baseStats/lapras.asm +++ b/data/baseStats/lapras.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db ICE ; species type 2 db 45 ; catch rate db 219 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/lapras.pic",0,1 ; 77, sprite dimensions dw LaprasPicFront dw LaprasPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/lickitung.asm b/data/baseStats/lickitung.asm index c669147f09..04ffba1efb 100755 --- a/data/baseStats/lickitung.asm +++ b/data/baseStats/lickitung.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 45 ; catch rate db 127 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/lickitung.pic",0,1 ; 77, sprite dimensions dw LickitungPicFront dw LickitungPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/machamp.asm b/data/baseStats/machamp.asm index a6235ecb72..28d377cb69 100755 --- a/data/baseStats/machamp.asm +++ b/data/baseStats/machamp.asm @@ -9,7 +9,7 @@ db FIGHTING ; species type 1 db FIGHTING ; species type 2 db 45 ; catch rate db 193 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/machamp.pic",0,1 ; 77, sprite dimensions dw MachampPicFront dw MachampPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/machoke.asm b/data/baseStats/machoke.asm index d6bed27319..2873e9dcd2 100755 --- a/data/baseStats/machoke.asm +++ b/data/baseStats/machoke.asm @@ -9,7 +9,7 @@ db FIGHTING ; species type 1 db FIGHTING ; species type 2 db 90 ; catch rate db 146 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/machoke.pic",0,1 ; 77, sprite dimensions dw MachokePicFront dw MachokePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/machop.asm b/data/baseStats/machop.asm index 8b5777d71d..851689cb84 100755 --- a/data/baseStats/machop.asm +++ b/data/baseStats/machop.asm @@ -9,7 +9,7 @@ db FIGHTING ; species type 1 db FIGHTING ; species type 2 db 180 ; catch rate db 88 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/machop.pic",0,1 ; 55, sprite dimensions dw MachopPicFront dw MachopPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/magikarp.asm b/data/baseStats/magikarp.asm index 4186b34afd..a6ac444680 100755 --- a/data/baseStats/magikarp.asm +++ b/data/baseStats/magikarp.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 255 ; catch rate db 20 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/magikarp.pic",0,1 ; 66, sprite dimensions dw MagikarpPicFront dw MagikarpPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/magmar.asm b/data/baseStats/magmar.asm index 952d239847..4bf917db9d 100755 --- a/data/baseStats/magmar.asm +++ b/data/baseStats/magmar.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 45 ; catch rate db 167 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/magmar.pic",0,1 ; 66, sprite dimensions dw MagmarPicFront dw MagmarPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/magnemite.asm b/data/baseStats/magnemite.asm index 1b988187d1..413235af63 100755 --- a/data/baseStats/magnemite.asm +++ b/data/baseStats/magnemite.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db STEEL ; species type 2 db 190 ; catch rate db 89 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/magnemite.pic",0,1 ; 55, sprite dimensions dw MagnemitePicFront dw MagnemitePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/magneton.asm b/data/baseStats/magneton.asm index 048da044c1..b119441cae 100755 --- a/data/baseStats/magneton.asm +++ b/data/baseStats/magneton.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db STEEL ; species type 2 db 60 ; catch rate db 161 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/magneton.pic",0,1 ; 66, sprite dimensions dw MagnetonPicFront dw MagnetonPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/mankey.asm b/data/baseStats/mankey.asm index ef8b5c2b06..4c9f7dddbf 100755 --- a/data/baseStats/mankey.asm +++ b/data/baseStats/mankey.asm @@ -9,7 +9,7 @@ db FIGHTING ; species type 1 db FIGHTING ; species type 2 db 190 ; catch rate db 74 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/mankey.pic",0,1 ; 55, sprite dimensions dw MankeyPicFront dw MankeyPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/marowak.asm b/data/baseStats/marowak.asm index 7ad7754285..2c0e9271c2 100755 --- a/data/baseStats/marowak.asm +++ b/data/baseStats/marowak.asm @@ -9,20 +9,19 @@ db GROUND ; species type 1 db GROUND ; species type 2 db 75 ; catch rate db 124 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/marowak.pic",0,1 ; 66, sprite dimensions dw MarowakPicFront dw MarowakPicBack ; attacks known at lvl 0 db BONE_CLUB -IF !_YELLOW - db GROWL - db LEER - db FOCUS_ENERGY -ENDC -IF _YELLOW +IF DEF(_YELLOW) db TAIL_WHIP db 0 db 0 +ELSE + db GROWL + db LEER + db FOCUS_ENERGY ENDC db 0 ; growth rate ; learnset diff --git a/data/baseStats/meowth.asm b/data/baseStats/meowth.asm index 2574d79402..fbd4e0c23c 100755 --- a/data/baseStats/meowth.asm +++ b/data/baseStats/meowth.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 255 ; catch rate db 69 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/meowth.pic",0,1 ; 55, sprite dimensions dw MeowthPicFront dw MeowthPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/metapod.asm b/data/baseStats/metapod.asm index c20476cd1b..8de9badb25 100755 --- a/data/baseStats/metapod.asm +++ b/data/baseStats/metapod.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db BUG ; species type 2 db 120 ; catch rate db 72 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/metapod.pic",0,1 ; 55, sprite dimensions dw MetapodPicFront dw MetapodPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/mew.asm b/data/baseStats/mew.asm index 391b524290..a3cbd16fbe 100755 --- a/data/baseStats/mew.asm +++ b/data/baseStats/mew.asm @@ -9,7 +9,7 @@ db PSYCHIC ; species type 1 db PSYCHIC ; species type 2 db 45 ; catch rate db 64 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/mew.pic",0,1 ; 55, sprite dimensions dw MewPicFront dw MewPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/mewtwo.asm b/data/baseStats/mewtwo.asm index 3e4dbcc02d..608e87b832 100755 --- a/data/baseStats/mewtwo.asm +++ b/data/baseStats/mewtwo.asm @@ -9,7 +9,7 @@ db PSYCHIC ; species type 1 db PSYCHIC ; species type 2 db 3 ; catch rate db 220 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/mewtwo.pic",0,1 ; 77, sprite dimensions dw MewtwoPicFront dw MewtwoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/moltres.asm b/data/baseStats/moltres.asm index d33aa9b03b..04f99dd002 100755 --- a/data/baseStats/moltres.asm +++ b/data/baseStats/moltres.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FLYING ; species type 2 db 3 ; catch rate db 217 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/moltres.pic",0,1 ; 77, sprite dimensions dw MoltresPicFront dw MoltresPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/mrmime.asm b/data/baseStats/mrmime.asm index 0bda5464bb..fdb0651c3e 100755 --- a/data/baseStats/mrmime.asm +++ b/data/baseStats/mrmime.asm @@ -9,7 +9,7 @@ db PSYCHIC ; species type 1 db FAIRY ; species type 2 db 45 ; catch rate db 136 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/mr.mime.pic",0,1 ; 66, sprite dimensions dw MrMimePicFront dw MrMimePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/muk.asm b/data/baseStats/muk.asm index 00207d043d..18860608b3 100755 --- a/data/baseStats/muk.asm +++ b/data/baseStats/muk.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 75 ; catch rate db 157 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/muk.pic",0,1 ; 77, sprite dimensions dw MukPicFront dw MukPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/nidoking.asm b/data/baseStats/nidoking.asm index 2f4d972f71..e50512a488 100755 --- a/data/baseStats/nidoking.asm +++ b/data/baseStats/nidoking.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db GROUND ; species type 2 db 45 ; catch rate db 195 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/nidoking.pic",0,1 ; 77, sprite dimensions dw NidokingPicFront dw NidokingPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/nidoqueen.asm b/data/baseStats/nidoqueen.asm index 9705b348d5..1617cbae15 100755 --- a/data/baseStats/nidoqueen.asm +++ b/data/baseStats/nidoqueen.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db GROUND ; species type 2 db 45 ; catch rate db 194 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/nidoqueen.pic",0,1 ; 77, sprite dimensions dw NidoqueenPicFront dw NidoqueenPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/nidoranf.asm b/data/baseStats/nidoranf.asm index e2e85323c7..e003b6e62d 100755 --- a/data/baseStats/nidoranf.asm +++ b/data/baseStats/nidoranf.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 235 ; catch rate db 59 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/nidoranf.pic",0,1 ; 55, sprite dimensions dw NidoranFPicFront dw NidoranFPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/nidoranm.asm b/data/baseStats/nidoranm.asm index 7d19fcc27c..427285fe2a 100755 --- a/data/baseStats/nidoranm.asm +++ b/data/baseStats/nidoranm.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 235 ; catch rate db 60 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/nidoranm.pic",0,1 ; 55, sprite dimensions dw NidoranMPicFront dw NidoranMPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/nidorina.asm b/data/baseStats/nidorina.asm index 33b1282932..2f47d38046 100755 --- a/data/baseStats/nidorina.asm +++ b/data/baseStats/nidorina.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 120 ; catch rate db 117 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/nidorina.pic",0,1 ; 66, sprite dimensions dw NidorinaPicFront dw NidorinaPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/nidorino.asm b/data/baseStats/nidorino.asm index f5a6d0f8a6..0e90f2e7cb 100755 --- a/data/baseStats/nidorino.asm +++ b/data/baseStats/nidorino.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 120 ; catch rate db 118 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/nidorino.pic",0,1 ; 66, sprite dimensions dw NidorinoPicFront dw NidorinoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/ninetails.asm b/data/baseStats/ninetails.asm index fe089269c4..719a66c2c8 100755 --- a/data/baseStats/ninetails.asm +++ b/data/baseStats/ninetails.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 75 ; catch rate db 178 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/ninetales.pic",0,1 ; 77, sprite dimensions dw NinetalesPicFront dw NinetalesPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/oddish.asm b/data/baseStats/oddish.asm index 3f46f72690..b6ed1d45c8 100755 --- a/data/baseStats/oddish.asm +++ b/data/baseStats/oddish.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 255 ; catch rate db 78 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/oddish.pic",0,1 ; 55, sprite dimensions dw OddishPicFront dw OddishPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/omanyte.asm b/data/baseStats/omanyte.asm index 401cf820a6..a5f8400dc0 100755 --- a/data/baseStats/omanyte.asm +++ b/data/baseStats/omanyte.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 120 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/omanyte.pic",0,1 ; 55, sprite dimensions dw OmanytePicFront dw OmanytePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/omastar.asm b/data/baseStats/omastar.asm index c83291b967..176dfdacd5 100755 --- a/data/baseStats/omastar.asm +++ b/data/baseStats/omastar.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 199 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/omastar.pic",0,1 ; 66, sprite dimensions dw OmastarPicFront dw OmastarPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/onix.asm b/data/baseStats/onix.asm index a3ff55362a..d07f4e2881 100755 --- a/data/baseStats/onix.asm +++ b/data/baseStats/onix.asm @@ -9,7 +9,7 @@ db ROCK ; species type 1 db GROUND ; species type 2 db 45 ; catch rate db 108 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/onix.pic",0,1 ; 77, sprite dimensions dw OnixPicFront dw OnixPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/paras.asm b/data/baseStats/paras.asm index 5d51411b51..5a5b471e5b 100755 --- a/data/baseStats/paras.asm +++ b/data/baseStats/paras.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db GRASS ; species type 2 db 190 ; catch rate db 70 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/paras.pic",0,1 ; 55, sprite dimensions dw ParasPicFront dw ParasPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/parasect.asm b/data/baseStats/parasect.asm index 91545868e5..2c02d4ccbb 100755 --- a/data/baseStats/parasect.asm +++ b/data/baseStats/parasect.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db GRASS ; species type 2 db 75 ; catch rate db 128 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/parasect.pic",0,1 ; 77, sprite dimensions dw ParasectPicFront dw ParasectPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/persian.asm b/data/baseStats/persian.asm index 66e53424d7..c8004fa967 100755 --- a/data/baseStats/persian.asm +++ b/data/baseStats/persian.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 90 ; catch rate db 148 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/persian.pic",0,1 ; 77, sprite dimensions dw PersianPicFront dw PersianPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/pidgeot.asm b/data/baseStats/pidgeot.asm index b4207549e0..aa5635d524 100755 --- a/data/baseStats/pidgeot.asm +++ b/data/baseStats/pidgeot.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 172 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/pidgeot.pic",0,1 ; 77, sprite dimensions dw PidgeotPicFront dw PidgeotPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/pidgeotto.asm b/data/baseStats/pidgeotto.asm index 3110f70fd5..9247d2cb25 100755 --- a/data/baseStats/pidgeotto.asm +++ b/data/baseStats/pidgeotto.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 120 ; catch rate db 113 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/pidgeotto.pic",0,1 ; 66, sprite dimensions dw PidgeottoPicFront dw PidgeottoPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/pidgey.asm b/data/baseStats/pidgey.asm index 83d5d16ae3..bbb3b81ab9 100755 --- a/data/baseStats/pidgey.asm +++ b/data/baseStats/pidgey.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 255 ; catch rate db 55 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/pidgey.pic",0,1 ; 55, sprite dimensions dw PidgeyPicFront dw PidgeyPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/pikachu.asm b/data/baseStats/pikachu.asm index 185f18e4b5..9002ab8d04 100755 --- a/data/baseStats/pikachu.asm +++ b/data/baseStats/pikachu.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db ELECTRIC ; species type 2 db 190 ; catch rate db 82 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/pikachu.pic",0,1 ; 55, sprite dimensions dw PikachuPicFront dw PikachuPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/pinsir.asm b/data/baseStats/pinsir.asm index c828e50be6..398fbc8a77 100755 --- a/data/baseStats/pinsir.asm +++ b/data/baseStats/pinsir.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db BUG ; species type 2 db 45 ; catch rate db 200 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/pinsir.pic",0,1 ; 77, sprite dimensions dw PinsirPicFront dw PinsirPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/poliwag.asm b/data/baseStats/poliwag.asm index 16a7c62d2c..197ac664d8 100755 --- a/data/baseStats/poliwag.asm +++ b/data/baseStats/poliwag.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 255 ; catch rate db 77 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/poliwag.pic",0,1 ; 55, sprite dimensions dw PoliwagPicFront dw PoliwagPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/poliwhirl.asm b/data/baseStats/poliwhirl.asm index c2b7179992..7f5f94d33e 100755 --- a/data/baseStats/poliwhirl.asm +++ b/data/baseStats/poliwhirl.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 120 ; catch rate db 131 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/poliwhirl.pic",0,1 ; 66, sprite dimensions dw PoliwhirlPicFront dw PoliwhirlPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/poliwrath.asm b/data/baseStats/poliwrath.asm index b9023790d8..6db4efda0a 100755 --- a/data/baseStats/poliwrath.asm +++ b/data/baseStats/poliwrath.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db FIGHTING ; species type 2 db 45 ; catch rate db 185 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/poliwrath.pic",0,1 ; 77, sprite dimensions dw PoliwrathPicFront dw PoliwrathPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/ponyta.asm b/data/baseStats/ponyta.asm index 82778924f4..ff58c46957 100755 --- a/data/baseStats/ponyta.asm +++ b/data/baseStats/ponyta.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 190 ; catch rate db 152 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/ponyta.pic",0,1 ; 66, sprite dimensions dw PonytaPicFront dw PonytaPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/porygon.asm b/data/baseStats/porygon.asm index 800d77a9c8..b2ab0f8d33 100755 --- a/data/baseStats/porygon.asm +++ b/data/baseStats/porygon.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 45 ; catch rate db 130 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/porygon.pic",0,1 ; 66, sprite dimensions dw PorygonPicFront dw PorygonPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/primeape.asm b/data/baseStats/primeape.asm index 311187cb1e..9c97562635 100755 --- a/data/baseStats/primeape.asm +++ b/data/baseStats/primeape.asm @@ -9,17 +9,17 @@ db FIGHTING ; species type 1 db FIGHTING ; species type 2 db 75 ; catch rate db 149 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/primeape.pic",0,1 ; 77, sprite dimensions dw PrimeapePicFront dw PrimeapePicBack ; attacks known at lvl 0 db SCRATCH -IF !_YELLOW +IF !DEF(_YELLOW) db LEER ENDC db KARATE_CHOP db FURY_SWIPES -IF _YELLOW +IF DEF(_YELLOW) db LOW_KICK ENDC db 0 ; growth rate diff --git a/data/baseStats/psyduck.asm b/data/baseStats/psyduck.asm index 4eb879bb7d..f2ef4b947d 100755 --- a/data/baseStats/psyduck.asm +++ b/data/baseStats/psyduck.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 190 ; catch rate db 80 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/psyduck.pic",0,1 ; 55, sprite dimensions dw PsyduckPicFront dw PsyduckPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/raichu.asm b/data/baseStats/raichu.asm index 8974be2ea9..d5e02f3379 100755 --- a/data/baseStats/raichu.asm +++ b/data/baseStats/raichu.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db ELECTRIC ; species type 2 db 75 ; catch rate db 122 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/raichu.pic",0,1 ; 77, sprite dimensions dw RaichuPicFront dw RaichuPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/rapidash.asm b/data/baseStats/rapidash.asm index 818a33c1a4..0533562fe4 100755 --- a/data/baseStats/rapidash.asm +++ b/data/baseStats/rapidash.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 60 ; catch rate db 192 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/rapidash.pic",0,1 ; 77, sprite dimensions dw RapidashPicFront dw RapidashPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/raticate.asm b/data/baseStats/raticate.asm index 1704c25fb4..c919b6d07f 100755 --- a/data/baseStats/raticate.asm +++ b/data/baseStats/raticate.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 90 ; catch rate db 116 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/raticate.pic",0,1 ; 66, sprite dimensions dw RaticatePicFront dw RaticatePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/rattata.asm b/data/baseStats/rattata.asm index b661395434..0eceb27fd0 100755 --- a/data/baseStats/rattata.asm +++ b/data/baseStats/rattata.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 255 ; catch rate db 57 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/rattata.pic",0,1 ; 55, sprite dimensions dw RattataPicFront dw RattataPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/rhydon.asm b/data/baseStats/rhydon.asm index c92d94dcfa..a6dba6a198 100755 --- a/data/baseStats/rhydon.asm +++ b/data/baseStats/rhydon.asm @@ -9,7 +9,7 @@ db GROUND ; species type 1 db ROCK ; species type 2 db 60 ; catch rate db 204 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/rhydon.pic",0,1 ; 77, sprite dimensions dw RhydonPicFront dw RhydonPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/rhyhorn.asm b/data/baseStats/rhyhorn.asm index 07d4cedb09..fa2014224a 100755 --- a/data/baseStats/rhyhorn.asm +++ b/data/baseStats/rhyhorn.asm @@ -9,7 +9,7 @@ db GROUND ; species type 1 db ROCK ; species type 2 db 120 ; catch rate db 135 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/rhyhorn.pic",0,1 ; 77, sprite dimensions dw RhyhornPicFront dw RhyhornPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/sandshrew.asm b/data/baseStats/sandshrew.asm index 6ed325edb0..cb10899b59 100755 --- a/data/baseStats/sandshrew.asm +++ b/data/baseStats/sandshrew.asm @@ -9,7 +9,7 @@ db GROUND ; species type 1 db GROUND ; species type 2 db 255 ; catch rate db 93 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/sandshrew.pic",0,1 ; 55, sprite dimensions dw SandshrewPicFront dw SandshrewPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/sandslash.asm b/data/baseStats/sandslash.asm index 05dbf7a4e4..2c6e7257b8 100755 --- a/data/baseStats/sandslash.asm +++ b/data/baseStats/sandslash.asm @@ -9,7 +9,7 @@ db GROUND ; species type 1 db GROUND ; species type 2 db 90 ; catch rate db 163 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/sandslash.pic",0,1 ; 66, sprite dimensions dw SandslashPicFront dw SandslashPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/scyther.asm b/data/baseStats/scyther.asm index dc0b9388b2..de6c148ed0 100755 --- a/data/baseStats/scyther.asm +++ b/data/baseStats/scyther.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db FLYING ; species type 2 db 45 ; catch rate db 187 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/scyther.pic",0,1 ; 77, sprite dimensions dw ScytherPicFront dw ScytherPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/seadra.asm b/data/baseStats/seadra.asm index 77eed58225..f37b690d8d 100755 --- a/data/baseStats/seadra.asm +++ b/data/baseStats/seadra.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 75 ; catch rate db 155 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/seadra.pic",0,1 ; 66, sprite dimensions dw SeadraPicFront dw SeadraPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/seaking.asm b/data/baseStats/seaking.asm index 96fc23b82c..48bb638704 100755 --- a/data/baseStats/seaking.asm +++ b/data/baseStats/seaking.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 60 ; catch rate db 170 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/seaking.pic",0,1 ; 77, sprite dimensions dw SeakingPicFront dw SeakingPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/seel.asm b/data/baseStats/seel.asm index fae24a35dc..c3c93ddd3b 100755 --- a/data/baseStats/seel.asm +++ b/data/baseStats/seel.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 190 ; catch rate db 100 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/seel.pic",0,1 ; 66, sprite dimensions dw SeelPicFront dw SeelPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/shellder.asm b/data/baseStats/shellder.asm index a37294976e..bc307920ee 100755 --- a/data/baseStats/shellder.asm +++ b/data/baseStats/shellder.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 190 ; catch rate db 97 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/shellder.pic",0,1 ; 55, sprite dimensions dw ShellderPicFront dw ShellderPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/slowbro.asm b/data/baseStats/slowbro.asm index 85f2057217..3ae38bc285 100755 --- a/data/baseStats/slowbro.asm +++ b/data/baseStats/slowbro.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db PSYCHIC ; species type 2 db 75 ; catch rate db 164 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/slowbro.pic",0,1 ; 77, sprite dimensions dw SlowbroPicFront dw SlowbroPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/slowpoke.asm b/data/baseStats/slowpoke.asm index 7c7d90ee05..10dba78647 100755 --- a/data/baseStats/slowpoke.asm +++ b/data/baseStats/slowpoke.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db PSYCHIC ; species type 2 db 190 ; catch rate db 99 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/slowpoke.pic",0,1 ; 55, sprite dimensions dw SlowpokePicFront dw SlowpokePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/snorlax.asm b/data/baseStats/snorlax.asm index 2aa508b0a9..b7d78b9cae 100755 --- a/data/baseStats/snorlax.asm +++ b/data/baseStats/snorlax.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 25 ; catch rate db 154 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/snorlax.pic",0,1 ; 77, sprite dimensions dw SnorlaxPicFront dw SnorlaxPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/spearow.asm b/data/baseStats/spearow.asm index 63953b8fb7..f51e68ea45 100755 --- a/data/baseStats/spearow.asm +++ b/data/baseStats/spearow.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FLYING ; species type 2 db 255 ; catch rate db 58 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/spearow.pic",0,1 ; 55, sprite dimensions dw SpearowPicFront dw SpearowPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/squirtle.asm b/data/baseStats/squirtle.asm index c0aaae7623..af4a940bc9 100755 --- a/data/baseStats/squirtle.asm +++ b/data/baseStats/squirtle.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 66 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/squirtle.pic",0,1 ; 55, sprite dimensions dw SquirtlePicFront dw SquirtlePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/starmie.asm b/data/baseStats/starmie.asm index 030bfc0205..c7ca0ea47a 100755 --- a/data/baseStats/starmie.asm +++ b/data/baseStats/starmie.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db PSYCHIC ; species type 2 db 60 ; catch rate db 207 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/starmie.pic",0,1 ; 66, sprite dimensions dw StarmiePicFront dw StarmiePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/staryu.asm b/data/baseStats/staryu.asm index 8932afd08c..a6af9100af 100755 --- a/data/baseStats/staryu.asm +++ b/data/baseStats/staryu.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 225 ; catch rate db 106 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/staryu.pic",0,1 ; 66, sprite dimensions dw StaryuPicFront dw StaryuPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/tangela.asm b/data/baseStats/tangela.asm index ce047db089..19970e6147 100755 --- a/data/baseStats/tangela.asm +++ b/data/baseStats/tangela.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db GRASS ; species type 2 db 45 ; catch rate db 166 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/tangela.pic",0,1 ; 66, sprite dimensions dw TangelaPicFront dw TangelaPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/tauros.asm b/data/baseStats/tauros.asm index 1683536bc0..69c83d786b 100755 --- a/data/baseStats/tauros.asm +++ b/data/baseStats/tauros.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db NORMAL ; species type 2 db 45 ; catch rate db 211 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/tauros.pic",0,1 ; 77, sprite dimensions dw TaurosPicFront dw TaurosPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/tentacool.asm b/data/baseStats/tentacool.asm index 18be5dd7a8..8996627c6f 100755 --- a/data/baseStats/tentacool.asm +++ b/data/baseStats/tentacool.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db POISON ; species type 2 db 190 ; catch rate db 105 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/tentacool.pic",0,1 ; 55, sprite dimensions dw TentacoolPicFront dw TentacoolPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/tentacruel.asm b/data/baseStats/tentacruel.asm index 3d043f4000..8ab272ea19 100755 --- a/data/baseStats/tentacruel.asm +++ b/data/baseStats/tentacruel.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db POISON ; species type 2 db 60 ; catch rate db 205 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/tentacruel.pic",0,1 ; 66, sprite dimensions dw TentacruelPicFront dw TentacruelPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/vaporeon.asm b/data/baseStats/vaporeon.asm index 985bce06ac..0003c81b55 100755 --- a/data/baseStats/vaporeon.asm +++ b/data/baseStats/vaporeon.asm @@ -9,16 +9,15 @@ db WATER ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 196 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/vaporeon.pic",0,1 ; 66, sprite dimensions dw VaporeonPicFront dw VaporeonPicBack ; attacks known at lvl 0 db TACKLE -IF !_YELLOW - db SAND_ATTACK -ENDC -IF _YELLOW +IF DEF(_YELLOW) db TAIL_WHIP +ELSE + db SAND_ATTACK ENDC db QUICK_ATTACK db WATER_GUN diff --git a/data/baseStats/venomoth.asm b/data/baseStats/venomoth.asm index 0b4c61fffb..8ecff52b19 100755 --- a/data/baseStats/venomoth.asm +++ b/data/baseStats/venomoth.asm @@ -9,19 +9,18 @@ db BUG ; species type 1 db POISON ; species type 2 db 75 ; catch rate db 138 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/venomoth.pic",0,1 ; 77, sprite dimensions dw VenomothPicFront dw VenomothPicBack ; attacks known at lvl 0 db TACKLE db DISABLE -IF !_YELLOW - db POISONPOWDER - db LEECH_LIFE -ENDC -IF _YELLOW +IF DEF(_YELLOW) db SUPERSONIC db CONFUSION +ELSE + db POISONPOWDER + db LEECH_LIFE ENDC db 0 ; growth rate ; learnset diff --git a/data/baseStats/venonat.asm b/data/baseStats/venonat.asm index 7182c3ab7d..9bf97a7a3b 100755 --- a/data/baseStats/venonat.asm +++ b/data/baseStats/venonat.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db POISON ; species type 2 db 190 ; catch rate db 75 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/venonat.pic",0,1 ; 55, sprite dimensions dw VenonatPicFront dw VenonatPicBack ; attacks known at lvl 0 @@ -22,17 +22,16 @@ db 0 ; growth rate db %00100000 db %00000011 db %00111000 -IF !_YELLOW - db %11010000 - db %00000011 - db %00101000 - db %00000010 -ENDC -IF _YELLOW +IF DEF(_YELLOW) db %11110000 db %01000011 db %00101000 db %00100010 +ELSE + db %11010000 + db %00000011 + db %00101000 + db %00000010 ENDC db BANK(VenonatPicFront) diff --git a/data/baseStats/venusaur.asm b/data/baseStats/venusaur.asm index e73e5d88a9..ecb448ce52 100755 --- a/data/baseStats/venusaur.asm +++ b/data/baseStats/venusaur.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 45 ; catch rate db 208 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/venusaur.pic",0,1 ; 77, sprite dimensions dw VenusaurPicFront dw VenusaurPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/victreebel.asm b/data/baseStats/victreebel.asm index 09818afb69..4664a2816c 100755 --- a/data/baseStats/victreebel.asm +++ b/data/baseStats/victreebel.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 45 ; catch rate db 191 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/victreebel.pic",0,1 ; 77, sprite dimensions dw VictreebelPicFront dw VictreebelPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/vileplume.asm b/data/baseStats/vileplume.asm index 00aac5d4e7..4bbe0de0e5 100755 --- a/data/baseStats/vileplume.asm +++ b/data/baseStats/vileplume.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 45 ; catch rate db 184 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/vileplume.pic",0,1 ; 77, sprite dimensions dw VileplumePicFront dw VileplumePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/voltorb.asm b/data/baseStats/voltorb.asm index 343f2e0d2d..48c9178c90 100755 --- a/data/baseStats/voltorb.asm +++ b/data/baseStats/voltorb.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db ELECTRIC ; species type 2 db 190 ; catch rate db 103 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/voltorb.pic",0,1 ; 55, sprite dimensions dw VoltorbPicFront dw VoltorbPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/vulpix.asm b/data/baseStats/vulpix.asm index f31f7005e2..1a9f768d3a 100755 --- a/data/baseStats/vulpix.asm +++ b/data/baseStats/vulpix.asm @@ -9,7 +9,7 @@ db FIRE ; species type 1 db FIRE ; species type 2 db 190 ; catch rate db 63 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/vulpix.pic",0,1 ; 66, sprite dimensions dw VulpixPicFront dw VulpixPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/wartortle.asm b/data/baseStats/wartortle.asm index 642df53003..6619a07fc7 100755 --- a/data/baseStats/wartortle.asm +++ b/data/baseStats/wartortle.asm @@ -9,7 +9,7 @@ db WATER ; species type 1 db WATER ; species type 2 db 45 ; catch rate db 143 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/wartortle.pic",0,1 ; 66, sprite dimensions dw WartortlePicFront dw WartortlePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/weedle.asm b/data/baseStats/weedle.asm index 3a66660625..ff231b1e39 100755 --- a/data/baseStats/weedle.asm +++ b/data/baseStats/weedle.asm @@ -9,7 +9,7 @@ db BUG ; species type 1 db POISON ; species type 2 db 255 ; catch rate db 52 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/weedle.pic",0,1 ; 55, sprite dimensions dw WeedlePicFront dw WeedlePicBack ; attacks known at lvl 0 diff --git a/data/baseStats/weepinbell.asm b/data/baseStats/weepinbell.asm index 54fd10da84..1c3fd05232 100755 --- a/data/baseStats/weepinbell.asm +++ b/data/baseStats/weepinbell.asm @@ -9,7 +9,7 @@ db GRASS ; species type 1 db POISON ; species type 2 db 120 ; catch rate db 151 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/weepinbell.pic",0,1 ; 66, sprite dimensions dw WeepinbellPicFront dw WeepinbellPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/weezing.asm b/data/baseStats/weezing.asm index fa014ad9bd..a119f89953 100755 --- a/data/baseStats/weezing.asm +++ b/data/baseStats/weezing.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db POISON ; species type 2 db 60 ; catch rate db 173 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/weezing.pic",0,1 ; 77, sprite dimensions dw WeezingPicFront dw WeezingPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/wigglytuff.asm b/data/baseStats/wigglytuff.asm index 6c6aa873bc..848b2aac23 100755 --- a/data/baseStats/wigglytuff.asm +++ b/data/baseStats/wigglytuff.asm @@ -9,7 +9,7 @@ db NORMAL ; species type 1 db FAIRY ; species type 2 db 50 ; catch rate db 109 ; base exp yield -db $66 ; sprite dimensions +INCBIN "pic/bmon/wigglytuff.pic",0,1 ; 66, sprite dimensions dw WigglytuffPicFront dw WigglytuffPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/zapdos.asm b/data/baseStats/zapdos.asm index 0619f3f879..b93cd23048 100755 --- a/data/baseStats/zapdos.asm +++ b/data/baseStats/zapdos.asm @@ -9,7 +9,7 @@ db ELECTRIC ; species type 1 db FLYING ; species type 2 db 3 ; catch rate db 216 ; base exp yield -db $77 ; sprite dimensions +INCBIN "pic/bmon/zapdos.pic",0,1 ; 77, sprite dimensions dw ZapdosPicFront dw ZapdosPicBack ; attacks known at lvl 0 diff --git a/data/baseStats/zubat.asm b/data/baseStats/zubat.asm index 9be7940ccf..b9b5c0e6dc 100755 --- a/data/baseStats/zubat.asm +++ b/data/baseStats/zubat.asm @@ -9,7 +9,7 @@ db POISON ; species type 1 db FLYING ; species type 2 db 255 ; catch rate db 54 ; base exp yield -db $55 ; sprite dimensions +INCBIN "pic/bmon/zubat.pic",0,1 ; 55, sprite dimensions dw ZubatPicFront dw ZubatPicBack ; attacks known at lvl 0 diff --git a/data/collision.asm b/data/collision.asm index 7857924243..46d5ddc635 100755 --- a/data/collision.asm +++ b/data/collision.asm @@ -22,3 +22,6 @@ 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/hidden_objects.asm b/data/hidden_objects.asm index b67f5c43e1..74d053bb39 100755 --- a/data/hidden_objects.asm +++ b/data/hidden_objects.asm @@ -177,19 +177,19 @@ HiddenObjectPointers: ; 46a96 (11:6a96) ; format: y-coord, x-coord, text id/item id, object routine BattleCenterHiddenObjects: ; 46b40 (11:6b40) db $04,$05,$d0 - db BANK(PrintJustAMomentText2) - dw PrintJustAMomentText2 + db BANK(CableClubRightGameboy) + dw CableClubRightGameboy db $04,$04,$d0 - db BANK(PrintJustAMomentText1) - dw PrintJustAMomentText1 + db BANK(CableClubLeftGameboy) + dw CableClubLeftGameboy db $FF TradeCenterHiddenObjects: ; 46b4d (11:6b4d) db $04,$05,$d0 - db BANK(PrintJustAMomentText2) - dw PrintJustAMomentText2 + db BANK(CableClubRightGameboy) + dw CableClubRightGameboy db $04,$04,$d0 - db BANK(PrintJustAMomentText1) - dw PrintJustAMomentText1 + db BANK(CableClubLeftGameboy) + dw CableClubLeftGameboy db $FF RedsHouse2FHiddenObjects: ; 46b5a (11:6b5a) db $01,$00,$04 diff --git a/data/item_prices.asm b/data/item_prices.asm index 45537dedf9..f6882fd0c6 100755 --- a/data/item_prices.asm +++ b/data/item_prices.asm @@ -1,98 +1,98 @@ ItemPrices: ; 4608 (1:4608) - db $00,$00,$00 - db $00,$12,$00 - db $00,$06,$00 - db $00,$02,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$10,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$01,$00 - db $00,$02,$50 - db $00,$02,$50 - db $00,$02,$00 - db $00,$02,$00 - db $00,$30,$00 - db $00,$25,$00 - db $00,$15,$00 - db $00,$07,$00 - db $00,$03,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$05,$50 - db $00,$03,$50 - db $00,$00,$00 - db $00,$21,$00 - db $00,$21,$00 - db $00,$21,$00 - db $00,$98,$00 - db $00,$98,$00 - db $00,$98,$00 - db $00,$98,$00 - db $00,$98,$00 - db $00,$48,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$09,$50 - db $00,$21,$00 - db $00,$00,$00 - db $01,$00,$00 - db $00,$98,$00 - db $00,$10,$00 - db $00,$06,$00 - db $00,$15,$00 - db $00,$40,$00 - db $00,$07,$00 - db $00,$05,$00 - db $00,$07,$00 - db $00,$06,$50 - db $00,$00,$10 - db $00,$02,$00 - db $00,$03,$00 - db $00,$03,$50 - db $00,$00,$00 - db $00,$00,$00 - db $00,$05,$00 - db $00,$05,$50 - db $00,$03,$50 - db $00,$03,$50 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 - db $00,$00,$00 + money 0 ; MASTER_BALL + money 1200 ; ULTRA_BALL + money 600 ; GREAT_BALL + money 200 ; POKE_BALL + money 0 ; TOWN_MAP + money 0 ; BICYCLE + money 0 ; SURFBOARD + money 1000 ; SAFARI_BALL + money 0 ; POKEDEX + money 0 ; MOON_STONE + money 100 ; ANTIDOTE + money 250 ; BURN_HEAL + money 250 ; ICE_HEAL + money 200 ; AWAKENING + money 200 ; PARLYZ_HEAL + money 3000 ; FULL_RESTORE + money 2500 ; MAX_POTION + money 1500 ; HYPER_POTION + money 700 ; SUPER_POTION + money 300 ; POTION + money 0 ; BOULDERBADGE + money 0 ; CASCADEBADGE + money 0 ; THUNDERBADGE + money 0 ; RAINBOWBADGE + money 0 ; SOULBADGE + money 0 ; MARSHBADGE + money 0 ; VOLCANOBADGE + money 0 ; EARTHBADGE + money 550 ; ESCAPE_ROPE + money 350 ; REPEL + money 0 ; OLD_AMBER + money 2100 ; FIRE_STONE + money 2100 ; THUNDER_STONE + money 2100 ; WATER_STONE + money 9800 ; HP_UP + money 9800 ; PROTEIN + money 9800 ; IRON + money 9800 ; CARBOS + money 9800 ; CALCIUM + money 4800 ; RARE_CANDY + money 0 ; DOME_FOSSIL + money 0 ; HELIX_FOSSIL + money 0 ; SECRET_KEY + money 0 ; XXX + money 0 ; BIKE_VOUCHER + money 950 ; X_ACCURACY + money 2100 ; LEAF_STONE + money 0 ; CARD_KEY + money 10000 ; NUGGET + money 9800 ; XXX PP_UP + money 1000 ; POKE_DOLL + money 600 ; FULL_HEAL + money 1500 ; REVIVE + money 4000 ; MAX_REVIVE + money 700 ; GUARD_SPEC_ + money 500 ; SUPER_REPEL + money 700 ; MAX_REPEL + money 650 ; DIRE_HIT + money 10 ; COIN + money 200 ; FRESH_WATER + money 300 ; SODA_POP + money 350 ; LEMONADE + money 0 ; S_S__TICKET + money 0 ; GOLD_TEETH + money 500 ; X_ATTACK + money 550 ; X_DEFEND + money 350 ; X_SPEED + money 350 ; X_SPECIAL + money 0 ; COIN_CASE + money 0 ; OAKS_PARCEL + money 0 ; ITEMFINDER + money 0 ; SILPH_SCOPE + money 0 ; POKE_FLUTE + money 0 ; LIFT_KEY + money 0 ; EXP__ALL + money 0 ; OLD_ROD + money 0 ; GOOD_ROD + money 0 ; SUPER_ROD + money 0 ; PP_UP + money 0 ; ETHER + 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 diff --git a/data/mapHeaders/beach_house.asm b/data/mapHeaders/beach_house.asm new file mode 100644 index 0000000000..99d237f669 --- /dev/null +++ b/data/mapHeaders/beach_house.asm @@ -0,0 +1,7 @@ +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/mapObjects/beach_house.asm b/data/mapObjects/beach_house.asm new file mode 100644 index 0000000000..ad648931d4 --- /dev/null +++ b/data/mapObjects/beach_house.asm @@ -0,0 +1,20 @@ +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/fuchsiahouse2.asm b/data/mapObjects/fuchsiahouse2.asm index 9f18768d41..f2958f022f 100755 --- a/data/mapObjects/fuchsiahouse2.asm +++ b/data/mapObjects/fuchsiahouse2.asm @@ -12,7 +12,7 @@ FuchsiaHouse2Object: ; 0x75180 (size=45) 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, $10, $3 ; person + db SPRITE_BOULDER, $4 + 4, $8 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $3 ; person ; warp-to EVENT_DISP FUCHSIA_HOUSE_2_WIDTH, $7, $4 diff --git a/data/mapObjects/pokemontower7.asm b/data/mapObjects/pokemontower7.asm index 23cb7d57a6..620b3a6901 100755 --- a/data/mapObjects/pokemontower7.asm +++ b/data/mapObjects/pokemontower7.asm @@ -6,11 +6,18 @@ 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_F, $9 + 4, $c + 4, $ff, $d2, TRAINER | $2, ROCKET_F + $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 ; warp-to EVENT_DISP POKEMONTOWER_7_WIDTH, $10, $9 ; POKEMONTOWER_6 diff --git a/data/mapObjects/route19.asm b/data/mapObjects/route19.asm index c3136a7117..e4c5135fb4 100755 --- a/data/mapObjects/route19.asm +++ b/data/mapObjects/route19.asm @@ -1,30 +1,42 @@ Route19Object: ; 0x54e9a (size=87) db $43 ; border block - IF _YELLOW + IF DEF(_OPTION_BEACH_HOUSE) db $1 ; warps - db $9, $5, $0, $f8 ; SURF_HOUSE - ENDC - IF !_YELLOW + db $9, $5, $0, BEACH_HOUSE + ELSE db $0 ; warps ENDC db $1 ; signs +IF DEF(_OPTION_BEACH_HOUSE) + db $b,$b,$b +ELSE db $9, $b, $b ; Route19Text11 +ENDC db $a ; people - 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 +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, SWIMMER_F + $C8, $c db SPRITE_SWIMMER, $2b + 4, $b + 4, $ff, $d3, TRAINER | $8, SWIMMER_F + $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, SWIMMER_F + $C8, $e ; warp-to - IF _YELLOW - EVENT_DISP ROUTE_19_WIDTH, $9, $5 ; SURF_HOUSE + IF DEF(_OPTION_BEACH_HOUSE) + EVENT_DISP ROUTE_19_WIDTH, $9, $5 ; BEACH_HOUSE ENDC diff --git a/data/mapObjects/seafoamislands1.asm b/data/mapObjects/seafoamislands1.asm index 85f344e8a5..62fc832093 100755 --- a/data/mapObjects/seafoamislands1.asm +++ b/data/mapObjects/seafoamislands1.asm @@ -13,8 +13,8 @@ SeafoamIslands1Object: ; 0x4484f (size=72) db $0 ; signs db $2 ; people - db SPRITE_BOULDER, $a + 4, $12 + 4, $ff, $10, $1 ; person - db SPRITE_BOULDER, $7 + 4, $1a + 4, $ff, $10, $2 ; person + 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 ; warp-to EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $11, $4 diff --git a/data/mapObjects/seafoamislands2.asm b/data/mapObjects/seafoamislands2.asm index 56251d1c8e..821a38cd0a 100755 --- a/data/mapObjects/seafoamislands2.asm +++ b/data/mapObjects/seafoamislands2.asm @@ -13,8 +13,8 @@ SeafoamIslands2Object: ; 0x46376 (size=72) db $0 ; signs db $2 ; people - db SPRITE_BOULDER, $6 + 4, $11 + 4, $ff, $10, $1 ; person - db SPRITE_BOULDER, $6 + 4, $16 + 4, $ff, $10, $2 ; person + 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 ; 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 82d963a17d..0370805d25 100755 --- a/data/mapObjects/seafoamislands3.asm +++ b/data/mapObjects/seafoamislands3.asm @@ -13,8 +13,8 @@ SeafoamIslands3Object: ; 0x464b2 (size=72) db $0 ; signs db $2 ; people - db SPRITE_BOULDER, $6 + 4, $12 + 4, $ff, $10, $1 ; person - db SPRITE_BOULDER, $6 + 4, $17 + 4, $ff, $10, $2 ; person + 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 ; 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 aa18110ab3..3f1baa1d04 100755 --- a/data/mapObjects/seafoamislands4.asm +++ b/data/mapObjects/seafoamislands4.asm @@ -13,10 +13,10 @@ SeafoamIslands4Object: ; 0x466a6 (size=96) db $0 ; signs db $6 ; people - db SPRITE_BOULDER, $e + 4, $5 + 4, $ff, $10, $1 ; person - db SPRITE_BOULDER, $f + 4, $3 + 4, $ff, $10, $2 ; person - db SPRITE_BOULDER, $e + 4, $8 + 4, $ff, $10, $3 ; person - db SPRITE_BOULDER, $e + 4, $9 + 4, $ff, $10, $4 ; person + 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 diff --git a/data/mapObjects/victoryroad1.asm b/data/mapObjects/victoryroad1.asm index ebca80449f..96cb23bbac 100755 --- a/data/mapObjects/victoryroad1.asm +++ b/data/mapObjects/victoryroad1.asm @@ -13,9 +13,9 @@ VictoryRoad1Object: ; 0x5dab8 (size=76) 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, $10, $5 ; person - db SPRITE_BOULDER, $2 + 4, $e + 4, $ff, $10, $6 ; person - db SPRITE_BOULDER, $a + 4, $2 + 4, $ff, $10, $7 ; person + 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 ; warp-to EVENT_DISP VICTORY_ROAD_1_WIDTH, $11, $8 diff --git a/data/mapObjects/victoryroad2.asm b/data/mapObjects/victoryroad2.asm index c714bb51d2..39ec23c55e 100755 --- a/data/mapObjects/victoryroad2.asm +++ b/data/mapObjects/victoryroad2.asm @@ -23,9 +23,9 @@ VictoryRoad2Object: ; 0x51915 (size=154) 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, $10, $b ; person - db SPRITE_BOULDER, $5 + 4, $5 + 4, $ff, $10, $c ; person - db SPRITE_BOULDER, $10 + 4, $17 + 4, $ff, $10, $d ; person + 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 ; 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 d22014fa5d..998a189d59 100755 --- a/data/mapObjects/victoryroad3.asm +++ b/data/mapObjects/victoryroad3.asm @@ -16,10 +16,10 @@ VictoryRoad3Object: ; 0x44acd (size=106) 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, $10, $7 ; person - db SPRITE_BOULDER, $c + 4, $d + 4, $ff, $10, $8 ; person - db SPRITE_BOULDER, $a + 4, $18 + 4, $ff, $10, $9 ; person - db SPRITE_BOULDER, $f + 4, $16 + 4, $ff, $10, $a ; person + 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 ; warp-to EVENT_DISP VICTORY_ROAD_3_WIDTH, $7, $17 ; VICTORY_ROAD_2 diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index abc413c790..f6bd8d99d0 100755 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -248,3 +248,6 @@ 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 4f3248fc0e..771989a56e 100755 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -248,3 +248,6 @@ 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 c551a76d99..1d7ab269a0 100755 --- a/data/map_songs.asm +++ b/data/map_songs.asm @@ -247,3 +247,6 @@ 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/moves.asm b/data/moves.asm index 5a1a2fdd60..cfb183ec93 100755 --- a/data/moves.asm +++ b/data/moves.asm @@ -1,253 +1,261 @@ -Moves: ; 38000 (e:4000) -; characteristics of each move -; animation, effect, power, type, accuracy, PP - db POUND ,NO_ADDITIONAL_EFFECT ,$28,NORMAL, $FF,35 - db KARATE_CHOP ,NO_ADDITIONAL_EFFECT ,$32,FIGHTING,$FF,25 - db DOUBLESLAP ,TWO_TO_FIVE_ATTACKS_EFFECT,$0F,NORMAL, $D8,10 - db COMET_PUNCH ,TWO_TO_FIVE_ATTACKS_EFFECT,$12,NORMAL, $D8,15 - db MEGA_PUNCH ,NO_ADDITIONAL_EFFECT ,$50,NORMAL, $D8,20 - db PAY_DAY ,PAY_DAY_EFFECT ,$28,NORMAL, $FF,20 - db FIRE_PUNCH ,BURN_SIDE_EFFECT1 ,$4B,FIRE, $FF,15 - db ICE_PUNCH ,FREEZE_SIDE_EFFECT ,$4B,ICE, $FF,15 - db THUNDERPUNCH,PARALYZE_SIDE_EFFECT1 ,$4B,ELECTRIC,$FF,15 - db SCRATCH ,NO_ADDITIONAL_EFFECT ,$28,NORMAL, $FF,35 - db VICEGRIP ,NO_ADDITIONAL_EFFECT ,$37,NORMAL, $FF,30 - db GUILLOTINE ,OHKO_EFFECT ,$01,NORMAL, $4C,5 - db RAZOR_WIND ,CHARGE_EFFECT ,$50,NORMAL, $BF,10 - db SWORDS_DANCE,ATTACK_UP2_EFFECT ,$00,NORMAL, $FF,30 - db CUT ,NO_ADDITIONAL_EFFECT ,$32,NORMAL, $F2,30 - db GUST ,NO_ADDITIONAL_EFFECT ,$28,FLYING, $FF,35 - db WING_ATTACK ,NO_ADDITIONAL_EFFECT ,$23,FLYING, $FF,35 - db WHIRLWIND ,SWITCH_AND_TELEPORT_EFFECT,$00,NORMAL, $D8,20 - db FLY ,FLY_EFFECT ,$46,FLYING, $F2,15 - db BIND ,TRAPPING_EFFECT ,$0F,NORMAL, $BF,20 - db SLAM ,NO_ADDITIONAL_EFFECT ,$50,NORMAL, $BF,20 - db VINE_WHIP ,NO_ADDITIONAL_EFFECT ,$23,GRASS, $FF,10 - db STOMP ,FLINCH_SIDE_EFFECT2 ,$41,NORMAL, $FF,20 - db DOUBLE_KICK ,ATTACK_TWICE_EFFECT ,$1E,FIGHTING,$FF,30 - db MEGA_KICK ,NO_ADDITIONAL_EFFECT ,$78,NORMAL, $BF,5 - db JUMP_KICK ,JUMP_KICK_EFFECT ,$46,FIGHTING,$F2,25 - db ROLLING_KICK,FLINCH_SIDE_EFFECT2 ,$3C,FIGHTING,$D8,15 - db SAND_ATTACK ,ACCURACY_DOWN1_EFFECT ,$00,GROUND, $FF,15 - db HEADBUTT ,FLINCH_SIDE_EFFECT2 ,$46,NORMAL, $FF,15 - db HORN_ATTACK ,NO_ADDITIONAL_EFFECT ,$41,NORMAL, $FF,25 - db FURY_ATTACK ,TWO_TO_FIVE_ATTACKS_EFFECT,$0F,NORMAL, $D8,20 - db HORN_DRILL ,OHKO_EFFECT ,$01,NORMAL, $4C,5 - db TACKLE ,NO_ADDITIONAL_EFFECT ,$23,NORMAL, $F2,35 - db BODY_SLAM ,PARALYZE_SIDE_EFFECT2 ,$55,NORMAL, $FF,15 - db WRAP ,TRAPPING_EFFECT ,$0F,NORMAL, $D8,20 - db TAKE_DOWN ,RECOIL_EFFECT ,$5A,NORMAL, $D8,20 - db THRASH ,THRASH_PETAL_DANCE_EFFECT ,$5A,NORMAL, $FF,20 - db DOUBLE_EDGE ,RECOIL_EFFECT ,$64,NORMAL, $FF,15 - db TAIL_WHIP ,DEFENSE_DOWN1_EFFECT ,$00,NORMAL, $FF,30 - db POISON_STING,POISON_SIDE_EFFECT1 ,$0F,POISON, $FF,35 - db TWINEEDLE ,TWINEEDLE_EFFECT ,$19,BUG, $FF,20 - db PIN_MISSILE ,TWO_TO_FIVE_ATTACKS_EFFECT,$0E,BUG, $D8,20 - db LEER ,DEFENSE_DOWN1_EFFECT ,$00,NORMAL, $FF,30 - db BITE ,FLINCH_SIDE_EFFECT1 ,$3C,DARK, $FF,25 - db GROWL ,ATTACK_DOWN1_EFFECT ,$00,NORMAL, $FF,40 - db ROAR ,SWITCH_AND_TELEPORT_EFFECT,$00,NORMAL, $FF,20 - db SING ,SLEEP_EFFECT ,$00,NORMAL, $8C,15 - db SUPERSONIC ,CONFUSION_EFFECT ,$00,NORMAL, $8C,20 - db SONICBOOM ,SPECIAL_DAMAGE_EFFECT ,$01,NORMAL, $E5,20 - db DISABLE ,DISABLE_EFFECT ,$00,NORMAL, $8C,20 - db ACID ,DEFENSE_DOWN_SIDE_EFFECT ,$28,POISON, $FF,30 - db EMBER ,BURN_SIDE_EFFECT1 ,$28,FIRE, $FF,25 - db FLAMETHROWER,BURN_SIDE_EFFECT1 ,$5F,FIRE, $FF,15 - db MIST ,MIST_EFFECT ,$00,ICE, $FF,30 - db WATER_GUN ,NO_ADDITIONAL_EFFECT ,$28,WATER, $FF,25 - db HYDRO_PUMP ,NO_ADDITIONAL_EFFECT ,$78,WATER, $CC,5 - db SURF ,NO_ADDITIONAL_EFFECT ,$5F,WATER, $FF,15 - db ICE_BEAM ,FREEZE_SIDE_EFFECT ,$5F,ICE, $FF,10 - db BLIZZARD ,FREEZE_SIDE_EFFECT ,$78,ICE, $E5,5 - db PSYBEAM ,CONFUSION_SIDE_EFFECT ,$41,PSYCHIC, $FF,20 - db BUBBLEBEAM ,SPEED_DOWN_SIDE_EFFECT ,$41,WATER, $FF,20 - db AURORA_BEAM ,ATTACK_DOWN_SIDE_EFFECT ,$41,ICE, $FF,20 - db HYPER_BEAM ,HYPER_BEAM_EFFECT ,$96,NORMAL, $E5,5 - db PECK ,NO_ADDITIONAL_EFFECT ,$23,FLYING, $FF,35 - db DRILL_PECK ,NO_ADDITIONAL_EFFECT ,$50,FLYING, $FF,20 - db SUBMISSION ,RECOIL_EFFECT ,$50,FIGHTING,$CC,25 - db LOW_KICK ,FLINCH_SIDE_EFFECT2 ,$32,FIGHTING,$E5,20 - db COUNTER ,NO_ADDITIONAL_EFFECT ,$01,FIGHTING,$FF,20 - db SEISMIC_TOSS,SPECIAL_DAMAGE_EFFECT ,$01,FIGHTING,$FF,20 - db STRENGTH ,NO_ADDITIONAL_EFFECT ,$50,NORMAL, $FF,15 - db ABSORB ,DRAIN_HP_EFFECT ,$14,GRASS, $FF,20 - db MEGA_DRAIN ,DRAIN_HP_EFFECT ,$28,GRASS, $FF,10 - db LEECH_SEED ,LEECH_SEED_EFFECT ,$00,GRASS, $E5,10 - db GROWTH ,SPECIAL_UP1_EFFECT ,$00,NORMAL, $FF,40 - db RAZOR_LEAF ,NO_ADDITIONAL_EFFECT ,$37,GRASS, $F2,25 - db SOLARBEAM ,CHARGE_EFFECT ,$78,GRASS, $FF,10 - db POISONPOWDER,POISON_EFFECT ,$00,POISON, $BF,35 - db STUN_SPORE ,PARALYZE_EFFECT ,$00,GRASS, $BF,30 - db SLEEP_POWDER,SLEEP_EFFECT ,$00,GRASS, $BF,15 - db PETAL_DANCE ,THRASH_PETAL_DANCE_EFFECT ,$46,GRASS, $FF,20 - db STRING_SHOT ,SPEED_DOWN1_EFFECT ,$00,BUG, $F2,40 - db DRAGON_RAGE ,SPECIAL_DAMAGE_EFFECT ,$01,DRAGON, $FF,10 - db FIRE_SPIN ,TRAPPING_EFFECT ,$0F,FIRE, $B2,15 - db THUNDERSHOCK,PARALYZE_SIDE_EFFECT1 ,$28,ELECTRIC,$FF,30 - db THUNDERBOLT ,PARALYZE_SIDE_EFFECT1 ,$5F,ELECTRIC,$FF,15 - db THUNDER_WAVE,PARALYZE_EFFECT ,$00,ELECTRIC,$FF,20 - db THUNDER ,PARALYZE_SIDE_EFFECT1 ,$78,ELECTRIC,$B2,10 - db ROCK_THROW ,NO_ADDITIONAL_EFFECT ,$32,ROCK, $A5,15 - db EARTHQUAKE ,NO_ADDITIONAL_EFFECT ,$64,GROUND, $FF,10 - db FISSURE ,OHKO_EFFECT ,$01,GROUND, $4C,5 - db DIG ,CHARGE_EFFECT ,$64,GROUND, $FF,10 - db TOXIC ,POISON_EFFECT ,$00,POISON, $D8,10 - db CONFUSION ,CONFUSION_SIDE_EFFECT ,$32,PSYCHIC, $FF,25 - db PSYCHIC_M ,SPECIAL_DOWN_SIDE_EFFECT ,$5A,PSYCHIC, $FF,10 - db HYPNOSIS ,SLEEP_EFFECT ,$00,PSYCHIC, $99,20 - db MEDITATE ,ATTACK_UP1_EFFECT ,$00,PSYCHIC, $FF,40 - db AGILITY ,SPEED_UP2_EFFECT ,$00,PSYCHIC, $FF,30 - db QUICK_ATTACK,NO_ADDITIONAL_EFFECT ,$28,NORMAL, $FF,30 - db RAGE ,RAGE_EFFECT ,$14,NORMAL, $FF,20 - db TELEPORT ,SWITCH_AND_TELEPORT_EFFECT,$00,PSYCHIC, $FF,20 - db NIGHT_SHADE ,SPECIAL_DAMAGE_EFFECT ,$00,GHOST, $FF,15 - db MIMIC ,MIMIC_EFFECT ,$00,NORMAL, $FF,10 - db SCREECH ,DEFENSE_DOWN2_EFFECT ,$00,NORMAL, $D8,40 - db DOUBLE_TEAM ,EVASION_UP1_EFFECT ,$00,NORMAL, $FF,15 - db RECOVER ,HEAL_EFFECT ,$00,NORMAL, $FF,20 - db HARDEN ,DEFENSE_UP1_EFFECT ,$00,NORMAL, $FF,30 - db MINIMIZE ,EVASION_UP1_EFFECT ,$00,NORMAL, $FF,20 - db SMOKESCREEN ,ACCURACY_DOWN1_EFFECT ,$00,NORMAL, $FF,20 - db CONFUSE_RAY ,CONFUSION_EFFECT ,$00,GHOST, $FF,10 - db WITHDRAW ,DEFENSE_UP1_EFFECT ,$00,WATER, $FF,40 - db DEFENSE_CURL,DEFENSE_UP1_EFFECT ,$00,NORMAL, $FF,40 - db BARRIER ,DEFENSE_UP2_EFFECT ,$00,PSYCHIC, $FF,30 - db LIGHT_SCREEN,LIGHT_SCREEN_EFFECT ,$00,PSYCHIC, $FF,30 - db HAZE ,HAZE_EFFECT ,$00,ICE, $FF,30 - db REFLECT ,REFLECT_EFFECT ,$00,PSYCHIC, $FF,20 - db FOCUS_ENERGY,FOCUS_ENERGY_EFFECT ,$00,NORMAL, $FF,30 - db BIDE ,BIDE_EFFECT ,$00,NORMAL, $FF,10 - db METRONOME ,METRONOME_EFFECT ,$00,NORMAL, $FF,10 - db MIRROR_MOVE ,MIRROR_MOVE_EFFECT ,$00,FLYING, $FF,20 - db SELFDESTRUCT,EXPLODE_EFFECT ,$82,NORMAL, $FF,5 - db EGG_BOMB ,NO_ADDITIONAL_EFFECT ,$64,NORMAL, $BF,10 - db LICK ,PARALYZE_SIDE_EFFECT2 ,$14,GHOST, $FF,30 - db SMOG ,POISON_SIDE_EFFECT2 ,$14,POISON, $B2,20 - db SLUDGE ,POISON_SIDE_EFFECT2 ,$41,POISON, $FF,20 - db BONE_CLUB ,FLINCH_SIDE_EFFECT1 ,$41,GROUND, $D8,20 - db FIRE_BLAST ,BURN_SIDE_EFFECT2 ,$78,FIRE, $D8,5 - db WATERFALL ,NO_ADDITIONAL_EFFECT ,$50,WATER, $FF,15 - db CLAMP ,TRAPPING_EFFECT ,$23,WATER, $BF,10 - db SWIFT ,SWIFT_EFFECT ,$3C,NORMAL, $FF,20 - db SKULL_BASH ,CHARGE_EFFECT ,$64,NORMAL, $FF,15 - db SPIKE_CANNON,TWO_TO_FIVE_ATTACKS_EFFECT,$14,NORMAL, $FF,15 - db CONSTRICT ,SPEED_DOWN_SIDE_EFFECT ,$0A,NORMAL, $FF,35 - db AMNESIA ,SPECIAL_UP2_EFFECT ,$00,PSYCHIC, $FF,20 - db KINESIS ,ACCURACY_DOWN1_EFFECT ,$00,PSYCHIC, $CC,15 - db SOFTBOILED ,HEAL_EFFECT ,$00,NORMAL, $FF,10 - db HI_JUMP_KICK,JUMP_KICK_EFFECT ,$55,FIGHTING,$E5,20 - db GLARE ,PARALYZE_EFFECT ,$00,NORMAL, $BF,30 - db DREAM_EATER ,DREAM_EATER_EFFECT ,$64,PSYCHIC, $FF,15 - db POISON_GAS ,POISON_EFFECT ,$00,POISON, $8C,40 - db BARRAGE ,TWO_TO_FIVE_ATTACKS_EFFECT,$0F,NORMAL, $D8,20 - db LEECH_LIFE ,DRAIN_HP_EFFECT ,$14,BUG, $FF,15 - db LOVELY_KISS ,SLEEP_EFFECT ,$00,NORMAL, $BF,10 - db SKY_ATTACK ,CHARGE_EFFECT ,$8C,FLYING, $E5,5 - db TRANSFORM ,TRANSFORM_EFFECT ,$00,NORMAL, $FF,10 - db BUBBLE ,SPEED_DOWN_SIDE_EFFECT ,$28,WATER, $FF,30 - db DIZZY_PUNCH ,NO_ADDITIONAL_EFFECT ,$46,NORMAL, $FF,10 - db SPORE ,SLEEP_EFFECT ,$00,GRASS, $FF,15 - db FLASH ,ACCURACY_DOWN1_EFFECT ,$00,NORMAL, $B2,20 - db PSYWAVE ,SPECIAL_DAMAGE_EFFECT ,$01,PSYCHIC, $CC,15 - db SPLASH ,SPLASH_EFFECT ,$00,NORMAL, $FF,40 - db ACID_ARMOR ,DEFENSE_UP2_EFFECT ,$00,POISON, $FF,40 - db CRABHAMMER ,NO_ADDITIONAL_EFFECT ,$5A,WATER, $D8,10 - db EXPLOSION ,EXPLODE_EFFECT ,$AA,NORMAL, $FF,5 - db FURY_SWIPES ,TWO_TO_FIVE_ATTACKS_EFFECT,$12,NORMAL, $CC,15 - db BONEMERANG ,ATTACK_TWICE_EFFECT ,$32,GROUND, $E5,10 - db REST ,HEAL_EFFECT ,$00,PSYCHIC, $FF,10 - db ROCK_SLIDE ,NO_ADDITIONAL_EFFECT ,$4B,ROCK, $E5,10 - db HYPER_FANG ,FLINCH_SIDE_EFFECT1 ,$50,NORMAL, $E5,15 - db SHARPEN ,ATTACK_UP1_EFFECT ,$00,NORMAL, $FF,30 - db CONVERSION ,CONVERSION_EFFECT ,$00,NORMAL, $FF,30 - db TRI_ATTACK ,NO_ADDITIONAL_EFFECT ,$50,NORMAL, $FF,10 - db SUPER_FANG ,SUPER_FANG_EFFECT ,$01,NORMAL, $E5,10 - db SLASH ,NO_ADDITIONAL_EFFECT ,$46,NORMAL, $FF,20 - db SUBSTITUTE ,SUBSTITUTE_EFFECT ,$00,NORMAL, $FF,10 - db STRUGGLE ,RECOIL_EFFECT ,$32,NORMAL, $FF,10 - db SLASH ,NO_ADDITIONAL_EFFECT ,$32,STEEL, $F2,35 ; Metal Claw - db COMET_PUNCH ,NO_ADDITIONAL_EFFECT ,$28,STEEL, $FF,30 ; Bullet Punch - db AURORA_BEAM ,SPECIAL_DOWN_SIDE_EFFECT ,$50,STEEL, $FF,10 ; Flash Cannon - db CUT ,DEFENSE_DOWN_SIDE_EFFECT ,$64,STEEL, $B2,15 ; Iron Tail - db STRENGTH ,NO_ADDITIONAL_EFFECT ,$5A,STEEL, $F2,10 ; Meteor Mash - db BITE ,DEFENSE_DOWN_SIDE_EFFECT ,$50,DARK, $FF,15 ; Crunch - db PSYCHIC ,FLINCH_SIDE_EFFECT1 ,$50,DARK, $FF,15 ; Dark Pulse - db TACKLE ,SWIFT_EFFECT ,$3C,DARK, $FF,20 ; Feint Attack - db CUT ,NO_ADDITIONAL_EFFECT ,$46,DARK, $FF,15 ; Night Slash - db SEISMIC_TOSS,SPECIAL_DOWN_SIDE_EFFECT ,$5F,FAIRY, $FF,15 ; Moonblast - db LOVELY_KISS ,DRAIN_HP_EFFECT ,$32,FAIRY, $FF,10 ; Draining Kiss - db SCREECH ,SWIFT_EFFECT ,$28,FAIRY, $FF,15 ; Disarming Voice - db FLASH ,NO_ADDITIONAL_EFFECT ,$50,FAIRY, $FF,10 ; Dazzling Gleam - db SEISMIC_TOSS,SPECIAL_DOWN_SIDE_EFFECT ,$82,DRAGON, $E5,5 ; Draco Meteor - db FLAMETHROWER,PARALYZE_SIDE_EFFECT1 ,$3C,DRAGON, $FF,20 ; Dragonbreath - db SLASH ,NO_ADDITIONAL_EFFECT ,$50,DRAGON, $FF,15 ; Dragon Claw - db AURORA_BEAM ,NO_ADDITIONAL_EFFECT ,$55,DRAGON, $FF,10 ; Dragon Pulse - db WHIRLWIND ,FLINCH_SIDE_EFFECT1 ,$28,DRAGON, $FF,20 ; Twister - db RAGE ,TRAPPING_EFFECT ,$78,DRAGON, $FF,10 ; Outrage - db SLASH ,NO_ADDITIONAL_EFFECT ,$46,GHOST, $FF,15 ; Shadow Claw - db WING_ATTACK ,NO_ADDITIONAL_EFFECT ,$46,STEEL, $E5,25 ; Steel Wing - db BARRIER ,DEFENSE_UP2_EFFECT ,$00,STEEL, $FF,15 ; Iron Defense - db CUT ,FLINCH_SIDE_EFFECT2 ,$4B,FLYING, $F2,15 ; Air Slash - db BITE ,FIRE_FANG_EFFECT ,$41,FIRE, $F2,15 ; Fire Fang - db EMBER ,RECOIL_EFFECT ,$78,FIRE, $FF,14 ; Flare Blitz - db FIRE_BLAST ,HYPER_BEAM_EFFECT ,$96,FIRE, $E5,5 ; Blast Burn - db BITE ,ICE_FANG_EFFECT ,$41,ICE, $F2,15 ; Ice Fang - db BITE ,THUNDER_FANG_EFFECT ,$41,ELECTRIC,$F2,15 ; Thunder Fang - db BUBBLEBEAM ,CONFUSION_SIDE_EFFECT ,$3C,WATER, $FF,20 ; Water Pulse - db SURF ,NO_ADDITIONAL_EFFECT ,$5A,WATER, $FF,10 ; Aqua Tail - db AURORA_BEAM ,HYPER_BEAM_EFFECT ,$96,WATER, $E5,5 ; Hydro Cannon - db VINE_WHIP ,HYPER_BEAM_EFFECT ,$96,GRASS, $E5,5 ; Frenzy Plant - db MEGA_PUNCH ,NO_ADDITIONAL_EFFECT ,$50,DARK, $FF,5 ; Sucker Punch - db BARRAGE ,SPECIAL_DOWN_SIDE_EFFECT ,$50,GHOST, $FF,15 ; Shadow Ball - db EMBER ,BURN_SIDE_EFFECT1 ,$3C,FIRE, $FF,25 ; Flame Wheel - db FOCUS_ENERGY,HEAL_EFFECT ,$00,FAIRY, $FF,20 ; Moonlight - db PSYCHIC_M ,NO_ADDITIONAL_EFFECT ,$41,GHOST, $FF,10 ; Hex - db MEGA_PUNCH ,SWIFT_EFFECT ,$3C,GHOST, $FF,20 ; Shadow Punch - db WING_ATTACK ,SWIFT_EFFECT ,$3C,FLYING, $FF,20 ; Aerial Ace - db QUICK_ATTACK,NO_ADDITIONAL_EFFECT ,$6E,FLYING, $FF,15 ; Acrobatics - db CUT ,NO_ADDITIONAL_EFFECT ,$3C,FLYING, $FF,25 ; Air Cutter - db GUST ,SPEED_DOWN_SIDE_EFFECT ,$37,ICE, $F2,15 ; Icy Wind - db BLIZZARD ,NO_ADDITIONAL_EFFECT ,$28,ICE, $FF,30 ; Ice Shard - db BLIZZARD ,OHKO_EFFECT ,$01,ICE, $4C,5 ; Sheer Cold - db THUNDER ,NO_ADDITIONAL_EFFECT ,$50,ELECTRIC,$FF,10 ; Electro Ball - db TACKLE ,NUZZLE_EFFECT ,$14,ELECTRIC,$FF,20 ; Nuzzle - db THUNDERBOLT ,PARALYZE_SIDE_EFFECT1 ,$50,ELECTRIC,$FF,15 ; Discharge - db QUICK_ATTACK,VOLT_TACKLE_EFFECT ,$78,ELECTRIC,$FF,15 ; Volt Tackle - db SPLASH ,ACCURACY_DOWN1_EFFECT ,$5A,WATER, $D8,10 ; Muddy Water - db GUST ,TRAPPING_EFFECT ,$23,WATER, $D8,15 ; Whirlpool - db MEGA_DRAIN ,DRAIN_HP_EFFECT ,$4B,GRASS, $FF,10 ; Giga Drain - db PETAL_DANCE ,NO_ADDITIONAL_EFFECT ,$5A,GRASS, $FF,15 ; Petal Blizzard - db CUT ,NO_ADDITIONAL_EFFECT ,$5A,GRASS, $FF,15 ; Leaf Blade - db ROCK_THROW ,RECOIL_EFFECT ,$78,GRASS, $FF,15 ; Wood Hammer - db COMET_PUNCH ,POISON_SIDE_EFFECT2 ,$50,POISON, $FF,20 ; Poison Jab - db SLUDGE ,POISON_SIDE_EFFECT2 ,$78,POISON, $D8,5 ; Gunk Shot - db BITE ,POISON_FANG_EFFECT ,$32,POISON, $FF,15 ; Poison Fang - db SURF ,POISON_SIDE_EFFECT1 ,$5F,POISON, $FF,10 ; Sludge Wave - db MIST ,NO_ADDITIONAL_EFFECT ,$3C,BUG, $FF,5 ; Silver Wind - db SUPERSONIC ,SPECIAL_DOWN_SIDE_EFFECT ,$5A,BUG, $FF,10 ; Bug Buzz - db HORN_ATTACK ,NO_ADDITIONAL_EFFECT ,$78,BUG, $D8,10 ; Megahorn - db CUT ,NO_ADDITIONAL_EFFECT ,$50,BUG, $FF,15 ; X-Scissor - db AURORA_BEAM ,CONFUSION_SIDE_EFFECT ,$4B,BUG, $FF,15 ; Signal Beam - db EARTHQUAKE ,SPECIAL_DOWN_SIDE_EFFECT ,$5A,GROUND, $FF,10 ; Earth Power - db SAND_ATTACK ,ACCURACY_DOWN1_EFFECT ,$14,GROUND, $FF,10 ; Mud-Slap - db FISSURE ,ACCURACY_DOWN1_EFFECT ,$41,GROUND, $D8,10 ; Mud Bomb - db CONFUSION ,FLINCH_SIDE_EFFECT1 ,$50,PSYCHIC, $FF,20 ; Extrasensory - db HEADBUTT ,FLINCH_SIDE_EFFECT2 ,$50,PSYCHIC, $FF,15 ; Zen Headbutt - db CUT ,NO_ADDITIONAL_EFFECT ,$46,PSYCHIC, $FF,20 ; Psycho Cut - db SING ,NO_ADDITIONAL_EFFECT ,$5A,NORMAL, $FF,10 ; Hyper Voice - db QUICK_ATTACK,NO_ADDITIONAL_EFFECT ,$50,NORMAL, $FF,5 ; Extremespeed - db SLAM ,HYPER_BEAM_EFFECT ,$96,NORMAL, $E5,5 ; Giga Impact - db KINESIS ,NO_ADDITIONAL_EFFECT ,$50,ROCK, $FF,20 ; Power Gem - db BARRAGE ,TWO_TO_FIVE_ATTACKS_EFFECT,$19,ROCK, $F2,10 ; Rock Blast - db CONVERSION ,SPEED_UP2_EFFECT ,$00,ROCK, $FF,20 ; Rock Polish - db ROCK_SLIDE ,SPEED_DOWN_SIDE_EFFECT ,$3C,ROCK, $F2,15 ; Rock Tomb - db MEGA_PUNCH ,CONFUSION_SIDE_EFFECT ,$64,FIGHTING,$7F,5 ; Dynamicpunch - db COUNTER ,NO_ADDITIONAL_EFFECT ,$3C,FIGHTING,$E5,10 ; Circle Throw - db KARATE_CHOP ,NO_ADDITIONAL_EFFECT ,$64,FIGHTING,$D8,5 ; Cross Chop - db MEGA_KICK ,SPEED_DOWN_SIDE_EFFECT ,$41,FIGHTING,$FF,20 ; Low Sweep - db WHIRLWIND ,CONFUSION_SIDE_EFFECT ,$6E,FLYING, $D8,10 ; Hurricane - db LEER ,ATTACK_DOWN1_EFFECT ,$00,FAIRY, $FF,30 ; Baby Doll Eyes - db BONEMERANG ,TWO_TO_FIVE_ATTACKS_EFFECT,$19,GROUND, $E5,10 ; Bone Rush - db AURORA_BEAM ,NO_ADDITIONAL_EFFECT ,$64,FLYING, $FF,5 ; Aeroblast - \ No newline at end of file +Moves: +; Characteristics of each move. + +move: macro + db \1 ; animation (interchangeable with move id) + db \2 ; effect + db \3 ; power + db \4 ; type + db \5 percent ; accuracy + db \6 ; pp +endm + + move POUND, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35 + 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 + move MEGA_PUNCH, NO_ADDITIONAL_EFFECT, 80, NORMAL, 85, 20 + move PAY_DAY, PAY_DAY_EFFECT, 40, NORMAL, 100, 20 + move FIRE_PUNCH, BURN_SIDE_EFFECT1, 75, FIRE, 100, 15 + move ICE_PUNCH, FREEZE_SIDE_EFFECT, 75, ICE, 100, 15 + move THUNDERPUNCH, PARALYZE_SIDE_EFFECT1, 75, ELECTRIC, 100, 15 + move SCRATCH, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35 + move VICEGRIP, NO_ADDITIONAL_EFFECT, 55, NORMAL, 100, 30 + move GUILLOTINE, OHKO_EFFECT, 1, NORMAL, 30, 5 + move RAZOR_WIND, CHARGE_EFFECT, 80, NORMAL, 75, 10 + move SWORDS_DANCE, ATTACK_UP2_EFFECT, 0, NORMAL, 100, 30 + move CUT, NO_ADDITIONAL_EFFECT, 50, NORMAL, 95, 30 + move GUST, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35 + move WING_ATTACK, NO_ADDITIONAL_EFFECT, 35, FLYING, 100, 35 + move WHIRLWIND, SWITCH_AND_TELEPORT_EFFECT, 0, NORMAL, 85, 20 + move FLY, FLY_EFFECT, 70, FLYING, 95, 15 + move BIND, TRAPPING_EFFECT, 15, NORMAL, 75, 20 + move SLAM, NO_ADDITIONAL_EFFECT, 80, NORMAL, 75, 20 + move VINE_WHIP, NO_ADDITIONAL_EFFECT, 35, GRASS, 100, 10 + move STOMP, FLINCH_SIDE_EFFECT2, 65, NORMAL, 100, 20 + move DOUBLE_KICK, ATTACK_TWICE_EFFECT, 30, FIGHTING, 100, 30 + move MEGA_KICK, NO_ADDITIONAL_EFFECT, 120, NORMAL, 75, 5 + move JUMP_KICK, JUMP_KICK_EFFECT, 70, FIGHTING, 95, 25 + move ROLLING_KICK, FLINCH_SIDE_EFFECT2, 60, FIGHTING, 85, 15 + move SAND_ATTACK, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 15 + move HEADBUTT, FLINCH_SIDE_EFFECT2, 70, NORMAL, 100, 15 + move HORN_ATTACK, NO_ADDITIONAL_EFFECT, 65, NORMAL, 100, 25 + move FURY_ATTACK, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20 + move HORN_DRILL, OHKO_EFFECT, 1, NORMAL, 30, 5 + move TACKLE, NO_ADDITIONAL_EFFECT, 35, NORMAL, 95, 35 + move BODY_SLAM, PARALYZE_SIDE_EFFECT2, 85, NORMAL, 100, 15 + move WRAP, TRAPPING_EFFECT, 15, NORMAL, 85, 20 + move TAKE_DOWN, RECOIL_EFFECT, 90, NORMAL, 85, 20 + move THRASH, THRASH_PETAL_DANCE_EFFECT, 90, NORMAL, 100, 20 + move DOUBLE_EDGE, RECOIL_EFFECT, 100, NORMAL, 100, 15 + move TAIL_WHIP, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 30 + move POISON_STING, POISON_SIDE_EFFECT1, 15, POISON, 100, 35 + move TWINEEDLE, TWINEEDLE_EFFECT, 25, BUG, 100, 20 + move PIN_MISSILE, TWO_TO_FIVE_ATTACKS_EFFECT, 14, BUG, 85, 20 + move LEER, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 30 + move BITE, FLINCH_SIDE_EFFECT1, 60, NORMAL, 100, 25 + move GROWL, ATTACK_DOWN1_EFFECT, 0, NORMAL, 100, 40 + move ROAR, SWITCH_AND_TELEPORT_EFFECT, 0, NORMAL, 100, 20 + move SING, SLEEP_EFFECT, 0, NORMAL, 55, 15 + move SUPERSONIC, CONFUSION_EFFECT, 0, NORMAL, 55, 20 + move SONICBOOM, SPECIAL_DAMAGE_EFFECT, 1, NORMAL, 90, 20 + move DISABLE, DISABLE_EFFECT, 0, NORMAL, 55, 20 + move ACID, DEFENSE_DOWN_SIDE_EFFECT, 40, POISON, 100, 30 + move EMBER, BURN_SIDE_EFFECT1, 40, FIRE, 100, 25 + move FLAMETHROWER, BURN_SIDE_EFFECT1, 95, FIRE, 100, 15 + move MIST, MIST_EFFECT, 0, ICE, 100, 30 + move WATER_GUN, NO_ADDITIONAL_EFFECT, 40, WATER, 100, 25 + move HYDRO_PUMP, NO_ADDITIONAL_EFFECT, 120, WATER, 80, 5 + move SURF, NO_ADDITIONAL_EFFECT, 95, WATER, 100, 15 + move ICE_BEAM, FREEZE_SIDE_EFFECT, 95, ICE, 100, 10 + move BLIZZARD, FREEZE_SIDE_EFFECT, 120, ICE, 90, 5 + move PSYBEAM, CONFUSION_SIDE_EFFECT, 65, PSYCHIC, 100, 20 + move BUBBLEBEAM, SPEED_DOWN_SIDE_EFFECT, 65, WATER, 100, 20 + move AURORA_BEAM, ATTACK_DOWN_SIDE_EFFECT, 65, ICE, 100, 20 + move HYPER_BEAM, HYPER_BEAM_EFFECT, 150, NORMAL, 90, 5 + move PECK, NO_ADDITIONAL_EFFECT, 35, FLYING, 100, 35 + move DRILL_PECK, NO_ADDITIONAL_EFFECT, 80, FLYING, 100, 20 + move SUBMISSION, RECOIL_EFFECT, 80, FIGHTING, 80, 25 + move LOW_KICK, FLINCH_SIDE_EFFECT2, 50, FIGHTING, 90, 20 + move COUNTER, NO_ADDITIONAL_EFFECT, 1, FIGHTING, 100, 20 + move SEISMIC_TOSS, SPECIAL_DAMAGE_EFFECT, 1, FIGHTING, 100, 20 + move STRENGTH, NO_ADDITIONAL_EFFECT, 80, NORMAL, 100, 15 + move ABSORB, DRAIN_HP_EFFECT, 20, GRASS, 100, 20 + move MEGA_DRAIN, DRAIN_HP_EFFECT, 40, GRASS, 100, 10 + move LEECH_SEED, LEECH_SEED_EFFECT, 0, GRASS, 90, 10 + move GROWTH, SPECIAL_UP1_EFFECT, 0, NORMAL, 100, 40 + move RAZOR_LEAF, NO_ADDITIONAL_EFFECT, 55, GRASS, 95, 25 + move SOLARBEAM, CHARGE_EFFECT, 120, GRASS, 100, 10 + move POISONPOWDER, POISON_EFFECT, 0, POISON, 75, 35 + move STUN_SPORE, PARALYZE_EFFECT, 0, GRASS, 75, 30 + move SLEEP_POWDER, SLEEP_EFFECT, 0, GRASS, 75, 15 + move PETAL_DANCE, THRASH_PETAL_DANCE_EFFECT, 70, GRASS, 100, 20 + move STRING_SHOT, SPEED_DOWN1_EFFECT, 0, BUG, 95, 40 + move DRAGON_RAGE, SPECIAL_DAMAGE_EFFECT, 1, DRAGON, 100, 10 + move FIRE_SPIN, TRAPPING_EFFECT, 15, FIRE, 70, 15 + move THUNDERSHOCK, PARALYZE_SIDE_EFFECT1, 40, ELECTRIC, 100, 30 + move THUNDERBOLT, PARALYZE_SIDE_EFFECT1, 95, ELECTRIC, 100, 15 + move THUNDER_WAVE, PARALYZE_EFFECT, 0, ELECTRIC, 100, 20 + move THUNDER, PARALYZE_SIDE_EFFECT1, 120, ELECTRIC, 70, 10 + move ROCK_THROW, NO_ADDITIONAL_EFFECT, 50, ROCK, 65, 15 + move EARTHQUAKE, NO_ADDITIONAL_EFFECT, 100, GROUND, 100, 10 + move FISSURE, OHKO_EFFECT, 1, GROUND, 30, 5 + move DIG, CHARGE_EFFECT, 100, GROUND, 100, 10 + move TOXIC, POISON_EFFECT, 0, POISON, 85, 10 + move CONFUSION, CONFUSION_SIDE_EFFECT, 50, PSYCHIC, 100, 25 + move PSYCHIC_M, SPECIAL_DOWN_SIDE_EFFECT, 90, PSYCHIC, 100, 10 + move HYPNOSIS, SLEEP_EFFECT, 0, PSYCHIC, 60, 20 + move MEDITATE, ATTACK_UP1_EFFECT, 0, PSYCHIC, 100, 40 + move AGILITY, SPEED_UP2_EFFECT, 0, PSYCHIC, 100, 30 + move QUICK_ATTACK, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 30 + move RAGE, RAGE_EFFECT, 20, NORMAL, 100, 20 + move TELEPORT, SWITCH_AND_TELEPORT_EFFECT, 0, PSYCHIC, 100, 20 + move NIGHT_SHADE, SPECIAL_DAMAGE_EFFECT, 0, GHOST, 100, 15 + move MIMIC, MIMIC_EFFECT, 0, NORMAL, 100, 10 + move SCREECH, DEFENSE_DOWN2_EFFECT, 0, NORMAL, 85, 40 + move DOUBLE_TEAM, EVASION_UP1_EFFECT, 0, NORMAL, 100, 15 + move RECOVER, HEAL_EFFECT, 0, NORMAL, 100, 20 + move HARDEN, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 30 + move MINIMIZE, EVASION_UP1_EFFECT, 0, NORMAL, 100, 20 + move SMOKESCREEN, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 20 + move CONFUSE_RAY, CONFUSION_EFFECT, 0, GHOST, 100, 10 + move WITHDRAW, DEFENSE_UP1_EFFECT, 0, WATER, 100, 40 + move DEFENSE_CURL, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 40 + move BARRIER, DEFENSE_UP2_EFFECT, 0, PSYCHIC, 100, 30 + move LIGHT_SCREEN, LIGHT_SCREEN_EFFECT, 0, PSYCHIC, 100, 30 + move HAZE, HAZE_EFFECT, 0, ICE, 100, 30 + move REFLECT, REFLECT_EFFECT, 0, PSYCHIC, 100, 20 + move FOCUS_ENERGY, FOCUS_ENERGY_EFFECT, 0, NORMAL, 100, 30 + move BIDE, BIDE_EFFECT, 0, NORMAL, 100, 10 + move METRONOME, METRONOME_EFFECT, 0, NORMAL, 100, 10 + move MIRROR_MOVE, MIRROR_MOVE_EFFECT, 0, FLYING, 100, 20 + move SELFDESTRUCT, EXPLODE_EFFECT, 130, NORMAL, 100, 5 + move EGG_BOMB, NO_ADDITIONAL_EFFECT, 100, NORMAL, 75, 10 + move LICK, PARALYZE_SIDE_EFFECT2, 20, GHOST, 100, 30 + move SMOG, POISON_SIDE_EFFECT2, 20, POISON, 70, 20 + move SLUDGE, POISON_SIDE_EFFECT2, 65, POISON, 100, 20 + move BONE_CLUB, FLINCH_SIDE_EFFECT1, 65, GROUND, 85, 20 + move FIRE_BLAST, BURN_SIDE_EFFECT2, 120, FIRE, 85, 5 + move WATERFALL, NO_ADDITIONAL_EFFECT, 80, WATER, 100, 15 + move CLAMP, TRAPPING_EFFECT, 35, WATER, 75, 10 + move SWIFT, SWIFT_EFFECT, 60, NORMAL, 100, 20 + move SKULL_BASH, CHARGE_EFFECT, 100, NORMAL, 100, 15 + move SPIKE_CANNON, TWO_TO_FIVE_ATTACKS_EFFECT, 20, NORMAL, 100, 15 + move CONSTRICT, SPEED_DOWN_SIDE_EFFECT, 10, NORMAL, 100, 35 + move AMNESIA, SPECIAL_UP2_EFFECT, 0, PSYCHIC, 100, 20 + move KINESIS, ACCURACY_DOWN1_EFFECT, 0, PSYCHIC, 80, 15 + move SOFTBOILED, HEAL_EFFECT, 0, NORMAL, 100, 10 + move HI_JUMP_KICK, JUMP_KICK_EFFECT, 85, FIGHTING, 90, 20 + move GLARE, PARALYZE_EFFECT, 0, NORMAL, 75, 30 + move DREAM_EATER, DREAM_EATER_EFFECT, 100, PSYCHIC, 100, 15 + move POISON_GAS, POISON_EFFECT, 0, POISON, 55, 40 + move BARRAGE, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20 + move LEECH_LIFE, DRAIN_HP_EFFECT, 20, BUG, 100, 15 + move LOVELY_KISS, SLEEP_EFFECT, 0, NORMAL, 75, 10 + move SKY_ATTACK, CHARGE_EFFECT, 140, FLYING, 90, 5 + move TRANSFORM, TRANSFORM_EFFECT, 0, NORMAL, 100, 10 + move BUBBLE, SPEED_DOWN_SIDE_EFFECT, 20, WATER, 100, 30 + move DIZZY_PUNCH, NO_ADDITIONAL_EFFECT, 70, NORMAL, 100, 10 + move SPORE, SLEEP_EFFECT, 0, GRASS, 100, 15 + move FLASH, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 70, 20 + move PSYWAVE, SPECIAL_DAMAGE_EFFECT, 1, PSYCHIC, 80, 15 + move SPLASH, SPLASH_EFFECT, 0, NORMAL, 100, 40 + move ACID_ARMOR, DEFENSE_UP2_EFFECT, 0, POISON, 100, 40 + move CRABHAMMER, NO_ADDITIONAL_EFFECT, 90, WATER, 85, 10 + move EXPLOSION, EXPLODE_EFFECT, 170, NORMAL, 100, 5 + move FURY_SWIPES, TWO_TO_FIVE_ATTACKS_EFFECT, 18, NORMAL, 80, 15 + move BONEMERANG, ATTACK_TWICE_EFFECT, 50, GROUND, 90, 10 + move REST, HEAL_EFFECT, 0, PSYCHIC, 100, 10 + move ROCK_SLIDE, NO_ADDITIONAL_EFFECT, 75, ROCK, 90, 10 + move HYPER_FANG, FLINCH_SIDE_EFFECT1, 80, NORMAL, 90, 15 + move SHARPEN, ATTACK_UP1_EFFECT, 0, NORMAL, 100, 30 + move CONVERSION, CONVERSION_EFFECT, 0, NORMAL, 100, 30 + move TRI_ATTACK, NO_ADDITIONAL_EFFECT, 80, NORMAL, 100, 10 + move SUPER_FANG, SUPER_FANG_EFFECT, 1, NORMAL, 90, 10 + move SLASH, NO_ADDITIONAL_EFFECT, 70, NORMAL, 100, 20 + move SUBSTITUTE, SUBSTITUTE_EFFECT, 0, NORMAL, 100, 10 + move STRUGGLE, RECOIL_EFFECT, 50, NORMAL, 100, 10 + move SLASH ,NO_ADDITIONAL_EFFECT ,$32,STEEL, 95,35 ; Metal Claw + move COMET_PUNCH ,NO_ADDITIONAL_EFFECT ,$28,STEEL, 100,30 ; Bullet Punch + move AURORA_BEAM ,SPECIAL_DOWN_SIDE_EFFECT ,$50,STEEL, 100,10 ; Flash Cannon + move CUT ,DEFENSE_DOWN_SIDE_EFFECT ,$64,STEEL, 75,15 ; Iron Tail + move STRENGTH ,NO_ADDITIONAL_EFFECT ,$5A,STEEL, 95,10 ; Meteor Mash + move BITE ,DEFENSE_DOWN_SIDE_EFFECT ,$50,DARK, 100,15 ; Crunch + move PSYCHIC ,FLINCH_SIDE_EFFECT1 ,$50,DARK, 100,15 ; Dark Pulse + move TACKLE ,SWIFT_EFFECT ,$3C,DARK, 100,20 ; Feint Attack + move CUT ,NO_ADDITIONAL_EFFECT ,$46,DARK, 100,15 ; Night Slash + move SEISMIC_TOSS ,SPECIAL_DOWN_SIDE_EFFECT ,$5F,FAIRY, 100,15 ; Moonblast + move LOVELY_KISS ,DRAIN_HP_EFFECT ,$32,FAIRY, 100,10 ; Draining Kiss + move SCREECH ,SWIFT_EFFECT ,$28,FAIRY, 100,15 ; Disarming Voice + move FLASH ,NO_ADDITIONAL_EFFECT ,$50,FAIRY, 100,10 ; Dazzling Gleam + move SEISMIC_TOSS ,SPECIAL_DOWN_SIDE_EFFECT ,$82,DRAGON, 90,5 ; Draco Meteor + move FLAMETHROWER ,PARALYZE_SIDE_EFFECT1 ,$3C,DRAGON, 100,20 ; Dragonbreath + move SLASH ,NO_ADDITIONAL_EFFECT ,$50,DRAGON, 100,15 ; Dragon Claw + move AURORA_BEAM ,NO_ADDITIONAL_EFFECT ,$55,DRAGON, 100,10 ; Dragon Pulse + move WHIRLWIND ,FLINCH_SIDE_EFFECT1 ,$28,DRAGON, 100,20 ; Twister + move RAGE ,TRAPPING_EFFECT ,$78,DRAGON, 100,10 ; Outrage + move SLASH ,NO_ADDITIONAL_EFFECT ,$46,GHOST, 100,15 ; Shadow Claw + move WING_ATTACK ,NO_ADDITIONAL_EFFECT ,$46,STEEL, 90,25 ; Steel Wing + move BARRIER ,DEFENSE_UP2_EFFECT ,$00,STEEL, 100,15 ; Iron Defense + move CUT ,FLINCH_SIDE_EFFECT2 ,$4B,FLYING, 95,15 ; Air Slash + move BITE ,FIRE_FANG_EFFECT ,$41,FIRE, 95,15 ; Fire Fang + move EMBER ,RECOIL_EFFECT ,$78,FIRE, 100,14 ; Flare Blitz + move FIRE_BLAST ,HYPER_BEAM_EFFECT ,$96,FIRE, 90,5 ; Blast Burn + move BITE ,ICE_FANG_EFFECT ,$41,ICE, 95,15 ; Ice Fang + move BITE ,THUNDER_FANG_EFFECT ,$41,ELECTRIC, 95,15 ; Thunder Fang + move BUBBLEBEAM ,CONFUSION_SIDE_EFFECT ,$3C,WATER, 100,20 ; Water Pulse + move SURF ,NO_ADDITIONAL_EFFECT ,$5A,WATER, 100,10 ; Aqua Tail + move AURORA_BEAM ,HYPER_BEAM_EFFECT ,$96,WATER, 90,5 ; Hydro Cannon + move VINE_WHIP ,HYPER_BEAM_EFFECT ,$96,GRASS, 90,5 ; Frenzy Plant + move MEGA_PUNCH ,NO_ADDITIONAL_EFFECT ,$50,DARK, 100,5 ; Sucker Punch + move BARRAGE ,SPECIAL_DOWN_SIDE_EFFECT ,$50,GHOST, 100,15 ; Shadow Ball + move EMBER ,BURN_SIDE_EFFECT1 ,$3C,FIRE, 100,25 ; Flame Wheel + move FOCUS_ENERGY ,HEAL_EFFECT ,$00,FAIRY, 100,20 ; Moonlight + move PSYCHIC_M ,NO_ADDITIONAL_EFFECT ,$41,GHOST, 100,10 ; Hex + move MEGA_PUNCH ,SWIFT_EFFECT ,$3C,GHOST, 100,20 ; Shadow Punch + move WING_ATTACK ,SWIFT_EFFECT ,$3C,FLYING, 100,20 ; Aerial Ace + move QUICK_ATTACK ,NO_ADDITIONAL_EFFECT ,$6E,FLYING, 100,15 ; Acrobatics + move CUT ,NO_ADDITIONAL_EFFECT ,$3C,FLYING, 100,25 ; Air Cutter + move GUST ,SPEED_DOWN_SIDE_EFFECT ,$37,ICE, 95,15 ; Icy Wind + move BLIZZARD ,NO_ADDITIONAL_EFFECT ,$28,ICE, 100,30 ; Ice Shard + move BLIZZARD ,OHKO_EFFECT ,$01,ICE, 30,5 ; Sheer Cold + move THUNDER ,NO_ADDITIONAL_EFFECT ,$50,ELECTRIC,100,10 ; Electro Ball + move TACKLE ,NUZZLE_EFFECT ,$14,ELECTRIC,100,20 ; Nuzzle + move THUNDERBOLT ,PARALYZE_SIDE_EFFECT1 ,$50,ELECTRIC,100,15 ; Discharge + move QUICK_ATTACK ,VOLT_TACKLE_EFFECT ,$78,ELECTRIC,100,15 ; Volt Tackle + move SPLASH ,ACCURACY_DOWN1_EFFECT ,$5A,WATER, 85,10 ; Muddy Water + move GUST ,TRAPPING_EFFECT ,$23,WATER, 85,15 ; Whirlpool + move MEGA_DRAIN ,DRAIN_HP_EFFECT ,$4B,GRASS, 100,10 ; Giga Drain + move PETAL_DANCE ,NO_ADDITIONAL_EFFECT ,$5A,GRASS, 100,15 ; Petal Blizzard + move CUT ,NO_ADDITIONAL_EFFECT ,$5A,GRASS, 100,15 ; Leaf Blade + move ROCK_THROW ,RECOIL_EFFECT ,$78,GRASS, 100,15 ; Wood Hammer + move COMET_PUNCH ,POISON_SIDE_EFFECT2 ,$50,POISON, 100,20 ; Poison Jab + move SLUDGE ,POISON_SIDE_EFFECT2 ,$78,POISON, 85,5 ; Gunk Shot + move BITE ,POISON_FANG_EFFECT ,$32,POISON, 100,15 ; Poison Fang + move SURF ,POISON_SIDE_EFFECT1 ,$5F,POISON, 100,10 ; Sludge Wave + move MIST ,NO_ADDITIONAL_EFFECT ,$3C,BUG, 100,5 ; Silver Wind + move SUPERSONIC ,SPECIAL_DOWN_SIDE_EFFECT ,$5A,BUG, 100,10 ; Bug Buzz + move HORN_ATTACK ,NO_ADDITIONAL_EFFECT ,$78,BUG, 85,10 ; Megahorn + move CUT ,NO_ADDITIONAL_EFFECT ,$50,BUG, 100,15 ; X-Scissor + move AURORA_BEAM ,CONFUSION_SIDE_EFFECT ,$4B,BUG, 100,15 ; Signal Beam + move EARTHQUAKE ,SPECIAL_DOWN_SIDE_EFFECT ,$5A,GROUND, 100,10 ; Earth Power + move SAND_ATTACK ,ACCURACY_DOWN1_EFFECT ,$14,GROUND, 100,10 ; Mud-Slap + move FISSURE ,ACCURACY_DOWN1_EFFECT ,$41,GROUND, 85,10 ; Mud Bomb + move CONFUSION ,FLINCH_SIDE_EFFECT1 ,$50,PSYCHIC, 100,20 ; Extrasensory + move HEADBUTT ,FLINCH_SIDE_EFFECT2 ,$50,PSYCHIC, 100,15 ; Zen Heamoveutt + move CUT ,NO_ADDITIONAL_EFFECT ,$46,PSYCHIC, 100,20 ; Psycho Cut + move SING ,NO_ADDITIONAL_EFFECT ,$5A,NORMAL, 100,10 ; Hyper Voice + move QUICK_ATTACK ,NO_ADDITIONAL_EFFECT ,$50,NORMAL, 100,5 ; Extremespeed + move SLAM ,HYPER_BEAM_EFFECT ,$96,NORMAL, 90,5 ; Giga Impact + move KINESIS ,NO_ADDITIONAL_EFFECT ,$50,ROCK, 100,20 ; Power Gem + move BARRAGE ,TWO_TO_FIVE_ATTACKS_EFFECT,$19,ROCK, 95,10 ; Rock Blast + move CONVERSION ,SPEED_UP2_EFFECT ,$00,ROCK, 100,20 ; Rock Polish + move ROCK_SLIDE ,SPEED_DOWN_SIDE_EFFECT ,$3C,ROCK, 95,15 ; Rock Tomb + move MEGA_PUNCH ,CONFUSION_SIDE_EFFECT ,$64,FIGHTING, 50,5 ; Dynamicpunch + move COUNTER ,NO_ADDITIONAL_EFFECT ,$3C,FIGHTING, 90,10 ; Circle Throw + move KARATE_CHOP ,NO_ADDITIONAL_EFFECT ,$64,FIGHTING, 85,5 ; Cross Chop + move MEGA_KICK ,SPEED_DOWN_SIDE_EFFECT ,$41,FIGHTING,100,20 ; Low Sweep + move WHIRLWIND ,CONFUSION_SIDE_EFFECT ,$6E,FLYING, 85,10 ; Hurricane + move LEER ,ATTACK_DOWN1_EFFECT ,$00,FAIRY, 100,30 ; Baby Doll Eyes + move BONEMERANG ,TWO_TO_FIVE_ATTACKS_EFFECT,$19,GROUND, 90,10 ; Bone Rush + move AURORA_BEAM ,NO_ADDITIONAL_EFFECT ,$64,FLYING, 100,5 ; Aeroblast diff --git a/data/prize_mon_levels.asm b/data/prize_mon_levels.asm index 6b10eb2f32..1437649c58 100755 --- a/data/prize_mon_levels.asm +++ b/data/prize_mon_levels.asm @@ -1,5 +1,5 @@ PrizeMonLevelDictionary: ; 5298a (14:698a) -IF _RED +IF DEF(_RED) db ABRA,9 db CLEFAIRY,8 db NIDORINA,17 @@ -8,7 +8,7 @@ IF _RED db SCYTHER,25 db PORYGON,26 ENDC -IF _BLUE +IF DEF(_BLUE) db ABRA,6 db CLEFAIRY,12 db NIDORINO,17 diff --git a/data/prizes.asm b/data/prizes.asm index 1fab54fce8..3d4102b6c9 100755 --- a/data/prizes.asm +++ b/data/prizes.asm @@ -14,46 +14,48 @@ NoThanksText: ; 5284f (14:684f) PrizeMenuMon1Entries: ; 52859 (14:6859) db ABRA db CLEFAIRY -IF _RED +IF DEF(_RED) db NIDORINA ENDC -IF _BLUE +IF DEF(_BLUE) db NIDORINO ENDC db "@" + PrizeMenuMon1Cost: ; 5285d (14:685d) -IF _RED - db $01,$80 - db $05,$00 +IF DEF(_RED) + coins 180 + coins 500 ENDC -IF _BLUE - db $01,$20 - db $07,$50 +IF DEF(_BLUE) + coins 120 + coins 750 ENDC - db $12,$00 + coins 1200 db "@" PrizeMenuMon2Entries: ; 52864 (14:6864) -IF _RED +IF DEF(_RED) db DRATINI db SCYTHER ENDC -IF _BLUE +IF DEF(_BLUE) db PINSIR db DRATINI ENDC db PORYGON db "@" + PrizeMenuMon2Cost: ; 52868 (14:6868) -IF _RED - db $28,$00 - db $55,$00 - db $99,$99 +IF DEF(_RED) + coins 2800 + coins 5500 + coins 9999 ENDC -IF _BLUE - db $25,$00 - db $46,$00 - db $65,$00 +IF DEF(_BLUE) + coins 2500 + coins 4600 + coins 6500 ENDC db "@" @@ -62,8 +64,9 @@ PrizeMenuTMsEntries: ; 5286f (14:686f) db TM_15 db TM_50 db "@" + PrizeMenuTMsCost: ; 52873 (14:6873) - db $33,$00 ; 3300 Coins - db $55,$00 ; 5500 Coins - db $77,$00 ; 7700 Coins + coins 3300 + coins 5500 + coins 7700 db "@" diff --git a/data/sgb_border.asm b/data/sgb_border.asm index 5a0bbb2dc4..e1da84acf3 100755 --- a/data/sgb_border.asm +++ b/data/sgb_border.asm @@ -1,20 +1,20 @@ BorderPalettes: ; 72788 (1c:6788) -IF _RED +IF DEF(_RED) INCBIN "gfx/red/sgbborder.map" ENDC -IF _BLUE +IF DEF(_BLUE) INCBIN "gfx/blue/sgbborder.map" ENDC ds $100 -IF _RED +IF DEF(_RED) RGB 30,29,29 ; PAL_SGB1 RGB 25,22,25 RGB 25,17,21 RGB 24,14,12 ENDC -IF _BLUE +IF DEF(_BLUE) RGB 0,0,0 ; PAL_SGB1 (the first color is not defined, but if used, turns up as 30,29,29... o_O) RGB 10,17,26 RGB 5,9,20 @@ -23,13 +23,13 @@ ENDC ds $18 -IF _RED +IF DEF(_RED) RGB 30,29,29 ; PAL_SGB2 RGB 22,31,16 RGB 27,20,6 RGB 15,15,15 ENDC -IF _BLUE +IF DEF(_BLUE) RGB 30,29,29 ; PAL_SGB2 RGB 27,11,6 RGB 5,9,20 @@ -38,13 +38,13 @@ ENDC ds $18 -IF _RED +IF DEF(_RED) RGB 30,29,29 ; PAL_SGB3 RGB 31,31,17 RGB 18,21,29 RGB 15,15,15 ENDC -IF _BLUE +IF DEF(_BLUE) RGB 30,29,29 ; PAL_SGB3 RGB 12,15,11 RGB 5,9,20 @@ -54,9 +54,9 @@ ENDC ds $18 SGBBorderGraphics: ; 72fe8 (1c:6fe8) -IF _RED +IF DEF(_RED) INCBIN "gfx/red/sgbborder.2bpp" ENDC -IF _BLUE +IF DEF(_BLUE) INCBIN "gfx/blue/sgbborder.2bpp" ENDC diff --git a/data/special_warps.asm b/data/special_warps.asm index 418b57f223..480bac89e1 100755 --- a/data/special_warps.asm +++ b/data/special_warps.asm @@ -1,3 +1,6 @@ +; Format: (size 2 bytes) +; 00: target map ID +; 01: which dungeon warp in the source map was used DungeonWarpList: ; 63bf (1:63bf) db SEAFOAM_ISLANDS_2,$01 db SEAFOAM_ISLANDS_2,$02 diff --git a/data/super_palettes.asm b/data/super_palettes.asm index a29fe6f47c..e55c370b73 100755 --- a/data/super_palettes.asm +++ b/data/super_palettes.asm @@ -52,13 +52,13 @@ SuperPalettes: ; 72660 (1c:6660) RGB 20,26,31 RGB 17,23,10 RGB 3,2,2 -IF _RED +IF DEF(_RED) RGB 31,29,31 ; PAL_LOGO1 RGB 30,30,17 RGB 17,23,10 RGB 21,0,4 ENDC -IF _BLUE +IF DEF(_BLUE) RGB 31,29,31 ; PAL_LOGO1 RGB 30,30,17 RGB 21,0,4 @@ -118,28 +118,28 @@ ENDC RGB 3,2,2 RGB 31,29,31 ; PAL_SLOTS2 RGB 31,31,17 -IF _RED +IF DEF(_RED) RGB 25,17,21 ENDC -IF _BLUE +IF DEF(_BLUE) RGB 16,19,29 ENDC RGB 3,2,2 RGB 31,29,31 ; PAL_SLOTS3 RGB 22,31,16 -IF _RED +IF DEF(_RED) RGB 25,17,21 ENDC -IF _BLUE +IF DEF(_BLUE) RGB 16,19,29 ENDC RGB 3,2,2 RGB 31,29,31 ; PAL_SLOTS4 -IF _RED +IF DEF(_RED) RGB 16,19,29 RGB 25,17,21 ENDC -IF _BLUE +IF DEF(_BLUE) RGB 25,17,21 RGB 16,19,29 ENDC diff --git a/data/super_rod.asm b/data/super_rod.asm index ead970d836..2b0646fcf8 100755 --- a/data/super_rod.asm +++ b/data/super_rod.asm @@ -25,16 +25,15 @@ SuperRodData: ; e919 (3:6919) dbw ROUTE_25, FishingGroup3 dbw CERULEAN_GYM, FishingGroup3 dbw VERMILION_DOCK, FishingGroup4 -;XXX syntax errors on the rest? - dbw $A1, FishingGroup8 ; SEAFOAM_ISLANDS_4 - dbw $A2, FishingGroup8 ; SEAFOAM_ISLANDS_5 + dbw SEAFOAM_ISLANDS_4, FishingGroup8 + dbw SEAFOAM_ISLANDS_5, FishingGroup8 dbw SAFARI_ZONE_EAST, FishingGroup6 - dbw $DA, FishingGroup6 ; SAFARI_ZONE_NORTH + dbw SAFARI_ZONE_NORTH, FishingGroup6 dbw SAFARI_ZONE_WEST, FishingGroup6 - dbw $DC, FishingGroup6 ; SAFARI_ZONE_CENTER - dbw $E2, FishingGroup9 ; UNKNOWN_DUNGEON_2 - dbw $E3, FishingGroup9 ; UNKNOWN_DUNGEON_3 - dbw $E4, FishingGroup9 ; UNKNOWN_DUNGEON_1 + dbw SAFARI_ZONE_CENTER, FishingGroup6 + dbw UNKNOWN_DUNGEON_2, FishingGroup9 + dbw UNKNOWN_DUNGEON_3, FishingGroup9 + dbw UNKNOWN_DUNGEON_1, FishingGroup9 db $FF ; fishing groups diff --git a/data/tileset_headers.asm b/data/tileset_headers.asm index 84cfaffdec..3e2e68bb34 100755 --- a/data/tileset_headers.asm +++ b/data/tileset_headers.asm @@ -23,3 +23,6 @@ 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 17691e4604..b8ea5f613b 100755 --- a/data/title_mons.asm +++ b/data/title_mons.asm @@ -2,7 +2,7 @@ TitleMons: ; 4588 (1:4588) ; mons on the title screen are randomly chosen from here ; this file is now completely unused in Red++ ; because all Pokémon can appear on the title screen -IF _RED +IF DEF(_RED) db CHARMANDER db SQUIRTLE db BULBASAUR @@ -20,7 +20,7 @@ IF _RED db PONYTA db MAGIKARP ENDC -IF _GREEN +IF DEF(_GREEN) db BULBASAUR db CHARMANDER db SQUIRTLE @@ -38,7 +38,7 @@ IF _GREEN db PONYTA db MAGIKARP ENDC -IF _BLUE +IF DEF(_BLUE) db SQUIRTLE db CHARMANDER db BULBASAUR diff --git a/data/tm_prices.asm b/data/tm_prices.asm index 4fce3f6080..89fdb8e929 100755 --- a/data/tm_prices.asm +++ b/data/tm_prices.asm @@ -1,7 +1,27 @@ TechnicalMachinePrices: ; 7bfa7 (1e:7fa7) ; In thousands (nybbles). - db $32, $21, $34, $24, $34 - db $21, $45, $55, $32, $32 - db $55, $52, $54, $52, $41 - db $21, $12, $42, $25, $24 - db $22, $52, $24, $34, $42 + dn 3, 2 ; TM_01, TM_02 + dn 2, 1 ; TM_03, TM_04 + dn 3, 4 ; TM_05, TM_06 + dn 2, 4 ; TM_07, TM_08 + dn 3, 4 ; TM_09, TM_10 + dn 2, 1 ; TM_11, TM_12 + dn 4, 5 ; TM_13, TM_14 + dn 5, 5 ; TM_15, TM_16 + dn 3, 2 ; TM_17, TM_18 + dn 3, 2 ; TM_19, TM_20 + dn 5, 5 ; TM_21, TM_22 + dn 5, 2 ; TM_23, TM_24 + dn 5, 4 ; TM_25, TM_26 + dn 5, 2 ; TM_27, TM_28 + dn 4, 1 ; TM_29, TM_30 + dn 2, 1 ; TM_31, TM_32 + dn 1, 2 ; TM_33, TM_34 + dn 4, 2 ; TM_35, TM_36 + dn 2, 5 ; TM_37, TM_38 + dn 2, 4 ; TM_39, TM_40 + dn 2, 2 ; TM_41, TM_42 + dn 5, 2 ; TM_43, TM_44 + dn 2, 4 ; TM_45, TM_46 + dn 3, 4 ; TM_47, TM_48 + dn 4, 2 ; TM_49, TM_50 diff --git a/data/trades.asm b/data/trades.asm index 2593f01cf9..b761fecf31 100755 --- a/data/trades.asm +++ b/data/trades.asm @@ -1,5 +1,17 @@ TradeMons: ; 71b7b (1c:5b7b) ; 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@" @@ -10,3 +22,4 @@ TradeMons: ; 71b7b (1c:5b7b) db RAICHU, ELECTRODE, 1,"DORIS@@@@@@" db VENONAT, TANGELA, 2,"CRINKLES@@@" db NIDORAN_M, NIDORAN_F, 2,"SPOT@@@@@@@" +ENDC diff --git a/data/trainer_moves.asm b/data/trainer_moves.asm index 61a3d6500c..432f0fed30 100755 --- a/data/trainer_moves.asm +++ b/data/trainer_moves.asm @@ -1,3 +1,4 @@ +IF !DEF(YELLOW) LoneMoves: ; 39d22 (e:5d22) ; these are used for gym leaders. ; this is not automatic! you have to write the number you want to W_LONEATTACKNO @@ -31,12 +32,14 @@ TeamMoves: ; 39d32 (e:5d32) db LANCE,BARRIER db $FF -if _YELLOW -; different format from above. +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 diff --git a/data/trainer_parties.asm b/data/trainer_parties.asm index 6b0c9a584a..28381f62d3 100755 --- a/data/trainer_parties.asm +++ b/data/trainer_parties.asm @@ -33,11 +33,11 @@ YoungsterData: ; 39d99 (e:5d99) db 17,RATTATA,RATTATA,RATICATE,0 db 18,NIDORAN_M,NIDORINO,0 db 17,SPEAROW,RATTATA,RATTATA,SPEAROW,0 -if _YELLOW +if DEF(_YELLOW) db 24,SANDSHREW,0 endc BugCatcherData: ; 39dce (e:5dce) -if _YELLOW +if DEF(_YELLOW) db 7,CATERPIE,CATERPIE,0 db 6,METAPOD,CATERPIE,METAPOD,0 db 10,CATERPIE,0 @@ -57,7 +57,7 @@ endc db 18,METAPOD,CATERPIE,VENONAT,0 db 19,BEEDRILL,BEEDRILL,0 db 20,CATERPIE,WEEDLE,VENONAT,0 -if _YELLOW +if DEF(_YELLOW) db 8,CATERPIE,METAPOD,0 endc LassData: ; 39e0c (e:5e0c) @@ -72,14 +72,14 @@ LassData: ; 39e0c (e:5e0c) db 15,NIDORAN_M,NIDORAN_F,0 db 13,ODDISH,PIDGEY,ODDISH,0 db 18,PIDGEY,NIDORAN_F,0 -if _YELLOW +if DEF(_YELLOW) db 20,JIGGLYPUFF,0 else db 18,RATTATA,PIKACHU,0 endc db 23,NIDORAN_F,NIDORINA,0 db 24,MEOWTH,MEOWTH,MEOWTH,0 -if _YELLOW +if DEF(_YELLOW) db 19,PIDGEY,RATTATA,NIDORAN_F,MEOWTH,NIDORAN_M,0 else db 19,PIDGEY,RATTATA,NIDORAN_M,MEOWTH,PIKACHU,0 @@ -87,7 +87,7 @@ endc db 22,CLEFAIRY,CLEFAIRY,0 db 23,BELLSPROUT,WEEPINBELL,0 db 23,ODDISH,GLOOM,0 -if _YELLOW +if DEF(_YELLOW) db 6,NIDORAN_F,NIDORAN_M,0 endc SailorData: ; 39e58 (e:5e58) @@ -98,13 +98,13 @@ SailorData: ; 39e58 (e:5e58) db 18,TENTACOOL,STARYU,0 db 17,HORSEA,HORSEA,HORSEA,0 db 20,MACHOP,0 -if _YELLOW +if DEF(_YELLOW) db 24,MAGNEMITE,0 else db 21,PIKACHU,PIKACHU,0 endc JrTrainerMData: ; 39e78 (e:5e78) -if _YELLOW +if DEF(_YELLOW) db 9,DIGLETT,SANDSHREW,0 else db 11,DIGLETT,SANDSHREW,0 @@ -117,12 +117,12 @@ endc db 21,GROWLITHE,CHARMANDER,0 db 19,RATTATA,DIGLETT,EKANS,SANDSHREW,0 db 29,NIDORAN_M,NIDORINO,0 -if _YELLOW +if DEF(_YELLOW) db 16,WEEPINBELL,0 endc JrTrainerFData: ; 39e9d (e:5e9d) db 19,GOLDEEN,0 -if _YELLOW +if DEF(_YELLOW) db 16,ODDISH,BELLSPROUT,0 else db 16,RATTATA,PIKACHU,0 @@ -131,7 +131,7 @@ endc db 22,BULBASAUR,0 db 18,ODDISH,BELLSPROUT,ODDISH,BELLSPROUT,0 db 23,MEOWTH,0 -if _YELLOW +if DEF(_YELLOW) db 20,JIGGLYPUFF,CLEFAIRY,0 else db 20,PIKACHU,CLEFAIRY,0 @@ -140,7 +140,7 @@ endc db 21,JIGGLYPUFF,PIDGEY,MEOWTH,0 db 22,ODDISH,BULBASAUR,0 db 24,BULBASAUR,IVYSAUR,0 -if _YELLOW +if DEF(_YELLOW) db 24,PIDGEY,MEOWTH,RATTATA,PIDGEY,MEOWTH,0 else db 24,PIDGEY,MEOWTH,RATTATA,PIKACHU,MEOWTH,0 @@ -153,7 +153,7 @@ endc db 20,MEOWTH,ODDISH,PIDGEY,0 db 19,PIDGEY,RATTATA,RATTATA,BELLSPROUT,0 db 28,GLOOM,ODDISH,ODDISH,0 -if _YELLOW +if DEF(_YELLOW) db 29,PIDGEY,PIDGEOTTO,0 else db 29,PIKACHU,RAICHU,0 @@ -161,7 +161,7 @@ endc db 33,CLEFAIRY,0 db 29,BELLSPROUT,ODDISH,TANGELA,0 db 30,TENTACOOL,HORSEA,SEEL,0 -if _YELLOW +if DEF(_YELLOW) db 20,CUBONE,0 endc PokemaniacData: ; 39f09 (e:5f09) @@ -305,7 +305,7 @@ PsychicData: ; 3a115 (e:6115) db 33,SLOWPOKE,SLOWPOKE,SLOWBRO,0 db 38,SLOWBRO,0 RockerData: ; 3a127 (e:6127) -if _YELLOW +if DEF(_YELLOW) db 20,VOLTORB,VOLTORB,VOLTORB,0 else db 20,VOLTORB,MAGNEMITE,VOLTORB,0 @@ -356,7 +356,7 @@ BlackbeltData: ; 3a1be (e:61be) db 38,MACHOKE,MACHOP,MACHOKE,0 db 43,MACHOKE,MACHOP,MACHOKE,0 Green1Data: ; 3a1e4 (e:61e4) -if _YELLOW +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 @@ -391,7 +391,7 @@ ScientistData: ; 3a241 (e:6241) db 33,MAGNEMITE,MAGNETON,VOLTORB,0 db 34,MAGNEMITE,ELECTRODE,0 GiovanniData: ; 3a27e (e:627e) -if _YELLOW +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 @@ -443,7 +443,7 @@ RocketData: ; 3a29c (e:629c) db 33,MACHOKE,0 db 25,RATTATA,RATTATA,ZUBAT,RATTATA,EKANS,0 db 32,CUBONE,DROWZEE,MAROWAK,0 -if _YELLOW +if DEF(_YELLOW) JessieJamesData: db 14,EKANS,MEOWTH,KOFFING,0 db 25,KOFFING,MEOWTH,EKANS,0 @@ -477,7 +477,7 @@ CooltrainerFData: ; 3a385 (e:6385) BrunoData: ; 3a3a9 (e:63a9) db $FF,53,ONIX,55,HITMONCHAN,55,HITMONLEE,56,ONIX,58,MACHAMP,0 BrockData: ; 3a3b5 (e:63b5) -if _YELLOW +if DEF(_YELLOW) db $FF,10,GEODUDE,12,ONIX,0 else db $FF,12,GEODUDE,14,ONIX,0 @@ -485,31 +485,31 @@ endc MistyData: ; 3a3bb (e:63bb) db $FF,18,STARYU,21,STARMIE,0 LtSurgeData: ; 3a3c1 (e:63c1) -if _YELLOW +if DEF(_YELLOW) db $FF,28,RAICHU,0 else db $FF,21,VOLTORB,18,PIKACHU,24,RAICHU,0 endc ErikaData: ; 3a3c9 (e:63c9) -if _YELLOW +if DEF(_YELLOW) db $FF,30,TANGELA,32,WEEPINBELL,32,GLOOM,0 else db $FF,29,VICTREEBEL,24,TANGELA,29,VILEPLUME,0 endc KogaData: ; 3a3d1 (e:63d1) -if _YELLOW +if DEF(_YELLOW) db $FF,44,VENONAT,46,VENONAT,48,VENONAT,50,VENOMOTH,0 else db $FF,37,KOFFING,39,MUK,37,KOFFING,43,WEEZING,0 endc BlaineData: ; 3a3db (e:63db) -if _YELLOW +if DEF(_YELLOW) db $FF,48,NINETALES,50,RAPIDASH,54,ARCANINE,0 else db $FF,42,GROWLITHE,40,PONYTA,42,RAPIDASH,47,ARCANINE,0 endc SabrinaData: ; 3a3e5 (e:63e5) -if _YELLOW +if DEF(_YELLOW) db $FF,50,ABRA,50,KADABRA,50,ALAKAZAM,0 else db $FF,38,KADABRA,37,MR_MIME,38,VENOMOTH,43,ALAKAZAM,0 @@ -517,7 +517,7 @@ endc GentlemanData: ; 3a3ef (e:63ef) db 18,GROWLITHE,GROWLITHE,0 db 19,NIDORAN_M,NIDORAN_F,0 -if _YELLOW +if DEF(_YELLOW) db 22,VOLTORB,MAGNEMITE,0 else db 23,PIKACHU,0 @@ -525,7 +525,7 @@ endc db 48,PRIMEAPE,0 db 17,GROWLITHE,PONYTA,0 Green2Data: ; 3a401 (e:6401) -if _YELLOW +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 @@ -551,7 +551,7 @@ else db $FF,47,PIDGEOT,45,RHYHORN,45,EXEGGCUTE,47,GYARADOS,50,ALAKAZAM,53,CHARIZARD,0 endc Green3Data: ; 3a491 (e:6491) -if _YELLOW +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 diff --git a/data/wildPokemon/mansion1.asm b/data/wildPokemon/mansion1.asm index 825478961f..e96b9d4217 100755 --- a/data/wildPokemon/mansion1.asm +++ b/data/wildPokemon/mansion1.asm @@ -1,6 +1,6 @@ MansionMons1: db $0A - IF _RED + IF DEF(_RED) db 32,KOFFING db 30,KOFFING db 34,PONYTA @@ -13,7 +13,7 @@ MansionMons1: db 39,MUK ENDC - IF _GREEN || _BLUE + IF DEF(_GREEN) || DEF(_BLUE) db 32,GRIMER db 30,GRIMER db 34,PONYTA @@ -26,7 +26,7 @@ MansionMons1: db 39,WEEZING ENDC - IF _YELLOW + IF DEF(_YELLOW) db 34,RATTATA db 34,RATICATE db 23,GRIMER diff --git a/data/wildPokemon/mansion2.asm b/data/wildPokemon/mansion2.asm index 8ebbb41431..77cce4085c 100755 --- a/data/wildPokemon/mansion2.asm +++ b/data/wildPokemon/mansion2.asm @@ -1,6 +1,6 @@ MansionMons2: db $0A - IF _RED + IF DEF(_RED) db 32,GROWLITHE db 34,KOFFING db 34,KOFFING @@ -13,7 +13,7 @@ MansionMons2: db 37,MUK ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 32,VULPIX db 34,GRIMER db 34,GRIMER @@ -26,7 +26,7 @@ MansionMons2: db 37,WEEZING ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 32,GROWLITHE db 34,GRIMER db 34,GRIMER @@ -39,7 +39,7 @@ MansionMons2: db 37,WEEZING ENDC - IF _YELLOW + IF DEF(_YELLOW) db 37,RATTATA db 37,RATICATE db 26,GRIMER diff --git a/data/wildPokemon/mansion3.asm b/data/wildPokemon/mansion3.asm index a1b126acbd..eceb0296e4 100755 --- a/data/wildPokemon/mansion3.asm +++ b/data/wildPokemon/mansion3.asm @@ -1,6 +1,6 @@ MansionMons3: db $0A - IF _RED + IF DEF(_RED) db 31,KOFFING db 33,GROWLITHE db 35,KOFFING @@ -13,7 +13,7 @@ MansionMons3: db 42,MUK ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 31,GRIMER db 33,VULPIX db 35,GRIMER @@ -26,7 +26,7 @@ MansionMons3: db 42,WEEZING ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 31,GRIMER db 33,GROWLITHE db 35,GRIMER @@ -39,7 +39,7 @@ MansionMons3: db 42,WEEZING ENDC - IF _YELLOW + IF DEF(_YELLOW) db 40,RATTATA db 40,RATICATE db 32,GRIMER diff --git a/data/wildPokemon/mansionb1.asm b/data/wildPokemon/mansionb1.asm index 23831eeb4f..9dcd989314 100755 --- a/data/wildPokemon/mansionb1.asm +++ b/data/wildPokemon/mansionb1.asm @@ -1,6 +1,6 @@ MansionMonsB1: db $0A - IF _RED + IF DEF(_RED) db 33,KOFFING db 31,KOFFING db 35,GROWLITHE @@ -13,7 +13,7 @@ MansionMonsB1: db 42,MUK ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 33,GRIMER db 31,GRIMER db 35,VULPIX @@ -26,7 +26,7 @@ MansionMonsB1: db 42,WEEZING ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 33,GRIMER db 31,GRIMER db 35,GROWLITHE @@ -39,7 +39,7 @@ MansionMonsB1: db 42,WEEZING ENDC - IF _YELLOW + IF DEF(_YELLOW) db 35,GRIMER db 38,GRIMER db 37,RATICATE @@ -53,4 +53,3 @@ MansionMonsB1: ENDC db $00 - diff --git a/data/wildPokemon/mtmoon1.asm b/data/wildPokemon/mtmoon1.asm index 5ba1d030fa..a8018b82a9 100755 --- a/data/wildPokemon/mtmoon1.asm +++ b/data/wildPokemon/mtmoon1.asm @@ -1,28 +1,27 @@ MoonMons1: db $0A - IF !_YELLOW + IF DEF(_YELLOW) db 8,ZUBAT - db 7,ZUBAT db 9,ZUBAT - db 8,GEODUDE + db 10,GEODUDE db 6,ZUBAT + db 7,ZUBAT db 10,ZUBAT db 10,GEODUDE - db 8,PARAS db 11,ZUBAT - db 8,CLEFAIRY - ENDC - IF _YELLOW + db 12,SANDSHREW + db 11,CLEFAIRY + ELSE db 8,ZUBAT + db 7,ZUBAT db 9,ZUBAT - db 10,GEODUDE + db 8,GEODUDE db 6,ZUBAT - db 7,ZUBAT db 10,ZUBAT db 10,GEODUDE + db 8,PARAS db 11,ZUBAT - db 12,SANDSHREW - db 11,CLEFAIRY + db 8,CLEFAIRY ENDC db $00 diff --git a/data/wildPokemon/mtmoonb1.asm b/data/wildPokemon/mtmoonb1.asm index 0f3639c110..c78b8471a1 100755 --- a/data/wildPokemon/mtmoonb1.asm +++ b/data/wildPokemon/mtmoonb1.asm @@ -1,18 +1,6 @@ MoonMonsB1: db $0A - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 8,ZUBAT db 9,ZUBAT db 10,GEODUDE @@ -23,6 +11,17 @@ MoonMonsB1: 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 $00 diff --git a/data/wildPokemon/mtmoonb2.asm b/data/wildPokemon/mtmoonb2.asm index 34966cd848..0118a89844 100755 --- a/data/wildPokemon/mtmoonb2.asm +++ b/data/wildPokemon/mtmoonb2.asm @@ -1,18 +1,6 @@ MoonMonsB2: db $0A - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 10,ZUBAT db 11,GEODUDE db 13,PARAS @@ -23,6 +11,17 @@ MoonMonsB2: 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 $00 diff --git a/data/wildPokemon/pokemontower3.asm b/data/wildPokemon/pokemontower3.asm index e2b393986e..4e3a7c6275 100755 --- a/data/wildPokemon/pokemontower3.asm +++ b/data/wildPokemon/pokemontower3.asm @@ -1,29 +1,27 @@ TowerMons3: db $0A - IF !_YELLOW + 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 24,GASTLY - db 20,CUBONE - db 22,CUBONE + db 25,GASTLY + db 20,HAUNTER db 25,HAUNTER - ENDC - - IF _YELLOW + ELSE 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 24,GASTLY + db 20,CUBONE + db 22,CUBONE db 25,HAUNTER ENDC diff --git a/data/wildPokemon/pokemontower4.asm b/data/wildPokemon/pokemontower4.asm index 3f38af206c..e0de809fac 100755 --- a/data/wildPokemon/pokemontower4.asm +++ b/data/wildPokemon/pokemontower4.asm @@ -1,30 +1,28 @@ TowerMons4: db $0A - IF !_YELLOW + 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 - db 20,CUBONE - db 22,CUBONE - db 24,GASTLY - ENDC - - IF _YELLOW + ELSE 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 + db 20,CUBONE + db 22,CUBONE + db 24,GASTLY ENDC db $00 diff --git a/data/wildPokemon/pokemontower5.asm b/data/wildPokemon/pokemontower5.asm index 970984486a..9f97b98e67 100755 --- a/data/wildPokemon/pokemontower5.asm +++ b/data/wildPokemon/pokemontower5.asm @@ -1,20 +1,7 @@ TowerMons5: db $0A - IF !_YELLOW - 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 - - IF _YELLOW + IF DEF(_YELLOW) db 22,GASTLY db 23,GASTLY db 24,GASTLY @@ -25,6 +12,17 @@ TowerMons5: 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 $00 diff --git a/data/wildPokemon/pokemontower6.asm b/data/wildPokemon/pokemontower6.asm index abd2969a0d..b97e2ddd08 100755 --- a/data/wildPokemon/pokemontower6.asm +++ b/data/wildPokemon/pokemontower6.asm @@ -1,20 +1,7 @@ TowerMons6: db $0F - IF !_YELLOW - 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 - - IF _YELLOW + IF DEF(_YELLOW) db 22,GASTLY db 23,GASTLY db 24,GASTLY @@ -25,6 +12,17 @@ TowerMons6: 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 $00 diff --git a/data/wildPokemon/pokemontower7.asm b/data/wildPokemon/pokemontower7.asm index 2daf3a2d41..b0d945348a 100755 --- a/data/wildPokemon/pokemontower7.asm +++ b/data/wildPokemon/pokemontower7.asm @@ -1,21 +1,7 @@ TowerMons7: db $0F - IF !_YELLOW - 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 - - IF _YELLOW + IF DEF(_YELLOW) db 24,GASTLY db 25,GASTLY db 26,GASTLY @@ -26,6 +12,17 @@ TowerMons7: 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 $00 diff --git a/data/wildPokemon/powerplant.asm b/data/wildPokemon/powerplant.asm index a67ab2e975..f956fcf28c 100755 --- a/data/wildPokemon/powerplant.asm +++ b/data/wildPokemon/powerplant.asm @@ -1,7 +1,18 @@ PowerPlantMons: db $0A - IF !_YELLOW - + + 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 @@ -10,28 +21,14 @@ PowerPlantMons: db 23,VOLTORB db 32,MAGNETON db 35,MAGNETON - IF _RED + IF DEF(_RED) db 33,ELECTABUZZ db 36,ELECTABUZZ ENDC - IF _GREEN || _BLUE + IF DEF(_GREEN) || DEF(_BLUE) db 33,RAICHU db 36,RAICHU ENDC ENDC - IF _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 - ENDC - db $00 - diff --git a/data/wildPokemon/rocktunnel1.asm b/data/wildPokemon/rocktunnel1.asm index e89040432c..992a4e7349 100755 --- a/data/wildPokemon/rocktunnel1.asm +++ b/data/wildPokemon/rocktunnel1.asm @@ -1,16 +1,27 @@ TunnelMonsB1: db $0F - IF !_YELLOW + 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 _RED || _GREEN || (_BLUE && !_JAPAN) + IF DEF(_RED) || DEF(_GREEN) || (DEF(_BLUE) && !DEF(_JAPAN)) db 18,ZUBAT ENDC - IF (_BLUE && _JAPAN) + IF (DEF(_BLUE) && DEF(_JAPAN)) db 18,DITTO ENDC db 15,ZUBAT @@ -19,18 +30,5 @@ TunnelMonsB1: db 15,ONIX ENDC - IF _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 - ENDC - db $00 diff --git a/data/wildPokemon/rocktunnel2.asm b/data/wildPokemon/rocktunnel2.asm index f158453e44..0a47d98407 100755 --- a/data/wildPokemon/rocktunnel2.asm +++ b/data/wildPokemon/rocktunnel2.asm @@ -1,15 +1,27 @@ TunnelMonsB2: db $0F - IF !_YELLOW + + 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 _RED || _GREEN || (_BLUE && !_JAPAN) + IF DEF(_RED) || DEF(_GREEN) || (DEF(_BLUE) && !DEF(_JAPAN)) db 18,ZUBAT ENDC - IF (_BLUE && _JAPAN) + IF DEF(_BLUE) && DEF(_JAPAN) db 18,DITTO ENDC db 17,MACHOP @@ -18,18 +30,5 @@ TunnelMonsB2: db 18,GEODUDE ENDC - IF _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 - ENDC - db $00 diff --git a/data/wildPokemon/route1.asm b/data/wildPokemon/route1.asm index bbad3c9e37..8e5b6897c4 100755 --- a/data/wildPokemon/route1.asm +++ b/data/wildPokemon/route1.asm @@ -1,18 +1,6 @@ Route1Mons: db $19 - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 3,PIDGEY db 4,PIDGEY db 2,RATTATA @@ -23,6 +11,17 @@ Route1Mons: 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 $00 diff --git a/data/wildPokemon/route10.asm b/data/wildPokemon/route10.asm index 185e41fe11..7cfaf25cb5 100755 --- a/data/wildPokemon/route10.asm +++ b/data/wildPokemon/route10.asm @@ -1,7 +1,7 @@ Route10Mons: db $0F - IF _RED + IF DEF(_RED) db 16,VOLTORB db 16,SPEAROW db 14,VOLTORB @@ -14,7 +14,7 @@ Route10Mons: db 17,EKANS ENDC - IF !_RED + IF DEF(_BLUE) || DEF(_GREEN) db 16,VOLTORB db 16,SPEAROW db 14,VOLTORB @@ -27,7 +27,7 @@ Route10Mons: db 17,SANDSHREW ENDC - IF _YELLOW + IF DEF(_YELLOW) db 16,MAGNEMITE db 18,RATTATA db 18,MAGNEMITE diff --git a/data/wildPokemon/route11.asm b/data/wildPokemon/route11.asm index 6f724e80c0..66c52c204e 100755 --- a/data/wildPokemon/route11.asm +++ b/data/wildPokemon/route11.asm @@ -1,7 +1,7 @@ Route11Mons: db $0F - IF _RED + IF DEF(_RED) db 14,EKANS db 15,SPEAROW db 12,EKANS @@ -14,7 +14,7 @@ Route11Mons: db 15,DROWZEE ENDC - IF _GREEN || _BLUE + IF DEF(_GREEN) || DEF(_BLUE) db 14,SANDSHREW db 15,SPEAROW db 12,SANDSHREW @@ -27,7 +27,7 @@ Route11Mons: db 15,DROWZEE ENDC - IF _YELLOW + IF DEF(_YELLOW) db 16,PIDGEY db 15,RATTATA db 18,PIDGEY diff --git a/data/wildPokemon/route12.asm b/data/wildPokemon/route12.asm index b15a222394..7f5e47fe63 100755 --- a/data/wildPokemon/route12.asm +++ b/data/wildPokemon/route12.asm @@ -1,7 +1,7 @@ Route12Mons: db $0F - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) db 24,ODDISH db 25,PIDGEY db 23,PIDGEY @@ -15,7 +15,7 @@ Route12Mons: db $00 ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 24,BELLSPROUT db 25,PIDGEY db 23,PIDGEY @@ -29,7 +29,7 @@ Route12Mons: db $00 ENDC - IF _YELLOW + IF DEF(_YELLOW) db 25,ODDISH db 25,BELLSPROUT db 28,PIDGEY diff --git a/data/wildPokemon/route13.asm b/data/wildPokemon/route13.asm index 5293bf2168..1b694f3615 100755 --- a/data/wildPokemon/route13.asm +++ b/data/wildPokemon/route13.asm @@ -1,5 +1,5 @@ Route13Mons: - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) db $14 db 24,ODDISH db 25,PIDGEY @@ -14,7 +14,7 @@ Route13Mons: db $00 ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db $14 db 24,BELLSPROUT db 25,PIDGEY @@ -29,7 +29,7 @@ Route13Mons: db $00 ENDC - IF _YELLOW + IF DEF(_YELLOW) db $0F db 25,ODDISH db 25,BELLSPROUT diff --git a/data/wildPokemon/route14.asm b/data/wildPokemon/route14.asm index 76d9118f7a..999981af73 100755 --- a/data/wildPokemon/route14.asm +++ b/data/wildPokemon/route14.asm @@ -1,6 +1,6 @@ Route14Mons: db $0F - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) db 24,ODDISH db 26,PIDGEY db 23,DITTO @@ -13,7 +13,7 @@ Route14Mons: db 30,PIDGEOTTO ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 24,BELLSPROUT db 26,PIDGEY db 23,DITTO @@ -26,7 +26,7 @@ Route14Mons: db 30,PIDGEOTTO ENDC - IF _YELLOW + IF DEF(_YELLOW) db 26,ODDISH db 26,BELLSPROUT db 24,VENONAT diff --git a/data/wildPokemon/route15.asm b/data/wildPokemon/route15.asm index 4a0d3fc3a2..d924052a09 100755 --- a/data/wildPokemon/route15.asm +++ b/data/wildPokemon/route15.asm @@ -1,6 +1,6 @@ Route15Mons: db $0F - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) db 24,ODDISH db 26,DITTO db 23,PIDGEY @@ -13,7 +13,7 @@ Route15Mons: db 30,PIDGEOTTO ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 24,BELLSPROUT db 26,DITTO db 23,PIDGEY @@ -26,7 +26,7 @@ Route15Mons: db 30,PIDGEOTTO ENDC - IF _YELLOW + IF DEF(_YELLOW) db 26,ODDISH db 26,BELLSPROUT db 24,VENONAT diff --git a/data/wildPokemon/route16.asm b/data/wildPokemon/route16.asm index 344081649c..468e37778a 100755 --- a/data/wildPokemon/route16.asm +++ b/data/wildPokemon/route16.asm @@ -1,19 +1,6 @@ Route16Mons: db $19 - IF !_YELLOW - 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 - - IF _YELLOW + IF DEF(_YELLOW) db 22,SPEAROW db 22,DODUO db 23,RATTATA @@ -24,6 +11,17 @@ Route16Mons: 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 $00 diff --git a/data/wildPokemon/route17.asm b/data/wildPokemon/route17.asm index 75882ec5b5..36283a99e2 100755 --- a/data/wildPokemon/route17.asm +++ b/data/wildPokemon/route17.asm @@ -1,19 +1,7 @@ Route17Mons: db $19 - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 26,DODUO db 27,FEAROW db 27,DODUO @@ -24,6 +12,17 @@ Route17Mons: 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 $00 diff --git a/data/wildPokemon/route18.asm b/data/wildPokemon/route18.asm index 8820f0458f..e16fc8ace2 100755 --- a/data/wildPokemon/route18.asm +++ b/data/wildPokemon/route18.asm @@ -1,19 +1,7 @@ Route18Mons: db $19 - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 22,SPEAROW db 22,DODUO db 23,RATTATA @@ -24,6 +12,17 @@ Route18Mons: 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 $00 diff --git a/data/wildPokemon/route2.asm b/data/wildPokemon/route2.asm index 57d7f87fc0..8f9eb4e5c4 100755 --- a/data/wildPokemon/route2.asm +++ b/data/wildPokemon/route2.asm @@ -1,40 +1,39 @@ Route2Mons: db $19 - IF !_YELLOW + 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 _RED + if DEF(_RED) db 3,WEEDLE ENDC - if _BLUE + if DEF(_BLUE) db 3,CATERPIE ENDC db 2,RATTATA db 5,RATTATA - if _RED + if DEF(_RED) db 4,WEEDLE db 5,WEEDLE ENDC - if _BLUE + if DEF(_BLUE) db 4,CATERPIE db 5,CATERPIE ENDC ENDC - IF _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 - ENDC db $00 diff --git a/data/wildPokemon/route21.asm b/data/wildPokemon/route21.asm index a29753eb9a..7017081d34 100755 --- a/data/wildPokemon/route21.asm +++ b/data/wildPokemon/route21.asm @@ -1,19 +1,7 @@ Route21Mons: db $19 - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 15,PIDGEY db 13,RATTATA db 13,PIDGEY @@ -24,6 +12,17 @@ Route21Mons: 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 $05 diff --git a/data/wildPokemon/route22.asm b/data/wildPokemon/route22.asm index 36ff9a57e7..78c5631abc 100755 --- a/data/wildPokemon/route22.asm +++ b/data/wildPokemon/route22.asm @@ -1,6 +1,6 @@ Route22Mons: db $19 - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) 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 _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 3,RATTATA db 3,NIDORAN_F db 4,RATTATA @@ -24,7 +24,7 @@ Route22Mons: db 3,NIDORAN_M db 4,NIDORAN_M ENDC - IF _YELLOW + IF DEF(_YELLOW) db 2,NIDORAN_M db 2,NIDORAN_F db 3,MANKEY diff --git a/data/wildPokemon/route23.asm b/data/wildPokemon/route23.asm index cfdd8eff0c..1320868c81 100755 --- a/data/wildPokemon/route23.asm +++ b/data/wildPokemon/route23.asm @@ -1,10 +1,22 @@ Route23Mons: db $0A - IF !_YELLOW - IF _RED + + 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 !_RED + IF !DEF(_RED) db 26,SANDSHREW ENDC db 33,DITTO @@ -12,10 +24,10 @@ Route23Mons: db 38,FEAROW db 38,DITTO db 38,FEAROW - IF _RED + IF DEF(_RED) db 41,ARBOK ENDC - IF !_RED + IF !DEF(_RED) db 41,SANDSLASH ENDC db 43,DITTO @@ -23,18 +35,5 @@ Route23Mons: db 43,FEAROW ENDC - IF _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 - ENDC - db $00 diff --git a/data/wildPokemon/route24.asm b/data/wildPokemon/route24.asm index e4ff986aef..d586927f1d 100755 --- a/data/wildPokemon/route24.asm +++ b/data/wildPokemon/route24.asm @@ -1,7 +1,7 @@ Route24Mons: db $19 - IF _RED + IF DEF(_RED) db 7,WEEDLE db 8,KAKUNA db 12,PIDGEY @@ -14,7 +14,7 @@ Route24Mons: db 12,ABRA ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 7,CATERPIE db 8,METAPOD db 12,PIDGEY @@ -27,7 +27,7 @@ Route24Mons: db 12,ABRA ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 7,CATERPIE db 8,METAPOD db 12,PIDGEY @@ -40,7 +40,7 @@ Route24Mons: db 12,ABRA ENDC - IF _YELLOW + IF DEF(_YELLOW) db 12,ODDISH db 12,BELLSPROUT db 13,PIDGEY diff --git a/data/wildPokemon/route25.asm b/data/wildPokemon/route25.asm index 3d2254730d..4609c7cd2a 100755 --- a/data/wildPokemon/route25.asm +++ b/data/wildPokemon/route25.asm @@ -1,7 +1,7 @@ Route25Mons: db $0F - IF _RED + IF DEF(_RED) db 8,WEEDLE db 9,KAKUNA db 13,PIDGEY @@ -14,7 +14,7 @@ Route25Mons: db 8,CATERPIE ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 8,CATERPIE db 9,METAPOD db 13,PIDGEY @@ -27,7 +27,7 @@ Route25Mons: db 8,WEEDLE ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 8,CATERPIE db 9,METAPOD db 13,PIDGEY @@ -40,7 +40,7 @@ Route25Mons: db 8,WEEDLE ENDC - IF _YELLOW + IF DEF(_YELLOW) db 12,ODDISH db 12,BELLSPROUT db 13,PIDGEY diff --git a/data/wildPokemon/route3.asm b/data/wildPokemon/route3.asm index 21230f421f..fe7c5da9fc 100755 --- a/data/wildPokemon/route3.asm +++ b/data/wildPokemon/route3.asm @@ -1,18 +1,6 @@ Route3Mons: db $14 - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 8,SPEAROW db 9,SPEAROW db 9,MANKEY @@ -23,6 +11,17 @@ Route3Mons: 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 $00 diff --git a/data/wildPokemon/route4.asm b/data/wildPokemon/route4.asm index f7eb80ee08..40c3b7b524 100755 --- a/data/wildPokemon/route4.asm +++ b/data/wildPokemon/route4.asm @@ -1,7 +1,7 @@ Route4Mons: db $14 - IF _RED + IF DEF(_RED) db 10,RATTATA db 10,SPEAROW db 8,RATTATA @@ -14,7 +14,7 @@ Route4Mons: db 12,EKANS ENDC - IF !_RED + IF DEF(_BLUE) || DEF(_GREEN) db 10,RATTATA db 10,SPEAROW db 8,RATTATA @@ -27,7 +27,7 @@ Route4Mons: db 12,SANDSHREW ENDC - IF _YELLOW + IF DEF(_YELLOW) db 8,SPEAROW db 9,SPEAROW db 9,MANKEY diff --git a/data/wildPokemon/route5.asm b/data/wildPokemon/route5.asm index 4b018cd620..aa67ca87fc 100755 --- a/data/wildPokemon/route5.asm +++ b/data/wildPokemon/route5.asm @@ -1,7 +1,7 @@ Route5Mons: db $0F - IF _RED + IF DEF(_RED) db 13,ODDISH db 13,PIDGEY db 15,PIDGEY @@ -14,7 +14,7 @@ Route5Mons: db 16,MANKEY ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 13,BELLSPROUT db 13,PIDGEY db 15,PIDGEY @@ -27,7 +27,7 @@ Route5Mons: db 16,MEOWTH ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 13,ODDISH db 13,PIDGEY db 15,PIDGEY @@ -40,7 +40,7 @@ Route5Mons: db 16,MEOWTH ENDC - IF _YELLOW + IF DEF(_YELLOW) db 15,PIDGEY db 14,RATTATA db 7,ABRA diff --git a/data/wildPokemon/route6.asm b/data/wildPokemon/route6.asm index 253a594327..86e0c05f0b 100755 --- a/data/wildPokemon/route6.asm +++ b/data/wildPokemon/route6.asm @@ -1,7 +1,7 @@ Route6Mons: db $0F - IF _RED + IF DEF(_RED) db 13,ODDISH db 13,PIDGEY db 15,PIDGEY @@ -15,7 +15,7 @@ Route6Mons: db $00 ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 13,BELLSPROUT db 13,PIDGEY db 15,PIDGEY @@ -29,7 +29,7 @@ Route6Mons: db $00 ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 13,ODDISH db 13,PIDGEY db 15,PIDGEY @@ -43,7 +43,7 @@ Route6Mons: db $00 ENDC - IF _YELLOW + IF DEF(_YELLOW) db 15,PIDGEY db 14,RATTATA db 7,ABRA diff --git a/data/wildPokemon/route7.asm b/data/wildPokemon/route7.asm index 42073d1146..505b632ba6 100755 --- a/data/wildPokemon/route7.asm +++ b/data/wildPokemon/route7.asm @@ -1,7 +1,7 @@ Route7Mons: db $0F - IF _RED + IF DEF(_RED) db 19,PIDGEY db 19,ODDISH db 17,MANKEY @@ -14,7 +14,7 @@ Route7Mons: db 20,MANKEY ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 19,PIDGEY db 19,BELLSPROUT db 17,MEOWTH @@ -27,7 +27,7 @@ Route7Mons: db 20,MEOWTH ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 19,PIDGEY db 19,ODDISH db 17,MEOWTH @@ -40,7 +40,7 @@ Route7Mons: db 20,MEOWTH ENDC - IF _YELLOW + IF DEF(_YELLOW) db 20,PIDGEY db 22,PIDGEY db 20,RATTATA diff --git a/data/wildPokemon/route8.asm b/data/wildPokemon/route8.asm index 59c3082d6e..67905134bb 100755 --- a/data/wildPokemon/route8.asm +++ b/data/wildPokemon/route8.asm @@ -1,7 +1,7 @@ Route8Mons: db $0F - IF _RED + IF DEF(_RED) db 18,PIDGEY db 18,MANKEY db 17,EKANS @@ -14,7 +14,7 @@ Route8Mons: db 18,GROWLITHE ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 18,PIDGEY db 18,MEOWTH db 17,SANDSHREW @@ -27,7 +27,7 @@ Route8Mons: db 18,VULPIX ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 18,PIDGEY db 18,MEOWTH db 17,SANDSHREW @@ -40,7 +40,7 @@ Route8Mons: db 18,GROWLITHE ENDC - IF _YELLOW + IF DEF(_YELLOW) db 20,PIDGEY db 22,PIDGEY db 20,RATTATA diff --git a/data/wildPokemon/route9.asm b/data/wildPokemon/route9.asm index 03523e4fb6..d563aa2b75 100755 --- a/data/wildPokemon/route9.asm +++ b/data/wildPokemon/route9.asm @@ -1,7 +1,7 @@ Route9Mons: db $0F - IF _RED + IF DEF(_RED) db 16,RATTATA db 16,SPEAROW db 14,RATTATA @@ -14,7 +14,7 @@ Route9Mons: db 17,EKANS ENDC - IF !_RED && !_YELLOW + IF DEF(_GREEN) || DEF(_BLUE) db 16,RATTATA db 16,SPEAROW db 14,RATTATA @@ -27,7 +27,7 @@ Route9Mons: db 17,SANDSHREW ENDC - IF _YELLOW + IF DEF(_YELLOW) db 16,NIDORAN_M db 16,NIDORAN_F db 18,RATTATA diff --git a/data/wildPokemon/safarizone1.asm b/data/wildPokemon/safarizone1.asm index 29e3f29b97..3781af0e6b 100755 --- a/data/wildPokemon/safarizone1.asm +++ b/data/wildPokemon/safarizone1.asm @@ -1,6 +1,6 @@ ZoneMons1: db $1E - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) db 24,NIDORAN_M db 26,DODUO db 22,PARAS @@ -9,16 +9,16 @@ ZoneMons1: db 23,EXEGGCUTE db 24,NIDORAN_F db 25,PARASECT - IF _RED + IF DEF(_RED) db 25,KANGASKHAN ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 25,LICKITUNG ENDC db 28,SCYTHER ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 24,NIDORAN_F db 26,DODUO db 22,PARAS @@ -31,7 +31,7 @@ ZoneMons1: db 28,PINSIR ENDC - IF _YELLOW + IF DEF(_YELLOW) db 21,NIDORAN_M db 29,NIDORAN_F db 22,EXEGGCUTE diff --git a/data/wildPokemon/safarizone2.asm b/data/wildPokemon/safarizone2.asm index 2adb18ed4c..5de4ad00ae 100755 --- a/data/wildPokemon/safarizone2.asm +++ b/data/wildPokemon/safarizone2.asm @@ -1,50 +1,48 @@ ZoneMons2: db $1E - IF !_YELLOW - IF _RED || (_JAPAN && _BLUE) + 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 _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 22,NIDORAN_F ENDC db 26,RHYHORN db 23,PARAS db 25,EXEGGCUTE - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) db 30,NIDORINO ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 30,NIDORINA ENDC db 27,EXEGGCUTE - IF _RED || (_JAPAN && _BLUE) + IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) db 30,NIDORINA ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 30,NIDORINO ENDC db 32,VENOMOTH db 26,CHANSEY - IF _RED || _GREEN || (!_JAPAN && _BLUE) + IF DEF(_RED) || DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 28,TAUROS ENDC - IF (_JAPAN && _BLUE) + IF (DEF(_JAPAN) && DEF(_BLUE)) db 28,PINSIR ENDC ENDC - IF _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 - ENDC - db $00 diff --git a/data/wildPokemon/safarizone3.asm b/data/wildPokemon/safarizone3.asm index 436ab937a8..c13cd378cb 100755 --- a/data/wildPokemon/safarizone3.asm +++ b/data/wildPokemon/safarizone3.asm @@ -1,6 +1,6 @@ ZoneMons3: db $1E - IF _RED + IF DEF(_RED) db 25,NIDORAN_M db 26,DODUO db 23,VENONAT @@ -13,7 +13,7 @@ ZoneMons3: db 28,KANGASKHAN ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 25,NIDORAN_F db 26,DODUO db 23,VENONAT @@ -26,7 +26,7 @@ ZoneMons3: db 28,KANGASKHAN ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 25,NIDORAN_M db 26,DODUO db 23,VENONAT @@ -39,7 +39,7 @@ ZoneMons3: db 28,LICKITUNG ENDC - IF _YELLOW + IF DEF(_YELLOW) db 29,NIDORAN_M db 21,NIDORAN_F db 22,EXEGGCUTE diff --git a/data/wildPokemon/safarizonecenter.asm b/data/wildPokemon/safarizonecenter.asm index 35eb7fd4e8..7b50e5b9b1 100755 --- a/data/wildPokemon/safarizonecenter.asm +++ b/data/wildPokemon/safarizonecenter.asm @@ -1,6 +1,6 @@ ZoneMonsCenter: db $1E - IF _RED + IF DEF(_RED) db 22,NIDORAN_M db 25,RHYHORN db 22,VENONAT @@ -13,7 +13,7 @@ ZoneMonsCenter: db 23,CHANSEY ENDC - IF _GREEN || (!_JAPAN && _BLUE) + IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 22,NIDORAN_F db 25,RHYHORN db 22,VENONAT @@ -26,7 +26,7 @@ ZoneMonsCenter: db 23,CHANSEY ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 22,NIDORAN_M db 25,RHYHORN db 22,VENONAT @@ -39,7 +39,7 @@ ZoneMonsCenter: db 23,CHANSEY ENDC - IF _YELLOW + IF DEF(_YELLOW) db 14,NIDORAN_M db 36,NIDORAN_F db 24,EXEGGCUTE diff --git a/data/wildPokemon/seafoamisland1.asm b/data/wildPokemon/seafoamisland1.asm index 506dd98eeb..45d0a707ff 100755 --- a/data/wildPokemon/seafoamisland1.asm +++ b/data/wildPokemon/seafoamisland1.asm @@ -1,6 +1,6 @@ IslandMons1: db $0F - IF _RED + IF DEF(_RED) db 30,SEEL db 30,SLOWPOKE db 30,SHELLDER @@ -13,7 +13,7 @@ IslandMons1: db 38,GOLDUCK ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 30,SEEL db 30,PSYDUCK db 30,STARYU @@ -26,7 +26,7 @@ IslandMons1: db 38,SLOWBRO ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 30,SEEL db 30,HORSEA db 30,STARYU @@ -39,7 +39,7 @@ IslandMons1: db 38,SLOWBRO ENDC - IF _YELLOW + IF DEF(_YELLOW) db 18,ZUBAT db 25,KRABBY db 27,KRABBY diff --git a/data/wildPokemon/seafoamislandb1.asm b/data/wildPokemon/seafoamislandb1.asm index 044753b438..3f6ef7b611 100755 --- a/data/wildPokemon/seafoamislandb1.asm +++ b/data/wildPokemon/seafoamislandb1.asm @@ -1,6 +1,6 @@ IslandMonsB1: db $0A - IF _RED + IF DEF(_RED) db 30,STARYU db 30,HORSEA db 32,SHELLDER @@ -13,7 +13,7 @@ IslandMonsB1: db 37,SEADRA ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 30,SHELLDER db 30,KRABBY db 32,STARYU @@ -26,7 +26,7 @@ IslandMonsB1: db 37,KINGLER ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 30,SHELLDER db 30,KRABBY db 32,STARYU @@ -39,7 +39,7 @@ IslandMonsB1: db 37,KINGLER ENDC - IF _YELLOW + IF DEF(_YELLOW) db 27,ZUBAT db 26,KRABBY db 36,ZUBAT diff --git a/data/wildPokemon/seafoamislandb2.asm b/data/wildPokemon/seafoamislandb2.asm index 2b7a3ef8bb..5df1cca908 100755 --- a/data/wildPokemon/seafoamislandb2.asm +++ b/data/wildPokemon/seafoamislandb2.asm @@ -1,6 +1,6 @@ IslandMonsB2: db $0A - IF _RED + IF DEF(_RED) db 30,SEEL db 30,SLOWPOKE db 32,SEEL @@ -13,7 +13,7 @@ IslandMonsB2: db 37,SLOWBRO ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 30,SEEL db 30,PSYDUCK db 32,SEEL @@ -26,7 +26,7 @@ IslandMonsB2: db 37,GOLDUCK ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 30,SEEL db 30,HORSEA db 32,SEEL @@ -39,7 +39,7 @@ IslandMonsB2: db 37,JYNX ENDC - IF _YELLOW + IF DEF(_YELLOW) db 27,ZUBAT db 27,KRABBY db 36,ZUBAT diff --git a/data/wildPokemon/seafoamislandb3.asm b/data/wildPokemon/seafoamislandb3.asm index ac9769b412..e8560c9a2e 100755 --- a/data/wildPokemon/seafoamislandb3.asm +++ b/data/wildPokemon/seafoamislandb3.asm @@ -1,6 +1,6 @@ IslandMonsB3: db $0A - IF _RED + IF DEF(_RED) db 31,SLOWPOKE db 31,SEEL db 33,SLOWPOKE @@ -13,7 +13,7 @@ IslandMonsB3: db 37,DEWGONG ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 31,PSYDUCK db 31,SEEL db 33,PSYDUCK @@ -26,7 +26,7 @@ IslandMonsB3: db 37,DEWGONG ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 31,HORSEA db 31,SEEL db 33,HORSEA @@ -39,7 +39,7 @@ IslandMonsB3: db 37,DEWGONG ENDC - IF _YELLOW + IF DEF(_YELLOW) db 27,GOLBAT db 36,ZUBAT db 29,KRABBY diff --git a/data/wildPokemon/seafoamislandb4.asm b/data/wildPokemon/seafoamislandb4.asm index af5c7e0295..7f8977d6c9 100755 --- a/data/wildPokemon/seafoamislandb4.asm +++ b/data/wildPokemon/seafoamislandb4.asm @@ -1,6 +1,6 @@ IslandMonsB4: db $0A - IF _RED + IF DEF(_RED) db 31,HORSEA db 31,SHELLDER db 33,HORSEA @@ -13,7 +13,7 @@ IslandMonsB4: db 32,GOLBAT ENDC - IF _GREEN || !_JAPAN && _BLUE + IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) db 31,KRABBY db 31,STARYU db 33,KRABBY @@ -26,7 +26,7 @@ IslandMonsB4: db 32,GOLBAT ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 31,KRABBY db 31,STARYU db 33,KRABBY @@ -39,7 +39,7 @@ IslandMonsB4: db 32,GOLBAT ENDC - IF _YELLOW + IF DEF(_YELLOW) db 36,GOLBAT db 36,ZUBAT db 30,KRABBY diff --git a/data/wildPokemon/unknowndungeon1.asm b/data/wildPokemon/unknowndungeon1.asm index 4feb568cad..504d32f1de 100755 --- a/data/wildPokemon/unknowndungeon1.asm +++ b/data/wildPokemon/unknowndungeon1.asm @@ -1,20 +1,31 @@ DungeonMons1: db $0A - IF !_YELLOW + IF DEF(_YELLOW) + db 50,GOLBAT + db 55,GOLBAT + db 45,GRAVELER + db 55,GLOOM + db 55,WEEPINBELL + 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 _RED || _GREEN || (!_JAPAN && _BLUE) + IF DEF(_RED) || DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) db 49,DODRIO ENDC - IF _JAPAN && _BLUE + IF DEF(_JAPAN) && DEF(_BLUE) db 49,RAPIDASH ENDC db 49,VENOMOTH - IF _RED + IF DEF(_RED) db 52,ARBOK ENDC - IF !_RED + IF !DEF(_RED) db 52,SANDSLASH ENDC db 49,KADABRA @@ -23,18 +34,5 @@ DungeonMons1: db 53,DITTO ENDC - IF _YELLOW - db 50,GOLBAT - db 55,GOLBAT - db 45,GRAVELER - db 55,GLOOM - db 55,WEEPINBELL - db 52,SANDSLASH - db 54,VENOMOTH - db 54,PARASECT - db 55,DITTO - db 60,DITTO - ENDC - db $00 diff --git a/data/wildPokemon/unknowndungeon2.asm b/data/wildPokemon/unknowndungeon2.asm index a09c985c71..9422f3a0ef 100755 --- a/data/wildPokemon/unknowndungeon2.asm +++ b/data/wildPokemon/unknowndungeon2.asm @@ -1,14 +1,25 @@ DungeonMons2: db $0F - IF !_YELLOW + 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 _RED || _GREEN || (_BLUE && !_JAPAN) + IF DEF(_RED) || DEF(_GREEN) || (DEF(_BLUE) && !DEF(_JAPAN)) db 52,MAROWAK ENDC - IF (_BLUE && _JAPAN) + IF (DEF(_BLUE) && DEF(_JAPAN)) db 52,MAROWAK ENDC db 52,ELECTRODE @@ -18,18 +29,5 @@ DungeonMons2: db 60,DITTO ENDC - IF _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 - ENDC - db $00 diff --git a/data/wildPokemon/unknowndungeonb1.asm b/data/wildPokemon/unknowndungeonb1.asm index 7ab1c9648a..6a88edb2ce 100755 --- a/data/wildPokemon/unknowndungeonb1.asm +++ b/data/wildPokemon/unknowndungeonb1.asm @@ -1,16 +1,27 @@ DungeonMonsB1: db $19 - IF !_YELLOW + 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 _RED + IF DEF(_RED) db 57,ARBOK ENDC - IF !_RED + IF DEF(_BLUE) || DEF(_GREEN) db 57,SANDSLASH ENDC db 65,DITTO @@ -18,18 +29,5 @@ DungeonMonsB1: db 67,DITTO ENDC - IF _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 - ENDC - db $00 diff --git a/data/wildPokemon/victoryroad1.asm b/data/wildPokemon/victoryroad1.asm index 1ec65cf5a5..98914a91d9 100755 --- a/data/wildPokemon/victoryroad1.asm +++ b/data/wildPokemon/victoryroad1.asm @@ -1,19 +1,7 @@ PlateauMons1: db $0F - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 26,GEODUDE db 31,GEODUDE db 36,GEODUDE @@ -24,6 +12,17 @@ PlateauMons1: 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 $00 diff --git a/data/wildPokemon/victoryroad2.asm b/data/wildPokemon/victoryroad2.asm index 87159e96d8..ffe117bc12 100755 --- a/data/wildPokemon/victoryroad2.asm +++ b/data/wildPokemon/victoryroad2.asm @@ -1,19 +1,7 @@ PlateauMons2: db $0A - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 31,GEODUDE db 36,GEODUDE db 41,GEODUDE @@ -24,6 +12,17 @@ PlateauMons2: 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 $00 diff --git a/data/wildPokemon/victoryroad3.asm b/data/wildPokemon/victoryroad3.asm index ae52eeb690..7c1b2c1caa 100755 --- a/data/wildPokemon/victoryroad3.asm +++ b/data/wildPokemon/victoryroad3.asm @@ -1,19 +1,7 @@ PlateauMons3: db $0F - IF !_YELLOW - 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 - IF _YELLOW + IF DEF(_YELLOW) db 36,GEODUDE db 44,GOLBAT db 41,GEODUDE @@ -24,6 +12,17 @@ PlateauMons3: 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 $00 diff --git a/data/wildPokemon/viridianforest.asm b/data/wildPokemon/viridianforest.asm index 2ca828eb8e..f6e00ac343 100755 --- a/data/wildPokemon/viridianforest.asm +++ b/data/wildPokemon/viridianforest.asm @@ -1,7 +1,19 @@ ForestMons: - IF !_YELLOW + IF DEF(_YELLOW) + db $19 + db 3,CATERPIE + db 4,METAPOD + db 4,CATERPIE + db 5,CATERPIE + db 4,PIDGEY + db 6,PIDGEY + db 6,CATERPIE + db 6,METAPOD + db 8,PIDGEY + db 9,PIDGEOTTO + ELSE db $08 - IF _RED + IF DEF(_RED) db 4,WEEDLE db 5,KAKUNA db 3,WEEDLE @@ -11,7 +23,7 @@ ForestMons: db 4,METAPOD db 3,CATERPIE ENDC - IF _BLUE || _GREEN + IF DEF(_BLUE) || DEF(_GREEN) db 4,CATERPIE db 5,METAPOD db 3,CATERPIE @@ -21,24 +33,11 @@ ForestMons: db 4,KAKUNA db 3,WEEDLE ENDC - + db 3,PIKACHU db 5,PIKACHU ENDC - IF _YELLOW - db $19 - db 3,CATERPIE - db 4,METAPOD - db 4,CATERPIE - db 5,CATERPIE - db 4,PIDGEY - db 6,PIDGEY - db 6,CATERPIE - db 6,METAPOD - db 8,PIDGEY - db 9,PIDGEOTTO - ENDC db $00 diff --git a/data/wild_mons.asm b/data/wild_mons.asm index 2bc062f3a5..f29fd34083 100755 --- a/data/wild_mons.asm +++ b/data/wild_mons.asm @@ -247,7 +247,7 @@ WildDataPointers: ; ceeb (3:4eeb) dw NoMons dw NoMons dw NoMons - IF _YELLOW + IF DEF(_OPTION_BEACH_HOUSE) dw NoMons ENDC dw $FFFF diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index 16a3c3f92e..ae4ecb0d24 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -92,7 +92,7 @@ DisplayCreditsMon: ; 740cb (1d:40cb) dec c jr nz,.next2 xor a - ld [$FFB0],a + ld [hWY],a ld a,$C0 ld [$FF47],a ret diff --git a/engine/battle/1.asm b/engine/battle/1.asm index 045463134f..517d53d1ec 100755 --- a/engine/battle/1.asm +++ b/engine/battle/1.asm @@ -1,31 +1,33 @@ DrainHPEffect_: ; 783f (1:783f) - ld hl, W_DAMAGE ; W_DAMAGE + ld hl, W_DAMAGE ld a, [hl] srl a ; divide damage by 2 ld [hli], a ld a, [hl] rr a ld [hld], a - or [hl] - jr nz, .asm_784f + or [hl] ; is damage 0? + jr nz, .getAttackerHP +; if damage is 0, increase to 1 so that the attacker gains at least 1 HP inc hl inc [hl] -.asm_784f - ld hl, wBattleMonHP ; wd015 - ld de, wBattleMonMaxHP ; wd023 - ld a, [H_WHOSETURN] ; $fff3 +.getAttackerHP + ld hl, wBattleMonHP + ld de, wBattleMonMaxHP + ld a, [H_WHOSETURN] and a - jp z, Func_7861 - ld hl, wEnemyMonHP ; wEnemyMonHP - ld de, wEnemyMonMaxHP ; wEnemyMonMaxHP - -Func_7861: ; 7861 (1:7861) + jp z, .addDamageToAttackerHP + ld hl, wEnemyMonHP + ld de, wEnemyMonMaxHP +.addDamageToAttackerHP ld bc, wHPBarOldHP+1 +; copy current HP to wHPBarOldHP ld a, [hli] ld [bc], a ld a, [hl] dec bc ld [bc], a +; copy max HP to wHPBarMaxHP ld a, [de] dec bc ld [bc], a @@ -33,17 +35,19 @@ Func_7861: ; 7861 (1:7861) ld a, [de] dec bc ld [bc], a - ld a, [wd0d8] +; add damage to attacker's HP and copy new HP to wHPBarNewHP + ld a, [W_DAMAGE + 1] ld b, [hl] add b ld [hld], a ld [wHPBarNewHP], a - ld a, [W_DAMAGE] ; W_DAMAGE + ld a, [W_DAMAGE] ld b, [hl] adc b ld [hli], a ld [wHPBarNewHP+1], a - jr c, .asm_7890 + jr c, .capToMaxHP ; if HP > 65,535, cap to max HP +; compare HP with max HP ld a, [hld] ld b, a ld a, [de] @@ -54,8 +58,8 @@ Func_7861: ; 7861 (1:7861) ld a, [de] inc de sbc b - jr nc, .asm_789c -.asm_7890 + jr nc, .next +.capToMaxHP ld a, [de] ld [hld], a ld [wHPBarNewHP], a @@ -64,31 +68,31 @@ Func_7861: ; 7861 (1:7861) ld [hli], a ld [wHPBarNewHP+1], a inc de -.asm_789c - ld a, [H_WHOSETURN] ; $fff3 +.next + ld a, [H_WHOSETURN] and a hlCoord 10, 9 ld a, $1 - jr z, .asm_78aa + jr z, .next2 hlCoord 2, 2 xor a -.asm_78aa - ld [wListMenuID], a ; wListMenuID +.next2 + ld [wHPBarType], a predef UpdateHPBar2 - predef Func_3cd60 - predef Func_3cdec + predef DrawPlayerHUDAndHPBar + predef DrawEnemyHUDAndHPBar callab ReadPlayerMonCurHPAndStatus - ld hl, SuckedHealthText ; $78dc - ld a, [H_WHOSETURN] ; $fff3 + ld hl, SuckedHealthText + ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVEEFFECT] ; wcfd3 - jr z, .asm_78d2 - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT -.asm_78d2 + ld a, [W_PLAYERMOVEEFFECT] + jr z, .next3 + ld a, [W_ENEMYMOVEEFFECT] +.next3 cp DREAM_EATER_EFFECT - jr nz, .asm_78d9 + jr nz, .printText ld hl, DreamWasEatenText -.asm_78d9 +.printText jp PrintText SuckedHealthText: ; 78dc (1:78dc) diff --git a/engine/battle/14.asm b/engine/battle/14.asm index 01d115a6f5..1b2d7462f0 100755 --- a/engine/battle/14.asm +++ b/engine/battle/14.asm @@ -1,93 +1,93 @@ -Func_525af: ; 525af (14:65af) - ld a, [$ffd7] +InitBattleVariables: ; 525af (14:65af) + ld a, [hTilesetType] ld [wd0d4], a xor a ld [wcd6a], a - ld [wcf0b], a + ld [wBattleResult], a ld hl, wcc2b ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld [wListScrollOffset], a ; wcc36 - ld [wd05e], a + ld [wListScrollOffset], a + ld [wCriticalHitOrOHKO], a ld [wBattleMonSpecies], a - ld [wPartyAliveFlags], a - ld [wPlayerMonNumber], a ; wPlayerMonNumber - ld [wd078], a - ld [wd35d], a + ld [wPartyGainExpFlags], a + ld [wPlayerMonNumber], a + ld [wEscapedFromBattle], a + ld [wMapPalOffset], a ld hl, wcf1d ld [hli], a ld [hl], a ld hl, wccd3 ld b, $3c -.asm_525e1 +.loop ld [hli], a dec b - jr nz, .asm_525e1 + jr nz, .loop inc a ld [wccd9], a - ld a, [W_CURMAP] ; W_CURMAP + ld a, [W_CURMAP] cp SAFARI_ZONE_EAST - jr c, .asm_525f9 + jr c, .notSafariBattle cp SAFARI_ZONE_REST_HOUSE_1 - jr nc, .asm_525f9 - ld a, $2 - ld [W_BATTLETYPE], a ; wd05a -.asm_525f9 + jr nc, .notSafariBattle + ld a, $2 ; safari battle + ld [W_BATTLETYPE], a +.notSafariBattle ld hl, PlayBattleMusic ld b, BANK(PlayBattleMusic) jp Bankswitch ParalyzeEffect_: ; 52601 (14:6601) - ld hl, wEnemyMonStatus ; wcfe9 - ld de, W_PLAYERMOVETYPE ; wcfd5 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wEnemyMonStatus + ld de, W_PLAYERMOVETYPE + ld a, [H_WHOSETURN] and a - jp z, .asm_52613 - ld hl, wBattleMonStatus ; wBattleMonStatus - ld de, W_ENEMYMOVETYPE ; wcfcf - -.asm_52613 + jp z, .next + ld hl, wBattleMonStatus + ld de, W_ENEMYMOVETYPE +.next ld a, [hl] - and a - jr nz, .asm_52659 + and a ; does the target already have a status ailment? + jr nz, .didntAffect +; check if the target is immune due to types ld a, [de] - cp EVASION_DOWN1_EFFECT - jr nz, .asm_5262a + cp ELECTRIC + jr nz, .hitTest ld b, h ld c, l inc bc ld a, [bc] - cp $4 - jr z, .asm_52666 + cp GROUND + jr z, .doesntAffect inc bc ld a, [bc] - cp $4 - jr z, .asm_52666 -.asm_5262a + cp GROUND + jr z, .doesntAffect +.hitTest push hl callab MoveHitTest pop hl - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a - jr nz, .asm_52659 - set 6, [hl] - callab Func_3ed27 - ld c, $1e + jr nz, .didntAffect + set PAR, [hl] + callab QuarterSpeedDueToParalysis + ld c, 30 call DelayFrames - callab Func_3fba8 + callab PlayCurrentMoveAnimation ld hl, PrintMayNotAttackText ld b, BANK(PrintMayNotAttackText) jp Bankswitch -.asm_52659 - ld c, $32 +.didntAffect + ld c, 50 call DelayFrames ld hl, PrintDidntAffectText ld b, BANK(PrintDidntAffectText) jp Bankswitch -.asm_52666 - ld c, $32 +.doesntAffect + ld c, 50 call DelayFrames ld hl, PrintDoesntAffectText ld b, BANK(PrintDoesntAffectText) diff --git a/engine/battle/15.asm b/engine/battle/15.asm index 69d8ff3f4b..0acf351475 100755 --- a/engine/battle/15.asm +++ b/engine/battle/15.asm @@ -1,63 +1,63 @@ GainExperience: ; 5524f (15:524f) - ld a, [W_ISLINKBATTLE] - cp $4 - ret z - call Func_5546c - ld hl, wPartyMons + ld a, [wLinkState] + cp LINK_STATE_BATTLING + ret z ; return if link battle + call DivideExpDataByNumMonsGainingExp + ld hl, wPartyMon1 xor a ld [wWhichPokemon], a - -Func_5525f: ; 5525f (15:525f) +.partyMonLoop ; loop over each mon and add gained exp inc hl ld a, [hli] - or [hl] - jp z, Func_55436 + or [hl] ; is mon's HP 0? + jp z, .nextMon ; if so, go to next mon push hl - ld hl, wPartyAliveFlags + ld hl, wPartyGainExpFlags ld a, [wWhichPokemon] ld c, a ld b, $2 predef FlagActionPredef ld a, c - and a + and a ; is mon's gain exp flag set? pop hl - jp z, Func_55436 - ld de, $10 + jp z, .nextMon ; if mon's gain exp flag not set, go to next mon + ld de, (wPartyMon1HPExp + 1) - (wPartyMon1HP + 1) add hl, de ld d, h ld e, l - ld hl, wd002 + ld hl, wEnemyMonBaseStats ld c, $5 -.asm_55285 +.gainStatExpLoop ld a, [hli] - ld b, a - ld a, [de] - add b + ld b, a ; enemy mon base stat + ld a, [de] ; stat exp + add b ; add enemy mon base state to stat exp ld [de], a - jr nc, .asm_5529a + jr nc, .nextBaseStat +; if there was a carry, increment the upper byte dec de ld a, [de] inc a - jr z, .asm_55295 + jr z, .maxStatExp ; jump if the value overflowed ld [de], a inc de - jr .asm_5529a -.asm_55295 + jr .nextBaseStat +.maxStatExp ; if the upper byte also overflowed, then we have hit the max stat exp ld a, $ff ld [de], a inc de ld [de], a -.asm_5529a +.nextBaseStat dec c jr z, .asm_552a1 inc de inc de - jr .asm_55285 + jr .gainStatExpLoop .asm_552a1 xor a ld [H_MULTIPLICAND], a ld [H_MULTIPLICAND + 1], a - ld a, [wd008] + ld a, [wEnemyMonBaseExp] ld [H_MULTIPLICAND + 2], a ld a, [wEnemyMonLevel] ld [H_MULTIPLIER], a @@ -66,44 +66,46 @@ Func_5525f: ; 5525f (15:525f) ld [H_DIVISOR], a ld b, 4 call Divide - ld hl, $fff2 + ld hl, -((wPartyMon1HPExp + 1) - wPartyMon1OTID + 4 * 2) add hl, de - ld b, [hl] + ld b, [hl] ; party mon OTID inc hl ld a, [wPlayerID] cp b - jr nz, .asm_552d1 + jr nz, .tradedMon ld b, [hl] ld a, [wPlayerID + 1] cp b ld a, $0 - jr z, .asm_552d6 -.asm_552d1 - call Func_5549f + jr z, .next +.tradedMon + call BoostExp ; traded mon exp boost ld a, $1 -.asm_552d6 +.next ld [wcf4d], a ld a, [W_ISINBATTLE] - dec a - call nz, Func_5549f + dec a ; is it a trainer battle? + call nz, BoostExp ; if so, boost exp inc hl inc hl inc hl +; add the gained exp to the party mon's exp ld b, [hl] - ld a, [$ff98] + ld a, [H_QUOTIENT + 3] ld [wcf4c], a add b ld [hld], a ld b, [hl] - ld a, [$ff97] + ld a, [H_QUOTIENT + 2] ld [wcf4b], a adc b ld [hl], a - jr nc, .asm_552f8 + jr nc, .noCarry dec hl inc [hl] inc hl -.asm_552f8 +.noCarry +; calculate exp for the mon at max level, and cap the exp at that value inc hl push hl ld a, [wWhichPokemon] @@ -111,11 +113,12 @@ Func_5525f: ; 5525f (15:525f) ld b, 0 ld hl, wPartySpecies add hl, bc - ld a, [hl] + ld a, [hl] ; species ld [wd0b5], a call GetMonHeader ld d, MAX_LEVEL - callab CalcExperience + callab CalcExperience ; get max exp +; compare max exp with current exp ld a, [$ff96] ld b, a ld a, [$ff97] @@ -129,7 +132,8 @@ Func_5525f: ; 5525f (15:525f) sbc c ld a, [hl] sbc b - jr c, .asm_5532e + jr c, .next2 +; the mon's exp is greater than the max exp, so overwrite it with the max exp ld a, b ld [hli], a ld a, c @@ -137,103 +141,108 @@ Func_5525f: ; 5525f (15:525f) ld a, d ld [hld], a dec hl -.asm_5532e +.next2 push hl ld a, [wWhichPokemon] ld hl, wPartyMonNicks call GetPartyMonName ld hl, GainedText call PrintText - xor a + xor a ; party mon data ld [wcc49], a call LoadMonData pop hl - ld bc, $13 + ld bc, wPartyMon1Level - wPartyMon1Exp add hl, bc push hl - callba Func_58f43 + callba CalcLevelFromExperience pop hl - ld a, [hl] + ld a, [hl] ; current level cp d - jp z, Func_55436 + jp z, .nextMon ; if level didn't change, go to next mon ld a, [W_CURENEMYLVL] push af push hl ld a, d ld [W_CURENEMYLVL], a ld [hl], a - ld bc, $ffdf + ld bc, wPartyMon1Species - wPartyMon1Level add hl, bc - ld a, [hl] + ld a, [hl] ; species ld [wd0b5], a ld [wd11e], a call GetMonHeader - ld bc, $23 + ld bc, (wPartyMon1MaxHP + 1) - wPartyMon1Species add hl, bc push hl ld a, [hld] ld c, a ld b, [hl] - push bc + push bc ; push max HP (from before levelling up) ld d, h ld e, l - ld bc, $ffee + ld bc, (wPartyMon1HPExp - 1) - wPartyMon1MaxHP add hl, bc - ld b, $1 + ld b, $1 ; consider stat exp when calculating stats call CalcStats - pop bc + pop bc ; pop max HP (from before levelling up) pop hl ld a, [hld] sub c ld c, a ld a, [hl] sbc b - ld b, a - ld de, $ffe0 + ld b, a ; bc = difference between old max HP and new max HP after levelling + ld de, (wPartyMon1HP + 1) - wPartyMon1MaxHP add hl, de - ld a, [hl] +; add to the current HP the amount of max HP gained when levelling + ld a, [hl] ; wPartyMon1HP + 1 add c ld [hld], a - ld a, [hl] + ld a, [hl] ; wPartyMon1HP + 1 adc b - ld [hl], a + ld [hl], a ; wPartyMon1HP ld a, [wPlayerMonNumber] ld b, a ld a, [wWhichPokemon] - cp b - jr nz, .asm_553f7 + cp b ; is the current mon in battle? + jr nz, .printGrewLevelText +; current mon is in battle ld de, wBattleMonHP +; copy party mon HP to battle mon HP ld a, [hli] ld [de], a inc de ld a, [hl] ld [de], a - ld bc, $1f +; copy other stats from party mon to battle mon + ld bc, wPartyMon1Level - (wPartyMon1HP + 1) add hl, bc push hl - ld de, wBattleMonLevel ; wBattleMonLevel - ld bc, $b + ld de, wBattleMonLevel + ld bc, $b ; size of stats call CopyData pop hl - ld a, [W_PLAYERBATTSTATUS3] ; W_PLAYERBATTSTATUS3 - bit 3, a - jr nz, .asm_553c8 - ld de, wcd0f + ld a, [W_PLAYERBATTSTATUS3] + 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 call CopyData -.asm_553c8 +.recalcStatChanges xor a ld [wd11e], a - callab Func_3ed99 - callab Func_3ed1a - callab Func_3ee19 - callab Func_3cd60 - callab Func_3ee94 + callab CalculateModifiedStats + callab ApplyBurnAndParalysisPenaltiesToPlayer + callab ApplyBadgeStatBoosts + callab DrawPlayerHUDAndHPBar + callab PrintEmptyString call SaveScreenTilesToBuffer1 -.asm_553f7 +.printGrewLevelText ld hl, GrewLevelText call PrintText - xor a + xor a ; party mon data ld [wcc49], a call LoadMonData ld d, $1 @@ -244,88 +253,90 @@ Func_5525f: ; 5525f (15:525f) ld [wcc49], a ld a, [wd0b5] ld [wd11e], a - predef Func_3af5b + predef LearnMoveFromLevelUp ld hl, wccd3 - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld c, a ld b, $1 predef FlagActionPredef pop hl pop af - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL + ld [W_CURENEMYLVL], a -Func_55436: ; 55436 (15:5436) - ld a, [wPartyCount] ; wPartyCount +.nextMon + ld a, [wPartyCount] ld b, a - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] inc a cp b - jr z, .asm_55450 - ld [wWhichPokemon], a ; wWhichPokemon - ld bc, $2c - ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1) + jr z, .done + ld [wWhichPokemon], a + ld bc, wPartyMon2 - wPartyMon1 + ld hl, wPartyMon1 call AddNTimes - jp Func_5525f -.asm_55450 - ld hl, wPartyAliveFlags + jp .partyMonLoop +.done + ld hl, wPartyGainExpFlags xor a - ld [hl], a - ld a, [wPlayerMonNumber] ; wPlayerMonNumber + ld [hl], a ; clear gain exp flags + ld a, [wPlayerMonNumber] ld c, a ld b, $1 push bc - predef FlagActionPredef - ld hl, wccf5 + predef FlagActionPredef ; set the gain exp flag for the mon that is currently out + ld hl, wPartyFoughtCurrentEnemyFlags xor a ld [hl], a pop bc - predef_jump FlagActionPredef + predef_jump FlagActionPredef ; set the fought current enemy flag for the mon that is currently out -Func_5546c: ; 5546c (15:546c) - ld a, [wPartyAliveFlags] +; divide enemy base stats, catch rate, and base exp by the number of mons gaining exp +DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c) + ld a, [wPartyGainExpFlags] ld b, a xor a ld c, $8 ld d, $0 -.asm_55475 +.countSetBitsLoop ; loop to count set bits in wPartyGainExpFlags xor a srl b adc d ld d, a dec c - jr nz, .asm_55475 + jr nz, .countSetBitsLoop cp $2 - ret c - ld [wd11e], a - ld hl, wd002 + 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 -.asm_55488 +.divideLoop xor a - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld [H_DIVIDEND], a ld a, [hl] - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + ld [H_DIVIDEND + 1], a ld a, [wd11e] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_DIVISOR], a ld b, $2 - call Divide - ld a, [$ff98] + call Divide ; divide value by number of mons gaining exp + ld a, [H_QUOTIENT + 3] ld [hli], a dec c - jr nz, .asm_55488 + jr nz, .divideLoop ret -Func_5549f: ; 5549f (15:549f) - ld a, [$ff97] +; multiplies exp by 1.5 +BoostExp: ; 5549f (15:549f) + ld a, [H_QUOTIENT + 2] ld b, a - ld a, [$ff98] + ld a, [H_QUOTIENT + 3] ld c, a srl b rr c add c - ld [$ff98], a - ld a, [$ff97] + ld [H_QUOTIENT + 3], a + ld a, [H_QUOTIENT + 2] adc b - ld [$ff97], a + ld [H_QUOTIENT + 2], a ret GainedText: ; 554b2 (15:54b2) diff --git a/engine/battle/16.asm b/engine/battle/16.asm index 1500d00365..9a00bd9886 100755 --- a/engine/battle/16.asm +++ b/engine/battle/16.asm @@ -38,7 +38,7 @@ PrintBeginningBattleText: ; 58d99 (16:4d99) ld a, b and a jr z, .noSilphScope - callab Func_3eb01 + callab LoadEnemyMonData jr .notPokemonTower .noSilphScope ld hl, EnemyAppearedText @@ -54,8 +54,8 @@ PrintBeginningBattleText: ; 58d99 (16:4d99) call PrintText ld hl, UnveiledGhostText call PrintText - callab Func_3eb01 - callab Func_708ca + callab LoadEnemyMonData + callab MarowakAnim ld hl, WildMonAppearedText call PrintText @@ -94,25 +94,25 @@ GhostCantBeIDdText: ; 58e54 (16:4e54) TX_FAR _GhostCantBeIDdText db "@" -SendOutMon: ; 58e59 (16:4e59) - ld hl, wEnemyMonHP ; wEnemyMonHP +PrintSendOutMonMessage: ; 58e59 (16:4e59) + ld hl, wEnemyMonHP ld a, [hli] or [hl] ld hl, GoText jr z, .printText xor a - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) - ld hl, wEnemyMonHP ; wEnemyMonHP + ld [H_MULTIPLICAND], a + ld hl, wEnemyMonHP ld a, [hli] ld [wcce3], a - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a ld a, [hl] ld [wcce4], a - ld [$ff98], a - ld a, $19 - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_MULTIPLICAND + 2], a + ld a, 25 + ld [H_MULTIPLIER], a call Multiply - ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP + ld hl, wEnemyMonMaxHP ld a, [hli] ld b, [hl] srl a @@ -121,19 +121,19 @@ SendOutMon: ; 58e59 (16:4e59) rr b ld a, b ld b, $4 - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_DIVISOR], a ; enemy mon max HP divided by 4 call Divide - ld a, [$ff98] - ld hl, GoText - cp $46 + ld a, [H_QUOTIENT + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP + ld hl, GoText ; 70% or greater + cp 70 jr nc, .printText - ld hl, DoItText - cp $28 + ld hl, DoItText ; 40% - 69% + cp 40 jr nc, .printText - ld hl, GetmText - cp $a + ld hl, GetmText ; 10% - 39% + cp 10 jr nc, .printText - ld hl, EnemysWeakText + ld hl, EnemysWeakText ; 0% - 9% .printText jp PrintText diff --git a/engine/battle/1a.asm b/engine/battle/1a.asm index 6b502a3197..ecf5040b24 100755 --- a/engine/battle/1a.asm +++ b/engine/battle/1a.asm @@ -7,16 +7,19 @@ DecrementPP: ; 68000 (1a:4000) 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 - and a, 7 ; check to see if bits 0, 1, or 2 are set + and a, (1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << AttackingMultipleTimes) ret nz ; if any of these statuses are true, don't decrement PP - bit 6, [hl] ; check 6th bit status flag on W_PLAYERBATTSTATUS2 - ret nz ; and return if it is set + bit UsingRage, [hl] + ret nz ; don't decrement PP either if Pokemon is using Rage ld hl, wBattleMonPP ; PP of first move (in battle) - call .DecrementPP - - ld a, [W_PLAYERBATTSTATUS3] ; load pokemon status bits? - bit 3, a ; XXX transform status? - ret nz ; If it is, return. Pokemon Red stores the "current pokemon's" PP + +; decrement PP in the battle struct + call .DecrementPP + +; decrement PP in the party struct + ld a, [W_PLAYERBATTSTATUS3] + bit Transformed, a + ret nz ; Return if transformed. Pokemon Red stores the "current pokemon's" PP ; separately from the "Pokemon in your party's" PP. This is ; duplication -- in all cases *other* than Pokemon with Transform. ; Normally, this means we have to go on and make the same @@ -26,12 +29,12 @@ DecrementPP: ; 68000 (1a:4000) ; its opponent, which is *not* the same as its real PP as part of your ; party. So we return, and don't do that part. - ld hl, wPartyMon1PP ; PP of first move (in party) - ld a, [wPlayerMonNumber] ; which mon in party is active - ld bc, $2C ; XXX probably size of party pokemon's data structure + ld hl, wPartyMon1PP ; PP of first move (in party) + ld a, [wPlayerMonNumber] ; which mon in party is active + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ; calculate address of the mon to modify .DecrementPP - ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? + ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? ld c, a ld b, 0 add hl ,bc ; calculate the address in memory of the PP we need to decrement diff --git a/engine/battle/1c.asm b/engine/battle/1c.asm index 006bf31155..ce0296f728 100755 --- a/engine/battle/1c.asm +++ b/engine/battle/1c.asm @@ -1,85 +1,91 @@ -Func_708ca: ; 708ca (1c:48ca) +MarowakAnim: ; 708ca (1c:48ca) +; animate the ghost being unveiled as a Marowak ld a, $e4 - ld [rOBP1], a ; $ff49 - call Func_7092a + 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 call ClearScreenArea call Delay3 xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + 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 a, $1 - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a callab Func_79793 + ; alternate between black and light grey 8 times. + ; this makes the ghost's body appear to flash ld d, $80 - call Func_704f3 -.asm_708f6 - ld c, $a + call FlashSprite8Times +.fadeOutGhostLoop + ld c, 10 call DelayFrames - ld a, [rOBP1] ; $ff49 + ld a, [rOBP1] sla a sla a - ld [rOBP1], a ; $ff49 - jr nz, .asm_708f6 + ld [rOBP1], a + jr nz, .fadeOutGhostLoop call ClearSprites - call Func_7092a + call CopyMonPicFromBGToSpriteVRAM ; copy Marowak pic from BG to sprite VRAM ld b, $e4 -.asm_7090d - ld c, $a +.fadeInMarowakLoop + ld c, 10 call DelayFrames - ld a, [rOBP1] ; $ff49 + ld a, [rOBP1] srl b rra srl b rra - ld [rOBP1], a ; $ff49 + ld [rOBP1], a ld a, b and a - jr nz, .asm_7090d + jr nz, .fadeInMarowakLoop ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ; enable BG transfer so the BG Marowak pic will be visible after the sprite one is cleared call Delay3 jp ClearSprites -Func_7092a: ; 7092a (1c:492a) +; copies a mon pic's from background VRAM to sprite VRAM and sets up OAM +CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a) ld de, vFrontPic ld hl, vSprites ld bc, 7 * 7 call CopyVideoData ld a, $10 - ld [W_BASECOORDY], a ; wd082 + ld [W_BASECOORDY], a ld a, $70 - ld [W_BASECOORDX], a ; wd081 + ld [W_BASECOORDX], a ld hl, wOAMBuffer ld bc, $606 ld d, $8 -.asm_70948 +.oamLoop push bc - ld a, [W_BASECOORDY] ; wd082 + ld a, [W_BASECOORDY] ld e, a -.asm_7094d +.oamInnerLoop ld a, e add $8 ld e, a ld [hli], a - ld a, [W_BASECOORDX] ; wd081 + ld a, [W_BASECOORDX] ld [hli], a ld a, d ld [hli], a - ld a, $10 + ld a, $10 ; use OBP1 ld [hli], a inc d dec c - jr nz, .asm_7094d + jr nz, .oamInnerLoop inc d - ld a, [W_BASECOORDX] ; wd081 + ld a, [W_BASECOORDX] add $8 - ld [W_BASECOORDX], a ; wd081 + ld [W_BASECOORDX], a pop bc dec b - jr nz, .asm_70948 + jr nz, .oamLoop ret BattleTransition: ; 7096d (1c:496d) @@ -87,9 +93,9 @@ BattleTransition: ; 7096d (1c:496d) ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a - ld [$ffb0], a + ld [hWY], a dec a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call DelayFrame ld hl, wSpriteStateData1 + 2 ld a, [H_DOWNARROWBLINKCNT2] @@ -127,8 +133,8 @@ BattleTransition: ; 7096d (1c:496d) call Delay3 call LoadBattleTransitionTile ld bc, $0 - ld a, [W_ISLINKBATTLE] - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jr z, .linkBattle call GetBattleTransitionID_WildOrTrainer call GetBattleTransitionID_CompareLevels @@ -270,9 +276,9 @@ BattleTransitionTile: ; 70a59 (1c:4a59) BattleTransition_BlackScreen: ; 70a69 (1c:4a69) ld a, $ff - ld [rBGP], a ; $ff47 - ld [rOBP0], a ; $ff48 - ld [rOBP1], a ; $ff49 + ld [rBGP], a + ld [rOBP0], a + ld [rOBP1], a ret ; for non-dungeon trainer battles diff --git a/engine/battle/4.asm b/engine/battle/4.asm index db6614cc79..e96267c476 100755 --- a/engine/battle/4.asm +++ b/engine/battle/4.asm @@ -1,14 +1,14 @@ -Func_128d8: ; 128d8 (4:68d8) - ld a, [W_YCOORD] ; wd361 +; returns whether the player is one tile outside the map in Z +IsPlayerJustOutsideMap: ; 128d8 (4:68d8) + ld a, [W_YCOORD] ld b, a - ld a, [W_CURMAPHEIGHT] ; wd368 - call Func_128ea + ld a, [W_CURMAPHEIGHT] + call .compareCoordWithMapDimension ret z - ld a, [W_XCOORD] ; wd362 + ld a, [W_XCOORD] ld b, a - ld a, [W_CURMAPWIDTH] ; wd369 - -Func_128ea: ; 128ea (4:68ea) + ld a, [W_CURMAPWIDTH] +.compareCoordWithMapDimension add a cp b ret z @@ -18,58 +18,58 @@ Func_128ea: ; 128ea (4:68ea) DrawHP: ; 128ef (4:68ef) call GetPredefRegisters ld a, $1 - jr asm_128fb + jr DrawHP_ -Func_128f6: ; 128f6 (4:68f6) +DrawHP2: ; 128f6 (4:68f6) call GetPredefRegisters ld a, $2 -asm_128fb: ; 128fb (4:68fb) - ld [wListMenuID], a ; wListMenuID + +DrawHP_: ; 128fb (4:68fb) + ld [wHPBarType], a push hl - ld a, [wcf99] + ld a, [wLoadedMonHP] ld b, a - ld a, [wcf9a] + ld a, [wLoadedMonHP + 1] ld c, a or b - jr nz, .asm_12913 + jr nz, .nonzeroHP xor a ld c, a ld e, a ld a, $6 ld d, a - jp Func_12924 -.asm_12913 - ld a, [wcfba] + jp .drawHPBarAndPrintFraction +.nonzeroHP + ld a, [wLoadedMonMaxHP] ld d, a - ld a, [wcfbb] + ld a, [wLoadedMonMaxHP + 1] ld e, a predef HPBarLength ld a, $6 ld d, a ld c, a - -Func_12924: ; 12924 (4:6924) +.drawHPBarAndPrintFraction pop hl push de push hl push hl call DrawHPBar pop hl - ld a, [$fff6] + ld a, [hFlags_0xFFF6] bit 0, a - jr z, .asm_12937 - ld bc, $9 - jr .asm_1293a -.asm_12937 - ld bc, $15 -.asm_1293a + jr z, .printFractionBelowBar + ld bc, $9 ; right of bar + jr .printFraction +.printFractionBelowBar + ld bc, SCREEN_WIDTH + 1 ; below bar +.printFraction add hl, bc - ld de, wcf99 + ld de, wLoadedMonHP ld bc, $203 call PrintNumber ld a, "/" ld [hli], a - ld de, wcfba + ld de, wLoadedMonMaxHP ld bc, $203 call PrintNumber pop hl diff --git a/engine/battle/4_2.asm b/engine/battle/4_2.asm index c5c6279654..bac0a2d13c 100755 --- a/engine/battle/4_2.asm +++ b/engine/battle/4_2.asm @@ -1,76 +1,77 @@ -Func_137aa: ; 137aa (4:77aa) - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_137eb +EndOfBattle: ; 137aa (4:77aa) + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .notLinkBattle +; link battle ld a, [wEnemyMonPartyPos] ld hl, wEnemyMon1Status ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes - ld a, [wEnemyMonStatus] ; wcfe9 + ld a, [wEnemyMonStatus] ld [hl], a call ClearScreen - callab Func_372d6 - ld a, [wcf0b] + callab DisplayLinkBattleVersusTextBox + ld a, [wBattleResult] cp $1 ld de, YouWinText - jr c, .asm_137de + jr c, .placeWinOrLoseString ld de, YouLoseText - jr z, .asm_137de + jr z, .placeWinOrLoseString ld de, DrawText -.asm_137de +.placeWinOrLoseString hlCoord 6, 8 call PlaceString ld c, $c8 call DelayFrames - jr .asm_1380a -.asm_137eb - ld a, [wcf0b] + jr .evolution +.notLinkBattle + ld a, [wBattleResult] and a - jr nz, .asm_13813 - ld hl, wcce5 + jr nz, .resetVariables + ld hl, wTotalPayDayMoney ld a, [hli] or [hl] inc hl or [hl] - jr z, .asm_1380a - ld de, wPlayerMoney + 2 ; wd349 + jr z, .evolution ; if pay day money is 0, jump + ld de, wPlayerMoney + 2 ld c, $3 predef AddBCDPredef ld hl, PickUpPayDayMoneyText call PrintText -.asm_1380a +.evolution xor a ld [wccd4], a - predef Func_3ad1c -.asm_13813 + predef EvolutionAfterBattle +.resetVariables xor a ld [wd083], a ld [wc02a], a - ld [W_ISINBATTLE], a ; W_ISINBATTLE - ld [W_BATTLETYPE], a ; wd05a - ld [W_MOVEMISSED], a ; W_MOVEMISSED - ld [W_CUROPPONENT], a ; wd059 + ld [W_ISINBATTLE], a + ld [W_BATTLETYPE], a + ld [W_MOVEMISSED], a + ld [W_CUROPPONENT], a ld [wd11f], a - ld [wd120], a - ld [wd078], a + ld [wNumRunAttempts], a + ld [wEscapedFromBattle], a ld hl, wcc2b ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld [wListScrollOffset], a ; wcc36 - ld hl, wd060 + ld [wListScrollOffset], a + ld hl, wPlayerStatsToDouble ld b, $18 -.asm_1383e +.loop ld [hli], a dec b - jr nz, .asm_1383e + jr nz, .loop ld hl, wd72c set 0, [hl] call WaitForSoundToFinish call GBPalWhiteOut ld a, $ff - ld [wd42f], a + ld [wDestinationWarpID], a ret YouWinText: ; 13853 (4:7853) @@ -86,95 +87,106 @@ PickUpPayDayMoneyText: ; 1386b (4:786b) TX_FAR _PickUpPayDayMoneyText db "@" -Func_13870: ; 13870 (4:7870) - ld a, [wcc57] +; try to initiate a wild pokemon encounter +; returns success in Z +TryDoWildEncounter: ; 13870 (4:7870) + ld a, [wNPCMovementScriptPointerTableNum] and a ret nz ld a, [wd736] and a ret nz - callab Func_c49d - jr nc, .asm_13888 -.asm_13884 + callab IsPlayerStandingOnDoorTileOrWarpTile + jr nc, .notStandingOnDoorOrWarpTile +.CantEncounter ld a, $1 and a ret -.asm_13888 - callab Func_128d8 - jr z, .asm_13884 - ld a, [wd0db] +.notStandingOnDoorOrWarpTile + callab IsPlayerJustOutsideMap + jr z, .CantEncounter + ld a, [wRepelRemainingSteps] and a jr z, .asm_1389e dec a - jr z, .asm_13905 - ld [wd0db], a + jr z, .lastRepelStep + ld [wRepelRemainingSteps], a .asm_1389e +; determine if wild pokmon can appear in the half-block were standing in +; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile? hlCoord 9, 9 ld c, [hl] ld a, [W_GRASSTILE] cp c - ld a, [W_GRASSRATE] ; W_GRASSRATE - jr z, .asm_138c4 - ld a, $14 + ld a, [W_GRASSRATE] + jr z, .CanEncounter + ld a, $14 ; in all tilesets with a water tile, this is its id cp c - ld a, [W_WATERRATE] ; wEnemyMon1Species - jr z, .asm_138c4 - ld a, [W_CURMAP] ; W_CURMAP - cp REDS_HOUSE_1F - jr c, .asm_13912 - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld a, [W_WATERRATE] + jr z, .CanEncounter +; even if not in grass/water, standing anywhere we can encounter pokmon +; so long as the map is indoor and has wild pokmon defined. +; as long as its not Viridian Forest or Safari Zone. + ld a, [W_CURMAP] + cp REDS_HOUSE_1F ; is this an indoor map? + jr c, .CantEncounter2 + ld a, [W_CURMAPTILESET] cp FOREST ; Viridian Forest/Safari Zone - jr z, .asm_13912 - ld a, [W_GRASSRATE] ; W_GRASSRATE -.asm_138c4 + jr z, .CantEncounter2 + ld a, [W_GRASSRATE] +.CanEncounter +; compare encounter chance with a random number to determine if there will be an encounter ld b, a ld a, [hRandomAdd] cp b - jr nc, .asm_13912 + jr nc, .CantEncounter2 ld a, [hRandomSub] ld b, a - ld hl, WildMonEncounterSlotChances ; $7918 -.asm_138d0 + ld hl, WildMonEncounterSlotChances +.determineEncounterSlot ld a, [hli] cp b - jr nc, .asm_138d7 + jr nc, .gotEncounterSlot inc hl - jr .asm_138d0 -.asm_138d7 + jr .determineEncounterSlot +.gotEncounterSlot +; determine which wild pokmon (grass or water) can appear in the half-block were standing in ld c, [hl] - ld hl, W_GRASSMONS ; wd888 - aCoord 8, 9 - cp $14 - jr nz, .asm_138e5 - ld hl, W_WATERMONS ; wd8a5 (aliases: wEnemyMon1HP) -.asm_138e5 + 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? + jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default + ld hl, W_WATERMONS +; since the bottom right tile of a "left shore" half-block is $14 but the bottom left tile is not, +; "left shore" half-blocks (such as the one in the east coast of Cinnabar) load grass encounters. +.gotWildEncounterType ld b, $0 add hl, bc ld a, [hli] - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL + ld [W_CURENEMYLVL], a ld a, [hl] ld [wcf91], a ld [wEnemyMonSpecies2], a - ld a, [wd0db] + ld a, [wRepelRemainingSteps] and a - jr z, .asm_13916 - ld a, [wPartyMon1Level] ; wPartyMon1Level + jr z, .willEncounter + ld a, [wPartyMon1Level] ld b, a - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld a, [W_CURENEMYLVL] cp b - jr c, .asm_13912 - jr .asm_13916 -.asm_13905 - ld [wd0db], a + 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 ; $ff8c + ld [H_DOWNARROWBLINKCNT2], a call EnableAutoTextBoxDrawing call DisplayTextID -.asm_13912 +.CantEncounter2 ld a, $1 and a ret -.asm_13916 +.willEncounter xor a ret @@ -195,16 +207,16 @@ WildMonEncounterSlotChances: ; 13918 (4:7918) db $FF, $12 ; 3/256 = 1.2% chance of slot 9 RecoilEffect_: ; 1392c (4:792c) - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] ; wcfd2 - ld hl, wBattleMonMaxHP ; wd023 + ld a, [W_PLAYERMOVENUM] + ld hl, wBattleMonMaxHP jr z, .asm_1393d - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM - ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP + ld a, [W_ENEMYMOVENUM] + ld hl, wEnemyMonMaxHP .asm_1393d ld d, a - ld a, [W_DAMAGE] ; W_DAMAGE + ld a, [W_DAMAGE] ld b, a ld a, [W_DAMAGE + 1] ld c, a @@ -248,16 +260,16 @@ RecoilEffect_: ; 1392c (4:792c) ld [hl], a .asm_13982 hlCoord 10, 9 - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a ld a, $1 jr z, .asm_13990 hlCoord 2, 2 xor a .asm_13990 - ld [wListMenuID], a ; wListMenuID + ld [wHPBarType], a predef UpdateHPBar2 - ld hl, HitWithRecoilText ; $799e + ld hl, HitWithRecoilText jp PrintText HitWithRecoilText: ; 1399e (4:799e) TX_FAR _HitWithRecoilText @@ -276,15 +288,15 @@ ConversionEffect_: ; 139a3 (4:79a3) pop de ld a, [W_PLAYERBATTSTATUS1] .asm_139b8 - bit 6, a ; is mon immune to typical attacks (dig/fly) + bit Invulnerable, a ; is mon immune to typical attacks (dig/fly) jr nz, PrintButItFailedText ld a, [hli] ld [de], a inc de ld a, [hl] ld [de], a - ld hl, Func_3fba8 - call Func_139d5 + ld hl, PlayCurrentMoveAnimation + call CallBankF ld hl, ConvertedTypeText jp PrintText @@ -294,22 +306,22 @@ ConvertedTypeText: ; 139cd (4:79cd) PrintButItFailedText: ; 139d2 (4:79d2) ld hl, PrintButItFailedText_ -Func_139d5: ; 139d5 (4:79d5) +CallBankF: ; 139d5 (4:79d5) ld b, BANK(PrintButItFailedText_) jp Bankswitch HazeEffect_: ; 139da (4:79da) ld a, $7 ld hl, wPlayerMonAttackMod - call Func_13a43 + call ResetStatMods ld hl, wEnemyMonAttackMod - call Func_13a43 - ld hl, wcd12 + call ResetStatMods + ld hl, wPlayerMonUnmodifiedAttack ld de, wBattleMonAttack - call Func_13a4a - ld hl, wcd26 + call ResetStats + ld hl, wEnemyMonUnmodifiedAttack ld de, wEnemyMonAttack - call Func_13a4a + call ResetStats ld hl, wEnemyMonStatus ld de, wEnemySelectedMove ld a, [H_WHOSETURN] @@ -334,26 +346,26 @@ HazeEffect_: ; 139da (4:79da) ld [hli], a ld [hl], a ld hl, W_PLAYERBATTSTATUS1 - call Func_13a37 + call CureStatuses ld hl, W_ENEMYBATTSTATUS1 - call Func_13a37 - ld hl, Func_3fba8 - call Func_139d5 + call CureStatuses + ld hl, PlayCurrentMoveAnimation + call CallBankF ld hl, StatusChangesEliminatedText jp PrintText -Func_13a37: ; 13a37 (4:7a37) - res 7, [hl] - inc hl +CureStatuses: ; 13a37 (4:7a37) + res Confused, [hl] + inc hl ; BATTSTATUS2 ld a, [hl] - and $78 - ld [hli], a + and (1 << UsingRage) | (1 << NeedsToRecharge) | (1 << HasSubstituteUp) | (1 << 3) ; clear all but these from BATTSTATUS2 + ld [hli], a ; BATTSTATUS3 ld a, [hl] - and $f8 + and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses ld [hl], a ret -Func_13a43: ; 13a43 (4:7a43) +ResetStatMods: ; 13a43 (4:7a43) ld b, $8 .loop ld [hli], a @@ -361,7 +373,7 @@ Func_13a43: ; 13a43 (4:7a43) jr nz, .loop ret -Func_13a4a: ; 13a4a (4:7a4a) +ResetStats: ; 13a4a (4:7a4a) ld b, $8 .loop ld a, [hli] @@ -376,12 +388,12 @@ StatusChangesEliminatedText: ; 13a53 (4:7a53) db "@" GetTrainerName_: ; 13a58 (4:7a58) - ld hl, W_GRASSRATE ; W_GRASSRATE - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE + ld hl, W_GRASSRATE + ld a, [wLinkState] and a jr nz, .rival - ld hl, W_RIVALNAME ; wd34a - ld a, [W_TRAINERCLASS] ; wd031 + ld hl, W_RIVALNAME + ld a, [W_TRAINERCLASS] cp SONY1 jr z, .rival cp SONY2 @@ -390,8 +402,8 @@ GetTrainerName_: ; 13a58 (4:7a58) jr z, .rival ld [wd0b5], a ld a, TRAINER_NAME - ld [W_LISTTYPE], a - ld a, $e + ld [wNameListType], a + ld a, BANK(TrainerNames) ld [wPredefBank], a call GetName ld hl, wcd6d diff --git a/engine/battle/5.asm b/engine/battle/5.asm index 6c7a642e3f..ef3e136298 100755 --- a/engine/battle/5.asm +++ b/engine/battle/5.asm @@ -4,7 +4,7 @@ SubstituteEffectHandler: ; 17dad (5:7dad) ld hl, wBattleMonMaxHP ld de, wPlayerSubstituteHP ld bc, W_PLAYERBATTSTATUS2 - ld a, [$fff3] ;whose turn? + ld a, [H_WHOSETURN] and a jr z, .notEnemy ld hl, wEnemyMonMaxHP @@ -12,7 +12,7 @@ SubstituteEffectHandler: ; 17dad (5:7dad) ld bc, W_ENEMYBATTSTATUS2 .notEnemy ld a, [bc] ;load flags - bit 4, a ;user already has substitute? + bit HasSubstituteUp, a ;user already has substitute? jr nz, .alreadyHasSubstitute ;skip this code if so ;user doesn't have a substitute [yet] push bc @@ -23,8 +23,8 @@ SubstituteEffectHandler: ; 17dad (5:7dad) srl a rr b push de - ld de, $fff2 ;subtract 8 to point to [current hp] instead of [max hp] - add hl, de ;HL -= 8 + ld de, wBattleMonHP - wBattleMonMaxHP + add hl, de ; point hl to current HP pop de ld a, b ld [de], a ;save copy of HP to subtract in ccd7/ccd8 [how much HP substitute has] @@ -41,20 +41,20 @@ SubstituteEffectHandler: ; 17dad (5:7dad) ld [hl], d ;store low byte HP ld h, b ld l, c - set 4, [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, Func_3fba8 ; $7ba8 ;animation enabled: 0F:7BA8 - ld b, BANK(Func_3fba8) + 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 + ld b, BANK(PlayCurrentMoveAnimation) jr z, .animationEnabled - ld hl, AnimationSubstitute ;animation disabled: 1E:56E0 + ld hl, AnimationSubstitute ;animation disabled: 1E:56E0 ld b, BANK(AnimationSubstitute) .animationEnabled call Bankswitch ;jump to routine depending on animation setting ld hl, SubstituteText call PrintText - ld hl, Func_3cd5a - ld b, BANK(Func_3cd5a) + ld hl, DrawHUDsAndHPBars + ld b, BANK(DrawHUDsAndHPBars) jp Bankswitch .alreadyHasSubstitute ld hl, HasSubstituteText diff --git a/engine/battle/9.asm b/engine/battle/9.asm index 28b7c48628..daafbbb223 100755 --- a/engine/battle/9.asm +++ b/engine/battle/9.asm @@ -1,37 +1,45 @@ -Func_27d6b: ; 27d6b (9:7d6b) +; [wd0b5] = pokemon ID +; hl = dest addr +PrintMonType: ; 27d6b (9:7d6b) call GetPredefRegisters push hl call GetMonHeader pop hl push hl ld a, [W_MONHTYPE1] - call Func_27d89 + call PrintType ld a, [W_MONHTYPE1] ld b, a ld a, [W_MONHTYPE2] cp b pop hl - jr z, asm_27d8c - ld bc, $28 + jr z, EraseType2Text + ld bc, SCREEN_WIDTH * 2 add hl, bc -Func_27d89: ; 27d89 (9:7d89) +; a = type +; hl = dest addr +PrintType: ; 27d89 (9:7d89) push hl - jr asm_27d9f -asm_27d8c: ; 27d8c (9:7d8c) - ld a, $7f + jr PrintType_ + +; erase "TYPE2/" if the mon only has 1 type +EraseType2Text: ; 27d8c (9:7d8c) + ld a, " " ld bc, $13 add hl, bc ld bc, $6 jp FillMemory -Func_27d98: ; 27d98 (9:7d98) +PrintMoveType: ; 27d98 (9:7d98) call GetPredefRegisters push hl - ld a, [W_PLAYERMOVETYPE] ; wcfd5 -asm_27d9f: ; 27d9f (9:7d9f) + ld a, [W_PLAYERMOVETYPE] +; fall through + +PrintType_: ; 27d9f (9:7d9f) add a - ld hl, TypeNamePointers ; $7dae + ld hl, TypeNames ld e, a ld d, $0 add hl, de @@ -160,19 +168,19 @@ SaveTrainerName: ; 27e4a (9:7e4a) ; db "ACE TRAINER♀@" FocusEnergyEffect_: ; 27f86 (9:7f86) - ld hl, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS2 + ld a, [H_WHOSETURN] and a - jr z, .asm_27f91 - ld hl, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 -.asm_27f91 - bit 2, [hl] ; is mon already using focus energy? - jr nz, .asm_27fa5 - set 2, [hl] ; mon is now using focus energy - callab Func_3fba8 - ld hl, GettingPumpedText ; $7fb2 + jr z, .notEnemy + ld hl, W_ENEMYBATTSTATUS2 +.notEnemy + bit GettingPumped, [hl] ; is mon already using focus energy? + jr nz, .alreadyUsing + set GettingPumped, [hl] ; mon is now using focus energy + callab PlayCurrentMoveAnimation + ld hl, GettingPumpedText jp PrintText -.asm_27fa5 +.alreadyUsing ld c, $32 call DelayFrames ld hl, PrintButItFailedText_ diff --git a/engine/battle/a.asm b/engine/battle/a.asm index fd3ef40b0f..a257d1434a 100755 --- a/engine/battle/a.asm +++ b/engine/battle/a.asm @@ -18,10 +18,10 @@ LeechSeedEffect_: ; 2bea9 (a:7ea9) ld a, [de] cp GRASS jr z, .asm_2bee7 - bit 7, [hl] + bit Seeded, [hl] jr nz, .asm_2bee7 - set 7, [hl] - callab Func_3fba8 + set Seeded, [hl] + callab PlayCurrentMoveAnimation ld hl, WasSeededText ; $7ef2 jp PrintText .asm_2bee7 diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index b3e93da4f8..6ad2279bc1 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -367,12 +367,15 @@ AnimationTileset2: ; 786ee (1e:46ee) INCBIN "gfx/attack_anim_2.2bpp" SlotMachineTiles2: ; 78bde (1e:4bde) -IF _RED +IF DEF(_RED) INCBIN "gfx/red/slotmachine2.2bpp" ENDC -IF _BLUE +IF DEF(_BLUE) INCBIN "gfx/blue/slotmachine2.2bpp" ENDC +IF DEF(_YELLOW) + INCBIN "gfx/yellow/slotmachine2.2bpp" +ENDC MoveAnimation: ; 78d5e (1e:4d5e) push hl @@ -517,7 +520,7 @@ Func_78e01: ; 78e01 (1e:4e01) ret Func_78e23: ; 78e23 (1e:4e23) - ld a, [wcf1b] + ld a, [wOnSGB] and a ld a, $e4 jr z, .asm_78e47 @@ -525,9 +528,9 @@ Func_78e23: ; 78e23 (1e:4e23) ld [wcc79], a ld b, $e4 ld a, [W_ANIMATIONID] ; W_ANIMATIONID - cp $aa + cp TRADE_BALL_DROP_ANIM jr c, .asm_78e3f - cp $ae + cp TRADE_BALL_POOF_ANIM + 1 jr nc, .asm_78e3f ld b, $f0 .asm_78e3f @@ -697,13 +700,13 @@ AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5) db ROCK_SLIDE dw DoRockSlideSpecialEffects - db $AA + db TRADE_BALL_DROP_ANIM dw Func_79041 - db $AB + db TRADE_BALL_SHAKE_ANIM dw Func_7904c - db $AC + db TRADE_BALL_TILT_ANIM dw Func_7907c db TOSS_ANIM @@ -957,9 +960,9 @@ Func_7907c ; 507C ld c,5 call DelayFrames pop bc - ld a,[$ffae] ; background scroll X + ld a,[hSCX] ; background scroll X sub a,8 ; scroll to the left - ld [$ffae],a + ld [hSCX],a pop de jr .loop @@ -1091,7 +1094,7 @@ CallWithTurnFlipped: ; 79155 (1e:5155) AnimationFlashScreenLong: ; 79165 (1e:5165) ld a,3 ; cycle through the palettes 3 times ld [wd08a],a - ld a,[wcf1b] ; running on SGB? + ld a,[wOnSGB] ; running on SGB? and a ld hl,FlashScreenLongMonochrome jr z,.loop @@ -1211,7 +1214,7 @@ Func_791f9: ; 791f9 (1e:51f9) ld bc, $4040 Func_791fc: ; 791fc (1e:51fc) - ld a, [wcf1b] + ld a, [wOnSGB] and a ld a, b jr z, .asm_79204 @@ -1304,9 +1307,9 @@ AnimationSlideMonUp: ; 7927a (1e:527a) AnimationSlideMonDown: ; 79297 (1e:5297) ; Slides the mon's sprite down out of the screen. xor a - call Func_79842 + call GetTileIDList .asm_7929b - call Func_79820 + call GetMonSpriteTileMapPointerFromRowCount push bc push de call Func_79aae @@ -1411,50 +1414,50 @@ Func_79329: ; 79329 (1e:5329) ld [hli], a ret -Func_79337: ; 79337 (1e:5337) +AdjustOAMBlockXPos: ; 79337 (1e:5337) ld l, e ld h, d -Func_79339: ; 79339 (1e:5339) +AdjustOAMBlockXPos2: ; 79339 (1e:5339) ld de, $4 -.asm_7933c +.loop ld a, [wd08a] ld b, a ld a, [hl] add b cp $a8 - jr c, .asm_7934a + jr c, .skipPuttingEntryOffScreen dec hl ld a, $a0 ld [hli], a -.asm_7934a +.skipPuttingEntryOffScreen ld [hl], a add hl, de dec c - jr nz, .asm_7933c + jr nz, .loop ret -Func_79350: ; 79350 (1e:5350) +AdjustOAMBlockYPos: ; 79350 (1e:5350) ld l, e ld h, d -Func_79352: ; 79352 (1e:5352) +AdjustOAMBlockYPos2: ; 79352 (1e:5352) ld de, $4 -.asm_79355 +.loop ld a, [wd08a] ld b, a ld a, [hl] add b cp $70 - jr c, .asm_79363 + jr c, .skipSettingPreviousEntrysAttribute dec hl - ld a, $a0 + ld a, $a0 ; bug, sets previous OAM entry's attribute ld [hli], a -.asm_79363 +.skipSettingPreviousEntrysAttribute ld [hl], a add hl, de dec c - jr nz, .asm_79355 + jr nz, .loop ret AnimationBlinkEnemyMon: ; 79369 (1e:5369) @@ -1495,8 +1498,8 @@ AnimationFlashEnemyMonPic: ; 79398 (1e:5398) AnimationShowMonPic: ; 7939e (1e:539e) xor a - call Func_79842 - call Func_79820 + call GetTileIDList + call GetMonSpriteTileMapPointerFromRowCount call Func_79aae jp Delay3 @@ -1530,7 +1533,7 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1) push af push hl push hl - call Func_79842 + call GetTileIDList pop hl call Func_79aae call Delay3 @@ -1538,7 +1541,7 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1) ld bc, $0709 call ClearScreenArea pop af - call Func_79842 + call GetTileIDList pop hl call Func_79aae call Delay3 @@ -1565,7 +1568,7 @@ AnimationMoveMonHorizontally: ; 793f9 (1e:53f9) .asm_79407 xor a push hl - call Func_79842 + call GetTileIDList pop hl call Func_79aae ld c, $3 @@ -1860,8 +1863,8 @@ AnimationSlideMonDownAndHide: ; 795c9 (1e:55c9) call AnimationHideMonPic pop af push af - call Func_79842 - call Func_79820 + call GetTileIDList + call GetMonSpriteTileMapPointerFromRowCount call Func_79aae ld c, $8 call DelayFrames @@ -1962,7 +1965,7 @@ AnimationWavyScreen: ; 79666 (1e:5666) xor a ld [H_AUTOBGTRANSFERENABLED], a ld a, $90 - ld [$ffb0], a + ld [hWY], a ld d, $80 ld e, $8f ld c, $ff @@ -1984,7 +1987,7 @@ AnimationWavyScreen: ; 79666 (1e:5666) dec c jr nz, .asm_7967f xor a - ld [$ffb0], a + ld [hWY], a call SaveScreenTilesToBuffer2 call ClearScreen ld a, $1 @@ -2130,8 +2133,8 @@ Func_79793: ; 79793 (1e:5793) call GetMonHeader predef LoadMonBackPic xor a - call Func_79842 - call Func_79820 + call GetTileIDList + call GetMonSpriteTileMapPointerFromRowCount call Func_79aae pop af ld [wBattleMonSpecies2], a @@ -2191,37 +2194,46 @@ Func_7980c: ; 7980c (1e:580c) pop hl ret -Func_79820: ; 79820 (1e:5820) +; 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) push de - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - jr nz, .asm_7982a - ld a, $65 - jr .asm_7982c -.asm_7982a - ld a, $c -.asm_7982c + jr nz, .enemyTurn + ld a, 20 * 5 + 1 + jr .next +.enemyTurn + ld a, 12 +.next ld hl, wTileMap ld e, a - ld d, $0 + ld d, 0 add hl, de - ld a, $7 + ld a, 7 sub b and a - jr z, .asm_79840 - ld de, $14 -.asm_7983c + jr z, .done + ld de, 20 +.loop add hl, de dec a - jr nz, .asm_7983c -.asm_79840 + jr nz, .loop +.done pop de ret -Func_79842: ; 79842 (1e:5842) - ld hl, PointerTable_79aea ; $5aea +; Input: +; a = tile ID list index +; Output: +; de = tile ID list pointer +; b = number of rows +; c = number of columns +GetTileIDList: ; 79842 (1e:5842) + ld hl, TileIDListPointerTable ld e, a - ld d, $0 + ld d, 0 add hl, de add hl, de add hl, de @@ -2315,181 +2327,182 @@ IsCryMove: ; 798ad (1e:58ad) ret MoveSoundTable: ; 798bc (1e:58bc) - db $a0,$00,$80 - db $a2,$10,$80 - db $b3,$00,$80 - db $a1,$01,$80 - db $a3,$00,$40 - db $e9,$00,$ff - db $a3,$10,$60 - db $a3,$20,$80 - db $a3,$00,$a0 - db $a6,$00,$80 - db $a5,$20,$40 - db $a5,$00,$80 - db $a4,$00,$a0 - db $a7,$10,$c0 - db $a7,$00,$a0 - db $a8,$00,$c0 - db $a8,$10,$a0 - db $a9,$00,$e0 - db $a7,$20,$c0 - db $aa,$00,$80 - db $b9,$00,$80 - db $ab,$01,$80 - db $b7,$00,$80 - db $ad,$f0,$40 - db $b0,$00,$80 - db $ad,$00,$80 - db $b8,$10,$80 - db $b1,$01,$a0 - db $ae,$00,$80 - db $b4,$00,$60 - db $b4,$01,$40 - db $b6,$00,$a0 - db $b0,$10,$a0 - db $b7,$00,$c0 - db $aa,$10,$60 - db $b0,$00,$a0 - db $b9,$11,$c0 - db $b0,$20,$c0 - db $b8,$00,$80 - db $b1,$00,$80 - db $b1,$20,$c0 - db $af,$00,$80 - db $db,$ff,$40 - db $b4,$00,$80 - db $a1,$00,$c0 - db $a1,$00,$40 - db $e4,$00,$80 - db $bf,$40,$60 - db $bf,$00,$80 - db $bf,$ff,$40 - db $c7,$80,$c0 - db $af,$10,$a0 - db $af,$21,$e0 - db $c5,$00,$80 - db $bb,$20,$60 - db $c7,$00,$80 - db $cc,$00,$80 - db $c2,$40,$80 - db $c5,$f0,$e0 - db $cf,$00,$80 - db $c7,$f0,$60 - db $c2,$00,$80 - db $e6,$00,$80 - db $9d,$01,$a0 - db $a9,$f0,$20 - db $ba,$01,$c0 - db $ba,$00,$80 - db $b0,$00,$e0 - db $be,$01,$60 - db $be,$20,$40 - db $bb,$00,$80 - db $bb,$40,$c0 - db $b1,$03,$60 - db $bd,$11,$e0 - db $a8,$20,$e0 - db $d2,$00,$80 - db $b2,$00,$80 - db $b2,$11,$a0 - db $b2,$01,$c0 - db $a9,$14,$c0 - db $b1,$02,$a0 - db $c5,$f0,$80 - db $c5,$20,$c0 - db $d5,$00,$20 - db $d5,$20,$80 - db $d2,$12,$60 - db $be,$00,$80 - db $aa,$01,$e0 - db $c5,$0f,$e0 - db $c5,$11,$20 - db $a6,$10,$40 - db $a5,$10,$c0 - db $aa,$00,$20 - db $d8,$00,$80 - db $e4,$11,$18 - db $9f,$20,$c0 - db $9e,$20,$c0 - db $bd,$00,$10 - db $be,$f0,$20 - db $df,$f0,$c0 - db $a7,$f0,$e0 - db $9f,$f0,$40 - db $db,$00,$80 - db $df,$80,$40 - db $df,$00,$80 - db $aa,$11,$20 - db $aa,$22,$10 - db $b1,$f1,$ff - db $a9,$f1,$ff - db $aa,$33,$30 - db $dd,$40,$c0 - db $a4,$20,$20 - db $a4,$f0,$10 - db $a5,$f8,$10 - db $a7,$f0,$10 - db $bd,$00,$80 - db $ae,$00,$c0 - db $dd,$c0,$ff - db $9f,$f2,$20 - db $e1,$00,$80 - db $e1,$00,$40 - db $9f,$00,$40 - db $a7,$10,$ff - db $c7,$20,$20 - db $dd,$00,$80 - db $c5,$1f,$20 - db $bd,$2f,$80 - db $a5,$1f,$ff - db $ca,$1f,$60 - db $be,$1e,$20 - db $be,$1f,$18 - db $aa,$0f,$80 - db $9f,$f8,$10 - db $9e,$18,$20 - db $dd,$08,$40 - db $ad,$01,$e0 - db $a7,$09,$ff - db $e4,$42,$01 - db $b2,$00,$ff - db $dd,$08,$e0 - db $bb,$00,$80 - db $9f,$88,$10 - db $bd,$48,$ff - db $9e,$ff,$ff - db $bb,$ff,$10 - db $9e,$ff,$04 - db $b2,$01,$ff - db $a9,$f8,$ff - db $a2,$f0,$f0 - db $a5,$08,$10 - db $a3,$f0,$ff - db $b0,$f0,$ff - db $e1,$10,$ff - db $a4,$f0,$20 - db $ca,$f0,$60 - db $b8,$12,$10 - db $e6,$f0,$20 - db $b4,$12,$ff - db $db,$80,$04 - db $df,$f0,$10 - db $c5,$f8,$ff - db $be,$f0,$ff - db $a7,$01,$ff - db $cc,$d8,$04 - db $a1,$00,$80 - db $a1,$00,$80 + 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) - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld a, $31 + ld a, $31 ; base tile ID of player mon sprite jr z, .asm_79ab6 - xor a +; enemy turn + xor a ; base tile ID of enemy mon sprite .asm_79ab6 - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [hBaseTileID], a jr asm_79acb Func_79aba: ; 79aba (1e:5aba) @@ -2503,34 +2516,36 @@ Func_79aba: ; 79aba (1e:5aba) ld de, Unknown_79b1b ; $5b1b asm_79acb: ; 79acb (1e:5acb) xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a -Func_79ace: ; 79ace (1e:5ace) +; b = number of rows +; c = number of columns +CopyTileIDs: ; 79ace (1e:5ace) push hl -.asm_79acf +.rowLoop push bc push hl - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b + ld a, [hBaseTileID] ld b, a -.asm_79ad4 +.columnLoop ld a, [de] add b inc de ld [hli], a dec c - jr nz, .asm_79ad4 + jr nz, .columnLoop pop hl - ld bc, $14 + ld bc, 20 add hl, bc pop bc dec b - jr nz, .asm_79acf + jr nz, .rowLoop ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a pop hl ret -PointerTable_79aea: ; 79aea (1e:5aea) +TileIDListPointerTable: ; 79aea (1e:5aea) dw Unknown_79b24 db $77 dw Unknown_79b55 @@ -2549,34 +2564,79 @@ PointerTable_79aea: ; 79aea (1e:5aea) db $3C Unknown_79b02: ; 79b02 (1e:5b02) - db $31,$38,$46,$54,$5B,$32,$39,$47,$55,$5C,$34,$3B,$49,$57,$5E,$36,$3D,$4B,$59,$60,$37,$3E,$4C,$5A,$61 + 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) - db $31,$46,$5B,$34,$49,$5E,$37,$4C,$61 + db $31,$46,$5B + db $34,$49,$5E + db $37,$4C,$61 Unknown_79b24: ; 79b24 (1e:5b24) - db $00,$07,$0E,$15,$1C,$23,$2A,$01,$08,$0F,$16,$1D,$24,$2B,$02,$09,$10,$17,$1E,$25,$2C,$03,$0A,$11,$18,$1F,$26,$2D,$04,$0B,$12,$19,$20,$27,$2E,$05,$0C,$13,$1A,$21,$28,$2F,$06,$0D,$14,$1B,$22,$29,$30 + db $00,$07,$0E,$15,$1C,$23,$2A + db $01,$08,$0F,$16,$1D,$24,$2B + db $02,$09,$10,$17,$1E,$25,$2C + db $03,$0A,$11,$18,$1F,$26,$2D + db $04,$0B,$12,$19,$20,$27,$2E + db $05,$0C,$13,$1A,$21,$28,$2F + db $06,$0D,$14,$1B,$22,$29,$30 Unknown_79b55: ; 79b55 (1e:5b55) - db $00,$07,$0E,$15,$1C,$23,$2A,$01,$08,$0F,$16,$1D,$24,$2B,$03,$0A,$11,$18,$1F,$26,$2D,$04,$0B,$12,$19,$20,$27,$2E,$05,$0C,$13,$1A,$21,$28,$2F + 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) - db $00,$07,$0E,$15,$1C,$23,$2A,$02,$09,$10,$17,$1E,$25,$2C,$04,$0B,$12,$19,$20,$27,$2E + 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) - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$19,$00,$02,$06,$0B,$10,$14,$1A,$00,$00,$07,$0C,$11,$15,$1B,$00,$03,$08,$0D,$12,$16,$1C,$00,$04,$09,$0E,$13,$17,$1D,$1F,$05,$0A,$0F,$01,$18,$1E,$20 + db $00,$00,$00,$00,$00,$00,$00 + db $00,$00,$00,$00,$00,$19,$00 + db $02,$06,$0B,$10,$14,$1A,$00 + db $00,$07,$0C,$11,$15,$1B,$00 + db $03,$08,$0D,$12,$16,$1C,$00 + db $04,$09,$0E,$13,$17,$1D,$1F + db $05,$0A,$0F,$01,$18,$1E,$20 Unknown_79bbe: ; 79bbe (1e:5bbe) - db $00,$00,$00,$30,$00,$37,$00,$00,$00,$2B,$31,$34,$38,$3D,$21,$26,$2C,$01,$35,$39,$3E,$22,$27,$2D,$32,$36,$01,$00,$23,$28,$2E,$33,$01,$3A,$00,$24,$29,$2F,$01,$01,$3B,$00,$25,$2A,$01,$01,$01,$3C,$00 + db $00,$00,$00,$30,$00,$37,$00 + db $00,$00,$2B,$31,$34,$38,$3D + db $21,$26,$2C,$01,$35,$39,$3E + db $22,$27,$2D,$32,$36,$01,$00 + db $23,$28,$2E,$33,$01,$3A,$00 + db $24,$29,$2F,$01,$01,$3B,$00 + db $25,$2A,$01,$01,$01,$3C,$00 Unknown_79bef: ; 79bef (1e:5bef) - db $00,$00,$00,$00,$00,$00,$00,$00,$00,$47,$4D,$00,$00,$00,$00,$00,$48,$4E,$52,$56,$5B,$3F,$43,$49,$4F,$53,$57,$5C,$40,$44,$4A,$50,$54,$58,$00,$41,$45,$4B,$51,$4C,$59,$5D,$42,$46,$4C,$4C,$55,$5A,$5E + db $00,$00,$00,$00,$00,$00,$00 + db $00,$00,$47,$4D,$00,$00,$00 + db $00,$00,$48,$4E,$52,$56,$5B + db $3F,$43,$49,$4F,$53,$57,$5C + db $40,$44,$4A,$50,$54,$58,$00 + db $41,$45,$4B,$51,$4C,$59,$5D + db $42,$46,$4C,$4C,$55,$5A,$5E Unknown_79c20: ; 79c20 (1e:5c20) - db $31,$32,$32,$32,$32,$33,$34,$35,$36,$36,$37,$38,$34,$39,$3A,$3A,$3B,$38,$3C,$3D,$3E,$3E,$3F,$40,$41,$42,$43,$43,$44,$45,$46,$47,$43,$48,$49,$4A,$41,$43,$4B,$4C,$4D,$4E,$4F,$50,$50,$50,$51,$52 + db $31,$32,$32,$32,$32,$33 + db $34,$35,$36,$36,$37,$38 + db $34,$39,$3A,$3A,$3B,$38 + db $3C,$3D,$3E,$3E,$3F,$40 + db $41,$42,$43,$43,$44,$45 + db $46,$47,$43,$48,$49,$4A + db $41,$43,$4B,$4C,$4D,$4E + db $4F,$50,$50,$50,$51,$52 Unknown_79c50: ; 79c50 (1e:5c50) - db $43,$55,$56,$53,$53,$53,$53,$53,$53,$53,$53,$53,$43,$57,$58,$54,$54,$54,$54,$54,$54,$54,$54,$54,$43,$59,$5A,$43,$43,$43,$43,$43,$43,$43,$43,$43 + 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) ; Makes leaves float down from the top of the screen. This is used @@ -2740,15 +2800,15 @@ AnimationShakeEnemyHUD: ; 79d77 (1e:5d77) ld bc, 7 * 7 call CopyVideoData xor a - ld [$ffae], a + ld [hSCX], a ld hl, vBGMap0 call Func_79e0d ld a, $90 - ld [$ffb0], a + ld [hWY], a ld hl, vBGMap0 + $320 call Func_79e0d ld a, $38 - ld [$ffb0], a + ld [hWY], a call Func_792fd ld hl, vBGMap0 call Func_79e0d @@ -2759,11 +2819,11 @@ AnimationShakeEnemyHUD: ; 79d77 (1e:5d77) call AnimationShowMonPic call ClearSprites ld a, $90 - ld [$ffb0], a + ld [hWY], a ld hl, vBGMap1 call Func_79e0d xor a - ld [$ffb0], a + ld [hWY], a call SaveScreenTilesToBuffer1 ld hl, vBGMap0 call Func_79e0d @@ -2773,34 +2833,36 @@ AnimationShakeEnemyHUD: ; 79d77 (1e:5d77) ld hl, vBGMap1 jp Func_79e0d -Func_79dda: ; 79dda (1e:5dda) +; b = tile ID list index +; c = base tile ID +CopyTileIDsFromList: ; 79dda (1e:5dda) call GetPredefRegisters ld a, c - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [hBaseTileID], a ld a, b push hl - call Func_79842 + call GetTileIDList pop hl - jp Func_79ace + jp CopyTileIDs Func_79de9: ; 79de9 (1e:5de9) - ld a, [$ffae] + ld a, [hSCX] ld [wTrainerSpriteOffset], a .asm_79dee ld a, [wTrainerSpriteOffset] add d - ld [$ffae], a + ld [hSCX], a ld c, $2 call DelayFrames ld a, [wTrainerSpriteOffset] sub d - ld [$ffae], a + ld [hSCX], a ld c, $2 call DelayFrames dec e jr nz, .asm_79dee ld a, [wTrainerSpriteOffset] - ld [$ffae], a + ld [hSCX], a ret Func_79e0d: ; 79e0d (1e:5e0d) @@ -2859,10 +2921,10 @@ TossBallAnimation: ; 79e16 (1e:5e16) .PokeBallAnimations: ; 79e50 (1e:5e50) ; sequence of animations that make up the Poké Ball toss - db POOF_ANIM,HIDEPIC_ANIM,$C2,POOF_ANIM,SHOWPIC_ANIM + db POOF_ANIM,HIDEPIC_ANIM,SHAKE_ANIM,POOF_ANIM,SHOWPIC_ANIM .BlockBall ; 5E55 - ld a,$C1 + ld a,TOSS_ANIM ld [W_ANIMATIONID],a call PlayAnimation ld a,(SFX_08_43 - SFX_Headers_08) / 3 diff --git a/engine/battle/b_2.asm b/engine/battle/b_2.asm index e343f1aafd..4a49bb1054 100755 --- a/engine/battle/b_2.asm +++ b/engine/battle/b_2.asm @@ -88,40 +88,40 @@ PayDayEffect_ ; 2feb8 (b:7eb8) xor a ld hl, wcd6d ld [hli], a - ld a, [$fff3] + ld a, [H_WHOSETURN] and a ld a, [wBattleMonLevel] - jr z, .asm_2fec8 ; 0x2fec3 $3 + jr z, .asm_2fec8 ld a, [wEnemyMonLevel] .asm_2fec8 add a - ld [$ff98], a + ld [H_DIVIDEND + 3], a xor a - ld [$ff95], a - ld [$ff96], a - ld [$ff97], a + ld [H_DIVIDEND], a + ld [H_DIVIDEND + 1], a + ld [H_DIVIDEND + 2], a ld a, $64 - ld [$ff99], a + ld [H_DIVISOR], a ld b, $4 call Divide - ld a, [$ff98] + ld a, [H_QUOTIENT + 3] ld [hli], a - ld a, [$ff99] - ld [$ff98], a + ld a, [H_REMAINDER] + ld [H_DIVIDEND + 3], a ld a, $a - ld [$ff99], a + ld [H_DIVISOR], a ld b, $4 call Divide - ld a, [$ff98] + ld a, [H_QUOTIENT + 3] swap a ld b, a - ld a, [$ff99] + ld a, [H_REMAINDER] add b ld [hl], a - ld de, wcce7 + ld de, wTotalPayDayMoney + 2 ld c, $3 predef AddBCDPredef - ld hl, CoinsScatteredText ; $7f04 + ld hl, CoinsScatteredText jp PrintText CoinsScatteredText: ; 2ff04 (b:7f04) diff --git a/engine/battle/c.asm b/engine/battle/c.asm index c1347d24ab..b7c20ef6bf 100755 --- a/engine/battle/c.asm +++ b/engine/battle/c.asm @@ -5,10 +5,10 @@ MistEffect_: ; 33f2b (c:7f2b) jr z, .asm_33f36 ld hl, W_ENEMYBATTSTATUS2 .asm_33f36 - bit 1, [hl] ; is mon protected by mist? + bit ProtectedByMist, [hl] ; is mon protected by mist? jr nz, .asm_33f4a - set 1, [hl] ; mon is now protected by mist - callab Func_3fba8 + set ProtectedByMist, [hl] ; mon is now protected by mist + callab PlayCurrentMoveAnimation ld hl, ShroudedInMistText jp PrintText .asm_33f4a @@ -21,12 +21,12 @@ ShroudedInMistText: ; 33f52 (c:7f52) db "@" OneHitKOEffect_: ; 33f57 (c:7f57) - ld hl, W_DAMAGE ; W_DAMAGE + ld hl, W_DAMAGE xor a ld [hli], a ld [hl], a ; set the damage output to zero dec a - ld [wd05e], a + ld [wCriticalHitOrOHKO], a ld hl, wBattleMonSpeed + 1 ld de, wEnemyMonSpeed + 1 ld a, [H_WHOSETURN] ; $fff3 @@ -45,14 +45,14 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld a, [hl] sbc b jr c, .asm_33f8a - ld hl, W_DAMAGE ; W_DAMAGE + ld hl, W_DAMAGE ld a, $ff ld [hli], a ld [hl], a ld a, $2 - ld [wd05e], a + ld [wCriticalHitOrOHKO], a ret .asm_33f8a ld a, $1 - ld [W_MOVEMISSED], a ; W_MOVEMISSED + ld [W_MOVEMISSED], a ret diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 280588601f..98ffc4aaae 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1,7 +1,8 @@ BattleCore: ; These are move effects (second value from the Moves table in bank $E). -EffectsArray1: ; 3c000 (f:4000) +ResidualEffects1: ; 3c000 (f:4000) +; most non-side effects db CONVERSION_EFFECT db HAZE_EFFECT db SWITCH_AND_TELEPORT_EFFECT @@ -19,14 +20,15 @@ EffectsArray1: ; 3c000 (f:4000) db LEECH_SEED_EFFECT db SPLASH_EFFECT db -1 -EffectsArray2: ; 3c011 (f:4011) +SetDamageEffects: ; 3c011 (f:4011) ; moves that do damage but not through normal calculations ; e.g., Super Fang, Psywave db SUPER_FANG_EFFECT db SPECIAL_DAMAGE_EFFECT db -1 -EffectsArray3: ; 3c014 (f:4014) -; non-damaging, stat‐affecting or status‐causing moves? +ResidualEffects2: ; 3c014 (f:4014) +; non-side effects not included in ResidualEffects1 +; stat-affecting moves, sleep-inflicting moves, and Bide ; e.g., Meditate, Bide, Hypnosis db $01 db ATTACK_UP1_EFFECT @@ -56,7 +58,7 @@ EffectsArray3: ; 3c014 (f:4014) db ACCURACY_DOWN2_EFFECT db EVASION_DOWN2_EFFECT db -1 -EffectsArray4: ; 3c030 (f:4030) +AlwaysHappenSideEffects: ; 3c030 (f:4030) ; Attacks that aren't finished after they faint the opponent. db DRAIN_HP_EFFECT db EXPLODE_EFFECT @@ -69,7 +71,10 @@ EffectsArray4: ; 3c030 (f:4030) db TWINEEDLE_EFFECT db RAGE_EFFECT db -1 -EffectsArray5: ; 3c03b (f:403b) +SpecialEffects: ; 3c03b (f:403b) +; 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 db DRAIN_HP_EFFECT db EXPLODE_EFFECT db DREAM_EATER_EFFECT @@ -85,98 +90,99 @@ EffectsArray5: ; 3c03b (f:403b) db JUMP_KICK_EFFECT db RECOIL_EFFECT ; fallthrough to Next EffectsArray -EffectsArray5B: ; 3c049 (f:4049) -; moves that prevent the player from switching moves? +SpecialEffectsCont: ; 3c049 (f:4049) +; damaging moves whose effect is executed prior to damage calculation db THRASH_PETAL_DANCE_EFFECT db TRAPPING_EFFECT db -1 -Func_3c04c: ; 3c04c (f:404c) - call Func_3ec92 - ld a, $1 - ld [wd125], a +SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c) + 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 call ClearScreenArea call DisableLCD call LoadFontTilePatterns - call Func_3ee58 + call LoadHudAndHpBarAndStatusTilePatterns ld hl, vBGMap0 ld bc, $400 -.asm_3c06f +.clearBackgroundLoop ld a, $7f ld [hli], a dec bc ld a, b or c - jr nz, .asm_3c06f + jr nz, .clearBackgroundLoop +; copy the work RAM tile map to VRAM ld hl, wTileMap ld de, vBGMap0 - ld b, $12 -.asm_3c07f - ld c, $14 -.asm_3c081 + ld b, 18 ; number of rows +.copyRowLoop + ld c, 20 ; number of columns +.copyColumnLoop ld a, [hli] ld [de], a inc e dec c - jr nz, .asm_3c081 - ld a, $c - add e + jr nz, .copyColumnLoop + ld a, 12 ; number of off screen tiles to the right of screen in VRAM + add e ; skip the off screen tiles ld e, a - jr nc, .asm_3c08e + jr nc, .noCarry inc d -.asm_3c08e +.noCarry dec b - jr nz, .asm_3c07f + jr nz, .copyRowLoop call EnableLCD ld a, $90 - ld [$ffb0], a - ld [rWY], a ; $ff4a + ld [hWY], a + ld [rWY], a xor a - ld [$ffd7], a - ld [$ffaf], a + ld [hTilesetType], a + ld [hSCY], a dec a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call Delay3 xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld b, $70 ld c, $90 ld a, c - ld [$ffae], a + ld [hSCX], a call DelayFrame - ld a, $e4 - ld [rBGP], a ; $ff47 - ld [rOBP0], a ; $ff48 - ld [rOBP1], a ; $ff49 -.asm_3c0bb + ld a, %11100100 ; inverted palette for silhouette effect + ld [rBGP], a + ld [rOBP0], a + ld [rOBP1], a +.slideSilhouettesLoop ; slide silhouettes of the player's pic and the enemy's pic onto the screen ld h, b ld l, $40 - call Func_3c110 + call SetScrollXForSlidingPlayerBodyLeft ; begin background scrolling on line $40 inc b inc b ld h, $0 ld l, $60 - call Func_3c110 - call Func_3c0ff + call SetScrollXForSlidingPlayerBodyLeft ; end background scrolling on line $60 + call SlidePlayerHeadLeft ld a, c - ld [$ffae], a + ld [hSCX], a dec c dec c - jr nz, .asm_3c0bb + jr nz, .slideSilhouettesLoop ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld a, $31 ld [$ffe1], a hlCoord 1, 5 predef Func_3f0c6 xor a - ld [$ffb0], a - ld [rWY], a ; $ff4a + ld [hWY], a + ld [rWY], a inc a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 ld b, $1 call GoPAL_SET @@ -185,160 +191,174 @@ Func_3c04c: ; 3c04c (f:404c) ld b, BANK(PrintBeginningBattleText) jp Bankswitch -Func_3c0ff: ; 3c0ff (f:40ff) +; 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) push bc ld hl, wOAMBuffer + $01 - ld c, $15 - ld de, $4 -.asm_3c108 - dec [hl] - dec [hl] - add hl, de + ld c, $15 ; number of OAM entries + ld de, $4 ; size of OAM entry +.loop + dec [hl] ; decrement X + dec [hl] ; decrement X + add hl, de ; next OAM entry dec c - jr nz, .asm_3c108 + jr nz, .loop pop bc ret -Func_3c110: ; 3c110 (f:4110) - ld a, [$ff44] +SetScrollXForSlidingPlayerBodyLeft: ; 3c110 (f:4110) + ld a, [rLY] cp l - jr nz, Func_3c110 + jr nz, SetScrollXForSlidingPlayerBodyLeft ld a, h - ld [rSCX], a ; $ff43 -.asm_3c118 - ld a, [$ff44] + ld [rSCX], a +.loop + ld a, [rLY] cp h - jr z, .asm_3c118 + jr z, .loop ret -Func_3c11e: ; 3c11e (f:411e) +StartBattle: ; 3c11e (f:411e) xor a - ld [wPartyAliveFlags], a - ld [wccf5], a + ld [wPartyGainExpFlags], a + ld [wPartyFoughtCurrentEnemyFlags], a ld [wcd6a], a inc a ld [wd11d], a - ld hl, wEnemyMon1HP ; wd8a5 - ld bc, $2b + ld hl, wEnemyMon1HP + ld bc, wEnemyMon2 - wEnemyMon1 - 1 ld d, $3 -.asm_3c134 +.findFirstAliveEnemyMonLoop inc d ld a, [hli] or [hl] - jr nz, .asm_3c13c + jr nz, .foundFirstAliveEnemyMon add hl, bc - jr .asm_3c134 -.asm_3c13c + jr .findFirstAliveEnemyMonLoop +.foundFirstAliveEnemyMon ld a, d - ld [wcc3e], a - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - dec a - call nz, Func_3c92a - ld c, $28 + ld [wSerialExchangeNybbleReceiveData], a + ld a, [W_ISINBATTLE] + dec a ; is it a trainer battle? + call nz, EnemySendOutFirstMon ; if it is a trainer battle, send out enemy mon + ld c, 40 call DelayFrames call SaveScreenTilesToBuffer1 -.asm_3c14f +.checkAnyPartyAlive call AnyPartyAlive ld a, d and a - jp z, HandlePlayerBlackOut + jp z, HandlePlayerBlackOut ; jump if no mon is alive call LoadScreenTilesFromBuffer1 - ld a, [W_BATTLETYPE] ; wd05a - and a - jp z, Func_3c1ad -.asm_3c161 - call InitBattleMenu - ret c + ld a, [W_BATTLETYPE] + 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] + 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] and a - jr z, .asm_3c161 - ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS - and a - jr nz, .asm_3c17a + jr nz, .notOutOfSafariBalls call LoadScreenTilesFromBuffer1 - ld hl, OutOfSafariBallsText + ld hl, .outOfSafariBallsText jp PrintText -.asm_3c17a +.notOutOfSafariBalls callab PrintSafariZoneBattleText ld a, [wEnemyMonSpeed + 1] add a - ld b, a - jp c, asm_3c202 - ld a, [wcce9] - and a - jr z, .asm_3c194 + ld b, a ; init b (which is later compared with random value) to (enemy speed % 256) * 2 + jp c, EnemyRan ; if (enemy speed % 256) > 127, the enemy runs + ld a, [wSafariBaitFactor] + and a ; is bait factor 0? + jr z, .checkEscapeFactor +; bait factor is not 0 +; divide b by 4 (making the mon less likely to run) srl b srl b -.asm_3c194 - ld a, [wcce8] - and a - jr z, .asm_3c1a0 +.checkEscapeFactor + ld a, [wSafariEscapeFactor] + and a ; is escape factor 0? + jr z, .compareWithRandomValue +; escape factor is not 0 +; multiply b by 2 (making the mon more likely to run) sla b - jr nc, .asm_3c1a0 + jr nc, .compareWithRandomValue +; cap b at 255 ld b, $ff -.asm_3c1a0 +.compareWithRandomValue call Random cp b - jr nc, .asm_3c14f - jr asm_3c202 + jr nc, .checkAnyPartyAlive + jr EnemyRan ; if b was greater than the random value, the enemy runs -OutOfSafariBallsText: ; 3c1a8 (f:41a8) +.outOfSafariBallsText TX_FAR _OutOfSafariBallsText db "@" -Func_3c1ad: ; 3c1ad (f:41ad) +.playerSendOutFirstMon xor a - ld [wWhichPokemon], a ; wWhichPokemon -.asm_3c1b1 - call Func_3ca97 - jr nz, .asm_3c1bc - ld hl, wWhichPokemon ; wWhichPokemon + ld [wWhichPokemon], a +.findFirstAliveMonLoop + call HasMonFainted + jr nz, .foundFirstAliveMon +; fainted, go to the next one + ld hl, wWhichPokemon inc [hl] - jr .asm_3c1b1 -.asm_3c1bc - ld a, [wWhichPokemon] ; wWhichPokemon - ld [wPlayerMonNumber], a ; wPlayerMonNumber + jr .findFirstAliveMonLoop +.foundFirstAliveMon + ld a, [wWhichPokemon] + ld [wPlayerMonNumber], a inc a - ld hl, wPartyCount ; wPartyCount + ld hl, wPartySpecies - 1 ld c, a - ld b, $0 + ld b, 0 add hl, bc - ld a, [hl] + ld a, [hl] ; species ld [wcf91], a ld [wBattleMonSpecies2], a call LoadScreenTilesFromBuffer1 hlCoord 1, 5 ld a, $9 - call Func_3c8df + call SlideTrainerPicOffScreen call SaveScreenTilesToBuffer1 - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld c, a ld b, $1 push bc - ld hl, wPartyAliveFlags + ld hl, wPartyGainExpFlags predef FlagActionPredef - ld hl, wccf5 + ld hl, wPartyFoughtCurrentEnemyFlags pop bc predef FlagActionPredef - call Func_3cba6 + call LoadBattleMonFromParty call LoadScreenTilesFromBuffer1 - call Func_3cc91 + call SendOutMon jr MainInBattleLoop -asm_3c202: ; 3c202 (f:4202) + +; wild mon or link battle enemy ran from battle +EnemyRan: ; 3c202 (f:4202) call LoadScreenTilesFromBuffer1 - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING ld hl, WildRanText - jr nz, .asm_3c216 + jr nz, .printText +; link battle xor a - ld [wcf0b], a + ld [wBattleResult], a ld hl, EnemyRanText -.asm_3c216 +.printText call PrintText ld a, (SFX_08_44 - SFX_Headers_08) / 3 call PlaySoundWaitForCurrent xor a - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a ld hl, AnimationSlideEnemyMonOut ld b, BANK(AnimationSlideEnemyMonOut) jp Bankswitch @@ -355,85 +375,90 @@ MainInBattleLoop: ; 3c233 (f:4233) call ReadPlayerMonCurHPAndStatus ld hl, wBattleMonHP ld a, [hli] - or [hl] - jp z, HandlePlayerMonFainted ; test if current player mon is fainted + or [hl] ; is battle mon HP 0? + jp z, HandlePlayerMonFainted ; if battle mon HP is 0, jump ld hl, wEnemyMonHP ld a, [hli] - or [hl] - jp z, HandleEnemyMonFainted + or [hl] ; is enemy mon HP 0? + jp z, HandleEnemyMonFainted ; if enemy mon HP is 0, jump call SaveScreenTilesToBuffer1 xor a ld [wd11d], a ld a, [W_PLAYERBATTSTATUS2] - and $60 - jr nz, .asm_3c2a6 ; 0x3c252 $52 + 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 - res 3, [hl] + res Flinched, [hl] ; reset flinch bit ld hl, W_PLAYERBATTSTATUS1 - res 3, [hl] + res Flinched, [hl] ; reset flinch bit ld a, [hl] - and $12 - jr nz, .asm_3c2a6 ; 0x3c261 $43 - call InitBattleMenu ; show battle menu - ret c - ld a, [wd078] - and a - ret nz + and (1 << ThrashingAbout) | (1 << ChargingUp) ; check if the player is thrashing about or charging for an attack + jr nz, .selectEnemyMove ; if so, jump +; the player is neither thrashing about nor charging for an attack + call DisplayBattleMenu ; show battle menu + ret c ; return if player ran from battle + ld a, [wEscapedFromBattle] + and a + ret nz ; return if pokedoll was used to escape from battle ld a, [wBattleMonStatus] and SLP ; Check if sleeping - jr nz, .asm_3c2a6 ; 0x3c271 $33 + jr nz, .selectEnemyMove ; if so, jump ld a, [W_PLAYERBATTSTATUS1] - and $21 - jr nz, .asm_3c2a6 ; 0x3c278 $2c + 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] - bit 5, a - jr z, .asm_3c288 ; 0x3c27f $7 + 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 ld a, $ff ld [wPlayerSelectedMove], a - jr .asm_3c2a6 ; 0x3c286 $1e -.asm_3c288 + jr .selectEnemyMove +.selectPlayerMove ld a, [wcd6a] and a - jr nz, .asm_3c2a6 ; 0x3c28c $18 + jr nz, .selectEnemyMove ld [wMoveMenuType], a inc a ld [W_ANIMATIONID], a xor a - ld [wcc35], a + ld [wMenuItemToSwap], a call MoveSelectionMenu push af call LoadScreenTilesFromBuffer1 - call Func_3cd5a + call DrawHUDsAndHPBars pop af - jr nz, MainInBattleLoop -.asm_3c2a6 + jr nz, MainInBattleLoop ; if the player didn't select a move, jump +.selectEnemyMove call SelectEnemyMove - ld a, [W_ISLINKBATTLE] - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jr nz, .noLinkBattle - ld a, [wcc3e] +; link battle + ld a, [wSerialExchangeNybbleReceiveData] cp $f - jp z, asm_3c202 + jp z, EnemyRan cp $e jr z, .noLinkBattle cp $d jr z, .noLinkBattle sub $4 jr c, .noLinkBattle +; the link battle enemy has switched mons ld a, [W_PLAYERBATTSTATUS1] - bit 5, a - jr z, .asm_3c2dd ; 0x3c2c9 $12 + bit UsingTrappingMove, a ; check if using multi-turn move like Wrap + jr z, .asm_3c2dd ld a, [wPlayerMoveListIndex] ld hl, wBattleMonMoves ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] - cp $76 - jr nz, .asm_3c2dd ; 0x3c2d8 $3 + 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 ld [wPlayerSelectedMove], a .asm_3c2dd - callab Func_3a74b + callab SwitchEnemyMon .noLinkBattle ld a, [wPlayerSelectedMove] cp EXTREMESPEED @@ -453,8 +478,8 @@ MainInBattleLoop: ; 3c233 (f:4233) cp SUCKER_PUNCH jr z, .compareSpeed cp QUICK_ATTACK - jr z, .compareSpeed ; both used Quick Attack - jp .playerMovesFirst ; player used Quick Attack + jr z, .compareSpeed ; if both used Quick Attack + jp .playerMovesFirst ; if player used Quick Attack and enemy didn't .playerDidNotUseQuickAttack ld a, [wEnemySelectedMove] cp EXTREMESPEED @@ -464,27 +489,27 @@ MainInBattleLoop: ; 3c233 (f:4233) cp SUCKER_PUNCH jr z, .enemyMovesFirst cp QUICK_ATTACK - jr z, .enemyMovesFirst + jr z, .enemyMovesFirst ; if enemy used Quick Attack and player didn't ld a, [wPlayerSelectedMove] cp COUNTER jr nz, .playerDidNotUseCounter ld a, [wEnemySelectedMove] cp COUNTER - jr z, .compareSpeed ; both used Counter - jr .enemyMovesFirst ; player used Counter + jr z, .compareSpeed ; if both used Counter + jr .enemyMovesFirst ; if player used Counter and enemy didn't .playerDidNotUseCounter ld a, [wEnemySelectedMove] cp COUNTER - jr z, .playerMovesFirst + jr z, .playerMovesFirst ; if enemy used Counter and player didn't .compareSpeed ld de, wBattleMonSpeed ; player speed value ld hl, wEnemyMonSpeed ; enemy speed value ld c, $2 call StringCmp ; compare speed values jr z, .speedEqual - jr nc, .playerMovesFirst - jr .enemyMovesFirst -.speedEqual + 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 jr z, .invertOutcome @@ -502,66 +527,66 @@ MainInBattleLoop: ; 3c233 (f:4233) ld [H_WHOSETURN], a callab TrainerAI jr c, .AIActionUsedEnemyFirst - call Func_3e6bc ; execute enemy move - ld a, [wd078] - and a - ret nz + call ExecuteEnemyMove + ld a, [wEscapedFromBattle] + and a ; was Teleport, Road, or Whirlwind used to escape from battle? + ret nz ; if so, return ld a, b and a jp z, HandlePlayerMonFainted .AIActionUsedEnemyFirst call HandlePoisonBurnLeechSeed jp z, HandleEnemyMonFainted - call Func_3cd5a - call Func_3d65e ; execute player move - ld a, [wd078] - and a - ret nz + call DrawHUDsAndHPBars + call ExecutePlayerMove + ld a, [wEscapedFromBattle] + and a ; was Teleport, Road, or Whirlwind used to escape from battle? + ret nz ; if so, return ld a, b and a jp z, HandleEnemyMonFainted call HandlePoisonBurnLeechSeed jp z, HandlePlayerMonFainted - call Func_3cd5a - call Func_3c50f + call DrawHUDsAndHPBars + call CheckNumAttacksLeft jp MainInBattleLoop .playerMovesFirst - call Func_3d65e ; execute player move - ld a, [wd078] - and a - ret nz + call ExecutePlayerMove + ld a, [wEscapedFromBattle] + and a ; was Teleport, Road, or Whirlwind used to escape from battle? + ret nz ; if so, return ld a, b and a jp z, HandleEnemyMonFainted call HandlePoisonBurnLeechSeed jp z, HandlePlayerMonFainted - call Func_3cd5a + call DrawHUDsAndHPBars ld a, $1 ld [H_WHOSETURN], a callab TrainerAI jr c, .AIActionUsedPlayerFirst - call Func_3e6bc ; execute enemy move - ld a, [wd078] - and a - ret nz + call ExecuteEnemyMove + ld a, [wEscapedFromBattle] + and a ; was Teleport, Road, or Whirlwind used to escape from battle? + ret nz ; if so, return ld a, b and a jp z, HandlePlayerMonFainted .AIActionUsedPlayerFirst call HandlePoisonBurnLeechSeed jp z, HandleEnemyMonFainted - call Func_3cd5a - call Func_3c50f + call DrawHUDsAndHPBars + call CheckNumAttacksLeft jp MainInBattleLoop HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd) - ld hl, wBattleMonHP ; wd015 - ld de, wBattleMonStatus ; wBattleMonStatus - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wBattleMonHP + ld de, wBattleMonStatus + ld a, [H_WHOSETURN] and a jr z, .playersTurn - ld hl, wEnemyMonHP ; wEnemyMonHP - ld de, wEnemyMonStatus ; wcfe9 + ld hl, wEnemyMonHP + ld de, wEnemyMonStatus .playersTurn ld a, [de] and (1 << BRN) | (1 << PSN) @@ -581,26 +606,26 @@ HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd) pop hl call HandlePoisonBurnLeechSeed_DecreaseOwnHP .notBurnedOrPoisoned - ld de, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 - ld a, [H_WHOSETURN] ; $fff3 + ld de, W_PLAYERBATTSTATUS2 + ld a, [H_WHOSETURN] and a jr z, .playersTurn2 - ld de, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 + ld de, W_ENEMYBATTSTATUS2 .playersTurn2 ld a, [de] add a jr nc, .notLeechSeeded push hl - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] push af xor $1 - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a xor a ld [wcc5b], a ld a,ABSORB call PlayMoveAnimation ; play leech seed animation (from opposing mon) pop af - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a pop hl call HandlePoisonBurnLeechSeed_DecreaseOwnHP call HandlePoisonBurnLeechSeed_IncreaseEnemyHP @@ -612,7 +637,7 @@ HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd) ld a, [hli] or [hl] ret nz ; test if fainted - call Func_3cd5a + call DrawHUDsAndHPBars ld c, $14 call DelayFrames xor a @@ -656,15 +681,15 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d) jr nz, .nonZeroDamage inc c ; damage is at least 1 .nonZeroDamage - ld hl, W_PLAYERBATTSTATUS3 ; W_PLAYERBATTSTATUS3 - ld de, W_PLAYERTOXICCOUNTER ; wd06c - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS3 + ld de, W_PLAYERTOXICCOUNTER + ld a, [H_WHOSETURN] and a jr z, .playersTurn - ld hl, W_ENEMYBATTSTATUS3 ; W_ENEMYBATTSTATUS3 - ld de, W_ENEMYTOXICCOUNTER ; wd071 + ld hl, W_ENEMYBATTSTATUS3 + ld de, W_ENEMYTOXICCOUNTER .playersTurn - bit 0, [hl] + bit BadlyPoisoned, [hl] jr z, .noToxic ld a, [de] ; increment toxic counter inc a @@ -701,13 +726,14 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d) ret ; adds bc to enemy HP +; bc isn't updated if HP substracted was capped to prevent overkill HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3) push hl - ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wEnemyMonMaxHP + ld a, [H_WHOSETURN] and a jr z, .playersTurn - ld hl, wBattleMonMaxHP ; wd023 + ld hl, wBattleMonMaxHP .playersTurn ld a, [hli] ld [wHPBarMaxHP+1], a @@ -741,19 +767,19 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3) ld [hl], a ld [wHPBarNewHP], a .noOverfullHeal - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] xor $1 - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a call UpdateCurMonHPBar - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] xor $1 - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a pop hl ret UpdateCurMonHPBar: ; 3c4f6 (f:44f6) hlCoord 10, 9 ; tile pointer to player HP bar - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a ld a, $1 jr z, .playersTurn @@ -761,23 +787,25 @@ UpdateCurMonHPBar: ; 3c4f6 (f:44f6) xor a .playersTurn push bc - ld [wListMenuID], a ; wListMenuID + ld [wHPBarType], a predef UpdateHPBar2 pop bc ret -Func_3c50f: ; 3c50f (f:450f) - ld a, [wd06a] +CheckNumAttacksLeft: ; 3c50f (f:450f) + ld a, [wPlayerNumAttacksLeft] and a - jr nz, .asm_3c51a - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - res 5, [hl] -.asm_3c51a - ld a, [wd06f] + jr nz, .checkEnemy +; player has 0 attacks left + ld hl, W_PLAYERBATTSTATUS1 + res UsingTrappingMove, [hl] ; player not using multi-turn attack like wrap any more +.checkEnemy + ld a, [wEnemyNumAttacksLeft] and a ret nz - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - res 5, [hl] +; enemy has 0 attacks left + ld hl, W_ENEMYBATTSTATUS1 + res UsingTrappingMove, [hl] ; enemy not using multi-turn attack like wrap any more ret HandleEnemyMonFainted: ; 3c525 (f:4525) @@ -787,68 +815,68 @@ HandleEnemyMonFainted: ; 3c525 (f:4525) call AnyPartyAlive ld a, d and a - jp z, HandlePlayerBlackOut - ld hl, wBattleMonHP ; wd015 + jp z, HandlePlayerBlackOut ; if no party mons are alive, the player blacks out + ld hl, wBattleMonHP ld a, [hli] - or [hl] - call nz, Func_3cd60 - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + 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] dec a - ret z + ret z ; return if it's a wild battle call AnyEnemyPokemonAliveCheck jp z, TrainerBattleVictory - ld hl, wBattleMonHP ; wd015 + ld hl, wBattleMonHP ld a, [hli] - or [hl] - jr nz, .asm_3c555 - call Func_3c79b + or [hl] ; does battle mon have 0 HP? + jr nz, .skipReplacingBattleMon ; if not, skip replacing battle mon + call DoUseNextMonDialogue ; this call is useless in a trainer battle. it shouldn't be here ret c - call Func_3c7d8 -.asm_3c555 + call ChooseNextMon +.skipReplacingBattleMon ld a, $1 ld [wcd6a], a - call Func_3c664 - jp z, asm_3c202 + call ReplaceFaintedEnemyMon + jp z, EnemyRan xor a ld [wcd6a], a jp MainInBattleLoop FaintEnemyPokemon ; 0x3c567 call ReadPlayerMonCurHPAndStatus - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] dec a jr z, .wild ld a, [wEnemyMonPartyPos] ld hl, wEnemyMon1HP - ld bc, $2c ; mon struct len + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes xor a ld [hli], a ld [hl], a .wild - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - res 2, [hl] + ld hl, W_PLAYERBATTSTATUS1 + res AttackingMultipleTimes, [hl] xor a - ld [W_NUMHITS], a ; wd074 - ld hl, wd065 ; enemy statuses + ld [wPlayerNumHits], 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 ; W_ENEMYDISABLEDMOVE + ld [W_ENEMYDISABLEDMOVE], a ld [wccef], a ld [wccf3], a - ld hl, wccf1 + ld hl, wPlayerUsedMove ld [hli], a ld [hl], a hlCoord 12, 5 deCoord 12, 6 - call Func_3c893 + call SlideDownFaintedMonPic ld hl, wTileMap ld bc, $40b call ClearScreenArea - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] dec a jr z, .wild_win xor a @@ -869,14 +897,14 @@ FaintEnemyPokemon ; 0x3c567 ld a, MUSIC_DEFEATED_WILD_MON call PlayBattleVictoryMusic .sfxplayed - ld hl, wBattleMonHP ; wd015 + ld hl, wBattleMonHP ld a, [hli] or [hl] jr nz, .playermonnotfaint ld a, [wccf0] and a jr nz, .playermonnotfaint - call Func_3c741 + call RemoveFaintedPlayerMon .playermonnotfaint call AnyPartyAlive ld a, d @@ -884,38 +912,50 @@ FaintEnemyPokemon ; 0x3c567 ret z ld hl, EnemyMonFaintedText call PrintText - call Func_3ee94 + call PrintEmptyString call SaveScreenTilesToBuffer1 xor a - ld [wcf0b], a + ld [wBattleResult], a ld b, EXP__ALL call IsItemInBag push af - jr z, .no_exp_all - ld hl, wd002 + jr z, .giveExpToMonsThatFought ; if no exp all, then jump + +; the player has exp all +; first, we halve the values that determine exp gain +; the enemy mon base stats are added to stat exp, so they are halved +; the base exp (which determines normal exp) is also halved + ld hl, wEnemyMonBaseStats ld b, $7 -.exp_all_loop +.halveExpDataLoop srl [hl] inc hl dec b - jr nz, .exp_all_loop -.no_exp_all + jr nz, .halveExpDataLoop + +; give exp (divided evenly) to the mons that actually fought in battle against the enemy mon that has fainted +; if exp all is in the bag, this will be only be half of the stat exp and normal exp, due to the above loop +.giveExpToMonsThatFought xor a ld [wcc5b], a callab GainExperience pop af - ret z + ret z ; return if no exp all + +; the player has exp all +; now, set the gain exp flag for every party member +; half of the total stat exp and normal exp will divided evenly amongst every party member ld a, $1 ld [wcc5b], a - ld a, [wPartyCount] ; wPartyCount - ld b, $0 -.asm_3c62c + ld a, [wPartyCount] + ld b, 0 +.gainExpFlagsLoop scf rl b dec a - jr nz, .asm_3c62c + jr nz, .gainExpFlagsLoop ld a, b - ld [wPartyAliveFlags], a + ld [wPartyGainExpFlags], a ld hl, GainExperience ld b, BANK(GainExperience) jp Bankswitch @@ -933,75 +973,77 @@ Func_3c643: ; 3c643 (f:4643) ret AnyEnemyPokemonAliveCheck: ; 3c64f (f:464f) - ld a, [wEnemyPartyCount] ; wEnemyPartyCount + ld a, [wEnemyPartyCount] ld b, a xor a - ld hl, wEnemyMon1HP ; wd8a5 - ld de, $2c -.asm_3c65a + ld hl, wEnemyMon1HP + ld de, wEnemyMon2 - wEnemyMon1 +.nextPokemon or [hl] inc hl or [hl] dec hl add hl, de dec b - jr nz, .asm_3c65a + jr nz, .nextPokemon and a ret -Func_3c664: ; 3c664 (f:4664) +; stores whether enemy ran in Z flag +ReplaceFaintedEnemyMon: ; 3c664 (f:4664) ld hl, wcf1e ld e, $30 call GetBattleHealthBarColor callab DrawEnemyPokeballs - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_3c687 - call Func_3d605 - ld a, [wcc3e] + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .notLinkBattle +; link battle + call LinkBattleExchangeData + ld a, [wSerialExchangeNybbleReceiveData] cp $f ret z call LoadScreenTilesFromBuffer1 -.asm_3c687 +.notLinkBattle call EnemySendOut xor a - ld [W_ENEMYMOVENUM], a ; W_ENEMYMOVENUM + ld [W_ENEMYMOVENUM], a ld [wcd6a], a ld [wccd5], a - inc a + inc a ; reset Z flag ret TrainerBattleVictory: ; 3c696 (f:4696) call Func_3c643 ld b, MUSIC_DEFEATED_GYM_LEADER - ld a, [W_GYMLEADERNO] ; W_GYMLEADERNO + ld a, [W_GYMLEADERNO] and a jr nz, .gymleader ld b, MUSIC_DEFEATED_TRAINER .gymleader - ld a, [W_TRAINERCLASS] ; wd031 + ld a, [W_TRAINERCLASS] cp SONY3 ; final battle against rival jr nz, .notrival ld b, MUSIC_DEFEATED_GYM_LEADER ld hl, W_FLAGS_D733 set 1, [hl] .notrival - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING ld a, b call nz, PlayBattleVictoryMusic ld hl, TrainerDefeatedText call PrintText - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING ret z call ScrollTrainerPicAfterBattle ld c, $28 call DelayFrames - call Func_3381 + call PrintEndBattleText ld hl, MoneyForWinningText call PrintText - ld de, wPlayerMoney + 2 ; wd349 + ld de, wPlayerMoney + 2 ld hl, wd07b ld c, $3 predef_jump AddBCDPredef @@ -1027,41 +1069,44 @@ PlayBattleVictoryMusic: ; 3c6ee (f:46ee) HandlePlayerMonFainted: ; 3c700 (f:4700) ld a, $1 ld [wccf0], a - call Func_3c741 + call RemoveFaintedPlayerMon call AnyPartyAlive ; test if any more mons are alive ld a, d and a jp z, HandlePlayerBlackOut - ld hl, wEnemyMonHP ; wEnemyMonHP + ld hl, wEnemyMonHP ld a, [hli] - or [hl] - jr nz, .enemyMonNotFainted + or [hl] ; is enemy mon's HP 0? + jr nz, .doUseNextMonDialogue ; if not, jump +; the enemy mon has 0 HP call FaintEnemyPokemon - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] dec a ret z ; if wild encounter, battle is over call AnyEnemyPokemonAliveCheck jp z, TrainerBattleVictory -.enemyMonNotFainted - call Func_3c79b - ret c - call Func_3c7d8 - jp nz, MainInBattleLoop +.doUseNextMonDialogue + call DoUseNextMonDialogue + ret c ; return if the player ran from battle + call ChooseNextMon + 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 - call Func_3c664 - jp z, asm_3c202 + call ReplaceFaintedEnemyMon + jp z, EnemyRan ; if enemy ran from battle rather than sending out another mon, jump xor a ld [wcd6a], a jp MainInBattleLoop -Func_3c741: ; 3c741 (f:4741) - ld a, [wPlayerMonNumber] ; wPlayerMonNumber +; resets flags, slides mon's pic down, plays cry, and prints fainted message +RemoveFaintedPlayerMon: ; 3c741 (f:4741) + ld a, [wPlayerMonNumber] ld c, a - ld hl, wPartyAliveFlags ; clear fainted mon's alive flag + ld hl, wPartyGainExpFlags ld b, $0 - predef FlagActionPredef - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 + predef FlagActionPredef ; clear gain exp flag for fainted mon + ld hl, W_ENEMYBATTSTATUS1 res 2, [hl] ; reset "attacking multiple times" flag ld a, [wd083] bit 7, a ; skip sound flag (red bar (?)) @@ -1070,19 +1115,21 @@ Func_3c741: ; 3c741 (f:4741) ld [wd083], a call WaitForSoundToFinish .skipWaitForSound - ld hl, wcd05 +; bug? if the player mon faints while the enemy mon is using bide, +; the accumulated damage is overwritten. xxx what values can [wd083] have here? + ld hl, wEnemyBideAccumulatedDamage ld [hli], a ld [hl], a - ld [wBattleMonStatus], a ; wBattleMonStatus + ld [wBattleMonStatus], a call ReadPlayerMonCurHPAndStatus hlCoord 9, 7 ld bc, $50b call ClearScreenArea hlCoord 1, 10 deCoord 1, 11 - call Func_3c893 + call SlideDownFaintedMonPic ld a, $1 - ld [wcf0b], a + ld [wBattleResult], a ld a, [wccf0] and a ret z @@ -1095,78 +1142,82 @@ PlayerMonFaintedText: ; 3c796 (f:4796) TX_FAR _PlayerMonFaintedText db "@" -Func_3c79b: ; 3c79b (f:479b) - call Func_3ee94 +; asks if you want to use next mon +; stores whether you ran in C flag +DoUseNextMonDialogue: ; 3c79b (f:479b) + call PrintEmptyString call SaveScreenTilesToBuffer1 - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a dec a - ret nz + ret nz ; return if it's a trainer battle ld hl, UseNextMonText call PrintText -.asm_3c7ad +.displayYesNoBox hlCoord 13, 9 ld bc, $a0e - ld a, $14 - ld [wd125], a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID ld a, [wd12e] - cp $2 - jr z, .asm_3c7c4 - and a + cp $2 ; did the player choose NO? + jr z, .tryRunning ; if the player chose NO, try running + and a ; reset carry ret -.asm_3c7c4 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem +.tryRunning + ld a, [wCurrentMenuItem] and a - jr z, .asm_3c7ad + jr z, .displayYesNoBox ; xxx when does this happen? ld hl, wPartyMon1Speed ld de, wEnemyMonSpeed - jp Func_3cab9 + jp TryRunningFromBattle UseNextMonText: ; 3c7d3 (f:47d3) TX_FAR _UseNextMonText db "@" -Func_3c7d8: ; 3c7d8 (f:47d8) +; 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 call DisplayPartyMenu -.asm_3c7e0 - jr nc, .asm_3c7e7 -.asm_3c7e2 +.checkIfMonChosen + jr nc, .monChosen +.goBackToPartyMenu call GoBackToPartyMenu - jr .asm_3c7e0 -.asm_3c7e7 - call Func_3ca97 - jr z, .asm_3c7e2 - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_3c7fa + jr .checkIfMonChosen +.monChosen + call HasMonFainted + jr z, .goBackToPartyMenu ; if mon fainted, you have to choose another + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .notLinkBattle inc a ld [wcd6a], a - call Func_3d605 -.asm_3c7fa + call LinkBattleExchangeData +.notLinkBattle xor a ld [wcd6a], a call ClearSprites - ld a, [wWhichPokemon] ; wWhichPokemon - ld [wPlayerMonNumber], a ; wPlayerMonNumber + ld a, [wWhichPokemon] + ld [wPlayerMonNumber], a ld c, a - ld hl, wPartyAliveFlags + ld hl, wPartyGainExpFlags ld b, $1 push bc predef FlagActionPredef pop bc - ld hl, wccf5 + ld hl, wPartyFoughtCurrentEnemyFlags predef FlagActionPredef - call Func_3cba6 + call LoadBattleMonFromParty call GBPalWhiteOut - call Func_3ee5b + call LoadHudTilePatterns call LoadScreenTilesFromBuffer1 call GoPAL_SET_CF1C call GBPalNormal - call Func_3cc91 - ld hl, wEnemyMonHP ; wEnemyMonHP + call SendOutMon + ld hl, wEnemyMonHP ld a, [hli] or [hl] ret @@ -1174,10 +1225,10 @@ Func_3c7d8: ; 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) - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jr z, .notSony1Battle - ld a, [W_CUROPPONENT] ; wd059 + ld a, [W_CUROPPONENT] cp $c8 + SONY1 jr nz, .notSony1Battle ld hl, wTileMap ; sony 1 battle @@ -1195,8 +1246,8 @@ HandlePlayerBlackOut: ; 3c837 (f:4837) ld b, $0 call GoPAL_SET ld hl, PlayerBlackedOutText2 - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jr nz, .noLinkBattle ld hl, LinkBattleLostText .noLinkBattle @@ -1220,18 +1271,20 @@ LinkBattleLostText: ; 3c88e (f:488e) TX_FAR _LinkBattleLostText db "@" -Func_3c893: ; 3c893 (f:4893) +; 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) ld a, [wd730] push af set 6, a ld [wd730], a - ld b, $7 -.asm_3c89e + ld b, 7 ; number of times to slide +.slideStepLoop ; each iteration, the mon is slid down one row push bc push de push hl - ld b, $6 -.asm_3c8a3 + ld b, 6 ; number of rows +.rowLoop push bc push hl push de @@ -1239,7 +1292,7 @@ Func_3c893: ; 3c893 (f:4893) call CopyData pop de pop hl - ld bc, $ffec + ld bc, -20 add hl, bc push hl ld h, d @@ -1250,18 +1303,18 @@ Func_3c893: ; 3c893 (f:4893) pop hl pop bc dec b - jr nz, .asm_3c8a3 - ld bc, $14 + jr nz, .rowLoop + ld bc, 20 add hl, bc ld de, SevenSpacesText call PlaceString - ld c, $2 + ld c, 2 call DelayFrames pop hl pop de pop bc dec b - jr nz, .asm_3c89e + jr nz, .slideStepLoop pop af ld [wd730], a ret @@ -1269,48 +1322,53 @@ Func_3c893: ; 3c893 (f:4893) SevenSpacesText: ; 3c8d7 (f:48d7) db " @" -Func_3c8df: ; 3c8df (f:48df) - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b +; 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 ld c, a -.asm_3c8e2 +.slideStepLoop ; each iteration, the trainer pic is slid one tile left/right push bc push hl - ld b, $7 -.asm_3c8e6 + ld b, 7 ; number of rows +.rowLoop push hl - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b + ld a, [$FF8B] ld c, a -.asm_3c8ea - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b - cp $8 - jr z, .asm_3c8f5 +.columnLoop + ld a, [$FF8B] + cp 8 + jr z, .slideRight +.slideLeft ; slide player sprite off screen ld a, [hld] ld [hli], a inc hl - jr .asm_3c8f8 -.asm_3c8f5 + jr .nextColumn +.slideRight ; slide enemy trainer sprite off screen ld a, [hli] ld [hld], a dec hl -.asm_3c8f8 +.nextColumn dec c - jr nz, .asm_3c8ea + jr nz, .columnLoop pop hl - ld de, $14 + ld de, 20 add hl, de dec b - jr nz, .asm_3c8e6 - ld c, $2 + jr nz, .rowLoop + ld c, 2 call DelayFrames pop hl pop bc dec c - jr nz, .asm_3c8e2 + jr nz, .slideStepLoop ret -; XXX this needs cleaning up. it's what runs when a juggler switches pokemon +; send out a trainer's mon EnemySendOut: ; 3c90e (f:490e) - ld hl,wPartyAliveFlags + ld hl,wPartyGainExpFlags xor a ld [hl],a ld a,[wPlayerMonNumber] @@ -1318,14 +1376,16 @@ EnemySendOut: ; 3c90e (f:490e) ld b,1 push bc predef FlagActionPredef - ld hl,wccf5 + ld hl,wPartyFoughtCurrentEnemyFlags xor a ld [hl],a pop bc predef FlagActionPredef -Func_3c92a: ; 3c92a (f:492a) + +; don't change wPartyGainExpFlags or wPartyFoughtCurrentEnemyFlags +EnemySendOutFirstMon: ; 3c92a (f:492a) xor a - ld hl,wd065 + ld hl,wEnemyStatsToDouble ; clear enemy statuses ld [hli],a ld [hli],a ld [hli],a @@ -1334,7 +1394,7 @@ Func_3c92a: ; 3c92a (f:492a) ld [W_ENEMYDISABLEDMOVE],a ld [wccef],a ld [wccf3],a - ld hl,wccf1 + ld hl,wPlayerUsedMove ld [hli],a ld [hl],a dec a @@ -1343,13 +1403,13 @@ Func_3c92a: ; 3c92a (f:492a) res 5,[hl] hlCoord 18, 0 ld a,8 - call Func_3c8df - call Func_3ee94 + call SlideTrainerPicOffScreen + call PrintEmptyString call SaveScreenTilesToBuffer1 - ld a,[W_ISLINKBATTLE] - cp 4 + ld a,[wLinkState] + cp LINK_STATE_BATTLING jr nz,.next - ld a,[wcc3e] + ld a,[wSerialExchangeNybbleReceiveData] sub 4 ld [wWhichPokemon],a jr .next3 @@ -1389,7 +1449,7 @@ Func_3c92a: ; 3c92a (f:492a) ld a,[hl] ld [wEnemyMonSpecies2],a ld [wcf91],a - call Func_3eb01 + call LoadEnemyMonData ld hl,wEnemyMonHP ld a,[hli] ld [wcce3],a @@ -1403,8 +1463,8 @@ Func_3c92a: ; 3c92a (f:492a) ld a,[wPartyCount] dec a jr z,.next4 - ld a,[W_ISLINKBATTLE] - cp 4 + ld a,[wLinkState] + cp LINK_STATE_BATTLING jr z,.next4 ld a,[W_OPTIONS] bit 6,a @@ -1413,8 +1473,8 @@ Func_3c92a: ; 3c92a (f:492a) call PrintText hlCoord 0, 7 ld bc,$0801 - ld a,$14 - ld [wd125],a + ld a,TWO_OPTION_MENU + ld [wTextBoxID],a call DisplayTextBoxID ld a,[wCurrentMenuItem] and a @@ -1436,13 +1496,13 @@ Func_3c92a: ; 3c92a (f:492a) call GoBackToPartyMenu jr .next9 .next6 - call Func_3ca97 + call HasMonFainted jr z,.next8 xor a ld [wCurrentMenuItem],a .next7 call GBPalWhiteOut - call Func_3ee5b + call LoadHudTilePatterns call LoadScreenTilesFromBuffer1 .next4 call ClearSprites @@ -1466,15 +1526,15 @@ Func_3c92a: ; 3c92a (f:492a) predef Func_3f073 ld a,[wEnemyMonSpecies2] call PlayCry - call Func_3cdec + call DrawEnemyHUDAndHPBar ld a,[wCurrentMenuItem] and a ret nz xor a - ld [wPartyAliveFlags],a - ld [wccf5],a + ld [wPartyGainExpFlags],a + ld [wPartyFoughtCurrentEnemyFlags],a call SaveScreenTilesToBuffer1 - jp Func_3d1ba + jp SwitchPlayerMon TrainerAboutToUseText: ; 3ca79 (f:4a79) TX_FAR _TrainerAboutToUseText @@ -1487,10 +1547,10 @@ TrainerSentOutText: ; 3ca7e (f:4a7e) ; 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) - ld a, [wPartyCount] ; wPartyCount + ld a, [wPartyCount] ld e, a xor a - ld hl, wPartyMon1HP ; wd16c + ld hl, wPartyMon1HP ld bc, wPartyMon2 - wPartyMon1 - 1 .partyMonsLoop or [hl] @@ -1502,20 +1562,22 @@ AnyPartyAlive: ; 3ca83 (f:4a83) ld d, a ret -Func_3ca97: ; 3ca97 (f:4a97) - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMon1HP ; wd16c - ld bc, $2c +; tests if player mon has fainted +; stores whether mon has fainted in Z flag +HasMonFainted: ; 3ca97 (f:4a97) + ld a, [wWhichPokemon] + ld hl, wPartyMon1HP + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld a, [hli] or [hl] ret nz ld a, [wd11d] and a - jr nz, .asm_3cab2 + jr nz, .done ld hl, NoWillText call PrintText -.asm_3cab2 +.done xor a ret @@ -1523,116 +1585,122 @@ NoWillText: ; 3cab4 (f:4ab4) TX_FAR _NoWillText db "@" -Func_3cab9: ; 3cab9 (f:4ab9) +; try to run from battle (hl = player speed, de = enemy speed) +; stores whether the attempt was successful in carry flag +TryRunningFromBattle: ; 3cab9 (f:4ab9) call IsGhostBattle - jp z, .asm_3cb5c - ld a, [W_BATTLETYPE] ; wd05a + jp z, .canEscape ; jump if it's a ghost battle + ld a, [W_BATTLETYPE] cp $2 - jp z, .asm_3cb5c - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jp z, .asm_3cb5c - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + jp z, .canEscape ; jump if it's a safari battle + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jp z, .canEscape + ld a, [W_ISINBATTLE] dec a - jr nz, .asm_3cb4c - ld a, [wd120] + jr nz, .trainerBattle ; jump if it's a trainer battle + ld a, [wNumRunAttempts] inc a - ld [wd120], a + ld [wNumRunAttempts], a ld a, [hli] - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a ld a, [hl] - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a ld a, [de] ld [$ff8d], a inc de ld a, [de] ld [$ff8e], a call LoadScreenTilesFromBuffer1 - ld de, $ff97 + ld de, H_MULTIPLICAND + 1 ld hl, $ff8d ld c, $2 call StringCmp - jr nc, .asm_3cb5c - xor a - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) - ld a, $20 - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) - call Multiply - ld a, [$ff97] - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) - ld a, [$ff98] - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + jr nc, .canEscape ; jump if player speed greater than enemy speed + xor a + ld [H_MULTIPLICAND], a + ld a, 32 + ld [H_MULTIPLIER], a + call Multiply ; multiply player speed by 32 + ld a, [H_PRODUCT + 2] + ld [H_DIVIDEND], a + ld a, [H_PRODUCT + 3] + ld [H_DIVIDEND + 1], a ld a, [$ff8d] ld b, a ld a, [$ff8e] +; divide enemy speed by 4 srl b rr a srl b rr a and a - jr z, .asm_3cb5c - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + jr z, .canEscape ; jump if enemy speed divided by 4, mod 256 is 0 + ld [H_DIVISOR], a ; ((enemy speed / 4) % 256) ld b, $2 - call Divide - ld a, [$ff97] - and a - jr nz, .asm_3cb5c - ld a, [wd120] + call Divide ; divide (player speed * 32) by ((enemy speed / 4) % 256) + ld a, [H_QUOTIENT + 2] + and a ; is the quotient greater than 256? + jr nz, .canEscape ; if so, the player can escape + ld a, [wNumRunAttempts] ld c, a -.asm_3cb2b +; add 30 to the quotient for each run attempt +.loop dec c - jr z, .asm_3cb39 - ld b, $1e - ld a, [$ff98] + jr z, .compareWithRandomValue + ld b, 30 + ld a, [H_QUOTIENT + 3] add b - ld [$ff98], a - jr c, .asm_3cb5c - jr .asm_3cb2b -.asm_3cb39 + ld [H_QUOTIENT + 3], a + jr c, .canEscape + jr .loop +.compareWithRandomValue call BattleRandom ld b, a - ld a, [$ff98] + ld a, [H_QUOTIENT + 3] cp b - jr nc, .asm_3cb5c + 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 hl, CantEscapeText - jr .asm_3cb4f -.asm_3cb4c + jr .printCantEscapeOrNoRunningText +.trainerBattle ld hl, NoRunningText -.asm_3cb4f +.printCantEscapeOrNoRunningText call PrintText ld a, $1 ld [wd11f], a call SaveScreenTilesToBuffer1 - and a + and a ; reset carry ret -.asm_3cb5c - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 +.canEscape + ld a, [wLinkState] + cp LINK_STATE_BATTLING ld a, $2 - jr nz, .asm_3cb81 + jr nz, .playSound +; link battle call SaveScreenTilesToBuffer1 xor a ld [wcd6a], a ld a, $f - ld [wPlayerMoveListIndex], a ; wPlayerMoveListIndex - call Func_3d605 + ld [wPlayerMoveListIndex], a + call LinkBattleExchangeData call LoadScreenTilesFromBuffer1 - ld a, [wcc3e] + ld a, [wSerialExchangeNybbleReceiveData] cp $f ld a, $2 - jr z, .asm_3cb81 + jr z, .playSound dec a -.asm_3cb81 - ld [wcf0b], a +.playSound + ld [wBattleResult], a ld a, (SFX_08_44 - SFX_Headers_08) / 3 call PlaySoundWaitForCurrent ld hl, GotAwayText call PrintText call WaitForSoundToFinish call SaveScreenTilesToBuffer1 - scf + scf ; set carry ret CantEscapeText: ; 3cb97 (f:4b97) @@ -1647,10 +1715,11 @@ GotAwayText: ; 3cba1 (f:4ba1) TX_FAR _GotAwayText db "@" -Func_3cba6: ; 3cba6 (f:4ba6) - ld a, [wWhichPokemon] ; wWhichPokemon +; copies from party data to battle mon data when sending out a new player mon +LoadBattleMonFromParty: ; 3cba6 (f:4ba6) + ld a, [wWhichPokemon] ld bc, $2c - ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1) + ld hl, wPartyMon1Species call AddNTimes ld de, wBattleMonSpecies ld bc, $c @@ -1660,40 +1729,41 @@ Func_3cba6: ; 3cba6 (f:4ba6) ld de, wBattleMonDVs ld bc, $2 call CopyData - ld de, wBattleMonPP ; wBattleMonPP + ld de, wBattleMonPP ld bc, $4 call CopyData - ld de, wBattleMonLevel ; wBattleMonLevel + ld de, wBattleMonLevel ld bc, $b call CopyData ld a, [wBattleMonSpecies2] ld [wd0b5], a call GetMonHeader - ld hl, wPartyMonNicks ; wPartyMonNicks - ld a, [wPlayerMonNumber] ; wPlayerMonNumber + ld hl, wPartyMonNicks + ld a, [wPlayerMonNumber] call SkipFixedLengthTextEntries ld de, wBattleMonNick ld bc, $b call CopyData - ld hl, wBattleMonLevel ; wBattleMonLevel - ld de, wcd0f + ld hl, wBattleMonLevel + ld de, wPlayerMonUnmodifiedLevel ; block of memory used for unmodified stats ld bc, $b call CopyData - call Func_3ed1a - call Func_3ee19 - ld a, $7 + call ApplyBurnAndParalysisPenaltiesToPlayer + call ApplyBadgeStatBoosts + ld a, $7 ; default stat modifier ld b, $8 - ld hl, wPlayerMonAttackMod ; wcd1a -.asm_3cc0e + ld hl, wPlayerMonAttackMod +.statModLoop ld [hli], a dec b - jr nz, .asm_3cc0e + jr nz, .statModLoop ret -Func_3cc13: ; 3cc13 (f:4c13) - ld a, [wWhichPokemon] ; wWhichPokemon +; copies from enemy party data to current enemy mon data when sending out a new enemy mon +LoadEnemyMonFromParty: ; 3cc13 (f:4c13) + ld a, [wWhichPokemon] ld bc, $2c - ld hl, wEnemyMons ; wEnemyMon1Species + ld hl, wEnemyMons call AddNTimes ld de, wEnemyMonSpecies ld bc, $c @@ -1703,56 +1773,55 @@ Func_3cc13: ; 3cc13 (f:4c13) ld de, wEnemyMonDVs ld bc, $2 call CopyData - ld de, wEnemyMonPP ; wcffe + ld de, wEnemyMonPP ld bc, $4 call CopyData - ld de, wEnemyMonLevel ; wEnemyMonLevel + ld de, wEnemyMonLevel ld bc, $b call CopyData ld a, [wEnemyMonSpecies] ld [wd0b5], a call GetMonHeader ld hl, wEnemyMonNicks - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] call SkipFixedLengthTextEntries ld de, wEnemyMonNick ld bc, $b call CopyData - ld hl, wEnemyMonLevel ; wEnemyMonLevel - ld de, wcd23 + ld hl, wEnemyMonLevel + ld de, wEnemyMonUnmodifiedLevel ; block of memory used for unmodified stats ld bc, $b call CopyData - call Func_3ed1e + call ApplyBurnAndParalysisPenaltiesToEnemy ld hl, W_MONHBASESTATS - ld de, wd002 + ld de, wEnemyMonBaseStats ld b, $5 -.asm_3cc79 +.copyBaseStatsLoop ld a, [hli] ld [de], a inc de dec b - jr nz, .asm_3cc79 - ld a, $7 + jr nz, .copyBaseStatsLoop + ld a, $7 ; default stat modifier ld b, $8 - ld hl, wEnemyMonStatMods ; wcd2e -.asm_3cc86 + ld hl, wEnemyMonStatMods +.statModLoop ld [hli], a dec b - jr nz, .asm_3cc86 - ld a, [wWhichPokemon] ; wWhichPokemon + jr nz, .statModLoop + ld a, [wWhichPokemon] ld [wEnemyMonPartyPos], a ret -Func_3cc91: ; 3cc91 (f:4c91) - callab SendOutMon - ld hl, wEnemyMonHP ; wEnemyMonHP +SendOutMon: ; 3cc91 (f:4c91) + callab PrintSendOutMonMessage + ld hl, wEnemyMonHP ld a, [hli] - or [hl] - jp z, Func_3cca4 - call Func_3cdec - -Func_3cca4: ; 3cca4 (f:4ca4) - call Func_3cd60 + or [hl] ; is enemy mon HP zero? + jp z, .skipDrawingEnemyHUDAndHPBar; if HP is zero, skip drawing the HUD and HP bar + call DrawEnemyHUDAndHPBar +.skipDrawingEnemyHUDAndHPBar + call DrawPlayerHUDAndHPBar predef LoadMonBackPic xor a ld [$ffe1], a @@ -1761,35 +1830,36 @@ Func_3cca4: ; 3cca4 (f:4ca4) ld [hl], a ld [wcc5b], a ld [wd05b], a - ld [W_PLAYERMOVENUM], a ; wcfd2 - ld hl, wccf1 + ld [W_PLAYERMOVENUM], a + ld hl, wPlayerUsedMove ld [hli], a ld [hl], a - ld hl, wd060 + ld hl, wPlayerStatsToDouble ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld [W_PLAYERDISABLEDMOVE], a ; W_PLAYERDISABLEDMOVE + ld [W_PLAYERDISABLEDMOVE], a ld [wccee], a ld [wccf7], a ld b, $1 call GoPAL_SET - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - res 5, [hl] + ld hl, W_ENEMYBATTSTATUS1 + res UsingTrappingMove, [hl] ld a, $1 - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a ld a, POOF_ANIM call PlayMoveAnimation hlCoord 4, 11 predef Func_3f073 ld a, [wcf91] call PlayCry - call Func_3ee94 + call PrintEmptyString jp SaveScreenTilesToBuffer1 -Func_3ccfa: ; 3ccfa (f:4cfa) +; show 2 stages of the player getting smaller before disappearing +AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa) hlCoord 1, 5 ld bc, $707 call ClearScreenArea @@ -1797,47 +1867,46 @@ Func_3ccfa: ; 3ccfa (f:4cfa) ld bc, $505 xor a ld [wcd6c], a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [H_DOWNARROWBLINKCNT1], a predef Func_79aba ld c, $4 call DelayFrames - call Func_3cd3a + call .clearScreenArea hlCoord 4, 9 ld bc, $303 ld a, $1 ld [wcd6c], a xor a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [H_DOWNARROWBLINKCNT1], a predef Func_79aba call Delay3 - call Func_3cd3a + call .clearScreenArea ld a, $4c Coorda 5, 11 - -Func_3cd3a: ; 3cd3a (f:4d3a) +.clearScreenArea hlCoord 1, 5 ld bc, $707 jp ClearScreenArea ; reads player's current mon's HP into wBattleMonHP ReadPlayerMonCurHPAndStatus: ; 3cd43 (f:4d43) - ld a, [wPlayerMonNumber] ; wPlayerMonNumber - ld hl, wPartyMon1HP ; wd16c + ld a, [wPlayerMonNumber] + ld hl, wPartyMon1HP ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld d, h ld e, l - ld hl, wBattleMonHP ; wd015 + ld hl, wBattleMonHP ld bc, $4 ; 2 bytes HP, 1 byte unknown (unused?), 1 byte status jp CopyData -Func_3cd5a: ; 3cd5a (f:4d5a) - call Func_3cd60 - jp Func_3cdec +DrawHUDsAndHPBars: ; 3cd5a (f:4d5a) + call DrawPlayerHUDAndHPBar + jp DrawEnemyHUDAndHPBar -Func_3cd60: ; 3cd60 (f:4d60) +DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60) xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a hlCoord 9, 7 ld bc, $50b call ClearScreenArea @@ -1846,34 +1915,34 @@ Func_3cd60: ; 3cd60 (f:4d60) ld [hl], $73 ld de, wBattleMonNick hlCoord 10, 7 - call Func_3ce9c + call CenterMonName call PlaceString ld hl, wBattleMonSpecies - ld de, wcf98 + ld de, wLoadedMon ld bc, $c call CopyData - ld hl, wBattleMonLevel ; wBattleMonLevel - ld de, wcfb9 + ld hl, wBattleMonLevel + ld de, wLoadedMonLevel ld bc, $b call CopyData hlCoord 14, 8 push hl inc hl - ld de, wcf9c + ld de, wLoadedMonStatus call PrintStatusConditionNotFainted pop hl jr nz, .asm_3cdae call PrintLevel .asm_3cdae - ld a, [wcf98] + ld a, [wLoadedMonSpecies] ld [wcf91], a hlCoord 10, 9 - predef DrawHP + predef DrawHP ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld hl, wcf1d call GetBattleHealthBarColor - ld hl, wBattleMonHP ; wd015 + ld hl, wBattleMonHP ld a, [hli] or [hl] jr z, .asm_3cdd9 @@ -1896,90 +1965,94 @@ Func_3cd60: ; 3cd60 (f:4d60) set 7, [hl] ret -Func_3cdec: ; 3cdec (f:4dec) +DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec) xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld hl, wTileMap ld bc, $40c call ClearScreenArea callab PlaceEnemyHUDTiles ld de, wEnemyMonNick hlCoord 1, 0 - call Func_3ce9c + call CenterMonName call PlaceString hlCoord 4, 1 push hl inc hl - ld de, wEnemyMonStatus ; wcfe9 + ld de, wEnemyMonStatus call PrintStatusConditionNotFainted pop hl - jr nz, .asm_3ce23 - ld a, [wEnemyMonLevel] ; wEnemyMonLevel - ld [wcfb9], a + jr nz, .skipPrintLevel ; if the mon has a status condition, skip printing the level + ld a, [wEnemyMonLevel] + ld [wLoadedMonLevel], a call PrintLevel -.asm_3ce23 - ld hl, wEnemyMonHP ; wEnemyMonHP +.skipPrintLevel + ld hl, wEnemyMonHP ld a, [hli] - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a ld a, [hld] - ld [$ff98], a - or [hl] - jr nz, .asm_3ce36 + ld [H_MULTIPLICAND + 2], a + or [hl] ; is current HP zero? + jr nz, .hpNonzero +; current HP is 0 +; set variables for DrawHPBar ld c, a ld e, a ld d, $6 - jp Func_3ce7f -.asm_3ce36 - xor a - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) - ld a, $30 - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) - call Multiply - ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP + jp .drawHPBar +.hpNonzero + xor a + ld [H_MULTIPLICAND], a + ld a, 48 + ld [H_MULTIPLIER], a + call Multiply ; multiply current HP by 48 + ld hl, wEnemyMonMaxHP ld a, [hli] ld b, a ld a, [hl] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_DIVISOR], a ld a, b - and a - jr z, .asm_3ce6a - ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + and a ; is max HP > 255? + jr z, .doDivide +; if max HP > 255, scale both (current HP * 48) and max HP by dividing by 4 so that max HP fits in one byte +; (it needs to be one byte so it can be used as the divisor for the Divide function) + ld a, [H_DIVISOR] srl b rr a srl b rr a - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) - ld a, [$ff97] + ld [H_DIVISOR], a + ld a, [H_PRODUCT + 2] ld b, a srl b - ld a, [$ff98] + ld a, [H_PRODUCT + 3] rr a srl b rr a - ld [$ff98], a + ld [H_PRODUCT + 3], a ld a, b - ld [$ff97], a -.asm_3ce6a - ld a, [$ff97] - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) - ld a, [$ff98] - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + ld [H_PRODUCT + 2], a +.doDivide + ld a, [H_PRODUCT + 2] + ld [H_DIVIDEND], a + ld a, [H_PRODUCT + 3] + ld [H_DIVIDEND + 1], a ld a, $2 ld b, a - call Divide - ld a, [$ff98] + call Divide ; divide (current HP * 48) by max HP + ld a, [H_QUOTIENT + 3] +; set variables for DrawHPBar ld e, a ld a, $6 ld d, a ld c, a - -Func_3ce7f: ; 3ce7f (f:4e7f) +.drawHPBar xor a - ld [wListMenuID], a ; wListMenuID + ld [wHPBarType], a hlCoord 2, 2 call DrawHPBar ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld hl, wcf1e GetBattleHealthBarColor: ; 3ce90 (f:4e90) @@ -1991,61 +2064,64 @@ GetBattleHealthBarColor: ; 3ce90 (f:4e90) ld b, $1 jp GoPAL_SET -Func_3ce9c: ; 3ce9c (f:4e9c) +; 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) push de inc hl inc hl ld b, $2 -.asm_3cea1 +.loop inc de ld a, [de] cp $50 - jr z, .asm_3ceb1 + jr z, .done inc de ld a, [de] cp $50 - jr z, .asm_3ceb1 + jr z, .done dec hl dec b - jr nz, .asm_3cea1 -.asm_3ceb1 + jr nz, .loop +.done pop de ret -InitBattleMenu: ; 3ceb3 (f:4eb3) +DisplayBattleMenu: ; 3ceb3 (f:4eb3) call LoadScreenTilesFromBuffer1 ; restore saved screen - ld a, [W_BATTLETYPE] ; wd05a + ld a, [W_BATTLETYPE] and a jr nz, .nonstandardbattle - call Func_3cd5a ; redraw names and HP bars? - call Func_3ee94 + call DrawHUDsAndHPBars + call PrintEmptyString call SaveScreenTilesToBuffer1 .nonstandardbattle - ld a, [W_BATTLETYPE] ; wd05a + ld a, [W_BATTLETYPE] cp $2 ; safari - ld a, $b ; safari menu id + ld a, BATTLE_MENU_TEMPLATE jr nz, .menuselected - ld a, $1b ; regular menu id + ld a, SAFARI_BATTLE_MENU_TEMPLATE .menuselected - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID - ld a, [W_BATTLETYPE] ; wd05a + ld a, [W_BATTLETYPE] dec a - jp nz, RegularBattleMenu ; regular battle - ; the following happens for the old man tutorial - ld hl, wPlayerName ; wd158 - ld de, W_GRASSRATE ; W_GRASSRATE + 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 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 + ; map with wild Pokémon. Due to an oversight, the data ; may not get overwritten (cinnabar) and the infamous - ; missingno. glitch can show up. - ld hl, OldManName ; $4f12 - ld de, wPlayerName ; wd158 + ; Missingno. glitch can show up. + ld hl, .oldManName + ld de, wPlayerName ld bc, $b call CopyData - ; the following simulates the keystrokes by drawing menus on screen +; the following simulates the keystrokes by drawing menus on screen hlCoord 9, 14 ld [hl], "▶" ld c, $50 @@ -2056,176 +2132,198 @@ InitBattleMenu: ; 3ceb3 (f:4eb3) ld c, $32 call DelayFrames ld [hl], $ec - ld a, $2 - jp Func_3cfe8 - -OldManName: ; 3cf12 (f:4f12) + ld a, $2 ; select the "ITEM" menu + jp .upperLeftMenuItemWasNotSelected +.oldManName db "OLD MAN@" - -RegularBattleMenu: ; 3cf1a (f:4f1a) +.handleBattleMenuInput ld a, [wcc2d] - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem - sub $2 - jr c, .leftcolumn - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem - jr .rightcolumn -.leftcolumn - ld a, [W_BATTLETYPE] ; wd05a + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a + sub 2 ; check if the cursor is in the left column + jr c, .leftColumn +; cursor is in the right column + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a + jr .rightColumn +.leftColumn ; put cursor in left column of menu + ld a, [W_BATTLETYPE] cp $2 ld a, " " - jr z, .safaribattle - Coorda 15, 14 - Coorda 15, 16 - ld b, $9 - jr .notsafari -.safaribattle + jr z, .safariLeftColumn +; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle) + Coorda 15, 14 ; clear upper cursor position in right column + Coorda 15, 16 ; clear lower cursor position in right column + ld b, $9 ; top menu item X + jr .leftColumn_WaitForInput +.safariLeftColumn Coorda 13, 14 Coorda 13, 16 hlCoord 7, 14 - ld de, W_NUMSAFARIBALLS ; W_NUMSAFARIBALLS + ld de, W_NUMSAFARIBALLS ld bc, $102 call PrintNumber - ld b, $1 -.notsafari - ld hl, wTopMenuItemY ; wTopMenuItemY + ld b, $1 ; top menu item X +.leftColumn_WaitForInput + ld hl, wTopMenuItemY ld a, $e - ld [hli], a + ld [hli], a ; wTopMenuItemY ld a, b - ld [hli], a + ld [hli], a ; wTopMenuItemX inc hl inc hl ld a, $1 - ld [hli], a - ld [hl], $11 + ld [hli], a ; wMaxMenuItem + ld [hl], D_RIGHT | A_BUTTON ; wMenuWatchedKeys call HandleMenuInput - bit 4, a - jr nz, .rightcolumn - jr .selection -.rightcolumn - ld a, [W_BATTLETYPE] ; wd05a + bit 4, a ; check if right was pressed + 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, " " - jr z, .safarirightcolumn - Coorda 9, 14 - Coorda 9, 16 - ld b, $f - jr .notsafarirightcolumn -.safarirightcolumn - Coorda 1, 14 - Coorda 1, 16 + jr z, .safariRightColumn +; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle) + Coorda 9, 14 ; clear upper cursor position in left column + Coorda 9, 16 ; clear lower cursor position in left column + ld b, $f ; top menu item X + jr .rightColumn_WaitForInput +.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 ; W_NUMSAFARIBALLS + ld de, W_NUMSAFARIBALLS ld bc, $102 call PrintNumber - ld b, $d -.notsafarirightcolumn - ld hl, wTopMenuItemY ; wTopMenuItemY + ld b, $d ; top menu item X +.rightColumn_WaitForInput + ld hl, wTopMenuItemY ld a, $e - ld [hli], a + ld [hli], a ; wTopMenuItemY ld a, b - ld [hli], a + ld [hli], a ; wTopMenuItemX inc hl inc hl ld a, $1 - ld [hli], a - ld a, $21 - ld [hli], a + ld [hli], a ; wMaxMenuItem + ld a, D_LEFT | A_BUTTON + ld [hli], a ; wMenuWatchedKeys call HandleMenuInput - bit 5, a - jr nz, .leftcolumn - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + bit 5, a ; check if left was pressed + jr nz, .leftColumn ; if left was pressed, jump + ld a, [wCurrentMenuItem] add $2 ; if we're in the right column, the actual id is +2 - ld [wCurrentMenuItem], a ; wCurrentMenuItem -.selection + ld [wCurrentMenuItem], a +.AButtonPressed call PlaceUnfilledArrowMenuCursor - ld a, [W_BATTLETYPE] ; wd05a - cp $2 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [W_BATTLETYPE] + cp $2 ; is it a Safari battle? + ld a, [wCurrentMenuItem] ld [wcc2d], a - jr z, .asm_3cfd0 - cp $1 - jr nz, .asm_3cfcb - inc a - jr .asm_3cfd0 -.asm_3cfcb - cp $2 ; what - jr nz, .asm_3cfd0 - dec a -.asm_3cfd0 - and a - jr nz, Func_3cfe8 - ; first option was selected... - ld a, [W_BATTLETYPE] ; wd05a + jr z, .handleMenuSelection +; not Safari battle +; swap the IDs of the item menu and party menu (this is probably because they swapped the positions of these menu items in first generation English versions) + cp $1 ; was the item menu selected? + jr nz, .notItemMenu +; item menu was selected + inc a ; increment a to 2 + jr .handleMenuSelection +.notItemMenu + cp $2 ; was the party menu selected? + jr nz, .handleMenuSelection +; party menu selected + dec a ; decrement a to 1 +.handleMenuSelection + and a + jr nz, .upperLeftMenuItemWasNotSelected +; the upper left menu item was selected + ld a, [W_BATTLETYPE] cp $2 - jr z, .safari1 + jr z, .throwSafariBallWasSelected +; the "FIGHT" menu was selected xor a - ld [wd120], a - jp LoadScreenTilesFromBuffer1 ; restore saved screen and return?? -.safari1 ; safari first option?? + ld [wNumRunAttempts], a + jp LoadScreenTilesFromBuffer1 ; restore saved screen and return +.throwSafariBallWasSelected ld a, SAFARI_BALL ld [wcf91], a - jr asm_3d05f + jr UseBagItem -Func_3cfe8: ; 3cfe8 (f:4fe8) +.upperLeftMenuItemWasNotSelected ; a menu item other than the upper left item was selected cp $2 - jp nz, Func_3d0ca - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_3cffd + jp nz, PartyMenuOrRockOrRun + +; either the bag (normal battle) or bait (safari battle) was selected + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .notLinkBattle + +; can't use items in link battles ld hl, ItemsCantBeUsedHereText call PrintText - jp InitBattleMenu -.asm_3cffd ; bag? - call SaveScreenTilesToBuffer2 ; copy bg? - ld a, [W_BATTLETYPE] ; wd05a - cp $2 - jr nz, asm_3d00e + jp DisplayBattleMenu + +.notLinkBattle + call SaveScreenTilesToBuffer2 + ld a, [W_BATTLETYPE] + cp $2 ; is it a safari battle? + jr nz, BagWasSelected + +; bait was selected ld a, SAFARI_BAIT ld [wcf91], a - jr asm_3d05f -asm_3d00e: ; 3d00e (f:500e) + jr UseBagItem + +BagWasSelected: call LoadScreenTilesFromBuffer1 - ld a, [W_BATTLETYPE] ; wd05a - and a - jr nz, .asm_3d01a - call Func_3cd5a -.asm_3d01a - ld a, [W_BATTLETYPE] ; wd05a - dec a - jr nz, Func_3d031 + ld a, [W_BATTLETYPE] + and a ; is it a normal battle? + jr nz, .next + +; normal battle + call DrawHUDsAndHPBars +.next + ld a, [W_BATTLETYPE] + dec a ; is it the old man tutorial? + jr nz, DisplayPlayerBag ; no, it is a normal battle ld hl, OldManItemList ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a - jr Func_3d03c + ld [wList + 1], a + jr DisplayBagMenu -OldManItemList: ; 3d02d (f:502d) - db $01, POKE_BALL, 50, $ff +OldManItemList: + db 1 ; # items + db POKE_BALL, 50 + db -1 -Func_3d031 - ld hl, wNumBagItems ; wNumBagItems +DisplayPlayerBag: + ; get the pointer to player's bag when in a normal battle + ld hl, wNumBagItems ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a -Func_3d03c + ld [wList + 1], a + +DisplayBagMenu: xor a ld [wcf93], a - ld a, $3 - ld [wListMenuID], a ; wListMenuID + ld a, ITEMLISTMENU + ld [wListMenuID], a ld a, [wcc2c] - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a call DisplayListMenuID - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wcc2c], a ld a, $0 ld [wcc37], a - ld [wcc35], a - jp c, InitBattleMenu -asm_3d05f: ; 3d05f (f:505f) + ld [wMenuItemToSwap], a + jp c, DisplayBattleMenu ; go back to battle menu if an item was not selected + +UseBagItem: + ; either use an item from the bag or use a safari zone item ld a, [wcf91] ld [wd11e], a call GetItemName @@ -2233,80 +2331,87 @@ asm_3d05f: ; 3d05f (f:505f) xor a ld [wd152], a call UseItem - call Func_3ee5b + call LoadHudTilePatterns call ClearSprites xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld a, [W_BATTLETYPE] ; wd05a - cp $2 - jr z, .asm_3d09c + ld [wCurrentMenuItem], a + ld a, [W_BATTLETYPE] + cp $2 ; is it a safari battle? + jr z, .checkIfMonCaptured + ld a, [wcd6a] - and a - jp z, asm_3d00e - ld a, [W_PLAYERBATTSTATUS1] ; W_PLAYERBATTSTATUS1 - bit 5, a - jr z, .asm_3d09c - ld hl, wd06a + and a ; was the item used successfully? + jp z, BagWasSelected ; if not, go back to the bag menu + + ld a, [W_PLAYERBATTSTATUS1] + bit UsingTrappingMove, a ; is the player using a multi-turn move like wrap? + jr z, .checkIfMonCaptured + ld hl, wPlayerNumAttacksLeft dec [hl] - jr nz, .asm_3d09c - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - res 5, [hl] -.asm_3d09c + jr nz, .checkIfMonCaptured + ld hl, W_PLAYERBATTSTATUS1 + res UsingTrappingMove, [hl] ; not using multi-turn move any more + +.checkIfMonCaptured ld a, [wd11c] - and a - jr nz, .asm_3d0b7 - ld a, [W_BATTLETYPE] ; wd05a - cp $2 - jr z, .asm_3d0b2 + and a ; was the enemy mon captured with a ball? + jr nz, .returnAfterCapturingMon + + ld a, [W_BATTLETYPE] + cp $2 ; is it a safari battle? + jr z, .returnAfterUsingItem_NoCapture +; not a safari battle call LoadScreenTilesFromBuffer1 - call Func_3cd5a ; redraw name and hp bar? + call DrawHUDsAndHPBars call Delay3 -.asm_3d0b2 +.returnAfterUsingItem_NoCapture + call GBPalNormal - and a + and a ; reset carry ret -.asm_3d0b7 + +.returnAfterCapturingMon call GBPalNormal xor a ld [wd11c], a ld a, $2 - ld [wcf0b], a - scf + ld [wBattleResult], a + scf ; set carry ret -ItemsCantBeUsedHereText: ; 3d0c5 (f:50c5) +ItemsCantBeUsedHereText: TX_FAR _ItemsCantBeUsedHereText db "@" -Func_3d0ca: ; 3d0ca (f:50ca) - dec a - jp nz, Func_3d1fa +PartyMenuOrRockOrRun: + dec a ; was Run selected? + jp nz, BattleMenu_RunWasSelected +; party menu or rock was selected call SaveScreenTilesToBuffer2 - ld a, [W_BATTLETYPE] ; wd05a - cp $2 - jr nz, Func_3d0e0 + ld a, [W_BATTLETYPE] + cp $2 ; is it a safari battle? + jr nz, .partyMenuWasSelected +; safari battle ld a, SAFARI_ROCK ld [wcf91], a - jp asm_3d05f - -Func_3d0e0: ; 3d0e0 (f:50e0) + jp UseBagItem +.partyMenuWasSelected call LoadScreenTilesFromBuffer1 xor a ld [wd07d], a - ld [wcc35], a + ld [wMenuItemToSwap], a call DisplayPartyMenu -asm_3d0ed: ; 3d0ed (f:50ed) - jp nc, Func_3d119 -asm_3d0f0: ; 3d0f0 (f:50f0) +.checkIfPartyMonWasSelected + jp nc, .partyMonWasSelected ; if a party mon was selected, jump, else we quit the party menu +.quitPartyMenu call ClearSprites call GBPalWhiteOut - call Func_3ee5b + call LoadHudTilePatterns call LoadScreenTilesFromBuffer2 call GoPAL_SET_CF1C call GBPalNormal - jp InitBattleMenu - -Func_3d105: ; 3d105 (f:5105) + jp DisplayBattleMenu +.partyMonDeselected hlCoord 11, 11 ld bc, $81 ld a, $7f @@ -2314,101 +2419,108 @@ Func_3d105: ; 3d105 (f:5105) xor a ld [wd07d], a call GoBackToPartyMenu - jr asm_3d0ed - -Func_3d119: ; 3d119 (f:5119) - ld a, $c - ld [wd125], a + jr .checkIfPartyMonWasSelected +.partyMonWasSelected + ld a, SWITCH_STATS_CANCEL_MENU_TEMPLATE + ld [wTextBoxID], a call DisplayTextBoxID - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $c - ld [hli], a - ld [hli], a + ld [hli], a ; wTopMenuItemY + 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 [hli], a ; wMaxMenuItem + ld a, B_BUTTON | A_BUTTON + ld [hli], a ; wMenuWatchedKeys xor a - ld [hl], a + ld [hl], a ; wLastMenuItem call HandleMenuInput - bit 1, a - jr nz, Func_3d105 + bit 1, a ; was A pressed? + jr nz, .partyMonDeselected ; if B was pressed, jump +; A was pressed call PlaceUnfilledArrowMenuCursor - ld a, [wCurrentMenuItem] ; wCurrentMenuItem - cp $2 - jr z, asm_3d0f0 - and a - jr z, .asm_3d18a + ld a, [wCurrentMenuItem] + cp $2 ; was Cancel selected? + jr z, .quitPartyMenu ; if so, quit the party menu entirely + and a ; was Switch selected? + jr z, .switchMon ; if so, jump +; Stats was selected xor a ld [wcc49], a - ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1) + ld hl, wPartyMon1 call ClearSprites +; display the two status screens predef StatusScreen predef StatusScreen2 - ld a, [W_ENEMYBATTSTATUS2] ; W_ENEMYBATTSTATUS2 - bit 4, a +; now we need to reload the enemy mon pic + ld a, [W_ENEMYBATTSTATUS2] + bit HasSubstituteUp, a ; does the enemy mon have a substitute? ld hl, AnimationSubstitute - jr nz, .asm_3d182 + jr nz, .doEnemyMonAnimation +; enemy mon doesn't have substitute ld a, [wccf3] - and a + and a ; has the enemy mon used Minimise? ld hl, AnimationMinimizeMon - jr nz, .asm_3d182 + jr nz, .doEnemyMonAnimation +; enemy mon is not minimised ld a, [wEnemyMonSpecies] ld [wcf91], a ld [wd0b5], a call GetMonHeader ld de, vFrontPic call LoadMonFrontSprite - jr .asm_3d187 -.asm_3d182 + jr .enemyMonPicReloaded +.doEnemyMonAnimation ld b, BANK(AnimationSubstitute) ; BANK(AnimationMinimizeMon) call Bankswitch -.asm_3d187 - jp Func_3d0e0 -.asm_3d18a - ld a, [wPlayerMonNumber] ; wPlayerMonNumber +.enemyMonPicReloaded ; enemy mon pic has been reloaded, so return to the party menu + jp .partyMenuWasSelected +.switchMon + ld a, [wPlayerMonNumber] ld d, a - ld a, [wWhichPokemon] ; wWhichPokemon - cp d - jr nz, .asm_3d19d + ld a, [wWhichPokemon] + cp d ; check if the mon to switch to is already out + jr nz, .notAlreadyOut +; mon is already out ld hl, AlreadyOutText call PrintText - jp Func_3d105 -.asm_3d19d - call Func_3ca97 - jp z, Func_3d105 + jp .partyMonDeselected +.notAlreadyOut + call HasMonFainted + jp z, .partyMonDeselected ; can't switch to fainted mon ld a, $1 ld [wcd6a], a call GBPalWhiteOut call ClearSprites - call Func_3ee5b + call LoadHudTilePatterns call LoadScreenTilesFromBuffer1 call GoPAL_SET_CF1C call GBPalNormal +; fall through to SwitchPlayerMon -Func_3d1ba: ; 3d1ba (f:51ba) +SwitchPlayerMon: ; 3d1ba (f:51ba) callab RetreatMon ld c, $32 call DelayFrames - call Func_3ccfa - ld a, [wWhichPokemon] ; wWhichPokemon - ld [wPlayerMonNumber], a ; wPlayerMonNumber + call AnimateRetreatingPlayerMon + ld a, [wWhichPokemon] + ld [wPlayerMonNumber], a ld c, a ld b, $1 push bc - ld hl, wPartyAliveFlags + ld hl, wPartyGainExpFlags predef FlagActionPredef pop bc - ld hl, wccf5 + ld hl, wPartyFoughtCurrentEnemyFlags predef FlagActionPredef - call Func_3cba6 - call Func_3cc91 + call LoadBattleMonFromParty + call SendOutMon call SaveScreenTilesToBuffer1 ld a, $2 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a and a ret @@ -2416,20 +2528,20 @@ AlreadyOutText: ; 3d1f5 (f:51f5) TX_FAR _AlreadyOutText db "@" -Func_3d1fa: ; 3d1fa (f:51fa) +BattleMenu_RunWasSelected: ; 3d1fa (f:51fa) call LoadScreenTilesFromBuffer1 ld a, $3 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld hl, wBattleMonSpeed ld de, wEnemyMonSpeed - call Func_3cab9 + call TryRunningFromBattle ld a, $0 ld [wd11f], a ret c ld a, [wcd6a] and a ret nz - jp InitBattleMenu + jp DisplayBattleMenu MoveSelectionMenu: ; 3d219 (f:5219) ld a, [wMoveMenuType] @@ -2440,25 +2552,25 @@ MoveSelectionMenu: ; 3d219 (f:5219) jr .regularmenu .loadmoves - ld de, wd0dc - ld bc, $4 + ld de, wMoves + ld bc, NUM_MOVES call CopyData - callab Func_39b87 + callab FormatMovesString ret .writemoves - ld de, wd0e1 - ld a, [$fff6] + ld de, wMovesString + ld a, [hFlags_0xFFF6] set 2, a - ld [$fff6], a + ld [hFlags_0xFFF6], a call PlaceString - ld a, [$fff6] + ld a, [hFlags_0xFFF6] res 2, a - ld [$fff6], a + ld [hFlags_0xFFF6], a ret .regularmenu - call Func_3d3f5 + call AnyMoveToSelect ret z ld hl, wBattleMonMoves call .loadmoves @@ -2490,8 +2602,8 @@ MoveSelectionMenu: ; 3d219 (f:5219) ld a, $7 jr .menuset .relearnmenu - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMon1Moves ; wPartyMon1Moves + ld a, [wWhichPokemon] + ld hl, wPartyMon1Moves ld bc, $2c call AddNTimes call .loadmoves @@ -2504,24 +2616,24 @@ MoveSelectionMenu: ; 3d219 (f:5219) ld b, $5 ld a, $7 .menuset - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld [hli], a ld a, b - ld [hli], a ; wTopMenuItemX + ld [hli], a ld a, [wMoveMenuType] cp $1 jr z, .selectedmoveknown ld a, $1 jr nc, .selectedmoveknown - ld a, [wPlayerMoveListIndex] ; wPlayerMoveListIndex + ld a, [wPlayerMoveListIndex] inc a .selectedmoveknown - ld [hli], a ; wCurrentMenuItem + ld [hli], a inc hl ; wTileBehindCursor untouched ld a, [wcd6c] inc a inc a - ld [hli], a ; wMaxMenuItem + ld [hli], a ld a, [wMoveMenuType] dec a ld b, $c1 ; can't use B @@ -2529,8 +2641,8 @@ MoveSelectionMenu: ; 3d219 (f:5219) dec a ld b, $c3 jr z, .matchedkeyspicked - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jr z, .matchedkeyspicked ld a, [W_FLAGS_D733] bit 0, a @@ -2539,31 +2651,32 @@ MoveSelectionMenu: ; 3d219 (f:5219) ld b, $ff .matchedkeyspicked ld a, b - ld [hli], a ; wMenuWatchedKeys + ld [hli], a ld a, [wMoveMenuType] cp $1 jr z, .movelistindex1 - ld a, [wPlayerMoveListIndex] ; wPlayerMoveListIndex + ld a, [wPlayerMoveListIndex] inc a .movelistindex1 - ld [hl], a ; wLastMenuItem + ld [hl], a +; fallthrough -Func_3d2fe: ; 3d2fe (f:52fe) +SelectMenuItem: ; 3d2fe (f:52fe) ld a, [wMoveMenuType] and a jr z, .battleselect dec a jr nz, .select hlCoord 1, 14 - ld de, WhichTechniqueString ; $53b8 + ld de, WhichTechniqueString call PlaceString jr .select .battleselect ld a, [W_FLAGS_D733] bit 0, a jr nz, .select - call Func_3d4b6 - ld a, [wcc35] + call PrintMenuItem + ld a, [wMenuItemToSwap] and a jr z, .select hlCoord 5, 13 @@ -2572,24 +2685,24 @@ Func_3d2fe: ; 3d2fe (f:52fe) call AddNTimes ld [hl], $ec .select - ld hl, $fff6 + ld hl, hFlags_0xFFF6 set 1, [hl] call HandleMenuInput - ld hl, $fff6 + ld hl, hFlags_0xFFF6 res 1, [hl] bit 6, a - jp nz, Func_3d3c9 ; up + jp nz, CursorUp ; up bit 7, a - jp nz, Func_3d3dd ; down + jp nz, CursorDown ; down bit 2, a - jp nz, Func_3d435 ; select + jp nz, SwapMovesInMenu ; select bit 1, a ; B, but was it reset above? push af xor a - ld [wcc35], a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld [wMenuItemToSwap], a + ld a, [wCurrentMenuItem] dec a - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld b, a ld a, [wMoveMenuType] dec a ; if not mimic @@ -2599,38 +2712,38 @@ Func_3d2fe: ; 3d2fe (f:52fe) .nob dec a ld a, b - ld [wPlayerMoveListIndex], a ; wPlayerMoveListIndex + ld [wPlayerMoveListIndex], a jr nz, .moveselected pop af ret .moveselected pop af ret nz - ld hl, wBattleMonPP ; wBattleMonPP - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld hl, wBattleMonPP + ld a, [wCurrentMenuItem] ld c, a ld b, $0 add hl, bc ld a, [hl] and $3f jr z, .nopp - ld a, [W_PLAYERDISABLEDMOVE] ; W_PLAYERDISABLEDMOVE + ld a, [W_PLAYERDISABLEDMOVE] swap a and $f dec a cp c jr z, .disabled - ld a, [W_PLAYERBATTSTATUS3] ; W_PLAYERBATTSTATUS3 + ld a, [W_PLAYERBATTSTATUS3] bit 3, a ; transformed jr nz, .dummy ; game freak derp .dummy - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld hl, wBattleMonMoves ld c, a ld b, $0 add hl, bc ld a, [hl] - ld [wPlayerSelectedMove], a ; wPlayerSelectedMove + ld [wPlayerSelectedMove], a xor a ret .disabled @@ -2654,35 +2767,36 @@ MoveDisabledText: ; 3d3b3 (f:53b3) WhichTechniqueString: ; 3d3b8 (f:53b8) db "WHICH TECHNIQUE?@" -Func_3d3c9: ; 3d3c9 (f:53c9) - ld a, [wCurrentMenuItem] ; wCurrentMenuItem +CursorUp: ; 3d3c9 (f:53c9) + ld a, [wCurrentMenuItem] and a - jp nz, Func_3d2fe + jp nz, SelectMenuItem call EraseMenuCursor ld a, [wcd6c] inc a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - jp Func_3d2fe + ld [wCurrentMenuItem], a + jp SelectMenuItem -Func_3d3dd: ; 3d3dd (f:53dd) - ld a, [wCurrentMenuItem] ; wCurrentMenuItem +CursorDown: ; 3d3dd (f:53dd) + ld a, [wCurrentMenuItem] ld b, a ld a, [wcd6c] inc a inc a cp b - jp nz, Func_3d2fe + jp nz, SelectMenuItem call EraseMenuCursor ld a, $1 - ld [wCurrentMenuItem], a ; wCurrentMenuItem - jp Func_3d2fe + ld [wCurrentMenuItem], a + jp SelectMenuItem -Func_3d3f5: ; 3d3f5 (f:53f5) - ld a, $a5 - ld [wPlayerSelectedMove], a ; wPlayerSelectedMove - ld a, [W_PLAYERDISABLEDMOVE] ; W_PLAYERDISABLEDMOVE +AnyMoveToSelect: ; 3d3f5 (f:53f5) +; 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] and a - ld hl, wBattleMonPP ; wBattleMonPP + ld hl, wBattleMonPP jr nz, .asm_3d40e ld a, [hli] or [hl] @@ -2723,70 +2837,70 @@ NoMovesLeftText: ; 3d430 (f:5430) TX_FAR _NoMovesLeftText db "@" -Func_3d435: ; 3d435 (f:5435) - ld a, [wcc35] +SwapMovesInMenu: ; 3d435 (f:5435) + ld a, [wMenuItemToSwap] and a - jr z, asm_3d4ad + jr z, .noMenuItemSelected ld hl, wBattleMonMoves - call Func_3d493 - ld hl, wBattleMonPP ; wBattleMonPP - call Func_3d493 - ld hl, W_PLAYERDISABLEDMOVE ; W_PLAYERDISABLEDMOVE + call .swapBytes ; swap moves + ld hl, wBattleMonPP + call .swapBytes ; swap move PP +; update the index of the disabled move if necessary + ld hl, W_PLAYERDISABLEDMOVE ld a, [hl] swap a and $f ld b, a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp b - jr nz, .asm_3d463 + jr nz, .next ld a, [hl] and $f ld b, a - ld a, [wcc35] + ld a, [wMenuItemToSwap] swap a add b ld [hl], a - jr .asm_3d474 -.asm_3d463 - ld a, [wcc35] + jr .swapMovesInPartyMon +.next + ld a, [wMenuItemToSwap] cp b - jr nz, .asm_3d474 + jr nz, .swapMovesInPartyMon ld a, [hl] and $f ld b, a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] swap a add b ld [hl], a -.asm_3d474 - ld hl, wPartyMon1Moves ; wPartyMon1Moves - ld a, [wPlayerMonNumber] ; wPlayerMonNumber - ld bc, $2c +.swapMovesInPartyMon + ld hl, wPartyMon1Moves + ld a, [wPlayerMonNumber] + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes push hl - call Func_3d493 + call .swapBytes ; swap moves pop hl ld bc, $15 add hl, bc - call Func_3d493 + call .swapBytes ; swap move PP xor a - ld [wcc35], a + ld [wMenuItemToSwap], a ; deselect the item jp MoveSelectionMenu - -Func_3d493: ; 3d493 (f:5493) +.swapBytes push hl - ld a, [wcc35] + ld a, [wMenuItemToSwap] dec a ld c, a - ld b, $0 + ld b, 0 add hl, bc ld d, h ld e, l pop hl - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] dec a ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [de] ld b, [hl] @@ -2794,53 +2908,54 @@ Func_3d493: ; 3d493 (f:5493) ld a, b ld [de], a ret -asm_3d4ad: ; 3d4ad (f:54ad) - ld a, [wCurrentMenuItem] ; wCurrentMenuItem - ld [wcc35], a +.noMenuItemSelected + ld a, [wCurrentMenuItem] + ld [wMenuItemToSwap], a ; select the current menu item for swapping jp MoveSelectionMenu -Func_3d4b6: ; 3d4b6 (f:54b6) +PrintMenuItem: ; 3d4b6 (f:54b6) xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a hlCoord 0, 8 ld b, $3 ld c, $9 call TextBoxBorder - ld a, [W_PLAYERDISABLEDMOVE] ; W_PLAYERDISABLEDMOVE + ld a, [W_PLAYERDISABLEDMOVE] and a - jr z, .asm_3d4df + jr z, .notDisabled swap a and $f ld b, a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp b - jr nz, .asm_3d4df + jr nz, .notDisabled hlCoord 1, 10 ld de, DisabledText call PlaceString - jp .asm_3d54e -.asm_3d4df - ld hl, wCurrentMenuItem ; wCurrentMenuItem + jp .moveDisabled +.notDisabled + ld hl, wCurrentMenuItem dec [hl] xor a - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a ld hl, wBattleMonMoves - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld c, a - ld b, $0 - add hl, bc - ld a, [hl] - ld [wPlayerSelectedMove], a ; wPlayerSelectedMove - ld a, [wPlayerMonNumber] ; wPlayerMonNumber - ld [wWhichPokemon], a ; wWhichPokemon + 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 + ; isn't actually selected (just pointed to by the cursor) + ld a, [wPlayerMonNumber] + ld [wWhichPokemon], a ld a, $4 ld [wcc49], a callab GetMaxPP - ld hl, wCurrentMenuItem ; wCurrentMenuItem + ld hl, wCurrentMenuItem ld c, [hl] inc [hl] ld b, $0 - ld hl, wBattleMonPP ; wBattleMonPP + ld hl, wBattleMonPP add hl, bc ld a, [hl] and $3f @@ -2853,7 +2968,6 @@ Func_3d4b6: ; 3d4b6 (f:54b6) jp nz, .PhysicalTextShow hlCoord 1, 9 ld de,SpecialText - ;ld de, TypeText call PlaceString jp .RestOfTheRoutineThing .PhysicalTextShow @@ -2868,8 +2982,6 @@ Func_3d4b6: ; 3d4b6 (f:54b6) .RestOfTheRoutineThing hlCoord 7, 11 ld [hl], "/" - ;hlCoord 5, 9 - ;ld [hl], "/" hlCoord 5, 11 ld de, wcd6d ld bc, $102 @@ -2878,16 +2990,20 @@ Func_3d4b6: ; 3d4b6 (f:54b6) ld de, wd11e ld bc, $102 call PrintNumber - call GetCurrentMove + call GetCurrentMove hlCoord 2, 10 - predef Func_27d98 -.asm_3d54e + predef PrintMoveType +.moveDisabled ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 DisabledText: ; 3d555 (f:5555) +IF DEF(_YELLOW) + db "Disabled!@" +ELSE db "disabled!@" +ENDC OtherText: ; 3d55f (f:555f) db "STATUS/@" @@ -2899,17 +3015,18 @@ SpecialText: ; added for PS Split db "SPECIAL/@" SelectEnemyMove: ; 3d564 (f:5564) - ld a, [W_ISLINKBATTLE] + ld a, [wLinkState] sub $4 jr nz, .noLinkBattle +; link battle call SaveScreenTilesToBuffer1 - call Func_3d605 + call LinkBattleExchangeData call LoadScreenTilesFromBuffer1 - ld a, [wcc3e] + ld a, [wSerialExchangeNybbleReceiveData] cp $e jp z, .asm_3d601 cp $d - jr z, .unableToMove + jr z, .unableToSelectMove cp $4 ret nc ld [wEnemyMoveListIndex], a @@ -2921,25 +3038,25 @@ SelectEnemyMove: ; 3d564 (f:5564) jr .done .noLinkBattle ld a, [W_ENEMYBATTSTATUS2] - and $60 ; need to recharge or using rage + and (1 << NeedsToRecharge) | (1 << UsingRage) ; need to recharge or using rage ret nz ld hl, W_ENEMYBATTSTATUS1 ld a, [hl] - and $12 ; using multi-turn move or bide + and (1 << ChargingUp) | (1 << ThrashingAbout) ; using a charging move or thrash/petal dance ret nz ld a, [wEnemyMonStatus] and SLP ; sleeping ret nz ld a, [W_ENEMYBATTSTATUS1] - and $21 ; using fly/dig or thrash/petal dance + and (1 << UsingTrappingMove) | (1 << StoringEnergy) ; using a trapping move like wrap or bide ret nz ld a, [W_PLAYERBATTSTATUS1] - bit 5, a ; caught in player's multi-turn move (e.g. wrap) - jr z, .notCaughtInWrap -.unableToMove + bit UsingTrappingMove, a ; caught in player's trapping move (e.g. wrap) + jr z, .canSelectMove +.unableToSelectMove ld a, $ff jr .done -.notCaughtInWrap +.canSelectMove ld hl, wEnemyMonMoves+1 ; 2nd enemy move ld a, [hld] and a @@ -2986,137 +3103,142 @@ SelectEnemyMove: ; 3d564 (f:5564) ld [wEnemySelectedMove], a ret .asm_3d601 - ld a, $a5 + ld a, STRUGGLE jr .done -Func_3d605: ; 3d605 (f:5605) +; this appears to exchange data with the other gameboy during link battles +LinkBattleExchangeData: ; 3d605 (f:5605) ld a, $ff - ld [wcc3e], a - ld a, [wPlayerMoveListIndex] ; wPlayerMoveListIndex - cp $f + 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 - ld a, [wPlayerSelectedMove] ; wPlayerSelectedMove - cp $a5 + ld a, [wPlayerSelectedMove] + cp STRUGGLE ld b, $e jr z, .asm_3d62f dec b inc a jr z, .asm_3d62f - ld a, [wPlayerMoveListIndex] ; wPlayerMoveListIndex + ld a, [wPlayerMoveListIndex] jr .asm_3d630 .asm_3d629 - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] add $4 ld b, a .asm_3d62f ld a, b .asm_3d630 - ld [wcc42], a + ld [wSerialExchangeNybbleSendData], a callab PrintWaitingText .asm_3d63b - call Func_22c3 + call Serial_ExchangeNybble call DelayFrame - ld a, [wcc3e] + ld a, [wSerialExchangeNybbleReceiveData] inc a jr z, .asm_3d63b ld b, $a .asm_3d649 call DelayFrame - call Func_22c3 + call Serial_ExchangeNybble dec b jr nz, .asm_3d649 ld b, $a .asm_3d654 call DelayFrame - call Func_22ed + call Serial_SendZeroByte dec b jr nz, .asm_3d654 ret -Func_3d65e: ; 3d65e (f:565e) +ExecutePlayerMove: ; 3d65e (f:565e) xor a - ld [H_WHOSETURN], a ; $fff3 - ld a, [wPlayerSelectedMove] ; wPlayerSelectedMove + ld [H_WHOSETURN], a ; set player's turn + ld a, [wPlayerSelectedMove] inc a - jp z, Func_3d80a + jp z, ExecutePlayerMoveDone ; for selected move = FF, skip most of player's turn xor a - ld [W_MOVEMISSED], a ; W_MOVEMISSED + ld [W_MOVEMISSED], a ld [wcced], a ld [wccf4], a ld a, $a ld [wd05b], a ld a, [wcd6a] and a - jp nz, Func_3d80a + jp nz, ExecutePlayerMoveDone call PrintGhostText - jp z, Func_3d80a - call Func_3d854 - jr nz, .asm_3d68a + jp z, ExecutePlayerMoveDone + call CheckPlayerStatusConditions + jr nz, .playerHasNoSpecialCondition jp [hl] -.asm_3d68a +.playerHasNoSpecialCondition call GetCurrentMove - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - bit 4, [hl] - jr nz, asm_3d6a9 - call Func_3dc88 - jp z, Func_3d80a - -Func_3d69a: ; 3d69a (f:569a) - ld a, [W_PLAYERMOVEEFFECT] ; wcfd3 + ld hl, W_PLAYERBATTSTATUS1 + bit ChargingUp, [hl] ; charging up for attack + jr nz, PlayerCanExecuteChargingMove + call CheckForDisobedience + jp z, ExecutePlayerMoveDone + +CheckIfPlayerNeedsToChargeUp: ; 3d69a (f:569a) + ld a, [W_PLAYERMOVEEFFECT] cp CHARGE_EFFECT - jp z, Func_3f132 + jp z, JumpMoveEffect cp FLY_EFFECT - jp z, Func_3f132 - jr asm_3d6b0 + jp z, JumpMoveEffect + jr PlayerCanExecuteMove ; in-battle stuff -asm_3d6a9: ; 3d6a9 (f:56a9) +PlayerCanExecuteChargingMove: ; 3d6a9 (f:56a9) ld hl,W_PLAYERBATTSTATUS1 - res 4,[hl] - res 6,[hl] -asm_3d6b0: ; 3d6b0 (f:56b0) + 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) 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 hl,EffectsArray1 + ld hl,ResidualEffects1 ld de,1 call IsInArray - jp c,Func_3f132 + jp c,JumpMoveEffect ; ResidualEffects1 moves skip damage calculation and accuracy tests + ; unless executed as part of their exclusive effect functions ld a,[W_PLAYERMOVEEFFECT] - ld hl,EffectsArray5B + ld hl,SpecialEffectsCont ld de,1 call IsInArray - call c,Func_3f132 -asm_3d6dc: ; 3d6dc (f:56dc) + call c,JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything +PlayerCalcMoveDamage: ; 3d6dc (f:56dc) ld a,[W_PLAYERMOVEEFFECT] - ld hl,EffectsArray2 + ld hl,SetDamageEffects ld de,1 call IsInArray - jp c,.asm_3d702 + jp c,.moveHitTest ; SetDamageEffects moves (e.g. Seismic Toss and Super Fang) skip damage calculation call CriticalHitTest call HandleCounterMove jr z,asm_3d705 + call GetDamageVarsForPlayerAttack call CalculateDamage - call MoreCalculateDamage - jp z,asm_3d74b + jp z,asm_3d74b ; for moves with 0 BP, skip any further damage calculation and, for now, skip MoveHitTest + ; for these moves, accuracy tests will only occur if they are called as part of the effect itself call AdjustDamageForMoveType - call Func_3e687 -.asm_3d702 + call RandomizeDamage +.moveHitTest call MoveHitTest asm_3d705 ld a,[W_MOVEMISSED] and a jr z,asm_3d714 ld a,[W_PLAYERMOVEEFFECT] - sub a,7 - jr z,asm_3d71e - jr asm_3d74b ; 574B + sub a,EXPLODE_EFFECT + jr z,asm_3d71e ; don't play any animation if the move missed, unless it was EXPLODE_EFFECT + jr asm_3d74b asm_3d714 ld a,[W_PLAYERMOVEEFFECT] and a @@ -3134,103 +3256,106 @@ asm_3d71e ld [wcc5b],a ld a,[W_PLAYERMOVENUM] call PlayMoveAnimation - call Func_3eed3 - call Func_3cd60 + call HandleExplodingAnimation + call DrawPlayerHUDAndHPBar ld a,[W_PLAYERBATTSTATUS2] bit 4,a ld hl,Func_79771 ld b,BANK(Func_79771) call nz,Bankswitch - jr asm_3d766 + jr MirrorMoveCheck asm_3d74b ld c,$1E call DelayFrames ld a,[W_PLAYERMOVEEFFECT] cp a,FLY_EFFECT - jr z,.next5 + jr z,.playAnim cp a,CHARGE_EFFECT - jr z,.next5 - jr asm_3d766 -.next5 + jr z,.playAnim + jr MirrorMoveCheck +.playAnim xor a ld [wcc5b],a ld a,STATUS_AFFECTED_ANIM call PlayMoveAnimation -asm_3d766 +MirrorMoveCheck ld a,[W_PLAYERMOVEEFFECT] cp a,MIRROR_MOVE_EFFECT - jr nz,.next6 ; 577A + jr nz,.metronomeCheck call MirrorMoveCopyMove - jp z,Func_3d80a + jp z,ExecutePlayerMoveDone xor a ld [wcced],a - jp Func_3d69a -.next6 + jp CheckIfPlayerNeedsToChargeUp ; if Mirror Move was successful go back to damage calculation for copied move +.metronomeCheck cp a,METRONOME_EFFECT - jr nz,.next7 ; 5784 + jr nz,.next call MetronomePickMove - jp Func_3d69a -.next7 + jp CheckIfPlayerNeedsToChargeUp ; Go back to damage calculation for the move picked by Metronome +.next ld a,[W_PLAYERMOVEEFFECT] - ld hl,EffectsArray3 + ld hl,ResidualEffects2 ld de,1 call IsInArray - jp c,Func_3f132 + jp c,JumpMoveEffect ; done here after executing effects of ResidualEffects2 ld a,[W_MOVEMISSED] and a - jr z,.next8 ; 57A6 + jr z,.moveDidNotMiss call PrintMoveFailureText ld a,[W_PLAYERMOVEEFFECT] - cp a,EXPLODE_EFFECT - jr z,.next9 ; 57B9 - jp Func_3d80a -.next8 + 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 +.moveDidNotMiss call ApplyAttackToEnemyPokemon - call Func_3dc5c + call PrintCriticalOHKOText callab DisplayEffectiveness ld a,1 ld [wccf4],a -.next9 +.notDone ld a,[W_PLAYERMOVEEFFECT] - ld hl,EffectsArray4 + ld hl,AlwaysHappenSideEffects ld de,1 call IsInArray - call c,Func_3f132 + call c,JumpMoveEffect ; not done after executing effects of AlwaysHappenSideEffects ld hl,wEnemyMonHP ld a,[hli] ld b,[hl] or b - ret z + ret z ; don't do anything else if the enemy fainted call HandleBuildingRage ld hl,W_PLAYERBATTSTATUS1 - bit 2,[hl] - jr z,.next10 ; 57EF - ld a,[wd06a] + bit AttackingMultipleTimes,[hl] + jr z,.executeOtherEffects + ld a,[wPlayerNumAttacksLeft] dec a - ld [wd06a],a - jp nz,asm_3d714 - - res 2,[hl] + ld [wPlayerNumAttacksLeft],a + jp nz,asm_3d714 ; 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 call PrintText xor a - ld [W_NUMHITS],a ; reset -.next10 + ld [wPlayerNumHits],a +.executeOtherEffects ld a,[W_PLAYERMOVEEFFECT] and a - jp z,Func_3d80a - ld hl,EffectsArray5 + jp z,ExecutePlayerMoveDone + ld hl,SpecialEffects ld de,1 call IsInArray - call nc,Func_3f132 - jp Func_3d80a + call nc,JumpMoveEffect ; move effects not included in SpecialEffects or in either of the ResidualEffect arrays, + ; which are the effects not covered yet. Rage's effect will be executed for a second time (although it's irrelevant). + ; Includes side effects that only need to be called if the target didn't faint. + ; Responsible for executing Twineedle's second effect (poison) + jp ExecutePlayerMoveDone MultiHitText: ; 3d805 (f:5805) TX_FAR _MultiHitText db "@" -Func_3d80a: ; 3d80a (f:580a) +ExecutePlayerMoveDone: ; 3d80a (f:580a) xor a ld [wcd6a],a ld b,1 @@ -3274,24 +3399,26 @@ IsGhostBattle: ; 3d83a (f:583a) cp a,LAVENDER_HOUSE_1 jr nc,.next ld b,SILPH_SCOPE - call IsItemInBag ; $3493 + call IsItemInBag ret z .next ld a,1 and a ret -Func_3d854: ; 3d854 (f:5854) +; 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) ld hl,wBattleMonStatus ld a,[hl] - and a,SLP - jr z,.FrozenCheck ; to 5884 - + and a,SLP ; sleep mask + jr z,.FrozenCheck +; sleeping dec a - ld [wBattleMonStatus],a ; decrement sleep count + ld [wBattleMonStatus],a ; decrement number of turns left and a - jr z,.WakeUp ; to 5874 - + jr z,.WakeUp ; if the number of turns hit 0, wake up +; fast asleep xor a ld [wcc5b],a ld a,SLP_ANIM - 1 @@ -3304,9 +3431,9 @@ Func_3d854: ; 3d854 (f:5854) call PrintText .sleepDone xor a - ld [wccf1],a - ld hl,Func_3d80a - jp Func_3da37 + ld [wPlayerUsedMove],a + ld hl,ExecutePlayerMoveDone ; player can't move this turn + jp .returnToHL .FrozenCheck bit FRZ,[hl] ; frozen? @@ -3325,9 +3452,9 @@ Func_3d854: ; 3d854 (f:5854) ld hl,IsFrozenText call PrintText xor a - ld [wccf1],a - ld hl,Func_3d80a - jp Func_3da37 + ld [wPlayerUsedMove],a + ld hl,ExecutePlayerMoveDone ; player can't move this turn + jp .returnToHL .defrostMon ; New routine to thaw Pokemon, called from FrozenCheck ld hl, wBattleMonStatus @@ -3342,58 +3469,60 @@ Func_3d854: ; 3d854 (f:5854) .HeldInPlaceCheck ld a,[W_ENEMYBATTSTATUS1] - bit 5,a - jp z,FlinchedCheck + bit UsingTrappingMove,a ; is enemy using a mult-turn move like wrap? + jp z,.FlinchedCheck ld hl,CantMoveText call PrintText - ld hl,Func_3d80a - jp Func_3da37 + ld hl,ExecutePlayerMoveDone ; player can't move this turn + jp .returnToHL -FlinchedCheck: ; 3d8ac (f:58ac) +.FlinchedCheck ld hl,W_PLAYERBATTSTATUS1 - bit 3,[hl] - jp z,HyperBeamCheck - res 3,[hl] + bit Flinched,[hl] + jp z,.HyperBeamCheck + res Flinched,[hl] ; reset player's flinch status ld hl,FlinchedText call PrintText - ld hl,Func_3d80a - jp Func_3da37 + ld hl,ExecutePlayerMoveDone ; player can't move this turn + jp .returnToHL -HyperBeamCheck: ; 3d8c2 (f:58c2) +.HyperBeamCheck ld hl,W_PLAYERBATTSTATUS2 - bit 5,[hl] - jr z,.next ; 58D7 - res 5,[hl] + bit NeedsToRecharge,[hl] + jr z,.AnyMoveDisabledCheck + res NeedsToRecharge,[hl] ; reset player's recharge status ld hl,MustRechargeText call PrintText - ld hl,Func_3d80a ; $580a - jp Func_3da37 -.next + ld hl,ExecutePlayerMoveDone ; player can't move this turn + jp .returnToHL + +.AnyMoveDisabledCheck ld hl,W_PLAYERDISABLEDMOVE ld a,[hl] and a - jr z,.next2 ; 58EE + jr z,.ConfusedCheck dec a ld [hl],a - and a,$F - jr nz,.next2 + and a,$F ; did Disable counter hit 0? + jr nz,.ConfusedCheck ld [hl],a ld [wccee],a ld hl,DisabledNoMoreText call PrintText -.next2 + +.ConfusedCheck ld a,[W_PLAYERBATTSTATUS1] - add a - jr nc,.next3 ; 5929 - ld hl,wd06b + add a ; is player confused? + jr nc,.TriedToUseDisabledMoveCheck + ld hl,W_PLAYERCONFUSEDCOUNTER dec [hl] - jr nz,.next4 ; 5907 + jr nz,.IsConfused ld hl,W_PLAYERBATTSTATUS1 - res 7,[hl] + res Confused,[hl] ; if confused counter hit 0, reset confusion status ld hl,ConfusedNoMoreText call PrintText - jr .next3 -.next4 + jr .TriedToUseDisabledMoveCheck +.IsConfused ld hl,IsConfusedText call PrintText xor a @@ -3401,153 +3530,161 @@ HyperBeamCheck: ; 3d8c2 (f:58c2) ld a,CONF_ANIM - 1 call PlayMoveAnimation call BattleRandom - cp a,$80 - jr c,.next3 + cp a,$80 ; 50% chance to hurt itself + jr c,.TriedToUseDisabledMoveCheck ld hl,W_PLAYERBATTSTATUS1 ld a,[hl] - and a,$80 ; confused + and a, 1 << Confused ; if mon hurts itself, clear every other status from W_PLAYERBATTSTATUS1 ld [hl],a - call PrintHurtItselfText - jr .next5 ; 5952 -.next3 + call HandleSelfConfusionDamage + jr .MonHurtItselfOrFullyParalysed + +.TriedToUseDisabledMoveCheck ld a,[wccee] and a - jr z,.ParalysisCheck ; 593E + jr z,.ParalysisCheck ld hl,wPlayerSelectedMove cp [hl] jr nz,.ParalysisCheck call PrintMoveIsDisabledText - ld hl,Func_3d80a ; $580a - jp Func_3da37 + ld hl,ExecutePlayerMoveDone ; if a disabled move was somehow selected, player can't move this turn + jp .returnToHL + .ParalysisCheck ld hl,wBattleMonStatus bit PAR,[hl] - jr z,.next7 ; 5975 + jr z,.BideCheck call BattleRandom - cp a,$3F - jr nc,.next7 + cp a,$3F ; 25% to be fully paralyzed + jr nc,.BideCheck ld hl,FullyParalyzedText call PrintText -.next5 + +.MonHurtItselfOrFullyParalysed ld hl,W_PLAYERBATTSTATUS1 ld a,[hl] - and a,$CC + ; 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) ld [hl],a ld a,[W_PLAYERMOVEEFFECT] cp a,FLY_EFFECT - jr z,.next8 ; 5966 + jr z,.FlyOrChargeEffect cp a,CHARGE_EFFECT - jr z,.next8 - jr .next9 ; 596F -.next8 + jr z,.FlyOrChargeEffect + jr .NotFlyOrChargeEffect + +.FlyOrChargeEffect xor a ld [wcc5b],a ld a,STATUS_AFFECTED_ANIM call PlayMoveAnimation -.next9 - ld hl,Func_3d80a ; $580a - jp Func_3da37 -.next7 +.NotFlyOrChargeEffect + ld hl,ExecutePlayerMoveDone + jp .returnToHL ; if using a two-turn move, we need to recharge the first turn + +.BideCheck ld hl,W_PLAYERBATTSTATUS1 - bit 0,[hl] - jr z,.next10 ; 59D0 + bit StoringEnergy,[hl] ; is mon using bide? + jr z,.ThrashingAboutCheck xor a ld [W_PLAYERMOVENUM],a ld hl,W_DAMAGE ld a,[hli] ld b,a ld c,[hl] - ld hl,wd075 + ld hl,wPlayerBideAccumulatedDamage + 1 ld a,[hl] - add c + add c ; acumulate damage taken ld [hld],a ld a,[hl] adc b ld [hl],a - ld hl,wd06a - dec [hl] - jr z,.next11 ; 599B - ld hl,Func_3d80a ; $580a - jp Func_3da37 -.next11 + ld hl,wPlayerNumAttacksLeft + dec [hl] ; did Bide counter hit 0? + jr z,.UnleashEnergy + ld hl,ExecutePlayerMoveDone + jp .returnToHL ; unless mon unleashes energy, can't move this turn +.UnleashEnergy ld hl,W_PLAYERBATTSTATUS1 - res 0,[hl] + res StoringEnergy,[hl] ; not using bide any more ld hl,UnleashedEnergyText call PrintText ld a,1 ld [W_PLAYERMOVEPOWER],a - ld hl,wd075 + ld hl,wPlayerBideAccumulatedDamage + 1 ld a,[hld] add a ld b,a - ld [wd0d8],a + ld [W_DAMAGE + 1],a ld a,[hl] - rl a + rl a ; double the damage ld [W_DAMAGE],a or b - jr nz,.next12 ; 59C2 + jr nz,.next ld a,1 ld [W_MOVEMISSED],a -.next12 +.next xor a ld [hli],a ld [hl],a ld a,BIDE ld [W_PLAYERMOVENUM],a - ld hl,asm_3d705 ; $5705 - jp Func_3da37 -.next10 - bit 1,[hl] - jr z,.next13 ; 59FF + ld hl,asm_3d705 ; skip damage calculation, DecrementPP and MoveHitTest + jp .returnToHL + +.ThrashingAboutCheck + bit ThrashingAbout,[hl] ; is mon using thrash or petal dance? + jr z,.MultiturnMoveCheck ld a,THRASH ld [W_PLAYERMOVENUM],a ld hl,ThrashingAboutText call PrintText - ld hl,wd06a - dec [hl] - ld hl,asm_3d6dc ; $56dc - jp nz,Func_3da37 + ld hl,wPlayerNumAttacksLeft + dec [hl] ; did Trashing About counter hit 0? + ld hl,PlayerCalcMoveDamage ; skip DecrementPP + jp nz,.returnToHL push hl ld hl,W_PLAYERBATTSTATUS1 - res 1,[hl] - set 7,[hl] + res ThrashingAbout,[hl] ; no longer trashing about + set Confused,[hl] ; confused call BattleRandom and a,3 inc a - inc a - ld [wd06b],a - pop hl - jp Func_3da37 -.next13 - bit 5,[hl] - jp z,Func_3da1a + inc a ; confused for 2-5 turns + ld [W_PLAYERCONFUSEDCOUNTER],a + pop hl ; skip DecrementPP + jp .returnToHL + +.MultiturnMoveCheck + bit UsingTrappingMove,[hl] ; is mon using multi-turn move? + jp z,.RageCheck ld hl,AttackContinuesText call PrintText - ld a,[wd06a] - dec a - ld [wd06a],a - ld hl,asm_3d714 ; $5714 - jp nz,Func_3da37 - jp Func_3da37 - -Func_3da1a: ; 3da1a (f:5a1a) - ld a, [W_PLAYERBATTSTATUS2] ; W_PLAYERBATTSTATUS2 - bit 6, a - jp z, Func_3da39 + ld a,[wPlayerNumAttacksLeft] + dec a ; did multi-turn move end? + ld [wPlayerNumAttacksLeft],a + ld hl,asm_3d714 ; 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] + 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 ld [wd11e], a call GetMoveName call CopyStringToCF4B xor a - ld [W_PLAYERMOVEEFFECT], a ; wcfd3 - ld hl, asm_3d6b0 ; $56b0 - jp Func_3da37 + ld [W_PLAYERMOVEEFFECT], a + ld hl, PlayerCanExecuteMove + jp .returnToHL -Func_3da37: ; 3da37 (f:5a37) +.returnToHL xor a ret -Func_3da39: ; 3da39 (f:5a39) +.checkPlayerStatusConditionsDone ld a, $1 and a ret @@ -3613,16 +3750,16 @@ CantMoveText: ; 3da83 (f:5a83) db "@" PrintMoveIsDisabledText: ; 3da88 (f:5a88) - ld hl, wPlayerSelectedMove ; wPlayerSelectedMove - ld de, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wPlayerSelectedMove + ld de, W_PLAYERBATTSTATUS1 + ld a, [H_WHOSETURN] and a - jr z, .asm_3da97 + jr z, .removeChargingUp inc hl - ld de, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 -.asm_3da97 + ld de, W_ENEMYBATTSTATUS1 +.removeChargingUp ld a, [de] - res 4, a + res ChargingUp, a ; end the pokemon's ld [de], a ld a, [hl] ld [wd11e], a @@ -3634,10 +3771,10 @@ MoveIsDisabledText: ; 3daa8 (f:5aa8) TX_FAR _MoveIsDisabledText db "@" -PrintHurtItselfText: ; 3daad (f:5aad) +HandleSelfConfusionDamage: ; 3daad (f:5aad) ld hl, HurtItselfText call PrintText - ld hl, wEnemyMonDefense ; wcff8 + ld hl, wEnemyMonDefense ld a, [hli] push af ld a, [hld] @@ -3646,19 +3783,19 @@ PrintHurtItselfText: ; 3daad (f:5aad) ld [hli], a ld a, [wBattleMonDefense + 1] ld [hl], a - ld hl, W_PLAYERMOVEEFFECT ; wcfd3 + ld hl, W_PLAYERMOVEEFFECT push hl ld a, [hl] push af xor a ld [hli], a - ld [wd05e], a - ld a, $28 + ld [wCriticalHitOrOHKO], a ; self-inflicted confusion damage can't be a Critical Hit + ld a, 40 ; 40 base power ld [hli], a xor a ld [hl], a - call CalculateDamage - call MoreCalculateDamage + call GetDamageVarsForPlayerAttack + call CalculateDamage ; ignores AdjustDamageForMoveType (type-less damage), RandomizeDamage, and MoveHitTest (always hits) pop af pop hl ld [hl], a @@ -3670,11 +3807,11 @@ PrintHurtItselfText: ; 3daad (f:5aad) xor a ld [wcc5b], a inc a - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a call PlayMoveAnimation - call Func_3cd60 + call DrawPlayerHUDAndHPBar xor a - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a jp ApplyDamageToPlayerPokemon PrintMonName1Text: ; 3daf5 (f:5af5) @@ -3684,13 +3821,13 @@ PrintMonName1Text: ; 3daf5 (f:5af5) MonName1Text: ; 3dafb (f:5afb) TX_FAR _MonName1Text db $08 ; asm - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] ; wcfd2 - ld hl, wccf1 + ld a, [W_PLAYERMOVENUM] + ld hl, wPlayerUsedMove jr z, .asm_3db11 - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM - ld hl, wccf2 + ld a, [W_ENEMYMOVENUM] + ld hl, wEnemyUsedMove .asm_3db11 ld [hl], a ld [wd11e], a @@ -3778,7 +3915,7 @@ Func_3db85: ; 3db85 (f:5b85) ld a, [wd11e] ; move number ld c, a ld b, $0 - ld hl, UnknownMovesList_3dba3 ; $5ba3 + ld hl, UnknownMovesList_3dba3 .asm_3db8f ld a, [hli] cp $ff @@ -3811,33 +3948,34 @@ UnknownMovesList_3dba3: ; 3dba3 (f:5ba3) db $FF ; terminator PrintMoveFailureText: ; 3dbe2 (f:5be2) - ld de, W_PLAYERMOVEEFFECT ; wcfd3 - ld a, [H_WHOSETURN] ; $fff3 + ld de, W_PLAYERMOVEEFFECT + ld a, [H_WHOSETURN] and a - jr z, .asm_3dbed - ld de, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT -.asm_3dbed - ld hl, DoesntAffectMonText ; $5c57 + jr z, .playersTurn + ld de, W_ENEMYMOVEEFFECT +.playersTurn + ld hl, DoesntAffectMonText ld a, [wd05b] and $7f - jr z, .asm_3dc04 - ld hl, AttackMissedText ; $5c42 - ld a, [wd05e] + jr z, .gotTextToPrint + ld hl, AttackMissedText + ld a, [wCriticalHitOrOHKO] cp $ff - jr nz, .asm_3dc04 - ld hl, UnaffectedText ; $5c4c -.asm_3dc04 + jr nz, .gotTextToPrint + ld hl, UnaffectedText +.gotTextToPrint push de call PrintText xor a - ld [wd05e], a + ld [wCriticalHitOrOHKO], a pop de ld a, [de] cp JUMP_KICK_EFFECT ret nz - ; if you get here, the mon used hi jump kick and missed - ld hl, W_DAMAGE ; W_DAMAGE + ; 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 even if it was intended to be potential damage/8. ld a, [hli] ld b, [hl] srl a @@ -3850,19 +3988,19 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2) dec hl ld [hli], a or b - jr nz, .asm_3dc2a + jr nz, .applyRecoil inc a ld [hl], a -.asm_3dc2a - ld hl, KeptGoingAndCrashedText ; $5c47 +.applyRecoil + ld hl, KeptGoingAndCrashedText call PrintText ld b, $4 predef Func_48125 - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - jr nz, .asm_3dc3f + jr nz, .enemyTurn jp ApplyDamageToPlayerPokemon -.asm_3dc3f +.enemyTurn jp ApplyDamageToEnemyPokemon AttackMissedText: ; 3dc42 (f:5c42) @@ -3878,20 +4016,21 @@ UnaffectedText: ; 3dc4c (f:5c4c) db "@" PrintDoesntAffectText: ; 3dc51 (f:5c51) - ld hl, DoesntAffectMonText ; $5c57 + ld hl, DoesntAffectMonText jp PrintText DoesntAffectMonText: ; 3dc57 (f:5c57) TX_FAR _DoesntAffectMonText db "@" -Func_3dc5c: ; 3dc5c (f:5c5c) - ld a, [wd05e] +; if there was a critical hit or an OHKO was successful, print the corresponding text +PrintCriticalOHKOText: ; 3dc5c (f:5c5c) + ld a, [wCriticalHitOrOHKO] and a - jr z, .asm_3dc75 + jr z, .done ; do nothing if there was no critical hit or successful OHKO dec a add a - ld hl, CriticalOHKOTextPointers ; $5c7a + ld hl, CriticalOHKOTextPointers ld b, $0 ld c, a add hl, bc @@ -3900,8 +4039,8 @@ Func_3dc5c: ; 3dc5c (f:5c5c) ld l, a call PrintText xor a - ld [wd05e], a -.asm_3dc75 + ld [wCriticalHitOrOHKO], a +.done ld c, $14 jp DelayFrames @@ -3917,118 +4056,123 @@ OHKOText: ; 3dc83 (f:5c83) TX_FAR _OHKOText db "@" -Func_3dc88: ; 3dc88 (f:5c88) +; 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) xor a ld [wcced], a - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_3dc97 + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .checkIfMonIsTraded ld a, $1 and a ret -.asm_3dc97 - ld hl, wPartyMon1OTID ; wPartyMon1OTID - ld bc, $2c - ld a, [wPlayerMonNumber] ; wPlayerMonNumber +; compare the mon's original trainer ID with the player's ID to see if it was traded +.checkIfMonIsTraded + ld hl, wPartyMon1OTID + ld bc, wPartyMon2 - wPartyMon1 + ld a, [wPlayerMonNumber] call AddNTimes - ld a, [wPlayerID] ; wPlayerID + ld a, [wPlayerID] cp [hl] - jr nz, .asm_3dcb1 + jr nz, .monIsTraded inc hl - ld a, [wPlayerID + 1] ; wd35a + ld a, [wPlayerID + 1] cp [hl] - jp z, Func_3ddb0 -.asm_3dcb1 + jp z, .canUseMove +; it was traded +.monIsTraded ; what level might disobey? ld hl, W_OBTAINEDBADGES bit 7, [hl] ld a, 101 - jr nz, .asm_3dcce + jr nz, .next bit 5, [hl] ld a, 70 - jr nz, .asm_3dcce + jr nz, .next bit 3, [hl] ld a, 50 - jr nz, .asm_3dcce + jr nz, .next bit 1, [hl] ld a, 30 - jr nz, .asm_3dcce + jr nz, .next ld a, 10 -.asm_3dcce +.next ld b, a ld c, a - ld a, [wBattleMonLevel] ; wBattleMonLevel + ld a, [wBattleMonLevel] ld d, a add b ld b, a - jr nc, .asm_3dcda - ld b, $ff -.asm_3dcda + jr nc, .noCarry + ld b, $ff ; cap b at $ff +.noCarry ld a, c cp d - jp nc, Func_3ddb0 -.asm_3dcdf + jp nc, .canUseMove +.loop1 call BattleRandom swap a cp b - jr nc, .asm_3dcdf + jr nc, .loop1 cp c - jp c, Func_3ddb0 -.asm_3dceb + jp c, .canUseMove +.loop2 call BattleRandom cp b - jr nc, .asm_3dceb + jr nc, .loop2 cp c - jr c, .asm_3dd3f + jr c, .useRandomMove ld a, d sub c ld b, a call BattleRandom swap a sub b - jr c, .asm_3dd0e + jr c, .monNaps cp b - jr nc, .asm_3dd20 + jr nc, .monDoesNothing ld hl, WontObeyText call PrintText - call PrintHurtItselfText - jp Func_3ddb4 -.asm_3dd0e + call HandleSelfConfusionDamage + jp .cannotUseMove +.monNaps call BattleRandom add a swap a - and $7 - jr z, .asm_3dd0e - ld [wBattleMonStatus], a ; wBattleMonStatus + and SLP ; sleep mask + jr z, .monNaps ; keep trying until we get at least 1 turn of sleep + ld [wBattleMonStatus], a ld hl, BeganToNapText - jr .asm_3dd3a -.asm_3dd20 + jr .printText +.monDoesNothing call BattleRandom and $3 ld hl, LoafingAroundText and a - jr z, .asm_3dd3a + jr z, .printText ld hl, WontObeyText dec a - jr z, .asm_3dd3a + jr z, .printText ld hl, TurnedAwayText dec a - jr z, .asm_3dd3a + jr z, .printText ld hl, IgnoredOrdersText -.asm_3dd3a +.printText call PrintText - jr Func_3ddb4 -.asm_3dd3f + jr .cannotUseMove +.useRandomMove ld a, [wBattleMonMoves + 1] - and a - jr z, .asm_3dd20 + 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] and a - jr nz, .asm_3dd20 - ld a, [wPlayerSelectedMove] ; wPlayerSelectedMove - cp $a5 - jr z, .asm_3dd20 - ld hl, wBattleMonPP ; wBattleMonPP + jr nz, .monDoesNothing + ld a, [wPlayerSelectedMove] + cp STRUGGLE + jr z, .monDoesNothing ; mon will not use move if struggling +; check if only one move has remaining PP + ld hl, wBattleMonPP push hl ld a, [hli] and $3f @@ -4046,7 +4190,7 @@ Func_3dc88: ; 3dc88 (f:5c88) add b pop hl push af - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld c, a ld b, $0 add hl, bc @@ -4055,44 +4199,42 @@ Func_3dc88: ; 3dc88 (f:5c88) ld b, a pop af cp b - jr z, .asm_3dd20 + jr z, .monDoesNothing ; mon will not use move if only one move has remaining PP ld a, $1 ld [wcced], a - ld a, [wMaxMenuItem] ; wMaxMenuItem + ld a, [wMaxMenuItem] ld b, a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld c, a -.asm_3dd86 +.chooseMove call BattleRandom and $3 cp b - jr nc, .asm_3dd86 + jr nc, .chooseMove ; if the random number is greater than the move count, choose another cp c - jr z, .asm_3dd86 - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld hl, wBattleMonPP ; wBattleMonPP + jr z, .chooseMove ; if the random number matches the move the player selected, choose another + ld [wCurrentMenuItem], a + ld hl, wBattleMonPP ld e, a ld d, $0 add hl, de ld a, [hl] - and a - jr z, .asm_3dd86 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + and a ; does the move have any PP left? + jr z, .chooseMove ; if the move has no PP left, choose another + ld a, [wCurrentMenuItem] ld c, a ld b, $0 ld hl, wBattleMonMoves add hl, bc ld a, [hl] - ld [wPlayerSelectedMove], a ; wPlayerSelectedMove + ld [wPlayerSelectedMove], a call GetCurrentMove - -Func_3ddb0: ; 3ddb0 (f:5db0) +.canUseMove ld a, $1 - and a + and a; clear Z flag ret - -Func_3ddb4: ; 3ddb4 (f:5db4) - xor a +.cannotUseMove + xor a ; set Z flag ret LoafingAroundText: ; 3ddb6 (f:5db6) @@ -4115,44 +4257,43 @@ IgnoredOrdersText: ; 3ddca (f:5dca) TX_FAR _IgnoredOrdersText db "@" -CalculateDamage: ; 3ddcf (f:5dcf) +; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the player mon +GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf) xor a - ld hl, W_DAMAGE ;damage to eventually inflict, intitialise to zero + ld hl, W_DAMAGE ; damage to eventually inflict, initialise to zero ldi [hl], a ld [hl], a ld hl, W_PLAYERMOVEPOWER - ld a, [hli] ;*read attack base power + ld a, [hli] and a ld d, a ;*D = attack base, used later ret z ;return if attack is zero - ;ld a, [hl] ;*test attacking type - ;cp a, $14 ;types >= $14 are all special ld a,[wPlayerSelectedMove] call PhysicalSpecialSplit cp a, SPECIAL - ;jr nc, .specialAttack jr z, .specialAttack .physicalAttack - ld hl, wEnemyMonDefense ;opponent defense - ld a, [hli] ;*BC = opponent defense used later + ld hl, wEnemyMonDefense + ld a, [hli] ld b, a - ld c, [hl] - ld a, [W_ENEMYBATTSTATUS3] ;test for reflect - bit 2, a - jr z, .next -.doubleDefense - sla c ;x2 defense if bit2 of D069 is set + ld c, [hl] ; bc = enemy defense + ld a, [W_ENEMYBATTSTATUS3] + bit HasReflectUp, a ; check for Reflect + jr z, .physicalAttackCritCheck +; if the enemy has used Reflect, double the enemy's defense + sla c rl b -.next - ld hl, wBattleMonAttack ;attack pointer - ld a, [wd05e] - and a - jr z, .next3 - ld c, 3 - call Func_3df1c - ld a, [$ff97] +.physicalAttackCritCheck + ld hl, wBattleMonAttack + ld a, [wCriticalHitOrOHKO] + and a ; check for critical hit + jr z, .scaleStats +; in the case of a critical hit, reset the player's attack and the enemy's defense to their base values + ld c, 3 ; defense stat + call GetEnemyMonStat + ld a, [H_PRODUCT + 2] ld b, a - ld a, [$ff98] + ld a, [H_PRODUCT + 3] ld c, a push bc ld hl, wPartyMon1Attack @@ -4160,29 +4301,31 @@ CalculateDamage: ; 3ddcf (f:5dcf) ld bc, wPartyMon2 - wPartyMon1 call AddNTimes pop bc - jr .next3 + jr .scaleStats .specialAttack - ld hl, wEnemyMonSpecial ;opponent special - ld a, [hli] ;*BC = opponent special defense used later + ld hl, wEnemyMonSpecial + ld a, [hli] ld b, a - ld c, [hl] - ld a, [W_ENEMYBATTSTATUS3] ;test for lightscreen - bit 1, a - jr z, .next2 -.doubleSpecialDefense - sla c ;x2 special defense if bit1 of D069 set + ld c, [hl] ; bc = enemy special + ld a, [W_ENEMYBATTSTATUS3] + bit HasLightScreenUp, a ; check for Light Screen + jr z, .specialAttackCritCheck +; if the enemy has used Light Screen, double the enemy's special + sla c rl b -.next2 +; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if +; a Pokemon with 512 or more Defense has ued Reflect, or if a Pokemon with 512 or more Special has used Light Screen +.specialAttackCritCheck ld hl, wBattleMonSpecial - ld a, [wd05e] ;XXX - and a - jr z, .next3 ;skip portion of code that pulls up inactive pokemon -.loadOtherPoke - ld c, 5 - call Func_3df1c - ld a, [$ff97] + ld a, [wCriticalHitOrOHKO] + and a ; check for critical hit + jr z, .scaleStats +; in the case of a critical hit, reset the player's and enemy's specials to their base values + ld c, 5 ; special stat + call GetEnemyMonStat + ld a, [H_PRODUCT + 2] ld b, a - ld a, [$ff98] + ld a, [H_PRODUCT + 3] ld c, a push bc ld hl, wPartyMon1Special @@ -4190,146 +4333,166 @@ CalculateDamage: ; 3ddcf (f:5dcf) ld bc, wPartyMon2 - wPartyMon1 call AddNTimes pop bc -.next3 - ld a, [hli] ;HL: when this was taken +; if either the offensive or defensive stat is too large to store in a byte, scale both stats by dividing them by 4 +; this allows values with up to 10 bits (values up to 1023) to be handled +; anything larger will wrap around +.scaleStats + ld a, [hli] ld l, [hl] - ld h, a ;*HL = attacker attack - or b ;is either attack or defense high byte nonzero? - jr z, .next4 - srl b ;[defense] BC /= 4 [this is just so it fits into a single byte, 10bits max] + ld h, a ; hl = player's offensive stat + or b ; is either high byte nonzero? + jr z, .next ; if not, we don't need to scale +; bc /= 4 (scale enemy's defensive stat) + srl b rr c srl b rr c - srl h ;[attack] HL /= 4 [to apply equal scaling] +; defensive stat can actually end up as 0, leading to a division by 0 freeze during damage calculation +; hl /= 4 (scale player's offensive stat) + srl h rr l srl h rr l ld a, l - or h - jr nz, .next4 ;is HL result zero? - inc l ;minimum HL = 1 -.next4 - ld b, l ;*B = attack [possibly scaled] [C contains defense] - ld a, [wBattleMonLevel] ;*E = level - ld e, a - ld a, [wd05e] ;critical hit? - and a - jr z, .next5 - sla e ;double level if it was a critical hit -.next5 - ld a, 1 ;return Z = 0 + or h ; is the player's offensive stat 0? + jr nz, .next + inc l ; if the player's offensive stat is 0, bump it up to 1 +.next + ld b, l ; b = player's offensive stat (possibly scaled) (c already contains enemy's defensive stat (possibly scaled)) + ld a, [wBattleMonLevel] + ld e, a ; e = level + ld a, [wCriticalHitOrOHKO] + and a ; check for critical hit + jr z, .done + sla e ; double level if it was a critical hit +.done + ld a, 1 and a ret -Func_3de75: ; 3de75 (f:5e75) Enemy_Calc_Damage - ld hl, W_DAMAGE ; W_DAMAGE + +; 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 xor a ld [hli], a ld [hl], a - ld hl, W_ENEMYMOVEPOWER ; wcfce + ld hl, W_ENEMYMOVEPOWER ld a, [hli] - ld d, a + ld d, a ; d = move power and a ret z - ;ld a, [hl] - ;cp $14 ld a,[wEnemySelectedMove] call PhysicalSpecialSplit cp a, SPECIAL - ;jr nc, .asm_3debc - jr z, .asm_3debc + jr z, .specialAttack +.physicalAttack ld hl, wBattleMonDefense ld a, [hli] ld b, a - ld c, [hl] - ld a, [W_PLAYERBATTSTATUS3] ; W_PLAYERBATTSTATUS3 - bit 2, a - jr z, .asm_3de98 + ld c, [hl] ; bc = player defense + ld a, [W_PLAYERBATTSTATUS3] + bit HasReflectUp, a ; check for Reflect + jr z, .physicalAttackCritCheck +; if the player has used Reflect, double the player's defense sla c rl b -.asm_3de98 +.physicalAttackCritCheck ld hl, wEnemyMonAttack - ld a, [wd05e] - and a - jr z, .asm_3deef + ld a, [wCriticalHitOrOHKO] + and a ; check for critical hit + jr z, .scaleStats +; in the case of a critical hit, reset the player's defense and the enemy's attack to their base values ld hl, wPartyMon1Defense - ld a, [wPlayerMonNumber] ; wPlayerMonNumber - ld bc, $2c + ld a, [wPlayerMonNumber] + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld a, [hli] ld b, a ld c, [hl] push bc - ld c, $2 - call Func_3df1c - ld hl, $ff97 + ld c, 2 ; attack stat + call GetEnemyMonStat + ld hl, H_PRODUCT + 2 pop bc - jr .asm_3deef -.asm_3debc + jr .scaleStats +.specialAttack ld hl, wBattleMonSpecial ld a, [hli] ld b, a ld c, [hl] - ld a, [W_PLAYERBATTSTATUS3] ; W_PLAYERBATTSTATUS3 - bit 1, a - jr z, .asm_3decd + ld a, [W_PLAYERBATTSTATUS3] + bit HasLightScreenUp, a ; check for Light Screen + jr z, .specialAttackCritCheck +; if the player has used Light Screen, double the player's special sla c rl b -.asm_3decd - ld hl, wEnemyMonSpecial ; wcffc - ld a, [wd05e] - and a - jr z, .asm_3deef - ld hl, wPartyMon1Special ; wPartyMon1Special - ld a, [wPlayerMonNumber] ; wPlayerMonNumber - ld bc, $2c +; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if +; a Pokemon with 512 or more Defense has ued Reflect, or if a Pokemon with 512 or more Special has used Light Screen +.specialAttackCritCheck + ld hl, wEnemyMonSpecial + ld a, [wCriticalHitOrOHKO] + and a ; check for critical hit + jr z, .scaleStats +; in the case of a critical hit, reset the player's and enemy's specials to their base values + ld hl, wPartyMon1Special + ld a, [wPlayerMonNumber] + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld a, [hli] ld b, a ld c, [hl] push bc - ld c, $5 - call Func_3df1c - ld hl, $ff97 + ld c, 5 ; special stat + call GetEnemyMonStat + ld hl, H_PRODUCT + 2 pop bc -.asm_3deef +; if either the offensive or defensive stat is too large to store in a byte, scale both stats by dividing them by 4 +; this allows values with up to 10 bits (values up to 1023) to be handled +; anything larger will wrap around +.scaleStats ld a, [hli] ld l, [hl] - ld h, a - or b - jr z, .asm_3df0a + ld h, a ; hl = enemy's offensive stat + or b ; is either high byte nonzero? + jr z, .next ; if not, we don't need to scale +; bc /= 4 (scale player's defensive stat) srl b rr c srl b rr c +; defensive stat can actually end up as 0, leading to a division by 0 freeze during damage calculation +; hl /= 4 (scale enemy's offensive stat) srl h rr l srl h rr l ld a, l - or h - jr nz, .asm_3df0a - inc l -.asm_3df0a - ld b, l - ld a, [wEnemyMonLevel] ; wEnemyMonLevel + or h ; is the enemy's offensive stat 0? + jr nz, .next + inc l ; if the enemy's offensive stat is 0, bump it up to 1 +.next + ld b, l ; b = enemy's offensive stat (possibly scaled) (c already contains player's defensive stat (possibly scaled)) + ld a, [wEnemyMonLevel] ld e, a - ld a, [wd05e] - and a - jr z, .asm_3df17 - sla e -.asm_3df17 + ld a, [wCriticalHitOrOHKO] + and a ; check for critical hit + jr z, .done + sla e ; double level if it was a critical hit +.done ld a, $1 and a and a ret -Func_3df1c: ; 3df1c (f:5f1c) +; get stat c of enemy mon +; c: stat to get (HP=1,Attack=2,Defense=3,Speed=4,Special=5) +GetEnemyMonStat: ; 3df1c (f:5f1c) push de push bc - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_3df40 + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .notLinkBattle ld hl, wEnemyMon1Stats dec c sla c @@ -4339,20 +4502,20 @@ Func_3df1c: ; 3df1c (f:5f1c) ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes ld a, [hli] - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a ld a, [hl] - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a pop bc pop de ret -.asm_3df40 - ld a, [wEnemyMonLevel] ; wEnemyMonLevel - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL +.notLinkBattle + ld a, [wEnemyMonLevel] + ld [W_CURENEMYLVL], a ld a, [wEnemyMonSpecies] ld [wd0b5], a call GetMonHeader ld hl, wEnemyMonDVs - ld de, wcfaf + ld de, wLoadedMonSpeedExp ld a, [hli] ld [de], a inc de @@ -4360,12 +4523,12 @@ Func_3df1c: ; 3df1c (f:5f1c) ld [de], a pop bc ld b, $0 - ld hl, wcfa4 + ld hl, wLoadedMonSpeedExp - $b ; this base address makes CalcStat look in [wLoadedMonSpeedExp] for DVs call CalcStat pop de ret -MoreCalculateDamage: ; 3df65 (f:5f65) +CalculateDamage: ; 3df65 (f:5f65) ; input: ; b: attack ; c: opponent defense @@ -4506,27 +4669,30 @@ MoreCalculateDamage: ; 3df65 (f:5f65) jr c, .asm_3e00a .asm_3e004 +; cap at 997 ld a, 997 / $100 ld [hli], a ld a, 997 % $100 ld [hld], a .asm_3e00a +; add 2 inc hl ld a, [hl] add 2 ld [hld], a jr nc, .done inc [hl] -.done +.done +; minimum damage is 1 ld a, 1 and a ret Func_3e016: ; 3e016 (f:6016) - call Func_3f132 - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + call JumpMoveEffect + ld a, [W_MOVEMISSED] dec a ret @@ -4538,14 +4704,14 @@ UnusedHighCriticalMoves: ; 3e01e (f:601e) ; determines if attack is a critical hit CriticalHitTest: ; 3e023 (f:6023) xor a - ld [wd05e], a ; Critical Hit flag + ld [wCriticalHitOrOHKO], a ; Critical Hit flag ld a, [H_WHOSETURN] ; $fff3 and a - ld hl, W_PLAYERMOVEPOWER ; W_PLAYERMOVEPOWER - ld de, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 + ld hl, W_PLAYERMOVEPOWER + ld de, W_PLAYERBATTSTATUS2 jr z, .calcCriticalHitProbability - ld hl, W_ENEMYMOVEPOWER ; wcfce - ld de, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 + ld hl, W_ENEMYMOVEPOWER + ld de, W_ENEMYBATTSTATUS2 .calcCriticalHitProbability ; 0x3e04f ld a, [hld] ; read base power from RAM and a @@ -4593,7 +4759,7 @@ CriticalHitTest: ; 3e023 (f:6023) cp [hl] ret nc ld a,1 - ld [wd05e],a ; Critical Hit Flag + ld [wCriticalHitOrOHKO],a ; Critical Hit Flag ret .Chances @@ -4619,6 +4785,12 @@ HighCriticalMoves: ; 3e08e (f:608e) ; function to determine if Counter hits and if so, how much damage it does HandleCounterMove: ; 3e093 (f:6093) +; 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, +; the outcome may be affected by the player's actions in the move selection menu prior to switching the Pokemon. +; This might also lead to desync glitches in link battles. + ld a,[H_WHOSETURN] ; whose turn and a ; player's turn @@ -4637,11 +4809,11 @@ HandleCounterMove: ; 3e093 (f:6093) ld [W_MOVEMISSED],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 ; if the target also used Counter, miss + ret z ; miss if the opponent's last selected move is Counter. ld a,[de] and a - ret z ; if the move the target used has 0 power, miss -; check if the move the target used was Normal or Fighting type + ret z ; miss if the opponent's last selected move's Base Power is 0. +; check if the move the target last selected was Normal or Fighting type inc de ld a,[de] and a ; normal type @@ -4655,8 +4827,10 @@ HandleCounterMove: ; 3e093 (f:6093) ld hl,W_DAMAGE ld a,[hli] or [hl] - ret z ; Counter misses if the target did no damage to the Counter user -; double the damage that the target did to the Counter user + 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 + ; 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] add a ldd [hl],a @@ -4685,7 +4859,7 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df) jr z,.specialDamage ld a,[W_PLAYERMOVEPOWER] and a - jp z,ApplyAttackToEnemyPokemonDone + jp z,ApplyAttackToEnemyPokemonDone ; no attack to apply if base power is 0 jr ApplyDamageToEnemyPokemon .superFangEffect ; set the damage to half the target's HP @@ -4708,16 +4882,16 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df) .specialDamage ld hl,wBattleMonLevel ld a,[hl] - ld b,a + ld b,a ; Seismic Toss deals damage equal to the user's level ld a,[W_PLAYERMOVENUM] cp a,SEISMIC_TOSS jr z,.storeDamage cp a,NIGHT_SHADE jr z,.storeDamage - ld b,SONICBOOM_DAMAGE + ld b,SONICBOOM_DAMAGE ; 20 cp a,SONICBOOM jr z,.storeDamage - ld b,DRAGON_RAGE_DAMAGE + ld b,DRAGON_RAGE_DAMAGE ; 40 cp a,DRAGON_RAGE jr z,.storeDamage ; Psywave @@ -4734,7 +4908,7 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df) cp b jr nc,.loop ld b,a -.storeDamage +.storeDamage ; store damage value at b ld hl,W_DAMAGE xor a ld [hli],a @@ -4749,7 +4923,7 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142) or b jr z,ApplyAttackToEnemyPokemonDone ; we're done if damage is 0 ld a,[W_ENEMYBATTSTATUS2] - bit 4,a ; does the enemy have a substitute? + bit HasSubstituteUp,a ; does the enemy have a substitute? jp nz,AttackSubstitute ; subtract the damage from the pokemon's current HP ; also, save the current HP at wHPBarOldHP @@ -4766,7 +4940,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 +; if more damage was done than the current HP, zero the HP and set the damage (W_DAMAGE) ; equal to how much HP the pokemon had before the attack ld a,[wHPBarOldHP+1] ld [hli],a @@ -4789,10 +4963,10 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142) ld [wHPBarNewHP],a hlCoord 2, 2 xor a - ld [wListMenuID],a + ld [wHPBarType],a predef UpdateHPBar2 ; animate the HP bar shortening ApplyAttackToEnemyPokemonDone: ; 3e19d (f:619d) - jp Func_3cd5a ; redraw pokemon names and HP bars + jp DrawHUDsAndHPBars ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0) ld a,[W_ENEMYMOVEEFFECT] @@ -4868,7 +5042,7 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200) or b jr z,ApplyAttackToPlayerPokemonDone ; we're done if damage is 0 ld a,[W_PLAYERBATTSTATUS2] - bit 4,a ; does the player have a substitute? + bit HasSubstituteUp,a ; does the player have a substitute? jp nz,AttackSubstitute ; subtract the damage from the pokemon's current HP ; also, save the current HP at wHPBarOldHP and the new HP at wHPBarNewHP @@ -4886,7 +5060,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 +; if more damage was done than the current HP, zero the HP and set the damage (W_DAMAGE) ; equal to how much HP the pokemon had before the attack ld a,[wHPBarOldHP+1] ld [hli],a @@ -4907,12 +5081,17 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200) ld [wHPBarMaxHP],a hlCoord 10, 9 ld a,$01 - ld [wListMenuID],a + ld [wHPBarType],a predef UpdateHPBar2 ; animate the HP bar shortening ApplyAttackToPlayerPokemonDone - jp Func_3cd5a ; redraw pokemon names and HP bars + jp DrawHUDsAndHPBars AttackSubstitute: ; 3e25e (f:625e) +; Unlike the two ApplyAttackToPokemon functions, Attack Substitute is shared by player and enemy. +; Self-confusion damage as well as Hi-Jump Kick and Jump Kick recoil cause a momentary turn swap before being applied. +; If the user has a Substitute up and would take damage because of that, damage will be applied to the other player's Substitute. +; 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 @@ -4935,6 +5114,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 the Substitute had before being attacked. ld h,b ld l,c res 4,[hl] ; unset the substitute bit @@ -4956,7 +5136,7 @@ AttackSubstitute: ; 3e25e (f:625e) .nullifyEffect xor a ld [hl],a ; zero the effect of the attacker's move - jp Func_3cd5a ; redraw pokemon names and HP bars + jp DrawHUDsAndHPBars SubstituteTookDamageText: ; 3e2ac (f:62ac) TX_FAR _SubstituteTookDamageText @@ -4980,7 +5160,7 @@ HandleBuildingRage: ; 3e2b6 (f:62b6) ld de,wPlayerMonStatMods ld bc,W_PLAYERMOVENUM .next - bit 6,[hl] ; is the pokemon being attacked under the effect of Rage? + bit UsingRage,[hl] ; is the pokemon being attacked under the effect of Rage? ret z ; return if not ld a,[de] cp a,$0d ; maximum stat modifier value @@ -4988,7 +5168,7 @@ HandleBuildingRage: ; 3e2b6 (f:62b6) ld a,[H_WHOSETURN] xor a,$01 ; flip turn for the stat modifier raising function ld [H_WHOSETURN],a -; change the target pokemon's move to $00 and the effect to the one +; temporarily change the target pokemon's move to $00 and the effect to the one ; that causes the attack modifier to go up one stage ld h,b ld l,c @@ -5016,21 +5196,26 @@ BuildingRageText: ; 3e2f8 (f:62f8) ; copy last move for Mirror Move ; sets zero flag on failure and unsets zero flag on success MirrorMoveCopyMove: ; 3e2fd (f:62fd) +; 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 +; ccf1 is also set to 0 whenever the player is fast asleep or frozen solid. +; ccf2 is also set to 0 whenever the enemy is fast asleep or frozen solid. + ld a,[H_WHOSETURN] and a ; values for player turn - ld a,[wccf2] ; Enemy Used Move + ld a,[wEnemyUsedMove] ; Enemy Used Move ld de,W_PLAYERMOVENUM ld hl,wPlayerSelectedMove ld bc,wEnemySelectedMove ; Added so we can check what they actually selected jr z,.next ; values for enemy turn - ld a,[wccf1] ; Player Used Move + ld a,[wPlayerUsedMove] ; Player Used Move ld de,W_ENEMYMOVENUM ld hl,wEnemySelectedMove ld bc,wPlayerSelectedMove ; Added so we can check what they actually selected .next -; ld [hl],a ; Commented out so we aren't loading the wrong move cp a,MIRROR_MOVE ; did the target pokemon also use Mirror Move? jr z,.mirrorMoveFailed and a ; null move? @@ -5039,7 +5224,6 @@ MirrorMoveCopyMove: ; 3e2fd (f:62fd) ld [hl],a ; This command was originally up top and I just moved it down here because reasons jr ReloadMoveData .mirrorMoveFailed -; Mirror Move fails on itself and null moves ld hl,MirrorMoveFailedText call PrintText xor a @@ -5121,9 +5305,9 @@ IncrementMovePP: ; 3e373 (f:6373) ld a,[H_WHOSETURN] and a ld a,[wPlayerMonNumber] ; value for player turn - jr z,.next2 + jr z,.updatePP ld a,[wEnemyMonPartyPos] ; value for enemy turn -.next2 +.updatePP ld bc,wEnemyMon2 - wEnemyMon1 call AddNTimes inc [hl] ; increment PP in the party memory location @@ -5230,6 +5414,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) jr nz,.skipTypeImmunity .typeImmunity ; 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 .skipTypeImmunity @@ -5300,7 +5485,7 @@ MoveHitTest: ; 3e56b (f:656b) cp a,DREAM_EATER_EFFECT jr nz,.swiftCheck ld a,[bc] - and a,$07 ; is the target pokemon sleeping? + and a,SLP ; is the target pokemon sleeping? jp z,.moveMissed .swiftCheck ld a,[de] @@ -5310,12 +5495,12 @@ MoveHitTest: ; 3e56b (f:656b) jr z,.checkForDigOrFlyStatus ; this code is buggy. it's supposed to prevent HP draining moves from working on substitutes. ; since $7b79 overwrites a with either $00 or $01, it never works. - cp a,DRAIN_HP_EFFECT ; $03 + cp a,DRAIN_HP_EFFECT jp z,.moveMissed - cp a,DREAM_EATER_EFFECT ; $08 + cp a,DREAM_EATER_EFFECT jp z,.moveMissed .checkForDigOrFlyStatus - bit 6,[hl] + bit Invulnerable,[hl] jp nz,.moveMissed ld a,[H_WHOSETURN] and a @@ -5325,48 +5510,47 @@ MoveHitTest: ; 3e56b (f:656b) ld a,[W_PLAYERMOVEEFFECT] cp a,ATTACK_DOWN1_EFFECT jr c,.skipEnemyMistCheck - cp a,BIDE_EFFECT + cp a,HAZE_EFFECT + 1 jr c,.enemyMistCheck - cp a,$3a + cp a,ATTACK_DOWN2_EFFECT jr c,.skipEnemyMistCheck - cp a,POISON_EFFECT + cp a,REFLECT_EFFECT + 1 jr c,.enemyMistCheck jr .skipEnemyMistCheck .enemyMistCheck ; if move effect is from $12 to $19 inclusive or $3a to $41 inclusive ; i.e. the following moves ; GROWL, TAIL WHIP, LEER, STRING SHOT, SAND-ATTACK, SMOKESCREEN, KINESIS, -; FLASH, CONVERSION, HAZE*, SCREECH, LIGHT SCREEN*, REFLECT* +; 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 -; XXX are there are any others like those three? ld a,[W_ENEMYBATTSTATUS2] - bit 1,a ; is mon protected by mist? + bit ProtectedByMist,a ; is mon protected by mist? jp nz,.moveMissed .skipEnemyMistCheck ld a,[W_PLAYERBATTSTATUS2] - bit 0,a ; is the player using X Accuracy? + 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] cp a,ATTACK_DOWN1_EFFECT jr c,.skipPlayerMistCheck - cp a,BIDE_EFFECT + cp a,HAZE_EFFECT + 1 jr c,.playerMistCheck - cp a,$3a + cp a,ATTACK_DOWN2_EFFECT jr c,.skipPlayerMistCheck - cp a,POISON_EFFECT + cp a,REFLECT_EFFECT + 1 jr c,.playerMistCheck jr .skipPlayerMistCheck .playerMistCheck ; similar to enemy mist check ld a,[W_PLAYERBATTSTATUS2] - bit 1,a ; is mon protected by mist? + bit ProtectedByMist,a ; is mon protected by mist? jp nz,.moveMissed .skipPlayerMistCheck ld a,[W_ENEMYBATTSTATUS2] - bit 0,a ; is the enemy using X Accuracy? + 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 @@ -5396,11 +5580,11 @@ MoveHitTest: ; 3e56b (f:656b) jr z,.playerTurn2 .enemyTurn2 ld hl,W_ENEMYBATTSTATUS1 - res 5,[hl] ; end multi-turn attack e.g. wrap + res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap ret .playerTurn2 ld hl,W_PLAYERBATTSTATUS1 - res 5,[hl] ; end multi-turn attack e.g. wrap + res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap ret ; values for player turn @@ -5472,172 +5656,175 @@ CalcHitChance: ; 3e624 (f:6624) ld [hl],a ; store the hit chance in the move accuracy variable ret -Func_3e687: ; 3e687 (f:6687) - ld hl, W_DAMAGE ; W_DAMAGE +; multiplies damage by a random percentage from ~85% to 100% +RandomizeDamage: ; 3e687 (f:6687) + ld hl, W_DAMAGE ld a, [hli] and a - jr nz, .asm_3e692 + jr nz, .DamageGreaterThanOne ld a, [hl] - cp $2 - ret c -.asm_3e692 + cp 2 + ret c ; return if damage is equal to 0 or 1 +.DamageGreaterThanOne xor a - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + ld [H_MULTIPLICAND], a dec hl ld a, [hli] - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a ld a, [hl] - ld [$ff98], a -.asm_3e69c + ld [H_MULTIPLICAND + 2], a +; loop until a random number greater than or equal to 217 is generated +.loop call BattleRandom rrca - cp $d9 - jr c, .asm_3e69c - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) - call Multiply - ld a, $ff - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + cp 217 + jr c, .loop + ld [H_MULTIPLIER], a + call Multiply ; multiply damage by the random number, which is in the range [217, 255] + ld a, 255 + ld [H_DIVISOR], a ld b, $4 - call Divide - ld a, [$ff97] - ld hl, W_DAMAGE ; W_DAMAGE + call Divide ; divide the result by 255 +; store the modified damage + ld a, [H_QUOTIENT + 2] + ld hl, W_DAMAGE ld [hli], a - ld a, [$ff98] + ld a, [H_QUOTIENT + 3] ld [hl], a ret -Func_3e6bc: ; 3e6bc (f:66bc) - ld a, [wEnemySelectedMove] ; wccdd +ExecuteEnemyMove: ; 3e6bc (f:66bc) + ld a, [wEnemySelectedMove] inc a - jp z, Func_3e88c + jp z, ExecuteEnemyMoveDone call PrintGhostText - jp z, Func_3e88c - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_3e6dc + jp z, ExecuteEnemyMoveDone + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .executeEnemyMove ld b, $1 - ld a, [wcc3e] + ld a, [wSerialExchangeNybbleReceiveData] cp $e - jr z, .asm_3e6dc + jr z, .executeEnemyMove cp $4 ret nc -.asm_3e6dc +.executeEnemyMove ld hl, wccd5 inc [hl] xor a - ld [W_MOVEMISSED], a ; W_MOVEMISSED + ld [W_MOVEMISSED], a ld [wccf4], a ld a, $a ld [wd05b], a - call Func_3e88f - jr nz, .asm_3e6f2 + call CheckEnemyStatusConditions + jr nz, .enemyHasNoSpecialConditions jp [hl] -.asm_3e6f2 - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - bit 4, [hl] - jr nz, asm_3e70b +.enemyHasNoSpecialConditions + ld hl, W_ENEMYBATTSTATUS1 + bit ChargingUp, [hl] ; is the enemy charging up for attack? + jr nz, EnemyCanExecuteChargingMove ; if so, jump call GetCurrentMove -Func_3e6fc: ; 3e6fc (f:66fc) - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT +CheckIfEnemyNeedsToChargeUp: ; 3e6fc (f:66fc) + ld a, [W_ENEMYMOVEEFFECT] cp CHARGE_EFFECT - jp z, Func_3f132 + jp z, JumpMoveEffect cp FLY_EFFECT - jp z, Func_3f132 - jr asm_3e72b -asm_3e70b: ; 3e70b (f:670b) - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - res 4, [hl] ; no longer charging up for attack - res 6, [hl] ; no longer invulnerable to typcial attacks - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + jp z, JumpMoveEffect + jr EnemyCanExecuteMove +EnemyCanExecuteChargingMove: ; 3e70b (f:670b) + ld hl, W_ENEMYBATTSTATUS1 + res ChargingUp, [hl] ; no longer charging up for attack + res Invulnerable, [hl] ; no longer invulnerable to typical attacks + ld a, [W_ENEMYMOVENUM] ld [wd0b5], a - ld a, $2c + ld a, BANK(MoveNames) ld [wPredefBank], a ld a, MOVE_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a call GetName ld de, wcd6d call CopyStringToCF4B -asm_3e72b: ; 3e72b (f:672b) +EnemyCanExecuteMove: ; 3e72b (f:672b) xor a ld [wcced], a call PrintMonName1Text - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT - ld hl, EffectsArray1 ; $4000 + ld a, [W_ENEMYMOVEEFFECT] + ld hl, ResidualEffects1 ld de, $1 call IsInArray - jp c, Func_3f132 - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT - ld hl, EffectsArray5B ; $4049 + jp c, JumpMoveEffect + ld a, [W_ENEMYMOVEEFFECT] + ld hl, SpecialEffectsCont ld de, $1 call IsInArray - call c, Func_3f132 -asm_3e750: ; 3e750 (f:6750) - call Func_3ec81 - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT - ld hl, EffectsArray2 ; $4011 + call c, JumpMoveEffect +EnemyCalcMoveDamage: ; 3e750 (f:6750) + call SwapPlayerAndEnemyLevels + ld a, [W_ENEMYMOVEEFFECT] + ld hl, SetDamageEffects ld de, $1 call IsInArray jp c, Func_3e77f call CriticalHitTest call HandleCounterMove jr z, asm_3e782 - call Func_3ec81 - call Func_3de75 - call Func_3ec81 - call MoreCalculateDamage + call SwapPlayerAndEnemyLevels + call GetDamageVarsForEnemyAttack + call SwapPlayerAndEnemyLevels + call CalculateDamage jp z, Func_3e7d1 call AdjustDamageForMoveType - call Func_3e687 + call RandomizeDamage Func_3e77f: ; 3e77f (f:677f) call MoveHitTest asm_3e782: ; 3e782 (f:6782) - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a jr z, .asm_3e791 - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] cp EXPLODE_EFFECT jr z, asm_3e7a0 jr Func_3e7d1 .asm_3e791 - call Func_3ec81 + call SwapPlayerAndEnemyLevels Func_3e794: ; 3e794 (f:6794) - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] and a ld a, $1 jr z, asm_3e7a4 ld a, $2 jr asm_3e7a4 asm_3e7a0: ; 3e7a0 (f:67a0) - call Func_3ec81 + call SwapPlayerAndEnemyLevels xor a asm_3e7a4: ; 3e7a4 (f:67a4) push af - ld a, [W_ENEMYBATTSTATUS2] ; W_ENEMYBATTSTATUS2 - bit 4, a ; does mon have a substitute? + ld a, [W_ENEMYBATTSTATUS2] + bit HasSubstituteUp, a ; does mon have a substitute? ld hl, Func_79747 ld b, BANK(Func_79747) call nz, Bankswitch pop af ld [wcc5b], a - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + ld a, [W_ENEMYMOVENUM] call PlayMoveAnimation - call Func_3eed3 - call Func_3cdec - ld a, [W_ENEMYBATTSTATUS2] ; W_ENEMYBATTSTATUS2 - bit 4, a ; does mon have a substitute? + call HandleExplodingAnimation + call DrawEnemyHUDAndHPBar + ld a, [W_ENEMYBATTSTATUS2] + bit HasSubstituteUp, a ; does mon have a substitute? ld hl, Func_79771 ld b, BANK(Func_79771) call nz, Bankswitch ; slide the substitute's sprite out jr asm_3e7ef Func_3e7d1: ; 3e7d1 (f:67d1) - call Func_3ec81 + call SwapPlayerAndEnemyLevels ld c, $1e call DelayFrames - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] cp FLY_EFFECT jr z, .asm_3e7e6 cp CHARGE_EFFECT @@ -5649,107 +5836,109 @@ Func_3e7d1: ; 3e7d1 (f:67d1) ld a,STATUS_AFFECTED_ANIM call PlayMoveAnimation asm_3e7ef: ; 3e7ef (f:67ef) - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] cp MIRROR_MOVE_EFFECT jr nz, .notMirrorMoveEffect call MirrorMoveCopyMove - jp z, Func_3e88c - jp Func_3e6fc + jp z, ExecuteEnemyMoveDone + jp CheckIfEnemyNeedsToChargeUp .notMirrorMoveEffect cp METRONOME_EFFECT jr nz, .notMetronomeEffect call MetronomePickMove - jp Func_3e6fc + jp CheckIfEnemyNeedsToChargeUp .notMetronomeEffect - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT - ld hl, EffectsArray3 ; $4014 + ld a, [W_ENEMYMOVEEFFECT] + ld hl, ResidualEffects2 ld de, $1 call IsInArray - jp c, Func_3f132 - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + jp c, JumpMoveEffect + ld a, [W_MOVEMISSED] and a jr z, .asm_3e82b call PrintMoveFailureText - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] cp EXPLODE_EFFECT jr z, .asm_3e83e - jp Func_3e88c + jp ExecuteEnemyMoveDone .asm_3e82b call ApplyAttackToPlayerPokemon - call Func_3dc5c + call PrintCriticalOHKOText callab DisplayEffectiveness - ld a, $1 + ld a, 1 ld [wccf4], a .asm_3e83e - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT - ld hl, EffectsArray4 ; $4030 + ld a, [W_ENEMYMOVEEFFECT] + ld hl, AlwaysHappenSideEffects ld de, $1 call IsInArray - call c, Func_3f132 - ld hl, wBattleMonHP ; wd015 + call c, JumpMoveEffect + ld hl, wBattleMonHP ld a, [hli] ld b, [hl] or b ret z call HandleBuildingRage - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - bit 2, [hl] ; is mon hitting multiple times? (example: double kick) + ld hl, W_ENEMYBATTSTATUS1 + bit AttackingMultipleTimes, [hl] ; is mon hitting multiple times? (example: double kick) jr z, .asm_3e873 push hl - ld hl, wd06f + ld hl, wEnemyNumAttacksLeft dec [hl] pop hl jp nz, Func_3e794 - res 2, [hl] ; mon is no longer hitting multiple times - ld hl, HitXTimesText ; $6887 + res AttackingMultipleTimes, [hl] ; mon is no longer hitting multiple times + ld hl, HitXTimesText call PrintText xor a - ld [wcd05], a + ld [wEnemyNumHits], a .asm_3e873 - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] and a - jr z, Func_3e88c - ld hl, EffectsArray5 ; $403b + jr z, ExecuteEnemyMoveDone + ld hl, SpecialEffects ld de, $1 call IsInArray - call nc, Func_3f132 - jr Func_3e88c + call nc, JumpMoveEffect + jr ExecuteEnemyMoveDone HitXTimesText: ; 3e887 (f:6887) TX_FAR _HitXTimesText db "@" -Func_3e88c: ; 3e88c (f:688c) +ExecuteEnemyMoveDone: ; 3e88c (f:688c) ld b, $1 ret -Func_3e88f: ; 3e88f (f:688f) - ld hl, wEnemyMonStatus ; wcfe9 +; 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) + ld hl, wEnemyMonStatus ld a, [hl] - and $7 - jr z, .asm_3e8bf - dec a - ld [wEnemyMonStatus], a ; wcfe9 + and SLP ; sleep mask + jr z, .checkIfFrozen + dec a ; decrement number of turns left + ld [wEnemyMonStatus], a and a - jr z, .asm_3e8af + jr z, .wokeUp ; if the number of turns hit 0, wake up ld hl, FastAsleepText call PrintText xor a ld [wcc5b], a ld a,SLP_ANIM call PlayMoveAnimation - jr .asm_3e8b5 -.asm_3e8af + jr .next1 +.wokeUp ld hl, WokeUpText call PrintText -.asm_3e8b5 +.next1 xor a - ld [wccf2], a - ld hl, Func_3e88c ; $688c - jp Func_3eab8 -.asm_3e8bf + ld [wEnemyUsedMove], a + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL +.checkIfFrozen bit FRZ, [hl] - jr z, .asm_3e8d3 + jr z, .checkIfTrapped ; Add check for Flame Wheel and Flare Blitz ld a, [wEnemySelectedMove] cp FLAME_WHEEL @@ -5764,9 +5953,9 @@ Func_3e88f: ; 3e88f (f:688f) ld hl, IsFrozenText call PrintText xor a - ld [wccf2], a - ld hl, Func_3e88c ; $688c - jp Func_3eab8 + ld [wEnemyUsedMove], a + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL .defrostMon ; New routine to thaw mon ld hl, wEnemyMonStatus @@ -5779,60 +5968,58 @@ Func_3e88f: ; 3e88f (f:688f) inc a ld [H_WHOSETURN],a -.asm_3e8d3 - ld a, [W_PLAYERBATTSTATUS1] ; W_PLAYERBATTSTATUS1 - bit 5, a - jp z, Func_3e8e7 +.checkIfTrapped + ld a, [W_PLAYERBATTSTATUS1] + bit UsingTrappingMove, a ; is the player using a multi-turn attack like warp + jp z, .checkIfFlinched ld hl, CantMoveText call PrintText - ld hl, Func_3e88c ; $688c - jp Func_3eab8 - -Func_3e8e7: ; 3e8e7 (f:68e7) - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - bit 3, [hl] - jp z, Func_3e8fd - res 3, [hl] + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL +.checkIfFlinched + ld hl, W_ENEMYBATTSTATUS1 + bit Flinched, [hl] ; check if enemy mon flinched + jp z, .checkIfMustRecharge + res Flinched, [hl] ld hl, FlinchedText call PrintText - ld hl, Func_3e88c ; $688c - jp Func_3eab8 - -Func_3e8fd: ; 3e8fd (f:68fd) - ld hl, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 - bit 5, [hl] - jr z, .asm_3e912 - res 5, [hl] + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL +.checkIfMustRecharge + ld hl, W_ENEMYBATTSTATUS2 + 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, Func_3e88c ; $688c - jp Func_3eab8 -.asm_3e912 - ld hl, W_ENEMYDISABLEDMOVE ; W_ENEMYDISABLEDMOVE + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL +.checkIfAnyMoveDisabled + ld hl, W_ENEMYDISABLEDMOVE ld a, [hl] and a - jr z, .asm_3e929 + jr z, .checkIfConfused dec a ld [hl], a and $f - jr nz, .asm_3e929 + jr nz, .checkIfConfused ld [hl], a ld [wccef], a ld hl, DisabledNoMoreText call PrintText -.asm_3e929 - ld a, [W_ENEMYBATTSTATUS1] ; W_ENEMYBATTSTATUS1 - add a - jp nc, Func_3e9aa - ld hl, wd070 +.checkIfConfused + ld a, [W_ENEMYBATTSTATUS1] + add a ; check if enemy mon is confused + jp nc, .checkIfTriedToUseDisabledMove + ld hl, W_ENEMYCONFUSEDCOUNTER dec [hl] - jr nz, .asm_3e944 - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - res 7, [hl] + jr nz, .isConfused + ld hl, W_ENEMYBATTSTATUS1 + res Confused, [hl] ld hl, ConfusedNoMoreText call PrintText - jp Func_3e9aa -.asm_3e944 + jp .checkIfTriedToUseDisabledMove +.isConfused ld hl, IsConfusedText call PrintText xor a @@ -5841,10 +6028,10 @@ Func_3e8fd: ; 3e8fd (f:68fd) call PlayMoveAnimation call BattleRandom cp $80 - jr c, Func_3e9aa - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 + jr c, .checkIfTriedToUseDisabledMove + ld hl, W_ENEMYBATTSTATUS1 ld a, [hl] - and $80 + and 1 << Confused ld [hl], a ld hl, HurtItselfText call PrintText @@ -5853,23 +6040,23 @@ Func_3e8fd: ; 3e8fd (f:68fd) push af ld a, [hld] push af - ld a, [wEnemyMonDefense] ; wcff8 + ld a, [wEnemyMonDefense] ld [hli], a ld a, [wEnemyMonDefense + 1] ld [hl], a - ld hl, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT + ld hl, W_ENEMYMOVEEFFECT push hl ld a, [hl] push af xor a ld [hli], a - ld [wd05e], a - ld a, $28 + ld [wCriticalHitOrOHKO], a + ld a, 40 ld [hli], a xor a ld [hl], a - call Func_3de75 - call MoreCalculateDamage + call GetDamageVarsForEnemyAttack + call CalculateDamage pop af pop hl ld [hl], a @@ -5880,254 +6067,256 @@ Func_3e8fd: ; 3e8fd (f:68fd) ld [hl], a xor a ld [wcc5b], a - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a ld a, POUND call PlayMoveAnimation ld a, $1 - ld [H_WHOSETURN], a ; $fff3 + ld [H_WHOSETURN], a call ApplyDamageToEnemyPokemon - jr asm_3e9d3 - -Func_3e9aa: ; 3e9aa (f:69aa) + jr .monHurtItselfOrFullyParalysed +.checkIfTriedToUseDisabledMove ld a, [wccef] and a - jr z, .asm_3e9bf - ld hl, wEnemySelectedMove ; wccdd + jr z, .checkIfParalysed + ld hl, wEnemySelectedMove cp [hl] - jr nz, .asm_3e9bf + jr nz, .checkIfParalysed call PrintMoveIsDisabledText - ld hl, Func_3e88c ; $688c - jp Func_3eab8 -.asm_3e9bf - ld hl, wEnemyMonStatus ; wcfe9 - bit 6, [hl] - jr z, asm_3e9f6 + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL +.checkIfParalysed + ld hl, wEnemyMonStatus + bit PAR, [hl] + jr z, .checkIfUsingBide call BattleRandom cp $3f - jr nc, asm_3e9f6 + jr nc, .checkIfUsingBide ld hl, FullyParalyzedText call PrintText -asm_3e9d3: ; 3e9d3 (f:69d3) - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 +.monHurtItselfOrFullyParalysed + ld hl, W_ENEMYBATTSTATUS1 ld a, [hl] - and $cc + ; clear bide, thrashing about, charging up, and multi-turn moves such as warp + and (1 << AttackingMultipleTimes) | (1 << Flinched) | (1 << Invulnerable) | (1 << Confused) ld [hl], a - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] cp FLY_EFFECT - jr z, .asm_3e9e7 + jr z, .flyOrChargeEffect cp CHARGE_EFFECT - jr z, .asm_3e9e7 - jr .asm_3e9f0 -.asm_3e9e7 + jr z, .flyOrChargeEffect + jr .notFlyOrChargeEffect +.flyOrChargeEffect xor a ld [wcc5b], a ld a, STATUS_AFFECTED_ANIM call PlayMoveAnimation -.asm_3e9f0 - ld hl, Func_3e88c ; $688c - jp Func_3eab8 -asm_3e9f6: ; 3e9f6 (f:69f6) - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - bit 0, [hl] ; is mon using bide? - jr z, .asm_3ea54 - xor a - ld [W_ENEMYMOVENUM], a ; W_ENEMYMOVENUM - ld hl, W_DAMAGE ; W_DAMAGE +.notFlyOrChargeEffect + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL +.checkIfUsingBide + ld hl, W_ENEMYBATTSTATUS1 + bit StoringEnergy, [hl] ; is mon using bide? + jr z, .checkIfThrashingAbout + xor a + ld [W_ENEMYMOVENUM], a + ld hl, W_DAMAGE ld a, [hli] ld b, a ld c, [hl] - ld hl, wcd06 + ld hl, wEnemyBideAccumulatedDamage + 1 ld a, [hl] add c ld [hld], a ld a, [hl] adc b ld [hl], a - ld hl, wd06f + ld hl, wEnemyNumAttacksLeft dec [hl] - jr z, .asm_3ea1c - ld hl, Func_3e88c ; $688c - jp Func_3eab8 -.asm_3ea1c - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - res 0, [hl] + jr z, .unleashEnergy + ld hl, ExecuteEnemyMoveDone + jp .enemyReturnToHL +.unleashEnergy + ld hl, W_ENEMYBATTSTATUS1 + res StoringEnergy, [hl] ; not using bide any more ld hl, UnleashedEnergyText call PrintText ld a, $1 - ld [W_ENEMYMOVEPOWER], a ; wcfce - ld hl, wcd06 + ld [W_ENEMYMOVEPOWER], a + ld hl, wEnemyBideAccumulatedDamage + 1 ld a, [hld] add a ld b, a - ld [wd0d8], a + ld [W_DAMAGE + 1], a ld a, [hl] rl a - ld [W_DAMAGE], a ; W_DAMAGE + ld [W_DAMAGE], a or b - jr nz, .asm_3ea43 + jr nz, .next2 ld a, $1 - ld [W_MOVEMISSED], a ; W_MOVEMISSED -.asm_3ea43 + ld [W_MOVEMISSED], a +.next2 xor a ld [hli], a ld [hl], a ld a, BIDE - ld [W_ENEMYMOVENUM], a ; W_ENEMYMOVENUM - call Func_3ec81 - ld hl, asm_3e782 ; $6782 - jp Func_3eab8 -.asm_3ea54 - bit 1, [hl] ; is mon using thrash or petal dance? - jr z, .asm_3ea83 + ld [W_ENEMYMOVENUM], a + call SwapPlayerAndEnemyLevels + ld hl, asm_3e782 + jp .enemyReturnToHL +.checkIfThrashingAbout + bit ThrashingAbout, [hl] ; is mon using thrash or petal dance? + jr z, .checkIfUsingMultiturnMove ld a, THRASH - ld [W_ENEMYMOVENUM], a ; W_ENEMYMOVENUM + ld [W_ENEMYMOVENUM], a ld hl, ThrashingAboutText call PrintText - ld hl, wd06f + ld hl, wEnemyNumAttacksLeft dec [hl] - ld hl, asm_3e750 ; $6750 - jp nz, Func_3eab8 + ld hl, EnemyCalcMoveDamage + jp nz, .enemyReturnToHL push hl - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - res 1, [hl] ; mon is no longer using thrash or petal dance - set 7, [hl] ; mon is now confused + ld hl, W_ENEMYBATTSTATUS1 + 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 [wd070], a + ld [W_ENEMYCONFUSEDCOUNTER], a pop hl - jp Func_3eab8 -.asm_3ea83 - bit 5, [hl] ; is mon using multi-turn move? - jp z, Func_3ea9b + jp .enemyReturnToHL +.checkIfUsingMultiturnMove + bit UsingTrappingMove, [hl] ; is mon using multi-turn move? + jp z, .checkIfUsingRage ld hl, AttackContinuesText call PrintText - ld hl, wd06f + ld hl, wEnemyNumAttacksLeft dec [hl] - ld hl, Func_3e794 ; $6794 - jp nz, Func_3eab8 - jp Func_3eab8 - -Func_3ea9b: ; 3ea9b (f:6a9b) - ld a, [W_ENEMYBATTSTATUS2] ; W_ENEMYBATTSTATUS2 - bit 6, a ; is mon using rage? - jp z, Func_3eaba + ld hl, Func_3e794 + jp nz, .enemyReturnToHL + jp .enemyReturnToHL +.checkIfUsingRage + ld a, [W_ENEMYBATTSTATUS2] + bit UsingRage, a ; is mon using rage? + jp z, .checkEnemyStatusConditionsDone ld a, RAGE ld [wd11e], a call GetMoveName call CopyStringToCF4B xor a - ld [W_ENEMYMOVEEFFECT], a ; W_ENEMYMOVEEFFECT - ld hl, asm_3e72b ; $672b - jp Func_3eab8 - -Func_3eab8: ; 3eab8 (f:6ab8) - xor a + ld [W_ENEMYMOVEEFFECT], a + ld hl, EnemyCanExecuteMove + jp .enemyReturnToHL +.enemyReturnToHL + xor a ; set Z flag ret - -Func_3eaba: ; 3eaba (f:6aba) +.checkEnemyStatusConditionsDone ld a, $1 - and a + and a ; clear Z flag ret GetCurrentMove: ; 3eabe (f:6abe) - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a jp z, .player - ld de, W_ENEMYMOVENUM ; W_ENEMYMOVENUM - ld a, [wEnemySelectedMove] ; wccdd + ld de, W_ENEMYMOVENUM + ld a, [wEnemySelectedMove] jr .selected .player - ld de, W_PLAYERMOVENUM ; wcfd2 + ld de, W_PLAYERMOVENUM ld a, [W_FLAGS_D733] bit 0, a ld a, [wccd9] jr nz, .selected - ld a, [wPlayerSelectedMove] ; wPlayerSelectedMove + ld a, [wPlayerSelectedMove] .selected ld [wd0b5], a dec a - ld hl, Moves ; $4000 + ld hl, Moves ld bc, $6 call AddNTimes ld a, BANK(Moves) call FarCopyData - ld a, $2c + + ld a, BANK(MoveNames) ld [wPredefBank], a - ld a, $2 - ld [W_LISTTYPE], a ; list type 2 = move name + ld a, MOVE_NAME + ld [wNameListType], a call GetName ld de, wcd6d jp CopyStringToCF4B -Func_3eb01: ; 3eb01 (f:6b01) - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jp z, Func_3cc13 +LoadEnemyMonData: ; 3eb01 (f:6b01) + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jp z, LoadEnemyMonFromParty ld a, [wEnemyMonSpecies2] ld [wEnemyMonSpecies], a ld [wd0b5], a call GetMonHeader - ld a, [W_ENEMYBATTSTATUS3] ; W_ENEMYBATTSTATUS3 - bit 3, a - ld hl, wcceb + ld a, [W_ENEMYBATTSTATUS3] + bit Transformed, a ; is enemy mon transformed? + ld hl, wcceb ; copied DVs from when it used Transform ld a, [hli] ld b, [hl] - jr nz, .asm_3eb33 - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - cp $2 + jr nz, .storeDVs + ld a, [W_ISINBATTLE] + cp $2 ; is it a trainer battle? +; fixed DVs for trainer mon ld a, $98 ld b, $88 - jr z, .asm_3eb33 + jr z, .storeDVs +; random DVs for wild mon call BattleRandom ld b, a call BattleRandom -.asm_3eb33 +.storeDVs ld hl, wEnemyMonDVs ld [hli], a ld [hl], b - ld de, wEnemyMonLevel ; wEnemyMonLevel - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld de, wEnemyMonLevel + ld a, [W_CURENEMYLVL] ld [de], a inc de ld b, $0 - ld hl, wEnemyMonHP ; wEnemyMonHP + ld hl, wEnemyMonHP push hl call CalcStats pop hl - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - cp $2 - jr z, .asm_3eb65 - ld a, [W_ENEMYBATTSTATUS3] ; W_ENEMYBATTSTATUS3 - bit 3, a - jr nz, .asm_3eb86 - ld a, [wEnemyMonMaxHP] ; wEnemyMonMaxHP + ld a, [W_ISINBATTLE] + cp $2 ; is it a trainer battle? + jr z, .copyHPAndStatusFromPartyData + ld a, [W_ENEMYBATTSTATUS3] + 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 + ld a, [wEnemyMonMaxHP] ld [hli], a ld a, [wEnemyMonMaxHP+1] ld [hli], a xor a inc hl - ld [hl], a - jr .asm_3eb86 -.asm_3eb65 - ld hl, wEnemyMon1HP ; wd8a5 (aliases: W_WATERMONS) - ld a, [wWhichPokemon] ; wWhichPokemon + ld [hl], a ; init status to 0 + jr .copyTypes +; if it's a trainer mon, copy the HP and status from the enemy party data +.copyHPAndStatusFromPartyData + ld hl, wEnemyMon1HP + ld a, [wWhichPokemon] ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes ld a, [hli] - ld [wEnemyMonHP], a ; wEnemyMonHP + ld [wEnemyMonHP], a ld a, [hli] ld [wEnemyMonHP + 1], a - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld [wEnemyMonPartyPos], a inc hl ld a, [hl] - ld [wEnemyMonStatus], a ; wcfe9 - jr .asm_3eb86 -.asm_3eb86 + ld [wEnemyMonStatus], a + jr .copyTypes +.copyTypes ld hl, W_MONHTYPES - ld de, wEnemyMonType ; wcfea + ld de, wEnemyMonType ld a, [hli] ; copy type 1 ld [de], a inc de @@ -6137,17 +6326,19 @@ Func_3eb01: ; 3eb01 (f:6b01) ld a, [hli] ; copy catch rate ld [de], a inc de - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - cp $2 - jr nz, .asm_3ebb0 + ld a, [W_ISINBATTLE] + cp $2 ; is it a trainer battle? + jr nz, .copyStandardMoves +; if it's a trainer battle, copy moves from enemy party data ld hl, wEnemyMon1Moves - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes ld bc, NUM_MOVES call CopyData - jr .asm_3ebca -.asm_3ebb0 + jr .loadMovePPs +.copyStandardMoves +; for a wild mon, first copy default moves from the mon header ld hl, W_MONHMOVES ld a, [hli] ld [de], a @@ -6165,20 +6356,20 @@ Func_3eb01: ; 3eb01 (f:6b01) dec de xor a ld [wHPBarMaxHP], a - predef WriteMonMoves -.asm_3ebca + predef WriteMonMoves ; get moves based on current level +.loadMovePPs ld hl, wEnemyMonMoves ld de, wEnemyMonSpecial + 1 predef LoadMovePPs ld hl, W_MONHBASESTATS - ld de, wd002 + ld de, wEnemyMonBaseStats ld b, $5 -.asm_3ebdd +.copyBaseStatsLoop ld a, [hli] ld [de], a inc de dec b - jr nz, .asm_3ebdd + jr nz, .copyBaseStatsLoop ld hl, W_MONHCATCHRATE ld a, [hli] ld [de], a @@ -6199,79 +6390,85 @@ Func_3eb01: ; 3eb01 (f:6b01) dec a ld c, a ld b, $1 - ld hl, wPokedexSeen ; wd30a - predef FlagActionPredef - ld hl, wEnemyMonLevel ; wEnemyMonLevel - ld de, wcd23 + ld hl, wPokedexSeen + predef FlagActionPredef ; mark this mon as seen in the pokedex + ld hl, wEnemyMonLevel + ld de, wEnemyMonUnmodifiedLevel ld bc, $b call CopyData - ld a, $7 - ld b, $8 - ld hl, wEnemyMonStatMods ; wcd2e -.asm_3ec2d + ld a, $7 ; default stat mod + ld b, $8 ; number of stat mods + ld hl, wEnemyMonStatMods +.statModLoop ld [hli], a dec b - jr nz, .asm_3ec2d + jr nz, .statModLoop ret -Func_3ec32: ; 3ec32 (f:6c32) - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr nz, .asm_3ec4d +; calls BattleTransition to show the battle transition animation and initializes some battle variables +DoBattleTransitionAndInitBattleVariables: ; 3ec32 (f:6c32) + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr nz, .next +; link battle xor a - ld [wMenuJoypadPollCount], a ; wMenuJoypadPollCount - callab Func_372d6 + ld [wMenuJoypadPollCount], a + callab DisplayLinkBattleVersusTextBox ld a, $1 - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call ClearScreen -.asm_3ec4d +.next call DelayFrame predef BattleTransition - callab Func_3ee58 + callab LoadHudAndHpBarAndStatusTilePatterns ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld a, $ff - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call ClearSprites call ClearScreen xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld [$ffb0], a - ld [rWY], a ; $ff4a - ld [$ffd7], a - ld hl, wd060 + ld [H_AUTOBGTRANSFERENABLED], a + ld [hWY], a + ld [rWY], a + ld [hTilesetType], a + ld hl, wPlayerStatsToDouble ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld [W_PLAYERDISABLEDMOVE], a ; W_PLAYERDISABLEDMOVE + ld [W_PLAYERDISABLEDMOVE], a ret -Func_3ec81: ; 3ec81 (f:6c81) +; swaps the level values of the BattleMon and EnemyMon structs +SwapPlayerAndEnemyLevels: ; 3ec81 (f:6c81) push bc - ld a, [wBattleMonLevel] ; wBattleMonLevel + ld a, [wBattleMonLevel] ld b, a - ld a, [wEnemyMonLevel] ; wEnemyMonLevel - ld [wBattleMonLevel], a ; wBattleMonLevel + ld a, [wEnemyMonLevel] + ld [wBattleMonLevel], a ld a, b - ld [wEnemyMonLevel], a ; wEnemyMonLevel + ld [wEnemyMonLevel], a pop bc ret -Func_3ec92: ; 3ec92 (f:6c92) +; loads either player back pic or old man back pic +; also writes OAM data and loads tile patterns for the 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] ; wd05a dec a ld de, OldManPic ; $7e0a - jr z, .asm_3ec9e + jr z, .next ld a, [wd798] bit 2, a jr z, .RedBack ld de, LeafPicBack - jr .asm_3ec9e + jr .next .RedBack ld de, RedPicBack ; $7e9a -.asm_3ec9e +.next ld a, BANK(RedPicBack) call UncompressSpriteFromDE call LoadBackSpriteUnzoomed @@ -6279,35 +6476,35 @@ Func_3ec92: ; 3ec92 (f:6c92) nop ld hl, wOAMBuffer xor a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b - ld b, $7 - ld e, $a0 -.asm_3ecb2 - ld c, $3 - ld d, $38 -.asm_3ecb6 - ld [hl], d + ld [$FF8B], 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 + ld c, $3 ; 3 tiles per column + ld d, $38 ; Y for the top of each column +.innerLoop ; each loop iteration writes 1 OAM entry in the column + ld [hl], d ; OAM Y inc hl - ld [hl], e - ld a, $8 - add d + ld [hl], e ; OAM X + ld a, $8 ; height of tile + add d ; increase Y by height of tile ld d, a inc hl - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b - ld [hli], a - inc a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld a, [$FF8B] + ld [hli], a ; OAM tile number + inc a ; increment tile number + ld [$FF8B], a inc hl dec c - jr nz, .asm_3ecb6 - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b - add $4 - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b - ld a, $8 - add e + jr nz, .innerLoop + ld a, [$FF8B] + add $4 ; increase tile number by 4 + ld [$FF8B], a + ld a, $8 ; width of tile + add e ; increase X by width of tile ld e, a dec b - jr nz, .asm_3ecb2 + jr nz, .loop nop nop nop @@ -6331,10 +6528,11 @@ Func_3ec92: ; 3ec92 (f:6c92) hlCoord 1, 5 predef_jump Func_3f0c6 -Func_3ed02: ; 3ed02 (f:6d02) - callab Func_39680 - ld hl, Func_396a7 - ld b, BANK(Func_396a7) +; does nothing since no stats are ever selected (barring glitches) +DoubleOrHalveSelectedStats: ; 3ed02 (f:6d02) + callab DoubleSelectedStats + ld hl, HalveSelectedStats + ld b, BANK(HalveSelectedStats) jp Bankswitch ScrollTrainerPicAfterBattle: ; 3ed12 (f:6d12) @@ -6342,24 +6540,26 @@ ScrollTrainerPicAfterBattle: ; 3ed12 (f:6d12) ld b, BANK(_ScrollTrainerPicAfterBattle) jp Bankswitch -Func_3ed1a: ; 3ed1a (f:6d1a) +ApplyBurnAndParalysisPenaltiesToPlayer: ; 3ed1a (f:6d1a) ld a, $1 - jr asm_3ed1f + jr ApplyBurnAndParalysisPenalties -Func_3ed1e: ; 3ed1e (f:6d1e) +ApplyBurnAndParalysisPenaltiesToEnemy: ; 3ed1e (f:6d1e) xor a -asm_3ed1f: ; 3ed1f (f:6d1f) - ld [H_WHOSETURN], a ; $fff3 - call Func_3ed27 - jp Func_3ed64 -Func_3ed27: ; 3ed27 (f:6d27) - ld a, [H_WHOSETURN] ; $fff3 +ApplyBurnAndParalysisPenalties: ; 3ed1f (f:6d1f) + ld [H_WHOSETURN], a + call QuarterSpeedDueToParalysis + jp HalveAttackDueToBurn + +QuarterSpeedDueToParalysis: ; 3ed27 (f:6d27) + ld a, [H_WHOSETURN] and a - jr z, .asm_3ed48 - ld a, [wBattleMonStatus] ; wBattleMonStatus - and $40 - ret z + jr z, .playerTurn +.enemyTurn ; quarter the player's speed + ld a, [wBattleMonStatus] + and 1 << PAR + ret z ; return if player not paralysed ld hl, wBattleMonSpeed + 1 ld a, [hld] ld b, a @@ -6370,15 +6570,15 @@ Func_3ed27: ; 3ed27 (f:6d27) rr b ld [hli], a or b - jr nz, .asm_3ed46 - ld b, $1 -.asm_3ed46 + jr nz, .storePlayerSpeed + ld b, 1 ; give the player a minimum of at least one speed point +.storePlayerSpeed ld [hl], b ret -.asm_3ed48 - ld a, [wEnemyMonStatus] ; wcfe9 - and $40 - ret z +.playerTurn ; quarter the enemy's speed + ld a, [wEnemyMonStatus] + and 1 << PAR + ret z ; return if enemy not paralysed ld hl, wEnemyMonSpeed + 1 ld a, [hld] ld b, a @@ -6389,19 +6589,20 @@ Func_3ed27: ; 3ed27 (f:6d27) rr b ld [hli], a or b - jr nz, .asm_3ed62 - ld b, $1 -.asm_3ed62 + jr nz, .storeEnemySpeed + ld b, 1 ; give the enemy a minimum of at least one speed point +.storeEnemySpeed ld [hl], b ret -Func_3ed64: ; 3ed64 (f:6d64) - ld a, [H_WHOSETURN] ; $fff3 +HalveAttackDueToBurn: ; 3ed64 (f:6d64) + ld a, [H_WHOSETURN] and a - jr z, .asm_3ed81 - ld a, [wBattleMonStatus] ; wBattleMonStatus - and $10 - ret z + jr z, .playerTurn +.enemyTurn ; halve the player's attack + ld a, [wBattleMonStatus] + and 1 << BRN + ret z ; return if player not burnt ld hl, wBattleMonAttack + 1 ld a, [hld] ld b, a @@ -6410,15 +6611,15 @@ Func_3ed64: ; 3ed64 (f:6d64) rr b ld [hli], a or b - jr nz, .asm_3ed7f - ld b, $1 -.asm_3ed7f + jr nz, .storePlayerAttack + ld b, 1 ; give the player a minimum of at least one attack point +.storePlayerAttack ld [hl], b ret -.asm_3ed81 - ld a, [wEnemyMonStatus] ; wcfe9 - and $10 - ret z +.playerTurn ; halve the enemy's attack + ld a, [wEnemyMonStatus] + and 1 << BRN + ret z ; return if enemy not burnt ld hl, wEnemyMonAttack + 1 ld a, [hld] ld b, a @@ -6427,119 +6628,128 @@ Func_3ed64: ; 3ed64 (f:6d64) rr b ld [hli], a or b - jr nz, .asm_3ed97 - ld b, $1 -.asm_3ed97 + jr nz, .storeEnemyAttack + ld b, 1 ; give the enemy a minimum of at least one attack point +.storeEnemyAttack ld [hl], b ret -Func_3ed99: ; 3ed99 (f:6d99) - ld c, $0 -.asm_3ed9b - call Func_3eda5 +CalculateModifiedStats: ; 3ed99 (f:6d99) + ld c, 0 +.loop + call CalculateModifiedStat inc c ld a, c - cp $4 - jr nz, .asm_3ed9b + cp 4 + jr nz, .loop ret -Func_3eda5: ; 3eda5 (f:6da5) +; calculate modified stat for stat c (0 = attack, 1 = defense, 2 = speed, 3 = special) +CalculateModifiedStat: ; 3eda5 (f:6da5) push bc push bc ld a, [wd11e] and a ld a, c ld hl, wBattleMonAttack - ld de, wcd12 - ld bc, wPlayerMonAttackMod ; wcd1a - jr z, .asm_3edc0 + ld de, wPlayerMonUnmodifiedAttack + ld bc, wPlayerMonAttackMod + jr z, .next ld hl, wEnemyMonAttack - ld de, wcd26 - ld bc, wEnemyMonStatMods ; wcd2e -.asm_3edc0 + ld de, wEnemyMonUnmodifiedAttack + ld bc, wEnemyMonStatMods +.next add c ld c, a - jr nc, .asm_3edc5 + jr nc, .noCarry1 inc b -.asm_3edc5 +.noCarry1 ld a, [bc] pop bc ld b, a push bc sla c - ld b, $0 + ld b, 0 add hl, bc ld a, c add e ld e, a - jr nc, .asm_3edd4 + jr nc, .noCarry2 inc d -.asm_3edd4 +.noCarry2 pop bc push hl - ld hl, StatModifierRatios ; $76cb + ld hl, StatModifierRatios dec b sla b ld c, b - ld b, $0 + ld b, 0 add hl, bc xor a - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + ld [H_MULTIPLICAND], a ld a, [de] - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a inc de ld a, [de] - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a ld a, [hli] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_MULTIPLIER], a call Multiply ld a, [hl] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_DIVISOR], a ld b, $4 call Divide pop hl - ld a, [$ff98] - sub $e7 - ld a, [$ff97] - sbc $3 - jp c, Func_3ee0c - ld a, $3 - ld [$ff97], a - ld a, $e7 - ld [$ff98], a - -Func_3ee0c: ; 3ee0c (f:6e0c) - ld a, [$ff97] + ld a, [H_DIVIDEND + 3] + sub 999 % $100 + ld a, [H_DIVIDEND + 2] + sbc 999 / $100 + jp c, .storeNewStatValue +; cap the stat at 999 + ld a, 999 / $100 + ld [H_DIVIDEND + 2], a + ld a, 999 % $100 + ld [H_DIVIDEND + 3], a +.storeNewStatValue + ld a, [H_DIVIDEND + 2] ld [hli], a ld b, a - ld a, [$ff98] + ld a, [H_DIVIDEND + 3] ld [hl], a or b - jr nz, .asm_3ee17 - inc [hl] -.asm_3ee17 + jr nz, .done + inc [hl] ; if the stat is 0, bump it up to 1 +.done pop bc ret -Func_3ee19: ; 3ee19 (f:6e19) - ld a, [W_ISLINKBATTLE] - cp $4 - ret z +ApplyBadgeStatBoosts: ; 3ee19 (f:6e19) + ld a, [wLinkState] + cp LINK_STATE_BATTLING + ret z ; return if link battle ld a, [W_OBTAINEDBADGES] ld b, a ld hl, wBattleMonAttack ld c, $4 -.asm_3ee28 +; the boost is applied for badges whose bit position is even +; the order of boosts matches the order they are laid out in RAM +; Boulder (bit 0) - attack +; Thunder (bit 2) - defense +; Soul (bit 4) - speed +; Volcano (bit 6) - special +.loop srl b - call c, Func_3ee35 + call c, .applyBoostToStat inc hl inc hl srl b dec c - jr nz, .asm_3ee28 + jr nz, .loop ret -Func_3ee35: ; 3ee35 (f:6e35) +; multiply stat at hl by 1.125 +; cap stat at 999 +.applyBoostToStat ld a, [hli] ld d, a ld e, [hl] @@ -6556,88 +6766,92 @@ Func_3ee35: ; 3ee35 (f:6e35) adc d ld [hli], a ld a, [hld] - sub $e7 + sub 999 % $100 ld a, [hl] - sbc $3 + sbc 999 / $100 ret c - ld a, $3 + ld a, 999 / $100 ld [hli], a - ld a, $e7 + ld a, 999 % $100 ld [hld], a ret -Func_3ee58: ; 3ee58 (f:6e58) +LoadHudAndHpBarAndStatusTilePatterns: ; 3ee58 (f:6e58) call LoadHpBarAndStatusTilePatterns -Func_3ee5b: ; 3ee5b (f:6e5b) - ld a, [rLCDC] ; $ff40 - add a - jr c, .asm_3ee7c - ld hl, BattleHudTiles1 ; $6080 +LoadHudTilePatterns: ; 3ee5b (f:6e5b) + ld a, [rLCDC] + add a ; is LCD disabled? + jr c, .lcdEnabled +.lcdDisabled + ld hl, BattleHudTiles1 ld de, vChars2 + $6d0 ld bc, $18 ld a, BANK(BattleHudTiles1) call FarCopyDataDouble - ld hl, BattleHudTiles2 ; $6098 + ld hl, BattleHudTiles2 ld de, vChars2 + $730 ld bc, $30 ld a, BANK(BattleHudTiles2) jp FarCopyDataDouble -.asm_3ee7c - ld de, BattleHudTiles1 ; $6080 +.lcdEnabled + ld de, BattleHudTiles1 ld hl, vChars2 + $6d0 ld bc, (BANK(BattleHudTiles1) << 8) + $03 call CopyVideoDataDouble - ld de, BattleHudTiles2 ; $6098 + ld de, BattleHudTiles2 ld hl, vChars2 + $730 ld bc, (BANK(BattleHudTiles2) << 8) + $06 jp CopyVideoDataDouble -Func_3ee94: ; 3ee94 (f:6e94) - ld hl, TerminatorText_3ee9a ; $6e9a +PrintEmptyString: ; 3ee94 (f:6e94) + ld hl, .emptyString jp PrintText - -TerminatorText_3ee9a: ; 3ee9a (f:6e9a) +.emptyString db "@" BattleRandom: ; Link battles use a shared PRNG. - ld a, [W_ISLINKBATTLE] - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jp nz, Random push hl push bc - ld a, [wccde] + ld a, [wLinkBattleRandomNumberListIndex] ld c, a ld b, 0 - ld hl, wd148 + ld hl, wLinkBattleRandomNumberList add hl, bc inc a - ld [wccde], a + ld [wLinkBattleRandomNumberListIndex], a cp 9 ld a, [hl] pop bc pop hl ret c +; if we picked the last seed, we need to recalculate the nine seeds push hl push bc push af - + +; point to seed 0 so we pick the first number the next time xor a - ld [wccde], a + ld [wLinkBattleRandomNumberListIndex], a - ld hl, wd148 + ld hl, wLinkBattleRandomNumberList ld b, 9 .loop ld a, [hl] ld c, a +; multiply by 5 add a add a add c +; add 1 inc a ld [hli], a dec b @@ -6649,16 +6863,16 @@ BattleRandom: ret -Func_3eed3: ; 3eed3 (f:6ed3) - ld a, [H_WHOSETURN] ; $fff3 +HandleExplodingAnimation: ; 3eed3 (f:6ed3) + ld a, [H_WHOSETURN] and a - ld hl, wEnemyMonType1 ; wcfea (aliases: wEnemyMonType) - ld de, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld a, [W_PLAYERMOVENUM] ; wcfd2 + ld hl, wEnemyMonType1 ; wcfea + ld de, W_ENEMYBATTSTATUS1 + ld a, [W_PLAYERMOVENUM] jr z, .asm_3eeea - ld hl, wBattleMonType1 ; wd019 (aliases: wBattleMonType) - ld de, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + ld hl, wBattleMonType1 ; wd019 + ld de, W_ENEMYBATTSTATUS1 + ld a, [W_ENEMYMOVENUM] .asm_3eeea cp SELFDESTRUCT jr z, .asm_3eef1 @@ -6666,7 +6880,7 @@ Func_3eed3: ; 3eed3 (f:6ed3) ret nz .asm_3eef1 ld a, [de] - bit 6, a ; fly/dig + bit Invulnerable, a ; fly/dig ret nz ld a, [hli] cp GHOST @@ -6674,10 +6888,10 @@ Func_3eed3: ; 3eed3 (f:6ed3) ld a, [hl] cp GHOST ret z - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a ret nz - ld a, MEGA_PUNCH + ld a, 5 ld [wcc5b], a PlayMoveAnimation: ; 3ef07 (f:6f07) @@ -6686,12 +6900,12 @@ PlayMoveAnimation: ; 3ef07 (f:6f07) predef_jump MoveAnimation InitBattle: ; 3ef12 (f:6f12) - ld a, [W_CUROPPONENT] ; wd059 + ld a, [W_CUROPPONENT] and a jr z, asm_3ef23 InitOpponent: ; 3ef18 (f:6f18) - ld a, [W_CUROPPONENT] ; wd059 + ld a, [W_CUROPPONENT] ld [wcf91], a ld [wEnemyMonSpecies2], a jr asm_3ef3d @@ -6700,49 +6914,49 @@ asm_3ef23: ; 3ef23 (f:6f23) bit 1, a jr z, .asm_3ef2f ld a, [hJoyHeld] - bit 1, a + bit 1, a ; B button pressed? ret nz .asm_3ef2f - ld a, [wd13c] + ld a, [wNumberOfNoRandomBattleStepsLeft] and a ret nz - callab Func_13870 + callab TryDoWildEncounter ret nz asm_3ef3d: ; 3ef3d (f:6f3d) - ld a, [wd35d] + ld a, [wMapPalOffset] push af ld hl, wd358 ld a, [hl] push af res 1, [hl] - callab Func_525af + callab InitBattleVariables ld a, [wEnemyMonSpecies2] sub $c8 jp c, InitWildBattle - ld [W_TRAINERCLASS], a ; wd031 + ld [W_TRAINERCLASS], a call GetTrainerInformation callab ReadTrainer - call Func_3ec32 + call DoBattleTransitionAndInitBattleVariables call _LoadTrainerPic xor a ld [wEnemyMonSpecies2], a ld [$ffe1], a dec a - ld [wAICount], a ; wccdf + ld [wAICount], a hlCoord 12, 0 predef Func_3f0c6 ld a, $ff ld [wEnemyMonPartyPos], a ld a, $2 - ld [W_ISINBATTLE], a ; W_ISINBATTLE - jp Func_3efeb + ld [W_ISINBATTLE], a + jp InitBattle_Common InitWildBattle: ; 3ef8b (f:6f8b) ld a, $1 - ld [W_ISINBATTLE], a ; W_ISINBATTLE - call Func_3eb01 - call Func_3ec32 - ld a, [W_CUROPPONENT] ; wd059 + ld [W_ISINBATTLE], a + call LoadEnemyMonData + call DoBattleTransitionAndInitBattleVariables + ld a, [W_CUROPPONENT] cp MAROWAK jr z, .isGhost call IsGhostBattle @@ -6751,7 +6965,7 @@ InitWildBattle: ; 3ef8b (f:6f8b) ld hl, W_MONHSPRITEDIM ld a, $66 ld [hli], a ; write sprite dimensions - ld bc, GhostPic ; $66b5 + ld bc, GhostPic ld a, c ld [hli], a ; write front sprite pointer ld [hl], b @@ -6781,25 +6995,26 @@ InitWildBattle: ; 3ef8b (f:6f8b) call LoadMonFrontSprite ; load mon sprite .spriteLoaded xor a - ld [W_TRAINERCLASS], a ; wd031 + ld [W_TRAINERCLASS], a ld [$ffe1], a hlCoord 12, 0 predef Func_3f0c6 -Func_3efeb: ; 3efeb (f:6feb) +; 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 - call Func_3c04c + call SlidePlayerAndEnemySilhouettesOnScreen xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld hl, TerminatorText_3f04a + ld [H_AUTOBGTRANSFERENABLED], a + ld hl, .emptyString call PrintText call SaveScreenTilesToBuffer1 call ClearScreen ld a, $98 ld [$ffbd], a ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 ld a, $9c ld [$ffbd], a @@ -6811,21 +7026,20 @@ Func_3efeb: ; 3efeb (f:6feb) ld bc, $40a call ClearScreenArea call ClearSprites - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - dec a - call z, Func_3cdec - call Func_3c11e - callab Func_137aa + ld a, [W_ISINBATTLE] + 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 pop af - ld [wd35d], a + ld [wMapPalOffset], a ld a, [wd0d4] - ld [$ffd7], a + ld [hTilesetType], a scf ret - -TerminatorText_3f04a: ; 3f04a (f:704a) +.emptyString db "@" _LoadTrainerPic: ; 3f04b (f:704b) @@ -6834,7 +7048,7 @@ _LoadTrainerPic: ; 3f04b (f:704b) ld e, a ld a, [wd034] ld d, a ; de contains pointer to trainer pic - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE + ld a, [wLinkState] and a ld a, Bank(TrainerPics) ; this is where all the trainer pics are (not counting Red's) jr z, .loadSprite @@ -6858,15 +7072,15 @@ Func_3f073: ; 3f073 (f:7073) ld a, [wPredefRegisters + 1] ld l, a ld a, [$ffe1] - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [H_DOWNARROWBLINKCNT1], a ld b, $4c - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a jr z, .asm_3f0bc add b ld [hl], a call Delay3 - ld bc, $ffd7 + ld bc, -41 add hl, bc ld a, $1 ld [wcd6c], a @@ -6874,7 +7088,7 @@ Func_3f073: ; 3f073 (f:7073) predef Func_79aba ld c, $4 call DelayFrames - ld bc, $ffd7 + ld bc, -41 add hl, bc xor a ld [wcd6c], a @@ -6882,13 +7096,13 @@ Func_3f073: ; 3f073 (f:7073) predef Func_79aba ld c, $5 call DelayFrames - ld bc, $ffd7 + ld bc, -41 jr .asm_3f0bf .asm_3f0bc - ld bc, $ff85 + ld bc, -123 .asm_3f0bf add hl, bc - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b + ld a, [H_DOWNARROWBLINKCNT1] add $31 jr asm_3f0d0 @@ -6963,14 +7177,12 @@ LoadMonBackPic: ld b, a jp CopyVideoData - ds $8 - -Func_3f132: ; 3f132 (f:7132) - call JumpMoveEffect +JumpMoveEffect: ; 3f132 (f:7132) + call _JumpMoveEffect ld b, $1 ret -JumpMoveEffect: ; 3f138 (f:7138) +_JumpMoveEffect: ; 3f138 (f:7138) ld a, [$fff3] ;whose turn? and a ld a, [W_PLAYERMOVEEFFECT] @@ -7019,13 +7231,13 @@ MoveEffectPointerTable: ; 3f150 (f:7150) dw SwitchAndTeleportEffect ; SWITCH_AND_TELEPORT_EFFECT dw TwoToFiveAttacksEffect ; TWO_TO_FIVE_ATTACKS_EFFECT dw TwoToFiveAttacksEffect ; unused effect - dw FlichSideEffect ; FLINCH_SIDE_EFFECT1 + dw FlinchSideEffect ; FLINCH_SIDE_EFFECT1 dw SleepEffect ; SLEEP_EFFECT dw PoisonEffect ; POISON_SIDE_EFFECT2 dw FreezeBurnParalyzeEffect ; BURN_SIDE_EFFECT2 dw FreezeBurnParalyzeEffect ; FREEZE_SIDE_EFFECT2 dw FreezeBurnParalyzeEffect ; PARALYZE_SIDE_EFFECT2 - dw FlichSideEffect ; FLINCH_SIDE_EFFECT2 + dw FlinchSideEffect ; FLINCH_SIDE_EFFECT2 dw OneHitKOEffect ; OHKO_EFFECT dw ChargeEffect ; CHARGE_EFFECT dw $0000 ; SUPER_FANG_EFFECT @@ -7082,45 +7294,47 @@ MoveEffectPointerTable: ; 3f150 (f:7150) dw PoisonFangEffect ; POISON_FANG_EFFECT SleepEffect: ; 3f1fc (f:71fc) - ld de, wEnemyMonStatus ; wcfe9 - ld bc, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 - ld a, [H_WHOSETURN] ; $fff3 + ld de, wEnemyMonStatus + ld bc, W_ENEMYBATTSTATUS2 + ld a, [H_WHOSETURN] and a - jp z, .asm_3f20e - ld de, wBattleMonStatus ; wBattleMonStatus - ld bc, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 + jp z, .sleepEffect + ld de, wBattleMonStatus + ld bc, W_PLAYERBATTSTATUS2 -.asm_3f20e +.sleepEffect ld a, [bc] - bit 5, a ; does the mon need to recharge? (hyper beam) - res 5, a ; mon no longer needs to recharge + bit NeedsToRecharge, a ; does the target need to recharge? (hyper beam) + res NeedsToRecharge, a ; target no longer needs to recharge ld [bc], a - jr nz, .asm_3f231 + jr nz, .setSleepCounter ; if the target had to recharge, all hit tests will be skipped + ; including the event where the target already has another status ld a, [de] ld b, a and $7 - jr z, .asm_3f222 + jr z, .notAlreadySleeping ; can't affect a mon that is already asleep ld hl, AlreadyAsleepText jp PrintText -.asm_3f222 +.notAlreadySleeping ld a, b and a - jr nz, .asm_3f242 + jr nz, .didntAffect ; can't affect a mon that is already statused push de - call MoveHitTest + call MoveHitTest ; apply accuracy tests pop de - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a - jr nz, .asm_3f242 -.asm_3f231 + jr nz, .didntAffect +.setSleepCounter +; set target's sleep counter to a random number between 1 and 7 call BattleRandom and $7 - jr z, .asm_3f231 + jr z, .setSleepCounter ld [de], a call Func_3fb89 ld hl, FellAsleepText jp PrintText -.asm_3f242 +.didntAffect jp PrintDidntAffectText FellAsleepText: ; 3f245 (f:7245) @@ -7132,70 +7346,70 @@ AlreadyAsleepText: ; 3f24a (f:724a) db "@" PoisonEffect: ; 3f24f (f:724f) - ld hl, wEnemyMonStatus ; wcfe9 - ld de, W_PLAYERMOVEEFFECT ; wcfd3 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wEnemyMonStatus + ld de, W_PLAYERMOVEEFFECT + ld a, [H_WHOSETURN] and a - jr z, .asm_3f260 - ld hl, wBattleMonStatus ; wBattleMonStatus - ld de, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT -.asm_3f260 + jr z, .poisonEffect + ld hl, wBattleMonStatus + ld de, W_ENEMYMOVEEFFECT +.poisonEffect call CheckTargetSubstitute - jr nz, .asm_3f2d3 + jr nz, .noEffect ; can't posion a substitute target ld a, [hli] ld b, a and a - jr nz, .asm_3f2d3 + jr nz, .noEffect ; miss if target is already statused ld a, [hli] - cp $3 - jr z, .asm_3f2d3 + cp POISON ; can't posion a poison-type target + jr z, .noEffect ld a, [hld] - cp $3 - jr z, .asm_3f2d3 + cp POISON ; can't posion a poison-type target + jr z, .noEffect ld a, [de] cp POISON_SIDE_EFFECT1 ld b, $34 ; ~20% chance of poisoning - jr z, .asm_3f290 + jr z, .sideEffectTest cp POISON_SIDE_EFFECT2 ld b, $67 ; ~40% chance of poisoning - jr z, .asm_3f290 + jr z, .sideEffectTest push hl push de - call MoveHitTest + call MoveHitTest ; apply accuracy tests pop de pop hl - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a - jr nz, .asm_3f2d7 - jr .asm_3f295 -.asm_3f290 + jr nz, .didntAffect + jr .inflictPoison +.sideEffectTest call BattleRandom - cp b + cp b ; was side effect successful? ret nc -.asm_3f295 +.inflictPoison dec hl - set 3, [hl] + set 3, [hl] ; mon is now poisoned push de dec de - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld b, $c7 - ld hl, W_PLAYERBATTSTATUS3 ; W_PLAYERBATTSTATUS3 + ld b, ANIM_C7 + ld hl, W_PLAYERBATTSTATUS3 ld a, [de] - ld de, W_PLAYERTOXICCOUNTER ; wd06c - jr nz, .asm_3f2b0 - ld b, $a9 - ld hl, W_ENEMYBATTSTATUS3 ; W_ENEMYBATTSTATUS3 - ld de, W_ENEMYTOXICCOUNTER ; wd071 -.asm_3f2b0 - cp $5c - jr nz, .asm_3f2bd - set 0, [hl] + ld de, W_PLAYERTOXICCOUNTER + jr nz, .ok + ld b, ANIM_A9 + ld hl, W_ENEMYBATTSTATUS3 + ld de, W_ENEMYTOXICCOUNTER +.ok + cp TOXIC + jr nz, .normalPoison ; done if move is not Toxic + set BadlyPoisoned, [hl] ; else set Toxic battstatus xor a ld [de], a ld hl, BadlyPoisonedText jr .asm_3f2c0 -.asm_3f2bd +.normalPoison ld hl, PoisonedText .asm_3f2c0 pop de @@ -7208,11 +7422,11 @@ PoisonEffect: ; 3f24f (f:724f) .asm_3f2cd call Func_3fb89 jp PrintText -.asm_3f2d3 +.noEffect ld a, [de] cp POISON_EFFECT ret nz -.asm_3f2d7 +.didntAffect ld c, $32 call DelayFrames jp PrintDidntAffectText @@ -7231,46 +7445,45 @@ DrainHPEffect: ; 3f2e9 (f:72e9) jp Bankswitch ExplodeEffect: ; 3f2f1 (f:72f1) - ld hl, wBattleMonHP ; wd015 - ld de, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wBattleMonHP + ld de, W_PLAYERBATTSTATUS2 + ld a, [H_WHOSETURN] and a - jr z, .asm_3f302 - ld hl, wEnemyMonHP ; wEnemyMonHP - ld de, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 -.asm_3f302 + jr z, .faintUser + ld hl, wEnemyMonHP + ld de, W_ENEMYBATTSTATUS2 +.faintUser xor a ld [hli], a ; set the mon's HP to 0 ld [hli], a inc hl ld [hl], a ; set mon's status to 0 ld a, [de] - res 7, a ; clear mon's leech seed status + res Seeded, a ; clear mon's leech seed status ld [de], a ret FreezeBurnParalyzeEffect: ; 3f30c (f:730c) xor a ld [wcc5b], a - call CheckTargetSubstitute ;test bit 4 of d063/d068 flags [target has substitute flag] - ret nz ;return if they have a substitute, can't effect them - ld a, [$fff3] ;whose turn? + call CheckTargetSubstitute ; test bit 4 of d063/d068 flags [target has substitute flag] + ret nz ; return if they have a substitute, can't effect them + ld a, [$fff3] and a jp nz, opponentAttacker ld a, [wEnemyMonStatus] and a - jp nz, CheckDefrost - ;opponent has no existing status + jp nz, CheckDefrost ; can't inflict status if opponent is already statused ld a, [W_PLAYERMOVETYPE] ld b, a ld a, [wEnemyMonType1] - cp b - ret z ;return if they match [can't freeze an ice type etc.] + cp b ; do target type 1 and move type match? + ret z ; return if they match (an ice move can't freeze an ice-type, body slam can't paralyze a normal-type, etc.) ld a, [wEnemyMonType2] - cp b - ret z ;return.. + cp b ; do target type 2 and move type match? + ret z ; return if they match ld a, [W_PLAYERMOVEEFFECT] - cp a, 7 ;10% status effects are 04, 05, 06 so 07 will set carry for those + cp a, PARALYZE_SIDE_EFFECT1 + 1 ; 10% status effects are 04, 05, 06 so 07 will set carry for those ld b, $1a ;[1A-1]/100 or [26-1]/256 = 9.8%~ chance jr c, .next1 ;branch ahead if this is a 10% chance effect.. cp a, $5B ;Fang effects are 57, 58, 59 and Volt Tackle is 5A so 5B will set carry for those @@ -7279,13 +7492,12 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c) ld b, $4d ;..or use [4D-1]/100 or [76-1]/256 = 29.7%~ chance sub a, $1e ;subtract $1E to map to equivalent 10% chance effects .next1 - push af ;push effect... - call BattleRandom ;get random 8bit value for probability test - cp b ;success? - pop bc ;...pop effect into C - ret nc ;do nothing if random value is >= 1A or 4D [no status applied] - ;the test passed - ld a, b ;what type of effect is this? + push af + call BattleRandom ; get random 8bit value for probability test + cp b + pop bc + ret nc ; do nothing if random value is >= 1A or 4D [no status applied] + ld a, b ; what type of effect is this? cp a, BURN_SIDE_EFFECT1 jr z, .burn cp a, FIRE_FANG_EFFECT @@ -7294,30 +7506,31 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c) jr z, .freeze cp a, ICE_FANG_EFFECT jr z, .freeze +; .paralyze ld a, 1 << PAR ld [wEnemyMonStatus], a - call Func_3ed27 ;quarter speed of affected monster - ld a, $a9 - call Func_3fbb9 ;animation - jp PrintMayNotAttackText ;print paralysis text + call QuarterSpeedDueToParalysis ; quarter speed of affected mon + ld a, ANIM_A9 + call PlayBattleAnimation + jp PrintMayNotAttackText ; print paralysis text .burn ld a, 1 << BRN ld [wEnemyMonStatus], a - call Func_3ed64 - ld a, $a9 - call Func_3fbb9 ;animation + call HalveAttackDueToBurn ; halve attack of affected mon + ld a, ANIM_A9 + call PlayBattleAnimation ld hl, BurnedText jp PrintText .freeze - call Func_3f9cf ;resets bit 5 of the D063/D068 flags + call ClearHyperBeam ; resets hyper beam (recharge) condition from target ld a, 1 << FRZ ld [wEnemyMonStatus], a - ld a, $a9 - call Func_3fbb9 ;animation + ld a, ANIM_A9 + call PlayBattleAnimation ld hl, FrozenText jp PrintText opponentAttacker: ; 3f382 (f:7382) - ld a, [wBattleMonStatus] ;this appears to the same as above with addresses swapped for opponent + ld a, [wBattleMonStatus] ; mostly same as above with addresses swapped for opponent and a jp nz, CheckDefrost ld a, [W_ENEMYMOVETYPE] @@ -7329,7 +7542,7 @@ opponentAttacker: ; 3f382 (f:7382) cp b ret z ld a, [W_ENEMYMOVEEFFECT] - cp a, 7 + cp a, PARALYZE_SIDE_EFFECT1 + 1 ld b, $1a jr c, .next1 ld b, $4d @@ -7351,15 +7564,16 @@ opponentAttacker: ; 3f382 (f:7382) jr z, .freeze ld a, 1 << PAR ld [wBattleMonStatus], a - call Func_3ed27 + call QuarterSpeedDueToParalysis jp PrintMayNotAttackText .burn ld a, 1 << BRN ld [wBattleMonStatus], a - call Func_3ed64 + call HalveAttackDueToBurn ld hl, BurnedText jp PrintText .freeze +; hyper beam bits aren't reseted for opponent's side ld a, 1 << FRZ ld [wBattleMonStatus], a ld hl, FrozenText @@ -7374,28 +7588,27 @@ FrozenText: ; 3f3dd (f:73dd) db "@" CheckDefrost: ; 3f3e2 (f:73e2) - and a, 1 << FRZ ;are they frozen? - ret z ;return if so - ;not frozen - ld a, [$fff3] ;whose turn? +; 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? + ret z ; return if so + ld a, [$fff3] and a jr nz, .opponent ;player [attacker] ld a, [W_PLAYERMOVETYPE] sub a, FIRE - ret nz ;return if it isn't fire - ;type is fire - ld [wEnemyMonStatus], a ;set opponent status to 00 ["defrost" a frozen monster] + ret nz ; return if type of move used isn't fire + ld [wEnemyMonStatus], a ; set opponent status to 00 ["defrost" a frozen monster] ld hl, wEnemyMon1Status ld a, [wEnemyMonPartyPos] ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes xor a - ld [hl], a ;clear status in roster + ld [hl], a ; clear status in roster ld hl, FireDefrostedText jr .common .opponent - ld a, [W_ENEMYMOVETYPE] ;same as above with addresses swapped + ld a, [W_ENEMYMOVETYPE] ; same as above with addresses swapped sub a, FIRE ret nz ld [wBattleMonStatus], a @@ -7414,71 +7627,72 @@ FireDefrostedText: ; 3f423 (f:7423) db "@" StatModifierUpEffect: ; 3f428 (f:7428) - ld hl, wPlayerMonStatMods ; wcd1a - ld de, W_PLAYERMOVEEFFECT ; wcfd3 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wPlayerMonStatMods + ld de, W_PLAYERMOVEEFFECT + ld a, [H_WHOSETURN] and a - jr z, .asm_3f439 - ld hl, wEnemyMonStatMods ; wcd2e - ld de, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT -.asm_3f439 + jr z, .statModifierUpEffect + ld hl, wEnemyMonStatMods + ld de, W_ENEMYMOVEEFFECT +.statModifierUpEffect ld a, [de] - sub $a - cp $8 - jr c, .asm_3f442 - sub $28 -.asm_3f442 + sub ATTACK_UP1_EFFECT + cp EVASION_UP1_EFFECT + $3 - ATTACK_UP1_EFFECT ; covers all +1 effects + jr c, .incrementStatMod + sub ATTACK_UP2_EFFECT - ATTACK_UP1_EFFECT ; map +2 effects to equivalent +1 effect +.incrementStatMod ld c, a ld b, $0 add hl, bc ld b, [hl] - inc b + inc b ; increment corresponding stat mod ld a, $d - cp b - jp c, Func_3f522 + cp b ; can't raise stat past +6 ($d or 13) + jp c, PrintNothingHappenedText ld a, [de] - cp $12 - jr c, .asm_3f45a - inc b + cp ATTACK_UP1_EFFECT + $8 ; is it a +2 effect? + jr c, .ok + inc b ; if so, increment stat mod again ld a, $d - cp b - jr nc, .asm_3f45a + cp b ; unless it's already +6 + jr nc, .ok ld b, a -.asm_3f45a +.ok ld [hl], b ld a, c cp $4 - jr nc, asm_3f4ca + jr nc, UpdateStatDone ; jump if mod affected is evasion/accuracy push hl ld hl, wBattleMonAttack + 1 - ld de, wcd12 - ld a, [H_WHOSETURN] ; $fff3 + ld de, wPlayerMonUnmodifiedAttack + ld a, [H_WHOSETURN] and a - jr z, .asm_3f472 + jr z, .pointToStats ld hl, wEnemyMonAttack + 1 - ld de, wcd26 -.asm_3f472 + ld de, wEnemyMonUnmodifiedAttack +.pointToStats push bc sla c ld b, $0 - add hl, bc + add hl, bc ; hl = modified stat ld a, c add e ld e, a - jr nc, .asm_3f47e - inc d -.asm_3f47e + jr nc, .checkIf999 + inc d ; de = unmodified (original) stat +.checkIf999 pop bc ld a, [hld] - sub $e7 - jr nz, .asm_3f48a + sub 999 % $100 ; check if stat is already 999 + jr nz, .recalculateStat ld a, [hl] - sbc $3 + sbc 999 / $100 jp z, Func_3f520 -.asm_3f48a +.recalculateStat ; recalculate affected stat + ; paralysis and burn penalties, as well as badge boosts are ignored push hl push bc - ld hl, StatModifierRatios ; $76cb + ld hl, StatModifierRatios dec b sla b ld c, b @@ -7486,66 +7700,67 @@ StatModifierUpEffect: ; 3f428 (f:7428) add hl, bc pop bc xor a - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + ld [H_MULTIPLICAND], a ld a, [de] - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a inc de ld a, [de] - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a ld a, [hli] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_MULTIPLIER], a call Multiply ld a, [hl] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_DIVISOR], a ld b, $4 call Divide pop hl - ld a, [$ff98] - sub $e7 - ld a, [$ff97] - sbc $3 - jp c, Func_3f4c3 +; cap at 999 + ld a, [H_PRODUCT + 3] + sub 999 % $100 + ld a, [H_PRODUCT + 2] + sbc 999 / $100 + jp c, UpdateStat ld a, 999 / $100 - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a ld a, 999 % $100 - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a -Func_3f4c3: ; 3f4c3 (f:74c3) - ld a, [$ff97] +UpdateStat: ; 3f4c3 (f:74c3) + ld a, [H_PRODUCT + 2] ld [hli], a - ld a, [$ff98] + ld a, [H_PRODUCT + 3] ld [hl], a pop hl -asm_3f4ca: ; 3f4ca (f:74ca) +UpdateStatDone: ; 3f4ca (f:74ca) ld b, c inc b call Func_3f688 - ld hl, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 - ld de, W_PLAYERMOVENUM ; wcfd2 + ld hl, W_PLAYERBATTSTATUS2 + ld de, W_PLAYERMOVENUM ld bc, wccf7 - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a jr z, .asm_3f4e6 - ld hl, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 - ld de, W_ENEMYMOVENUM ; W_ENEMYMOVENUM + ld hl, W_ENEMYBATTSTATUS2 + ld de, W_ENEMYMOVENUM ld bc, wccf3 .asm_3f4e6 ld a, [de] cp MINIMIZE jr nz, .asm_3f4f9 - bit 4, [hl] + bit HasSubstituteUp, [hl] ; substitute push af push bc ld hl, Func_79747 ld b, BANK(Func_79747) push de - call nz, Bankswitch + call nz, Bankswitch ; play Minimize animation unless there's Substitute involved pop de .asm_3f4f9 - call Func_3fba8 + call PlayCurrentMoveAnimation ld a, [de] cp MINIMIZE - jr nz, .asm_3f50e + jr nz, .applyBadgeBoostsAndStatusPenalties pop bc ld a, $1 ld [bc], a @@ -7553,20 +7768,23 @@ asm_3f4ca: ; 3f4ca (f:74ca) ld b, BANK(Func_79771) pop af call nz, Bankswitch -.asm_3f50e - ld a, [H_WHOSETURN] ; $fff3 +.applyBadgeBoostsAndStatusPenalties + ld a, [H_WHOSETURN] and a - call z, Func_3ee19 + call z, ApplyBadgeStatBoosts ; whenever the player uses a stat-up move, badge boosts get reapplied again to every stat, + ; even to those not affected by the stat-up move (will be boosted further) ld hl, MonsStatsRoseText call PrintText - call Func_3ed27 - jp Func_3ed64 + +; these shouldn't be here + 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 Func_3f520: ; 3f520 (f:7520) pop hl dec [hl] -Func_3f522: ; 3f522 (f:7522) +PrintNothingHappenedText: ; 3f522 (f:7522) ld hl, NothingHappenedText jp PrintText @@ -7574,11 +7792,11 @@ MonsStatsRoseText: ; 3f528 (f:7528) TX_FAR _MonsStatsRoseText db $08 ; asm ld hl, GreatlyRoseText - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVEEFFECT] ; wcfd3 + ld a, [W_PLAYERMOVEEFFECT] jr z, .asm_3f53b - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] .asm_3f53b cp ATTACK_DOWN1_EFFECT ret nc @@ -7594,103 +7812,105 @@ RoseText: ; 3f547 (f:7547) db "@" StatModifierDownEffect: ; 3f54c (f:754c) - ld hl, wEnemyMonStatMods ; wcd2e - ld de, W_PLAYERMOVEEFFECT ; wcfd3 - ld bc, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wEnemyMonStatMods + ld de, W_PLAYERMOVEEFFECT + ld bc, W_ENEMYBATTSTATUS1 + ld a, [H_WHOSETURN] and a - jr z, .asm_3f572 - ld hl, wPlayerMonStatMods ; wcd1a - ld de, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT - ld bc, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 - jr z, .asm_3f572 + jr z, .statModifierDownEffect + ld hl, wPlayerMonStatMods + ld de, W_ENEMYMOVEEFFECT + ld bc, W_PLAYERBATTSTATUS1 + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jr z, .statModifierDownEffect call BattleRandom - cp $40 - jp c, Func_3f65a -.asm_3f572 - call CheckTargetSubstitute - jp nz, Func_3f65a + cp $40 ; 1/4 chance to miss by in regular battle + jp c, MoveMissed +.statModifierDownEffect + call CheckTargetSubstitute ; can't hit through substitute + jp nz, MoveMissed ld a, [de] cp ATTACK_DOWN_SIDE_EFFECT - jr c, .asm_3f58a + jr c, .nonSideEffect call BattleRandom - cp SPLASH_EFFECT - jp nc, Func_3f650 + cp $55 ; 85/256 chance for side effects + jp nc, CantLowerAnymore ld a, [de] - sub ATTACK_DOWN_SIDE_EFFECT - jr .asm_3f5a9 -.asm_3f58a + sub ATTACK_DOWN_SIDE_EFFECT ; map each stat to 0-3 + jr .decrementStatMod +.nonSideEffect ; non-side effects only push hl push de push bc - call MoveHitTest + call MoveHitTest ; apply accuracy tests pop bc pop de pop hl - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a - jp nz, Func_3f65a + jp nz, MoveMissed ld a, [bc] - bit 6, a - jp nz, Func_3f65a + bit Invulnerable, a ; fly/dig + jp nz, MoveMissed ld a, [de] - sub $12 - cp $8 - jr c, .asm_3f5a9 - sub $28 -.asm_3f5a9 + sub ATTACK_DOWN1_EFFECT + cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers al -1 effects + jr c, .decrementStatMod + sub ATTACK_DOWN2_EFFECT - ATTACK_DOWN1_EFFECT ; map -2 effects to corresponding -1 effect +.decrementStatMod ld c, a ld b, $0 add hl, bc ld b, [hl] - dec b - jp z, Func_3f650 + dec b ; dec corresponding stat mod + jp z, CantLowerAnymore ; if stat mod is 1 (-6), can't lower anymore ld a, [de] - cp $24 - jr c, .asm_3f5bf - cp $44 - jr nc, .asm_3f5bf - dec b - jr nz, .asm_3f5bf - inc b -.asm_3f5bf - ld [hl], b + cp ATTACK_DOWN2_EFFECT - $16 ; $24 + jr c, .ok + cp EVASION_DOWN2_EFFECT + $5 ; $44 + jr nc, .ok + dec b ; stat down 2 effects only (dec mod again) + jr nz, .ok + inc b ; increment mod to 1 (-6) if it would become 0 (-7) +.ok + ld [hl], b ; save modified mod ld a, c cp $4 - jr nc, asm_3f62c + jr nc, UpdateLoweredStatDone ; jump for evasion/accuracy push hl push de ld hl, wEnemyMonAttack + 1 - ld de, wcd26 - ld a, [H_WHOSETURN] ; $fff3 + ld de, wEnemyMonUnmodifiedAttack + ld a, [H_WHOSETURN] and a - jr z, .asm_3f5d8 + jr z, .pointToStat ld hl, wBattleMonAttack + 1 - ld de, wcd12 -.asm_3f5d8 + ld de, wPlayerMonUnmodifiedAttack +.pointToStat push bc sla c ld b, $0 - add hl, bc + add hl, bc ; hl = modified stat ld a, c add e ld e, a jr nc, .asm_3f5e4 - inc d + inc d ; de = unmodified stat .asm_3f5e4 pop bc ld a, [hld] - sub $1 - jr nz, .asm_3f5ef + sub $1 ; can't lower stat below 1 (-6) + jr nz, .recalculateStat ld a, [hl] and a jp z, Func_3f64d -.asm_3f5ef +.recalculateStat +; recalculate affected stat +; paralysis and burn penalties, as well as badge boosts are ignored push hl push bc - ld hl, StatModifierRatios ; $76cb + ld hl, StatModifierRatios dec b sla b ld c, b @@ -7698,37 +7918,37 @@ StatModifierDownEffect: ; 3f54c (f:754c) add hl, bc pop bc xor a - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + ld [H_MULTIPLICAND], a ld a, [de] - ld [$ff97], a + ld [H_MULTIPLICAND + 1], a inc de ld a, [de] - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a ld a, [hli] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_MULTIPLIER], a call Multiply ld a, [hl] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_DIVISOR], a ld b, $4 call Divide pop hl - ld a, [$ff98] + ld a, [H_PRODUCT + 3] ld b, a - ld a, [$ff97] + ld a, [H_PRODUCT + 2] or b - jp nz, Func_3f624 - ld [$ff97], a + jp nz, UpdateLoweredStat + ld [H_MULTIPLICAND + 1], a ld a, $1 - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a -Func_3f624: ; 3f624 (f:7624) - ld a, [$ff97] +UpdateLoweredStat: ; 3f624 (f:7624) + ld a, [H_PRODUCT + 2] ld [hli], a - ld a, [$ff98] + ld a, [H_PRODUCT + 3] ld [hl], a pop de pop hl -asm_3f62c: ; 3f62c (f:762c) +UpdateLoweredStatDone: ; 3f62c (f:762c) ld b, c inc b push de @@ -7736,30 +7956,35 @@ asm_3f62c: ; 3f62c (f:762c) pop de ld a, [de] cp $44 - jr nc, .asm_3f63b + jr nc, .ApplyBadgeBoostsAndStatusPenalties call Func_3fb89 -.asm_3f63b - ld a, [H_WHOSETURN] ; $fff3 +.ApplyBadgeBoostsAndStatusPenalties + ld a, [H_WHOSETURN] and a - call nz, Func_3ee19 + call nz, ApplyBadgeStatBoosts ; whenever the player uses a stat-down move, badge boosts get reapplied again to every stat, + ; even to those not affected by the stat-up move (will be boosted further) ld hl, MonsStatsFellText call PrintText - call Func_3ed27 - jp Func_3ed64 + +; These where probably added given that a stat-down move affecting speed or attack will override +; the stat penalties from paralysis and burn respectively. +; But they are always called regardless of the stat affected by the stat-down move. + call QuarterSpeedDueToParalysis + jp HalveAttackDueToBurn Func_3f64d: ; 3f64d (f:764d) pop de pop hl inc [hl] -Func_3f650: ; 3f650 (f:7650) +CantLowerAnymore: ; 3f650 (f:7650) ld a, [de] cp ATTACK_DOWN_SIDE_EFFECT ret nc ld hl, NothingHappenedText jp PrintText -Func_3f65a: ; 3f65a (f:765a) +MoveMissed: ; 3f65a (f:765a) ld a, [de] cp $44 ret nc @@ -7769,11 +7994,11 @@ MonsStatsFellText: ; 3f661 (f:7661) TX_FAR _MonsStatsFellText db $08 ; asm ld hl, FellText - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVEEFFECT] ; wcfd3 + ld a, [W_PLAYERMOVEEFFECT] jr z, .asm_3f674 - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT + ld a, [W_ENEMYMOVEEFFECT] .asm_3f674 cp $1a ret c @@ -7832,16 +8057,16 @@ StatModifierRatios: ; 3f6cb (f:76cb) BideEffect: ; 3f6e5 (f:76e5) ld hl, W_PLAYERBATTSTATUS1 - ld de, W_NUMHITS - ld bc, wd06a + ld de, wPlayerBideAccumulatedDamage + ld bc, wPlayerNumAttacksLeft ld a, [H_WHOSETURN] and a - jr z, .asm_3f6fc + jr z, .bideEffect ld hl, W_ENEMYBATTSTATUS1 - ld de, wcd05 - ld bc, wd06f -.asm_3f6fc - set 0, [hl] ; mon is now using bide + ld de, wEnemyBideAccumulatedDamage + ld bc, wEnemyNumAttacksLeft +.bideEffect + set StoringEnergy, [hl] ; mon is now using bide xor a ld [de], a inc de @@ -7852,40 +8077,40 @@ BideEffect: ; 3f6e5 (f:76e5) and $1 inc a inc a - ld [bc], a + ld [bc], a ; set Bide counter to 2 or 3 at random ld a, [H_WHOSETURN] - add $ae + add XSTATITEM_ANIM jp Func_3fb96 ThrashPetalDanceEffect: ; 3f717 (f:7717) - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld de, wd06a - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS1 + ld de, wPlayerNumAttacksLeft + ld a, [H_WHOSETURN] and a - jr z, .asm_3f728 - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld de, wd06f -.asm_3f728 - set 1, [hl] ; mon is now using thrash/petal dance + jr z, .thrashPetalDanceEffect + ld hl, W_ENEMYBATTSTATUS1 + ld de, wEnemyNumAttacksLeft +.thrashPetalDanceEffect + set ThrashingAbout, [hl] ; mon is now using thrash/petal dance call BattleRandom and $1 inc a inc a - ld [de], a - ld a, [H_WHOSETURN] ; $fff3 - add $b0 + ld [de], a ; set thrash/petal dance counter to 2 or 3 at random + ld a, [H_WHOSETURN] + add ANIM_B0 jp Func_3fb96 SwitchAndTeleportEffect: ; 3f739 (f:7739) - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a jr nz, .asm_3f791 - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] dec a jr nz, .asm_3f77e - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld a, [W_CURENEMYLVL] ld b, a - ld a, [wBattleMonLevel] ; wBattleMonLevel + ld a, [wBattleMonLevel] cp b jr nc, .asm_3f76e add b @@ -7901,7 +8126,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739) jr nc, .asm_3f76e ld c, $32 call DelayFrames - ld a, [W_PLAYERMOVENUM] ; wcfd2 + ld a, [W_PLAYERMOVENUM] cp TELEPORT jp nz, PrintDidntAffectText jp PrintButItFailedText_ @@ -7910,24 +8135,24 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739) xor a ld [wcc5b], a inc a - ld [wd078], a - ld a, [W_PLAYERMOVENUM] ; wcfd2 + ld [wEscapedFromBattle], a + ld a, [W_PLAYERMOVENUM] jr .asm_3f7e4 .asm_3f77e ld c, $32 call DelayFrames ld hl, IsUnaffectedText - ld a, [W_PLAYERMOVENUM] ; wcfd2 + ld a, [W_PLAYERMOVENUM] cp TELEPORT jp nz, PrintText jp PrintButItFailedText_ .asm_3f791 - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] dec a jr nz, .asm_3f7d1 - ld a, [wBattleMonLevel] ; wBattleMonLevel + ld a, [wBattleMonLevel] ld b, a - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld a, [W_CURENEMYLVL] cp b jr nc, .asm_3f7c1 add b @@ -7943,7 +8168,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739) jr nc, .asm_3f7c1 ld c, $32 call DelayFrames - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + ld a, [W_ENEMYMOVENUM] cp TELEPORT jp nz, PrintDidntAffectText jp PrintButItFailedText_ @@ -7952,30 +8177,30 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739) xor a ld [wcc5b], a inc a - ld [wd078], a - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + ld [wEscapedFromBattle], a + ld a, [W_ENEMYMOVENUM] jr .asm_3f7e4 .asm_3f7d1 ld c, $32 call DelayFrames ld hl, IsUnaffectedText - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + ld a, [W_ENEMYMOVENUM] cp TELEPORT jp nz, PrintText jp Func_3fb4e .asm_3f7e4 push af - call Func_3fbb9 + call PlayBattleAnimation ld c, $14 call DelayFrames pop af - ld hl, RanFromBattleText ; $7802 + ld hl, RanFromBattleText cp TELEPORT jr z, .asm_3f7ff - ld hl, RanAwayScaredText ; $7807 + ld hl, RanAwayScaredText cp ROAR jr z, .asm_3f7ff - ld hl, WasBlownAwayText ; $780c + ld hl, WasBlownAwayText .asm_3f7ff jp PrintText @@ -7992,31 +8217,32 @@ WasBlownAwayText: ; 3f80c (f:780c) db "@" TwoToFiveAttacksEffect: ; 3f811 (f:7811) - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld de, wd06a - ld bc, W_NUMHITS ; wd074 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS1 + ld de, wPlayerNumAttacksLeft + ld bc, wPlayerNumHits + ld a, [H_WHOSETURN] and a - jr z, .asm_3f828 - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld de, wd06f - ld bc, wcd05 -.asm_3f828 - bit 2, [hl] ; is mon attacking multiple times? + jr z, .twoToFiveAttacksEffect + ld hl, W_ENEMYBATTSTATUS1 + ld de, wEnemyNumAttacksLeft + ld bc, wEnemyNumHits +.twoToFiveAttacksEffect + bit AttackingMultipleTimes, [hl] ; is mon attacking multiple times? ret nz - set 2, [hl] ; mon is now attacking multiple times - ld hl, W_PLAYERMOVEEFFECT ; wcfd3 - ld a, [H_WHOSETURN] ; $fff3 + set AttackingMultipleTimes, [hl] ; mon is now attacking multiple times + ld hl, W_PLAYERMOVEEFFECT + ld a, [H_WHOSETURN] and a - jr z, .asm_3f838 - ld hl, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT -.asm_3f838 + jr z, .setNumberOfHits + ld hl, W_ENEMYMOVEEFFECT +.setNumberOfHits ld a, [hl] cp TWINEEDLE_EFFECT - jr z, .asm_3f856 + jr z, .twineedle cp ATTACK_TWICE_EFFECT - ld a, $2 - jr z, .asm_3f853 + ld a, $2 ; number of hits it's always 2 for ATTACK_TWICE_EFFECT + jr z, .saveNumberOfHits +; for TWO_TO_FIVE_ATTACKS_EFFECT 3/8 chance for 2 and 3 hits, and 1/8 chance for 4 and 5 hits call BattleRandom and $3 cp $2 @@ -8026,37 +8252,37 @@ TwoToFiveAttacksEffect: ; 3f811 (f:7811) .asm_3f851 inc a inc a -.asm_3f853 +.saveNumberOfHits ld [de], a ld [bc], a ret -.asm_3f856 - ld a, $2 - ld [hl], a - jr .asm_3f853 +.twineedle + ld a, POISON_SIDE_EFFECT1 + ld [hl], a ; set Twineedle's effect to poison effect + jr .saveNumberOfHits -FlichSideEffect: ; 3f85b (f:785b) +FlinchSideEffect: ; 3f85b (f:785b) call CheckTargetSubstitute ret nz - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld de, W_PLAYERMOVEEFFECT ; wcfd3 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_ENEMYBATTSTATUS1 + ld de, W_PLAYERMOVEEFFECT + ld a, [H_WHOSETURN] and a - jr z, .asm_3f870 - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld de, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT -.asm_3f870 + jr z, .flinchSideEffect + ld hl, W_PLAYERBATTSTATUS1 + ld de, W_ENEMYMOVEEFFECT +.flinchSideEffect ld a, [de] cp FLINCH_SIDE_EFFECT1 ld b, $1a ; ~10% chance of flinch - jr z, .asm_3f879 + jr z, .gotEffectChance ld b, $4d ; ~30% chance of flinch -.asm_3f879 +.gotEffectChance call BattleRandom cp b ret nc - set 3, [hl] ; set mon's status to flinching - call Func_3f9cf + set Flinched, [hl] ; set mon's status to flinching + call ClearHyperBeam ret OneHitKOEffect: ; 3f884 (f:7884) @@ -8065,60 +8291,60 @@ OneHitKOEffect: ; 3f884 (f:7884) jp Bankswitch ChargeEffect: ; 3f88c (f:788c) - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld de, W_PLAYERMOVEEFFECT ; wcfd3 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS1 + ld de, W_PLAYERMOVEEFFECT + ld a, [H_WHOSETURN] and a - ld b, $ae - jr z, .asm_3f8a1 - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld de, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT - ld b, $af -.asm_3f8a1 - set 4, [hl] + ld b, XSTATITEM_ANIM + jr z, .chargeEffect + ld hl, W_ENEMYBATTSTATUS1 + ld de, W_ENEMYMOVEEFFECT + ld b, ANIM_AF +.chargeEffect + set ChargingUp, [hl] ld a, [de] dec de ; de contains enemy or player MOVENUM cp FLY_EFFECT - jr nz, .asm_3f8ad - set 6, [hl] ; mon is now invulnerable to typical attacks (fly/dig) - ld b, $64 -.asm_3f8ad + jr nz, .notFly + set Invulnerable, [hl] ; mon is now invulnerable to typical attacks (fly/dig) + ld b, TELEPORT ; load Teleport's animation +.notFly ld a, [de] cp DIG - jr nz, .asm_3f8b6 - set 6, [hl] ; mon is now invulnerable to typical attacks (fly/dig) - ld b, $c0 -.asm_3f8b6 + jr nz, .notDigOrFly + set Invulnerable, [hl] ; mon is now invulnerable to typical attacks (fly/dig) + ld b, ANIM_C0 +.notDigOrFly xor a ld [wcc5b], a ld a, b - call Func_3fbb9 + call PlayBattleAnimation ld a, [de] - ld [wWhichTrade], a ; wWhichTrade - ld hl, ChargeMoveEffectText ; $78c8 + ld [wWhichTrade], a + ld hl, ChargeMoveEffectText jp PrintText ChargeMoveEffectText: ; 3f8c8 (f:78c8) TX_FAR _ChargeMoveEffectText db $08 ; asm - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wWhichTrade] cp RAZOR_WIND - ld hl, MadeWhirlwindText ; $78f9 + ld hl, MadeWhirlwindText jr z, .asm_3f8f8 cp SOLARBEAM - ld hl, TookInSunlightText ; $78fe + ld hl, TookInSunlightText jr z, .asm_3f8f8 cp SKULL_BASH - ld hl, LoweredItsHeadText ; $7903 + ld hl, LoweredItsHeadText jr z, .asm_3f8f8 cp SKY_ATTACK - ld hl, SkyAttackGlowingText ; $7908 + ld hl, SkyAttackGlowingText jr z, .asm_3f8f8 cp FLY - ld hl, FlewUpHighText ; $790d + ld hl, FlewUpHighText jr z, .asm_3f8f8 cp DIG - ld hl, DugAHoleText ; $7912 + ld hl, DugAHoleText .asm_3f8f8 ret @@ -8147,25 +8373,26 @@ DugAHoleText: ; 3f912 (f:7912) db "@" TrappingEffect: ; 3f917 (f:7917) - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld de, wd06a - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS1 + ld de, wPlayerNumAttacksLeft + ld a, [H_WHOSETURN] and a - jr z, .asm_3f928 - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld de, wd06f -.asm_3f928 - bit 5, [hl] + jr z, .trappingEffect + ld hl, W_ENEMYBATTSTATUS1 + ld de, wEnemyNumAttacksLeft +.trappingEffect + bit UsingTrappingMove, [hl] ret nz - call Func_3f9cf - set 5, [hl] - call BattleRandom + 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 cp $2 - jr c, .asm_3f93e + jr c, .setTrappingCounter call BattleRandom and $3 -.asm_3f93e +.setTrappingCounter inc a ld [de], a ret @@ -8189,47 +8416,47 @@ ConfusionSideEffect: ; 3f959 (f:7959) call BattleRandom cp $19 ret nc - jr Func_3f96f + jr ConfusionSideEffectSuccess ConfusionEffect: ; 3f961 (f:7961) call CheckTargetSubstitute - jr nz, Func_3f9a6 + jr nz, ConfusionEffectFailed call MoveHitTest - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a - jr nz, Func_3f9a6 + jr nz, ConfusionEffectFailed -Func_3f96f: ; 3f96f (f:796f) - ld a, [H_WHOSETURN] ; $fff3 +ConfusionSideEffectSuccess: ; 3f96f (f:796f) + ld a, [H_WHOSETURN] and a - ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1 - ld bc, wd070 - ld a, [W_PLAYERMOVEEFFECT] ; wcfd3 - jr z, .asm_3f986 - ld hl, W_PLAYERBATTSTATUS1 ; W_PLAYERBATTSTATUS1 - ld bc, wd06b - ld a, [W_ENEMYMOVEEFFECT] ; W_ENEMYMOVEEFFECT -.asm_3f986 - bit 7, [hl] ; is mon confused? - jr nz, Func_3f9a6 - set 7, [hl] ; mon is now confused + ld hl, W_ENEMYBATTSTATUS1 + ld bc, W_ENEMYCONFUSEDCOUNTER + ld a, [W_PLAYERMOVEEFFECT] + jr z, .confuseTarget + ld hl, W_PLAYERBATTSTATUS1 + ld bc, W_PLAYERCONFUSEDCOUNTER + ld a, [W_ENEMYMOVEEFFECT] +.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 + ld [bc], a ; confusion status will last 2-5 turns pop af cp CONFUSION_SIDE_EFFECT call nz, Func_3fb89 - ld hl, BecameConfusedText ; $79a1 + ld hl, BecameConfusedText jp PrintText BecameConfusedText: ; 3f9a1 (f:79a1) TX_FAR _BecameConfusedText db "@" -Func_3f9a6: ; 3f9a6 (f:79a6) +ConfusionEffectFailed: ; 3f9a6 (f:79a6) cp CONFUSION_SIDE_EFFECT ret z ld c, $32 @@ -8247,24 +8474,24 @@ SubstituteEffect: ; 3f9b9 (f:79b9) jp Bankswitch HyperBeamEffect: ; 3f9c1 (f:79c1) - ld hl, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS2 + ld a, [H_WHOSETURN] and a - jr z, .asm_3f9cc - ld hl, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 -.asm_3f9cc - set 5, [hl] ; mon now needs to recharge + jr z, .hyperBeamEffect + ld hl, W_ENEMYBATTSTATUS2 +.hyperBeamEffect + set NeedsToRecharge, [hl] ; mon now needs to recharge ret -Func_3f9cf: ; 3f9cf (f:79cf) +ClearHyperBeam: ; 3f9cf (f:79cf) push hl - ld hl, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_ENEMYBATTSTATUS2 + ld a, [H_WHOSETURN] and a jr z, .asm_3f9db - ld hl, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 + ld hl, W_PLAYERBATTSTATUS2 .asm_3f9db - res 5, [hl] ; mon no longer needs to recharge + res NeedsToRecharge, [hl] ; mon no longer needs to recharge pop hl ret @@ -8275,7 +8502,7 @@ RageEffect: ; 3f9df (f:79df) jr z, .player ld hl, W_ENEMYBATTSTATUS2 .player - set 6, [hl] ; mon is now in "rage" mode + set UsingRage, [hl] ; mon is now in "rage" mode ret MimicEffect: ; 3f9ed (f:79ed) @@ -8290,13 +8517,13 @@ MimicEffect: ; 3f9ed (f:79ed) ld hl, wBattleMonMoves ld a, [W_PLAYERBATTSTATUS1] jr nz, .asm_3fa13 - ld a, [W_ISLINKBATTLE] - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jr nz, .asm_3fa3a ld hl, wEnemyMonMoves ld a, [W_ENEMYBATTSTATUS1] .asm_3fa13 - bit 6, a + bit Invulnerable, a jr nz, .asm_3fa74 .asm_3fa17 push hl @@ -8320,7 +8547,7 @@ MimicEffect: ; 3f9ed (f:79ed) jr .asm_3fa5f .asm_3fa3a ld a, [W_ENEMYBATTSTATUS1] - bit 6, a + bit Invulnerable, a jr nz, .asm_3fa74 ld a, [wCurrentMenuItem] push af @@ -8344,7 +8571,7 @@ MimicEffect: ; 3f9ed (f:79ed) ld [hl], a ld [wd11e], a call GetMoveName - call Func_3fba8 + call PlayCurrentMoveAnimation ld hl, MimicLearnedMoveText jp PrintText .asm_3fa74 @@ -8360,20 +8587,20 @@ LeechSeedEffect: ; 3fa7c (f:7a7c) jp Bankswitch SplashEffect: ; 3fa84 (f:7a84) - call Func_3fba8 + call PlayCurrentMoveAnimation jp PrintNoEffectText DisableEffect: ; 3fa8a (f:7a8a) call MoveHitTest - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [W_MOVEMISSED] and a jr nz, .asm_3fb06 - ld de, W_ENEMYDISABLEDMOVE ; W_ENEMYDISABLEDMOVE + ld de, W_ENEMYDISABLEDMOVE ld hl, wEnemyMonMoves - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a jr z, .asm_3faa4 - ld de, W_PLAYERDISABLEDMOVE ; W_PLAYERDISABLEDMOVE + ld de, W_PLAYERDISABLEDMOVE ld hl, wBattleMonMoves .asm_3faa4 ld a, [de] @@ -8392,16 +8619,16 @@ DisableEffect: ; 3fa8a (f:7a8a) jr z, .asm_3faa8 ld [wd11e], a push hl - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld hl, wBattleMonPP ; wBattleMonPP + ld hl, wBattleMonPP jr nz, .asm_3facf - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING pop hl jr nz, .asm_3fae1 push hl - ld hl, wEnemyMonPP ; wcffe + ld hl, wEnemyMonPP .asm_3facf push hl ld a, [hli] @@ -8428,7 +8655,7 @@ DisableEffect: ; 3fa8a (f:7a8a) ld [de], a call Func_3fb89 ld hl, wccee - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a jr nz, .asm_3faf8 inc hl @@ -8436,7 +8663,7 @@ DisableEffect: ; 3fa8a (f:7a8a) ld a, [wd11e] ld [hl], a call GetMoveName - ld hl, MoveWasDisabledText ; $7b09 + ld hl, MoveWasDisabledText jp PrintText .asm_3fb05 pop hl @@ -8515,7 +8742,7 @@ IsUnaffectedText: ; 3fb69 (f:7b69) db "@" PrintMayNotAttackText: ; 3fb6e (f:7b6e) - ld hl, ParalyzedMayNotAttackText ; $7b74 + ld hl, ParalyzedMayNotAttackText jp PrintText ParalyzedMayNotAttackText: ; 3fb74 (f:7b74) @@ -8525,28 +8752,28 @@ ParalyzedMayNotAttackText: ; 3fb74 (f:7b74) CheckTargetSubstitute: ; 3fb79 (f:7b79) push hl ld hl, W_ENEMYBATTSTATUS2 - ld a, [$fff3] ;whose turn? + ld a, [H_WHOSETURN] and a jr z, .next1 ld hl, W_PLAYERBATTSTATUS2 .next1 - bit 4, [hl] ;test bit 4 in d063/d068 flags + bit HasSubstituteUp, [hl] pop hl ret Func_3fb89: ; 3fb89 (f:7b89) - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] ; wcfd2 + ld a, [W_PLAYERMOVENUM] jr z, .asm_3fb94 - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + ld a, [W_ENEMYMOVENUM] .asm_3fb94 and a ret z Func_3fb96: ; 3fb96 (f:7b96) - ld [W_ANIMATIONID], a ; W_ANIMATIONID - ld a, [H_WHOSETURN] ; $fff3 + ld [W_ANIMATIONID], a + ld a, [H_WHOSETURN] and a ld a, $6 jr z, .asm_3fba2 @@ -8555,20 +8782,20 @@ Func_3fb96: ; 3fb96 (f:7b96) ld [wcc5b], a jp Func_3fbbc -Func_3fba8: ; 3fba8 (f:7ba8) +PlayCurrentMoveAnimation: ; 3fba8 (f:7ba8) xor a ld [wcc5b], a - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] ; wcfd2 - jr z, .asm_3fbb7 - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM -.asm_3fbb7 + ld a, [W_PLAYERMOVENUM] + jr z, .notEnemyTurn + ld a, [W_ENEMYMOVENUM] +.notEnemyTurn and a ret z -Func_3fbb9: ; 3fbb9 (f:7bb9) - ld [W_ANIMATIONID], a ; W_ANIMATIONID +PlayBattleAnimation: ; 3fbb9 (f:7bb9) + ld [W_ANIMATIONID], a Func_3fbbc: ; 3fbbc (f:7bbc) push hl @@ -8581,7 +8808,7 @@ Func_3fbbc: ; 3fbbc (f:7bbc) ret FangAttacks: - call FlichSideEffect + call FlinchSideEffect call FreezeBurnParalyzeEffect ret @@ -8591,7 +8818,7 @@ VoltTackleEffect: ret PoisonFangEffect: - call FlichSideEffect + call FlinchSideEffect call PoisonEffect ret diff --git a/engine/battle/d.asm b/engine/battle/d.asm index d23c911471..7320da2947 100755 --- a/engine/battle/d.asm +++ b/engine/battle/d.asm @@ -1,21 +1,23 @@ -Func_372d6: ; 372d6 (d:72d6) +; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names +DisplayLinkBattleVersusTextBox: ; 372d6 (d:72d6) call LoadTextBoxTilePatterns hlCoord 3, 4 ld b, $7 ld c, $c call TextBoxBorder hlCoord 4, 5 - ld de, wPlayerName ; wd158 + ld de, wPlayerName call PlaceString hlCoord 4, 10 - ld de, W_GRASSRATE ; W_GRASSRATE + ld de, wLinkEnemyTrainerName call PlaceString +; place bold "VS" tiles between the names hlCoord 9, 8 ld a, $69 ld [hli], a ld [hl], $6a xor a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a callab SetupPlayerAndEnemyPokeballs - ld c, $96 + ld c, 150 jp DelayFrames diff --git a/engine/battle/e.asm b/engine/battle/e.asm index aa1377606f..028bff0561 100755 --- a/engine/battle/e.asm +++ b/engine/battle/e.asm @@ -1,24 +1,25 @@ -Func_39680: ; 39680 (e:5680) - ld a, [H_WHOSETURN] ; $fff3 +; does nothing since no stats are ever selected (barring glitches) +DoubleSelectedStats: ; 39680 (e:5680) + ld a, [H_WHOSETURN] and a - ld a, [wd060] + ld a, [wPlayerStatsToDouble] ld hl, wBattleMonAttack + 1 - jr z, .asm_39691 - ld a, [wd065] + jr z, .notEnemyTurn + ld a, [wEnemyStatsToDouble] ld hl, wEnemyMonAttack + 1 -.asm_39691 - ld c, $4 +.notEnemyTurn + ld c, 4 ld b, a -.asm_39694 +.loop srl b - call c, Func_3969f + call c, .doubleStat inc hl inc hl dec c ret z - jr .asm_39694 + jr .loop -Func_3969f: ; 3969f (e:569f) +.doubleStat ld a, [hl] add a ld [hld], a @@ -27,35 +28,36 @@ Func_3969f: ; 3969f (e:569f) ld [hli], a ret -Func_396a7: ; 396a7 (e:56a7) - ld a, [H_WHOSETURN] ; $fff3 +; does nothing since no stats are ever selected (barring glitches) +HalveSelectedStats: ; 396a7 (e:56a7) + ld a, [H_WHOSETURN] and a - ld a, [wd061] + ld a, [wPlayerStatsToHalve] ld hl, wBattleMonAttack - jr z, .asm_396b8 - ld a, [wd066] + jr z, .notEnemyTurn + ld a, [wEnemyStatsToHalve] ld hl, wEnemyMonAttack -.asm_396b8 - ld c, $4 +.notEnemyTurn + ld c, 4 ld b, a -.asm_396bb +.loop srl b - call c, Func_396c6 + call c, .halveStat inc hl inc hl dec c ret z - jr .asm_396bb + jr .loop -Func_396c6: ; 396c6 (e:56c6) +.halveStat ld a, [hl] srl a ld [hli], a rr [hl] or [hl] - jr nz, .asm_396d1 - ld [hl], $1 -.asm_396d1 + jr nz, .nonzeroStat + ld [hl], 1 +.nonzeroStat dec hl ret @@ -69,41 +71,42 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3) callab _LoadTrainerPic hlCoord 19, 0 ld c, $0 -.asm_396e9 +.scrollLoop inc c ld a, c - cp $7 + cp 7 ret z ld d, $0 push bc push hl -.asm_396f2 - call Func_39707 +.drawTrainerPicLoop + call DrawTrainerPicColumn inc hl - ld a, $7 + ld a, 7 add d ld d, a dec c - jr nz, .asm_396f2 - ld c, $4 + jr nz, .drawTrainerPicLoop + ld c, 4 call DelayFrames pop hl pop bc dec hl - jr .asm_396e9 + jr .scrollLoop -Func_39707: ; 39707 (e:5707) +; write one 7-tile column of the trainer pic to the tilemap +DrawTrainerPicColumn: ; 39707 (e:5707) push hl push de push bc - ld e, $7 -.asm_3970c + ld e, 7 +.loop ld [hl], d - ld bc, $14 + ld bc, SCREEN_WIDTH add hl, bc inc d dec e - jr nz, .asm_3970c + jr nz, .loop pop bc pop de pop hl @@ -435,263 +438,266 @@ TrainerPicAndMoneyPointers: ; 39914 (e:5914) ; trainer pic pointers and base money. ; money received after battle = base money × level of highest-level enemy mon dw YoungsterPic - db 0,$15,0 + money 1500 dw BugCatcherPic - db 0,$10,0 + money 1000 dw LassPic - db 0,$15,0 + money 1500 dw SailorPic - db 0,$30,0 + money 3000 dw JrTrainerMPic - db 0,$20,0 + money 2000 dw JrTrainerFPic - db 0,$20,0 + money 2000 dw PokemaniacPic - db 0,$50,0 + money 5000 dw SuperNerdPic - db 0,$25,0 + money 2500 dw HikerPic - db 0,$35,0 + money 3500 dw BikerPic - db 0,$20,0 + money 2000 dw BurglarPic - db 0,$90,0 + money 9000 dw EngineerPic - db 0,$50,0 + money 5000 dw JugglerPic - db 0,$35,0 + money 3500 dw FisherPic - db 0,$35,0 + money 3500 dw SwimmerPic - db 0,$05,0 + money 500 dw CueBallPic - db 0,$25,0 + money 2500 dw GamblerPic - db 0,$70,0 + money 7000 dw BeautyPic - db 0,$70,0 + money 7000 dw PsychicPic - db 0,$10,0 + money 1000 dw RockerPic - db 0,$25,0 + money 2500 dw JugglerPic - db 0,$35,0 + money 3500 dw TamerPic - db 0,$40,0 + money 4000 dw BirdKeeperPic - db 0,$25,0 + money 2500 dw BlackbeltPic - db 0,$25,0 + money 2500 dw Rival1Pic - db 0,$35,0 + money 3500 dw SwimmerFPic - db 0,$05,0 + money 500 dw RocketFPic - db 0,$30,0 + money 3000 dw ScientistPic - db 0,$50,0 + money 5000 dw GiovanniPic - db 0,$99,0 + money 9900 dw RocketPic - db 0,$30,0 + money 3000 dw CooltrainerMPic - db 0,$35,0 + money 3500 dw CooltrainerFPic - db 0,$35,0 + money 3500 dw BrunoPic - db 0,$99,0 + money 9900 dw BrockPic - db 0,$99,0 + money 9900 dw MistyPic - db 0,$99,0 + money 9900 dw LtSurgePic - db 0,$99,0 + money 9900 dw ErikaPic - db 0,$99,0 + money 9900 dw KogaPic - db 0,$99,0 + money 9900 dw BlainePic - db 0,$99,0 + money 9900 dw SabrinaPic - db 0,$99,0 + money 9900 dw GentlemanPic - db 0,$70,0 + money 7000 dw Rival2Pic - db 0,$65,0 + money 6500 dw Rival3Pic - db 0,$99,0 + money 9900 dw LoreleiPic - db 0,$99,0 + money 9900 dw ChannelerPic - db 0,$30,0 + money 3000 dw AgathaPic - db 0,$99,0 + money 9900 dw LancePic - db 0,$99,0 + money 9900 INCLUDE "text/trainer_names.asm" -Func_39b87: ; 39b87 (e:5b87) - ld hl, wd0dc - ld de, wd0e1 +; formats a string at wMovesString that lists the moves at wMoves +FormatMovesString: ; 39b87 (e:5b87) + ld hl, wMoves + ld de, wMovesString ld b, $0 -.asm_39b8f +.printMoveNameLoop ld a, [hli] - and a - jr z, .asm_39bc1 + and a ; end of move list? + jr z, .printDashLoop ; print dashes when no moves are left push hl ld [wd0b5], a - ld a, $2c + ld a, BANK(MoveNames) ld [wPredefBank], a ld a, MOVE_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a call GetName ld hl, wcd6d -.asm_39ba7 +.copyNameLoop ld a, [hli] cp $50 - jr z, .asm_39bb0 + jr z, .doneCopyingName ld [de], a inc de - jr .asm_39ba7 -.asm_39bb0 + jr .copyNameLoop +.doneCopyingName ld a, b ld [wcd6c], a inc b - ld a, $4e + ld a, $4e ; line break ld [de], a inc de pop hl ld a, b - cp $4 - jr z, .asm_39bd1 - jr .asm_39b8f -.asm_39bc1 + cp NUM_MOVES + jr z, .done + jr .printMoveNameLoop +.printDashLoop ld a, "-" ld [de], a inc de inc b ld a, b - cp $4 - jr z, .asm_39bd1 - ld a, $4e + cp NUM_MOVES + jr z, .done + ld a, $4e ; line break ld [de], a inc de - jr .asm_39bc1 -.asm_39bd1 + jr .printDashLoop +.done ld a, "@" ld [de], a 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 - ld hl, wEnemyPartyCount ; wEnemyPartyCount - ld de, wEnemyMonOT ; wd9ac OT names of other player - ld a, $6 + ld hl, wEnemyPartyCount + ld de, wEnemyMonOT + ld a, ENEMYOT_NAME jr .asm_39c18 .asm_39be6 cp $4 jr nz, .calcAttackStat4 - ld hl, wPartyCount ; wPartyCount - ld de, wPartyMonOT ; wd273 - ld a, $5 + ld hl, wPartyCount + ld de, wPartyMonOT + ld a, PLAYEROT_NAME jr .asm_39c18 .calcAttackStat4 cp $5 jr nz, .asm_39c02 ld hl, wStringBuffer2 + 11 - ld de, MonsterNames ; $421e - ld a, $1 + ld de, MonsterNames + ld a, MONSTER_NAME jr .asm_39c18 .asm_39c02 cp $2 jr nz, .asm_39c10 - ld hl, wNumBagItems ; wNumBagItems - ld de, ItemNames ; $472b - ld a, $4 + ld hl, wNumBagItems + ld de, ItemNames + ld a, ITEM_NAME jr .asm_39c18 .asm_39c10 ld hl, wStringBuffer2 + 11 - ld de, ItemNames ; $472b + ld de, ItemNames ld a, ITEM_NAME .asm_39c18 - ld [W_LISTTYPE], a + ld [wNameListType], a ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a ld a, e ld [wcf8d], a ld a, d ld [wcf8e], a - ld bc, ItemPrices ; $4608 + ld bc, ItemPrices ld a, c - ld [wcf8f], a + ld [wItemPrices], a ld a, b - ld [wcf90], a + ld [wItemPrices + 1], a ret -Func_39c37: ; 39c37 (e:5c37) +; get species of mon e in list [wcc49] for LoadMonData +GetMonSpecies: ; 39c37 (e:5c37) ld hl, wPartySpecies ld a, [wcc49] and a - jr z, .asm_39c4b + jr z, .getSpecies dec a - jr z, .asm_39c48 + jr z, .enemyParty ld hl, wBoxSpecies - jr .asm_39c4b -.asm_39c48 + jr .getSpecies +.enemyParty ld hl, wEnemyPartyMons -.asm_39c4b - ld d, $0 +.getSpecies + ld d, 0 add hl, de ld a, [hl] ld [wcf91], a @@ -700,7 +706,7 @@ Func_39c37: ; 39c37 (e:5c37) ReadTrainer: ; 39c53 (e:5c53) ; don't change any moves in a link battle - ld a,[W_ISLINKBATTLE] + ld a,[wLinkState] and a ret nz @@ -872,8 +878,8 @@ TrainerAI: ; 3a52e (e:652e) ld a,[W_ISINBATTLE] dec a ret z ; if not a trainer, we're done here - ld a,[W_ISLINKBATTLE] - cp 4 + ld a,[wLinkState] + cp LINK_STATE_BATTLING ret z ld a,[W_TRAINERCLASS] ; what trainer class is this? dec a @@ -954,7 +960,7 @@ TrainerAIPointers: ; 3a55c (e:655c) JugglerAI: ; 3a5e9 (e:65e9) cp $40 ret nc - jp Func_3a72a + jp AISwitchIfEnoughMons BlackbeltAI: ; 3a5ef (e:65ef) cp $20 @@ -974,12 +980,12 @@ CooltrainerMAI: ; 3a5fb (e:65fb) CooltrainerFAI: ; 3a601 (e:6601) cp $40 ld a,$A - call Func_3a7cf + call AICheckIfHPBelowFraction jp c,AIUseHyperPotion ld a,5 - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc - jp Func_3a72a + jp AISwitchIfEnoughMons BrockAI: ; 3a614 (e:6614) ; if his active monster has a status condition, use a full heal @@ -1002,7 +1008,7 @@ ErikaAI: ; 3a628 (e:6628) cp $80 ret nc ld a,$A - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion @@ -1020,7 +1026,7 @@ SabrinaAI: ; 3a640 (e:6640) cp $40 ret nc ld a,$A - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc jp AIUseHyperPotion @@ -1028,7 +1034,7 @@ Sony2AI: ; 3a64c (e:664c) cp $20 ret nc ld a,5 - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc jp AIUsePotion @@ -1036,7 +1042,7 @@ Sony3AI: ; 3a658 (e:6658) cp $20 ret nc ld a,5 - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc jp AIUseFullRestore @@ -1044,7 +1050,7 @@ LoreleiAI: ; 3a664 (e:6664) cp $80 ret nc ld a,5 - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion @@ -1055,11 +1061,11 @@ BrunoAI: ; 3a670 (e:6670) AgathaAI: ; 3a676 (e:6676) cp $14 - jp c,Func_3a72a + jp c,AISwitchIfEnoughMons cp $80 ret nc ld a,4 - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion @@ -1067,7 +1073,7 @@ LanceAI: ; 3a687 (e:6687) cp $80 ret nc ld a,5 - call Func_3a7cf + call AICheckIfHPBelowFraction ret nc jp AIUseHyperPotion @@ -1109,7 +1115,7 @@ AIUseFullRestore: ; 3a6a0 (e:66a0) ld [de],a ld [wHPBarMaxHP+1],a ld [wEnemyMonHP],a - jr Func_3a718 + jr AIPrintItemUseAndUpdateHPBar AIUsePotion: ; 3a6ca (e:66ca) ; enemy trainer heals his monster with a potion @@ -1159,7 +1165,7 @@ AIRecoverHP: ; 3a6da (e:66da) ld a,[de] ld [wHPBarMaxHP+1],a sbc b - jr nc,Func_3a718 + jr nc,AIPrintItemUseAndUpdateHPBar inc de ld a,[de] dec de @@ -1170,15 +1176,16 @@ AIRecoverHP: ; 3a6da (e:66da) ld [wHPBarNewHP+1],a ; fallthrough -Func_3a718: ; 3a718 (e:6718) +AIPrintItemUseAndUpdateHPBar: ; 3a718 (e:6718) call AIPrintItemUse_ hlCoord 2, 2 xor a - ld [wListMenuID],a + ld [wHPBarType],a predef UpdateHPBar2 jp DecrementAICount -Func_3a72a: ; 3a72a (e:672a) +AISwitchIfEnoughMons: ; 3a72a (e:672a) +; enemy trainer switches if there are 3 or more unfainted mons in party ld a,[wEnemyPartyCount] ld c,a ld hl,wEnemyMon1HP @@ -1203,11 +1210,11 @@ Func_3a72a: ; 3a72a (e:672a) ld a,d ; how many available monsters are there? cp 2 ; don't bother if only 1 or 2 - jp nc,Func_3a74b + jp nc,SwitchEnemyMon and a ret -Func_3a74b: ; 3a74b (e:674b) +SwitchEnemyMon: ; 3a74b (e:674b) ; prepare to withdraw the active monster: copy hp, number, and status to roster @@ -1230,8 +1237,8 @@ Func_3a74b: ; 3a74b (e:674b) xor a ld [wd11d],a - ld a,[W_ISLINKBATTLE] - cp 4 + ld a,[wLinkState] + cp LINK_STATE_BATTLING ret z scf ret @@ -1280,7 +1287,8 @@ AIUseDireHit: ; 0x3a7c2 unused ld a,DIRE_HIT jp AIPrintItemUse -Func_3a7cf: ; 3a7cf (e:67cf) +AICheckIfHPBelowFraction: ; 3a7cf (e:67cf) +; return carry if enemy trainer's current HP is below 1 / a of the maximum ld [H_DIVISOR],a ld hl,wEnemyMonMaxHP ld a,[hli] @@ -1394,7 +1402,7 @@ SetupOwnPartyPokeballs: ; 3a869 (e:6869) ld a, $8 ld [wTrainerEngageDistance], a ld hl, wOAMBuffer - jp Func_3a8e1 + jp WritePokeballOAMData SetupEnemyPartyPokeballs: ; 3a887 (e:6887) call PlaceEnemyHUDTiles @@ -1407,20 +1415,20 @@ SetupEnemyPartyPokeballs: ; 3a887 (e:6887) ld [hl], $20 ld a, $f8 ld [wTrainerEngageDistance], a - ld hl, wOAMBuffer + $18 - jp Func_3a8e1 + ld hl, wOAMBuffer + PARTY_LENGTH * 4 + jp WritePokeballOAMData SetupPokeballs: ; 0x3a8a6 ld a, [de] push af ld de, wBuffer - ld c, $6 ; max num of partymons + ld c, PARTY_LENGTH ld a, $34 ; empty pokeball .emptyloop ld [de], a inc de dec c - jr nz, .emptyloop ; 0x3a8b2 $fb + jr nz, .emptyloop pop af ld de, wBuffer .monloop @@ -1460,10 +1468,10 @@ PickPokeball: ; 3a8c2 (e:68c2) add hl, bc ret -Func_3a8e1: ; 3a8e1 (e:68e1) - ld de, wHPBarMaxHP - ld c, $6 -.asm_3a8e6 +WritePokeballOAMData: ; 3a8e1 (e:68e1) + ld de, wBuffer + ld c, PARTY_LENGTH +.loop ld a, [W_BASECOORDY] ; wd082 ld [hli], a ld a, [W_BASECOORDX] ; wd081 @@ -1479,7 +1487,7 @@ Func_3a8e1: ; 3a8e1 (e:68e1) ld [W_BASECOORDX], a ; wd081 inc de dec c - jr nz, .asm_3a8e6 + jr nz, .loop ret PlacePlayerHUDTiles: ; 3a902 (e:6902) @@ -1541,7 +1549,7 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948) ld a, $8 ld [wTrainerEngageDistance], a ld hl, wOAMBuffer - call Func_3a8e1 + call WritePokeballOAMData ld hl, wEnemyMons ; wEnemyMon1Species ld de, wEnemyPartyCount ; wEnemyPartyCount call SetupPokeballs @@ -1550,7 +1558,7 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948) ld [hli], a ld [hl], $68 ld hl, wOAMBuffer + $18 - jp Func_3a8e1 + jp WritePokeballOAMData ; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon) PokeballTileGraphics:: ; 3a97e (e:697e) diff --git a/engine/battle/e_2.asm b/engine/battle/e_2.asm index 665807feef..9400282d19 100755 --- a/engine/battle/e_2.asm +++ b/engine/battle/e_2.asm @@ -1,13 +1,13 @@ HealEffect_: ; 3b9ec (e:79ec) - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - ld de, wBattleMonHP ; wd015 - ld hl, wBattleMonMaxHP ; wd023 - ld a, [W_PLAYERMOVENUM] ; wcfd2 + ld de, wBattleMonHP + ld hl, wBattleMonMaxHP + ld a, [W_PLAYERMOVENUM] jr z, .asm_3ba03 - ld de, wEnemyMonHP ; wEnemyMonHP - ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP - ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM + ld de, wEnemyMonHP + ld hl, wEnemyMonMaxHP + ld a, [W_ENEMYMOVENUM] .asm_3ba03 ld b, a ld a, [de] @@ -16,27 +16,27 @@ HealEffect_: ; 3b9ec (e:79ec) inc hl ld a, [de] sbc [hl] - jp z, Func_3ba97 + jp z, .failed ld a, b cp REST jr nz, .asm_3ba37 push hl push de push af - ld c, $32 + ld c, 50 call DelayFrames - ld hl, wBattleMonStatus ; wBattleMonStatus - ld a, [H_WHOSETURN] ; $fff3 + ld hl, wBattleMonStatus + ld a, [H_WHOSETURN] and a jr z, .asm_3ba25 - ld hl, wEnemyMonStatus ; wcfe9 + ld hl, wEnemyMonStatus .asm_3ba25 ld a, [hl] and a ld [hl], 2 ; Number of turns from Rest - ld hl, StartedSleepingEffect ; $7aa2 + ld hl, StartedSleepingEffect jr z, .asm_3ba31 - ld hl, FellAsleepBecameHealthyText ; $7aa7 + ld hl, FellAsleepBecameHealthyText .asm_3ba31 call PrintText pop af @@ -81,9 +81,9 @@ HealEffect_: ; 3b9ec (e:79ec) ld [de], a ld [wHPBarNewHP], a .asm_3ba6f - ld hl, Func_3fba8 ; $7ba8 + ld hl, PlayCurrentMoveAnimation call BankswitchEtoF - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a hlCoord 10, 9 ld a, $1 @@ -91,15 +91,14 @@ HealEffect_: ; 3b9ec (e:79ec) hlCoord 2, 2 xor a .asm_3ba83 - ld [wListMenuID], a ; wListMenuID + ld [wHPBarType], a predef UpdateHPBar2 - ld hl, Func_3cd5a ; $4d5a + ld hl, DrawHUDsAndHPBars call BankswitchEtoF - ld hl, RegainedHealthText ; $7aac + ld hl, RegainedHealthText jp PrintText - -Func_3ba97: ; 3ba97 (e:7a97) - ld c, $32 +.failed + ld c, 50 call DelayFrames ld hl, PrintButItFailedText_ jp BankswitchEtoF @@ -119,37 +118,37 @@ RegainedHealthText: ; 3baac (e:7aac) TransformEffect_: ; 3bab1 (e:7ab1) ld hl, wBattleMonSpecies ld de, wEnemyMonSpecies - ld bc, W_ENEMYBATTSTATUS3 ; W_ENEMYBATTSTATUS3 - ld a, [W_ENEMYBATTSTATUS1] ; W_ENEMYBATTSTATUS1 - ld a, [H_WHOSETURN] ; $fff3 + ld bc, W_ENEMYBATTSTATUS3 + ld a, [W_ENEMYBATTSTATUS1] + ld a, [H_WHOSETURN] and a jr nz, .asm_3bad1 ld hl, wEnemyMonSpecies ld de, wBattleMonSpecies - ld bc, W_PLAYERBATTSTATUS3 ; W_PLAYERBATTSTATUS3 - ld [wPlayerMoveListIndex], a ; wPlayerMoveListIndex - ld a, [W_PLAYERBATTSTATUS1] ; W_PLAYERBATTSTATUS1 + ld bc, W_PLAYERBATTSTATUS3 + ld [wPlayerMoveListIndex], a + ld a, [W_PLAYERBATTSTATUS1] .asm_3bad1 - bit 6, a ; is mon invulnerable to typical attacks? (fly/dig) - jp nz, Func_3bb8c + bit Invulnerable, a ; is mon invulnerable to typical attacks? (fly/dig) + jp nz, .failed push hl push de push bc - ld hl, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS2 + ld a, [H_WHOSETURN] and a jr z, .asm_3bae4 - ld hl, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 + ld hl, W_ENEMYBATTSTATUS2 .asm_3bae4 - bit 4, [hl] + bit HasSubstituteUp, [hl] push af ld hl, Func_79747 ld b, BANK(Func_79747) call nz, Bankswitch - ld a, [W_OPTIONS] ; W_OPTIONS + ld a, [W_OPTIONS] add a - ld hl, Func_3fba8 ; $7ba8 - ld b, BANK(Func_3fba8) + ld hl, PlayCurrentMoveAnimation + ld b, BANK(PlayCurrentMoveAnimation) jr nc, .asm_3baff ld hl, AnimationTransformMon ld b, BANK(AnimationTransformMon) @@ -161,7 +160,7 @@ TransformEffect_: ; 3bab1 (e:7ab1) call nz, Bankswitch pop bc ld a, [bc] - set 3, a + set Transformed, a ld [bc], a pop de pop hl @@ -178,7 +177,7 @@ TransformEffect_: ; 3bab1 (e:7ab1) inc bc inc bc call CopyData - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a jr z, .asm_3bb32 ld a, [de] @@ -226,17 +225,17 @@ TransformEffect_: ; 3bab1 (e:7ab1) ld a, [hl] ld [wd11e], a call GetMonName - ld hl, wcd26 - ld de, wcd12 - call Func_3bb7d - ld hl, wEnemyMonStatMods ; wcd2e - ld de, wPlayerMonStatMods ; wcd1a - call Func_3bb7d - ld hl, TransformedText ; $7b92 + ld hl, wEnemyMonUnmodifiedAttack + ld de, wPlayerMonUnmodifiedAttack + call .copyBasedOnTurn + ld hl, wEnemyMonStatMods + ld de, wPlayerMonStatMods + call .copyBasedOnTurn + ld hl, TransformedText jp PrintText -Func_3bb7d: ; 3bb7d (e:7b7d) - ld a, [H_WHOSETURN] ; $fff3 +.copyBasedOnTurn + ld a, [H_WHOSETURN] and a jr z, .asm_3bb86 push hl @@ -247,8 +246,8 @@ Func_3bb7d: ; 3bb7d (e:7b7d) ld bc, $8 jp CopyData -Func_3bb8c: ; 3bb8c (e:7b8c) - ld hl, PrintButItFailedText_ ; $7b53 +.failed + ld hl, PrintButItFailedText_ jp BankswitchEtoF TransformedText: ; 3bb92 (e:7b92) @@ -256,37 +255,37 @@ TransformedText: ; 3bb92 (e:7b92) db "@" ReflectLightScreenEffect_: ; 3bb97 (e:7b97) - ld hl, W_PLAYERBATTSTATUS3 ; W_PLAYERBATTSTATUS3 - ld de, W_PLAYERMOVEEFFECT ; wcfd3 - ld a, [H_WHOSETURN] ; $fff3 + ld hl, W_PLAYERBATTSTATUS3 + ld de, W_PLAYERMOVEEFFECT + ld a, [H_WHOSETURN] and a jr z, .asm_3bba8 - ld hl, W_ENEMYBATTSTATUS3 ; W_ENEMYBATTSTATUS3 - ld de, W_ENEMYMOVEEFFECT ; W_ENEMYMOVEEFFECT + ld hl, W_ENEMYBATTSTATUS3 + ld de, W_ENEMYMOVEEFFECT .asm_3bba8 ld a, [de] cp LIGHT_SCREEN_EFFECT jr nz, .reflect - bit 1, [hl] ; is mon already protected by light screen? + bit HasLightScreenUp, [hl] ; is mon already protected by light screen? jr nz, .moveFailed - set 1, [hl] ; mon is now protected by light screen - ld hl, LightScreenProtectedText ; $7bd7 + set HasLightScreenUp, [hl] ; mon is now protected by light screen + ld hl, LightScreenProtectedText jr .asm_3bbc1 .reflect - bit 2, [hl] ; is mon already protected by reflect? + bit HasReflectUp, [hl] ; is mon already protected by reflect? jr nz, .moveFailed - set 2, [hl] ; mon is now protected by reflect - ld hl, ReflectGainedArmorText ; $7bdc + set HasReflectUp, [hl] ; mon is now protected by reflect + ld hl, ReflectGainedArmorText .asm_3bbc1 push hl - ld hl, Func_3fba8 ; $7ba8 + ld hl, PlayCurrentMoveAnimation call BankswitchEtoF pop hl jp PrintText .moveFailed ld c, $32 call DelayFrames - ld hl, PrintButItFailedText_ ; $7b53 + ld hl, PrintButItFailedText_ jp BankswitchEtoF LightScreenProtectedText: ; 3bbd7 (e:7bd7) diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm index 99e1492da5..6b0e222057 100755 --- a/engine/battle/safari_zone.asm +++ b/engine/battle/safari_zone.asm @@ -1,5 +1,5 @@ PrintSafariZoneBattleText: ; 4277 (1:4277) - ld hl, wcce9 + ld hl, wSafariBaitFactor ld a, [hl] and a jr z, .asm_4284 @@ -19,7 +19,7 @@ PrintSafariZoneBattleText: ; 4277 (1:4277) ld [wd0b5], a call GetMonHeader ld a, [W_MONHCATCHRATE] - ld [wd007], a + ld [wEnemyMonCatchRate], a pop hl .asm_429f push hl diff --git a/engine/cable_club.asm b/engine/cable_club.asm index fc049ceb7e..4fbb13d974 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -1,4 +1,7 @@ -Func_5317: ; 5317 (1:5317) +; 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. +; 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 call DelayFrames call ClearScreen @@ -7,286 +10,292 @@ Func_5317: ; 5317 (1:5317) call LoadHpBarAndStatusTilePatterns call LoadTrainerInfoTextBoxTiles hlCoord 3, 8 - ld b, $2 - ld c, $c - call Func_5ab3 + ld b, 2 + ld c, 12 + call CableClub_TextBoxBorder hlCoord 4, 10 - ld de, PleaseWaitString ; $550f + ld de, PleaseWaitString call PlaceString - ld hl, W_NUMHITS ; wd074 + ld hl, wPlayerNumHits xor a ld [hli], a ld [hl], $50 + ; fall through -Func_5345: ; 5345 - ld hl, wd152 - ld a, $fd - ld b, $6 -.asm_534c +; This is called after completing a trade. +CableClub_DoBattleOrTradeAgain: ; 5345 + ld hl, wSerialPlayerDataBlock + ld a, SERIAL_PREAMBLE_BYTE + ld b, 6 +.writePlayeDataBlockPreambleLoop ld [hli], a dec b - jr nz, .asm_534c - ld hl, wd141 - ld a, $fd - ld b, $7 -.asm_5357 + jr nz, .writePlayeDataBlockPreambleLoop + ld hl, wSerialRandomNumberListBlock + ld a, SERIAL_PREAMBLE_BYTE + ld b, 7 +.writeRandomNumberListPreambleLoop ld [hli], a dec b - jr nz, .asm_5357 - ld b, $a -.asm_535d + jr nz, .writeRandomNumberListPreambleLoop + ld b, 10 +.generateRandomNumberListLoop call Random - cp $fd - jr nc, .asm_535d + cp SERIAL_PREAMBLE_BYTE ; all the random numbers have to be less than the preamble byte + jr nc, .generateRandomNumberListLoop ld [hli], a dec b - jr nz, .asm_535d - ld hl, wTileMapBackup - ld a, $fd + jr nz, .generateRandomNumberListLoop + ld hl, wSerialPartyMonsPatchList + ld a, SERIAL_PREAMBLE_BYTE ld [hli], a ld [hli], a ld [hli], a ld b, $c8 xor a -.asm_5373 +.zeroPlayerDataPatchListLoop ld [hli], a dec b - jr nz, .asm_5373 - ld hl, W_GRASSRATE ; W_GRASSRATE - ld bc, $1a9 -.asm_537d + jr nz, .zeroPlayerDataPatchListLoop + ld hl, W_GRASSRATE + ld bc, W_TRAINERHEADERPTR - W_GRASSRATE +.zeroEnemyPartyLoop xor a ld [hli], a dec bc ld a, b or c - jr nz, .asm_537d + jr nz, .zeroEnemyPartyLoop ld hl, wPartyMons - 1 - ld de, wTileMapBackup + 10 - ld bc, $0 -.asm_538d + ld de, wSerialPartyMonsPatchList + 10 + ld bc, 0 +.patchPartyMonsLoop inc c ld a, c - cp $fd - jr z, .asm_53a9 + cp SERIAL_PREAMBLE_BYTE + jr z, .startPatchListPart2 ld a, b - dec a - jr nz, .asm_539c + dec a ; are we in part 2 of the patch list? + jr nz, .checkPlayerDataByte ; jump if in part 1 +; if we're in part 2 ld a, c - cp $d - jr z, .asm_53b2 -.asm_539c + cp (wPartyMonOT - (wPartyMons - 1)) - (SERIAL_PREAMBLE_BYTE - 1) + jr z, .finishedPatchingPlayerData +.checkPlayerDataByte inc hl ld a, [hl] - cp $fe - jr nz, .asm_538d + cp SERIAL_NO_DATA_BYTE + jr nz, .patchPartyMonsLoop +; if the player data byte matches SERIAL_NO_DATA_BYTE, patch it with $FF and record the offset in the patch list ld a, c ld [de], a inc de ld [hl], $ff - jr .asm_538d -.asm_53a9 - ld a, $ff - ld [de], a + jr .patchPartyMonsLoop +.startPatchListPart2 + ld a, SERIAL_PATCH_LIST_PART_TERMINATOR + ld [de], a ; end of part 1 inc de ld bc, $100 - jr .asm_538d -.asm_53b2 - ld a, $ff - ld [de], a - call Func_227f - ld a, [$ffaa] - cp $2 - jr nz, .asm_53d2 + jr .patchPartyMonsLoop +.finishedPatchingPlayerData + ld a, SERIAL_PATCH_LIST_PART_TERMINATOR + ld [de], a ; end of part 2 + call Serial_SyncAndExchangeNybble + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .skipSendingTwoZeroBytes +; if using internal clock +; send two zero bytes for syncing purposes? call Delay3 xor a - ld [$ffac], a - ld a, $81 - ld [$ff02], a + ld [hSerialSendData], a + ld a, START_TRANSFER_INTERNAL_CLOCK + ld [rSC], a call DelayFrame xor a - ld [$ffac], a - ld a, $81 - ld [$ff02], a -.asm_53d2 + ld [hSerialSendData], a + ld a, START_TRANSFER_INTERNAL_CLOCK + ld [rSC], a +.skipSendingTwoZeroBytes call Delay3 - ld a, $8 - ld [rIE], a ; $ffff - ld hl, wd141 - ld de, wTileMapBackup2 + ld a, (1 << SERIAL) + ld [rIE], a + ld hl, wSerialRandomNumberListBlock + ld de, wSerialOtherGameboyRandomNumberListBlock ld bc, $11 - call Func_216f - ld a, $fe + call Serial_ExchangeBytes + ld a, SERIAL_NO_DATA_BYTE ld [de], a - ld hl, wd152 - ld de, wd893 + ld hl, wSerialPlayerDataBlock + ld de, wSerialEnemyDataBlock ld bc, $1a8 - call Func_216f - ld a, $fe + call Serial_ExchangeBytes + ld a, SERIAL_NO_DATA_BYTE ld [de], a - ld hl, wTileMapBackup - ld de, wTileMapBackup + 200 + ld hl, wSerialPartyMonsPatchList + ld de, wSerialEnemyMonsPatchList ld bc, $c8 - call Func_216f - ld a, $d - ld [rIE], a ; $ffff + call Serial_ExchangeBytes + ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) + ld [rIE], a ld a, $ff call PlaySound - ld a, [$ffaa] - cp $2 - jr z, .asm_5431 - ld hl, wTileMapBackup2 -.asm_5415 + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .skipCopyingRandomNumberList ; the list generated by the gameboy clocking the connection is used by both gameboys + ld hl, wSerialOtherGameboyRandomNumberListBlock +.findStartOfRandomNumberListLoop ld a, [hli] and a - jr z, .asm_5415 - cp $fd - jr z, .asm_5415 - cp $fe - jr z, .asm_5415 + jr z, .findStartOfRandomNumberListLoop + cp SERIAL_PREAMBLE_BYTE + jr z, .findStartOfRandomNumberListLoop + cp SERIAL_NO_DATA_BYTE + jr z, .findStartOfRandomNumberListLoop dec hl - ld de, wd148 - ld c, $a -.asm_5427 + ld de, wLinkBattleRandomNumberList + ld c, 10 +.copyRandomNumberListLoop ld a, [hli] - cp $fe - jr z, .asm_5427 + cp SERIAL_NO_DATA_BYTE + jr z, .copyRandomNumberListLoop ld [de], a inc de dec c - jr nz, .asm_5427 -.asm_5431 - ld hl, wd896 -.asm_5434 + jr nz, .copyRandomNumberListLoop +.skipCopyingRandomNumberList + ld hl, wSerialEnemyDataBlock + 3 +.findStartOfEnemyNameLoop ld a, [hli] and a - jr z, .asm_5434 - cp $fd - jr z, .asm_5434 - cp $fe - jr z, .asm_5434 + jr z, .findStartOfEnemyNameLoop + cp SERIAL_PREAMBLE_BYTE + jr z, .findStartOfEnemyNameLoop + cp SERIAL_NO_DATA_BYTE + jr z, .findStartOfEnemyNameLoop dec hl - ld de, W_GRASSRATE ; W_GRASSRATE - ld c, $b -.asm_5446 + ld de, wLinkEnemyTrainerName + ld c, 11 +.copyEnemyNameLoop ld a, [hli] - cp $fe - jr z, .asm_5446 + cp SERIAL_NO_DATA_BYTE + jr z, .copyEnemyNameLoop ld [de], a inc de dec c - jr nz, .asm_5446 - ld de, wEnemyPartyCount ; wEnemyPartyCount - ld bc, $194 -.asm_5456 + jr nz, .copyEnemyNameLoop + ld de, wEnemyPartyCount + ld bc, W_TRAINERHEADERPTR - wEnemyPartyCount +.copyEnemyPartyLoop ld a, [hli] - cp $fe - jr z, .asm_5456 + cp SERIAL_NO_DATA_BYTE + jr z, .copyEnemyPartyLoop ld [de], a inc de dec bc ld a, b or c - jr nz, .asm_5456 - ld de, wTileMapBackup + jr nz, .copyEnemyPartyLoop + ld de, wSerialPartyMonsPatchList ld hl, wPartyMons - ld c, $2 -.asm_546a + ld c, 2 ; patch list has 2 parts +.unpatchPartyMonsLoop ld a, [de] inc de and a - jr z, .asm_546a - cp $fd - jr z, .asm_546a - cp $fe - jr z, .asm_546a - cp $ff - jr z, .asm_5489 + jr z, .unpatchPartyMonsLoop + cp SERIAL_PREAMBLE_BYTE + jr z, .unpatchPartyMonsLoop + cp SERIAL_NO_DATA_BYTE + jr z, .unpatchPartyMonsLoop + cp SERIAL_PATCH_LIST_PART_TERMINATOR + jr z, .finishedPartyMonsPatchListPart push hl push bc ld b, 0 dec a ld c, a add hl, bc - ld a, $fe + ld a, SERIAL_NO_DATA_BYTE ld [hl], a pop bc pop hl - jr .asm_546a -.asm_5489 - ld hl, wPartyMons + $fc ; wd267 - dec c - jr nz, .asm_546a - ld de, wTileMapBackup + 200 + jr .unpatchPartyMonsLoop +.finishedPartyMonsPatchListPart + ld hl, wPartyMons + (SERIAL_PREAMBLE_BYTE - 1) + dec c ; is there another part? + jr nz, .unpatchPartyMonsLoop + ld de, wSerialEnemyMonsPatchList ld hl, wEnemyMons - ld c, $2 -.asm_5497 + ld c, 2 ; patch list has 2 parts +.unpatchEnemyMonsLoop ld a, [de] inc de and a - jr z, .asm_5497 - cp $fd - jr z, .asm_5497 - cp $fe - jr z, .asm_5497 - cp $ff - jr z, .asm_54b6 + jr z, .unpatchEnemyMonsLoop + cp SERIAL_PREAMBLE_BYTE + jr z, .unpatchEnemyMonsLoop + cp SERIAL_NO_DATA_BYTE + jr z, .unpatchEnemyMonsLoop + cp SERIAL_PATCH_LIST_PART_TERMINATOR + jr z, .finishedEnemyMonsPatchListPart push hl push bc - ld b, $0 + ld b, 0 dec a ld c, a add hl, bc - ld a, $fe + ld a, SERIAL_NO_DATA_BYTE ld [hl], a pop bc pop hl - jr .asm_5497 -.asm_54b6 - ld hl, wEnemyMons + $fc + jr .unpatchEnemyMonsLoop +.finishedEnemyMonsPatchListPart + ld hl, wEnemyMons + (SERIAL_PREAMBLE_BYTE - 1) dec c - jr nz, .asm_5497 - ld a, $ac + jr nz, .unpatchEnemyMonsLoop + ld a, wEnemyMonOT % $100 ld [wcf8d], a - ld a, $d9 + ld a, wEnemyMonOT / $100 ld [wcf8e], a xor a - ld [wcc38], a + ld [wTradeCenterPointerTableIndex], a ld a, $ff call PlaySound - ld a, [$ffaa] - cp $2 - ld c, $42 - call z, DelayFrames - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $3 - ld a, $32 - ld [W_ISLINKBATTLE], a ; W_ISLINKBATTLE + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + ld c, 66 + call z, DelayFrames ; delay if using internal clock + ld a, [wLinkState] + cp LINK_STATE_START_BATTLE + ld a, LINK_STATE_TRADING + ld [wLinkState], a jr nz, .asm_5506 - ld a, $4 - ld [W_ISLINKBATTLE], a ; W_ISLINKBATTLE + ld a, LINK_STATE_BATTLING + ld [wLinkState], a ld a, SONY1 + $c8 - ld [W_CUROPPONENT], a ; wd059 + ld [W_CUROPPONENT], a call ClearScreen call Delay3 - ld hl, W_OPTIONS ; W_OPTIONS + ld hl, W_OPTIONS res 7, [hl] predef InitOpponent predef HealParty - jp Func_577d + jp ReturnToCableClubRoom .asm_5506 ld c, BANK(Music_GameCorner) ld a, MUSIC_GAME_CORNER call PlayMusic - jr Func_551c + jr CallCurrentTradeCenterFunction PleaseWaitString: ; 550f (1:550f) db "PLEASE WAIT!@" -Func_551c: - ld hl, PointerTable_5a5b ; $5a5b - ld b, $0 - ld a, [wcc38] +CallCurrentTradeCenterFunction: + ld hl, TradeCenterPointerTable + ld b, 0 + ld a, [wTradeCenterPointerTableIndex] cp $ff jp z, LoadTitlescreenGraphics add a @@ -300,10 +309,10 @@ Func_551c: TradeCenter_SelectMon: call ClearScreen call LoadTrainerInfoTextBoxTiles - call Func_57f2 - call Func_57a2 + call TradeCenter_DrawPartyLists + call TradeCenter_DrawCancelBox xor a - ld hl, wcc3d + ld hl, wSerialSyncAndExchangeNybbleReceiveData ld [hli], a ld [hli], a ld [hli], a @@ -313,51 +322,53 @@ TradeCenter_SelectMon: ld [wLastMenuItem], a ld [wMenuJoypadPollCount], a inc a - ld [wcc42], a - jp .asm_55dc -.asm_5557 + ld [wSerialExchangeNybbleSendData], a + jp .playerMonMenu +.enemyMonMenu xor a ld [wcc37], a inc a - ld [wcc49], a - ld a, $a1 + ld [wWhichTradeMonSelectionMenu], a + ld a, D_DOWN | D_LEFT | A_BUTTON ld [wMenuWatchedKeys], a ld a, [wEnemyPartyCount] ld [wMaxMenuItem], a - ld a, $9 + ld a, 9 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a -.asm_5574 - ld hl, $fff6 +.enemyMonMenu_HandleInput + ld hl, hFlags_0xFFF6 set 1, [hl] call HandleMenuInput - ld hl, $fff6 + ld hl, hFlags_0xFFF6 res 1, [hl] and a - jp z, .asm_565b - bit 0, a - jr z, .asm_55b0 ; 0x5587 $27 + jp z, .getNewInput + bit 0, a ; A button pressed? + jr z, .enemyMonMenu_ANotPressed +; if A button pressed ld a, [wMaxMenuItem] ld c, a ld a, [wCurrentMenuItem] cp c - jr c, .asm_559a ; 0x5591 $7 + jr c, .displayEnemyMonStats ld a, [wMaxMenuItem] dec a ld [wCurrentMenuItem], a -.asm_559a +.displayEnemyMonStats ld a, $1 ld [wd11b], a callab Func_39bd5 ld hl, wEnemyMons - call Func_57d6 - jp .asm_565b -.asm_55b0 - bit 5, a - jr z, .asm_55d4 ; 0x55b2 $20 - xor a - ld [wcc49], a + call TradeCenter_DisplayStats + jp .getNewInput +.enemyMonMenu_ANotPressed + bit 5, a ; Left pressed? + jr z, .enemyMonMenu_LeftNotPressed +; if Left pressed, switch back to the player mon menu + xor a ; player mon menu + ld [wWhichTradeMonSelectionMenu], a ld a, [wMenuCursorLocation] ld l, a ld a, [wMenuCursorLocation + 1] @@ -369,51 +380,53 @@ TradeCenter_SelectMon: ld a, [wPartyCount] dec a cp b - jr nc, .asm_55dc ; 0x55cd $d + jr nc, .playerMonMenu ld [wCurrentMenuItem], a - jr .asm_55dc ; 0x55d2 $8 -.asm_55d4 - bit 7, a - jp z, .asm_565b - jp .asm_572f -.asm_55dc - xor a - ld [wcc49], a + jr .playerMonMenu +.enemyMonMenu_LeftNotPressed + bit 7, a ; Down pressed? + jp z, .getNewInput + jp .selectedCancelMenuItem ; jump if Down pressed +.playerMonMenu + xor a ; player mon menu + ld [wWhichTradeMonSelectionMenu], a ld [wcc37], a - ld a, $91 + ld a, D_DOWN | D_RIGHT | A_BUTTON ld [wMenuWatchedKeys], a ld a, [wPartyCount] ld [wMaxMenuItem], a - ld a, $1 + ld a, 1 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a - ld hl, wTileMap + $15 + hlCoord 1, 1 ld bc, $0601 call ClearScreenArea -.asm_5601 - ld hl, $fff6 +.playerMonMenu_HandleInput + ld hl, hFlags_0xFFF6 set 1, [hl] call HandleMenuInput - ld hl, $fff6 + ld hl, hFlags_0xFFF6 res 1, [hl] - and a - jr nz, .asm_5614 ; 0x560f $3 - jp .asm_565b -.asm_5614 - bit 0, a - jr z, .asm_562e ; 0x5616 $16 - jp .asm_5665 + and a ; was anything pressed? + jr nz, .playerMonMenu_SomethingPressed + jp .getNewInput +.playerMonMenu_SomethingPressed + bit 0, a ; A button pressed? + jr z, .playerMonMenu_ANotPressed + jp .chosePlayerMon ; jump if A button pressed +; unreachable code ld a, $4 ld [wd11b], a callab Func_39bd5 - call Func_57d6 - jp .asm_565b -.asm_562e - bit 4, a - jr z, .asm_5654 ; 0x5630 $22 - ld a, $1 - ld [wcc49], a + call TradeCenter_DisplayStats + jp .getNewInput +.playerMonMenu_ANotPressed + bit 4, a ; Right pressed? + jr z, .playerMonMenu_RightNotPressed +; if Right pressed, switch to the enemy mon menu + ld a, $1 ; enemy mon menu + ld [wWhichTradeMonSelectionMenu], a ld a, [wMenuCursorLocation] ld l, a ld a, [wMenuCursorLocation + 1] @@ -425,36 +438,37 @@ TradeCenter_SelectMon: ld a, [wEnemyPartyCount] dec a cp b - jr nc, .asm_5651 ; 0x564c $3 + jr nc, .notPastLastEnemyMon +; when switching to the enemy mon menu, if the menu selection would be past the last enemy mon, select the last enemy mon ld [wCurrentMenuItem], a -.asm_5651 - jp .asm_5557 -.asm_5654 - bit 7, a - jr z, .asm_565b ; 0x5656 $3 - jp .asm_572f -.asm_565b - ld a, [wcc49] +.notPastLastEnemyMon + jp .enemyMonMenu +.playerMonMenu_RightNotPressed + bit 7, a ; Down pressed? + jr z, .getNewInput + jp .selectedCancelMenuItem ; jump if Down pressed +.getNewInput + ld a, [wWhichTradeMonSelectionMenu] and a - jp z, .asm_5601 - jp .asm_5574 -.asm_5665 + jp z, .playerMonMenu_HandleInput + jp .enemyMonMenu_HandleInput +.chosePlayerMon call SaveScreenTilesToBuffer1 call PlaceUnfilledArrowMenuCursor ld a, [wMaxMenuItem] ld c, a ld a, [wCurrentMenuItem] cp c - jr c, .asm_5679 ; 0x5673 $4 + jr c, .displayStatsTradeMenu ld a, [wMaxMenuItem] dec a -.asm_5679 +.displayStatsTradeMenu push af - ld hl, wTileMap + $118 - ld b, $2 - ld c, $12 - call Func_5ab3 - ld hl, wTileMap + $142 + hlCoord 0, 14 + ld b, 2 + ld c, 18 + call CableClub_TextBoxBorder + hlCoord 2, 16 ld de, .statsTrade call PlaceString xor a @@ -462,107 +476,109 @@ TradeCenter_SelectMon: ld [wLastMenuItem], a ld [wMenuJoypadPollCount], a ld [wMaxMenuItem], a - ld a, $10 + ld a, 16 ld [wTopMenuItemY], a -.asm_569f - ld a, $7f - ld [wTileMap + $14b], a - ld a, $13 +.selectStatsMenuItem + ld a, " " + Coorda 11, 16 + ld a, D_RIGHT | B_BUTTON | A_BUTTON ld [wMenuWatchedKeys], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a call HandleMenuInput - bit 4, a - jr nz, .asm_56c3 ; 0x56b3 $e - bit 1, a - jr z, .asm_56df ; 0x56b7 $26 -.asm_56b9 + bit 4, a ; Right pressed? + jr nz, .selectTradeMenuItem + bit 1, a ; B button pressed? + jr z, .displayPlayerMonStats +.cancelPlayerMonChoice pop af ld [wCurrentMenuItem], a call LoadScreenTilesFromBuffer1 - jp .asm_55dc -.asm_56c3 - ld a, $7f - ld [wTileMap + $141], a - ld a, $23 + jp .playerMonMenu +.selectTradeMenuItem + ld a, " " + Coorda 1, 16 + ld a, D_LEFT | B_BUTTON | A_BUTTON ld [wMenuWatchedKeys], a - ld a, $b + ld a, 11 ld [wTopMenuItemX], a call HandleMenuInput - bit 5, a - jr nz, .asm_569f ; 0x56d7 $c6 - bit 1, a - jr nz, .asm_56b9 ; 0x56db $dc - jr .asm_56f9 ; 0x56dd $1a -.asm_56df + bit 5, a ; Left pressed? + jr nz, .selectStatsMenuItem + bit 1, a ; B button pressed? + jr nz, .cancelPlayerMonChoice + jr .choseTrade +.displayPlayerMonStats pop af ld [wCurrentMenuItem], a ld a, $4 ld [wd11b], a callab Func_39bd5 - call Func_57d6 + call TradeCenter_DisplayStats call LoadScreenTilesFromBuffer1 - jp .asm_55dc -.asm_56f9 + jp .playerMonMenu +.choseTrade call PlaceUnfilledArrowMenuCursor pop af ld [wCurrentMenuItem], a - ld [wWhichTrade], a - ld [wcc42], a - call Func_226e - ld a, [wcc3d] + ld [wTradingWhichPlayerMon], a + ld [wSerialExchangeNybbleSendData], a + call Serial_PrintWaitingTextAndSyncAndExchangeNybble + ld a, [wSerialSyncAndExchangeNybbleReceiveData] cp $f - jp z, Func_551c - ld [wTrainerEngageDistance], a - call Func_57c7 - ld a, $1 - ld [wcc38], a - jp Func_551c + jp z, CallCurrentTradeCenterFunction ; go back to the beginning of the trade selection menu if the other person cancelled + ld [wTradingWhichEnemyMon], a + call TradeCenter_PlaceSelectedEnemyMonMenuCursor + ld a, $1 ; TradeCenter_Trade + ld [wTradeCenterPointerTableIndex], a + jp CallCurrentTradeCenterFunction .statsTrade db "STATS TRADE@" -.asm_572f +.selectedCancelMenuItem ld a, [wCurrentMenuItem] ld b, a ld a, [wMaxMenuItem] cp b - jp nz, .asm_565b + jp nz, .getNewInput ld a, [wMenuCursorLocation] ld l, a ld a, [wMenuCursorLocation + 1] ld h, a - ld a, $7f + ld a, " " ld [hl], a -.asm_5745 - ld a, $ed - ld [wTileMap + $141], a -.asm_574a +.cancelMenuItem_Loop + ld a, $ed ; filled arrow cursor + Coorda 1, 16 +.cancelMenuItem_JoypadLoop call JoypadLowSensitivity ld a, [$ffb5] - and a - jr z, .asm_574a ; 0x5750 $f8 - bit 0, a - jr nz, .asm_5769 ; 0x5754 $13 - bit 6, a - jr z, .asm_574a ; 0x5758 $f0 - ld a, $7f - ld [wTileMap + $141], a + and a ; pressed anything? + jr z, .cancelMenuItem_JoypadLoop + bit 0, a ; A button pressed? + jr nz, .cancelMenuItem_APressed + bit 6, a ; Up pressed? + jr z, .cancelMenuItem_JoypadLoop +; if Up pressed + ld a, " " + Coorda 1, 16 ld a, [wPartyCount] dec a ld [wCurrentMenuItem], a - jp .asm_55dc -.asm_5769 - ld a, $ec - ld [wTileMap + $141], a + jp .playerMonMenu +.cancelMenuItem_APressed + ld a, $ec ; unfilled arrow cursor + Coorda 1, 16 ld a, $f - ld [wcc42], a - call Func_226e - ld a, [wcc3d] - cp $f - jr nz, .asm_5745 ; 0x577b $c8 + ld [wSerialExchangeNybbleSendData], a + call Serial_PrintWaitingTextAndSyncAndExchangeNybble + ld a, [wSerialSyncAndExchangeNybbleReceiveData] + cp $f ; did the other person choose Cancel too? + jr nz, .cancelMenuItem_Loop + ; fall through -Func_577d: ; 577d (1:577d) +ReturnToCableClubRoom: ; 577d (1:577d) call GBPalWhiteOutWithDelay3 - ld hl, wcfc4 + ld hl, wFontLoaded ld a, [hl] push af push hl @@ -570,73 +586,74 @@ Func_577d: ; 577d (1:577d) xor a ld [wd72d], a dec a - ld [wd42f], a + ld [wDestinationWarpID], a call LoadMapData - callba Func_c335 + callba ClearVariablesAfterLoadingMapData pop hl pop af ld [hl], a - call GBFadeIn2 + call GBFadeInFromWhite ret -Func_57a2: - ld hl, wTileMap + $137 +TradeCenter_DrawCancelBox: + hlCoord 11, 15 ld a, $7e - ld bc, $0031 + ld bc, 2 * 20 + 9 call FillMemory - ld hl, wTileMap + $12c - ld b, $1 - ld c, $9 - call Func_5ab3 - ld hl, wTileMap + $142 + hlCoord 0, 15 + ld b, 1 + ld c, 9 + call CableClub_TextBoxBorder + hlCoord 2, 16 ld de, CancelTextString jp PlaceString CancelTextString: db "CANCEL@" -Func_57c7: - ld a, [wcc3d] - ld hl, wTileMap + $b5 - ld bc, $0014 +TradeCenter_PlaceSelectedEnemyMonMenuCursor: + ld a, [wSerialSyncAndExchangeNybbleReceiveData] + hlCoord 1, 9 + ld bc, 20 call AddNTimes - ld [hl], $ec + ld [hl], $ec ; cursor ret -Func_57d6: +TradeCenter_DisplayStats: ld a, [wCurrentMenuItem] ld [wWhichPokemon], a predef StatusScreen predef StatusScreen2 call GBPalNormal call LoadTrainerInfoTextBoxTiles - call Func_57f2 - jp Func_57a2 + call TradeCenter_DrawPartyLists + jp TradeCenter_DrawCancelBox -Func_57f2: - ld hl, wTileMap - ld b, $6 - ld c, $12 - call Func_5ab3 - ld hl, wTileMap + $a0 - ld b, $6 - ld c, $12 - call Func_5ab3 - ld hl, wTileMap + $5 +TradeCenter_DrawPartyLists: + hlCoord 0, 0 + ld b, 6 + ld c, 18 + call CableClub_TextBoxBorder + hlCoord 0, 8 + ld b, 6 + ld c, 18 + call CableClub_TextBoxBorder + hlCoord 5, 0 ld de, wPlayerName call PlaceString - ld hl, wTileMap + $a5 - ld de, W_GRASSRATE + hlCoord 5, 8 + ld de, wLinkEnemyTrainerName call PlaceString - ld hl, wTileMap + $16 + hlCoord 2, 1 ld de, wPartySpecies - call Func_5827 - ld hl, wTileMap + $b6 + call TradeCenter_PrintPartyListNames + hlCoord 2, 9 ld de, wEnemyPartyMons + ; fall through -Func_5827: +TradeCenter_PrintPartyListNames: ld c, $0 -.asm_5829 +.loop ld a, [de] cp $ff ret z @@ -653,144 +670,146 @@ Func_5827: pop de inc de pop hl - ld bc, $0014 + ld bc, 20 add hl, bc pop bc inc c - jr .asm_5829 ; 0x5847 $e0 + jr .loop TradeCenter_Trade: - ld c, $64 + ld c, 100 call DelayFrames xor a - ld [wcc43], a - ld [wcc3e], a + ld [wSerialExchangeNybbleSendData + 1], a ; unnecessary + ld [wSerialExchangeNybbleReceiveData], a ld [wcc37], a ld [wMenuJoypadPollCount], a - ld hl, wTileMap + $f0 - ld b, $4 - ld c, $12 - call Func_5ab3 - ld a, [wWhichTrade] + hlCoord 0, 12 + ld b, 4 + ld c, 18 + call CableClub_TextBoxBorder + ld a, [wTradingWhichPlayerMon] ld hl, wPartySpecies ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] ld [wd11e], a call GetMonName ld hl, wcd6d - ld de, wTrainerFacingDirection - ld bc, $000b + ld de, wNameOfPlayerMonToBeTraded + ld bc, 11 call CopyData - ld a, [wTrainerEngageDistance] + ld a, [wTradingWhichEnemyMon] ld hl, wEnemyPartyMons ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] ld [wd11e], a call GetMonName ld hl, WillBeTradedText - ld bc, wTileMap + $119 + bcCoord 1, 14 call TextCommandProcessor call SaveScreenTilesToBuffer1 - ld hl, wTileMap + $96 + hlCoord 10, 7 ld bc, $080b - ld a, $5 - ld [wd12c], a - ld a, $14 - ld [wd125], a + ld a, TRADE_CANCEL_MENU + ld [wTwoOptionMenuID], a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID call LoadScreenTilesFromBuffer1 ld a, [wCurrentMenuItem] and a - jr z, .asm_58d9 ; 0x58b9 $1e + jr z, .tradeConfirmed +; if trade cancelled ld a, $1 - ld [wcc42], a - ld hl, wTileMap + $f0 - ld b, $4 - ld c, $12 - call Func_5ab3 - ld hl, wTileMap + $119 + ld [wSerialExchangeNybbleSendData], a + hlCoord 0, 12 + ld b, 4 + ld c, 18 + call CableClub_TextBoxBorder + hlCoord 1, 14 ld de, TradeCanceled call PlaceString - call Func_226e - jp Func_5a18 -.asm_58d9 + call Serial_PrintWaitingTextAndSyncAndExchangeNybble + jp .tradeCancelled +.tradeConfirmed ld a, $2 - ld [wcc42], a - call Func_226e - ld a, [wcc3d] - dec a - jr nz, .asm_58fd ; 0x58e5 $16 - ld hl, wTileMap + $f0 - ld b, $4 - ld c, $12 - call Func_5ab3 - ld hl, wTileMap + $119 + ld [wSerialExchangeNybbleSendData], a + call Serial_PrintWaitingTextAndSyncAndExchangeNybble + ld a, [wSerialSyncAndExchangeNybbleReceiveData] + dec a ; did the other person cancel? + jr nz, .doTrade +; if the other person cancelled + hlCoord 0, 12 + ld b, 4 + ld c, 18 + call CableClub_TextBoxBorder + hlCoord 1, 14 ld de, TradeCanceled call PlaceString - jp Func_5a18 -.asm_58fd - ld a, [wWhichTrade] - ld hl, wPartyMonOT ; OT names of player + jp .tradeCancelled +.doTrade + ld a, [wTradingWhichPlayerMon] + ld hl, wPartyMonOT call SkipFixedLengthTextEntries - ld de, wTrainerScreenX - ld bc, $000b + ld de, wTradedPlayerMonOT + ld bc, 11 call CopyData ld hl, wPartyMon1Species - ld a, [wWhichTrade] - ld bc, $002c + ld a, [wTradingWhichPlayerMon] + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes - ld bc, $000c + ld bc, wPartyMon1OTID - wPartyMon1 add hl, bc ld a, [hli] - ld [wcd4c], a + ld [wTradedPlayerMonOTID], a ld a, [hl] - ld [wcd4d], a - ld a, [wTrainerEngageDistance] - ld hl, wEnemyMonOT ; OT names of other player + ld [wTradedPlayerMonOTID + 1], a + ld a, [wTradingWhichEnemyMon] + ld hl, wEnemyMonOT call SkipFixedLengthTextEntries - ld de, wcd4e - ld bc, $000b + ld de, wTradedEnemyMonOT + ld bc, 11 call CopyData ld hl, wEnemyMons - ld a, [wTrainerEngageDistance] - ld bc, $002c + ld a, [wTradingWhichEnemyMon] + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes - ld bc, $000c + ld bc, wEnemyMon1OTID - wEnemyMon1 add hl, bc ld a, [hli] - ld [wcd59], a + ld [wTradedEnemyMonOTID], a ld a, [hl] - ld [wcd5a], a - ld a, [wWhichTrade] + ld [wTradedEnemyMonOTID + 1], a + ld a, [wTradingWhichPlayerMon] ld [wWhichPokemon], a ld hl, wPartySpecies - ld b, $0 + ld b, 0 ld c, a add hl, bc ld a, [hl] - ld [wWhichTrade], a + ld [wTradedPlayerMonSpecies], a xor a ld [wcf95], a call RemovePokemon - ld a, [wTrainerEngageDistance] + ld a, [wTradingWhichEnemyMon] ld c, a ld [wWhichPokemon], a ld hl, wEnemyPartyMons - ld d, $0 + ld d, 0 ld e, a add hl, de ld a, [hl] ld [wcf91], a ld hl, wEnemyMons ld a, c - ld bc, $002c + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes - ld de, wcf98 - ld bc, $002c + ld de, wLoadedMon + ld bc, wEnemyMon2 - wEnemyMon1 call CopyData call AddEnemyMonToPlayerParty ld a, [wPartyCount] @@ -798,13 +817,13 @@ TradeCenter_Trade: ld [wWhichPokemon], a ld a, $1 ld [wccd4], a - ld a, [wTrainerEngageDistance] + ld a, [wTradingWhichEnemyMon] ld hl, wEnemyPartyMons - ld b, $0 + ld b, 0 ld c, a add hl, bc ld a, [hl] - ld [wTrainerEngageDistance], a + ld [wTradedEnemyMonSpecies], a ld a, $a ld [wMusicHeaderPointer], a ld a, $2 @@ -812,46 +831,45 @@ TradeCenter_Trade: ld a, MUSIC_SAFARI_ZONE ld [wc0ee], a call PlaySound - ld c, $64 + ld c, 100 call DelayFrames call ClearScreen call LoadHpBarAndStatusTilePatterns xor a ld [wcc5b], a - ld a, [$ffaa] - cp $1 - jr z, .asm_59d9 ; 0x59d0 $7 + ld a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .usingExternalClock predef Func_410e2 - jr .asm_59de ; 0x59d7 $5 -.asm_59d9 + jr .tradeCompleted +.usingExternalClock predef Func_410f3 -.asm_59de - callab Func_3ad0e +.tradeCompleted + callab TryEvolvingMon call ClearScreen call LoadTrainerInfoTextBoxTiles - call Func_226e - ld c, $28 + call Serial_PrintWaitingTextAndSyncAndExchangeNybble + ld c, 40 call DelayFrames - ld hl, wTileMap + $f0 - ld b, $4 - ld c, $12 - call Func_5ab3 - ld hl, wTileMap + $119 + hlCoord 0, 12 + ld b, 4 + ld c, 18 + call CableClub_TextBoxBorder + hlCoord 1, 14 ld de, TradeCompleted call PlaceString predef SaveSAVtoSRAM2 - ld c, $32 + ld c, 50 call DelayFrames xor a - ld [wcc38], a - jp Func_5345 - -Func_5a18: - ld c, $64 + ld [wTradeCenterPointerTableIndex], a + jp CableClub_DoBattleOrTradeAgain +.tradeCancelled + ld c, 100 call DelayFrames - xor a - ld [wcc38], a - jp Func_551c + xor a ; TradeCenter_SelectMon + ld [wTradeCenterPointerTableIndex], a + jp CallCurrentTradeCenterFunction WillBeTradedText: ; 5a24 (1:5a24) TX_FAR _WillBeTradedText @@ -864,22 +882,22 @@ TradeCanceled: db "Too bad! The trade" next "was canceled!@" -PointerTable_5a5b: ; 5a5b (1:5a5b) +TradeCenterPointerTable: ; 5a5b (1:5a5b) dw TradeCenter_SelectMon dw TradeCenter_Trade -Func_5a5f: ; 5a5f (1:5a5f) - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $2 - jr z, .asm_5a75 - cp $3 - jr z, .asm_5a75 - cp $5 +CableClub_Run: ; 5a5f (1:5a5f) + ld a, [wLinkState] + cp LINK_STATE_START_TRADE + jr z, .doBattleOrTrade + cp LINK_STATE_START_BATTLE + jr z, .doBattleOrTrade + cp LINK_STATE_RESET ; this is never used ret nz - predef Func_5aaf + predef EmptyFunc3 jp Init -.asm_5a75 - call Func_5317 +.doBattleOrTrade + call CableClub_DoBattleOrTrade ld hl, Club_GFX ld a, h ld [W_TILESETGFXPTR + 1], a @@ -893,9 +911,9 @@ Func_5a5f: ; 5a5f (1:5a5f) ld a, l ld [W_TILESETCOLLISIONPTR], a xor a - ld [W_GRASSRATE], a ; W_GRASSRATE - inc a - ld [W_ISLINKBATTLE], a ; W_ISLINKBATTLE + ld [W_GRASSRATE], a + inc a ; LINK_STATE_IN_CABLE_CLUB + ld [wLinkState], a ld [$ffb5], a ld a, $a ld [wMusicHeaderPointer], a @@ -905,43 +923,46 @@ Func_5a5f: ; 5a5f (1:5a5f) ld [wc0ee], a jp PlaySound -Func_5aaf: ; 5aaf (1:5aaf) +EmptyFunc3: ; 5aaf (1:5aaf) ret -Func_5ab0: +Diploma_TextBoxBorder: ; 5ab0 (1:5ab0) call GetPredefRegisters -Func_5ab3: ; 5ab3 (1:5ab3) +; b = height +; c = width +CableClub_TextBoxBorder: ; 5ab3 (1:5ab3) push hl - ld a, $78 + ld a, $78 ; border upper left corner tile ld [hli], a - inc a - call Func_5ae0 - inc a + inc a ; border top horizontal line tile + call CableClub_DrawHorizontalLine + inc a ; border upper right corner tile ld [hl], a pop hl - ld de, $14 + ld de, 20 add hl, de -.asm_5ac2 +.loop push hl - ld a, $7b + ld a, $7b ; border left vertical line tile ld [hli], a - ld a, $7f - call Func_5ae0 - ld [hl], $77 + ld a, " " + call CableClub_DrawHorizontalLine + ld [hl], $77 ; border right vertical line tile pop hl - ld de, $14 + ld de, 20 add hl, de dec b - jr nz, .asm_5ac2 - ld a, $7c + jr nz, .loop + ld a, $7c ; border lower left corner tile ld [hli], a - ld a, $76 - call Func_5ae0 - ld [hl], $7d + ld a, $76 ; border bottom horizontal line tile + call CableClub_DrawHorizontalLine + ld [hl], $7d ; border lower right corner tile ret -Func_5ae0: ; 5ae0 (1:5ae0) +; c = width +CableClub_DrawHorizontalLine: ; 5ae0 (1:5ae0) ld d, c .asm_5ae1 ld [hli], a diff --git a/engine/clear_save.asm b/engine/clear_save.asm index 5ef0d4757f..66d7e9202c 100755 --- a/engine/clear_save.asm +++ b/engine/clear_save.asm @@ -1,4 +1,4 @@ -Func_1c98a: ; 1c98a (7:498a) +DoClearSaveDialogue: ; 1c98a (7:498a) call ClearScreen call GoPAL_SET_CF1C call LoadFontTilePatterns @@ -7,15 +7,15 @@ Func_1c98a: ; 1c98a (7:498a) call PrintText hlCoord 14, 7 ld bc, $80f - ld a, $7 - ld [wd12c], a - ld a, $14 - ld [wd125], a + ld a, NO_YES_MENU + ld [wTwoOptionMenuID], a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a jp z, Init - callba Func_73b6a + callba ClearSAV jp Init ClearSaveDataText: ; 1c9c1 (7:49c1) diff --git a/engine/evolution.asm b/engine/evolution.asm index 07ccdbda97..5842f1a215 100755 --- a/engine/evolution.asm +++ b/engine/evolution.asm @@ -19,7 +19,7 @@ Func_7bde9: ; 7bde9 (1e:7de9) call Delay3 xor a ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld [$ffd7], a + ld [hTilesetType], a ld a, [wHPBarMaxHP] ld [wcf1d], a ld c, $0 @@ -140,7 +140,7 @@ asm_7befa: ; 7befa (1e:7efa) call DelayFrame push bc call JoypadLowSensitivity - ld a, [$ffb5] + ld a, [hJoy5] pop bc and $2 jr nz, .asm_7bf0d diff --git a/engine/evolve_trade.asm b/engine/evolve_trade.asm index ffb8a7789d..ec230677f3 100755 --- a/engine/evolve_trade.asm +++ b/engine/evolve_trade.asm @@ -17,7 +17,7 @@ EvolveTradeMon: ; 17d7d (5:7d7d) ; This was fixed in Yellow. - ld a, [wTradeMonNick] + ld a, [wInGameTradeReceiveMonName] ; GRAVELER cp "G" @@ -26,7 +26,7 @@ EvolveTradeMon: ; 17d7d (5:7d7d) ; "SPECTRE" (HAUNTER) cp "S" ret nz - ld a, [wTradeMonNick + 1] + ld a, [wInGameTradeReceiveMonName + 1] cp "P" ret nz @@ -36,9 +36,9 @@ EvolveTradeMon: ; 17d7d (5:7d7d) ld [wWhichPokemon], a ; wWhichPokemon ld a, $1 ld [wccd4], a - ld a, $32 - ld [W_ISLINKBATTLE], a ; W_ISLINKBATTLE - callab Func_3ad0e - xor a - ld [W_ISLINKBATTLE], a ; W_ISLINKBATTLE - jp Func_2307 + ld a, LINK_STATE_TRADING + ld [wLinkState], a + callab TryEvolvingMon + xor a ; LINK_STATE_NONE + ld [wLinkState], a + jp PlayDefaultMusic diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm index fd93fa1459..23bffa8dc0 100755 --- a/engine/evos_moves.asm +++ b/engine/evos_moves.asm @@ -1,45 +1,49 @@ -Func_3ad0e: ; 3ad0e (e:6d0e) +; try to evolve the mon in [wWhichPokemon] +TryEvolvingMon: ; 3ad0e (e:6d0e) ld hl, wccd3 xor a ld [hl], a - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld c, a ld b, $1 - call Func_3b057 + call Evolution_FlagAction -Func_3ad1c: ; 3ad1c (e:6d1c) - ld a, [$ffd7] +; 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) + ld a, [hTilesetType] push af xor a ld [wd121], a dec a - ld [wWhichPokemon], a ; wWhichPokemon + ld [wWhichPokemon], a push hl push bc push de - ld hl, wPartyCount ; wPartyCount + ld hl, wPartyCount push hl -asm_3ad2e: ; 3ad2e (e:6d2e) - ld hl, wWhichPokemon ; wWhichPokemon + +Evolution_PartyMonLoop: ; loop over party mons + ld hl, wWhichPokemon inc [hl] pop hl inc hl ld a, [hl] - cp $ff - jp z, Func_3aede + cp $ff ; have we reached the end of the party? + jp z, .done ld [wHPBarMaxHP], a push hl - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld c, a ld hl, wccd3 ld b, $2 - call Func_3b057 + call Evolution_FlagAction ld a, c - and a - jp z, asm_3ad2e + and a ; is the mon's bit set? + jp z, Evolution_PartyMonLoop ; if not, go to the next mon ld a, [wHPBarMaxHP] dec a - ld b, $0 + ld b, 0 ld hl, EvosMovesPointerTable add a rl b @@ -58,56 +62,57 @@ asm_3ad2e: ; 3ad2e (e:6d2e) ld [wcf91], a pop hl -Func_3ad71: ; 3ad71 (e:6d71) +.evoEntryLoop ; loop over evolution entries ld a, [hli] - and a - jr z, asm_3ad2e - ld b, a - cp $3 - jr z, .asm_3ad91 - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $32 - jr z, asm_3ad2e + and a ; have we reached the end of the evolution data? + jr z, Evolution_PartyMonLoop + ld b, a ; evolution type + cp EV_TRADE + jr z, .checkTradeEvo +; not trade evolution + ld a, [wLinkState] + cp LINK_STATE_TRADING + jr z, Evolution_PartyMonLoop ; if trading, go the next mon ld a, b - cp $2 - jr z, .asm_3ada4 + cp EV_ITEM + jr z, .checkItemEvo ld a, [wccd4] and a - jr nz, asm_3ad2e + jr nz, Evolution_PartyMonLoop ld a, b - cp $1 - jr z, .asm_3adad -.asm_3ad91 - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $32 - jp nz, Func_3aed9 - ld a, [hli] + cp EV_LEVEL + jr z, .checkLevel +.checkTradeEvo + ld a, [wLinkState] + cp LINK_STATE_TRADING + jp nz, .nextEvoEntry1 ; if not trading, go to the next evolution entry + ld a, [hli] ; level requirement ld b, a - ld a, [wcfb9] - cp b - jp c, asm_3ad2e + 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 -.asm_3ada4 - ld a, [hli] - ld b, a - ld a, [wcf91] - cp b - jp nz, Func_3aed9 -.asm_3adad +.checkItemEvo ld a, [hli] + ld b, a ; evolution item + ld a, [wcf91] ; this is supposed to be the last item used, but it is also used to hold species numbers + cp b ; was the evolution item in this entry used? + jp nz, .nextEvoEntry1 ; if not, go to the next evolution entry +.checkLevel + ld a, [hli] ; level requirement ld b, a - ld a, [wcfb9] - cp b - jp c, Func_3aeda + 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 ; W_CURENEMYLVL + ld [W_CURENEMYLVL], a ld a, $1 ld [wd121], a push hl ld a, [hl] ld [wHPBarMaxHP + 1], a - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMonNicks ; wPartyMonNicks + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName call CopyStringToCF4B ld hl, IsEvolvingText @@ -115,27 +120,27 @@ Func_3ad71: ; 3ad71 (e:6d71) ld c, $32 call DelayFrames xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld hl, wTileMap ld bc, $c14 call ClearScreenArea ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld a, $ff - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call ClearSprites callab Func_7bde9 - jp c, Func_3af2e + jp c, CancelledEvolution ld hl, EvolvedText call PrintText pop hl ld a, [hl] ld [wd0b5], a - ld [wcf98], a + ld [wLoadedMonSpecies], a ld [wHPBarMaxHP + 1], a ld a, MONSTER_NAME - ld [W_LISTTYPE], a - ld a, $e + ld [wNameListType], a + ld a, BANK(TrainerNames) ; bank is not used for monster names ld [wPredefBank], a call GetName push hl @@ -147,7 +152,7 @@ Func_3ad71: ; 3ad71 (e:6d71) ld c, $28 call DelayFrames call ClearScreen - call Func_3aef7 + call RenameEvolvedMon ld a, [wd11e] push af ld a, [wd0b5] @@ -164,31 +169,31 @@ Func_3ad71: ; 3ad71 (e:6d71) ld [W_MONHDEXNUM], a pop af ld [wd11e], a - ld hl, wcfa8 - ld de, wcfba + ld hl, wLoadedMonHPExp - 1 + ld de, wLoadedMonStats ld b, $1 call CalcStats - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1) - ld bc, $2c + ld a, [wWhichPokemon] + ld hl, wPartyMon1 + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld e, l ld d, h push hl push bc - ld bc, $22 + ld bc, wPartyMon1MaxHP - wPartyMon1 add hl, bc ld a, [hli] ld b, a ld c, [hl] - ld hl, wcfbb + ld hl, wLoadedMonMaxHP + 1 ld a, [hld] sub c ld c, a ld a, [hl] sbc b ld b, a - ld hl, wcf9a + ld hl, wLoadedMonHP + 1 ld a, [hl] add c ld [hld], a @@ -202,57 +207,59 @@ Func_3ad71: ; 3ad71 (e:6d71) ld [wd11e], a xor a ld [wcc49], a - call Func_3af5b + call LearnMoveFromLevelUp pop hl predef SetPartyMonTypes - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a - call z, Func_3af52 + call z, Evolution_ReloadTilesetTilePatterns predef IndexToPokedex ld a, [wd11e] dec a ld c, a ld b, $1 - ld hl, wPokedexOwned ; wPokedexOwned + ld hl, wPokedexOwned push bc - call Func_3b057 + call Evolution_FlagAction pop bc - ld hl, wPokedexSeen ; wd30a - call Func_3b057 + ld hl, wPokedexSeen + call Evolution_FlagAction pop de pop hl - ld a, [wcf98] + ld a, [wLoadedMonSpecies] ld [hl], a push hl ld l, e ld h, d - jr Func_3aeda + jr .nextEvoEntry2 -Func_3aed9: ; 3aed9 (e:6ed9) +.nextEvoEntry1 inc hl -Func_3aeda: ; 3aeda (e:6eda) +.nextEvoEntry2 inc hl - jp Func_3ad71 + jp .evoEntryLoop -Func_3aede: ; 3aede (e:6ede) +.done pop de pop bc pop hl pop af - ld [$ffd7], a - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $32 + ld [hTilesetType], a + ld a, [wLinkState] + cp LINK_STATE_TRADING ret z - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a ret nz ld a, [wd121] and a - call nz, Func_2307 + call nz, PlayDefaultMusic ret -Func_3aef7: ; 3aef7 (e:6ef7) +; 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) ld a, [wd0b5] push af ld a, [W_MONHDEXNUM] @@ -262,17 +269,17 @@ Func_3aef7: ; 3aef7 (e:6ef7) ld [wd0b5], a ld hl, wcd6d ld de, wcf4b -.asm_3af0e +.compareNamesLoop ld a, [de] inc de cp [hl] inc hl ret nz cp $50 - jr nz, .asm_3af0e - ld a, [wWhichPokemon] ; wWhichPokemon + jr nz, .compareNamesLoop + ld a, [wWhichPokemon] ld bc, $b - ld hl, wPartyMonNicks ; wPartyMonNicks + ld hl, wPartyMonNicks call AddNTimes push hl call GetName @@ -280,13 +287,13 @@ Func_3aef7: ; 3aef7 (e:6ef7) pop de jp CopyData -Func_3af2e: ; 3af2e (e:6f2e) +CancelledEvolution: ; 3af2e (e:6f2e) ld hl, StoppedEvolvingText call PrintText call ClearScreen pop hl - call Func_3af52 - jp asm_3ad2e + call Evolution_ReloadTilesetTilePatterns + jp Evolution_PartyMonLoop EvolvedText: ; 3af3e (e:6f3e) TX_FAR _EvolvedText @@ -304,18 +311,18 @@ IsEvolvingText: ; 3af4d (e:6f4d) TX_FAR _IsEvolvingText db "@" -Func_3af52: ; 3af52 (e:6f52) - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $32 +Evolution_ReloadTilesetTilePatterns: ; 3af52 (e:6f52) + ld a, [wLinkState] + cp LINK_STATE_TRADING ret z jp ReloadTilesetTilePatterns -Func_3af5b: ; 3af5b (e:6f5b) +LearnMoveFromLevelUp: ; 3af5b (e:6f5b) ld hl, EvosMovesPointerTable - ld a, [wd11e] + ld a, [wd11e] ; species ld [wcf91], a dec a - ld bc, $0 + ld bc, 0 ld hl, EvosMovesPointerTable add a rl b @@ -324,42 +331,45 @@ Func_3af5b: ; 3af5b (e:6f5b) ld a, [hli] ld h, [hl] ld l, a -.asm_3af73 - ld a, [hli] - and a - jr nz, .asm_3af73 -.asm_3af77 +.skipEvolutionDataLoop ; loop to skip past the evolution data, which comes before the move data ld a, [hli] - and a - jr z, .asm_3afb1 - ld b, a - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL - cp b + and a ; have we reached the end of the evolution data? + jr nz, .skipEvolutionDataLoop ; if not, jump back up +.learnSetLoop ; loop over the learn set until we reach a move that is learnt at the current level or the end of the list ld a, [hli] - jr nz, .asm_3af77 - ld d, a + 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] + 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] and a - jr nz, .asm_3af96 - ld hl, wPartyMon1Moves ; wPartyMon1Moves - ld a, [wWhichPokemon] ; wWhichPokemon - ld bc, $2c + 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 + ld hl, wPartyMon1Moves + ld a, [wWhichPokemon] + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes -.asm_3af96 +.next ld b, $4 -.asm_3af98 +.checkCurrentMovesLoop ; check if the move to learn is already known ld a, [hli] cp d - jr z, .asm_3afb1 + jr z, .done ; if already known, jump dec b - jr nz, .asm_3af98 + jr nz, .checkCurrentMovesLoop ld a, d - ld [wd0e0], a + ld [wMoveNum], a ld [wd11e], a call GetMoveName call CopyStringToCF4B predef LearnMove -.asm_3afb1 +.done ld a, [wcf91] ld [wd11e], a ret @@ -484,7 +494,7 @@ WriteMonMoves_ShiftMoveData: ; 3b04e (e:704e) jr nz, .asm_3b050 ret -Func_3b057: ; 3b057 (e:7057) +Evolution_FlagAction: ; 3b057 (e:7057) predef_jump FlagActionPredef INCLUDE "data/evos_moves.asm" diff --git a/engine/experience.asm b/engine/experience.asm index 07726821b8..68d22843e6 100755 --- a/engine/experience.asm +++ b/engine/experience.asm @@ -1,28 +1,30 @@ -Func_58f43: ; 58f43 (16:4f43) - ld a, [wcf98] +; calculates the level a mon should be based on its current exp +CalcLevelFromExperience: ; 58f43 (16:4f43) + ld a, [wLoadedMonSpecies] ld [wd0b5], a call GetMonHeader - ld d, $1 -.asm_58f4e - inc d + ld d, $1 ; init level to 1 +.loop + inc d ; increment level call CalcExperience push hl - ld hl, wcfa8 - ld a, [$ff98] + ld hl, wLoadedMonExp + 2 ; current exp +; compare exp needed for level d with current exp + ld a, [H_MULTIPLICAND + 2] ld c, a ld a, [hld] sub c - ld a, [$ff97] + ld a, [H_MULTIPLICAND + 1] ld c, a ld a, [hld] sbc c - ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND) + ld a, [H_MULTIPLICAND] ld c, a ld a, [hl] sbc c pop hl - jr nc, .asm_58f4e - dec d + jr nc, .loop ; if exp needed for level d is not greater than exp, try the next level + dec d ; since the exp was too high on the last loop iteration, go back to the previous value and return ret ; calculates the amount of experience needed for level d diff --git a/engine/game_corner_slots.asm b/engine/game_corner_slots.asm index 0ab7492793..52f61daf94 100755 --- a/engine/game_corner_slots.asm +++ b/engine/game_corner_slots.asm @@ -10,7 +10,7 @@ StartSlotMachine: ; 37e2d (d:7e2d) ld a, [wTrainerSpriteOffset] and a ret z - ld a, [wcd05] + ld a, [wUnknownSlotVar] ld b, a ld a, [wTrainerFacingDirection] inc a diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm index 9399fb050d..64876d22ca 100755 --- a/engine/give_pokemon.asm +++ b/engine/give_pokemon.asm @@ -3,33 +3,33 @@ _GivePokemon: ; 4fda5 (13:7da5) xor a ld [wccd3], a ld a, [wPartyCount] ; wPartyCount - cp $6 + cp PARTY_LENGTH jr c, .asm_4fe01 ld a, [W_NUMINBOX] ; wda80 - cp $14 + cp MONS_PER_BOX jr nc, .asm_4fdf9 xor a ld [W_ENEMYBATTSTATUS3], a ; W_ENEMYBATTSTATUS3 ld a, [wcf91] ld [wEnemyMonSpecies2], a - callab Func_3eb01 + callab LoadEnemyMonData call SetPokedexOwnedFlag - callab Func_e7a4 + callab SendNewMonToBox ld hl, wcf4b ld a, [wd5a0] and $7f - cp $9 + cp 9 jr c, .asm_4fdec - sub $9 - ld [hl], $f7 + sub 9 + ld [hl], "1" inc hl - add $f6 + add "0" jr .asm_4fdee .asm_4fdec - add $f7 + add "1" .asm_4fdee ld [hli], a - ld [hl], $50 + ld [hl], "@" ld hl, SetToBoxText call PrintText scf @@ -43,7 +43,7 @@ _GivePokemon: ; 4fda5 (13:7da5) call SetPokedexOwnedFlag call AddPartyMon ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wccd3], a scf ret diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 166f9b8a17..f57db2a287 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -18,8 +18,8 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) ld bc, HOF_TEAM call FillMemory xor a - ld [wcfcb], a - ld [$ffd7], a + ld [wUpdateSpritesEnabled], a + ld [hTilesetType], a ld [W_SPRITEFLIPPED], a ld [wd358], a ld [wTrainerScreenY], a @@ -32,7 +32,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) inc [hl] .asm_701eb ld a, $90 - ld [$ffb0], a + ld [hWY], a ld c, BANK(Music_HallOfFame) ld a, MUSIC_HALL_OF_FAME call PlayMusic @@ -66,7 +66,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) call PlaceString ld c, 180 call DelayFrames - call GBFadeOut2 + call GBFadeOutToWhite pop bc pop hl jr .asm_701fb @@ -86,7 +86,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) call Func_70377 call Func_70423 xor a - ld [$ffb0], a + ld [hWY], a ld hl, rLCDC ; $ff40 res 3, [hl] ret @@ -97,9 +97,9 @@ HallOfFameText: ; 7026b (1c:426b) Func_70278: ; 70278 (1c:4278) call ClearScreen ld a, $d0 - ld [$ffaf], a + ld [hSCY], a ld a, $c0 - ld [$ffae], a + ld [hSCX], a ld a, [wWhichTrade] ; wWhichTrade ld [wcf91], a ld [wd0b5], a @@ -125,23 +125,23 @@ Func_70278: ; 70278 (1c:4278) call Func_7036d ld d, $a0 ld e, $4 - ld a, [wcf1b] + ld a, [wOnSGB] and a jr z, .asm_702c7 sla e .asm_702c7 call .asm_702d5 xor a - ld [$ffaf], a + ld [hSCY], a ld c, a call Func_7036d ld d, $0 ld e, $fc .asm_702d5 call DelayFrame - ld a, [$ffae] + ld a, [hSCX] add e - ld [$ffae], a + ld [hSCX], a cp d jr nz, .asm_702d5 ret @@ -170,7 +170,7 @@ Func_702f0: ; 702f0 (1c:42f0) ld a, [wWhichTrade] ; wWhichTrade ld [wd0b5], a hlCoord 3, 9 - predef Func_27d6b + predef PrintMonType ld a, [wWhichTrade] ; wWhichTrade jp PlayCry @@ -218,7 +218,7 @@ Func_7033e: ; 7033e (1c:433e) Func_7036d: ; 7036d (1c:436d) ld b, $0 hlCoord 12, 5 - predef_jump Func_79dda + predef_jump CopyTileIDsFromList Func_70377: ; 70377 (1c:4377) ld hl, wd747 @@ -300,4 +300,4 @@ Func_70423: ; 70423 (1c:4423) ld [wcfc9], a ld a, $ff ld [wMusicHeaderPointer], a - jp GBFadeOut2 + jp GBFadeOutToWhite diff --git a/engine/hidden_object_functions14.asm b/engine/hidden_object_functions14.asm index 0d3598f2ea..a162c9051c 100755 --- a/engine/hidden_object_functions14.asm +++ b/engine/hidden_object_functions14.asm @@ -1,7 +1,7 @@ PrintNotebookText: ; 52996 (14:6996) call EnableAutoTextBoxDrawing ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, [wTrainerSpriteOffset] jp PrintPredefTextID diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm index f0126b6509..9dbcbf98e8 100755 --- a/engine/hidden_object_functions17.asm +++ b/engine/hidden_object_functions17.asm @@ -64,10 +64,10 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9) ld [H_AUTOBGTRANSFERENABLED], a ; $ffba call Delay3 xor a - ld [$ffb0], a + ld [hWY], a call SaveScreenTilesToBuffer1 - ld a, $11 - ld [wd125], a + ld a, MON_SPRITE_POPUP + ld [wTextBoxID], a call DisplayTextBoxID call UpdateSprites ld a, [wcf91] @@ -83,13 +83,13 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9) call LoadScreenTilesFromBuffer1 call Delay3 ld a, $90 - ld [$ffb0], a + ld [hWY], a ret PrintBlackboardLinkCableText: ; 5dc1a (17:5c1a) call EnableAutoTextBoxDrawing ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, [wWhichTrade] call PrintPredefTextID ret diff --git a/engine/hidden_object_functions18.asm b/engine/hidden_object_functions18.asm index 5ccb43c280..7696626f2a 100755 --- a/engine/hidden_object_functions18.asm +++ b/engine/hidden_object_functions18.asm @@ -70,7 +70,7 @@ PrintBenchGuyText: ; 6245d (18:645d) ld a, [hl] jp PrintPredefTextID -; format: db map id, 08, text id of PointerTable_3f22 +; format: db map id, 08, text id of PredefTextIDPointerTable PokeCenterMapIDList: ; 6247e (18:647e) db VIRIDIAN_POKECENTER,$08,$0F db PEWTER_POKECENTER,$08,$10 @@ -181,7 +181,7 @@ OpenPokemonCenterPC: ; 62516 (18:6516) ret nz call EnableAutoTextBoxDrawing ld a, $1 - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a ld a, $1f ; PredefText1f jp PrintPredefTextID diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm index e613df2ed3..c471c7bb1d 100755 --- a/engine/hidden_object_functions3.asm +++ b/engine/hidden_object_functions3.asm @@ -1,22 +1,23 @@ ; prints text for bookshelves in buildings without sign events PrintBookshelfText: ; fb50 (3:7b50) - ld a, [wSpriteStateData1 + 9] - cp $4 - jr nz, .asm_fb7f - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + cp SPRITE_FACING_UP + jr nz, .noMatch +; facing up + ld a, [W_CURMAPTILESET] ld b, a aCoord 8, 7 ld c, a - ld hl, BookshelfTileIDs ; $7b8b -.asm_fb62 + ld hl, BookshelfTileIDs +.loop ld a, [hli] cp $ff - jr z, .asm_fb7f + jr z, .noMatch cp b - jr nz, .asm_fb7b + jr nz, .nextBookshelfEntry1 ld a, [hli] cp c - jr nz, .asm_fb7c + jr nz, .nextBookshelfEntry2 ld a, [hl] push af call EnableAutoTextBoxDrawing @@ -25,12 +26,12 @@ PrintBookshelfText: ; fb50 (3:7b50) xor a ld [$ffdb], a ret -.asm_fb7b +.nextBookshelfEntry1 inc hl -.asm_fb7c +.nextBookshelfEntry2 inc hl - jr .asm_fb62 -.asm_fb7f + jr .loop +.noMatch ld a, $ff ld [$ffdb], a ld b, BANK(PrintCardKeyText) @@ -114,12 +115,12 @@ TownMapText: ; fc12 (3:7c12) db $06 db $08 ; asm ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, wd730 set 6, [hl] call GBPalWhiteOutWithDelay3 xor a - ld [$ffb0], a + ld [hWY], a inc a ld [H_AUTOBGTRANSFERENABLED], a call LoadFontTilePatterns diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm index 848f6f3d07..f97190defd 100755 --- a/engine/hidden_object_functions7.asm +++ b/engine/hidden_object_functions7.asm @@ -60,7 +60,7 @@ SafariZoneCheckSteps: ; 1e997 (7:6997) ld [wSafariSteps + 1], a ; wd70e asm_1e9ab: ; 1e9ab (7:69ab) xor a - ld [wda46], a + ld [wSafariZoneGameOver], a ret asm_1e9b0: ; 1e9b0 (7:69b0) call EnableAutoTextBoxDrawing @@ -80,16 +80,16 @@ asm_1e9b0: ; 1e9b0 (7:69b0) call DisplayTextID xor a ld [wd528], a - ld a, $9c + ld a, SAFARI_ZONE_ENTRANCE ld [H_DOWNARROWBLINKCNT1], a ; $ff8b ld a, $3 - ld [wd42f], a + ld [wDestinationWarpID], a ld a, $5 ld [W_SAFARIZONEENTRANCECURSCRIPT], a ld hl, wd790 set 6, [hl] ld a, $1 - ld [wda46], a + ld [wSafariZoneGameOver], a ret PrintSafariGameOverText: ; 1e9ed (7:69ed) @@ -152,7 +152,7 @@ CinnabarGymQuiz: ; 1ea25 (7:6a25) ld l, a call PrintText ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a call CinnabarGymQuiz_1ea92 jp TextScriptEnd @@ -291,7 +291,7 @@ CinnabarGymQuiz_1eb0a: ; 1eb0a (7:6b0a) .asm_1eb38 pop bc ld [wd09f], a - predef Func_ee9e + predef ReplaceTileBlock ld hl, $ffdb dec [hl] jr nz, .asm_1eb0e @@ -334,7 +334,7 @@ BillsHousePC: ; 1eb6e (7:6b6e) jp PrintPredefTextID .asm_1eb8b ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $2e call PrintPredefTextID ld c, $20 @@ -357,13 +357,13 @@ BillsHousePC: ; 1eb6e (7:6b6e) ld a, (SFX_02_3a - SFX_Headers_02) / 3 call PlaySound call WaitForSoundToFinish - call Func_2307 + call PlayDefaultMusic ld hl, wd7f2 set 3, [hl] ret .asm_1ebd2 ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $2f call PrintPredefTextID ret diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm index 9ff9e3cf3b..333b0b90f7 100755 --- a/engine/hp_bar.asm +++ b/engine/hp_bar.asm @@ -203,7 +203,7 @@ UpdateHPBar_CalcHPDifference: ; fad7 (3:7ad7) UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5) push af push de - ld a, [wListMenuID] ; wListMenuID + ld a, [wHPBarType] and a jr z, .asm_fb2d ld a, [wHPBarOldHP] @@ -211,7 +211,7 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5) ld a, [wHPBarOldHP+1] ld [wcef0], a push hl - ld a, [$fff6] + ld a, [hFlags_0xFFF6] bit 0, a jr z, .asm_fb15 ld de, $9 diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index 7f0b21c164..f308a8e629 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -1,4 +1,4 @@ -Predef54: ; 71ad9 (1c:5ad9) +DoInGameTradeDialogue: ; 71ad9 (1c:5ad9) ; trigger the trade offer/action specified by wWhichTrade call SaveScreenTilesToBuffer2 ld hl,TradeMons @@ -8,15 +8,15 @@ Predef54: ; 71ad9 (1c:5ad9) sub b sub b ld c,a - ld b,$0 + ld b,0 add hl,bc ld a,[hli] - ld [wcd0f],a + ld [wInGameTradeGiveMonSpecies],a ld a,[hli] - ld [wcd34],a + ld [wInGameTradeReceiveMonSpecies],a ld a,[hli] push af - ld de,wcd29 + ld de,wInGameTradeMonNick ld bc,$000b call CopyData pop af @@ -26,16 +26,16 @@ Predef54: ; 71ad9 (1c:5ad9) add hl,hl add hl,de ld a,[hli] - ld [wcd10],a + ld [wInGameTradeTextPointerTablePointer],a ld a,[hl] - ld [wcd11],a - ld a,[wcd0f] - ld de,wcd13 - call Func_71b6a - ld a,[wcd34] - ld de,wPlayerMonAccuracyMod - call Func_71b6a - ld hl,wd737 + ld [wInGameTradeTextPointerTablePointer + 1],a + ld a,[wInGameTradeGiveMonSpecies] + ld de,wInGameTradeGiveMonName + call InGameTrade_GetMonName + ld a,[wInGameTradeReceiveMonSpecies] + ld de,wInGameTradeReceiveMonName + call InGameTrade_GetMonName + ld hl,wCompletedInGameTradeFlags ld a,[wWhichTrade] ld c,a ld b,$2 @@ -43,28 +43,29 @@ Predef54: ; 71ad9 (1c:5ad9) ld a,c and a ld a,$4 - ld [wcd12],a - jr nz,.asm_99bca ; 0x71b36 $20 + ld [wInGameTradeTextPointerTableIndex],a + jr nz,.printText +; if the trade hasn't been done yet xor a - ld [wcd12],a - call .asm_99bca + ld [wInGameTradeTextPointerTableIndex],a + call .printText ld a,$1 - ld [wcd12],a + ld [wInGameTradeTextPointerTableIndex],a call YesNoChoice ld a,[wCurrentMenuItem] and a - jr nz,.asm_99bca ; 0x71b4b $b - call Func_71c07 - jr c,.asm_99bca ; 0x71b50 $6 + jr nz,.printText + call InGameTrade_DoTrade + jr c,.printText ld hl, TradedForText call PrintText -.asm_99bca ; 0x71b58 - ld hl,wcd12 - ld a,[hld] +.printText + ld hl,wInGameTradeTextPointerTableIndex + ld a,[hld] ; wInGameTradeTextPointerTableIndex ld e,a - ld d,$0 - ld a,[hld] - ld l,[hl] + ld d,0 + ld a,[hld] ; wInGameTradeTextPointerTablePointer + 1 + ld l,[hl] ; wInGameTradeTextPointerTablePointer ld h,a add hl,de add hl,de @@ -73,7 +74,8 @@ Predef54: ; 71ad9 (1c:5ad9) ld l,a jp PrintText -Func_71b6a: ; 71b6a (1c:5b6a) +; copies name of species a to hl +InGameTrade_GetMonName: ; 71b6a (1c:5b6a) push de ld [wd11e],a call GetMonName @@ -84,30 +86,30 @@ Func_71b6a: ; 71b6a (1c:5b6a) INCLUDE "data/trades.asm" -Func_71c07: ; 71c07 (1c:5c07) +InGameTrade_DoTrade: ; 71c07 (1c:5c07) xor a ld [wd07d],a dec a - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a call DisplayPartyMenu push af - call Func_71ca2 + call InGameTrade_RestoreScreen pop af ld a,$1 - jp c,.asm_c4bc2 - ld a,[wcd0f] + jp c,.tradeFailed ; jump if the player didn't select a pokemon + ld a,[wInGameTradeGiveMonSpecies] ld b,a ld a,[wcf91] cp b ld a,$2 - jr nz,.asm_c4bc2 ; 0x71c26 $75 + jr nz,.tradeFailed ; jump if the selected mon's species is not the required one ld a,[wWhichPokemon] ld hl,wPartyMon1Level ld bc,$002c call AddNTimes ld a,[hl] ld [W_CURENEMYLVL],a - ld hl,wd737 + ld hl,wCompletedInGameTradeFlags ld a,[wWhichTrade] ld c,a ld b,$1 @@ -119,13 +121,13 @@ Func_71c07: ; 71c07 (1c:5c07) ld a,[W_CURENEMYLVL] push af call LoadHpBarAndStatusTilePatterns - call Func_71cc1 + call InGameTrade_PrepareTradeData predef Func_410e2 pop af ld [W_CURENEMYLVL],a pop af ld [wWhichPokemon],a - ld a,[wcd34] + ld a,[wInGameTradeReceiveMonSpecies] ld [wcf91],a xor a ld [wcc49],a @@ -134,64 +136,64 @@ Func_71c07: ; 71c07 (1c:5c07) ld a,$80 ld [wcc49],a call AddPartyMon - call Func_71d19 + call InGameTrade_CopyDataToReceivedMon callab EvolveTradeMon call ClearScreen - call Func_71ca2 - callba Func_eedc + call InGameTrade_RestoreScreen + callba RedrawMapView and a ld a,$3 - jr .asm_ee803 ; 0x71c9b $1 -.asm_c4bc2 ; 0x71c9d + jr .tradeSucceeded +.tradeFailed scf -.asm_ee803 ; 0x71c9e - ld [wcd12],a +.tradeSucceeded + ld [wInGameTradeTextPointerTableIndex],a ret -Func_71ca2: ; 71ca2 (1c:5ca2) +InGameTrade_RestoreScreen: ; 71ca2 (1c:5ca2) call GBPalWhiteOutWithDelay3 - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns call ReloadTilesetTilePatterns call LoadScreenTilesFromBuffer2 call Delay3 call LoadGBPal - ld c, $a + ld c, 10 call DelayFrames ld b, BANK(LoadWildData) ld hl, LoadWildData jp Bankswitch -Func_71cc1: ; 71cc1 (1c:5cc1) - ld hl, wWhichTrade ; wWhichTrade - ld a, [wcd0f] - ld [hli], a - ld a, [wcd34] - ld [hl], a - ld hl, wPartyMonOT ; wd273 +InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1) + ld hl, wTradedPlayerMonSpecies + ld a, [wInGameTradeGiveMonSpecies] + ld [hli], a ; wTradedPlayerMonSpecies + ld a, [wInGameTradeReceiveMonSpecies] + ld [hl], a ; wTradedEnemyMonSpecies + ld hl, wPartyMonOT ld bc, $b - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] call AddNTimes - ld de, wTrainerScreenX + ld de, wTradedPlayerMonOT ld bc, $b - call Func_71d11 - ld hl, String_71d59 ; $5d59 + call InGameTrade_CopyData + ld hl, InGameTrade_TrainerString ld de, wcd4e - call Func_71d11 - ld de, W_GRASSRATE ; W_GRASSRATE - call Func_71d11 - ld hl, wPartyMon1OTID ; wPartyMon1OTID - ld bc, $2c - ld a, [wWhichPokemon] ; wWhichPokemon + call InGameTrade_CopyData + ld de, W_GRASSRATE + call InGameTrade_CopyData + ld hl, wPartyMon1OTID + ld bc, wPartyMon2 - wPartyMon1 + ld a, [wWhichPokemon] call AddNTimes - ld de, wcd4c + ld de, wTradedPlayerMonOTID ld bc, $2 - call Func_71d11 + call InGameTrade_CopyData call Random ld hl, hRandomAdd - ld de, wcd59 + ld de, wTradedEnemyMonOTID jp CopyData -Func_71d11: ; 71d11 (1c:5d11) +InGameTrade_CopyData: ; 71d11 (1c:5d11) push hl push bc call CopyData @@ -199,35 +201,37 @@ Func_71d11: ; 71d11 (1c:5d11) pop hl ret -Func_71d19: ; 71d19 (1c:5d19) - ld hl, wPartyMonNicks ; wPartyMonNicks +InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19) + ld hl, wPartyMonNicks ld bc, $b - call Func_71d4f - ld hl, wcd29 + call InGameTrade_GetReceivedMonPointer + ld hl, wInGameTradeMonNick ld bc, $b call CopyData - ld hl, wPartyMonOT ; wd273 + ld hl, wPartyMonOT ld bc, $b - call Func_71d4f - ld hl, String_71d59 ; $5d59 + call InGameTrade_GetReceivedMonPointer + ld hl, InGameTrade_TrainerString ld bc, $b call CopyData - ld hl, wPartyMon1OTID ; wPartyMon1OTID - ld bc, $2c - call Func_71d4f - ld hl, wcd59 + ld hl, wPartyMon1OTID + ld bc, wPartyMon2 - wPartyMon1 + call InGameTrade_GetReceivedMonPointer + ld hl, wTradedEnemyMonOTID ld bc, $2 jp CopyData -Func_71d4f: ; 71d4f (1c:5d4f) - ld a, [wPartyCount] ; wPartyCount +; 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) + ld a, [wPartyCount] dec a call AddNTimes ld e, l ld d, h ret -String_71d59: ; 71d59 (1c:5d59) +InGameTrade_TrainerString: ; 71d59 (1c:5d59) ; "TRAINER@@@@@@@@@@" db $5d, "@@@@@@@@@@" diff --git a/engine/intro.asm b/engine/intro.asm index 801324a56f..7c0464d35c 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -5,9 +5,9 @@ PlayIntro: ; 41682 (10:5682) ld [H_AUTOBGTRANSFERENABLED], a call PlayShootingStar call PlayIntroScene - call GBFadeOut2 + call GBFadeOutToWhite xor a - ld [$ffae], a + ld [hSCX], a ld [H_AUTOBGTRANSFERENABLED], a call ClearSprites call DelayFrame @@ -21,7 +21,7 @@ PlayIntroScene: ; 4169d (10:569d) ld [rOBP0], a ld [rOBP1], a xor a - ld [$ffae], a + ld [hSCX], a ld b, $3 call Func_4183f ld a, 0 @@ -229,7 +229,7 @@ Func_4180e: ; 4180e (10:580e) jr z, .asm_4181d cp $1 jr z, .asm_4182d - ld a, [$ffae] + ld a, [hSCX] dec a dec a jr .asm_41831 @@ -243,11 +243,11 @@ Func_4180e: ; 4180e (10:580e) call Func_417ae pop de .asm_4182d - ld a, [$ffae] + ld a, [hSCX] inc a inc a .asm_41831 - ld [$ffae], a + ld [hSCX], a push de ld c, $2 call CheckForUserInterruption @@ -260,9 +260,9 @@ Func_4180e: ; 4180e (10:580e) Func_4183f: ; 4183f (10:583f) hlCoord 13, 7 -Func_41842: ; 41842 (10:5842) +CopyTileIDsFromList_ZeroBaseTileID: ; 41842 (10:5842) ld c, $0 - predef_jump Func_79dda + predef_jump CopyTileIDsFromList Func_41849: ; 41849 (10:5849) predef Func_79869 @@ -429,13 +429,13 @@ FightIntroBackMon: ; 41a99 (10:5a99) FightIntroFrontMon: ; 42099 (10:6099) -IF _RED +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 _BLUE +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" diff --git a/engine/items/items.asm b/engine/items/items.asm index b5087c5c67..239b7b1f6c 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -117,10 +117,10 @@ BallAnyway: dec a jr z,.UseBall ld a,[wPartyCount] ;is Party full? - cp a,6 + cp a,PARTY_LENGTH jr nz,.UseBall ld a,[W_NUMINBOX] ;is Box full? - cp a,20 + cp a,MONS_PER_BOX jp z,BoxFullCannotThrowBall .UseBall ;$56a7 ;ok, you can use a ball @@ -249,7 +249,7 @@ BallAnyway: ld [H_QUOTIENT + 3],a .next9 ;$5776 pop bc - ld a,[wd007] ;enemy: Catch Rate + ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate cp b jr c,.next10 ld a,[H_QUOTIENT + 2] @@ -268,7 +268,7 @@ BallAnyway: xor a ld [H_MULTIPLICAND],a ld [H_MULTIPLICAND + 1],a - ld a,[wd007] ;enemy: Catch Rate + ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate ld [H_MULTIPLICAND + 2],a ld a,100 ld [H_MULTIPLIER],a @@ -369,13 +369,13 @@ BallAnyway: push af ;...and status ailments push hl ld hl,W_ENEMYBATTSTATUS3 - bit 3,[hl] + bit Transformed,[hl] jr z,.next15 ld a,$4c ld [wEnemyMonSpecies2],a jr .next16 .next15 ;$5871 - set 3,[hl] + set Transformed,[hl] ld hl,wcceb ld a,[wEnemyMonDVs] ld [hli],a @@ -388,7 +388,7 @@ BallAnyway: ld [wcf91],a ld a,[wEnemyMonLevel] ld [W_CURENEMYLVL],a - callab Func_3eb01 + callab LoadEnemyMonData pop af ld [wcf91],a pop hl @@ -433,7 +433,7 @@ BallAnyway: predef ShowPokedexData .checkParty ;$58f4 ld a,[wPartyCount] - cp a,6 ;is party full? + cp a,PARTY_LENGTH ;is party full? jr z,.sendToBox xor a ld [wcc49],a @@ -442,7 +442,7 @@ BallAnyway: jr .End .sendToBox ;$5907 call ClearSprites - call Func_e7a4 + call SendNewMonToBox ld hl,ItemUseBallText07 ld a,[wd7f1] bit 0,a ;already met Bill? @@ -519,8 +519,8 @@ ItemUseBicycle: ; d977 (3:5977) ld a,[W_ISINBATTLE] and a jp nz,ItemUseNotTime - ld a,[wd700] - ld [wd11a],a + ld a,[wWalkBikeSurfState] + ld [wWalkBikeSurfStateCopy],a cp a,2 ; is the player surfing? jp z,ItemUseNotTime dec a ; is player already bicycling? @@ -528,8 +528,8 @@ ItemUseBicycle: ; d977 (3:5977) .getOffBike call ItemUseReloadOverworldData xor a - ld [wd700],a ; change player state to walking - call Func_2307 ; play walking music + ld [wWalkBikeSurfState],a ; change player state to walking + call PlayDefaultMusic ; play walking music ld hl,GotOffBicycleText jr .printText .tryToGetOnBike @@ -539,16 +539,16 @@ ItemUseBicycle: ; d977 (3:5977) xor a ; no keys pressed ld [hJoyHeld],a ; current joypad state inc a - ld [wd700],a ; change player state to bicycling + ld [wWalkBikeSurfState],a ; change player state to bicycling ld hl,GotOnBicycleText - call Func_2307 ; play bike riding music + call PlayDefaultMusic ; play bike riding music .printText jp PrintText ; used for Surf out-of-battle effect ItemUseSurfboard: ; d9b4 (3:59b4) - ld a,[wd700] - ld [wd11a],a + ld a,[wWalkBikeSurfState] + ld [wWalkBikeSurfStateCopy],a cp a,2 ; is the player already surfing? jr z,.tryToStopSurfing .tryToSurf @@ -562,8 +562,8 @@ ItemUseSurfboard: ; d9b4 (3:59b4) ld hl,wd730 set 7,[hl] ld a,2 - ld [wd700],a ; change player state to surfing - call Func_2307 ; play surfing music + ld [wWalkBikeSurfState],a ; change player state to surfing + call PlayDefaultMusic ; play surfing music ld hl,SurfingGotOnText jp PrintText .tryToStopSurfing @@ -582,7 +582,7 @@ ItemUseSurfboard: ; d9b4 (3:59b4) ld a,[hli] ld h,[hl] ld l,a ; hl now points to passable tiles - ld a,[wcfc6] ; tile in front of the player + ld a,[wTileInFrontOfPlayer] ; tile in front of the player ld b,a .passableTileLoop ld a,[hli] @@ -598,31 +598,31 @@ ItemUseSurfboard: ; d9b4 (3:59b4) ld hl,wd730 set 7,[hl] xor a - ld [wd700],a ; change player state to walking + ld [wWalkBikeSurfState],a ; change player state to walking dec a ld [wJoyIgnore],a - call Func_2307 ; play walking music + call PlayDefaultMusic ; play walking music 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 b,%01000000 ; Up key + ld b,D_UP jr nz,.storeSimulatedButtonPress bit 2,a - ld b,%10000000 ; Down key + ld b,D_DOWN jr nz,.storeSimulatedButtonPress bit 1,a - ld b,%00100000 ; Left key + ld b,D_LEFT jr nz,.storeSimulatedButtonPress - ld b,%00010000 ; Right key + ld b,D_RIGHT .storeSimulatedButtonPress ld a,b - ld [wccd3],a ; base address of simulated button presses + ld [wSimulatedJoypadStatesEnd],a xor a - ld [wcd39],a + ld [wWastedByteCD39],a inc a - ld [wcd38],a ; index of current simulated button press + ld [wSimulatedJoypadStatesIndex],a ret SurfingGotOnText: ; da4c (3:5a4c) @@ -648,7 +648,7 @@ ItemUseEvoStone: ; da5b (3:5a5b) ld a,$05 ; evolution stone party menu ld [wd07d],a ld a,$ff - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a call DisplayPartyMenu pop bc jr c,.canceledItemUse @@ -659,7 +659,7 @@ ItemUseEvoStone: ; da5b (3:5a5b) ld a,(SFX_02_3e - SFX_Headers_02) / 3 call PlaySoundWaitForCurrent ; play sound call WaitForSoundToFinish ; wait for sound to end - callab Func_3ad0e ; try to evolve pokemon + callab TryEvolvingMon ; try to evolve pokemon ld a,[wd121] and a jr z,.noEffect @@ -693,7 +693,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,$01 ld [wd07d],a ; item use party menu ld a,$ff - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a ld a,[wd152] and a ; using Softboiled? jr z,.notUsingSoftboiled @@ -782,14 +782,14 @@ ItemUseMedicine: ; dabb (3:5abb) ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data push hl ld hl,W_PLAYERBATTSTATUS3 - res 0,[hl] ; heal Toxic status + res BadlyPoisoned,[hl] ; heal Toxic status pop hl ld bc,30 add hl,bc ; hl now points to party stats ld de,wBattleMonMaxHP ld bc,10 call CopyData ; copy party stats to in-battle stat data - predef Func_3ed02 + predef DoubleOrHalveSelectedStats jp .doneHealing .healHP inc hl ; hl = address of current HP @@ -817,7 +817,7 @@ ItemUseMedicine: ; dabb (3:5abb) push bc ld a,[wcf06] ld c,a - ld hl,wccf5 + ld hl,wPartyFoughtCurrentEnemyFlags ld b,$02 predef FlagActionPredef ld a,c @@ -825,7 +825,7 @@ ItemUseMedicine: ; dabb (3:5abb) jr z,.next ld a,[wcf06] ld c,a - ld hl,wPartyAliveFlags + ld hl,wPartyGainExpFlags ld b,$01 predef FlagActionPredef .next @@ -931,15 +931,15 @@ ItemUseMedicine: ; dabb (3:5abb) 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,[$fff6] + ld a,[hFlags_0xFFF6] set 0,a - ld [$fff6],a + ld [hFlags_0xFFF6],a ld a,$02 - ld [wListMenuID],a + ld [wHPBarType],a predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled - ld a,[$fff6] + ld a,[hFlags_0xFFF6] res 0,a - ld [$fff6],a + ld [hFlags_0xFFF6],a pop af ld b,a ; store heal amount (1/5 of max HP) ld hl,wHPBarOldHP + 1 @@ -1081,15 +1081,15 @@ ItemUseMedicine: ; dabb (3:5abb) jr z,.playStatusAilmentCuringSound ld a,(SFX_02_3d - SFX_Headers_02) / 3 ; HP healing sound call PlaySoundWaitForCurrent ; play sound - ld a,[$fff6] + ld a,[hFlags_0xFFF6] set 0,a - ld [$fff6],a + ld [hFlags_0xFFF6],a ld a,$02 - ld [wListMenuID],a + ld [wHPBarType],a predef UpdateHPBar2 ; animate the HP bar lengthening - ld a,[$fff6] + ld a,[hFlags_0xFFF6] res 0,a - ld [$fff6],a + ld [hFlags_0xFFF6],a ld a,$f7 ; revived message ld [wd07d],a ld a,[wcf91] @@ -1102,19 +1102,19 @@ ItemUseMedicine: ; dabb (3:5abb) jr .showHealingItemMessage .playStatusAilmentCuringSound ld a,(SFX_02_3e - SFX_Headers_02) / 3 ; status ailment curing sound - call PlaySoundWaitForCurrent ; play sound + call PlaySoundWaitForCurrent .showHealingItemMessage xor a ld [H_AUTOBGTRANSFERENABLED],a call ClearScreen dec a - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a call RedrawPartyMenu ; redraws the party menu and displays the message ld a,1 ld [H_AUTOBGTRANSFERENABLED],a ld c,50 call DelayFrames - call WaitForTextScrollButtonPress ; wait for a button press + call WaitForTextScrollButtonPress jr .done .canceledItemUse xor a @@ -1130,7 +1130,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[W_ISINBATTLE] and a ret nz - jp ReloadMapData ; restore saved screen + jp ReloadMapData .useVitamin push hl ld a,[hl] @@ -1285,12 +1285,12 @@ ItemUseMedicine: ; dabb (3:5abb) call WaitForTextScrollButtonPress ; wait for button press xor a ld [wcc49],a - predef Func_3af5b ; learn level up move, if any + predef LearnMoveFromLevelUp ; learn level up move, if any xor a ld [wccd4],a - callab Func_3ad0e ; evolve pokemon, if appropriate + callab TryEvolvingMon ; evolve pokemon, if appropriate ld a,$01 - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a pop af ld [wcf91],a pop af @@ -1315,17 +1315,17 @@ VitaminText: ; df2e (3:5f2e) ItemUseBait: ; df52 (3:5f52) ld hl,ThrewBaitText call PrintText - ld hl,wd007 ; catch rate + ld hl,wEnemyMonCatchRate ; catch rate srl [hl] ; halve catch rate ld a,BAIT_ANIM - ld hl,wcce9 ; bait factor - ld de,wcce8 ; escape factor + ld hl,wSafariBaitFactor ; bait factor + ld de,wSafariEscapeFactor ; escape factor jr BaitRockCommon ItemUseRock: ; df67 (3:5f67) ld hl,ThrewRockText call PrintText - ld hl,wd007 ; catch rate + ld hl,wEnemyMonCatchRate ; catch rate ld a,[hl] add a ; double catch rate jr nc,.noCarry @@ -1333,8 +1333,8 @@ ItemUseRock: ; df67 (3:5f67) .noCarry ld [hl],a ld a,ROCK_ANIM - ld hl,wcce8 ; escape factor - ld de,wcce9 ; bait factor + ld hl,wSafariEscapeFactor ; escape factor + ld de,wSafariBaitFactor ; bait factor BaitRockCommon: ; df7f (3:5f7f) ld [W_ANIMATIONID],a @@ -1395,7 +1395,7 @@ ItemUseEscapeRope: ; dfaf (3:5faf) ld [W_NUMSAFARIBALLS],a ld [W_SAFARIZONEENTRANCECURSCRIPT],a inc a - ld [wd078],a + ld [wEscapedFromBattle],a ld [wcd6a],a ; item used ld a,[wd152] and a ; using Dig? @@ -1419,7 +1419,7 @@ ItemUseRepelCommon: ; e005 (3:6005) and a jp nz,ItemUseNotTime ld a,b - ld [wd0db],a + ld [wRepelRemainingSteps],a jp PrintItemUseTextAndRemoveItem ; handles X Accuracy item @@ -1428,7 +1428,7 @@ ItemUseXAccuracy: ; e013 (3:6013) and a jp z,ItemUseNotTime ld hl,W_PLAYERBATTSTATUS2 - set 0,[hl] ; X Accuracy bit + set UsingXAccuracy,[hl] ; X Accuracy bit jp PrintItemUseTextAndRemoveItem ; This function is bugged and never works. It always jumps to ItemUseNotTime. @@ -1436,8 +1436,8 @@ ItemUseXAccuracy: ; e013 (3:6013) ItemUseCardKey: ; e022 (3:6022) xor a ld [wd71f],a - call Func_c586 - ld a,[Func_c586] ; $4586 + call GetTileAndCoordsInFrontOfPlayer + ld a,[GetTileAndCoordsInFrontOfPlayer] ; $4586 cp a,$18 jr nz,.next0 ld hl,CardKeyTable1 @@ -1529,7 +1529,7 @@ ItemUsePokedoll: ; e0cd (3:60cd) dec a jp nz,ItemUseNotTime ld a,$01 - ld [wd078],a + ld [wEscapedFromBattle],a jp PrintItemUseTextAndRemoveItem ItemUseGuardSpec: ; e0dc (3:60dc) @@ -1537,7 +1537,7 @@ ItemUseGuardSpec: ; e0dc (3:60dc) and a jp z,ItemUseNotTime ld hl,W_PLAYERBATTSTATUS2 - set 1,[hl] ; Mist bit + set ProtectedByMist,[hl] ; Mist bit jp PrintItemUseTextAndRemoveItem ItemUseSuperRepel: ; e0eb (3:60eb) @@ -1553,7 +1553,7 @@ ItemUseDireHit: ; e0f5 (3:60f5) and a jp z,ItemUseNotTime ld hl,W_PLAYERBATTSTATUS2 - set 2,[hl] ; Focus Energy bit + set GettingPumped,[hl] ; Focus Energy bit jp PrintItemUseTextAndRemoveItem ItemUseXStat: ; e104 (3:6104) @@ -1739,7 +1739,7 @@ PlayedFluteHadEffectText: ; e215 (3:6215) ld a,[wc028] cp a,$b8 jr z,.musicWaitLoop - call Func_2307 ; start playing normal music again + call PlayDefaultMusic ; start playing normal music again .done jp TextScriptEnd ; end text @@ -1808,7 +1808,7 @@ RodResponse: ; e28d (3:628d) ld [W_CUROPPONENT], a .next - ld hl, wd700 + ld hl, wWalkBikeSurfState ld a, [hl] ; store the value in a push af push hl @@ -1830,7 +1830,7 @@ FishingInit: ; e2b4 (3:62b4) .notInBattle call IsNextTileShoreOrWater ret c - ld a,[wd700] + ld a,[wWalkBikeSurfState] cp a,2 ; Surfing? jr z,.surfing call ItemUseReloadOverworldData @@ -1889,7 +1889,7 @@ ItemUsePPRestore: ; e31e (3:631e) ld [wWhichTrade],a .chooseMon xor a - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a ld a,$01 ; item use party menu ld [wd07d],a call DisplayPartyMenu @@ -2096,7 +2096,7 @@ ItemUseTMHM: ; e479 (3:6479) ld [wd11e],a predef TMToMove ; get move ID from TM/HM ID ld a,[wd11e] - ld [wd0e0],a + ld [wMoveNum],a call GetMoveName call CopyStringToCF4B ; copy name to wcf4b pop af @@ -2109,8 +2109,8 @@ ItemUseTMHM: ; e479 (3:6479) call PrintText hlCoord 14, 7 ld bc,$080f - ld a,$14 - ld [wd125],a + ld a,TWO_OPTION_MENU + ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu ld a,[wCurrentMenuItem] and a @@ -2129,7 +2129,7 @@ ItemUseTMHM: ; e479 (3:6479) ld bc,14 call CopyData ld a,$ff - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a ld a,$03 ; teach TM/HM party menu ld [wd07d],a call DisplayPartyMenu @@ -2500,8 +2500,8 @@ TossItem_: ; e6f1 (3:66f1) call PrintText hlCoord 14, 7 ld bc,$080f - ld a,$14 - ld [wd125],a + ld a,TWO_OPTION_MENU + ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu ld a,[wd12e] cp a,2 @@ -2579,7 +2579,7 @@ IsKeyItem_: ; e764 (3:6764) INCLUDE "data/key_items.asm" -Func_e7a4: ; e7a4 (3:67a4) +SendNewMonToBox: ; e7a4 (3:67a4) ld de, W_NUMINBOX ; wda80 ld a, [de] inc a @@ -2756,7 +2756,7 @@ IsNextTileShoreOrWater: ; e8b8 (3:68b8) jr nc, .notShoreOrWater ld a, [W_CURMAPTILESET] cp SHIP_PORT ; Vermilion Dock tileset - ld a, [wcfc6] ; tile in front of player + ld a, [wTileInFrontOfPlayer] ; tile in front of player jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset cp $48 ; eastern shore tile in Safari Zone jr z, .shoreOrWater @@ -2830,49 +2830,51 @@ ItemUseReloadOverworldData: ; e9c5 (3:69c5) call LoadCurrentMapView jp UpdateSprites -Func_e9cb: ; e9cb (3:69cb) - ld hl, WildDataPointers ; $4eeb - ld de, wHPBarMaxHP +; 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) + ld hl, WildDataPointers + ld de, wBuffer ld c, $0 -.asm_e9d3 +.loop inc hl ld a, [hld] inc a - jr z, .asm_e9ec + jr z, .done push hl ld a, [hli] ld h, [hl] ld l, a ld a, [hli] and a - call nz, Func_e9f0 + call nz, CheckMapForMon ; land ld a, [hli] and a - call nz, Func_e9f0 + call nz, CheckMapForMon ; water pop hl inc hl inc hl inc c - jr .asm_e9d3 -.asm_e9ec - ld a, $ff + jr .loop +.done + ld a, $ff ; list terminator ld [de], a ret -Func_e9f0: ; e9f0 (3:69f0) +CheckMapForMon: ; e9f0 (3:69f0) inc hl ld b, $a -.asm_e9f3 +.loop ld a, [wd11e] cp [hl] - jr nz, .asm_e9fc + jr nz, .nextEntry ld a, c ld [de], a inc de -.asm_e9fc +.nextEntry inc hl inc hl dec b - jr nz, .asm_e9f3 + jr nz, .loop dec hl ret diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm index c55a25b4ce..7c5c56fa49 100755 --- a/engine/items/tm_prices.asm +++ b/engine/items/tm_prices.asm @@ -1,5 +1,8 @@ GetMachinePrice: ; 7bf86 (1e:7f86) - ld a, [wcf91] +; Input: [wcf91] = Item Id of a TM +; Output: Stores the 2-byte TM price in [H_DOWNARROWBLINKCNT1] and [H_DOWNARROWBLINKCNT2] +; as a BCD + ld a, [wcf91] ; a contains TM item id sub TM_01 ret c ld d, a @@ -8,11 +11,11 @@ GetMachinePrice: ; 7bf86 (1e:7f86) ld c, a ld b, 0 add hl, bc - ld a, [hl] + ld a, [hl] ; a contains byte whose high or low nybble is the TM price (in thousands) srl d - jr nc, .asm_7bf9d + jr nc, .highNybbleIsPrice ; is TM id odd? swap a -.asm_7bf9d +.highNybbleIsPrice and $f0 ld [H_DOWNARROWBLINKCNT2], a ; $ff8c xor a diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index 01a48ebb4c..0fcc5710fc 100755 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -1,12 +1,12 @@ -; checks if the mon in wWhichPokemon already knows the move in wd0e0 +; checks if the mon in [wWhichPokemon] already knows the move in [wMoveNum] CheckIfMoveIsKnown: ; 2fe18 (b:7e18) ld a, [wWhichPokemon] ld hl, wPartyMon1Moves - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes - ld a, [wd0e0] + ld a, [wMoveNum] ld b, a - ld c, $4 ; nubmer of moves + ld c, NUM_MOVES .loop ld a, [hli] cp b diff --git a/engine/items/tms.asm b/engine/items/tms.asm index ef42786095..511aab5b17 100755 --- a/engine/items/tms.asm +++ b/engine/items/tms.asm @@ -1,11 +1,11 @@ -; tests if mon [wcf91] can learn move [wd0e0] +; tests if mon [wcf91] can learn move [wMoveNum] CanLearnTM: ; 1373e (4:773e) ld a, [wcf91] ld [wd0b5], a call GetMonHeader ld hl, W_MONHLEARNSET push hl - ld a, [wd0e0] + ld a, [wMoveNum] ld b, a ld c, $0 ld hl, TechnicalMachines diff --git a/engine/joypad.asm b/engine/joypad.asm index d2ad1c3191..31e197e294 100755 --- a/engine/joypad.asm +++ b/engine/joypad.asm @@ -1,9 +1,13 @@ _Joypad:: +; hJoyReleased: (hJoyLast ^ hJoyInput) & hJoyLast +; hJoyPressed: (hJoyLast ^ hJoyInput) & hJoyInput + ld a, [hJoyInput] cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset jp z, TrySoftReset + ld b, a - ld a, [hJoyHeldLast] + ld a, [hJoyLast] ld e, a xor b ld d, a @@ -13,15 +17,19 @@ _Joypad:: and b ld [hJoyPressed], a ld a, b - ld [hJoyHeldLast], a + ld [hJoyLast], a + ld a, [wd730] bit 5, a jr nz, DiscardButtonPresses - ld a, [hJoyHeldLast] + + ld a, [hJoyLast] ld [hJoyHeld], a + ld a, [wJoyIgnore] and a ret z + cpl ld b, a ld a, [hJoyHeld] @@ -41,11 +49,13 @@ DiscardButtonPresses: TrySoftReset: call DelayFrame - ; reset joypad (to make sure the - ; player is really trying to reset) + + ; deselect (redundant) ld a, $30 ld [rJOYP], a + ld hl, hSoftReset dec [hl] jp z, SoftReset + jp Joypad diff --git a/engine/learn_move.asm b/engine/learn_move.asm index bbfb41a3c8..75056edba3 100755 --- a/engine/learn_move.asm +++ b/engine/learn_move.asm @@ -1,7 +1,7 @@ LearnMove: ; 6e43 (1:6e43) call SaveScreenTilesToBuffer1 - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMonNicks ; wPartyMonNicks + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName ld hl, wcd6d ld de, wd036 @@ -9,9 +9,9 @@ LearnMove: ; 6e43 (1:6e43) call CopyData DontAbandonLearning: ; 6e5b (1:6e5b) - ld hl, wPartyMon1Moves ; wPartyMon1Moves + ld hl, wPartyMon1Moves ld bc, $2c - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] call AddNTimes ld d, h ld e, l @@ -36,14 +36,14 @@ DontAbandonLearning: ; 6e5b (1:6e5b) pop de pop hl .asm_6e8b - ld a, [wd0e0] + ld a, [wMoveNum] ld [hl], a ld bc, $15 add hl, bc push hl push de dec a - ld hl, Moves ; $4000 + ld hl, Moves ld bc, $6 call AddNTimes ld de, wHPBarMaxHP @@ -53,22 +53,22 @@ DontAbandonLearning: ; 6e5b (1:6e5b) pop de pop hl ld [hl], a - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a jp z, PrintLearnedMove - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld b, a - ld a, [wPlayerMonNumber] ; wPlayerMonNumber + ld a, [wPlayerMonNumber] cp b jp nz, PrintLearnedMove ld h, d ld l, e ld de, wBattleMonMoves - ld bc, $4 + ld bc, NUM_MOVES call CopyData ld bc, $11 add hl, bc - ld de, wBattleMonPP ; wBattleMonPP + ld de, wBattleMonPP ld bc, $4 call CopyData jp PrintLearnedMove @@ -78,10 +78,10 @@ AbandonLearning: ; 6eda (1:6eda) call PrintText hlCoord 14, 7 ld bc, $80f - ld a, $14 - ld [wd125], a - call DisplayTextBoxID - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a + call DisplayTextBoxID ; yes/no menu + ld a, [wCurrentMenuItem] and a jp nz, DontAbandonLearning ld hl, DidNotLearnText @@ -101,20 +101,20 @@ TryingToLearn: ; 6f07 (1:6f07) call PrintText hlCoord 14, 7 ld bc, $80f - ld a, $14 - ld [wd125], a - call DisplayTextBoxID + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a + call DisplayTextBoxID ; yes/no menu pop hl - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] rra ret c ld bc, $fffc add hl, bc push hl - ld de, wd0dc - ld bc, $4 + ld de, wMoves + ld bc, NUM_MOVES call CopyData - callab Func_39b87 + callab FormatMovesString pop hl .asm_6f39 push hl @@ -125,15 +125,15 @@ TryingToLearn: ; 6f07 (1:6f07) ld c, $e call TextBoxBorder hlCoord 6, 8 - ld de, wd0e1 - ld a, [$fff6] + ld de, wMovesString + ld a, [hFlags_0xFFF6] set 2, a - ld [$fff6], a + ld [hFlags_0xFFF6], a call PlaceString - ld a, [$fff6] + ld a, [hFlags_0xFFF6] res 2, a - ld [$fff6], a - ld hl, wTopMenuItemY ; wTopMenuItemY + ld [hFlags_0xFFF6], a + ld hl, wTopMenuItemY ld a, $8 ld [hli], a ld a, $5 @@ -146,10 +146,10 @@ TryingToLearn: ; 6f07 (1:6f07) ld a, $3 ld [hli], a ld [hl], $0 - ld hl, $fff6 + ld hl, hFlags_0xFFF6 set 1, [hl] call HandleMenuInput - ld hl, $fff6 + ld hl, hFlags_0xFFF6 res 1, [hl] push af call LoadScreenTilesFromBuffer1 @@ -158,7 +158,7 @@ TryingToLearn: ; 6f07 (1:6f07) bit 1, a jr nz, .asm_6fab push hl - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld c, a ld b, $0 add hl, bc diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index 3edaadd890..61e6204ebf 100755 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -1,6 +1,6 @@ Func_213c8:: ; 213c8 (8:53c8) xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call SaveScreenTilesToBuffer2 ld a, [wd5a2] and a @@ -28,94 +28,82 @@ Func_213c8:: ; 213c8 (8:53c8) call TextBoxBorder call UpdateSprites ld a, $3 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, [wd7f1] bit 0, a jr nz, .asm_21414 hlCoord 2, 2 - ld de, SomeonesPCText ; $548b + ld de, SomeonesPCText jr .asm_2141a .asm_21414 hlCoord 2, 2 - ld de, BillsPCText ; $5497 + ld de, BillsPCText .asm_2141a call PlaceString hlCoord 2, 4 - ld de, wPlayerName ; wd158 + ld de, wPlayerName call PlaceString ld l, c ld h, b - ld de, PlayersPCText ; $54a0 + ld de, PlayersPCText call PlaceString ld a, [wd74b] bit 5, a jr z, .asm_21462 hlCoord 2, 6 - ld de, OaksPCText ; $54a5 + ld de, OaksPCText call PlaceString ld a, [wd5a2] and a jr z, .asm_2145a ld a, $4 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a hlCoord 2, 8 - ld de, PKMNLeaguePCText ; $54b2 + ld de, PKMNLeaguePCText call PlaceString hlCoord 2, 10 - ld de, LogOffPCText ; $54ba + ld de, LogOffPCText jr .asm_2146d .asm_2145a hlCoord 2, 8 - ld de, LogOffPCText ; $54ba + ld de, LogOffPCText jr .asm_2146d .asm_21462 ld a, $2 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a hlCoord 2, 6 - ld de, LogOffPCText ; $54ba + ld de, LogOffPCText .asm_2146d call PlaceString ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld [wMenuWatchedKeys], a ld a, $2 - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ret -SomeonesPCText: ; 2148b (8:548b) - db "SOMEONE's PC@" +SomeonesPCText: db "SOMEONE's PC@" +BillsPCText: db "BILL's PC@" +PlayersPCText: db "'s PC@" +OaksPCText: db "PROF.OAK's PC@" +PKMNLeaguePCText: db $4a, "LEAGUE@" +LogOffPCText: db "LOG OFF@" -BillsPCText: ; 21497 (8:5497) - db "BILL's PC@" - -PlayersPCText: ; 214a0 (8:54a0) - db "'s PC@" - -OaksPCText: ; 214a5 (8:54a5) - db "PROF.OAK's PC@" - -PKMNLeaguePCText: ; 214b2 (8:54b2) - db $4a,"LEAGUE@" - -LogOffPCText: ; 214ba (8:54ba) - db "LOG OFF@" - -Func_214c2:: ; 214c2 (8:54c2) BillsPC_:: ; 0x214c2 ld hl, wd730 set 6, [hl] xor a ld [wccd3], a inc a ; MONSTER_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a call LoadHpBarAndStatusTilePatterns - ld a, [wListScrollOffset] ; wcc36 + ld a, [wListScrollOffset] push af ld a, [wFlags_0xcd60] bit 3, a @@ -128,9 +116,9 @@ BillsPC_:: ; 0x214c2 Func_214e8: ; 214e8 (8:54e8) BillsPCMenu: ld a, [wccd3] - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld hl, vChars2 + $780 - ld de, PokeballTileGraphics ; $697e + ld de, PokeballTileGraphics ld bc, (BANK(PokeballTileGraphics) << 8) + $01 call CopyVideoData call LoadScreenTilesFromBuffer2DisableBGTransfer @@ -139,9 +127,9 @@ BillsPCMenu: ld c, $c call TextBoxBorder hlCoord 2, 2 - ld de, BillsPCMenuText ; $56e1 + ld de, BillsPCMenuText call PlaceString - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $2 ld [hli], a dec a @@ -155,10 +143,10 @@ BillsPCMenu: xor a ld [hli], a ld [hli], a - ld hl, wListScrollOffset ; wcc36 + ld hl, wListScrollOffset ld [hli], a ld [hl], a - ld [wPlayerMonNumber], a ; wPlayerMonNumber + ld [wPlayerMonNumber], a ld hl, WhatText call PrintText hlCoord 9, 14 @@ -167,28 +155,28 @@ BillsPCMenu: call TextBoxBorder ld a, [wd5a0] and $7f - cp $9 + cp 9 jr c, .asm_2154f - sub $9 + sub 9 hlCoord 17, 16 - ld [hl], $f7 - add $f6 + ld [hl], "1" + add "0" jr .asm_21551 .asm_2154f - add $f7 + add "1" .asm_21551 Coorda 18, 16 hlCoord 10, 16 - ld de, BoxNoPCText ; $5713 + ld de, BoxNoPCText call PlaceString ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call HandleMenuInput bit 1, a jp nz, Func_21588 ; b button call PlaceUnfilledArrowMenuCursor - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wccd3], a and a jp z, Func_21618 ; withdraw @@ -212,28 +200,28 @@ Func_21588: ; 21588 (8:5588) res 5, [hl] call LoadScreenTilesFromBuffer2 pop af - ld [wListScrollOffset], a ; wcc36 + ld [wListScrollOffset], a ld hl, wd730 res 6, [hl] ret Func_215ac: ; 215ac (8:55ac) BillsPCDeposit: - ld a, [wPartyCount] ; wPartyCount + ld a, [wPartyCount] dec a jr nz, .asm_215bb ld hl, CantDepositLastMonText call PrintText jp BillsPCMenu .asm_215bb - ld a, [W_NUMINBOX] ; wda80 - cp $14 + ld a, [W_NUMINBOX] + cp MONS_PER_BOX jr nz, .asm_215cb - ld hl, BoxFullText ; $5802 + ld hl, BoxFullText call PrintText jp BillsPCMenu .asm_215cb - ld hl, wPartyCount ; wPartyCount + ld hl, wPartyCount call Func_216be jp c, BillsPCMenu call Func_2174b @@ -248,46 +236,46 @@ BillsPCDeposit: ld [wcf95], a call RemovePokemon call WaitForSoundToFinish - ld hl, wWhichTrade ; wWhichTrade + ld hl, wWhichTrade ld a, [wd5a0] and $7f - cp $9 + cp 9 jr c, .asm_2160a - sub $9 - ld [hl], $f7 + sub 9 + ld [hl], "1" inc hl - add $f6 + add "0" jr .asm_2160c .asm_2160a - add $f7 + add "1" .asm_2160c ld [hli], a ld [hl], $50 - ld hl, MonWasStoredText ; $57f8 + ld hl, MonWasStoredText call PrintText jp BillsPCMenu Func_21618: ; 21618 (8:5618) - ld a, [W_NUMINBOX] ; wda80 + ld a, [W_NUMINBOX] and a jr nz, .asm_21627 - ld hl, NoMonText ; $580c + ld hl, NoMonText call PrintText jp Func_214e8 .asm_21627 - ld a, [wPartyCount] ; wPartyCount - cp $6 + ld a, [wPartyCount] + cp PARTY_LENGTH jr nz, .asm_21637 - ld hl, CantTakeMonText ; $5811 + ld hl, CantTakeMonText call PrintText jp Func_214e8 .asm_21637 - ld hl, W_NUMINBOX ; wda80 + ld hl, W_NUMINBOX call Func_216be jp c, Func_214e8 call Func_2174b jp nc, Func_214e8 - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld hl, wBoxMonNicks call GetPartyMonName ld a, [wcf91] @@ -300,25 +288,25 @@ Func_21618: ; 21618 (8:5618) ld [wcf95], a call RemovePokemon call WaitForSoundToFinish - ld hl, MonIsTakenOutText ; $5807 + ld hl, MonIsTakenOutText call PrintText jp Func_214e8 Func_21673: ; 21673 (8:5673) - ld a, [W_NUMINBOX] ; wda80 + ld a, [W_NUMINBOX] and a jr nz, .asm_21682 - ld hl, NoMonText ; $580c + ld hl, NoMonText call PrintText jp Func_214e8 .asm_21682 - ld hl, W_NUMINBOX ; wda80 + ld hl, W_NUMINBOX call Func_216be jp c, Func_214e8 - ld hl, OnceReleasedText ; $581b + ld hl, OnceReleasedText call PrintText call YesNoChoice - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a jr nz, .asm_21682 inc a @@ -327,33 +315,41 @@ Func_21673: ; 21673 (8:5673) call WaitForSoundToFinish ld a, [wcf91] call PlayCry - ld hl, MonWasReleasedText ; $5820 + ld hl, MonWasReleasedText call PrintText jp Func_214e8 Func_216b3: ; 216b3 (8:56b3) - callba Func_738a1 + callba ChangeBox jp Func_214e8 Func_216be: ; 216be (8:56be) ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a inc a ; MONSTER_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a ld a, [wcc2b] - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a call DisplayListMenuID - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wcc2b], a ret BillsPCMenuText: ; 216e1 (8:56e1) - db "WITHDRAW ",$4a,$4e,"DEPOSIT ",$4a,$4e,"RELEASE ",$4a,$4e,"CHANGE BOX",$4e,"SEE YA!@" + 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) db "BOX No.@" @@ -372,7 +368,7 @@ Func_2171b:: ; 2171b (8:571b) ld a, [hli] push hl push bc - ld hl, HMMoveArray ; $5745 + ld hl, HMMoveArray ld de, 1 call IsInArray pop bc @@ -389,7 +385,7 @@ HMMoveArray: ; 21745 (8:5745) db SURF db STRENGTH db FLASH - db $ff + db -1 Func_2174b: ; 2174b (8:574b) hlCoord 9, 10 @@ -398,16 +394,16 @@ Func_2174b: ; 2174b (8:574b) call TextBoxBorder ld a, [wccd3] and a - ld de, DepositPCText ; $57cb + ld de, DepositPCText jr nz, .asm_21761 - ld de, WithdrawPCText ; $57d3 + ld de, WithdrawPCText .asm_21761 hlCoord 11, 12 call PlaceString hlCoord 11, 14 - ld de, StatsCancelPCText ; $57dc + ld de, StatsCancelPCText call PlaceString - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $c ld [hli], a ld a, $a @@ -421,16 +417,16 @@ Func_2174b: ; 2174b (8:574b) ld [hli], a xor a ld [hl], a - ld hl, wListScrollOffset ; wcc36 + ld hl, wListScrollOffset ld [hli], a ld [hl], a - ld [wPlayerMonNumber], a ; wPlayerMonNumber + ld [wPlayerMonNumber], a ld [wcc2b], a .asm_2178f call HandleMenuInput bit 1, a jr nz, .asm_2179f - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a jr z, .asm_217a1 dec a @@ -458,14 +454,11 @@ Func_2174b: ; 2174b (8:574b) call LoadGBPal jr .asm_2178f -DepositPCText: ; 217cb (8:57cb) - db "DEPOSIT@" - -WithdrawPCText: ; 217d3 (8:57d3) - db "WITHDRAW@" - -StatsCancelPCText: ; 217dc (8:57dc) - db "STATS",$4e,"CANCEL@" +DepositPCText: db "DEPOSIT@" +WithdrawPCText: db "WITHDRAW@" +StatsCancelPCText: + db "STATS" + next "CANCEL@" SwitchOnText: ; 0x217e9 TX_FAR _SwitchOnText @@ -515,48 +508,48 @@ MonWasReleasedText: ; 0x21820 TX_FAR _MonWasReleasedText db "@" -PrintJustAMomentText1:: ; 5824 (8:5825) - ld a, [$ffaa] - cp $1 +CableClubLeftGameboy:: ; 5824 (8:5825) + ld a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK ret z - ld a, [wSpriteStateData1 + 9] - cp $c + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + cp SPRITE_FACING_RIGHT ret nz ld a, [W_CURMAP] - cp $ef - ld a, $2 + cp BATTLE_CENTER + ld a, LINK_STATE_START_TRADE jr z, .asm_2183a - inc a + inc a ; LINK_STATE_START_BATTLE .asm_2183a - ld [W_ISLINKBATTLE], a + ld [wLinkState], a call EnableAutoTextBoxDrawing - ld a, $22 + ld a, $22 ; JustAMomentText jp PrintPredefTextID -PrintJustAMomentText2:: ; 5845 (8:5845) - ld a, [$ffaa] - cp $2 +CableClubRightGameboy:: ; 5845 (8:5845) + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK ret z - ld a, [wSpriteStateData1 + 9] - cp $8 + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + cp SPRITE_FACING_LEFT ret nz ld a, [W_CURMAP] - cp $ef - ld a, $2 + cp BATTLE_CENTER + ld a, LINK_STATE_START_TRADE jr z, .asm_2185a - inc a + inc a ; LINK_STATE_START_BATTLE .asm_2185a - ld [W_ISLINKBATTLE], a + ld [wLinkState], a call EnableAutoTextBoxDrawing - ld a, $22 + ld a, $22 ; JustAMomentText jp PrintPredefTextID JustAMomentText:: ; 21865 (8:5865) TX_FAR _JustAMomentText db "@" - ld a, [wSpriteStateData1 + 9] - cp $4 + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + cp SPRITE_FACING_UP ret nz call EnableAutoTextBoxDrawing ld a, $23 diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm index 023c6177d4..1624ed700b 100755 --- a/engine/menu/diploma.asm +++ b/engine/menu/diploma.asm @@ -3,7 +3,7 @@ DisplayDiploma: ; 566e2 (15:66e2) call GBPalWhiteOutWithDelay3 call ClearScreen xor a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld hl, wd730 set 6, [hl] call DisableLCD @@ -14,7 +14,7 @@ DisplayDiploma: ; 566e2 (15:66e2) call FarCopyData2 ld hl, wTileMap ld bc, $1012 - predef Func_5ab0 + predef Diploma_TextBoxBorder ld hl, DiplomaTextPointersAndCoords ; $6784 ld c, $5 .asm_56715 @@ -61,7 +61,7 @@ DisplayDiploma: ; 566e2 (15:66e2) ld hl, wd730 res 6, [hl] call GBPalWhiteOutWithDelay3 - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns call Delay3 jp GBPalNormal diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm index 4833e57d7c..a6dd70214e 100755 --- a/engine/menu/league_pc.asm +++ b/engine/menu/league_pc.asm @@ -4,14 +4,14 @@ PKMNLeaguePC: ; 0x7657e ld hl, wd730 set 6, [hl] push hl - ld a, [wcfcb] + ld a, [wUpdateSpritesEnabled] push af - ld a, [$ffD7] + ld a, [hTilesetType] push af xor a - ld [$ffD7], a + ld [hTilesetType], a ld [W_SPRITEFLIPPED], a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld [wTrainerScreenX], a ld [wcd42], a ld a, [wd5a2] @@ -38,9 +38,9 @@ PKMNLeaguePC: ; 0x7657e jr nz, .first .second pop af - ld [$ffD7], a + ld [hTilesetType], a pop af - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a pop hl res 6, [hl] call GBPalWhiteOutWithDelay3 diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 4044da43b6..756c77557e 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -14,8 +14,8 @@ MainMenu: ; 5af2 (1:5af2) .next0 ld c,20 call DelayFrames - xor a - ld [W_ISLINKBATTLE],a + xor a ; LINK_STATE_NONE + ld [wLinkState],a ld hl,wcc2b ld [hli],a ld [hli],a @@ -111,16 +111,16 @@ MainMenu: ; 5af2 (1:5af2) call DelayFrames ld a,[wd5a2] and a - jp z,Func_5d5f + jp z,SpecialEnterMap ld a,[W_CURMAP] ; map ID cp a,HALL_OF_FAME - jp nz,Func_5d5f + jp nz,SpecialEnterMap xor a - ld [wd71a],a + ld [wDestinationMap],a ld hl,wd732 - set 2,[hl] - call Func_62ce - jp Func_5d5f + set 2,[hl] ; fly warp or dungeon warp + call SpecialWarpIn + jp SpecialEnterMap Func_5bff: ; 5bff (1:5bff) ld a,1 ld [wd358],a @@ -133,7 +133,7 @@ LinkMenu: ; 5c0a (1:5c0a) ld [wd358], a ld hl, wd72e set 6, [hl] - ld hl, TextTerminator_6b20 ; $6b20 + ld hl, TextTerminator_6b20 call PrintText call SaveScreenTilesToBuffer1 ld hl, WhereWouldYouLikeText @@ -149,7 +149,7 @@ LinkMenu: ; 5c0a (1:5c0a) xor a ld [wcd37], a ld [wd72d], a - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $7 ld [hli], a ld a, $6 @@ -163,97 +163,101 @@ LinkMenu: ; 5c0a (1:5c0a) ld [hli], a xor a ld [hl], a -.asm_5c52 +.waitForInputLoop call HandleMenuInput - and $3 + and A_BUTTON | B_BUTTON add a add a ld b, a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] add b add $d0 - ld [wcc42], a - ld [wcc43], a -.asm_5c66 - call Func_2247 - ld a, [wcc3d] + ld [wLinkMenuSelectionSendBuffer], a + ld [wLinkMenuSelectionSendBuffer + 1], a +.exchangeMenuSelectionLoop + call Serial_ExchangeLinkMenuSelection + ld a, [wLinkMenuSelectionReceiveBuffer] ld b, a and $f0 cp $d0 jr z, .asm_5c7d - ld a, [wcc3e] + ld a, [wLinkMenuSelectionReceiveBuffer + 1] ld b, a and $f0 cp $d0 - jr nz, .asm_5c66 + jr nz, .exchangeMenuSelectionLoop .asm_5c7d ld a, b - and $c - jr nz, .asm_5c8b - ld a, [wcc42] - and $c - jr z, .asm_5c52 - jr .asm_5ca1 -.asm_5c8b - ld a, [wcc42] - and $c - jr z, .asm_5c98 - ld a, [$ffaa] - cp $2 - jr z, .asm_5ca1 -.asm_5c98 + and $c ; did the enemy press A or B? + jr nz, .enemyPressedAOrB +; the enemy didn't press A or B + ld a, [wLinkMenuSelectionSendBuffer] + and $c ; did the player press A or B? + jr z, .waitForInputLoop ; if neither the player nor the enemy pressed A or B, try again + jr .doneChoosingMenuSelection ; if the player pressed A or B but the enemy didn't, use the player's selection +.enemyPressedAOrB + ld a, [wLinkMenuSelectionSendBuffer] + and $c ; did the player press A or B? + jr z, .useEnemyMenuSelection ; if the enemy pressed A or B but the player didn't, use the enemy's selection +; the enemy and the player both pressed A or B +; The gameboy that is clocking the connection wins. + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .doneChoosingMenuSelection +.useEnemyMenuSelection ld a, b - ld [wcc42], a + ld [wLinkMenuSelectionSendBuffer], a and $3 ld [wCurrentMenuItem], a ; wCurrentMenuItem -.asm_5ca1 - ld a, [$ffaa] - cp $2 - jr nz, .asm_5cb1 +.doneChoosingMenuSelection + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .skipStartingTransfer call DelayFrame call DelayFrame - ld a, $81 - ld [$ff02], a -.asm_5cb1 + ld a, START_TRANSFER_INTERNAL_CLOCK + ld [rSC], a +.skipStartingTransfer ld b, $7f ld c, $7f ld d, $ec - ld a, [wcc42] - and $8 - jr nz, .asm_5ccc - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wLinkMenuSelectionSendBuffer] + and (B_BUTTON << 2) ; was B button pressed? + jr nz, .updateCursorPosition +; A button was pressed + ld a, [wCurrentMenuItem] cp $2 - jr z, .asm_5ccc + jr z, .updateCursorPosition ld c, d ld d, b dec a - jr z, .asm_5ccc + jr z, .updateCursorPosition ld b, c ld c, d -.asm_5ccc +.updateCursorPosition ld a, b Coorda 6, 7 ld a, c Coorda 6, 9 ld a, d Coorda 6, 11 - ld c, $28 + ld c, 40 call DelayFrames call LoadScreenTilesFromBuffer1 - ld a, [wcc42] - and $8 - jr nz, .asm_5d2d - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wLinkMenuSelectionSendBuffer] + and (B_BUTTON << 2) ; was B button pressed? + jr nz, .choseCancel ; cancel if B pressed + ld a, [wCurrentMenuItem] cp $2 - jr z, .asm_5d2d + jr z, .choseCancel xor a - ld [wd700], a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld [wWalkBikeSurfState], a ; start walking + ld a, [wCurrentMenuItem] and a ld a, TRADE_CENTER - jr nz, .asm_5cfc + jr nz, .next ld a, BATTLE_CENTER -.asm_5cfc +.next ld [wd72d], a ld hl, PleaseWaitText call PrintText @@ -261,23 +265,23 @@ LinkMenu: ; 5c0a (1:5c0a) call DelayFrames ld hl, wd732 res 1, [hl] - ld a, [W_ANIMATIONID] ; W_ANIMATIONID - ld [wd71a], a - call Func_62ce + ld a, [W_ANIMATIONID] + ld [wDestinationMap], a + call SpecialWarpIn ld c, $14 call DelayFrames xor a - ld [wMenuJoypadPollCount], a ; wMenuJoypadPollCount - ld [wcc42], a - inc a - ld [W_ISLINKBATTLE], a ; W_ISLINKBATTLE + ld [wMenuJoypadPollCount], a + ld [wSerialExchangeNybbleSendData], a + inc a ; LINK_STATE_IN_CABLE_CLUB + ld [wLinkState], a ld [wcc47], a - jr Func_5d5f -.asm_5d2d + jr SpecialEnterMap +.choseCancel xor a - ld [wMenuJoypadPollCount], a ; wMenuJoypadPollCount + ld [wMenuJoypadPollCount], a call Delay3 - call Func_72d7 + call CloseLinkConnection ld hl, LinkCanceledText call PrintText ld hl, wd72e @@ -303,16 +307,17 @@ Func_5d52: ; 5d52 (1:5d52) ld c, $14 call DelayFrames -Func_5d5f: ; 5d5f (1:5d5f) +; enter map after using a special warp or loading the game from the main menu +SpecialEnterMap: ; 5d5f (1:5d5f) xor a ld [hJoyPressed], a ld [hJoyHeld], a - ld [$ffb5], a + ld [hJoy5], a ld [wd72d], a ld hl, wd732 - set 0, [hl] + set 0, [hl] ; count play time call ResetPlayerSpriteData - ld c, $14 + ld c, 20 call DelayFrames ld a, [wcc47] and a @@ -461,7 +466,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) call SetOptionsFromCursorPositions .getJoypadStateLoop call JoypadLowSensitivity - ld a,[$ffb5] + ld a,[hJoy5] ld b,a and a,%11111011 ; any key besides select pressed? jr z,.getJoypadStateLoop diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 17aa96e671..7506c84982 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -2,7 +2,7 @@ AskName: ; 64eb (1:64eb) call SaveScreenTilesToBuffer1 call GetPredefRegisters push hl - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] dec a ld hl, wTileMap ld b, $4 @@ -15,30 +15,30 @@ AskName: ; 64eb (1:64eb) call PrintText hlCoord 14, 7 ld bc, $80f - ld a, $14 - ld [wd125], a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID pop hl - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a jr nz, .asm_654c - ld a, [wcfcb] + ld a, [wUpdateSpritesEnabled] push af xor a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a push hl ld a, $2 ld [wd07d], a call DisplayNamingScreen - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a jr nz, .asm_653e - call Func_3e08 + call ReloadMapSpriteTilePatterns .asm_653e call LoadScreenTilesFromBuffer1 pop hl pop af - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld a, [wcf4b] cp $50 ret nz @@ -56,19 +56,19 @@ DoYouWantToNicknameText: ; 0x6557 Func_655c: ; 655c (1:655c) ld hl, wHPBarMaxHP xor a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld a, $2 ld [wd07d], a call DisplayNamingScreen call GBPalWhiteOutWithDelay3 - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal ld a, [wcf4b] cp $50 jr z, .asm_6594 - ld hl, wPartyMonNicks ; wPartyMonNicks + ld hl, wPartyMonNicks ld bc, $b - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] call AddNTimes ld e, l ld d, h @@ -99,22 +99,22 @@ DisplayNamingScreen: ; 6596 (1:6596) call TextBoxBorder call PrintNamingText ld a, $3 - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX - ld [wLastMenuItem], a ; wLastMenuItem - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wTopMenuItemX], a + ld [wLastMenuItem], a + ld [wCurrentMenuItem], a ld a, $ff - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld [wMenuWatchedKeys], a ld a, $7 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, $50 ld [wcf4b], a xor a ld hl, wHPBarMaxHP + 1 ld [hli], a ld [hli], a - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM + ld [W_SUBANIMTRANSFORM], a .asm_65ed call PrintAlphabet call GBPalNormal @@ -126,16 +126,16 @@ DisplayNamingScreen: ; 6596 (1:6596) .asm_65fc call PlaceMenuCursor .asm_65ff - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] push af callba AnimatePartyMon_ForceSpeed1 pop af - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a call JoypadLowSensitivity ld a, [hJoyPressed] and a jr z, .asm_65ff - ld hl, .unknownPointerTable_665e ; $665e + ld hl, .unknownPointerTable_665e .asm_661a sla a jr c, .asm_6624 @@ -165,14 +165,14 @@ DisplayNamingScreen: ; 6596 (1:6596) call GoPAL_SET_CF1C call GBPalNormal xor a - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM + ld [W_SUBANIMTRANSFORM], a ld hl, wd730 res 6, [hl] - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a jp z, LoadTextBoxTilePatterns - ld hl, Func_3ee5b - ld b, BANK(Func_3ee5b) + ld hl, LoadHudTilePatterns + ld b, BANK(LoadHudTilePatterns) jp Bankswitch .unknownPointerTable_665e: ; 665e (1:665e) @@ -207,21 +207,21 @@ DisplayNamingScreen: ; 6596 (1:6596) ld [wHPBarMaxHP + 1], a ret .asm_6692 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $5 jr nz, .asm_66a0 - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] cp $11 jr z, .asm_668c .asm_66a0 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $6 jr nz, .asm_66ae - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] cp $1 jr z, .asm_667e .asm_66ae - ld hl, wMenuCursorLocation ; wMenuCursorLocation + ld hl, wMenuCursorLocation ld a, [hli] ld h, [hl] ld l, a @@ -270,10 +270,10 @@ DisplayNamingScreen: ; 6596 (1:6596) ld [hl], $50 ret .asm_6702 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $6 ret z - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] cp $11 jp z, .asm_6714 inc a @@ -283,10 +283,10 @@ DisplayNamingScreen: ; 6596 (1:6596) ld a, $1 jr .asm_6755 .asm_6718 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $6 ret z - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] dec a jp z, .asm_6728 dec a @@ -295,30 +295,30 @@ DisplayNamingScreen: ; 6596 (1:6596) ld a, $11 jr .asm_6755 .asm_672c - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] dec a - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a and a ret nz ld a, $6 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld a, $1 jr .asm_6755 .asm_673e - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] inc a - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a cp $7 jr nz, .asm_6750 ld a, $1 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a jr .asm_6755 .asm_6750 cp $6 ret nz ld a, $1 .asm_6755 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a jp EraseMenuCursor LoadEDTile: ; 675b (1:675b) @@ -402,9 +402,9 @@ Func_680e: ; 680e (1:680e) jr nz, .asm_6867 call EraseMenuCursor ld a, $11 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a ld a, $5 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld a, [wd07d] cp $2 ld a, $9 @@ -463,10 +463,10 @@ CalcStringLength: ; 68eb (1:68eb) PrintNamingText: ; 68f8 (1:68f8) hlCoord 0, 1 ld a, [wd07d] - ld de, YourTextString ; $693f + ld de, YourTextString and a jr z, .notNickname - ld de, RivalsTextString ; $6945 + ld de, RivalsTextString dec a jr z, .notNickname ld a, [wcf91] @@ -482,13 +482,13 @@ PrintNamingText: ; 68f8 (1:68f8) add hl, bc ld [hl], $c9 hlCoord 1, 3 - ld de, NicknameTextString ; $6953 + ld de, NicknameTextString jr .placeString .notNickname call PlaceString ld l, c ld h, b - ld de, NameTextString ; $694d + ld de, NameTextString .placeString jp PlaceString diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index 4e47361bbe..97e520c211 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -57,7 +57,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) call LoadMonData pop hl push hl - ld a,[wcc35] + ld a,[wMenuItemToSwap] and a ; is the player swapping pokemon positions? jr z,.skipUnfilledRightArrow ; if the player is swapping pokemon positions @@ -83,19 +83,19 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) push hl ld bc,14 ; 14 columns to the right add hl,bc - ld de,wcf9c + ld de,wLoadedMonStatus call PrintStatusCondition pop hl push hl ld bc,20 + 1 ; down 1 row and right 1 column - ld a,[$FFF6] + ld a,[hFlags_0xFFF6] set 0,a - ld [$FFF6],a + ld [hFlags_0xFFF6],a add hl,bc - predef Func_128f6 ; draw HP bar and prints current / max HP - ld a,[$FFF6] + predef DrawHP2 ; draw HP bar and prints current / max HP + ld a,[hFlags_0xFFF6] res 0,a - ld [$FFF6],a + ld [hFlags_0xFFF6],a call SetPartyMenuHealthBarColor ; color the HP bar (on SGB) pop hl jr .printLevel @@ -134,7 +134,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) push hl ld hl,EvosMovesPointerTable ld b,0 - ld a,[wcf98] ; pokemon ID + ld a,[wLoadedMonSpecies] dec a add a rl b diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm index 4df6c826a3..97895ca6e6 100755 --- a/engine/menu/pc.asm +++ b/engine/menu/pc.asm @@ -86,7 +86,7 @@ BillsPC: ; 17ee4 (5:7ee4) callba BillsPC_ ReloadMainMenu: ; 17f06 (5:7f06) xor a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a call ReloadMapData call UpdateSprites ;XXX: moves sprites jp PCMainMenu diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm index 4ff1b16f0f..147a27a46a 100755 --- a/engine/menu/players_pc.asm +++ b/engine/menu/players_pc.asm @@ -2,7 +2,7 @@ PlayerPC: ; 78e6 (1:78e6) ld hl, wd730 set 6, [hl] ld a, ITEM_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a call SaveScreenTilesToBuffer1 xor a ld [wcc2c], a @@ -17,7 +17,7 @@ PlayerPC: ; 78e6 (1:78e6) Func_790c: ; 790c (1:790c) ld a, [wccd3] - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld hl, wFlags_0xcd60 set 5, [hl] call LoadScreenTilesFromBuffer2 @@ -27,9 +27,9 @@ Func_790c: ; 790c (1:790c) call TextBoxBorder call UpdateSprites hlCoord 2, 2 - ld de, PlayersPCMenuEntries ; $7af5 + ld de, PlayersPCMenuEntries call PlaceString - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $2 ld [hli], a dec a @@ -42,17 +42,17 @@ Func_790c: ; 790c (1:790c) ld [hli], a xor a ld [hl], a - ld hl, wListScrollOffset ; wcc36 + ld hl, wListScrollOffset ld [hli], a ld [hl], a - ld [wPlayerMonNumber], a ; wPlayerMonNumber + ld [wPlayerMonNumber], a ld hl, WhatDoYouWantText call PrintText call HandleMenuInput bit 1, a jp nz, Func_796d call PlaceUnfilledArrowMenuCursor - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wccd3], a and a jp z, Func_7a12 @@ -73,19 +73,19 @@ Func_796d: ; 796d (1:796d) res 5, [hl] call LoadScreenTilesFromBuffer2 xor a - ld [wListScrollOffset], a ; wcc36 + ld [wListScrollOffset], a ld [wcc2c], a ld hl, wd730 res 6, [hl] xor a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret Func_7995: ; 7995 (1:7995) xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wListScrollOffset], a ; wcc36 - ld a, [wNumBagItems] ; wNumBagItems + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld a, [wNumBagItems] and a jr nz, Func_79ab ld hl, NothingToDepositText @@ -95,15 +95,15 @@ Func_7995: ; 7995 (1:7995) Func_79ab: ; 79ab (1:79ab) ld hl, WhatToDepositText call PrintText - ld hl, wNumBagItems ; wNumBagItems + ld hl, wNumBagItems ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a ld a, $3 - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a call DisplayListMenuID jp c, Func_790c call IsKeyItem @@ -118,14 +118,14 @@ Func_79ab: ; 79ab (1:79ab) cp $ff jp z, Func_79ab .asm_79e7 - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems call AddItemToInventory jr c, .asm_79f8 ld hl, NoRoomToStoreText call PrintText jp Func_79ab .asm_79f8 - ld hl, wNumBagItems ; wNumBagItems + ld hl, wNumBagItems call RemoveItemFromInventory call WaitForSoundToFinish ld a, (SFX_02_55 - SFX_Headers_02) / 3 @@ -137,9 +137,9 @@ Func_79ab: ; 79ab (1:79ab) Func_7a12: ; 7a12 (1:7a12) xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wListScrollOffset], a ; wcc36 - ld a, [wNumBoxItems] ; wNumBoxItems + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld a, [wNumBoxItems] and a jr nz, Func_7a28 ld hl, NothingStoredText @@ -149,15 +149,15 @@ Func_7a12: ; 7a12 (1:7a12) Func_7a28: ; 7a28 (1:7a28) ld hl, WhatToWithdrawText call PrintText - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a ld a, $3 - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a call DisplayListMenuID jp c, Func_790c call IsKeyItem @@ -172,14 +172,14 @@ Func_7a28: ; 7a28 (1:7a28) cp $ff jp z, Func_7a28 .asm_7a64 - ld hl, wNumBagItems ; wNumBagItems + ld hl, wNumBagItems call AddItemToInventory jr c, .asm_7a75 ld hl, CantCarryMoreText call PrintText jp Func_7a28 .asm_7a75 - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems call RemoveItemFromInventory call WaitForSoundToFinish ld a, (SFX_02_55 - SFX_Headers_02) / 3 @@ -191,9 +191,9 @@ Func_7a28: ; 7a28 (1:7a28) Func_7a8f: ; 7a8f (1:7a8f) xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wListScrollOffset], a ; wcc36 - ld a, [wNumBoxItems] ; wNumBoxItems + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld a, [wNumBoxItems] and a jr nz, Func_7aa5 ld hl, NothingStoredText @@ -203,15 +203,15 @@ Func_7a8f: ; 7a8f (1:7a8f) Func_7aa5: ; 7aa5 (1:7aa5) ld hl, WhatToTossText call PrintText - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a ld a, $3 - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a push hl call DisplayListMenuID pop hl diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 63e440f840..4351ae4cd7 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -10,7 +10,7 @@ ShowPokedexMenu: ; 40000 (10:4000) ld [wLastMenuItem],a inc a ld [wd11e],a - ld [$ffb7],a + ld [hJoy7],a .setUpGraphics ld b,$08 call GoPAL_SET @@ -35,9 +35,9 @@ ShowPokedexMenu: ; 40000 (10:4000) ld [wcc37],a ld [wCurrentMenuItem],a ld [wLastMenuItem],a - ld [$ffb7],a - ld [wcd3a],a - ld [wcd3b],a + ld [hJoy7],a + ld [wWastedByteCD3A],a + ld [wOverrideSimulatedJoypadStatesMask],a pop af ld [wListScrollOffset],a call GBPalWhiteOutWithDelay3 @@ -194,7 +194,7 @@ HandlePokedexListMenu: ; 40111 (10:4111) call PlaceString ; find the highest pokedex number among the pokemon the player has seen ld hl,wPokedexSeenEnd - 1 - ld b,153 + ld b,(wPokedexSeenEnd - wPokedexSeen) * 8 + 1 .maxSeenPokemonLoop ld a,[hld] ld c,8 @@ -366,6 +366,9 @@ PokedexMenuItemsText: ; 402af (10:42af) 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 @@ -404,10 +407,10 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) call GoPAL_SET pop af ld [wd11e],a - ld a,[$ffd7] + ld a,[hTilesetType] push af xor a - ld [$ffd7],a + ld [hTilesetType],a hlCoord 0, 0 ld de,1 ld bc,$6414 @@ -550,11 +553,11 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld [$fff4],a .waitForButtonPress call JoypadLowSensitivity - ld a,[$ffb5] + ld a,[hJoy5] and a,%00000011 ; A button and B button jr z,.waitForButtonPress pop af - ld [$ffd7],a + ld [hTilesetType],a call GBPalWhiteOut call ClearScreen call GoPAL_SET_CF1C diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm index 141b9bebdf..0e90420051 100755 --- a/engine/menu/prize_menu.asm +++ b/engine/menu/prize_menu.asm @@ -6,7 +6,7 @@ CeladonPrizeMenu: ; 5271b (14:671b) jp PrintText .havingCoinCase ld hl,wd730 - set 6,[hl] + set 6,[hl] ; disable letter-printing delay ld hl,ExchangeCoinsForPrizesTextPtr call PrintText ; the following are the menu settings diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm index be172a67c0..da17822bbe 100755 --- a/engine/menu/start_menu.asm +++ b/engine/menu/start_menu.asm @@ -2,8 +2,8 @@ DisplayStartMenu:: ; 2acd (0:2acd) ld a,$04 ; hardcoded Bank, not sure what's it refers to ld [H_LOADEDROMBANK],a ld [$2000],a ; ROM bank 4 - ld a,[wd700] ; walking/biking/surfing - ld [wd11a],a + ld a,[wWalkBikeSurfState] ; walking/biking/surfing + ld [wWalkBikeSurfStateCopy],a ld a, (SFX_02_3f - SFX_Headers_02) / 3 ; Start menu sound call PlaySound diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 76eafac363..be85ae61f9 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -11,27 +11,27 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) and a jp z,RedisplayStartMenu xor a - ld [wcc35],a + ld [wMenuItemToSwap],a ld [wd07d],a - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a call DisplayPartyMenu jr .checkIfPokemonChosen .loop xor a - ld [wcc35],a + ld [wMenuItemToSwap],a ld [wd07d],a call GoBackToPartyMenu .checkIfPokemonChosen jr nc,.chosePokemon .exitMenu call GBPalWhiteOutWithDelay3 - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal jp RedisplayStartMenu .chosePokemon - call SaveScreenTilesToBuffer1 ; save screen - ld a,$04 - ld [wd125],a + call SaveScreenTilesToBuffer1 + 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 @@ -184,7 +184,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) bit 0,a ; does the player have the Boulder Badge? jp z,.newBadgeRequired xor a - ld [wd35d],a + ld [wMapPalOffset],a ld hl,.flashLightsAreaText call PrintText call GBPalWhiteOutWithDelay3 @@ -273,7 +273,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) TX_FAR _NotHealthyEnoughText db "@" .goBackToMap - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns jp CloseTextDisplay .newBadgeRequired ld hl,.newBadgeRequiredText @@ -300,18 +300,18 @@ ItemMenuLoop: ; 132fc (4:72fc) call GoPAL_SET_CF1C StartMenu_Item: ; 13302 (4:7302) - ld a,[W_ISLINKBATTLE] - dec a - jr nz,.notInLinkBattle + ld a,[wLinkState] + dec a ; is the player in the Colosseum or Trade Centre? + jr nz,.notInCableClubRoom ld hl,CannotUseItemsHereText call PrintText jr .exitMenu -.notInLinkBattle +.notInCableClubRoom ld bc,wNumBagItems - ld hl,wcf8b + ld hl,wList ld a,c ld [hli],a - ld [hl],b ; store item bag pointer at wcf8b (for DisplayListMenuID) + ld [hl],b ; store item bag pointer at wList (for DisplayListMenuID) xor a ld [wcf93],a ld a,ITEMLISTMENU @@ -336,13 +336,13 @@ StartMenu_Item: ; 13302 (4:7302) Coorda 5, 10 call PlaceUnfilledArrowMenuCursor xor a - ld [wcc35],a + ld [wMenuItemToSwap],a ld a,[wcf91] cp a,BICYCLE jp z,.useOrTossItem .notBicycle1 - ld a,$06 ; use/toss menu - ld [wd125],a + ld a,USE_TOSS_MENU_TEMPLATE + ld [wTextBoxID],a call DisplayTextBoxID ld hl,wTopMenuItemY ld a,11 @@ -406,20 +406,20 @@ StartMenu_Item: ; 13302 (4:7302) jp z,ItemMenuLoop jp CloseStartMenu .useItem_partyMenu - ld a,[wcfcb] + ld a,[wUpdateSpritesEnabled] push af call UseItem ld a,[wcd6a] cp a,$02 jp z,.partyMenuNotDisplayed call GBPalWhiteOutWithDelay3 - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns pop af - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a jp StartMenu_Item .partyMenuNotDisplayed pop af - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a jp ItemMenuLoop .tossItem call IsKeyItem @@ -500,10 +500,10 @@ StartMenu_TrainerInfo: ; 13460 (4:7460) call GBPalWhiteOut call ClearScreen call UpdateSprites ; move sprites - ld a,[$ffd7] + ld a,[hTilesetType] push af xor a - ld [$ffd7],a + ld [hTilesetType],a call DrawTrainerInfo predef DrawBadges ; draw badges ld b,$0d @@ -517,7 +517,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460) call ReloadMapData call LoadGBPal pop af - ld [$ffd7],a + ld [hTilesetType],a jp RedisplayStartMenu ; loads tile patterns and draws everything except for gym leader faces / badges @@ -744,17 +744,17 @@ SwitchPartyMon_OAM: ; 13625 (4:7625) jp PlaySound SwitchPartyMon_Stats: ; 13653 (4:7653) - ld a, [wcc35] + ld a, [wMenuItemToSwap] and a jr nz, .asm_13661 ld a, [wWhichPokemon] ; wWhichPokemon inc a - ld [wcc35], a + ld [wMenuItemToSwap], a ret .asm_13661 xor a ld [wd07d], a - ld a, [wcc35] + ld a, [wMenuItemToSwap] dec a ld b, a ld a, [wCurrentMenuItem] ; wCurrentMenuItem @@ -762,12 +762,12 @@ SwitchPartyMon_Stats: ; 13653 (4:7653) cp b jr nz, .asm_1367b xor a - ld [wcc35], a + ld [wMenuItemToSwap], a ld [wd07d], a ret .asm_1367b ld a, b - ld [wcc35], a + ld [wMenuItemToSwap], a push hl push de ld hl, wPartySpecies @@ -779,7 +779,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653) jr nc, .asm_1368e inc h .asm_1368e - ld a, [wcc35] + ld a, [wMenuItemToSwap] add e ld e, a jr nc, .asm_13696 @@ -796,61 +796,61 @@ SwitchPartyMon_Stats: ; 13653 (4:7653) ld a, [wCurrentMenuItem] ; wCurrentMenuItem call AddNTimes push hl - ld de, wcc97 + ld de, wSwitchPartyMonTempBuffer ld bc, $2c call CopyData ld hl, wPartyMons ld bc, $2c - ld a, [wcc35] + ld a, [wMenuItemToSwap] call AddNTimes pop de push hl ld bc, $2c call CopyData pop de - ld hl, wcc97 + ld hl, wSwitchPartyMonTempBuffer ld bc, $2c call CopyData ld hl, wPartyMonOT ; wd273 ld a, [wCurrentMenuItem] ; wCurrentMenuItem call SkipFixedLengthTextEntries push hl - ld de, wcc97 + ld de, wSwitchPartyMonTempBuffer ld bc, $b call CopyData ld hl, wPartyMonOT ; wd273 - ld a, [wcc35] + ld a, [wMenuItemToSwap] call SkipFixedLengthTextEntries pop de push hl ld bc, $b call CopyData pop de - ld hl, wcc97 + ld hl, wSwitchPartyMonTempBuffer ld bc, $b call CopyData ld hl, wPartyMonNicks ; wPartyMonNicks ld a, [wCurrentMenuItem] ; wCurrentMenuItem call SkipFixedLengthTextEntries push hl - ld de, wcc97 + ld de, wSwitchPartyMonTempBuffer ld bc, $b call CopyData ld hl, wPartyMonNicks ; wPartyMonNicks - ld a, [wcc35] + ld a, [wMenuItemToSwap] call SkipFixedLengthTextEntries pop de push hl ld bc, $b call CopyData pop de - ld hl, wcc97 + ld hl, wSwitchPartyMonTempBuffer ld bc, $b call CopyData - ld a, [wcc35] + ld a, [wMenuItemToSwap] ld [wWhichTrade], a ; wWhichTrade xor a - ld [wcc35], a + ld [wMenuItemToSwap], a ld [wd07d], a pop de pop hl diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 65b06e9da5..f95a071059 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -4,11 +4,11 @@ StatusScreen: ; 12953 (4:6953) ld a, [wcc49] cp $2 ; 2 means we're in a PC box jr c, .DontRecalculate ; 0x1295b $14 - ld a, [wcf9b] - ld [wcfb9], a + ld a, [wLoadedMonBoxLevel] + ld [wLoadedMonLevel], a ld [W_CURENEMYLVL], a - ld hl, wcfa8 - ld de, wcfba + ld hl, wLoadedMonHPExp - 1 + ld de, wLoadedMonStats ld b, $1 call CalcStats ; Recalculate stats .DontRecalculate @@ -36,10 +36,10 @@ StatusScreen: ; 12953 (4:6953) ld hl, vChars2 + $720 ld bc,(BANK(PTile) << 8 | $01) call CopyVideoDataDouble ; P (for PP), inline - ld a, [$ffd7] + ld a, [hTilesetType] push af xor a - ld [$ffd7], a + ld [hTilesetType], a hlCoord 19, 1 ld bc, $060a call DrawLineBox ; Draws the box around name, HP and status @@ -55,13 +55,13 @@ StatusScreen: ; 12953 (4:6953) ld de, Type1Text call PlaceString ; "TYPE1/" hlCoord 11, 3 - predef DrawHP ; predef $5f + predef DrawHP ld hl, wcf25 call GetHealthBarColor ld b, $3 call GoPAL_SET ; SGB palette hlCoord 16, 6 - ld de, wcf9c + ld de, wLoadedMonStatus call PrintStatusCondition jr nz, .StatusWritten ; 0x129fc $9 hlCoord 16, 6 @@ -82,7 +82,7 @@ StatusScreen: ; 12953 (4:6953) ld bc, $8103 ; Zero-padded, 3 call PrintNumber ; Pokémon no. hlCoord 11, 10 - predef Func_27d6b ; Prints the type (?) + predef PrintMonType ld hl, NamePointers2 ; $6a9d call .unk_12a7e ld d, h @@ -96,7 +96,7 @@ StatusScreen: ; 12953 (4:6953) hlCoord 12, 16 call PlaceString ; OT hlCoord 12, 14 - ld de, wcfa4 + ld de, wLoadedMonOTID ld bc, $8205 ; 5 call PrintNumber ; ID Number ld d, $0 @@ -109,7 +109,7 @@ StatusScreen: ; 12953 (4:6953) call PlayCry ; play Pokémon cry call WaitForTextScrollButtonPress ; wait for button pop af - ld [$ffd7], a + ld [hTilesetType], a ret .unk_12a7e ; 0x12a7e ; I don't know what this does, iterates over pointers? ld a, [wcc49] @@ -203,14 +203,14 @@ PrintStatsBox: ; 12ae4 (4:6ae4) pop hl pop bc add hl, bc - ld de, wcfbc + ld de, wLoadedMonAttack ld bc, $0203 ; three digits call PrintStat - ld de, wcfbe + ld de, wLoadedMonDefense call PrintStat - ld de, wcfc0 + ld de, wLoadedMonSpeed call PrintStat - ld de, wcfc2 + ld de, wLoadedMonSpecial jp PrintNumber PrintStat push hl @@ -227,19 +227,19 @@ StatsText: ; 12b3a (4:6b3a) next "SPECIAL@" StatusScreen2: ; 12b57 (4:6b57) - ld a, [$ffd7] + ld a, [hTilesetType] push af xor a - ld [$ffd7], a + ld [hTilesetType], a ld [$ffba], a ld bc, $0005 - ld hl, wd0dc + ld hl, wMoves call FillMemory - ld hl, wcfa0 - ld de, wd0dc - ld bc, $0004 + ld hl, wLoadedMonMoves + ld de, wMoves + ld bc, NUM_MOVES call CopyData - callab Func_39b87 + callab FormatMovesString hlCoord 9, 2 ld bc, $050a call ClearScreenArea ; Clear under name @@ -250,7 +250,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld c, $12 call TextBoxBorder ; Draw move container hlCoord 2, 9 - ld de, wd0e1 + ld de, wMovesString call PlaceString ; Print moves ld a, [wcd6c] inc a @@ -269,7 +269,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld a, "-" call Func_12ccb ; Fill the rest with -- .InitPP ; 12bbb - ld hl, wcfa0 + ld hl, wLoadedMonMoves deCoord 14, 10 ld b, $0 .PrintPP ; 12bc3 @@ -323,12 +323,12 @@ StatusScreen2: ; 12b57 (4:6b57) hlCoord 9, 3 ld de, EXPPointsText call PlaceString - ld a, [wcfb9] ; level + ld a, [wLoadedMonLevel] ; level push af cp MAX_LEVEL jr z, .Level100 ; 0x12c20 $4 inc a - ld [wcfb9], a ; Increase temporarily if not 100 + ld [wLoadedMonLevel], a ; Increase temporarily if not 100 .Level100 hlCoord 14, 6 ld [hl], $70 ; 1-tile "to" @@ -336,13 +336,13 @@ StatusScreen2: ; 12b57 (4:6b57) inc hl call PrintLevel pop af - ld [wcfb9], a - ld de, wcfa6 + ld [wLoadedMonLevel], a + ld de, wLoadedMonExp hlCoord 12, 4 ld bc, $0307 call PrintNumber ; exp call .asm_12c86 - ld de, wcfa6 + ld de, wLoadedMonExp hlCoord 7, 6 ld bc, $0307 call PrintNumber @@ -360,7 +360,7 @@ StatusScreen2: ; 12b57 (4:6b57) call Delay3 call WaitForTextScrollButtonPress ; wait for button pop af - ld [$ffd7], a + ld [hTilesetType], a ld hl, wd72c res 1, [hl] ld a, $77 @@ -368,13 +368,13 @@ StatusScreen2: ; 12b57 (4:6b57) call GBPalWhiteOut jp ClearScreen .asm_12c86 ; This does some magic with lvl/exp? - ld a, [wcfb9] ; Load level + ld a, [wLoadedMonLevel] ; Load level cp MAX_LEVEL jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100 inc a ld d, a callab CalcExperience - ld hl, wcfa8 + ld hl, wLoadedMonExp + 2 ld a, [$ff98] sub [hl] ld [hld], a @@ -386,7 +386,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld [hld], a ret .asm_12ca7 - ld hl, wcfa6 + ld hl, wLoadedMonExp xor a ld [hli], a ld [hli], a diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm index c2968e2fb9..88cfcf6564 100755 --- a/engine/menu/vending_machine.asm +++ b/engine/menu/vending_machine.asm @@ -1,20 +1,20 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) ld hl, VendingMachineText1 call PrintText - ld a, $13 - ld [wd125], a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld [wMenuWatchedKeys], a ld a, $3 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, $5 - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a ld hl, wd730 set 6, [hl] hlCoord 0, 3 @@ -33,7 +33,7 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) call HandleMenuInput bit 1, a jr nz, .asm_74f93 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $3 jr z, .asm_74f93 xor a @@ -66,11 +66,11 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) ld hl, VendingMachineText5 call PrintText ld hl, $ffde - ld de, wPlayerMoney + 2 ; wd349 + ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef - ld a, $13 - ld [wd125], a + ld a, MONEY_BOX + ld [wTextBoxID], a jp DisplayTextBoxID .BagFull ld hl, VendingMachineText6 diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm index e05bdd55dc..52bd0fd4c7 100755 --- a/engine/mon_party_sprites.asm +++ b/engine/mon_party_sprites.asm @@ -21,7 +21,7 @@ GetAnimationSpeed: ; 7170a (1c:570a) ld c, a ld hl, PartyMonSpeeds add hl, bc - ld a, [wcf1b] + ld a, [wOnSGB] xor $1 add [hl] ld c, a @@ -382,7 +382,7 @@ GetPartyMonSpriteID: ; 718e9 (1c:58e9) ld c, a dec a srl a - ld hl, MonPartyData ; $590d + ld hl, MonPartyData ld e, a ld d, $0 add hl, de diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 4ce4ac771a..02221791f2 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -49,10 +49,10 @@ OakSpeech: ; 6115 (1:6115) ld [wcf96],a call AddItemToInventory ; give one potion ld a,[W_ANIMATIONID] - ld [wd71a],a - call Func_62ce + ld [wDestinationMap],a + call SpecialWarpIn xor a - ld [$FFD7],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 @@ -72,7 +72,7 @@ OakSpeech: ; 6115 (1:6115) call FadeInIntroPic ld hl,OakSpeechText1 call PrintText ; prints text box - call GBFadeOut2 + call GBFadeOutToWhite call ClearScreen ld a,MEW ld [wd0b5],a ; pic displayed is stored at this location @@ -83,7 +83,7 @@ OakSpeech: ; 6115 (1:6115) call MovePicLeft ld hl,OakSpeechText2 call PrintText ; Prints text box - call GBFadeOut2 + call GBFadeOutToWhite call ClearScreen ld de,RedPicFront ld bc,(Bank(RedPicFront) << 8) | $00 @@ -98,7 +98,7 @@ OakSpeech: ; 6115 (1:6115) ld hl,IntroducePlayerText call PrintText call LoadDefaultNamesPlayer ; brings up NewName/Red/etc menu - call GBFadeOut2 + call GBFadeOutToWhite call ClearScreen ld de,Rival1Pic ld bc,(Bank(Rival1Pic) << 8) | $00 @@ -109,7 +109,7 @@ OakSpeech: ; 6115 (1:6115) call LoadDefaultNamesRival Func_61bc: ; 61bc (1:61bc) - call GBFadeOut2 + call GBFadeOutToWhite call ClearScreen ld de,RedPicFront ld bc,(Bank(RedPicFront) << 8) | $00 @@ -120,7 +120,7 @@ Func_61bc: ; 61bc (1:61bc) ld bc,(Bank(LeafPicFront) << 8) | $00 .NotLeaf2: call IntroPredef3B - call GBFadeIn2 + call GBFadeInFromWhite ld a,[wd72d] and a jr nz,.next @@ -176,10 +176,10 @@ Func_61bc: ; 61bc (1:61bc) call ClearScreenArea call LoadTextBoxTilePatterns ld a,1 - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a ld c,$32 call DelayFrames - call GBFadeOut2 + call GBFadeOutToWhite jp ClearScreen OakSpeechText1: ; 6253 (1:6253) TX_FAR _OakSpeechText1 @@ -272,13 +272,13 @@ BoyGirlChoice:: InitBoyGirlTextBoxParameters:: ld a, $1 ; loads the value for the unused North/West choice, that was changed to say Boy/Girl - ld [wd12c], a + ld [wTwoOptionMenuID], a hlCoord 11, 7 ld bc, $80c ret DisplayBoyGirlChoice:: ld a, $14 - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID jp LoadScreenTilesFromBuffer1 \ No newline at end of file diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm index 2c3c2e6301..7b18fae7fe 100755 --- a/engine/oak_speech2.asm +++ b/engine/oak_speech2.asm @@ -201,7 +201,6 @@ DisplayIntroNameTextBox: ; 6a6c (1:6a6c) .namestring ; 6aa3 (1:6aa3) db "NAME@" - DefaultNamesPlayer: ; 6aa8 (1:6aa8) db "NEW NAME" next "RED" @@ -223,7 +222,6 @@ DefaultNamesRival: ; 6abe (1:6abe) next "JOHN" db "@" - Func_6ad6: ; 6ad6 (1:6ad6) ld b, a ld c, $0 @@ -253,6 +251,5 @@ DefaultNamesRivalList: ; 6b08 (1:6b08) DefaultNamesGirlList: db "NEW NAME@GREEN@ASHLEY@NICOLE@" - TextTerminator_6b20: ; 6b20 (1:6b20) db "@" diff --git a/engine/overworld/cable_club_npc.asm b/engine/overworld/cable_club_npc.asm index 9ae5b5083b..bdab41a655 100755 --- a/engine/overworld/cable_club_npc.asm +++ b/engine/overworld/cable_club_npc.asm @@ -1,51 +1,51 @@ CableClubNPC: ; 71c5 (1:71c5) - ld hl, CableClubNPCText1 + ld hl, CableClubNPCWelcomeText call PrintText ld a, [wd74b] - bit 5, a - jp nz, Func_71e1 + bit 5, a ; received pokedex? + jp nz, .receivedPokedex +; if the player hasn't received the pokedex ld c, $3c call DelayFrames - ld hl, CableClubNPCText6 + ld hl, CableClubNPCMakingPreparationsText call PrintText jp Func_7298 - -Func_71e1: ; 71e1 (1:71e1) +.receivedPokedex ld a, $1 ld [wMenuJoypadPollCount], a - ld a, $5a - ld [wcc47], a -.asm_71eb - ld a, [$ffaa] - cp $2 - jr z, .asm_721a ; 0x71ef $29 - cp $1 - jr z, .asm_721a ; 0x71f3 $25 - ld a, $ff - ld [$ffaa], a - ld a, $2 - ld [$ff01], a + ld a, 90 + ld [wLinkTimeoutCounter], a +.establishConnectionLoop + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .establishedConnection + cp USING_EXTERNAL_CLOCK + jr z, .establishedConnection + ld a, CONNECTION_NOT_ESTABLISHED + ld [hSerialConnectionStatus], a + ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK + ld [rSB], a xor a - ld [$ffad], a - ld a, $80 - ld [$ff02], a - ld a, [wcc47] + ld [hSerialReceiveData], a + ld a, START_TRANSFER_EXTERNAL_CLOCK + ld [rSC], a + ld a, [wLinkTimeoutCounter] dec a - ld [wcc47], a - jr z, .asm_7287 ; 0x720b $7a - ld a, $1 - ld [$ff01], a - ld a, $81 - ld [$ff02], a + ld [wLinkTimeoutCounter], a + jr z, .failedToEstablishConnection + ld a, ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK + ld [rSB], a + ld a, START_TRANSFER_INTERNAL_CLOCK + ld [rSC], a call DelayFrame - jr .asm_71eb ; 0x7218 $d1 -.asm_721a - call Func_22ed + jr .establishConnectionLoop +.establishedConnection + call Serial_SendZeroByte call DelayFrame - call Func_22ed - ld c, $32 + call Serial_SendZeroByte + ld c, 50 call DelayFrames - ld hl, CableClubNPCText2 + ld hl, CableClubNPCPleaseApplyHereHaveToSaveText call PrintText xor a ld [wMenuJoypadPollCount], a @@ -54,22 +54,22 @@ Func_71e1: ; 71e1 (1:71e1) ld [wMenuJoypadPollCount], a ld a, [wCurrentMenuItem] and a - jr nz, .asm_728f ; 0x723e $4f + jr nz, .choseNo callab SaveSAVtoSRAM call WaitForSoundToFinish ld a, (SFX_02_5d - SFX_Headers_02) / 3 call PlaySoundWaitForCurrent - ld hl, CableClubNPCText3 + ld hl, CableClubNPCPleaseWaitText call PrintText - ld hl, wcc47 + ld hl, wUnknownSerialCounter ld a, $3 ld [hli], a xor a ld [hl], a - ld [$ffa9], a - ld [wcc42], a - call Func_227f - ld hl, wcc47 + ld [hSerialReceivedNewData], a + ld [wSerialExchangeNybbleSendData], a + call Serial_SyncAndExchangeNybble + ld hl, wUnknownSerialCounter ld a, [hli] inc a jr nz, Func_72a8 ; 0x726b $3b @@ -79,26 +79,26 @@ Func_71e1: ; 71e1 (1:71e1) ld b, $a .asm_7273 call DelayFrame - call Func_22ed + call Serial_SendZeroByte dec b jr nz, .asm_7273 ; 0x727a $f7 - call Func_72d7 - ld hl, CableClubNPCText4 + call CloseLinkConnection + ld hl, CableClubNPCLinkClosedBecauseOfInactivityText call PrintText jr Func_7298 ; 0x7285 $11 -.asm_7287 - ld hl, CableClubNPCText7 +.failedToEstablishConnection + ld hl, CableClubNPCAreaReservedFor2FriendsLinkedByCableText call PrintText jr Func_7298 ; 0x728d $9 -.asm_728f - call Func_72d7 - ld hl, CableClubNPCText5 +.choseNo + call CloseLinkConnection + ld hl, CableClubNPCPleaseComeAgainText call PrintText ; fall through Func_7298: ; 7298 (1:7298) xor a - ld hl, wcc47 + ld hl, wUnknownSerialCounter ld [hli], a ld [hl], a ld hl, wd72e @@ -115,42 +115,42 @@ Func_72a8: ; 72a8 (1:72a8) ld b, BANK(LinkMenu) jp Bankswitch -CableClubNPCText7: ; 72b3 (1:72b3) - TX_FAR _CableClubNPCText7 +CableClubNPCAreaReservedFor2FriendsLinkedByCableText: ; 72b3 (1:72b3) + TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText db "@" -CableClubNPCText1: ; 72b8 (1:72b8) - TX_FAR _CableClubNPCText1 +CableClubNPCWelcomeText: ; 72b8 (1:72b8) + TX_FAR _CableClubNPCWelcomeText db "@" -CableClubNPCText2: ; 72bd (1:72bd) - TX_FAR _CableClubNPCText2 +CableClubNPCPleaseApplyHereHaveToSaveText: ; 72bd (1:72bd) + TX_FAR _CableClubNPCPleaseApplyHereHaveToSaveText db "@" -CableClubNPCText3: ; 72c2 (1:72c2) - TX_FAR _CableClubNPCText3 +CableClubNPCPleaseWaitText: ; 72c2 (1:72c2) + TX_FAR _CableClubNPCPleaseWaitText db $a, "@" -CableClubNPCText4: ; 72c8 (1:72c8) - TX_FAR _CableClubNPCText4 +CableClubNPCLinkClosedBecauseOfInactivityText: ; 72c8 (1:72c8) + TX_FAR _CableClubNPCLinkClosedBecauseOfInactivityText db "@" -CableClubNPCText5: ; 72cd (1:72cd) - TX_FAR _CableClubNPCText5 +CableClubNPCPleaseComeAgainText: ; 72cd (1:72cd) + TX_FAR _CableClubNPCPleaseComeAgainText db "@" -CableClubNPCText6: ; 72d2 (1:72d2) - TX_FAR _CableClubNPCText6 +CableClubNPCMakingPreparationsText: ; 72d2 (1:72d2) + TX_FAR _CableClubNPCMakingPreparationsText db "@" -Func_72d7: ; 72d7 (1:72d7) +CloseLinkConnection: ; 72d7 (1:72d7) call Delay3 - ld a, $ff - ld [$ffaa], a - ld a, $2 - ld [$ff01], a + ld a, CONNECTION_NOT_ESTABLISHED + ld [hSerialConnectionStatus], a + ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK + ld [rSB], a xor a - ld [$ffad], a - ld a, $80 - ld [$ff02], a + ld [hSerialReceiveData], a + ld a, START_TRANSFER_EXTERNAL_CLOCK + ld [rSC], a ret diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm index f48c26f4a8..c4df0d51b0 100755 --- a/engine/overworld/card_key.asm +++ b/engine/overworld/card_key.asm @@ -2,18 +2,18 @@ PrintCardKeyText: ; 52673 (14:6673) ld hl, SilphCoMapList ld a, [W_CURMAP] ld b, a -.asm_5267a +.silphCoMapListLoop ld a, [hli] cp $ff ret z cp b - jr nz, .asm_5267a - predef Func_c586 - ld a, [wcfc6] + jr nz, .silphCoMapListLoop + predef GetTileAndCoordsInFrontOfPlayer + ld a, [wTileInFrontOfPlayer] cp $18 - jr z, .asm_5269c + jr z, .cardKeyDoorInFrontOfPlayer cp $24 - jr z, .asm_5269c + jr z, .cardKeyDoorInFrontOfPlayer ld b, a ld a, [W_CURMAP] cp SILPH_CO_11F @@ -21,41 +21,41 @@ PrintCardKeyText: ; 52673 (14:6673) ld a, b cp $5e ret nz -.asm_5269c +.cardKeyDoorInFrontOfPlayer ld b, CARD_KEY call IsItemInBag - jr z, .asm_526dc - call Func_526fd + jr z, .noCardKey + call GetCoordsInFrontOfPlayer push de ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_DOWNARROWBLINKCNT2], a call PrintPredefTextID pop de srl d ld a, d ld b, a - ld [wd73f], a + ld [wCardKeyDoorY], a srl e ld a, e ld c, a - ld [wd740], a - ld a, [W_CURMAP] ; W_CURMAP + ld [wCardKeyDoorX], a + ld a, [W_CURMAP] cp SILPH_CO_11F - jr nz, .asm_526c8 + jr nz, .notSilphCo11F ld a, $3 - jr .asm_526ca -.asm_526c8 + jr .replaceCardKeyDoorTileBlock +.notSilphCo11F ld a, $e -.asm_526ca +.replaceCardKeyDoorTileBlock ld [wd09f], a - predef Func_ee9e + predef ReplaceTileBlock ld hl, wd126 set 5, [hl] ld a, (SFX_1f_57 - SFX_Headers_1f) / 3 jp PlaySound -.asm_526dc +.noCardKey ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_DOWNARROWBLINKCNT2], a jp PrintPredefTextID SilphCoMapList: ; 526e3 (14:66e3) @@ -81,26 +81,32 @@ CardKeyFailText: ; 526f8 (14:66f8) TX_FAR _CardKeyFailText db "@" -Func_526fd: ; 526fd (14:66fd) - ld a, [W_YCOORD] ; wd361 +; d = Y +; e = X +GetCoordsInFrontOfPlayer: ; 526fd (14:66fd) + ld a, [W_YCOORD] ld d, a - ld a, [W_XCOORD] ; wd362 + ld a, [W_XCOORD] ld e, a - ld a, [wSpriteStateData1 + 9] + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction and a - jr nz, .asm_5270d + jr nz, .notFacingDown +; facing down inc d ret -.asm_5270d - cp $4 - jr nz, .asm_52713 +.notFacingDown + cp SPRITE_FACING_UP + jr nz, .notFacingUp +; facing up dec d ret -.asm_52713 - cp $8 - jr nz, .asm_52719 +.notFacingUp + cp SPRITE_FACING_LEFT + jr nz, .notFacingLeft +; facing left dec e ret -.asm_52719 +.notFacingLeft +; facing right inc e ret diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 29b52eb9e1..7b92bca301 100755 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -6,13 +6,13 @@ UsedCut: ; ef54 (3:6f54) jr z, .asm_ef6b cp GYM jr nz, .asm_ef77 - ld a, [wcfc6] + ld a, [wTileInFrontOfPlayer] cp $50 ; gym cut tree jr nz, .asm_ef77 jr asm_ef82 .asm_ef6b dec a - ld a, [wcfc6] + ld a, [wTileInFrontOfPlayer] cp $3d ; cut tree jr z, asm_ef82 cp $52 ; grass @@ -36,36 +36,36 @@ asm_ef82: ; ef82 (3:6f82) set 6, [hl] call GBPalWhiteOutWithDelay3 call ClearSprites - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns ld a, $90 - ld [$ffb0], a + ld [hWY], a call Delay3 call LoadGBPal call LoadCurrentMapView call SaveScreenTilesToBuffer2 call Delay3 xor a - ld [$ffb0], a + ld [hWY], a ld hl, UsedCutText call PrintText call LoadScreenTilesFromBuffer2 ld hl, wd730 res 6, [hl] ld a, $ff - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call AnimateCutTree ld de, CutTreeBlockSwaps ; $7100 call Func_f09f - call Func_eedc + call RedrawMapView callba Func_79e96 ld a, $1 - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld a, (SFX_02_56 - SFX_Headers_02) / 3 call PlaySound ld a, $90 - ld [$ffb0], a + ld [hWY], a call UpdateSprites - jp Func_eedc + jp RedrawMapView UsedCutText: ; eff2 (3:6ff2) TX_FAR _UsedCutText @@ -87,17 +87,17 @@ AnimateCutTree: ; eff7 (3:6ff7) ld hl, vChars1 + $7e0 ld bc, (BANK(Overworld_GFX) << 8) + $02 call CopyVideoData - jr asm_f055 + jr WriteCutTreeBoulderDustAnimationOAMBlock .asm_f020 ld hl, vChars1 + $7c0 - call LoadCutTreeOAM + call LoadCutTreeAnimationTilePattern ld hl, vChars1 + $7d0 - call LoadCutTreeOAM + call LoadCutTreeAnimationTilePattern ld hl, vChars1 + $7e0 - call LoadCutTreeOAM + call LoadCutTreeAnimationTilePattern ld hl, vChars1 + $7f0 - call LoadCutTreeOAM - call asm_f055 + call LoadCutTreeAnimationTilePattern + call WriteCutTreeBoulderDustAnimationOAMBlock ld hl, wOAMBuffer + $93 ld de, $4 ld a, $30 @@ -110,26 +110,27 @@ AnimateCutTree: ; eff7 (3:6ff7) jr nz, .asm_f044 ret -LoadCutTreeOAM: ; f04c (3:704c) +LoadCutTreeAnimationTilePattern: ; f04c (3:704c) ld de, AnimationTileset2 + $60 ; $474e ; tile depicting a leaf ld bc, (BANK(AnimationTileset2) << 8) + $01 jp CopyVideoData -asm_f055: ; f055 (3:7055) - call Func_f068 + +WriteCutTreeBoulderDustAnimationOAMBlock: ; f055 (3:7055) + call GetCutTreeBoulderDustAnimationOffsets ld a, $9 - ld de, CutTreeOAM ; $7060 + ld de, CutTreeBoulderDustAnimationTilesAndAttributes jp WriteOAMBlock -CutTreeOAM: ; f060 (3:7060) +CutTreeBoulderDustAnimationTilesAndAttributes: ; f060 (3:7060) db $FC,$10,$FD,$10 db $FE,$10,$FF,$10 -Func_f068: ; f068 (3:7068) +GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068) ld hl, wSpriteStateData1 + 4 - ld a, [hli] + ld a, [hli] ; player's sprite screen Y position ld b, a inc hl - ld a, [hli] + ld a, [hli] ; player's sprite screen X position ld c, a ; bc holds ypos/xpos of player's sprite inc hl inc hl @@ -139,9 +140,9 @@ Func_f068: ; f068 (3:7068) ld d, $0 ; de holds direction (00: down, 02: up, 04: left, 06: right) ld a, [wcd50] and a - ld hl, CutTreeAnimationOffsets ; $708f + ld hl, CutTreeAnimationOffsets jr z, .asm_f084 - ld hl, CutTreeAnimationOffsets2 ; $7097 + ld hl, BoulderDustAnimationOffsets .asm_f084 add hl, de ld e, [hl] @@ -162,8 +163,7 @@ CutTreeAnimationOffsets: ; f08f (3:708f) db -8, 20 ; player is facing left db 24, 20 ; player is facing right -CutTreeAnimationOffsets2: ; f097 (3:7097) -; Not sure if these ever get used. CutTreeAnimationOffsets only seems to be used. +BoulderDustAnimationOffsets: ; f097 (3:7097) ; 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 @@ -178,7 +178,7 @@ Func_f09f: ; f09f (3:709f) ld c, a ld b, $0 ld d, $0 - ld hl, wd35f + ld hl, wCurrentTileBlockMapViewPointer ld a, [hli] ld h, [hl] ld l, a diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm index 08f6d6518c..de2b9d5570 100755 --- a/engine/overworld/cut2.asm +++ b/engine/overworld/cut2.asm @@ -9,12 +9,12 @@ Func_79e96: ; 79e96 (1e:5e96) ld a, $1 ld [wd08a], a ld c, $2 - call Func_79339 + call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $99 ld a, $ff ld [wd08a], a ld c, $2 - call Func_79339 + call AdjustOAMBlockXPos2 ld a, [rOBP1] ; $ff49 xor $64 ld [rOBP1], a ; $ff49 @@ -37,7 +37,7 @@ Func_79e96: ; 79e96 (1e:5e96) ld a, $2 ld [wd08a], a ld c, $4 - call Func_79352 + call AdjustOAMBlockYPos2 pop bc dec c jr nz, .asm_79eca @@ -49,22 +49,22 @@ Func_79eed: ; 79eed (1e:5eed) ld a, $1 ld [wd08a], a ld c, $1 - call Func_79339 + call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $95 ld a, $2 ld [wd08a], a ld c, $1 - call Func_79339 + call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $99 ld a, $fe ld [wd08a], a ld c, $1 - call Func_79339 + call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $9d ld a, $ff ld [wd08a], a ld c, $1 - call Func_79339 + call AdjustOAMBlockXPos2 ld a, [rOBP1] ; $ff49 xor $64 ld [rOBP1], a ; $ff49 diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm index 42ebb1744b..ac345af953 100755 --- a/engine/overworld/doors.asm +++ b/engine/overworld/doors.asm @@ -1,26 +1,27 @@ -HandleDoors: ; 1a609 (6:6609) +; returns whether the player is standing on a door tile in carry +IsPlayerStandingOnDoorTile: ; 1a609 (6:6609) push de ld hl, DoorTileIDPointers ; $662c ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET ld de, $3 call IsInArray pop de - jr nc, .asm_1a62a + jr nc, .notStandingOnDoor inc hl ld a, [hli] ld h, [hl] ld l, a - aCoord 8, 9 + aCoord 8, 9 ; a = lower left background tile under player's sprite ld b, a -.asm_1a621 +.loop ld a, [hli] and a - jr z, .asm_1a62a + jr z, .notStandingOnDoor cp b - jr nz, .asm_1a621 + jr nz, .loop scf ret -.asm_1a62a +.notStandingOnDoor and a ret diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm index 10b3b00334..3a23d410b4 100755 --- a/engine/overworld/elevator.asm +++ b/engine/overworld/elevator.asm @@ -6,7 +6,7 @@ ShakeElevator: ; 7bf15 (1e:7f15) call Delay3 ld a, $ff call PlaySound - ld a, [$ffaf] + ld a, [hSCY] ld d, a ld e, $1 ; number of times to play collision sfx @@ -16,7 +16,7 @@ ShakeElevator: ; 7bf15 (1e:7f15) xor $fe ld e, a add d - ld [$ffaf], a + ld [hSCY], a push bc ld c, BANK(SFX_02_5b) ld a, (SFX_02_5b - SFX_Headers_02) / 3 @@ -27,7 +27,7 @@ ShakeElevator: ; 7bf15 (1e:7f15) dec b jr nz, .asm_7bf30 ld a, d - ld [$ffaf], a + ld [hSCY], a ld a, $ff call PlaySound ld c, BANK(SFX_02_5f) @@ -38,10 +38,10 @@ ShakeElevator: ; 7bf15 (1e:7f15) cp $b9 jr z, .asm_7bf57 call UpdateSprites - jp Func_2307 + jp PlayDefaultMusic Func_7bf64: ; 7bf64 (1e:7f64) - ld hl, wd527 + ld hl, wMapViewVRAMPointer + 1 ld a, [hld] push af ld a, [hl] diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index ae7702b46f..7106063b79 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -11,10 +11,10 @@ EmotionBubble: ; 17c47 (5:7c47) ld hl, vChars1 + $780 ld bc, (BANK(EmotionBubblesPointerTable) << 8) + $04 call CopyVideoData - ld a, [wcfcb] + ld a, [wUpdateSpritesEnabled] push af ld a, $ff - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld a, [wd736] bit 6, a ld hl, wOAMBuffer + $8f @@ -51,7 +51,7 @@ EmotionBubble: ; 17c47 (5:7c47) ld c, $3c call DelayFrames pop af - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call DelayFrame jp UpdateSprites diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 9c93583db3..90d306c323 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -3,7 +3,7 @@ AnimateHealingMachine: ; 70433 (1c:4433) ld hl, vChars0 + $7c0 ld bc, (BANK(PokeCenterFlashingMonitorAndHealBall) << 8) + $03 call CopyVideoData - ld hl, wcfcb + ld hl, wUpdateSpritesEnabled ld a, [hl] push af ld [hl], $ff @@ -48,7 +48,7 @@ AnimateHealingMachine: ; 70433 (1c:4433) ld [wc0ee], a call PlaySound ld d, $28 - call Func_704f3 + call FlashSprite8Times .asm_704a2 ld a, [wc026] cp MUSIC_PKMN_HEALED @@ -74,16 +74,17 @@ PokeCenterOAMData: ; 704d7 (1c:44d7) db $35,$30,$7D,$10 db $35,$38,$7D,$30 -Func_704f3: ; 704f3 (1c:44f3) - ld b, $8 -.asm_704f5 - ld a, [rOBP1] ; $ff49 +; d = value to xor with palette +FlashSprite8Times: ; 704f3 (1c:44f3) + ld b, 8 +.loop + ld a, [rOBP1] xor d - ld [rOBP1], a ; $ff49 - ld c, $a + ld [rOBP1], a + ld c, 10 call DelayFrames dec b - jr nz, .asm_704f5 + jr nz, .loop ret Func_70503: ; 70503 (1c:4503) diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm index 77bd8fe6ca..17288a1754 100755 --- a/engine/overworld/hidden_items.asm +++ b/engine/overworld/hidden_items.asm @@ -12,7 +12,7 @@ HiddenItems: ; 76688 (1d:6688) ret nz call EnableAutoTextBoxDrawing ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, [wWhichTrade] ; item ID ld [wd11e], a call GetItemName @@ -42,7 +42,7 @@ FoundHiddenItemText: ; 7675b (1d:675b) .BagFull call WaitForTextScrollButtonPress ; wait for button press xor a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, HiddenItemBagFullText call PrintText jp TextScriptEnd @@ -53,7 +53,7 @@ HiddenItemBagFullText: ; 76794 (1d:6794) HiddenCoins: ; 76799 (1d:6799) ld b, COIN_CASE - predef IsItemInBag_ + predef IsItemInBag_ ld a, b and a ret z diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm index d2114293ab..ae67aeed00 100755 --- a/engine/overworld/hidden_objects.asm +++ b/engine/overworld/hidden_objects.asm @@ -1,20 +1,21 @@ Func_46981: ; 46981 (11:6981) xor a - ld [wd71e], a + ld [wWhichDungeonWarp], a ld a, [wd72d] bit 4, a ret nz call ArePlayerCoordsInArray ret nc - ld a, [wWhichTrade] ; wWhichTrade - ld [wd71e], a + ld a, [wWhichTrade] + ld [wWhichDungeonWarp], a ld hl, wd72d set 4, [hl] ld hl, wd732 set 4, [hl] ret -Func_469a0: ; 469a0 (11:69a0) +; if a hidden object was found, stores $00 in [$ffee], else stores $ff +CheckForHiddenObject: ; 469a0 (11:69a0) ld hl, $ffeb xor a ld [hli], a @@ -22,107 +23,110 @@ Func_469a0: ; 469a0 (11:69a0) ld [hli], a ld [hl], a ld de, $0 - ld hl, HiddenObjectMaps ; $6a40 -.asm_469ae + ld hl, HiddenObjectMaps +.hiddenMapLoop ld a, [hli] ld b, a cp $ff - jr z, .asm_469fc - ld a, [W_CURMAP] ; W_CURMAP + jr z, .noMatch + ld a, [W_CURMAP] cp b - jr z, .asm_469be + jr z, .foundMatchingMap inc de inc de - jr .asm_469ae -.asm_469be - ld hl, HiddenObjectPointers ; $6a96 + jr .hiddenMapLoop +.foundMatchingMap + ld hl, HiddenObjectPointers add hl, de ld a, [hli] ld h, [hl] ld l, a push hl - ld hl, wWhichTrade ; wWhichTrade + ld hl, wHiddenObjectFunctionArgument xor a ld [hli], a ld [hli], a ld [hl], a pop hl -.asm_469ce +.hiddenObjectLoop ld a, [hli] cp $ff - jr z, .asm_469fc - ld [wTrainerScreenY], a + jr z, .noMatch + ld [wHiddenObjectY], a ld b, a ld a, [hli] - ld [wTrainerScreenX], a + ld [wHiddenObjectX], a ld c, a - call Func_46a01 + call CheckIfCoordsInFrontOfPlayerMatch ld a, [$ffea] and a - jr z, .asm_469f0 + jr z, .foundMatchingObject inc hl inc hl inc hl inc hl push hl - ld hl, wTrainerFacingDirection + ld hl, wHiddenObjectIndex inc [hl] pop hl - jr .asm_469ce -.asm_469f0 + jr .hiddenObjectLoop +.foundMatchingObject ld a, [hli] - ld [wWhichTrade], a ; wWhichTrade + ld [wHiddenObjectFunctionArgument], a ld a, [hli] - ld [wTrainerEngageDistance], a + ld [wHiddenObjectFunctionRomBank], a ld a, [hli] ld h, [hl] ld l, a ret -.asm_469fc +.noMatch ld a, $ff ld [$ffee], a ret -Func_46a01: ; 46a01 (11:6a01) - ld a, [wSpriteStateData1 + 9] - cp $4 - jr z, .asm_46a16 - cp $8 - jr z, .asm_46a25 - cp $c - jr z, .asm_46a2b - ld a, [W_YCOORD] ; wd361 +; 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) + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + cp SPRITE_FACING_UP + jr z, .facingUp + cp SPRITE_FACING_LEFT + jr z, .facingLeft + cp SPRITE_FACING_RIGHT + jr z, .facingRight +; facing down + ld a, [W_YCOORD] inc a - jr .asm_46a1a -.asm_46a16 - ld a, [W_YCOORD] ; wd361 + jr .upDownCommon +.facingUp + ld a, [W_YCOORD] dec a -.asm_46a1a +.upDownCommon cp b - jr nz, .asm_46a3b - ld a, [W_XCOORD] ; wd362 + jr nz, .didNotMatch + ld a, [W_XCOORD] cp c - jr nz, .asm_46a3b - jr .asm_46a38 -.asm_46a25 - ld a, [W_XCOORD] ; wd362 + jr nz, .didNotMatch + jr .matched +.facingLeft + ld a, [W_XCOORD] dec a - jr .asm_46a2f -.asm_46a2b - ld a, [W_XCOORD] ; wd362 + jr .leftRightCommon +.facingRight + ld a, [W_XCOORD] inc a -.asm_46a2f +.leftRightCommon cp c - jr nz, .asm_46a3b - ld a, [W_YCOORD] ; wd361 + jr nz, .didNotMatch + ld a, [W_YCOORD] cp b - jr nz, .asm_46a3b -.asm_46a38 + jr nz, .didNotMatch +.matched xor a - jr .asm_46a3d -.asm_46a3b + jr .done +.didNotMatch ld a, $ff -.asm_46a3d +.done ld [$ffea], a ret diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm index a69ec106d9..a49fc26857 100755 --- a/engine/overworld/item.asm +++ b/engine/overworld/item.asm @@ -34,7 +34,7 @@ PickupItem: ld [wcc4d], a predef HideObject ld a, 1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, FoundItemText jr .print diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index 43df82e25c..b8c1918188 100755 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -1,54 +1,54 @@ HandleLedges: ; 1a672 (6:6672) ld a, [wd736] - bit 6, a + bit 6, a ; already jumping down ledge ret nz ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET and a ; OVERWORLD ret nz - predef Func_c586 + predef GetTileAndCoordsInFrontOfPlayer ld a, [wSpriteStateData1 + 9] ld b, a aCoord 8, 9 ld c, a - ld a, [wcfc6] + ld a, [wTileInFrontOfPlayer] ld d, a - ld hl, LedgeTiles ; $66cf -.asm_1a691 + ld hl, LedgeTiles +.loop ld a, [hli] cp $ff ret z cp b - jr nz, .asm_1a6a4 + jr nz, .nextLedgeTile1 ld a, [hli] cp c - jr nz, .asm_1a6a5 + jr nz, .nextLedgeTile2 ld a, [hli] cp d - jr nz, .asm_1a6a6 + jr nz, .nextLedgeTile3 ld a, [hl] ld e, a - jr .asm_1a6a9 -.asm_1a6a4 + jr .foundMatch +.nextLedgeTile1 inc hl -.asm_1a6a5 +.nextLedgeTile2 inc hl -.asm_1a6a6 +.nextLedgeTile3 inc hl - jr .asm_1a691 -.asm_1a6a9 + jr .loop +.foundMatch ld a, [hJoyHeld] and e ret z ld a, $ff ld [wJoyIgnore], a ld hl, wd736 - set 6, [hl] - call Func_3486 + set 6, [hl] ; jumping down ledge + call StartSimulatingJoypadStates ld a, e - ld [wccd3], a - ld [wccd4], a + ld [wSimulatedJoypadStatesEnd], a + ld [wSimulatedJoypadStatesEnd + 1], a ld a, $2 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a call LoadHoppingShadowOAM ld a, (SFX_02_4e - SFX_Headers_02) / 3 call PlaySound @@ -56,24 +56,24 @@ HandleLedges: ; 1a672 (6:6672) ; (player direction) (tile player standing on) (ledge tile) (input required) LedgeTiles: ; 1a6cf (6:66cf) - db $00,$2C,$37,$80 - db $00,$39,$36,$80 - db $00,$39,$37,$80 - db $08,$2C,$27,$20 - db $08,$39,$27,$20 - db $0C,$2C,$0D,$10 - db $0C,$2C,$1D,$10 - db $0C,$39,$0D,$10 + db SPRITE_FACING_DOWN, $2C,$37,D_DOWN + db SPRITE_FACING_DOWN, $39,$36,D_DOWN + db SPRITE_FACING_DOWN, $39,$37,D_DOWN + db SPRITE_FACING_LEFT, $2C,$27,D_LEFT + db SPRITE_FACING_LEFT, $39,$27,D_LEFT + db SPRITE_FACING_RIGHT,$2C,$0D,D_RIGHT + db SPRITE_FACING_RIGHT,$2C,$1D,D_RIGHT + db SPRITE_FACING_RIGHT,$39,$0D,D_RIGHT db $FF LoadHoppingShadowOAM: ; 1a6f0 (6:66f0) ld hl, vChars1 + $7f0 - ld de, LedgeHoppingShadow ; $6708 + ld de, LedgeHoppingShadow ld bc, (BANK(LedgeHoppingShadow) << 8) + $01 call CopyVideoDataDouble ld a, $9 ld bc, $5448 ; b, c = y, x coordinates of shadow - ld de, LedgeHoppingShadowOAM ; $6710 + ld de, LedgeHoppingShadowOAM call WriteOAMBlock ret diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 81443c9ff1..df39d112d1 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -159,7 +159,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) ld l,e pop de ld b,a - ld a,[wcfc4] + ld a,[wFontLoaded] bit 0,a ; reloading upper half of tile patterns after displaying text? jr nz,.skipFirstLoad ; if so, skip loading data into the lower half ld a,b @@ -180,7 +180,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) jr nc,.noCarry3 inc d .noCarry3 - ld a,[wcfc4] + ld a,[wFontLoaded] bit 0,a ; reloading upper half of tile patterns after displaying text? jr nz,.loadWhileLCDOn pop af @@ -264,7 +264,7 @@ InitOutsideMapSprites: ; 1797b (5:797b) cp a,$f0 ; does the map have 2 sprite sets? call nc,GetSplitMapSpriteSetID ; if so, choose the appropriate one ld b,a ; b = spriteSetID - ld a,[wcfc4] + 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] diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index f08a20cb8f..c44827004f 100755 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -1,23 +1,26 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) ld a, [wSpriteStateData2] and a - jr z, .asm_4e41 + jr z, .checkIfTextBoxInFrontOfSprite cp $ff - jr z, .asm_4e4a + jr z, .disableSprite dec a ld [wSpriteStateData2], a - jr .asm_4e4a -.asm_4e41 + jr .disableSprite +; check if a text box is in front of the sprite by checking if the lower left +; background tile the sprite is standing on is greater than $5F, which is +; the maximum number for map tiles +.checkIfTextBoxInFrontOfSprite aCoord 8, 9 ld [$ff93], a cp $60 - jr c, .asm_4e50 -.asm_4e4a + jr c, .lowerLeftTileIsMapTile +.disableSprite ld a, $ff ld [wSpriteStateData1 + 2], a ret -.asm_4e50 - call Func_4c70 +.lowerLeftTileIsMapTile + call DetectCollisionBetweenSprites ld h, $c1 ld a, [wWalkCounter] ; wcfc5 and a @@ -49,7 +52,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) jr .asm_4eab .asm_4e86 ld [wSpriteStateData1 + 9], a - ld a, [wcfc4] + ld a, [wFontLoaded] bit 0, a jr nz, .asm_4e7d .asm_4e90 @@ -127,7 +130,7 @@ Func_4ed1: ; 4ed1 (1:4ed1) bit 7, a jp nz, InitializeSpriteFacingDirection ; c1x1 >= $80 ld b, a - ld a, [wcfc4] + ld a, [wFontLoaded] bit 0, a jp nz, notYetMoving ld a, b @@ -165,8 +168,8 @@ Func_4ed1: ; 4ed1 (1:4ed1) ld hl, wd730 res 0, [hl] xor a - ld [wcd38], a - ld [wcd3a], a + ld [wSimulatedJoypadStatesIndex], a + ld [wWastedByteCD3A], a ret .asm_4f4b cp $fe @@ -490,6 +493,8 @@ CheckSpriteAvailability: ; 50dc (1:50dc) cp b jr c, .spriteInvisible ; right of screen region .skipXVisibilityTest +; make the sprite invisible if a text box is in front of it +; $5F is the maximum number for map tiles call getTileSpriteStandsOn ld d, $60 ld a, [hli] @@ -604,16 +609,16 @@ CanWalkOntoTile: ; 516e (1:516e) jr nc, .impassable ; don't walk off screen push de push bc - call Func_4c70 + call DetectCollisionBetweenSprites pop bc pop de ld h, $c1 ld a, [H_CURRENTSPRITEOFFSET] add $c ld l, a - ld a, [hl] ; c1xc (forbidden directions flags(?)) + 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 ; direction forbidden, don't go there + jr nz, .impassable ; collision between sprites, don't go there ld h, $c2 ld a, [H_CURRENTSPRITEOFFSET] add $2 @@ -716,8 +721,8 @@ Func_5236: ; 5236 (1:5236) bit 7, [hl] set 7, [hl] jp z, Func_52a6 - ld hl, wcc97 - ld a, [wcd37] + ld hl, wNPCMovementDirections2 + ld a, [wNPCMovementDirections2Index] add l ld l, a jr nc, .asm_5251 @@ -770,13 +775,13 @@ Func_5236: ; 5236 (1:5236) ret nz ld a, $8 ld [wcf18], a - ld hl, wcd37 + ld hl, wNPCMovementDirections2Index inc [hl] ret Func_52a6: ; 52a6 (1:52a6) xor a - ld [wcd37], a + ld [wNPCMovementDirections2Index], a ld a, $8 ld [wcf18], a jp Func_52c3 diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 2cf6fea952..84e3985301 100755 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -1,25 +1,25 @@ -Func_1a3e0: ; 1a3e0 (6:63e0) +PlayerStepOutFromDoor: ; 1a3e0 (6:63e0) ld hl, wd730 res 1, [hl] - call HandleDoors - jr nc, .asm_1a406 + call IsPlayerStandingOnDoorTile + jr nc, .notStandingOnDoor ld a, $fc ld [wJoyIgnore], a ld hl, wd736 set 1, [hl] ld a, $1 - ld [wcd38], a - ld a, $80 - ld [wccd3], a + ld [wSimulatedJoypadStatesIndex], a + ld a, D_DOWN + ld [wSimulatedJoypadStatesEnd], a xor a ld [wSpriteStateData1 + 2], a - call Func_3486 + call StartSimulatingJoypadStates ret -.asm_1a406 +.notStandingOnDoor xor a - ld [wcd3a], a - ld [wcd38], a - ld [wccd3], a + ld [wWastedByteCD3A], a + ld [wSimulatedJoypadStatesIndex], a + ld [wSimulatedJoypadStatesEnd], a ld hl, wd736 res 0, [hl] res 1, [hl] @@ -27,7 +27,7 @@ Func_1a3e0: ; 1a3e0 (6:63e0) res 7, [hl] ret -Func_1a41d: ; 1a41d (6:641d) +_EndNPCMovementScript: ; 1a41d (6:641d) ld hl, wd730 res 7, [hl] ld hl, wd72e @@ -36,15 +36,15 @@ Func_1a41d: ; 1a41d (6:641d) res 0, [hl] res 1, [hl] xor a - ld [wcf17], a - ld [wcc57], a - ld [wcf10], a - ld [wcd3a], a - ld [wcd38], a - ld [wccd3], a + ld [wNPCMovementScriptSpriteOffset], a + ld [wNPCMovementScriptPointerTableNum], a + ld [wNPCMovementScriptFunctionNum], a + ld [wWastedByteCD3A], a + ld [wSimulatedJoypadStatesIndex], a + ld [wSimulatedJoypadStatesEnd], a ret -PointerTable_1a442: ; 1a442 (6:6442) +ProfOakMovementScriptPointerTable: ; 1a442 (6:6442) dw Func_1a44c dw Func_1a485 dw Func_1a4a1 @@ -58,20 +58,20 @@ Func_1a44c: ; 1a44c (6:644c) jr z, .asm_1a475 ld b, $0 ld c, a - ld hl, wcc97 + ld hl, wNPCMovementDirections2 ld a, $80 call FillMemory ld [hl], $ff - ld a, [wcf13] + ld a, [wSpriteIndex] ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - ld de, wcc97 + ld de, wNPCMovementDirections2 call MoveSprite ld a, $1 - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a jr .asm_1a47a .asm_1a475 ld a, $3 - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a .asm_1a47a ld hl, W_FLAGS_D733 set 1, [hl] @@ -84,44 +84,44 @@ Func_1a485: ; 1a485 (6:6485) bit 0, a ret nz ld a, [wcca1] - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld [$ff95], a - predef Func_f9a0 - call Func_3486 + predef ConvertNPCMovementDirectionsToJoypadMasks + call StartSimulatingJoypadStates ld a, $2 - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a ret Func_1a4a1: ; 1a4a1 (6:64a1) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz Func_1a4a6: ; 1a4a6 (6:64a6) xor a - ld [wcd3b], a - ld a, [wcf13] + ld [wOverrideSimulatedJoypadStatesMask], a + ld a, [wSpriteIndex] swap a - ld [wcf17], a + ld [wNPCMovementScriptSpriteOffset], a xor a ld [wSpriteStateData2 + $06], a - ld hl, wccd3 - ld de, RLEList_1a4e9 + ld hl, wSimulatedJoypadStatesEnd + ld de, RLEList_PlayerWalkToLab call DecodeRLEList dec a - ld [wcd38], a - ld hl, wcc97 - ld de, RLEList_1a4dc + ld [wSimulatedJoypadStatesIndex], a + ld hl, wNPCMovementDirections2 + ld de, RLEList_ProfOakWalkToLab call DecodeRLEList ld hl, wd72e res 7, [hl] ld hl, wd730 set 7, [hl] ld a, $4 - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a ret -RLEList_1a4dc: ; 1a4dc (6:64dc) +RLEList_ProfOakWalkToLab: ; 1a4dc (6:64dc) db $00, $05 db $80, $01 db $00, $05 @@ -130,16 +130,16 @@ RLEList_1a4dc: ; 1a4dc (6:64dc) db $E0, $01 db $FF -RLEList_1a4e9: ; 1a4e9 (6:64e9) - db $40, $02 - db $10, $03 - db $80, $05 - db $20, $01 - db $80, $06 +RLEList_PlayerWalkToLab: ; 1a4e9 (6:64e9) + db D_UP, $02 + db D_RIGHT, $03 + db D_DOWN, $05 + db D_LEFT, $01 + db D_DOWN, $06 db $FF Func_1a4f4: ; 1a4f4 (6:64f4) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $0 @@ -149,11 +149,11 @@ Func_1a4f4: ; 1a4f4 (6:64f4) res 7, [hl] ld hl, wd72e res 7, [hl] - jp Func_314e + jp EndNPCMovementScript -PointerTable_1a510: ; 1a510 (6:6510) +PewterMuseumGuyMovementScriptPointerTable: ; 1a510 (6:6510) dw Func_1a514 - dw Func_1a56b + dw PewterMovementScriptDone Func_1a514: ; 1a514 (6:6514) ld a, BANK(Music_MuseumGuy) @@ -162,32 +162,32 @@ Func_1a514: ; 1a514 (6:6514) ld a, MUSIC_MUSEUM_GUY ld [wc0ee], a call PlaySound - ld a, [wcf13] + ld a, [wSpriteIndex] swap a - ld [wcf17], a - call Func_3486 - ld hl, wccd3 + ld [wNPCMovementScriptSpriteOffset], a + call StartSimulatingJoypadStates + ld hl, wSimulatedJoypadStatesEnd ld de, RLEList_PewterMuseumPlayer call DecodeRLEList dec a - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a xor a ld [wd12f], a predef PewterGuys - ld hl, wcc97 + ld hl, wNPCMovementDirections2 ld de, RLEList_PewterMuseumGuy call DecodeRLEList ld hl, wd72e res 7, [hl] ld a, $1 - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a ret RLEList_PewterMuseumPlayer: ; 1a559 (6:6559) - db $00, $01 - db $40, $03 - db $20, $0D - db $40, $06 + db 0, $01 + db D_UP, $03 + db D_LEFT, $0D + db D_UP, $06 db $FF RLEList_PewterMuseumGuy: ; 1a562 (6:6562) @@ -197,19 +197,19 @@ RLEList_PewterMuseumGuy: ; 1a562 (6:6562) db $80, $01 db $FF -Func_1a56b: ; 1a56b (6:656b) - ld a, [wcd38] +PewterMovementScriptDone: ; 1a56b (6:656b) + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld hl, wd730 res 7, [hl] ld hl, wd72e res 7, [hl] - jp Func_314e + jp EndNPCMovementScript -PointerTable_1a57d: ; 1a57d (6:657d) +PewterGymGuyMovementScriptPointerTable: ; 1a57d (6:657d) dw Func_1a581 - dw Func_1a56b + dw PewterMovementScriptDone Func_1a581: ; 1a581 (6:6581) ld a, BANK(Music_MuseumGuy) @@ -218,20 +218,20 @@ Func_1a581: ; 1a581 (6:6581) ld a, MUSIC_MUSEUM_GUY ld [wc0ee], a call PlaySound - ld a, [wcf13] + ld a, [wSpriteIndex] swap a - ld [wcf17], a + ld [wNPCMovementScriptSpriteOffset], a xor a ld [wSpriteStateData2 + $06], a - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, RLEList_PewterGymPlayer call DecodeRLEList dec a - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $1 ld [wd12f], a predef PewterGuys - ld hl, wcc97 + ld hl, wNPCMovementDirections2 ld de, RLEList_PewterGymGuy call DecodeRLEList ld hl, wd72e @@ -239,16 +239,16 @@ Func_1a581: ; 1a581 (6:6581) ld hl, wd730 set 7, [hl] ld a, $1 - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a ret RLEList_PewterGymPlayer: ; 1a5cd (6:65cd) - db $00, $01 - db $10, $02 - db $80, $05 - db $20, $0B - db $40, $05 - db $20, $0F + db 0, $01 + db D_RIGHT, $02 + db D_DOWN, $05 + db D_LEFT, $0B + db D_UP, $05 + db D_LEFT, $0F db $FF RLEList_PewterGymGuy: ; 1a5da (6:65da) @@ -260,12 +260,11 @@ RLEList_PewterGymGuy: ; 1a5da (6:65da) db $C0, $03 db $FF -; XXX why would this function want to return on POKEMONTOWER_7? -Func_1a5e7: ; 1a5e7 (6:65e7) - ld a, [W_CURMAP] ; W_CURMAP +FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7) + ld a, [W_CURMAP] cp POKEMONTOWER_7 - ret z - ld hl, RivalIDs ; $6605 + ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them + ld hl, RivalIDs ld a, [wEngagedTrainerClass] ld b, a .loop @@ -273,11 +272,11 @@ Func_1a5e7: ; 1a5e7 (6:65e7) cp $ff jr z, .notRival cp b - ret z + ret z ; the rival leaves after battling, so don't freeze him jr .loop .notRival - ld a, [wcf13] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld a, [wSpriteIndex] + ld [H_SPRITEINDEX], a jp SetSpriteMovementBytesToFF RivalIDs: ; 1a605 (6:6605) diff --git a/engine/overworld/oam.asm b/engine/overworld/oam.asm index 63495d22fa..b424725750 100755 --- a/engine/overworld/oam.asm +++ b/engine/overworld/oam.asm @@ -2,13 +2,13 @@ PrepareOAMData: ; Determine OAM data for currently visible ; sprites and write it to wOAMBuffer. - ld a, [wcfcb] + ld a, [wUpdateSpritesEnabled] dec a jr z, .asm_4b1e cp 0 - 1 ret nz - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a jp HideSprites .asm_4b1e diff --git a/engine/overworld/pewter_guys.asm b/engine/overworld/pewter_guys.asm index 2f3001fb46..eb6dd5ac0f 100755 --- a/engine/overworld/pewter_guys.asm +++ b/engine/overworld/pewter_guys.asm @@ -1,8 +1,8 @@ PewterGuys: ; 37ca1 (d:7ca1) - ld hl, wccd3 - ld a, [wcd38] - dec a - ld [wcd38], a + ld hl, wSimulatedJoypadStatesEnd + ld a, [wSimulatedJoypadStatesIndex] + dec a ; this decrement causes it to overwrite the last byte before $FF in the list + ld [wSimulatedJoypadStatesIndex], a ld d, 0 ld e, a add hl, de @@ -37,9 +37,9 @@ PewterGuys: ; 37ca1 (d:7ca1) ret z ld [de], a inc de - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] inc a - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a jr .asm_37cd2 .asm_37ce1 inc hl diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 4ca5e0af9e..7030db206c 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -1,66 +1,67 @@ -Func_70510: ; 70510 (1c:4510) - call Func_706ef +EnterMapAnim: ; 70510 (1c:4510) + call InitFacingDirectionBuffer ld a, $ec - ld [wSpriteStateData1 + 4], a + ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position call Delay3 push hl - call GBFadeIn2 + call GBFadeInFromWhite ld hl, W_FLAGS_D733 - bit 7, [hl] + bit 7, [hl] ; used fly out of battle? res 7, [hl] - jr nz, .asm_70568 + jr nz, .flyAnimation ld a, (SFX_02_4c - SFX_Headers_02) / 3 call PlaySound ld hl, wd732 - bit 4, [hl] + bit 4, [hl] ; used dungeon warp? res 4, [hl] pop hl - jr nz, .asm_7055e - call Func_705aa + jr nz, .dungeonWarpAnimation + call PlayerSpinWhileMovingDown ld a, (SFX_02_4f - SFX_Headers_02) / 3 call PlaySound - call Func_70787 + call IsPlayerStandingOnWarpPadOrHole ld a, b and a - jr nz, .asm_7055b - ld hl, wWhichTrade ; wWhichTrade + jr nz, .done +; if the player is not standing on a warp pad or hole + ld hl, wPlayerSpinInPlaceAnimFrameDelay xor a - ld [hli], a + ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelay inc a - ld [hli], a + ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayDelta ld a, $8 - ld [hli], a - ld [hl], $ff + ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue + ld [hl], $ff ; wPlayerSpinInPlaceAnimSoundID ld hl, wcd48 - call Func_70730 -.asm_70558 - call Func_2307 -.asm_7055b - jp Func_70772 -.asm_7055e - ld c, $32 + call PlayerSpinInPlace +.restoreDefaultMusic + call PlayDefaultMusic +.done + jp RestoreFacingDirectionAndYScreenPos +.dungeonWarpAnimation + ld c, 50 call DelayFrames - call Func_705aa - jr .asm_7055b -.asm_70568 + call PlayerSpinWhileMovingDown + jr .done +.flyAnimation pop hl - ld de, BirdSprite ; $4d80 + ld de, BirdSprite ld hl, vNPCSprites ld bc, (BANK(BirdSprite) << 8) + $0c call CopyVideoData - call Func_706d7 + call LoadBirdSpriteGraphics ld a, (SFX_02_50 - SFX_Headers_02) / 3 call PlaySound - ld hl, wWhichTrade ; wWhichTrade - xor a - ld [hli], a - ld a, $c - ld [hli], a - ld [hl], $8 + ld hl, wFlyAnimUsingCoordList + xor a ; is using coord list + ld [hli], a ; wFlyAnimUsingCoordList + ld a, 12 + ld [hli], a ; wFlyAnimCounter + ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing right) ld de, FlyAnimationEnterScreenCoords ; $4592 - call Func_706ae + call DoFlyAnimation call LoadPlayerSpriteGraphics - jr .asm_70558 + jr .restoreDefaultMusic FlyAnimationEnterScreenCoords: ; 70592 (1c:4592) ; y, x pairs @@ -79,90 +80,92 @@ FlyAnimationEnterScreenCoords: ; 70592 (1c:4592) db $3C, $48 db $3C, $40 -Func_705aa: ; 705aa (1c:45aa) - ld hl, wWhichTrade ; wWhichTrade +PlayerSpinWhileMovingDown: ; 705aa (1c:45aa) + ld hl, wPlayerSpinWhileMovingUpOrDownAnimDeltaY ld a, $10 - ld [hli], a + ld [hli], a ; wPlayerSpinWhileMovingUpOrDownAnimDeltaY ld a, $3c - ld [hli], a - call Func_7077f - ld [hl], a - jp Func_70755 + ld [hli], a ; wPlayerSpinWhileMovingUpOrDownAnimMaxY + call GetPlayerTeleportAnimFrameDelay + ld [hl], a ; wPlayerSpinWhileMovingUpOrDownAnimFrameDelay + jp PlayerSpinWhileMovingUpOrDown _LeaveMapAnim: ; 705ba (1c:45ba) - call Func_706ef - call Func_70787 + call InitFacingDirectionBuffer + call IsPlayerStandingOnWarpPadOrHole ld a, b and a - jr z, .asm_705ef + jr z, .playerNotStandingOnWarpPadOrHole dec a - jp nz, Func_7067d -.asm_705c8 + jp nz, LeaveMapThroughHoleAnim +.spinWhileMovingUp ld a, (SFX_02_4b - SFX_Headers_02) / 3 call PlaySound - ld hl, wWhichTrade ; wWhichTrade - ld a, $f0 - ld [hli], a + ld hl, wPlayerSpinWhileMovingUpOrDownAnimDeltaY + ld a, -$10 + ld [hli], a ; wPlayerSpinWhileMovingUpOrDownAnimDeltaY ld a, $ec - ld [hli], a - call Func_7077f - ld [hl], a - call Func_70755 - call Func_70787 + ld [hli], a ; wPlayerSpinWhileMovingUpOrDownAnimMaxY + call GetPlayerTeleportAnimFrameDelay + ld [hl], a ; wPlayerSpinWhileMovingUpOrDownAnimFrameDelay + call PlayerSpinWhileMovingUpOrDown + call IsPlayerStandingOnWarpPadOrHole ld a, b dec a - jr z, .asm_705e9 - ld c, $a + jr z, .playerStandingOnWarpPad +; if not standing on a warp pad, there is an extra delay + ld c, 10 call DelayFrames -.asm_705e9 - call GBFadeOut2 - jp Func_70772 -.asm_705ef +.playerStandingOnWarpPad + call GBFadeOutToWhite + jp RestoreFacingDirectionAndYScreenPos +.playerNotStandingOnWarpPadOrHole ld a, $4 call StopMusic ld a, [wd732] - bit 6, a - jr z, .asm_70610 - ld hl, wWhichTrade ; wWhichTrade - ld a, $10 - ld [hli], a - ld a, $ff - ld [hli], a + bit 6, a ; is the last used pokemon center the destination? + jr z, .flyAnimation +; if going to the last used pokemon center + ld hl, wPlayerSpinInPlaceAnimFrameDelay + ld a, 16 + ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelay + ld a, -1 + ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayDelta xor a - ld [hli], a - ld [hl], $a1 + ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue + ld [hl], (SFX_02_4d - SFX_Headers_02) / 3 ; wPlayerSpinInPlaceAnimSoundID ld hl, wcd48 - call Func_70730 - jr .asm_705c8 -.asm_70610 - call Func_706d7 - ld hl, wWhichTrade ; wWhichTrade - ld a, $ff - ld [hli], a - ld a, $8 - ld [hli], a - ld [hl], $c - call Func_706ae + call PlayerSpinInPlace + jr .spinWhileMovingUp +.flyAnimation + call LoadBirdSpriteGraphics + ld hl, wFlyAnimUsingCoordList + ld a, $ff ; is not using coord list (flap in place) + ld [hli], a ; wFlyAnimUsingCoordList + ld a, 8 + ld [hli], a ; wFlyAnimCounter + ld [hl], $c ; wFlyAnimBirdSpriteImageIndex + call DoFlyAnimation ld a, (SFX_02_50 - SFX_Headers_02) / 3 call PlaySound - ld hl, wWhichTrade ; wWhichTrade - xor a - ld [hli], a + ld hl, wFlyAnimUsingCoordList + xor a ; is using coord list + ld [hli], a ; wFlyAnimUsingCoordList ld a, $c - ld [hli], a - ld [hl], $c + ld [hli], a ; wFlyAnimCounter + ld [hl], $c ; wFlyAnimBirdSpriteImageIndex (facing right) ld de, FlyAnimationScreenCoords1 ; $464f - call Func_706ae - ld c, $28 + call DoFlyAnimation + ld c, 40 call DelayFrames - ld hl, wTrainerEngageDistance - ld a, $b - ld [hli], a - ld [hl], $8 + ld hl, wFlyAnimCounter + ld a, 11 + ld [hli], a ; wFlyAnimCounter + ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing left) ld de, FlyAnimationScreenCoords2 ; $4667 - call Func_706ae - call GBFadeOut2 - jp Func_70772 + call DoFlyAnimation + call GBFadeOutToWhite + jp RestoreFacingDirectionAndYScreenPos FlyAnimationScreenCoords1: ; 7064f (1c:464f) ; y, x pairs @@ -198,33 +201,35 @@ FlyAnimationScreenCoords2: ; 70667 (1c:4667) db $F0, $00 -Func_7067d: ; 7067d (1c:467d) +LeaveMapThroughHoleAnim: ; 7067d (1c:467d) ld a, $ff - ld [wcfcb], a - ld a, [wOAMBuffer + $02] - ld [wOAMBuffer + $0a], a - ld a, [wOAMBuffer + $06] - ld [wOAMBuffer + $0e], a + ld [wUpdateSpritesEnabled], a ; disable UpdateSprites + ; shift upper half of player's sprite down 8 pixels and hide lower half + ld a, [wOAMBuffer + 0 * 4 + 2] + ld [wOAMBuffer + 2 * 4 + 2], a + ld a, [wOAMBuffer + 1 * 4 + 2] + ld [wOAMBuffer + 3 * 4 + 2], a ld a, $a0 - ld [wOAMBuffer], a - ld [wOAMBuffer + $04], a - ld c, $2 + ld [wOAMBuffer + 0 * 4], a + ld [wOAMBuffer + 1 * 4], a + ld c, 2 call DelayFrames + ; hide lower half of player's sprite ld a, $a0 - ld [wOAMBuffer + $08], a - ld [wOAMBuffer + $0c], a - call GBFadeOut2 + ld [wOAMBuffer + 2 * 4], a + ld [wOAMBuffer + 3 * 4], a + call GBFadeOutToWhite ld a, $1 - ld [wcfcb], a - jp Func_70772 + ld [wUpdateSpritesEnabled], a ; enable UpdateSprites + jp RestoreFacingDirectionAndYScreenPos -Func_706ae: ; 706ae (1c:46ae) - ld a, [wTrainerFacingDirection] - xor $1 - ld [wTrainerFacingDirection], a +DoFlyAnimation: ; 706ae (1c:46ae) + ld a, [wFlyAnimBirdSpriteImageIndex] + xor $1 ; make the bird flap its wings + ld [wFlyAnimBirdSpriteImageIndex], a ld [wSpriteStateData1 + 2], a call Delay3 - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wFlyAnimUsingCoordList] cp $ff jr z, .asm_706cd ld hl, wSpriteStateData1 + 4 @@ -236,13 +241,13 @@ Func_706ae: ; 706ae (1c:46ae) inc de ld [hl], a .asm_706cd - ld a, [wTrainerEngageDistance] + ld a, [wFlyAnimCounter] dec a - ld [wTrainerEngageDistance], a - jr nz, Func_706ae + ld [wFlyAnimCounter], a + jr nz, DoFlyAnimation ret -Func_706d7: ; 706d7 (1c:46d7) +LoadBirdSpriteGraphics: ; 706d7 (1c:46d7) ld de, BirdSprite ; $4d80 ld hl, vNPCSprites ld bc, (BANK(BirdSprite) << 8) + $0c @@ -252,32 +257,32 @@ Func_706d7: ; 706d7 (1c:46d7) ld bc, (BANK(BirdSprite) << 8) + $0c jp CopyVideoData -Func_706ef: ; 706ef (1c:46ef) - ld a, [wSpriteStateData1 + 2] +InitFacingDirectionBuffer: ; 706ef (1c:46ef) + ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images) ld [wcd50], a - ld a, [wSpriteStateData1 + 4] + ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position ld [wcd4f], a - ld hl, PlayerSpinningFacingOrder ; $4713 + ld hl, PlayerSpinningFacingOrder ld de, wcd48 ld bc, $4 call CopyData - ld a, [wSpriteStateData1 + 2] + ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images) ld hl, wcd48 -.asm_7070d +.loop cp [hl] inc hl - jr nz, .asm_7070d + jr nz, .loop dec hl ret PlayerSpinningFacingOrder: ; 70713 (1c:4713) ; The order of the direction the player's sprite is facing when teleporting ; away. Creates a spinning effect. - db $00, $08, $04, $0C ; down, left, up, right + db SPRITE_FACING_DOWN, SPRITE_FACING_LEFT, SPRITE_FACING_UP, SPRITE_FACING_RIGHT -Func_70717: ; 70717 (1c:4717) +SpinPlayerSprite: ; 70717 (1c:4717) ld a, [hl] - ld [wSpriteStateData1 + 2], a + ld [wSpriteStateData1 + 2], a ; player's sprite facing direction (image index is locked to standing images) push hl ld hl, wcd48 ld de, wcd47 @@ -288,84 +293,85 @@ Func_70717: ; 70717 (1c:4717) pop hl ret -Func_70730: ; 70730 (1c:4730) - call Func_70717 - ld a, [wWhichTrade] ; wWhichTrade +PlayerSpinInPlace: ; 70730 (1c:4730) + call SpinPlayerSprite + ld a, [wPlayerSpinInPlaceAnimFrameDelay] ld c, a and $3 jr nz, .asm_70743 - ld a, [wTrainerScreenY] + ld a, [wPlayerSpinInPlaceAnimSoundID] cp $ff call nz, PlaySound .asm_70743 - ld a, [wTrainerEngageDistance] + ld a, [wPlayerSpinInPlaceAnimFrameDelayDelta] add c - ld [wWhichTrade], a ; wWhichTrade + ld [wPlayerSpinInPlaceAnimFrameDelay], a ld c, a - ld a, [wTrainerFacingDirection] + ld a, [wPlayerSpinInPlaceAnimFrameDelayEndValue] cp c ret z call DelayFrames - jr Func_70730 + jr PlayerSpinInPlace -Func_70755: ; 70755 (1c:4755) - call Func_70717 - ld a, [wWhichTrade] ; wWhichTrade +PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755) + call SpinPlayerSprite + ld a, [wPlayerSpinWhileMovingUpOrDownAnimDeltaY] ld c, a - ld a, [wSpriteStateData1 + 4] + ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position add c ld [wSpriteStateData1 + 4], a ld c, a - ld a, [wTrainerEngageDistance] + ld a, [wPlayerSpinWhileMovingUpOrDownAnimMaxY] cp c ret z - ld a, [wTrainerFacingDirection] + ld a, [wPlayerSpinWhileMovingUpOrDownAnimFrameDelay] ld c, a call DelayFrames - jr Func_70755 + jr PlayerSpinWhileMovingUpOrDown -Func_70772: ; 70772 (1c:4772) +RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772) ld a, [wcd4f] ld [wSpriteStateData1 + 4], a ld a, [wcd50] ld [wSpriteStateData1 + 2], a ret -Func_7077f: ; 7077f (1c:477f) - ld a, [wcf1b] +; if SGB, 2 frames, else 3 frames +GetPlayerTeleportAnimFrameDelay: ; 7077f (1c:477f) + ld a, [wOnSGB] xor $1 inc a inc a ret -Func_70787: ; 70787 (1c:4787) +IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787) ld b, 0 - ld hl, DataTable_707a9 ; $47a9 - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld hl, .warpPadAndHoleData + ld a, [W_CURMAPTILESET] ld c, a -.asm_70790 +.loop ld a, [hli] cp $ff - jr z, .asm_707a4 + jr z, .done cp c - jr nz, .asm_7079e + jr nz, .nextEntry aCoord 8, 9 cp [hl] - jr z, .asm_707a2 -.asm_7079e + jr z, .foundMatch +.nextEntry inc hl inc hl - jr .asm_70790 -.asm_707a2 + jr .loop +.foundMatch inc hl ld b, [hl] -.asm_707a4 +.done ld a, b ld [wcd5b], a ret ; format: db tileset id, tile id, value to be put in wcd5b -DataTable_707a9: ; 707a9 (1c:47a9) +.warpPadAndHoleData: ; 707a9 (1c:47a9) db FACILITY, $20, 1 ; warp pad db FACILITY, $11, 2 ; hole db CAVERN, $22, 2 ; hole @@ -471,7 +477,7 @@ ItsABiteText: ; 70851 (1c:4851) db "@" FishingRodGfxProperties: ; 70856 (1c:4856) -; specicies how the fishing rod should be drawn on the screen +; specifies how the fishing rod should be drawn on the screen ; first byte = screen y coordinate ; second byte = screen x coordinate ; third byte = tile number @@ -516,21 +522,21 @@ LeafFishingTiles: ; newly added table of Leaf's sprites dw vNPCSprites2 + $7d0 _HandleMidJump: ; 7087e (1c:487e) - ld a, [wd714] + ld a, [wPlayerJumpingYScreenCoordsIndex] ld c, a inc a cp $10 - jr nc, .asm_70895 - ld [wd714], a - ld b, $0 - ld hl, PlayerJumpingYScreenCoords ; $48ba + jr nc, .finishedJump + ld [wPlayerJumpingYScreenCoordsIndex], a + ld b, 0 + ld hl, PlayerJumpingYScreenCoords add hl, bc ld a, [hl] ld [wSpriteStateData1 + 4], a ; player's sprite y coordinate ret -.asm_70895 - ld a, [wWalkCounter] ; wcfc5 - cp $0 +.finishedJump + ld a, [wWalkCounter] + cp 0 ret nz call UpdateSprites call Delay3 @@ -538,11 +544,11 @@ _HandleMidJump: ; 7087e (1c:487e) ld [hJoyHeld], a ld [hJoyPressed], a ld [hJoyReleased], a - ld [wd714], a + ld [wPlayerJumpingYScreenCoordsIndex], a ld hl, wd736 - res 6, [hl] + res 6, [hl] ; not jumping down a ledge any more ld hl, wd730 - res 7, [hl] + res 7, [hl] ; not simulating joypad states any more xor a ld [wJoyIgnore], a ret diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm index 3b06bd2c0c..8325b93f84 100755 --- a/engine/overworld/pokemart.asm +++ b/engine/overworld/pokemart.asm @@ -11,11 +11,11 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) ld [wPlayerMonNumber],a inc a ld [wcf93],a - ld a,$13 - ld [wd125],a + ld a,MONEY_BOX + ld [wTextBoxID],a call DisplayTextBoxID ; draw money text box - ld a,$15 - ld [wd125],a + 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 ld a,[hli] @@ -45,14 +45,14 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call SaveScreenTilesToBuffer1 ; save screen .sellMenuLoop call LoadScreenTilesFromBuffer1 ; restore saved screen - ld a,$13 - ld [wd125],a + ld a,MONEY_BOX + ld [wTextBoxID],a call DisplayTextBoxID ; draw money text box ld hl,wNumBagItems ld a,l - ld [wcf8b],a + ld [wList],a ld a,h - ld [wcf8c],a + ld [wList + 1],a xor a ld [wcf93],a ld [wCurrentMenuItem],a @@ -79,8 +79,8 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call PrintText hlCoord 14, 7 ld bc,$080f - ld a,$14 - ld [wd125],a + ld a,TWO_OPTION_MENU + ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu ld a,[wd12e] cp a,$02 @@ -119,14 +119,14 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call SaveScreenTilesToBuffer1 ; save screen .buyMenuLoop call LoadScreenTilesFromBuffer1 ; restore saved screen - ld a,$13 - ld [wd125],a + ld a,MONEY_BOX + ld [wTextBoxID],a call DisplayTextBoxID ; draw money text box ld hl,wStringBuffer2 + 11 ld a,l - ld [wcf8b],a + ld [wList],a ld a,h - ld [wcf8c],a + ld [wList + 1],a xor a ld [wCurrentMenuItem],a inc a @@ -150,8 +150,8 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call PrintText hlCoord 14, 7 ld bc,$080f - ld a,$14 - ld [wd125],a + ld a,TWO_OPTION_MENU + ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu ld a,[wd12e] cp a,$02 @@ -173,15 +173,15 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) ld [wcf0a],a .skipSettingFlag2 ld a,(SFX_02_5a - SFX_Headers_02) / 3 - call PlaySoundWaitForCurrent ; play sound - call WaitForSoundToFinish ; wait until sound is done playing + call PlaySoundWaitForCurrent + call WaitForSoundToFinish ld hl,PokemartBoughtItemText call PrintText jp .buyMenuLoop .returnToMainPokemartMenu - call LoadScreenTilesFromBuffer1 ; restore save screen - ld a,$13 - ld [wd125],a + call LoadScreenTilesFromBuffer1 + ld a,MONEY_BOX + ld [wTextBoxID],a call DisplayTextBoxID ; draw money text box ld hl,PokemartAnythingElseText call PrintText @@ -203,7 +203,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) ld hl,PokemartThankYouText call PrintText ld a,$01 - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a call UpdateSprites ; move sprites ld a,[wd07e] ld [wListScrollOffset],a diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm index 8fd8f99a0a..f1a8ecf93d 100755 --- a/engine/overworld/ssanne.asm +++ b/engine/overworld/ssanne.asm @@ -1,37 +1,37 @@ -Func_79f54: ; 79f54 (1e:5f54) +AnimateBoulderDust: ; 79f54 (1e:5f54) ld a, $1 - ld [wcd50], a - ld a, [wcfcb] + ld [wcd50], a ; select the boulder dust offsets + ld a, [wUpdateSpritesEnabled] push af ld a, $ff - ld [wcfcb], a - ld a, $e4 - ld [rOBP1], a ; $ff49 + ld [wUpdateSpritesEnabled], a + ld a, %11100100 + ld [rOBP1], a call LoadSmokeTileFourTimes - callba asm_f055 - ld c, $8 -.asm_79f73 + callba WriteCutTreeBoulderDustAnimationOAMBlock + ld c, 8 ; number of steps in animation +.loop push bc - call Func_79f92 - ld bc, .asm_79f7e + call GetMoveBoulderDustFunctionPointer + ld bc, .returnAddress push bc ld c, $4 jp [hl] -.asm_79f7e - ld a, [rOBP1] ; $ff49 - xor $64 - ld [rOBP1], a ; $ff49 +.returnAddress + ld a, [rOBP1] + xor %01100100 + ld [rOBP1], a call Delay3 pop bc dec c - jr nz, .asm_79f73 + jr nz, .loop pop af - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a jp LoadPlayerSpriteGraphics -Func_79f92: ; 79f92 (1e:5f92) - ld a, [wSpriteStateData1 + 9] - ld hl, PointerTable_79fb0 ; $5fb0 +GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92) + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + ld hl, MoveBoulderDustFunctionPointerTable ld c, a ld b, $0 add hl, bc @@ -51,18 +51,22 @@ Func_79f92: ; 79f92 (1e:5f92) pop hl ret -PointerTable_79fb0: ; 79fb0 (1e:5fb0) +MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0) +; facing down db $FF,$00 - dw Func_79350 + dw AdjustOAMBlockYPos +; facing up db $01,$00 - dw Func_79350 + dw AdjustOAMBlockYPos +; facing left db $01,$01 - dw Func_79337 + dw AdjustOAMBlockXPos +; facing right db $FF,$01 - dw Func_79337 + dw AdjustOAMBlockXPos LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0) ld hl, vChars1 + $7c0 diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm index b05ddbf13a..4aaab3edf8 100755 --- a/engine/overworld/trainers.asm +++ b/engine/overworld/trainers.asm @@ -1,9 +1,9 @@ -Func_567f9: ; 567f9 (15:67f9) +_GetSpritePosition1: ; 567f9 (15:67f9) ld hl, wSpriteStateData1 ld de, $4 - ld a, [wcf13] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - call Func_56903 + ld a, [wSpriteIndex] + ld [H_SPRITEINDEX], a + call GetSpriteDataPointer ld a, [hli] ld [$ffeb], a inc hl @@ -17,50 +17,50 @@ Func_567f9: ; 567f9 (15:67f9) ld [$ffee], a ret -Func_56819: ; 56819 (15:6819) +_GetSpritePosition2: ; 56819 (15:6819) ld hl, wSpriteStateData1 - ld de, $0004 - ld a, [wcf13] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - call Func_56903 - ld a, [hli] + ld de, $4 + ld a, [wSpriteIndex] + ld [H_SPRITEINDEX], a + call GetSpriteDataPointer + ld a, [hli] ; c1x4 (screen Y pos) ld [wd130], a inc hl - ld a, [hl] + ld a, [hl] ; c1x6 (screen X pos) ld [wd131], a - ld de, $00fe + ld de, $104 - $6 add hl, de - ld a, [hli] + ld a, [hli] ; c2x4 (map Y pos) ld [wd132], a - ld a, [hl] + ld a, [hl] ; c2x5 (map X pos) ld [wd133], a ret -Func_5683d: ; 5683d (15:683d) +_SetSpritePosition1: ; 5683d (15:683d) ld hl, wSpriteStateData1 ld de, $4 - ld a, [wcf13] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - call Func_56903 - ld a, [$ffeb] + ld a, [wSpriteIndex] + ld [H_SPRITEINDEX], a + call GetSpriteDataPointer + ld a, [$ffeb] ; c1x4 (screen Y pos) ld [hli], a inc hl - ld a, [$ffec] + ld a, [$ffec] ; c1x6 (screen X pos) ld [hl], a - ld de, $fe + ld de, $104 - $6 add hl, de - ld a, [$ffed] + ld a, [$ffed] ; c2x4 (map Y pos) ld [hli], a - ld a, [$ffee] + ld a, [$ffee] ; c2x5 (map X pos) ld [hl], a ret -Func_5685d: ; 5685d (15:685d) +_SetSpritePosition2: ; 5685d (15:685d) ld hl, wSpriteStateData1 ld de, $0004 - ld a, [wcf13] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - call Func_56903 + ld a, [wSpriteIndex] + ld [H_SPRITEINDEX], a + call GetSpriteDataPointer ld a, [wd130] ld [hli], a inc hl @@ -75,7 +75,7 @@ Func_5685d: ; 5685d (15:685d) ret TrainerWalkUpToPlayer: ; 56881 (15:6881) - ld a, [wcf13] + ld a, [wSpriteIndex] swap a ld [wTrainerSpriteOffset], a ; wWhichTrade call ReadTrainerScreenPosition @@ -139,18 +139,20 @@ TrainerWalkUpToPlayer: ; 56881 (15:6881) ld b, $0 ld a, $80 ; a = direction to go to .writeWalkScript - ld hl, wcc97 - ld de, wcc97 + ld hl, wNPCMovementDirections2 + ld de, wNPCMovementDirections2 call FillMemory ; write the necessary steps to reach player ld [hl], $ff ; write end of list sentinel - ld a, [wcf13] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld a, [wSpriteIndex] + ld [H_SPRITEINDEX], a jp MoveSprite_ -Func_56903: ; 56903 (15:6903) +; input: de = offset within sprite entry +; output: de = pointer to sprite data +GetSpriteDataPointer: ; 56903 (15:6903) push de add hl, de - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c + ld a, [H_SPRITEINDEX] swap a ld d, $0 ld e, a diff --git a/engine/palettes.asm b/engine/palettes.asm index 45cac77587..2b65ad71d0 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -397,11 +397,11 @@ SendSGBPacket: ; 71feb (1c:5feb) LoadSGB: ; 7202b (1c:602b) xor a - ld [wcf1b], a - call Func_7209b + ld [wOnSGB], a + call CheckSGB ret nc ld a, $1 - ld [wcf1b], a + ld [wOnSGB], a ld a, [wGBC] and a jr z, .asm_7203f @@ -457,7 +457,7 @@ PointerTable_72089: ; 72089 (1c:6089) dw DataSnd_725a8 dw DataSnd_725b8 -Func_7209b: ; 7209b (1c:609b) +CheckSGB: ; 7209b (1c:609b) ld hl, MltReq2Packet di call SendSGBPacket @@ -553,8 +553,7 @@ Func_7210b: ; 7210b (1c:610b) ret Wait7000: ; 7214a (1c:614a) -; each loop takes about 10 cycles so this routine actually loops through 70000 -; cycles. +; Each loop takes 9 cycles so this routine actually waits 63000 cycles. ld de, 7000 .loop nop diff --git a/engine/play_time.asm b/engine/play_time.asm index db7d6f67bc..74da9c59a8 100755 --- a/engine/play_time.asm +++ b/engine/play_time.asm @@ -1,25 +1,25 @@ -Func_18dee: ; 18dee (6:4dee) - call Func_18e36 +TrackPlayTime: ; 18dee (6:4dee) + call CountDownIgnoreInputBitReset ld a, [wd732] bit 0, a ret z - ld a, [W_PLAYTIMEMINUTES] ; wda42 + ld a, [W_PLAYTIMEMINUTES] and a ret nz - ld a, [W_PLAYTIMEFRAMES] ; wda45 + ld a, [W_PLAYTIMEFRAMES] inc a - ld [W_PLAYTIMEFRAMES], a ; wda45 + ld [W_PLAYTIMEFRAMES], a cp 60 ret nz xor a - ld [W_PLAYTIMEFRAMES], a ; wda45 - ld a, [W_PLAYTIMESECONDS] ; wda44 + ld [W_PLAYTIMEFRAMES], a + ld a, [W_PLAYTIMESECONDS] inc a - ld [W_PLAYTIMESECONDS], a ; wda44 + ld [W_PLAYTIMESECONDS], a cp 60 ret nz xor a - ld [W_PLAYTIMESECONDS], a ; wda44 + ld [W_PLAYTIMESECONDS], a ld a, [W_PLAYTIMEMINUTES + 1] inc a ld [W_PLAYTIMEMINUTES + 1], a @@ -33,11 +33,11 @@ Func_18dee: ; 18dee (6:4dee) cp $ff ret nz ld a, $ff - ld [W_PLAYTIMEMINUTES], a ; wda42 + ld [W_PLAYTIMEMINUTES], a ret -Func_18e36: ; 18e36 (6:4e36) - ld a, [wd13a] +CountDownIgnoreInputBitReset: ; 18e36 (6:4e36) + ld a, [wIgnoreInputCounter] and a jr nz, .asm_18e40 ld a, $ff @@ -45,7 +45,7 @@ Func_18e36: ; 18e36 (6:4e36) .asm_18e40 dec a .asm_18e41 - ld [wd13a], a + ld [wIgnoreInputCounter], a and a ret nz ld a, [wd730] diff --git a/engine/predefs.asm b/engine/predefs.asm index 3ac9958527..bb8866da41 100755 --- a/engine/predefs.asm +++ b/engine/predefs.asm @@ -52,13 +52,13 @@ GetPredefPointer: PredefPointers:: ; 4fe79 (13:7e79) ; these are pointers to ASM routines. ; they appear to be used in overworld map scripts. - add_predef Func_3cd60 + add_predef DrawPlayerHUDAndHPBar add_predef Func_3f0c6 add_predef Func_3f073 add_predef ScaleSpriteByTwo add_predef LoadMonBackPic add_predef Func_79aba - add_predef Func_f132 + add_predef LoadMissableObjects add_predef HealParty add_predef MoveAnimation; 08 play move animation add_predef DivideBCDPredef @@ -71,41 +71,41 @@ PredefPointers:: ; 4fe79 (13:7e79) add_predef FlagActionPredef add_predef HideObject add_predef IsObjectHidden - add_predef Func_c69c + add_predef ApplyOutOfBattlePoisonDamage add_predef AnyPartyAlive add_predef ShowObject add_predef ShowObject2 - add_predef Func_ee9e + add_predef ReplaceTileBlock add_predef InitPlayerData2 - add_predef Func_c754 - add_predef Func_3af5b + add_predef LoadTilesetHeader + add_predef LearnMoveFromLevelUp add_predef LearnMove - add_predef IsItemInBag_ ; 1C, used in Pokémon Tower - dbw $03,Func_3eb5 ; for these two, the bank number is actually 0 + add_predef IsItemInBag_ + dbw $03,CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the bank number is actually 0 dbw $03,GiveItem - add_predef Func_480eb - add_predef Func_f8ba + add_predef ChangeBGPalColor0_4Frames + add_predef FindPathToPlayer add_predef Func_480ff - add_predef Func_f929 - add_predef Func_f9a0 + add_predef CalcPositionOfPlayerRelativeToNPC + add_predef ConvertNPCMovementDirectionsToJoypadMasks add_predef Func_48125 add_predef UpdateHPBar add_predef HPBarLength - add_predef Func_5ab0 - add_predef Func_3ed02 + add_predef Diploma_TextBoxBorder + add_predef DoubleOrHalveSelectedStats add_predef ShowPokedexMenu - add_predef Func_3ad1c + add_predef EvolutionAfterBattle add_predef SaveSAVtoSRAM0 add_predef InitOpponent - add_predef Func_5a5f + add_predef CableClub_Run add_predef DrawBadges add_predef Func_410f3 add_predef BattleTransition - add_predef Func_79dda + add_predef CopyTileIDsFromList add_predef PlayIntro add_predef Func_79869 add_predef FlashScreen - add_predef Func_c586 + add_predef GetTileAndCoordsInFrontOfPlayer add_predef StatusScreen add_predef StatusScreen2 add_predef Func_410e2 @@ -117,7 +117,7 @@ PredefPointers:: ; 4fe79 (13:7e79) add_predef WriteMonMoves add_predef SaveSAV add_predef LoadSGB - add_predef Func_f113 + add_predef MarkTownVisitedAndLoadMissableObjects add_predef SetPartyMonTypes add_predef CanLearnTM add_predef TMToMove @@ -125,29 +125,29 @@ PredefPointers:: ; 4fe79 (13:7e79) add_predef StarterDex ; 46 add_predef _AddPartyMon add_predef UpdateHPBar2 - add_predef Func_3cdec + add_predef DrawEnemyHUDAndHPBar add_predef LoadTownMap_Nest - add_predef Func_27d6b + add_predef PrintMonType add_predef EmotionBubble; 4C player exclamation - add_predef Func_5aaf; return immediately + add_predef EmptyFunc3; return immediately add_predef AskName add_predef PewterGuys add_predef SaveSAVtoSRAM2 add_predef LoadSAVCheckSum2 add_predef LoadSAV add_predef SaveSAVtoSRAM1 - add_predef Predef54 ; 54 initiate trade + add_predef DoInGameTradeDialogue ; 54 initiate trade add_predef HallOfFamePC add_predef DisplayDexRating dbw $1E, _LeaveMapAnim ; wrong bank - dbw $1E, Func_70510 ; wrong bank - add_predef Func_c5be - add_predef Func_c60b + dbw $1E, EnterMapAnim ; wrong bank + add_predef GetTileTwoStepsInFrontOfPlayer + add_predef CheckForCollisionWhenPushingBoulder add_predef PrintStrengthTxt add_predef PickupItem - add_predef Func_27d98 + add_predef PrintMoveType add_predef LoadMovePPs add_predef DrawHP ; 5F - add_predef Func_128f6 + add_predef DrawHP2 add_predef Func_1c9c6 add_predef OaksAideScript diff --git a/engine/predefs12.asm b/engine/predefs12.asm index 380cfc1c91..90032a14be 100755 --- a/engine/predefs12.asm +++ b/engine/predefs12.asm @@ -1,13 +1,14 @@ -Func_480eb: ; 480eb (12:40eb) +; b = new colour for BG colour 0 (usually white) for 4 frames +ChangeBGPalColor0_4Frames: ; 480eb (12:40eb) call GetPredefRegisters - ld a, [rBGP] ; $ff47 + ld a, [rBGP] or b - ld [rBGP], a ; $ff47 + ld [rBGP], a ld c, $4 call DelayFrames - ld a, [rBGP] ; $ff47 - and $fc - ld [rBGP], a ; $ff47 + ld a, [rBGP] + and %11111100 + ld [rBGP], a ret Func_480ff: ; 480ff (12:40ff) diff --git a/engine/predefs7.asm b/engine/predefs7.asm index 469fe0c40a..9786c097cb 100755 --- a/engine/predefs7.asm +++ b/engine/predefs7.asm @@ -3,26 +3,26 @@ Func_1c9c6: ; 1c9c6 (7:49c6) call PrintText ld hl, wStringBuffer2 + 11 ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a - ld a, [wListScrollOffset] ; wcc36 + ld [wList + 1], a + ld a, [wListScrollOffset] push af xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wListScrollOffset], a ; wcc36 + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a ld [wcf93], a ld a, $4 - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a call DisplayListMenuID pop bc ld a, b - ld [wListScrollOffset], a ; wcc36 + ld [wListScrollOffset], a ret c ld hl, wd126 set 7, [hl] ld hl, wcc5b - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] add a ld d, $0 ld e, a @@ -31,7 +31,7 @@ Func_1c9c6: ; 1c9c6 (7:49c6) ld b, a ld a, [hl] ld c, a - ld hl, wd3af + ld hl, wWarpEntries call Func_1ca0d Func_1ca0d: ; 1ca0d (7:4a0d) diff --git a/engine/save.asm b/engine/save.asm index fcfbd13364..d3127f046e 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -32,11 +32,11 @@ FileDataDestroyedText: ; 7361e (1c:761e) db "@" LoadSAVCheckSum: ; 73623 (1c:7623) - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a - ld [$4000], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a ld hl, $a598 ; hero name located in SRAM ld bc, $f8b ; but here checks the full SAV call SAVCheckSum @@ -58,30 +58,30 @@ LoadSAVCheckSum: ; 73623 (1c:7623) ld bc, $b call CopyData ld hl, $a5a3 - ld de, wPokedexOwned ; wPokedexOwned + ld de, wPokedexOwned ld bc, $789 call CopyData - ld hl, W_CURMAPTILESET ; W_CURMAPTILESET + ld hl, W_CURMAPTILESET set 7, [hl] ld hl, $ad2c ld de, wSpriteStateData1 ld bc, $200 call CopyData ld a, [$b522] - ld [$ffd7], a + ld [hTilesetType], a ld hl, $b0c0 - ld de, W_NUMINBOX ; wda80 - ld bc, $462 + ld de, W_NUMINBOX + ld bc, wBoxMonNicksEnd - W_NUMINBOX call CopyData and a jp SAVGoodChecksum LoadSAVCheckSum1: ; 73690 (1c:7690) - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a - ld [$4000], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a ld hl, $a598 ; hero name located in SRAM ld bc, $f8b ; but here checks the full SAV call SAVCheckSum @@ -90,18 +90,18 @@ LoadSAVCheckSum1: ; 73690 (1c:7690) cp c jr nz, SAVBadCheckSum ld hl, $b0c0 - ld de, W_NUMINBOX ; wda80 - ld bc, $462 + ld de, W_NUMINBOX + ld bc, wBoxMonNicksEnd - W_NUMINBOX call CopyData and a jp SAVGoodChecksum LoadSAVCheckSum2: ; 736bd (1c:76bd) - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a - ld [$4000], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a ld hl, $a598 ; hero name located in SRAM ld bc, $f8b ; but here checks the full SAV call SAVCheckSum @@ -125,8 +125,8 @@ SAVBadCheckSum: ; 736f7 (1c:76f7) SAVGoodChecksum: ; 736f8 (1c:76f8) ld a, $0 - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret Func_73701: ; 0x73701 @@ -173,10 +173,10 @@ NowSavingString: SaveSAVConfirm: ; 73768 (1c:7768) call PrintText hlCoord 0, 7 - ld bc,$0801 ;arrow's coordinates |b = Y|c = X| - ld a,$14 ;one line shifting ($28 = 2 lines) - ld [wd125],a - call DisplayTextBoxID ;handle Yes/No KeyPress + ld bc,$0801 + ld a,TWO_OPTION_MENU + ld [wTextBoxID],a + call DisplayTextBoxID ; yes/no menu ld a,[wCurrentMenuItem] ret @@ -193,67 +193,67 @@ OlderFileWillBeErasedText: ; 73787 (1c:7787) db "@" SaveSAVtoSRAM0: ; 7378c (1c:778c) - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a - ld [$4000], a - ld hl, wPlayerName ; wd158 + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a + ld hl, wPlayerName ld de, $a598 ld bc, $b call CopyData - ld hl, wPokedexOwned ; wPokedexOwned + ld hl, wPokedexOwned ld de, $a5a3 - ld bc, $789 + ld bc, W_NUMINBOX - wPokedexOwned call CopyData - ld hl, wSpriteStateData1 ; OAM? + ld hl, wSpriteStateData1 ld de, $ad2c ld bc, $200 call CopyData - ld hl, W_NUMINBOX ; wda80 + ld hl, W_NUMINBOX ld de, $b0c0 - ld bc, $462 + ld bc, wBoxMonNicksEnd - W_NUMINBOX call CopyData - ld a, [$ffd7] + ld a, [hTilesetType] ld [$b522], a ld hl, $a598 ld bc, $f8b call SAVCheckSum ld [$b523], a xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret SaveSAVtoSRAM1: ; 737e2 (1c:77e2) ; stored pokémon - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a - ld [$4000], a - ld hl, W_NUMINBOX ; wda80 + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a + ld hl, W_NUMINBOX ld de, $b0c0 - ld bc, $462 + ld bc, wBoxMonNicksEnd - W_NUMINBOX call CopyData ld hl, $a598 ld bc, $f8b call SAVCheckSum ld [$b523], a xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret SaveSAVtoSRAM2: ; 7380f (1c:780f) - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a - ld [$4000], a - ld hl, wPartyCount ; wPartyCount + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a + ld hl, wPartyCount ld de, $af2c - ld bc, $194 + ld bc, wPokedexOwned - wPartyCount call CopyData ld hl, wPokedexOwned ; pokédex only ld de, $a5a3 @@ -264,8 +264,8 @@ SaveSAVtoSRAM2: ; 7380f (1c:780f) call SAVCheckSum ld [$b523], a xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret SaveSAVtoSRAM: ; 73848 (1c:7848) @@ -334,47 +334,47 @@ PointerTable_73895: ; 73895 (1c:7895) dw $B188 dw $B5EA -Func_738a1:: ; 738a1 (1c:78a1) +ChangeBox:: ; 738a1 (1c:78a1) ld hl, WhenYouChangeBoxText call PrintText call YesNoChoice - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a - ret nz + ret nz ; return if No was chosen ld hl, wd5a0 bit 7, [hl] call z, Func_73a29 call Func_7393f call UpdateSprites - ld hl, $fff6 + ld hl, hFlags_0xFFF6 set 1, [hl] call HandleMenuInput - ld hl, $fff6 + ld hl, hFlags_0xFFF6 res 1, [hl] bit 1, a ret nz call Func_7387b ld e, l ld d, h - ld hl, W_NUMINBOX ; wda80 + ld hl, W_NUMINBOX call Func_7390e - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] set 7, a ld [wd5a0], a call Func_7387b - ld de, W_NUMINBOX ; wda80 + ld de, W_NUMINBOX call Func_7390e - ld hl, W_MAPTEXTPTR ; wd36c - ld de, wWhichTrade ; wWhichTrade + ld hl, W_MAPTEXTPTR + ld de, wChangeBoxSavedMapTextPointer ld a, [hli] ld [de], a inc de ld a, [hl] ld [de], a - call Func_3f05 + call RestoreMapTextPointer call SaveSAVtoSRAM - ld hl, wWhichTrade ; wWhichTrade - call Func_3f0f + ld hl, wChangeBoxSavedMapTextPointer + call SetMapTextPointer ld a, (SFX_02_5d - SFX_Headers_02) / 3 call PlaySoundWaitForCurrent call WaitForSoundToFinish @@ -386,12 +386,12 @@ WhenYouChangeBoxText: ; 73909 (1c:7909) Func_7390e: ; 7390e (1c:790e) push hl - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a + ld [MBC1SRamBankingMode], a ld a, b - ld [$4000], a + ld [MBC1SRamBank], a ld bc, $462 call CopyData pop hl @@ -405,8 +405,8 @@ Func_7390e: ; 7390e (1c:790e) ld [$ba4c], a call Func_73863 xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret Func_7393f: ; 7393f (1c:793f) @@ -436,24 +436,24 @@ Func_7393f: ; 7393f (1c:793f) ld b, $c ld c, $7 call TextBoxBorder - ld hl, $fff6 + ld hl, hFlags_0xFFF6 set 2, [hl] ld de, BoxNames ; $79d9 hlCoord 13, 1 call PlaceString - ld hl, $fff6 + ld hl, hFlags_0xFFF6 res 2, [hl] ld a, [wd5a0] and $7f - cp $9 + cp 9 jr c, .asm_739a6 - sub $9 + sub 9 hlCoord 8, 2 - ld [hl], $f7 - add $f6 + ld [hl], "1" + add "0" jr .asm_739a8 .asm_739a6 - add $f7 + add "1" .asm_739a8 Coorda 9, 2 hlCoord 1, 2 @@ -502,19 +502,19 @@ BoxNoText: ; 73a21 (1c:7a21) db "BOX No.@" Func_73a29: ; 73a29 (1c:7a29) - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a + ld [MBC1SRamBankingMode], a ld a, $2 - ld [$4000], a + ld [MBC1SRamBank], a call Func_73a4b ld a, $3 - ld [$4000], a + ld [MBC1SRamBank], a call Func_73a4b xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret Func_73a4b: ; 73a4b (1c:7a4b) @@ -547,19 +547,19 @@ Func_73a7f: ; 73a7f (1c:7a7f) Func_73a84: ; 73a84 (1c:7a84) ld hl, wWhichTrade ; wWhichTrade push hl - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a + ld [MBC1SRamBankingMode], a ld a, $2 - ld [$4000], a + ld [MBC1SRamBank], a call Func_73ab8 ld a, $3 - ld [$4000], a + ld [MBC1SRamBank], a call Func_73ab8 xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a pop hl ld a, [wd5a0] and $7f @@ -592,8 +592,8 @@ SAVCheckRandomID: ;$7ad1 ld a,$0a ld [$0000],a ld a,$01 - ld [$6000],a - ld [$4000],a + ld [MBC1SRamBankingMode],a + ld [MBC1SRamBank],a ld a,[$a598] and a jr z,.next @@ -615,7 +615,7 @@ SAVCheckRandomID: ;$7ad1 cp h .next ld a,$00 - ld [$6000],a + ld [MBC1SRamBankingMode],a ld [$0000],a ret @@ -653,23 +653,23 @@ LoadHallOfFameTeams: ; 73b3f (1c:7b3f) ; fallthrough HallOfFame_Copy: ; 73b51 (1c:7b51) - ld a, $a - ld [$0], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a + ld [MBC1SRamBankingMode], a xor a - ld [$4000], a + ld [MBC1SRamBank], a call CopyData xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret -Func_73b6a: ; 73b6a (1c:7b6a) - ld a, $a - ld [$0], a +ClearSAV: ; 73b6a (1c:7b6a) + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a + ld [MBC1SRamBankingMode], a xor a call PadSRAM_FF ld a, $1 @@ -679,12 +679,12 @@ Func_73b6a: ; 73b6a (1c:7b6a) ld a, $3 call PadSRAM_FF xor a - ld [$6000], a - ld [$0], a + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a ret PadSRAM_FF: ; 73b8f (1c:7b8f) - ld [$4000], a + ld [MBC1SRamBank], a ld hl, $a000 ld bc, $2000 ld a, $ff diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index e43cc9ab24..e3e452f3b6 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -1,7 +1,7 @@ PromptUserToPlaySlots: ; 3730e (d:730e) call SaveScreenTilesToBuffer2 ld a, BANK(DisplayTextIDInit) - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a ld b, a ld hl, DisplayTextIDInit call Bankswitch @@ -12,7 +12,7 @@ PromptUserToPlaySlots: ; 3730e (d:730e) and a jr nz, .skip dec a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld hl, wcd4f xor a ld [hli], a @@ -40,9 +40,9 @@ PromptUserToPlaySlots: ; 3730e (d:730e) ld [W_SUBANIMSUBENTRYADDR], a call GBPalWhiteOutWithDelay3 ld a, $1 - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a call GoPAL_SET_CF1C - call Func_3e08 + call ReloadMapSpriteTilePatterns call ReloadTilesetTilePatterns .skip call LoadScreenTilesFromBuffer2 @@ -135,10 +135,10 @@ MainSlotMachineLoop: ; 37395 (d:7395) call PrintText ld hl, wTileMap + $fe ld bc, $0d0f - xor a - ld [wd12c], a - ld a, $14 - ld [wd125], a + xor a ; YES_NO_MENU + ld [wTwoOptionMenuID], a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID ld a, [wCurrentMenuItem] and a @@ -221,7 +221,7 @@ SlotMachine_374ad: ; 374ad (d:74ad) call SlotMachine_374fb call SlotMachine_37517 ret c - ld a, [wcf1b] + ld a, [wOnSGB] xor $1 inc a ld c, a @@ -797,7 +797,7 @@ SlotMachine_3784e: ; 3784e (d:784e) SlotMachine_37882: ; 37882 (d:7882) call DelayFrame call JoypadLowSensitivity - ld a, [$ffb5] + ld a, [hJoy5] and $1 ret z ld hl, wTrainerSpriteOffset @@ -862,9 +862,12 @@ SLOTSMOUSE EQU $1614 INCLUDE "data/slot_machine_wheels.asm" SlotMachineTiles1: ; 37a51 (d:7a51) -IF _RED +IF DEF(_RED) INCBIN "gfx/red/slotmachine1.2bpp" ENDC -IF _BLUE +IF DEF(_BLUE) INCBIN "gfx/blue/slotmachine1.2bpp" ENDC +IF DEF(_YELLOW) + INCBIN "gfx/yellow/slotmachine1.2bpp" +ENDC diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index 932acad102..ff3ef1eb7f 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -11,7 +11,7 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7) ld de, W_RIVALNAME ; wd34a call CopyFixedLengthText xor a - ld [$ffb0], a + ld [hWY], a ld [wd358], a ld hl, wd732 ld [hli], a @@ -26,12 +26,12 @@ LoadTitlescreenGraphics: ; 42dd (1:42dd) ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a ; $ffba xor a - ld [$ffd7], a - ld [$ffae], a + ld [hTilesetType], a + ld [hSCX], a ld a, $40 - ld [$ffaf], a + ld [hSCY], a ld a, $90 - ld [$ffb0], a + ld [hWY], a call ClearScreen call DisableLCD call LoadFontTilePatterns @@ -56,11 +56,11 @@ LoadTitlescreenGraphics: ; 42dd (1:42dd) ld a, BANK(PokemonLogoGraphics) call FarCopyData2 ; second chunk ld hl, Version_GFX ; $402f -IF _RED +IF DEF(_RED) ld de,vChars2 + $600 ld bc,$50 ENDC -IF _BLUE +IF DEF(_BLUE) ld de,vChars2 + $600 + $10 ld bc,$50 - $10 ENDC @@ -114,10 +114,10 @@ ENDC call SaveScreenTilesToBuffer2 call LoadScreenTilesFromBuffer2 call EnableLCD -IF _RED +IF DEF(_RED) ld a,CHARMANDER ; which Pokemon to show first on the title screen ENDC -IF _BLUE +IF DEF(_BLUE) ld a,SQUIRTLE ; which Pokemon to show first on the title screen ENDC @@ -127,7 +127,7 @@ ENDC call Func_4533 call SaveScreenTilesToBuffer1 ld a, $40 - ld [$ffb0], a + ld [hWY], a call LoadScreenTilesFromBuffer2 ld a, $98 call Func_4533 @@ -182,7 +182,7 @@ ENDC call PlaySound call PrintGameVersionOnTitleScreen ld a, $90 - ld [$ffb0], a + ld [hWY], a ld d, $90 .asm_440a ld h, d @@ -225,7 +225,7 @@ ENDC call GBPalWhiteOutWithDelay3 call ClearSprites xor a - ld [$ffb0], a + ld [hWY], a inc a ld [H_AUTOBGTRANSFERENABLED], a ; $ffba call ClearScreen @@ -237,14 +237,14 @@ ENDC call LoadGBPal ld a, [hJoyHeld] ld b, a - and $46 - cp $46 - jp z, Func_448e + and D_UP | SELECT | B_BUTTON + cp D_UP | SELECT | B_BUTTON + jp z, .doClearSaveDialogue jp MainMenu -Func_448e: ; 448e (1:448e) - ld b, BANK(Func_1c98a) - ld hl, Func_1c98a +.doClearSaveDialogue + ld b, BANK(DoClearSaveDialogue) + ld hl, DoClearSaveDialogue jp Bankswitch Func_4496: ; 4496 (1:4496) @@ -268,7 +268,7 @@ Func_4496: ; 4496 (1:4496) call Func_4524 ld a, $90 - ld [$ffb0], a + ld [hWY], a ld d, 1 ; scroll out callba TitleScroll ret @@ -277,7 +277,7 @@ Func_44c1: ; 44c1 (1:44c1) ld d, 0 ; scroll in callba TitleScroll xor a - ld [$ffb0], a + ld [hWY], a ret Func_44cf: ; 44cf (1:44cf) @@ -351,7 +351,7 @@ Func_4533: ; 4533 (1:4533) LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538) xor a - ld [$ffb0], a + ld [hWY], a call ClearScreen call LoadTextBoxTilePatterns @@ -380,9 +380,4 @@ PrintGameVersionOnTitleScreen: ; 4598 (1:4598) ; these point to special tiles specifically loaded for that purpose and are not usual text VersionOnTitleScreenText: ; 45a1 (1:45a1) -IF _RED db $60,$61,$62,$7F,$65,$66,$67,$68,$69,"@" ; "Red Version" -ENDC -IF _BLUE - db $61,$62,$63,$64,$65,$66,$67,$68,"@" ; "Blue Version" -ENDC diff --git a/engine/town_map.asm b/engine/town_map.asm index 2cd3728439..7974cf1a22 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -1,12 +1,12 @@ DisplayTownMap: ; 70e3e (1c:4e3e) call LoadTownMap - ld hl, wcfcb + ld hl, wUpdateSpritesEnabled ld a, [hl] push af ld [hl], $ff push hl ld a, $1 - ld [$ffb7], a + ld [hJoy7], a ld a, [W_CURMAP] ; W_CURMAP push af ld b, $0 @@ -64,9 +64,9 @@ Func_70e92: ; 70e92 (1c:4e92) ld bc, $10 call CopyData .asm_70ec8 - call Func_716c6 + call TownMapSpriteBlinkingAnimation call JoypadLowSensitivity - ld a, [$ffb5] + ld a, [hJoy5] ld b, a and $c3 jr z, .asm_70ec8 @@ -77,9 +77,9 @@ Func_70e92: ; 70e92 (1c:4e92) bit 7, b jr nz, .asm_70f01 xor a - ld [wd09b], a - ld [$ffb7], a - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM + ld [wTownMapSpriteBlinkingEnabled], a + ld [hJoy7], a + ld [wTownMapSpriteBlinkingCounter], a call Func_711ab pop hl pop af @@ -111,7 +111,7 @@ TownMapCursor: ; 70f40 (1c:4f40) LoadTownMap_Nest: ; 70f60 (1c:4f60) call LoadTownMap - ld hl, wcfcb + ld hl, wUpdateSpritesEnabled ld a, [hl] push af ld [hl], $ff @@ -148,7 +148,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) ld bc, (BANK(TownMapUpArrow) << 8) + $01 call CopyVideoDataDouble call Func_71070 - ld hl, wcfcb + ld hl, wUpdateSpritesEnabled ld a, [hl] push af ld [hl], $ff @@ -188,7 +188,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) push hl call DelayFrame call JoypadLowSensitivity - ld a, [$ffb5] + ld a, [hJoy5] ld b, a pop hl and $c3 @@ -206,14 +206,14 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) ld a, (SFX_02_3e - SFX_Headers_02) / 3 call PlaySound ld a, [hl] - ld [wd71a], a + ld [wDestinationMap], a ld hl, wd732 set 3, [hl] inc hl set 7, [hl] .asm_71037 xor a - ld [wd09b], a + ld [wTownMapSpriteBlinkingEnabled], a call GBPalWhiteOutWithDelay3 pop hl pop af @@ -319,9 +319,9 @@ LoadTownMap: ; 7109b (1c:509b) call Delay3 call GBPalNormal xor a - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM + ld [wTownMapSpriteBlinkingCounter], a inc a - ld [wd09b], a + ld [wTownMapSpriteBlinkingEnabled], a ret CompressedMap: ; 71100 (1c:5100) @@ -330,7 +330,7 @@ CompressedMap: ; 71100 (1c:5100) Func_711ab: ; 711ab (1c:51ab) xor a - ld [wd09b], a + ld [wTownMapSpriteBlinkingEnabled], a call GBPalWhiteOut call ClearScreen call ClearSprites @@ -364,10 +364,10 @@ Func_711c4: ; 711c4 (1c:51c4) jp CopyData Func_711ef: ; 711ef (1c:51ef) - callba Func_e9cb + callba FindWildLocationsOfMon call Func_712d9 ld hl, wOAMBuffer - ld de, wHPBarMaxHP + ld de, wBuffer .asm_71200 ld a, [de] cp $ff @@ -570,29 +570,30 @@ INCLUDE "text/map_names.asm" MonNestIcon: ; 716be (1c:56be) INCBIN "gfx/mon_nest_icon.1bpp" -Func_716c6: ; 716c6 (1c:56c6) - ld a, [W_SUBANIMTRANSFORM] ; W_SUBANIMTRANSFORM +TownMapSpriteBlinkingAnimation: ; 716c6 (1c:56c6) + ld a, [wTownMapSpriteBlinkingCounter] inc a - cp $19 - jr z, .asm_716e1 - cp $32 - jr nz, .asm_716f1 + cp 25 + jr z, .hideSprites + cp 50 + jr nz, .done +; show sprites when the counter reaches 50 ld hl, wTileMapBackup ld de, wOAMBuffer ld bc, $90 call CopyData xor a - jr .asm_716f1 -.asm_716e1 + jr .done +.hideSprites ld hl, wOAMBuffer ld b, $24 ld de, $4 -.asm_716e9 +.hideSpritesLoop ld [hl], $a0 add hl, de dec b - jr nz, .asm_716e9 - ld a, $19 -.asm_716f1 - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM + jr nz, .hideSpritesLoop + ld a, 25 +.done + ld [wTownMapSpriteBlinkingCounter], a jp DelayFrame diff --git a/engine/trade.asm b/engine/trade.asm index 54abdab6ec..5afca8093c 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -1,29 +1,29 @@ Func_410e2: ; 410e2 (10:50e2) - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wTradedPlayerMonSpecies] ld [wcd5e], a - ld a, [wTrainerEngageDistance] + ld a, [wTradedEnemyMonSpecies] ld [wcd5f], a - ld de, PointerIDs_41138 ; $5138 + ld de, PointerIDs_41138 jr Func_41102 Func_410f3: ; 410f3 (10:50f3) - ld a, [wTrainerEngageDistance] + ld a, [wTradedEnemyMonSpecies] ld [wcd5e], a ld a, [wTrainerSpriteOffset] ld [wcd5f], a ld de, PointerIDs_41149 Func_41102: ; 41102 (10:5102) - ld a, [W_OPTIONS] ; W_OPTIONS + ld a, [W_OPTIONS] push af - ld a, [$ffaf] + ld a, [hSCY] push af - ld a, [$ffae] + ld a, [hSCX] push af xor a - ld [W_OPTIONS], a ; W_OPTIONS - ld [$ffaf], a - ld [$ffae], a + ld [W_OPTIONS], a + ld [hSCY], a + ld [hSCX], a push de .asm_41115 pop de @@ -32,7 +32,7 @@ Func_41102: ; 41102 (10:5102) jr z, .asm_4112d inc de push de - ld hl, PointerTable_4115f ; $515f + ld hl, PointerTable_4115f add a ld c, a ld b, $0 @@ -40,16 +40,16 @@ Func_41102: ; 41102 (10:5102) ld a, [hli] ld h, [hl] ld l, a - ld de, .asm_41115 ; $5115 + ld de, .asm_41115 push de jp [hl] .asm_4112d pop af - ld [$ffae], a + ld [hSCX], a pop af - ld [$ffaf], a + ld [hSCY], a pop af - ld [W_OPTIONS], a ; W_OPTIONS + ld [W_OPTIONS], a ret ; these bytes refer to the $00th through $10th pointer of PointerTable_4115f @@ -61,13 +61,13 @@ PointerIDs_41149: ; 41149 (10:5149) PointerTable_4115f: ; 4115f (10:515f) dw LoadTradingGFXAndMonNames - dw Func_41245 - dw Func_41298 - dw Func_412d2 - dw Func_41336 + dw Trade_ShowPlayerMon + dw Trade_DrawOpenEndOfLinkCable + dw Trade_AnimateBallEnteringLinkCable + dw Trade_ShowEnemyMon dw Func_41376 dw Func_413c6 - dw Func_41181 + dw Trade_Delay100 dw Func_415c8 dw PrintTradeWentToText dw PrintTradeForSendsText @@ -76,92 +76,92 @@ PointerTable_4115f: ; 4115f (10:515f) dw PrintTradeWillTradeText dw Func_4123b dw Func_415df - dw Func_41217 + dw Trade_SwapNames -Func_41181: ; 41181 (10:5181) - ld c, $64 +Trade_Delay100: ; 41181 (10:5181) + ld c, 100 jp DelayFrames -Func_41186: ; 41186 (10:5186) +Trade_CopyTileMapToVRAM: ; 41186 (10:5186) ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ret -Delay50: ; 41191 (10:5191) - ld c, $50 +Trade_Delay80: ; 41191 (10:5191) + ld c, 80 jp DelayFrames -Func_41196: ; 41196 (10:5196) +Trade_ClearTileMap: ; 41196 (10:5196) ld hl, wTileMap - ld bc, $168 - ld a, $7f + ld bc, 20 * 18 + ld a, " " jp FillMemory LoadTradingGFXAndMonNames: ; 411a1 (10:51a1) - call Func_41196 + call Trade_ClearTileMap call DisableLCD - ld hl, TradingAnimationGraphics ; $69be + ld hl, TradingAnimationGraphics ld de, vChars2 + $310 ld bc, $310 ld a, BANK(TradingAnimationGraphics) call FarCopyData2 - ld hl, TradingAnimationGraphics2 ; $6cce + ld hl, TradingAnimationGraphics2 ld de, vSprites + $7c0 ld bc, $40 ld a, BANK(TradingAnimationGraphics2) call FarCopyData2 ld hl, vBGMap0 ld bc, $800 - ld a, $7f + ld a, " " call FillMemory call ClearSprites ld a, $ff - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld hl, wd730 set 6, [hl] - ld a, [wcf1b] + ld a, [wOnSGB] and a ld a, $e4 jr z, .asm_411e5 ld a, $f0 .asm_411e5 - ld [rOBP0], a ; $ff48 + ld [rOBP0], a call EnableLCD xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, [wWhichTrade] ; wWhichTrade + ld [H_AUTOBGTRANSFERENABLED], a + ld a, [wTradedPlayerMonSpecies] ld [wd11e], a call GetMonName ld hl, wcd6d ld de, wcf4b ld bc, $b call CopyData - ld a, [wTrainerEngageDistance] + ld a, [wTradedEnemyMonSpecies] ld [wd11e], a jp GetMonName Func_4120b: ; 4120b (10:520b) - ld a, $d0 - ld [rOBP1], a ; $ff49 + ld a, %11010000 + ld [rOBP1], a ld b, BANK(Func_7176c) ld hl, Func_7176c jp Bankswitch -Func_41217: ; 41217 (10:5217) +Trade_SwapNames: ; 41217 (10:5217) ld hl, wPlayerName - ld de, wHPBarMaxHP - ld bc, $000b + ld de, wBuffer + ld bc, 11 call CopyData - ld hl, W_GRASSRATE + ld hl, wLinkEnemyTrainerName ld de, wPlayerName - ld bc, $000b + ld bc, 11 call CopyData - ld hl, wHPBarMaxHP - ld de, W_GRASSRATE - ld bc, $000b + ld hl, wBuffer + ld de, wLinkEnemyTrainerName + ld bc, 11 jp CopyData Func_4123b: ; 4123b (10:523b) @@ -171,90 +171,90 @@ Func_4123b: ; 4123b (10:523b) res 6, [hl] ret -Func_41245: ; 41245 (10:5245) - ld a, $ab - ld [rLCDC], a ; $ff40 +Trade_ShowPlayerMon: ; 41245 (10:5245) + ld a, %10101011 + ld [rLCDC], a ld a, $50 - ld [$ffb0], a + ld [hWY], a ld a, $86 - ld [rWX], a ; $ff4b - ld [$ffae], a + ld [rWX], a + ld [hSCX], a xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a hlCoord 4, 0 - ld b, $6 - ld c, $a + ld b, 6 + ld c, 10 call TextBoxBorder - call Func_42769 + call Trade_PrintPlayerMonInfoText ld b, $98 call CopyScreenTileBufferToVRAM call ClearScreen - ld a, [wWhichTrade] ; wWhichTrade - call Func_415a4 + ld a, [wTradedPlayerMonSpecies] + call Trade_LoadMonSprite ld a, $7e -.asm_41273 +.slideScreenLoop push af call DelayFrame pop af - ld [rWX], a ; $ff4b - ld [$ffae], a + ld [rWX], a + ld [hSCX], a dec a dec a and a - jr nz, .asm_41273 - call Delay50 - ld a, $ad - call Func_41676 - ld a, $aa - call Func_41676 - ld a, [wWhichTrade] ; wWhichTrade + jr nz, .slideScreenLoop + call Trade_Delay80 + ld a, TRADE_BALL_POOF_ANIM + call Trade_ShowAnimation + ld a, TRADE_BALL_DROP_ANIM + call Trade_ShowAnimation + ld a, [wTradedPlayerMonSpecies] call PlayCry xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ret -Func_41298: ; 41298 (10:5298) - call Func_41196 +Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298) + call Trade_ClearTileMap ld b, $98 call CopyScreenTileBufferToVRAM ld b, $8 call GoPAL_SET ld hl, vBGMap1 + $8c - call Func_414ae + call Trade_RedrawRows4And5 ld a, $a0 - ld [$ffae], a + ld [hSCX], a call DelayFrame - ld a, $8b - ld [rLCDC], a ; $ff40 + ld a, %10001011 + ld [rLCDC], a hlCoord 6, 2 - ld b, $7 - call Func_41842 - call Func_41186 + 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 call PlaySound - ld c, $14 -.asm_412c8 - ld a, [$ffae] - add $4 - ld [$ffae], a + ld c, 20 +.loop + ld a, [hSCX] + add 4 + ld [hSCX], a dec c - jr nz, .asm_412c8 + jr nz, .loop ret -Func_412d2: ; 412d2 (10:52d2) - ld a, $ab - call Func_41676 - ld c, $a +Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2) + ld a, TRADE_BALL_SHAKE_ANIM + call Trade_ShowAnimation + ld c, 10 call DelayFrames - ld a, $e4 - ld [rOBP0], a ; $ff48 + ld a, %11100100 + ld [rOBP0], a xor a ld [wd09f], a ld bc, $2060 -.asm_412e7 +.moveBallInsideLinkCableLoop push bc xor a - ld de, UnknownOAM_4132e ; $532e + ld de, Trade_BallInsideLinkCableOAM call WriteOAMBlock ld a, [wd09f] xor $1 @@ -263,58 +263,58 @@ Func_412d2: ; 412d2 (10:52d2) ld hl, wOAMBuffer + $02 ld de, $4 ld c, e -.asm_41300 +.cycleSpriteFramesLoop ld [hl], a add hl, de dec c - jr nz, .asm_41300 + jr nz, .cycleSpriteFramesLoop call Delay3 pop bc ld a, c add $4 ld c, a cp $a0 - jr nc, .asm_41318 + jr nc, .ballSpriteReachedEdgeOfScreen ld a, (SFX_02_3c - SFX_Headers_02) / 3 call PlaySound - jr .asm_412e7 -.asm_41318 + jr .moveBallInsideLinkCableLoop +.ballSpriteReachedEdgeOfScreen call ClearSprites ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen ld b, $98 call CopyScreenTileBufferToVRAM call Delay3 xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ret -UnknownOAM_4132e: ; 4132e (10:532e) +Trade_BallInsideLinkCableOAM: ; 4132e (10:532e) db $7E,$00,$7E,$20 db $7E,$40,$7E,$60 -Func_41336: ; 41336 (10:5336) - ld a, $ac - call Func_41676 +Trade_ShowEnemyMon: ; 41336 (10:5336) + ld a, TRADE_BALL_TILT_ANIM + call Trade_ShowAnimation call Func_415c8 hlCoord 4, 10 - ld b, $6 - ld c, $a + ld b, 6 + ld c, 10 call TextBoxBorder - call Func_427a7 - call Func_41186 + call Trade_PrintEnemyMonInfoText + call Trade_CopyTileMapToVRAM ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, [wTrainerEngageDistance] - call Func_415a4 - ld a, $ad - call Func_41676 + ld [H_AUTOBGTRANSFERENABLED], a + ld a, [wTradedEnemyMonSpecies] + call Trade_LoadMonSprite + ld a, TRADE_BALL_POOF_ANIM + call Trade_ShowAnimation ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, [wTrainerEngageDistance] + ld [H_AUTOBGTRANSFERENABLED], a + ld a, [wTradedEnemyMonSpecies] call PlayCry - call Func_41181 + call Trade_Delay100 hlCoord 4, 10 ld bc, $80c call ClearScreenArea @@ -325,23 +325,23 @@ Func_41376: ; 41376 (10:5376) ld a, $1 ld [wd08a], a ld a, $e4 - ld [rOBP0], a ; $ff48 + ld [rOBP0], a ld a, $54 - ld [W_BASECOORDX], a ; wd081 + ld [W_BASECOORDX], a ld a, $1c - ld [W_BASECOORDY], a ; wd082 + ld [W_BASECOORDY], a ld a, [wcd5e] ld [wcd5d], a call Func_41505 call Func_4142d - call Func_41186 + call Trade_CopyTileMapToVRAM call Func_4149f ld hl, vBGMap1 + $8c - call Func_414ae + call Trade_RedrawRows4And5 ld b, $6 call Func_414c5 ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Func_4149f ld b, $4 call Func_414c5 @@ -349,7 +349,7 @@ Func_41376: ; 41376 (10:5376) ld b, $6 call Func_414c5 xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Func_41525 jp ClearSprites @@ -358,22 +358,22 @@ Func_413c6: ; 413c6 (10:53c6) xor a ld [wd08a], a ld a, $64 - ld [W_BASECOORDX], a ; wd081 + ld [W_BASECOORDX], a ld a, $44 - ld [W_BASECOORDY], a ; wd082 + ld [W_BASECOORDY], a ld a, [wcd5f] ld [wcd5d], a call Func_41505 call Func_4145c - call Func_41186 + call Trade_CopyTileMapToVRAM call Func_4149f ld hl, vBGMap1 + $94 - call Func_414ae + call Trade_RedrawRows4And5 call Func_41525 ld b, $6 call Func_414c5 ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Func_4149f ld b, $4 call Func_414c5 @@ -381,27 +381,27 @@ Func_413c6: ; 413c6 (10:53c6) ld b, $6 call Func_414c5 xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a jp ClearSprites Func_41411: ; 41411 (10:5411) ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Func_4120b call DelayFrame - ld a, $ab - ld [rLCDC], a ; $ff40 + ld a, %10101011 + ld [rLCDC], a xor a - ld [$ffae], a + ld [hSCX], a ld a, $90 - ld [$ffb0], a + ld [hWY], a ret Func_4142d: ; 4142d (10:542d) - call Func_41196 + call Trade_ClearTileMap hlCoord 11, 4 ld a, $5d ld [hli], a @@ -413,18 +413,18 @@ Func_4142d: ; 4142d (10:542d) jr nz, .asm_4143a hlCoord 5, 3 ld b, $6 - call Func_41842 + call CopyTileIDsFromList_ZeroBaseTileID hlCoord 4, 12 - ld b, $2 - ld c, $7 + ld b, 2 + ld c, 7 call TextBoxBorder hlCoord 5, 14 - ld de, wPlayerName ; wd158 + ld de, wPlayerName call PlaceString jp DelayFrame Func_4145c: ; 4145c (10:545c) - call Func_41196 + call Trade_ClearTileMap hlCoord 0, 4 ld a, $5e ld c, $e @@ -451,18 +451,18 @@ Func_4145c: ; 4145c (10:545c) ld [hl], a hlCoord 7, 8 ld b, $6 - call Func_41842 + call CopyTileIDsFromList_ZeroBaseTileID hlCoord 6, 0 ld b, $2 ld c, $7 call TextBoxBorder hlCoord 7, 2 - ld de, W_GRASSRATE ; W_GRASSRATE + ld de, wLinkEnemyTrainerName call PlaceString jp DelayFrame Func_4149f: ; 4149f (10:549f) - call Func_41196 + call Trade_ClearTileMap hlCoord 0, 4 ld a, $5e ld c, $14 @@ -472,18 +472,18 @@ Func_4149f: ; 4149f (10:549f) jr nz, .asm_414a9 ret -Func_414ae: ; 414ae (10:54ae) +Trade_RedrawRows4And5: ; 414ae (10:54ae) push hl hlCoord 0, 4 - call ScheduleRowRedrawHelper + call CopyToScreenEdgeTiles pop hl ld a, h ld [H_SCREENEDGEREDRAWADDR + 1], a ld a, l - ld [H_SCREENEDGEREDRAWADDR], a ; $ffd1 - ld a, $2 - ld [H_SCREENEDGEREDRAW], a ; $ffd0 - ld c, $a + ld [H_SCREENEDGEREDRAWADDR], a + ld a, REDRAWROW + ld [H_SCREENEDGEREDRAW], a + ld c, 10 jp DelayFrames Func_414c5: ; 414c5 (10:54c5) @@ -494,14 +494,14 @@ Func_414c5: ; 414c5 (10:54c5) ld a, e dec a jr z, .asm_414d5 - ld a, [$ffae] + ld a, [hSCX] sub $2 jr .asm_414d9 .asm_414d5 - ld a, [$ffae] + ld a, [hSCX] add $2 .asm_414d9 - ld [$ffae], a + ld [hSCX], a call DelayFrame dec d jr nz, .asm_414cb @@ -514,9 +514,9 @@ Func_414e8: ; 414e8 (10:54e8) push de push bc push hl - ld a, [rBGP] ; $ff47 + ld a, [rBGP] xor $3c - ld [rBGP], a ; $ff47 + ld [rBGP], a ld hl, wOAMBuffer + $02 ld de, $4 ld c, $14 @@ -540,10 +540,10 @@ Func_41510: ; 41510 (10:5510) ld hl, wOAMBuffer ld c, $14 .asm_41515 - ld a, [W_BASECOORDY] ; wd082 + ld a, [W_BASECOORDY] add [hl] ld [hli], a - ld a, [W_BASECOORDX] ; wd081 + ld a, [W_BASECOORDX] add [hl] ld [hli], a inc hl @@ -566,9 +566,9 @@ Func_41525: ; 41525 (10:5525) ld bc, $fc00 .asm_4153f ld a, b - ld [W_BASECOORDX], a ; wd081 + ld [W_BASECOORDX], a ld a, c - ld [W_BASECOORDY], a ; wd082 + ld [W_BASECOORDY], a ld d, $4 .asm_41549 call Func_41510 @@ -580,7 +580,7 @@ Func_41525: ; 41525 (10:5525) ret Func_41558: ; 41558 (10:5558) - ld hl, OAMPointers_41574 ; $5574 + ld hl, OAMPointers_41574 ld c, $4 xor a .asm_4155e @@ -630,58 +630,59 @@ UnknownOAM_4159c: ; 4159c (10:559c) db $3B,$70,$3A,$70 db $39,$70,$38,$70 -Func_415a4: ; 415a4 (10:55a4) +; a = species +Trade_LoadMonSprite: ; 415a4 (10:55a4) ld [wcf91], a ld [wd0b5], a ld [wcf1d], a ld b, $b ld c, $0 call GoPAL_SET - ld a, [H_AUTOBGTRANSFERENABLED] ; $ffba + ld a, [H_AUTOBGTRANSFERENABLED] xor $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call GetMonHeader hlCoord 7, 2 call LoadFlippedFrontSpriteByMonIndex - ld c, $a + ld c, 10 jp DelayFrames Func_415c8: ; 415c8 (10:55c8) ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen - ld a, $e3 - ld [rLCDC], a ; $ff40 + ld a, %11100011 + ld [rLCDC], a ld a, $7 - ld [rWX], a ; $ff4b + ld [rWX], a xor a - ld [$ffb0], a + ld [hWY], a ld a, $90 - ld [$ffae], a + ld [hSCX], a ret Func_415df: ; 415df (10:55df) - ld c, $32 + ld c, 50 call DelayFrames -.asm_415e4 +.loop call DelayFrame - ld a, [rWX] ; $ff4b + ld a, [rWX] inc a inc a - ld [rWX], a ; $ff4b + ld [rWX], a cp $a1 - jr nz, .asm_415e4 - call Func_41196 - ld c, $a + jr nz, .loop + call Trade_ClearTileMap + ld c, 10 call DelayFrames ld a, $7 - ld [rWX], a ; $ff4b + ld [rWX], a ret PrintTradeWentToText: ; 415fe (10:55fe) ld hl, TradeWentToText call PrintText - ld c, $c8 + ld c, 200 call DelayFrames jp Func_415df @@ -692,10 +693,10 @@ TradeWentToText: ; 4160c (10:560c) PrintTradeForSendsText: ; 41611 (10:5611) ld hl, TradeForText call PrintText - call Delay50 + call Trade_Delay80 ld hl, TradeSendsText call PrintText - jp Delay50 + jp Trade_Delay80 TradeForText: ; 41623 (10:5623) TX_FAR _TradeForText @@ -708,10 +709,10 @@ TradeSendsText: ; 41628 (10:5628) PrintTradeFarewellText: ; 4162d (10:562d) ld hl, TradeWavesFarewellText call PrintText - call Delay50 + call Trade_Delay80 ld hl, TradeTransferredText call PrintText - call Delay50 + call Trade_Delay80 jp Func_415df TradeWavesFarewellText: ; 41642 (10:5642) @@ -725,7 +726,7 @@ TradeTransferredText: ; 41647 (10:5647) PrintTradeTakeCareText: ; 4164c (10:564c) ld hl, TradeTakeCareText call PrintText - jp Delay50 + jp Trade_Delay80 TradeTakeCareText: ; 41655 (10:5655) TX_FAR _TradeTakeCareText @@ -734,10 +735,10 @@ TradeTakeCareText: ; 41655 (10:5655) PrintTradeWillTradeText: ; 4165a (10:565a) ld hl, TradeWillTradeText call PrintText - call Delay50 + call Trade_Delay80 ld hl, TradeforText call PrintText - jp Delay50 + jp Trade_Delay80 TradeWillTradeText: ; 4166c (10:566c) TX_FAR _TradeWillTradeText @@ -747,8 +748,8 @@ TradeforText: ; 41671 (10:5671) TX_FAR _TradeforText db "@" -Func_41676: ; 41676 (10:5676) - ld [W_ANIMATIONID], a ; W_ANIMATIONID +Trade_ShowAnimation: ; 41676 (10:5676) + ld [W_ANIMATIONID], a xor a ld [wcc5b], a predef_jump MoveAnimation diff --git a/engine/trade2.asm b/engine/trade2.asm index b13a18b66b..da199e77a2 100755 --- a/engine/trade2.asm +++ b/engine/trade2.asm @@ -1,8 +1,8 @@ -Func_42769: ; 42769 (10:6769) +Trade_PrintPlayerMonInfoText: ; 42769 (10:6769) hlCoord 5, 0 - ld de,OTString67E5 + ld de,Trade_MonInfoText call PlaceString - ld a,[wWhichTrade] + ld a,[wTradedPlayerMonSpecies] ld [wd11e],a predef IndexToPokedex hlCoord 9, 0 @@ -13,18 +13,18 @@ Func_42769: ; 42769 (10:6769) ld de,wcf4b call PlaceString hlCoord 8, 4 - ld de,wTrainerScreenX + ld de,wTradedPlayerMonOT call PlaceString hlCoord 8, 6 - ld de,wcd4c + ld de,wTradedPlayerMonOTID ld bc,$8205 jp PrintNumber -Func_427a7: ; 427a7 (10:67a7) +Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7) hlCoord 5, 10 - ld de,OTString67E5 + ld de,Trade_MonInfoText call PlaceString - ld a,[wTrainerEngageDistance] + ld a,[wTradedEnemyMonSpecies] ld [wd11e],a predef IndexToPokedex hlCoord 9, 10 @@ -35,14 +35,14 @@ Func_427a7: ; 427a7 (10:67a7) ld de,wcd6d call PlaceString hlCoord 8, 14 - ld de,wcd4e + ld de,wTradedEnemyMonOT call PlaceString hlCoord 8, 16 - ld de,wcd59 + ld de,wTradedEnemyMonOTID ld bc,$8205 jp PrintNumber -OTString67E5: ; 427e5 (10:67e5) +Trade_MonInfoText: ; 427e5 (10:67e5) db "──",$74,$F2,$4E db $4E db "OT/",$4E diff --git a/engine/turn_sprite.asm b/engine/turn_sprite.asm index ecd8cf0295..84037cfe43 100755 --- a/engine/turn_sprite.asm +++ b/engine/turn_sprite.asm @@ -1,25 +1,25 @@ -Func_13074: ; 13074 (4:7074) +UpdateSpriteFacingOffsetAndDelayMovement: ; 13074 (4:7074) ld h, $c2 ld a, [H_CURRENTSPRITEOFFSET] add $8 ld l, a - ld a, $7f - ld [hl], a + ld a, $7f ; maximum movement delay + ld [hl], a ; c2x8 (movement delay) dec h ld a, [H_CURRENTSPRITEOFFSET] add $9 ld l, a - ld a, [hld] + ld a, [hld] ; c1x9 (facing direction) ld b, a xor a ld [hld], a - ld [hl], a + ld [hl], a ; c1x8 (walk animation frame) ld a, [H_CURRENTSPRITEOFFSET] add $2 ld l, a - ld a, [hl] - or b + ld a, [hl] ; c1x2 (facing and animation table offset) + or b ; or in the facing direction ld [hld], a - ld a, $2 - ld [hl], a + ld a, $2 ; delayed movement status + ld [hl], a ; c1x1 (movement status) ret diff --git a/gfx/ED_tile.png b/gfx/ED_tile.png index c8e132b927..352489d60b 100755 Binary files a/gfx/ED_tile.png and b/gfx/ED_tile.png differ diff --git a/gfx/battle_hud1.png b/gfx/battle_hud1.png index 097c845334..74e6361f5f 100755 Binary files a/gfx/battle_hud1.png and b/gfx/battle_hud1.png differ diff --git a/gfx/battle_hud2.png b/gfx/battle_hud2.png index ef120166dc..a5df75c8c3 100755 Binary files a/gfx/battle_hud2.png and b/gfx/battle_hud2.png differ diff --git a/gfx/battle_hud3.png b/gfx/battle_hud3.png index e4c452b1a4..00643de7b5 100755 Binary files a/gfx/battle_hud3.png and b/gfx/battle_hud3.png differ diff --git a/gfx/blocksets/beachhouse.bst b/gfx/blocksets/beachhouse.bst new file mode 100644 index 0000000000..bafbe0b24d Binary files /dev/null and b/gfx/blocksets/beachhouse.bst differ diff --git a/gfx/blue/blueversion.png b/gfx/blue/blueversion.png index dd7e2b6fd0..a9c87be8fe 100755 Binary files a/gfx/blue/blueversion.png and b/gfx/blue/blueversion.png differ diff --git a/gfx/diagonal_lines.png b/gfx/diagonal_lines.png deleted file mode 100755 index 400c04b5aa..0000000000 Binary files a/gfx/diagonal_lines.png and /dev/null differ diff --git a/gfx/font.png b/gfx/font.png index d5548c09f2..34e86b4a68 100755 Binary files a/gfx/font.png and b/gfx/font.png differ diff --git a/gfx/gamefreak_intro.png b/gfx/gamefreak_intro.png index 0fa6832c20..f65c64ed40 100755 Binary files a/gfx/gamefreak_intro.png and b/gfx/gamefreak_intro.png differ diff --git a/gfx/ledge_hopping_shadow.png b/gfx/ledge_hopping_shadow.png index cad35624f3..8e76005658 100755 Binary files a/gfx/ledge_hopping_shadow.png and b/gfx/ledge_hopping_shadow.png differ diff --git a/gfx/minimized_mon_sprite.png b/gfx/minimized_mon_sprite.png index 24304b6946..35ca75cb92 100755 Binary files a/gfx/minimized_mon_sprite.png and b/gfx/minimized_mon_sprite.png differ diff --git a/gfx/mon_nest_icon.png b/gfx/mon_nest_icon.png index 87c644daac..ade6994497 100755 Binary files a/gfx/mon_nest_icon.png and b/gfx/mon_nest_icon.png differ diff --git a/gfx/p_tile.png b/gfx/p_tile.png index 309fb76365..3df11133d8 100755 Binary files a/gfx/p_tile.png and b/gfx/p_tile.png differ diff --git a/gfx/tilesets/beachhouse.png b/gfx/tilesets/beachhouse.png new file mode 100644 index 0000000000..f5dccf7ad6 Binary files /dev/null and b/gfx/tilesets/beachhouse.png differ diff --git a/gfx/tilesets/beachhouse.tilecoll b/gfx/tilesets/beachhouse.tilecoll new file mode 100644 index 0000000000..54ddac1942 --- /dev/null +++ b/gfx/tilesets/beachhouse.tilecoll @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gfx/town_map_cursor.png b/gfx/town_map_cursor.png index 6c5720d498..39cf2c2eed 100755 Binary files a/gfx/town_map_cursor.png and b/gfx/town_map_cursor.png differ diff --git a/gfx/up_arrow.png b/gfx/up_arrow.png index 6f2b957f0c..6ebd7bfd3b 100755 Binary files a/gfx/up_arrow.png and b/gfx/up_arrow.png differ diff --git a/gfx/yellow/slotmachine1.png b/gfx/yellow/slotmachine1.png new file mode 100644 index 0000000000..335ce97c0e Binary files /dev/null and b/gfx/yellow/slotmachine1.png differ diff --git a/gfx/yellow/slotmachine2.png b/gfx/yellow/slotmachine2.png new file mode 100644 index 0000000000..b4bdf8a8bf Binary files /dev/null and b/gfx/yellow/slotmachine2.png differ diff --git a/home.asm b/home.asm index 5c593256ed..1b32abdd39 100755 --- a/home.asm +++ b/home.asm @@ -1,35 +1,36 @@ + ; The rst vectors are unused. -SECTION "rst00", ROM0[$00] +SECTION "rst 00", ROM0 [$00] rst $38 -SECTION "rst08", ROM0[$08] +SECTION "rst 08", ROM0 [$08] rst $38 -SECTION "rst10", ROM0[$10] +SECTION "rst 10", ROM0 [$10] rst $38 -SECTION "rst18", ROM0[$18] +SECTION "rst 18", ROM0 [$18] rst $38 -SECTION "rst20", ROM0[$20] +SECTION "rst 20", ROM0 [$20] rst $38 -SECTION "rst28", ROM0[$28] +SECTION "rst 28", ROM0 [$28] rst $38 -SECTION "rst30", ROM0[$30] +SECTION "rst 30", ROM0 [$30] rst $38 -SECTION "rst38", ROM0[$38] +SECTION "rst 38", ROM0 [$38] rst $38 -; interrupts -SECTION "vblank", ROM0[$40] +; Hardware interrupts +SECTION "vblank", ROM0 [$40] jp VBlank -SECTION "lcdc", ROM0[$48] +SECTION "hblank", ROM0 [$48] rst $38 -SECTION "timer", ROM0[$50] +SECTION "timer", ROM0 [$50] jp Timer -SECTION "serial", ROM0[$58] +SECTION "serial", ROM0 [$58] jp Serial -SECTION "joypad", ROM0[$60] +SECTION "joypad", ROM0 [$60] reti -SECTION "bank0",ROM0[$61] +SECTION "Home", ROM0 DisableLCD:: xor a @@ -79,38 +80,26 @@ HideSprites:: jr nz, .loop ret -FarCopyData:: -; Copy bc bytes from a:hl to de. - ld [wBuffer], a - ld a, [H_LOADEDROMBANK] - push af - ld a, [wBuffer] - ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a - call CopyData - pop af - ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a - ret +INCLUDE "home/copy.asm" -CopyData:: -; Copy bc bytes from hl to de. - ld a, [hli] - ld [de], a - inc de - dec bc - ld a, c - or b - jr nz, CopyData - ret -SECTION "Entry", ROM0[$100] +SECTION "Entry", ROM0 [$100] + nop jp Start -SECTION "Start", ROM0[$150] +SECTION "Header", ROM0 [$104] + + ; The header is generated by rgbfix. + ; The space here is allocated to prevent code from being overwritten. + + ds $150 - $104 + + + +SECTION "Main", ROM0 Start:: cp GBC @@ -125,34 +114,34 @@ Start:: INCLUDE "home/joypad.asm" - INCLUDE "data/map_header_pointers.asm" - INCLUDE "home/overworld.asm" -; this is used to check if the player wants to interrupt the opening sequence at several points -; XXX is this used anywhere else? -; INPUT: -; c = number of frames to wait -; sets carry if Up+Select+B, Start, or A is pressed within c frames -; unsets carry otherwise + CheckForUserInterruption:: ; 12f8 (0:12f8) +; Return carry if Up+Select+B, Start or A are pressed in c frames. +; Used only in the intro and title screen. call DelayFrame + push bc call JoypadLowSensitivity pop bc - ld a,[hJoyHeld] ; currently pressed buttons - cp a,%01000110 ; Up, Select button, B button - jr z,.setCarry ; if all three keys are pressed - ld a,[$ffb5] ; either newly pressed buttons or currently pressed buttons at low sampling rate - and a,%00001001 ; Start button, A button - jr nz,.setCarry ; if either key is pressed + + ld a, [hJoyHeld] + cp D_UP + SELECT + B_BUTTON + jr z, .input + + ld a, [hJoy5] + and START | A_BUTTON + jr nz, .input + dec c - jr nz,CheckForUserInterruption -.unsetCarry + jr nz, CheckForUserInterruption + and a ret -.setCarry + +.input scf ret @@ -173,71 +162,84 @@ LoadDestinationWarpPosition:: ; 1313 (0:1313) ld b,0 add hl,bc ld bc,4 - ld de,wd35f + ld de,wCurrentTileBlockMapViewPointer call CopyData pop af ld [H_LOADEDROMBANK],a ld [$2000],a ret -; INPUT: -; c: if nonzero, show at least a sliver of health -; d = number of HP bar sections (normally 6) -; e = health (in eighths of bar sections) (normally out of 48) + DrawHPBar:: ; 1336 (0:1336) +; 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]. + push hl push de push bc - ld a,$71 ; left of HP bar tile 1 - ld [hli],a - ld a,$62 ; left of HP bar tile 2 - ld [hli],a + + ; Left + ld a, $71 ; "HP:" + ld [hli], a + ld a, $62 + ld [hli], a + push hl - ld a,$63 ; empty bar section tile -.drawEmptyBarLoop + + ; Middle + ld a, $63 ; empty +.draw ld [hli],a dec d - jr nz,.drawEmptyBarLoop - ld a,[wListMenuID] - dec a ; what should the right of HP bar tile be? - ld a,$6d ; right of HP bar tile, in status screen and battles - jr z,.writeTile - dec a ; right of HP bar tile, in pokemon menu -.writeTile + jr nz, .draw + + ; Right + ld a,[wHPBarType] + dec a + ld a, $6d ; status screen and battle + jr z, .ok + dec a ; pokemon menu +.ok ld [hl],a + pop hl - ld a,e - and a ; is there enough health to show up on the HP bar? - jr nz,.loop ; if so, draw the HP bar - ld a,c - and a ; should a sliver of health be shown no matter what? - jr z,.done - ld e,1 ; if so, fill one eighth of a bar section -; loop to draw every full bar section -.loop - ld a,e - sub a,8 - jr c,.drawPartialBarSection - ld e,a - ld a,$6b ; filled bar section tile - ld [hli],a - ld a,e + + ld a, e and a - jr z,.done - jr .loop -; draws a partial bar section at the end (if necessary) -; there are 7 possible partial bar sections from 1/8 to 7/8 full -.drawPartialBarSection - ld a,$63 ; empty bar section tile - add e ; add e to get the appropriate partial bar section tile - ld [hl],a ; write the tile + jr nz, .fill + + ; If c iz nonzero, draw a pixel anyway. + ld a, c + and a + jr z, .done + ld e, 1 + +.fill + ld a, e + sub 8 + jr c, .partial + ld e, a + ld a, $6b ; full + ld [hli], a + ld a, e + and a + jr z, .done + jr .fill + +.partial + ; Fill remaining pixels at the end if necessary. + ld a, $63 ; empty + add e + ld [hl], a .done pop bc pop de pop hl ret -; loads pokemon data from one of multiple sources to wcf98 + +; loads pokemon data from one of multiple sources to wLoadedMon ; loads base stats to W_MONHDEXNUM ; INPUT: ; [wWhichPokemon] = index of pokemon within party/box @@ -248,25 +250,26 @@ DrawHPBar:: ; 1336 (0:1336) ; 03: daycare ; OUTPUT: ; [wcf91] = pokemon ID -; wcf98 = base address of pokemon data +; wLoadedMon = base address of pokemon data ; W_MONHDEXNUM = base address of base stats LoadMonData:: ; 1372 (0:1372) - ld hl,LoadMonData_ - ld b,BANK(LoadMonData_) + ld hl, LoadMonData_ + ld b, BANK(LoadMonData_) jp Bankswitch -; writes c to wd0dc+b + Func_137a:: ; 137a (0:137a) - ld hl, wd0dc +; Write c to [wMoves + b]. Unused. + ld hl, wMoves ld e, b - ld d, $0 + ld d, 0 add hl, de ld a, c ld [hl], a ret LoadFlippedFrontSpriteByMonIndex:: ; 1384 (0:1384) - ld a, $1 + ld a, 1 ld [W_SPRITEFLIPPED], a LoadFrontSpriteByMonIndex:: ; 1389 (0:1389) @@ -282,9 +285,9 @@ LoadFrontSpriteByMonIndex:: ; 1389 (0:1389) ld [hl], b and a pop hl - jr z, .invalidDexNumber ; dex #0 invalid + jr z, .invalidDexNumber ; dex #0 invalid cp NUM_POKEMON + 1 - jr c, .validDexNumber ; dex >#151 invalid + jr c, .validDexNumber ; dex >#151 invalid .invalidDexNumber ld a, RHYDON ; $1 ld [wcf91], a @@ -309,46 +312,49 @@ LoadFrontSpriteByMonIndex:: ; 1389 (0:1389) ld [$2000], a ret -; plays the cry of a pokemon -; INPUT: -; a = pokemon ID + PlayCry:: ; 13d0 (0:13d0) +; Play monster a's cry. call GetCryData - call PlaySound ; play cry - jp WaitForSoundToFinish ; wait for sound to be done playing + call PlaySound + jp WaitForSoundToFinish -; gets a pokemon's cry data -; INPUT: -; a = pokemon ID GetCryData:: ; 13d9 (0:13d9) +; Load cry data for monster a. dec a - ld c,a - ld b,0 - ld hl,CryData - add hl,bc - add hl,bc - add hl,bc - ld a,Bank(CryData) + ld c, a + ld b, 0 + ld hl, CryData + add hl, bc + add hl, bc + add hl, bc + + ld a, Bank(CryData) call BankswitchHome - ld a,[hli] - ld b,a - ld a,[hli] - ld [wc0f1],a - ld a,[hl] - ld [wc0f2],a + ld a, [hli] + ld b, a ; cry id + ld a, [hli] + ld [wc0f1], a + ld a, [hl] + ld [wc0f2], a call BankswitchBack - ld a,b ; a = cryID - ld c,$14 ; base sound ID for pokemon cries - rlca - add b ; a = cryID * 3 - add c ; a = $14 + cryID * 3 + + ; Cry headers have 3 channels, + ; and start from index $14, + ; so add 3 times the cry id. + ld a, b + ld c, $14 + rlca ; * 2 + add b + add c ret + DisplayPartyMenu:: ; 13fc (0:13fc) - ld a,[$ffd7] + ld a,[hTilesetType] push af xor a - ld [$ffd7],a + ld [hTilesetType],a call GBPalWhiteOutWithDelay3 call ClearSprites call PartyMenuInit @@ -356,51 +362,51 @@ DisplayPartyMenu:: ; 13fc (0:13fc) jp HandlePartyMenuInput GoBackToPartyMenu:: ; 1411 (0:1411) - ld a,[$ffd7] + ld a,[hTilesetType] push af xor a - ld [$ffd7],a + ld [hTilesetType],a call PartyMenuInit call RedrawPartyMenu jp HandlePartyMenuInput PartyMenuInit:: ; 1420 (0:1420) - ld a,$01 + ld a, 1 ; hardcoded bank call BankswitchHome call LoadHpBarAndStatusTilePatterns - ld hl,wd730 - set 6,[hl] ; turn off letter printing delay + ld hl, wd730 + set 6, [hl] ; turn off letter printing delay xor a - ld [wcc49],a - ld [wcc37],a - ld hl,wTopMenuItemY + ld [wcc49], a + ld [wcc37], a + ld hl, wTopMenuItemY inc a - ld [hli],a ; top menu item Y + ld [hli], a ; top menu item Y xor a - ld [hli],a ; top menu item X - ld a,[wcc2b] + ld [hli], a ; top menu item X + ld a, [wcc2b] push af - ld [hli],a ; current menu item ID + ld [hli], a ; current menu item ID inc hl - ld a,[wPartyCount] + ld a, [wPartyCount] and a ; are there more than 0 pokemon in the party? - jr z,.storeMaxMenuItemID + jr z, .storeMaxMenuItemID dec a ; if party is not empty, the max menu item ID is ([wPartyCount] - 1) ; otherwise, it is 0 .storeMaxMenuItemID - ld [hli],a ; max menu item ID - ld a,[wd11f] + ld [hli], a ; max menu item ID + ld a, [wd11f] and a - ld a,%00000011 ; A button and B button - jr z,.next + ld a, A_BUTTON + B_BUTTON + jr z, .next xor a - ld [wd11f],a + ld [wd11f], a inc a .next - ld [hli],a ; menu watched keys + ld [hli], a ; menu watched keys pop af - ld [hl],a ; old menu item ID + ld [hl], a ; old menu item ID ret HandlePartyMenuInput:: ; 145a (0:145a) @@ -417,11 +423,11 @@ HandlePartyMenuInput:: ; 145a (0:145a) ld [wcc2b],a ld hl,wd730 res 6,[hl] ; turn on letter printing delay - ld a,[wcc35] + ld a,[wMenuItemToSwap] and a jp nz,.swappingPokemon pop af - ld [$ffd7],a + ld [hTilesetType],a bit 1,b jr nz,.noPokemonChosen ld a,[wPartyCount] @@ -449,7 +455,7 @@ HandlePartyMenuInput:: ; 145a (0:145a) .cancelSwap ; if the B button was pressed callba ErasePartyMenuCursors xor a - ld [wcc35],a + ld [wMenuItemToSwap],a ld [wd07d],a call RedrawPartyMenu jr HandlePartyMenuInput @@ -509,12 +515,12 @@ PrintStatusConditionNotFainted ; 14f6 ; function to print pokemon level, leaving off the ":L" if the level is at least 100 ; INPUT: ; hl = destination address -; [wcfb9] = level +; [wLoadedMonLevel] = level PrintLevel:: ; 150b (0:150b) ld a,$6e ; ":L" tile ID ld [hli],a ld c,2 ; number of digits - ld a,[wcfb9] ; level + ld a,[wLoadedMonLevel] ; level cp a,100 jr c,PrintLevelCommon ; if level at least 100, write over the ":L" tile @@ -525,12 +531,12 @@ PrintLevel:: ; 150b (0:150b) ; prints the level without leaving off ":L" regardless of level ; INPUT: ; hl = destination address -; [wcfb9] = level +; [wLoadedMonLevel] = level PrintLevelFull:: ; 151b (0:151b) ld a,$6e ; ":L" tile ID ld [hli],a ld c,3 ; number of digits - ld a,[wcfb9] ; level + ld a,[wLoadedMonLevel] ; level PrintLevelCommon:: ; 1523 (0:1523) ld [wd11e],a @@ -539,7 +545,8 @@ PrintLevelCommon:: ; 1523 (0:1523) jp PrintNumber Func_152e:: ; 152e (0:152e) - ld hl,wd0dc +; Unused. + ld hl,wMoves ld c,a ld b,0 add hl,bc @@ -683,7 +690,7 @@ PrintBCDNumber:: ; 15cd (0:15cd) ret PrintBCDDigit:: ; 1604 (0:1604) - and a,%00001111 + and $f and a jr z,.zeroDigit .nonzeroDigit @@ -897,561 +904,19 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea) INCLUDE "data/collision.asm" - - -FarCopyData2:: -; Identical to FarCopyData, but uses $ff8b -; as temp space instead of wBuffer. - ld [$ff8b],a - ld a,[H_LOADEDROMBANK] - push af - ld a,[$ff8b] - ld [H_LOADEDROMBANK],a - ld [MBC3RomBank],a - call CopyData - pop af - ld [H_LOADEDROMBANK],a - ld [MBC3RomBank],a - ret - -FarCopyData3:: -; Copy bc bytes from a:de to hl. - ld [$ff8b],a - ld a,[H_LOADEDROMBANK] - push af - ld a,[$ff8b] - ld [H_LOADEDROMBANK],a - ld [MBC3RomBank],a - push hl - push de - push de - ld d,h - ld e,l - pop hl - call CopyData - pop de - pop hl - pop af - ld [H_LOADEDROMBANK],a - ld [MBC3RomBank],a - ret - -FarCopyDataDouble:: -; Expand bc bytes of 1bpp image data -; from a:hl to 2bpp data at de. - ld [$ff8b],a - ld a,[H_LOADEDROMBANK] - push af - ld a,[$ff8b] - ld [H_LOADEDROMBANK],a - ld [MBC3RomBank],a -.loop - ld a,[hli] - ld [de],a - inc de - ld [de],a - inc de - dec bc - ld a,c - or b - jr nz,.loop - pop af - ld [H_LOADEDROMBANK],a - ld [MBC3RomBank],a - ret - -CopyVideoData:: -; Wait for the next VBlank, then copy c 2bpp -; tiles from b:de to hl, 8 tiles at a time. -; This takes c/8 frames. - - ld a, [H_AUTOBGTRANSFERENABLED] - push af - xor a ; disable auto-transfer while copying - ld [H_AUTOBGTRANSFERENABLED], a - - ld a, [H_LOADEDROMBANK] - ld [$ff8b], a - - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a - - ld a, e - ld [H_VBCOPYSRC], a - ld a, d - ld [H_VBCOPYSRC + 1], a - - ld a, l - ld [H_VBCOPYDEST], a - ld a, h - ld [H_VBCOPYDEST + 1], a - -.loop - ld a, c - cp 8 - jr nc, .keepgoing - -.done - ld [H_VBCOPYSIZE], a - call DelayFrame - ld a, [$ff8b] - ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a - pop af - ld [H_AUTOBGTRANSFERENABLED], a - ret - -.keepgoing - ld a, 8 - ld [H_VBCOPYSIZE], a - call DelayFrame - ld a, c - sub 8 - ld c, a - jr .loop - -CopyVideoDataDouble:: -; Wait for the next VBlank, then copy c 1bpp -; tiles from b:de to hl, 8 tiles at a time. -; This takes c/8 frames. - ld a, [H_AUTOBGTRANSFERENABLED] - push af - xor a ; disable auto-transfer while copying - ld [H_AUTOBGTRANSFERENABLED], a - ld a, [H_LOADEDROMBANK] - ld [$ff8b], a - - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a - - ld a, e - ld [H_VBCOPYDOUBLESRC], a - ld a, d - ld [H_VBCOPYDOUBLESRC + 1], a - - ld a, l - ld [H_VBCOPYDOUBLEDEST], a - ld a, h - ld [H_VBCOPYDOUBLEDEST + 1], a - -.loop - ld a, c - cp 8 - jr nc, .keepgoing - -.done - ld [H_VBCOPYDOUBLESIZE], a - call DelayFrame - ld a, [$ff8b] - ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a - pop af - ld [H_AUTOBGTRANSFERENABLED], a - ret - -.keepgoing - ld a, 8 - ld [H_VBCOPYDOUBLESIZE], a - call DelayFrame - ld a, c - sub 8 - ld c, a - jr .loop - -ClearScreenArea:: -; Clear tilemap area cxb at hl. - ld a, $7f ; blank tile - ld de, 20 ; screen width -.y - push hl - push bc -.x - ld [hli], a - dec c - jr nz, .x - pop bc - pop hl - add hl, de - dec b - jr nz, .y - ret - -CopyScreenTileBufferToVRAM:: -; Copy wTileMap to the BG Map starting at b * $100. -; This is done in thirds of 6 rows, so it takes 3 frames. - - ld c, 6 - - ld hl, $600 * 0 - ld de, wTileMap + 20 * 6 * 0 - call .setup - call DelayFrame - - ld hl, $600 * 1 - ld de, wTileMap + 20 * 6 * 1 - call .setup - call DelayFrame - - ld hl, $600 * 2 - ld de, wTileMap + 20 * 6 * 2 - call .setup - jp DelayFrame - -.setup - ld a, d - ld [H_VBCOPYBGSRC+1], a - call GetRowColAddressBgMap - ld a, l - ld [H_VBCOPYBGDEST], a - ld a, h - ld [H_VBCOPYBGDEST+1], a - ld a, c - ld [H_VBCOPYBGNUMROWS], a - ld a, e - ld [H_VBCOPYBGSRC], a - ret - -ClearScreen:: -; Clear wTileMap, then wait -; for the bg map to update. - ld bc, 20 * 18 - inc b - ld hl, wTileMap - ld a, $7f -.loop - ld [hli], a - dec c - jr nz, .loop - dec b - jr nz, .loop - jp Delay3 - - +INCLUDE "home/copy2.asm" INCLUDE "home/text.asm" INCLUDE "home/vcopy.asm" INCLUDE "home/init.asm" INCLUDE "home/vblank.asm" INCLUDE "home/fade.asm" - - -Serial:: ; 2125 (0:2125) - push af - push bc - push de - push hl - ld a, [$ffaa] - inc a - jr z, .asm_2142 - ld a, [$ff01] - ld [$ffad], a - ld a, [$ffac] - ld [$ff01], a - ld a, [$ffaa] - cp $2 - jr z, .asm_2162 - ld a, $80 - ld [$ff02], a - jr .asm_2162 -.asm_2142 - ld a, [$ff01] - ld [$ffad], a - ld [$ffaa], a - cp $2 - jr z, .asm_215f - xor a - ld [$ff01], a - ld a, $3 - ld [rDIV], a ; $ff04 -.asm_2153 - ld a, [rDIV] ; $ff04 - bit 7, a - jr nz, .asm_2153 - ld a, $80 - ld [$ff02], a - jr .asm_2162 -.asm_215f - xor a - ld [$ff01], a -.asm_2162 - ld a, $1 - ld [$ffa9], a - ld a, $fe - ld [$ffac], a - pop hl - pop de - pop bc - pop af - reti - -Func_216f:: ; 216f (0:216f) - ld a, $1 - ld [$ffab], a -.asm_2173 - ld a, [hl] - ld [$ffac], a - call Func_219a - push bc - ld b, a - inc hl - ld a, $30 -.asm_217e - dec a - jr nz, .asm_217e - ld a, [$ffab] - and a - ld a, b - pop bc - jr z, .asm_2192 - dec hl - cp $fd - jr nz, .asm_2173 - xor a - ld [$ffab], a - jr .asm_2173 -.asm_2192 - ld [de], a - inc de - dec bc - ld a, b - or c - jr nz, .asm_2173 - ret - -Func_219a:: ; 219a (0:219a) - xor a - ld [$ffa9], a - ld a, [$ffaa] - cp $2 - jr nz, .asm_21a7 - ld a, $81 - ld [$ff02], a -.asm_21a7 - ld a, [$ffa9] - and a - jr nz, .asm_21f1 - ld a, [$ffaa] - cp $1 - jr nz, .asm_21cc - call Func_2237 - jr z, .asm_21cc - call Func_2231 - push hl - ld hl, wcc48 - inc [hl] - jr nz, .asm_21c3 - dec hl - inc [hl] -.asm_21c3 - pop hl - call Func_2237 - jr nz, .asm_21a7 - jp Func_223f -.asm_21cc - ld a, [rIE] ; $ffff - and $f - cp $8 - jr nz, .asm_21a7 - ld a, [W_NUMHITS] ; wd074 - dec a - ld [W_NUMHITS], a ; wd074 - jr nz, .asm_21a7 - ld a, [wd075] - dec a - ld [wd075], a - jr nz, .asm_21a7 - ld a, [$ffaa] - cp $1 - jr z, .asm_21f1 - ld a, $ff -.asm_21ee - dec a - jr nz, .asm_21ee -.asm_21f1 - xor a - ld [$ffa9], a - ld a, [rIE] ; $ffff - and $f - sub $8 - jr nz, .asm_2204 - ld [W_NUMHITS], a ; wd074 - ld a, $50 - ld [wd075], a -.asm_2204 - ld a, [$ffad] - cp $fe - ret nz - call Func_2237 - jr z, .asm_221f - push hl - ld hl, wcc48 - ld a, [hl] - dec a - ld [hld], a - inc a - jr nz, .asm_2219 - dec [hl] -.asm_2219 - pop hl - call Func_2237 - jr z, Func_223f -.asm_221f - ld a, [rIE] ; $ffff - and $f - cp $8 - ld a, $fe - ret z - ld a, [hl] - ld [$ffac], a - call DelayFrame - jp Func_219a - -Func_2231:: ; 2231 (0:2231) - ld a, $f -.asm_2233 - dec a - jr nz, .asm_2233 - ret - -Func_2237:: ; 2237 (0:2237) - push hl - ld hl, wcc47 - ld a, [hli] - or [hl] - pop hl - ret - -Func_223f:: ; 223f (0:223f) - dec a - ld [wcc47], a - ld [wcc48], a - ret - -Func_2247:: ; 2247 (0:2247) - ld hl, wcc42 - ld de, wcc3d - ld c, $2 - ld a, $1 - ld [$ffab], a -.asm_2253 - call DelayFrame - ld a, [hl] - ld [$ffac], a - call Func_219a - ld b, a - inc hl - ld a, [$ffab] - and a - ld a, $0 - ld [$ffab], a - jr nz, .asm_2253 - ld a, b - ld [de], a - inc de - dec c - jr nz, .asm_2253 - ret - -Func_226e:: ; 226e (0:226e) - call SaveScreenTilesToBuffer1 - callab PrintWaitingText - call Func_227f - jp LoadScreenTilesFromBuffer1 - -Func_227f:: ; 227f (0:227f) - ld a, $ff - ld [wcc3e], a -.asm_2284 - call Func_22c3 - call DelayFrame - call Func_2237 - jr z, .asm_22a0 - push hl - ld hl, wcc48 - dec [hl] - jr nz, .asm_229f - dec hl - dec [hl] - jr nz, .asm_229f - pop hl - xor a - jp Func_223f -.asm_229f - pop hl -.asm_22a0 - ld a, [wcc3e] - inc a - jr z, .asm_2284 - ld b, $a -.asm_22a8 - call DelayFrame - call Func_22c3 - dec b - jr nz, .asm_22a8 - ld b, $a -.asm_22b3 - call DelayFrame - call Func_22ed - dec b - jr nz, .asm_22b3 - ld a, [wcc3e] - ld [wcc3d], a - ret - -Func_22c3:: ; 22c3 (0:22c3) - call asm_22d7 - ld a, [wcc42] - add $60 - ld [$ffac], a - ld a, [$ffaa] - cp $2 - jr nz, asm_22d7 - ld a, $81 - ld [$ff02], a -asm_22d7:: ; 22d7 (0:22d7) - ld a, [$ffad] - ld [wcc3d], a - and $f0 - cp $60 - ret nz - xor a - ld [$ffad], a - ld a, [wcc3d] - and $f - ld [wcc3e], a - ret - -Func_22ed:: ; 22ed (0:22ed) - xor a - ld [$ffac], a - ld a, [$ffaa] - cp $2 - ret nz - ld a, $81 - ld [$ff02], a - ret - -Func_22fa:: ; 22fa (0:22fa) - ld a, $2 - ld [$ff01], a - xor a - ld [$ffad], a - ld a, $80 - ld [$ff02], a - ret - - -; timer interrupt is apparently not invoked anyway -Timer:: ; 2306 (0:2306) - reti - - +INCLUDE "home/serial.asm" +INCLUDE "home/timer.asm" INCLUDE "home/audio.asm" UpdateSprites:: ; 2429 (0:2429) - ld a, [wcfcb] + ld a, [wUpdateSpritesEnabled] dec a ret nz ld a, [H_LOADEDROMBANK] @@ -1594,18 +1059,18 @@ DisplayTextID:: ; 2920 (0:2920) ld l,a ; hl = map text pointer ld d,$00 ld a,[$ff8c] ; text ID - ld [wcf13],a + ld [wSpriteIndex],a and a jp z,DisplayStartMenu - cp a,$d3 ; safari game over + cp a,$d3 jp z,DisplaySafariGameOverText - cp a,$d0 ; fainted + cp a,$d0 jp z,DisplayPokemonFaintedText - cp a,$d1 ; blacked out + cp a,$d1 jp z,DisplayPlayerBlackedOutText - cp a,$d2 ; repel wore off + cp a,$d2 jp z,DisplayRepelWoreOffText - ld a,[W_NUMSPRITES] ; number of sprites + ld a,[W_NUMSPRITES] ld e,a ld a,[$ff8c] ; sprite ID cp e @@ -1616,7 +1081,7 @@ DisplayTextID:: ; 2920 (0:2920) push hl push de push bc - callba Func_13074 ; update the graphics of the sprite the player is talking to (to face the right direction) + 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 @@ -1665,7 +1130,7 @@ DisplayTextID:: ; 2920 (0:2920) jr AfterDisplayingTextID .notSpecialCase call Func_3c59 ; display the text - ld a,[wcc3c] + ld a,[wDoNotWaitForButtonPressAfterDisplayingText] and a jr nz,HoldTextDisplayOpen @@ -1686,7 +1151,7 @@ CloseTextDisplay:: ; 29e8 (0:29e8) ld a,[W_CURMAP] call SwitchToMapRomBank ld a,$90 - ld [$ffb0],a ; move the window off the screen + ld [hWY],a ; move the window off the screen call DelayFrame call LoadGBPal xor a @@ -1707,16 +1172,16 @@ CloseTextDisplay:: ; 29e8 (0:29e8) ld [H_LOADEDROMBANK],a ld [$2000],a call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns) - ld hl,wcfc4 + ld hl,wFontLoaded res 0,[hl] ld a,[wd732] - bit 3,a + bit 3,a ; used fly warp call z,LoadPlayerSpriteGraphics call LoadCurrentMapView pop af ld [H_LOADEDROMBANK],a ld [$2000],a - jp UpdateSprites ; move sprites + jp UpdateSprites DisplayPokemartDialogue:: ; 2a2e (0:2a2e) push hl @@ -1744,7 +1209,7 @@ PokemartGreetingText:: ; 2a55 (0:2a55) LoadItemList:: ; 2a5a (0:2a5a) ld a,$01 - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a ld a,h ld [wd128],a ld a,l @@ -1792,7 +1257,7 @@ DisplayPlayerBlackedOutText:: ; 2aa9 (0:2aa9) ld hl,PlayerBlackedOutText call PrintText ld a,[wd732] - res 5,a + res 5,a ; reset forced to use bike bit ld [wd732],a jp HoldTextDisplayOpen @@ -1849,8 +1314,8 @@ AddAmountSoldToMoney:: ; 2b9e (0:2b9e) ld hl,$ffa1 ; total price of items ld c,3 ; length of money in bytes predef AddBCDPredef ; add total price to money - ld a,$13 - ld [wd125],a + 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 @@ -1896,36 +1361,37 @@ AddItemToInventory:: ; 2bcf (0:2bcf) ; INPUT: ; [wListMenuID] = list menu ID -; [wcf8b] = address of the list (2 bytes) +; [wList] = address of the list (2 bytes) DisplayListMenuID:: ; 2be6 (0:2be6) xor a ld [H_AUTOBGTRANSFERENABLED],a ; disable auto-transfer ld a,1 - ld [$ffb7],a ; joypad state update flag + ld [hJoy7],a ; joypad state update flag ld a,[W_BATTLETYPE] 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(OldManItemList) + ld a, Bank(DisplayBattleMenu) .bankswitch call BankswitchHome ld hl,wd730 set 6,[hl] ; turn off letter printing delay xor a - ld [wcc35],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped ld [wd12a],a - ld a,[wcf8b] + ld a,[wList] ld l,a - ld a,[wcf8c] + ld a,[wList + 1] ld h,a ; hl = address of the list ld a,[hl] ld [wd12a],a ; [wd12a] = number of list entries - ld a,$0d ; list menu text box ID - ld [wd125],a + ld a,LIST_MENU_BOX + ld [wTextBoxID],a call DisplayTextBoxID ; draw the menu text box - call UpdateSprites ; move sprites + 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 ld a,[wListMenuID] @@ -1945,7 +1411,7 @@ DisplayListMenuID:: ; 2be6 (0:2be6) ld [wTopMenuItemY],a ld a,5 ld [wTopMenuItemX],a - ld a,%00000111 ; A button, B button, Select button + ld a,A_BUTTON | B_BUTTON | SELECT ld [wMenuWatchedKeys],a ld c,10 call DelayFrames @@ -2008,9 +1474,9 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) ; if it's an item menu sla c ; item entries are 2 bytes long, so multiply by 2 .skipMultiplying - ld a,[wcf8b] + ld a,[wList] ld l,a - ld a,[wcf8c] + ld a,[wList + 1] ld h,a inc hl ; hl = beginning of list entries ld b,0 @@ -2033,13 +1499,13 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) .skipGettingQuantity ld a,[wcf91] ld [wd0b5],a - ld a,$01 + ld a,BANK(ItemNames) ld [wPredefBank],a call GetName jr .storeChosenEntry .pokemonList ld hl,wPartyCount - ld a,[wcf8b] + ld a,[wList] cp l ; is it a list of party pokemon or box pokemon? ld hl,wPartyMonNicks jr z,.getPokemonName @@ -2055,7 +1521,7 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) ld a,[wCurrentMenuItem] ld [wd12d],a xor a - ld [$ffb7],a ; joypad state update flag + ld [hJoy7],a ; joypad state update flag ld hl,wd730 res 6,[hl] ; turn on letter printing delay jp BankswitchBack @@ -2195,11 +1661,11 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) jp .waitForKeyPressLoop .buttonAPressed ; the player chose to make the transaction xor a - ld [wcc35],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped ret .buttonBPressed ; the player chose to cancel the transaction xor a - ld [wcc35],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped ld a,$ff ret @@ -2216,12 +1682,12 @@ ExitListMenu:: ; 2e3b (0:2e3b) ld [wd12e],a ld [wcc37],a xor a - ld [$ffb7],a + ld [hJoy7],a ld hl,wd730 res 6,[hl] call BankswitchBack xor a - ld [wcc35],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped scf ret @@ -2230,9 +1696,9 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) ld b,$09 ld c,$0e call ClearScreenArea - ld a,[wcf8b] + ld a,[wList] ld e,a - ld a,[wcf8c] + ld a,[wList + 1] ld d,a inc de ; de = beginning of list entries ld a,[wListScrollOffset] @@ -2276,7 +1742,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) .pokemonPCMenu push hl ld hl,wPartyCount - ld a,[wcf8b] + ld a,[wList] cp l ; is it a list of party pokemon or box pokemon? ld hl,wPartyMonNicks jr z,.getPokemonName @@ -2321,7 +1787,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) push af push hl ld hl,wPartyCount - ld a,[wcf8b] + ld a,[wList] cp l ; is it a list of party pokemon or box pokemon? ld a,$00 jr z,.next @@ -2342,8 +1808,8 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) and a ; is it a list of party pokemon or box pokemon? jr z,.skipCopyingLevel .copyLevel - ld a,[wcf9b] - ld [wcfb9],a + ld a,[wLoadedMonBoxLevel] + ld [wLoadedMonLevel],a .skipCopyingLevel pop hl ld bc,$001c @@ -2369,7 +1835,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) ld bc,20 + 8 ; 1 row down and 8 columns right add hl,bc ld a,"×" - ldi [hl],a + ld [hli],a ld a,[wd11e] push af ld a,[de] @@ -2389,7 +1855,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) inc c push bc inc c - ld a,[wcc35] ; ID of item chosen for swapping (counts from 1) + ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) and a ; is an item being swapped? jr z,.nextListEntry sla a @@ -2454,7 +1920,7 @@ GetItemName:: ; 2fcf (0:2fcf) ld [wd0b5],a ld a,ITEM_NAME - ld [W_LISTTYPE],a + ld [wNameListType],a ld a,BANK(ItemNames) ld [wPredefBank],a call GetName @@ -2551,7 +2017,7 @@ HMMoves:: ; 3052 (0:3052) GetMoveName:: ; 3058 (0:3058) push hl ld a,MOVE_NAME - ld [W_LISTTYPE],a + ld [wNameListType],a ld a,[wd11e] ld [wd0b5],a ld a,BANK(MoveNames) @@ -2599,10 +2065,10 @@ ChooseFlyDestination:: ; 30a9 (0:30a9) ld hl, LoadTownMap_Fly jp Bankswitch -; causes the text box to close waithout waiting for a button press after displaying text +; causes the text box to close without waiting for a button press after displaying text DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6) ld a,$01 - ld [wcc3c],a + ld [wDoNotWaitForButtonPressAfterDisplayingText],a ret ; uses an item @@ -2659,7 +2125,7 @@ IsKeyItem:: ; 30d9 (0:30d9) ; function to draw various text boxes ; INPUT: -; [wd125] = text box ID +; [wTextBoxID] = text box ID DisplayTextBoxID:: ; 30e8 (0:30e8) ld a,[H_LOADEDROMBANK] push af @@ -2673,60 +2139,62 @@ DisplayTextBoxID:: ; 30e8 (0:30e8) ld [$2000],a ret -Func_30fd:: ; 30fd (0:30fd) - ld a, [wcc57] +; 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) + ld a, [wNPCMovementScriptPointerTableNum] and a ret nz ld a, [wd736] - bit 1, a + bit 1, a ; currently stepping down from door bit ret nz ld a, [wd730] and $80 ret -Func_310e:: ; 310e (0:310e) +RunNPCMovementScript:: ; 310e (0:310e) ld hl, wd736 bit 0, [hl] res 0, [hl] - jr nz, .asm_3146 - ld a, [wcc57] + jr nz, .playerStepOutFromDoor + ld a, [wNPCMovementScriptPointerTableNum] and a ret z dec a add a - ld d, $0 + ld d, 0 ld e, a - ld hl, .pointerTable_3140 + ld hl, .NPCMovementScriptPointerTables add hl, de ld a, [hli] ld h, [hl] ld l, a ld a, [H_LOADEDROMBANK] push af - ld a, [wcc58] + ld a, [wNPCMovementScriptBank] ld [H_LOADEDROMBANK], a ld [$2000], a - ld a, [wcf10] + ld a, [wNPCMovementScriptFunctionNum] call CallFunctionInTable pop af ld [H_LOADEDROMBANK], a ld [$2000], a ret -.pointerTable_3140 - dw PointerTable_1a442 - dw PointerTable_1a510 - dw PointerTable_1a57d -.asm_3146 - ld b, BANK(Func_1a3e0) - ld hl, Func_1a3e0 +.NPCMovementScriptPointerTables + dw ProfOakMovementScriptPointerTable + dw PewterMuseumGuyMovementScriptPointerTable + dw PewterGymGuyMovementScriptPointerTable +.playerStepOutFromDoor + ld b, BANK(PlayerStepOutFromDoor) + ld hl, PlayerStepOutFromDoor jp Bankswitch -Func_314e:: ; 314e (0:314e) - ld b, BANK(Func_1a41d) - ld hl, Func_1a41d +EndNPCMovementScript:: ; 314e (0:314e) + ld b, BANK(_EndNPCMovementScript) + ld hl, _EndNPCMovementScript jp Bankswitch -Func_3156:: ; 3156 (0:3156) +EmptyFunc2:: ; 3156 (0:3156) ret ; stores hl in [W_TRAINERHEADERPTR] @@ -2817,7 +2285,6 @@ ReadTrainerHeaderInfo:: ; 3193 (0:3193) TrainerFlagAction:: predef_jump FlagActionPredef -; direct talking to a trainer (rather than getting seen by one) TalkToTrainer:: ; 31cc (0:31cc) call StoreTrainerHeaderPointer xor a @@ -2844,25 +2311,26 @@ TalkToTrainer:: ; 31cc (0:31cc) ld a, $8 call ReadTrainerHeaderInfo ; read end battle text pop de - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld hl, W_FLAGS_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 being engaged by another trainer + 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 - inc [hl] ; progress map script index (assuming it was 0 before) to start pre-battle routines - jp Func_325d + 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) call CheckForEngagingTrainers - ld a, [wcf13] + ld a, [wSpriteIndex] cp $ff jr nz, .trainerEngaging xor a - ld [wcf13], a + ld [wSpriteIndex], a ld [wTrainerHeaderFlagBit], a ret .trainerEngaging @@ -2878,19 +2346,21 @@ CheckFightingMapTrainers:: ; 3219 (0:3219) ldh [$b4], a call TrainerWalkUpToPlayer_Bank0 ld hl, W_CURMAPSCRIPT - inc [hl] ; progress to battle phase 1 (engaging) + inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle) ret -Func_324c:: ; 324c (0:324c) +; display the before battle text after the enemy trainer has walked up to the player's sprite +DisplayEnemyTrainerTextAndStartBattle:: ; 324c (0:324c) ld a, [wd730] and $1 - ret nz + ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite ld [wJoyIgnore], a - ld a, [wcf13] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld a, [wSpriteIndex] + ld [hSpriteIndexOrTextID], a call DisplayTextID + ; fall through -Func_325d:: ; 325d (0:325d) +StartTrainerBattle:: ; 325d (0:325d) xor a ld [wJoyIgnore], a call InitBattleEnemyParameters @@ -2900,7 +2370,7 @@ Func_325d:: ; 325d (0:325d) ld hl, wd72e set 1, [hl] ld hl, W_CURMAPSCRIPT - inc [hl] ; progress to battle phase 2 (battling) + inc [hl] ; increment map script index (next script function is usually EndTrainerBattle) ret EndTrainerBattle:: ; 3275 (0:3275) @@ -2925,7 +2395,7 @@ EndTrainerBattle:: ; 3275 (0:3275) jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite) ld hl, W_MISSABLEOBJECTLIST ld de, $2 - ld a, [wcf13] + ld a, [wSpriteIndex] call IsInArray ; search for sprite ID inc hl ld a, [hl] @@ -2966,22 +2436,22 @@ InitBattleEnemyParameters:: ; 32d7 (0:32d7) ld [W_CURENEMYLVL], a ; W_CURENEMYLVL ret -Func_32ef:: ; 32ef (0:32ef) - ld hl, Func_567f9 +GetSpritePosition1:: ; 32ef (0:32ef) + ld hl, _GetSpritePosition1 jr asm_3301 -Func_32f4:: ; 32f4 (0:32f4) - ld hl, Func_56819 +GetSpritePosition2:: ; 32f4 (0:32f4) + ld hl, _GetSpritePosition2 jr asm_3301 ; 0x32f7 $8 -Func_32f9:: ; 32f9 (0:32f9) - ld hl, Func_5683d +SetSpritePosition1:: ; 32f9 (0:32f9) + ld hl, _SetSpritePosition1 jr asm_3301 -Func_32fe:: ; 32fe (0:32fe) - ld hl, Func_5685d +SetSpritePosition2:: ; 32fe (0:32fe) + ld hl, _SetSpritePosition2 asm_3301:: ; 3301 (0:3301) - ld b, BANK(Func_567f9) ; BANK(Func_56819), BANK(Func_5683d), BANK(Func_5685d) + ld b, BANK(_GetSpritePosition1) ; BANK(_GetSpritePosition2), BANK(_SetSpritePosition1), BANK(_SetSpritePosition2) jp Bankswitch ; indirect jump to one of the four functions CheckForEngagingTrainers:: ; 3306 (0:3306) @@ -2992,7 +2462,7 @@ CheckForEngagingTrainers:: ; 3306 (0:3306) .trainerLoop call StoreTrainerHeaderPointer ; set trainer header pointer to current trainer ld a, [de] - ld [wcf13], a ; store trainer flag's bit + ld [wSpriteIndex], a ; store trainer flag's bit ld [wTrainerHeaderFlagBit], a cp $ff ret z @@ -3014,7 +2484,7 @@ CheckForEngagingTrainers:: ; 3306 (0:3306) ld a, [hl] ; read trainer engage distance pop hl ld [wTrainerEngageDistance], a - ld a, [wcf13] + ld a, [wSpriteIndex] swap a ld [wTrainerSpriteOffset], a ; wWhichTrade predef TrainerEngage @@ -3030,26 +2500,27 @@ CheckForEngagingTrainers:: ; 3306 (0:3306) ld e, l jr .trainerLoop -; saves loaded rom bank and hl as well as de registers -PreBattleSaveRegisters:: ; 3354 (0:3354) +; hl = text if the player wins +; de = text if the player loses +SaveEndBattleTextPointers:: ; 3354 (0:3354) ld a, [H_LOADEDROMBANK] - ld [W_PBSTOREDROMBANK], a + ld [wEndBattleTextRomBank], a ld a, h - ld [W_PBSTOREDREGISTERH], a + ld [wEndBattleWinTextPointer], a ld a, l - ld [W_PBSTOREDREGISTERL], a + ld [wEndBattleWinTextPointer + 1], a ld a, d - ld [W_PBSTOREDREGISTERD], a + ld [wEndBattleLoseTextPointer], a ld a, e - ld [W_PBSTOREDREGISTERE], a + ld [wEndBattleLoseTextPointer + 1], a ret ; loads data of some trainer on the current map and plays pre-battle music -; [wcf13]: sprite ID of trainer who is engaged +; [wSpriteIndex]: sprite ID of trainer who is engaged EngageMapTrainer:: ; 336a (0:336a) ld hl, W_MAPSPRITEEXTRADATA ld d, $0 - ld a, [wcf13] + ld a, [wSpriteIndex] dec a add a ld e, a @@ -3060,7 +2531,7 @@ EngageMapTrainer:: ; 336a (0:336a) ld [wEnemyMonAttackMod], a ; wcd2e jp PlayTrainerMusic -Func_3381:: ; 3381 (0:3381) +PrintEndBattleText:: ; 3381 (0:3381) push hl ld hl, wd72d bit 7, [hl] @@ -3069,45 +2540,45 @@ Func_3381:: ; 3381 (0:3381) ret z ld a, [H_LOADEDROMBANK] push af - ld a, [W_PBSTOREDROMBANK] + ld a, [wEndBattleTextRomBank] ld [H_LOADEDROMBANK], a - ld [$2000], a + ld [MBC1RomBank], a push hl callba SaveTrainerName - ld hl, TrainerNameText + ld hl, TrainerEndBattleText call PrintText pop hl pop af ld [H_LOADEDROMBANK], a - ld [$2000], a - callba Func_1a5e7 + ld [MBC1RomBank], a + callba FreezeEnemyTrainerSprite jp WaitForSoundToFinish -Func_33b7:: ; 33b7 (0:33b7) - ld a, [wcf0b] +GetSavedEndBattleTextPointer:: ; 33b7 (0:33b7) + ld a, [wBattleResult] and a - jr nz, .asm_33c6 - ld a, [W_PBSTOREDREGISTERH] +; won battle + jr nz, .lostBattle + ld a, [wEndBattleWinTextPointer] ld h, a - ld a, [W_PBSTOREDREGISTERL] + ld a, [wEndBattleWinTextPointer + 1] ld l, a ret -.asm_33c6 - ld a, [W_PBSTOREDREGISTERD] +.lostBattle + ld a, [wEndBattleLoseTextPointer] ld h, a - ld a, [W_PBSTOREDREGISTERE] + ld a, [wEndBattleLoseTextPointer + 1] ld l, a ret -TrainerNameText:: ; 33cf (0:33cf) +TrainerEndBattleText:: ; 33cf (0:33cf) TX_FAR _TrainerNameText db $08 - -Func_33d4:: ; 33d4 (0:33d4) - call Func_33b7 + call GetSavedEndBattleTextPointer call TextCommandProcessor jp TextScriptEnd +; XXX unused? Func_33dd:: ; 33dd (0:33dd) ld a, [wFlags_0xcd60] bit 0, a @@ -3163,29 +2634,33 @@ PlayTrainerMusic:: ; 33e8 (0:33e8) INCLUDE "data/trainer_types.asm" -Func_3442:: ; 3442 (0:3442) +; checks if the player's coordinates match an arrow movement tile's coordinates +; and if so, decodes the RLE movement data +; b = player Y +; c = player X +DecodeArrowMovementRLE:: ; 3442 (0:3442) ld a, [hli] cp $ff - ret z + ret z ; no match in the list cp b - jr nz, .asm_345b + jr nz, .nextArrowMovementTileEntry1 ld a, [hli] cp c - jr nz, .asm_345c + jr nz, .nextArrowMovementTileEntry2 ld a, [hli] ld d, [hl] ld e, a - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd call DecodeRLEList dec a - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ret -.asm_345b +.nextArrowMovementTileEntry1 inc hl -.asm_345c +.nextArrowMovementTileEntry2 inc hl inc hl - jr Func_3442 + jr DecodeArrowMovementRLE FuncTX_ItemStoragePC:: ; 3460 (0:3460) call SaveScreenTilesToBuffer2 @@ -3195,8 +2670,8 @@ FuncTX_ItemStoragePC:: ; 3460 (0:3460) FuncTX_BillsPC:: ; 346a (0:346a) call SaveScreenTilesToBuffer2 - ld b, BANK(Func_214c2) - ld hl, Func_214c2 + ld b, BANK(BillsPC_) + ld hl, BillsPC_ jr bankswitchAndContinue FuncTX_SlotMachine:: ; 3474 (0:3474) @@ -3213,10 +2688,10 @@ FuncTX_PokemonCenterPC:: ; 347f (0:347f) ld hl, ActivatePC jr bankswitchAndContinue -Func_3486:: ; 3486 (0:3486) +StartSimulatingJoypadStates:: ; 3486 (0:3486) xor a - ld [wcd3b], a - ld [wSpriteStateData2 + $06], a + ld [wOverrideSimulatedJoypadStatesMask], a + ld [wSpriteStateData2 + $06], a ; player's sprite movement byte 1 ld hl, wd730 set 7, [hl] ret @@ -3226,7 +2701,7 @@ IsItemInBag:: ; 3493 (0:3493) ; 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 IsItemInBag_ ld a,b and a ret @@ -3237,21 +2712,21 @@ DisplayPokedex:: ; 349b (0:349b) ld hl, Func_7c18 jp Bankswitch -Func_34a6:: ; 34a6 (0:34a6) - call Func_34ae +SetSpriteFacingDirectionAndDelay:: ; 34a6 (0:34a6) + call SetSpriteFacingDirection ld c, $6 jp DelayFrames -Func_34ae:: ; 34ae (0:34ae) +SetSpriteFacingDirection:: ; 34ae (0:34ae) ld a, $9 - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b - call Func_34fc + ld [H_SPRITEDATAOFFSET], a + call GetPointerWithinSpriteStateData1 ld a, [$ff8d] ld [hl], a ret -Func_34b9:: ; 34b9 (0:34b9) - ld de, $fff9 +SetSpriteImageIndexAfterSettingFacingDirection:: ; 34b9 (0:34b9) + ld de, -7 add hl, de ld [hl], a ret @@ -3299,14 +2774,14 @@ CheckCoords:: ; 34c7 (0:34c7) ; tests if a boulder's coordinates are in a specified array ; INPUT: ; hl = address of array -; ff8c = which boulder to check? XXX +; [H_SPRITEINDEX] = index of boulder sprite ; OUTPUT: ; [wWhichTrade] = 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) push hl ld hl, wSpriteStateData2 + $04 - ld a, [$ff8c] + ld a, [H_SPRITEINDEX] swap a ld d, $0 ld e, a @@ -3320,16 +2795,17 @@ CheckBoulderCoords:: ; 34e4 (0:34e4) pop hl jp CheckCoords -Func_34fc:: ; 34fc (0:34fc) +GetPointerWithinSpriteStateData1:: ; 34fc (0:34fc) ld h, $c1 - jr asm_3502 + jr _GetPointerWithinSpriteStateData -Func_3500:: ; 3500 (0:3500) +GetPointerWithinSpriteStateData2:: ; 3500 (0:3500) ld h, $c2 -asm_3502:: ; 3502 (0:3502) - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b + +_GetPointerWithinSpriteStateData: + ld a, [H_SPRITEDATAOFFSET] ld b, a - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c + ld a, [H_SPRITEINDEX] swap a add b ld l, a @@ -3390,7 +2866,7 @@ SetSpriteMovementBytesToFF:: ; 3541 (0:3541) ; returns the sprite movement byte 1 pointer for sprite [$FF8C] in hl GetSpriteMovementByte1Pointer:: ; 354e (0:354e) ld h,$C2 - ld a,[$FF8C] ; the sprite to move + ld a,[H_SPRITEINDEX] ; the sprite to move swap a add a,6 ld l,a @@ -3411,7 +2887,7 @@ GetSpriteMovementByte2Pointer:: ; 3558 (0:3558) GetTrainerInformation:: ; 3566 (0:3566) call GetTrainerName - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE + ld a, [wLinkState] and a jr nz, .linkBattle ld a, Bank(TrainerPicAndMoneyPointers) @@ -3509,35 +2985,35 @@ YesNoChoice:: ; 35ec (0:35ec) jr DisplayYesNoChoice Func_35f4:: ; 35f4 (0:35f4) - ld a, $14 - ld [wd125], a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call InitYesNoTextBoxParameters jp DisplayTextBoxID InitYesNoTextBoxParameters:: ; 35ff (0:35ff) - xor a - ld [wd12c], a + xor a ; YES_NO_MENU + ld [wTwoOptionMenuID], a hlCoord 14, 7 ld bc, $80f ret YesNoChoicePokeCenter:: ; 360a (0:360a) call SaveScreenTilesToBuffer1 - ld a, $6 - ld [wd12c], a + ld a, HEAL_CANCEL_MENU + ld [wTwoOptionMenuID], a hlCoord 11, 6 ld bc, $80c jr DisplayYesNoChoice Func_361a:: ; 361a (0:361a) call SaveScreenTilesToBuffer1 - ld a, $3 - ld [wd12c], a + ld a, WIDE_YES_NO_MENU + ld [wTwoOptionMenuID], a hlCoord 12, 7 ld bc, $080d DisplayYesNoChoice:: ; 3628 (0:3628) - ld a, $14 - ld [wd125], a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID jp LoadScreenTilesFromBuffer1 @@ -3579,92 +3055,91 @@ MoveSprite_:: ; 363d (0:363d) set 0,[hl] pop hl xor a - ld [wcd3b],a - ld [wccd3],a + ld [wOverrideSimulatedJoypadStatesMask],a + ld [wSimulatedJoypadStatesEnd],a dec a ld [wJoyIgnore],a - ld [wcd3a],a + ld [wWastedByteCD3A],a ret -Func_366b:: ; 366b (0:366b) +; divides [$ffe5] by [$ffe6] and stores the quotient in [$ffe7] +DivideBytes:: ; 366b (0:366b) push hl ld hl, $ffe7 xor a ld [hld], a ld a, [hld] and a - jr z, .asm_367e + jr z, .done ld a, [hli] -.asm_3676 +.loop sub [hl] - jr c, .asm_367e + jr c, .done inc hl inc [hl] dec hl - jr .asm_3676 -.asm_367e + jr .loop +.done pop hl ret -; copies the tile patterns for letters and numbers into VRAM -LoadFontTilePatterns:: ; 3680 (0:3680) - ld a,[rLCDC] - bit 7,a ; is the LCD enabled? - jr nz,.lcdEnabled -.lcdDisabled - ld hl,FontGraphics - ld de,vFont - ld bc,$400 - ld a,BANK(FontGraphics) + +LoadFontTilePatterns:: + ld a, [rLCDC] + bit 7, a ; is the LCD enabled? + jr nz, .on +.off + ld hl, FontGraphics + ld de, vFont + ld bc, $400 + ld a, BANK(FontGraphics) jp FarCopyDataDouble ; if LCD is off, transfer all at once -.lcdEnabled - ld de,FontGraphics - ld hl,vFont - ld bc,(BANK(FontGraphics) << 8 | $80) +.on + ld de, FontGraphics + ld hl, vFont + ld bc, BANK(FontGraphics) << 8 | $80 jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank -; copies the text box tile patterns into VRAM -LoadTextBoxTilePatterns:: ; 36a0 (0:36a0) - ld a,[rLCDC] - bit 7,a ; is the LCD enabled? - jr nz,.lcdEnabled -.lcdDisabled - ld hl,TextBoxGraphics - ld de,vChars2 + $600 - ld bc,$200 - ld a,BANK(TextBoxGraphics) +LoadTextBoxTilePatterns:: + ld a, [rLCDC] + bit 7, a ; is the LCD enabled? + jr nz, .on +.off + ld hl, TextBoxGraphics + ld de, vChars2 + $600 + ld bc, $200 + ld a, BANK(TextBoxGraphics) jp FarCopyData2 ; if LCD is off, transfer all at once -.lcdEnabled - ld de,TextBoxGraphics - ld hl,vChars2 + $600 - ld bc,(BANK(TextBoxGraphics) << 8 | $20) +.on + ld de, TextBoxGraphics + ld hl, vChars2 + $600 + ld bc, BANK(TextBoxGraphics) << 8 | $20 jp CopyVideoData ; if LCD is on, transfer during V-blank -; copies HP bar and status display tile patterns into VRAM -LoadHpBarAndStatusTilePatterns:: ; 36c0 (0:36c0) - ld a,[rLCDC] - bit 7,a ; is the LCD enabled? - jr nz,.lcdEnabled -.lcdDisabled - ld hl,HpBarAndStatusGraphics - ld de,vChars2 + $620 - ld bc,$1e0 - ld a,BANK(HpBarAndStatusGraphics) +LoadHpBarAndStatusTilePatterns:: + ld a, [rLCDC] + bit 7, a ; is the LCD enabled? + jr nz, .on +.off + ld hl, HpBarAndStatusGraphics + ld de, vChars2 + $620 + ld bc, $1e0 + ld a, BANK(HpBarAndStatusGraphics) jp FarCopyData2 ; if LCD is off, transfer all at once -.lcdEnabled - ld de,HpBarAndStatusGraphics - ld hl,vChars2 + $620 - ld bc,(BANK(HpBarAndStatusGraphics) << 8 | $1e) +.on + ld de, HpBarAndStatusGraphics + ld hl, vChars2 + $620 + ld bc, BANK(HpBarAndStatusGraphics) << 8 | $1e jp CopyVideoData ; if LCD is on, transfer during V-blank -;Fills memory range with the specified byte. -;input registers a = fill_byte, bc = length, hl = address -FillMemory:: ; 36e0 (0:36e0) + +FillMemory:: +; Fill bc bytes at hl with a. push de ld d, a .loop ld a, d - ldi [hl], a + ld [hli], a dec bc ld a, b or c @@ -3672,15 +3147,16 @@ FillMemory:: ; 36e0 (0:36e0) pop de ret -; loads sprite that de points to -; bank of sprite is given in a + UncompressSpriteFromDE:: ; 36eb (0:36eb) +; Decompress pic at a:de. ld hl, W_SPRITEINPUTPTR ld [hl], e inc hl ld [hl], d jp UncompressSpriteData + SaveScreenTilesToBuffer2:: ; 36f4 (0:36f4) ld hl, wTileMap ld de, wTileMapBackup2 @@ -3765,16 +3241,16 @@ NamePointers:: ; 375d (0:375d) GetName:: ; 376b (0:376b) ; arguments: ; [wd0b5] = which name -; [wd0b6] = which list (W_LISTTYPE) +; [wNameListType] = which list ; [wPredefBank] = bank of list ; ; returns pointer to name in de - ld a, [W_LISTTYPE] ; added check for list type + ld a, [wNameListType] ; added check for list type cp a, ITEM_NAME ; compare to move list ld a,[wd0b5] ld [wd11e],a jr nz, .nonMachine ; SHOULD skip the HM check if in move names - cp a,$C4 ;it's TM/HM + cp HM_01 ;it's TM/HM jp nc,GetMachineName .nonMachine ; Return here if not an item ld a,[H_LOADEDROMBANK] @@ -3782,7 +3258,7 @@ GetName:: ; 376b (0:376b) push hl push bc push de - ld a,[W_LISTTYPE] ;List3759_entrySelector + ld a,[wNameListType] ;List3759_entrySelector dec a jr nz,.otherEntries ;1 = MON_NAMES @@ -3797,7 +3273,7 @@ GetName:: ; 376b (0:376b) ld a,[wPredefBank] ld [H_LOADEDROMBANK],a ld [$2000],a - ld a,[W_LISTTYPE] ;VariousNames' entryID + ld a,[wNameListType] ;VariousNames' entryID dec a add a ld d,0 @@ -3848,23 +3324,25 @@ GetName:: ; 376b (0:376b) ret GetItemPrice:: ; 37df (0:37df) +; Stores item's price as BCD at hItemPrice (3 bytes) +; Input: [wcf91] = item id ld a, [H_LOADEDROMBANK] push af - ld a, [wListMenuID] ; wListMenuID - cp $1 - ld a, $1 ; hardcoded Bank + ld a, [wListMenuID] + cp MOVESLISTMENU + ld a, BANK(ItemPrices) jr nz, .asm_37ed ld a, $f ; hardcoded Bank .asm_37ed ld [H_LOADEDROMBANK], a ld [$2000], a - ld hl, wcf8f + ld hl, wItemPrices ld a, [hli] ld h, [hl] ld l, a - ld a, [wcf91] + ld a, [wcf91] ; a contains item id cp HM_01 - jr nc, .asm_3812 + jr nc, .getTMPrice ld bc, $3 .asm_3802 add hl, bc @@ -3872,19 +3350,19 @@ GetItemPrice:: ; 37df (0:37df) jr nz, .asm_3802 dec hl ld a, [hld] - ld [$ff8d], a + ld [hItemPrice + 2], a ld a, [hld] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hItemPrice + 1], a ld a, [hl] - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [hItemPrice], a jr .asm_381c -.asm_3812 +.getTMPrice ld a, Bank(GetMachinePrice) ld [H_LOADEDROMBANK], a ld [$2000], a call GetMachinePrice .asm_381c - ld de, H_DOWNARROWBLINKCNT1 ; $ff8b + ld de, hItemPrice pop af ld [H_LOADEDROMBANK], a ld [$2000], a @@ -3905,29 +3383,29 @@ CopyString:: ; 3829 (0:3829) ret ; this function is used when lower button sensitivity is wanted (e.g. menus) -; OUTPUT: [$ffb5] = pressed buttons in usual format -; there are two flags that control its functionality, [$ffb6] and [$ffb7] +; OUTPUT: [hJoy5] = pressed buttons in usual format +; there are two flags that control its functionality, [hJoy6] and [hJoy7] ; there are esentially three modes of operation ; 1. Get newly pressed buttons only -; ([$ffb7] == 0, [$ffb6] == any) -; Just copies [hJoyPressed] to [$ffb5]. +; ([hJoy7] == 0, [hJoy6] == any) +; Just copies [hJoyPressed] to [hJoy5]. ; 2. Get currently pressed buttons at low sample rate with delay -; ([$ffb7] == 1, [$ffb6] != 0) +; ([hJoy7] == 1, [hJoy6] != 0) ; If the user holds down buttons for more than half a second, ; report buttons as being pressed up to 12 times per second thereafter. ; If the user holds down buttons for less than half a second, ; report only one button press. ; 3. Same as 2, but report no buttons as pressed if A or B is held down. -; ([$ffb7] == 1, [$ffb6] == 0) +; ([hJoy7] == 1, [hJoy6] == 0) JoypadLowSensitivity:: ; 3831 (0:3831) call Joypad - ld a,[$ffb7] ; flag + ld a,[hJoy7] ; flag and a ; get all currently pressed buttons or only newly pressed buttons? ld a,[hJoyPressed] ; newly pressed buttons jr z,.storeButtonState ld a,[hJoyHeld] ; all currently pressed buttons .storeButtonState - ld [$ffb5],a + ld [hJoy5],a ld a,[hJoyPressed] ; newly pressed buttons and a ; have any buttons been newly pressed since last check? jr z,.noNewlyPressedButtons @@ -3941,57 +3419,57 @@ JoypadLowSensitivity:: ; 3831 (0:3831) jr z,.delayOver .delayNotOver xor a - ld [$ffb5],a ; report no buttons as pressed + ld [hJoy5],a ; report no buttons as pressed ret .delayOver -; if [$ffb6] = 0 and A or B is pressed, report no buttons as pressed +; if [hJoy6] = 0 and A or B is pressed, report no buttons as pressed ld a,[hJoyHeld] - and a,%00000011 ; A and B buttons + and A_BUTTON | B_BUTTON jr z,.setShortDelay - ld a,[$ffb6] ; flag + ld a,[hJoy6] ; flag and a jr nz,.setShortDelay xor a - ld [$ffb5],a + ld [hJoy5],a .setShortDelay ld a,5 ; 1/12 of a second delay ld [H_FRAMECOUNTER],a ret WaitForTextScrollButtonPress:: ; 3865 (0:3865) - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b + ld a, [H_DOWNARROWBLINKCNT1] push af - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c + ld a, [H_DOWNARROWBLINKCNT2] push af xor a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [H_DOWNARROWBLINKCNT1], a ld a, $6 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c -.asm_3872 + ld [H_DOWNARROWBLINKCNT2], a +.loop push hl - ld a, [wd09b] + ld a, [wTownMapSpriteBlinkingEnabled] and a - jr z, .asm_387c - call Func_716c6 -.asm_387c + jr z, .skipAnimation + call TownMapSpriteBlinkingAnimation +.skipAnimation hlCoord 18, 16 call HandleDownArrowBlinkTiming pop hl call JoypadLowSensitivity - predef Func_5a5f - ld a, [$ffb5] + predef CableClub_Run + ld a, [hJoy5] and A_BUTTON | B_BUTTON - jr z, .asm_3872 + jr z, .loop pop af - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_DOWNARROWBLINKCNT2], a pop af - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [H_DOWNARROWBLINKCNT1], a ret -; (unlass in link battle) waits for A or B being pressed and outputs the scrolling sound effect +; (unless in link battle) waits for A or B being pressed and outputs the scrolling sound effect ManualTextScroll:: ; 3898 (0:3898) - ld a, [W_ISLINKBATTLE] ; W_ISLINKBATTLE - cp $4 + ld a, [wLinkState] + cp LINK_STATE_BATTLING jr z, .inLinkBattle call WaitForTextScrollButtonPress ld a, (SFX_02_40 - SFX_Headers_02) / 3 @@ -4059,7 +3537,7 @@ PrintLetterDelay:: ; 38d3 (0:38d3) bit 0,a jr z,.waitOneFrame ld a,[W_OPTIONS] - and a,$0f + and $f ld [H_FRAMECOUNTER],a jr .checkButtons .waitOneFrame @@ -4446,7 +3924,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) .getJoypadState pop hl call JoypadLowSensitivity - ld a,[$ffb5] + ld a,[hJoy5] and a ; was a key pressed? jr nz,.keyPressed push hl @@ -4469,7 +3947,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) .keyPressed xor a ld [wcc4b],a - ld a,[$ffb5] + ld a,[hJoy5] ld b,a bit 6,a ; pressed Up key? jr z,.checkIfDownPressed @@ -4511,8 +3989,8 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) and b ; does the menu care about any of the pressed keys? jp z,.loop1 .checkIfAButtonOrBButtonPressed - ld a,[$ffb5] - and a,%00000011 ; pressed A button or B button? + ld a,[hJoy5] + and A_BUTTON | B_BUTTON jr z,.skipPlayingSound .AButtonOrBButtonPressed push hl @@ -4529,7 +4007,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) ld [H_DOWNARROWBLINKCNT1],a ; restore previous values xor a ld [wMenuWrappingEnabled],a ; disable menu wrapping - ld a,[$ffb5] + ld a,[hJoy5] ret .noWrappingAround ld a,[wcc37] @@ -4542,14 +4020,14 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c) and a ; is the y coordinate 0? jr z,.adjustForXCoord ld hl,wTileMap - ld bc,20 ; screen width + ld bc,SCREEN_WIDTH .topMenuItemLoop add hl,bc dec a jr nz,.topMenuItemLoop .adjustForXCoord ld a,[wTopMenuItemX] - ld b,$00 + ld b,0 ld c,a add hl,bc push hl @@ -4557,7 +4035,7 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c) and a ; was the previous menu id 0? jr z,.checkForArrow1 push af - ld a,[$fff6] + ld a,[hFlags_0xFFF6] bit 1,a ; is the menu double spaced? jr z,.doubleSpaced1 ld bc,20 @@ -4583,7 +4061,7 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c) and a jr z,.checkForArrow2 push af - ld a,[$fff6] + ld a,[hFlags_0xFFF6] bit 1,a ; is the menu double spaced? jr z,.doubleSpaced2 ld bc,20 @@ -4696,16 +4174,16 @@ DisableAutoTextBoxDrawing:: ; 3c3f (0:3c3f) ld a,$01 AutoTextBoxDrawingCommon:: ; 3c41 (0:3c41) - ld [wcf0c],a ; control text box drawing + ld [wAutoTextBoxDrawingControl],a xor a - ld [wcc3c],a ; make DisplayTextID wait for button press + ld [wDoNotWaitForButtonPressAfterDisplayingText],a ; make DisplayTextID wait for button press ret PrintText:: ; 3c49 (0:3c49) -; given a pointer in hl, print the text there +; Print text hl at (1, 14). push hl - ld a,1 - ld [wd125],a + ld a,MESSAGE_BOX + ld [wTextBoxID],a call DisplayTextBoxID call UpdateSprites call Delay3 @@ -4714,256 +4192,244 @@ Func_3c59:: ; 3c59 (0:3c59) bcCoord 1, 14 jp TextCommandProcessor -; converts a big-endian binary number into decimal and prints it -; INPUT: -; b = flags and number of bytes -; bit 7: if set, print leading zeroes -; if unset, do not print leading zeroes -; bit 6: if set, left-align the string (do not pad empty digits with spaces) -; if unset, right-align the string -; bits 4-5: unused -; bits 0-3: number of bytes (only 1 - 3 bytes supported) -; c = number of decimal digits -; de = address of the number (big-endian) -PrintNumber:: ; 3c5f (0:3c5f) + +PrintNumber:: ; 3c5f +; 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 - ld [H_NUMTOPRINT],a - ld [H_NUMTOPRINT + 1],a - ld a,b - and a,%00001111 - cp a,1 - jr z,.oneByte - cp a,2 - jr z,.twoBytes -.threeBytes - ld a,[de] - ld [H_NUMTOPRINT],a + ld [H_PASTLEADINGZEROES], a + ld [H_NUMTOPRINT], a + ld [H_NUMTOPRINT + 1], a + ld a, b + and $f + cp 1 + jr z, .byte + cp 2 + jr z, .word +.long + ld a, [de] + ld [H_NUMTOPRINT], a inc de - ld a,[de] - ld [H_NUMTOPRINT + 1],a + ld a, [de] + ld [H_NUMTOPRINT + 1], a inc de - ld a,[de] - ld [H_NUMTOPRINT + 2],a - jr .checkNumDigits -.twoBytes - ld a,[de] - ld [H_NUMTOPRINT + 1],a + ld a, [de] + ld [H_NUMTOPRINT + 2], a + jr .start + +.word + ld a, [de] + ld [H_NUMTOPRINT + 1], a inc de - ld a,[de] - ld [H_NUMTOPRINT + 2],a - jr .checkNumDigits -.oneByte - ld a,[de] - ld [H_NUMTOPRINT + 2],a -.checkNumDigits + ld a, [de] + ld [H_NUMTOPRINT + 2], a + jr .start + +.byte + ld a, [de] + ld [H_NUMTOPRINT + 2], a + +.start push de - ld d,b - ld a,c - ld b,a - xor a - ld c,a - ld a,b ; a = number of decimal digits - cp a,2 - jr z,.tensPlace - cp a,3 - jr z,.hundredsPlace - cp a,4 - jr z,.thousandsPlace - cp a,5 - jr z,.tenThousandsPlace - cp a,6 - jr z,.hundredThousandsPlace -.millionsPlace - ld a,1000000 >> 16 - ld [H_POWEROFTEN],a - ld a,(1000000 >> 8) & $FF - ld [H_POWEROFTEN + 1],a - ld a,1000000 & $FF - ld [H_POWEROFTEN + 2],a - call PrintNumber_PrintDigit - call PrintNumber_AdvancePointer -.hundredThousandsPlace - ld a,100000 >> 16 - ld [H_POWEROFTEN],a - ld a,(100000 >> 8) & $FF - ld [H_POWEROFTEN + 1],a - ld a,100000 & $FF - ld [H_POWEROFTEN + 2],a - call PrintNumber_PrintDigit - call PrintNumber_AdvancePointer -.tenThousandsPlace - xor a - ld [H_POWEROFTEN],a - ld a,10000 >> 8 - ld [H_POWEROFTEN + 1],a - ld a,10000 & $FF - ld [H_POWEROFTEN + 2],a - call PrintNumber_PrintDigit - call PrintNumber_AdvancePointer -.thousandsPlace - xor a - ld [H_POWEROFTEN],a - ld a,1000 >> 8 - ld [H_POWEROFTEN + 1],a - ld a,1000 & $FF - ld [H_POWEROFTEN + 2],a - call PrintNumber_PrintDigit - call PrintNumber_AdvancePointer -.hundredsPlace - xor a - ld [H_POWEROFTEN],a + + ld d, b + ld a, c + ld b, a xor a - ld [H_POWEROFTEN + 1],a - ld a,100 - ld [H_POWEROFTEN + 2],a - call PrintNumber_PrintDigit - call PrintNumber_AdvancePointer -.tensPlace - ld c,00 - ld a,[H_NUMTOPRINT + 2] -.loop - cp a,10 - jr c,.underflow - sub a,10 + ld c, a + ld a, b + + cp 2 + jr z, .tens + cp 3 + jr z, .hundreds + cp 4 + jr z, .thousands + cp 5 + jr z, .ten_thousands + cp 6 + jr z, .hundred_thousands + +print_digit: macro + +if (\1) / $10000 + ld a, \1 / $10000 % $100 +else xor a +endc + ld [H_POWEROFTEN + 0], a + +if (\1) / $100 + ld a, \1 / $100 % $100 +else xor a +endc + ld [H_POWEROFTEN + 1], a + + ld a, \1 / $1 % $100 + ld [H_POWEROFTEN + 2], a + + call .PrintDigit + call .NextDigit +endm + +.millions print_digit 1000000 +.hundred_thousands print_digit 100000 +.ten_thousands print_digit 10000 +.thousands print_digit 1000 +.hundreds print_digit 100 + +.tens + ld c, 0 + ld a, [H_NUMTOPRINT + 2] +.mod + cp 10 + jr c, .ok + sub 10 inc c - jr .loop -.underflow - ld b,a - ld a,[H_PASTLEADINGZEROES] + jr .mod +.ok + + ld b, a + ld a, [H_PASTLEADINGZEROES] or c - ld [H_PASTLEADINGZEROES],a - jr nz,.pastLeadingZeroes - call PrintNumber_PrintLeadingZero - jr .advancePointer -.pastLeadingZeroes - ld a,"0" + ld [H_PASTLEADINGZEROES], a + jr nz, .past + call .PrintLeadingZero + jr .next +.past + ld a, "0" add c - ld [hl],a -.advancePointer - call PrintNumber_AdvancePointer -.onesPlace - ld a,"0" + ld [hl], a +.next + + call .NextDigit +.ones + ld a, "0" add b - ld [hli],a + ld [hli], a pop de dec de pop bc ret -; prints a decimal digit -; This works by repeatedely subtracting a power of ten until the number becomes negative. -; The number of subtractions it took in order to make the number negative is the digit for the current number place. -; The last value that the number had before becoming negative is kept as the new value of the number. -; A more succinct description is that the number is divided by a power of ten -; and the quotient becomes the digit while the remainder is stored as the new value of the number. -PrintNumber_PrintDigit:: ; 3d25 (0:3d25) - ld c,0 ; counts number of loop iterations to determine the decimal digit +.PrintDigit: +; Divide by the current decimal place. +; Print the quotient, and keep the modulus. + ld c, 0 .loop - ld a,[H_POWEROFTEN] - ld b,a - ld a,[H_NUMTOPRINT] - ld [H_SAVEDNUMTOPRINT],a + ld a, [H_POWEROFTEN] + ld b, a + ld a, [H_NUMTOPRINT] + ld [H_SAVEDNUMTOPRINT], a cp b - jr c,.underflow0 + jr c, .underflow0 sub b - ld [H_NUMTOPRINT],a - ld a,[H_POWEROFTEN + 1] - ld b,a - ld a,[H_NUMTOPRINT + 1] - ld [H_SAVEDNUMTOPRINT + 1],a + ld [H_NUMTOPRINT], a + ld a, [H_POWEROFTEN + 1] + ld b, a + ld a, [H_NUMTOPRINT + 1] + ld [H_SAVEDNUMTOPRINT + 1], a cp b - jr nc,.noBorrowForByte1 -.byte1BorrowFromByte0 - ld a,[H_NUMTOPRINT] - or a,0 - jr z,.underflow1 + jr nc, .noborrow1 + + ld a, [H_NUMTOPRINT] + or 0 + jr z, .underflow1 dec a - ld [H_NUMTOPRINT],a - ld a,[H_NUMTOPRINT + 1] -.noBorrowForByte1 + ld [H_NUMTOPRINT], a + ld a, [H_NUMTOPRINT + 1] +.noborrow1 + sub b - ld [H_NUMTOPRINT + 1],a - ld a,[H_POWEROFTEN + 2] - ld b,a - ld a,[H_NUMTOPRINT + 2] - ld [H_SAVEDNUMTOPRINT + 2],a + ld [H_NUMTOPRINT + 1], a + ld a, [H_POWEROFTEN + 2] + ld b, a + ld a, [H_NUMTOPRINT + 2] + ld [H_SAVEDNUMTOPRINT + 2], a cp b - jr nc,.noBorrowForByte2 -.byte2BorrowFromByte1 - ld a,[H_NUMTOPRINT + 1] + jr nc, .noborrow2 + + ld a, [H_NUMTOPRINT + 1] and a - jr nz,.finishByte2BorrowFromByte1 -.byte2BorrowFromByte0 - ld a,[H_NUMTOPRINT] + jr nz, .borrowed + + ld a, [H_NUMTOPRINT] and a - jr z,.underflow2 + jr z, .underflow2 dec a - ld [H_NUMTOPRINT],a + ld [H_NUMTOPRINT], a xor a -.finishByte2BorrowFromByte1 +.borrowed + dec a - ld [H_NUMTOPRINT + 1],a - ld a,[H_NUMTOPRINT + 2] -.noBorrowForByte2 + ld [H_NUMTOPRINT + 1], a + ld a, [H_NUMTOPRINT + 2] +.noborrow2 sub b - ld [H_NUMTOPRINT + 2],a + ld [H_NUMTOPRINT + 2], a inc c jr .loop + .underflow2 - ld a,[H_SAVEDNUMTOPRINT + 1] - ld [H_NUMTOPRINT + 1],a + ld a, [H_SAVEDNUMTOPRINT + 1] + ld [H_NUMTOPRINT + 1], a .underflow1 - ld a,[H_SAVEDNUMTOPRINT] - ld [H_NUMTOPRINT],a + ld a, [H_SAVEDNUMTOPRINT] + ld [H_NUMTOPRINT], a .underflow0 - ld a,[H_PASTLEADINGZEROES] + ld a, [H_PASTLEADINGZEROES] or c - jr z,PrintNumber_PrintLeadingZero - ld a,"0" + jr z, .PrintLeadingZero + + ld a, "0" add c - ld [hl],a - ld [H_PASTLEADINGZEROES],a + ld [hl], a + ld [H_PASTLEADINGZEROES], a ret -; prints a leading zero unless they are turned off in the flags -PrintNumber_PrintLeadingZero:: ; 3d83 (0:3d83) - bit 7,d ; print leading zeroes? +.PrintLeadingZero: + bit LEADING_ZEROES, d ret z - ld [hl],"0" - ret - -; increments the pointer unless leading zeroes are not being printed, -; the number is left-aligned, and no nonzero digits have been printed yet -PrintNumber_AdvancePointer:: ; 3d89 (0:3d89) - bit 7,d ; print leading zeroes? - jr nz,.incrementPointer - bit 6,d ; left alignment or right alignment? - jr z,.incrementPointer - ld a,[H_PASTLEADINGZEROES] + ld [hl], "0" + ret + +.NextDigit: +; Increment unless the number is left-aligned, +; leading zeroes are not printed, and no digits +; have been printed yet. + bit LEADING_ZEROES, d + jr nz, .inc + bit LEFT_ALIGN, d + jr z, .inc + ld a, [H_PASTLEADINGZEROES] and a ret z -.incrementPointer +.inc inc hl ret -; calls a function from a table of function pointers -; INPUT: -; a = index within table -; hl = address of function pointer table -CallFunctionInTable:: ; 3d97 (0:3d97) + +CallFunctionInTable:: +JumpTable:: +; Call function a in jumptable hl. +; de is not preserved. push hl push de push bc add a - ld d,0 - ld e,a - add hl,de - ld a,[hli] - ld h,[hl] - ld l,a - ld de,.returnAddress + ld d, 0 + ld e, a + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .returnAddress push de jp [hl] .returnAddress @@ -5000,11 +4466,11 @@ IsInRestOfArray:: ret -Func_3dbe:: ; 3dbe (0:3dbe) +RestoreScreenTilesAndReloadTilePatterns:: ; 3dbe (0:3dbe) call ClearSprites ld a, $1 - ld [wcfcb], a - call Func_3e08 + ld [wUpdateSpritesEnabled], a + call ReloadMapSpriteTilePatterns call LoadScreenTilesFromBuffer2 call LoadTextBoxTilePatterns call GoPAL_SET_CF1C @@ -5040,7 +4506,7 @@ GBPalWhiteOut:: GoPAL_SET_CF1C:: ; 3ded (0:3ded) ld b,$ff GoPAL_SET:: ; 3def (0:3def) - ld a,[wcf1b] + ld a,[wOnSGB] and a ret z predef_jump Func_71ddf @@ -5060,14 +4526,16 @@ GetHealthBarColor:: ld [hl], d ret -Func_3e08:: ; 3e08 (0:3e08) - ld hl, wcfc4 +; Copy the current map's sprites' tile patterns to VRAM again after they have +; been overwritten by other tile patterns. +ReloadMapSpriteTilePatterns:: ; 3e08 (0:3e08) + ld hl, wFontLoaded ld a, [hl] push af res 0, [hl] push hl xor a - ld [W_SPRITESETID], a ; W_SPRITESETID + ld [W_SPRITESETID], a call DisableLCD callba InitMapSprites call EnableLCD @@ -5116,7 +4584,7 @@ Random:: push de push bc callba Random_ - ld a,[hRandomAdd] + ld a, [hRandomAdd] pop bc pop de pop hl @@ -5131,133 +4599,134 @@ Func_3ead:: ; 3ead (0:3ead) ld hl, CinnabarGymQuiz_1eb0a jp Bankswitch -Func_3eb5:: ; 3eb5 (0:3eb5) +CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ; 3eb5 (0:3eb5) ld a, [H_LOADEDROMBANK] push af ld a, [hJoyHeld] - bit 0, a - jr z, .asm_3eea - ld a, Bank(Func_469a0) - ld [$2000], a + bit 0, a ; A button + jr z, .nothingFound +; A button is pressed + ld a, Bank(CheckForHiddenObject) + ld [MBC1RomBank], a ld [H_LOADEDROMBANK], a - call Func_469a0 + call CheckForHiddenObject ld a, [$ffee] and a - jr nz, .asm_3edd - ld a, [wTrainerEngageDistance] - ld [$2000], a + jr nz, .hiddenObjectNotFound + ld a, [wHiddenObjectFunctionRomBank] + ld [MBC1RomBank], a ld [H_LOADEDROMBANK], a - ld de, .asm_3eda + ld de, .returnAddress push de jp [hl] -.asm_3eda +.returnAddress xor a - jr .asm_3eec -.asm_3edd + jr .done +.hiddenObjectNotFound callba PrintBookshelfText ld a, [$ffdb] and a - jr z, .asm_3eec -.asm_3eea + jr z, .done +.nothingFound ld a, $ff -.asm_3eec +.done ld [$ffeb], a pop af - ld [$2000], a + ld [MBC1RomBank], a ld [H_LOADEDROMBANK], a ret PrintPredefTextID:: ; 3ef5 (0:3ef5) ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - ld hl, PointerTable_3f22 - call Func_3f0f + ld hl, TextPredefs + call SetMapTextPointer ld hl, wcf11 set 0, [hl] call DisplayTextID -Func_3f05:: ; 3f05 (0:3f05) - ld hl, W_MAPTEXTPTR ; wd36c +RestoreMapTextPointer:: ; 3f05 (0:3f05) + ld hl, W_MAPTEXTPTR ld a, [$ffec] ld [hli], a - ld a, [$ffed] + ld a, [$ffec + 1] ld [hl], a ret -Func_3f0f:: ; 3f0f (0:3f0f) - ld a, [W_MAPTEXTPTR] ; wd36c +SetMapTextPointer:: ; 3f0f (0:3f0f) + ld a, [W_MAPTEXTPTR] ld [$ffec], a ld a, [W_MAPTEXTPTR + 1] - ld [$ffed], a + ld [$ffec + 1], a ld a, l - ld [W_MAPTEXTPTR], a ; wd36c + ld [W_MAPTEXTPTR], a ld a, h ld [W_MAPTEXTPTR + 1], a ret -PointerTable_3f22:: ; 3f22 (0:3f22) - dw CardKeySuccessText ; id = 01 - dw CardKeyFailText ; id = 02 - dw RedBedroomPC ; id = 03 - dw RedBedroomSNESText ; id = 04 - dw PushStartText ; id = 05 - dw SaveOptionText ; id = 06 - dw StrengthsAndWeaknessesText ; id = 07 - dw OakLabEmailText ; id = 08 - dw AerodactylFossilText ; id = 09 - dw Route15UpstairsBinocularsText ; id = 0A - dw KabutopsFossilText ; id = 0B - dw GymStatueText1 ; id = 0C - dw GymStatueText2 ; id = 0D - dw BookcaseText ; id = 0E - dw ViridianCityPokecenterBenchGuyText ; id = 0F - dw PewterCityPokecenterBenchGuyText ; id = 10 - dw CeruleanCityPokecenterBenchGuyText ; id = 11 - dw LavenderCityPokecenterBenchGuyText ; id = 12 - dw VermilionCityPokecenterBenchGuyText ; id = 13 - dw CeladonCityPokecenterBenchGuyText ; id = 14 - dw CeladonCityHotelText ; id = 15 - dw FuchsiaCityPokecenterBenchGuyText ; id = 16 - dw CinnabarIslandPokecenterBenchGuyText ; id = 17 - dw SaffronCityPokecenterBenchGuyText ; id = 18 - dw MtMoonPokecenterBenchGuyText ; id = 19 - dw RockTunnelPokecenterBenchGuyText ; id = 1A - dw UnusedBenchGuyText1 ; id = 1B - dw UnusedBenchGuyText2 ; id = 1C - dw UnusedBenchGuyText3 ; id = 1D - dw TerminatorText_62508 ; id = 1E - dw PredefText1f ; id = 1F - dw ViridianSchoolNotebook ; id = 20 - dw ViridianSchoolBlackboard ; id = 21 - dw JustAMomentText ; id = 22 - dw PredefText23 ; id = 23 - dw FoundHiddenItemText ; id = 24 - dw HiddenItemBagFullText ; id = 25 - dw VermilionGymTrashText ; id = 26 - dw IndigoPlateauHQText ; id = 27 - dw GameCornerOutOfOrderText ; id = 28 - dw GameCornerOutToLunchText ; id = 29 - dw GameCornerSomeonesKeysText ; id = 2A - dw FoundHiddenCoinsText ; id = 2B - dw DroppedHiddenCoinsText ; id = 2C - dw BillsHouseMonitorText ; id = 2D - dw BillsHouseInitiatedText ; id = 2E - dw BillsHousePokemonList ; id = 2F - dw MagazinesText ; id = 30 - dw CinnabarGymQuiz ; id = 31 - dw GameCornerNoCoinsText ; id = 32 - dw GameCornerCoinCaseText ; id = 33 - dw LinkCableHelp ; id = 34 - dw TMNotebook ; id = 35 - dw FightingDojoText ; id = 36 - dw FightingDojoText_52a10 ; id = 37 - dw FightingDojoText_52a1d ; id = 38 - dw NewBicycleText ; id = 39 - dw IndigoPlateauStatues ; id = 3A - dw VermilionGymTrashSuccesText1 ; id = 3B - dw VermilionGymTrashSuccesText2 ; id = 3C - dw VermilionGymTrashSuccesText3 ; id = 3D - dw VermilionGymTrashFailText ; id = 3E - dw TownMapText ; id = 3F - dw BookOrSculptureText ; id = 40 - dw ElevatorText ; id = 41 - dw PokemonStuffText ; id = 42 +TextPredefs:: + add_tx_pre CardKeySuccessText ; 01 + add_tx_pre CardKeyFailText ; 02 + add_tx_pre RedBedroomPC ; 03 + add_tx_pre RedBedroomSNESText ; 04 + add_tx_pre PushStartText ; 05 + add_tx_pre SaveOptionText ; 06 + add_tx_pre StrengthsAndWeaknessesText ; 07 + add_tx_pre OakLabEmailText ; 08 + add_tx_pre AerodactylFossilText ; 09 + add_tx_pre Route15UpstairsBinocularsText ; 0A + add_tx_pre KabutopsFossilText ; 0B + add_tx_pre GymStatueText1 ; 0C + add_tx_pre GymStatueText2 ; 0D + add_tx_pre BookcaseText ; 0E + add_tx_pre ViridianCityPokecenterBenchGuyText ; 0F + add_tx_pre PewterCityPokecenterBenchGuyText ; 10 + add_tx_pre CeruleanCityPokecenterBenchGuyText ; 11 + add_tx_pre LavenderCityPokecenterBenchGuyText ; 12 + add_tx_pre VermilionCityPokecenterBenchGuyText ; 13 + add_tx_pre CeladonCityPokecenterBenchGuyText ; 14 + add_tx_pre CeladonCityHotelText ; 15 + add_tx_pre FuchsiaCityPokecenterBenchGuyText ; 16 + add_tx_pre CinnabarIslandPokecenterBenchGuyText ; 17 + 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 ViridianSchoolNotebook ; 20 + add_tx_pre ViridianSchoolBlackboard ; 21 + add_tx_pre JustAMomentText ; 22 + add_tx_pre PredefText23 ; 23 + add_tx_pre FoundHiddenItemText ; 24 + add_tx_pre HiddenItemBagFullText ; 25 + add_tx_pre VermilionGymTrashText ; 26 + add_tx_pre IndigoPlateauHQText ; 27 + add_tx_pre GameCornerOutOfOrderText ; 28 + add_tx_pre GameCornerOutToLunchText ; 29 + add_tx_pre GameCornerSomeonesKeysText ; 2A + add_tx_pre FoundHiddenCoinsText ; 2B + add_tx_pre DroppedHiddenCoinsText ; 2C + add_tx_pre BillsHouseMonitorText ; 2D + add_tx_pre BillsHouseInitiatedText ; 2E + add_tx_pre BillsHousePokemonList ; 2F + add_tx_pre MagazinesText ; 30 + add_tx_pre CinnabarGymQuiz ; 31 + add_tx_pre GameCornerNoCoinsText ; 32 + add_tx_pre GameCornerCoinCaseText ; 33 + 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 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 VermilionGymTrashFailText ; 3E + add_tx_pre TownMapText ; 3F + add_tx_pre BookOrSculptureText ; 40 + add_tx_pre ElevatorText ; 41 + add_tx_pre PokemonStuffText ; 42 diff --git a/home/audio.asm b/home/audio.asm index fa62cc8a8f..9210924c2d 100755 --- a/home/audio.asm +++ b/home/audio.asm @@ -1,4 +1,4 @@ -Func_2307:: ; 2307 (0:2307) +PlayDefaultMusic:: ; 2307 (0:2307) call WaitForSoundToFinish xor a ld c, a @@ -17,7 +17,7 @@ Func_2312:: ; 2312 (0:2312) ld c, $8 ld d, c asm_2324:: ; 2324 (0:2324) - ld a, [wd700] + ld a, [wWalkBikeSurfState] and a jr z, .asm_2343 cp $2 diff --git a/home/copy.asm b/home/copy.asm new file mode 100644 index 0000000000..be9c8c0ca5 --- /dev/null +++ b/home/copy.asm @@ -0,0 +1,24 @@ +FarCopyData:: +; Copy bc bytes from a:hl to de. + ld [wBuffer], a + ld a, [H_LOADEDROMBANK] + push af + ld a, [wBuffer] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + call CopyData + pop af + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ret + +CopyData:: +; Copy bc bytes from hl to de. + ld a, [hli] + ld [de], a + inc de + dec bc + ld a, c + or b + jr nz, CopyData + ret diff --git a/home/copy2.asm b/home/copy2.asm new file mode 100644 index 0000000000..7b407cdcba --- /dev/null +++ b/home/copy2.asm @@ -0,0 +1,228 @@ +FarCopyData2:: +; Identical to FarCopyData, but uses $ff8b +; as temp space instead of wBuffer. + ld [$ff8b],a + ld a,[H_LOADEDROMBANK] + push af + ld a,[$ff8b] + ld [H_LOADEDROMBANK],a + ld [MBC1RomBank],a + call CopyData + pop af + ld [H_LOADEDROMBANK],a + ld [MBC1RomBank],a + ret + +FarCopyData3:: +; Copy bc bytes from a:de to hl. + ld [$ff8b],a + ld a,[H_LOADEDROMBANK] + push af + ld a,[$ff8b] + ld [H_LOADEDROMBANK],a + ld [MBC1RomBank],a + push hl + push de + push de + ld d,h + ld e,l + pop hl + call CopyData + pop de + pop hl + pop af + ld [H_LOADEDROMBANK],a + ld [MBC1RomBank],a + ret + +FarCopyDataDouble:: +; Expand bc bytes of 1bpp image data +; from a:hl to 2bpp data at de. + ld [$ff8b],a + ld a,[H_LOADEDROMBANK] + push af + ld a,[$ff8b] + ld [H_LOADEDROMBANK],a + ld [MBC1RomBank],a +.loop + ld a,[hli] + ld [de],a + inc de + ld [de],a + inc de + dec bc + ld a,c + or b + jr nz,.loop + pop af + ld [H_LOADEDROMBANK],a + ld [MBC1RomBank],a + ret + +CopyVideoData:: +; Wait for the next VBlank, then copy c 2bpp +; tiles from b:de to hl, 8 tiles at a time. +; This takes c/8 frames. + + ld a, [H_AUTOBGTRANSFERENABLED] + push af + xor a ; disable auto-transfer while copying + ld [H_AUTOBGTRANSFERENABLED], a + + ld a, [H_LOADEDROMBANK] + ld [$ff8b], a + + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + + ld a, e + ld [H_VBCOPYSRC], a + ld a, d + ld [H_VBCOPYSRC + 1], a + + ld a, l + ld [H_VBCOPYDEST], a + ld a, h + ld [H_VBCOPYDEST + 1], a + +.loop + ld a, c + cp 8 + jr nc, .keepgoing + +.done + ld [H_VBCOPYSIZE], a + call DelayFrame + ld a, [$ff8b] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + pop af + ld [H_AUTOBGTRANSFERENABLED], a + ret + +.keepgoing + ld a, 8 + ld [H_VBCOPYSIZE], a + call DelayFrame + ld a, c + sub 8 + ld c, a + jr .loop + +CopyVideoDataDouble:: +; Wait for the next VBlank, then copy c 1bpp +; tiles from b:de to hl, 8 tiles at a time. +; This takes c/8 frames. + ld a, [H_AUTOBGTRANSFERENABLED] + push af + xor a ; disable auto-transfer while copying + ld [H_AUTOBGTRANSFERENABLED], a + ld a, [H_LOADEDROMBANK] + ld [$ff8b], a + + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + + ld a, e + ld [H_VBCOPYDOUBLESRC], a + ld a, d + ld [H_VBCOPYDOUBLESRC + 1], a + + ld a, l + ld [H_VBCOPYDOUBLEDEST], a + ld a, h + ld [H_VBCOPYDOUBLEDEST + 1], a + +.loop + ld a, c + cp 8 + jr nc, .keepgoing + +.done + ld [H_VBCOPYDOUBLESIZE], a + call DelayFrame + ld a, [$ff8b] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + pop af + ld [H_AUTOBGTRANSFERENABLED], a + ret + +.keepgoing + ld a, 8 + ld [H_VBCOPYDOUBLESIZE], a + call DelayFrame + ld a, c + sub 8 + ld c, a + jr .loop + +ClearScreenArea:: +; Clear tilemap area cxb at hl. + ld a, $7f ; blank tile + ld de, 20 ; screen width +.y + push hl + push bc +.x + ld [hli], a + dec c + jr nz, .x + pop bc + pop hl + add hl, de + dec b + jr nz, .y + ret + +CopyScreenTileBufferToVRAM:: +; Copy wTileMap to the BG Map starting at b * $100. +; This is done in thirds of 6 rows, so it takes 3 frames. + + ld c, 6 + + ld hl, $600 * 0 + ld de, wTileMap + 20 * 6 * 0 + call .setup + call DelayFrame + + ld hl, $600 * 1 + ld de, wTileMap + 20 * 6 * 1 + call .setup + call DelayFrame + + ld hl, $600 * 2 + ld de, wTileMap + 20 * 6 * 2 + call .setup + jp DelayFrame + +.setup + ld a, d + ld [H_VBCOPYBGSRC+1], a + call GetRowColAddressBgMap + ld a, l + ld [H_VBCOPYBGDEST], a + ld a, h + ld [H_VBCOPYBGDEST+1], a + ld a, c + ld [H_VBCOPYBGNUMROWS], a + ld a, e + ld [H_VBCOPYBGSRC], a + ret + +ClearScreen:: +; Clear wTileMap, then wait +; for the bg map to update. + ld bc, 20 * 18 + inc b + ld hl, wTileMap + ld a, $7f +.loop + ld [hli], a + dec c + jr nz, .loop + dec b + jr nz, .loop + jp Delay3 diff --git a/home/fade.asm b/home/fade.asm index 9b55eaf285..08e087b4b0 100755 --- 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, [wd35d] ;tells if cur.map is dark (requires HM5_FLASH?) + ld a, [wMapPalOffset] ;tells if cur.map is dark (requires HM5_FLASH?) ld b, a ld hl, FadePal4 ld a, l @@ -18,16 +18,16 @@ LoadGBPal:: ld [rOBP1], a ret -GBFadeOut1:: +GBFadeInFromBlack:: ld hl, FadePal1 ld b, 4 - jr GBFadeOutCommon + jr GBFadeIncCommon -GBFadeOut2:: +GBFadeOutToWhite:: ld hl, FadePal6 ld b, 3 -GBFadeOutCommon:: +GBFadeIncCommon: ld a, [hli] ld [rBGP], a ld a, [hli] @@ -37,19 +37,19 @@ GBFadeOutCommon:: ld c, 8 call DelayFrames dec b - jr nz, GBFadeOutCommon + jr nz, GBFadeIncCommon ret -GBFadeIn1:: +GBFadeOutToBlack:: ld hl, FadePal4 + 2 ld b, 4 - jr GBFadeInCommon + jr GBFadeDecCommon -GBFadeIn2:: +GBFadeInFromWhite:: ld hl, FadePal7 + 2 ld b, 3 -GBFadeInCommon:: +GBFadeDecCommon: ld a, [hld] ld [rOBP1], a ld a, [hld] @@ -59,7 +59,7 @@ GBFadeInCommon:: ld c, 8 call DelayFrames dec b - jr nz, GBFadeInCommon + jr nz, GBFadeDecCommon ret FadePal1:: db %11111111, %11111111, %11111111 diff --git a/home/init.asm b/home/init.asm index b79b19d9e5..cc89ad34b1 100755 --- a/home/init.asm +++ b/home/init.asm @@ -25,8 +25,8 @@ rLCDC_DEFAULT EQU %11100011 ld [rIE], a ld [$ff43], a ld [$ff42], a - ld [$ff01], a - ld [$ff02], a + ld [rSB], a + ld [rSC], a ld [$ff4b], a ld [$ff4a], a ld [$ff06], a @@ -61,26 +61,26 @@ rLCDC_DEFAULT EQU %11100011 ld a, Bank(WriteDMACodeToHRAM) ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a + ld [MBC1RomBank], a call WriteDMACodeToHRAM xor a - ld [$ffd7], a + ld [hTilesetType], a ld [$ff41], a - ld [$ffae], a - ld [$ffaf], a + ld [hSCX], a + ld [hSCY], a ld [$ff0f], a ld a, 1 << VBLANK + 1 << TIMER + 1 << SERIAL ld [rIE], a ld a, 144 ; move the window off-screen - ld [$ffb0], a + ld [hWY], a ld [rWY], a ld a, 7 ld [rWX], a - ld a, $ff - ld [$ffaa], a + ld a, CONNECTION_NOT_ESTABLISHED + ld [hSerialConnectionStatus], a ld h, vBGMap0 / $100 call ClearBgMap @@ -105,7 +105,7 @@ rLCDC_DEFAULT EQU %11100011 xor a ld [$ffbc], a dec a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a predef PlayIntro diff --git a/home/overworld.asm b/home/overworld.asm index 6bf3f24d96..5c3d01f6e3 100755 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -10,26 +10,26 @@ EnterMap:: ld a, $ff ld [wJoyIgnore], a call LoadMapData - callba Func_c335 ; initialize map variables + callba ClearVariablesAfterLoadingMapData ld hl, wd72c - bit 0, [hl] - jr z, .doNotCountSteps - ld a, 3 - ld [wd13c], a ; some kind of step counter (counts up to 3 steps?) -.doNotCountSteps + bit 0, [hl] ; has the player already made 3 steps since the last battle? + jr z, .skipGivingThreeStepsOfNoRandomBattles + ld a, 3 ; minimum number of steps between battles + ld [wNumberOfNoRandomBattleStepsLeft], a +.skipGivingThreeStepsOfNoRandomBattles ld hl, wd72e bit 5, [hl] ; did a battle happen immediately before this? res 5, [hl] ; unset the "battle just happened" flag - call z, Func_12e7 + call z, ResetUsingStrengthOutOfBattleBit call nz, MapEntryAfterBattle ld hl, wd732 ld a, [hl] - and 1 << 4 | 1 << 3 - jr z, .didNotFlyOrTeleportIn + and 1 << 4 | 1 << 3 ; fly warp or dungeon warp + jr z, .didNotEnterUsingFlyWarpOrDungeonWarp res 3, [hl] - callba Func_70510 ; display fly/teleport in graphical effect + callba EnterMapAnim call UpdateSprites -.didNotFlyOrTeleportIn +.didNotEnterUsingFlyWarpOrDungeonWarp callba CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road ld hl, wd72d res 5, [hl] @@ -53,7 +53,7 @@ OverworldLoopLessDelay:: jp nz,.moveAhead ; if the player sprite has not yet completed the walking animation call JoypadOverworld ; get joypad state (which is possibly simulated) callba SafariZoneCheck - ld a,[wda46] + ld a,[wSafariZoneGameOver] and a jp nz,WarpFound2 ld hl,wd72d @@ -61,8 +61,8 @@ OverworldLoopLessDelay:: res 3,[hl] jp nz,WarpFound2 ld a,[wd732] - and a,$18 - jp nz,HandleFlyOrTeleportAway + and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp + jp nz,HandleFlyWarpOrDungeonWarp ld a,[W_CUROPPONENT] and a jp nz,.newBattle @@ -78,7 +78,7 @@ OverworldLoopLessDelay:: jr z,.startButtonNotPressed ; if START is pressed xor a - ld [$ff8c],a ; the $2920 ID for the start menu is 0 + ld [hSpriteIndexOrTextID],a ; start menu text ID jp .displayDialogue .startButtonNotPressed bit 0,a ; A button @@ -87,19 +87,19 @@ OverworldLoopLessDelay:: ld a,[wd730] bit 2,a jp nz,.noDirectionButtonsPressed - call Func_30fd + call IsPlayerCharacterBeingControlledByGame jr nz,.checkForOpponent - call Func_3eb5 ; check for hidden items, PC's, etc. + call CheckForHiddenObjectOrBookshelfOrCardKeyDoor ld a,[$ffeb] and a - jp z,OverworldLoop - call IsSpriteOrSignInFrontOfPlayer ; check for sign or sprite in front of the player - ld a,[$ff8c] ; $2920 ID for NPC/sign text, if any + jp z,OverworldLoop ; jump if a hidden object or bookshelf was found, but not if a card key door was found + call IsSpriteOrSignInFrontOfPlayer + ld a,[hSpriteIndexOrTextID] and a jp z,OverworldLoop .displayDialogue - predef Func_c586 ; check what is in front of the player - call UpdateSprites ; move sprites + predef GetTileAndCoordsInFrontOfPlayer + call UpdateSprites ld a,[wFlags_0xcd60] bit 2,a jr nz,.checkForOpponent @@ -117,8 +117,8 @@ OverworldLoopLessDelay:: jr z,.changeMap predef LoadSAV ld a,[W_CURMAP] - ld [wd71a],a - call Func_62ce + ld [wDestinationMap],a + call SpecialWarpIn ld a,[W_CURMAP] call SwitchToMapRomBank ; switch to the ROM bank of the current map ld hl,W_CURMAPTILESET @@ -133,7 +133,7 @@ OverworldLoopLessDelay:: .noDirectionButtonsPressed ld hl,wFlags_0xcd60 res 2,[hl] - call UpdateSprites ; move sprites + call UpdateSprites ld a,$01 ld [wcc4b],a ld a,[wd528] ; the direction that was pressed last time @@ -225,18 +225,20 @@ OverworldLoopLessDelay:: .noDirectionChange ld a,[wd52a] ; current direction ld [wd528],a ; save direction - call UpdateSprites ; move sprites - ld a,[wd700] + call UpdateSprites + ld a,[wWalkBikeSurfState] cp a,$02 ; surfing jr z,.surfing ; not surfing call CollisionCheckOnLand jr nc,.noCollision +; collision occurred push hl ld hl,wd736 - bit 2,[hl] + bit 2,[hl] ; standing on warp flag pop hl jp z,OverworldLoop +; collision occurred while standing on a warp push hl call ExtraWarpCheck ; sets carry if there is a potential to warp pop hl @@ -259,7 +261,7 @@ OverworldLoopLessDelay:: .moveAhead2 ld hl,wFlags_0xcd60 res 2,[hl] - ld a,[wd700] + ld a,[wWalkBikeSurfState] dec a ; riding a bike? jr nz,.normalPlayerSpriteAdvancement ld a,[wd736] @@ -283,36 +285,36 @@ OverworldLoopLessDelay:: bit 7,a jr nz,.doneStepCounting ; if button presses are being simulated, don't count steps ; step counting - ld hl,wd13b ; step counter + ld hl,wStepCounter dec [hl] ld a,[wd72c] bit 0,a jr z,.doneStepCounting - ld hl,wd13c + ld hl,wNumberOfNoRandomBattleStepsLeft dec [hl] jr nz,.doneStepCounting ld hl,wd72c - res 0,[hl] + 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? jr z,.notSafariZone callba SafariZoneCheckSteps - ld a,[wda46] + ld a,[wSafariZoneGameOver] and a jp nz,WarpFound2 .notSafariZone ld a,[W_ISINBATTLE] and a jp nz,CheckWarpsNoCollision - predef Func_c69c ; decrement HP of poisoned pokemon + predef ApplyOutOfBattlePoisonDamage ; also increment daycare mon exp ld a,[wd12d] and a jp nz,HandleBlackOut ; if all pokemon fainted .newBattle call NewBattle ld hl,wd736 - res 2,[hl] + res 2,[hl] ; standing on warp flag jp nc,CheckWarpsNoCollision ; check for warps if there was no battle .battleOccurred ld hl,wd72d @@ -323,7 +325,7 @@ OverworldLoopLessDelay:: set 5,[hl] set 6,[hl] xor a - ld [hJoyHeld],a ; clear joypad state + ld [hJoyHeld],a ld a,[W_CURMAP] cp a,CINNABAR_GYM jr nz,.notCinnabarGym @@ -334,8 +336,8 @@ OverworldLoopLessDelay:: set 5,[hl] ld a,[W_CURMAP] cp a,OAKS_LAB - jp z,.noFaintCheck - callab AnyPartyAlive ; check if all the player's pokemon fainted + 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 @@ -355,45 +357,45 @@ NewBattle:: ; 0683 (0:0683) ld a,[wd72d] bit 4,a jr nz,.noBattle - call Func_30fd - jr nz,.noBattle + call IsPlayerCharacterBeingControlledByGame + jr nz,.noBattle ; no battle if the player character is under the game's control ld a,[wd72e] bit 4,a jr nz,.noBattle ld b, BANK(InitBattle) ld hl, InitBattle - jp Bankswitch ; determines if a battle will occur and runs the battle if so + jp Bankswitch .noBattle and a ret ; function to make bikes twice as fast as walking BikeSpeedup:: ; 06a0 (0:06a0) - ld a,[wcc57] + ld a,[wNPCMovementScriptPointerTableNum] and a ret nz ld a,[W_CURMAP] cp a,ROUTE_17 ; Cycling Road jr nz,.goFaster - ld a,[hJoyHeld] ; current joypad state - and a,%01110000 ; bit mask for up, left, right buttons + ld a,[hJoyHeld] + and a,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) - ld a,[wd3ae] ; number of warps + ld a,[wNumberOfWarps] and a jp z,CheckMapConnections - ld a,[wd3ae] ; number of warps - ld b,$00 + ld a,[wNumberOfWarps] + ld b,0 ld c,a ld a,[W_YCOORD] ld d,a ld a,[W_XCOORD] ld e,a - ld hl,wd3af ; start of warp entries + ld hl,wWarpEntries CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc) ld a,[hli] ; check if the warp's Y position matches cp d @@ -405,14 +407,14 @@ CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc) push hl push bc ld hl,wd736 - set 2,[hl] - callba Func_c49d ; check if the player sprite is standing on a "door" tile + set 2,[hl] ; standing on warp flag + callba IsPlayerStandingOnDoorTileOrWarpTile pop bc pop hl - jr c,WarpFound1 ; if it is, go to 0735 + jr c,WarpFound1 ; jump if standing on door or warp push hl push bc - call ExtraWarpCheck ; sets carry if the warp is confirmed + call ExtraWarpCheck pop bc pop hl jr nc,CheckWarpsNoCollisionRetry2 @@ -425,16 +427,16 @@ CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc) call Joypad pop bc pop de - ld a,[hJoyHeld] ; current joypad state - and a,%11110000 ; bit mask for directional buttons + ld a,[hJoyHeld] + and a,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) - ld a,[wd3ae] ; number of warps + ld a,[wNumberOfWarps] ld c,a - ld hl,wd3af ; start of warp entries + ld hl,wWarpEntries .loop ld a,[hli] ; Y coordinate of warp ld b,a @@ -447,7 +449,7 @@ CheckWarpsCollision:: ; 0706 (0:0706) cp b jr nz,.retry2 ld a,[hli] - ld [wd42f],a ; save target warp ID + ld [wDestinationWarpID],a ld a,[hl] ld [$ff8b],a ; save target map jr WarpFound2 @@ -469,12 +471,12 @@ CheckWarpsNoCollisionRetry2:: ; 0730 (0:0730) WarpFound1:: ; 0735 (0:0735) ld a,[hli] - ld [wd42f],a ; save target warp ID + ld [wDestinationWarpID],a ld a,[hli] ld [$ff8b],a ; save target map WarpFound2:: ; 073c (0:073c) - ld a,[wd3ae] ; number of warps + ld a,[wNumberOfWarps] sub c ld [wd73b],a ; save ID of used warp ld a,[W_CURMAP] @@ -491,8 +493,8 @@ WarpFound2:: ; 073c (0:073c) cp a,ROCK_TUNNEL_1 jr nz,.notRockTunnel ld a,$06 - ld [wd35d],a - call GBFadeIn1 + ld [wMapPalOffset],a + call GBFadeOutToBlack .notRockTunnel call PlayMapChangeSound jr .done @@ -503,16 +505,16 @@ WarpFound2:: ; 073c (0:073c) jr z,.goBackOutside ; if not going back to the previous map ld [W_CURMAP],a ; current map number - callba Func_70787 ; check if the warp was a Silph Co. teleporter + callba IsPlayerStandingOnWarpPadOrHole ld a,[wcd5b] - dec a - jr nz,.notTeleporter -; if it's a Silph Co. teleporter + dec a ; is the player on a warp pad? + jr nz,.notWarpPad +; if the player is on a warp pad ld hl,wd732 set 3,[hl] call LeaveMapAnim jr .skipMapChangeSound -.notTeleporter +.notWarpPad call PlayMapChangeSound .skipMapChangeSound ld hl,wd736 @@ -524,11 +526,11 @@ WarpFound2:: ; 073c (0:073c) ld [W_CURMAP],a call PlayMapChangeSound xor a - ld [wd35d],a + ld [wMapPalOffset],a .done ld hl,wd736 - set 0,[hl] - call Func_12da + set 0,[hl] ; have the player's sprite step out from the door (if there is one) + call IgnoreInputForHalfSecond jp EnterMap ContinueCheckWarpsNoCollisionLoop:: ; 07b5 (0:07b5) @@ -569,9 +571,9 @@ CheckMapConnections:: ; 07ba (0:07ba) jr nz,.pointerAdjustmentLoop1 .savePointer1 ld a,l - ld [wd35f],a ; pointer to upper left corner of current tile block map section + ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section ld a,h - ld [wd360],a + ld [wCurrentTileBlockMapViewPointer + 1],a jp .loadNewMap .checkEastMap ld b,a @@ -605,9 +607,9 @@ CheckMapConnections:: ; 07ba (0:07ba) jr nz,.pointerAdjustmentLoop2 .savePointer2 ld a,l - ld [wd35f],a ; pointer to upper left corner of current tile block map section + ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section ld a,h - ld [wd360],a + ld [wCurrentTileBlockMapViewPointer + 1],a jp .loadNewMap .checkNorthMap ld a,[W_YCOORD] @@ -631,9 +633,9 @@ CheckMapConnections:: ; 07ba (0:07ba) srl c add hl,bc ld a,l - ld [wd35f],a ; pointer to upper left corner of current tile block map section + ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section ld a,h - ld [wd360],a + ld [wCurrentTileBlockMapViewPointer + 1],a jp .loadNewMap .checkSouthMap ld b,a @@ -658,9 +660,9 @@ CheckMapConnections:: ; 07ba (0:07ba) srl c add hl,bc ld a,l - ld [wd35f],a ; pointer to upper left corner of current tile block map section + ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section ld a,h - ld [wd360],a + ld [wCurrentTileBlockMapViewPointer + 1],a .loadNewMap ; load the connected map that was entered call LoadMapHeader call Func_2312 ; music @@ -685,10 +687,10 @@ PlayMapChangeSound:: ; 08c9 (0:08c9) ld a,(SFX_02_5c - SFX_Headers_02) / 3 .playSound call PlaySound - ld a,[wd35d] + ld a,[wMapPalOffset] and a ret nz - jp GBFadeIn1 + jp GBFadeOutToBlack CheckIfInOutsideMap:: ; 08e1 (0:08e1) ; If the player is in an outside map (a town or route), set the z flag @@ -726,37 +728,37 @@ ExtraWarpCheck:: ; 08e9 (0:08e9) cp PLATEAU ; Indigo Plateau tileset jr z, .useFunction2 .useFunction1 - ld hl, Func_c3ff + ld hl, IsPlayerFacingEdgeOfMap jr .doBankswitch .useFunction2 - ld hl, Func_c44e + ld hl, IsWarpTileInFrontOfPlayer .doBankswitch - ld b, BANK(Func_c44e) + ld b, BANK(IsWarpTileInFrontOfPlayer) jp Bankswitch MapEntryAfterBattle:: ; 091f (0:091f) - callba Func_c35f ; function that appears to disable warp testing after collisions if the player is standing on a warp - ld a,[wd35d] + callba IsPlayerStandingOnWarp ; for enabling warp testing after collisions + ld a,[wMapPalOffset] and a - jp z,GBFadeIn2 + jp z,GBFadeInFromWhite jp LoadGBPal HandleBlackOut:: ; For when all the player's pokemon faint. ; Does not print the "blacked out" message. - call GBFadeIn1 + call GBFadeOutToBlack ld a, $08 call StopMusic ld hl, wd72e res 5, [hl] - ld a, Bank(Func_40b0) ; also Bank(Func_62ce) and Bank(Func_5d5f) + ld a, Bank(ResetStatusAndHalveMoneyOnBlackout) ; also Bank(SpecialWarpIn) and Bank(SpecialEnterMap) ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a - call Func_40b0 - call Func_62ce + ld [MBC1RomBank], a + call ResetStatusAndHalveMoneyOnBlackout + call SpecialWarpIn call Func_2312 - jp Func_5d5f + jp SpecialEnterMap StopMusic:: ld [wMusicHeaderPointer], a @@ -769,23 +771,23 @@ StopMusic:: jr nz, .wait jp StopAllSounds -HandleFlyOrTeleportAway:: +HandleFlyWarpOrDungeonWarp:: call UpdateSprites call Delay3 xor a - ld [wcf0b], a - ld [wd700], a + ld [wBattleResult], a + ld [wWalkBikeSurfState], a ld [W_ISINBATTLE], a - ld [wd35d], a + ld [wMapPalOffset], a ld hl, wd732 - set 2, [hl] - res 5, [hl] + set 2, [hl] ; fly warp or dungeon warp + res 5, [hl] ; forced to ride bike call LeaveMapAnim - ld a, Bank(Func_62ce) + ld a, Bank(SpecialWarpIn) ld [H_LOADEDROMBANK], a ld [$2000], a - call Func_62ce - jp Func_5d5f + call SpecialWarpIn + jp SpecialEnterMap LeaveMapAnim:: ld b, BANK(_LeaveMapAnim) @@ -799,11 +801,11 @@ LoadPlayerSpriteGraphics:: ; 1: biking ; 2: surfing - ld a, [wd700] + ld a, [wWalkBikeSurfState] dec a jr z, .ridingBike - ld a, [$ffd7] + ld a, [hTilesetType] and a jr nz, .determineGraphics jr .startWalking @@ -816,12 +818,12 @@ LoadPlayerSpriteGraphics:: .startWalking xor a - ld [wd700], a - ld [wd11a], a + ld [wWalkBikeSurfState], a + ld [wWalkBikeSurfStateCopy], a jp LoadWalkingPlayerSpriteGraphics .determineGraphics - ld a, [wd700] + ld a, [wWalkBikeSurfState] and a jp z, LoadWalkingPlayerSpriteGraphics dec a @@ -1063,16 +1065,16 @@ LoadEastWestConnectionsTileMap:: ; 0b02 (0:0b02) ret ; function to check if there is a sign or sprite in front of the player -; if so, it is stored in [$FF8C] -; if not, [$FF8C] is set to 0 +; if so, it is stored in [hSpriteIndexOrTextID] +; if not, [hSpriteIndexOrTextID] is set to 0 IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) xor a - ld [$ff8c],a + ld [hSpriteIndexOrTextID],a ld a,[wd4b0] ; number of signs in the map and a jr z,.extendRangeOverCounter ; if there are signs - predef Func_c586 ; get the coordinates in front of the player in de + 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 b,a @@ -1097,7 +1099,7 @@ IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) dec c add hl,bc ld a,[hl] - ld [$ff8c],a ; store sign text ID + ld [hSpriteIndexOrTextID],a ; store sign text ID pop bc pop hl ret @@ -1106,7 +1108,7 @@ IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) jr nz,.signLoop ; 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 Func_c586 ; get the tile in front of the player in c + 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 d,$20 ; talking range in pixels (long range) @@ -1118,7 +1120,7 @@ IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) jr nz,.counterTilesLoop ; part of the above function, but sometimes its called on its own, when signs are irrelevant -; the caller must zero [$FF8C] +; the caller must zero [hSpriteIndexOrTextID] IsSpriteInFrontOfPlayer:: ; 0b6b (0:0b6b) ld d,$10 ; talking range in pixels (normal range) IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d) @@ -1200,7 +1202,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d) ld l,a set 7,[hl] ld a,e - ld [$ff8c],a ; store sprite ID + 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) @@ -1210,18 +1212,18 @@ CollisionCheckOnLand:: ; 0bd1 (0:0bd1) bit 6,a ; is the player jumping? jr nz,.noCollision ; if not jumping a ledge - ld a,[wcd38] + ld a,[wSimulatedJoypadStatesIndex] and a - jr nz,.noCollision + 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 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 jr nz,.collision xor a - ld [$ff8c],a + ld [hSpriteIndexOrTextID],a call IsSpriteInFrontOfPlayer ; check for sprite collisions again? when does the above check fail to detect a sprite collision? - ld a,[$ff8c] + ld a,[hSpriteIndexOrTextID] and a ; was there a sprite collision? jr nz,.collision ; if no sprite collision @@ -1246,8 +1248,8 @@ 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) - predef Func_c586 ; get tile in front of player - ld a,[wcfc6] ; tile in front of player + 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 a,[hli] @@ -1270,7 +1272,7 @@ CheckTilePassable:: ; 0c10 (0:0c10) ; sets carry if there is a collision and unsets carry if not CheckForJumpingAndTilePairCollisions:: ; 0c2a (0:0c2a) push hl - predef Func_c586 ; get the tile in front of the player + predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player push de push bc callba HandleLedges ; check if the player is trying to jump a ledge @@ -1283,12 +1285,12 @@ CheckForJumpingAndTilePairCollisions:: ; 0c2a (0:0c2a) ret nz ; if not jumping -Func_c44:: ; 0c44 (0:0c44) +CheckForTilePairCollisions2:: ; 0c44 (0:0c44) aCoord 8, 9 ; tile the player is on ld [wcf0e],a CheckForTilePairCollisions:: ; 0c4a (0:0c4a) - ld a,[wcfc6] ; tile in front of the player + ld a,[wTileInFrontOfPlayer] ld c,a .tilePairCollisionLoop ld a,[W_CURMAPTILESET] ; tileset number @@ -1364,9 +1366,9 @@ LoadCurrentMapView:: ; 0caa (0:0caa) ld a,[W_TILESETBANK] ; tile data ROM bank ld [H_LOADEDROMBANK],a ld [$2000],a ; switch to ROM bank that contains tile data - ld a,[wd35f] ; address of upper left corner of current map view + ld a,[wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view ld e,a - ld a,[wd360] + ld a,[wCurrentTileBlockMapViewPointer + 1] ld d,a ld hl,wTileMapBackup ld b,$05 @@ -1472,7 +1474,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) cp a,$01 jr nz,.checkIfMovingWest ; moving east - ld a,[wd526] + ld a,[wMapViewVRAMPointer] ld e,a and a,$e0 ld d,a @@ -1480,13 +1482,13 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) add a,$02 and a,$1f or d - ld [wd526],a + ld [wMapViewVRAMPointer],a jr .adjustXCoordWithinBlock .checkIfMovingWest cp a,$ff jr nz,.checkIfMovingSouth ; moving west - ld a,[wd526] + ld a,[wMapViewVRAMPointer] ld e,a and a,$e0 ld d,a @@ -1494,36 +1496,36 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) sub a,$02 and a,$1f or d - ld [wd526],a + ld [wMapViewVRAMPointer],a jr .adjustXCoordWithinBlock .checkIfMovingSouth ld a,b cp a,$01 jr nz,.checkIfMovingNorth ; moving south - ld a,[wd526] + ld a,[wMapViewVRAMPointer] add a,$40 - ld [wd526],a + ld [wMapViewVRAMPointer],a jr nc,.adjustXCoordWithinBlock - ld a,[wd527] + ld a,[wMapViewVRAMPointer + 1] inc a and a,$03 or a,$98 - ld [wd527],a + ld [wMapViewVRAMPointer + 1],a jr .adjustXCoordWithinBlock .checkIfMovingNorth cp a,$ff jr nz,.adjustXCoordWithinBlock ; moving north - ld a,[wd526] + ld a,[wMapViewVRAMPointer] sub a,$40 - ld [wd526],a + ld [wMapViewVRAMPointer],a jr nc,.adjustXCoordWithinBlock - ld a,[wd527] + ld a,[wMapViewVRAMPointer + 1] dec a and a,$03 or a,$98 - ld [wd527],a + ld [wMapViewVRAMPointer + 1],a .adjustXCoordWithinBlock ld a,c and a @@ -1538,9 +1540,9 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ; moved into the tile block to the east xor a ld [hl],a - ld hl,wd4e3 + ld hl,wXOffsetSinceLastSpecialWarp inc [hl] - ld de,wd35f + ld de,wCurrentTileBlockMapViewPointer call MoveTileBlockMapPointerEast jr .updateMapView .checkForMoveToWestBlock @@ -1549,9 +1551,9 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ; moved into the tile block to the west ld a,$01 ld [hl],a - ld hl,wd4e3 + ld hl,wXOffsetSinceLastSpecialWarp dec [hl] - ld de,wd35f + ld de,wCurrentTileBlockMapViewPointer call MoveTileBlockMapPointerWest jr .updateMapView .adjustYCoordWithinBlock @@ -1564,9 +1566,9 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ; moved into the tile block to the south xor a ld [hl],a - ld hl,wd4e2 + ld hl,wYOffsetSinceLastSpecialWarp inc [hl] - ld de,wd35f + ld de,wCurrentTileBlockMapViewPointer ld a,[W_CURMAPWIDTH] call MoveTileBlockMapPointerSouth jr .updateMapView @@ -1576,9 +1578,9 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ; moved into the tile block to the north ld a,$01 ld [hl],a - ld hl,wd4e2 + ld hl,wYOffsetSinceLastSpecialWarp dec [hl] - ld de,wd35f + ld de,wCurrentTileBlockMapViewPointer ld a,[W_CURMAPWIDTH] call MoveTileBlockMapPointerNorth .updateMapView @@ -1614,12 +1616,12 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ld c,a sla b sla c - ld a,[$ffaf] + ld a,[hSCY] add b - ld [$ffaf],a ; update background scroll Y - ld a,[$ffae] + ld [hSCY],a ; update background scroll Y + ld a,[hSCX] add c - ld [$ffae],a ; update background scroll X + ld [hSCX],a ; update background scroll X ; 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 @@ -1699,18 +1701,18 @@ MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85) ScheduleNorthRowRedraw:: ; 0e91 (0:0e91) hlCoord 0, 0 - call ScheduleRowRedrawHelper - ld a,[wd526] + call CopyToScreenEdgeTiles + ld a,[wMapViewVRAMPointer] ld [H_SCREENEDGEREDRAWADDR],a - ld a,[wd527] + ld a,[wMapViewVRAMPointer + 1] ld [H_SCREENEDGEREDRAWADDR + 1],a ld a,REDRAWROW ld [H_SCREENEDGEREDRAW],a ret -ScheduleRowRedrawHelper:: ; 0ea6 (0:0ea6) +CopyToScreenEdgeTiles:: ; 0ea6 (0:0ea6) ld de,wScreenEdgeTiles - ld c,$28 + ld c,2 * 20 .loop ld a,[hli] ld [de],a @@ -1721,10 +1723,10 @@ ScheduleRowRedrawHelper:: ; 0ea6 (0:0ea6) ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2) hlCoord 0, 16 - call ScheduleRowRedrawHelper - ld a,[wd526] + call CopyToScreenEdgeTiles + ld a,[wMapViewVRAMPointer] ld l,a - ld a,[wd527] + ld a,[wMapViewVRAMPointer + 1] ld h,a ld bc,$0200 add hl,bc @@ -1741,7 +1743,7 @@ ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2) ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3) hlCoord 18, 0 call ScheduleColumnRedrawHelper - ld a,[wd526] + ld a,[wMapViewVRAMPointer] ld c,a and a,$e0 ld b,a @@ -1750,7 +1752,7 @@ ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3) and a,$1f or b ld [H_SCREENEDGEREDRAWADDR],a - ld a,[wd527] + ld a,[wMapViewVRAMPointer + 1] ld [H_SCREENEDGEREDRAWADDR + 1],a ld a,REDRAWCOL ld [H_SCREENEDGEREDRAW],a @@ -1779,9 +1781,9 @@ ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2) ScheduleWestColumnRedraw:: ; 0f08 (0:0f08) hlCoord 0, 0 call ScheduleColumnRedrawHelper - ld a,[wd526] + ld a,[wMapViewVRAMPointer] ld [H_SCREENEDGEREDRAWADDR],a - ld a,[wd527] + ld a,[wMapViewVRAMPointer + 1] ld [H_SCREENEDGEREDRAWADDR + 1],a ld a,REDRAWCOL ld [H_SCREENEDGEREDRAW],a @@ -1842,28 +1844,27 @@ JoypadOverworld:: ; 0f4d (0:0f4d) ld a,[W_CURMAP] cp a,ROUTE_17 ; Cycling Road jr nz,.notForcedDownwards - ld a,[hJoyHeld] ; current joypad state - and a,%11110011 ; bit mask for all directions and A/B + ld a,[hJoyHeld] + and a,D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON jr nz,.notForcedDownwards - ld a,%10000000 ; down pressed + 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 .notForcedDownwards ld a,[wd730] bit 7,a ret z ; if simulating button presses - ld a,[hJoyHeld] ; current joypad state + ld a,[hJoyHeld] ld b,a - ld a,[wcd3b] ; bit mask for button presses that override simulated ones + ld a,[wOverrideSimulatedJoypadStatesMask] ; bit mask for button presses that override simulated ones and b ret nz ; return if the simulated button presses are overridden - ld hl,wcd38 ; index of current simulated button press + ld hl,wSimulatedJoypadStatesIndex dec [hl] ld a,[hl] cp a,$ff jr z,.doneSimulating ; if the end of the simulated button presses has been reached - ld hl,wccd3 ; base address of simulated button presses -; add offset to base address + ld hl,wSimulatedJoypadStatesEnd add l ld l,a jr nc,.noCarry @@ -1879,9 +1880,9 @@ JoypadOverworld:: ; 0f4d (0:0f4d) ; if done simulating button presses .doneSimulating xor a - ld [wcd3a],a - ld [wcd38],a - ld [wccd3],a + ld [wWastedByteCD3A],a + ld [wSimulatedJoypadStatesIndex],a + ld [wSimulatedJoypadStatesEnd],a ld [wJoyIgnore],a ld [hJoyHeld],a ld hl,wd736 @@ -1913,8 +1914,8 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7) ld hl,TilePairCollisionsWater call CheckForJumpingAndTilePairCollisions jr c,.collision - predef Func_c586 ; get tile in front of player (puts it in c and [wcfc6]) - ld a,[wcfc6] ; tile in front of player + predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player (puts it in c and [wTileInFrontOfPlayer]) + ld a,[wTileInFrontOfPlayer] ; tile in front of player cp a,$14 ; water tile jr z,.noCollision ; keep surfing if it's a water tile cp a,$32 ; either the left tile of the S.S. Anne boarding platform or the tile on eastern coastlines (depending on the current tileset) @@ -1949,9 +1950,9 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7) ret .stopSurfing xor a - ld [wd700],a + ld [wWalkBikeSurfState],a call LoadPlayerSpriteGraphics - call Func_2307 + call PlayDefaultMusic jr .noCollision .checkIfVermilionDockTileset ld a, [W_CURMAPTILESET] ; tileset @@ -1964,16 +1965,16 @@ RunMapScript:: ; 101b (0:101b) push hl push de push bc - callba Func_f225 ; check if the player is pushing a boulder + callba TryPushingBoulder ld a,[wFlags_0xcd60] - bit 1,a ; is the player pushing a boulder? + bit 1,a ; play boulder dust animation jr z,.afterBoulderEffect - callba Func_f2b5 ; displays dust effect when pushing a boulder + callba DoBoulderDustAnimation .afterBoulderEffect pop bc pop de pop hl - call Func_310e + call RunNPCMovementScript ld a,[W_CURMAP] ; current map number call SwitchToMapRomBank ; change to the ROM bank the map's data is in ld hl,W_MAPSCRIPTPTR @@ -2029,7 +2030,7 @@ LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063) ; function to load data from the map header LoadMapHeader:: ; 107c (0:107c) - callba Func_f113 + callba MarkTownVisitedAndLoadMissableObjects ld a,[W_CURMAPTILESET] ld [wd119],a ld a,[W_CURMAP] @@ -2107,12 +2108,12 @@ LoadMapHeader:: ; 107c (0:107c) ld a,[hli] ld [de],a ; save background tile ID .loadWarpData - ld a,[hli] ; number of warps - ld [wd3ae],a ; save the number of warps - and a ; are there any warps? - jr z,.loadSignData ; if not, skip this + ld a,[hli] + ld [wNumberOfWarps],a + and a + jr z,.loadSignData ld c,a - ld de,wd3af ; base address of warps + ld de,wWarpEntries .warpLoop ; one warp per loop iteration ld b,$04 .warpInnerLoop @@ -2276,8 +2277,8 @@ LoadMapHeader:: ; 107c (0:107c) dec b jp nz,.loadSpriteLoop .finishUp - predef Func_c754 ; load tileset data - callab LoadWildData ; load wild pokemon data + 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 add a ; double it @@ -2323,14 +2324,14 @@ LoadMapData:: ; 1241 (0:1241) push af call DisableLCD ld a,$98 - ld [wd527],a + ld [wMapViewVRAMPointer + 1],a xor a - ld [wd526],a - ld [$ffaf],a - ld [$ffae],a + ld [wMapViewVRAMPointer],a + ld [hSCY],a + ld [hSCX],a ld [wWalkCounter],a ld [wd119],a - ld [wd11a],a + ld [wWalkBikeSurfStateCopy],a ld [W_SPRITESETID],a call LoadTextBoxTilePatterns call LoadMapHeader @@ -2359,13 +2360,13 @@ LoadMapData:: ; 1241 (0:1241) dec b jr nz,.vramCopyLoop ld a,$01 - ld [wcfcb],a + ld [wUpdateSpritesEnabled],a call EnableLCD ld b,$09 call GoPAL_SET call LoadPlayerSpriteGraphics ld a,[wd732] - and a,$18 ; did the player fly or teleport in? + and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp jr nz,.restoreRomBank ld a,[W_FLAGS_D733] bit 1,a @@ -2399,16 +2400,16 @@ SwitchToMapRomBank:: ; 12bc (0:12bc) pop hl ret -Func_12da:: ; 12da (0:12da) - ld a, $1e - ld [wd13a], a +IgnoreInputForHalfSecond: ; 12da (0:12da) + ld a, 30 + ld [wIgnoreInputCounter], a ld hl, wd730 ld a, [hl] or $26 - ld [hl], a + ld [hl], a ; set ignore input bit ret -Func_12e7:: ; 12e7 (0:12e7) +ResetUsingStrengthOutOfBattleBit: ; 12e7 (0:12e7) ld hl, wd728 res 0, [hl] ret @@ -2417,4 +2418,4 @@ ForceBikeOrSurf:: ; 12ed (0:12ed) ld b, BANK(RedSprite) ld hl, LoadPlayerSpriteGraphics call Bankswitch - jp Func_2307 ; update map/player state? + jp PlayDefaultMusic ; update map/player state? diff --git a/home/predef.asm b/home/predef.asm index 1777d09f67..8efe30003d 100755 --- a/home/predef.asm +++ b/home/predef.asm @@ -7,7 +7,7 @@ Predef:: ld [wPredefID], a ; A hack for LoadDestinationWarpPosition. - ; See Func_c754 (predef $19). + ; See LoadTilesetHeader (predef $19). ld a, [H_LOADEDROMBANK] ld [wPredefParentBank], a diff --git a/home/serial.asm b/home/serial.asm new file mode 100644 index 0000000000..86d7404042 --- /dev/null +++ b/home/serial.asm @@ -0,0 +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 diff --git a/home/text.asm b/home/text.asm index 42466e3f70..8717e23154 100755 --- a/home/text.asm +++ b/home/text.asm @@ -62,7 +62,7 @@ PlaceNextChar:: ; 1956 (0:1956) cp $4E jr nz,.next ld bc,$0028 - ld a,[$FFF6] + ld a,[hFlags_0xFFF6] bit 2,a jr z,.next2 ld bc,$14 @@ -265,8 +265,8 @@ Char5F:: ; 1a91 (0:1a91) ret Char58:: ; 1a95 (0:1a95) - ld a,[W_ISLINKBATTLE] - cp 4 + ld a,[wLinkState] + cp LINK_STATE_BATTLING jp z,Next1AA2 ld a,$EE Coorda 18, 16 @@ -506,8 +506,8 @@ TextCommand05:: ; 1bc5 (0:1bc5) ; 06 ; (no arguments) TextCommand06:: ; 1bcc (0:1bcc) - ld a,[W_ISLINKBATTLE] - cp a,$04 + ld a,[wLinkState] + cp a,LINK_STATE_BATTLING jp z,TextCommand0D ld a,$ee ; down arrow Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box @@ -627,12 +627,12 @@ TextCommand0B:: ; 1c31 (0:1c31) ; 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_02_46 - 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_02_44 - SFX_Headers_02) / 3 + db $13,(SFX_08_45 - SFX_Headers_08) / 3 db $14,MEW ; used in OakSpeech db $15,PIDGEOT ; used in SaffronCityText12 db $16,DEWGONG ; unused? diff --git a/home/timer.asm b/home/timer.asm new file mode 100644 index 0000000000..8578df1a0b --- /dev/null +++ b/home/timer.asm @@ -0,0 +1,3 @@ +; timer interrupt is apparently not invoked anyway +Timer:: ; 2306 (0:2306) + reti diff --git a/home/vblank.asm b/home/vblank.asm index 15f9143789..5d49ec517e 100755 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -8,15 +8,15 @@ VBlank:: ld a, [H_LOADEDROMBANK] ld [wd122], a - ld a, [$ffae] + ld a, [hSCX] ld [rSCX], a - ld a, [$ffaf] + ld a, [hSCY] ld [rSCY], a ld a, [wd0a0] and a jr nz, .ok - ld a, [$ffb0] + ld a, [hWY] ld [rWY], a .ok @@ -29,7 +29,7 @@ VBlank:: call $ff80 ; hOAMDMA ld a, Bank(PrepareOAMData) ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a + ld [MBC1RomBank], a call PrepareOAMData ; VBlank-sensitive operations end. @@ -54,7 +54,7 @@ VBlank:: ld a, [wc0ef] ; music ROM bank ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a + ld [MBC1RomBank], a cp BANK(Music2_UpdateMusic) jr nz, .notbank2 @@ -72,7 +72,7 @@ VBlank:: call Music1f_UpdateMusic .afterMusic - callba Func_18dee ; keep track of time played + callba TrackPlayTime ; keep track of time played ld a, [$fff9] and a @@ -80,7 +80,7 @@ VBlank:: ld a, [wd122] ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a + ld [MBC1RomBank], a pop hl pop de diff --git a/home/vcopy.asm b/home/vcopy.asm index 81fcb99163..d42293d994 100755 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -376,9 +376,9 @@ UpdateMovingBgTiles:: ; Animate water and flower ; tiles in the overworld. - ld a, [$ffd7] + ld a, [hTilesetType] and a - ret z + ret z ; no animations if indoors (or if a menu set this to 0) ld a, [$ffd8] inc a @@ -412,9 +412,10 @@ UpdateMovingBgTiles:: dec c jr nz, .left .done - ld a, [$ffd7] + ld a, [hTilesetType] rrca ret nc +; if in a cave, no flower animations xor a ld [$ffd8], a ret diff --git a/hram.asm b/hram.asm index b88c248b90..1becd8c097 100755 --- a/hram.asm +++ b/hram.asm @@ -1,8 +1,8 @@ -H_SPRITEWIDTH EQU $FF8B ; in bytes +H_SPRITEWIDTH EQU $FF8B ; in tiles H_SPRITEINTERLACECOUNTER EQU $FF8B -H_SPRITEHEIGHT EQU $FF8C ; in bytes -H_SPRITEOFFSET EQU $FF8D +H_SPRITEHEIGHT EQU $FF8C ; in tiles +H_SPRITEOFFSET EQU $FF8D hSoftReset EQU $FF8A ; Initialized to 16. @@ -10,32 +10,63 @@ hSoftReset EQU $FF8A ; presses the reset sequence (A+B+SEL+START). ; Soft reset when 0 is reached. +hBaseTileID EQU $FF8B + +hItemPrice EQU $FF8B + ; counters for blinking down arrow H_DOWNARROWBLINKCNT1 EQU $FF8B H_DOWNARROWBLINKCNT2 EQU $FF8C -; Note: the following multiplication and division addresses are used for multiple purposes -; and so they overlap with each other +H_SPRITEDATAOFFSET EQU $FF8B +H_SPRITEINDEX EQU $FF8C + +; DisplayTextID's argument +hSpriteIndexOrTextID EQU $FF8C -H_MULTIPLICAND EQU $FF96 ; 3 bytes, big endian order +; Multiplcation and division variables are meant +; to overlap for back-to-back usage. Big endian. + +H_MULTIPLICAND EQU $FF96 ; 3 bytes H_MULTIPLIER EQU $FF99 ; 1 byte -H_PRODUCT EQU $FF95 ; 4 bytes, big endian order +H_PRODUCT EQU $FF95 ; 4 bytes -H_DIVIDEND EQU $FF95 ; 4 bytes, big endian order +H_DIVIDEND EQU $FF95 ; 4 bytes H_DIVISOR EQU $FF99 ; 1 byte -H_QUOTIENT EQU $FF95 ; 4 bytes, big endian order +H_QUOTIENT EQU $FF95 ; 4 bytes H_REMAINDER EQU $FF99 ; 1 byte -; used to convert numbers to decimal -H_PASTLEADINGZEROES EQU $FF95 ; flag to indicate that a nonzero digit has been printed -H_NUMTOPRINT EQU $FF96 ; 3 bytes, big endian order -H_POWEROFTEN EQU $FF99 ; 3 bytes, big endian order -H_SAVEDNUMTOPRINT EQU $FF9C ; 3 bytes, big endian order (to back out of a subtraction) +; 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 + +hSerialReceivedNewData EQU $FFA9 + +; $01 = using external clock +; $02 = using internal clock +; $ff = establishing connection +hSerialConnectionStatus EQU $FFAA -hJoyHeldLast EQU $FFB1 -hJoyReleased EQU $FFB2 -hJoyPressed EQU $FFB3 -hJoyHeld EQU $FFB4 +hSerialIgnoringInitialData EQU $FFAB + +hSerialSendData EQU $FFAC + +hSerialReceiveData EQU $FFAD + +; these values are copied to SCX, SCY, and WY during V-blank +hSCX EQU $FFAE +hSCY EQU $FFAF +hWY EQU $FFB0 + +hJoyLast EQU $FFB1 +hJoyReleased EQU $FFB2 +hJoyPressed EQU $FFB3 +hJoyHeld EQU $FFB4 +hJoy5 EQU $FFB5 +hJoy6 EQU $FFB6 +hJoy7 EQU $FFB7 H_LOADEDROMBANK EQU $FFB8 @@ -112,9 +143,19 @@ H_FRAMECOUNTER EQU $FFD5 ; decremented every V-blank (used for delays) ; you can detect that the V-blank handler has run since then. H_VBLANKOCCURRED EQU $FFD6 +; 00 = indoor +; 01 = cave +; 02 = outdoor +; this is often set to 00 in order to turn off water and flower BG tile animations +hTilesetType EQU $FFD7 + H_CURRENTSPRITEOFFSET EQU $FFDA ; multiple of $10 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 + hJoyInput EQU $FFF8 diff --git a/macros.asm b/macros.asm index 8244c8c9a0..b80f14425c 100755 --- a/macros.asm +++ b/macros.asm @@ -11,16 +11,30 @@ 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 [MBC3RomBank], a + ld [MBC1RomBank], a call \1 pop af ld [H_LOADEDROMBANK], a - ld [MBC3RomBank], a + ld [MBC1RomBank], a ENDM callba: MACRO @@ -35,6 +49,20 @@ callab: MACRO 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 @@ -189,6 +217,24 @@ predef_jump: MACRO 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 @@ -434,17 +480,17 @@ dutycycle: MACRO ENDM ;format: callchannel address -;callchannel: MACRO -; db $FD -; dw \1 -;ENDM +callchannel: MACRO + db $FD + dw \1 +ENDM ;format: loopchannel count, address -;loopchannel: MACRO -; db $FE -; db \1 -; dw \2 -;ENDM +loopchannel: MACRO + db $FE + db \1 + dw \2 +ENDM endchannel: MACRO db $FF diff --git a/main.asm b/main.asm index ead9b9b202..70e5d69e45 100755 --- a/main.asm +++ b/main.asm @@ -19,16 +19,16 @@ SECTION "bank1",ROMX,BANK[$1] INCLUDE "data/facing.asm" -Func_40b0:: +ResetStatusAndHalveMoneyOnBlackout:: ; Reset player status on blackout. xor a - ld [wcf0b], a - ld [wd700], a + ld [wBattleResult], a + ld [wWalkBikeSurfState], a ld [W_ISINBATTLE], a - ld [wd35d], a - ld [wcf10], a + ld [wMapPalOffset], a + ld [wNPCMovementScriptFunctionNum], a ld [hJoyHeld], a - ld [wcc57], a + ld [wNPCMovementScriptPointerTableNum], a ld [wFlags_0xcd60], a ld [$ff9f], a @@ -83,7 +83,7 @@ LoadMonData_: ; 1: enemymon ; 2: boxmon ; 3: daycaremon -; Return monster id at wcf91 and its data at wcf98. +; Return monster id at wcf91 and its data at wLoadedMon. ; Also load base stats at W_MONHDEXNUM for convenience. ld a, [wDayCareMonSpecies] @@ -94,7 +94,7 @@ LoadMonData_: ld a, [wWhichPokemon] ld e, a - callab Func_39c37 ; get pokemon ID + callab GetMonSpecies .GetMonHeader ld a, [wcf91] @@ -123,8 +123,8 @@ LoadMonData_: call AddNTimes .copyMonData - ld de, wcf98 - ld bc, 44 + ld de, wLoadedMon + ld bc, wPartyMon2 - wPartyMon1 jp CopyData @@ -165,7 +165,7 @@ PrintWaitingText: call TextBoxBorder jr .asm_4c1a .asm_4c17 - call Func_5ab3 + call CableClub_TextBoxBorder .asm_4c1a hlCoord 4, 11 ld de, WaitingText @@ -211,7 +211,7 @@ UpdateNonPlayerSprite: dec a swap a ld [$ff93], a ; $10 * sprite# - ld a, [wcf17] ; some sprite offset? + ld a, [wNPCMovementScriptSpriteOffset] ; some sprite offset? ld b, a ld a, [H_CURRENTSPRITEOFFSET] cp b @@ -220,8 +220,16 @@ UpdateNonPlayerSprite: .unequal jp Func_4ed1 - -Func_4c70: +; 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 @@ -229,195 +237,250 @@ Func_4c70: add wSpriteStateData1 % $100 ld l, a - ld a, [hl] - and a - ret z + 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] - call Func_4d72 + ld a, [hli] ; a = [$c1i3] (delta Y) (-1, 0, or 1) + call SetSpriteCollisionValues - ld a, [hli] - add 4 + 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 - ld a, [hli] - call Func_4d72 + ld [$ff90], a ; store Y coordinate adjusted for direction of movement - ld a, [hl] + 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 + + ld [$ff91], a ; store X coordinate adjusted for direction of movement ld a, l add 7 ld l, a xor a - ld [hld], a - ld [hld], 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 + ld [hld], a ; [$c1ib] = adjusted X coordiate ld a, [$ff90] - ld [hl], a - xor a + ld [hl], a ; [$c1ia] = adjusted Y coordinate + + xor a ; zero the loop counter .loop - ld [$ff8f], a + ld [$ff8f], a ; store loop counter swap a ld e, a ld a, [H_CURRENTSPRITEOFFSET] - cp e - jp z, .next + 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] - and a - jp z, .next + 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] + ld a, [de] ; a = [$c1j2] ($ff means the sprite is offscreen) inc a - jp z, .next + 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 - ld a, [de] - call Func_4d72 inc e + ld a, [de] ; a = [$C1j4] (Y screen coordinate) + add 4 ; align with multiple of $10 - ld a, [de] - add 4 +; 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] - jr nc, .asm_4cd4 + + 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 -.asm_4cd4 - ld [$ff90], 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] + ld a, [hl] ; a = [$c1ia] (adjusted Y coordinate) and $f - jr z, .asm_4ce6 + jr z, .next1 ld b, 9 -.asm_4ce6 - ld a, [$ff90] + +.next1 + ld a, [$ff90] ; a = distance between adjusted Y coordinates sub b - ld [$ff92], a + ld [$ff92], a ; store distance adjusted using sprite i's direction ld a, b - ld [$ff90], a - jr c, .asm_4d01 + 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] + ld a, [de] ; a = [$c1j3] (delta Y) inc e and a - jr z, .asm_4cfa + jr z, .next2 ld b, 9 -.asm_4cfa - ld a, [$ff92] - sub b - jr z, .asm_4d01 - jr nc, .next -.asm_4d01 +.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] + ld a, [de] ; a = [$c1j5] (delta X) push bc - call Func_4d72 + + call SetSpriteCollisionValues inc e - ld a, [de] + 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] - jr nc, .asm_4d14 + 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 -.asm_4d14 - ld [$ff91], 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] + ld a, [hl] ; a = [$c1ib] (adjusted X coordinate) and $f - jr z, .asm_4d26 + jr z, .next3 ld b, 9 -.asm_4d26 - ld a, [$ff91] + +.next3 + ld a, [$ff91] ; a = distance between adjusted X coordinates sub b - ld [$ff92], a + ld [$ff92], a ; store distance adjusted using sprite i's direction ld a, b - ld [$ff91], a - jr c, .asm_4d41 + 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] + ld a, [de] ; a = [$c1j5] (delta X) inc e and a - jr z, .asm_4d3a + jr z, .next4 ld b, 9 -.asm_4d3a - ld a, [$ff92] - sub b - jr z, .asm_4d41 - jr nc, .next -.asm_4d41 - ld a, [$ff91] +.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] + 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, .asm_4d4e - ld b, 12 - jr .asm_4d50 -.asm_4d4e - ld b, 3 -.asm_4d50 - ld a, c - and b - or [hl] - ld [hl], a - ld a, c + 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] - ld de, DiagonalLines + ld a, [$ff8f] ; a = loop counter + ld de, SpriteCollisionBitTable add a add e ld e, a - jr nc, .asm_4d62 + jr nc, .noCarry3 inc d -.asm_4d62 +.noCarry3 ld a, [de] or [hl] ld [hli], a @@ -427,13 +490,18 @@ Func_4c70: ld [hl], a .next - ld a, [$ff8f] + ld a, [$ff8f] ; a = loop counter inc a cp $10 jp nz, .loop ret -Func_4d72: +; 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 @@ -448,8 +516,23 @@ Func_4d72: .done ret -DiagonalLines: INCBIN "gfx/diagonal_lines.2bpp" - +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 @@ -493,7 +576,7 @@ TestBattle: ; When the battle ends, ; do it all again. ld a, 1 - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld [H_AUTOBGTRANSFERENABLED], a jr .loop @@ -512,19 +595,20 @@ INCLUDE "engine/menu/main_menu.asm" INCLUDE "engine/oak_speech.asm" -Func_62ce: ; 62ce (1:62ce) - call Func_62ff - predef Func_c754 +SpecialWarpIn: ; 62ce (1:62ce) + call LoadSpecialWarpData + predef LoadTilesetHeader ld hl,wd732 - bit 2,[hl] + bit 2,[hl] ; dungeon warp or fly warp? res 2,[hl] jr z,.next - ld a,[wd71a] +; if dungeon warp or fly warp + ld a,[wDestinationMap] jr .next2 .next bit 1,[hl] jr z,.next3 - call Func_64ea + call EmptyFunc .next3 ld a,0 .next2 @@ -535,125 +619,128 @@ Func_62ce: ; 62ce (1:62ce) ld a,b .next4 ld hl,wd732 - bit 4,[hl] + bit 4,[hl] ; dungeon warp? ret nz +; if not dungeon warp ld [wLastMap],a ret -Func_62ff: ; 62ff (1:62ff) +; gets the map ID, tile block map view pointer, tileset, and coordinates +LoadSpecialWarpData: ; 62ff (1:62ff) ld a, [wd72d] cp BATTLE_CENTER - jr nz, .asm_6314 - ld hl, BattleCenterSpec1 ; $6428 - ld a, [$ffaa] - cp $2 - jr z, .asm_6334 - ld hl, BattleCenterSpec2 ; $6430 - jr .asm_6334 -.asm_6314 + 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, .asm_6326 - ld hl, TradeCenterSpec1 ; $6438 - ld a, [$ffaa] - cp $2 - jr z, .asm_6334 - ld hl, TradeCenterSpec2 ; $6440 - jr .asm_6334 -.asm_6326 + 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, .asm_6346 + jr nz, .notFirstMap bit 2, a - jr nz, .asm_6346 - ld hl, FirstMapSpec ; $6420 -.asm_6334 - ld de, W_CURMAP ; W_CURMAP + jr nz, .notFirstMap + ld hl, FirstMapSpec +.copyWarpData + ld de, W_CURMAP ld c, $7 -.asm_6339 +.copyWarpDataLoop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_6339 + jr nz, .copyWarpDataLoop ld a, [hli] - ld [W_CURMAPTILESET], a ; W_CURMAPTILESET + ld [W_CURMAPTILESET], a xor a - jr .asm_63b3 -.asm_6346 + jr .done +.notFirstMap ld a, [wLastMap] ld hl, wd732 - bit 4, [hl] - jr nz, .asm_635b - bit 6, [hl] + 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, .asm_638e + jr z, .otherDestination +; return to last pokemon center or player's house ld a, [wLastBlackoutMap] - jr .asm_6391 -.asm_635b + jr .usedFlyWarp +.usedDunegonWarp ld hl, wd72d res 4, [hl] - ld a, [wd71d] + ld a, [wDungeonWarpDestinationMap] ld b, a - ld [W_CURMAP], a ; W_CURMAP - ld a, [wd71e] + ld [W_CURMAP], a + ld a, [wWhichDungeonWarp] ld c, a - ld hl, DungeonWarpList ; $63bf + ld hl, DungeonWarpList ld de, $0 ld a, $6 ld [wd12f], a -.asm_6376 +.dungeonWarpListLoop ld a, [hli] cp b - jr z, .asm_637d + jr z, .matchedDungeonWarpDestinationMap inc hl - jr .asm_6381 -.asm_637d + jr .nextDungeonWarp +.matchedDungeonWarpDestinationMap ld a, [hli] cp c - jr z, .asm_6388 -.asm_6381 + jr z, .matchedDungeonWarpID +.nextDungeonWarp ld a, [wd12f] add e ld e, a - jr .asm_6376 -.asm_6388 - ld hl, DungeonWarpData ; $63d8 + jr .dungeonWarpListLoop +.matchedDungeonWarpID + ld hl, DungeonWarpData add hl, de - jr .asm_63a4 -.asm_638e - ld a, [wd71a] -.asm_6391 + jr .copyWarpData2 +.otherDestination + ld a, [wDestinationMap] +.usedFlyWarp ld b, a - ld [W_CURMAP], a ; W_CURMAP - ld hl, FlyWarpDataPtr ; $6448 -.asm_6398 + ld [W_CURMAP], a + ld hl, FlyWarpDataPtr +.flyWarpDataPtrLoop ld a, [hli] inc hl cp b - jr z, .asm_63a1 + jr z, .foundFlyWarpMatch inc hl inc hl - jr .asm_6398 -.asm_63a1 + jr .flyWarpDataPtrLoop +.foundFlyWarpMatch ld a, [hli] ld h, [hl] ld l, a -.asm_63a4 - ld de, wd35f +.copyWarpData2 + ld de, wCurrentTileBlockMapViewPointer ld c, $6 -.asm_63a9 +.copyWarpDataLoop2 ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_63a9 - xor a - ld [W_CURMAPTILESET], a ; W_CURMAPTILESET -.asm_63b3 - ld [wd4e2], a - ld [wd4e3], a - ld a, $ff - ld [wd42f], a + 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" @@ -689,7 +776,7 @@ IshiharaTeam: ; 64df (1:64df) db ARTICUNO,57 db $FF -Func_64ea: ; 64ea (1:64ea) +EmptyFunc: ; 64ea (1:64ea) ret INCLUDE "engine/menu/naming_screen.asm" @@ -708,8 +795,8 @@ SubtractAmountPaidFromMoney_: ; 6b21 (1:6b21) ld hl,$ffa1 ; total price of items ld c,3 ; length of money in bytes predef SubBCDPredef ; subtract total price from money - ld a,$13 - ld [wd125],a + ld a,MONEY_BOX + ld [wTextBoxID],a call DisplayTextBoxID ; redraw money text box and a ret @@ -719,7 +806,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) cp a,ITEMLISTMENU jp nz,DisplayListMenuIDLoop ; only rearrange item list menus push hl - ld hl,wcf8b + ld hl,wList ld a,[hli] ld h,[hl] ld l,a @@ -736,7 +823,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) pop hl inc a jp z,DisplayListMenuIDLoop ; ignore attempts to swap the Cancel menu item - ld a,[wcc35] ; ID of item chosen for swapping (counts from 1) + 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 @@ -745,7 +832,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) ld b,a ld a,[wListScrollOffset] ; index of top (visible) menu item within the list add b - ld [wcc35],a ; ID of item chosen for swapping (counts from 1) + ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) ld c,20 call DelayFrames jp DisplayListMenuIDLoop @@ -756,16 +843,16 @@ HandleItemListSwapping: ; 6b44 (1:6b44) ld a,[wListScrollOffset] add b ld b,a - ld a,[wcc35] ; ID of item chosen for swapping (counts from 1) + 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 [wcc35],a ; ID of item chosen for swapping (counts from 1) + ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) ld c,20 call DelayFrames push hl push de - ld hl,wcf8b + ld hl,wList ld a,[hli] ld h,[hl] ld l,a @@ -780,7 +867,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) ld c,a ld b,0 add hl,bc ; hl = address of currently selected item entry - ld a,[wcc35] ; ID of item chosen for swapping (counts from 1) + ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) add a add e ld e,a @@ -807,7 +894,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) ld a,[$ff95] ld [de],a ; put second item ID in first item slot xor a - ld [wcc35],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped pop de pop hl jp DisplayListMenuIDLoop @@ -827,7 +914,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) jr .done .combineItemSlots ld [hl],a ; put the sum in the second item slot - ld hl,wcf8b + ld hl,wList ld a,[hli] ld h,[hl] ld l,a @@ -859,7 +946,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) ld [wCurrentMenuItem],a .done xor a - ld [wcc35],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped pop de pop hl jp DisplayListMenuIDLoop @@ -904,7 +991,7 @@ SafariZoneRestHouses: DisplayTextIDInit: ; 7096 (1:7096) xor a ld [wListMenuID],a - ld a,[wcf0c] + ld a,[wAutoTextBoxDrawingControl] bit 0,a jr nz,.skipDrawingTextBoxBorder ld a,[$ff8c] ; text ID (or sprite ID) @@ -933,7 +1020,7 @@ DisplayTextIDInit: ; 7096 (1:7096) .drawTextBoxBorder call TextBoxBorder .skipDrawingTextBoxBorder - ld hl,wcfc4 + ld hl,wFontLoaded set 0,[hl] ld hl,wFlags_0xcd60 bit 4,[hl] @@ -974,7 +1061,7 @@ DisplayTextIDInit: ; 7096 (1:7096) ld b,$9c ; window background address call CopyScreenTileBufferToVRAM ; transfer background in WRAM to VRAM xor a - ld [$ffb0],a ; put the window on the screen + 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 @@ -1075,12 +1162,10 @@ PrintStartMenuItem: ; 71bb (1:71bb) INCLUDE "engine/overworld/cable_club_npc.asm" ; function to draw various text boxes -; INPUT: -; [wd125] = text box ID DisplayTextBoxID_: ; 72ea (1:72ea) - ld a,[wd125] ; a = text box ID - cp a,$14 - jp z,DisplayYesNoTextBox + ld a,[wTextBoxID] + cp a,TWO_OPTION_MENU + jp z,DisplayTwoOptionMenu ld c,a ld hl,TextBoxFunctionTable ld de,3 @@ -1207,9 +1292,9 @@ GetAddressOfScreenCoords: ; 7375 (1:7375) ; 00: text box ID ; 01-02: function address TextBoxFunctionTable: ; 7387 (1:7387) - dbw $13, Func_74ba - dbw $15, Func_74ea - dbw $04, Func_76e1 + dbw MONEY_BOX, DisplayMoneyBox + dbw BUY_SELL_QUIT_MENU, DoBuySellQuitMenu + dbw FIELD_MOVE_MON_MENU, DisplayFieldMoveMonMenu db $ff ; terminator ; Format: @@ -1219,12 +1304,12 @@ TextBoxFunctionTable: ; 7387 (1:7387) ; 03: column of lower right corner ; 04: row of lower right corner TextBoxCoordTable: ; 7391 (1:7391) - db $01, 0, 12, 19, 17 - db $03, 0, 0, 19, 14 - db $07, 0, 0, 11, 6 - db $0d, 4, 2, 19, 12 - db $10, 7, 0, 19, 17 - db $11, 6, 4, 14, 13 + 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: @@ -1238,57 +1323,57 @@ TextBoxCoordTable: ; 7391 (1:7391) ; 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 $05 ; text box ID + db JP_MOCHIMONO_MENU_TEMPLATE db 0,0,14,17 ; text box coordinates dw JapaneseMochimonoText db 3,0 ; text coordinates - db $06 ; text box ID + db USE_TOSS_MENU_TEMPLATE db 13,10,19,14 ; text box coordinates dw UseTossText db 15,11 ; text coordinates - db $08 ; text box ID + db JP_SAVE_MESSAGE_MENU_TEMPLATE db 0,0,7,5 ; text box coordinates dw JapaneseSaveMessageText db 2,2 ; text coordinates - db $09 ; text box ID + db JP_SPEED_OPTIONS_MENU_TEMPLATE db 0,6,5,10 ; text box coordinates dw JapaneseSpeedOptionsText db 2,7 ; text coordinates - db $0b ; text box ID + db BATTLE_MENU_TEMPLATE db 8,12,19,17 ; text box coordinates dw BattleMenuText db 10,14 ; text coordinates - db $1b ; text box ID + db SAFARI_BATTLE_MENU_TEMPLATE db 0,12,19,17 ; text box coordinates dw SafariZoneBattleMenuText db 2,14 ; text coordinates - db $0c ; text box ID + db SWITCH_STATS_CANCEL_MENU_TEMPLATE db 11,11,19,17 ; text box coordinates dw SwitchStatsCancelText db 13,12 ; text coordinates - db $0e ; text box ID + db BUY_SELL_QUIT_MENU_TEMPLATE db 0,0,10,6 ; text box coordinates dw BuySellQuitText db 2,1 ; text coordinates - db $0f ; text box ID + db MONEY_BOX_TEMPLATE db 11,0,19,2 ; text box coordinates dw MoneyText db 13,0 ; text coordinates - db $12 ; text box ID + db JP_AH_MENU_TEMPLATE db 7,6,11,10 ; text box coordinates dw JapaneseAhText db 8,8 ; text coordinates - db $1a ; text box ID + db JP_POKEDEX_MENU_TEMPLATE db 11,8,19,17 ; text box coordinates dw JapanesePokedexMenu db 12,10 ; text coordinates @@ -1344,18 +1429,18 @@ JapanesePokedexMenu: ; 74a1 (1:74a1) next "ぶんぷをみる" next "キャンセル@" -Func_74ba: ; 74ba (1:74ba) +DisplayMoneyBox: ; 74ba (1:74ba) ld hl, wd730 set 6, [hl] - ld a, $f - ld [wd125], a + 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 ; wPlayerMoney + ld de, wPlayerMoney ld c, $a3 call PrintBCDNumber ld hl, wd730 @@ -1365,97 +1450,101 @@ Func_74ba: ; 74ba (1:74ba) CurrencyString: ; 74e2 (1:74e2) db " ¥@" -Func_74ea: ; 74ea (1:74ea) +DoBuySellQuitMenu: ; 74ea (1:74ea) ld a, [wd730] - set 6, a + set 6, a ; no printing delay ld [wd730], a xor a ld [wd12d], a - ld a, $e - ld [wd125], a + ld a, BUY_SELL_QUIT_MENU_TEMPLATE + ld [wTextBoxID], a call DisplayTextBoxID - ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a ld a, $2 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, $1 - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a ld [wcc37], a ld a, [wd730] - res 6, a + res 6, a ; turn on the printing delay ld [wd730], a call HandleMenuInput call PlaceUnfilledArrowMenuCursor - bit 0, a - jr nz, .asm_7539 - bit 1, a - jr z, .asm_7539 + 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 .asm_754c -.asm_7539 + jr .quit +.pressedA ld a, $1 ld [wd12e], a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wd12d], a ld b, a - ld a, [wMaxMenuItem] ; wMaxMenuItem + ld a, [wMaxMenuItem] cp b - jr z, .asm_754c + jr z, .quit ret -.asm_754c +.quit ld a, $2 ld [wd12e], a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wd12d], a scf ret -DisplayYesNoTextBox: ; 7559 (1:7559) +; 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 + set 6, a ; no printing delay ld [wd730], a xor a ld [wd12d], a ld [wd12e], a - ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a ld a, $1 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, b - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, c - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a xor a - ld [wLastMenuItem], a ; wLastMenuItem + ld [wLastMenuItem], a ld [wcc37], a push hl - ld hl, wd12c - bit 7, [hl] + ld hl, wTwoOptionMenuID + bit 7, [hl] ; select second menu item by default? res 7, [hl] - jr z, .asm_758d + jr z, .storeCurrentMenuItem inc a -.asm_758d - ld [wCurrentMenuItem], a ; wCurrentMenuItem +.storeCurrentMenuItem + ld [wCurrentMenuItem], a pop hl push hl push hl - call Func_763e - ld a, [wd12c] - ld hl, MenuStrings ; $7671 + call TwoOptionMenu_SaveScreenTiles + ld a, [wTwoOptionMenuID] + ld hl, TwoOptionMenuStrings ld e, a ld d, $0 ld a, $5 -.loop +.menuStringLoop add hl, de dec a - jr nz, .loop + jr nz, .menuStringLoop ld a, [hli] ld c, a ld a, [hli] @@ -1464,22 +1553,22 @@ DisplayYesNoTextBox: ; 7559 (1:7559) ld d, h pop hl push de - ld a, [wd12c] - cp $5 - jr nz, .asm_75b9 - call Func_5ab3 - jr .asm_75bc -.asm_75b9 + ld a, [wTwoOptionMenuID] + cp TRADE_CANCEL_MENU + jr nz, .notTradeCancelMenu + call CableClub_TextBoxBorder + jr .afterTextBoxBorder +.notTradeCancelMenu call TextBoxBorder -.asm_75bc +.afterTextBoxBorder call UpdateSprites pop hl ld a, [hli] - and a - ld bc, $16 - jr z, .asm_75ca - ld bc, $2a -.asm_75ca + 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] @@ -1488,61 +1577,69 @@ DisplayYesNoTextBox: ; 7559 (1:7559) add hl, bc call PlaceString ld hl, wd730 - res 6, [hl] - ld a, [wd12c] - cp $7 - jr nz, .asm_7603 + 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 [wd12c], a + ld [wTwoOptionMenuID], a ld a, [wFlags_0xcd60] push af push hl ld hl, wFlags_0xcd60 bit 5, [hl] - set 5, [hl] + set 5, [hl] ; don't play sound when A or B is pressed in menu pop hl -.asm_75f0 +.noYesMenuInputLoop call HandleMenuInput - bit 1, a - jr nz, .asm_75f0 + 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 .asm_760f -.asm_7603 + jr .pressedAButton +.notNoYesMenu xor a - ld [wd12c], a + ld [wTwoOptionMenuID], a call HandleMenuInput pop hl - bit 1, a - jr nz, .asm_7627 -.asm_760f - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + 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, .asm_7627 + jr nz, .choseSecondMenuItem +; chose first menu item ld a, $1 ld [wd12e], a - ld c, $f + ld c, 15 call DelayFrames - call Func_7656 + call TwoOptionMenu_RestoreScreenTiles and a ret -.asm_7627 +.choseSecondMenuItem ld a, $1 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld [wd12d], a ld a, $2 ld [wd12e], a - ld c, $f + ld c, 15 call DelayFrames - call Func_7656 + call TwoOptionMenu_RestoreScreenTiles scf ret -Func_763e: ; 763e (1:763e) +; 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 @@ -1552,7 +1649,7 @@ Func_763e: ; 763e (1:763e) dec c jr nz, .asm_7644 push bc - ld bc, $e + ld bc, 14 add hl, bc pop bc ld c, $6 @@ -1560,7 +1657,7 @@ Func_763e: ; 763e (1:763e) jr nz, .asm_7644 ret -Func_7656: ; 7656 (1:7656) +TwoOptionMenu_RestoreScreenTiles: ; 7656 (1:7656) ld de, wHPBarMaxHP ld bc, $506 .asm_765c @@ -1579,7 +1676,12 @@ Func_7656: ; 7656 (1:7656) call UpdateSprites ret -MenuStrings: ; 7671 (1:7671) +; 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 5,3,0 @@ -1612,9 +1714,9 @@ MenuStrings: ; 7671 (1:7671) .HealCancelMenu ; 76d5 (1:36d5) db "HEAL",$4E,"CANCEL@" -Func_76e1: ; 76e1 (1:36e1) +DisplayFieldMoveMonMenu: ; 76e1 (1:36e1) xor a - ld hl, wWhichTrade ; wWhichTrade + ld hl, wWhichTrade ld [hli], a ld [hli], a ld [hli], a @@ -1633,7 +1735,7 @@ Func_76e1: ; 76e1 (1:36e1) ld a, $c ld [$fff7], a hlCoord 13, 12 - ld de, PokemonMenuEntries ; $77c2 + ld de, PokemonMenuEntries jp PlaceString .asm_770f push af @@ -1674,10 +1776,10 @@ Func_76e1: ; 76e1 (1:36e1) jr nz, .asm_7747 xor a ld [wTrainerScreenX], a - ld de, wWhichTrade ; wWhichTrade + ld de, wWhichTrade .asm_7752 push hl - ld hl, FieldMoveNames ; $778d + ld hl, FieldMoveNames ld a, [de] and a jr z, .asm_7776 @@ -1713,7 +1815,7 @@ Func_76e1: ; 76e1 (1:36e1) ld e, a ld d, $0 add hl, de - ld de, PokemonMenuEntries ; $77c2 + ld de, PokemonMenuEntries jp PlaceString FieldMoveNames: ; 778d (1:778d) @@ -1733,14 +1835,14 @@ PokemonMenuEntries: ; 77c2 (1:77c2) next "CANCEL@" GetMonFieldMoves: ; 77d6 (1:77d6) - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMon1Moves ; wPartyMon1Moves + ld a, [wWhichPokemon] + ld hl, wPartyMon1Moves ld bc, $2c call AddNTimes ld d, h ld e, l ld c, $5 - ld hl, wWhichTrade ; wWhichTrade + ld hl, wWhichTrade .asm_77e9 push hl .asm_77ea @@ -1751,7 +1853,7 @@ GetMonFieldMoves: ; 77d6 (1:77d6) jr z, .asm_7821 ld b, a inc de ; go to next move - ld hl, FieldMoveDisplayData ; $7823 + ld hl, FieldMoveDisplayData .asm_77f6 ld a, [hli] cp $ff @@ -1920,7 +2022,7 @@ Func_7c18: ; 7c18 (1:7c18) ld hl, wPokedexSeen predef FlagActionPredef ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret @@ -1932,57 +2034,58 @@ INCLUDE "data/map_songs.asm" INCLUDE "data/map_header_banks.asm" -Func_c335: ; c335 (3:4335) +ClearVariablesAfterLoadingMapData: ; c335 (3:4335) ld a, $90 - ld [$ffb0], a - ld [rWY], a ; $ff4a + ld [hWY], a + ld [rWY], a xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld [wd13b], 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, wd73f + ld hl, wCardKeyDoorY ld [hli], a ld [hl], a - ld hl, wWhichTrade ; wWhichTrade + ld hl, wWhichTrade ld bc, $1e call FillMemory ret -Func_c35f: ; c35f (3:435f) - ld a, [wd3ae] +; 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, wd3af -.asm_c368 - ld a, [W_YCOORD] ; wd361 + ld hl, wWarpEntries +.loop + ld a, [W_YCOORD] cp [hl] - jr nz, .asm_c383 + jr nz, .nextWarp1 inc hl - ld a, [W_XCOORD] ; wd362 + ld a, [W_XCOORD] cp [hl] - jr nz, .asm_c384 + jr nz, .nextWarp2 inc hl - ld a, [hli] - ld [wd42f], a - ld a, [hl] - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld a, [hli] ; target warp + ld [wDestinationWarpID], a + ld a, [hl] ; target map + ld [$ff8b], a ld hl, wd736 - set 2, [hl] + set 2, [hl] ; standing on warp flag ret -.asm_c383 +.nextWarp1 inc hl -.asm_c384 +.nextWarp2 inc hl inc hl inc hl dec c - jr nz, .asm_c368 + jr nz, .loop ret CheckForceBikeOrSurf: ; c38b (3:438b) @@ -2022,8 +2125,8 @@ CheckForceBikeOrSurf: ; c38b (3:438b) ld hl, wd732 set 5, [hl] ld a, $1 - ld [wd700], a - ld [wd11a], a + ld [wWalkBikeSurfState], a + ld [wWalkBikeSurfStateCopy], a jp ForceBikeOrSurf .incorrectMap inc hl @@ -2032,30 +2135,30 @@ CheckForceBikeOrSurf: ; c38b (3:438b) jr .loop .forceSurfing ld a, $2 - ld [wd700], a - ld [wd11a], a + ld [wWalkBikeSurfState], a + ld [wWalkBikeSurfStateCopy], a jp ForceBikeOrSurf INCLUDE "data/force_bike_surf.asm" -Func_c3ff: ; c3ff (3:43ff) +IsPlayerFacingEdgeOfMap: ; c3ff (3:43ff) push hl push de push bc - ld a, [wSpriteStateData1 + 9] + ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction srl a ld c, a ld b, $0 - ld hl, PointerTable_c422 ; $4422 + ld hl, .functionPointerTable add hl, bc ld a, [hli] ld h, [hl] ld l, a - ld a, [W_YCOORD] ; wd361 + ld a, [W_YCOORD] ld b, a - ld a, [W_XCOORD] ; wd362 + ld a, [W_XCOORD] ld c, a - ld de, .asm_c41e ; $441e + ld de, .asm_c41e push de jp [hl] .asm_c41e @@ -2064,34 +2167,34 @@ Func_c3ff: ; c3ff (3:43ff) pop hl ret -PointerTable_c422: ; c422 (3:4422) - dw .asm_c42a - dw .asm_4434 - dw .asm_443A - dw .asm_4440 +.functionPointerTable + dw .facingDown + dw .facingUp + dw .facingLeft + dw .facingRight -.asm_c42a - ld a, [W_CURMAPHEIGHT] ; wd368 +.facingDown + ld a, [W_CURMAPHEIGHT] add a dec a cp b jr z, .setCarry jr .resetCarry -.asm_4434 +.facingUp ld a, b and a jr z, .setCarry jr .resetCarry -.asm_443A +.facingLeft ld a, c and a jr z, .setCarry jr .resetCarry -.asm_4440 - ld a, [W_CURMAPWIDTH] ; wd369 +.facingRight + ld a, [W_CURMAPWIDTH] add a dec a cp c @@ -2104,71 +2207,71 @@ PointerTable_c422: ; c422 (3:4422) scf ret -Func_c44e: ; c44e (3:444e) +IsWarpTileInFrontOfPlayer: ; c44e (3:444e) push hl push de push bc - call Func_c589 - ld a, [W_CURMAP] ; W_CURMAP + call _GetTileAndCoordsInFrontOfPlayer + ld a, [W_CURMAP] cp SS_ANNE_5 jr z, .ssAnne5 - ld a, [wSpriteStateData1 + 9] + ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction srl a ld c, a - ld b, $0 - ld hl, .pointerTable_c477 ; $4477 + ld b, 0 + ld hl, .warpTileListPointers add hl, bc ld a, [hli] ld h, [hl] ld l, a - ld a, [wcfc6] + ld a, [wTileInFrontOfPlayer] ld de, $1 call IsInArray -.asm_c473 +.done pop bc pop de pop hl ret -.pointerTable_c477: ; c477 (3:4477) - dw .arrayData_c47f - dw .arrayData_c487 - dw .arrayData_c48a - dw .arrayData_c48d +.warpTileListPointers: ; c477 (3:4477) + dw .facingDownWarpTiles + dw .facingUpWarpTiles + dw .facingLeftWarpTiles + dw .facingRightWarpTiles -.arrayData_c47f +.facingDownWarpTiles db $01,$12,$17,$3D,$04,$18,$33,$FF -.arrayData_c487 +.facingUpWarpTiles db $01,$5C,$FF -.arrayData_c48a +.facingLeftWarpTiles db $1A,$4B,$FF -.arrayData_c48d +.facingRightWarpTiles db $0F,$4E,$FF .ssAnne5 - ld a, [wcfc6] + ld a, [wTileInFrontOfPlayer] cp $15 - jr nz, .asm_c49a + jr nz, .notSSAnne5Warp scf - jr .asm_c473 -.asm_c49a + jr .done +.notSSAnne5Warp and a - jr .asm_c473 + jr .done -Func_c49d: ; c49d (3:449d) +IsPlayerStandingOnDoorTileOrWarpTile: ; c49d (3:449d) push hl push de push bc - callba HandleDoors - jr c, .asm_c4c8 - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + callba IsPlayerStandingOnDoorTile + jr c, .done + ld a, [W_CURMAPTILESET] add a ld c, a ld b, $0 - ld hl, WarpTileIDPointers ; $44cc + ld hl, WarpTileIDPointers add hl, bc ld a, [hli] ld h, [hl] @@ -2176,10 +2279,10 @@ Func_c49d: ; c49d (3:449d) ld de, $1 aCoord 8, 9 call IsInArray - jr nc, .asm_c4c8 + jr nc, .done ld hl, wd736 res 2, [hl] -.asm_c4c8 +.done pop bc pop de pop hl @@ -2225,223 +2328,237 @@ SafariSteps: ; c579 (3:4579) SafariBallText: ; c57e (3:457e) db "BALL×× @" -Func_c586: ; c586 (3:4586) +GetTileAndCoordsInFrontOfPlayer: ; c586 (3:4586) call GetPredefRegisters -Func_c589: ; c589 (3:4589) - ld a, [W_YCOORD] ; wd361 +_GetTileAndCoordsInFrontOfPlayer: ; c589 (3:4589) + ld a, [W_YCOORD] ld d, a - ld a, [W_XCOORD] ; wd362 + ld a, [W_XCOORD] ld e, a - ld a, [wSpriteStateData1 + 9] + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction and a - jr nz, .asm_c59d + jr nz, .notFacingDown +; facing down aCoord 8, 11 inc d - jr .asm_c5b9 -.asm_c59d - cp $4 - jr nz, .asm_c5a7 + jr .storeTile +.notFacingDown + cp SPRITE_FACING_UP + jr nz, .notFacingUp +; facing up aCoord 8, 7 dec d - jr .asm_c5b9 -.asm_c5a7 - cp $8 - jr nz, .asm_c5b1 + jr .storeTile +.notFacingUp + cp SPRITE_FACING_LEFT + jr nz, .notFacingLeft +; facing left aCoord 6, 9 dec e - jr .asm_c5b9 -.asm_c5b1 - cp $c - jr nz, .asm_c5b9 + jr .storeTile +.notFacingLeft + cp SPRITE_FACING_RIGHT + jr nz, .storeTile +; facing right aCoord 10, 9 inc e -.asm_c5b9 +.storeTile ld c, a - ld [wcfc6], a + ld [wTileInFrontOfPlayer], a ret -Func_c5be: ; c5be (3:45be) +GetTileTwoStepsInFrontOfPlayer: ; c5be (3:45be) xor a ld [$ffdb], a - ld hl, W_YCOORD ; wd361 + ld hl, W_YCOORD ld a, [hli] ld d, a ld e, [hl] - ld a, [wSpriteStateData1 + 9] + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction and a - jr nz, .asm_c5d8 + jr nz, .notFacingDown +; facing down ld hl, $ffdb set 0, [hl] aCoord 8, 13 inc d - jr .asm_c603 -.asm_c5d8 - cp $4 - jr nz, .asm_c5e7 + jr .storeTile +.notFacingDown + cp SPRITE_FACING_UP + jr nz, .notFacingUp +; facing up ld hl, $ffdb set 1, [hl] aCoord 8, 5 dec d - jr .asm_c603 -.asm_c5e7 - cp $8 - jr nz, .asm_c5f6 + jr .storeTile +.notFacingUp + cp SPRITE_FACING_LEFT + jr nz, .notFacingLeft +; facing left ld hl, $ffdb set 2, [hl] aCoord 4, 9 dec e - jr .asm_c603 -.asm_c5f6 - cp $c - jr nz, .asm_c603 + jr .storeTile +.notFacingLeft + cp SPRITE_FACING_RIGHT + jr nz, .storeTile +; facing right ld hl, $ffdb set 3, [hl] aCoord 12, 9 inc e -.asm_c603 +.storeTile ld c, a - ld [wd71c], a - ld [wcfc6], a + ld [wTileInFrontOfBoulderAndBoulderCollisionResult], a + ld [wTileInFrontOfPlayer], a ret -Func_c60b: ; c60b (3:460b) - call Func_c5be +CheckForCollisionWhenPushingBoulder: ; c60b (3:460b) + call GetTileTwoStepsInFrontOfPlayer ld hl, W_TILESETCOLLISIONPTR ld a, [hli] ld h, [hl] ld l, a -.asm_c614 +.loop ld a, [hli] cp $ff - jr z, .asm_c632 + jr z, .done ; if the tile two steps ahead is not passable cp c - jr nz, .asm_c614 - ld hl, $c7e - call Func_c44 + jr nz, .loop + ld hl, TilePairCollisionsLand + call CheckForTilePairCollisions2 ld a, $ff - jr c, .asm_c632 - ld a, [wd71c] - cp $15 + 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, .asm_c632 - call Func_c636 -.asm_c632 - ld [wd71c], a + jr z, .done ; if the tile two steps ahead is stairs + call CheckForBoulderCollisionWithSprites +.done + ld [wTileInFrontOfBoulderAndBoulderCollisionResult], a ret -Func_c636: ; c636 (3:4636) - ld a, [wd718] +; 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 d, 0 ld e, a ld hl, wSpriteStateData2 + $14 add hl, de - ld a, [hli] + ld a, [hli] ; map Y position ld [$ffdc], a - ld a, [hl] + ld a, [hl] ; map X position ld [$ffdd], a - ld a, [W_NUMSPRITES] ; W_NUMSPRITES + ld a, [W_NUMSPRITES] ld c, a ld de, $f ld hl, wSpriteStateData2 + $14 ld a, [$ffdb] - and $3 - jr z, .asm_c678 -.asm_c659 + and $3 ; facing up or down? + jr z, .pushingHorizontallyLoop +.pushingVerticallyLoop inc hl ld a, [$ffdd] cp [hl] - jr nz, .asm_c672 + jr nz, .nextSprite1 ; if X coordinates don't match dec hl ld a, [hli] ld b, a ld a, [$ffdb] rrca - jr c, .asm_c66c + jr c, .pushingDown +; pushing up ld a, [$ffdc] dec a - jr .asm_c66f -.asm_c66c + jr .compareYCoords +.pushingDown ld a, [$ffdc] inc a -.asm_c66f +.compareYCoords cp b - jr z, .asm_c697 -.asm_c672 + jr z, .failure +.nextSprite1 dec c - jr z, .asm_c69a + jr z, .success add hl, de - jr .asm_c659 -.asm_c678 + jr .pushingVerticallyLoop +.pushingHorizontallyLoop ld a, [hli] ld b, a ld a, [$ffdc] cp b - jr nz, .asm_c691 + jr nz, .nextSprite2 ld b, [hl] ld a, [$ffdb] bit 2, a - jr nz, .asm_c68b + jr nz, .pushingLeft +; pushing right ld a, [$ffdd] inc a - jr .asm_c68e -.asm_c68b + jr .compareXCoords +.pushingLeft ld a, [$ffdd] dec a -.asm_c68e +.compareXCoords cp b - jr z, .asm_c697 -.asm_c691 + jr z, .failure +.nextSprite2 dec c - jr z, .asm_c69a + jr z, .success add hl, de - jr .asm_c678 -.asm_c697 + jr .pushingHorizontallyLoop +.failure ld a, $ff ret -.asm_c69a +.success xor a ret -Func_c69c: ; c69c (3:469c) +ApplyOutOfBattlePoisonDamage: ; c69c (3:469c) ld a, [wd730] add a - jp c, .asm_c74f - ld a, [wPartyCount] ; wPartyCount + jp c, .noBlackOut ; no black out if joypad states are being simulated + ld a, [wPartyCount] and a - jp z, .asm_c74f - call Func_c8de - ld a, [wd13b] - and $3 - jp nz, .asm_c74f - ld [wWhichPokemon], a ; wWhichPokemon - ld hl, wPartyMon1Status ; wPartyMon1Status - ld de, wPartySpecies ; wPartySpecies -.asm_c6be + 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 $8 - jr z, .asm_c6fd + 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, .asm_c6fb + jr z, .nextMon ; already fainted +; subtract 1 from HP ld a, [hl] dec a ld [hld], a inc a - jr nz, .asm_c6d5 + jr nz, .noBorrow +; borrow 1 from upper byte of HP dec [hl] inc hl - jr .asm_c6fb -.asm_c6d5 + jr .nextMon +.noBorrow ld a, [hli] or [hl] - jr nz, .asm_c6fb + jr nz, .nextMon ; didn't faint from damage +; the mon fainted from the damage push hl inc hl inc hl @@ -2449,134 +2566,134 @@ Func_c69c: ; c69c (3:469c) ld a, [de] ld [wd11e], a push de - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMonNicks ; wPartyMonNicks + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName xor a ld [wJoyIgnore], a call EnableAutoTextBoxDrawing ld a, $d0 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [$ff8c], a call DisplayTextID pop de pop hl -.asm_c6fb +.nextMon inc hl inc hl -.asm_c6fd +.nextMon2 inc de ld a, [de] inc a - jr z, .asm_c70e - ld bc, $2c + jr z, .applyDamageLoopDone + ld bc, wPartyMon2 - wPartyMon1 add hl, bc push hl - ld hl, wWhichPokemon ; wWhichPokemon + ld hl, wWhichPokemon inc [hl] pop hl - jr .asm_c6be -.asm_c70e - ld hl, wPartyMon1Status ; wPartyMon1Status - ld a, [wPartyCount] ; wPartyCount + jr .applyDamageLoop +.applyDamageLoopDone + ld hl, wPartyMon1Status + ld a, [wPartyCount] ld d, a - ld e, $0 -.asm_c717 + ld e, 0 +.countPoisonedLoop ld a, [hl] - and $8 + and (1 << PSN) or e ld e, a - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 add hl, bc dec d - jr nz, .asm_c717 + jr nz, .countPoisonedLoop ld a, e - and a - jr z, .asm_c733 + and a ; are any party members poisoned? + jr z, .skipPoisonEffectAndSound ld b, $2 - predef Func_480eb + predef ChangeBGPalColor0_4Frames ; change BG white to dark grey for 4 frames ld a, (SFX_02_43 - SFX_Headers_02) / 3 call PlaySound -.asm_c733 +.skipPoisonEffectAndSound predef AnyPartyAlive ld a, d and a - jr nz, .asm_c74f + jr nz, .noBlackOut call EnableAutoTextBoxDrawing ld a, $d1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [$ff8c], a call DisplayTextID ld hl, wd72e set 5, [hl] ld a, $ff - jr .asm_c750 -.asm_c74f + jr .done +.noBlackOut xor a -.asm_c750 +.done ld [wd12d], a ret -Func_c754: ; c754 (3:4754) +LoadTilesetHeader: ; c754 (3:4754) call GetPredefRegisters push hl - ld d, $0 - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld d, 0 + ld a, [W_CURMAPTILESET] add a add a ld b, a add a - add b - jr nc, .asm_c765 + add b ; a = tileset * 12 + jr nc, .noCarry inc d -.asm_c765 +.noCarry ld e, a ld hl, Tilesets add hl, de ld de, W_TILESETBANK ld c, $b -.asm_c76f +.copyTilesetHeaderLoop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_c76f + jr nz, .copyTilesetHeaderLoop ld a, [hl] - ld [$ffd7], a + ld [hTilesetType], a xor a ld [$ffd8], a pop hl - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld a, [W_CURMAPTILESET] push hl push de - ld hl, DungeonTilesets ; $47b2 + ld hl, DungeonTilesets ld de, $1 call IsInArray pop de pop hl jr c, .asm_c797 - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld a, [W_CURMAPTILESET] ld b, a - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b + ld a, [$ff8b] cp b - jr z, .asm_c7b1 + jr z, .done .asm_c797 - ld a, [wd42f] + ld a, [wDestinationWarpID] cp $ff - jr z, .asm_c7b1 + jr z, .done call LoadDestinationWarpPosition - ld a, [W_YCOORD] ; wd361 + ld a, [W_YCOORD] and $1 - ld [W_YBLOCKCOORD], a ; wd363 - ld a, [W_XCOORD] ; wd362 + ld [W_YBLOCKCOORD], a + ld a, [W_XCOORD] and $1 - ld [W_XBLOCKCOORD], a ; wd364 -.asm_c7b1 + ld [W_XBLOCKCOORD], a +.done ret INCLUDE "data/dungeon_tilesets.asm" INCLUDE "data/tileset_headers.asm" -Func_c8de: ; c8de (3:48de) +IncrementDayCareMonExp: ; c8de (3:48de) ld a, [W_DAYCARE_IN_USE] and a ret z @@ -2964,10 +3081,14 @@ DrawBadges: ; ea03 (3:6a03) GymLeaderFaceAndBadgeTileGraphics: ; ea9e (3:6a9e) INCBIN "gfx/badges.2bpp" -Func_ee9e: ; ee9e (3:6e9e) +; 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] ; wd369 + ld a, [W_CURMAPWIDTH] add $6 ld e, a ld d, $0 @@ -2979,21 +3100,22 @@ Func_ee9e: ; ee9e (3:6e9e) ld e, a ld a, b and a - jr z, .asm_eebb -.asm_eeb7 + jr z, .addX +; add width * Y +.addWidthYTimesLoop add hl, de dec b - jr nz, .asm_eeb7 -.asm_eebb - add hl, bc - ld a, [wd09f] + jr nz, .addWidthYTimesLoop +.addX + add hl, bc ; add X + ld a, [wNewTileBlockID] ld [hl], a - ld a, [wd35f] + ld a, [wCurrentTileBlockMapViewPointer] ld c, a - ld a, [wd360] + ld a, [wCurrentTileBlockMapViewPointer + 1] ld b, a - call Func_ef4e - ret c + 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 @@ -3004,27 +3126,27 @@ Func_ee9e: ; ee9e (3:6e9e) add hl, de add hl, bc pop bc - call Func_ef4e - ret c + call CompareHLWithBC + ret c ; return if the replaced tile block is above the map view in memory -Func_eedc: ; eedc (3:6edc) +RedrawMapView: ; eedc (3:6edc) ld a, [W_ISINBATTLE] ; W_ISINBATTLE inc a ret z - ld a, [H_AUTOBGTRANSFERENABLED] ; $ffba + ld a, [H_AUTOBGTRANSFERENABLED] push af - ld a, [$ffd7] + ld a, [hTilesetType] push af xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld [$ffd7], a + ld [H_AUTOBGTRANSFERENABLED], a + ld [hTilesetType], a ; no flower/water BG tile animations call LoadCurrentMapView call GoPAL_SET_CF1C - ld hl, wd526 + ld hl, wMapViewVRAMPointer ld a, [hli] ld h, [hl] ld l, a - ld de, $ffc0 + ld de, -2 * 32 add hl, de ld a, h and $3 @@ -3033,21 +3155,21 @@ Func_eedc: ; eedc (3:6edc) ld [wHPBarMaxHP], a ld a, h ld [wHPBarMaxHP + 1], a - ld a, $2 + ld a, 2 ld [$ffbe], a - ld c, $9 -.asm_ef0f + ld c, 9 ; number of rows of 2x2 tiles (this covers the whole screen) +.redrawRowLoop push bc push hl push hl - ld hl, wOAMBuffer + $78 - ld de, $14 + ld hl, wTileMap - 2 * 20 + ld de, 20 ld a, [$ffbe] .asm_ef1a add hl, de dec a jr nz, .asm_ef1a - call ScheduleRowRedrawHelper + call CopyToScreenEdgeTiles pop hl ld de, $20 ld a, [$ffbe] @@ -3059,11 +3181,11 @@ Func_eedc: ; eedc (3:6edc) or $98 dec c jr nz, .asm_ef28 - ld [$ffd2], a + ld [H_SCREENEDGEREDRAWADDR + 1], a ld a, l - ld [H_SCREENEDGEREDRAWADDR], a ; $ffd1 - ld a, $2 - ld [H_SCREENEDGEREDRAW], a ; $ffd0 + ld [H_SCREENEDGEREDRAWADDR], a + ld a, REDRAWROW + ld [H_SCREENEDGEREDRAW], a call DelayFrame ld hl, $ffbe inc [hl] @@ -3071,14 +3193,14 @@ Func_eedc: ; eedc (3:6edc) pop hl pop bc dec c - jr nz, .asm_ef0f + jr nz, .redrawRowLoop pop af - ld [$ffd7], a + ld [hTilesetType], a pop af - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ret -Func_ef4e: ; ef4e (3:6f4e) +CompareHLWithBC: ; ef4e (3:6f4e) ld a, h sub b ret nz @@ -3088,8 +3210,8 @@ Func_ef4e: ; ef4e (3:6f4e) INCLUDE "engine/overworld/cut.asm" -Func_f113: ; f113 (3:7113) - ld a, [W_CURMAP] ; W_CURMAP +MarkTownVisitedAndLoadMissableObjects: ; f113 (3:7113) + ld a, [W_CURMAP] cp ROUTE_1 jr nc, .notInTown ld c, a @@ -3098,15 +3220,16 @@ Func_f113: ; f113 (3:7113) predef FlagActionPredef .notInTown ld hl, MapHSPointers - ld a, [W_CURMAP] ; W_CURMAP + 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 -Func_f132: ; f132 (3:7132) +LoadMissableObjects: ; f132 (3:7132) ld l, a push hl ld de, MapHS00 ; calculate difference between out pointer and the base pointer @@ -3303,70 +3426,71 @@ MissableObjectFlagAction: ld c, a ret -Func_f225: ; f225 (3:7225) +TryPushingBoulder: ; f225 (3:7225) ld a, [wd728] - bit 0, a + bit 0, a ; using Strength? ret z ld a, [wFlags_0xcd60] - bit 1, a + bit 1, a ; has boulder dust animation from previous push played yet? ret nz xor a - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [$ff8c], a call IsSpriteInFrontOfPlayer - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c - ld [wd718], a + ld a, [$ff8c] + ld [wBoulderSpriteIndex], a and a - jp z, Func_f2dd + jp z, ResetBoulderPushFlags ld hl, wSpriteStateData1 + 1 ld d, $0 - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c + ld a, [$ff8c] swap a ld e, a add hl, de res 7, [hl] call GetSpriteMovementByte2Pointer ld a, [hl] - cp $10 - jp nz, Func_f2dd + cp BOULDER_MOVEMENT_BYTE_2 + jp nz, ResetBoulderPushFlags ld hl, wFlags_0xcd60 bit 6, [hl] - set 6, [hl] - ret z + 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 Func_c60b - ld a, [wd71c] - and a - jp nz, Func_f2dd + predef CheckForCollisionWhenPushingBoulder + ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult] + and a ; was there a collision? + jp nz, ResetBoulderPushFlags ld a, [hJoyHeld] ld b, a - ld a, [wSpriteStateData1 + 9] - cp $4 - jr z, .asm_f289 - cp $8 - jr z, .asm_f291 - cp $c - jr z, .asm_f299 + 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, MovementData_f2af - jr .asm_f29f -.asm_f289 + ld de, PushBoulderDownMovementData + jr .done +.pushBoulderUp bit 6, b ret z - ld de, MovementData_f2ad - jr .asm_f29f -.asm_f291 + ld de, PushBoulderUpMovementData + jr .done +.pushBoulderLeft bit 5, b ret z - ld de, MovementData_f2b1 - jr .asm_f29f -.asm_f299 + ld de, PushBoulderLeftMovementData + jr .done +.pushBoulderRight bit 4, b ret z - ld de, MovementData_f2b3 -.asm_f29f + ld de, PushBoulderRightMovementData +.done call MoveSprite ld a, (SFX_02_53 - SFX_Headers_02) / 3 call PlaySound @@ -3374,35 +3498,35 @@ Func_f225: ; f225 (3:7225) set 1, [hl] ret -MovementData_f2ad: ; f2ad (3:72ad) - db $40,$FF +PushBoulderUpMovementData: ; f2ad (3:72ad) + db NPC_MOVEMENT_UP,$FF -MovementData_f2af: ; f2af (3:72af) - db $00,$FF +PushBoulderDownMovementData: ; f2af (3:72af) + db NPC_MOVEMENT_DOWN,$FF -MovementData_f2b1: ; f2b1 (3:72b1) - db $80,$FF +PushBoulderLeftMovementData: ; f2b1 (3:72b1) + db NPC_MOVEMENT_LEFT,$FF -MovementData_f2b3: ; f2b3 (3:72b3) - db $C0,$FF +PushBoulderRightMovementData: ; f2b3 (3:72b3) + db NPC_MOVEMENT_RIGHT,$FF -Func_f2b5: ; f2b5 (3:72b5) +DoBoulderDustAnimation: ; f2b5 (3:72b5) ld a, [wd730] bit 0, a ret nz - callab Func_79f54 + callab AnimateBoulderDust call DiscardButtonPresses ld [wJoyIgnore], a - call Func_f2dd + call ResetBoulderPushFlags set 7, [hl] - ld a, [wd718] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld a, [wBoulderSpriteIndex] + ld [H_SPRITEINDEX], a call GetSpriteMovementByte2Pointer ld [hl], $10 ld a, (SFX_02_56 - SFX_Headers_02) / 3 jp PlaySound -Func_f2dd: ; f2dd (3:72dd) +ResetBoulderPushFlags: ; f2dd (3:72dd) ld hl, wFlags_0xcd60 res 1, [hl] res 6, [hl] @@ -3417,7 +3541,7 @@ _AddPartyMon: ; f2e5 (3:72e5) .asm_f2f2 ld a, [de] inc a - cp $7 + cp PARTY_LENGTH + 1 ret nc ld [de], a ld a, [de] @@ -3679,7 +3803,7 @@ AddPartyMon_WriteMovePP: ; f476 (3:7476) _AddEnemyMonToPlayerParty: ; f49d (3:749d) ld hl, wPartyCount ld a, [hl] - cp $6 + cp PARTY_LENGTH scf ret z ; party full, return failure inc a @@ -3697,8 +3821,8 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d) call AddNTimes ld e, l ld d, h - ld hl, wcf98 - call CopyData ; write new mon's data (from wcf98) + ld hl, wLoadedMon + call CopyData ; write new mon's data (from wLoadedMon) ld hl, wPartyMonOT ld a, [wPartyCount] dec a @@ -3748,13 +3872,13 @@ Func_f51e: ; f51e (3:751e) jr z, .asm_f575 ld hl, W_NUMINBOX ; wda80 ld a, [hl] - cp $14 + cp MONS_PER_BOX jr nz, .partyOrBoxNotFull jr .boxFull .checkPartyMonSlots ld hl, wPartyCount ; wPartyCount ld a, [hl] - cp $6 + cp PARTY_LENGTH jr nz, .partyOrBoxNotFull .boxFull scf @@ -3893,11 +4017,11 @@ Func_f51e: ; f51e (3:751e) add $2 ld [wcc49], a call LoadMonData - callba Func_58f43 + callba CalcLevelFromExperience ld a, d ld [W_CURENEMYLVL], a ; W_CURENEMYLVL pop hl - ld bc, $21 + ld bc, wBoxMon2 - wBoxMon1 add hl, bc ld [hli], a ld d, h @@ -4375,20 +4499,19 @@ IsItemInBag_: ; f8a5 (3:78a5) ld b, $0 ret -Func_f8ba: ; f8ba (3:78ba) +FindPathToPlayer: ; f8ba (3:78ba) xor a ld hl, $ff97 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wcc97 + ld hl, wNPCMovementDirections2 ld de, $0 - -Func_f8c8: ; f8c8 (3:78c8) - ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) +.loop + ld a, [$ff99] ld b, a - ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld a, [$ff95] ; Y distance in steps call CalcDifference ld d, a and a @@ -4399,7 +4522,7 @@ Func_f8c8: ; f8c8 (3:78c8) .asm_f8da ld a, [$ff9a] ld b, a - ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND) + ld a, [$ff96] ; X distance in steps call CalcDifference ld e, a and a @@ -4410,17 +4533,17 @@ Func_f8c8: ; f8c8 (3:78c8) .asm_f8ec ld a, [$ff98] cp $3 - jr z, .asm_f926 + jr z, .done ld a, e cp d jr c, .asm_f90a ld a, [$ff9d] bit 1, a jr nz, .asm_f900 - ld d, $c0 + ld d, NPC_MOVEMENT_RIGHT jr .asm_f902 .asm_f900 - ld d, $80 + ld d, NPC_MOVEMENT_LEFT .asm_f902 ld a, [$ff9a] add $1 @@ -4430,91 +4553,93 @@ Func_f8c8: ; f8c8 (3:78c8) ld a, [$ff9d] bit 0, a jr nz, .asm_f914 - ld d, $0 + ld d, NPC_MOVEMENT_DOWN jr .asm_f916 .asm_f914 - ld d, $40 + ld d, NPC_MOVEMENT_UP .asm_f916 - ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld a, [$ff99] add $1 - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [$ff99], a .asm_f91c ld a, d ld [hli], a ld a, [$ff97] inc a ld [$ff97], a - jp Func_f8c8 -.asm_f926 + jp .loop +.done ld [hl], $ff ret -Func_f929: ; f929 (3:7929) +CalcPositionOfPlayerRelativeToNPC: ; f929 (3:7929) xor a ld [$ff9d], a - ld a, [wSpriteStateData1 + 4] + ld a, [wSpriteStateData1 + 4] ; player's sprite screen Y position in pixels ld d, a - ld a, [wSpriteStateData1 + 6] + ld a, [wSpriteStateData1 + 6] ; player's sprite screen X position in pixels ld e, a ld hl, wSpriteStateData1 - ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld a, [$ff95] ; sprite offset add l add $4 ld l, a - jr nc, .asm_f940 + jr nc, .noCarry inc h -.asm_f940 +.noCarry ld a, d ld b, a - ld a, [hli] + ld a, [hli] ; NPC sprite screen Y position in pixels call CalcDifference - jr nc, .asm_f953 + jr nc, .NPCSouthOfOrAlignedWithPlayer +.NPCNorthOfPlayer push hl ld hl, $ff9d bit 0, [hl] set 0, [hl] pop hl - jr .asm_f95c -.asm_f953 + jr .divideYDistance +.NPCSouthOfOrAlignedWithPlayer push hl ld hl, $ff9d bit 0, [hl] res 0, [hl] pop hl -.asm_f95c +.divideYDistance push hl ld hl, $ffe5 ld [hli], a - ld a, $10 + ld a, 16 ld [hli], a - call Func_366b - ld a, [hl] - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + 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] + ld a, [hl] ; NPC sprite screen X position in pixels call CalcDifference - jr nc, .asm_f97e + jr nc, .NPCEastOfOrAlignedWithPlayer +.NPCWestOfPlayer push hl ld hl, $ff9d bit 1, [hl] set 1, [hl] pop hl - jr .asm_f987 -.asm_f97e + jr .divideXDistance +.NPCEastOfOrAlignedWithPlayer push hl ld hl, $ff9d bit 1, [hl] res 1, [hl] pop hl -.asm_f987 +.divideXDistance ld [$ffe5], a - ld a, $10 + ld a, 16 ld [$ffe6], a - call Func_366b - ld a, [$ffe7] - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) + call DivideBytes ; divide X absolute distance by 16 + ld a, [$ffe7] ; quotient + ld [$ff96], a ld a, [$ff9b] and a ret z @@ -4524,47 +4649,51 @@ Func_f929: ; f929 (3:7929) ld [$ff9d], a ret -Func_f9a0: ; f9a0 (3:79a0) +ConvertNPCMovementDirectionsToJoypadMasks: ; f9a0 (3:79a0) ld a, [$ff95] - ld [wcd37], a + ld [wNPCMovementDirections2Index], a dec a - ld de, wccd3 - ld hl, wcc97 + ld de, wSimulatedJoypadStatesEnd + ld hl, wNPCMovementDirections2 add l ld l, a - jr nc, .asm_f9b1 + jr nc, .loop inc h -.asm_f9b1 +.loop ld a, [hld] - call Func_f9bf + call ConvertNPCMovementDirectionToJoypadMask ld [de], a inc de ld a, [$ff95] dec a ld [$ff95], a - jr nz, .asm_f9b1 + jr nz, .loop ret -Func_f9bf: ; f9bf (3:79bf) +ConvertNPCMovementDirectionToJoypadMask: ; f9bf (3:79bf) push hl ld b, a - ld hl, DataTable_f9d2 -.asm_f9c4 + ld hl, NPCMovementDirectionsToJoypadMasksTable +.loop ld a, [hli] cp $ff - jr z, .asm_f9d0 + jr z, .done cp b - jr z, .asm_f9cf + jr z, .loadJoypadMask inc hl - jr .asm_f9c4 -.asm_f9cf + jr .loop +.loadJoypadMask ld a, [hl] -.asm_f9d0 +.done pop hl ret -DataTable_f9d2: ; f9d2 (3:79d2) - db $40, $40, $00, $80, $80, $20, $c0, $10, $ff +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 @@ -4940,6 +5069,12 @@ 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" @@ -5770,7 +5905,11 @@ 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" @@ -6222,10 +6361,10 @@ SECTION "bank1A",ROMX,BANK[$1A] INCLUDE "engine/battle/1a.asm" Version_GFX: -IF _RED +IF DEF(_RED) INCBIN "gfx/red/redgreenversion.1bpp" ; 10 tiles ENDC -IF _BLUE +IF DEF(_BLUE) INCBIN "gfx/blue/blueversion.1bpp" ; 8 tiles ENDC @@ -6550,4 +6689,16 @@ ClipboardSprite: INCBIN "gfx/sprites/clipboard.2bpp" SnorlaxSprite: INCBIN "gfx/sprites/snorlax.2bpp" OldAmberSprite: INCBIN "gfx/sprites/old_amber.2bpp" LyingOldManSprite: INCBIN "gfx/sprites/lying_old_man.2bpp" -PokedexSprite: INCBIN "gfx/sprites/pokedex.2bpp" \ No newline at end of file +PokedexSprite: INCBIN "gfx/sprites/pokedex.2bpp" + + +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 new file mode 100644 index 0000000000..5bcdb58a9c --- /dev/null +++ b/maps/beach_house.blk @@ -0,0 +1 @@ +      \ No newline at end of file diff --git a/maps/route19-yellow.blk b/maps/route19-yellow.blk new file mode 100644 index 0000000000..3fc5849460 --- /dev/null +++ b/maps/route19-yellow.blk @@ -0,0 +1 @@ +(,)(,)(,)$W%$W%CCC11111CCC111CCk1111kkCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCkkkkkkkkk \ No newline at end of file diff --git a/pokeblue.map b/pokeblue.map new file mode 100755 index 0000000000..70fa649fbb --- /dev/null +++ b/pokeblue.map @@ -0,0 +1,15844 @@ +Bank #0 (HOME): + SECTION: $0000-$0000 ($0001 bytes) + SECTION: $0008-$0008 ($0001 bytes) + SECTION: $0010-$0010 ($0001 bytes) + SECTION: $0018-$0018 ($0001 bytes) + SECTION: $0020-$0020 ($0001 bytes) + SECTION: $0028-$0028 ($0001 bytes) + SECTION: $0030-$0030 ($0001 bytes) + SECTION: $0038-$0038 ($0001 bytes) + SECTION: $0040-$0042 ($0003 bytes) + SECTION: $0048-$0048 ($0001 bytes) + SECTION: $0050-$0052 ($0003 bytes) + SECTION: $0058-$005A ($0003 bytes) + SECTION: $0060-$0060 ($0001 bytes) + SECTION: $0061-$00BD ($005D bytes) + $00B5 = CopyData + $0061 = DisableLCD + $007B = EnableLCD + $0082 = ClearSprites + $009D = FarCopyData + $008D = HideSprites + SECTION: $0100-$0103 ($0004 bytes) + SECTION: $0150-$3FA5 ($3E56 bytes) + $2024 = VBlank + $2306 = Timer + $2125 = Serial + $0150 = Start + $1F54 = Init + $35D6 = Bankswitch + $1241 = LoadMapData + $12E7 = Func_12e7 + $091F = MapEntryAfterBattle + $2429 = UpdateSprites + $20AF = DelayFrame + $20BA = LoadGBPal + $039E = HandleMidJump + $05B5 = OverworldLoopLessDelay.moveAhead + $0F4D = JoypadOverworld + $073C = WarpFound2 + $0965 = HandleFlyOrTeleportAway + $062C = OverworldLoopLessDelay.newBattle + $047D = OverworldLoopLessDelay.displayDialogue + $04EB = OverworldLoopLessDelay.checkIfDownButtonIsPressed + $04CD = OverworldLoopLessDelay.noDirectionButtonsPressed + $30FD = Func_30fd + $3EB5 = Func_3eb5 + $03FF = OverworldLoop + $0B23 = IsSpriteOrSignInFrontOfPlayer + $3E6D = Predef + $2920 = DisplayTextID + $12BC = SwitchToMapRomBank + $03A6 = EnterMap + $0683 = NewBattle + $0637 = OverworldLoopLessDelay.battleOccurred + $0BD1 = CollisionCheckOnLand + $08E9 = ExtraWarpCheck + $0706 = CheckWarpsCollision + $0FB7 = CollisionCheckOnWater + $06A0 = BikeSpeedup + $0D27 = AdvancePlayerSprite + $07BA = CheckMapConnections + $06B4 = CheckWarpsNoCollision + $0931 = HandleBlackOut + $0670 = OverworldLoopLessDelay.noFaintCheck + $3739 = DelayFrames + $101B = RunMapScript + $019A = Joypad + $07B5 = ContinueCheckWarpsNoCollisionLoop + $08E1 = CheckIfInOutsideMap + $20EF = GBFadeIn1 + $08C9 = PlayMapChangeSound + $098F = LeaveMapAnim + $12DA = Func_12da + $06CC = CheckWarpsNoCollisionLoop + $08AD = CheckMapConnections.loadNewMap + $107C = LoadMapHeader + $2312 = Func_2312 + $3DEF = GoPAL_SET + $09FC = LoadTileBlockMap + $0402 = OverworldLoopLessDelay + $23B1 = PlaySound + $20F6 = GBFadeIn2 + $0951 = StopMusic + $200E = StopAllSounds + $3DD7 = Delay3 + $09C5 = IsBikeRidingAllowed + $104D = LoadWalkingPlayerSpriteGraphics + $105D = LoadBikePlayerSpriteGraphics + $1055 = LoadSurfingPlayerSpriteGraphics + $09E2 = BikeRidingTilesets + $17F7 = FarCopyData2 + $0ADE = LoadNorthSouthConnectionsTileMap + $0B02 = LoadEastWestConnectionsTileMap + $0B6B = IsSpriteInFrontOfPlayer + $0C7E = TilePairCollisionsLand + $0C2A = CheckForJumpingAndTilePairCollisions + $0C10 = CheckTilePassable + $0F1D = DrawTileBlock + $0E36 = AdvancePlayerSprite.scrollBackgroundAndSprites + $0E65 = MoveTileBlockMapPointerEast + $0E6F = MoveTileBlockMapPointerWest + $0E79 = MoveTileBlockMapPointerSouth + $0E85 = MoveTileBlockMapPointerNorth + $0CAA = LoadCurrentMapView + $0EB2 = ScheduleSouthRowRedraw + $0E91 = ScheduleNorthRowRedraw + $0ED3 = ScheduleEastColumnRedraw + $0F08 = ScheduleWestColumnRedraw + $0EA6 = ScheduleRowRedrawHelper + $0EF2 = ScheduleColumnRedrawHelper + $1004 = CollisionCheckOnWater.noCollision + $0CA0 = TilePairCollisionsWater + $0997 = LoadPlayerSpriteGraphics + $2307 = Func_2307 + $310E = Func_310e + $104C = RunMapScript.return + $1848 = CopyVideoData + $01AE = MapHeaderPointers + $1238 = CopyMapConnectionHeader + $11F8 = LoadMapHeader.finishUp + $1188 = LoadMapHeader.loadSpriteLoop + $36A0 = LoadTextBoxTilePatterns + $09E8 = LoadTilesetTilePatternData + $235F = Func_235f + $35BC = BankswitchHome + $35CD = BankswitchBack + $3831 = JoypadLowSensitivity + $1665 = LoadMonFrontSprite + $13D9 = GetCryData + $3748 = WaitForSoundToFinish + $3DD4 = GBPalWhiteOutWithDelay3 + $1420 = PartyMenuInit + $14D4 = DrawPartyMenu + $145A = HandlePartyMenuInput + $14D9 = RedrawPartyMenu + $36C0 = LoadHpBarAndStatusTilePatterns + $3AC2 = HandleMenuInputPokemonSelection + $3BEC = PlaceUnfilledArrowMenuCursor + $14AC = HandlePartyMenuInput.swappingPokemon + $3C5F = PrintNumber + $3A87 = AddNTimes + $3A7D = SkipFixedLengthTextEntries + $1604 = PrintBCDDigit + $38D3 = PrintLetterDelay + $24FD = UncompressSpriteData + $1627 = UncompressMonSprite + $16DF = ZeroSpriteBuffer + $16C2 = AlignSpriteDataCentered + $16EA = InterlaceMergeSpriteBuffers + $18FC = CopyScreenTileBufferToVRAM.setup + $1CDD = GetRowColAddressBgMap + $194F = NPlaceChar + $19E8 = Next19E8 + $19EC = Char00 + $1B0A = Char4C + $1AF8 = Char4B + $1AB4 = Char51 + $1AD5 = Char49 + $19F9 = Char52 + $19FF = Char53 + $1A1D = Char54 + $1A11 = Char5B + $1A17 = Char5E + $1A0B = Char5C + $1A05 = Char5D + $1A7C = Char55 + $1A23 = Char56 + $1AAD = Char57 + $1A95 = Char58 + $1A29 = Char4A + $1A91 = Char5F + $1A2F = Char59 + $1A35 = Char5A + $1956 = PlaceNextChar + $19F4 = Char00Text + $1A58 = Char5DText + $1A55 = Char5CText + $1A60 = Char5BText + $1A63 = Char5EText + $1A6A = Char54Text + $1A6F = Char56Text + $1A79 = Char4AText + $1A72 = Char5AText + $1955 = PlaceString + $1A8C = Char55Text + $1B40 = TextCommandProcessor + $1AA2 = Next1AA2 + $1B3A = ProtectedDelay3 + $3898 = ManualTextScroll + $1AB3 = Char58Text + $18C4 = ClearScreenArea + $1B18 = Next1B18 + $1CA3 = TextCommand17 + $1C31 = TextCommand0B + $1CC1 = TextCommandJumpTable + $1922 = TextBoxBorder + $15CD = PrintBCDNumber + $1B55 = NextTextCommand + $1C9A = TextCommand0D + $1C64 = TextCommandSounds + $13D0 = PlayCry + $1B8A = TextCommand00 + $1B97 = TextCommand01 + $1BA5 = TextCommand02 + $1BB7 = TextCommand03 + $1B78 = TextCommand04 + $1BC5 = TextCommand05 + $1BCC = TextCommand06 + $1BE7 = TextCommand07 + $1BF9 = TextCommand08 + $1BFF = TextCommand09 + $1C1D = TextCommand0A + $1C78 = TextCommand0C + $1D42 = RedrawExposedScreenEdge.drawHalf + $1F19 = FlowerTile1 + $1F29 = FlowerTile2 + $1F39 = FlowerTile3 + $3DE5 = GBPalWhiteOut + $2004 = ClearVram + $36E0 = FillMemory + $1CF0 = ClearBgMap + $3DDC = GBPalNormal + $1D57 = AutoBgMapTransfer + $1DE1 = VBlankCopyBgMap + $1D01 = RedrawExposedScreenEdge + $1E5E = VBlankCopy + $1E02 = VBlankCopyDouble + $1EBE = UpdateMovingBgTiles + $3E5C = Random + $28CB = Func_28cb + $015F = ReadJoypad + $2116 = FadePal4 + $210D = FadePal1 + $211C = FadePal6 + $211F = FadePal7 + $219A = Func_219a + $2237 = Func_2237 + $2231 = Func_2231 + $223F = Func_223f + $3719 = SaveScreenTilesToBuffer1 + $227F = Func_227f + $3725 = LoadScreenTilesFromBuffer1 + $22C3 = Func_22c3 + $22ED = Func_22ed + $22D7 = asm_22d7 + $2385 = Func_2385 + $24D6 = TextScriptEndingChar + $24D7 = TextScriptEnd + $251A = _UncompressSpriteData + $268B = ReadNextInputByte + $2670 = ReadNextInputBit + $2897 = StoreSpriteOutputPointer + $2649 = WriteSpriteBitsToBuffer + $25D8 = MoveToNextBufferPosition + $269F = LengthEncodingOffsetList + $2556 = UncompressSpriteDataLoop + $26BF = UnpackSprite + $2877 = UnpackSpriteMode2 + $27C7 = XorSpriteChunks + $26D4 = SpriteDifferentialDecode + $27B7 = DecodeNybble0TableFlipped + $27BF = DecodeNybble1TableFlipped + $27A7 = DecodeNybble0Table + $27AF = DecodeNybble1Table + $276D = DifferentialDecodeNybble + $2841 = ResetSpriteBufferPointers + $2837 = ReverseNybble + $2867 = NybbleReverseTable + $28C4 = ResetPlayerSpriteData_ClearSpriteData + $2ACD = DisplayStartMenu + $2A90 = DisplaySafariGameOverText + $2A9B = DisplayPokemonFaintedText + $2AA9 = DisplayPlayerBlackedOutText + $2ABF = DisplayRepelWoreOffText + $2A2E = DisplayPokemartDialogue + $2A72 = DisplayPokemonCenterDialogue + $3460 = FuncTX_ItemStoragePC + $346A = FuncTX_BillsPC + $347F = FuncTX_PokemonCenterPC + $3474 = FuncTX_SlotMachine + $3C59 = Func_3c59 + $3865 = WaitForTextScrollButtonPress + $2A55 = PokemartGreetingText + $3C49 = PrintText + $2A5A = LoadItemList + $29D6 = AfterDisplayingTextID + $2AA4 = PokemonFaintedText + $2ABA = PlayerBlackedOutText + $29DF = HoldTextDisplayOpen + $2AC8 = RepelWoreOffText + $3ABE = HandleMenuInput + $3BF9 = EraseMenuCursor + $2B70 = CloseStartMenu + $36F4 = SaveScreenTilesToBuffer2 + $29E8 = CloseTextDisplay + $30E8 = DisplayTextBoxID + $3740 = PlaySoundWaitForCurrent + $2E5A = PrintListMenuEntries + $3B7C = PlaceMenuCursor + $2D2D = DisplayListMenuIDLoop.checkOtherKeys + $2E3B = ExitListMenu + $37DF = GetItemPrice + $376B = GetName + $15BA = GetPartyMonName + $3826 = CopyStringToCF4B + $2C53 = DisplayListMenuIDLoop + $2E30 = InitialQuantityText + $2DA2 = DisplayChooseQuantityMenu.incrementQuantity + $2E24 = DisplayChooseQuantityMenu.buttonAPressed + $2E29 = DisplayChooseQuantityMenu.buttonBPressed + $2E34 = SpacesBetweenQuantityAndPriceText + $2D89 = DisplayChooseQuantityMenu.waitForKeyPressLoop + $2F91 = PrintListMenuEntries.printCancelMenuItem + $2FCF = GetItemName + $3058 = GetMoveName + $1372 = LoadMonData + $150B = PrintLevel + $30D9 = IsKeyItem + $2E87 = PrintListMenuEntries.loop + $2F97 = ListMenuCancelText + $2FF3 = GetMachineName + $303E = HiddenPrefix + $303C = TechnicalPrefix + $3052 = HMMoves + $3DAB = IsInArray + $3140 = Func_310e.pointerTable_3140 + $3D97 = CallFunctionInTable + $3157 = StoreTrainerHeaderPointer + $3193 = ReadTrainerHeaderInfo + $31C7 = TrainerFlagAction + $3354 = PreBattleSaveRegisters + $336A = EngageMapTrainer + $325D = Func_325d + $3306 = CheckForEngagingTrainers + $32CF = TrainerWalkUpToPlayer_Bank0 + $32D7 = InitBattleEnemyParameters + $32C1 = ResetButtonPressedAndMapScript + $33E8 = PlayTrainerMusic + $33CF = TrainerNameText + $33B7 = Func_33b7 + $3439 = EvilTrainerList + $3434 = FemaleTrainerList + $350C = DecodeRLEList + $34AE = Func_34ae + $34FC = Func_34fc + $34C7 = CheckCoords + $354E = GetSpriteMovementByte1Pointer + $3558 = GetSpriteMovementByte2Pointer + $359E = GetTrainerName + $3A8E = StringCmp + $35E4 = Bankswitch.Return + $35FF = InitYesNoTextBoxParameters + $3541 = SetSpriteMovementBytesToFF + $182B = FarCopyDataDouble + $1886 = CopyVideoDataDouble + $3709 = LoadScreenTilesFromBuffer2DisableBGTransfer + $2F9E = GetMonName + $375D = NamePointers + $3C04 = HandleDownArrowBlinkTiming + $394A = CalcStat + $38AC = Multiply + $38B9 = Divide + $3AB3 = WriteOAMBlock.writeOneEntry + $3ACF = HandleMenuInputPokemonSelection.loop1 + $3D25 = PrintNumber_PrintDigit + $3D89 = PrintNumber_AdvancePointer + $3D83 = PrintNumber_PrintLeadingZero + $3DA7 = CallFunctionInTable.returnAddress + $3E08 = Func_3e08 + $3701 = LoadScreenTilesFromBuffer2 + $3DED = GoPAL_SET_CF1C + $3680 = LoadFontTilePatterns + $2BCF = AddItemToInventory + $3E8D = Predef.done + $3EDA = Func_3eb5.asm_3eda + $3F22 = PointerTable_3f22 + $3F0F = Func_3f0f + $35A6 = HasEnoughMoney + $1537 = GetMonHeader + $190F = ClearScreen + $12F8 = CheckForUserInterruption + $1389 = LoadFrontSpriteByMonIndex + $3927 = AddPartyMon + $3C3C = EnableAutoTextBoxDrawing + $3E2E = GiveItem + $216F = Func_216f + $23A1 = PlayMusic + $226E = Func_226e + $391F = RemovePokemon + $3A53 = AddEnemyMonToPlayerParty + $17D1 = Club_Coll + $3E94 = GetPredefRegisters + $2247 = Func_2247 + $28A6 = ResetPlayerSpriteData + $2B7F = CountSetBits + $20D8 = GBFadeOut2 + $1384 = LoadFlippedFrontSpriteByMonIndex + $36EB = UncompressSpriteFromDE + $3DBE = Func_3dbe + $2BE6 = DisplayListMenuID + $3040 = IsItemHM + $2D57 = DisplayChooseQuantityMenu + $2B9E = AddAmountSoldToMoney + $2BBB = RemoveItemFromInventory + $2B96 = SubtractAmountPaidFromMoney + $3049 = IsMoveHM + $360A = YesNoChoicePokeCenter + $18D6 = CopyScreenTileBufferToVRAM + $35EC = YesNoChoice + $30C4 = TossItem + $3913 = CopyDataUntil + $3071 = ReloadMapData + $1F49 = SoftReset + $12ED = ForceBikeOrSurf + $0C44 = Func_c44 + $1313 = LoadDestinationWarpPosition + $1735 = Overworld_Coll + $1749 = RedsHouse1_Coll + $1753 = Mart_Coll + $1765 = Forest_Coll + $1749 = RedsHouse2_Coll + $1759 = Dojo_Coll + $1753 = Pokecenter_Coll + $1759 = Gym_Coll + $1775 = House_Coll + $177F = ForestGate_Coll + $177F = Museum_Coll + $172F = Underground_Coll + $177F = Gate_Coll + $178A = Ship_Coll + $1795 = ShipPort_Coll + $179A = Cemetery_Coll + $17A2 = Interior_Coll + $17AC = Cavern_Coll + $17B8 = Lobby_Coll + $17C0 = Mansion_Coll + $17CA = Lab_Coll + $17DD = Facility_Coll + $17F0 = Plateau_Coll + $34BF = ArePlayerCoordsInArray + $0C4A = CheckForTilePairCollisions + $0B6D = IsSpriteInFrontOfPlayer2 + $13FC = DisplayPartyMenu + $1411 = GoBackToPartyMenu + $3936 = CalcStats + $3A97 = WriteOAMBlock + $363A = MoveSprite + $3633 = CalcDifference + $366B = Func_366b + $1336 = DrawHPBar + $3EF5 = PrintPredefTextID + $3DF9 = GetHealthBarColor + $14E1 = PrintStatusCondition + $2ADF = RedisplayStartMenu + $30A9 = ChooseFlyDestination + $30BC = UseItem + $34A6 = Func_34a6 + $3486 = Func_3486 + $24EA = MartSignText + $24EF = PokeCenterSignText + $34B9 = Func_34b9 + $32F9 = Func_32f9 + $32FE = Func_32fe + $32F4 = Func_32f4 + $3500 = Func_3500 + $349B = DisplayPokedex + $22FA = Func_22fa + $24CC = IndigoPlateauLobbyText4 + $3160 = ExecuteCurMapScriptInTable + $3219 = CheckFightingMapTrainers + $324C = Func_324c + $3275 = EndTrainerBattle + $24F4 = Predef5CText + $31CC = TalkToTrainer + $314E = Func_314e + $3493 = IsItemInBag + $32EF = Func_32ef + $2442 = ViridianMartText6 + $15B4 = GetPartyMonName2 + $3E48 = GivePokemon + $24A8 = FuchsiaMartText1 + $3090 = ReloadTilesetTilePatterns + $3381 = Func_3381 + $14F6 = PrintStatusConditionNotFainted + $3566 = GetTrainerInformation + $1672 = LoadUncompressedSpriteData + $34E4 = CheckBoulderCoords + $24E5 = BoulderText + $3442 = Func_3442 + $20D1 = GBFadeOut1 + $248E = CeladonMart4Text1 + $317F = LoadGymLeaderAndCityName + $30B6 = DisableWaitingAfterTextDisplay + $35B1 = HasEnoughCoins + $2496 = CeladonMart5Text3 + $24A0 = CeladonMart5Text4 + $3C3F = DisableAutoTextBoxDrawing + $3829 = CopyString + $2476 = CeladonMart2Text1 + $2482 = CeladonMart2Text2 + $3A68 = Func_3a68 + $363D = MoveSprite_ + $2453 = CeruleanMartText1 + $246A = LavenderMartText1 + $2461 = VermilionMartText1 + $24C3 = SaffronMartText1 + $1523 = PrintLevelCommon + $3F05 = Func_3f05 + $3DAD = IsInRestOfArray + $2449 = PewterMartText1 + $3EAD = Func_3ead + $24B9 = CinnabarMartText1 + $1063 = LoadPlayerSpriteGraphicsCommon + $361A = Func_361a + $137A = Func_137a + $072F = CheckWarpsNoCollisionRetry1 + $152E = Func_152e + $0730 = CheckWarpsNoCollisionRetry2 + $33D4 = Func_33d4 + $0735 = WarpFound1 + $35F4 = Func_35f4 + $180D = FarCopyData3 + $1A4B = FinishDTE + $24DB = ExclamationText + $3301 = asm_3301 + $3502 = asm_3502 + $2324 = asm_2324 + $3156 = Func_3156 + $151B = PrintLevelFull + $1D9E = TransferBgRows + $2110 = FadePal2 + $20DD = GBFadeOutCommon + $2113 = FadePal3 + $2119 = FadePal5 + $14DC = DrawPartyMenuCommon + $3C41 = AutoTextBoxDrawingCommon + $2122 = FadePal8 + $1A37 = MonsterNameCharsCommon + $3628 = DisplayYesNoChoice + $33DD = Func_33dd + $20FB = GBFadeInCommon + $3479 = bankswitchAndContinue + $24E0 = GroundRoseText + $3533 = SetSpriteMovementBytesToFE + SLACK: $0136 bytes + +Bank #1: + SECTION: $4000-$7C48 ($3C49 bytes) + $62CE = Func_62ce + $40B0 = Func_40b0 + $5D5F = Func_5d5f + $45B6 = LoadMonData_ + $425B = MewBaseStats + $4112 = MewPicFront + $4BED = WriteDMACodeToHRAM + $42B7 = SetDefaultNamesBeforeTitlescreen + $4B0F = PrepareOAMData + $4C05 = PrintWaitingText + $4C34 = _UpdateSprites + $7096 = DisplayTextIDInit + $71C5 = CableClubNPC + $6C20 = DisplayPokemartDialogue_ + $6FE6 = DisplayPokemonCenterDialogue_ + $710B = DrawStartMenu + $6B21 = SubtractAmountPaidFromMoney_ + $6B44 = HandleItemListSwapping + $4608 = ItemPrices + $472B = ItemNames + $72EA = DisplayTextBoxID_ + $78E6 = PlayerPC + $7C18 = Func_7c18 + $4A92 = UnusedNames + $7B68 = _RemovePokemon + $4080 = SpriteFacingDownAndStanding + $4098 = SpriteOAMParameters + $4084 = SpriteFacingDownAndWalking + $40A4 = SpriteOAMParametersFlipped + $4088 = SpriteFacingUpAndStanding + $408C = SpriteFacingUpAndWalking + $4090 = SpriteFacingLeftAndStanding + $4094 = SpriteFacingLeftAndWalking + $4205 = MewPicBack + $42A7 = SafariZoneEatingText + $42AC = SafariZoneAngryText + $45AA = NintenText + $42B1 = CopyFixedLengthText + $45B1 = SonyText + $4519 = Func_4519 + $44DD = Func_44dd + $437F = LoadTitlescreenGraphics.titlescreenTilemap + $4524 = Func_4524 + $4533 = Func_4533 + $43DB = LoadTitlescreenGraphics.TitleScreenPokemonLogoYScrolls + $43EA = LoadTitlescreenGraphics.ScrollTitleScreenPokemonLogo + $4598 = PrintGameVersionOnTitleScreen + $44CF = Func_44cf + $44C1 = Func_44c1 + $4496 = Func_4496 + $448E = Func_448e + $5AF2 = MainMenu + $4588 = TitleMons + $4556 = CopyrightTextString + $45A1 = VersionOnTitleScreenText + $4BAD = PrepareOAMData.asm_4bad + $4BD1 = Func_4bd1 + $4000 = SpriteFacingAndAnimationTable + $4B21 = PrepareOAMData.asm_4b21 + $4C05 = DMARoutineEnd + $4BFB = DMARoutine + $5AB3 = Func_5ab3 + $4C28 = WaitingText + $4C54 = _UpdateSprites.updateCurrentSprite + $4C5C = UpdateNonPlayerSprite + $4E31 = UpdatePlayerSprite + $5236 = Func_5236 + $4ED1 = Func_4ed1 + $4D72 = Func_4d72 + $4D69 = Func_4c70.next + $4D85 = DiagonalLines + $4CA5 = Func_4c70.loop + $4E26 = FoundItemText + $4E2C = NoMoreRoomForItemText + $4C70 = Func_4c70 + $50AD = InitializeSpriteStatus + $50DC = CheckSpriteAvailability + $507F = InitializeSpriteFacingDirection + $5073 = notYetMoving + $5057 = UpdateSpriteMovementDelay + $4FFE = UpdateSpriteInWalkingAnimation + $50BD = InitializeSpriteScreenPosition + $522F = LoadDEPlusA + $4FC8 = ChangeFacingDirection + $5207 = getTileSpriteStandsOn + $516E = CanWalkOntoTile + $5157 = UpdateSpriteImage + $512E = CheckSpriteAvailability.spriteInvisible + $52A6 = Func_52a6 + $52B2 = Func_52b2 + $52B7 = Func_52b7 + $52C3 = Func_52c3 + $5301 = Func_5301 + $5AE6 = LoadTrainerInfoTextBoxTiles + $550F = PleaseWaitString + $577D = Func_577d + $5A5B = PointerTable_5a5b + $42DD = LoadTitlescreenGraphics + $57F2 = Func_57f2 + $57A2 = Func_57a2 + $55DC = TradeCenter_SelectMon.asm_55dc + $565B = TradeCenter_SelectMon.asm_565b + $57D6 = Func_57d6 + $572F = TradeCenter_SelectMon.asm_572f + $5665 = TradeCenter_SelectMon.asm_5665 + $5557 = TradeCenter_SelectMon.asm_5557 + $5601 = TradeCenter_SelectMon.asm_5601 + $5574 = TradeCenter_SelectMon.asm_5574 + $571F = TradeCenter_SelectMon.statsTrade + $551C = Func_551c + $57C7 = Func_57c7 + $57C0 = CancelTextString + $5827 = Func_5827 + $5A24 = WillBeTradedText + $5A3A = TradeCanceled + $5A18 = Func_5a18 + $5A29 = TradeCompleted + $5345 = Func_5345 + $5530 = TradeCenter_SelectMon + $5849 = TradeCenter_Trade + $5317 = Func_5317 + $5AE0 = Func_5ae0 + $5BFF = Func_5bff + $609E = Func_609e + $5D7E = ContinueText + $5D87 = NewGameText + $5B9E = MainMenu.next3 + $5D52 = Func_5d52 + $5E8A = DisplayOptionMenu + $5B07 = MainMenu.next0 + $5DB5 = ContinueGame + $6B20 = TextTerminator_6b20 + $5D43 = WhereWouldYouLikeText + $5D97 = TradeCenterText + $5D48 = PleaseWaitText + $72D7 = Func_72d7 + $5D4D = LinkCanceledText + $6115 = OakSpeech + $5E6A = SaveScreenInfoText + $5E2F = Func_5e2f + $5E42 = Func_5e42 + $5E55 = Func_5e55 + $5FC0 = TextSpeedOptionText + $5FDE = BattleAnimationOptionText + $5FFD = BattleStyleOptionText + $6018 = OptionMenuCancelText + $604C = SetCursorPositionsFromOptions + $601F = SetOptionsFromCursorPositions + $5EEF = DisplayOptionMenu.loop + $5F96 = DisplayOptionMenu.pressedLeftInTextSpeed + $5FA9 = DisplayOptionMenu.pressedRightInTextSpeed + $5F18 = DisplayOptionMenu.eraseOldMenuCursor + $6096 = TextSpeedOptionData + $608F = SetCursorPositionsFromOptions.placeUnfilledRightArrow + $60CA = SetDefaultNames + $61BC = Func_61bc + $62A4 = IntroPredef3B + $6271 = FadeInIntroPic + $6253 = OakSpeechText1 + $6288 = MovePicLeft + $6258 = OakSpeechText2 + $6262 = IntroducePlayerText + $695D = LoadDefaultNamesPlayer + $6267 = IntroduceRivalText + $69A4 = LoadDefaultNamesRival + $626C = OakSpeechText3 + $6282 = IntroFadePalettes + $62FF = Func_62ff + $64EA = Func_64ea + $6428 = BattleCenterSpec1 + $6430 = BattleCenterSpec2 + $6438 = TradeCenterSpec1 + $6440 = TradeCenterSpec2 + $6420 = FirstMapSpec + $63BF = DungeonWarpList + $63D8 = DungeonWarpData + $6448 = FlyWarpDataPtr + $647C = PalletTownFlyWarp + $6482 = ViridianCityFlyWarp + $6488 = PewterCityFlyWarp + $648E = CeruleanCityFlyWarp + $6494 = LavenderTownFlyWarp + $649A = VermilionCityFlyWarp + $64A0 = CeladonCityFlyWarp + $64A6 = FuchsiaCityFlyWarp + $64AC = CinnabarIslandFlyWarp + $64B2 = IndigoPlateauFlyWarp + $64B8 = SaffronCityFlyWarp + $64BE = Route4FlyWarp + $64C4 = Route10FlyWarp + $64DF = IshiharaTeam + $6557 = DoYouWantToNicknameText + $6596 = DisplayNamingScreen + $675B = LoadEDTile + $68F8 = PrintNamingText + $676F = PrintAlphabet + $680E = Func_680e + $665E = DisplayNamingScreen.unknownPointerTable_665e + $65FC = DisplayNamingScreen.asm_65fc + $673E = DisplayNamingScreen.asm_673e + $672C = DisplayNamingScreen.asm_672c + $6718 = DisplayNamingScreen.asm_6718 + $6702 = DisplayNamingScreen.asm_6702 + $65F3 = DisplayNamingScreen.asm_65f3 + $668C = DisplayNamingScreen.asm_668c + $65ED = DisplayNamingScreen.asm_65ed + $6683 = DisplayNamingScreen.asm_6683 + $66F6 = DisplayNamingScreen.deleteLetter + $6692 = DisplayNamingScreen.asm_6692 + $68EB = CalcStringLength + $6885 = Dakutens + $68D6 = Handakutens + $6871 = Func_6871 + $6714 = DisplayNamingScreen.asm_6714 + $6728 = DisplayNamingScreen.asm_6728 + $6767 = ED_Tile + $679E = LowerCaseAlphabet + $67D6 = UpperCaseAlphabet + $693F = YourTextString + $6945 = RivalsTextString + $6953 = NicknameTextString + $694D = NameTextString + $6A12 = Func_6a12 + $6AA8 = DefaultNamesPlayer + $6A6C = DisplayIntroNameTextBox + $6AF2 = DefaultNamesPlayerList + $6AD6 = Func_6ad6 + $69EC = Func_69ec + $699F = YourNameIsText + $6AC0 = DefaultNamesRival + $6B0A = DefaultNamesRivalList + $69E7 = HisNameIsText + $6AA3 = DisplayIntroNameTextBox.namestring + $6DF7 = DisplayPokemartDialogue_.done + $6D1E = DisplayPokemartDialogue_.buyMenu + $6C68 = DisplayPokemartDialogue_.sellMenu + $6D12 = DisplayPokemartDialogue_.bagEmpty + $6E25 = PokemonSellingGreetingText + $6DC8 = DisplayPokemartDialogue_.returnToMainPokemartMenu + $6E2A = PokemartTellSellPriceText + $6C89 = DisplayPokemartDialogue_.sellMenuLoop + $6E34 = PokemartUnsellableItemText + $6E2F = PokemartItemBagEmptyText + $6E0C = PokemartBuyingGreetingText + $6E11 = PokemartTellBuyPriceText + $6D39 = DisplayPokemartDialogue_.buyMenuLoop + $6DDC = DisplayPokemartDialogue_.isThereEnoughMoney + $6E16 = PokemartBoughtItemText + $6E3E = PokemartAnythingElseText + $6C2D = DisplayPokemartDialogue_.loop + $6E1B = PokemartNotEnoughMoneyText + $6E20 = PokemartItemBagFullText + $6E39 = PokemartThankYouText + $6F07 = TryingToLearn + $6EDA = AbandonLearning + $6FC8 = OneTwoAndText + $6EFE = PrintLearnedMove + $6FB9 = AbandonLearningText + $6E5B = DontAbandonLearning + $6FBE = DidNotLearnText + $6FAD = LearnedMove1Text + $6FC3 = TryingToLearnText + $6FB4 = WhichMoveToForgetText + $6FE1 = HMCantDeleteText + $6FD7 = PoofText + $705D = PokemonCenterWelcomeText + $7062 = ShallWeHealYourPokemonText + $7078 = SetLastBlackoutMap + $7068 = NeedYourPokemonText + $706D = PokemonFightingFitText + $7072 = PokemonCenterFarewellText + $7092 = SafariZoneRestHouses + $718F = StartMenuPokedexText + $71BB = PrintStartMenuItem + $7197 = StartMenuPokemonText + $719F = StartMenuItemText + $71A4 = StartMenuSaveText + $71A9 = StartMenuResetText + $71B4 = StartMenuOptionText + $71AF = StartMenuExitText + $72B8 = CableClubNPCText1 + $71E1 = Func_71e1 + $72D2 = CableClubNPCText6 + $7298 = Func_7298 + $72BD = CableClubNPCText2 + $72C2 = CableClubNPCText3 + $72C8 = CableClubNPCText4 + $72B3 = CableClubNPCText7 + $72CD = CableClubNPCText5 + $5C0A = LinkMenu + $7559 = DisplayYesNoTextBox + $7387 = TextBoxFunctionTable + $734C = SearchTextBoxTable + $7391 = TextBoxCoordTable + $73B0 = TextBoxTextAndCoordTable + $7314 = DisplayTextBoxID_.done + $735A = GetTextBoxIDCoords + $7375 = GetAddressOfScreenCoords + $7367 = GetTextBoxIDText + $74BA = Func_74ba + $74EA = Func_74ea + $76E1 = Func_76e1 + $7443 = JapaneseMochimonoText + $7422 = UseTossText + $742B = JapaneseSaveMessageText + $7435 = JapaneseSpeedOptionsText + $7455 = BattleMenuText + $7468 = SafariZoneBattleMenuText + $7489 = SwitchStatsCancelText + $7413 = BuySellQuitText + $743D = MoneyText + $749D = JapaneseAhText + $74A1 = JapanesePokedexMenu + $763E = Func_763e + $7671 = MenuStrings + $7656 = Func_7656 + $76A0 = MenuStrings.YesNoMenu + $76A7 = MenuStrings.NorthWestMenu + $76B2 = MenuStrings.SouthEastMenu + $76BD = MenuStrings.NorthEastMenu + $76C8 = MenuStrings.TradeCancelMenu + $76D5 = MenuStrings.HealCancelMenu + $7699 = MenuStrings.NoYesMenu + $77D6 = GetMonFieldMoves + $77C2 = PokemonMenuEntries + $778D = FieldMoveNames + $7823 = FieldMoveDisplayData + $7861 = Func_7861 + $78DC = SuckedHealthText + $78E1 = DreamWasEatenText + $7B22 = TurnedOnPC2Text + $7AF5 = PlayersPCMenuEntries + $7B27 = WhatDoYouWantText + $796D = Func_796d + $7A12 = Func_7a12 + $7995 = Func_7995 + $7A8F = Func_7a8f + $7B3B = NothingToDepositText + $790C = Func_790c + $7B2C = WhatToDepositText + $7B31 = DepositHowManyText + $79AB = Func_79ab + $7B40 = NoRoomToStoreText + $7B36 = ItemWasStoredText + $7B54 = NothingStoredText + $7B45 = WhatToWithdrawText + $7B4A = WithdrawHowManyText + $7A28 = Func_7a28 + $7B59 = CantCarryMoreText + $7B4F = WithdrewItemText + $7B5E = WhatToTossText + $7B63 = TossHowManyText + $7AA5 = Func_7aa5 + $655C = Func_655c + $4277 = PrintSafariZoneBattleText + $783F = DrainHPEffect_ + $4538 = LoadCopyrightAndTextBoxTiles + $6E43 = LearnMove + $5AB0 = Func_5ab0 + $5A5F = Func_5a5f + $62A1 = Predef3B + $5AAF = Func_5aaf + $64EB = AskName + $4DE1 = PickupItem + $5DEF = PrintSaveScreenText + $4541 = LoadCopyrightTiles + SLACK: $03B7 bytes + +Bank #2: + SECTION: $4000-$422D ($022E bytes) + $4000 = SFX_Headers_02 + $41B3 = SFX_02_41 + $4192 = SFX_02_3a + $41BC = SFX_02_42 + $419B = SFX_02_3b + $401E = SFX_02_0a + $4021 = SFX_02_0b + $4072 = SFX_02_1a + $4024 = SFX_02_0c + $407B = SFX_02_1b + $4102 = SFX_02_2a + $4027 = SFX_02_0d + $4084 = SFX_02_1c + $410B = SFX_02_2b + $402A = SFX_02_0e + $408D = SFX_02_1d + $4114 = SFX_02_2c + $41DA = SFX_02_4a + $402D = SFX_02_0f + $4096 = SFX_02_1e + $411D = SFX_02_2d + $41A4 = SFX_02_3c + $41DD = SFX_02_4b + $4216 = SFX_02_5a + $409F = SFX_02_1f + $4126 = SFX_02_2e + $41A7 = SFX_02_3d + $41E0 = SFX_02_4c + $421C = SFX_02_5b + $412F = SFX_02_2f + $41AA = SFX_02_3e + $41E3 = SFX_02_4d + $421F = SFX_02_5c + $41AD = SFX_02_3f + $41E6 = SFX_02_4e + $4222 = SFX_02_5d + $41E9 = SFX_02_4f + $4228 = SFX_02_5e + $422B = SFX_02_5f + $4003 = SFX_02_01 + $4030 = SFX_02_10 + $4006 = SFX_02_02 + $4033 = SFX_02_11 + $40A8 = SFX_02_20 + $4009 = SFX_02_03 + $4036 = SFX_02_12 + $40B1 = SFX_02_21 + $4138 = SFX_02_30 + $400C = SFX_02_04 + $4039 = SFX_02_13 + $40BA = SFX_02_22 + $4141 = SFX_02_31 + $41B0 = SFX_02_40 + $400F = SFX_02_05 + $403C = SFX_02_14 + $40C3 = SFX_02_23 + $414A = SFX_02_32 + $41EC = SFX_02_50 + $4012 = SFX_02_06 + $4045 = SFX_02_15 + $40CC = SFX_02_24 + $4153 = SFX_02_33 + $41EF = SFX_02_51 + $4015 = SFX_02_07 + $404E = SFX_02_16 + $40D5 = SFX_02_25 + $415C = SFX_02_34 + $41C5 = SFX_02_43 + $41F5 = SFX_02_52 + $4018 = SFX_02_08 + $4057 = SFX_02_17 + $40DE = SFX_02_26 + $4165 = SFX_02_35 + $41C8 = SFX_02_44 + $41F8 = SFX_02_53 + $401B = SFX_02_09 + $4060 = SFX_02_18 + $40E7 = SFX_02_27 + $416E = SFX_02_36 + $41CB = SFX_02_45 + $41FB = SFX_02_54 + $4069 = SFX_02_19 + $40F0 = SFX_02_28 + $4177 = SFX_02_37 + $41CE = SFX_02_46 + $4201 = SFX_02_55 + $40F9 = SFX_02_29 + $4180 = SFX_02_38 + $41D1 = SFX_02_47 + $4204 = SFX_02_56 + $4189 = SFX_02_39 + $41D4 = SFX_02_48 + $4207 = SFX_02_57 + $41D7 = SFX_02_49 + $420A = SFX_02_58 + $4210 = SFX_02_59 + SECTION: $422E-$42FC ($00CF bytes) + $429A = Music_MeetRival + $4249 = Music_Cities1 + $42AF = Music_SafariZone + $4291 = Music_MeetProfOak + $4267 = Music_Cinnabar + $42A3 = Music_MuseumGuy + $4270 = Music_Vermilion + $4255 = Music_Cities2 + $42F1 = Music_IndigoPlateau + $4240 = Music_Gym + $422E = Music_PalletTown + $427C = Music_Lavender + $4237 = Music_Pokecenter + $42C1 = Music_Routes1 + $42CD = Music_Routes2 + $42B8 = Music_PkmnHealed + $42D9 = Music_Routes3 + $425E = Music_Celadon + $42E5 = Music_Routes4 + $4288 = Music_SSAnne + SECTION: $42FD-$50C5 ($0DC9 bytes) + $42FD = SFX_02_01_Ch1 + $4301 = SFX_02_02_Ch1 + $4305 = SFX_02_03_Ch1 + $4309 = SFX_02_04_Ch1 + $430D = SFX_02_05_Ch1 + $4320 = SFX_02_06_Ch1 + $4324 = SFX_02_07_Ch1 + $432B = SFX_02_08_Ch1 + $432F = SFX_02_09_Ch1 + $4333 = SFX_02_0a_Ch1 + $4337 = SFX_02_0b_Ch1 + $433B = SFX_02_0c_Ch1 + $433F = SFX_02_0d_Ch1 + $4343 = SFX_02_0e_Ch1 + $4347 = SFX_02_0f_Ch1 + $434E = SFX_02_10_Ch1 + $4355 = SFX_02_11_Ch1 + $4359 = SFX_02_12_Ch1 + $435D = SFX_02_13_Ch1 + $4987 = SFX_02_14_Ch1 + $4996 = SFX_02_14_Ch2 + $49A5 = SFX_02_14_Ch3 + $4B97 = SFX_02_15_Ch1 + $4BAA = SFX_02_15_Ch2 + $4BBD = SFX_02_15_Ch3 + $4B0C = SFX_02_16_Ch1 + $4B1B = SFX_02_16_Ch2 + $4B29 = SFX_02_16_Ch3 + $48A6 = SFX_02_17_Ch1 + $48C5 = SFX_02_17_Ch2 + $48E4 = SFX_02_17_Ch3 + $4C55 = SFX_02_18_Ch1 + $4C74 = SFX_02_18_Ch2 + $4C93 = SFX_02_18_Ch3 + $4A35 = SFX_02_19_Ch1 + $4A48 = SFX_02_19_Ch2 + $4A5A = SFX_02_19_Ch3 + $49DF = SFX_02_1a_Ch1 + $49F9 = SFX_02_1a_Ch2 + $49FA = SFX_02_1a_Ch3 + $4A0D = SFX_02_1b_Ch1 + $4A1C = SFX_02_1b_Ch2 + $4A2B = SFX_02_1b_Ch3 + $4C25 = SFX_02_1c_Ch1 + $4C38 = SFX_02_1c_Ch2 + $4C4B = SFX_02_1c_Ch3 + $472F = SFX_02_1d_Ch1 + $474C = SFX_02_1d_Ch2 + $476D = SFX_02_1d_Ch3 + $4BCA = SFX_02_1e_Ch1 + $4BE9 = SFX_02_1e_Ch2 + $4C0C = SFX_02_1e_Ch3 + $4A5B = SFX_02_1f_Ch1 + $4A86 = SFX_02_1f_Ch2 + $4AA5 = SFX_02_1f_Ch3 + $4ABE = SFX_02_20_Ch1 + $4AE5 = SFX_02_20_Ch2 + $4B0B = SFX_02_20_Ch3 + $4B2A = SFX_02_21_Ch1 + $4B49 = SFX_02_21_Ch2 + $4B78 = SFX_02_21_Ch3 + $49AF = SFX_02_22_Ch1 + $49C2 = SFX_02_22_Ch2 + $49D5 = SFX_02_22_Ch3 + $48F1 = SFX_02_23_Ch1 + $490C = SFX_02_23_Ch2 + $4927 = SFX_02_23_Ch3 + $4937 = SFX_02_24_Ch1 + $495A = SFX_02_24_Ch2 + $497D = SFX_02_24_Ch3 + $4813 = SFX_02_25_Ch1 + $4832 = SFX_02_25_Ch2 + $4855 = SFX_02_25_Ch3 + $4D2B = SFX_02_26_Ch1 + $4D3E = SFX_02_26_Ch2 + $4D51 = SFX_02_26_Ch3 + $4D5E = SFX_02_27_Ch1 + $4D79 = SFX_02_27_Ch2 + $4D94 = SFX_02_27_Ch3 + $4DA7 = SFX_02_28_Ch1 + $4DB6 = SFX_02_28_Ch2 + $4DC5 = SFX_02_28_Ch3 + $4E35 = SFX_02_29_Ch1 + $4E50 = SFX_02_29_Ch2 + $4E6B = SFX_02_29_Ch3 + $4CC8 = SFX_02_2a_Ch1 + $4CD7 = SFX_02_2a_Ch2 + $4CE6 = SFX_02_2a_Ch3 + $4E7E = SFX_02_2b_Ch1 + $4E91 = SFX_02_2b_Ch2 + $4EA4 = SFX_02_2b_Ch3 + $4F8E = SFX_02_2c_Ch1 + $4FB1 = SFX_02_2c_Ch2 + $4FD4 = SFX_02_2c_Ch3 + $4CA6 = SFX_02_2d_Ch1 + $4CB5 = SFX_02_2d_Ch2 + $4CC7 = SFX_02_2d_Ch3 + $4EFF = SFX_02_2e_Ch1 + $4F1A = SFX_02_2e_Ch2 + $4F35 = SFX_02_2e_Ch3 + $4CF0 = SFX_02_2f_Ch1 + $4D07 = SFX_02_2f_Ch2 + $4D1E = SFX_02_2f_Ch3 + $4EB1 = SFX_02_30_Ch1 + $4ED4 = SFX_02_30_Ch2 + $4EEF = SFX_02_30_Ch3 + $4F48 = SFX_02_31_Ch1 + $4F63 = SFX_02_31_Ch2 + $4F7E = SFX_02_31_Ch3 + $4DCF = SFX_02_32_Ch1 + $4DF2 = SFX_02_32_Ch2 + $4E19 = SFX_02_32_Ch3 + $4FE7 = SFX_02_33_Ch1 + $4FFA = SFX_02_33_Ch2 + $500D = SFX_02_33_Ch3 + $501A = SFX_02_34_Ch1 + $502D = SFX_02_34_Ch2 + $5040 = SFX_02_34_Ch3 + $504D = SFX_02_35_Ch1 + $5070 = SFX_02_35_Ch2 + $5092 = SFX_02_35_Ch3 + $5093 = SFX_02_36_Ch1 + $50A6 = SFX_02_36_Ch2 + $50B9 = SFX_02_36_Ch3 + $4786 = SFX_02_37_Ch1 + $479D = SFX_02_37_Ch2 + $47B0 = SFX_02_37_Ch3 + $47BD = SFX_02_38_Ch1 + $47E0 = SFX_02_38_Ch2 + $4803 = SFX_02_38_Ch3 + $486B = SFX_02_39_Ch1 + $4882 = SFX_02_39_Ch2 + $4899 = SFX_02_39_Ch3 + $440A = SFX_02_3c_Ch1 + $44B7 = SFX_02_3d_Ch1 + $44D9 = SFX_02_3e_Ch1 + $43C3 = SFX_02_3f_Ch1 + $4462 = SFX_02_40_Ch1 + $44C6 = SFX_02_43_Ch1 + $44EE = SFX_02_44_Ch1 + $44FD = SFX_02_45_Ch1 + $4528 = SFX_02_46_Ch1 + $453B = SFX_02_47_Ch1 + $454E = SFX_02_48_Ch1 + $4569 = SFX_02_49_Ch1 + $4580 = SFX_02_4a_Ch1 + $4595 = SFX_02_4b_Ch1 + $45B0 = SFX_02_4c_Ch1 + $45CB = SFX_02_4d_Ch1 + $45D6 = SFX_02_4e_Ch1 + $45E1 = SFX_02_4f_Ch1 + $45EE = SFX_02_50_Ch1 + $461F = SFX_02_51_Ch1 + $4636 = SFX_02_51_Ch2 + $4649 = SFX_02_52_Ch1 + $4654 = SFX_02_53_Ch1 + $466D = SFX_02_54_Ch1 + $468C = SFX_02_54_Ch2 + $46AB = SFX_02_55_Ch1 + $43E1 = SFX_02_56_Ch1 + $43F1 = SFX_02_57_Ch1 + $43F8 = SFX_02_58_Ch1 + $43FF = SFX_02_58_Ch2 + $441B = SFX_02_59_Ch1 + $4422 = SFX_02_59_Ch2 + $442D = SFX_02_5a_Ch1 + $4438 = SFX_02_5a_Ch2 + $4447 = SFX_02_5b_Ch1 + $4452 = SFX_02_5c_Ch1 + $4475 = SFX_02_5d_Ch1 + $4494 = SFX_02_5d_Ch2 + $43CA = SFX_02_5e_Ch1 + $46C8 = SFX_02_5f_Ch1 + $4373 = Music2_WavePointers.wave0 + $4383 = Music2_WavePointers.wave1 + $4393 = Music2_WavePointers.wave2 + $43A3 = Music2_WavePointers.wave3 + $43B3 = Music2_WavePointers.wave4 + $43C3 = Music2_WavePointers.wave5 + $4361 = Music2_WavePointers + SECTION: $50C6-$5BA2 ($0ADD bytes) + $5138 = Music2_ApplyMusicAffects + $51D0 = Music2_PlayNextNote + $580D = Music2_ApplyDutyCycle + $56F9 = Music2_ApplyPitchBend + $5838 = Func_9838 + $51E6 = Music2_endchannel + $5825 = Music2_GetNextMusicByte + $5274 = Music2_callchannel + $5B1F = Unknown_9b1f + $56C7 = Func_96c7 + $52A9 = Music2_loopchannel + $52E4 = Music2_notetype + $5323 = Music2_toggleperfectpitch + $5858 = Func_9858 + $550A = Music2_notelength + $5876 = Func_9876 + $5629 = Func_9629 + $55F8 = Func_95f8 + $564B = Func_964b + $5847 = Func_9847 + $5693 = Func_9693 + $578F = Func_978f + $5B27 = Unknown_9b27 + $56B5 = Func_96b5 + $56E5 = Func_96e5 + $5740 = Music2_ApplyPitchBend.asm_9740 + $5786 = Music2_ApplyPitchBend.asm_9786 + $5B17 = Unknown_9b17 + $5B2F = Music2_Pitches + $5A34 = Func_9a34 + $594E = Func_994e + $5A89 = FillMusicRAM2 + $5A8F = Func_9a8f + $5967 = Func_994e.asm_9967 + $5B16 = Noise2_endchannel + $5B60 = Music2_OverwriteChannelPointer + $5B47 = Music_RivalAlternateStart + $5B75 = Music_RivalAlternateStartAndTempo + $5B65 = Music_RivalAlternateTempo + $5B81 = Music_Cities1AlternateTempo + $5103 = Music2_UpdateMusic + $50C6 = PlayBattleMusic + SECTION: $5BA3-$7FF3 ($2451 bytes) + $6D77 = SFX_02_3a_Ch1 + $6D8E = SFX_02_3a_Ch2 + $6D9E = SFX_02_3a_Ch3 + $7316 = SFX_02_3b_Ch1 + $7335 = SFX_02_3b_Ch2 + $734D = SFX_02_3b_Ch3 + $72C8 = SFX_02_41_Ch1 + $72E1 = SFX_02_41_Ch2 + $72F7 = SFX_02_41_Ch3 + $7362 = SFX_02_42_Ch1 + $7381 = SFX_02_42_Ch2 + $739D = SFX_02_42_Ch3 + $67C5 = Music_PalletTown_Ch1 + $685F = Music_PalletTown_Ch2 + $68DE = Music_PalletTown_Ch3 + $7E56 = Music_Pokecenter_Ch1 + $7EF9 = Music_Pokecenter_Ch2 + $7F70 = Music_Pokecenter_Ch3 + $7CBB = Music_Gym_Ch1 + $7D6B = Music_Gym_Ch2 + $7DFA = Music_Gym_Ch3 + $6A76 = Music_Cities1_Ch1 + $6B92 = Music_Cities1_Ch2 + $6C32 = Music_Cities1_Ch3 + $6CEF = Music_Cities1_Ch4 + $7504 = Music_Cities2_Ch1 + $7569 = Music_Cities2_Ch2 + $7640 = Music_Cities2_Ch3 + $76C7 = Music_Celadon_Ch1 + $773A = Music_Celadon_Ch2 + $77B5 = Music_Celadon_Ch3 + $786D = Music_Cinnabar_Ch1 + $78D4 = Music_Cinnabar_Ch2 + $793D = Music_Cinnabar_Ch3 + $79EB = Music_Vermilion_Ch1 + $7A61 = Music_Vermilion_Ch2 + $7AA6 = Music_Vermilion_Ch3 + $7B0D = Music_Vermilion_Ch4 + $7B58 = Music_Lavender_Ch1 + $7B9E = Music_Lavender_Ch2 + $7BAE = Music_Lavender_Ch3 + $7C21 = Music_Lavender_Ch4 + $73A7 = Music_SSAnne_Ch1 + $7419 = Music_SSAnne_Ch2 + $74CB = Music_SSAnne_Ch3 + $6F59 = Music_MeetProfOak_Ch1 + $6FA9 = Music_MeetProfOak_Ch2 + $703D = Music_MeetProfOak_Ch3 + $7120 = Music_MeetRival_Ch1 + $71BB = Music_MeetRival_Ch2 + $7233 = Music_MeetRival_Ch3 + $6DAE = Music_MuseumGuy_Ch1 + $6DF1 = Music_MuseumGuy_Ch2 + $6E6E = Music_MuseumGuy_Ch3 + $6ED1 = Music_MuseumGuy_Ch4 + $7C2E = Music_SafariZone_Ch1 + $7C6A = Music_SafariZone_Ch2 + $7C94 = Music_SafariZone_Ch3 + $5BA3 = Music_PkmnHealed_Ch1 + $5BC4 = Music_PkmnHealed_Ch2 + $5BD2 = Music_PkmnHealed_Ch3 + $5BDE = Music_Routes1_Ch1 + $5C51 = Music_Routes1_Ch2 + $5CD8 = Music_Routes1_Ch3 + $5D24 = Music_Routes1_Ch4 + $5DB9 = Music_Routes2_Ch1 + $5E4F = Music_Routes2_Ch2 + $5E9B = Music_Routes2_Ch3 + $5F08 = Music_Routes2_Ch4 + $5FAD = Music_Routes3_Ch1 + $6009 = Music_Routes3_Ch2 + $607F = Music_Routes3_Ch3 + $6131 = Music_Routes3_Ch4 + $626A = Music_Routes4_Ch1 + $6304 = Music_Routes4_Ch2 + $63C4 = Music_Routes4_Ch3 + $649D = Music_Routes4_Ch4 + $65F0 = Music_IndigoPlateau_Ch1 + $6664 = Music_IndigoPlateau_Ch2 + $66BA = Music_IndigoPlateau_Ch3 + $670F = Music_IndigoPlateau_Ch4 + $71A2 = Music_MeetRival_branch_b1a2 + $721D = Music_MeetRival_branch_b21d + $72B5 = Music_MeetRival_branch_b2b5 + $7119 = Music_MeetRival_branch_b119 + $719B = Music_MeetRival_branch_b19b + $6A6F = Music_Cities1_branch_aa6f + $5BE9 = Music_Routes1_branch_9be9 + $5C65 = Music_Routes1_branch_9c65 + $5C78 = Music_Routes1_branch_9c78 + $5C8D = Music_Routes1_branch_9c8d + $5C53 = Music_Routes1_branch_9c53 + $5CDD = Music_Routes1_branch_9cdd + $5DC3 = Music_Routes2_branch_9dc3 + $5E54 = Music_Routes2_branch_9e54 + $5E9E = Music_Routes2_branch_9e9e + $5FC3 = Music_Routes3_branch_9fc3 + $601A = Music_Routes3_branch_a01a + $60A3 = Music_Routes3_branch_a0a3 + $617A = Music_Routes3_branch_a17a + $628A = Music_Routes4_branch_a28a + $6325 = Music_Routes4_branch_a325 + $63D7 = Music_Routes4_branch_a3d7 + $64A8 = Music_Routes4_branch_a4a8 + $6659 = Music_IndigoPlateau_branch_a659 + $6605 = Music_IndigoPlateau_branch_a605 + $66AF = Music_IndigoPlateau_branch_a6af + $6673 = Music_IndigoPlateau_branch_a673 + $66FE = Music_IndigoPlateau_branch_a6fe + $66C6 = Music_IndigoPlateau_branch_a6c6 + $6791 = Music_IndigoPlateau_branch_a791 + $677E = Music_IndigoPlateau_branch_a77e + $67A8 = Music_IndigoPlateau_branch_a7a8 + $6728 = Music_IndigoPlateau_branch_a728 + $67CE = Music_PalletTown_branch_a7ce + $6861 = Music_PalletTown_branch_a861 + $68E3 = Music_PalletTown_branch_a8e3 + $691B = Music_UnusedSong_branch_a91b + $69D8 = Music_UnusedSong_branch_a9d8 + $6A79 = Music_Cities1_branch_aa79 + $6B7D = Music_Cities1_branch_ab7d + $6B8A = Music_Cities1_branch_ab8a + $6B12 = Music_Cities1_branch_ab12 + $6A80 = Music_Cities1_branch_aa80 + $6C00 = Music_Cities1_branch_ac00 + $6CC5 = Music_Cities1_branch_acc5 + $6CCE = Music_Cities1_branch_acce + $6C35 = Music_Cities1_branch_ac35 + $6D36 = Music_Cities1_branch_ad36 + $6D45 = Music_Cities1_branch_ad45 + $6CF3 = Music_Cities1_branch_acf3 + $6D5F = Music_Cities1_branch_ad5f + $6D52 = Music_Cities1_branch_ad52 + $6D6E = Music_Cities1_branch_ad6e + $6DE7 = Music_MuseumGuy_branch_ade7 + $6DEC = Music_MuseumGuy_branch_adec + $6DD6 = Music_MuseumGuy_branch_add6 + $6E26 = Music_MuseumGuy_branch_ae26 + $6EB8 = Music_MuseumGuy_branch_aeb8 + $6EC1 = Music_MuseumGuy_branch_aec1 + $6E8E = Music_MuseumGuy_branch_ae8e + $6EE1 = Music_MuseumGuy_branch_aee1 + $6F85 = Music_MeetProfOak_branch_af85 + $7005 = Music_MeetProfOak_branch_b005 + $70BC = Music_MeetProfOak_branch_b0bc + $70D8 = Music_MeetProfOak_branch_b0d8 + $70ED = Music_MeetProfOak_branch_b0ed + $7101 = Music_MeetProfOak_branch_b101 + $7123 = Music_MeetRival_branch_b123 + $7140 = Music_MeetRival_branch_b140 + $71A5 = Music_MeetRival_branch_b1a5 + $71D8 = Music_MeetRival_branch_b1d8 + $724B = Music_MeetRival_branch_b24b + $73B2 = Music_SSAnne_branch_b3b2 + $741E = Music_SSAnne_branch_b41e + $751A = Music_Cities2_branch_b51a + $758B = Music_Cities2_branch_b58b + $764C = Music_Cities2_branch_b64c + $76D4 = Music_Celadon_branch_b6d4 + $774A = Music_Celadon_branch_b74a + $77C1 = Music_Celadon_branch_b7c1 + $7878 = Music_Cinnabar_branch_b878 + $78D9 = Music_Cinnabar_branch_b8d9 + $793F = Music_Cinnabar_branch_b93f + $79F6 = Music_Vermilion_branch_b9f6 + $7A66 = Music_Vermilion_branch_ba66 + $7AA8 = Music_Vermilion_branch_baa8 + $7B3F = Music_Vermilion_branch_bb3f + $7B0E = Music_Vermilion_branch_bb0e + $7B6B = Music_Lavender_branch_bb6b + $7BA5 = Music_Lavender_branch_bba5 + $7BB9 = Music_Lavender_branch_bbb9 + $7C26 = Music_Lavender_branch_bc26 + $7C5F = Music_SafariZone_branch_bc5f + $7C4F = Music_SafariZone_branch_bc4f + $7C89 = Music_SafariZone_branch_bc89 + $7C79 = Music_SafariZone_branch_bc79 + $7CA5 = Music_SafariZone_branch_bca5 + $7C97 = Music_SafariZone_branch_bc97 + $7CD8 = Music_Gym_branch_bcd8 + $7D82 = Music_Gym_branch_bd82 + $7E3B = Music_Gym_branch_be3b + $7E44 = Music_Gym_branch_be44 + $7E4D = Music_Gym_branch_be4d + $7E02 = Music_Gym_branch_be02 + $7E61 = Music_Pokecenter_branch_be61 + $7F4E = Music_Pokecenter_branch_bf4e + $7F60 = Music_Pokecenter_branch_bf60 + $7EFC = Music_Pokecenter_branch_befc + $7FD9 = Music_Pokecenter_branch_bfd9 + $7FE2 = Music_Pokecenter_branch_bfe2 + $7FEB = Music_Pokecenter_branch_bfeb + $7F72 = Music_Pokecenter_branch_bf72 + $6913 = Music_UnusedSong_Ch1 + $69CF = Music_UnusedSong_Ch2 + SLACK: $000C bytes + +Bank #3: + SECTION: $4000-$7C49 ($3C4A bytes) + $4000 = _Joypad + $4335 = Func_c335 + $438B = CheckForceBikeOrSurf + $449D = Func_c49d + $43FF = Func_c3ff + $444E = Func_c44e + $435F = Func_c35f + $7225 = Func_f225 + $72B5 = Func_f2b5 + $7113 = Func_f113 + $4EB8 = LoadWildData + $404D = MapSongBanks + $423D = MapHeaderBanks + $452F = PrintSafariZoneSteps + $4E74 = RemoveItemFromInventory_ + $4E04 = AddItemToInventory_ + $55C7 = UseItem_ + $66F1 = TossItem_ + $6764 = IsKeyItem_ + $72E5 = _AddPartyMon + $749D = _AddEnemyMonToPlayerParty + $751E = Func_f51e + $7B50 = PrintBookshelfText + $7BBF = IndigoPlateauStatues + $7C12 = TownMapText + $7BE8 = BookOrSculptureText + $7C0D = ElevatorText + $7C45 = PokemonStuffText + $403C = TrySoftReset + $43E6 = ForcedBikeOrSurfMaps + $4422 = PointerTable_c422 + $441E = Func_c3ff.asm_c41e + $442A = PointerTable_c422.asm_c42a + $4434 = PointerTable_c422.asm_4434 + $443A = PointerTable_c422.asm_443A + $4440 = PointerTable_c422.asm_4440 + $4589 = Func_c589 + $4477 = Func_c44e.pointerTable_c477 + $447F = Func_c44e.arrayData_c47f + $4487 = Func_c44e.arrayData_c487 + $448A = Func_c44e.arrayData_c48a + $448D = Func_c44e.arrayData_c48d + $44CC = WarpTileIDPointers + $44FC = OverworldWarpTileIDs + $4500 = RedsHouse1WarpTileIDs + $4503 = MartWarpTileIDs + $4505 = ForestWarpTileIDs + $4500 = RedsHouse2WarpTileIDs + $4509 = DojoWarpTileIDs + $4503 = PokecenterWarpTileIDs + $4509 = GymWarpTileIDs + $450B = HouseWarpTileIDs + $44FF = ForestGateWarpTileIDs + $44FF = MuseumWarpTileIDs + $452A = UndergroundWarpTileIDs + $44FF = GateWarpTileIDs + $450F = ShipWarpTileIDs + $452E = ShipPortWarpTileIDs + $4529 = CemeteryWarpTileIDs + $4514 = InteriorWarpTileIDs + $4518 = CavernWarpTileIDs + $451C = LobbyWarpTileIDs + $4520 = MansionWarpTileIDs + $4524 = LabWarpTileIDs + $452E = ClubWarpTileIDs + $4526 = FacilityWarpTileIDs + $452C = PlateauWarpTileIDs + $4579 = SafariSteps + $457E = SafariBallText + $45BE = Func_c5be + $4636 = Func_c636 + $474F = Func_c69c.asm_c74f + $48DE = Func_c8de + $47BE = Tilesets + $47B2 = DungeonTilesets + $4AEA = MapHS00 + $4AED = MapHS01 + $4AF3 = MapHS02 + $4AF9 = MapHS03 + $4AE7 = MapHSXX + $4B08 = MapHS0A + $4B35 = MapHS0D + $4B3B = MapHS0F + $4B3E = MapHS14 + $4B41 = MapHS17 + $4B4A = MapHS1A + $4B4D = MapHS1B + $4B50 = MapHS21 + $4B56 = MapHS23 + $4B5C = MapHS24 + $4B5F = MapHS27 + $4B68 = MapHS28 + $4B80 = MapHS2D + $4C16 = MapHS33 + $4B86 = MapHS34 + $4C1F = MapHS3B + $4C31 = MapHS3D + $4BD1 = MapHS53 + $4C0D = MapHS58 + $4C3D = MapHS60 + $4C40 = MapHS66 + $4C43 = MapHS67 + $4C49 = MapHS68 + $4D66 = MapHS6C + $4D6C = MapHS78 + $4BB9 = MapHS84 + $4BBC = MapHS87 + $4B92 = MapHS8F + $4B95 = MapHS90 + $4B98 = MapHS91 + $4BA1 = MapHS92 + $4BA4 = MapHS93 + $4BAA = MapHS94 + $4BB6 = MapHS95 + $4BBF = MapHS9B + $4D75 = MapHS9F + $4D7B = MapHSA0 + $4D81 = MapHSA1 + $4D8D = MapHSA2 + $4BC2 = MapHSA5 + $4BC8 = MapHSB1 + $4BCE = MapHSB5 + $4D6F = MapHSC0 + $4BFB = MapHSC2 + $4C52 = MapHSC6 + $4C5B = MapHSC7 + $4C61 = MapHSC8 + $4C6D = MapHSC9 + $4C73 = MapHSCA + $4C85 = MapHSCF + $4C94 = MapHSD0 + $4C9D = MapHSD1 + $4CAF = MapHSD2 + $4CC4 = MapHSD3 + $4CD3 = MapHSD4 + $4CEB = MapHSD5 + $4D1B = MapHSD6 + $4D1E = MapHSD7 + $4D24 = MapHSD8 + $4D33 = MapHSD9 + $4D3F = MapHSDA + $4D45 = MapHSDB + $4D51 = MapHSDC + $4D54 = MapHSE2 + $4D5D = MapHSE3 + $4B89 = MapHSE4 + $4CF4 = MapHSE9 + $4CFD = MapHSEA + $4D0F = MapHSEB + $4D18 = MapHSF4 + $4DAA = UsedStrengthText + $4DBB = CanMoveBouldersText + $4DF7 = CoordsData_cdf7 + $4DFA = CurrentTooFastText + $4DFF = CyclingIsFunText + $4E4A = AddItemToInventory_.increaseItemQuantity + $4E6A = AddItemToInventory_.success + $4E68 = AddItemToInventory_.storeNewQuantity + $4E21 = AddItemToInventory_.loop + $4EEB = WildDataPointers + $50DD = NoMons + $50DF = Route1Mons + $50F5 = Route2Mons + $5137 = Route3Mons + $518F = Route4Mons + $51E7 = Route5Mons + $51FD = Route6Mons + $5297 = Route7Mons + $5281 = Route8Mons + $51D1 = Route9Mons + $5255 = Route10Mons + $5213 = Route11Mons + $526B = Route12Mons + $531F = Route13Mons + $5335 = Route14Mons + $534B = Route15Mons + $5361 = Route16Mons + $5377 = Route17Mons + $538D = Route18Mons + $53FB = WaterMons + $54D7 = Route21Mons + $510B = Route22Mons + $5559 = Route23Mons + $51A5 = Route24Mons + $51BB = Route25Mons + $5121 = ForestMons + $514D = MoonMons1 + $5163 = MoonMonsB1 + $5179 = MoonMonsB2 + $5229 = TunnelMonsB1 + $5543 = PowerPlantMons + $559B = PlateauMons1 + $52AD = TowerMons1 + $52AF = TowerMons2 + $52B1 = TowerMons3 + $52C7 = TowerMons4 + $52DD = TowerMons5 + $52F3 = TowerMons6 + $5309 = TowerMons7 + $5427 = IslandMonsB1 + $543D = IslandMonsB2 + $5453 = IslandMonsB3 + $5469 = IslandMonsB4 + $547F = MansionMons1 + $5411 = IslandMons1 + $556F = PlateauMons2 + $55B1 = CaveMons + $5585 = PlateauMons3 + $5495 = MansionMons2 + $54AB = MansionMons3 + $54C1 = MansionMonsB1 + $53B9 = ZoneMons1 + $53CF = ZoneMons2 + $53E5 = ZoneMons3 + $53A3 = ZoneMonsCenter + $5517 = DungeonMons2 + $552D = DungeonMonsB1 + $5501 = DungeonMons1 + $523F = TunnelMonsB2 + $6479 = ItemUseTMHM + $55E1 = ItemUsePtrTable + $5687 = ItemUseBall + $5968 = ItemUseTownMap + $5977 = ItemUseBicycle + $59B4 = ItemUseSurfboard + $5A56 = ItemUsePokedex + $5A5B = ItemUseEvoStone + $5ABB = ItemUseMedicine + $5F52 = ItemUseBait + $5F67 = ItemUseRock + $6476 = UnusableItem + $5FAF = ItemUseEscapeRope + $6003 = ItemUseRepel + $5AB4 = ItemUseVitamin + $6013 = ItemUseXAccuracy + $6022 = ItemUseCardKey + $60CD = ItemUsePokedoll + $60DC = ItemUseGuardSpec + $60EB = ItemUseSuperRepel + $60F0 = ItemUseMaxRepel + $60F5 = ItemUseDireHit + $6104 = ItemUseXStat + $623A = ItemUseCoinCase + $62DE = ItemUseOaksParcel + $62E1 = ItemUseItemfinder + $6140 = ItemUsePokeflute + $624C = OldRodCode + $6259 = GoodRodCode + $6283 = SuperRodCode + $6317 = ItemUsePPUp + $631E = ItemUsePPRestore + $6581 = ItemUseNotTime + $658B = ThrowBallAtTrainerMon + $65B1 = BoxFullCannotThrowBall + $65E8 = ItemUseText00 + $5801 = ItemUseBall.next12 + $578B = ItemUseBall.BallSuccess + $5937 = ItemUseBallText00 + $5922 = ItemUseBall.printText0 + $593C = ItemUseBallText01 + $5941 = ItemUseBallText02 + $5946 = ItemUseBallText03 + $594B = ItemUseBallText04 + $5950 = ItemUseBallText05 + $5961 = ItemUseBallText06 + $67A4 = Func_e7a4 + $5957 = ItemUseBallText07 + $595C = ItemUseBallText08 + $69C5 = ItemUseReloadOverworldData + $65FC = GotOffBicycleText + $65AC = NoCyclingAllowedHere + $65F2 = GotOnBicycleText + $68B8 = IsNextTileShoreOrWater + $65B6 = SurfingAttemptFailed + $5A28 = ItemUseSurfboard.makePlayerMoveForward + $5A4C = SurfingGotOnText + $5A51 = SurfingNoPlaceToGetOffText + $657C = ItemUseNoEffect + $5ADF = ItemUseMedicine.emptyParty + $5AE9 = ItemUseMedicine.emptyPartyText + $5DE1 = ItemUseMedicine.canceledItemUse + $5DFA = ItemUseMedicine.useVitamin + $5D73 = ItemUseMedicine.healingItemNoEffect + $5D79 = ItemUseMedicine.doneHealing + $5B4A = ItemUseMedicine.cureStatusAilment + $5CC5 = ItemUseMedicine.notUsingSoftboiled2 + $5DE7 = ItemUseMedicine.done + $6571 = RemoveUsedItem + $5E83 = ItemUseMedicine.useRareCandy + $5E74 = ItemUseMedicine.recalculateStats + $5F2E = VitaminText + $5F24 = VitaminStatRoseText + $5F29 = VitaminNoEffectText + $5FA5 = ThrewBaitText + $5FAA = ThrewRockText + $5FFD = EscapeRopeTilesets + $6563 = PrintItemUseTextAndRemoveItem + $4586 = Func_c586 + $6072 = CardKeyTable1 + $609B = CardKeyTable2 + $60C4 = CardKeyTable3 + $6005 = ItemUseRepelCommon + $61FD = Route12SnorlaxFluteCoords + $6215 = PlayedFluteHadEffectText + $6206 = Route16SnorlaxFluteCoords + $620B = PlayedFluteNoEffectText + $61E5 = WakeUpEntireParty + $6210 = FluteWokeUpText + $6247 = CoinCaseNumCoinsText + $62B4 = FishingInit + $627F = GoodRodMons + $68EA = ReadSuperRodData + $6586 = ItemUseNotYoursToUse + $6312 = ItemfinderFoundNothingText + $630D = ItemfinderFoundItemText + $6451 = ItemUsePPRestore.itemNotUsed + $641B = ItemUsePPRestore.useElixir + $645D = RaisePPWhichTechniqueText + $6462 = RestorePPWhichTechniqueText + $66E3 = GetSelectedMoveOffset + $6467 = PPMaxedOutText + $6606 = RestoreBonusPP + $646C = PPIncreasedText + $6471 = PPRestoredText + $63E6 = ItemUsePPRestore.restorePP + $644E = ItemUsePPRestore.noEffect + $6677 = GetMaxPP + $63B5 = ItemUsePPRestore.afterRestoringPP + $654F = BootedUpTMText + $6554 = BootedUpHMText + $6559 = TeachMachineMoveText + $655E = MonCannotLearnMachineMoveText + $65CA = ItemUseNoEffectText + $65C0 = ItemUseNotTimeText + $65C5 = ItemUseNotYoursToUseText + $65CF = ThrowBallAtTrainerMonText1 + $65D4 = ThrowBallAtTrainerMonText2 + $65D9 = NoCyclingAllowedHereText + $65E3 = BoxFullCannotThrowBallText + $65DE = NoSurfingHereText + $6642 = AddBonusPP + $66E9 = GetSelectedMoveOffset2 + $675A = IsItOKToTossItemText + $6755 = ThrewAwayItemText + $675F = TooImportantToTossText + $6799 = KeyItemBitfield + $68E0 = WaterTilesets + $6919 = SuperRodData + $697D = FishingGroup1 + $6987 = FishingGroup3 + $698E = FishingGroup4 + $6993 = FishingGroup5 + $69BC = FishingGroup10 + $69AA = FishingGroup8 + $69A1 = FishingGroup7 + $6982 = FishingGroup2 + $69B3 = FishingGroup9 + $6998 = FishingGroup6 + $69F0 = Func_e9f0 + $6A96 = DrawBadges.FaceBadgeTiles + $6A4C = DrawBadges.DrawBadgeRow + $6A91 = DrawBadges.PlaceTiles + $6F4E = Func_ef4e + $6F7D = NothingToCutText + $6FF2 = UsedCutText + $6FF7 = AnimateCutTree + $7100 = CutTreeBlockSwaps + $709F = Func_f09f + $6EDC = Func_eedc + $704C = LoadCutTreeOAM + $7055 = asm_f055 + $7068 = Func_f068 + $7060 = CutTreeOAM + $708F = CutTreeAnimationOffsets + $7097 = CutTreeAnimationOffsets2 + $48F5 = MapHSPointers + $71E6 = MissableObjectFlagAction + $72DD = Func_f2dd + $72AF = MovementData_f2af + $72AD = MovementData_f2ad + $72B1 = MovementData_f2b1 + $72B3 = MovementData_f2b3 + $4034 = DiscardButtonPresses + $7669 = FlagAction + $7476 = AddPartyMon_WriteMovePP + $7800 = Func_f800 + $77D7 = Func_f7d7 + $7839 = SubBCD + $78A0 = InitializeEmptyList + $7175 = InitializeMissableObjectsFlags + $78C8 = Func_f8c8 + $79BF = Func_f9bf + $79D2 = DataTable_f9d2 + $7AD7 = UpdateHPBar_CalcHPDifference + $7AD1 = UpdateHPBar_CompareNewHPToOldHP + $7B30 = UpdateHPBar_CalcOldNewHPBarPixels + $7AF5 = UpdateHPBar_PrintHPNumber + $7AB1 = UpdateHPBar_AnimateHPBar + $79DF = GetHPBarLength + $7B8B = BookshelfTileIDs + $7BD9 = IndigoPlateauStatuesText1 + $7BDE = IndigoPlateauStatuesText2 + $7BE3 = IndigoPlateauStatuesText3 + $7C03 = PokemonBooksText + $7C08 = DiglettSculptureText + $4DC0 = CheckForForcedBikeSurf + $6A9E = GymLeaderFaceAndBadgeTileGraphics + $7132 = Func_f132 + $76A5 = HealParty + $771E = DivideBCDPredef + $771E = DivideBCDPredef2 + $781D = AddBCDPredef + $7836 = SubBCDPredef + $771E = DivideBCDPredef3 + $771E = DivideBCDPredef4 + $7850 = InitPlayerData + $7666 = FlagActionPredef + $71D7 = HideObject + $71A6 = IsObjectHidden + $469C = Func_c69c + $71C8 = ShowObject + $71C8 = ShowObject2 + $6E9E = Func_ee9e + $7850 = InitPlayerData2 + $4754 = Func_c754 + $78A5 = IsItemInBag_ + $78BA = Func_f8ba + $7929 = Func_f929 + $79A0 = Func_f9a0 + $7A1D = UpdateHPBar + $79DC = HPBarLength + $6A03 = DrawBadges + $6F54 = UsedCut + $7A1D = UpdateHPBar2 + $460B = Func_c60b + $4D99 = PrintStrengthTxt + $7473 = LoadMovePPs + $69CB = Func_e9cb + $7820 = AddBCD + $7721 = DivideBCD + SLACK: $03B6 bytes + +Bank #4: + SECTION: $4000-$537F ($1380 bytes) + $4000 = OakAideSprite + $4180 = RockerSprite + $4300 = SwimmerSprite + $4480 = WhitePlayerSprite + $4540 = GymHelperSprite + $4600 = OldPersonSprite + $46C0 = MartGuySprite + $4780 = FisherSprite + $4840 = OldMediumWomanSprite + $4900 = NurseSprite + $49C0 = CableClubWomanSprite + $4A80 = MrMasterballSprite + $4B40 = LaprasGiverSprite + $4C00 = WardenSprite + $4CC0 = SsCaptainSprite + $4D80 = Fisher2Sprite + $4F00 = BlackbeltSprite + $5080 = GuardSprite + $5140 = BallSprite + $5180 = OmanyteSprite + $51C0 = BoulderSprite + $5200 = PaperSheetSprite + $5240 = BookMapDexSprite + $5280 = ClipboardSprite + $52C0 = SnorlaxSprite + $5300 = OldAmberSprite + $5340 = LyingOldManSprite + SECTION: $5380-$68D7 ($1558 bytes) + $5A80 = FontGraphics + $6288 = TextBoxGraphics + $5EA0 = HpBarAndStatusGraphics + $60C8 = NintendoCopyrightLogoGraphics + $61F8 = GamefreakLogoGraphics + $5380 = PokemonLogoGraphics + $66A8 = PlayerCharacterTitleGraphics + $6080 = BattleHudTiles1 + $6098 = BattleHudTiles2 + $60B0 = BattleHudTiles3 + $6488 = PokedexTileGraphics + $65A8 = WorldMapTileGraphics + SECTION: $68D8-$7A9F ($11C8 bytes) + $72ED = ErasePartyMenuCursors + $7613 = SwitchPartyMon + $6CD2 = DrawPartyMenu_ + $6CE3 = RedrawPartyMenu_ + $7074 = Func_13074 + $7095 = StartMenu_Pokedex + $70A9 = StartMenu_Pokemon + $7302 = StartMenu_Item + $7460 = StartMenu_TrainerInfo + $75E3 = StartMenu_SaveReset + $75F6 = StartMenu_Option + $6EDE = RedPicFront + $7A58 = GetTrainerName_ + $7A8F = Random_ + $6FE8 = ShrinkPic1 + $7042 = ShrinkPic2 + $6AE4 = PrintStatsBox + $68EA = Func_128ea + $6924 = Func_12924 + $6ADC = PTile + $6AC7 = DrawLineBox + $6AA5 = Type1Text + $6AC4 = OKText + $6ABC = StatusText + $6A9D = NamePointers2 + $6A7E = StatusScreen.unk_12a7e + $6A95 = OTPointers + $6B3A = StatsText + $6B30 = PrintStat + $6CCB = Func_12ccb + $6CAF = EXPPointsText + $6C86 = StatusScreen2.asm_12c86 + $6CC3 = Func_12cc3 + $6E1A = RedrawPartyMenu_.printMessage + $6E15 = RedrawPartyMenu_.afterDrawingMonEntries + $6EC7 = SetPartyMenuHealthBarColor + $6DA3 = RedrawPartyMenu_.ableToLearnMoveText + $6DA8 = RedrawPartyMenu_.notAbleToLearnMoveText + $6D03 = RedrawPartyMenu_.loop + $6E0C = RedrawPartyMenu_.notAbleToEvolveText + $6E07 = RedrawPartyMenu_.ableToEvolveText + $6E73 = PartyMenuMessagePointers + $6E61 = PartyMenuItemUseMessagePointers + $6E9D = AntidoteText + $6EA7 = BurnHealText + $6EAC = IceHealText + $6EB1 = AwakeningText + $6EA2 = ParlyzHealText + $6E98 = PotionText + $6EB6 = FullHealText + $6EBB = ReviveText + $6EC0 = RareCandyText + $6E7F = PartyMenuNormalText + $6E84 = PartyMenuItemUseText + $6E89 = PartyMenuBattleText + $6E8E = PartyMenuUseTMText + $6E93 = PartyMenuSwapMonText + $70BF = StartMenu_Pokemon.loop + $70CB = StartMenu_Pokemon.exitMenu + $7149 = StartMenu_Pokemon.choseStats + $7160 = StartMenu_Pokemon.choseOutOfBattleMove + $7653 = SwitchPartyMon_Stats + $70C9 = StartMenu_Pokemon.checkIfPokemonChosen + $717C = StartMenu_Pokemon.outOfBattleMovePointers + $71C0 = StartMenu_Pokemon.cut + $718E = StartMenu_Pokemon.fly + $71D4 = StartMenu_Pokemon.surf + $7203 = StartMenu_Pokemon.strength + $7213 = StartMenu_Pokemon.flash + $722D = StartMenu_Pokemon.dig + $7245 = StartMenu_Pokemon.teleport + $728A = StartMenu_Pokemon.softboiled + $72DF = StartMenu_Pokemon.newBadgeRequired + $7285 = StartMenu_Pokemon.cannotFlyHereText + $72D9 = StartMenu_Pokemon.goBackToMap + $7228 = StartMenu_Pokemon.flashLightsAreaText + $7280 = StartMenu_Pokemon.cannotUseTeleportNowText + $727B = StartMenu_Pokemon.warpToLastPokemonCenterText + $72CB = StartMenu_Pokemon.notHealthyEnough + $72D4 = StartMenu_Pokemon.notHealthyEnoughText + $72E8 = StartMenu_Pokemon.newBadgeRequiredText + $742A = CannotUseItemsHereText + $7384 = StartMenu_Item.useOrTossItem + $72FC = ItemMenuLoop + $742F = CannotGetOffHereText + $7459 = UsableItems_CloseMenu + $7434 = UsableItems_PartyMenu + $7403 = StartMenu_Item.partyMenuNotDisplayed + $749A = DrawTrainerInfo + $75D8 = TrainerInfo_DrawVerticalLine + $757F = TrainerInfo_FarCopyData + $75A0 = TrainerInfo_DrawTextBox + $7597 = TrainerInfo_BadgesText + $7584 = TrainerInfo_NameMoneyTimeText + $75C3 = TrainerInfo_DrawHorizontalEdge + $75D0 = TrainerInfo_NextTextBoxRow + $7625 = SwitchPartyMon_OAM + $7773 = TechnicalMachines + $7853 = YouWinText + $785B = YouLoseText + $7864 = DrawText + $786B = PickUpPayDayMoneyText + $68D8 = Func_128d8 + $7918 = WildMonEncounterSlotChances + $799E = HitWithRecoilText + $79D5 = Func_139d5 + $79CD = ConvertedTypeText + $7A43 = Func_13a43 + $7A4A = Func_13a4a + $7A37 = Func_13a37 + $7A53 = StatusChangesEliminatedText + $7870 = Func_13870 + $77AA = Func_137aa + $792C = RecoilEffect_ + $79A3 = ConversionEffect_ + $79DA = HazeEffect_ + $6953 = StatusScreen + $6B57 = StatusScreen2 + $773E = CanLearnTM + $7763 = TMToMove + $68EF = DrawHP + $68F6 = Func_128f6 + SLACK: $0560 bytes + +Bank #5: + SECTION: $4000-$783F ($3840 bytes) + $4180 = RedSprite + $76C0 = SeelSprite + $4000 = RedCyclingSprite + $4300 = BlueSprite + $4480 = OakSprite + $4600 = BugCatcherSprite + $4780 = SlowbroSprite + $4900 = LassSprite + $4A80 = BlackHairBoy1Sprite + $4C00 = LittleGirlSprite + $4D80 = BirdSprite + $4F00 = FatBaldGuySprite + $5080 = GamblerSprite + $5200 = BlackHairBoy2Sprite + $5380 = GirlSprite + $5500 = HikerSprite + $5680 = FoulardWomanSprite + $5800 = GentlemanSprite + $5980 = DaisySprite + $5B00 = BikerSprite + $5C80 = SailorSprite + $5E00 = CookSprite + $5F80 = BikeShopGuySprite + $6040 = MrFujiSprite + $61C0 = GiovanniSprite + $6340 = RocketSprite + $64C0 = MediumSprite + $6640 = WaiterSprite + $67C0 = ErikaSprite + $6940 = MomGeishaSprite + $6AC0 = BrunetteGirlSprite + $6C40 = LanceSprite + $6DC0 = MomSprite + $6E80 = BaldingGuySprite + $6F40 = YoungBoySprite + $7000 = GameboyKidSprite + $70C0 = ClefairySprite + $7240 = AgathaSprite + $73C0 = BrunoSprite + $7540 = LoreleiSprite + SECTION: $7840-$7F5E ($071F bytes) + $785B = InitMapSprites + $7E2C = ActivatePC + $797B = InitOutsideMapSprites + $7957 = LoadMapSpriteTilePatterns.alreadyLoaded + $7B27 = SpriteSheetPointerTable + $7971 = ReadSpriteSheetData + $788D = LoadMapSpriteTilePatterns.loadTilePatternLoop + $7A64 = MapSpriteSets + $7A1A = GetSplitMapSpriteSetID + $7AB9 = SpriteSets + $7871 = LoadMapSpriteTilePatterns + $7A89 = SplitMapSpriteSets + $7CAF = EmotionBubblesPointerTable + $7CB5 = EmotionBubblesOAM + $7CBD = EmotionBubbles + $7E1D = SubstituteText + $7E22 = HasSubstituteText + $7E27 = TooWeakSubstituteText + $7F23 = TurnedOnPC1Text + $7F13 = LogOff + $7EE4 = BillsPC + $7EC0 = OaksPC + $7ED2 = PKMNLeague + $7F32 = AccessedMyPCText + $7F2D = AccessedSomeonesPCText + $7F28 = AccessedBillsPCText + $7E48 = PCMainMenu + $7F37 = RemoveItemByID + $7DAD = SubstituteEffectHandler + $7840 = LoadPokedexTilePatterns + $7C47 = EmotionBubble + $7D7D = EvolveTradeMon + SLACK: $00A1 bytes + +Bank #6: + SECTION: $4000-$6717 ($2718 bytes) + $42A1 = PalletTown_h + $4357 = ViridianCity_h + $4554 = PewterCity_h + $474E = CeruleanCity_h + $4998 = VermilionCity_h + $4000 = CeladonCity_h + $4BA7 = FuchsiaCity_h + $5B2F = BluesHouse_h + $5C4F = IndigoPlateauLobby_h + $5C06 = VermilionHouse3_h + $5CFF = SilphCo4_h + $5F2B = SilphCo5_h + $619D = SilphCo6_h + $6672 = HandleLedges + $4DEE = Func_18dee + $6442 = PointerTable_1a442 + $6510 = PointerTable_1a510 + $657D = PointerTable_1a57d + $63E0 = Func_1a3e0 + $641D = Func_1a41d + $65E7 = Func_1a5e7 + $6609 = HandleDoors + $40DF = CeladonCityBlocks + $5966 = CeladonCityTextPointers + $5956 = CeladonCityScript + $4022 = CeladonCityObject + $42FD = PalletTownBlocks + $4F88 = PalletTownTextPointers + $4E5B = PalletTownScript + $42C3 = PalletTownObject + $43EC = ViridianCityBlocks + $50E4 = ViridianCityTextPointers + $4FF1 = ViridianCityScript + $4384 = ViridianCityObject + $45E6 = PewterCityBlocks + $538B = PewterCityTextPointers + $5237 = PewterCityScript + $4577 = PewterCityObject + $4830 = CeruleanCityBlocks + $562D = CeruleanCityTextPointers + $5480 = CeruleanCityScript + $4786 = CeruleanCityObject + $4A3F = VermilionCityBlocks + $586F = VermilionCityTextPointers + $57A1 = VermilionCityScript + $49BA = VermilionCityObject + $4C86 = FuchsiaCityBlocks + $5A2E = FuchsiaCityTextPointers + $5A2B = FuchsiaCityScript + $4BD4 = FuchsiaCityObject + $4E36 = Func_18e36 + $4E73 = PalletTownScriptPointers + $4E81 = PalletTownScript0 + $4EB2 = PalletTownScript1 + $4ED2 = PalletTownScript2 + $4F12 = PalletTownScript3 + $4F4B = PalletTownScript4 + $4F56 = PalletTownScript5 + $4F87 = PalletTownScript6 + $4F96 = PalletTownText1 + $4FD3 = PalletTownText2 + $4FD8 = PalletTownText3 + $4FDD = PalletTownText4 + $4FE2 = PalletTownText5 + $4FE7 = PalletTownText6 + $4FEC = PalletTownText7 + $4FB0 = OakAppearsText + $4FCE = OakWalksUpText + $4FFD = ViridianCityScriptPointers + $5005 = ViridianCityScript0 + $5062 = ViridianCityScript1 + $508F = ViridianCityScript2 + $50C1 = ViridianCityScript3 + $500B = ViridianCityScript_1900b + $503D = ViridianCityScript_1903d + $50CF = ViridianCityScript_190cf + $5102 = ViridianCityText1 + $5107 = ViridianCityText2 + $512C = ViridianCityText3 + $515C = ViridianCityText4 + $517F = ViridianCityText5 + $5196 = ViridianCityText6 + $51DF = ViridianCityText7 + $521E = ViridianCityText8 + $5223 = ViridianCityText9 + $5228 = ViridianCityText10 + $522D = ViridianCityText13 + $5232 = ViridianCityText14 + $5219 = ViridianCityText15 + $5127 = ViridianCityText_19127 + $5122 = ViridianCityText_19122 + $514D = ViridianCityText_1914d + $5157 = ViridianCityText_19157 + $5152 = ViridianCityText_19152 + $5175 = ViridianCityText_19175 + $517A = ViridianCityText_1917a + $5191 = ViridianCityText_19191 + $51CA = ViridianCityText_191ca + $51CF = ReceivedTM42Text + $51DA = TM42NoRoomText + $51D5 = TM42Explanation + $520A = ViridianCityText_1920a + $520F = ViridianCityText_1920f + $5214 = ViridianCityText_19214 + $5243 = PewterCityScriptPointers + $5251 = PewterCityScript0 + $5280 = PewterCityScript1 + $52D3 = PewterCityScript2 + $52E9 = PewterCityScript3 + $5305 = PewterCityScript4 + $5359 = PewterCityScript5 + $536F = PewterCityScript6 + $525E = PewterCityScript_1925e + $5277 = CoordsData_19277 + $52CE = MovementData_PewterMuseumGuyExit + $5353 = MovementData_PewterGymGuyExit + $53A7 = PewterCityText1 + $53AC = PewterCityText2 + $53B1 = PewterCityText3 + $5405 = PewterCityText4 + $5436 = PewterCityText5 + $5467 = PewterCityText6 + $546C = PewterCityText7 + $5471 = PewterCityText10 + $5476 = PewterCityText11 + $547B = PewterCityText12 + $5400 = PewterCityText13 + $5462 = PewterCityText14 + $53F1 = PewterCityText_193f1 + $53F6 = PewterCityText_193f6 + $53FB = PewterCityText_193fb + $5427 = PewterCityText_19427 + $542C = PewterCityText_1942c + $5431 = PewterCityText_19431 + $545D = PewterCityText_1945d + $549D = CeruleanCityScriptPointers + $54C8 = CeruleanCityScript0 + $5567 = CeruleanCityScript1 + $55B1 = CeruleanCityScript2 + $5610 = CeruleanCityScript3 + $54A7 = CeruleanCityScript4 + $548C = CeruleanCityScript_1948c + $554F = CeruleanCityCoords1 + $5554 = CeruleanCityCoords2 + $5559 = CeruleanCityMovement1 + $566D = CeruleanCityText_1966d + $5672 = CeruleanCityText_19672 + $555D = CeruleanCityScript_1955d + $5608 = CeruleanCityMovement4 + $5600 = CeruleanCityMovement3 + $564F = CeruleanCityText1 + $567C = CeruleanCityText2 + $56F8 = CeruleanCityText3 + $56FD = CeruleanCityText4 + $5702 = CeruleanCityText5 + $5707 = CeruleanCityText6 + $570C = CeruleanCityText7 + $573F = CeruleanCityText8 + $5783 = CeruleanCityText9 + $5788 = CeruleanCityText10 + $5707 = CeruleanCityText11 + $578D = CeruleanCityText12 + $5792 = CeruleanCityText13 + $5797 = CeruleanCityText16 + $579C = CeruleanCityText17 + $5677 = CeruleanCityText_19677 + $5668 = CeruleanCityText_19668 + $56D9 = CeruleanCityText_196d9 + $56EE = CeruleanCityText_196ee + $56F3 = CeruleanCityText_196f3 + $56E9 = TM28NoRoomText + $56DE = ReceivedTM28Text + $5730 = CeruleanCityText_19730 + $5735 = CeruleanCityText_19735 + $573A = CeruleanCityText_1973a + $576F = CeruleanCityText_1976f + $5774 = CeruleanCityText_19774 + $5779 = CeruleanCityText_19779 + $577E = CeruleanCityText_1977e + $57CB = VermilionCityScript_197cb + $57C0 = VermilionCityScript_197c0 + $57DC = VermilionCityScriptPointers + $57E6 = VermilionCityScript0 + $585F = VermilionCityScript1 + $5833 = VermilionCityScript2 + $584E = VermilionCityScript3 + $5826 = VermilionCityScript4 + $5823 = CoordsData_19823 + $5889 = VermilionCityText1 + $588E = VermilionCityText2 + $58B1 = VermilionCityText3 + $591D = VermilionCityText4 + $5922 = VermilionCityText5 + $5938 = VermilionCityText6 + $593D = VermilionCityText7 + $5942 = VermilionCityText8 + $5947 = VermilionCityText11 + $594C = VermilionCityText12 + $5951 = VermilionCityText13 + $58A7 = VermilionCityText_198a7 + $58AC = VermilionCityText_198ac + $58FF = VermilionCityCoords1 + $5904 = SSAnneWelcomeText4 + $5909 = SSAnneWelcomeText9 + $5913 = SSAnneNoTicketText + $590E = SSAnneFlashedTicketText + $5918 = SSAnneNotHereText + $5933 = VermilionCityText14 + $598A = CeladonCityText1 + $598F = CeladonCityText2 + $5994 = CeladonCityText3 + $5999 = CeladonCityText4 + $599E = CeladonCityText5 + $59E7 = CeladonCityText6 + $59EC = CeladonCityText7 + $59F9 = CeladonCityText8 + $59FE = CeladonCityText9 + $5A03 = CeladonCityText10 + $5A08 = CeladonCityText11 + $5A0D = CeladonCityText13 + $5A12 = CeladonCityText14 + $5A17 = CeladonCityText15 + $5A1C = CeladonCityText16 + $5A21 = CeladonCityText17 + $5A26 = CeladonCityText18 + $59D2 = TM41PreText + $59E2 = TM41NoRoomText + $59D7 = ReceivedTM41Text + $59DD = TM41ExplanationText + $5A5E = FuchsiaCityText1 + $5A63 = FuchsiaCityText2 + $5A68 = FuchsiaCityText3 + $5A6D = FuchsiaCityText4 + $5A72 = FuchsiaCityText5 + $5A72 = FuchsiaCityText6 + $5A72 = FuchsiaCityText7 + $5A72 = FuchsiaCityText8 + $5A72 = FuchsiaCityText9 + $5A72 = FuchsiaCityText10 + $5A77 = FuchsiaCityText11 + $5A77 = FuchsiaCityText12 + $5A7C = FuchsiaCityText13 + $5A81 = FuchsiaCityText16 + $5A86 = FuchsiaCityText17 + $5A8B = FuchsiaCityText18 + $5A90 = FuchsiaCityText19 + $5AA4 = FuchsiaCityText20 + $5AB8 = FuchsiaCityText21 + $5ACC = FuchsiaCityText22 + $5AE0 = FuchsiaCityText23 + $5AF4 = FuchsiaCityText24 + $5A9F = FuchsiaCityChanseyText + $5AB3 = FuchsiaCityVoltorbText + $5AC7 = FuchsiaCityKangaskhanText + $5ADB = FuchsiaCitySlowpokeText + $5AEF = FuchsiaCityLaprasText + $5B2A = FuchsiaCityText_19b2a + $5B20 = FuchsiaCityOmanyteText + $5B25 = FuchsiaCityKabutoText + $5BF6 = BluesHouseBlocks + $5B57 = BluesHouseTextPointers + $5B3B = BluesHouseScript + $5BCE = BluesHouseObject + $5B47 = BluesHouseScriptPointers + $5B4B = BluesHouseScript0 + $5B56 = BluesHouseScript1 + $5B5D = BluesHouseText1 + $5BC4 = BluesHouseText2 + $5BC9 = BluesHouseText3 + $5BAA = DaisyInitialText + $5BAF = DaisyOfferMapText + $5BB4 = GotMapText + $5BBF = DaisyUseMapText + $5BBA = DaisyBagFullText + $5C3F = VermilionHouse3Blocks + $5C15 = VermilionHouse3TextPointers + $5C12 = VermilionHouse3Script + $5C25 = VermilionHouse3Object + $5C17 = VermilionHouse3Text1 + $5CCF = IndigoPlateauLobbyBlocks + $5C7F = IndigoPlateauLobbyTextPointers + $5C5B = IndigoPlateauLobbyScript + $5C95 = IndigoPlateauLobbyObject + $5C89 = IndigoPlateauLobbyText1 + $5C8A = IndigoPlateauLobbyText2 + $5C8F = IndigoPlateauLobbyText3 + $5C94 = IndigoPlateauLobbyText5 + $5EA4 = SilphCo4Blocks + $5DA0 = SilphCo4TextPointers + $5D0B = SilphCo4Script + $5E35 = SilphCo4Object + $5D21 = SilphCo4Script_19d21 + $5DAE = SilphCo4TrainerHeaders + $5D9A = SilphCo4ScriptPointers + $5D58 = SilphCo4Data19d58 + $5D5D = SilphCo4Script_19d5d + $5D89 = SilphCo4Script_19d89 + $5DD3 = SilphCo4Text1 + $5DEA = SilphCo4Text2 + $5E03 = SilphCo4Text3 + $5E1C = SilphCo4Text4 + $5DF4 = SilphCo4BattleText2 + $5DFE = SilphCo4AfterBattleText2 + $5DF9 = SilphCo4EndBattleText2 + $5E0D = SilphCo4BattleText3 + $5E17 = SilphCo4AfterBattleText3 + $5E12 = SilphCo4EndBattleText3 + $5E26 = SilphCo4BattleText4 + $5E30 = SilphCo4AfterBattleText4 + $5E2B = SilphCo4EndBattleText4 + $5DE0 = SilphCo4Text_19de0 + $5DE5 = SilphCo4Text_19de5 + $622F = SilphCo6Script_1a22f + $5DAE = SilphCo4TrainerHeader0 + $5DBA = SilphCo4TrainerHeader2 + $5DC6 = SilphCo4TrainerHeader3 + $6116 = SilphCo5Blocks + $5FBC = SilphCo5TextPointers + $5F37 = SilphCo5Script + $608D = SilphCo5Object + $5F4D = SilphCo5Script_19f4d + $5FD2 = SilphCo5TrainerHeaders + $5FB6 = SilphCo5ScriptPointers + $5F97 = SilphCo5Coords + $5F9E = SilphCo5Script_19f9e + $6003 = SilphCo5Text1 + $601A = SilphCo5Text2 + $6033 = SilphCo5Text3 + $604C = SilphCo5Text4 + $6065 = SilphCo5Text5 + $607E = SilphCo5Text9 + $6083 = SilphCo5Text10 + $6088 = SilphCo5Text11 + $6024 = SilphCo5BattleText2 + $602E = SilphCo5AfterBattleText2 + $6029 = SilphCo5EndBattleText2 + $603D = SilphCo5BattleText3 + $6047 = SilphCo5AfterBattleText3 + $6042 = SilphCo5EndBattleText3 + $6056 = SilphCo5BattleText4 + $6060 = SilphCo5AfterBattleText4 + $605B = SilphCo5EndBattleText4 + $606F = SilphCo5BattleText5 + $6079 = SilphCo5AfterBattleText5 + $6074 = SilphCo5EndBattleText5 + $6010 = SilphCo5Text_1a010 + $6015 = SilphCo5Text_1a015 + $5FD2 = Silphco5TrainerHeader0 + $5FDE = Silphco5TrainerHeader2 + $5FEA = Silphco5TrainerHeader3 + $5FF6 = Silphco5TrainerHeader4 + $636B = SilphCo6Blocks + $61F6 = SilphCo6TextPointers + $61A9 = SilphCo6Script + $62FB = SilphCo6Object + $61BF = SilphCo6Script_1a1bf + $620A = SilphCo6TrainerHeaders + $61F0 = SilphCo6ScriptPointers + $61E3 = SilphCo6Coords1 + $61E6 = SilphCo6Script_1a1e6 + $623D = SilphCo6Text1 + $6254 = SilphCo6Text2 + $626B = SilphCo6Text3 + $6282 = SilphCo6Text4 + $6299 = SilphCo6Text5 + $62B0 = SilphCo6Text6 + $62C9 = SilphCo6Text7 + $62E2 = SilphCo6Text8 + $62BA = SilphCo6BattleText2 + $62C4 = SilphCo6AfterBattleText2 + $62BF = SilphCo6EndBattleText2 + $62D3 = SilphCo6BattleText3 + $62DD = SilphCo6AfterBattleText3 + $62D8 = SilphCo6EndBattleText3 + $62EC = SilphCo6BattleText4 + $62F6 = SilphCo6AfterBattleText4 + $62F1 = SilphCo6EndBattleText4 + $624A = SilphCo6Text_1a24a + $624F = SilphCo6Text_1a24f + $6261 = SilphCo6Text_1a261 + $6266 = SilphCo6Text_1a266 + $6278 = SilphCo6Text_1a278 + $627D = SilphCo6Text_1a27d + $628F = SilphCo6Text_1a28f + $6294 = SilphCo6Text_1a294 + $62A6 = SilphCo6Text_1a2a6 + $62AB = SilphCo6Text_1a2ab + $620A = SilphCo6TrainerHeader0 + $6216 = SilphCo6TrainerHeader2 + $6222 = SilphCo6TrainerHeader3 + $644C = Func_1a44c + $6485 = Func_1a485 + $64A1 = Func_1a4a1 + $64A6 = Func_1a4a6 + $64F4 = Func_1a4f4 + $64E9 = RLEList_1a4e9 + $64DC = RLEList_1a4dc + $6514 = Func_1a514 + $656B = Func_1a56b + $6559 = RLEList_PewterMuseumPlayer + $6562 = RLEList_PewterMuseumGuy + $6581 = Func_1a581 + $65CD = RLEList_PewterGymPlayer + $65DA = RLEList_PewterGymGuy + $6605 = RivalIDs + $662C = DoorTileIDPointers + $6654 = OverworldDoorTileIDs + $6657 = ForestDoorTileIDs + $6659 = MartDoorTileIDs + $665B = HouseDoorTileIDs + $665D = TilesetMuseumDoorTileIDs + $665F = ShipDoorTileIDs + $6661 = LobbyDoorTileIDs + $6665 = MansionDoorTileIDs + $6669 = LabDoorTileIDs + $666B = FacilityDoorTileIDs + $666F = PlateauDoorTileIDs + $66CF = LedgeTiles + $66F0 = LoadHoppingShadowOAM + $6708 = LedgeHoppingShadow + $6710 = LedgeHoppingShadowOAM + SLACK: $18E8 bytes + +Bank #7: + SECTION: $4000-$6CC1 ($2CC2 bytes) + $4000 = CinnabarIsland_h + $40C3 = Route1_h + $4B02 = OaksLab_h + $5462 = ViridianMart_h + $5540 = School_h + $557D = ViridianHouse_h + $5EA4 = DiglettsCaveRoute2_h + $5EE1 = Route2House_h + $55E7 = PewterHouse1_h + $563C = PewterHouse2_h + $5679 = CeruleanHouseTrashed_h + $56EA = CeruleanHouse1_h + $5730 = BikeShop_h + $5F27 = Route5Gate_h + $6031 = Route6Gate_h + $60F4 = Route7Gate_h + $61BB = Route8Gate_h + $627D = UndergroundPathEntranceRoute8_h + $62BA = PowerPlant_h + $65AE = DiglettsCaveEntranceRoute11_h + $675E = BillsHouse_h + $5AF0 = VermilionHouse1_h + $5B46 = VermilionDock_h + $5D2E = CeladonMansion5_h + $589C = LavenderHouse1_h + $59A2 = LavenderHouse2_h + $5D7C = FuchsiaMart_h + $5DD1 = SaffronHouse1_h + $5E30 = SaffronHouse2_h + $65EC = Route16House_h + $6677 = Route22Gate_h + $5A06 = NameRater_h + $6988 = SafariZoneCheck + $6997 = SafariZoneCheckSteps + $69ED = PrintSafariGameOverText + $421E = MonsterNames + $6B0A = CinnabarGymQuiz_1eb0a + $6960 = PushStartText + $697E = SaveOptionText + $6983 = StrengthsAndWeaknessesText + $6CBD = OakLabEmailText + $6BDD = BillsHouseMonitorText + $6BE2 = BillsHouseInitiatedText + $6C05 = BillsHousePokemonList + $6B69 = MagazinesText + $6A25 = CinnabarGymQuiz + $6953 = NewBicycleText + $498A = Func_1c98a + $6915 = OpenOaksPC + $40FC = Route1Blocks + $4069 = CinnabarIslandBlocks + $4A81 = CinnabarIslandTextPointers + $4A19 = CinnabarIslandScript + $4022 = CinnabarIslandObject + $4AB2 = Route1TextPointers + $4AAF = Route1Script + $40E5 = Route1Object + $49C1 = ClearSaveDataText + $4A14 = WhichFloorText + $4A0D = Func_1ca0d + $4A34 = CinnabarIslandScriptPointers + $4A38 = CinnabarIslandScript0 + $4A73 = CinnabarIslandScript1 + $4A96 = CinnabarIslandText1 + $4A9B = CinnabarIslandText2 + $4AA0 = CinnabarIslandText3 + $4AA5 = CinnabarIslandText6 + $4AAA = CinnabarIslandText7 + $4A91 = CinnabarIslandText8 + $4AB8 = Route1Text1 + $4AF8 = Route1Text2 + $4AFD = Route1Text3 + $4AE3 = Route1ViridianMartSampleText + $4AE8 = Route1Text_1cae8 + $4AF3 = Route1Text_1caf3 + $4AEE = Route1Text_1caee + $41C0 = OaksLabBlocks + $5082 = OaksLabTextPointers + $4B0E = OaksLabScript + $540A = OaksLabObject + $5076 = OaksLabScript_1d076 + $4B28 = OaksLabScriptPointers + $4B4E = OaksLabScript0 + $4B6E = OaksLabScript1 + $4B82 = OaksLabScript2 + $4BA2 = OaksLabScript3 + $4BD2 = OaksLabScript4 + $4BFD = OaksLabScript5 + $4C36 = OaksLabScript6 + $4C72 = OaksLabScript7 + $4C80 = OaksLabScript8 + $4D00 = OaksLabScript9 + $4D6D = OaksLabScript10 + $4DB9 = OaksLabScript11 + $4E03 = OaksLabScript12 + $4E32 = OaksLabScript13 + $4E6D = OaksLabScript14 + $4EB0 = OaksLabScript15 + $4F12 = OaksLabScript16 + $4FD4 = OaksLabScript17 + $5009 = OaksLabScript18 + $4B7E = OakEntryMovement + $4BCF = PlayerEntryMovementRLE + $4C9C = OaksLabScript8.MiddleBallMovement1 + $4CA3 = OaksLabScript8.MiddleBallMovement2 + $4CB7 = OaksLabScript8.RightBallMovement1 + $4CBF = OaksLabScript8.RightBallMovement2 + $4CEF = OaksLabScript8.LeftBallMovement1 + $4CF1 = OaksLabScript8.LeftBallMovement2 + $53BE = OaksLabText_1d3be + $53C3 = OaksLabText_1d3c3 + $4E66 = OaksLabScript13.RivalExitMovement + $502B = OaksLabScript_1d02b + $4EFD = OaksLabScript_1cefd + $50CE = OaksLabText1 + $5102 = OaksLabText2 + $5113 = OaksLabText3 + $5124 = OaksLabText4 + $5248 = OaksLabText5 + $5322 = OaksLabText6 + $5322 = OaksLabText7 + $5331 = OaksLabText8 + $5336 = OaksLabText9 + $53FB = OaksLabText10 + $53FB = OaksLabText11 + $5381 = OaksLabText12 + $5390 = OaksLabText13 + $539F = OaksLabText14 + $53AF = OaksLabText15 + $53C8 = OaksLabText16 + $5345 = OaksLabText17 + $5354 = OaksLabText18 + $5363 = OaksLabText19 + $5372 = OaksLabText20 + $53D7 = OaksLabText21 + $53DC = OaksLabText22 + $53E1 = OaksLabText23 + $53E6 = OaksLabText24 + $53EB = OaksLabText25 + $53F1 = OaksLabText26 + $53F6 = OaksLabText27 + $50CE = OaksLabText28 + $5102 = OaksLabText29 + $5113 = OaksLabText30 + $5124 = OaksLabText31 + $5248 = OaksLabText32 + $5322 = OaksLabText33 + $5322 = OaksLabText34 + $5331 = OaksLabText35 + $5336 = OaksLabText36 + $53FB = OaksLabText37 + $53FB = OaksLabText38 + $50F3 = OaksLabGaryText1 + $50F8 = OaksLabText40 + $50FD = OaksLabText41 + $522D = OaksLabScript_1d22d + $5152 = OaksLabText39 + $519A = OaksLabCharmanderText + $51A4 = OaksLabSquirtleText + $51AE = OaksLabBulbasaurText + $5222 = OaksLabMonEnergeticText + $5227 = OaksLabReceivedMonText + $5243 = OaksLabLastMonText + $531D = OaksLabText_1d31d + $52ED = OaksLabText5.asm_0f042 + $52F0 = OaksLabText_1d2f0 + $52F5 = OaksLabText_1d2f5 + $52FA = OaksLabText_1d2fa + $52FF = OaksLabDeliverParcelText + $500A = OaksLabScript_1d00a + $5309 = OaksLabAroundWorldText + $530E = OaksLabGivePokeballsText + $5318 = OaksLabPleaseVisitText + $532C = OaksLabText_1d32c + $5340 = OaksLabText_1d340 + $534F = OaksLabRivalWaitingText + $535E = OaksLabChooseMonText + $536D = OaksLabRivalInterjectionText + $537C = OaksLabBePatientText + $538B = OaksLabLeavingText + $539A = OaksLabRivalPickingMonText + $53A9 = OaksLabRivalReceivedMonText + $53B9 = OaksLabRivalChallengeText + $53D2 = OaksLabRivalToughenUpText + $5405 = OaksLabText_1d405 + $5530 = ViridianMartBlocks + $54E0 = ViridianMartTextPointers + $546E = ViridianMartScript + $550A = ViridianMartObject + $547D = ViridianMartScript_1d47d + $5495 = ViridianMartScriptPointers + $549B = ViridianMartScript0 + $54C0 = ViridianMartScript1 + $54DF = ViridianMartScript2 + $54BB = RLEMovement1d4bb + $54F0 = ViridianMartText1 + $5500 = ViridianMartText2 + $5505 = ViridianMartText3 + $54F5 = ViridianMartText4 + $54FA = ViridianMartText5 + $41EE = SchoolBlocks + $554F = SchoolTextPointers + $554C = SchoolScript + $555D = SchoolObject + $5553 = SchoolText1 + $5558 = SchoolText2 + $41DE = ViridianHouseBlocks + $558D = ViridianHouseTextPointers + $558A = ViridianHouseScript + $55BB = ViridianHouseObject + $5595 = ViridianHouseText1 + $559A = ViridianHouseText2 + $559F = ViridianHouseText3 + $55B6 = ViridianHouseText4 + $55B1 = ViridianHouseText_1d5b1 + $41DE = PewterHouse1Blocks + $55F6 = PewterHouse1TextPointers + $55F3 = PewterHouse1Script + $5616 = PewterHouse1Object + $55FC = PewterHouse1Text1 + $560C = PewterHouse1Text2 + $5611 = PewterHouse1Text3 + $41DE = PewterHouse2Blocks + $564B = PewterHouse2TextPointers + $5648 = PewterHouse2Script + $5659 = PewterHouse2Object + $564F = PewterHouse2Text1 + $5654 = PewterHouse2Text2 + $41FE = CeruleanHouseTrashedBlocks + $5689 = CeruleanHouseTrashedTextPointers + $5685 = CeruleanHouseTrashedScript + $56BF = CeruleanHouseTrashedObject + $568F = CeruleanHouseTrashedText1 + $56B5 = CeruleanHouseTrashedText2 + $56BA = CeruleanHouseTrashedText3 + $56B0 = CeruleanHouseTrashedText_1d6b0 + $56AB = CeruleanHouseTrashedText_1d6ab + $41DE = CeruleanHouse1Blocks + $56F9 = CeruleanHouse1TextPointers + $56F6 = CeruleanHouse1Script + $5710 = CeruleanHouse1Object + $56FD = CeruleanHouse1Text1 + $5702 = CeruleanHouse1Text2 + $588C = BikeShopBlocks + $573F = BikeShopTextPointers + $573C = BikeShopScript + $5866 = BikeShopObject + $5745 = BikeShopText1 + $5839 = BikeShopText2 + $5848 = BikeShopText3 + $582F = BikeShopText_1d82f + $57F5 = BikeShopText1.Done + $581F = BikeShopText_1d81f + $5824 = BikeShopText_1d824 + $5834 = BikeShopText_1d834 + $5810 = BikeShopText_1d810 + $57F8 = BikeShopMenuText + $5807 = BikeShopMenuPrice + $5815 = BikeShopText_1d815 + $581A = BikeShopText_1d81a + $582A = BikeShopText_1d82a + $5843 = BikeShopText_1d843 + $5861 = BikeShopText_1d861 + $585C = BikeShopText_1d85c + $41DE = LavenderHouse1Blocks + $58AC = LavenderHouse1TextPointers + $58A8 = LavenderHouse1Script + $596A = LavenderHouse1Object + $58B8 = LavenderHouse1Text1 + $58DB = LavenderHouse1Text2 + $58FE = LavenderHouse1Text3 + $590B = LavenderHouse1Text4 + $5918 = LavenderHouse1Text5 + $5965 = LavenderHouse1Text6 + $58D1 = LavenderHouse1Text_1d8d1 + $58D6 = LavenderHouse1Text_1d8d6 + $58F4 = LavenderHouse1Text_1d8f4 + $58F9 = LavenderHouse1Text_1d8f9 + $594C = LavenderHouse1Text_1d94c + $5951 = ReceivedFluteText + $595B = FluteNoRoomText + $5960 = MrFujiAfterFluteText + $41DE = LavenderHouse2Blocks + $59B2 = LavenderHouse2TextPointers + $59AE = LavenderHouse2Script + $59E6 = LavenderHouse2Object + $59B6 = LavenderHouse2Text1 + $59C3 = LavenderHouse2Text2 + $59DC = LavenderHouse2Text_1d9dc + $59E1 = LavenderHouse2Text_1d9e1 + $41DE = NameRaterBlocks + $5A54 = NameRaterTextPointers + $5A12 = NameRaterScript + $5AD6 = NameRaterObject + $5A47 = NameRaterScript_1da20.asm_1da47 + $5A56 = NameRaterText1 + $5AB3 = NameRaterText_1dab3 + $5A15 = NameRaterScript_1da15 + $5AB8 = NameRaterText_1dab8 + $5A20 = NameRaterScript_1da20 + $5AD1 = NameRaterText_1dad1 + $5ABD = NameRaterText_1dabd + $5AC2 = NameRaterText_1dac2 + $5AC7 = NameRaterText_1dac7 + $5ACC = NameRaterText_1dacc + $41DE = VermilionHouse1Blocks + $5B00 = VermilionHouse1TextPointers + $5AFC = VermilionHouse1Script + $5B20 = VermilionHouse1Object + $5B06 = VermilionHouse1Text1 + $5B0B = VermilionHouse1Text2 + $5B1B = VermilionHouse1Text3 + $5CDA = VermilionDockBlocks + $5CBF = VermilionDockTextPointers + $5B52 = VermilionDockScript + $5CC6 = VermilionDockObject + $5B9B = VermilionDock_1db9b + $5C59 = VermilionDock_1dc59 + $5C42 = VermilionDock_1dc42 + $5C7C = VermilionDock_1dc7c + $5C94 = VermilionDock_1dc94 + $5C74 = VermilionDockOAMBlock + $5C86 = VermilionDock_1dc7c.asm_1dc86 + $5CC1 = VermilionDockText1 + $41EE = CeladonMansion5Blocks + $5D3D = CeladonMansion5TextPointers + $5D3A = CeladonMansion5Script + $5D5C = CeladonMansion5Object + $5D41 = CeladonMansion5Text1 + $5D46 = CeladonMansion5Text2 + $5DC1 = FuchsiaMartBlocks + $5D8B = FuchsiaMartTextPointers + $5D88 = FuchsiaMartScript + $5D9B = FuchsiaMartObject + $5D91 = FuchsiaMartText2 + $5D96 = FuchsiaMartText3 + $41DE = SaffronHouse1Blocks + $5DE0 = SaffronHouse1TextPointers + $5DDD = SaffronHouse1Script + $5E04 = SaffronHouse1Object + $5DE8 = SaffronHouse1Text1 + $5DED = SaffronHouse1Text2 + $5DFA = SaffronHouse1Text3 + $5DFF = SaffronHouse1Text4 + $41DE = SaffronHouse2Blocks + $5E3F = SaffronHouse2TextPointers + $5E3C = SaffronHouse2Script + $5E8A = SaffronHouse2Object + $5E41 = SaffronHouse2Text1 + $5E75 = TM29PreReceiveText + $5E7A = ReceivedTM29Text + $5E85 = TM29NoRoomText + $5E80 = TM29ExplanationText + $420E = DiglettsCaveRoute2Blocks + $5EB8 = DiglettsCaveRoute2TextPointers + $5EB0 = DiglettsCaveRoute2Script + $5EBF = DiglettsCaveRoute2Object + $5EBA = DiglettsCaveRoute2Text1 + $41DE = Route2HouseBlocks + $5EF0 = Route2HouseTextPointers + $5EED = Route2HouseScript + $5F07 = Route2HouseObject + $5EF4 = Route2HouseText1 + $5EF9 = Route2HouseText2 + $6025 = Route5GateBlocks + $5FA4 = Route5GateTextPointers + $5F33 = Route5GateScript + $5FFB = Route5GateObject + $5F3F = Route5GateScriptPointers + $5F50 = Route5GateScript0 + $5F94 = Route5GateScript1 + $5F8F = CoordsData_1df8f + $5F43 = Route5GateScript_1df43 + $5FAA = Route5GateText1 + $5FE7 = Route5GateText2 + $5FEC = Route5GateText3 + $5FF6 = SaffronGateText_1dff6 + $60E8 = Route6GateBlocks + $60B8 = Route6GateTextPointers + $603D = Route6GateScript + $60BE = Route6GateObject + $604A = Route6GateScriptPointers + $604E = Route6GateScript0 + $6091 = Route6GateScript1 + $608C = CoordsData_1e08c + $60A1 = Route6GateScript_1e0a1 + $5FAA = Route6GateText1 + $5FE7 = Route6GateText2 + $5FEC = Route6GateText3 + $61AF = Route7GateBlocks + $617F = Route7GateTextPointers + $6100 = Route7GateScript + $6185 = Route7GateObject + $610D = Route7GateScriptPointers + $6128 = Route7GateScript0 + $616C = Route7GateScript1 + $6167 = CoordsData_1e167 + $6111 = Route7GateScript_1e111 + $5FAA = Route7GateText1 + $5FE7 = Route7GateText2 + $5FEC = Route7GateText3 + $6271 = Route8GateBlocks + $6241 = Route8GateTextPointers + $61C7 = Route8GateScript + $6247 = Route8GateObject + $61D3 = Route8GateScriptPointers + $61EE = Route8GateScript0 + $6231 = Route8GateScript1 + $622C = CoordsData_1e22c + $61D7 = Route8GateScript_1e1d7 + $5FAA = Route8GateText1 + $5FE7 = Route8GateText2 + $5FEC = Route8GateText3 + $41B0 = UndergroundPathEntranceRoute8Blocks + $6291 = UndergroundPathEntranceRoute8TextPointers + $6289 = UndergroundPathEntranceRoute8Script + $6298 = UndergroundPathEntranceRoute8Object + $6293 = UndergroundPathEntranceRoute8Text1 + $6446 = PowerPlantBlocks + $62DF = PowerPlantTextPointers + $62C6 = PowerPlantScript + $63BF = PowerPlantObject + $62FB = PowerPlantTrainerHeaders + $62D9 = PowerPlantScriptPointers + $6374 = PowerPlantText1 + $637A = PowerPlantText2 + $6380 = PowerPlantText3 + $6386 = PowerPlantText4 + $638C = PowerPlantText5 + $6392 = PowerPlantText6 + $6398 = PowerPlantText7 + $639E = PowerPlantText8 + $63A4 = PowerPlantText9 + $63AA = VoltorbBattleText + $63AF = ZapdosBattleText + $62FB = PowerPlantTrainerHeader0 + $6307 = PowerPlantTrainerHeader1 + $6313 = PowerPlantTrainerHeader2 + $631F = PowerPlantTrainerHeader3 + $632B = PowerPlantTrainerHeader4 + $6337 = PowerPlantTrainerHeader5 + $6343 = PowerPlantTrainerHeader6 + $634F = PowerPlantTrainerHeader7 + $635B = PowerPlantTrainerHeader8 + $420E = DiglettsCaveEntranceRoute11Blocks + $65C3 = DiglettsCaveEntranceRoute11TextPointers + $65BA = DiglettsCaveEntranceRoute11Script + $65CA = DiglettsCaveEntranceRoute11Object + $65C5 = DiglettsCaveEntranceRoute11Text1 + $41DE = Route16HouseBlocks + $65FB = Route16HouseTextPointers + $65F8 = Route16HouseScript + $6657 = Route16HouseObject + $65FF = Route16HouseText1 + $6640 = Route16HouseText2 + $6636 = HM02ExplanationText + $662B = Route16HouseText3 + $6630 = ReceivedHM02Text + $663B = HM02NoRoomText + $6652 = Route16HouseText_1e652 + $674A = Route22GateBlocks + $66DF = Route22GateTextPointers + $6683 = Route22GateScript + $6720 = Route22GateObject + $669E = Route22GateScriptPointers + $66A4 = Route22GateScript0 + $66CD = Route22GateScript1 + $66DE = Route22GateScript2 + $66B5 = Route22GateScriptCoords + $66E1 = Route22GateText1 + $6704 = Route22GateText_1e704 + $66BA = Route22GateScript_1e6ba + $671A = Route22GateText_1e71a + $6715 = Route22GateText_1e715 + $6905 = BillsHouseBlocks + $6834 = BillsHouseTextPointers + $676A = BillsHouseScript + $68DF = BillsHouseObject + $6776 = BillsHouseScriptPointers + $6782 = BillsHouseScript0 + $6783 = BillsHouseScript1 + $67A6 = BillsHouseScript2 + $67C5 = BillsHouseScript3 + $680D = BillsHouseScript4 + $6827 = BillsHouseScript5 + $679C = MovementData_1e79c + $67A0 = MovementData_1e7a0 + $6807 = MovementData_1e807 + $683D = BillsHouseText1 + $6874 = BillsHouseText2 + $68D0 = BillsHouseText3 + $683C = BillsHouseText4 + $6865 = BillsHouseText_1e865 + $686A = BillsHouseText_1e86a + $686F = BillsHouseText_1e86f + $68BA = BillThankYouText + $68BF = SSTicketReceivedText + $68CB = BillsHouseText_1e8cb + $68C6 = SSTicketNoRoomText + $68DA = BillsHouseText_1e8da + $6946 = AccessedOaksPCText + $693B = GetDexRatedText + $6940 = ClosedOaksPCText + $69F7 = SafariGameOverText + $6A0D = TimesUpText + $6A12 = GameOverText + $6A5B = CinnabarGymQuizIntroText + $6A60 = CinnabarQuizQuestions + $6A92 = CinnabarGymQuiz_1ea92 + $6A6C = CinnabarQuizQuestionsText1 + $6A71 = CinnabarQuizQuestionsText2 + $6A76 = CinnabarQuizQuestionsText3 + $6A7B = CinnabarQuizQuestionsText4 + $6A80 = CinnabarQuizQuestionsText5 + $6A85 = CinnabarQuizQuestionsText6 + $6AE3 = CinnabarGymQuizCorrectText + $6A8A = CinnabarGymQuiz_1ea8a + $6B05 = CinnabarGymQuizIncorrectText + $6B48 = CinnabarGymGateCoords + $6C7F = BillsHousePokemonListText1 + $6C84 = BillsMonListText + $6CAA = BillsHousePokemonListText2 + $6958 = DisplayOakLabLeftPoster + $6965 = DisplayOakLabRightPoster + $6CAF = DisplayOakLabEmailText + $6A17 = PrintCinnabarQuiz + $6B6E = BillsHousePC + $6B60 = PrintMagazinesText + $694B = PrintNewBikeText + $49C6 = Func_1c9c6 + SLACK: $133E bytes + +Bank #8: + SECTION: $4000-$42BD ($02BE bytes) + $4000 = SFX_Headers_08 + $41CE = SFX_08_46 + $4192 = SFX_08_3a + $401E = SFX_08_0a + $4021 = SFX_08_0b + $4072 = SFX_08_1a + $4024 = SFX_08_0c + $407B = SFX_08_1b + $4102 = SFX_08_2a + $4027 = SFX_08_0d + $4084 = SFX_08_1c + $410B = SFX_08_2b + $402A = SFX_08_0e + $408D = SFX_08_1d + $4114 = SFX_08_2c + $419B = SFX_08_3b + $41E0 = SFX_08_4a + $402D = SFX_08_0f + $4096 = SFX_08_1e + $411D = SFX_08_2d + $41A4 = SFX_08_3c + $41E3 = SFX_08_4b + $4210 = SFX_08_5a + $409F = SFX_08_1f + $4126 = SFX_08_2e + $41A7 = SFX_08_3d + $41E6 = SFX_08_4c + $4213 = SFX_08_5b + $4255 = SFX_08_6a + $412F = SFX_08_2f + $41AA = SFX_08_3e + $41E9 = SFX_08_4d + $4216 = SFX_08_5c + $425E = SFX_08_6b + $41AD = SFX_08_3f + $41EC = SFX_08_4e + $4219 = SFX_08_5d + $4264 = SFX_08_6c + $41EF = SFX_08_4f + $421C = SFX_08_5e + $426D = SFX_08_6d + $4222 = SFX_08_5f + $4276 = SFX_08_6e + $427F = SFX_08_6f + $4003 = SFX_08_01 + $4030 = SFX_08_10 + $4006 = SFX_08_02 + $4033 = SFX_08_11 + $40A8 = SFX_08_20 + $4009 = SFX_08_03 + $4036 = SFX_08_12 + $40B1 = SFX_08_21 + $4138 = SFX_08_30 + $400C = SFX_08_04 + $4039 = SFX_08_13 + $40BA = SFX_08_22 + $4141 = SFX_08_31 + $41B0 = SFX_08_40 + $400F = SFX_08_05 + $403C = SFX_08_14 + $40C3 = SFX_08_23 + $414A = SFX_08_32 + $41B3 = SFX_08_41 + $41F2 = SFX_08_50 + $4012 = SFX_08_06 + $4045 = SFX_08_15 + $40CC = SFX_08_24 + $4153 = SFX_08_33 + $41B9 = SFX_08_42 + $41F5 = SFX_08_51 + $4225 = SFX_08_60 + $4015 = SFX_08_07 + $404E = SFX_08_16 + $40D5 = SFX_08_25 + $415C = SFX_08_34 + $41BF = SFX_08_43 + $41F8 = SFX_08_52 + $4228 = SFX_08_61 + $4288 = SFX_08_70 + $4018 = SFX_08_08 + $4057 = SFX_08_17 + $40DE = SFX_08_26 + $4165 = SFX_08_35 + $41C5 = SFX_08_44 + $41FB = SFX_08_53 + $422B = SFX_08_62 + $4291 = SFX_08_71 + $401B = SFX_08_09 + $4060 = SFX_08_18 + $40E7 = SFX_08_27 + $416E = SFX_08_36 + $41C8 = SFX_08_45 + $41FE = SFX_08_54 + $422E = SFX_08_63 + $4297 = SFX_08_72 + $4069 = SFX_08_19 + $40F0 = SFX_08_28 + $4177 = SFX_08_37 + $4201 = SFX_08_55 + $4231 = SFX_08_64 + $429D = SFX_08_73 + $40F9 = SFX_08_29 + $4180 = SFX_08_38 + $41D7 = SFX_08_47 + $4204 = SFX_08_56 + $4237 = SFX_08_65 + $42A3 = SFX_08_74 + $4189 = SFX_08_39 + $41DA = SFX_08_48 + $4207 = SFX_08_57 + $423A = SFX_08_66 + $42AC = SFX_08_75 + $41DD = SFX_08_49 + $420A = SFX_08_58 + $423D = SFX_08_67 + $42B2 = SFX_08_76 + $420D = SFX_08_59 + $4246 = SFX_08_68 + $42BB = SFX_08_77 + $424F = SFX_08_69 + SECTION: $42BE-$42FC ($003F bytes) + $42BE = Music_GymLeaderBattle + $42C7 = Music_TrainerBattle + $42D9 = Music_FinalBattle + $42D0 = Music_WildBattle + $42E2 = Music_DefeatedTrainer + $42F4 = Music_DefeatedGymLeader + $42EB = Music_DefeatedWildMon + SECTION: $42FD-$536D ($1071 bytes) + $42FD = SFX_08_01_Ch1 + $4301 = SFX_08_02_Ch1 + $4305 = SFX_08_03_Ch1 + $4309 = SFX_08_04_Ch1 + $430D = SFX_08_05_Ch1 + $4320 = SFX_08_06_Ch1 + $4324 = SFX_08_07_Ch1 + $432B = SFX_08_08_Ch1 + $432F = SFX_08_09_Ch1 + $4333 = SFX_08_0a_Ch1 + $4337 = SFX_08_0b_Ch1 + $433B = SFX_08_0c_Ch1 + $433F = SFX_08_0d_Ch1 + $4343 = SFX_08_0e_Ch1 + $4347 = SFX_08_0f_Ch1 + $434E = SFX_08_10_Ch1 + $4355 = SFX_08_11_Ch1 + $4359 = SFX_08_12_Ch1 + $435D = SFX_08_13_Ch1 + $4C2F = SFX_08_14_Ch1 + $4C3E = SFX_08_14_Ch2 + $4C4D = SFX_08_14_Ch3 + $4E3F = SFX_08_15_Ch1 + $4E52 = SFX_08_15_Ch2 + $4E65 = SFX_08_15_Ch3 + $4DB4 = SFX_08_16_Ch1 + $4DC3 = SFX_08_16_Ch2 + $4DD1 = SFX_08_16_Ch3 + $4B4E = SFX_08_17_Ch1 + $4B6D = SFX_08_17_Ch2 + $4B8C = SFX_08_17_Ch3 + $4EFD = SFX_08_18_Ch1 + $4F1C = SFX_08_18_Ch2 + $4F3B = SFX_08_18_Ch3 + $4CDD = SFX_08_19_Ch1 + $4CF0 = SFX_08_19_Ch2 + $4D02 = SFX_08_19_Ch3 + $4C87 = SFX_08_1a_Ch1 + $4CA1 = SFX_08_1a_Ch2 + $4CA2 = SFX_08_1a_Ch3 + $4CB5 = SFX_08_1b_Ch1 + $4CC4 = SFX_08_1b_Ch2 + $4CD3 = SFX_08_1b_Ch3 + $4ECD = SFX_08_1c_Ch1 + $4EE0 = SFX_08_1c_Ch2 + $4EF3 = SFX_08_1c_Ch3 + $49D7 = SFX_08_1d_Ch1 + $49F4 = SFX_08_1d_Ch2 + $4A15 = SFX_08_1d_Ch3 + $4E72 = SFX_08_1e_Ch1 + $4E91 = SFX_08_1e_Ch2 + $4EB4 = SFX_08_1e_Ch3 + $4D03 = SFX_08_1f_Ch1 + $4D2E = SFX_08_1f_Ch2 + $4D4D = SFX_08_1f_Ch3 + $4D66 = SFX_08_20_Ch1 + $4D8D = SFX_08_20_Ch2 + $4DB3 = SFX_08_20_Ch3 + $4DD2 = SFX_08_21_Ch1 + $4DF1 = SFX_08_21_Ch2 + $4E20 = SFX_08_21_Ch3 + $4C57 = SFX_08_22_Ch1 + $4C6A = SFX_08_22_Ch2 + $4C7D = SFX_08_22_Ch3 + $4B99 = SFX_08_23_Ch1 + $4BB4 = SFX_08_23_Ch2 + $4BCF = SFX_08_23_Ch3 + $4BDF = SFX_08_24_Ch1 + $4C02 = SFX_08_24_Ch2 + $4C25 = SFX_08_24_Ch3 + $4ABB = SFX_08_25_Ch1 + $4ADA = SFX_08_25_Ch2 + $4AFD = SFX_08_25_Ch3 + $4FD3 = SFX_08_26_Ch1 + $4FE6 = SFX_08_26_Ch2 + $4FF9 = SFX_08_26_Ch3 + $5006 = SFX_08_27_Ch1 + $5021 = SFX_08_27_Ch2 + $503C = SFX_08_27_Ch3 + $504F = SFX_08_28_Ch1 + $505E = SFX_08_28_Ch2 + $506D = SFX_08_28_Ch3 + $50DD = SFX_08_29_Ch1 + $50F8 = SFX_08_29_Ch2 + $5113 = SFX_08_29_Ch3 + $4F70 = SFX_08_2a_Ch1 + $4F7F = SFX_08_2a_Ch2 + $4F8E = SFX_08_2a_Ch3 + $5126 = SFX_08_2b_Ch1 + $5139 = SFX_08_2b_Ch2 + $514C = SFX_08_2b_Ch3 + $5236 = SFX_08_2c_Ch1 + $5259 = SFX_08_2c_Ch2 + $527C = SFX_08_2c_Ch3 + $4F4E = SFX_08_2d_Ch1 + $4F5D = SFX_08_2d_Ch2 + $4F6F = SFX_08_2d_Ch3 + $51A7 = SFX_08_2e_Ch1 + $51C2 = SFX_08_2e_Ch2 + $51DD = SFX_08_2e_Ch3 + $4F98 = SFX_08_2f_Ch1 + $4FAF = SFX_08_2f_Ch2 + $4FC6 = SFX_08_2f_Ch3 + $5159 = SFX_08_30_Ch1 + $517C = SFX_08_30_Ch2 + $5197 = SFX_08_30_Ch3 + $51F0 = SFX_08_31_Ch1 + $520B = SFX_08_31_Ch2 + $5226 = SFX_08_31_Ch3 + $5077 = SFX_08_32_Ch1 + $509A = SFX_08_32_Ch2 + $50C1 = SFX_08_32_Ch3 + $528F = SFX_08_33_Ch1 + $52A2 = SFX_08_33_Ch2 + $52B5 = SFX_08_33_Ch3 + $52C2 = SFX_08_34_Ch1 + $52D5 = SFX_08_34_Ch2 + $52E8 = SFX_08_34_Ch3 + $52F5 = SFX_08_35_Ch1 + $5318 = SFX_08_35_Ch2 + $533A = SFX_08_35_Ch3 + $533B = SFX_08_36_Ch1 + $534E = SFX_08_36_Ch2 + $5361 = SFX_08_36_Ch3 + $4A2E = SFX_08_37_Ch1 + $4A45 = SFX_08_37_Ch2 + $4A58 = SFX_08_37_Ch3 + $4A65 = SFX_08_38_Ch1 + $4A88 = SFX_08_38_Ch2 + $4AAB = SFX_08_38_Ch3 + $4B13 = SFX_08_39_Ch1 + $4B2A = SFX_08_39_Ch2 + $4B41 = SFX_08_39_Ch3 + $43DD = SFX_08_3c_Ch1 + $43EE = SFX_08_3d_Ch1 + $43FD = SFX_08_3e_Ch1 + $43D6 = SFX_08_3f_Ch1 + $43C3 = SFX_08_40_Ch1 + $442D = SFX_08_41_Ch1 + $4436 = SFX_08_41_Ch2 + $443D = SFX_08_42_Ch1 + $4448 = SFX_08_42_Ch2 + $444C = SFX_08_43_Ch1 + $4453 = SFX_08_43_Ch2 + $445D = SFX_08_44_Ch1 + $447F = SFX_08_45_Ch1 + $4490 = SFX_08_45_Ch2 + $44AA = SFX_08_47_Ch1 + $44AE = SFX_08_48_Ch1 + $44B9 = SFX_08_49_Ch1 + $44C4 = SFX_08_4a_Ch1 + $44C8 = SFX_08_4b_Ch1 + $44CC = SFX_08_4c_Ch1 + $44D6 = SFX_08_4d_Ch1 + $44E0 = SFX_08_4e_Ch1 + $44E7 = SFX_08_4f_Ch1 + $44F4 = SFX_08_50_Ch1 + $44FE = SFX_08_51_Ch1 + $450B = SFX_08_52_Ch1 + $4519 = SFX_08_53_Ch1 + $4526 = SFX_08_54_Ch1 + $4533 = SFX_08_55_Ch1 + $454C = SFX_08_56_Ch1 + $4556 = SFX_08_57_Ch1 + $4563 = SFX_08_58_Ch1 + $456A = SFX_08_59_Ch1 + $4574 = SFX_08_5a_Ch1 + $457B = SFX_08_5b_Ch1 + $4582 = SFX_08_5c_Ch1 + $458C = SFX_08_5d_Ch1 + $4593 = SFX_08_5e_Ch1 + $45A4 = SFX_08_5e_Ch2 + $45B1 = SFX_08_5f_Ch1 + $45BE = SFX_08_60_Ch1 + $45C5 = SFX_08_61_Ch1 + $45D5 = SFX_08_62_Ch1 + $45DC = SFX_08_63_Ch1 + $45EC = SFX_08_64_Ch1 + $45F7 = SFX_08_64_Ch2 + $45FE = SFX_08_65_Ch1 + $460E = SFX_08_66_Ch1 + $4624 = SFX_08_67_Ch1 + $4637 = SFX_08_67_Ch2 + $464A = SFX_08_67_Ch3 + $4655 = SFX_08_68_Ch1 + $4664 = SFX_08_68_Ch2 + $4673 = SFX_08_68_Ch3 + $467E = SFX_08_69_Ch1 + $4695 = SFX_08_69_Ch2 + $46A9 = SFX_08_6a_Ch1 + $46C4 = SFX_08_6a_Ch2 + $46DB = SFX_08_6a_Ch3 + $46EC = SFX_08_6b_Ch1 + $470B = SFX_08_6b_Ch2 + $4722 = SFX_08_6c_Ch1 + $4735 = SFX_08_6c_Ch2 + $4748 = SFX_08_6c_Ch3 + $4759 = SFX_08_6d_Ch1 + $4770 = SFX_08_6d_Ch2 + $4787 = SFX_08_6d_Ch3 + $4792 = SFX_08_6e_Ch1 + $47A9 = SFX_08_6e_Ch2 + $47C0 = SFX_08_6e_Ch3 + $47D1 = SFX_08_6f_Ch1 + $47E0 = SFX_08_6f_Ch2 + $47EF = SFX_08_6f_Ch3 + $47FA = SFX_08_70_Ch1 + $4819 = SFX_08_70_Ch2 + $4834 = SFX_08_70_Ch3 + $4847 = SFX_08_71_Ch1 + $485E = SFX_08_71_Ch2 + $4875 = SFX_08_72_Ch1 + $4880 = SFX_08_72_Ch2 + $4887 = SFX_08_73_Ch1 + $489E = SFX_08_73_Ch2 + $48B5 = SFX_08_74_Ch1 + $48C4 = SFX_08_74_Ch2 + $48D3 = SFX_08_74_Ch3 + $48E0 = SFX_08_75_Ch1 + $48F0 = SFX_08_75_Ch2 + $4902 = SFX_08_76_Ch1 + $4941 = SFX_08_76_Ch2 + $4980 = SFX_08_76_Ch3 + $4412 = SFX_08_77_Ch1 + $4373 = Music8_WavePointers.wave0 + $4383 = Music8_WavePointers.wave1 + $4393 = Music8_WavePointers.wave2 + $43A3 = Music8_WavePointers.wave3 + $43B3 = Music8_WavePointers.wave4 + $43C3 = Music8_WavePointers.wave5 + $462A = SFX_08_67_branch_2062a + $463D = SFX_08_67_branch_2063d + $4930 = SFX_08_76_branch_20930 + $4361 = Music8_WavePointers + $449B = SFX_08_PokeFlute_Ch3 + SECTION: $536E-$6321 ($0FB4 bytes) + $53A7 = Func_213a7 + $53AC = Func_213ac + $53C4 = Unknown_213c4 + $53BC = Unknown_213bc + $53C0 = Unknown_213c0 + $548B = SomeonesPCText + $5497 = BillsPCText + $54A0 = PlayersPCText + $54A5 = OaksPCText + $54B2 = PKMNLeaguePCText + $54BA = LogOffPCText + $57E9 = SwitchOnText + $56E1 = BillsPCMenuText + $57EE = WhatText + $5713 = BoxNoPCText + $5588 = Func_21588 + $5618 = Func_21618 + $55AC = Func_215ac + $5673 = Func_21673 + $56B3 = Func_216b3 + $57FD = CantDepositLastMonText + $54E8 = BillsPCMenu + $5802 = BoxFullText + $56BE = Func_216be + $574B = Func_2174b + $57F8 = MonWasStoredText + $580C = NoMonText + $54E8 = Func_214e8 + $5811 = CantTakeMonText + $5807 = MonIsTakenOutText + $581B = OnceReleasedText + $5820 = MonWasReleasedText + $5745 = HMMoveArray + $57CB = DepositPCText + $57D3 = WithdrawPCText + $57DC = StatsCancelPCText + $58AE = Music8_ApplyMusicAffects + $5946 = Music8_PlayNextNote + $5FCC = Music8_ApplyDutyCycle + $5EB8 = Music8_ApplyPitchBend + $5FF7 = Func_21ff7 + $5967 = Music8_endchannel + $5FE4 = Music8_GetNextMusicByte + $59F5 = Music8_callchannel + $62DE = Unknown_222de + $5E6D = Func_21e6d + $5A2A = Music8_loopchannel + $5A65 = Music8_notetype + $5AA4 = Music8_toggleperfectpitch + $6017 = Func_22017 + $5C8B = Music8_notelength + $6035 = Func_22035 + $5DAA = Func_21daa + $5D79 = Func_21d79 + $5DCC = Func_21dcc + $6006 = Func_22006 + $5E2F = Func_21e2f + $5F4E = Func_21f4e + $62E6 = Unknown_222e6 + $5E56 = Func_21e56 + $5E8B = Func_21e8b + $5E9F = Func_21e9f + $5EFF = Music8_ApplyPitchBend.asm_21eff + $5F45 = Music8_ApplyPitchBend.asm_21f45 + $62D6 = Unknown_222d6 + $62EE = Music8_Pitches + $61F3 = Func_221f3 + $610D = Func_2210d + $6248 = FillMusicRAM8 + $624E = Func_2224e + $6126 = Func_2210d.asm_22126 + $62D5 = Noise8_endchannel + $631D = Music8_OverwriteChannelPointer + $54C2 = BillsPC_ + $5878 = PredefText23 + $5879 = Music8_UpdateMusic + $6306 = Music_PokeFluteInBattle + $54C2 = Func_214c2 + $571B = Func_2171b + $5825 = PrintJustAMomentText1 + $5845 = PrintJustAMomentText2 + $536E = Func_2136e + $53C8 = Func_213c8 + $5865 = JustAMomentText + SECTION: $6322-$7F51 ($1C30 bytes) + $797D = SFX_08_3a_Ch1 + $7998 = SFX_08_3a_Ch2 + $79B0 = SFX_08_3a_Ch3 + $79C7 = SFX_08_3b_Ch1 + $79E6 = SFX_08_3b_Ch2 + $79FE = SFX_08_3b_Ch3 + $7A13 = SFX_08_46_Ch1 + $7A2E = SFX_08_46_Ch2 + $7A44 = SFX_08_46_Ch3 + $6370 = Music_GymLeaderBattle_Ch1 + $65A1 = Music_GymLeaderBattle_Ch2 + $66EF = Music_GymLeaderBattle_Ch3 + $6919 = Music_TrainerBattle_Ch1 + $6BAE = Music_TrainerBattle_Ch2 + $6D10 = Music_TrainerBattle_Ch3 + $7099 = Music_WildBattle_Ch1 + $71D8 = Music_WildBattle_Ch2 + $7290 = Music_WildBattle_Ch3 + $73A6 = Music_FinalBattle_Ch1 + $756A = Music_FinalBattle_Ch2 + $771C = Music_FinalBattle_Ch3 + $7A53 = Music_DefeatedTrainer_Ch1 + $7AC1 = Music_DefeatedTrainer_Ch2 + $7B15 = Music_DefeatedTrainer_Ch3 + $7B74 = Music_DefeatedWildMon_Ch1 + $7BC1 = Music_DefeatedWildMon_Ch2 + $7C0E = Music_DefeatedWildMon_Ch3 + $7CAD = Music_DefeatedGymLeader_Ch1 + $7D6D = Music_DefeatedGymLeader_Ch2 + $7E52 = Music_DefeatedGymLeader_Ch3 + $6322 = SFX_08_PokeFlute_Ch1 + $6325 = SFX_08_PokeFlute_Ch2 + $63B0 = Music_GymLeaderBattle_branch_223b0 + $65E0 = Music_GymLeaderBattle_branch_225e0 + $67B1 = Music_GymLeaderBattle_branch_227b1 + $6962 = Music_TrainerBattle_branch_22962 + $6BFC = Music_TrainerBattle_branch_22bfc + $6D9C = Music_TrainerBattle_branch_22d9c + $70E0 = Music_WildBattle_branch_230e0 + $7225 = Music_WildBattle_branch_23225 + $72B5 = Music_WildBattle_branch_232b5 + $72D8 = Music_WildBattle_branch_232d8 + $7710 = Music_FinalBattle_branch_23710 + $7429 = Music_FinalBattle_branch_23429 + $7704 = Music_FinalBattle_branch_23704 + $75E6 = Music_FinalBattle_branch_235e6 + $795B = Music_FinalBattle_branch_2395b + $796C = Music_FinalBattle_branch_2396c + $777D = Music_FinalBattle_branch_2377d + $7A76 = Music_DefeatedTrainer_branch_23a76 + $7AD2 = Music_DefeatedTrainer_branch_23ad2 + $7B24 = Music_DefeatedTrainer_branch_23b24 + $7B8B = Music_DefeatedWildMon_branch_23b8b + $7BCE = Music_DefeatedWildMon_branch_23bce + $7C21 = Music_DefeatedWildMon_branch_23c21 + $7CCC = Music_DefeatedGymLeader_branch_23ccc + $7D84 = Music_DefeatedGymLeader_branch_23d84 + $7E65 = Music_DefeatedGymLeader_branch_23e65 + SLACK: $00AE bytes + +Bank #9: + SECTION: $4000-$7D6A ($3D6B bytes) + $7B39 = TangelaPicFront + $502B = IvysaurPicFront + $5157 = IvysaurPicBack + $7637 = BlastoisePicFront + $7851 = BlastoisePicBack + $47DF = SpearowPicFront + $48C2 = SpearowPicBack + $5D28 = NidoranFPicFront + $5DC2 = NidoranFPicBack + $5E09 = NidoqueenPicFront + $5FEF = NidoqueenPicBack + $453C = NidoranMPicFront + $4623 = NidoranMPicBack + $49F8 = NidokingPicFront + $4C60 = NidokingPicBack + $4682 = ClefairyPicFront + $4785 = ClefairyPicBack + $66FF = ArcaninePicFront + $693D = ArcaninePicBack + $6E2A = TentacoolPicFront + $6F1C = TentacoolPicBack + $4D0A = SlowbroPicFront + $4F87 = SlowbroPicBack + $5973 = GrimerPicFront + $5AB0 = GrimerPicBack + $6CB6 = ShellderPicFront + $6DC3 = ShellderPicBack + $6F77 = GastlyPicFront + $7190 = GastlyPicBack + $5B76 = GengarPicFront + $5CC6 = GengarPicBack + $4911 = VoltorbPicFront + $499A = VoltorbPicBack + $56D7 = ExeggcutePicFront + $58F0 = ExeggcutePicBack + $51D6 = ExeggutorPicFront + $53F8 = ExeggutorPicBack + $60A8 = CubonePicFront + $6196 = CubonePicBack + $54A7 = LickitungPicFront + $563E = LickitungPicBack + $6208 = RhyhornPicFront + $640F = RhyhornPicBack + $4000 = RhydonPicFront + $4202 = RhydonPicBack + $7CE7 = TangelaPicBack + $429A = KangaskhanPicFront + $44A6 = KangaskhanPicBack + $74E0 = StaryuPicFront + $75EC = StaryuPicBack + $721C = ScytherPicFront + $743C = ScytherPicBack + $78DA = PinsirPicFront + $7AAA = PinsirPicBack + $69D4 = GyaradosPicFront + $6C25 = GyaradosPicBack + $64C1 = LaprasPicFront + $667C = LaprasPicBack + SECTION: $7D6B-$7FB7 ($024D bytes) + $7E4A = SaveTrainerName + $7D89 = Func_27d89 + $7DAE = TypeNamePointers + $7DE4 = Type00Name + $7DEB = Type01Name + $7DF4 = Type02Name + $7DFB = Type03Name + $7E28 = Type04Name + $7E2F = Type05Name + $7E34 = Type06Name + $7E39 = Type07Name + $7E3D = Type08Name + $7E02 = Type14Name + $7E07 = Type15Name + $7E0D = Type16Name + $7E13 = Type17Name + $7E1C = Type18Name + $7E24 = Type19Name + $7E43 = Type1AName + $7E64 = TrainerNamePointers + $7EC2 = YoungsterName + $7ECC = BugCatcherName + $7ED8 = LassName + $7EDD = JrTrainerMName + $7EE9 = JrTrainerFName + $7EF5 = PokemaniacName + $7F00 = SuperNerdName + $7F0B = BurglarName + $7F13 = EngineerName + $7F1C = JugglerXName + $7F24 = SwimmerName + $7F2C = BeautyName + $7F33 = RockerName + $7F3A = JugglerName + $7F42 = BlackbeltName + $7F4C = ProfOakName + $7F55 = ChiefName + $7F5B = ScientistName + $7F65 = RocketName + $7F6C = CooltrainerMName + $7F79 = CooltrainerFName + $7FB2 = GettingPumpedText + $7F86 = FocusEnergyEffect_ + $7D6B = Func_27d6b + $7D98 = Func_27d98 + SLACK: $0048 bytes + +Bank #10: + SECTION: $4000-$7EA8 ($3EA9 bytes) + $7BAC = MoltresPicFront + $45A7 = PidgeyPicFront + $465B = PidgeyPicBack + $4383 = FearowPicFront + $4529 = FearowPicBack + $56B4 = ArbokPicFront + $5911 = ArbokPicBack + $59A8 = ParasectPicFront + $5B8C = ParasectPicBack + $7357 = VenonatPicFront + $745C = VenonatPicBack + $6D33 = DiglettPicFront + $6E10 = DiglettPicBack + $5C0A = PsyduckPicFront + $5D3E = PsyduckPicBack + $6A11 = MankeyPicFront + $6B16 = MankeyPicBack + $4000 = GrowlithePicFront + $4101 = GrowlithePicBack + $7875 = PoliwagPicFront + $7947 = PoliwagPicBack + $4830 = KadabraPicFront + $49B9 = KadabraPicBack + $4E85 = MachokePicFront + $5063 = MachokePicBack + $4A4C = GravelerPicFront + $4C00 = GravelerPicBack + $5F74 = GolemPicFront + $60F2 = GolemPicBack + $46A0 = SlowpokePicFront + $47C2 = SlowpokePicBack + $6588 = MagnetonPicFront + $6723 = MagnetonPicBack + $70E9 = FarfetchdPicFront + $72C6 = FarfetchdPicBack + $772C = DoduoPicFront + $780D = DoduoPicBack + $6B84 = SeelPicFront + $6CE8 = SeelPicBack + $4164 = OnixPicFront + $4300 = OnixPicBack + $5DA9 = DrowzeePicFront + $5F05 = DrowzeePicBack + $52BF = HitmonleePicFront + $545E = HitmonleePicBack + $54BC = HitmonchanPicFront + $5643 = HitmonchanPicBack + $67A6 = KoffingPicFront + $6974 = KoffingPicBack + $4CAE = ChanseyPicFront + $4E21 = ChanseyPicBack + $50F3 = MrMimePicFront + $5247 = MrMimePicBack + $798E = JynxPicFront + $7B42 = JynxPicBack + $6367 = ElectabuzzPicFront + $64EF = ElectabuzzPicBack + $6161 = MagmarPicFront + $62BF = MagmarPicBack + $6E7E = TaurosPicFront + $7054 = TaurosPicBack + $7E02 = MoltresPicBack + $74AA = DragonitePicFront + $767F = DragonitePicBack + SECTION: $7EA9-$7EFB ($0053 bytes) + $7EF2 = WasSeededText + $7EF7 = EvadedAttackText + $7EA9 = LeechSeedEffect_ + SLACK: $0104 bytes + +Bank #11: + SECTION: $4000-$7B7A ($3B7B bytes) + $79E8 = FossilKabutopsPic + $7788 = BeedrillPicFront + $757D = WeedlePicFront + $7624 = WeedlePicBack + $7677 = KakunaPicFront + $7736 = KakunaPicBack + $7980 = BeedrillPicBack + $6F6B = EkansPicFront + $706D = EkansPicBack + $4D7D = PikachuPicFront + $4E8B = PikachuPicBack + $4F03 = RaichuPicFront + $50C3 = RaichuPicBack + $5AC9 = SandshrewPicFront + $5BE7 = SandshrewPicBack + $5C6B = SandslashPicFront + $5E04 = SandslashPicBack + $4924 = VulpixPicFront + $4A9A = VulpixPicBack + $4AFF = NinetalesPicFront + $4CFB = NinetalesPicBack + $622F = JigglypuffPicFront + $630F = JigglypuffPicBack + $6348 = WigglytuffPicFront + $64BF = WigglytuffPicBack + $6E0C = ZubatPicFront + $6F17 = ZubatPicBack + $70B4 = ParasPicFront + $7177 = ParasPicBack + $4609 = MeowthPicFront + $471F = MeowthPicBack + $71ED = PoliwhirlPicFront + $735E = PoliwhirlPicBack + $73C1 = PoliwrathPicFront + $752C = PoliwrathPicBack + $6C9F = MachopPicFront + $6DA2 = MachopPicBack + $4777 = KrabbyPicFront + $48B0 = KrabbyPicBack + $57C1 = HorseaPicFront + $5873 = HorseaPicBack + $58C4 = SeadraPicFront + $5A2B = SeadraPicBack + $4514 = DittoPicFront + $45BD = DittoPicBack + $6531 = EeveePicFront + $6625 = EeveePicBack + $6AAE = VaporeonPicFront + $6C02 = VaporeonPicBack + $688F = JolteonPicFront + $6A0A = JolteonPicBack + $668D = FlareonPicFront + $6806 = FlareonPicBack + $5E9D = OmanytePicFront + $5F76 = OmanytePicBack + $5FD3 = OmastarPicFront + $618B = OmastarPicBack + $5464 = KabutoPicFront + $5529 = KabutoPicBack + $5583 = KabutopsPicFront + $573C = KabutopsPicBack + $4000 = ArticunoPicFront + $4238 = ArticunoPicBack + $429D = ZapdosPicFront + $4484 = ZapdosPicBack + $5151 = DratiniPicFront + $5234 = DratiniPicBack + $5297 = DragonairPicFront + $53D9 = DragonairPicBack + SECTION: $7B7B-$7F3B ($03C1 bytes) + $7F37 = GameCornerNoCoinsText + $7F32 = GameCornerCoinCaseText + $7B98 = TrainerInfoTextBoxTileGraphics + $7E18 = CheckIfMoveIsKnown + $7C28 = BlankLeaderNames + $7D98 = BadgeNumbersTileGraphics + $7B8E = SupperEffectiveText + $7B93 = NotVeryEffectiveText + $7E3B = AlreadyKnowsText + $7E7D = ScaleLastSpriteColumnByTwo + $7E55 = ScaleFirstThreeSpriteColumnsByTwo + $7E97 = ScalePixelsByTwo + $7EA8 = DuplicateBitsTable + $7F04 = CoinsScatteredText + $7F09 = AbleToPlaySlotsCheck + $7B7B = DisplayEffectiveness + $7EB8 = PayDayEffect_ + $7E40 = ScaleSpriteByTwo + $7D88 = CircleTile + SLACK: $00C4 bytes + +Bank #12: + SECTION: $4000-$7F2A ($3F2B bytes) + $7C1C = StarmiePicFront + $4A49 = CaterpiePicFront + $4AE1 = CaterpiePicBack + $4B3A = MetapodPicFront + $4BC8 = MetapodPicBack + $4C37 = ButterfreePicFront + $4E0E = ButterfreePicBack + $780A = PidgeottoPicFront + $795B = PidgeottoPicBack + $79C2 = PidgeotPicFront + $7B79 = PidgeotPicBack + $688C = ClefablePicFront + $69B8 = ClefablePicBack + $55E0 = GolbatPicFront + $580A = GolbatPicBack + $46A9 = VenomothPicFront + $4841 = VenomothPicBack + $4480 = DugtrioPicFront + $462A = DugtrioPicBack + $6D1E = PersianPicFront + $6F04 = PersianPicBack + $5108 = GolduckPicFront + $52C2 = GolduckPicBack + $4247 = PrimeapePicFront + $4408 = PrimeapePicBack + $73CC = AbraPicFront + $74CF = AbraPicBack + $755A = AlakazamPicFront + $7779 = AlakazamPicBack + $4E93 = MachampPicFront + $508C = MachampPicBack + $4000 = DodrioPicFront + $41A2 = DodrioPicBack + $4899 = DewgongPicFront + $49E2 = DewgongPicBack + $5F56 = MukPicFront + $615F = MukPicBack + $647F = CloysterPicFront + $66AB = CloysterPicBack + $718A = HaunterPicFront + $7345 = HaunterPicBack + $535D = HypnoPicFront + $5552 = HypnoPicBack + $61EC = KinglerPicFront + $63DE = KinglerPicBack + $6760 = ElectrodePicFront + $6827 = ElectrodePicBack + $6F8F = MarowakPicFront + $7101 = MarowakPicBack + $6A44 = WeezingPicFront + $6C76 = WeezingPicBack + $7DAC = StarmiePicBack + $5D31 = MagikarpPicFront + $5EC3 = MagikarpPicBack + $5B19 = SnorlaxPicFront + $5CE5 = SnorlaxPicBack + $587F = MewtwoPicFront + $5A85 = MewtwoPicBack + $7E0A = RedPicBack + $7E9A = OldManPic + SECTION: $7F2B-$7F8F ($0065 bytes) + $7F52 = ShroudedInMistText + $7F57 = OneHitKOEffect_ + $7F2B = MistEffect_ + SLACK: $0070 bytes + +Bank #13: + SECTION: $4000-$7243 ($3244 bytes) + $66B5 = GhostPic + $6536 = FossilAerodactylPic + $6FEA = VictreebelPicFront + $4000 = BulbasaurPicFront + $40E5 = BulbasaurPicBack + $4162 = VenusaurPicFront + $4397 = VenusaurPicBack + $5C5C = CharmanderPicFront + $5D5C = CharmanderPicBack + $5F0C = CharmeleonPicFront + $6048 = CharmeleonPicBack + $6286 = CharizardPicFront + $6495 = CharizardPicBack + $5DB8 = SquirtlePicFront + $5E8F = SquirtlePicBack + $60B1 = WartortlePicFront + $61F1 = WartortlePicBack + $4F6A = RattataPicFront + $5041 = RattataPicBack + $507A = RaticatePicFront + $520D = RaticatePicBack + $548B = NidorinaPicFront + $55C8 = NidorinaPicBack + $5282 = NidorinoPicFront + $53F0 = NidorinoPicBack + $680B = OddishPicFront + $68A9 = OddishPicBack + $6941 = GloomPicFront + $6A78 = GloomPicBack + $6B21 = VileplumePicFront + $6C82 = VileplumePicBack + $6D00 = BellsproutPicFront + $6DBA = BellsproutPicBack + $6E30 = WeepinbellPicFront + $6F6F = WeepinbellPicBack + $71B2 = VictreebelPicBack + $4455 = TentacruelPicFront + $45C3 = TentacruelPicBack + $564F = GeodudePicFront + $5729 = GeodudePicBack + $4AB1 = PonytaPicFront + $4E32 = PonytaPicBack + $4C10 = RapidashPicFront + $4EBA = RapidashPicBack + $5B87 = MagnemitePicFront + $5C0D = MagnemitePicBack + $466F = GoldeenPicFront + $4796 = GoldeenPicBack + $4803 = SeakingPicFront + $4A03 = SeakingPicBack + $5784 = PorygonPicFront + $58D1 = PorygonPicBack + $5931 = AerodactylPicFront + $5AEC = AerodactylPicBack + SECTION: $7244-$7E87 ($0C44 bytes) + $7D41 = _Multiply + $7DA5 = _Divide + $7E79 = GameCornerOutOfOrderText + $7E7E = GameCornerOutToLunchText + $7E83 = GameCornerSomeonesKeysText + $72AC = Func_372ac + $7258 = TitleScroll + $72D6 = Func_372d6 + $7247 = TitleScroll_In + $724F = TitleScroll_Out + $7292 = _TitleScroll.ScrollBetween + $72C4 = GetTitleBallY + $7244 = TitleScroll_WaitBall + $726A = _TitleScroll + $72A0 = TitleBallYTable + $7390 = PlaySlotMachineText + $78A8 = LoadSlotMachineTiles + $7395 = MainSlotMachineLoop + $7754 = SlotMachine_37754 + $775F = SlotMachine_3775f + $746C = BetHowManySlotMachineText + $745E = CoinMultiplierSlotMachineText + $7476 = NotEnoughCoinsSlotMachineText + $7741 = SlotMachine_37741 + $77D5 = SlotMachine_377d5 + $7480 = SlotMachine_37480 + $7471 = StartSlotMachineText + $74AD = SlotMachine_374ad + $7588 = SlotMachine_37588 + $7467 = OutOfCoinsSlotMachineText + $747B = OneMoreGoSlotMachineText + $77CE = SlotMachine_377ce + $7813 = SlotMachine_37813 + $7823 = SlotMachine_37823 + $7833 = SlotMachine_37833 + $7882 = SlotMachine_37882 + $74DF = SlotMachine_374df + $74FB = SlotMachine_374fb + $7517 = SlotMachine_37517 + $752C = SlotMachine_3752c + $7552 = SlotMachine_37552 + $76C0 = SlotMachine_GetWheelOneTile + $76B4 = SlotMachine_GetWheelTwoTile + $756E = SlotMachine_3756e + $76A8 = SlotMachine_GetWheelThreeTile + $76A2 = SlotMachine_CheckForMatch + $7604 = SlotMachine_37588.skip5 + $769D = NotThisTimeText + $7678 = SlotRewardPointers + $7638 = SlotMachine_37588.asm_37638 + $7665 = SlotsMachineText_37665 + $776B = SlotMachine_3776b + $75F0 = SlotMachine_37588.loop + $7728 = SlotMachine_37728 + $7673 = LinedUpText + $7702 = SlotReward300Func + $7690 = SlotReward300Text + $76F3 = SlotReward100Func + $7694 = SlotReward100Text + $76D7 = SlotReward8Func + $7698 = SlotReward8Text + $76E5 = SlotReward15Func + $769A = SlotReward15Text + $7A2D = SlotMachineWheel3 + $76C9 = SlotMachine_GetWheelTile + $7A09 = SlotMachineWheel2 + $79E5 = SlotMachineWheel1 + $7722 = YeahText + $77FE = SlotMachine_377fe + $7A51 = SlotMachineTiles1 + $78F5 = SlotMachineMap + $7CE6 = PointerTable_37ce6 + $7CEA = PewterMuseumGuyCoords + $7D06 = PewterGymGuyCoords + $7CFA = PewterMuseumGuyCoords.down + $7CFD = PewterMuseumGuyCoords.up + $7D00 = PewterMuseumGuyCoords.left + $7D03 = PewterMuseumGuyCoords.right + $7D1A = PewterGymGuyCoords.one + $7D1F = PewterGymGuyCoords.two + $7D24 = PewterGymGuyCoords.three + $7D30 = PewterGymGuyCoords.four + $7D35 = PewterGymGuyCoords.five + $730E = PromptUserToPlaySlots + $7E2D = StartSlotMachine + $7CA1 = PewterGuys + SLACK: $0178 bytes + +Bank #14: + SECTION: $4000-$7BE5 ($3BE6 bytes) + $5446 = CryData + $43DE = BaseStats + $5914 = TrainerPicAndMoneyPointers + $59FF = TrainerNames + $5C37 = Func_39c37 + $5BD5 = Func_39bd5 + $6D0E = Func_3ad0e + $4000 = Moves + $5B87 = Func_39b87 + $705C = EvosMovesPointerTable + $697E = PokeballTileGraphics + $6948 = SetupPlayerAndEnemyPokeballs + $569F = Func_3969f + $56C6 = Func_396c6 + $5707 = Func_39707 + $589B = TrainerClassMoveChoiceModifications + $579F = AIEnemyTrainerChooseMoves.useOriginalMoveSet + $57A3 = AIMoveChoiceModificationFunctionPointers + $574B = AIEnemyTrainerChooseMoves.nextMoveChoiceModification + $57AB = AIMoveChoiceModification1 + $57E7 = AIMoveChoiceModification2 + $5817 = AIMoveChoiceModification3 + $5883 = AIMoveChoiceModification4 + $5884 = ReadMove + $57E2 = StatusAilmentMoveEffects + $5D3B = TrainerDataPointers + $5D22 = LoneMoves + $5D32 = TeamMoves + $5D99 = YoungsterData + $5DCE = BugCatcherData + $5E0C = LassData + $5E58 = SailorData + $5E78 = JrTrainerMData + $5E9D = JrTrainerFData + $5F09 = PokemaniacData + $5F26 = SuperNerdData + $5F5E = HikerData + $5F9C = BikerData + $5FE4 = BurglarData + $6007 = EngineerData + $6013 = Juggler1Data + $6013 = FisherData + $6049 = SwimmerData + $608D = CueBallData + $60B3 = GamblerData + $60D1 = BeautyData + $6115 = PsychicData + $6127 = RockerData + $6130 = JugglerData + $6151 = TamerData + $616B = BirdKeeperData + $61BE = BlackbeltData + $61E4 = Green1Data + $621D = ProfOakData + $6241 = ChiefData + $6241 = ScientistData + $627E = GiovanniData + $629C = RocketData + $635A = CooltrainerMData + $6385 = CooltrainerFData + $63A9 = BrunoData + $63B5 = BrockData + $63BB = MistyData + $63C1 = LtSurgeData + $63C9 = ErikaData + $63D1 = KogaData + $63DB = BlaineData + $63E5 = SabrinaData + $63EF = GentlemanData + $6401 = Green2Data + $6491 = Green3Data + $64BB = LoreleiData + $64C7 = ChannelerData + $6516 = AgathaData + $6522 = LanceData + $655C = TrainerAIPointers + $6693 = GenericAI + $65E9 = JugglerAI + $65EF = BlackbeltAI + $65F5 = GiovanniAI + $65FB = CooltrainerMAI + $6601 = CooltrainerFAI + $6670 = BrunoAI + $6614 = BrockAI + $661C = MistyAI + $6622 = LtSurgeAI + $6628 = ErikaAI + $6634 = KogaAI + $663A = BlaineAI + $6640 = SabrinaAI + $664C = Sony2AI + $6658 = Sony3AI + $6664 = LoreleiAI + $6676 = AgathaAI + $6687 = LanceAI + $672A = Func_3a72a + $67F2 = AIUseXAttack + $67B5 = AIUseGuardSpec + $67CF = Func_3a7cf + $66D6 = AIUseHyperPotion + $6786 = AIUseFullHeal + $67F8 = AIUseXDefend + $67FE = AIUseXSpeed + $66D0 = AIUseSuperPotion + $66CA = AIUsePotion + $66A0 = AIUseFullRestore + $6791 = AICureStatus + $6835 = AIPrintItemUse_ + $6695 = DecrementAICount + $674B = Func_3a74b + $6781 = AIBattleWithdrawText + $669B = Func_3a69b + $682C = AIPrintItemUse + $6844 = AIBattleUseItemText + $685D = LoadPartyPokeballGfx + $6869 = SetupOwnPartyPokeballs + $6887 = SetupEnemyPartyPokeballs + $6902 = PlacePlayerHUDTiles + $68A6 = SetupPokeballs + $68E1 = Func_3a8e1 + $6919 = PlaceEnemyHUDTiles + $68C2 = PickPokeball + $6916 = PlayerBattleHUDGraphicsTiles + $692D = EnemyBattleHUDGraphicsTiles + $7057 = Func_3b057 + $6EDE = Func_3aede + $6D2E = asm_3ad2e + $6ED9 = Func_3aed9 + $6EDA = Func_3aeda + $6F4D = IsEvolvingText + $6F2E = Func_3af2e + $6F3E = EvolvedText + $6F43 = IntoText + $6EF7 = Func_3aef7 + $6F5B = Func_3af5b + $6F52 = Func_3af52 + $6D71 = Func_3ad71 + $6F48 = StoppedEvolvingText + $704A = WriteMonMoves.done + $704E = WriteMonMoves_ShiftMoveData + $71D8 = Mon112_EvosMoves + $71E6 = Mon115_EvosMoves + $71F2 = Mon032_EvosMoves + $7203 = Mon035_EvosMoves + $7215 = Mon021_EvosMoves + $7224 = Mon100_EvosMoves + $7233 = Mon034_EvosMoves + $723B = Mon080_EvosMoves + $724B = Mon002_EvosMoves + $725E = Mon103_EvosMoves + $7262 = Mon108_EvosMoves + $726E = Mon102_EvosMoves + $7280 = Mon088_EvosMoves + $7291 = Mon094_EvosMoves + $7297 = Mon029_EvosMoves + $72A8 = Mon031_EvosMoves + $72B0 = Mon104_EvosMoves + $72BF = Mon111_EvosMoves + $72D0 = Mon131_EvosMoves + $72DE = Mon059_EvosMoves + $72E0 = Mon151_EvosMoves + $72EA = Mon130_EvosMoves + $72F6 = Mon090_EvosMoves + $7306 = Mon072_EvosMoves + $731B = Mon092_EvosMoves + $7324 = Mon123_EvosMoves + $7332 = Mon120_EvosMoves + $7346 = Mon009_EvosMoves + $7354 = Mon127_EvosMoves + $7362 = Mon114_EvosMoves + $7370 = Mon152_EvosMoves + $7372 = Mon153_EvosMoves + $7374 = Mon058_EvosMoves + $7384 = Mon095_EvosMoves + $7390 = Mon022_EvosMoves + $739C = Mon016_EvosMoves + $73AD = Mon079_EvosMoves + $73BE = Mon064_EvosMoves + $73CF = Mon075_EvosMoves + $73E0 = Mon113_EvosMoves + $73EE = Mon067_EvosMoves + $73FD = Mon122_EvosMoves + $7409 = Mon106_EvosMoves + $7415 = Mon107_EvosMoves + $7421 = Mon024_EvosMoves + $742D = Mon047_EvosMoves + $7439 = Mon054_EvosMoves + $7448 = Mon096_EvosMoves + $7459 = Mon076_EvosMoves + $7467 = Mon154_EvosMoves + $7469 = Mon126_EvosMoves + $7477 = Mon155_EvosMoves + $7479 = Mon125_EvosMoves + $7485 = Mon082_EvosMoves + $7493 = Mon109_EvosMoves + $74A2 = Mon156_EvosMoves + $74A4 = Mon056_EvosMoves + $74B3 = Mon086_EvosMoves + $74C2 = Mon050_EvosMoves + $74D1 = Mon128_EvosMoves + $74DD = Mon157_EvosMoves + $74DF = Mon158_EvosMoves + $74E1 = Mon159_EvosMoves + $74E3 = Mon083_EvosMoves + $74EF = Mon048_EvosMoves + $7500 = Mon149_EvosMoves + $750C = Mon160_EvosMoves + $750E = Mon161_EvosMoves + $7510 = Mon162_EvosMoves + $7512 = Mon084_EvosMoves + $7523 = Mon060_EvosMoves + $7534 = Mon124_EvosMoves + $7542 = Mon146_EvosMoves + $754A = Mon144_EvosMoves + $7552 = Mon145_EvosMoves + $755A = Mon132_EvosMoves + $755C = Mon052_EvosMoves + $756B = Mon098_EvosMoves + $757A = Mon163_EvosMoves + $757C = Mon164_EvosMoves + $757E = Mon165_EvosMoves + $7580 = Mon037_EvosMoves + $7590 = Mon038_EvosMoves + $7592 = Mon025_EvosMoves + $75A2 = Mon026_EvosMoves + $75A4 = Mon166_EvosMoves + $75A6 = Mon167_EvosMoves + $75A8 = Mon147_EvosMoves + $75B7 = Mon148_EvosMoves + $75C6 = Mon140_EvosMoves + $75D3 = Mon141_EvosMoves + $75DD = Mon116_EvosMoves + $75EC = Mon117_EvosMoves + $75F8 = Mon168_EvosMoves + $75FA = Mon169_EvosMoves + $75FC = Mon027_EvosMoves + $760B = Mon028_EvosMoves + $7617 = Mon138_EvosMoves + $7624 = Mon139_EvosMoves + $762E = Mon039_EvosMoves + $7642 = Mon040_EvosMoves + $7644 = Mon133_EvosMoves + $765A = Mon136_EvosMoves + $766C = Mon135_EvosMoves + $767E = Mon134_EvosMoves + $7690 = Mon066_EvosMoves + $769F = Mon041_EvosMoves + $76AE = Mon023_EvosMoves + $76BD = Mon046_EvosMoves + $76CC = Mon061_EvosMoves + $76DE = Mon062_EvosMoves + $76E4 = Mon013_EvosMoves + $76E9 = Mon014_EvosMoves + $76EE = Mon015_EvosMoves + $76FC = Mon170_EvosMoves + $76FE = Mon085_EvosMoves + $770C = Mon057_EvosMoves + $7718 = Mon051_EvosMoves + $7724 = Mon049_EvosMoves + $7732 = Mon087_EvosMoves + $773E = Mon171_EvosMoves + $7740 = Mon172_EvosMoves + $7742 = Mon010_EvosMoves + $7747 = Mon011_EvosMoves + $774C = Mon012_EvosMoves + $775C = Mon068_EvosMoves + $7768 = Mon173_EvosMoves + $776A = Mon055_EvosMoves + $7776 = Mon097_EvosMoves + $7784 = Mon042_EvosMoves + $7790 = Mon150_EvosMoves + $779C = Mon143_EvosMoves + $77A6 = Mon129_EvosMoves + $77AD = Mon174_EvosMoves + $77AF = Mon175_EvosMoves + $77B1 = Mon089_EvosMoves + $77BF = Mon176_EvosMoves + $77C1 = Mon099_EvosMoves + $77CD = Mon091_EvosMoves + $77D1 = Mon177_EvosMoves + $77D3 = Mon101_EvosMoves + $77DF = Mon036_EvosMoves + $77E1 = Mon110_EvosMoves + $77ED = Mon053_EvosMoves + $77F9 = Mon105_EvosMoves + $7805 = Mon178_EvosMoves + $7807 = Mon093_EvosMoves + $7810 = Mon063_EvosMoves + $7815 = Mon065_EvosMoves + $7823 = Mon017_EvosMoves + $7834 = Mon018_EvosMoves + $7842 = Mon121_EvosMoves + $7844 = Mon001_EvosMoves + $7857 = Mon003_EvosMoves + $7867 = Mon073_EvosMoves + $7879 = Mon179_EvosMoves + $787B = Mon118_EvosMoves + $788C = Mon119_EvosMoves + $789A = Mon180_EvosMoves + $789C = Mon181_EvosMoves + $789E = Mon182_EvosMoves + $78A0 = Mon183_EvosMoves + $78A2 = Mon077_EvosMoves + $78B3 = Mon078_EvosMoves + $78C1 = Mon019_EvosMoves + $78CE = Mon020_EvosMoves + $78D8 = Mon033_EvosMoves + $78EA = Mon030_EvosMoves + $78FC = Mon074_EvosMoves + $790D = Mon137_EvosMoves + $7917 = Mon142_EvosMoves + $7921 = Mon184_EvosMoves + $7923 = Mon081_EvosMoves + $7934 = Mon185_EvosMoves + $7936 = Mon186_EvosMoves + $7938 = Mon004_EvosMoves + $7949 = Mon007_EvosMoves + $795A = Mon005_EvosMoves + $796B = Mon008_EvosMoves + $797C = Mon006_EvosMoves + $798A = Mon187_EvosMoves + $798C = Mon188_EvosMoves + $798E = Mon189_EvosMoves + $7990 = Mon190_EvosMoves + $7992 = Mon043_EvosMoves + $79A3 = Mon044_EvosMoves + $79B5 = Mon045_EvosMoves + $79BD = Mon069_EvosMoves + $79D0 = Mon070_EvosMoves + $79E4 = Mon071_EvosMoves + $7A97 = Func_3ba97 + $7AA2 = StartedSleepingEffect + $7AA7 = FellAsleepBecameHealthyText + $7BE1 = BankswitchEtoF + $7AAC = RegainedHealthText + $7B8C = Func_3bb8c + $7B7D = Func_3bb7d + $7B92 = TransformedText + $7BD7 = LightScreenProtectedText + $7BDC = ReflectGainedArmorText + $652E = TrainerAI + $6857 = DrawEnemyPokeballs + $5719 = AIEnemyTrainerChooseMoves + $5680 = Func_39680 + $56A7 = Func_396a7 + $56D3 = _ScrollTrainerPicAfterBattle + $5C53 = ReadTrainer + $79EC = HealEffect_ + $7AB1 = TransformEffect_ + $7B97 = ReflectLightScreenEffect_ + $69BE = TradingAnimationGraphics + $6CCE = TradingAnimationGraphics2 + $6D1C = Func_3ad1c + $6FB8 = WriteMonMoves + $6849 = DrawAllPokeballs + SLACK: $041A bytes + +Bank #15: + SECTION: $4000-$7BC7 ($3BC8 bytes) + $4A83 = AnyPartyAlive + $6F12 = InitBattle + $70D0 = asm_3f0d0 + $502D = OldManItemList + $6E5B = Func_3ee5b + $4D43 = ReadPlayerMonCurHPAndStatus + $583A = IsGhostBattle + $6B01 = Func_3eb01 + $7428 = StatModifierUpEffect + $5219 = MoveSelectionMenu + $7BA8 = Func_3fba8 + $7B53 = PrintButItFailedText_ + $4D5A = Func_3cd5a + $656B = MoveHitTest + $704B = _LoadTrainerPic + $6449 = AIGetTypeEffectiveness + $490E = EnemySendOut + $4000 = BattleCore + $6C92 = Func_3ec92 + $6E58 = Func_3ee58 + $4110 = Func_3c110 + $40FF = Func_3c0ff + $492A = Func_3c92a + $4837 = HandlePlayerBlackOut + $41AD = Func_3c1ad + $4EB3 = InitBattleMenu + $41A8 = OutOfSafariBallsText + $4202 = asm_3c202 + $4A97 = Func_3ca97 + $48DF = Func_3c8df + $4BA6 = Func_3cba6 + $4C91 = Func_3cc91 + $4229 = WildRanText + $422E = EnemyRanText + $4700 = HandlePlayerMonFainted + $4525 = HandleEnemyMonFainted + $5564 = SelectEnemyMove + $437D = MainInBattleLoop.playerMovesFirst + $6E9B = BattleRandom + $66BC = Func_3e6bc + $43BD = HandlePoisonBurnLeechSeed + $565E = Func_3d65e + $450F = Func_3c50f + $4233 = MainInBattleLoop + $442E = HurtByPoisonText + $4433 = HurtByBurnText + $6F07 = PlayMoveAnimation + $443D = HandlePoisonBurnLeechSeed_DecreaseOwnHP + $44A3 = HandlePoisonBurnLeechSeed_IncreaseEnemyHP + $4438 = HurtByLeechSeedText + $44F6 = UpdateCurMonHPBar + $4567 = FaintEnemyPokemon + $4D60 = Func_3cd60 + $464F = AnyEnemyPokemonAliveCheck + $4696 = TrainerBattleVictory + $479B = Func_3c79b + $47D8 = Func_3c7d8 + $4664 = Func_3c664 + $4893 = Func_3c893 + $4643 = Func_3c643 + $46EE = PlayBattleVictoryMusic + $4741 = Func_3c741 + $463E = EnemyMonFaintedText + $6E94 = Func_3ee94 + $4E90 = GetBattleHealthBarColor + $5605 = Func_3d605 + $46E9 = TrainerDefeatedText + $6D12 = ScrollTrainerPicAfterBattle + $46E4 = MoneyForWinningText + $4796 = PlayerMonFaintedText + $47D3 = UseNextMonText + $4AB9 = Func_3cab9 + $4884 = Sony1WinText + $4889 = PlayerBlackedOutText2 + $488E = LinkBattleLostText + $48D7 = SevenSpacesText + $4A79 = TrainerAboutToUseText + $51F5 = AlreadyOutText + $4A7E = TrainerSentOutText + $4DEC = Func_3cdec + $51BA = Func_3d1ba + $4AB4 = NoWillText + $4B5C = Func_3cab9.asm_3cb5c + $4B97 = CantEscapeText + $4B9C = NoRunningText + $4BA1 = GotAwayText + $6D1A = Func_3ed1a + $6E19 = Func_3ee19 + $6D1E = Func_3ed1e + $4CA4 = Func_3cca4 + $4D3A = Func_3cd3a + $4E9C = Func_3ce9c + $4E7F = Func_3ce7f + $4F1A = RegularBattleMenu + $4F12 = OldManName + $4FE8 = Func_3cfe8 + $50CA = Func_3d0ca + $50C5 = ItemsCantBeUsedHereText + $500E = asm_3d00e + $51FA = Func_3d1fa + $505F = asm_3d05f + $5119 = Func_3d119 + $50E0 = Func_3d0e0 + $5105 = Func_3d105 + $4CFA = Func_3ccfa + $53F5 = Func_3d3f5 + $5224 = MoveSelectionMenu.loadmoves + $5236 = MoveSelectionMenu.writemoves + $53B8 = WhichTechniqueString + $54B6 = Func_3d4b6 + $53C9 = Func_3d3c9 + $53DD = Func_3d3dd + $5435 = Func_3d435 + $53B3 = MoveDisabledText + $53AE = MoveNoPPText + $52FE = Func_3d2fe + $5430 = NoMovesLeftText + $5493 = Func_3d493 + $5555 = DisabledText + $555F = TypeText + $6ABE = GetCurrentMove + $5601 = SelectEnemyMove.asm_3d601 + $580A = Func_3d80a + $5811 = PrintGhostText + $5854 = Func_3d854 + $5C88 = Func_3dc88 + $7132 = Func_3f132 + $5AF5 = PrintMonName1Text + $4000 = EffectsArray1 + $4049 = EffectsArray5B + $4011 = EffectsArray2 + $5702 = asm_3d6dc.asm_3d702 + $6023 = CriticalHitTest + $6093 = HandleCounterMove + $5DCF = CalculateDamage + $5F65 = MoreCalculateDamage + $574B = asm_3d74b + $63A5 = AdjustDamageForMoveType + $6687 = Func_3e687 + $6ED3 = Func_3eed3 + $62FD = MirrorMoveCopyMove + $569A = Func_3d69a + $6348 = MetronomePickMove + $4014 = EffectsArray3 + $5BE2 = PrintMoveFailureText + $60DF = ApplyAttackToEnemyPokemon + $5C5C = Func_3dc5c + $4030 = EffectsArray4 + $62B6 = HandleBuildingRage + $5714 = asm_3d714 + $5805 = MultiHitText + $403B = EffectsArray5 + $5830 = ScaredText + $5835 = GetOutText + $5A3D = FastAsleepText + $5A42 = WokeUpText + $5A37 = Func_3da37 + $5A47 = IsFrozenText + $58AC = FlinchedCheck + $5A83 = CantMoveText + $58C2 = HyperBeamCheck + $5A51 = FlinchedText + $5A56 = MustRechargeText + $5A5B = DisabledNoMoreText + $5A6A = ConfusedNoMoreText + $5A60 = IsConfusedText + $5AAD = PrintHurtItselfText + $5A88 = PrintMoveIsDisabledText + $5A4C = FullyParalyzedText + $5A74 = UnleashedEnergyText + $5705 = asm_3d705 + $5A79 = ThrashingAboutText + $56DC = asm_3d6dc + $5A1A = Func_3da1a + $5A7E = AttackContinuesText + $5A39 = Func_3da39 + $56B0 = asm_3d6b0 + $5AA8 = MoveIsDisabledText + $5A65 = HurtItselfText + $6200 = ApplyDamageToPlayerPokemon + $5AFB = MonName1Text + $5B85 = Func_3db85 + $5B34 = Used2Text + $5B2D = Used1Text + $5B43 = InsteadText + $5B4C = CF4BText + $5B62 = ExclamationPointPointerTable + $5B6C = ExclamationPoint1Text + $5B71 = ExclamationPoint2Text + $5B76 = ExclamationPoint3Text + $5B7B = ExclamationPoint4Text + $5B80 = ExclamationPoint5Text + $5BA3 = UnknownMovesList_3dba3 + $5C57 = DoesntAffectMonText + $5C42 = AttackMissedText + $5C4C = UnaffectedText + $5C47 = KeptGoingAndCrashedText + $6142 = ApplyDamageToEnemyPokemon + $5C7A = CriticalOHKOTextPointers + $5C7E = CriticalHitText + $5C83 = OHKOText + $5DB0 = Func_3ddb0 + $5DC0 = WontObeyText + $5DB4 = Func_3ddb4 + $5DBB = BeganToNapText + $5DB6 = LoafingAroundText + $5DC5 = TurnedAwayText + $5DCA = IgnoredOrdersText + $5F1C = Func_3df1c + $6016 = Func_3e016 + $608E = HighCriticalMoves + $619D = ApplyAttackToEnemyPokemonDone + $625E = AttackSubstitute + $625B = ApplyAttackToPlayerPokemonDone + $62AC = SubstituteTookDamageText + $62B1 = SubstituteBrokeText + $62F8 = BuildingRageText + $6324 = MirrorMoveFailedText + $6373 = IncrementMovePP + $6474 = TypeEffects + $63FA = AdjustDamageForMoveType.loop + $6609 = MoveHitTest.moveMissed + $7B79 = CheckTargetSubstitute + $6624 = CalcHitChance + $76CB = StatModifierRatios + $6677 = CalcHitChance.nextCalculation + $688C = Func_3e88c + $688F = Func_3e88f + $6C81 = Func_3ec81 + $677F = Func_3e77f + $5E75 = Func_3de75 + $67D1 = Func_3e7d1 + $66FC = Func_3e6fc + $61A0 = ApplyAttackToPlayerPokemon + $6794 = Func_3e794 + $6887 = HitXTimesText + $6AB8 = Func_3eab8 + $68E7 = Func_3e8e7 + $68FD = Func_3e8fd + $69AA = Func_3e9aa + $6782 = asm_3e782 + $6750 = asm_3e750 + $6A9B = Func_3ea9b + $6ABA = Func_3eaba + $672B = asm_3e72b + $6ACC = GetCurrentMove.player + $4C13 = Func_3cc13 + $6D27 = Func_3ed27 + $6D64 = Func_3ed64 + $6DA5 = Func_3eda5 + $6E0C = Func_3ee0c + $6E35 = Func_3ee35 + $6E9A = TerminatorText_3ee9a + $6F8B = InitWildBattle + $6C32 = Func_3ec32 + $6FEB = Func_3efeb + $404C = Func_3c04c + $704A = TerminatorText_3f04a + $411E = Func_3c11e + $7138 = JumpMoveEffect + $7150 = MoveEffectPointerTable + $71FC = SleepEffect + $724F = PoisonEffect + $72E9 = DrainHPEffect + $730C = FreezeBurnParalyzeEffect + $72F1 = ExplodeEffect + $7B0E = PayDayEffect + $754C = StatModifierDownEffect + $7B16 = ConversionEffect + $7B1E = HazeEffect + $76E5 = BideEffect + $7717 = ThrashPetalDanceEffect + $7739 = SwitchAndTeleportEffect + $7811 = TwoToFiveAttacksEffect + $785B = FlichSideEffect + $7884 = OneHitKOEffect + $788C = ChargeEffect + $7917 = TrappingEffect + $7941 = MistEffect + $7949 = FocusEnergyEffect + $7951 = RecoilEffect + $7961 = ConfusionEffect + $7B26 = HealEffect + $7B2E = TransformEffect + $7B36 = ReflectLightScreenEffect + $79B1 = ParalyzeEffect + $7959 = ConfusionSideEffect + $79B9 = SubstituteEffect + $79C1 = HyperBeamEffect + $79DF = RageEffect + $79ED = MimicEffect + $7A7C = LeechSeedEffect + $7A84 = SplashEffect + $7A8A = DisableEffect + $720E = SleepEffect.asm_3f20e + $724A = AlreadyAsleepText + $7B89 = Func_3fb89 + $7245 = FellAsleepText + $7B5E = PrintDidntAffectText + $72E4 = BadlyPoisonedText + $72DF = PoisonedText + $7B96 = Func_3fb96 + $7382 = opponentAttacker + $73E2 = CheckDefrost + $7BB9 = Func_3fbb9 + $7B6E = PrintMayNotAttackText + $73D8 = BurnedText + $79CF = Func_3f9cf + $73DD = FrozenText + $7423 = FireDefrostedText + $7522 = Func_3f522 + $7520 = Func_3f520 + $74C3 = Func_3f4c3 + $7688 = Func_3f688 + $7528 = MonsStatsRoseText + $7B3E = NothingHappenedText + $7542 = GreatlyRoseText + $7547 = RoseText + $765A = Func_3f65a + $7650 = Func_3f650 + $764D = Func_3f64d + $7624 = Func_3f624 + $7661 = MonsStatsFellText + $7B4E = Func_3fb4e + $7683 = FellText + $767E = GreatlyFellText + $769F = StatsTextStrings + $7B69 = IsUnaffectedText + $7802 = RanFromBattleText + $7807 = RanAwayScaredText + $780C = WasBlownAwayText + $78C8 = ChargeMoveEffectText + $78F9 = MadeWhirlwindText + $78FE = TookInSunlightText + $7903 = LoweredItsHeadText + $7908 = SkyAttackGlowingText + $790D = FlewUpHighText + $7912 = DugAHoleText + $79A1 = BecameConfusedText + $7A77 = MimicLearnedMoveText + $7B43 = PrintNoEffectText + $7B09 = MoveWasDisabledText + $7B49 = NoEffectText + $7B59 = ButItFailedText + $7B64 = DidntAffectText + $7B74 = ParalyzedMayNotAttackText + $7BBC = Func_3fbbc + $70C6 = Func_3f0c6 + $7073 = Func_3f073 + $7103 = LoadMonBackPic + $6D02 = Func_3ed02 + $6F18 = InitOpponent + $5C51 = PrintDoesntAffectText + $6D99 = Func_3ed99 + SLACK: $0438 bytes + +Bank #16: + SECTION: $4000-$67F2 ($27F3 bytes) + $4111 = HandlePokedexListMenu + $406D = HandlePokedexSideMenu + $401D = ShowPokedexMenu.setUpGraphics + $42C2 = IsPokemonBitSet + $4FF9 = PokedexToIndex + $4474 = DrawTileLine + $42E2 = ShowPokedexDataInternal + $428E = DrawPokedexVerticalLine + $429D = PokedexSeenText + $42A2 = PokedexOwnText + $42A6 = PokedexContentsText + $42AF = PokedexMenuItemsText + $41ED = HandlePokedexListMenu.dashedLine + $428C = HandlePokedexListMenu.buttonBPressed + $4191 = HandlePokedexListMenu.loop + $445F = PokedexDataDividerLine + $4448 = HeightWeightText + $447E = PokedexEntryPointers + $5010 = IndexToPokedex + $4423 = ShowPokedexDataInternal.waitForButtonPress + $45FA = RhydonDexEntry + $4609 = KangaskhanDexEntry + $4619 = NidoranMDexEntry + $462D = ClefairyDexEntry + $463C = SpearowDexEntry + $464F = VoltorbDexEntry + $465D = NidokingDexEntry + $466C = SlowbroDexEntry + $4680 = IvysaurDexEntry + $468E = ExeggutorDexEntry + $469F = LickitungDexEntry + $46B0 = ExeggcuteDexEntry + $46BD = GrimerDexEntry + $46CD = GengarDexEntry + $46DD = NidoranFDexEntry + $46F1 = NidoqueenDexEntry + $4700 = CuboneDexEntry + $4710 = RhyhornDexEntry + $4720 = LaprasDexEntry + $4733 = ArcanineDexEntry + $4746 = MewDexEntry + $475A = GyaradosDexEntry + $476D = ShellderDexEntry + $477E = TentacoolDexEntry + $4791 = GastlyDexEntry + $479E = ScytherDexEntry + $47AE = StaryuDexEntry + $47C1 = BlastoiseDexEntry + $47D4 = PinsirDexEntry + $47E8 = TangelaDexEntry + $4FE5 = MissingNoDexEntry + $47F6 = GrowlitheDexEntry + $4805 = OnixDexEntry + $4819 = FearowDexEntry + $4827 = PidgeyDexEntry + $483A = SlowpokeDexEntry + $4849 = KadabraDexEntry + $4856 = GravelerDexEntry + $4864 = ChanseyDexEntry + $4871 = MachokeDexEntry + $4885 = MrMimeDexEntry + $4896 = HitmonleeDexEntry + $48A7 = HitmonchanDexEntry + $48B9 = ArbokDexEntry + $48C8 = ParasectDexEntry + $48DA = PsyduckDexEntry + $48E8 = DrowzeeDexEntry + $48FA = GolemDexEntry + $490B = MagmarDexEntry + $491D = ElectabuzzDexEntry + $492F = MagnetonDexEntry + $493F = KoffingDexEntry + $4953 = MankeyDexEntry + $4967 = SeelDexEntry + $4979 = DiglettDexEntry + $4987 = TaurosDexEntry + $499A = FarfetchdDexEntry + $49AD = VenonatDexEntry + $49BD = DragoniteDexEntry + $49CD = DoduoDexEntry + $49E0 = PoliwagDexEntry + $49F1 = JynxDexEntry + $4A05 = MoltresDexEntry + $4A14 = ArticunoDexEntry + $4A24 = ZapdosDexEntry + $4A36 = DittoDexEntry + $4A49 = MeowthDexEntry + $4A5D = KrabbyDexEntry + $4A71 = VulpixDexEntry + $4A7E = NinetalesDexEntry + $4A8B = PikachuDexEntry + $4A9A = RaichuDexEntry + $4AA9 = DratiniDexEntry + $4AB9 = DragonairDexEntry + $4AC9 = KabutoDexEntry + $4ADC = KabutopsDexEntry + $4AEF = HorseaDexEntry + $4AFF = SeadraDexEntry + $4B0F = SandshrewDexEntry + $4B1E = SandslashDexEntry + $4B2D = OmanyteDexEntry + $4B3D = OmastarDexEntry + $4B4D = JigglypuffDexEntry + $4B5E = WigglytuffDexEntry + $4B6F = EeveeDexEntry + $4B82 = FlareonDexEntry + $4B91 = JolteonDexEntry + $4BA4 = VaporeonDexEntry + $4BB8 = MachopDexEntry + $4BCC = ZubatDexEntry + $4BD9 = EkansDexEntry + $4BE8 = ParasDexEntry + $4BFA = PoliwhirlDexEntry + $4C0B = PoliwrathDexEntry + $4C1C = WeedleDexEntry + $4C2F = KakunaDexEntry + $4C3F = BeedrillDexEntry + $4C53 = DodrioDexEntry + $4C67 = PrimeapeDexEntry + $4C7B = DugtrioDexEntry + $4C89 = VenomothDexEntry + $4C9D = DewgongDexEntry + $4CAF = CaterpieDexEntry + $4CBD = MetapodDexEntry + $4CCD = ButterfreeDexEntry + $4CE0 = MachampDexEntry + $4CF4 = GolduckDexEntry + $4D02 = HypnoDexEntry + $4D14 = GolbatDexEntry + $4D21 = MewtwoDexEntry + $4D32 = SnorlaxDexEntry + $4D44 = MagikarpDexEntry + $4D52 = MukDexEntry + $4D62 = KinglerDexEntry + $4D72 = CloysterDexEntry + $4D83 = ElectrodeDexEntry + $4D91 = ClefableDexEntry + $4DA0 = WeezingDexEntry + $4DB4 = PersianDexEntry + $4DC8 = MarowakDexEntry + $4DDC = HaunterDexEntry + $4DE9 = AbraDexEntry + $4DF6 = AlakazamDexEntry + $4E03 = PidgeottoDexEntry + $4E11 = PidgeotDexEntry + $4E1F = StarmieDexEntry + $4E33 = BulbasaurDexEntry + $4E41 = VenusaurDexEntry + $4E4F = TentacruelDexEntry + $4E62 = GoldeenDexEntry + $4E74 = SeakingDexEntry + $4E86 = PonytaDexEntry + $4E9A = RapidashDexEntry + $4EAE = RattataDexEntry + $4EBB = RaticateDexEntry + $4EC8 = NidorinoDexEntry + $4EDC = NidorinaDexEntry + $4EF0 = GeodudeDexEntry + $4EFE = PorygonDexEntry + $4F0F = AerodactylDexEntry + $4F1F = MagnemiteDexEntry + $4F2F = CharmanderDexEntry + $4F3F = SquirtleDexEntry + $4F53 = CharmeleonDexEntry + $4F62 = WartortleDexEntry + $4F72 = CharizardDexEntry + $4F81 = OddishDexEntry + $4F8F = GloomDexEntry + $4F9D = VileplumeDexEntry + $4FAD = BellsproutDexEntry + $4FBD = WeepinbellDexEntry + $4FD1 = VictreebelDexEntry + $5024 = PokedexOrder + $5138 = PointerIDs_41138 + $5149 = PointerIDs_41149 + $515F = PointerTable_4115f + $5115 = Func_41102.asm_41115 + $51A1 = LoadTradingGFXAndMonNames + $5245 = Func_41245 + $5298 = Func_41298 + $52D2 = Func_412d2 + $5336 = Func_41336 + $5376 = Func_41376 + $53C6 = Func_413c6 + $5181 = Func_41181 + $55C8 = Func_415c8 + $55FE = PrintTradeWentToText + $5611 = PrintTradeForSendsText + $562D = PrintTradeFarewellText + $564C = PrintTradeTakeCareText + $565A = PrintTradeWillTradeText + $523B = Func_4123b + $55DF = Func_415df + $5217 = Func_41217 + $5196 = Func_41196 + $6769 = Func_42769 + $55A4 = Func_415a4 + $5191 = Delay50 + $5676 = Func_41676 + $54AE = Func_414ae + $5842 = Func_41842 + $5186 = Func_41186 + $532E = UnknownOAM_4132e + $67A7 = Func_427a7 + $5411 = Func_41411 + $5505 = Func_41505 + $542D = Func_4142d + $549F = Func_4149f + $54C5 = Func_414c5 + $545C = Func_4145c + $5525 = Func_41525 + $520B = Func_4120b + $54E8 = Func_414e8 + $5558 = Func_41558 + $553F = Func_41525.asm_4153f + $5510 = Func_41510 + $5574 = OAMPointers_41574 + $5584 = UnknownOAM_41584 + $558C = UnknownOAM_4158c + $5594 = UnknownOAM_41594 + $559C = UnknownOAM_4159c + $560C = TradeWentToText + $5623 = TradeForText + $5628 = TradeSendsText + $5642 = TradeWavesFarewellText + $5647 = TradeTransferredText + $5655 = TradeTakeCareText + $566C = TradeWillTradeText + $5671 = TradeforText + $588A = PlayShootingStar + $569D = PlayIntroScene + $583F = Func_4183f + $57C7 = Func_417c7 + $580E = Func_4180e + $5910 = IntroNidorinoAnimation1 + $5793 = AnimateIntroNidorino + $591B = IntroNidorinoAnimation2 + $5926 = IntroNidorinoAnimation3 + $5931 = IntroNidorinoAnimation4 + $593C = IntroNidorinoAnimation5 + $5947 = IntroNidorinoAnimation6 + $5950 = IntroNidorinoAnimation7 + $57AE = Func_417ae + $5A99 = FightIntroBackMon + $5959 = GameFreakIntro + $6099 = FightIntroFrontMon + $58E9 = Func_418e9 + $5852 = LoadIntroGraphics + $57F8 = Func_417f8 + $57F0 = Func_417f0 + $5807 = Func_41807 + $67E5 = OTString67E5 + $4000 = ShowPokedexMenu + $50F3 = Func_410f3 + $5682 = PlayIntro + $50E2 = Func_410e2 + $42D1 = ShowPokedexData + SLACK: $180D bytes + +Bank #17: + SECTION: $4000-$70AA ($30AB bytes) + $4000 = LavenderTown_h + $4251 = ViridianPokecenter_h + $44D0 = RockTunnel1_h + $4926 = SSAnne3_h + $6309 = SeafoamIslands2_h + $6445 = SeafoamIslands3_h + $6581 = SeafoamIslands4_h + $678D = SeafoamIslands5_h + $42A3 = Mansion1_h + $47DD = SeafoamIslands1_h + $4974 = VictoryRoad3_h + $4BBE = RocketHideout1_h + $4E1B = RocketHideout2_h + $5219 = RocketHideout3_h + $5451 = RocketHideout4_h + $5704 = RocketHideoutElevator_h + $585F = SafariZoneEast_h + $599F = SafariZoneNorth_h + $5BA6 = SafariZoneCenter_h + $5CE1 = SafariZoneRestHouse1_h + $5D1E = SafariZoneRestHouse2_h + $5D69 = SafariZoneRestHouse3_h + $5DB4 = SafariZoneRestHouse4_h + $5DFF = UnknownDungeon2_h + $5EE4 = UnknownDungeon3_h + $5FDF = RockTunnel2_h + $57B4 = SilphCoElevator_h + $4FD7 = LoadSpinnerArrowTiles + $69A0 = Func_469a0 + $4085 = LavenderTownBlocks + $410E = LavenderTownTextPointers + $410B = LavenderTownScript + $402D = LavenderTownObject + $4120 = LavenderTownText1 + $414B = LavenderTownText2 + $4150 = LavenderTownText3 + $4155 = LavenderTownText4 + $415A = LavenderTownText5 + $415F = LavenderTownText8 + $4164 = LavenderTownText9 + $413C = LavenderTownText_4413c + $4146 = LavenderTownText_44146 + $4141 = LavenderTownText_44141 + $41D1 = DexRatingsTable + $41CC = PokedexRatingText_441cc + $4201 = PokedexRatingText_44201 + $4206 = PokedexRatingText_44206 + $420B = PokedexRatingText_4420b + $4210 = PokedexRatingText_44210 + $4215 = PokedexRatingText_44215 + $421A = PokedexRatingText_4421a + $421F = PokedexRatingText_4421f + $4224 = PokedexRatingText_44224 + $4229 = PokedexRatingText_44229 + $422E = PokedexRatingText_4422e + $4233 = PokedexRatingText_44233 + $4238 = PokedexRatingText_44238 + $423D = PokedexRatingText_4423d + $4242 = PokedexRatingText_44242 + $4247 = PokedexRatingText_44247 + $424C = PokedexRatingText_4424c + $40DF = ViridianPokecenterBlocks + $4263 = ViridianPokecenterTextPointers + $425D = ViridianPokeCenterScript + $4277 = ViridianPokecenterObject + $426B = ViridianPokeCenterText1 + $426C = ViridianPokeCenterText2 + $4271 = ViridianPokeCenterText3 + $4276 = ViridianPokeCenterText4 + $43FE = Mansion1Blocks + $432C = Mansion1TextPointers + $42AF = Mansion1Script + $43A4 = Mansion1Object + $42C5 = Mansion1Subscript1 + $4334 = Mansion1TrainerHeaders + $4326 = Mansion1ScriptPointers + $430B = Mansion1Script_4430b + $4304 = Mansion1Script_44304 + $4341 = Mansion1Text1 + $435A = Mansion1Text4 + $434B = Mansion1BattleText2 + $4355 = Mansion1AfterBattleText2 + $4350 = Mansion1EndBattleText2 + $4334 = Mansion1TrainerHeader0 + $4395 = MansionSwitchText + $439A = MansionSwitchPressedText + $439F = MansionSwitchNotPressedText + $4675 = RockTunnel1Blocks + $44F5 = RockTunnel1TextPointers + $44DC = RockTunnel1Script + $45F6 = RockTunnel1Object + $4505 = RockTunnel1TrainerHeaders + $44EF = RockTunnel1ScriptPointers + $455A = RockTunnel1Text1 + $4560 = RockTunnel1Text2 + $4566 = RockTunnel1Text3 + $456C = RockTunnel1Text4 + $4572 = RockTunnel1Text5 + $4578 = RockTunnel1Text6 + $457E = RockTunnel1Text7 + $45F1 = RockTunnel1Text8 + $4588 = RockTunnel1BattleText1 + $4592 = RockTunnel1AfterBattleText1 + $458D = RockTunnel1EndBattleText1 + $4597 = RockTunnel1BattleText2 + $45A1 = RockTunnel1AfterBattleText2 + $459C = RockTunnel1EndBattleText2 + $45A6 = RockTunnel1BattleText3 + $45B0 = RockTunnel1AfterBattleText3 + $45AB = RockTunnel1EndBattleText3 + $45B5 = RockTunnel1BattleText4 + $45BF = RockTunnel1AfterBattleText4 + $45BA = RockTunnel1EndBattleText4 + $45C4 = RockTunnel1BattleText5 + $45CE = RockTunnel1AfterBattleText5 + $45C9 = RockTunnel1EndBattleText5 + $45D3 = RockTunnel1BattleText6 + $45DD = RockTunnel1AfterBattleText6 + $45D8 = RockTunnel1EndBattleText6 + $45E2 = RockTunnel1BattleText7 + $45EC = RockTunnel1AfterBattleText7 + $45E7 = RockTunnel1EndBattleText7 + $4505 = RockTunnel1TrainerHeader1 + $4511 = RockTunnel1TrainerHeader2 + $451D = RockTunnel1TrainerHeader3 + $4529 = RockTunnel1TrainerHeader4 + $4535 = RockTunnel1TrainerHeader5 + $4541 = RockTunnel1TrainerHeader6 + $454D = RockTunnel1TrainerHeader7 + $489F = SeafoamIslands1Blocks + $484B = SeafoamIslands1TextPointers + $47E9 = SeafoamIslands1Script + $484F = SeafoamIslands1Object + $4846 = Seafoam1HolesCoords + $6981 = Func_46981 + $4956 = SSAnne3Blocks + $4935 = SSAnne3TextPointers + $4932 = SSAnne3Script + $493C = SSAnne3Object + $4937 = SSAnne3Text1 + $4B37 = VictoryRoad3Blocks + $4A24 = VictoryRoad3TextPointers + $4980 = VictoryRoad3Script + $4ACD = VictoryRoad3Object + $4996 = VictoryRoad3Script_44996 + $4A38 = VictoryRoad3TrainerHeaders + $49B1 = VictoryRoad3ScriptPointers + $49B7 = VictoryRoad3Script0 + $49FE = VictoryRoad3Script0.asm_449fe + $49F9 = VictoryRoad3Script0.coordsData_449f9 + $4A69 = VictoryRoad3Text1 + $4A73 = VictoryRoad3Text2 + $4A7D = VictoryRoad3Text3 + $4A87 = VictoryRoad3Text4 + $4A91 = VictoryRoad3BattleText2 + $4A9B = VictoryRoad3AfterBattleText2 + $4A96 = VictoryRoad3EndBattleText2 + $4AA0 = VictoryRoad3BattleText3 + $4AAA = VictoryRoad3AfterBattleText3 + $4AA5 = VictoryRoad3EndBattleText3 + $4AAF = VictoryRoad3BattleText4 + $4AB9 = VictoryRoad3AfterBattleText4 + $4AB4 = VictoryRoad3EndBattleText4 + $4ABE = VictoryRoad3BattleText5 + $4AC8 = VictoryRoad3AfterBattleText5 + $4AC3 = VictoryRoad3EndBattleText5 + $4A38 = VictoryRoad3TrainerHeader0 + $4A44 = VictoryRoad3TrainerHeader2 + $4A50 = VictoryRoad3TrainerHeader3 + $4A5C = VictoryRoad3TrainerHeader4 + $4D49 = RocketHideout1Blocks + $4C14 = RocketHideout1TextPointers + $4BCA = RocketHideout1Script + $4CE7 = RocketHideout1Object + $4BE0 = RocketHideout1Script_44be0 + $4C22 = RocketHideout1TrainerHeaders + $4C0E = RocketHideout1ScriptPointers + $4C5F = RocketHideout1Text1 + $4C69 = RocketHideout1Text2 + $4C73 = RocketHideout1Text3 + $4C7D = RocketHideout1Text4 + $4C87 = RocketHideout1Text5 + $4CA1 = RocketHideout1BattleText2 + $4CAB = RocketHideout1AfterBattleTxt2 + $4CA6 = RocketHideout1EndBattleText2 + $4CB0 = RocketHideout1BattleText3 + $4CBA = RocketHideout1AfterBattleTxt3 + $4CB5 = RocketHideout1EndBattleText3 + $4CBF = RocketHideout1BattleText4 + $4CC9 = RocketHideout1AfterBattleTxt4 + $4CC4 = RocketHideout1EndBattleText4 + $4CCE = RocketHideout1BattleText5 + $4CD8 = RocketHideout1AfterBattleTxt5 + $4CD3 = RocketHideout1EndBattleText5 + $4CDD = RocketHideout1BattleText6 + $4CE2 = RocketHideout1AfterBattleTxt6 + $4C91 = RocketHideout1EndBattleText6 + $4C22 = RocketHideout1TrainerHeader0 + $4C2E = RocketHideout1TrainerHeader2 + $4C3A = RocketHideout1TrainerHeader3 + $4C46 = RocketHideout1TrainerHeader4 + $4C52 = RocketHideout1TrainerHeader5 + $4C9F = RocketHideout1Text_44c9f + $5147 = RocketHideout2Blocks + $50C7 = RocketHideout2TextPointers + $4E27 = RocketHideout2Script + $50F7 = RocketHideout2Object + $50D1 = RocketHideout2TrainerHeaders + $4E3A = RocketHideout2ScriptPointers + $4E42 = RocketHideout2Script0 + $4FC2 = RocketHideout2Script3 + $4E6D = RocketHideout2ArrowTilePlayerMovement + $4F1A = RocketHideout2ArrowMovement1 + $4F1D = RocketHideout2ArrowMovement2 + $4F20 = RocketHideout2ArrowMovement3 + $4F25 = RocketHideout2ArrowMovement4 + $4F2C = RocketHideout2ArrowMovement5 + $4F31 = RocketHideout2ArrowMovement6 + $4F36 = RocketHideout2ArrowMovement7 + $4F39 = RocketHideout2ArrowMovement8 + $4F3C = RocketHideout2ArrowMovement9 + $4F3F = RocketHideout2ArrowMovement10 + $4F42 = RocketHideout2ArrowMovement11 + $4F47 = RocketHideout2ArrowMovement12 + $4F4A = RocketHideout2ArrowMovement13 + $4F4D = RocketHideout2ArrowMovement14 + $4F52 = RocketHideout2ArrowMovement15 + $4F57 = RocketHideout2ArrowMovement16 + $4F5C = RocketHideout2ArrowMovement17 + $4F63 = RocketHideout2ArrowMovement18 + $4F6A = RocketHideout2ArrowMovement19 + $4F6F = RocketHideout2ArrowMovement20 + $4F72 = RocketHideout2ArrowMovement21 + $4F77 = RocketHideout2ArrowMovement22 + $4F7C = RocketHideout2ArrowMovement23 + $4F81 = RocketHideout2ArrowMovement24 + $4F86 = RocketHideout2ArrowMovement25 + $4F89 = RocketHideout2ArrowMovement26 + $4F8E = RocketHideout2ArrowMovement27 + $4F93 = RocketHideout2ArrowMovement28 + $4F9C = RocketHideout2ArrowMovement29 + $4FA1 = RocketHideout2ArrowMovement30 + $4FA8 = RocketHideout2ArrowMovement31 + $4FAB = RocketHideout2ArrowMovement32 + $4FAE = RocketHideout2ArrowMovement33 + $4FB1 = RocketHideout2ArrowMovement34 + $4FB4 = RocketHideout2ArrowMovement35 + $4FBB = RocketHideout2ArrowMovement36 + $5083 = SpinnerPlayerFacingDirections + $5023 = FacilitySpinnerArrows + $5053 = GymSpinnerArrows + $5087 = SpinnerArrowAnimTiles + $50DE = RocketHideout2Text1 + $50E8 = RocketHideout2BattleText2 + $50F2 = RocketHideout2AfterBattleTxt2 + $50ED = RocketHideout2EndBattleText2 + $50D1 = RocketHideout2TrainerHeader0 + $537F = RocketHideout3Blocks + $52FA = RocketHideout3TextPointers + $5225 = RocketHideout3Script + $534D = RocketHideout3Object + $5302 = RocketHideout3TrainerHeaders + $5238 = RocketHideout3ScriptPointers + $5240 = RocketHideout3Script0 + $52E4 = RocketHideout3Script3 + $526B = RocketHideout3ArrowTilePlayerMovement + $52CB = RocketHideout3ArrowMovement6 + $52AC = RocketHideout3ArrowMovement1 + $52B3 = RocketHideout3ArrowMovement2 + $52B8 = RocketHideout3ArrowMovement3 + $52BB = RocketHideout3ArrowMovement4 + $52C2 = RocketHideout3ArrowMovement5 + $52CE = RocketHideout3ArrowMovement7 + $52D1 = RocketHideout3ArrowMovement8 + $52D6 = RocketHideout3ArrowMovement9 + $52DB = RocketHideout3ArrowMovement10 + $52DE = RocketHideout3ArrowMovement11 + $52E1 = RocketHideout3ArrowMovement12 + $531B = RocketHideout3Text1 + $5334 = RocketHideout3Text2 + $5325 = RocketHideout3BattleText2 + $532F = RocketHideout3AfterBattleTxt2 + $532A = RocketHideout3EndBattleText2 + $533E = RocketHideout3BattleTxt + $5348 = RocketHideout3AfterBattleText3 + $5343 = RocketHideout3EndBattleText3 + $5302 = RocketHideout3TrainerHeader0 + $530E = RocketHideout3TrainerHeader2 + $5650 = RocketHideout4Blocks + $5501 = RocketHideout4TextPointers + $545D = RocketHideout4Script + $55F1 = RocketHideout4Object + $5473 = RocketHideout4Script_45473 + $5515 = RocketHideout4TrainerHeader0 + $54AE = RocketHideout4ScriptPointers + $54B6 = RocketHideout4Script3 + $54A3 = RocketHideout4Script_454a3 + $553A = RocketHideout4Text1 + $5589 = RocketHideout4Text2 + $55A2 = RocketHideout4Text3 + $55BB = RocketHideout4Text4 + $5584 = RocketHideout4Text10 + $5593 = RocketHideout4BattleText2 + $559D = RocketHideout4AfterBattleText2 + $5598 = RocketHideout4EndBattleText2 + $55AC = RocketHideout4BattleText3 + $55B6 = RocketHideout4AfterBattleText3 + $55B1 = RocketHideout4EndBattleText3 + $55C5 = RocketHideout4BattleText4 + $55CF = RocketHideout4AfterBattleText4 + $55CA = RocketHideout4EndBattleText4 + $5571 = RocketHideout4Text1.asm_545571 + $557A = RocketHideout4Text_4557a + $557F = RocketHideout4Text_4557f + $5521 = RocketHideout4TrainerHeader2 + $552D = RocketHideout4TrainerHeader3 + $55EC = RocketHideout4Text_455ec + $57A8 = RocketHideoutElevatorBlocks + $576B = RocketHideoutElevatorTextPointers + $5710 = RocketHideoutElevatorScript + $5791 = RocketHideoutElevatorObject + $572C = RocketHideoutElevatorScript_4572c + $575F = RocketHideoutElevatorScript_4575f + $573A = RocketHideoutElevatorScript_4573a + $5754 = RocketHideoutElavatorFloors + $5759 = RocketHideoutElevatorWarpMaps + $576D = RocketHideoutElevatorText1 + $5741 = RocketHideoutElevatorScript_45741 + $578B = RocketHideoutElevatorText_4578b + $585B = SilphCoElevatorBlocks + $5833 = SilphCoElevatorTextPointers + $57C0 = SilphCoElevatorScript + $5844 = SilphCoElevatorObject + $57DC = SilphCoElevatorScript_457dc + $5827 = SilphCoElevatorScript_45827 + $57EA = SilphCoElevatorScript_457ea + $5804 = SilphCoElavatorFloors + $5811 = SilphCoElevatorWarpMaps + $5835 = SilphCoElevatorText1 + $57F1 = SilphCoElevatorScript_457f1 + $58DC = SafariZoneEastBlocks + $586E = SafariZoneEastTextPointers + $586B = SafariZoneEastScript + $588B = SafariZoneEastObject + $587C = SafariZoneEastText5 + $5881 = SafariZoneEastText6 + $5886 = SafariZoneEastText7 + $5A3E = SafariZoneNorthBlocks + $59AE = SafariZoneNorthTextPointers + $59AB = SafariZoneNorthScript + $59D5 = SafariZoneNorthObject + $59BC = SafariZoneNorthText3 + $59C1 = SafariZoneNorthText4 + $59C6 = SafariZoneNorthText5 + $59CB = SafariZoneNorthText6 + $59D0 = SafariZoneNorthText7 + $5C1E = SafariZoneCenterBlocks + $5BB5 = SafariZoneCenterTextPointers + $5BB2 = SafariZoneCenterScript + $5BC5 = SafariZoneCenterObject + $5BBB = SafariZoneCenterText2 + $5BC0 = SafariZoneCenterText3 + $40FB = SafariZoneRestHouse1Blocks + $5CF0 = SafariZoneRestHouse1TextPointers + $5CED = SafariZoneRestHouse1Script + $5CFE = SafariZoneRestHouse1Object + $5CF4 = SafariZoneRestHouse1Text1 + $5CF9 = SafariZoneRestHouse1Text2 + $40FB = SafariZoneRestHouse2Blocks + $5D2E = SafariZoneRestHouse2TextPointers + $5D2A = SafariZoneRestHouse2Script + $5D43 = SafariZoneRestHouse2Object + $5D34 = SafariZoneRestHouse2Text1 + $5D39 = SafariZoneRestHouse2Text2 + $5D3E = SafariZoneRestHouse2Text3 + $40FB = SafariZoneRestHouse3Blocks + $5D79 = SafariZoneRestHouse3TextPointers + $5D75 = SafariZoneRestHouse3Script + $5D8E = SafariZoneRestHouse3Object + $5D7F = SafariZoneRestHouse3Text1 + $5D84 = SafariZoneRestHouse3Text2 + $5D89 = SafariZoneRestHouse3Text3 + $40FB = SafariZoneRestHouse4Blocks + $5DC4 = SafariZoneRestHouse4TextPointers + $5DC0 = SafariZoneRestHouse4Script + $5DD9 = SafariZoneRestHouse4Object + $5DCA = SafariZoneRestHouse4Text1 + $5DCF = SafariZoneRestHouse4Text2 + $5DD4 = SafariZoneRestHouse4Text3 + $5E5D = UnknownDungeon2Blocks + $5E0E = UnknownDungeon2TextPointers + $5E0B = UnknownDungeon2Script + $5E14 = UnknownDungeon2Object + $5F58 = UnknownDungeon3Blocks + $5F09 = UnknownDungeon3TextPointers + $5EF0 = UnknownDungeon3Script + $5F36 = UnknownDungeon3Object + $5F0F = UnknownDungeon3TrainerHeaders + $5F03 = UnknownDungeon3ScriptPointers + $5F1C = UnknownDungeon3Text1 + $5F26 = UnknownDungeon3MewtwoText + $5F0F = UnknownDungeon3TrainerHeader0 + $61A1 = RockTunnel2Blocks + $6004 = RockTunnel2TextPointers + $5FEB = RockTunnel2Script + $613D = RockTunnel2Object + $6014 = RockTunnel2TrainerHeaders + $5FFE = RockTunnel2ScriptPointers + $6075 = RockTunnel2Text1 + $607F = RockTunnel2Text2 + $6089 = RockTunnel2Text3 + $6093 = RockTunnel2Text4 + $609D = RockTunnel2Text5 + $60A7 = RockTunnel2Text6 + $60B1 = RockTunnel2Text7 + $60BB = RockTunnel2Text8 + $60C5 = RockTunnel2BattleText2 + $60CF = RockTunnel2AfterBattleText2 + $60CA = RockTunnel2EndBattleText2 + $60D4 = RockTunnel2BattleText3 + $60DE = RockTunnel2AfterBattleText3 + $60D9 = RockTunnel2EndBattleText3 + $60E3 = RockTunnel2BattleText4 + $60ED = RockTunnel2AfterBattleText4 + $60E8 = RockTunnel2EndBattleText4 + $60F2 = RockTunnel2BattleText5 + $60FC = RockTunnel2AfterBattleText5 + $60F7 = RockTunnel2EndBattleText5 + $6101 = RockTunnel2BattleText6 + $610B = RockTunnel2AfterBattleText6 + $6106 = RockTunnel2EndBattleText6 + $6110 = RockTunnel2BattleText7 + $611A = RockTunnel2AfterBattleText7 + $6115 = RockTunnel2EndBattleText7 + $611F = RockTunnel2BattleText8 + $6129 = RockTunnel2AfterBattleText8 + $6124 = RockTunnel2EndBattleText8 + $612E = RockTunnel2BattleText9 + $6138 = RockTunnel2AfterBattleText9 + $6133 = RockTunnel2EndBattleText9 + $6014 = RockTunnel2TrainerHeader0 + $6020 = RockTunnel2TrainerHeader2 + $602C = RockTunnel2TrainerHeader3 + $6038 = RockTunnel2TrainerHeader4 + $6044 = RockTunnel2TrainerHeader5 + $6050 = RockTunnel2TrainerHeader6 + $605C = RockTunnel2TrainerHeader7 + $6068 = RockTunnel2TrainerHeader8 + $63BE = SeafoamIslands2Blocks + $6372 = SeafoamIslands2TextPointers + $6315 = SeafoamIslands2Script + $6376 = SeafoamIslands2Object + $636D = Seafoam2HolesCoords + $64FA = SeafoamIslands3Blocks + $64AE = SeafoamIslands3TextPointers + $6451 = SeafoamIslands3Script + $64B2 = SeafoamIslands3Object + $64A9 = Seafoam3HolesCoords + $6706 = SeafoamIslands4Blocks + $669A = SeafoamIslands4TextPointers + $658D = SeafoamIslands4Script + $66A6 = SeafoamIslands4Object + $65F6 = Seafoam4HolesCoords + $65FB = SeafoamIslands4ScriptPointers + $6603 = SeafoamIslands4Script0 + $6639 = SeafoamIslands4Script1 + $6644 = SeafoamIslands4Script2 + $668F = SeafoamIslands4Script3 + $6632 = RLEMovement46632 + $667F = RLEData_4667f + $6688 = RLEData_46688 + $68FA = SeafoamIslands5Blocks + $687C = SeafoamIslands5TextPointers + $6799 = SeafoamIslands5Script + $68BC = SeafoamIslands5Object + $67AD = SeafoamIslands5ScriptPointers + $67C7 = SeafoamIslands5Script0 + $6807 = SeafoamIslands5Script1 + $6816 = SeafoamIslands5Script2 + $6860 = SeafoamIslands5Script3 + $67B7 = SeafoamIslands5Script4 + $67FE = CoordsData_467fe + $684D = CoordsData_4684d + $6859 = RLEMovementData_46859 + $6852 = RLEMovementData_46852 + $6872 = SeaFoamIslands5Script_46872 + $6893 = SeafoamIslands5Text3 + $68B2 = SeafoamIslands5Text4 + $68B7 = SeafoamIslands5Text5 + $68A2 = SeafoamIslands5BattleText2 + $6886 = SeafoamIslands5TrainerHeader0 + $6A40 = HiddenObjectMaps + $6A96 = HiddenObjectPointers + $6A01 = Func_46a01 + $6B5A = RedsHouse2FHiddenObjects + $6B67 = BluesHouseHiddenObjects + $6B7A = OaksLabHiddenObjects + $6B93 = ViridianPokecenterHiddenObjects + $6BA0 = ViridianMartHiddenObjects + $6BA1 = ViridianSchoolHiddenObjects + $6BAE = ViridianGymHiddenObjects + $6BBB = Museum1FHiddenObjects + $6BC8 = PewterGymHiddenObjects + $6BD5 = PewterMartHiddenObjects + $6BD6 = PewterPokecenterHiddenObjects + $6BE3 = CeruleanPokecenterHiddenObjects + $6BF0 = CeruleanGymHiddenObjects + $6BFD = CeruleanMartHiddenObjects + $6BFE = LavenderPokecenterHiddenObjects + $6C0B = VermilionPokecenterHiddenObjects + $6C18 = VermilionGymHiddenObjects + $6C85 = CeladonMansion2HiddenObjects + $6C8C = CeladonPokecenterHiddenObjects + $6C99 = CeladonGymHiddenObjects + $6CA6 = GameCornerHiddenObjects + $6DC7 = CeladonHotelHiddenObjects + $6DD4 = FuchsiaPokecenterHiddenObjects + $6DE1 = FuchsiaGymHiddenObjects + $6DEE = CinnabarGymHiddenObjects + $6E19 = CinnabarPokecenterHiddenObjects + $6E26 = SaffronGymHiddenObjects + $6E2D = MtMoonPokecenterHiddenObjects + $6E3A = RockTunnelPokecenterHiddenObjects + $6B40 = BattleCenterHiddenObjects + $6B4D = TradeCenterHiddenObjects + $6E47 = ViridianForestHiddenObjects + $6E54 = MtMoon3HiddenObjects + $6E61 = IndigoPlateauHiddenObjects + $6E6E = Route25HiddenObjects + $6E7B = Route9HiddenObjects + $6E82 = SSAnne6HiddenObjects + $6E95 = SSAnne10HiddenObjects + $6EA9 = RocketHideout1HiddenObjects + $6EB0 = RocketHideout3HiddenObjects + $6EB7 = RocketHideout4HiddenObjects + $6EBE = SaffronPokecenterHiddenObjects + $6ECB = PokemonTower5HiddenObjects + $6ED2 = Route13HiddenObjects + $6EDF = SafariZoneEntranceHiddenObjects + $6EE6 = SafariZoneWestHiddenObjects + $6EED = SilphCo5FHiddenObjects + $6EF4 = SilphCo9FHiddenObjects + $6EFB = CopycatsHouse2FHiddenObjects + $6F02 = UnknownDungeon1HiddenObjects + $6F09 = UnknownDungeon3HiddenObjects + $6F10 = PowerPlantHiddenObjects + $6F1D = SeafoamIslands3HiddenObjects + $6F24 = SeafoamIslands5HiddenObjects + $6F2B = Mansion1HiddenObjects + $6F3F = Mansion3HiddenObjects + $6F5F = Route23HiddenObjects + $6F72 = VictoryRoad2HiddenObjects + $6F7F = Unused6FHiddenObjects + $6F86 = BillsHouseHiddenObjects + $6F8D = ViridianCityHiddenObjects + $6F94 = SafariZoneRestHouse2HiddenObjects + $6FA1 = SafariZoneRestHouse3HiddenObjects + $6FAE = SafariZoneRestHouse4HiddenObjects + $6FBB = Route15GateUpstairsHiddenObjects + $6FC2 = LavenderHouse1HiddenObjects + $6FD5 = CeladonMansion5HiddenObjects + $6FE8 = FightingDojoHiddenObjects + $6E9C = Route10HiddenObjects + $7001 = IndigoPlateauLobbyHiddenObjects + $7008 = CinnabarLab4HiddenObjects + $7015 = BikeShopHiddenObjects + $703A = Route11HiddenObjects + $7041 = Route12HiddenObjects + $6F38 = Mansion2HiddenObjects + $6F4C = Mansion4HiddenObjects + $7048 = SilphCo11FHiddenObjects + $704F = Route17HiddenObjects + $706E = UndergroundPathNsHiddenObjects + $707B = UndergroundPathWeHiddenObjects + $7088 = CeladonCityHiddenObjects + $708F = SeafoamIslands4HiddenObjects + $7096 = VermilionCityHiddenObjects + $709D = CeruleanCityHiddenObjects + $70A4 = Route4HiddenObjects + $4316 = Mansion1Script_Switches + $4169 = DisplayDexRating + SLACK: $0F55 bytes + +Bank #18: + SECTION: $4000-$638E ($238F bytes) + $4000 = Route7_h + $415C = RedsHouse1F_h + $59BC = MtMoon1_h + $5CFF = MtMoon3_h + $52C3 = MtMoonPokecenter_h + $53AE = RockTunnelPokecenter_h + $5400 = Route11Gate_h + $5448 = Route11GateUpstairs_h + $54F8 = Route12Gate_h + $4219 = CeladonMart3_h + $434A = CeladonMart4_h + $43C9 = CeladonMartRoof_h + $45F4 = CeladonMartElevator_h + $4688 = CeladonMansion1_h + $472E = CeladonMansion2_h + $4784 = CeladonMansion3_h + $485F = CeladonMansion4_h + $48AC = CeladonPokecenter_h + $48FE = CeladonGym_h + $4BB1 = CeladonGameCorner_h + $505D = CeladonMart5_h + $50E4 = CeladonPrizeRoom_h + $5145 = CeladonDiner_h + $5202 = CeladonHouse_h + $525D = CeladonHotel_h + $55F6 = Route15Gate_h + $563E = Route15GateUpstairs_h + $56B2 = Route16Gate_h + $57FF = Route16GateUpstairs_h + $586A = Route18Gate_h + $5969 = Route18GateUpstairs_h + $5554 = Route12GateUpstairs_h + $61A9 = SafariZoneWest_h + $630B = SafariZoneSecretHouse_h + $4051 = Route7Blocks + $4155 = Route7TextPointers + $4152 = Route7Script + $4022 = Route7Object + $4119 = Func_48119 + $413F = Func_4813f + $4157 = Route7Text1 + $4209 = RedsHouse1FBlocks + $416B = RedsHouse1FTextPointers + $4168 = RedsHouse1FScript + $41E4 = RedsHouse1FObject + $416F = RedsHouse1FText1 + $41C6 = RedsHouse1FText2 + $4185 = MomWakeUpText + $418A = MomHealPokemon + $41BC = MomHealText1 + $41C1 = MomHealText2 + $41DF = TVWrongSideText + $41DA = StandByMeText + $4322 = CeladonMart3Blocks + $4228 = CeladonMart3TextPointers + $4225 = CeladonMart3Script + $42C4 = CeladonMart3Object + $424A = CeladonMart3Text1 + $428D = CeladonMart3Text2 + $4292 = CeladonMart3Text3 + $4297 = CeladonMart3Text4 + $429C = CeladonMart3Text5 + $42A1 = CeladonMart3Text6 + $42A6 = CeladonMart3Text7 + $42A1 = CeladonMart3Text8 + $42AB = CeladonMart3Text9 + $42A1 = CeladonMart3Text10 + $42B0 = CeladonMart3Text11 + $42A1 = CeladonMart3Text12 + $42B5 = CeladonMart3Text13 + $42BA = CeladonMart3Text14 + $42BF = CeladonMart3Text15 + $42BF = CeladonMart3Text16 + $42BF = CeladonMart3Text17 + $4278 = TM18PreReceiveText + $427D = ReceivedTM18Text + $4288 = TM18NoRoomText + $4283 = TM18ExplanationText + $43A1 = CeladonMart4Blocks + $4359 = CeladonMart4TextPointers + $4356 = CeladonMart4Script + $4370 = CeladonMart4Object + $4361 = CeladonMart4Text2 + $4366 = CeladonMart4Text3 + $436B = CeladonMart4Text4 + $45CC = CeladonMartRoofBlocks + $455B = CeladonMartRoofTextPointers + $43D5 = CeladonMartRoofScript + $45A8 = CeladonMartRoofObject + $4408 = CeladonMartRoofDrinkList + $44EE = CeladonMartRoofText_484ee + $4532 = CeladonMartRoofScript_48532 + $4515 = CeladonMartRoofText_48515 + $44E6 = RemoveItemByIDBank12 + $451B = ReceivedTM49Text + $4504 = CeladonMartRoofText_48504 + $450A = CeladonMartRoofText_4850a + $44F3 = CeladonMartRoofText_484f3 + $44F9 = CeladonMartRoofText_484f9 + $4526 = CeladonMartRoofText_48526 + $452C = CeladonMartRoofText_4852c + $4567 = CeladonMartRoofText1 + $456C = CeladonMartRoofText2 + $45A2 = CeladonMartRoofText5 + $45A3 = CeladonMartRoofText6 + $43D8 = CeladonMartRoofScript_483d8 + $459D = CeladonMartRoofText4 + $440C = CeladonMartRoofScript_4840c + $4598 = CeladonMartRoofText3 + $4684 = CeladonMartElevatorBlocks + $465C = CeladonMartElevatorTextPointers + $4600 = CeladonMartElevatorScript + $466D = CeladonMartElevatorObject + $461C = CeladonMartElevatorScript_4861c + $4654 = CeladonMartElevatorScript_48654 + $462A = CeladonMartElevatorScript_4862a + $4643 = CeladonMartElavatorFloors + $464A = CeldaonMartElevatorWarpMaps + $465E = CeladonMartElevatorText1 + $4631 = CeladonMartElevatorScript_48631 + $4716 = CeladonMansion1Blocks + $4697 = CeladonMansion1TextPointers + $4694 = CeladonMansion1Script + $46CF = CeladonMansion1Object + $46A7 = CeladonMansion1Text1 + $46B1 = CeladonMansion1Text2 + $46B6 = CeladonMansion1Text3 + $46C0 = CeladonMansion1Text4 + $46CA = CeladonMansion1Text5 + $46A1 = CeladonMansion1_486a1 + $476C = CeladonMansion2Blocks + $473E = CeladonMansion2TextPointers + $473A = CeladonMansion2Script + $4745 = CeladonMansion2Object + $4740 = CeladonMansion2Text1 + $4847 = CeladonMansion3Blocks + $4793 = CeladonMansion3TextPointers + $4790 = CeladonMansion3Script + $47FF = CeladonMansion3Object + $47A3 = ProgrammerText + $47A8 = GraphicArtistText + $47AD = WriterText + $47B2 = DirectorText + $47EB = GameFreakPCText1 + $47F0 = GameFreakPCText2 + $47F5 = GameFreakPCText3 + $47FA = GameFreakSignText + $47D0 = DirectorText.GameDesigner + $47D5 = DirectorText.CompletedDexText + $4894 = CeladonMansion4Blocks + $486E = CeladonMansion4TextPointers + $486B = CeladonMansion4Script + $4875 = CeladonMansion4Object + $4870 = CeladonMansion4Text1 + $40AB = CeladonPokecenterBlocks + $48BE = CeladonPokecenterTextPointers + $48B8 = CeladonPokecenterScript + $48D2 = CeladonPokecenterObject + $48C7 = CeladonPokecenterText1 + $48C8 = CeladonPokecenterText2 + $48CD = CeladonPokecenterText3 + $48C6 = CeladonPokecenterText4 + $4B84 = CeladonGymBlocks + $49A6 = CeladonGymTextPointers + $490A = CeladonGymScript + $4B30 = CeladonGymObject + $4927 = CeladonGymScript_48927 + $49BC = CeladonGymTrainerHeaders + $494E = CeladonGymScriptPointers + $4930 = Gym4CityName + $493D = Gym4LeaderName + $4956 = CeladonGymScript3 + $4943 = CeladonGymText_48943 + $4A11 = CeladonGymText1 + $4A81 = CeladonGymText2 + $4A9A = CeladonGymText3 + $4AB3 = CeladonGymText4 + $4ACC = CeladonGymText5 + $4AE5 = CeladonGymText6 + $4AFE = CeladonGymText7 + $4B17 = CeladonGymText8 + $4A6D = CeladonGymText9 + $4A72 = TM21Text + $4A7C = TM21NoRoomText + $4A8B = CeladonGymBattleText2 + $4A95 = CeladonGymAfterBattleText2 + $4A90 = CeladonGymEndBattleText2 + $4AA4 = CeladonGymBattleText3 + $4AAE = CeladonGymAfterBattleText3 + $4AA9 = CeladonGymEndBattleText3 + $4ABD = CeladonGymBattleText4 + $4AC7 = CeladonGymAfterBattleText4 + $4AC2 = CeladonGymEndBattleText4 + $4AD6 = CeladonGymBattleText5 + $4AE0 = CeladonGymAfterBattleText5 + $4ADB = CeladonGymEndBattleText5 + $4AEF = CeladonGymBattleText6 + $4AF9 = CeladonGymAfterBattleText6 + $4AF4 = CeladonGymEndBattleText6 + $4B08 = CeladonGymBattleText7 + $4B12 = CeladonGymAfterBattleText7 + $4B0D = CeladonGymEndBattleText7 + $4B21 = CeladonGymBattleText8 + $4B2B = CeladonGymAfterBattleText8 + $4B26 = CeladonGymEndBattleText8 + $4963 = CeladonGymText_48963 + $4A68 = CeladonGymText_48a68 + $4A5E = CeladonGymText_48a5e + $4A63 = CeladonGymText_48a63 + $49BC = CeladonGymTrainerHeader0 + $49C8 = CeladonGymTrainerHeader2 + $49D4 = CeladonGymTrainerHeader3 + $49E0 = CeladonGymTrainerHeader4 + $49EC = CeladonGymTrainerHeader5 + $49F8 = CeladonGymTrainerHeader6 + $4A04 = CeladonGymTrainerHeader7 + $5003 = CeladonGameCornerBlocks + $4C8A = CeladonGameCornerTextPointers + $4BBD = CeladonGameCornerScript + $4FA0 = CeladonGameCornerObject + $4BCF = CeladonGameCornerScript_48bcf + $4BEC = CeladonGameCornerScript_48bec + $4C12 = CeladonGameCornerScriptPointers + $4C18 = CeladonGameCornerScript0 + $4C19 = CeladonGameCornerScript1 + $4C69 = CeladonGameCornerScript2 + $4C07 = CeladonGameCornerScript_48c07 + $4C5A = MovementData_48c5a + $4C63 = MovementData_48c63 + $4CA4 = CeladonGameCornerText1 + $4CA9 = CeladonGameCornerText2 + $4D40 = CeladonGameCornerText3 + $4D45 = CeladonGameCornerText4 + $4D4A = CeladonGameCornerText5 + $4DB1 = CeladonGameCornerText6 + $4DB6 = CeladonGameCornerText7 + $4DD4 = CeladonGameCornerText8 + $4DD9 = CeladonGameCornerText9 + $4E3B = CeladonGameCornerText10 + $4E9D = CeladonGameCornerText11 + $4EDD = CeladonGameCornerText12 + $4ED8 = CeladonGameCornerText13 + $4F1E = CeladonGameCornerScript_48f1e + $4D22 = CeladonGameCornerText_48d22 + $4F95 = Has9990Coins + $4D31 = CeladonGameCornerText_48d31 + $4D27 = CeladonGameCornerText_48d27 + $4D2C = CeladonGameCornerText_48d2c + $4D36 = CeladonGameCornerText_48d36 + $4D3B = CeladonGameCornerText_48d3b + $4D9C = CeladonGameCornerText_48d9c + $4DA1 = Received10CoinsText + $4DAC = CeladonGameCornerText_48dac + $4DA7 = CeladonGameCornerText_48da7 + $4F19 = CeladonGameCornerText_48f19 + $4DCA = CeladonGameCornerText_48dca + $4DCF = CeladonGameCornerText_48dcf + $4E26 = CeladonGameCornerText_48e26 + $4E2B = Received20CoinsText + $4E36 = CeladonGameCornerText_48e36 + $4E31 = CeladonGameCornerText_48e31 + $4E88 = CeladonGameCornerText_48e88 + $4E8D = CeladonGameCornerText_48e8d + $4E98 = CeladonGameCornerText_48e98 + $4E93 = CeladonGameCornerText_48e93 + $4ECE = CeladonGameCornerText_48ece + $4ED3 = CeladonGameCornerText_48ed3 + $4F09 = CeladonGameCornerText_48f09 + $4F7A = GameCornerMoneyText + $4F85 = GameCornerBlankText1 + $4F80 = GameCornerCoinText + $4F8D = GameCornerBlankText2 + $50BC = CeladonMart5Blocks + $506C = CeladonMart5TextPointers + $5069 = CeladonMart5Script + $5085 = CeladonMart5Object + $5076 = CeladonMart5Text1 + $507B = CeladonMart5Text2 + $5080 = CeladonMart5Text5 + $5131 = CeladonPrizeRoomBlocks + $50F3 = CeladonPrizeRoomTextPointers + $50F0 = CeladonPrizeRoomScript + $5108 = CeladonPrizeRoomObject + $50FD = CeladonPrizeRoomText1 + $5102 = CeladonPrizeRoomText2 + $5107 = CeladonPrizeRoomText3 + $51EE = CeladonDinerBlocks + $5155 = CeladonDinerTextPointers + $5151 = CeladonDinerScript + $51BC = CeladonDinerObject + $515F = CeladonDinerText1 + $5164 = CeladonDinerText2 + $5169 = CeladonDinerText3 + $516E = CeladonDinerText4 + $5173 = CeladonDinerText5 + $51A7 = CeladonDinerText_491a7 + $51AC = ReceivedCoinCaseText + $51B2 = CoinCaseNoRoomText + $51B7 = CeladonDinerText_491b7 + $524D = CeladonHouseBlocks + $5212 = CeladonHouseTextPointers + $520E = CeladonHouseScript + $5227 = CeladonHouseObject + $5218 = CeladonHouseText1 + $521D = CeladonHouseText2 + $5222 = CeladonHouseText3 + $52A7 = CeladonHotelBlocks + $526C = CeladonHotelTextPointers + $5269 = CeladonHotelScript + $5281 = CeladonHotelObject + $5272 = CeladonHotelText1 + $5277 = CeladonHotelText2 + $527C = CeladonHotelText3 + $40AB = MtMoonPokecenterBlocks + $52D5 = MtMoonPokecenterTextPointers + $52CF = MtMoonPokecenterScript + $5376 = MtMoonPokecenterObject + $52E1 = MtMoonPokecenterText1 + $52E2 = MtMoonPokecenterText2 + $52E7 = MtMoonPokecenterText3 + $52EC = MtMoonPokecenterText4 + $5370 = MtMoonPokecenterText5 + $5375 = MtMoonPokecenterText6 + $5353 = MtMoonPokecenterText4.asm_49353 + $535C = MtMoonPokecenterText_4935c + $534E = MtMoonPokecenterText4.asm_4934e + $5366 = MtMoonPokecenterText_49366 + $5361 = MtMoonPokecenterText_49361 + $536B = MtMoonPokecenterText_4936b + $40AB = RockTunnelPokecenterBlocks + $53C0 = RockTunnelPokecenterTextPointers + $53BA = RockTunnelPokecenterScript + $53D4 = RockTunnelPokecenterObject + $53C8 = RockTunnelPokecenterText1 + $53C9 = RockTunnelPokecenterText2 + $53CE = RockTunnelPokecenterText3 + $53D3 = RockTunnelPokecenterText4 + $40C7 = Route11GateBlocks + $540F = Route11GateTextPointers + $540C = Route11GateScript + $5416 = Route11GateObject + $5411 = Route11GateText1 + $40DB = Route11GateUpstairsBlocks + $5457 = Route11GateUpstairsTextPointers + $5454 = Route11GateUpstairsScript + $54DA = Route11GateUpstairsObject + $545F = Route11GateUpstairsText1 + $546C = Route11GateUpstairsText2 + $54A8 = Route11GateUpstairsText3 + $54CE = Route11GateUpstairsText4 + $54A3 = Route11GateUpstairsText_494a3 + $55C9 = Route12GateUpstairsScript_495c9 + $54C4 = BinocularsSnorlaxText + $54C9 = BinocularsNoSnorlaxText + $54D5 = Route11GateUpstairsText_494d5 + $5540 = Route12GateBlocks + $5507 = Route12GateTextPointers + $5504 = Route12GateScript + $550E = Route12GateObject + $5509 = Route12GateText1 + $40DB = Route12GateUpstairsBlocks + $5563 = Route12GateUpstairsTextPointers + $5560 = Route12GateUpstairsScript + $55DE = Route12GateUpstairsObject + $5569 = Route12GateUpstairsText1 + $55B1 = Route12GateUpstairsText2 + $55BD = Route12GateUpstairsText3 + $559C = TM39PreReceiveText + $55A1 = ReceivedTM39Text + $55AC = TM39NoRoomText + $55A7 = TM39ExplanationText + $55B8 = Route12GateUpstairsText_495b8 + $55C4 = Route12GateUpstairsText_495c4 + $40C7 = Route15GateBlocks + $5605 = Route15GateTextPointers + $5602 = Route15GateScript + $560C = Route15GateObject + $5607 = Route15GateText1 + $40DB = Route15GateUpstairsBlocks + $564D = Route15GateUpstairsTextPointers + $564A = Route15GateUpstairsScript + $569D = Route15GateUpstairsObject + $5651 = Route15GateUpstairsText1 + $5691 = Route15GateUpstairsText2 + $568C = Route15GateUpstairsText_4968c + $5698 = Route15GateUpstairsText_49698 + $57E3 = Route16GateBlocks + $575A = Route16GateTextPointers + $56BE = Route16GateScript + $578B = Route16GateObject + $56CF = Route16GateScriptPointers + $56D7 = Route16GateScript0 + $571D = Route16GateScript1 + $5727 = Route16GateScript2 + $5741 = Route16GateScript3 + $5755 = Route16GateScript_49755 + $5714 = CoordsData_49714 + $5760 = Route16GateText1 + $5786 = Route16GateText2 + $5781 = Route16GateText3 + $577C = Route16GateText_4977c + $5777 = Route16GateText_49777 + $40DB = Route16GateUpstairsBlocks + $580E = Route16GateUpstairsTextPointers + $580B = Route16GateUpstairsScript + $584C = Route16GateUpstairsObject + $5816 = Route16GateUpstairsText1 + $5825 = Route16GateUpstairsText2 + $5834 = Route16GateUpstairsText3 + $5840 = Route16GateUpstairsText4 + $5820 = Route16GateUpstairsText_49820 + $582F = Route16GateUpstairsText_4982f + $583B = Route16GateUpstairsText_4983b + $5847 = Route16GateUpstairsText_49847 + $40C7 = Route18GateBlocks + $590D = Route18GateTextPointers + $5876 = Route18GateScript + $5937 = Route18GateObject + $5887 = Route18GateScriptPointers + $588F = Route18GateScript0 + $58D5 = Route18GateScript1 + $58DF = Route18GateScript2 + $58F9 = Route18GateScript3 + $58CC = CoordsData_498cc + $5911 = Route18GateText1 + $5932 = Route18GateText2 + $592D = Route18GateText_4992d + $5928 = Route18GateText_49928 + $40DB = Route18GateUpstairsBlocks + $5978 = Route18GateUpstairsTextPointers + $5975 = Route18GateUpstairsScript + $59A4 = Route18GateUpstairsObject + $597E = Route18GateUpstairsText1 + $598C = Route18GateUpstairsText2 + $5998 = Route18GateUpstairsText3 + $5993 = Route18GateUpstairsText_49993 + $599F = Route18GateUpstairsText_4999f + $5B97 = MtMoon1Blocks + $59E1 = MtMoon1TextPointers + $59C8 = MtMoon1Script + $5B06 = MtMoon1Object + $59FD = MtMoon1TrainerHeader0 + $59DB = MtMoon1ScriptPointers + $5A52 = MtMoon1Text1 + $5A5C = MtMoon1Text2 + $5A66 = MtMoon1Text3 + $5A70 = MtMoon1Text4 + $5A7A = MtMoon1Text5 + $5A84 = MtMoon1Text6 + $5A8E = MtMoon1Text7 + $5B01 = MtMoon1Text14 + $5A98 = MtMoon1BattleText2 + $5AA2 = MtMoon1AfterBattleText2 + $5A9D = MtMoon1EndBattleText2 + $5AA7 = MtMoon1BattleText3 + $5AB1 = MtMoon1AfterBattleText3 + $5AAC = MtMoon1EndBattleText3 + $5AB6 = MtMoon1BattleText4 + $5AC0 = MtMoon1AfterBattleText4 + $5ABB = MtMoon1EndBattleText4 + $5AC5 = MtMoon1BattleText5 + $5ACF = MtMoon1AfterBattleText5 + $5ACA = MtMoon1EndBattleText5 + $5AD4 = MtMoon1BattleText6 + $5ADE = MtMoon1AfterBattleText6 + $5AD9 = MtMoon1EndBattleText6 + $5AE3 = MtMoon1BattleText7 + $5AED = MtMoon1AfterBattleText7 + $5AE8 = MtMoon1EndBattleText7 + $5AF2 = MtMoon1BattleText8 + $5AFC = MtMoon1AfterBattleText8 + $5AF7 = MtMoon1EndBattleText8 + $5A09 = MtMoon1TrainerHeader2 + $5A15 = MtMoon1TrainerHeader3 + $5A21 = MtMoon1TrainerHeader4 + $5A2D = MtMoon1TrainerHeader5 + $5A39 = MtMoon1TrainerHeader6 + $5A45 = MtMoon1TrainerHeader7 + $6041 = MtMoon3Blocks + $5E34 = MtMoon3TextPointers + $5D0B = MtMoon3Script + $5FDB = MtMoon3Object + $5E48 = MtMoon3TrainerHeader0 + $5D63 = MtMoon3ScriptPointers + $5D37 = CoordsData_49d37 + $5D6F = MtMoon3Script0 + $5D9A = MtMoon3Script3 + $5DBA = MtMoon3Script4 + $5DFB = MtMoon3Script5 + $5D91 = MtMoon3Script_49d91 + $5D58 = MtMoon3Script_49d58 + $5DEA = CoordsData_49dea + $5DF1 = CoordsData_49df1 + $5DF9 = MovementData_49df9 + $5DF8 = MovementData_49df8 + $5E79 = MtMoon3Text1 + $5EC1 = MtMoon3Text2 + $5ECB = MtMoon3Text3 + $5ED5 = MtMoon3Text4 + $5EDF = MtMoon3Text5 + $5EE9 = MtMoon3Text6 + $5F29 = MtMoon3Text7 + $5F99 = MtMoon3Text_49f99 + $5F9F = MtMoon3BattleText2 + $5FA9 = MtMoon3AfterBattleText2 + $5FA4 = MtMoon3EndBattleText2 + $5FAE = MtMoon3BattleText3 + $5FB8 = MtMoon3AfterBattleText3 + $5FB3 = MtMoon3EndBattleText3 + $5FBD = MtMoon3BattleText4 + $5FC7 = MtMoon3AfterBattleText4 + $5FC2 = MtMoon3EndBattleText4 + $5FCC = MtMoon3BattleText5 + $5FD6 = MtMoon3AfterBattleText5 + $5FD1 = MtMoon3EndBattleText5 + $5F8F = MtMoon3Text_49f8f + $5F85 = MtMoon3Text_49f85 + $5F8A = MtMoon3Text_49f8a + $5F94 = MtMoon3Text_49f94 + $5E54 = MtMoon3TrainerHeader2 + $5E60 = MtMoon3TrainerHeader3 + $5E6C = MtMoon3TrainerHeader4 + $5F24 = MtMoon3Text_49f24 + $5F76 = MtMoon3Script_49f76 + $5F69 = MtMoon3Script_49f69 + $5F64 = MtMoon3Text_49f64 + $5F6F = MtMoon3Text_49f6f + $5F7F = MtMoon3Text_49f7f + $6248 = SafariZoneWestBlocks + $61B8 = SafariZoneWestTextPointers + $61B5 = SafariZoneWestScript + $61DC = SafariZoneWestObject + $61C8 = SafariZoneWestText5 + $61CD = SafariZoneWestText6 + $61D2 = SafariZoneWestText7 + $61D7 = SafariZoneWestText8 + $637F = SafariZoneSecretHouseBlocks + $631A = SafariZoneSecretHouseTextPointers + $6317 = SafariZoneSecretHouseScript + $6365 = SafariZoneSecretHouseObject + $631C = SafariZoneSecretHouseText1 + $6350 = SafariZoneSecretHouseText_4a350 + $6355 = ReceivedHM03Text + $6360 = HM03NoRoomText + $635B = HM03ExplanationText + $40EB = Func_480eb + $40FF = Func_480ff + $4125 = Func_48125 + SLACK: $1C71 bytes + +Bank #19: + SECTION: $4000-$7FA1 ($3FA2 bytes) + $7D04 = BattleCenterM_h + $7D71 = TradeCenterM_h + $7F18 = Func_c586Predef + $7E79 = PredefPointers + $7F6F = LoadSAVPredef + $7EB2 = Func_c69cPredef + $7EC4 = Func_c754Predef + $7F27 = IndexToPokedexPredef + $7F39 = LoadSGBPredef + $7F0F = PlayIntroPredef + $7F8D = PickupItemPredef + $7E9A = AddBCDPredefPredef + $7EA0 = DivideBCDPredef3Predef + $7EA9 = FlagActionPredefPredef + $7F5D = EmotionBubblePredef + $7EAC = HideObjectPredef + $7F24 = TrainerEngagePredef + $7ECD = IsItemInBag_Predef + $7F00 = Func_5a5fPredef + $7F48 = Func_71ddfPredef + $7DA5 = _GivePokemon + $7E49 = GetPredefPointer + $7E8E = HealPartyPredef + $7EFD = InitOpponentPredef + $7EAF = IsObjectHiddenPredef + $7F1B = StatusScreenPredef + $7F1E = StatusScreen2Predef + $7F21 = Func_410e2Predef + $7F06 = Func_410f3Predef + $7F69 = SaveSAVtoSRAM2Predef + $7F60 = Func_5aafPredef + $7EC1 = InitPlayerData2Predef + $615F = ProfOakPic + $6049 = Rival1Pic + $7E7C = Func_3f0c6Predef + $7E9D = SubBCDPredefPredef + $7F51 = UpdateHPBar2Predef + $7E79 = Func_3cd60Predef + $7F54 = Func_3cdecPredef + $7F30 = ShowPokedexDataPredef + $7ED6 = Func_480ebPredef + $7EB5 = AnyPartyAlivePredef + $7E91 = MoveAnimationPredef + $7EF4 = ShowPokedexMenuPredef + $7EF1 = Func_3ed02Predef + $7EC7 = Func_3af5bPredef + $7F45 = TMToMovePredef + $7F42 = CanLearnTMPredef + $7ECA = LearnMovePredef + $7F93 = LoadMovePPsPredef + $7F63 = AskNamePredef + $7F87 = Func_c60bPredef + $7F33 = WriteMonMovesPredef + $7EEB = HPBarLengthPredef + $7F96 = DrawHPPredef + $7F5A = Func_27d6bPredef + $7F99 = Func_128f6Predef + $7F2D = UsedCutPredef + $7F8A = PrintStrengthTxtPredef + $7F03 = DrawBadgesPredef + $7F2A = Predef3BPredef + $7F36 = SaveSAVPredef + $7EF7 = Func_3ad1cPredef + $7EB8 = ShowObjectPredef + $7EDF = Func_f929Predef + $7ED9 = Func_f8baPredef + $7F75 = Predef54Predef + $7EBE = Func_ee9ePredef + $7EE2 = Func_f9a0Predef + $7F66 = PewterGuysPredef + $7F4B = StarterDexPredef + $7F7B = DisplayDexRatingPredef + $4000 = YoungsterPic + $40C6 = BugCatcherPic + $4200 = LassPic + $42DB = SailorPic + $4450 = JrTrainerMPic + $4588 = JrTrainerFPic + $46C9 = PokemaniacPic + $47F1 = SuperNerdPic + $48E7 = HikerPic + $4ABE = BikerPic + $4C91 = BurglarPic + $4E0A = EngineerPic + $597D = JugglerPic + $4F87 = FisherPic + $5133 = SwimmerPic + $524F = CueBallPic + $5421 = GamblerPic + $55DF = BeautyPic + $5728 = PsychicPic + $5843 = RockerPic + $5B4E = TamerPic + $5CDB = BirdKeeperPic + $5E76 = BlackbeltPic + $627D = ChiefPic + $627D = ScientistPic + $63BE = GiovanniPic + $649F = RocketPic + $6635 = CooltrainerMPic + $67BE = CooltrainerFPic + $6943 = BrunoPic + $6B3E = BrockPic + $6C40 = MistyPic + $6D30 = LtSurgePic + $6EB5 = ErikaPic + $6FD6 = KogaPic + $7150 = BlainePic + $7252 = SabrinaPic + $73D0 = GentlemanPic + $74CF = Rival2Pic + $7623 = Rival3Pic + $7779 = LoreleiPic + $78A4 = ChannelerPic + $7A71 = AgathaPic + $7BA2 = LancePic + $7F3F = SetPartyMonTypesPredef + $7E7F = Func_3f073Predef + $7E85 = LoadMonBackPicPredef + $7E88 = Func_79abaPredef + $7F90 = Func_27d98Predef + $7EE5 = Func_48125Predef + $7F09 = BattleTransitionPredef + $7E82 = ScaleSpriteByTwoPredef + $4000 = TrainerPics + $7F57 = LoadTownMap_NestPredef + $7F0C = Func_79ddaPredef + $7F12 = Func_79869Predef + $7F9C = Func_1c9c6Predef + $7F9F = OaksAideScriptPredef + $7D5D = BattleCenterMBlocks + $7D4C = BattleCenterMTextPointers + $7D10 = BattleCenterMScript + $7D53 = BattleCenterMObject + $7D4E = BattleCenterMText1 + $7D91 = TradeCenterMBlocks + $7D80 = TradeCenterMTextPointers + $7D7D = TradeCenterMScript + $7D87 = TradeCenterMObject + $7D82 = TradeCenterMText1 + $7E11 = SetPokedexOwnedFlag + $7E3F = SetToBoxText + $7E44 = BoxIsFullText + $7E39 = GotMonText + $7EEE = Func_5ab0Predef + $7F78 = HallOfFamePCPredef + $7EDC = Func_480ffPredef + $7E97 = DivideBCDPredef2Predef + $7EA3 = DivideBCDPredef4Predef + $7F6C = LoadSAVCheckSum2Predef + $7F15 = FlashScreenPredef + $7E94 = DivideBCDPredefPredef + $7F3C = Func_f113Predef + $7E8B = Func_f132Predef + $7EA6 = InitPlayerDataPredef + $7EE8 = UpdateHPBarPredef + $7F4E = _AddPartyMonPredef + $7F84 = Func_c5bePredef + $7EBB = ShowObject2Predef + $7EFA = SaveSAVtoSRAM0Predef + $7F72 = SaveSAVtoSRAM1Predef + SLACK: $005E bytes + +Bank #20: + SECTION: $4000-$6A41 ($2A42 bytes) + $491E = IndigoPlateau_h + $49A4 = SaffronCity_h + $40F1 = Route20_h + $4000 = Route22_h + $433F = Route23_h + $4682 = Route24_h + $479B = Route25_h + $5A36 = MtMoon2_h + $5791 = VictoryRoad2_h + $5B55 = SilphCo7_h + $5FCC = Mansion2_h + $61E2 = Mansion3_h + $63AD = Mansion4_h + $671B = CeladonPrizeMenu + $66EE = CardKeySuccessText + $66F8 = CardKeyFailText + $69AA = ViridianSchoolNotebook + $6A3D = IndigoPlateauHQText + $69A4 = TMNotebook + $6A2A = FightingDojoText + $6A10 = FightingDojoText_52a10 + $6A1D = FightingDojoText_52a1d + $6673 = PrintCardKeyText + $403D = Route22Blocks + $46E7 = Route24Blocks + $417D = Route20Blocks + $65AF = Func_525af + $6601 = ParalyzeEffect_ + $6996 = PrintNotebookText + $6A2F = PrintIndigoPlateauHQText + $6037 = Mansion2Script_Switches + $627A = Mansion3Script_Switches + $6420 = Mansion4Script_Switches + $6A22 = PrintFightingDojoText + $6A08 = PrintFightingDojoText2 + $6A15 = PrintFightingDojoText3 + $4A98 = SaffronCityBlocks + $5175 = Route22TextPointers + $4EB2 = Route22Script + $43B2 = Route23Blocks + $4022 = Route22Object + $4D22 = Route20TextPointers + $4CA9 = Route20Script + $4113 = Route20Object + $52F7 = Route23TextPointers + $51DA = Route23Script + $494A = IndigoPlateauBlocks + $4361 = Route23Object + $544B = Route24TextPointers + $53AD = Route24Script + $4810 = Route25Blocks + $46A4 = Route24Object + $5628 = Route25TextPointers + $55CB = Route25Script + $47B2 = Route25Object + $4936 = IndigoPlateauTextPointers + $4935 = IndigoPlateauScript + $4936 = IndigoPlateauObject + $4C03 = SaffronCityTextPointers + $4C00 = SaffronCityScript + $49DC = SaffronCityObject + $4C35 = SaffronCityText1 + $4C3A = SaffronCityText2 + $4C3F = SaffronCityText3 + $4C44 = SaffronCityText4 + $4C49 = SaffronCityText5 + $4C4E = SaffronCityText6 + $4C53 = SaffronCityText7 + $4C58 = SaffronCityText8 + $4C5D = SaffronCityText9 + $4C62 = SaffronCityText10 + $4C67 = SaffronCityText11 + $4C6C = SaffronCityText12 + $4C72 = SaffronCityText13 + $4C77 = SaffronCityText14 + $4C7C = SaffronCityText15 + $4C81 = SaffronCityText16 + $4C86 = SaffronCityText17 + $4C8B = SaffronCityText18 + $4C90 = SaffronCityText20 + $4C95 = SaffronCityText21 + $4C9A = SaffronCityText22 + $4C9F = SaffronCityText24 + $4CA4 = SaffronCityText25 + $4CC6 = Route20Script_50cc6 + $4D3A = Route20TrainerHeader0 + $4D1C = Route20ScriptPointers + $4D0C = Route20Script_50d0c + $4CE8 = Route20Script_50cc6.MissableObjectIDs + $4D14 = Route20Script_50d14 + $4DB3 = Route20Text1 + $4DBD = Route20Text2 + $4DC7 = Route20Text3 + $4DD1 = Route20Text4 + $4DDB = Route20Text5 + $4DE5 = Route20Text6 + $4DEF = Route20Text7 + $4DF9 = Route20Text8 + $4E03 = Route20Text9 + $4E0D = Route20Text10 + $4EAD = Route20Text11 + $4EAD = Route20Text12 + $4E17 = Route20BattleText1 + $4E21 = Route20AfterBattleText1 + $4E1C = Route20EndBattleText1 + $4E26 = Route20BattleText2 + $4E30 = Route20AfterBattleText2 + $4E2B = Route20EndBattleText2 + $4E35 = Route20BattleText3 + $4E3F = Route20AfterBattleText3 + $4E3A = Route20EndBattleText3 + $4E44 = Route20BattleText4 + $4E4E = Route20AfterBattleText4 + $4E49 = Route20EndBattleText4 + $4E53 = Route20BattleText5 + $4E5D = Route20AfterBattleText5 + $4E58 = Route20EndBattleText5 + $4E62 = Route20BattleText6 + $4E6C = Route20AfterBattleText6 + $4E67 = Route20EndBattleText6 + $4E71 = Route20BattleText7 + $4E7B = Route20AfterBattleText7 + $4E76 = Route20EndBattleText7 + $4E80 = Route20BattleText8 + $4E8A = Route20AfterBattleText8 + $4E85 = Route20EndBattleText8 + $4E8F = Route20BattleText9 + $4E99 = Route20AfterBattleText9 + $4E94 = Route20EndBattleText9 + $4E9E = Route20BattleText10 + $4EA8 = Route20AfterBattleText10 + $4EA3 = Route20EndBattleText10 + $4D46 = Route20TrainerHeader2 + $4D52 = Route20TrainerHeader3 + $4D5E = Route20TrainerHeader4 + $4D6A = Route20TrainerHeader5 + $4D76 = Route20TrainerHeader6 + $4D82 = Route20TrainerHeader7 + $4D8E = Route20TrainerHeader8 + $4D9A = Route20TrainerHeader9 + $4DA6 = Route20TrainerHeader10 + $4EBE = Route22ScriptPointers + $4F00 = Route22Script0 + $4F62 = Route22Script1 + $4FB5 = Route22Script2 + $502A = Route22Script3 + $5087 = Route22Script4 + $50DF = Route22Script5 + $5151 = Route22Script6 + $4ED5 = Route22Script7 + $4EFB = Route22RivalMovementData + $4F2D = Route22Script0.Route22RivalBattleCoords + $504E = Route22Script_5104e + $4EE6 = Route22MoveRivalSprite + $51B7 = Route22RivalDefeatedText1 + $51BC = Route22Text_511bc + $4FAF = StarterMons_50faf + $4ED6 = Route22Script_50ed6 + $4ECE = Route22Script_50ece + $5008 = Route22Script_51008 + $500D = Route22Script_5100d + $5017 = Route22RivalExitMovementData1 + $501F = Route22RivalExitMovementData2 + $51CB = Route22RivalDefeatedText2 + $51D0 = Route22Text_511d0 + $50D9 = StarterMons_510d9 + $513D = Route22Script_5113d + $5142 = Route22Script_51142 + $514C = MovementData_5114c + $514D = MovementData_5114d + $517B = Route22Text1 + $5194 = Route22Text2 + $51D5 = Route22FrontGateText + $51B2 = Route22RivalAfterBattleText1 + $51AD = Route22RivalBeforeBattleText1 + $51C6 = Route22RivalAfterBattleText2 + $51C1 = Route22RivalBeforeBattleText2 + $51E9 = Route23Script_511e9 + $5213 = Route23ScriptPointers + $5219 = Route23Script0 + $52EC = Route23Script1 + $52F1 = Route23Script2 + $5255 = YCoordsData_51255 + $525D = Route23Script_5125d + $5276 = BadgeTextPointers + $52CB = CascadeBadgeText + $52BE = ThunderBadgeText + $52B1 = RainbowBadgeText + $52A7 = SoulBadgeText + $529C = MarshBadgeText + $528F = VolcanoBadgeText + $5284 = EarthBadgeText + $5307 = Route23Text1 + $5310 = Route23Text2 + $5319 = Route23Text3 + $5322 = Route23Text4 + $532B = Route23Text5 + $5334 = Route23Text6 + $533D = Route23Text7 + $53A8 = Route23Text8 + $5346 = Route23Script_51346 + $538E = VictoryRoadGuardText1 + $52D8 = Route23Script_512d8 + $539E = VictoryRoadGuardText2 + $545B = Route24TrainerHeaders + $53CB = Route24ScriptPointers + $53D5 = Route24Script0 + $5422 = Route24Script3 + $5411 = Route24Script4 + $540E = CoordsData_5140e + $53C0 = Route24Script_513c0 + $54A4 = Route24Text1 + $5535 = Route24Text2 + $553F = Route24Text3 + $5549 = Route24Text4 + $5553 = Route24Text5 + $555D = Route24Text6 + $5567 = Route24Text7 + $5571 = Route24BattleText1 + $557B = Route24AfterBattleText1 + $5576 = Route24EndBattleText1 + $5580 = Route24BattleText2 + $558A = Route24AfterBattleText2 + $5585 = Route24EndBattleText2 + $558F = Route24BattleText3 + $5599 = Route24AfterBattleText3 + $5594 = Route24EndBattleText3 + $559E = Route24BattleText4 + $55A8 = Route24AfterBattleText4 + $55A3 = Route24EndBattleText4 + $55AD = Route24BattleText5 + $55B7 = Route24AfterBattleText5 + $55B2 = Route24EndBattleText5 + $55BC = Route24BattleText6 + $55C6 = Route24AfterBattleText6 + $55C1 = Route24EndBattleText6 + $5510 = Route24Text_51510 + $551A = Route24Text_5151a + $5526 = Route24Text_51526 + $552B = Route24Text_5152b + $5530 = Route24Text_51530 + $5521 = Route24Text_51521 + $545B = Route24TrainerHeader0 + $5467 = Route24TrainerHeader2 + $5473 = Route24TrainerHeader3 + $547F = Route24TrainerHeader4 + $548B = Route24TrainerHeader5 + $5497 = Route24TrainerHeader6 + $55E1 = Route25Script_515e1 + $563E = Route25TrainerHeaders + $5622 = Route25ScriptPointers + $56AB = Route25Text1 + $56B5 = Route25Text2 + $56BF = Route25Text3 + $56C9 = Route25Text4 + $56D3 = Route25Text5 + $56DD = Route25Text6 + $56E7 = Route25Text7 + $56F1 = Route25Text8 + $56FB = Route25Text9 + $578C = Route25Text11 + $5705 = Route25BattleText1 + $570F = Route25AfterBattleText1 + $570A = Route25EndBattleText1 + $5714 = Route25BattleText2 + $571E = Route25AfterBattleText2 + $5719 = Route25EndBattleText2 + $5723 = Route25BattleText3 + $572D = Route25AfterBattleText3 + $5728 = Route25EndBattleText3 + $5732 = Route25BattleText4 + $573C = Route25AfterBattleText4 + $5737 = Route25EndBattleText4 + $5741 = Route25BattleText5 + $574B = Route25AfterBattleText5 + $5746 = Route25EndBattleText5 + $5750 = Route25BattleText6 + $575A = Route25AfterBattleText6 + $5755 = Route25EndBattleText6 + $575F = Route25BattleText7 + $5769 = Route25AfterBattleText7 + $5764 = Route25EndBattleText7 + $576E = Route25BattleText8 + $5778 = Route25AfterBattleText8 + $5773 = Route25EndBattleText8 + $577D = Route25BattleText9 + $5787 = Route25AfterBattleText9 + $5782 = Route25EndBattleText9 + $563E = Route25TrainerHeader0 + $564A = Route25TrainerHeader2 + $5656 = Route25TrainerHeader3 + $5662 = Route25TrainerHeader4 + $566E = Route25TrainerHeader5 + $567A = Route25TrainerHeader6 + $5686 = Route25TrainerHeader7 + $5692 = Route25TrainerHeader8 + $569E = Route25TrainerHeader9 + $59AF = VictoryRoad2Blocks + $581B = VictoryRoad2TextPointers + $579D = VictoryRoad2Script + $5915 = VictoryRoad2Object + $57C4 = VictoryRoad2Script_517c4 + $57C9 = VictoryRoad2Script_517c9 + $5835 = VictoryRoad2TrainerHeaders + $57EB = VictoryRoad2ScriptPointers + $57E2 = VictoryRoad2Script_517e2 + $57F1 = VictoryRoad2Script0 + $5816 = CoordsData_51816 + $587E = VictoryRoad2Text1 + $5888 = VictoryRoad2Text2 + $5892 = VictoryRoad2Text3 + $589C = VictoryRoad2Text4 + $58A6 = VictoryRoad2Text5 + $58B0 = VictoryRoad2Text6 + $58CA = VictoryRoad2BattleText1 + $58D4 = VictoryRoad2AfterBattleText1 + $58CF = VictoryRoad2EndBattleText1 + $58D9 = VictoryRoad2BattleText2 + $58E3 = VictoryRoad2AfterBattleText2 + $58DE = VictoryRoad2EndBattleText2 + $58E8 = VictoryRoad2BattleText3 + $58F2 = VictoryRoad2AfterBattleText3 + $58ED = VictoryRoad2EndBattleText3 + $58F7 = VictoryRoad2BattleText4 + $5901 = VictoryRoad2AfterBattleText4 + $58FC = VictoryRoad2EndBattleText4 + $5906 = VictoryRoad2BattleText5 + $5910 = VictoryRoad2AfterBattleText5 + $590B = VictoryRoad2EndBattleText5 + $58BA = VictoryRoad2BattleText6 + $5835 = VictoryRoad2TrainerHeader0 + $5841 = VictoryRoad2TrainerHeader2 + $584D = VictoryRoad2TrainerHeader3 + $5859 = VictoryRoad2TrainerHeader4 + $5865 = VictoryRoad2TrainerHeader5 + $5871 = VictoryRoad2TrainerHeader6 + $5A91 = MtMoon2Blocks + $5A46 = MtMoon2TextPointers + $5A42 = MtMoon2Script + $5A4D = MtMoon2Object + $5A48 = MtMoonText1 + $5F57 = SilphCo7Blocks + $5D3F = SilphCo7TextPointers + $5B61 = SilphCo7Script + $5ED7 = SilphCo7Object + $5B77 = SilphCo7Script_51b77 + $5D5D = SilphCo7TrainerHeaders + $5C17 = SilphCo7ScriptPointers + $5BC1 = DataTable_51bc1 + $5BC8 = SilphCo7Text_51bc8 + $5BF4 = SilphCo7Text_51bf4 + $5C23 = SilphCo7Script0 + $5C82 = SilphCo7Script3 + $5CC8 = SilphCo7Script4 + $5D25 = SilphCo7Script5 + $5C78 = CoordsData_51c78 + $5C7D = MovementData_51c7d + $5C10 = SilphCo7Text_51c10 + $5EC8 = SilphCo7Text14 + $5ECD = SilphCo7Text_51ecd + $5C0C = SilphCo7Text_51c0c + $5D1D = MovementData_51d1d + $5D1A = MovementData_51d1a + $5D8E = SilphCo7Text1 + $5DE7 = SilphCo7Text2 + $5E0A = SilphCo7Text3 + $5E2D = SilphCo7Text4 + $5E50 = SilphCo7Text5 + $5E69 = SilphCo7Text6 + $5E82 = SilphCo7Text7 + $5E9B = SilphCo7Text8 + $5EB4 = SilphCo7Text9 + $5EC3 = SilphCo7Text13 + $5ED2 = SilphCo7Text15 + $5E5A = SilphCo7BattleText1 + $5E64 = SilphCo7AfterBattleText1 + $5E5F = SilphCo7EndBattleText1 + $5E73 = SilphCo7BattleText2 + $5E7D = SilphCo7AfterBattleText2 + $5E78 = SilphCo7EndBattleText2 + $5E8C = SilphCo7BattleText3 + $5E96 = SilphCo7AfterBattleText3 + $5E91 = SilphCo7EndBattleText3 + $5EA5 = SilphCo7BattleText4 + $5EAF = SilphCo7AfterBattleText4 + $5EAA = SilphCo7EndBattleText4 + $5DDD = SilphCo7Text1.LaprasGuyText + $5DD3 = SilphCo7Text1.MeetLaprasGuyText + $5DD8 = SilphCo7Text1.HeresYourLaprasText + $5DE2 = SilphCo7Text1.LaprasGuySavedText + $5E00 = SilphCo7Text2.rockettext + $5E05 = SilphCo7Text2.savedtext + $5E23 = SilphCo7Text3.rockettext + $5E28 = SilphCo7Text3.savedtext + $5E46 = SilphCo7Text4.rockettext + $5E4B = SilphCo7Text4.savedtext + $5D5D = SilphCo7TrainerHeader0 + $5D69 = SilphCo7TrainerHeader2 + $5D75 = SilphCo7TrainerHeader3 + $5D81 = SilphCo7TrainerHeader4 + $5EBE = SilphCo7Text_51ebe + $6110 = Mansion2Blocks + $604D = Mansion2TextPointers + $5FD8 = Mansion2Script + $60D1 = Mansion2Object + $5FEE = Mansion2Script_51fee + $6057 = Mansion2TrainerHeaders + $6047 = Mansion2ScriptPointers + $602F = Mansion2Script_5202f + $6064 = Mansion2Text1 + $607D = Mansion2Text3 + $6082 = Mansion2Text4 + $6087 = Mansion2Text5 + $606E = Mansion2BattleText1 + $6078 = Mansion2AfterBattleText1 + $6073 = Mansion2EndBattleText1 + $6057 = Mansion2TrainerHeader0 + $60C2 = Mansion2Text_520c2 + $60C7 = Mansion2Text_520c7 + $60CC = Mansion2Text_520cc + $6326 = Mansion3Blocks + $628A = Mansion3TextPointers + $61EE = Mansion3Script + $62E6 = Mansion3Object + $6204 = Mansion3Script_52204 + $6296 = Mansion3TrainerHeader0 + $6235 = Mansion3ScriptPointers + $623B = Mansion3Script0 + $6254 = CoordsData_52254 + $625B = Mansion3Script_5225b + $62AF = Mansion3Text1 + $62B9 = Mansion3Text2 + $62E1 = Mansion3Text5 + $6087 = Mansion3Text6 + $62C3 = Mansion3BattleText1 + $62CD = Mansion3AfterBattleText1 + $62C8 = Mansion3EndBattleText1 + $62D2 = Mansion3BattleText2 + $62DC = Mansion3AfterBattleText2 + $62D7 = Mansion3EndBattleText2 + $62A2 = Mansion3TrainerHeader2 + $64DD = Mansion4Blocks + $6436 = Mansion4TextPointers + $63B9 = Mansion4Script + $6498 = Mansion4Object + $63CF = Mansion4Script_523cf + $6448 = Mansion4TrainerHeader0 + $6430 = Mansion4ScriptPointers + $6461 = Mansion4Text1 + $646B = Mansion4Text2 + $6493 = Mansion4Text7 + $6475 = Mansion4BattleText1 + $647F = Mansion4AfterBattleText1 + $647A = Mansion4EndBattleText1 + $6484 = Mansion4BattleText2 + $648E = Mansion4AfterBattleText2 + $6489 = Mansion4EndBattleText2 + $6454 = Mansion4TrainerHeader2 + $6613 = ParalyzeEffect_.asm_52613 + $66E3 = SilphCoMapList + $66FD = Func_526fd + $677E = RequireCoinCaseTextPtr + $6784 = ExchangeCoinsForPrizesTextPtr + $687A = PrintPrizePrice + $678E = GetPrizeMenuId + $6789 = WhichPrizeTextPtr + $68C6 = HandlePrizeChoice + $6843 = PrizeDifferentMenuPtrs + $684F = NoThanksText + $6859 = PrizeMenuMon1Entries + $685D = PrizeMenuMon1Cost + $6864 = PrizeMenuMon2Entries + $6868 = PrizeMenuMon2Cost + $686F = PrizeMenuTMsEntries + $6873 = PrizeMenuTMsCost + $68A5 = PrintPrizePrice.CoinText + $68AA = PrintPrizePrice.SixSpacesText + $6960 = SoYouWantPrizeTextPtr + $68B1 = LoadCoinsToSubtract + $6977 = GetPrizeMonLevel + $696B = PrizeRoomBagIsFullTextPtr + $6965 = SorryNeedMoreCoinsText + $6971 = OhFineThenTextPtr + $698A = PrizeMonLevelDictionary + $69F4 = ViridianSchoolNotebookText1 + $69DB = TurnPageSchoolNotebook + $69F9 = ViridianSchoolNotebookText2 + $69FE = ViridianSchoolNotebookText3 + $6A03 = ViridianSchoolNotebookText4 + $69EE = ViridianSchoolNotebookText5 + $69E9 = TurnPageText + SLACK: $15BE bytes + +Bank #21: + SECTION: $4000-$6A4A ($2A4B bytes) + $4000 = Route2_h + $41E6 = Route3_h + $4390 = Route4_h + $4581 = Route5_h + $4686 = Route9_h + $480C = Route13_h + $4999 = Route14_h + $4B20 = Route17_h + $4E78 = Route19_h + $4FFF = Route21_h + $6243 = DayCareM_h + $60E9 = CeladonMart2_h + $6064 = VermilionHouse2_h + $6170 = FuchsiaHouse3_h + $6473 = Route12House_h + $64F8 = SilphCo8_h + $6881 = TrainerWalkUpToPlayer + $67F9 = Func_567f9 + $6819 = Func_56819 + $683D = Func_5683d + $685D = Func_5685d + $506D = Route21Blocks + $407E = Route2Blocks + $4255 = Route3Blocks + $45D2 = Route5Blocks + $43EC = Route4Blocks + $46FE = Route9Blocks + $4EF1 = Route19Blocks + $524F = GainExperience + $66E2 = DisplayDiploma + $690F = TrainerEngage + $54E6 = Route2TextPointers + $54E3 = Route2Script + $4022 = Route2Object + $5511 = Route3TextPointers + $54F8 = Route3Script + $4208 = Route3Object + $5671 = Route4TextPointers + $5658 = Route4Script + $43B2 = Route4Object + $56B5 = Route5TextPointers + $56B2 = Route5Script + $45A3 = Route5Object + $56D5 = Route9TextPointers + $56BC = Route9Script + $46A8 = Route9Object + $488B = Route13Blocks + $5837 = Route13TextPointers + $581E = Route13Script + $4A12 = Route14Blocks + $482E = Route13Object + $59EC = Route14TextPointers + $59D3 = Route14Script + $49BB = Route14Object + $4BA8 = Route17Blocks + $5B93 = Route17TextPointers + $5B7A = Route17Script + $4B42 = Route17Object + $5D5D = Route19TextPointers + $5D44 = Route19Script + $4E9A = Route19Object + $5F04 = Route21TextPointers + $5EEB = Route21Script + $5021 = Route21Object + $546C = Func_5546c + $5436 = Func_55436 + $549F = Func_5549f + $54B2 = GainedText + $54DD = GrewLevelText + $525F = Func_5525f + $54CB = WithExpAllText + $54D8 = ExpPointsText + $54D4 = BoostedText + $54EE = Route2Text3 + $54F3 = Route2Text4 + $5525 = Route3TrainerHeader0 + $550B = Route3ScriptPointers + $5586 = Route3Text1 + $558B = Route3Text2 + $55A4 = Route3Text3 + $55BD = Route3Text4 + $55D6 = Route3Text5 + $55EF = Route3Text6 + $5608 = Route3Text7 + $5621 = Route3Text8 + $563A = Route3Text9 + $5653 = Route3Text10 + $5595 = Route3BattleText1 + $559F = Route3AfterBattleText1 + $559A = Route3EndBattleText1 + $55AE = Route3BattleText2 + $55B8 = Route3AfterBattleText2 + $55B3 = Route3EndBattleText2 + $55C7 = Route3BattleText3 + $55D1 = Route3AfterBattleText3 + $55CC = Route3EndBattleText3 + $55E0 = Route3BattleText4 + $55EA = Route3AfterBattleText4 + $55E5 = Route3EndBattleText4 + $55F9 = Route3BattleText5 + $5603 = Route3AfterBattleText5 + $55FE = Route3EndBattleText5 + $5612 = Route3BattleText6 + $561C = Route3AfterBattleText6 + $5617 = Route3EndBattleText6 + $562B = Route3BattleText7 + $5635 = Route3AfterBattleText7 + $5630 = Route3EndBattleText7 + $5644 = Route3BattleText8 + $564E = Route3AfterBattleText8 + $5649 = Route3EndBattleText8 + $5531 = Route3TrainerHeader2 + $553D = Route3TrainerHeader3 + $5549 = Route3TrainerHeader4 + $5555 = Route3TrainerHeader5 + $5561 = Route3TrainerHeader6 + $556D = Route3TrainerHeader7 + $5579 = Route3TrainerHeader8 + $567D = Route4TrainerHeaders + $566B = Route4ScriptPointers + $568A = Route4Text1 + $568F = Route4Text2 + $56A8 = Route4Text5 + $56AD = Route4Text6 + $5699 = Route4BattleText1 + $56A3 = Route4AfterBattleText1 + $569E = Route4EndBattleText1 + $567D = Route4TrainerHeader0 + $56B7 = Route5Text1 + $56EB = Route9TrainerHeaders + $56CF = Route9ScriptPointers + $5758 = Route9Text1 + $575E = Route9Text2 + $5764 = Route9Text3 + $576A = Route9Text4 + $5770 = Route9Text5 + $5776 = Route9Text6 + $577C = Route9Text7 + $5782 = Route9Text8 + $5788 = Route9Text9 + $5819 = Route9Text11 + $5792 = Route9BattleText1 + $579C = Route9AfterBattleText1 + $5797 = Route9EndBattleText1 + $57A1 = Route9BattleText2 + $57AB = Route9AfterBattleText2 + $57A6 = Route9EndBattleText2 + $57B0 = Route9BattleText3 + $57BA = Route9AfterBattleText3 + $57B5 = Route9EndBattleText3 + $57BF = Route9BattleText4 + $57C9 = Route9AfterBattleText4 + $57C4 = Route9EndBattleText4 + $57CE = Route9BattleText5 + $57D8 = Route9AfterBattleText5 + $57D3 = Route9EndBattleText5 + $57DD = Route9BattleText6 + $57E7 = Route9AfterBattleText6 + $57E2 = Route9EndBattleText6 + $57EC = Route9BattleText7 + $57F6 = Route9AfterBattleText7 + $57F1 = Route9EndBattleText7 + $57FB = Route9BattleText8 + $5805 = Route9AfterBattleText8 + $5800 = Route9EndBattleText8 + $580A = Route9BattleText9 + $5814 = Route9AfterBattleText9 + $580F = Route9EndBattleText9 + $56EB = Route9TrainerHeader0 + $56F7 = Route9TrainerHeader2 + $5703 = Route9TrainerHeader3 + $570F = Route9TrainerHeader4 + $571B = Route9TrainerHeader5 + $5727 = Route9TrainerHeader6 + $5733 = Route9TrainerHeader7 + $573F = Route9TrainerHeader8 + $574B = Route9TrainerHeader9 + $5851 = Route13TrainerHeaders + $5831 = Route13ScriptPointers + $58CA = Route13Text1 + $58E3 = Route13Text2 + $58FC = Route13Text3 + $5915 = Route13Text4 + $592E = Route13Text5 + $5947 = Route13Text6 + $5960 = Route13Text7 + $5979 = Route13Text8 + $5992 = Route13Text9 + $59AB = Route13Text10 + $59C4 = Route13Text11 + $59C9 = Route13Text12 + $59CE = Route13Text13 + $58D4 = Route13BattleText2 + $58DE = Route13AfterBattleText2 + $58D9 = Route13EndBattleText2 + $58ED = Route13BattleText3 + $58F7 = Route13AfterBattleText3 + $58F2 = Route13EndBattleText3 + $5906 = Route13BattleText4 + $5910 = Route13AfterBattleText4 + $590B = Route13EndBattleText4 + $591F = Route13BattleText5 + $5929 = Route13AfterBattleText5 + $5924 = Route13EndBattleText5 + $5938 = Route13BattleText6 + $5942 = Route13AfterBattleText6 + $593D = Route13EndBattleText6 + $5951 = Route13BattleText7 + $595B = Route13AfterBattleText7 + $5956 = Route13EndBattleText7 + $596A = Route13BattleText8 + $5974 = Route13AfterBattleText8 + $596F = Route13EndBattleText8 + $5983 = Route13BattleText9 + $598D = Route13AfterBattleText9 + $5988 = Route13EndBattleText9 + $599C = Route13BattleText10 + $59A6 = Route13AfterBattleText10 + $59A1 = Route13EndBattleText10 + $59B5 = Route13BattleText11 + $59BF = Route13AfterBattleText11 + $59BA = Route13EndBattleText11 + $5851 = Route13TrainerHeader0 + $585D = Route13TrainerHeader2 + $5869 = Route13TrainerHeader3 + $5875 = Route13TrainerHeader4 + $5881 = Route13TrainerHeader5 + $588D = Route13TrainerHeader6 + $5899 = Route13TrainerHeader7 + $58A5 = Route13TrainerHeader8 + $58B1 = Route13TrainerHeader9 + $58BD = Route13TrainerHeader10 + $5A02 = Route14TrainerHeaders + $59E6 = Route14ScriptPointers + $5A7B = Route14Text1 + $5A94 = Route14Text2 + $5AAD = Route14Text3 + $5AC6 = Route14Text4 + $5ADF = Route14Text5 + $5AF8 = Route14Text6 + $5B11 = Route14Text7 + $5B2A = Route14Text8 + $5B43 = Route14Text9 + $5B5C = Route14Text10 + $5B75 = Route14Text11 + $5A85 = Route14BattleText1 + $5A8F = Route14AfterBattleText1 + $5A8A = Route14EndBattleText1 + $5A9E = Route14BattleText2 + $5AA8 = Route14AfterBattleText2 + $5AA3 = Route14EndBattleText2 + $5AB7 = Route14BattleText3 + $5AC1 = Route14AfterBattleText3 + $5ABC = Route14EndBattleText3 + $5AD0 = Route14BattleText4 + $5ADA = Route14AfterBattleText4 + $5AD5 = Route14EndBattleText4 + $5AE9 = Route14BattleText5 + $5AF3 = Route14AfterBattleText5 + $5AEE = Route14EndBattleText5 + $5B02 = Route14BattleText6 + $5B0C = Route14AfterBattleText6 + $5B07 = Route14EndBattleText6 + $5B1B = Route14BattleText7 + $5B25 = Route14AfterBattleText7 + $5B20 = Route14EndBattleText7 + $5B34 = Route14BattleText8 + $5B3E = Route14AfterBattleText8 + $5B39 = Route14EndBattleText8 + $5B4D = Route14BattleText9 + $5B57 = Route14AfterBattleText9 + $5B52 = Route14EndBattleText9 + $5B66 = Route14BattleText10 + $5B70 = Route14AfterBattleText10 + $5B6B = Route14EndBattleText10 + $5A02 = Route14TrainerHeader0 + $5A0E = Route14TrainerHeader1 + $5A1A = Route14TrainerHeader2 + $5A26 = Route14TrainerHeader3 + $5A32 = Route14TrainerHeader4 + $5A3E = Route14TrainerHeader5 + $5A4A = Route14TrainerHeader6 + $5A56 = Route14TrainerHeader7 + $5A62 = Route14TrainerHeader8 + $5A6E = Route14TrainerHeader9 + $5BB3 = Route17TrainerHeaders + $5B8D = Route17ScriptPointers + $5C2C = Route17Text1 + $5C45 = Route17Text2 + $5C5E = Route17Text3 + $5C77 = Route17Text4 + $5C90 = Route17Text5 + $5CA9 = Route17Text6 + $5CC2 = Route17Text7 + $5CDB = Route17Text8 + $5CF4 = Route17Text9 + $5D0D = Route17Text10 + $5D26 = Route17Text11 + $5D2B = Route17Text12 + $5D30 = Route17Text13 + $5D35 = Route17Text14 + $5D3A = Route17Text15 + $5D3F = Route17Text16 + $5C36 = Route17BattleText1 + $5C40 = Route17AfterBattleText1 + $5C3B = Route17EndBattleText1 + $5C4F = Route17BattleText2 + $5C59 = Route17AfterBattleText2 + $5C54 = Route17EndBattleText2 + $5C68 = Route17BattleText3 + $5C72 = Route17AfterBattleText3 + $5C6D = Route17EndBattleText3 + $5C81 = Route17BattleText4 + $5C8B = Route17AfterBattleText4 + $5C86 = Route17EndBattleText4 + $5C9A = Route17BattleText5 + $5CA4 = Route17AfterBattleText5 + $5C9F = Route17EndBattleText5 + $5CB3 = Route17BattleText6 + $5CBD = Route17AfterBattleText6 + $5CB8 = Route17EndBattleText6 + $5CCC = Route17BattleText7 + $5CD6 = Route17AfterBattleText7 + $5CD1 = Route17EndBattleText7 + $5CE5 = Route17BattleText8 + $5CEF = Route17AfterBattleText8 + $5CEA = Route17EndBattleText8 + $5CFE = Route17BattleText9 + $5D08 = Route17AfterBattleText9 + $5D03 = Route17EndBattleText9 + $5D17 = Route17BattleText10 + $5D21 = Route17AfterBattleText10 + $5D1C = Route17EndBattleText10 + $5BB3 = Route17TrainerHeader0 + $5BBF = Route17TrainerHeader1 + $5BCB = Route17TrainerHeader2 + $5BD7 = Route17TrainerHeader3 + $5BE3 = Route17TrainerHeader4 + $5BEF = Route17TrainerHeader5 + $5BFB = Route17TrainerHeader6 + $5C07 = Route17TrainerHeader7 + $5C13 = Route17TrainerHeader8 + $5C1F = Route17TrainerHeader9 + $5D73 = Route19TrainerHeaders + $5D57 = Route19ScriptPointers + $5DEC = Route19Text1 + $5DF6 = Route19Text2 + $5E00 = Route19Text3 + $5E0A = Route19Text4 + $5E14 = Route19Text5 + $5E1E = Route19Text6 + $5E28 = Route19Text7 + $5E32 = Route19Text8 + $5E3C = Route19Text9 + $5E46 = Route19Text10 + $5EE6 = Route19Text11 + $5E50 = Route19BattleText1 + $5E5A = Route19AfterBattleText1 + $5E55 = Route19EndBattleText1 + $5E5F = Route19BattleText2 + $5E69 = Route19AfterBattleText2 + $5E64 = Route19EndBattleText2 + $5E6E = Route19BattleText3 + $5E78 = Route19AfterBattleText3 + $5E73 = Route19EndBattleText3 + $5E7D = Route19BattleText4 + $5E87 = Route19AfterBattleText4 + $5E82 = Route19EndBattleText4 + $5E8C = Route19BattleText5 + $5E96 = Route19AfterBattleText5 + $5E91 = Route19EndBattleText5 + $5E9B = Route19BattleText6 + $5EA5 = Route19AfterBattleText6 + $5EA0 = Route19EndBattleText6 + $5EAA = Route19BattleText7 + $5EB4 = Route19AfterBattleText7 + $5EAF = Route19EndBattleText7 + $5EB9 = Route19BattleText8 + $5EC3 = Route19AfterBattleText8 + $5EBE = Route19EndBattleText8 + $5EC8 = Route19BattleText9 + $5ED2 = Route19AfterBattleText9 + $5ECD = Route19EndBattleText9 + $5ED7 = Route19BattleText10 + $5EE1 = Route19AfterBattleText10 + $5EDC = Route19EndBattleText10 + $5D73 = Route19TrainerHeader0 + $5D7F = Route19TrainerHeader1 + $5D8B = Route19TrainerHeader2 + $5D97 = Route19TrainerHeader3 + $5DA3 = Route19TrainerHeader4 + $5DAF = Route19TrainerHeader5 + $5DBB = Route19TrainerHeader6 + $5DC7 = Route19TrainerHeader7 + $5DD3 = Route19TrainerHeader8 + $5DDF = Route19TrainerHeader9 + $5F16 = Route21TrainerHeaders + $5EFE = Route21ScriptPointers + $5F83 = Route21Text1 + $5F8D = Route21Text2 + $5F97 = Route21Text3 + $5FA1 = Route21Text4 + $5FAB = Route21Text5 + $5FB5 = Route21Text6 + $5FBF = Route21Text7 + $5FC9 = Route21Text8 + $5FD3 = Route21Text9 + $5FDD = Route21BattleText1 + $5FE7 = Route21AfterBattleText1 + $5FE2 = Route21EndBattleText1 + $5FEC = Route21BattleText2 + $5FF6 = Route21AfterBattleText2 + $5FF1 = Route21EndBattleText2 + $5FFB = Route21BattleText3 + $6005 = Route21AfterBattleText3 + $6000 = Route21EndBattleText3 + $600A = Route21BattleText4 + $6014 = Route21AfterBattleText4 + $600F = Route21EndBattleText4 + $6019 = Route21BattleText5 + $6023 = Route21AfterBattleText5 + $601E = Route21EndBattleText5 + $6028 = Route21BattleText6 + $6032 = Route21AfterBattleText6 + $602D = Route21EndBattleText6 + $6037 = Route21BattleText7 + $6041 = Route21AfterBattleText7 + $603C = Route21EndBattleText7 + $6046 = Route21BattleText8 + $6050 = Route21AfterBattleText8 + $604B = Route21EndBattleText8 + $6055 = Route21BattleText9 + $605F = Route21AfterBattleText9 + $605A = Route21EndBattleText9 + $5F16 = Route21TrainerHeader0 + $5F22 = Route21TrainerHeader1 + $5F2E = Route21TrainerHeader2 + $5F3A = Route21TrainerHeader3 + $5F46 = Route21TrainerHeader4 + $5F52 = Route21TrainerHeader5 + $5F5E = Route21TrainerHeader6 + $5F6A = Route21TrainerHeader7 + $5F76 = Route21TrainerHeader8 + $522F = VermilionHouse2Blocks + $6073 = VermilionHouse2TextPointers + $6070 = VermilionHouse2Script + $60CF = VermilionHouse2Object + $6075 = VermilionHouse2Text1 + $60B1 = VermilionHouse2Text_560b1 + $60B6 = VermilionHouse2Text_560b6 + $60CA = VermilionHouse2Text_560ca + $60C0 = VermilionHouse2Text_560c0 + $60C5 = VermilionHouse2Text_560c5 + $6148 = CeladonMart2Blocks + $60F8 = CeladonMart2TextPointers + $60F5 = CeladonMart2Script + $6111 = CeladonMart2Object + $6102 = CeladonMart2Text3 + $6107 = CeladonMart2Text4 + $610C = CeladonMart2Text5 + $523F = FuchsiaHouse3Blocks + $617F = FuchsiaHouse3TextPointers + $617C = FuchsiaHouse3Script + $6221 = FuchsiaHouse3Object + $6181 = FuchsiaHouse3Text1 + $61BD = FuchsiaHouse3Text_561bd + $61C2 = FuchsiaHouse3Text_561c2 + $621C = FuchsiaHouse3Text_5621c + $6212 = FuchsiaHouse3Text_56212 + $6217 = FuchsiaHouse3Text_56217 + $522F = DayCareMBlocks + $6252 = DayCareMTextPointers + $624F = DayCareMScript + $6459 = DayCareMObject + $6254 = DayCareMText1 + $62E1 = DayCareMScript_562e1 + $640F = DayCareMText_5640f + $643B = DayCareMText_5643b + $6409 = DayCareMScript_56409 + $6445 = DayCareMText_56445 + $6414 = DayCareMText_56414 + $6437 = DayCareMText_56437 + $644A = DayCareMText_5644a + $6419 = DayCareMText_56419 + $641E = DayCareMText_5641e + $6432 = DayCareMText_56432 + $6423 = DayCareMText_56423 + $6440 = DayCareMText_56440 + $6403 = DayCareMScript_562e1.asm_56403 + $6428 = DayCareMText_56428 + $6454 = DayCareMText_56454 + $644F = DayCareMText_5644f + $642D = DayCareMText_5642d + $522F = Route12HouseBlocks + $6482 = Route12HouseTextPointers + $647F = Route12HouseScript + $64DE = Route12HouseObject + $6484 = Route12HouseText1 + $64C0 = Route12HouseText_564c0 + $64C5 = Route12HouseText_564c5 + $64D9 = Route12HouseText_564d9 + $64CF = Route12HouseText_564cf + $64D4 = Route12HouseText_564d4 + $666D = SilphCo8Blocks + $657D = SilphCo8TextPointers + $6504 = SilphCo8Script + $6613 = SilphCo8Object + $651A = SilphCo8Script_5651a + $6585 = SilphCo8TrainerHeader0 + $6577 = SilphCo8ScriptPointers + $653E = DataTable_5653e + $6541 = SilphCo8Script_56541 + $656D = SilphCo8Script_5656d + $65AA = SilphCo8Text1 + $65C8 = SilphCo8Text2 + $65D2 = SilphCo8Text3 + $65DC = SilphCo8Text4 + $65E6 = SilphCo8BattleText1 + $65F0 = SilphCo8AfterBattleText1 + $65EB = SilphCo8EndBattleText1 + $65F5 = SilphCo8BattleText2 + $65FF = SilphCo8AfterBattleText2 + $65FA = SilphCo8EndBattleText2 + $6604 = SilphCo8BattleText3 + $660E = SilphCo8AfterBattleText3 + $6609 = SilphCo8EndBattleText3 + $65C3 = SilphCo8Text_565c3 + $65BE = SilphCo8Text_565be + $6591 = SilphCo8TrainerHeader1 + $659D = SilphCo8TrainerHeader2 + $6784 = DiplomaTextPointersAndCoords + $6798 = DiplomaText + $67A2 = DiplomaPlayer + $67A9 = DiplomaEmptyText + $67AA = DiplomaCongrats + $67EE = DiplomaGameFreak + $6903 = Func_56903 + $698E = ReadTrainerScreenPosition + $6988 = TrainerEngage.noEngage + $69AF = CheckSpriteCanSeePlayer + $69E3 = CheckPlayerIsInFrontOfSprite + $6A42 = CheckPlayerIsInFrontOfSprite.engage + SLACK: $15B5 bytes + +Bank #22: + SECTION: $4000-$65BA ($25BB bytes) + $4000 = Route6_h + $412D = Route8_h + $42D4 = Route10_h + $44BE = Route11_h + $466D = Route12_h + $492C = Route15_h + $4ADA = Route16_h + $4C38 = Route18_h + $5B64 = FanClub_h + $62A2 = Lance_h + $6492 = HallofFameRoom_h + $5CE5 = SilphCo2_h + $5F4F = SilphCo3_h + $612D = SilphCo10_h + $4F6A = CalcExperience + $4F43 = Func_58f43 + $4B84 = Route16Blocks + $4079 = Route6Blocks + $455F = Route11Blocks + $4C9C = Route18Blocks + $49CC = Route15Blocks + $659F = RemoveGuardDrink + $4D99 = PrintBeginningBattleText + $4E59 = SendOutMon + $4ED1 = RetreatMon + $4356 = Route10Blocks + $4710 = Route12Blocks + $41C6 = Route8Blocks + $5035 = OaksAideScript + $50C9 = Route6TextPointers + $50B0 = Route6Script + $4022 = Route6Object + $51CF = Route8TextPointers + $51B6 = Route8Script + $414F = Route8Object + $534F = Route10TextPointers + $5336 = Route10Script + $42F6 = Route10Object + $5465 = Route11TextPointers + $544C = Route11Script + $44E0 = Route11Object + $5675 = Route12TextPointers + $55F3 = Route12Script + $469A = Route12Object + $57C7 = Route15TextPointers + $57AE = Route15Script + $494E = Route15Object + $59B9 = Route16TextPointers + $5933 = Route16Script + $4AFC = Route16Object + $5AE0 = Route18TextPointers + $5AC7 = Route18Script + $4C5A = Route18Object + $4E3B = WildMonAppearedText + $4E40 = HookedMonAttackedText + $4E29 = PrintBeginningBattleText.playSFX + $4E4A = TrainerWantsToFightText + $4E45 = EnemyAppearedText + $4E54 = GhostCantBeIDdText + $4E4F = UnveiledGhostText + $4EAE = GoText + $4EB5 = DoItText + $4EBC = GetmText + $4EC3 = EnemysWeakText + $4ECC = PlayerMon1Text + $4ED7 = PlayerMon2Text + $4F25 = EnoughText + $4F3E = ComeBackText + $4F2C = OKExclamationText + $4F33 = GoodText + $501D = GrowthRateTable + $5010 = CalcDSquared + $5091 = OaksAideHiText + $50A0 = OaksAideHereYouGoText + $50A5 = OaksAideGotItemText + $50AB = OaksAideNoRoomText + $5096 = OaksAideUhOhText + $509B = OaksAideComeBackText + $50D7 = Route6TrainerHeaders + $50C3 = Route6ScriptPointers + $5120 = Route6Text1 + $5139 = Route6Text2 + $514D = Route6Text3 + $5166 = Route6Text4 + $517F = Route6Text5 + $5198 = Route6Text6 + $51B1 = Route6Text7 + $512A = Route6BattleText1 + $5134 = Route6AfterBattleText1 + $512F = Route6EndBattleText1 + $5143 = Route6BattleText2 + $5148 = Route6EndBattleText2 + $5157 = Route6BattleText3 + $5161 = Route6AfterBattleText3 + $515C = Route6EndBattleText3 + $5170 = Route6BattleText4 + $517A = Route6AfterBattleText4 + $5175 = Route6EndBattleText4 + $5189 = Route6BattleText5 + $5193 = Route6AfterBattleText5 + $518E = Route6EndBattleText5 + $51A2 = Route6BattleText6 + $51AC = Route6AfterBattleText6 + $51A7 = Route6EndBattleText6 + $50D7 = Route6TrainerHeader0 + $50E3 = Route6TrainerHeader1 + $50EF = Route6TrainerHeader2 + $50FB = Route6TrainerHeader3 + $5107 = Route6TrainerHeader4 + $5113 = Route6TrainerHeader5 + $51E3 = Route8TrainerHeaders + $51C9 = Route8ScriptPointers + $5250 = Route8Text1 + $5269 = Route8Text2 + $5282 = Route8Text3 + $529B = Route8Text4 + $52B4 = Route8Text5 + $52CD = Route8Text6 + $52E6 = Route8Text7 + $52FF = Route8Text8 + $5318 = Route8Text9 + $5331 = Route8Text10 + $525A = Route8BattleText1 + $5264 = Route8AfterBattleText1 + $525F = Route8EndBattleText1 + $5273 = Route8BattleText2 + $527D = Route8AfterBattleText2 + $5278 = Route8EndBattleText2 + $528C = Route8BattleText3 + $5296 = Route8AfterBattleText3 + $5291 = Route8EndBattleText3 + $52A5 = Route8BattleText4 + $52AF = Route8AfterBattleText4 + $52AA = Route8EndBattleText4 + $52BE = Route8BattleText5 + $52C8 = Route8AfterBattleText5 + $52C3 = Route8EndBattleText5 + $52D7 = Route8BattleText6 + $52E1 = Route8AfterBattleText6 + $52DC = Route8EndBattleText6 + $52F0 = Route8BattleText7 + $52FA = Route8AfterBattleText7 + $52F5 = Route8EndBattleText7 + $5309 = Route8BattleText8 + $5313 = Route8AfterBattleText8 + $530E = Route8EndBattleText8 + $5322 = Route8BattleText9 + $532C = Route8AfterBattleText9 + $5327 = Route8EndBattleText9 + $51E3 = Route8TrainerHeader0 + $51EF = Route8TrainerHeader1 + $51FB = Route8TrainerHeader2 + $5207 = Route8TrainerHeader3 + $5213 = Route8TrainerHeader4 + $521F = Route8TrainerHeader5 + $522B = Route8TrainerHeader6 + $5237 = Route8TrainerHeader7 + $5243 = Route8TrainerHeader8 + $5363 = Route10TrainerHeaders + $5349 = Route10ScriptPointers + $53AC = Route10Text1 + $53C5 = Route10Text2 + $53DE = Route10Text3 + $53F7 = Route10Text4 + $5410 = Route10Text5 + $5429 = Route10Text6 + $5442 = Route10Text7 + $5442 = Route10Text9 + $5447 = Route10Text10 + $53B6 = Route10BattleText1 + $53C0 = Route10AfterBattleText1 + $53BB = Route10EndBattleText1 + $53CF = Route10BattleText2 + $53D9 = Route10AfterBattleText2 + $53D4 = Route10EndBattleText2 + $53E8 = Route10BattleText3 + $53F2 = Route10AfterBattleText3 + $53ED = Route10EndBattleText3 + $5401 = Route10BattleText4 + $540B = Route10AfterBattleText4 + $5406 = Route10EndBattleText4 + $541A = Route10BattleText5 + $5424 = Route10AfterBattleText5 + $541F = Route10EndBattleText5 + $5433 = Route10BattleText6 + $543D = Route10AfterBattleText6 + $5438 = Route10EndBattleText6 + $5363 = Route10TrainerHeader0 + $536F = Route10TrainerHeader1 + $537B = Route10TrainerHeader2 + $5387 = Route10TrainerHeader3 + $5393 = Route10TrainerHeader4 + $539F = Route10TrainerHeader5 + $547B = Route11TrainerHeaders + $545F = Route11ScriptPointers + $54F4 = Route11Text1 + $550D = Route11Text2 + $5526 = Route11Text3 + $553F = Route11Text4 + $5558 = Route11Text5 + $5571 = Route11Text6 + $558A = Route11Text7 + $55A3 = Route11Text8 + $55BC = Route11Text9 + $55D5 = Route11Text10 + $55EE = Route11Text11 + $54FE = Route11BattleText1 + $5508 = Route11AfterBattleText1 + $5503 = Route11EndBattleText1 + $5517 = Route11BattleText2 + $5521 = Route11AfterBattleText2 + $551C = Route11EndBattleText2 + $5530 = Route11BattleText3 + $553A = Route11AfterBattleText3 + $5535 = Route11EndBattleText3 + $5549 = Route11BattleText4 + $5553 = Route11AfterBattleText4 + $554E = Route11EndBattleText4 + $5562 = Route11BattleText5 + $556C = Route11AfterBattleText5 + $5567 = Route11EndBattleText5 + $557B = Route11BattleText6 + $5585 = Route11AfterBattleText6 + $5580 = Route11EndBattleText6 + $5594 = Route11BattleText7 + $559E = Route11AfterBattleText7 + $5599 = Route11EndBattleText7 + $55AD = Route11BattleText8 + $55B7 = Route11AfterBattleText8 + $55B2 = Route11EndBattleText8 + $55C6 = Route11BattleText9 + $55D0 = Route11AfterBattleText9 + $55CB = Route11EndBattleText9 + $55DF = Route11BattleText10 + $55E9 = Route11AfterBattleText10 + $55E4 = Route11EndBattleText10 + $547B = Route11TrainerHeader0 + $5487 = Route11TrainerHeader1 + $5493 = Route11TrainerHeader2 + $549F = Route11TrainerHeader3 + $54AB = Route11TrainerHeader4 + $54B7 = Route11TrainerHeader5 + $54C3 = Route11TrainerHeader6 + $54CF = Route11TrainerHeader7 + $54DB = Route11TrainerHeader8 + $54E7 = Route11TrainerHeader9 + $5691 = Route12TrainerHeaders + $5611 = Route12ScriptPointers + $5619 = Route12Script0 + $564C = Route12Script3 + $56E6 = Route12Text1 + $56F5 = Route12Text2 + $570E = Route12Text3 + $5727 = Route12Text4 + $5740 = Route12Text5 + $5759 = Route12Text6 + $5772 = Route12Text7 + $578B = Route12Text8 + $57A4 = Route12Text11 + $57A9 = Route12Text12 + $56EB = Route12Text13 + $56F0 = Route12Text14 + $56FF = Route12BattleText1 + $5709 = Route12AfterBattleText1 + $5704 = Route12EndBattleText1 + $5718 = Route12BattleText2 + $5722 = Route12AfterBattleText2 + $571D = Route12EndBattleText2 + $5731 = Route12BattleText3 + $573B = Route12AfterBattleText3 + $5736 = Route12EndBattleText3 + $574A = Route12BattleText4 + $5754 = Route12AfterBattleText4 + $574F = Route12EndBattleText4 + $5763 = Route12BattleText5 + $576D = Route12AfterBattleText5 + $5768 = Route12EndBattleText5 + $577C = Route12BattleText6 + $5786 = Route12AfterBattleText6 + $5781 = Route12EndBattleText6 + $5795 = Route12BattleText7 + $579F = Route12AfterBattleText7 + $579A = Route12EndBattleText7 + $5691 = Route12TrainerHeader0 + $569D = Route12TrainerHeader1 + $56A9 = Route12TrainerHeader2 + $56B5 = Route12TrainerHeader3 + $56C1 = Route12TrainerHeader4 + $56CD = Route12TrainerHeader5 + $56D9 = Route12TrainerHeader6 + $57DF = Route15TrainerHeaders + $57C1 = Route15ScriptPointers + $5858 = Route15Text1 + $585E = Route15Text2 + $5864 = Route15Text3 + $586A = Route15Text4 + $5870 = Route15Text5 + $5876 = Route15Text6 + $587C = Route15Text7 + $5882 = Route15Text8 + $5888 = Route15Text9 + $588E = Route15Text10 + $592E = Route15Text12 + $5898 = Route15BattleText1 + $58A2 = Route15AfterBattleText1 + $589D = Route15EndBattleText1 + $58A7 = Route15BattleText2 + $58B1 = Route15AfterBattleText2 + $58AC = Route15EndBattleText2 + $58B6 = Route15BattleText3 + $58C0 = Route15AfterBattleText3 + $58BB = Route15EndBattleText3 + $58C5 = Route15BattleText4 + $58CF = Route15AfterBattleText4 + $58CA = Route15EndBattleText4 + $58D4 = Route15BattleText5 + $58DE = Route15AfterBattleText5 + $58D9 = Route15EndBattleText5 + $58E3 = Route15BattleText6 + $58ED = Route15AfterBattleText6 + $58E8 = Route15EndBattleText6 + $58F2 = Route15BattleText7 + $58FC = Route15AfterBattleText7 + $58F7 = Route15EndBattleText7 + $5901 = Route15BattleText8 + $590B = Route15AfterBattleText8 + $5906 = Route15EndBattleText8 + $5910 = Route15BattleText9 + $591A = Route15AfterBattleText9 + $5915 = Route15EndBattleText9 + $591F = Route15BattleText10 + $5929 = Route15AfterBattleText10 + $5924 = Route15EndBattleText10 + $57DF = Route15TrainerHeader0 + $57EB = Route15TrainerHeader1 + $57F7 = Route15TrainerHeader2 + $5803 = Route15TrainerHeader3 + $580F = Route15TrainerHeader4 + $581B = Route15TrainerHeader5 + $5827 = Route15TrainerHeader6 + $5833 = Route15TrainerHeader7 + $583F = Route15TrainerHeader8 + $584B = Route15TrainerHeader9 + $59CF = Route16TrainerHeaders + $5951 = Route16ScriptPointers + $5959 = Route16Script0 + $598F = Route16Script3 + $5946 = Route16Script_59946 + $5A18 = Route16Text1 + $5A31 = Route16Text2 + $5A4A = Route16Text3 + $5A63 = Route16Text4 + $5A7C = Route16Text5 + $5A95 = Route16Text6 + $5AAE = Route16Text7 + $5ABD = Route16Text8 + $5AC2 = Route16Text9 + $5AB3 = Route16Text10 + $5AB8 = Route16Text11 + $5A22 = Route16BattleText1 + $5A2C = Route16AfterBattleText1 + $5A27 = Route16EndBattleText1 + $5A3B = Route16BattleText2 + $5A45 = Route16AfterBattleText2 + $5A40 = Route16EndBattleText2 + $5A54 = Route16BattleText3 + $5A5E = Route16AfterBattleText3 + $5A59 = Route16EndBattleText3 + $5A6D = Route16BattleText4 + $5A77 = Route16AfterBattleText4 + $5A72 = Route16EndBattleText4 + $5A86 = Route16BattleText5 + $5A90 = Route16AfterBattleText5 + $5A8B = Route16EndBattleText5 + $5A9F = Route16BattleText6 + $5AA9 = Route16AfterBattleText6 + $5AA4 = Route16EndBattleText6 + $59CF = Route16TrainerHeader0 + $59DB = Route16TrainerHeader1 + $59E7 = Route16TrainerHeader2 + $59F3 = Route16TrainerHeader3 + $59FF = Route16TrainerHeader4 + $5A0B = Route16TrainerHeader5 + $5AEA = Route18TrainerHeaders + $5ADA = Route18ScriptPointers + $5B0F = Route18Text1 + $5B28 = Route18Text2 + $5B41 = Route18Text3 + $5B5A = Route18Text4 + $5B5F = Route18Text5 + $5B19 = Route18BattleText1 + $5B23 = Route18AfterBattleText1 + $5B1E = Route18EndBattleText1 + $5B32 = Route18BattleText2 + $5B3C = Route18AfterBattleText2 + $5B37 = Route18EndBattleText2 + $5B4B = Route18BattleText3 + $5B55 = Route18AfterBattleText3 + $5B50 = Route18EndBattleText3 + $5AEA = Route18TrainerHeader0 + $5AF6 = Route18TrainerHeader1 + $5B02 = Route18TrainerHeader2 + $5CD5 = FanClubBlocks + $5B84 = FanClubTextPointers + $5B70 = FanClubScript + $5C97 = FanClubObject + $5B94 = FanClubText1 + $5BC1 = FanClubText2 + $5BEE = FanClubText3 + $5C05 = FanClubText4 + $5C1C = FanClubText5 + $5C88 = FanClubText6 + $5C8D = FanClubText7 + $5C92 = FanClubText8 + $5BB7 = FanClubText1.normaltext + $5BBC = FanClubText1.bettertext + $5BE4 = FanClubText2.normaltext + $5BE9 = FanClubText2.bettertext + $5C00 = FanClubText3.text + $5C17 = FanClubText4.text + $5B73 = FanClubBikeInBag + $5C65 = FanClubText5.meetchairtext + $5C6A = FanClubText5.storytext + $5C6F = FanClubText5.receivedvouchertext + $5C83 = FanClubText5.bagfulltext + $5C79 = FanClubText5.nostorytext + $5C7E = FanClubText5.finaltext + $5EC8 = SilphCo2Blocks + $5D86 = SilphCo2TextPointers + $5CF1 = SilphCo2Script + $5E66 = SilphCo2Object + $5D07 = SilphCo2Script_59d07 + $5D90 = SilphCo2TrainerHeaders + $5D80 = SilphCo2ScriptPointers + $5D3E = DataTable_59d3e + $5D43 = SilphCo2Script_59d43 + $5D6F = SilphCo2Script_59d6f + $5DC1 = SilphCo2Text1 + $5E02 = SilphCo2Text2 + $5E0C = SilphCo2Text3 + $5E16 = SilphCo2Text4 + $5E20 = SilphCo2Text5 + $5E2A = SilphCo2BattleText1 + $5E34 = SilphCo2AfterBattleText1 + $5E2F = SilphCo2EndBattleText1 + $5E39 = SilphCo2BattleText2 + $5E43 = SilphCo2AfterBattleText2 + $5E3E = SilphCo2EndBattleText2 + $5E48 = SilphCo2BattleText3 + $5E52 = SilphCo2AfterBattleText3 + $5E4D = SilphCo2EndBattleText3 + $5E57 = SilphCo2BattleText4 + $5E61 = SilphCo2AfterBattleText4 + $5E5C = SilphCo2EndBattleText4 + $5DED = SilphCo2Text_59ded + $5DFD = TM36NoRoomText + $5DF2 = ReceivedTM36Text + $5DF8 = TM36ExplanationText + $5D90 = SilphCo2TrainerHeader0 + $5D9C = SilphCo2TrainerHeader1 + $5DA8 = SilphCo2TrainerHeader2 + $5DB4 = SilphCo2TrainerHeader3 + $60A6 = SilphCo3Blocks + $5FC4 = SilphCo3TextPointers + $5F5B = SilphCo3Script + $6035 = SilphCo3Object + $5F71 = SilphCo3Script_59f71 + $5FCC = SilphCo3TrainerHeaders + $5FBE = SilphCo3ScriptPointers + $5FA8 = DataTable_59fa8 + $5FAD = SilphCo3Script_59fad + $5FE5 = SilphCo3Text1 + $6003 = SilphCo3Text2 + $601C = SilphCo3Text3 + $600D = SilphCo3BattleText1 + $6017 = SilphCo3AfterBattleText1 + $6012 = SilphCo3EndBattleText1 + $6026 = SilphCo3BattleText2 + $6030 = SilphCo3AfterBattleText2 + $602B = SilphCo3EndBattleText2 + $5FFE = SilphCo3Text_59ffe + $5FF9 = SilphCo3Text_59ff9 + $5FCC = SilphCo3TrainerHeader0 + $5FD8 = SilphCo3TrainerHeader1 + $625A = SilphCo10Blocks + $6186 = SilphCo10TextPointers + $6139 = SilphCo10Script + $61FB = SilphCo10Object + $614F = SilphCo10Script_5a14f + $6192 = SilphCo10TrainerHeaders + $6180 = SilphCo10ScriptPointers + $6173 = DataTable_5a173 + $6176 = SilphCo10Text_5a176 + $61AB = SilphCo10Text1 + $61B5 = SilphCo10Text2 + $61BF = SilphCo10Text3 + $61DD = SilphCo10BattleText1 + $61E7 = SilphCo10AfterBattleText1 + $61E2 = SilphCo10EndBattleText1 + $61EC = SilphCo10BattleText2 + $61F6 = SilphCo10AfterBattleText2 + $61F1 = SilphCo10EndBattleText2 + $6192 = SilphCo10TrainerHeader0 + $619E = SilphCo10TrainerHeader1 + $61D8 = SilphCo10Text_5a1d8 + $61D3 = SilphCo10Text_5a1d3 + $63E9 = LanceBlocks + $6395 = LanceTextPointers + $62AE = LanceScript + $63C5 = LanceObject + $62C4 = LanceScript_5a2c4 + $6397 = LanceTrainerHeaders + $62FA = LanceScriptPointers + $62DE = LanceScript_5a2de + $62F0 = LanceScript_5a2f0 + $6305 = LanceScript0 + $6349 = LanceScript2 + $6382 = LanceScript3 + $6304 = LanceScript4 + $633E = CoordsData_5a33e + $62F5 = LanceScript_5a2f5 + $6379 = RLEList_5a379 + $63A4 = LanceText1 + $63AE = LanceBeforeBattleText + $63B8 = LanceAfterBattleText + $63B3 = LanceEndBattleText + $6397 = LanceTrainerHeader0 + $658B = HallofFameRoomBlocks + $656A = HallofFameRoomTextPointers + $649E = HallofFameRoomScript + $6571 = HallofFameRoomObject + $64B2 = HallofFameRoomScriptPointers + $650D = HallofFameRoomScript0 + $652B = HallofFameRoomScript1 + $64BB = HallofFameRoomScript2 + $64BA = HallofFameRoomScript3 + $6528 = RLEMovement5a528 + $656C = HallofFameRoomText1 + $65B7 = GuardDrinksList + SLACK: $1A45 bytes + +Bank #23: + SECTION: $4000-$5F14 ($1F15 bytes) + $40A4 = RedsHouse2F_h + $557B = ViridianForestExit_h + $55C8 = Route2Gate_h + $5650 = ViridianForestEntrance_h + $40EB = Museum1F_h + $430B = Museum2F_h + $437B = PewterGym_h + $457B = PewterPokecenter_h + $4639 = CeruleanPokecenter_h + $46A7 = CeruleanGym_h + $4889 = CeruleanMart_h + $569D = UndergroundPathEntranceRoute5_h + $56E3 = UndergroundPathEntranceRoute6_h + $5720 = UndergroundPathEntranceRoute7_h + $575D = UndergroundPathEntranceRoute7Copy_h + $4983 = VermilionPokecenter_h + $49D5 = VermilionMart_h + $4A1A = VermilionGym_h + $59FE = VictoryRoad1_h + $48CE = LavenderPokecenter_h + $4920 = LavenderMart_h + $4C65 = CopycatsHouse2F_h + $4D51 = FightingDojo_h + $5001 = SaffronGym_h + $53FD = SaffronMart_h + $5442 = SilphCo1_h + $5529 = SaffronPokecenter_h + $57AF = SilphCo9_h + $5B8E = RedBedroomPC + $5B81 = RedBedroomSNESText + $5BBE = AerodactylFossilText + $5BA8 = Route15UpstairsBinocularsText + $5BD4 = KabutopsFossilText + $5CED = ViridianSchoolBlackboard + $5DF7 = VermilionGymTrashText + $5C29 = LinkCableHelp + $5EC8 = VermilionGymTrashSuccesText1 + $5EDB = VermilionGymTrashSuccesText2 + $5EEF = VermilionGymTrashSuccesText3 + $5F02 = VermilionGymTrashFailText + $5B86 = OpenRedsPC + $5B79 = PrintRedsNESText + $5C1A = PrintBlackboardLinkCableText + $5BAD = AerodactylFossil + $5BC3 = KabutopsFossil + $5DEF = PrintTrashText + $5DFC = GymTrashScript + $5B8F = Route15GateLeftBinoculars + $5B5E = SetPartyMonTypes + $40DC = StarterDex + $4010 = RedsHouse2FBlocks + $40CF = RedsHouse2FTextPointers + $40B0 = RedsHouse2FScript + $40D0 = RedsHouse2FObject + $40BC = RedsHouse2FScriptPointers + $40C0 = RedsHouse2FScript0 + $40CE = RedsHouse2FScript1 + $4020 = Museum1FBlocks + $412B = Museum1FTextPointers + $40F7 = Museum1FScript + $42C1 = Museum1FObject + $4109 = Museum1FScriptPointers + $410D = Museum1FScript0 + $412A = Museum1FScript1 + $4135 = Museum1FText1 + $4247 = Museum1FText2 + $4256 = Museum1FText3 + $42A3 = Museum1FText4 + $42B2 = Museum1FText5 + $41F9 = Museum1FScript_5c1f9 + $423D = Museum1FText_5c23d + $4217 = asm_d1145 + $4242 = Museum1FText_5c242 + $421F = Museum1FText_5c21f + $4229 = Museum1FText_5c229 + $41DA = Museum1FText1.asm_de133 + $4224 = Museum1FText_5c224 + $421A = Museum1FText_5c21a + $422E = Museum1FText_5c22e + $4233 = Museum1FText_5c233 + $4238 = Museum1FText_5c238 + $4251 = Museum1FText_5c251 + $428E = Museum1FText_5c28e + $4293 = ReceivedOldAmberText + $429E = Museum1FText_5c29e + $4299 = Museum1FText_5c299 + $42AD = Museum1FText_5c2ad + $42BC = Museum1FText_5c2bc + $4048 = Museum2FBlocks + $431A = Museum2FTextPointers + $4317 = Museum2FScript + $434B = Museum2FObject + $4328 = Museum2FText1 + $432D = Museum2FText2 + $4332 = Museum2FText3 + $4337 = Museum2FText4 + $433C = Museum2FText5 + $4341 = Museum2FText6 + $4346 = Museum2FText7 + $4558 = PewterGymBlocks + $4435 = PewterGymTextPointers + $4387 = PewterGymScript + $452E = PewterGymObject + $43A4 = PewterGymScript_5c3a4 + $4441 = PewterGymTrainerHeaders + $43CA = PewterGymScriptPointers + $43AD = Gym1CityName + $43B9 = Gym1LeaderName + $43D2 = PewterGymScript3 + $43BF = PewterGymScript_5c3bf + $444E = PewterGymText1 + $44C6 = PewterGymText2 + $44DF = PewterGymText3 + $44A8 = PewterGymText4 + $44AD = PewterGymText5 + $44B7 = PewterGymText6 + $44D0 = PewterGymBattleText1 + $44DA = PewterGymAfterBattleText1 + $44D5 = PewterGymEndBattleText1 + $43DF = PewterGymScript_5c3df + $44A3 = PewterGymText_5c4a3 + $449E = PewterGymText_5c49e + $44BC = PewterGymText_5c4bc + $4441 = PewterGymTrainerHeader0 + $4515 = PewterGymText_5c515 + $451A = PewterGymText_5c51a + $4524 = PewterGymText_5c524 + $451F = PewterGymText_5c51f + $4529 = PewterGymText_5c529 + $4064 = PewterPokecenterBlocks + $458D = PewterPokecenterTextPointers + $4587 = PewterPokecenterScript + $460D = PewterPokecenterObject + $4595 = PewterPokecenterText1 + $4596 = PewterPokecenterText2 + $459B = PewterPokecenterText3 + $460C = PewterPokecenterText4 + $4603 = PewterPokecenterText5 + $4608 = Unknown_5c608 + $468B = CeruleanPokecenterBlocks + $464B = CeruleanPokecenterTextPointers + $4645 = CeruleanPokecenterScript + $465F = CeruleanPokecenterObject + $4654 = CeruleanPokecenterText1 + $4655 = CeruleanPokecenterText2 + $465A = CeruleanPokecenterText3 + $4653 = CeruleanPokecenterText4 + $4866 = CeruleanGymBlocks + $474A = CeruleanGymTextPointers + $46B3 = CeruleanGymScript + $4834 = CeruleanGymObject + $46D0 = CeruleanGymScript_5c6d0 + $4758 = CeruleanGymTrainerHeaders + $46F8 = CeruleanGymScriptPointers + $46D9 = Gym2CityName + $46E7 = Gym2LeaderName + $4700 = CeruleanGymScript3 + $46ED = CeruleanGymScript_5c6ed + $4771 = CeruleanGymText1 + $47DF = CeruleanGymText2 + $47F8 = CeruleanGymText3 + $4811 = CeruleanGymText4 + $47C8 = CeruleanGymText5 + $47CD = CeruleanGymText6 + $47D3 = CeruleanGymText7 + $47E9 = CeruleanGymBattleText1 + $47F3 = CeruleanGymAfterBattleText1 + $47EE = CeruleanGymEndBattleText1 + $4802 = CeruleanGymBattleText2 + $480C = CeruleanGymAfterBattleText2 + $4807 = CeruleanGymEndBattleText2 + $470D = CeruleanGymScript_5c70d + $47C3 = CeruleanGymText_5c7c3 + $47BE = CeruleanGymText_5c7be + $47D8 = CeruleanGymText_5c7d8 + $4758 = CeruleanGymTrainerHeader0 + $4764 = CeruleanGymTrainerHeader1 + $482A = CeruleanGymText_5c82a + $482F = CeruleanGymText_5c82f + $4000 = CeruleanMartBlocks + $4898 = CeruleanMartTextPointers + $4895 = CeruleanMartScript + $48A8 = CeruleanMartObject + $489E = CeruleanMartText2 + $48A3 = CeruleanMartText3 + $4064 = LavenderPokecenterBlocks + $48E0 = LavenderPokecenterTextPointers + $48DA = LavenderPokecenterScript + $48F4 = LavenderPokecenterObject + $48E9 = LavenderPokecenterText1 + $48EA = LavenderPokecenterText2 + $48EF = LavenderPokecenterText3 + $48E8 = LavenderPokecenterText4 + $4000 = LavenderMartBlocks + $492F = LavenderMartTextPointers + $492C = LavenderMartScript + $495D = LavenderMartObject + $4935 = LavenderMartText2 + $493A = LavenderMartText3 + $4953 = LavenderMart_5c953 + $4958 = LavenderMart_5c958 + $4064 = VermilionPokecenterBlocks + $4995 = VermilionPokecenterTextPointers + $498F = VermilionPokecenterScript + $49A9 = VermilionPokecenterObject + $499D = VermilionPokecenterText1 + $499E = VermilionPokecenterText2 + $49A3 = VermilionPokecenterText3 + $49A8 = VermilionPokecenterText4 + $4000 = VermilionMartBlocks + $49E4 = VermilionMartTextPointers + $49E1 = VermilionMartScript + $49F4 = VermilionMartObject + $49EA = VermilionMartText2 + $49EF = VermilionMartText3 + $4C38 = VermilionGymBlocks + $4AE8 = VermilionGymTextPointers + $4A26 = VermilionGymScript + $4BFE = VermilionGymObject + $4A4C = VermilionGymScript_5ca4c + $4A6D = VermilionGymScript_5ca6d + $4AF8 = VermilionGymTrainerHeader0 + $4A95 = VermilionGymScriptPointers + $4A55 = Gym3CityName + $4A64 = Gym3LeaderName + $4A9D = VermilionGymScript3 + $4A8A = VermilionGymScript_5ca8a + $4B1D = VermilionGymText1 + $4B90 = VermilionGymText2 + $4BA9 = VermilionGymText3 + $4BC2 = VermilionGymText4 + $4BDB = VermilionGymText5 + $4B77 = VermilionGymText6 + $4B7C = VermilionGymText7 + $4B86 = VermilionGymText8 + $4B9A = VermilionGymBattleText1 + $4BA4 = VermilionGymAfterBattleText1 + $4B9F = VermilionGymEndBattleText1 + $4BB3 = VermilionGymBattleText2 + $4BBD = VermilionGymAfterBattleText2 + $4BB8 = VermilionGymEndBattleText2 + $4BCC = VermilionGymBattleText3 + $4BD6 = VermilionGymAfterBattleText3 + $4BD1 = VermilionGymEndBattleText3 + $4AAA = VermilionGymScript_5caaa + $4B72 = VermilionGymText_5cb72 + $4B6D = VermilionGymText_5cb6d + $4B8B = ReceivedThunderbadgeText + $4B04 = VermilionGymTrainerHeader1 + $4B10 = VermilionGymTrainerHeader2 + $4BF4 = VermilionGymText_5cbf4 + $4BF9 = VermilionGymText_5cbf9 + $4010 = CopycatsHouse2FBlocks + $4C74 = CopycatsHouse2FTextPointers + $4C71 = CopycatsHouse2FScript + $4D21 = CopycatsHouse2FObject + $4C82 = CopycatsHouse2FText1 + $4CF4 = CopycatsHouse2FText2 + $4CF9 = CopycatsHouse2FText3 + $4CF9 = CopycatsHouse2FText4 + $4CF9 = CopycatsHouse2FText5 + $4CFE = CopycatsHouse2FText6 + $4D03 = CopycatsHouse2FText7 + $4CD4 = CopycatsHouse2FText_5ccd4 + $4CD9 = TM31PreReceiveText + $4CDE = ReceivedTM31Text + $4CEE = TM31NoRoomText + $4CE9 = TM31ExplanationText2 + $4D1C = CopycatsHouse2FText_5cd1c + $4D17 = CopycatsHouse2FText_5cd17 + $4FE3 = FightingDojoBlocks + $4E03 = FightingDojoTextPointers + $4D5D = FightingDojoScript + $4F9B = FightingDojoObject + $4E13 = FightingDojoTrainerHeaders + $4D7B = FightingDojoScriptPointers + $4D83 = FightingDojoScript1 + $4DC6 = FightingDojoScript3 + $4D70 = FightingDojoScript_5cd70 + $4E44 = FightingDojoText1 + $4EA2 = FightingDojoText2 + $4EBB = FightingDojoText3 + $4ED4 = FightingDojoText4 + $4EED = FightingDojoText5 + $4F06 = FightingDojoText6 + $4F4E = FightingDojoText7 + $4E98 = FightingDojoText8 + $4EAC = FightingDojoBattleText1 + $4EB6 = FightingDojoAfterBattleText1 + $4EB1 = FightingDojoEndBattleText1 + $4EC5 = FightingDojoBattleText2 + $4ECF = FightingDojoAfterBattleText2 + $4ECA = FightingDojoEndBattleText2 + $4EDE = FightingDojoBattleText3 + $4EE8 = FightingDojoAfterBattleText3 + $4EE3 = FightingDojoEndBattleText3 + $4EF7 = FightingDojoBattleText4 + $4F01 = FightingDojoAfterBattleText4 + $4EFC = FightingDojoEndBattleText4 + $4E7D = FightingDojoText1.continue1 + $4E85 = FightingDojoText1.continue2 + $4E8E = FightingDojoText_5ce8e + $4E93 = FightingDojoText_5ce93 + $4E9D = FightingDojoText_5ce9d + $4E13 = FightingDojoTrainerHeader0 + $4E1F = FightingDojoTrainerHeader1 + $4E2B = FightingDojoTrainerHeader2 + $4E37 = FightingDojoTrainerHeader3 + $4F96 = OtherHitmonText + $4F49 = WantHitmonleeText + $4F91 = WantHitmonchanText + $53A3 = SaffronGymBlocks + $50AB = SaffronGymTextPointers + $500D = SaffronGymScript + $5259 = SaffronGymObject + $502A = SaffronGymScript.extra + $50C3 = SaffronGymTrainerHeader0 + $5053 = SaffronGymScriptPointers + $5033 = Gym6CityName + $5040 = Gym6LeaderName + $505B = SaffronGymScript3 + $5048 = SaffronGymText_5d048 + $5118 = SaffronGymText1 + $5187 = SaffronGymText2 + $5191 = SaffronGymText3 + $519B = SaffronGymText4 + $51A5 = SaffronGymText5 + $51AF = SaffronGymText6 + $51B9 = SaffronGymText7 + $51C3 = SaffronGymText8 + $51CD = SaffronGymText9 + $5173 = SaffronGymText10 + $5178 = SaffronGymText11 + $5182 = SaffronGymText12 + $51F0 = SaffronGymBattleText1 + $51FA = SaffronGymAfterBattleText1 + $51F5 = SaffronGymEndBattleText1 + $51FF = SaffronGymBattleText2 + $5209 = SaffronGymAfterBattleText2 + $5204 = SaffronGymEndBattleText2 + $520E = SaffronGymBattleText3 + $5218 = SaffronGymAfterBattleText3 + $5213 = SaffronGymEndBattleText3 + $521D = SaffronGymBattleText4 + $5227 = SaffronGymAfterBattleText4 + $5222 = SaffronGymEndBattleText4 + $522C = SaffronGymBattleText5 + $5236 = SaffronGymAfterBattleText5 + $5231 = SaffronGymEndBattleText5 + $523B = SaffronGymBattleText6 + $5245 = SaffronGymAfterBattleText6 + $5240 = SaffronGymEndBattleText6 + $524A = SaffronGymBattleText7 + $5254 = SaffronGymAfterBattleText7 + $524F = SaffronGymEndBattleText7 + $5068 = SaffronGymText_5d068 + $516E = SaffronGymText_5d16e + $5162 = SaffronGymText_5d162 + $5167 = SaffronGymText_5d167 + $50CF = SaffronGymTrainerHeader1 + $50DB = SaffronGymTrainerHeader2 + $50E7 = SaffronGymTrainerHeader3 + $50F3 = SaffronGymTrainerHeader4 + $50FF = SaffronGymTrainerHeader5 + $510B = SaffronGymTrainerHeader6 + $51E6 = SaffronGymText_5d1e6 + $51EB = SaffronGymText_5d1eb + $4000 = SaffronMartBlocks + $540C = SaffronMartTextPointers + $5409 = SaffronMartScript + $541C = SaffronMartObject + $5412 = SaffronMartText2 + $5417 = SaffronMartText3 + $54A2 = SilphCo1Blocks + $5469 = SilphCo1TextPointers + $544E = SilphCo1Script + $5470 = SilphCo1Object + $546B = SilphCo1Text1 + $4064 = SaffronPokecenterBlocks + $553B = SaffronPokecenterTextPointers + $5535 = SaffronPokecenterScript + $554F = SaffronPokecenterObject + $5543 = SaffronPokecenterText1 + $5544 = SaffronPokecenterText2 + $5549 = SaffronPokecenterText3 + $554E = SaffronPokecenterText4 + $4090 = ViridianForestExitBlocks + $558A = ViridianForestExitTextPointers + $5587 = ViridianForestExitScript + $5598 = ViridianForestExitObject + $558E = ViridianForestExitText1 + $5593 = ViridianForestExitText2 + $4090 = Route2GateBlocks + $55D7 = Route2GateTextPointers + $55D4 = Route2GateScript + $5620 = Route2GateObject + $55DB = Route2GateText1 + $561B = Route2GateText2 + $5616 = Route2GateText_5d616 + $4090 = ViridianForestEntranceBlocks + $565F = ViridianForestEntranceTextPointers + $565C = ViridianForestEntranceScript + $566D = ViridianForestEntranceObject + $5663 = ViridianForestEntranceText1 + $5668 = ViridianForestEntranceText2 + $4080 = UndergroundPathEntranceRoute5Blocks + $56B0 = UndergroundPathEntranceRoute5TextPointers + $56A9 = UndergroundPathEntranceRoute5Script + $56C1 = UndergroundPathEntranceRoute5Object + $56B2 = UndergroundPathEntranceRoute5Text1 + $56AF = UndergroundPathEntranceRoute5_5d6af + $4080 = UndergroundPathEntranceRoute6Blocks + $56F7 = UndergroundPathEntranceRoute6TextPointers + $56EF = UndergroundPathEntranceRoute6Script + $56FE = UndergroundPathEntranceRoute6Object + $56F9 = UndergroundPathEntranceRoute6Text1 + $4080 = UndergroundPathEntranceRoute7Blocks + $5734 = UndergroundPathEntranceRoute7TextPointers + $572C = UndergroundPathEntranceRoute7Script + $573B = UndergroundPathEntranceRoute7Object + $5736 = UndergroundPathEntranceRoute7Text1 + $4080 = UndergroundPathEntranceRoute7CopyBlocks + $576F = UndergroundPathEntranceRoute7CopyTextPointers + $5769 = UndergroundPathEntranceRoute7CopyScript + $5787 = UndergroundPathEntranceRoute7CopyObject + $5773 = UnnamedText_5d773 + $577D = UnnamedText_5d77d + $5989 = SilphCo9Blocks + $588B = SilphCo9TextPointers + $57BB = SilphCo9Script + $593F = SilphCo9Object + $57D1 = SilphCo9Script_5d7d1 + $5893 = SilphCo9TrainerHeaders + $5885 = SilphCo9ScriptPointers + $582E = DataTable_5d82e + $5837 = SilphCo9Script_5d837 + $5863 = SilphCo9Script_5d863 + $58B8 = SilphCo9Text1 + $58F4 = SilphCo9Text2 + $58FE = SilphCo9Text3 + $5908 = SilphCo9Text4 + $5912 = SilphCo9BattleText1 + $591C = SilphCo9AfterBattleText1 + $5917 = SilphCo9EndBattleText1 + $5921 = SilphCo9BattleText2 + $592B = SilphCo9AfterBattleText2 + $5926 = SilphCo9EndBattleText2 + $5930 = SilphCo9BattleText3 + $593A = SilphCo9AfterBattleText3 + $5935 = SilphCo9EndBattleText3 + $58E5 = SilphCo9Text_5d8e5 + $58EA = SilphCo9Text_5d8ea + $58EF = SilphCo9Text_5d8ef + $5893 = SilphCo9TrainerHeader0 + $589F = SilphCo9TrainerHeader1 + $58AB = SilphCo9TrainerHeader2 + $5B04 = VictoryRoad1Blocks + $5A5F = VictoryRoad1TextPointers + $5A0A = VictoryRoad1Script + $5AB8 = VictoryRoad1Object + $5A27 = VictoryRoad1Script.next + $5A6D = VictoryRoad1TrainerHeaders + $5A3A = VictoryRoad1ScriptPointers + $5A40 = VictoryRoad1Script0 + $5A5C = CoordsData_5da5c + $5A86 = VictoryRoad1Text1 + $5A90 = VictoryRoad1Text2 + $5A9A = VictoryRoad1BattleText1 + $5AA4 = VictoryRoad1AfterBattleText1 + $5A9F = VictoryRoad1EndBattleText1 + $5AA9 = VictoryRoad1BattleText2 + $5AB3 = VictoryRoad1AfterBattleText2 + $5AAE = VictoryRoad1EndBattleText2 + $5A6D = VictoryRoad1TrainerHeader0 + $5A79 = VictoryRoad1TrainerHeader1 + $5BD9 = DisplayMonFrontSpriteInBox + $5C9E = LinkCableHelpText1 + $5CA8 = HowToLinkText + $5CA3 = LinkCableHelpText2 + $5CD8 = LinkCableInfoTexts + $5C51 = LinkCableHelp.asm_5c51 + $5CDE = LinkCableInfoText1 + $5CE3 = LinkCableInfoText2 + $5CE8 = LinkCableInfoText3 + $5DA2 = ViridianSchoolBlackboardText1 + $5DAC = StatusAilmentText1 + $5DBB = StatusAilmentText2 + $5DA7 = ViridianSchoolBlackboardText2 + $5DCC = ViridianBlackboardStatusPointers + $5D15 = ViridianSchoolBlackboard.asm_5dd15 + $5DD6 = ViridianBlackboardSleepText + $5DDB = ViridianBlackboardPoisonText + $5DE0 = ViridianBlackbaordPrlzText + $5DE5 = ViridianBlackboardBurnText + $5DEA = ViridianBlackboardFrozenText + $5E7D = GymTrashCans + SLACK: $20EB bytes + +Bank #24: + SECTION: $4000-$6529 ($252A bytes) + $5101 = ViridianForest_h + $5259 = SSAnne1_h + $5393 = SSAnne2_h + $5622 = SSAnne4_h + $56A2 = SSAnne5_h + $57A7 = SSAnne6_h + $5889 = SSAnne7_h + $596A = SSAnne8_h + $5B3F = SSAnne9_h + $5D49 = SSAnne10_h + $5F1A = UndergroundPathNS_h + $5F3E = UndergroundPathWE_h + $4F7A = CeladonMart1_h + $4420 = PokemonTower1_h + $44E6 = PokemonTower2_h + $46C0 = PokemonTower3_h + $47EA = PokemonTower4_h + $4926 = PokemonTower5_h + $4AE3 = PokemonTower6_h + $4CF9 = PokemonTower7_h + $5F62 = DiglettsCave_h + $60EE = SilphCo11_h + $6453 = GymStatueText1 + $6458 = GymStatueText2 + $6511 = BookcaseText + $64A3 = ViridianCityPokecenterBenchGuyText + $64A8 = PewterCityPokecenterBenchGuyText + $64AD = CeruleanCityPokecenterBenchGuyText + $64B2 = LavenderCityPokecenterBenchGuyText + $64D0 = VermilionCityPokecenterBenchGuyText + $64D5 = CeladonCityPokecenterBenchGuyText + $6502 = CeladonCityHotelText + $64DA = FuchsiaCityPokecenterBenchGuyText + $64DF = CinnabarIslandPokecenterBenchGuyText + $64E4 = SaffronCityPokecenterBenchGuyText + $64B7 = MtMoonPokecenterBenchGuyText + $64BC = RockTunnelPokecenterBenchGuyText + $64C1 = UnusedBenchGuyText1 + $64C6 = UnusedBenchGuyText2 + $64CB = UnusedBenchGuyText3 + $6508 = TerminatorText_62508 + $6529 = PredefText1f + $6509 = PrintBookcaseText + $645D = PrintBenchGuyText + $6516 = OpenPokemonCenterPC + $6419 = GymStatues + $448C = PokemonTower1Blocks + $442F = PokemonTower1TextPointers + $442C = PokemonTower1Script + $4452 = PokemonTower1Object + $4439 = PokemonTower1Text1 + $443E = PokemonTower1Text2 + $4443 = PokemonTower1Text3 + $4448 = PokemonTower1Text4 + $444D = PokemonTower1Text5 + $4666 = PokemonTower2Blocks + $45DB = PokemonTower2TextPointers + $44F2 = PokemonTower2Script + $4646 = PokemonTower2Object + $4509 = PokemonTower2ScriptPointers + $450F = PokemonTower2Script0 + $4563 = PokemonTower2Script1 + $45BB = PokemonTower2Script2 + $455E = CoordsData_6055e + $44FE = PokemonTower2Script_604fe + $45B2 = MovementData_605b2 + $45A9 = MovementData_605a9 + $45DF = PokemonTower2Text1 + $4641 = PokemonTower2Text2 + $463C = PokemonTower2Text_6063c + $462D = PokemonTower2Text_6062d + $4632 = PokemonTower2Text_60632 + $4637 = PokemonTower2Text_60637 + $4790 = PokemonTower3Blocks + $46E5 = PokemonTower3TextPointers + $46CC = PokemonTower3Script + $475D = PokemonTower3Object + $46ED = PokemonTower3TrainerHeaders + $46DF = PokemonTower3ScriptPointers + $4712 = PokemonTower3Text1 + $471C = PokemonTower3Text2 + $4726 = PokemonTower3Text3 + $4730 = PokemonTower3BattleText1 + $473A = PokemonTower3AfterBattleText1 + $4735 = PokemonTower3EndBattleText1 + $473F = PokemonTower3BattleText2 + $4749 = PokemonTower3AfterBattleText2 + $4744 = PokemonTower3EndBattleText2 + $474E = PokemonTower3BattleText3 + $4758 = PokemonTower3AfterBattleText3 + $4753 = PokemonTower3EndBattleText3 + $46ED = PokemonTower3TrainerHeader0 + $46F9 = PokemonTower3TrainerHeader1 + $4705 = PokemonTower3TrainerHeader2 + $48CC = PokemonTower4Blocks + $480F = PokemonTower4TextPointers + $47F6 = PokemonTower4Script + $488B = PokemonTower4Object + $481B = PokemonTower4TrainerHeaders + $4809 = PokemonTower4ScriptPointers + $4840 = PokemonTower4Text1 + $484A = PokemonTower4Text2 + $4854 = PokemonTower4Text3 + $485E = PokemonTower4BattleText1 + $4868 = PokemonTower4AfterBattleText1 + $4863 = PokemonTower4EndBattleText1 + $486D = PokemonTower4BattleText2 + $4877 = PokemonTower4AfterBattleText2 + $4872 = PokemonTower4EndBattleText2 + $487C = PokemonTower4BattleText3 + $4886 = PokemonTower4AfterBattleText3 + $4881 = PokemonTower4EndBattleText3 + $481B = PokemonTower4TrainerHeader0 + $4827 = PokemonTower4TrainerHeader1 + $4833 = PokemonTower4TrainerHeader2 + $4A89 = PokemonTower5Blocks + $499B = PokemonTower5TextPointers + $4932 = PokemonTower5Script + $4A48 = PokemonTower5Object + $49A9 = PokemonTower5TrainerHeaders + $4945 = PokemonTower5ScriptPointers + $494B = PokemonTower5Script0 + $4992 = CoordsData_60992 + $49DA = PokemonTower5Text1 + $49DF = PokemonTower5Text2 + $49F8 = PokemonTower5Text3 + $4A11 = PokemonTower5Text4 + $4A2A = PokemonTower5Text5 + $4A43 = PokemonTower5Text7 + $49E9 = PokemonTower5BattleText1 + $49F3 = PokemonTower5AfterBattleText1 + $49EE = PokemonTower5EndBattleText1 + $4A02 = PokemonTower5BattleText2 + $4A0C = PokemonTower5AfterBattleText2 + $4A07 = PokemonTower5EndBattleText2 + $4A1B = PokemonTower5BattleText3 + $4A25 = PokemonTower5AfterBattleText3 + $4A20 = PokemonTower5EndBattleText3 + $4A34 = PokemonTower5BattleText4 + $4A3E = PokemonTower5AfterBattleText4 + $4A39 = PokemonTower5EndBattleText4 + $49A9 = PokemonTower5TrainerHeader0 + $49B5 = PokemonTower5TrainerHeader1 + $49C1 = PokemonTower5TrainerHeader2 + $49CD = PokemonTower5TrainerHeader3 + $4C95 = PokemonTower6Blocks + $4BB1 = PokemonTower6TextPointers + $4AEF = PokemonTower6Script + $4C5B = PokemonTower6Object + $4BBF = PokemonTower6TrainerHeaders + $4B0D = PokemonTower6ScriptPointers + $4B17 = PokemonTower6Script0 + $4BA1 = PokemonTower6Script3 + $4B48 = PokemonTower6Script4 + $4B45 = CoordsData_60b45 + $4B02 = PokemonTower6Script_60b02 + $4BE4 = PokemonTower6Text1 + $4BEE = PokemonTower6Text2 + $4BF8 = PokemonTower6Text3 + $4C56 = PokemonTower6Text6 + $4C02 = PokemonTower6Text7 + $4C29 = PokemonTower6BattleText1 + $4C33 = PokemonTower6AfterBattleText1 + $4C2E = PokemonTower6EndBattleText1 + $4C38 = PokemonTower6BattleText2 + $4C42 = PokemonTower6AfterBattleText2 + $4C3D = PokemonTower6EndBattleText2 + $4C47 = PokemonTower6BattleText3 + $4C51 = PokemonTower6AfterBattleText3 + $4C4C = PokemonTower6EndBattleText3 + $4BBF = PokemonTower6TrainerHeader0 + $4BCB = PokemonTower6TrainerHeader1 + $4BD7 = PokemonTower6TrainerHeader2 + $4C1F = PokemonTower2Text_60c1f + $4C24 = PokemonTower2Text_60c24 + $4F20 = PokemonTower7Blocks + $4E3F = PokemonTower7TextPointers + $4D05 = PokemonTower7Script + $4EF6 = PokemonTower7Object + $4E47 = PokemonTower7TrainerHeaders + $4D23 = PokemonTower7ScriptPointers + $4D2D = PokemonTower7Script2 + $4D56 = PokemonTower7Script3 + $4D86 = PokemonTower7Script4 + $4D18 = PokemonTower7Script_60d18 + $4DB6 = PokemonTower7Script_60db6 + $4DE3 = CoordsData_60de3 + $4E13 = MovementData_60e13 + $4E1B = MovementData_60e1b + $4E22 = MovementData_60e22 + $4E28 = MovementData_60e28 + $4E30 = MovementData_60e30 + $4E37 = MovementData_60e37 + $4E6C = PokemonTower7Text1 + $4E76 = PokemonTower7Text2 + $4E80 = PokemonTower7Text3 + $4E8A = PokemonTower7Text4 + $4EC9 = PokemonTower7BattleText1 + $4ED3 = PokemonTower7AfterBattleText1 + $4ECE = PokemonTower7EndBattleText1 + $4ED8 = PokemonTower7BattleText2 + $4EE2 = PokemonTower7AfterBattleText2 + $4EDD = PokemonTower7EndBattleText2 + $4EE7 = PokemonTower7BattleText3 + $4EF1 = PokemonTower7AfterBattleText3 + $4EEC = PokemonTower7EndBattleText3 + $4E47 = PokemonTower7TrainerHeader0 + $4E53 = PokemonTower7TrainerHeader1 + $4E5F = PokemonTower7TrainerHeader2 + $4EC4 = PokemonTower7Text_60ec4 + $4FDE = CeladonMart1Blocks + $4F89 = CeladonMart1TextPointers + $4F86 = CeladonMart1Script + $4F9E = CeladonMart1Object + $4F8F = CeladonMart1Text1 + $4F94 = CeladonMart1Text2 + $4F99 = CeladonMart1Text3 + $50C2 = Func_610c2 + $50EB = LoadFossilItemAndMonName + $50AE = LabFossil_610ae + $50B3 = LabFossil_610b3 + $50B8 = LabFossil_610b8 + $50BD = LabFossil_610bd + $4000 = ViridianForestBlocks + $5126 = ViridianForestTextPointers + $510D = ViridianForestScript + $51DA = ViridianForestObject + $5142 = ViridianForestTrainerHeaders + $5120 = ViridianForestScriptPointers + $5167 = ViridianForestText1 + $516C = ViridianForestText2 + $5176 = ViridianForestText3 + $5180 = ViridianForestText4 + $51B7 = ViridianForestText8 + $51BC = ViridianForestText9 + $51C1 = ViridianForestText10 + $51C6 = ViridianForestText11 + $51CB = ViridianForestText12 + $51D0 = ViridianForestText13 + $51D5 = ViridianForestText14 + $518A = ViridianForestBattleText1 + $5194 = ViridianForestAfterBattleText1 + $518F = ViridianForestEndBattleText1 + $5199 = ViridianForestBattleText2 + $51A3 = ViridianForestAfterBattleText2 + $519E = ViridianForestEndBattleText2 + $51A8 = ViridianForestBattleText3 + $51B2 = ViridianForestAfterBattleText3 + $51AD = ViridianForestEndBattleText3 + $5142 = ViridianForestTrainerHeader0 + $514E = ViridianForestTrainerHeader1 + $515A = ViridianForestTrainerHeader2 + $52DF = SSAnne1Blocks + $5269 = SSAnne1TextPointers + $5265 = SSAnne1Script + $5277 = SSAnne1Object + $526D = SSAnne1Text1 + $5272 = SSAnne1Text2 + $556E = SSAnne2Blocks + $54DB = SSAnne2TextPointers + $539F = SSAnne2Script + $5514 = SSAnne2Object + $53B3 = SSAnne2ScriptPointers + $53BE = SSAnne2Script0 + $5430 = SSAnne2Script1 + $546D = SSAnne2Script2 + $54BE = SSAnne2Script3 + $53BD = SSAnne2Script4 + $5411 = CoordsData_61411 + $540C = MovementData_6140c + $540D = MovementData_6140d + $5416 = SSAnne2Script_61416 + $53AB = SSAnne2Script_613ab + $54B9 = MovementData_614b9 + $54B7 = MovementData_614b7 + $54E1 = SSAnne2Text1 + $54E6 = SSAnne2Text2 + $550F = SSAnne2Text3 + $5500 = SSAnneRivalBeforeBattleText + $5505 = SSAnneRivalDefeatedText + $550A = SSAnneRivalWonText + $5666 = SSAnne4Blocks + $5631 = SSAnne4TextPointers + $562E = SSAnne4Script + $5632 = SSAnne4Object + $5761 = SSAnne5Blocks + $56C7 = SSAnne5TextPointers + $56AE = SSAnne5Script + $572B = SSAnne5Object + $56D1 = SSAnne5TrainerHeader0 + $56C1 = SSAnne5ScriptPointers + $56EA = SSAnne5Text1 + $56EF = SSAnne5Text2 + $56F4 = SSAnne5Text3 + $56F9 = SSAnne5Text4 + $5712 = SSAnne5Text5 + $5703 = SSAnne5BattleText1 + $570D = SSAnne5AfterBattleText1 + $5708 = SSAnne5EndBattleText1 + $571C = SSAnne5BattleText2 + $5726 = SSAnne5AfterBattleText2 + $5721 = SSAnne5EndBattleText2 + $56DD = SSAnne5TrainerHeader1 + $5851 = SSAnne6Blocks + $57B7 = SSAnne6TextPointers + $57B3 = SSAnne6Script + $581B = SSAnne6Object + $57C5 = SSAnne6Text1 + $57CA = SSAnne6Text2 + $57CF = SSAnne6Text3 + $57D4 = SSAnne6Text4 + $57D9 = SSAnne6Text5 + $57DE = SSAnne6Text6 + $57E3 = SSAnne6Text7 + $5807 = SSAnne6Text_61807 + $580C = SSAnne6Text_6180c + $5811 = SSAnne6Text_61811 + $5816 = SSAnne6Text_61816 + $595E = SSAnne7Blocks + $58A7 = SSAnne7TextPointers + $5895 = SSAnne7Script + $5946 = SSAnne7Object + $589B = SSAnne7Script_6189b + $58AD = SSAnne7Text1 + $593C = SSAnne7Text2 + $5941 = SSAnne7Text3 + $58EC = SSAnne7RubText + $5927 = ReceivingHM01Text + $592C = ReceivedHM01Text + $5937 = HM01NoRoomText + $5932 = SSAnne7Text_61932 + $5ADF = SSAnne8Blocks + $598F = SSAnne8TextPointers + $5976 = SSAnne8Script + $5A60 = SSAnne8Object + $59A5 = SSAnne8TrainerHeaders + $5989 = SSAnne8ScriptPointers + $59D6 = SSAnne8Text1 + $59E0 = SSAnne8Text2 + $59EA = SSAnne8Text3 + $59F4 = SSAnne8Text4 + $5A47 = SSAnne8Text5 + $5A4C = SSAnne8Text6 + $5A51 = SSAnne8Text7 + $59FE = SSAnne8Text8 + $5A56 = SSAnne8Text9 + $5A5B = SSAnne8Text11 + $5A0B = SSAnne8BattleText1 + $5A15 = SSAnne8AfterBattleText1 + $5A10 = SSAnne8EndBattleText1 + $5A1A = SSAnne8BattleText2 + $5A24 = SSAnne8AfterBattleText2 + $5A1F = SSAnne8EndBattleText2 + $5A29 = SSAnne8BattleText3 + $5A33 = SSAnne8AfterBattleText3 + $5A2E = SSAnne8EndBattleText3 + $5A38 = SSAnne8BattleText4 + $5A42 = SSAnne8AfterBattleText4 + $5A3D = SSAnne8EndBattleText4 + $59A5 = SSAnne8TrainerHeader0 + $59B1 = SSAnne8TrainerHeader1 + $59BD = SSAnne8TrainerHeader2 + $59C9 = SSAnne8TrainerHeader3 + $43C0 = SSAnne9Blocks + $5B6A = SSAnne9TextPointers + $5B4B = SSAnne9Script + $5C8D = SSAnne9Object + $5B84 = SSAnne9TrainerHeaders + $5B64 = SSAnne9ScriptPointers + $5BB5 = SSAnne9Text1 + $5BBF = SSAnne9Text2 + $5BC9 = SSAnne9Text3 + $5BD3 = SSAnne9Text4 + $5BDD = SSAnne9Text5 + $5BF7 = SSAnne9Text7 + $5C06 = SSAnne9Text8 + $5C15 = SSAnne9Text10 + $5C24 = SSAnne9Text11 + $5C33 = SSAnne9Text12 + $5C42 = SSAnne9Text13 + $5C51 = SSAnne9BattleText1 + $5C5B = SSAnne9AfterBattleText1 + $5C56 = SSAnne9EndBattleText1 + $5C60 = SSAnne9BattleText2 + $5C6A = SSAnne9AfterBattleText2 + $5C65 = SSAnne9EndBattleText2 + $5C6F = SSAnne9BattleText3 + $5C79 = SSAnne9AfterBattleText3 + $5C74 = SSAnne9EndBattleText3 + $5C7E = SSAnne9BattleText4 + $5C88 = SSAnne9AfterBattleText4 + $5C83 = SSAnne9EndBattleText4 + $5B84 = SSAnne9TrainerHeader0 + $5B90 = SSAnne9TrainerHeader1 + $5B9C = SSAnne9TrainerHeader2 + $5BA8 = SSAnne9TrainerHeader3 + $5BF2 = SSAnne9Text_61bf2 + $5C01 = SSAnne9Text_61c01 + $5C10 = SSAnne9Text_61c10 + $5C1F = SSAnne9Text_61c1f + $5C2E = SSAnne9Text_61c2e + $5C3D = SSAnne9Text_61c3d + $5C4C = SSAnne9Text_61c4c + $43C0 = SSAnne10Blocks + $5D6E = SSAnne10TextPointers + $5D55 = SSAnne10Script + $5E75 = SSAnne10Object + $5D84 = SSAnne10TrainerHeaders + $5D68 = SSAnne10ScriptPointers + $5DCD = SSAnne10Text1 + $5DD7 = SSAnne10Text2 + $5DE1 = SSAnne10Text3 + $5DEB = SSAnne10Text4 + $5DF5 = SSAnne10Text5 + $5DFF = SSAnne10Text6 + $5E70 = SSAnne10Text7 + $5E09 = SSAnne10Text8 + $5E16 = SSAnne10BattleText1 + $5E20 = SSAnne10AfterBattleText1 + $5E1B = SSAnne10EndBattleText1 + $5E25 = SSAnne10BattleText2 + $5E2F = SSAnne10AfterBattleText2 + $5E2A = SSAnne10EndBattleText2 + $5E34 = SSAnne10BattleText3 + $5E3E = SSAnne10AfterBattleText3 + $5E39 = SSAnne10EndBattleText3 + $5E43 = SSAnne10BattleText4 + $5E4D = SSAnne10AfterBattleText4 + $5E48 = SSAnne10EndBattleText4 + $5E52 = SSAnne10BattleText5 + $5E5C = SSAnne10AfterBattleText5 + $5E57 = SSAnne10EndBattleText5 + $5E61 = SSAnne10BattleText6 + $5E6B = SSAnne10AfterBattleText6 + $5E66 = SSAnne10EndBattleText6 + $5D84 = SSAnne10TrainerHeader0 + $5D90 = SSAnne10TrainerHeader1 + $5D9C = SSAnne10TrainerHeader2 + $5DA8 = SSAnne10TrainerHeader3 + $5DB4 = SSAnne10TrainerHeader4 + $5DC0 = SSAnne10TrainerHeader5 + $4198 = UndergroundPathNSBlocks + $5F29 = UndergroundPathNSTextPointers + $5F26 = UndergroundPathNSScript + $5F2A = UndergroundPathNSObject + $41F4 = UndergroundPathWEBlocks + $5F4D = UndergroundPathWETextPointers + $5F4A = UndergroundPathWEScript + $5F4E = UndergroundPathWEObject + $5F86 = DiglettsCaveBlocks + $5F71 = DiglettsCaveTextPointers + $5F6E = DiglettsCaveScript + $5F72 = DiglettsCaveObject + $63C8 = SilphCo11Blocks + $62B7 = SilphCo11TextPointers + $60FA = SilphCo11Script + $6380 = SilphCo11Object + $6110 = SilphCo11Script_62110 + $62C3 = SilphCo11TrainerHeaders + $61CF = SilphCo11ScriptPointers + $6134 = DataTable_62134 + $6137 = SilphCo11Script_62137 + $6163 = SilphCo11Script_62163 + $619B = MissableObjectIDs_6219b + $6194 = MissableObjectIDs_62194 + $61DB = SilphCo11Script0 + $626A = SilphCo11Script3 + $6293 = SilphCo11Script4 + $6227 = SilphCo11Script5 + $6211 = CoordsData_62211 + $6216 = MovementData_62216 + $61C8 = SilphCo11Script_621c8 + $61C4 = SilphCo11Script_621c4 + $621A = SilphCo11Script_6221a + $616D = SilphCo11Script_6216d + $6330 = SilphCo10Text_62330 + $62DC = SilphCo11Text1 + $6326 = SilphCo11Text2 + $632B = SilphCo11Text3 + $633A = SilphCo11Text4 + $6353 = SilphCo11Text5 + $6335 = SilphCo11Text6 + $6344 = SilphCo11BattleText1 + $634E = SilphCo11AfterBattleText1 + $6349 = SilphCo11EndBattleText1 + $635D = SilphCo11BattleText2 + $6367 = SilphCo11AfterBattleText2 + $6362 = SilphCo11EndBattleText2 + $6308 = SilphCo11Text1.asm_62308 + $6311 = SilphCoPresidentText + $6316 = ReceivedSilphCoMasterBallText + $6321 = SilphCoMasterBallNoRoomText + $631C = SilphCo10Text_6231c + $62C3 = SilphCo11TrainerHeader0 + $62CF = SilphCo11TrainerHeader1 + $637B = SilphCo10Text_6237b + $6442 = GymStatues.BadgeFlags + $647E = PokeCenterMapIDList + $64FD = SaffronCityPokecenterBenchGuyText2 + $64F8 = SaffronCityPokecenterBenchGuyText1 + $5006 = GiveFossilToCinnabarLab + SLACK: $1AD6 bytes + +Bank #25: + SECTION: $4000-$7FFF ($4000 bytes) + $4000 = Overworld_GFX + $45E0 = Overworld_Block + $4DE0 = RedsHouse1_GFX + $5270 = RedsHouse1_Block + $4DE0 = RedsHouse2_GFX + $5270 = RedsHouse2_Block + $53A0 = House_GFX + $5980 = House_Block + $6610 = ShipPort_GFX + $6BF0 = ShipPort_Block + $6D60 = Interior_GFX + $7350 = Interior_Block + $5BB0 = Mansion_GFX + $6190 = Mansion_Block + $76F0 = Plateau_GFX + $7B50 = Plateau_Block + SLACK: $0000 bytes + +Bank #26: + SECTION: $4000-$7FEF ($3FF0 bytes) + $402F = Version_GFX + $4DAF = Mart_GFX + $53AF = Mart_Block + $63EF = Forest_GFX + $69EF = Forest_Block + $406F = Dojo_GFX + $466F = Dojo_Block + $4DAF = Pokecenter_GFX + $53AF = Pokecenter_Block + $406F = Gym_GFX + $466F = Gym_Block + $55FF = ForestGate_GFX + $5BEF = ForestGate_Block + $55FF = Museum_GFX + $5BEF = Museum_Block + $55FF = Gate_GFX + $5BEF = Gate_Block + $71EF = Facility_GFX + $77EF = Facility_Block + $4000 = DecrementPP + $4026 = DecrementPP.DecrementPP + SLACK: $0010 bytes + +Bank #27: + SECTION: $4000-$7FFF ($4000 bytes) + $7670 = Club_GFX + $7D60 = Underground_GFX + $7EF0 = Underground_Block + $6390 = Ship_GFX + $6930 = Ship_Block + $4000 = Cemetery_GFX + $45C0 = Cemetery_Block + $4CA0 = Cavern_GFX + $50C0 = Cavern_Block + $58C0 = Lobby_GFX + $5EA0 = Lobby_Block + $6D10 = Lab_GFX + $72D0 = Lab_Block + $7B20 = Club_Block + SLACK: $0000 bytes + +Bank #28: + SECTION: $4000-$7B9C ($3B9D bytes) + $487E = _HandleMidJump + $4510 = Func_70510 + $4787 = Func_70787 + $45BA = _LeaveMapAnim + $4F90 = LoadTownMap_Fly + $56C6 = Func_716c6 + $56FF = AnimatePartyMon + $576C = Func_7176c + $56F7 = AnimatePartyMon_ForceSpeed1 + $5882 = Func_71882 + $4433 = AnimateHealingMachine + $7848 = SaveSAVtoSRAM + $4E3E = DisplayTownMap + $47B6 = Func_707b6 + $5791 = Func_71791 + $5FB6 = SendBlkPacket_PartyMenu + $5868 = Func_71868 + $7B6A = Func_73b6a + $4044 = AnimateShootingStar + $778C = SaveSAVtoSRAM0 + $496D = BattleTransition + $4B5D = FlashScreen + $770A = SaveSAV + $602B = LoadSGB + $5DDF = Func_71ddf + $4F60 = LoadTownMap_Nest + $780F = SaveSAVtoSRAM2 + $76BD = LoadSAVCheckSum2 + $75E8 = LoadSAV + $77E2 = SaveSAVtoSRAM1 + $5AD9 = Predef54 + $48CA = Func_708ca + $4190 = FallingStar + $4140 = GameFreakLogoOAMData + $4180 = GameFreakShootingStarOAMData + $4000 = LoadShootingStarGraphics + $40EE = OAMData_700ee + $40F2 = PointerTable_700f2 + $411F = Func_7011f + $40FE = OAMData_700fe + $4106 = OAMData_70106 + $410E = OAMData_7010e + $4116 = OAMData_70116 + $411E = OAMData_7011e + $4423 = Func_70423 + $4278 = Func_70278 + $42E1 = Func_702e1 + $426B = HallOfFameText + $7B0D = SaveHallOfFameTeams + $4377 = Func_70377 + $433E = Func_7033e + $436D = Func_7036d + $42D5 = Func_70278.asm_702d5 + $42F0 = Func_702f0 + $4404 = Func_70404 + $4329 = HoFMonInfoText + $43EA = HoFPlayTimeText + $43F4 = HoFMoneyText + $43FA = DexSeenOwnedText + $43E2 = Func_703e2 + $43FF = DexRatingText + $44B7 = PokeCenterFlashingMonitorAndHealBall + $44D7 = PokeCenterOAMData + $4503 = Func_70503 + $44F3 = Func_704f3 + $46EF = Func_706ef + $45AA = Func_705aa + $4730 = Func_70730 + $4772 = Func_70772 + $46D7 = Func_706d7 + $4592 = FlyAnimationEnterScreenCoords + $46AE = Func_706ae + $477F = Func_7077f + $4755 = Func_70755 + $467D = Func_7067d + $464F = FlyAnimationScreenCoords1 + $4667 = FlyAnimationScreenCoords2 + $4713 = PlayerSpinningFacingOrder + $4717 = Func_70717 + $47A9 = DataTable_707a9 + $4866 = RedFishingTiles + $5771 = Func_71771 + $4856 = FishingRodGfxProperties + $4847 = NoNibbleText + $484C = NothingHereText + $4842 = Func_70842 + $4851 = ItsABiteText + $48BA = PlayerJumpingYScreenCoords + $492A = Func_7092a + $4A4D = LoadBattleTransitionTile + $49E2 = GetBattleTransitionID_WildOrTrainer + $49EF = GetBattleTransitionID_CompareLevels + $4A19 = GetBattleTransitionID_IsDungeonMap + $49D2 = BattleTransitions + $4D24 = BattleTransition_DoubleCircle + $4A72 = BattleTransition_Spiral + $4CE4 = BattleTransition_Circle + $4CB4 = BattleTransition_HorizontalStripes + $4B7F = BattleTransition_Shrink + $4C7E = BattleTransition_VerticalStripes + $4BCA = BattleTransition_Split + $4A3F = DungeonMaps1 + $4A44 = DungeonMaps2 + $4A59 = BattleTransitionTile + $4AAA = BattleTransition_InwardSpiral + $4AF9 = BattleTransition_OutwardSpiral_ + $4A69 = BattleTransition_BlackScreen + $4AE0 = BattleTransition_InwardSpiral_ + $4D19 = BattleTransition_TransferDelay3 + $4B72 = BattleTransition_FlashScreenPalettes + $4C12 = BattleTransition_CopyTiles1 + $4C3F = BattleTransition_CopyTiles2 + $4CAA = BattleTransition_VerticalStripes_ + $4CD8 = BattleTransition_HorizontalStripes_ + $4CFD = BattleTransition_FlashScreen + $4D61 = BattleTransition_HalfCircle1 + $4D06 = BattleTransition_Circle_Sub1 + $4D93 = BattleTransition_HalfCircle2 + $4B5D = BattleTransition_FlashScreen_ + $4D50 = BattleTransition_Circle_Sub2 + $4DC5 = BattleTransition_Circle_Sub3 + $4DFE = BattleTransition_CircleData1 + $4E04 = BattleTransition_CircleData2 + $4E0E = BattleTransition_CircleData3 + $4E20 = BattleTransition_CircleData4 + $4E2E = BattleTransition_CircleData5 + $509B = LoadTownMap + $51C4 = Func_711c4 + $4F40 = TownMapCursor + $4F11 = TownMapOrder + $52F1 = Func_712f1 + $5258 = Func_71258 + $5279 = Func_71279 + $51AB = Func_711ab + $4E7E = Func_70e7e + $51EF = Func_711ef + $4F89 = MonsNestText + $5093 = TownMapUpArrow + $5070 = Func_71070 + $506D = ToText + $4FD6 = LoadTownMap_Fly.townMapFlyLoop + $56BE = MonNestIcon + $5100 = CompressedMap + $526D = Func_7126d + $52D9 = Func_712d9 + $524A = AreaUnknownText + $5382 = InternalMapEntries + $5313 = ExternalMapEntries + $5473 = PalletTownName + $547F = ViridianCityName + $548D = PewterCityName + $5499 = CeruleanCityName + $54A7 = LavenderTownName + $54B5 = VermilionCityName + $54C4 = CeladonCityName + $54D1 = FuchsiaCityName + $54DE = CinnabarIslandName + $54EE = IndigoPlateauName + $54FD = SaffronCityName + $550A = Route1Name + $5512 = Route2Name + $551A = Route3Name + $5522 = Route4Name + $552A = Route5Name + $5532 = Route6Name + $553A = Route7Name + $5542 = Route8Name + $554A = Route9Name + $5552 = Route10Name + $555B = Route11Name + $5564 = Route12Name + $556D = Route13Name + $5576 = Route14Name + $557F = Route15Name + $5588 = Route16Name + $5591 = Route17Name + $559A = Route18Name + $55A3 = Route19Name + $55B0 = Route20Name + $55BD = Route21Name + $55CA = Route22Name + $55D3 = Route23Name + $55DC = Route24Name + $55E5 = Route25Name + $55EE = ViridianForestName + $55FE = MountMoonName + $5606 = RockTunnelName + $56B2 = PowerPlantName + $5612 = SeaCottageName + $561E = SSAnneName + $565F = VictoryRoadName + $5627 = PokemonLeagueName + $5633 = UndergroundPathName + $5644 = PokemonTowerName + $5698 = SafariZoneName + $564F = SeafoamIslandsName + $568E = PokemonMansionName + $566C = DiglettsCaveName + $567A = RocketHQName + $5684 = SilphCoName + $56A4 = CeruleanCaveName + $5769 = PartyMonSpeeds + $57C0 = MonPartySpritePointers + $5959 = MonPartySprites + $58E9 = GetPartyMonSpriteID + $58C3 = Func_718c3 + $58AC = Func_718ac + $52A6 = Func_712a6 + $5281 = Func_71281 + $590D = MonPartyData + $5B7B = TradeMons + $5D64 = InGameTradeTextPointers + $5B6A = Func_71b6a + $5B58 = Predef54.asm_99bca + $5C07 = Func_71c07 + $5D8D = TradedForText + $5CA2 = Func_71ca2 + $5C9D = Func_71c07.asm_c4bc2 + $5D88 = ConnectCableText + $5CC1 = Func_71cc1 + $5D19 = Func_71d19 + $5D11 = Func_71d11 + $5D59 = String_71d59 + $5D4F = Func_71d4f + $5D6A = TradeTextPointers1 + $5D74 = TradeTextPointers2 + $5D7E = TradeTextPointers3 + $5D94 = WannaTrade1Text + $5D99 = NoTrade1Text + $5D9E = WrongMon1Text + $5DA3 = Thanks1Text + $5DA8 = AfterTrade1Text + $5DAD = WannaTrade2Text + $5DB2 = NoTrade2Text + $5DB7 = WrongMon2Text + $5DBC = Thanks2Text + $5DC1 = AfterTrade2Text + $5DC6 = WannaTrade3Text + $5DCB = NoTrade3Text + $5DD0 = WrongMon3Text + $5DD5 = Thanks3Text + $5DDA = AfterTrade3Text + $5FC2 = Func_71fc2 + $5F73 = PointerTable_71f73 + $6156 = Func_72156 + $6448 = PalPacket_Black + $61B5 = BlkPacket_Battle + $6428 = PalPacket_Empty + $5F97 = DeterminePaletteID + $6458 = PalPacket_TownMap + $619E = BlkPacket_WholeScreen + $5F9D = DeterminePaletteIDOutOfBattle + $61FA = BlkPacket_StatusScreen + $6438 = PalPacket_PartyMenu + $6468 = PalPacket_Pokedex + $6222 = BlkPacket_Pokedex + $6478 = PalPacket_Slots + $624F = BlkPacket_Slots + $6488 = PalPacket_Titlescreen + $628E = BlkPacket_Titlescreen + $64A8 = PalPacket_Generic + $64B8 = PalPacket_NidorinoIntro + $62C1 = BlkPacket_NidorinoIntro + $64C8 = PalPacket_GameFreakIntro + $63DD = BlkPacket_GameFreakIntro + $6360 = BlkPacket_TrainerCard + $5F8F = LoopCounts_71f8f + $6498 = PalPacket_TrainerCard + $5DFF = SendPalPacket_Black + $5E06 = BuildBattlePalPacket + $5E48 = SendPalPacket_TownMap + $5E4F = BuildStatusScreenPalPacket + $5E82 = SendPalPacket_Pokedex + $5E9F = SendPalPacket_Slots + $5EA6 = SendPalPacket_Titlescreen + $5EB4 = SendPalPacket_NidorinoIntro + $5EAD = SendPalPacket_Generic + $5EC7 = BuildOverworldPalPacket + $5E7B = SendPalPacket_PartyMenu + $5F17 = SendPokemonPalette_WholeScreen + $5EBB = SendPalPacket_GameFreakIntro + $5F3B = BuildTrainerCardPalPacket + $65C8 = MonsterPalettes + $62F4 = BlkPacket_PartyMenu + $614A = Wait7000 + $609B = Func_7209b + $6075 = Func_72075 + $6508 = ChrTrnPacket + $6FE8 = SGBBorderGraphics + $610B = Func_7210b + $6518 = PctTrnPacket + $6788 = BorderPalettes + $64D8 = PalTrnPacket + $6660 = SuperPalettes + $6538 = MaskEnCancelPacket + $5FEB = SendSGBPacket + $6089 = PointerTable_72089 + $6528 = MaskEnFreezePacket + $6548 = DataSnd_72548 + $6558 = DataSnd_72558 + $6568 = DataSnd_72568 + $6578 = DataSnd_72578 + $6588 = DataSnd_72588 + $6598 = DataSnd_72598 + $65A8 = DataSnd_725a8 + $65B8 = DataSnd_725b8 + $64F8 = MltReq2Packet + $6102 = Func_72102 + $64E8 = MltReq1Packet + $6188 = Func_72188 + $616D = Func_7216d + $6187 = Func_72187 + $7623 = LoadSAVCheckSum + $7690 = LoadSAVCheckSum1 + $761E = FileDataDestroyedText + $7856 = SAVCheckSum + $7652 = LoadSAVCheckSum.Func_73652 + $76F7 = SAVBadCheckSum + $76F8 = SAVGoodChecksum + $777D = WouldYouLikeToSaveText + $7768 = SaveSAVConfirm + $7AD1 = SAVCheckRandomID + $7787 = OlderFileWillBeErasedText + $775A = NowSavingString + $7782 = GameSavedText + $7895 = PointerTable_73895 + $7909 = WhenYouChangeBoxText + $7A29 = Func_73a29 + $793F = Func_7393f + $787B = Func_7387b + $790E = Func_7390e + $7863 = Func_73863 + $79D4 = ChooseABoxText + $79D9 = BoxNames + $7A21 = BoxNoText + $7A84 = Func_73a84 + $7A4B = Func_73a4b + $7A7F = Func_73a7f + $7AB8 = Func_73ab8 + $7B51 = HallOfFame_Copy + $7B8F = PadSRAM_FF + $41A0 = AnimateHallOfFame + $7B3F = LoadHallOfFameTeams + $78A1 = Func_738a1 + SLACK: $0463 bytes + +Bank #29: + SECTION: $4000-$687B ($287C bytes) + $4898 = ViridianGym_h + $4CA2 = PewterMart_h + $5F12 = Gary_h + $500D = FuchsiaHouse1_h + $5058 = FuchsiaPokecenter_h + $50AA = FuchsiaHouse2_h + $51C2 = SafariZoneEntrance_h + $5432 = FuchsiaGym_h + $56D8 = FuchsiaMeetingRoom_h + $573F = CinnabarGym_h + $5B81 = Lab1_h + $5C16 = Lab2_h + $5C7C = Lab3_h + $5D26 = Lab4_h + $5E21 = CinnabarPokecenter_h + $5E73 = CinnabarMart_h + $5EB8 = CopycatsHouse1F_h + $4D01 = UnknownDungeon1_h + $4DFE = CeruleanHouse2_h + $6170 = Lorelei_h + $62CB = Bruno_h + $6422 = Agatha_h + $47DF = PrintStatusAilment + $4EE1 = VendingMachineMenu + $675C = FoundHiddenItemText + $6795 = HiddenItemBagFullText + $6848 = FoundHiddenCoinsText + $684E = DroppedHiddenCoinsText + $4820 = HiddenItemNear + $657F = PKMNLeaguePC + $4873 = Func_74872 + $679A = HiddenCoins + $6689 = HiddenItems + $405C = HallOfFamePC + $4171 = Func_74171 + $417B = Func_7417b + $418E = Credits + $4160 = DataTable_74160 + $4183 = FillMiddleOfScreenWithWhite + $4131 = CreditsMons + $4164 = Func_74164 + $4140 = Func_74140 + $4152 = Func_74152 + $4243 = CreditsOrder + $42C3 = CreditsTextPointers + $40BA = Func_740ba + $40CB = DisplayCreditsMon + $473F = TheEndGfx + $4229 = TheEndTextString + $4343 = CredVersion + $4357 = CredTajiri + $4367 = CredTaOota + $4376 = CredMorimoto + $4388 = CredWatanabe + $439A = CredMasuda + $43AA = CredNisino + $43B8 = CredSugimori + $43C6 = CredNishida + $43D6 = CredMiyamoto + $43E8 = CredKawaguchi + $43FB = CredIshihara + $440F = CredYamauchi + $4421 = CredZinnai + $4432 = CredHishida + $4443 = CredSakai + $4453 = CredYamaguchi + $4465 = CredYamamoto + $4478 = CredTaniguchi + $448C = CredNonomura + $449F = CredFuziwara + $44B2 = CredMatsusima + $44C3 = CredTomisawa + $44D5 = CredKawamoto + $44E7 = CredKakei + $44F7 = CredTsuchiya + $4508 = CredTaNakamura + $4518 = CredYuda + $4528 = CredMon + $452E = CredDirector + $4538 = CredProgrammers + $4545 = CredCharDesign + $4557 = CredMusic + $455E = CredSoundEffects + $456D = CredGameDesign + $457A = CredMonsterDesign + $458A = CredGameScene + $4599 = CredParam + $45AC = CredMap + $45B8 = CredTest + $45C9 = CredSpecial + $45D9 = CredProducers + $45E4 = CredProducer + $45EE = CredExecutive + $4602 = CredTamada + $4612 = CredSaOota + $4620 = CredYoshikawa + $4630 = CredToOota + $4640 = CredUSStaff + $4652 = CredUSCoord + $4663 = CredTilden + $4670 = CredKawakami + $4680 = CredHiNakamura + $468F = CredGiese + $469E = CredOsborne + $46AC = CredTrans + $46BE = CredOgasawara + $46CD = CredIwata + $46DB = CredIzushi + $46EC = CredHarada + $46FD = CredMurakawa + $470E = CredFukui + $471B = CredClub + $4731 = CredPAAD + $66B9 = HiddenItemCoords + $486C = Func_7486b + $4C48 = ViridianGymBlocks + $49ED = ViridianGymTextPointers + $48A4 = ViridianGymScript + $4BDF = ViridianGymObject + $48C0 = Gym8CityName + $48CE = Gym8LeaderName + $4A09 = ViridianGymTrainerHeaders + $48E2 = ViridianGymScriptPointers + $48EC = ViridianGymScript0 + $4989 = ViridianGymScript3 + $496C = ViridianGymScript4 + $4917 = ViridianGymArrowTilePlayerMovement + $4948 = ViridianGymArrowMovement1 + $494B = ViridianGymArrowMovement2 + $494E = ViridianGymArrowMovement3 + $4951 = ViridianGymArrowMovement4 + $4954 = ViridianGymArrowMovement5 + $4957 = ViridianGymArrowMovement6 + $495A = ViridianGymArrowMovement7 + $495D = ViridianGymArrowMovement8 + $4960 = ViridianGymArrowMovement9 + $4963 = ViridianGymArrowMovement10 + $4966 = ViridianGymArrowMovement11 + $4969 = ViridianGymArrowMovement12 + $48D7 = ViridianGymScript_748d6 + $4A6A = ViridianGymText1 + $4AF4 = ViridianGymText2 + $4B0D = ViridianGymText3 + $4B26 = ViridianGymText4 + $4B3F = ViridianGymText5 + $4B58 = ViridianGymText6 + $4B71 = ViridianGymText7 + $4B8A = ViridianGymText8 + $4BA3 = ViridianGymText9 + $4BBC = ViridianGymText10 + $4AE0 = ViridianGymText12 + $4AE5 = ViridianGymText13 + $4AEF = ViridianGymText14 + $4AFE = ViridianGymBattleText1 + $4B08 = ViridianGymAfterBattleText1 + $4B03 = ViridianGymEndBattleText1 + $4B17 = ViridianGymBattleText2 + $4B21 = ViridianGymAfterBattleText2 + $4B1C = ViridianGymEndBattleText2 + $4B30 = ViridianGymBattleText3 + $4B3A = ViridianGymAfterBattleText3 + $4B35 = ViridianGymEndBattleText3 + $4B49 = ViridianGymBattleText4 + $4B53 = ViridianGymAfterBattleText4 + $4B4E = ViridianGymEndBattleText4 + $4B62 = ViridianGymBattleText5 + $4B6C = ViridianGymAfterBattleText5 + $4B67 = ViridianGymEndBattleText5 + $4B7B = ViridianGymBattleText6 + $4B85 = ViridianGymAfterBattleText6 + $4B80 = ViridianGymEndBattleText6 + $4B94 = ViridianGymBattleText7 + $4B9E = ViridianGymAfterBattleText7 + $4B99 = ViridianGymEndBattleText7 + $4BAD = ViridianGymBattleText8 + $4BB7 = ViridianGymAfterBattleText8 + $4BB2 = ViridianGymEndBattleText8 + $4996 = ViridianGymScript3_74995 + $4ADA = ViridianGymText_74ad9 + $4ACF = ViridianGymText_74ace + $4AD4 = ViridianGymText_74ad3 + $4A09 = ViridianGymTrainerHeader0 + $4A15 = ViridianGymTrainerHeader1 + $4A21 = ViridianGymTrainerHeader2 + $4A2D = ViridianGymTrainerHeader3 + $4A39 = ViridianGymTrainerHeader4 + $4A45 = ViridianGymTrainerHeader5 + $4A51 = ViridianGymTrainerHeader6 + $4A5D = ViridianGymTrainerHeader7 + $4BD5 = ViridianGymText_74bd4 + $4BDA = ViridianGymText_74bd9 + $4010 = PewterMartBlocks + $4CB7 = PewterMartTextPointers + $4CAE = PewterMartScript + $4CDB = PewterMartObject + $4CBD = PewterMartText2 + $4CCC = PewterMartText3 + $4CC7 = PewterMartText_74cc6 + $4CD6 = PewterMartText_74cd5 + $4D77 = UnknownDungeon1Blocks + $4D10 = UnknownDungeon1TextPointers + $4D0D = UnknownDungeon1Script + $4D16 = UnknownDungeon1Object + $404C = CeruleanHouse2Blocks + $4E14 = CeruleanHouse2TextPointers + $4E0A = CeruleanHouse2Script + $4EBF = CeruleanHouse2Object + $4E16 = CeruleanHouse2Text1 + $4E78 = CeruleanHouse2Text_74e77 + $4E7D = CeruleanHouse2Text_74e7c + $4E6E = BadgeItemList + $4E87 = TextPointers_74e86 + $4E82 = CeruleanHouse2Text_74e81 + $4E97 = CeruleanHouse2Text_74e96 + $4E9C = CeruleanHouse2Text_74e9b + $4EA1 = CeruleanHouse2Text_74ea0 + $4EA6 = CeruleanHouse2Text_74ea5 + $4EAB = CeruleanHouse2Text_74eaa + $4EB0 = CeruleanHouse2Text_74eaf + $4EB5 = CeruleanHouse2Text_74eb4 + $4EBA = CeruleanHouse2Text_74eb9 + $4F9A = VendingMachineText1 + $4F9F = DrinkText + $4FC4 = DrinkPriceText + $4FD4 = VendingMachineText4 + $4FE8 = Func_74fe7 + $4FD9 = VendingMachineText5 + $4FDE = VendingMachineText6 + $4FE3 = VendingMachineText7 + $5001 = VendingPrices + $4020 = FuchsiaHouse1Blocks + $501D = FuchsiaHouse1TextPointers + $5019 = FuchsiaHouse1Script + $5032 = FuchsiaHouse1Object + $5023 = FuchsiaHouse1Text1 + $5028 = FuchsiaHouse1Text2 + $502D = FuchsiaHouse1Text3 + $4030 = FuchsiaPokecenterBlocks + $506A = FuchsiaPokecenterTextPointers + $5064 = FuchsiaPokecenterScript + $507E = FuchsiaPokecenterObject + $5072 = FuchsiaPokecenterText1 + $5073 = FuchsiaPokecenterText2 + $5078 = FuchsiaPokecenterText3 + $507D = FuchsiaPokecenterText4 + $51AE = FuchsiaHouse2Blocks + $50B9 = FuchsiaHouse2TextPointers + $50B6 = FuchsiaHouse2Script + $5181 = FuchsiaHouse2Object + $50C3 = FuchsiaHouse2Text1 + $5164 = FuchsiaHouse2Text4 + $5164 = FuchsiaHouse2Text5 + $5136 = WardenGibberishText1 + $5140 = WardenGibberishText3 + $513B = WardenGibberishText2 + $5145 = WardenTeethText1 + $514F = WardenThankYouText + $5154 = ReceivedHM04Text + $515A = HM04ExplanationText + $515F = HM04NoRoomText + $517C = FuchsiaHouse2Text_7517b + $5177 = FuchsiaHouse2Text_75176 + $5426 = SafariZoneEntranceBlocks + $52BA = SafariZoneEntranceTextPointers + $51CE = SafariZoneEntranceScript + $53F6 = SafariZoneEntranceObject + $51DA = SafariZoneEntranceScriptPointers + $51E8 = SafariZoneEntranceScript0 + $5227 = SafariZoneEntranceScript1 + $522B = SafariZoneEntranceScript2 + $5241 = SafariZoneEntranceScript3 + $5288 = SafariZoneEntranceScript4 + $524F = SafariZoneEntranceScript5 + $5296 = SafariZoneEntranceScript6 + $5222 = CoordsData_75221 + $52A4 = SafariZoneEntranceScript_752a3 + $52B5 = SafariZoneEntranceScript_752b4 + $52C6 = SafariZoneEntranceText1 + $53CB = SafariZoneEntranceText2 + $52C6 = SafariZoneEntranceText3 + $52CB = SafariZoneEntranceText4 + $5370 = SafariZoneEntranceText5 + $53C6 = SafariZoneEntranceText6 + $5347 = SafariZoneEntranceText4.asm_75346 + $536B = SafariZoneEntranceText_7536a + $535C = SafariZoneEntranceText_7535b + $5366 = SafariZoneEntranceText_75365 + $53BC = SafariZoneEntranceText_753bb + $53C1 = SafariZoneEntranceText_753c0 + $53E7 = SafariZoneEntranceText_753e6 + $53F1 = SafariZoneEntranceText_753f0 + $53EC = SafariZoneEntranceText_753eb + $56AB = FuchsiaGymBlocks + $54D6 = FuchsiaGymTextPointers + $543E = FuchsiaGymScript + $5659 = FuchsiaGymObject + $5454 = FuchsiaGymScript_75453 + $54EC = FuchsiaGymTrainerHeaders + $5483 = FuchsiaGymScriptPointers + $5466 = Gym5CityName + $5473 = Gym5LeaderName + $548B = FuchsiaGymScript3 + $5478 = FuchsiaGymScript_75477 + $5535 = FuchsiaGymText1 + $55A5 = FuchsiaGymText2 + $55BE = FuchsiaGymText3 + $55D7 = FuchsiaGymText4 + $55F0 = FuchsiaGymText5 + $5609 = FuchsiaGymText6 + $5622 = FuchsiaGymText7 + $563B = FuchsiaGymText8 + $5591 = FuchsiaGymText9 + $5596 = FuchsiaGymText10 + $55A0 = FuchsiaGymText11 + $55AF = FuchsiaGymBattleText1 + $55B9 = FuchsiaGymAfterBattleText1 + $55B4 = FuchsiaGymEndBattleText1 + $55C8 = FuchsiaGymBattleText2 + $55D2 = FuchsiaGymAfterBattleText2 + $55CD = FuchsiaGymEndBattleText2 + $55E1 = FuchsiaGymBattleText3 + $55EB = FuchsiaGymAfterBattleText3 + $55E6 = FuchsiaGymEndBattleText3 + $55FA = FuchsiaGymBattleText4 + $5604 = FuchsiaGymAfterBattleText4 + $55FF = FuchsiaGymEndBattleText4 + $5613 = FuchsiaGymBattleText5 + $561D = FuchsiaGymAfterBattleText5 + $5618 = FuchsiaGymEndBattleText5 + $562C = FuchsiaGymBattleText6 + $5636 = FuchsiaGymAfterBattleText6 + $5631 = FuchsiaGymEndBattleText6 + $5498 = FuchsiaGymScript3_75497 + $558C = UnnamedText_7558b + $5582 = UnnamedText_75581 + $5587 = UnnamedText_75586 + $54EC = FuchsiaGymTrainerHeader0 + $54F8 = FuchsiaGymTrainerHeader2 + $5504 = FuchsiaGymTrainerHeader3 + $5510 = FuchsiaGymTrainerHeader4 + $551C = FuchsiaGymTrainerHeader5 + $5528 = FuchsiaGymTrainerHeader6 + $5654 = UnnamedText_75653 + $564F = UnnamedText_7564e + $5723 = FuchsiaMeetingRoomBlocks + $56E8 = FuchsiaMeetingRoomTextPointers + $56E4 = FuchsiaMeetingRoomScript + $56FD = FuchsiaMeetingRoomObject + $56EE = FuchsiaMeetingRoomText1 + $56F3 = FuchsiaMeetingRoomText2 + $56F8 = FuchsiaMeetingRoomText3 + $5B27 = CinnabarGymBlocks + $58A0 = CinnabarGymTextPointers + $574B = CinnabarGymScript + $5ACD = CinnabarGymObject + $575A = CinnabarGymScript_75759 + $57A7 = CinnabarGymScriptPointers + $5773 = CinnabarGymScript_75772 + $577C = Gym7CityName + $578C = Gym7LeaderName + $57AF = CinnabarGymScript0 + $57DD = CinnabarGymScript1 + $57F7 = CinnabarGymScript2 + $584B = CinnabarGymScript3 + $57D8 = MovementData_757d7 + $57DB = MovementData_757da + $5793 = CinnabarGymScript_75792 + $57F2 = CinnabarGymScript_757f1 + $58E0 = CinnabarGymText1 + $593A = CinnabarGymText2 + $596F = CinnabarGymText3 + $59A4 = CinnabarGymText4 + $59D9 = CinnabarGymText5 + $5A0E = CinnabarGymText6 + $5A43 = CinnabarGymText7 + $5A78 = CinnabarGymText8 + $5AAD = CinnabarGymText9 + $5926 = BlaineBadgeText + $592B = ReceivedTM38Text + $5935 = TM38NoRoomText + $5858 = CinnabarGymScript3_75857 + $5921 = BlaineFireBlastText + $5915 = BlaineBattleText + $591A = BlaineEndBattleText + $58B8 = CinnabarGymScript_758b7 + $57A1 = CinnabarGymScript_757a0 + $5960 = CinnabarGymText_7595f + $5965 = CinnabarGymText_75964 + $596A = CinnabarGymText_75969 + $5995 = CinnabarGymText_75994 + $599A = CinnabarGymText_75999 + $599F = CinnabarGymText_7599e + $59CA = CinnabarGymText_759c9 + $59CF = CinnabarGymText_759ce + $59D4 = CinnabarGymText_759d3 + $59FF = CinnabarGymText_759fe + $5A04 = CinnabarGymText_75a03 + $5A09 = CinnabarGymText_75a08 + $5A34 = CinnabarGymText_75a33 + $5A39 = CinnabarGymText_75a38 + $5A3E = CinnabarGymText_75a3d + $5A69 = CinnabarGymText_75a68 + $5A6E = CinnabarGymText_75a6d + $5A73 = CinnabarGymText_75a72 + $5A9E = CinnabarGymText_75a9d + $5AA3 = CinnabarGymText_75aa2 + $5AA8 = CinnabarGymText_75aa7 + $5AC3 = CinnabarGymText_75ac2 + $5AC8 = CinnabarGymText_75ac7 + $5BF2 = Lab1Blocks + $5B91 = Lab1TextPointers + $5B8D = Lab1Script + $5BB4 = Lab1Object + $5B9B = Lab1Text1 + $5BA0 = Lab1Text2 + $5BA5 = Lab1Text3 + $5BAA = Lab1Text4 + $5BAF = Lab1Text5 + $5C6C = Lab2Blocks + $5C25 = Lab2TextPointers + $5C22 = Lab2Script + $5C46 = Lab2Object + $5C2B = Lab2Text1 + $5C30 = Lab2Text2 + $5C38 = Lab2Text3 + $5D16 = Lab3Blocks + $5C8B = Lab3TextPointers + $5C88 = Lab3Script + $5CED = Lab3Object + $5C95 = Lab3Text1 + $5CDE = Lab3Text2 + $5CE3 = Lab3Text3 + $5CE3 = Lab3Text4 + $5CE8 = Lab3Text5 + $5CC9 = TM35PreReceiveText + $5CCE = ReceivedTM35Text + $5CD9 = TM35NoRoomText + $5CD4 = TM35ExplanationText + $5E11 = Lab4Blocks + $5D35 = Lab4TextPointers + $5D32 = Lab4Script + $5DF1 = Lab4Object + $5D6D = Lab4Text1 + $5DDB = Lab4Text2 + $5D69 = FossilsList + $5DC7 = Lab4Text_75dc6 + $5D39 = Lab4Script_75d38 + $5DCC = Lab4Text_75dcb + $5DD1 = Lab4Text_75dd0 + $5DE9 = LoadFossilItemAndMonNameBank1D + $5DD6 = Lab4Text_75dd5 + $4030 = CinnabarPokecenterBlocks + $5E33 = CinnabarPokecenterTextPointers + $5E2D = CinnabarPokecenterScript + $5E47 = CinnabarPokecenterObject + $5E3B = CinnabarPokecenterText1 + $5E3C = CinnabarPokecenterText2 + $5E41 = CinnabarPokecenterText3 + $5E46 = CinnabarPokecenterText4 + $4010 = CinnabarMartBlocks + $5E82 = CinnabarMartTextPointers + $5E7F = CinnabarMartScript + $5E92 = CinnabarMartObject + $5E88 = CinnabarMartText2 + $5E8D = CinnabarMartText3 + $4000 = CopycatsHouse1FBlocks + $5EC7 = CopycatsHouse1FTextPointers + $5EC4 = CopycatsHouse1FScript + $5EE4 = CopycatsHouse1FObject + $5ECD = CopycatsHouse1FText1 + $5ED2 = CopycatsHouse1FText2 + $5ED7 = CopycatsHouse1FText3 + $6160 = GaryBlocks + $60D7 = GaryTextPointers + $5F1E = GaryScript + $6130 = GaryObject + $5F32 = GaryScriptPointers + $5F48 = GaryScript0 + $5F49 = GaryScript1 + $5F6B = GaryScript2 + $5FBC = GaryScript3 + $5FE5 = GaryScript4 + $601B = GaryScript5 + $6048 = GaryScript6 + $6060 = GaryScript7 + $6084 = GaryScript8 + $609A = GaryScript9 + $60BA = GaryScript10 + $5F64 = RLEMovement75f63 + $60FA = GaryText_760f9 + $60FF = GaryText_760fe + $5F2A = GaryScript_75f29 + $60C9 = GaryScript_760c8 + $6015 = MovementData_76014 + $6081 = MovementData_76080 + $60B5 = RLEMovement760b4 + $60E1 = GaryText1 + $6109 = GaryText2 + $610E = GaryText3 + $6126 = GaryText4 + $612B = GaryText5 + $60F5 = GaryText_760f4 + $6104 = GaryText_76103 + $6121 = GaryText_76120 + $62AD = LoreleiBlocks + $6252 = LoreleiTextPointers + $617C = LoreleiScript + $6281 = LoreleiObject + $6192 = LoreleiScript_76191 + $6256 = LoreleiTrainerHeaders + $61BC = LoreleiScriptPointers + $61E3 = LoreleiScript0 + $6240 = LoreleiScript2 + $622D = LoreleiScript3 + $61C6 = LoreleiScript4 + $6224 = CoordsData_76223 + $61B7 = LoreleiScript_761b6 + $6263 = LoreleiText1 + $627C = LoreleiText2 + $626D = LoreleiBeforeBattleText + $6277 = LoreleiAfterBattleText + $6272 = LoreleiEndBattleText + $6256 = LoreleiTrainerHeader0 + $6404 = BrunoBlocks + $63A9 = BrunoTextPointers + $62D7 = BrunoScript + $63D8 = BrunoObject + $62ED = BrunoScript_762ec + $63AD = BrunoTrainerHeaders + $6313 = BrunoScriptPointers + $6303 = BrunoScript_76302 + $633A = BrunoScript0 + $6397 = BrunoScript2 + $6384 = BrunoScript3 + $631D = BrunoScript4 + $637B = CoordsData_7637a + $630E = BrunoScript_7630d + $63BA = BrunoText1 + $63D3 = BrunoText2 + $63C4 = BrunoBeforeBattleText + $63CE = BrunoAfterBattleText + $63C9 = BrunoEndBattleText + $63AD = BrunoTrainerHeader0 + $6561 = AgathaBlocks + $6506 = AgathaTextPointers + $642E = AgathaScript + $6535 = AgathaObject + $6444 = AgathaScript_76443 + $650A = AgathaTrainerHeaders + $646A = AgathaScriptPointers + $645A = AgathaScript_76459 + $6491 = AgathaScript0 + $64EE = AgathaScript2 + $64DB = AgathaScript3 + $6474 = AgathaScript4 + $64D2 = CoordsData_764d1 + $6465 = AgathaScript_76464 + $6517 = AgathaText1 + $6530 = AgathaText2 + $6521 = AgathaBeforeBattleText + $652B = AgathaAfterBattleText + $6526 = AgathaEndBattleText + $650A = AgathaTrainerHeader0 + $6684 = AccessedHoFPCText + $65E6 = Func_765e5 + $6611 = Func_76610 + $6671 = HallOfFameNoText + $6858 = Func_76857 + $6823 = HiddenCoinCoords + SLACK: $1784 bytes + +Bank #30: + SECTION: $4000-$7FBF ($3FC0 bytes) + $7F86 = GetMachinePrice + $5E96 = Func_79e96 + $46EE = AnimationTileset2 + $5F54 = Func_79f54 + $56E0 = AnimationSubstitute + $5FC0 = LoadSmokeTileFourTimes + $4BDE = SlotMachineTiles2 + $7DE9 = Func_7bde9 + $5747 = Func_79747 + $5787 = AnimationTransformMon + $5771 = Func_79771 + $52B9 = AnimationSlideEnemyMonOut + $559F = AnimationMinimizeMon + $7F15 = ShakeElevator + $5ABA = Func_79aba + $4D5E = MoveAnimation + $5DDA = Func_79dda + $5869 = Func_79869 + $5FED = RedFishingTilesFront + $600D = RedFishingTilesBack + $602D = RedFishingTilesSide + $604D = RedFishingRodTiles + $5793 = Func_79793 + $4088 = DrawFrameBlock.flipHorizontalTranslateDown + $40AE = DrawFrameBlock.nextTile + $4012 = DrawFrameBlock.loop + $4EC8 = AnimationCleanOAM + $607D = AttackAnimationPointers + $50DA = SpecialEffectPointers + $586F = Func_7986f + $4178 = PlayAnimation.nextAnimationCommand + $676D = SubanimationPointers + $41D2 = LoadAnimationTileset + $417C = LoadSubanimation + $4E53 = PlaySubanimation + $41CA = GetSubanimationTransform2 + $41C2 = GetSubanimationTransform1 + $41F2 = AnimationTilesetPointers + $41FE = AnimationTileset1 + $4E23 = Func_78e23 + $4D90 = MoveAnimation.AnimationFinished + $5E16 = TossBallAnimation + $4DA6 = ShareMoveAnimations + $40F1 = PlayAnimation + $4DBD = Func_78dbd + $4DCF = PointerTable_78dcf + $4DDB = Func_78ddb + $4DE3 = Func_78de3 + $4DEB = Func_78deb + $4DF0 = Func_78df0 + $4DF6 = Func_78df6 + $4DFE = Func_78dfe + $5E6A = Func_79e6a + $5209 = Func_79209 + $5210 = Func_79210 + $5369 = AnimationBlinkEnemyMon + $6F74 = FrameBlockPointers + $7C85 = FrameBlockBaseCoords + $4000 = DrawFrameBlock + $4ED7 = DoSpecialEffectByAnimationId + $4E73 = PlaySubanimation.loop + $4EF5 = AnimationIdSpecialEffects + $4EF1 = DoSpecialEffectByAnimationId.done + $51BE = AnimationFlashScreen + $50D0 = Func_790d0 + $50BC = DoGrowlSpecialEffects + $5016 = DoBlizzardSpecialEffects + $5000 = FlashScreenEveryFourFrameBlocks + $4FF7 = FlashScreenEveryEightFrameBlocks + $5009 = DoExplodeSpecialEffects + $4FD9 = DoRockSlideSpecialEffects + $5041 = Func_79041 + $504C = Func_7904c + $507C = Func_7907c + $4F3E = DoBallTossSpecialEffects + $4F96 = DoBallShakeSpecialEffects + $4FCE = DoPoofSpecialEffects + $5862 = Func_79862 + $5801 = AnimationHideMonPic + $580C = Func_7980c + $5078 = BallMoveDistances1 + $50B3 = BallMoveDistances2 + $51D6 = AnimationDarkScreenPalette + $51EA = AnimationResetScreenPalette + $520E = AnimationShakeScreen + $5215 = AnimationWaterDropletsEverywhere + $51DB = AnimationDarkenMonPalette + $5165 = AnimationFlashScreenLong + $527A = AnimationSlideMonUp + $5297 = AnimationSlideMonDown + $5389 = AnimationFlashMonPic + $52AF = AnimationSlideMonOut + $536F = AnimationBlinkMon + $53F9 = AnimationMoveMonHorizontally + $5415 = AnimationResetMonPosition + $51F4 = AnimationLightScreenPalette + $54A1 = AnimationSquishMonPic + $54F9 = AnimationShootBallsUpward + $5566 = AnimationShootManyBallsUpward + $577A = AnimationBoundUpAndDown + $55C9 = AnimationSlideMonDownAndHide + $5C74 = AnimationLeavesFalling + $5C8A = AnimationPetalsFalling + $5645 = AnimationSlideMonHalfLeft + $5D77 = AnimationShakeEnemyHUD + $5424 = AnimationSpiralBallsInward + $5150 = AnimationDelay10 + $5398 = AnimationFlashEnemyMonPic + $57D8 = AnimationHideEnemyMonPic + $539E = AnimationShowMonPic + $53AB = AnimationShowEnemyMonPic + $53B1 = AnimationShakeBackAndForth + $5666 = AnimationWavyScreen + $5161 = CallWithTurnFlipped.returnAddress + $518E = FlashScreenLongMonochrome + $519B = FlashScreenLongSGB + $51A8 = FlashScreenLongDelay + $5246 = Func_79246 + $52BF = Func_792bf + $5842 = Func_79842 + $5820 = Func_79820 + $5AAE = Func_79aae + $55F8 = Func_795f8 + $5155 = CallWithTurnFlipped + $5329 = Func_79329 + $57E8 = Func_797e8 + $5476 = SpiralBallAnimationCoordinates + $54D4 = Func_794d4 + $585B = Func_7985b + $5517 = Func_79517 + $5591 = UpwardBallsAnimXCoordinatesPlayerTurn + $5598 = UpwardBallsAnimXCoordinatesEnemyTurn + $55C4 = MinimizedMonSprite + $5652 = Func_79652 + $563C = Func_7963c + $5633 = Func_79633 + $5E0D = Func_79e0d + $56BF = WavyScreenLineOffsets + $56AE = Func_796ae + $573F = CopySlowbroSpriteData + $5AEA = PointerTable_79aea + $58BC = MoveSoundTable + $58AD = IsCryMove + $5B02 = Unknown_79b02 + $5B1B = Unknown_79b1b + $5B24 = Unknown_79b24 + $5B55 = Unknown_79b55 + $5B78 = Unknown_79b78 + $5B8D = Unknown_79b8d + $5BBE = Unknown_79bbe + $5BEF = Unknown_79bef + $5C20 = Unknown_79c20 + $5C50 = Unknown_79c50 + $5C97 = Func_79c97 + $5D2A = Func_79d2a + $5D52 = Func_79d52 + $5D16 = Func_79d16 + $5CDB = Func_79cdb + $5D0D = Unknown_79d0d + $5D3E = Unknown_79d3e + $5D63 = Unknown_79d63 + $52FD = Func_792fd + $5DE9 = Func_79de9 + $5ACE = Func_79ace + $5E50 = TossBallAnimation.PokeBallAnimations + $5339 = Func_79339 + $5EED = Func_79eed + $5F30 = Func_79f30 + $5352 = Func_79352 + $5F92 = Func_79f92 + $5F7E = Func_79f54.asm_79f7e + $5FB0 = PointerTable_79fb0 + $5350 = Func_79350 + $5337 = Func_79337 + $5FD4 = LoadSmokeTile + $5FDD = SSAnneSmokePuffTile + $6216 = PoundAnim + $621A = KarateChopAnim + $621E = DoubleSlapAnim + $6225 = CometPunchAnim + $622C = MegaPunchAnim + $6230 = PayDayAnim + $6237 = FirePunchAnim + $623E = IcePunchAnim + $6245 = ThunderPunchAnim + $6250 = ScratchAnim + $6254 = VicegripAnim + $6258 = GuillotineAnim + $625C = RazorWindAnim + $6260 = SwordsDanceAnim + $626A = CutAnim + $6270 = GustAnim + $6277 = WingAttackAnim + $627B = WhirlwindAnim + $6281 = FlyAnim + $6287 = BindAnim + $628E = SlamAnim + $6292 = VineWhipAnim + $6299 = StompAnim + $629D = DoubleKickAnim + $62A4 = MegaKickAnim + $62A8 = JumpKickAnim + $62AC = RollingKickAnim + $62B2 = SandAttackAnim + $62B6 = HeatButtAnim + $62BA = HornAttackAnim + $62C1 = FuryAttackAnim + $62C8 = HornDrillAnim + $62D8 = TackleAnim + $62DD = BodySlamAnim + $62E6 = WrapAnim + $62F0 = TakeDownAnim + $62F7 = ThrashAnim + $62FB = DoubleEdgeAnim + $6309 = TailWhipAnim + $6318 = PoisonStingAnim + $631C = TwineedleAnim + $6323 = PinMissileAnim + $6327 = LeerAnim + $6330 = BiteAnim + $6334 = GrowlAnim + $6338 = RoarAnim + $6342 = SingAnim + $634C = SupersonicAnim + $6350 = SonicBoomAnim + $635D = DisableAnim + $6366 = AcidAnim + $636D = EmberAnim + $6371 = FlamethrowerAnim + $637B = MistAnim + $6382 = WaterGunAnim + $6386 = HydroPumpAnim + $638D = SurfAnim + $6393 = IceBeamAnim + $639A = BlizzardAnim + $63A1 = PsyBeamAnim + $63A7 = BubbleBeamAnim + $63AB = AuroraBeamAnim + $63B3 = HyperBeamAnim + $63C4 = PeckAnim + $63C8 = DrillPeckAnim + $63CC = SubmissionAnim + $63D4 = LowKickAnim + $63DC = CounterAnim + $63E4 = SeismicTossAnim + $63FE = StrengthAnim + $6406 = AbsorbAnim + $6411 = MegaDrainAnim + $6420 = LeechSeedAnim + $6427 = GrowthAnim + $642E = RazorLeafAnim + $6437 = SolarBeamAnim + $643E = PoisonPowderAnim + $6442 = StunSporeAnim + $6446 = SleepPowderAnim + $644A = PedalDanceAnim + $6451 = StringShotAnim + $6455 = DragonRageAnim + $6462 = FireSpinAnim + $646C = ThunderShockAnim + $6470 = ThunderBoltAnim + $6477 = ThunderWaveAnim + $6481 = ThunderAnim + $6490 = RockThrowAnim + $6494 = EarthquakeAnim + $6499 = FissureAnim + $64A2 = DigAnim + $64A8 = ToxicAnim + $64AE = ConfusionAnim + $64B1 = PsychicAnim + $64B6 = HypnosisAnim + $64B9 = MeditateAnim + $64C3 = AgilityAnim + $64C8 = QuickAttackAnim + $64D0 = RageAnim + $64D4 = TeleportAnim + $64D9 = NightShadeAnim + $64DE = MimicAnim + $64E5 = ScreechAnim + $64E9 = DoubleTeamAnim + $64FD = RecoverAnim + $6506 = HardenAnim + $6510 = MinimizeAnim + $6519 = SmokeScreenAnim + $653A = ConfuseRayAnim + $6542 = WithdrawAnim + $654E = DefenseCurlAnim + $6558 = BarrierAnim + $655F = LightScreenAnim + $656A = HazeAnim + $6571 = ReflectAnim + $657C = FocusEnergyAnim + $657F = BideAnim + $6583 = MetronomeAnim + $6592 = MirrorMoveAnim + $6596 = SelfdestructAnim + $659A = EggBombAnim + $65A1 = LickAnim + $65A5 = SmogAnim + $65AD = SludgeAnim + $65B4 = BoneClubAnim + $65B8 = FireBlastAnim + $65C8 = WaterfallAnim + $65D3 = ClampAnim + $65DD = SwiftAnim + $65E1 = SkullBashAnim + $65E5 = SpikeCannonAnim + $65E9 = ConstrictAnim + $65F3 = AmnesiaAnim + $65FA = KinesisAnim + $65FE = SoftboiledAnim + $660C = HiJumpKickAnim + $6610 = GlareAnim + $6619 = DreamEaterAnim + $6623 = PoisonGasAnim + $6627 = BarrageAnim + $662E = LeechLifeAnim + $663C = LovelyKissAnim + $6640 = SkyAttackAnim + $664A = TransformAnim + $6656 = BubbleAnim + $665A = DizzyPunchAnim + $6667 = SporeAnim + $666B = FlashAnim + $6674 = PsywaveAnim + $667A = SplashAnim + $667D = AcidArmorAnim + $6680 = CrabHammerAnim + $6687 = ExplosionAnim + $668B = FurySwipesAnim + $668F = BonemerangAnim + $6693 = RestAnim + $669A = RockSlideAnim + $66A4 = HyperFangAnim + $66A8 = SharpenAnim + $66B2 = ConversionAnim + $66BD = TriAttackAnim + $66C5 = SuperFangAnim + $66CD = SlashAnim + $66D1 = SubstituteAnim + $6216 = StruggleAnim + $66ED = ShowPicAnim + $66F3 = EnemyFlashAnim + $66F6 = PlayerFlashAnim + $66F9 = EnemyHUDShakeAnim + $66FC = TradeBallDropAnim + $6700 = TradeBallAppear1Anim + $6704 = TradeBallAppear2Anim + $6708 = TradeBallPoofAnim + $670C = XStatItemAnim + $6713 = ShrinkingSquareAnim + $671B = XStatItemBlackAnim + $6722 = ShrinkingSquareBlackAnim + $672A = UnusedAnim + $6731 = ParalyzeAnim + $6738 = PoisonAnim + $673F = SleepPlayerAnim + $6746 = SleepEnemyAnim + $674D = ConfusedPlayerAnim + $6754 = ConfusedEnemyAnim + $675F = FaintAnim + $66D9 = BallTossAnim + $66E5 = BallShakeAnim + $66E9 = BallPoofAnim + $675B = BallBlockAnim + $66DD = GreatTossAnim + $66E1 = UltraTossAnim + $6762 = ShakeScreenAnim + $66F0 = HidePicAnim + $6765 = ThrowRockAnim + $6769 = ThrowBaitAnim + $6213 = ZigZagScreenAnim + $6946 = Subanimation00 + $694A = Subanimation01 + $6951 = Subanimation02 + $695B = Subanimation03 + $6819 = Subanimation04 + $6823 = Subanimation05 + $686B = Subanimation06 + $6849 = Subanimation07 + $6827 = Subanimation08 + $688D = Subanimation09 + $689A = Subanimation0a + $68AD = Subanimation0b + $6968 = Subanimation0c + $6972 = Subanimation0d + $6985 = Subanimation0e + $6A20 = Subanimation0f + $6A6A = Subanimation10 + $68BE = Subanimation11 + $692A = Subanimation12 + $6AA2 = Subanimation13 + $6AB5 = Subanimation14 + $6AEB = Subanimation15 + $6A45 = Subanimation16 + $6AF2 = Subanimation17 + $6AFF = Subanimation18 + $6B1F = Subanimation19 + $6B44 = Subanimation1a + $6B75 = Subanimation1b + $6B82 = Subanimation1c + $6B8C = Subanimation1d + $6BBA = Subanimation1e + $69A1 = Subanimation1f + $6BBE = Subanimation20 + $6BC5 = Subanimation21 + $6BCF = Subanimation22 + $6CA0 = Subanimation23 + $6CA7 = Subanimation24 + $6CAE = Subanimation25 + $6CB5 = Subanimation26 + $6CD0 = Subanimation27 + $6CD7 = Subanimation28 + $6C3B = Subanimation29 + $6C93 = Subanimation2a + $68E3 = Subanimation2b + $6905 = Subanimation2c + $6BF1 = Subanimation2d + $69B1 = Subanimation2e + $69DC = Subanimation2f + $69E9 = Subanimation30 + $6A83 = Subanimation31 + $6CE1 = Subanimation32 + $6CEB = Subanimation33 + $6D2D = Subanimation34 + $6D6D = Subanimation35 + $6D7A = Subanimation36 + $6D93 = Subanimation37 + $6DB2 = Subanimation38 + $6C04 = Subanimation39 + $6CBC = Subanimation3a + $6CC6 = Subanimation3b + $6CFE = Subanimation3c + $6D14 = Subanimation3d + $6DE3 = Subanimation3e + $6E1A = Subanimation3f + $6B0C = Subanimation40 + $6AD1 = Subanimation41 + $6AE1 = Subanimation42 + $6E76 = Subanimation43 + $6E51 = Subanimation44 + $6E80 = Subanimation45 + $6E8D = Subanimation46 + $6EA0 = Subanimation47 + $6EAA = Subanimation48 + $6EBD = Subanimation49 + $6ECA = Subanimation4a + $6ECE = Subanimation4b + $6ED8 = Subanimation4c + $6EF1 = Subanimation4d + $6C08 = Subanimation4e + $6C0C = Subanimation4f + $6C22 = Subanimation50 + $6F04 = Subanimation51 + $6F17 = Subanimation52 + $6F2D = Subanimation53 + $6F52 = Subanimation54 + $68BA = Subanimation55 + $7DE7 = FrameBlock00 + $7068 = FrameBlock01 + $708D = FrameBlock02 + $70CE = FrameBlock03 + $70DF = FrameBlock04 + $70F0 = FrameBlock05 + $7101 = FrameBlock06 + $7132 = FrameBlock07 + $7173 = FrameBlock08 + $71B4 = FrameBlock09 + $71E5 = FrameBlock0a + $7216 = FrameBlock0b + $7227 = FrameBlock0c + $7238 = FrameBlock0d + $7259 = FrameBlock0e + $726A = FrameBlock0f + $727B = FrameBlock10 + $729C = FrameBlock11 + $72BD = FrameBlock12 + $72CA = FrameBlock13 + $72DB = FrameBlock14 + $72FC = FrameBlock15 + $732D = FrameBlock16 + $734E = FrameBlock17 + $735F = FrameBlock18 + $7364 = FrameBlock19 + $736D = FrameBlock1a + $7376 = FrameBlock1b + $737F = FrameBlock1c + $7388 = FrameBlock1d + $7391 = FrameBlock1e + $73AB = FrameBlock1f + $73B4 = FrameBlock20 + $73CD = FrameBlock21 + $73FE = FrameBlock22 + $744B = FrameBlock23 + $745C = FrameBlock24 + $7465 = FrameBlock25 + $7496 = FrameBlock26 + $74A7 = FrameBlock27 + $74BC = FrameBlock28 + $74D5 = FrameBlock29 + $74E6 = FrameBlock2a + $74F7 = FrameBlock2b + $7500 = FrameBlock2c + $7505 = FrameBlock2d + $7526 = FrameBlock2e + $7547 = FrameBlock2f + $7558 = FrameBlock30 + $7569 = FrameBlock31 + $756E = FrameBlock32 + $758B = FrameBlock33 + $75A8 = FrameBlock34 + $75AD = FrameBlock35 + $75C6 = FrameBlock36 + $75D7 = FrameBlock37 + $75E8 = FrameBlock38 + $75F9 = FrameBlock39 + $760A = FrameBlock3a + $761B = FrameBlock3b + $7630 = FrameBlock3c + $7649 = FrameBlock3d + $7666 = FrameBlock3e + $7687 = FrameBlock3f + $76A8 = FrameBlock40 + $76B5 = FrameBlock41 + $76C6 = FrameBlock42 + $76F3 = FrameBlock43 + $7720 = FrameBlock44 + $7731 = FrameBlock45 + $7742 = FrameBlock46 + $7753 = FrameBlock47 + $7764 = SmallBlackCircleFrameBlock + $7775 = LargeBlockCircleFrameBlock + $785A = FrameBlock4a + $786B = FrameBlock4b + $787C = FrameBlock4c + $788D = FrameBlock4d + $789E = FrameBlock4e + $78BF = FrameBlock4f + $78F0 = FrameBlock50 + $7911 = FrameBlock51 + $7932 = FrameBlock52 + $7943 = FrameBlock53 + $7950 = FrameBlock54 + $7961 = FrameBlock55 + $796E = FrameBlock56 + $7987 = FrameBlock57 + $79AC = FrameBlock58 + $79C9 = FrameBlock59 + $79CE = FrameBlock5a + $79FF = FrameBlock5b + $7A10 = FrameBlock5c + $7A31 = FrameBlock5d + $7A5E = FrameBlock5e + $7A9B = FrameBlock5f + $7AAC = FrameBlock60 + $7ACD = FrameBlock61 + $7AFE = FrameBlock62 + $7B3F = FrameBlock63 + $7B58 = FrameBlock64 + $7B71 = FrameBlock65 + $7B8A = FrameBlock66 + $7B93 = FrameBlock67 + $7B98 = FrameBlock68 + $7BA9 = FrameBlock69 + $7BAE = FrameBlock6a + $7BCF = FrameBlock6b + $7BF0 = FrameBlock6c + $7C11 = FrameBlock6d + $7C1A = FrameBlock6e + $7C2B = FrameBlock6f + $7C3C = FrameBlock70 + $77B6 = FrameBlock71 + $77F7 = FrameBlock72 + $7828 = FrameBlock73 + $7849 = FrameBlock74 + $739A = FrameBlock75 + $7C4D = FrameBlock76 + $7C6A = FrameBlock77 + $7C7B = FrameBlock78 + $7C80 = FrameBlock79 + $7EB4 = Func_7beb4 + $7EB9 = Func_7beb9 + $7EFA = asm_7befa + $7EC2 = asm_7bec2 + $7ED6 = Func_7bed6 + $7F64 = Func_7bf64 + $7FA7 = TechnicalMachinePrices + SLACK: $0040 bytes + +Bank #31: + SECTION: $4000-$4248 ($0249 bytes) + $41EF = SFX_1f_51 + $4000 = SFX_Headers_1f + $4027 = SFX_1f_0d + $4084 = SFX_1f_1c + $410B = SFX_1f_2b + $4192 = SFX_1f_3a + $402A = SFX_1f_0e + $408D = SFX_1f_1d + $4114 = SFX_1f_2c + $419B = SFX_1f_3b + $41DA = SFX_1f_4a + $402D = SFX_1f_0f + $4096 = SFX_1f_1e + $411D = SFX_1f_2d + $41A4 = SFX_1f_3c + $41DD = SFX_1f_4b + $4216 = SFX_1f_5a + $409F = SFX_1f_1f + $4126 = SFX_1f_2e + $41A7 = SFX_1f_3d + $41E0 = SFX_1f_4c + $421C = SFX_1f_5b + $412F = SFX_1f_2f + $41AA = SFX_1f_3e + $41E3 = SFX_1f_4d + $421F = SFX_1f_5c + $41AD = SFX_1f_3f + $41E6 = SFX_1f_4e + $4222 = SFX_1f_5d + $41E9 = SFX_1f_4f + $4228 = SFX_1f_5e + $422B = SFX_1f_5f + $4003 = SFX_1f_01 + $4030 = SFX_1f_10 + $4006 = SFX_1f_02 + $4033 = SFX_1f_11 + $40A8 = SFX_1f_20 + $4009 = SFX_1f_03 + $4036 = SFX_1f_12 + $40B1 = SFX_1f_21 + $4138 = SFX_1f_30 + $400C = SFX_1f_04 + $4039 = SFX_1f_13 + $40BA = SFX_1f_22 + $4141 = SFX_1f_31 + $41B0 = SFX_1f_40 + $400F = SFX_1f_05 + $403C = SFX_1f_14 + $40C3 = SFX_1f_23 + $414A = SFX_1f_32 + $41B3 = SFX_1f_41 + $41EC = SFX_1f_50 + $4012 = SFX_1f_06 + $4045 = SFX_1f_15 + $40CC = SFX_1f_24 + $4153 = SFX_1f_33 + $41BC = SFX_1f_42 + $422E = SFX_1f_60 + $4015 = SFX_1f_07 + $404E = SFX_1f_16 + $40D5 = SFX_1f_25 + $415C = SFX_1f_34 + $41C5 = SFX_1f_43 + $41F5 = SFX_1f_52 + $4231 = SFX_1f_61 + $4018 = SFX_1f_08 + $4057 = SFX_1f_17 + $40DE = SFX_1f_26 + $4165 = SFX_1f_35 + $41C8 = SFX_1f_44 + $41F8 = SFX_1f_53 + $4234 = SFX_1f_62 + $401B = SFX_1f_09 + $4060 = SFX_1f_18 + $40E7 = SFX_1f_27 + $416E = SFX_1f_36 + $41CB = SFX_1f_45 + $41FB = SFX_1f_54 + $4237 = SFX_1f_63 + $4069 = SFX_1f_19 + $40F0 = SFX_1f_28 + $4177 = SFX_1f_37 + $41CE = SFX_1f_46 + $4201 = SFX_1f_55 + $423A = SFX_1f_64 + $40F9 = SFX_1f_29 + $4180 = SFX_1f_38 + $41D1 = SFX_1f_47 + $4204 = SFX_1f_56 + $423D = SFX_1f_65 + $4189 = SFX_1f_39 + $41D4 = SFX_1f_48 + $4207 = SFX_1f_57 + $4240 = SFX_1f_66 + $41D7 = SFX_1f_49 + $420A = SFX_1f_58 + $4246 = SFX_1f_67 + $4210 = SFX_1f_59 + $401E = SFX_1f_0a + $4021 = SFX_1f_0b + $4072 = SFX_1f_1a + $4024 = SFX_1f_0c + $407B = SFX_1f_1b + $4102 = SFX_1f_2a + SECTION: $4249-$42FC ($00B4 bytes) + $42E2 = Music_MeetEvilTrainer + $4255 = Music_Credits + $42C4 = Music_CinnabarMansion + $425E = Music_HallOfFame + $4270 = Music_JigglypuffSong + $4282 = Music_Surfing + $4267 = Music_OaksLab + $42D0 = Music_PokemonTower + $4249 = Music_TitleScreen + $42EB = Music_MeetFemaleTrainer + $4294 = Music_IntroBattle + $42D9 = Music_SilphCo + $4276 = Music_BikeRiding + $42A0 = Music_Dungeon1 + $42AC = Music_Dungeon2 + $42B8 = Music_Dungeon3 + $42F4 = Music_MeetMaleTrainer + $428B = Music_GameCorner + SECTION: $42FD-$513A ($0E3E bytes) + $42FD = SFX_1f_01_Ch1 + $4301 = SFX_1f_02_Ch1 + $4305 = SFX_1f_03_Ch1 + $4309 = SFX_1f_04_Ch1 + $430D = SFX_1f_05_Ch1 + $4320 = SFX_1f_06_Ch1 + $4324 = SFX_1f_07_Ch1 + $432B = SFX_1f_08_Ch1 + $432F = SFX_1f_09_Ch1 + $4333 = SFX_1f_0a_Ch1 + $4337 = SFX_1f_0b_Ch1 + $433B = SFX_1f_0c_Ch1 + $433F = SFX_1f_0d_Ch1 + $4343 = SFX_1f_0e_Ch1 + $4347 = SFX_1f_0f_Ch1 + $434E = SFX_1f_10_Ch1 + $4355 = SFX_1f_11_Ch1 + $4359 = SFX_1f_12_Ch1 + $435D = SFX_1f_13_Ch1 + $49FC = SFX_1f_14_Ch1 + $4A0B = SFX_1f_14_Ch2 + $4A1A = SFX_1f_14_Ch3 + $4C0C = SFX_1f_15_Ch1 + $4C1F = SFX_1f_15_Ch2 + $4C32 = SFX_1f_15_Ch3 + $4B81 = SFX_1f_16_Ch1 + $4B90 = SFX_1f_16_Ch2 + $4B9E = SFX_1f_16_Ch3 + $491B = SFX_1f_17_Ch1 + $493A = SFX_1f_17_Ch2 + $4959 = SFX_1f_17_Ch3 + $4CCA = SFX_1f_18_Ch1 + $4CE9 = SFX_1f_18_Ch2 + $4D08 = SFX_1f_18_Ch3 + $4AAA = SFX_1f_19_Ch1 + $4ABD = SFX_1f_19_Ch2 + $4ACF = SFX_1f_19_Ch3 + $4A54 = SFX_1f_1a_Ch1 + $4A6E = SFX_1f_1a_Ch2 + $4A6F = SFX_1f_1a_Ch3 + $4A82 = SFX_1f_1b_Ch1 + $4A91 = SFX_1f_1b_Ch2 + $4AA0 = SFX_1f_1b_Ch3 + $4C9A = SFX_1f_1c_Ch1 + $4CAD = SFX_1f_1c_Ch2 + $4CC0 = SFX_1f_1c_Ch3 + $47A4 = SFX_1f_1d_Ch1 + $47C1 = SFX_1f_1d_Ch2 + $47E2 = SFX_1f_1d_Ch3 + $4C3F = SFX_1f_1e_Ch1 + $4C5E = SFX_1f_1e_Ch2 + $4C81 = SFX_1f_1e_Ch3 + $4AD0 = SFX_1f_1f_Ch1 + $4AFB = SFX_1f_1f_Ch2 + $4B1A = SFX_1f_1f_Ch3 + $4B33 = SFX_1f_20_Ch1 + $4B5A = SFX_1f_20_Ch2 + $4B80 = SFX_1f_20_Ch3 + $4B9F = SFX_1f_21_Ch1 + $4BBE = SFX_1f_21_Ch2 + $4BED = SFX_1f_21_Ch3 + $4A24 = SFX_1f_22_Ch1 + $4A37 = SFX_1f_22_Ch2 + $4A4A = SFX_1f_22_Ch3 + $4966 = SFX_1f_23_Ch1 + $4981 = SFX_1f_23_Ch2 + $499C = SFX_1f_23_Ch3 + $49AC = SFX_1f_24_Ch1 + $49CF = SFX_1f_24_Ch2 + $49F2 = SFX_1f_24_Ch3 + $4888 = SFX_1f_25_Ch1 + $48A7 = SFX_1f_25_Ch2 + $48CA = SFX_1f_25_Ch3 + $4DA0 = SFX_1f_26_Ch1 + $4DB3 = SFX_1f_26_Ch2 + $4DC6 = SFX_1f_26_Ch3 + $4DD3 = SFX_1f_27_Ch1 + $4DEE = SFX_1f_27_Ch2 + $4E09 = SFX_1f_27_Ch3 + $4E1C = SFX_1f_28_Ch1 + $4E2B = SFX_1f_28_Ch2 + $4E3A = SFX_1f_28_Ch3 + $4EAA = SFX_1f_29_Ch1 + $4EC5 = SFX_1f_29_Ch2 + $4EE0 = SFX_1f_29_Ch3 + $4D3D = SFX_1f_2a_Ch1 + $4D4C = SFX_1f_2a_Ch2 + $4D5B = SFX_1f_2a_Ch3 + $4EF3 = SFX_1f_2b_Ch1 + $4F06 = SFX_1f_2b_Ch2 + $4F19 = SFX_1f_2b_Ch3 + $5003 = SFX_1f_2c_Ch1 + $5026 = SFX_1f_2c_Ch2 + $5049 = SFX_1f_2c_Ch3 + $4D1B = SFX_1f_2d_Ch1 + $4D2A = SFX_1f_2d_Ch2 + $4D3C = SFX_1f_2d_Ch3 + $4F74 = SFX_1f_2e_Ch1 + $4F8F = SFX_1f_2e_Ch2 + $4FAA = SFX_1f_2e_Ch3 + $4D65 = SFX_1f_2f_Ch1 + $4D7C = SFX_1f_2f_Ch2 + $4D93 = SFX_1f_2f_Ch3 + $4F26 = SFX_1f_30_Ch1 + $4F49 = SFX_1f_30_Ch2 + $4F64 = SFX_1f_30_Ch3 + $4FBD = SFX_1f_31_Ch1 + $4FD8 = SFX_1f_31_Ch2 + $4FF3 = SFX_1f_31_Ch3 + $4E44 = SFX_1f_32_Ch1 + $4E67 = SFX_1f_32_Ch2 + $4E8E = SFX_1f_32_Ch3 + $505C = SFX_1f_33_Ch1 + $506F = SFX_1f_33_Ch2 + $5082 = SFX_1f_33_Ch3 + $508F = SFX_1f_34_Ch1 + $50A2 = SFX_1f_34_Ch2 + $50B5 = SFX_1f_34_Ch3 + $50C2 = SFX_1f_35_Ch1 + $50E5 = SFX_1f_35_Ch2 + $5107 = SFX_1f_35_Ch3 + $5108 = SFX_1f_36_Ch1 + $511B = SFX_1f_36_Ch2 + $512E = SFX_1f_36_Ch3 + $47FB = SFX_1f_37_Ch1 + $4812 = SFX_1f_37_Ch2 + $4825 = SFX_1f_37_Ch3 + $4832 = SFX_1f_38_Ch1 + $4855 = SFX_1f_38_Ch2 + $4878 = SFX_1f_38_Ch3 + $48E0 = SFX_1f_39_Ch1 + $48F7 = SFX_1f_39_Ch2 + $490E = SFX_1f_39_Ch3 + $43F3 = SFX_1f_3c_Ch1 + $4490 = SFX_1f_3d_Ch1 + $44B2 = SFX_1f_3e_Ch1 + $43C3 = SFX_1f_3f_Ch1 + $444B = SFX_1f_40_Ch1 + $449F = SFX_1f_43_Ch1 + $44C7 = SFX_1f_44_Ch1 + $44D6 = SFX_1f_45_Ch1 + $4505 = SFX_1f_46_Ch1 + $4518 = SFX_1f_47_Ch1 + $452B = SFX_1f_48_Ch1 + $4546 = SFX_1f_49_Ch1 + $455D = SFX_1f_4a_Ch1 + $4572 = SFX_1f_4b_Ch1 + $458D = SFX_1f_4c_Ch1 + $45A8 = SFX_1f_4d_Ch1 + $45B3 = SFX_1f_4e_Ch1 + $45BE = SFX_1f_4f_Ch1 + $45CB = SFX_1f_50_Ch1 + $45FC = SFX_1f_51_Ch1 + $4613 = SFX_1f_51_Ch2 + $4626 = SFX_1f_52_Ch1 + $4631 = SFX_1f_53_Ch1 + $464A = SFX_1f_54_Ch1 + $4669 = SFX_1f_54_Ch2 + $4688 = SFX_1f_55_Ch1 + $43CA = SFX_1f_56_Ch1 + $43DA = SFX_1f_57_Ch1 + $43E1 = SFX_1f_58_Ch1 + $43E8 = SFX_1f_58_Ch2 + $4404 = SFX_1f_59_Ch1 + $440B = SFX_1f_59_Ch2 + $4416 = SFX_1f_5a_Ch1 + $4421 = SFX_1f_5a_Ch2 + $4430 = SFX_1f_5b_Ch1 + $443B = SFX_1f_5c_Ch1 + $445E = SFX_1f_5d_Ch1 + $4475 = SFX_1f_5d_Ch2 + $46A5 = SFX_1f_5e_Ch1 + $46BE = SFX_1f_5f_Ch1 + $46C9 = SFX_1f_60_Ch1 + $46D4 = SFX_1f_61_Ch1 + $46DE = SFX_1f_62_Ch1 + $46E5 = SFX_1f_63_Ch1 + $46F5 = SFX_1f_64_Ch1 + $4704 = SFX_1f_65_Ch1 + $470F = SFX_1f_66_Ch1 + $471E = SFX_1f_66_Ch2 + $472D = SFX_1f_67_Ch1 + $4373 = Music1f_WavePointers.wave0 + $4383 = Music1f_WavePointers.wave1 + $4393 = Music1f_WavePointers.wave2 + $43A3 = Music1f_WavePointers.wave3 + $43B3 = Music1f_WavePointers.wave4 + $43C3 = Music1f_WavePointers.wave5 + $4361 = Music1f_WavePointers + SECTION: $513B-$5BBA ($0A80 bytes) + $5170 = OwnedMonValues + $5162 = PokedexRatingSfxPointers + $51AC = Music1f_ApplyMusicAffects + $5244 = Music1f_PlayNextNote + $5881 = Music1f_ApplyDutyCycle + $576D = Music1f_ApplyPitchBend + $58AC = Func_7d8ac + $525A = Music1f_endchannel + $5899 = Music1f_GetNextMusicByte + $52E8 = Music1f_callchannel + $5B93 = Unknown_7db93 + $573B = Func_7d73b + $531D = Music1f_loopchannel + $5358 = Music1f_notetype + $5397 = Music1f_toggleperfectpitch + $58CC = Func_7d8cc + $557E = Music1f_notelength + $58EA = Func_7d8ea + $569D = Func_7d69d + $566C = Func_7d66c + $56BF = Func_7d6bf + $58BB = Func_7d8bb + $5707 = Func_7d707 + $5803 = Func_7d803 + $5B9B = Unknown_7db9b + $5729 = Func_7d729 + $5759 = Func_7d759 + $57B4 = Music1f_ApplyPitchBend.asm_7d7b4 + $57FA = Music1f_ApplyPitchBend.asm_7d7fa + $5B8B = Unknown_7db8b + $5BA3 = Music1f_Pitches + $5AA8 = Func_7daa8 + $59C2 = Func_7d9c2 + $5AFD = FillMusicRAM1f + $5B03 = Func_7db03 + $59DB = Func_7d9c2.asm_7d9db + $5B8A = Noise1f_endchannel + $513B = Func_7d13b + $5177 = Music1f_UpdateMusic + SECTION: $5BBB-$7FF9 ($243F bytes) + $6850 = SFX_1f_3a_Ch1 + $6867 = SFX_1f_3a_Ch2 + $6877 = SFX_1f_3a_Ch3 + $6E28 = SFX_1f_3b_Ch1 + $6E47 = SFX_1f_3b_Ch2 + $6E5F = SFX_1f_3b_Ch3 + $6DDA = SFX_1f_41_Ch1 + $6DF3 = SFX_1f_41_Ch2 + $6E09 = SFX_1f_41_Ch3 + $6E74 = SFX_1f_42_Ch1 + $6E93 = SFX_1f_42_Ch2 + $6EAF = SFX_1f_42_Ch3 + $64C0 = Music_TitleScreen_Ch1 + $6578 = Music_TitleScreen_Ch2 + $6643 = Music_TitleScreen_Ch3 + $66EB = Music_TitleScreen_Ch4 + $7C1F = Music_Credits_Ch1 + $7D5F = Music_Credits_Ch2 + $7EC2 = Music_Credits_Ch3 + $7BAF = Music_HallOfFame_Ch1 + $7BDA = Music_HallOfFame_Ch2 + $7BFC = Music_HallOfFame_Ch3 + $6EB9 = Music_OaksLab_Ch1 + $6F05 = Music_OaksLab_Ch2 + $6F52 = Music_OaksLab_Ch3 + $7B7D = Music_JigglypuffSong_Ch1 + $7B9A = Music_JigglypuffSong_Ch2 + $5BBB = Music_BikeRiding_Ch1 + $5C6C = Music_BikeRiding_Ch2 + $5D14 = Music_BikeRiding_Ch3 + $5E68 = Music_BikeRiding_Ch4 + $7A19 = Music_Surfing_Ch1 + $7A9C = Music_Surfing_Ch2 + $7AFA = Music_Surfing_Ch3 + $620B = Music_GameCorner_Ch1 + $62DF = Music_GameCorner_Ch2 + $638B = Music_GameCorner_Ch3 + $7844 = Music_IntroBattle_Ch1 + $78BC = Music_IntroBattle_Ch2 + $791D = Music_IntroBattle_Ch3 + $795B = Music_IntroBattle_Ch4 + $5ED1 = Music_Dungeon1_Ch1 + $5FDE = Music_Dungeon1_Ch2 + $60DC = Music_Dungeon1_Ch3 + $618A = Music_Dungeon1_Ch4 + $6887 = Music_Dungeon2_Ch1 + $68D8 = Music_Dungeon2_Ch2 + $693B = Music_Dungeon2_Ch3 + $69DC = Music_Dungeon2_Ch4 + $69F1 = Music_Dungeon3_Ch1 + $6B68 = Music_Dungeon3_Ch2 + $6C7A = Music_Dungeon3_Ch3 + $6CE4 = Music_Dungeon3_Ch4 + $6D0F = Music_CinnabarMansion_Ch1 + $6D40 = Music_CinnabarMansion_Ch2 + $6D7E = Music_CinnabarMansion_Ch3 + $6DB0 = Music_CinnabarMansion_Ch4 + $704A = Music_PokemonTower_Ch1 + $70E3 = Music_PokemonTower_Ch2 + $719A = Music_PokemonTower_Ch3 + $7243 = Music_SilphCo_Ch1 + $7409 = Music_SilphCo_Ch2 + $75BE = Music_SilphCo_Ch3 + $769D = Music_MeetEvilTrainer_Ch1 + $76BA = Music_MeetEvilTrainer_Ch2 + $76E6 = Music_MeetEvilTrainer_Ch3 + $76F9 = Music_MeetFemaleTrainer_Ch1 + $771C = Music_MeetFemaleTrainer_Ch2 + $774B = Music_MeetFemaleTrainer_Ch3 + $777B = Music_MeetMaleTrainer_Ch1 + $77A2 = Music_MeetMaleTrainer_Ch2 + $77D2 = Music_MeetMaleTrainer_Ch3 + $5BC9 = Music_BikeRiding_branch_7dbc9 + $5C75 = Music_BikeRiding_branch_7dc75 + $5D17 = Music_BikeRiding_branch_7dd17 + $5EA7 = Music_BikeRiding_branch_7dea7 + $5EB4 = Music_BikeRiding_branch_7deb4 + $5EC2 = Music_BikeRiding_branch_7dec2 + $5E6A = Music_BikeRiding_branch_7de6a + $5FAA = Music_Dungeon1_branch_7dfaa + $5EE8 = Music_Dungeon1_branch_7dee8 + $5EFF = Music_Dungeon1_branch_7deff + $5FD5 = Music_Dungeon1_branch_7dfd5 + $5FC5 = Music_Dungeon1_branch_7dfc5 + $5F6E = Music_Dungeon1_branch_7df6e + $5FBB = Music_Dungeon1_branch_7dfbb + $5EE5 = Music_Dungeon1_branch_7dee5 + $6097 = Music_Dungeon1_branch_7e097 + $5FED = Music_Dungeon1_branch_7dfed + $6006 = Music_Dungeon1_branch_7e006 + $60AB = Music_Dungeon1_branch_7e0ab + $60B5 = Music_Dungeon1_branch_7e0b5 + $60BA = Music_Dungeon1_branch_7e0ba + $60CD = Music_Dungeon1_branch_7e0cd + $60C0 = Music_Dungeon1_branch_7e0c0 + $5FEB = Music_Dungeon1_branch_7dfeb + $6140 = Music_Dungeon1_branch_7e140 + $6154 = Music_Dungeon1_branch_7e154 + $6177 = Music_Dungeon1_branch_7e177 + $615E = Music_Dungeon1_branch_7e15e + $6164 = Music_Dungeon1_branch_7e164 + $60E5 = Music_Dungeon1_branch_7e0e5 + $61F1 = Music_Dungeon1_branch_7e1f1 + $6190 = Music_Dungeon1_branch_7e190 + $61A1 = Music_Dungeon1_branch_7e1a1 + $61FA = Music_Dungeon1_branch_7e1fa + $61B0 = Music_Dungeon1_branch_7e1b0 + $6202 = Music_Dungeon1_branch_7e202 + $61BA = Music_Dungeon1_branch_7e1ba + $61CF = Music_Dungeon1_branch_7e1cf + $61D5 = Music_Dungeon1_branch_7e1d5 + $6222 = Music_GameCorner_branch_7e222 + $62FA = Music_GameCorner_branch_7e2fa + $6418 = Music_GameCorner_branch_7e418 + $642D = Music_GameCorner_branch_7e42d + $6442 = Music_GameCorner_branch_7e442 + $6457 = Music_GameCorner_branch_7e457 + $646C = Music_GameCorner_branch_7e46c + $6481 = Music_GameCorner_branch_7e481 + $6496 = Music_GameCorner_branch_7e496 + $64AB = Music_GameCorner_branch_7e4ab + $63A5 = Music_GameCorner_branch_7e3a5 + $6541 = Music_TitleScreen_branch_7e541 + $654A = Music_TitleScreen_branch_7e54a + $655C = Music_TitleScreen_branch_7e55c + $64E2 = Music_TitleScreen_branch_7e4e2 + $6622 = Music_TitleScreen_branch_7e622 + $662C = Music_TitleScreen_branch_7e62c + $6636 = Music_TitleScreen_branch_7e636 + $6594 = Music_TitleScreen_branch_7e594 + $66C9 = Music_TitleScreen_branch_7e6c9 + $66D0 = Music_TitleScreen_branch_7e6d0 + $6664 = Music_TitleScreen_branch_7e664 + $66D7 = Music_TitleScreen_branch_7e6d7 + $66DC = Music_TitleScreen_branch_7e6dc + $66E5 = Music_TitleScreen_branch_7e6e5 + $665E = Music_TitleScreen_branch_7e65e + $6834 = Music_TitleScreen_branch_7e834 + $6842 = Music_TitleScreen_branch_7e842 + $6716 = Music_TitleScreen_branch_7e716 + $6892 = Music_Dungeon2_branch_7e892 + $68DB = Music_Dungeon2_branch_7e8db + $69D1 = Music_Dungeon2_branch_7e9d1 + $6940 = Music_Dungeon2_branch_7e940 + $6958 = Music_Dungeon2_branch_7e958 + $69DD = Music_Dungeon2_branch_7e9dd + $6AB2 = Music_Dungeon3_branch_7eab2 + $69FE = Music_Dungeon3_branch_7e9fe + $6AC1 = Music_Dungeon3_branch_7eac1 + $6A11 = Music_Dungeon3_branch_7ea11 + $6A18 = Music_Dungeon3_branch_7ea18 + $6AFC = Music_Dungeon3_branch_7eafc + $6ACE = Music_Dungeon3_branch_7eace + $6A3C = Music_Dungeon3_branch_7ea3c + $6ADD = Music_Dungeon3_branch_7eadd + $6A43 = Music_Dungeon3_branch_7ea43 + $6AEA = Music_Dungeon3_branch_7eaea + $6AF7 = Music_Dungeon3_branch_7eaf7 + $69FC = Music_Dungeon3_branch_7e9fc + $6B6D = Music_Dungeon3_branch_7eb6d + $6D19 = Music_CinnabarMansion_branch_7ed19 + $6D48 = Music_CinnabarMansion_branch_7ed48 + $6D6C = Music_CinnabarMansion_branch_7ed6c + $6D50 = Music_CinnabarMansion_branch_7ed50 + $6D4E = Music_CinnabarMansion_branch_7ed4e + $6D80 = Music_CinnabarMansion_branch_7ed80 + $6DB5 = Music_CinnabarMansion_branch_7edb5 + $6ED0 = Music_OaksLab_branch_7eed0 + $6F16 = Music_OaksLab_branch_7ef16 + $6F5C = Music_OaksLab_branch_7ef5c + $705A = Music_PokemonTower_branch_7f05a + $70EE = Music_PokemonTower_branch_7f0ee + $71A2 = Music_PokemonTower_branch_7f1a2 + $73F0 = Music_SilphCo_branch_7f3f0 + $726D = Music_SilphCo_branch_7f26d + $742E = Music_SilphCo_branch_7f42e + $75C9 = Music_SilphCo_branch_7f5c9 + $76AE = Music_MeetEvilTrainer_branch_7f6ae + $76C2 = Music_MeetEvilTrainer_branch_7f6c2 + $76EE = Music_MeetEvilTrainer_branch_7f6ee + $770C = Music_MeetFemaleTrainer_branch_7f70c + $7726 = Music_MeetFemaleTrainer_branch_7f726 + $7770 = Music_MeetFemaleTrainer_branch_7f770 + $7756 = Music_MeetFemaleTrainer_branch_7f756 + $778F = Music_MeetMaleTrainer_branch_7f78f + $77B5 = Music_MeetMaleTrainer_branch_7f7b5 + $77EA = Music_MeetMaleTrainer_branch_7f7ea + $7A30 = Music_Surfing_branch_7fa30 + $7AAE = Music_Surfing_branch_7faae + $7B03 = Music_Surfing_branch_7fb03 + $7BC5 = Music_HallOfFame_branch_7fbc5 + $7BDF = Music_HallOfFame_branch_7fbdf + $7BFE = Music_HallOfFame_branch_7fbfe + $7FA4 = Music_Credits_branch_7ffa4 + $7FAE = Music_Credits_branch_7ffae + $7FB8 = Music_Credits_branch_7ffb8 + $7FC1 = Music_Credits_branch_7ffc1 + $7FD2 = Music_Credits_branch_7ffd2 + $7FDB = Music_Credits_branch_7ffdb + $7FE4 = Music_Credits_branch_7ffe4 + $7FED = Music_Credits_branch_7ffed + SLACK: $0006 bytes + +Bank #32: + SECTION: $4000-$6AAE ($2AAF bytes) + $47F2 = _MtMoon1BattleText6 + $4B9E = _MtMoon3BattleText4 + $4F4B = _SSAnne3Text1 + $660F = _SilphCo2EndBattleText3 + $6617 = _SilphCo2AfterBattleText3 + $6785 = _SilphCo3EndBattleText2 + $6799 = _SilphCo3AfterBattleText2 + $485D = _MtMoon1BattleText7 + $4C0E = _MtMoon3BattleText5 + $6682 = _SilphCo2EndBattleText4 + $668D = _SilphCo2AfterBattleText4 + $684B = _SilphCo4EndBattleText2 + $6853 = _SilphCo4AfterBattleText2 + $4143 = _OaksAideHiText + $48C9 = _MtMoon1BattleText8 + $4F88 = _SSAnne5Text1 + $5F34 = _RocketHideout1BattleText2 + $68A2 = _SilphCo4EndBattleText3 + $68B8 = _SilphCo4AfterBattleText3 + $69CF = _SilphCo5EndBattleText2 + $69D6 = _SilphCo5AfterBattleText2 + $4D9A = _SSAnneRivalBeforeBattleText + $4FBB = _SSAnne5Text2 + $50E5 = _SSAnne6Text1 + $5F84 = _RocketHideout1BattleText3 + $60BB = _RocketHideout2BattleText2 + $6908 = _SilphCo4EndBattleText4 + $6916 = _SilphCo4AfterBattleText4 + $6A32 = _SilphCo5EndBattleText3 + $6A43 = _SilphCo5AfterBattleText3 + $4FDA = _SSAnne5Text3 + $5116 = _SSAnne6Text2 + $5FD9 = _RocketHideout1BattleText4 + $6140 = _RocketHideout3BattleText2 + $6283 = _RocketHideout4Text_45584 + $5137 = _SSAnne6Text3 + $5480 = _SSAnne7Text2 + $6020 = _RocketHideout1BattleText5 + $6326 = _RocketHideout4BattleText2 + $5155 = _SSAnne6Text4 + $549D = _SSAnne7Text3 + $6078 = _RocketHideout1BattleText6 + $638F = _RocketHideout4BattleText3 + $40D2 = _MartSignText + $518E = _SSAnne6Text5 + $5347 = _ReceivingHM01Text + $63E2 = _RocketHideout4BattleText4 + $51C9 = _SSAnne6Text6 + $502D = _SSAnne5EndBattleText1 + $5040 = _SSAnne5AfterBattleText1 + $56C7 = _SSAnne8Text5 + $508E = _SSAnne5EndBattleText2 + $50A4 = _SSAnne5AfterBattleText2 + $56F2 = _SSAnne8Text6 + $6454 = _SilphCo2Text_59ded + $42D9 = _OaksAideGotItemText + $5714 = _SSAnne8Text7 + $653E = _SilphCo2BattleText1 + $54D7 = _SSAnne8Text8 + $552E = _SSAnne8EndBattleText1 + $5541 = _SSAnne8AfterBattleText1 + $65A4 = _SilphCo2BattleText2 + $66FE = _SilphCo3BattleText1 + $5582 = _SSAnne8EndBattleText2 + $559A = _SSAnne8AfterBattleText2 + $5736 = _SSAnne8Text9 + $5956 = _SSAnne9EndBattleText1 + $597B = _SSAnne9AfterBattleText1 + $61FC = _RocketHide3AfterBattleText3 + $6363 = _RocketHide4AfterBattleText2 + $65F1 = _SilphCo2BattleText3 + $6753 = _SilphCo3BattleText2 + $5273 = _SSAnne6Text_61811 + $55D3 = _SSAnne8EndBattleText3 + $55E7 = _SSAnne8AfterBattleText3 + $59B9 = _SSAnne9EndBattleText2 + $59C6 = _SSAnne9AfterBattleText2 + $5DBF = _VictoryRoad3EndBattleText2 + $5DD6 = _VictoryRoad3AfterBattleText2 + $63C4 = _RocketHide4AfterBattleText3 + $665F = _SilphCo2BattleText4 + $681E = _SilphCo4BattleText2 + $4096 = _GroundRoseText + $564E = _SSAnne8EndBattleText4 + $5679 = _SSAnne8AfterBattleText4 + $5A29 = _SSAnne9EndBattleText3 + $5A3D = _SSAnne9AfterBattleText3 + $5E1E = _VictoryRoad3EndBattleText3 + $5E2B = _VictoryRoad3AfterBattleText3 + $66DE = _SilphCo3Text_59ffe + $6882 = _SilphCo4BattleText3 + $69AA = _SilphCo5BattleText2 + $5A7C = _SSAnne9EndBattleText4 + $5A8B = _SSAnne9AfterBattleText4 + $5E6F = _VictoryRoad3EndBattleText4 + $5E83 = _VictoryRoad3AfterBattleText4 + $68F5 = _SilphCo4BattleText4 + $6A07 = _SilphCo5BattleText3 + $5EEC = _VictoryRoad3EndBattleText5 + $5EFC = _VictoryRoad3AfterBattleText5 + $6A81 = _SilphCo5BattleText4 + $4553 = _ViridianForestText10 + $4584 = _ViridianForestText11 + $4EB6 = _SSAnneRivalCaptainText + $5203 = _SSAnne6Text_61807 + $52A6 = _SSAnne6Text_61816 + $541C = _SSAnne7Text_61932 + $4045 = _TrainerNameText + $45C6 = _ViridianForestText12 + $4613 = _ViridianForestText13 + $4667 = _ViridianForestText14 + $4A01 = _MtMoon3Text_49f8a + $500B = _SSAnne5BattleText1 + $5070 = _SSAnne5BattleText2 + $6418 = _RocketHideout4Text_455ec + $4061 = _NothingHereText + $412A = _NoMoreRoomForItemText + $4995 = _MtMoon3Text_49f6f + $54F1 = _SSAnne8BattleText1 + $49A8 = _MtMoon3Text_49f7f + $5561 = _SSAnne8BattleText2 + $5926 = _SSAnne9BattleText1 + $40FC = _PokeCenterSignText + $493A = _MtMoon1Text14 + $4A11 = _MtMoon3Text_49f8f + $55BD = _SSAnne8BattleText3 + $599C = _SSAnne9BattleText2 + $5D9B = _VictoryRoad3BattleText2 + $4E57 = _SSAnneRivalDefeatedText + $561B = _SSAnne8BattleText4 + $59FC = _SSAnne9BattleText3 + $5DF9 = _VictoryRoad3BattleText3 + $5A5D = _SSAnne9BattleText4 + $5E4F = _VictoryRoad3BattleText4 + $67E4 = _SilphCo4Text_19de0 + $5EC1 = _VictoryRoad3BattleText5 + $4082 = _ItsABiteText + $52DD = _SSAnne7RubText + $5F66 = _RocketHideout1AfterBattleTxt2 + $6803 = _SilphCo4Text_19de5 + $5FAB = _RocketHideout1AfterBattleTxt3 + $60FD = _RocketHideout2AfterBattleTxt2 + $4119 = _FoundItemText + $540D = _ReceivedHM01Text + $5FF9 = _RocketHideout1AfterBattleTxt4 + $617A = _RocketHideout3AfterBattleTxt2 + $6047 = _RocketHideout1AfterBattleTxt5 + $4029 = _CardKeyFailText + $6097 = _RocketHideout1AfterBattleTxt6 + $6438 = _RocketElevatorText_4578b + $64C9 = _TM36ExplanationText + $6936 = _SilphCo5Text_1a010 + $5799 = _SSAnne9Text_61bf2 + $5854 = _SSAnne9Text_61c1f + $58A8 = _SSAnne9Text_61c2e + $58DB = _SSAnne9Text_61c3d + $5905 = _SSAnne9Text_61c4c + $431D = _ViridianForestText1 + $495E = _MtMoon3Text_49f24 + $66B9 = _SilphCo3Text_59ff9 + $6978 = _SilphCo5Text_1a015 + $4979 = _MtMoon3Text_49f64 + $623E = _RocketHideout4Text_4557a + $4387 = _ViridianForestEndBattleText1 + $44C7 = _ViridianForestText8 + $545D = _HM01NoRoomText + $4093 = _ExclamationText + $41E4 = _OaksAideUhOhText + $43F2 = _ViridianForestEndBattleText2 + $450A = _ViridianForestText9 + $49CC = _MtMoon3Text_49f85 + $4A37 = _MtMoon3Text_49f94 + $404D = _NoNibbleText + $4458 = _ViridianForestEndBattleText3 + $5D4C = _SSAnne10Text7 + $5AAA = _SSAnne10Text8 + $5AF7 = _SSAnne10EndBattleText1 + $5B11 = _SSAnne10AfterBattleText1 + $626C = _RocketHideout4Text_4557f + $5759 = _SSAnne8Text11 + $5B52 = _SSAnne10EndBattleText2 + $5B68 = _SSAnne10AfterBattleText2 + $428C = _OaksAideHereYouGoText + $5BB4 = _SSAnne10EndBattleText3 + $5BC9 = _SSAnne10AfterBattleText3 + $46BF = _MtMoon1EndBattleText2 + $46D4 = _MtMoon1AfterBattleText2 + $4A93 = _MtMoon3Text_49f99 + $5C12 = _SSAnne10EndBattleText4 + $5C22 = _SSAnne10AfterBattleText4 + $64BA = _ReceivedTM36Text + $43A2 = _ViridianFrstAfterBattleText1 + $4713 = _MtMoon1EndBattleText3 + $4723 = _MtMoon1AfterBattleText3 + $5C7F = _SSAnne10EndBattleText5 + $5C97 = _SSAnne10AfterBattleText5 + $440B = _ViridianFrstAfterBattleText2 + $4778 = _MtMoon1EndBattleText4 + $4788 = _MtMoon1AfterBattleText4 + $4AF6 = _MtMoon3EndBattleText2 + $4B09 = _MtMoon3AfterBattleText2 + $5D01 = _SSAnne10EndBattleText6 + $5D21 = _SSAnne10AfterBattleText6 + $4475 = _ViridianFrstAfterBattleText3 + $47C1 = _MtMoon1EndBattleText5 + $47D3 = _MtMoon1AfterBattleText5 + $4B61 = _MtMoon3EndBattleText3 + $4B6D = _MtMoon3AfterBattleText3 + $57F5 = _SSAnne9Text_61c01 + $5833 = _SSAnne9Text_61c10 + $4824 = _MtMoon1EndBattleText6 + $482D = _MtMoon1AfterBattleText6 + $4BCB = _MtMoon3EndBattleText4 + $4BDE = _MtMoon3AfterBattleText4 + $488E = _MtMoon1EndBattleText7 + $489B = _MtMoon1AfterBattleText7 + $4C39 = _MtMoon3EndBattleText5 + $4C46 = _MtMoon3AfterBattleText5 + $4E81 = _SSAnneRivalWonText + $42EC = _OaksAideNoRoomText + $48F8 = _MtMoon1EndBattleText8 + $4901 = _MtMoon1AfterBattleText8 + $5F58 = _RocketHideout1EndBattleText2 + $4359 = _ViridianForestBattleText1 + $5233 = _SSAnne6Text_6180c + $5FA3 = _RocketHideout1EndBattleText3 + $60EF = _RocketHideout2EndBattleText2 + $43C3 = _ViridianForestBattleText2 + $5FEA = _RocketHideout1EndBattleText4 + $6168 = _RocketHideout3EndBattleText2 + $40B1 = _BoulderText + $4438 = _ViridianForestBattleText3 + $6038 = _RocketHideout1EndBattleText5 + $61E9 = _RocketHideout3EndBattleText3 + $6354 = _RocketHideout4EndBattleText2 + $5AC3 = _SSAnne10BattleText1 + $5F2A = _RocketHideout1EndBattleText6 + $63BC = _RocketHideout4EndBattleText3 + $5B33 = _SSAnne10BattleText2 + $6413 = _RocketHideout4EndBattleText4 + $5B99 = _SSAnne10BattleText3 + $4692 = _MtMoon1BattleText2 + $5BF3 = _SSAnne10BattleText4 + $46F5 = _MtMoon1BattleText3 + $5C52 = _SSAnne10BattleText5 + $651C = _TM36NoRoomText + $4000 = _CardKeySuccessText1 + $4250 = _OaksAideComeBackText + $474B = _MtMoon1BattleText4 + $4AB3 = _MtMoon3BattleText2 + $4C70 = _SSAnne1Text1 + $5CC3 = _SSAnne10BattleText6 + $655A = _SilphCo2EndBattleText1 + $657C = _SilphCo2AfterBattleText1 + $4009 = _CardKeySuccessText2 + $47A5 = _MtMoon1BattleText5 + $495C = _MtMoonText1 + $4B3B = _MtMoon3BattleText3 + $4CE6 = _SSAnne1Text2 + $4D34 = _SSAnne2Text1 + $61B8 = _RocketHideout3BattleTxt + $65C3 = _SilphCo2EndBattleText2 + $65D0 = _SilphCo2AfterBattleText2 + $671A = _SilphCo3EndBattleText1 + $6726 = _SilphCo3AfterBattleText1 + SLACK: $1551 bytes + +Bank #33: + SECTION: $4000-$6CA0 ($2CA1 bytes) + $587B = _SafariZoneRestHouse1Text2 + $5A2F = _SafariZoneRestHouse2Text1 + $4DA1 = _SilphCo10Text_5a1d8 + $5A7A = _SafariZoneRestHouse2Text2 + $5AD9 = _SafariZoneRestHouse3Text1 + $40A4 = _SilphCo5Text9 + $5AA6 = _SafariZoneRestHouse2Text3 + $5B0B = _SafariZoneRestHouse3Text2 + $5B62 = _SafariZoneRestHouse4Text1 + $432A = _SilphCo6EndBattleText2 + $4336 = _SilphCo6AfterBattleText2 + $471D = _SilphCo7EndBattleText1 + $472A = _SilphCo7AfterBattleText1 + $5B40 = _SafariZoneRestHouse3Text3 + $5BD5 = _SafariZoneRestHouse4Text2 + $4000 = _SilphCo5EndBattleText4 + $400E = _SilphCo5AfterBattleText4 + $43A4 = _SilphCo6EndBattleText3 + $43AC = _SilphCo6AfterBattleText3 + $4786 = _SilphCo7EndBattleText2 + $4790 = _SilphCo7AfterBattleText2 + $4B18 = _SilphCo8EndBattleText1 + $4B2A = _SilphCo8AfterBattleText1 + $5C17 = _SafariZoneRestHouse4Text3 + $4060 = _SilphCo5EndBattleText5 + $4073 = _SilphCo5AfterBattleText5 + $43F6 = _SilphCo6EndBattleText4 + $4404 = _SilphCo6AfterBattleText4 + $47E2 = _SilphCo7EndBattleText3 + $47FB = _SilphCo7AfterBattleText3 + $4B73 = _SilphCo8EndBattleText2 + $4B81 = _SilphCo8AfterBattleText2 + $4C7F = _SilphCo9EndBattleText1 + $4C88 = _SilphCo9AfterBattleText1 + $55E0 = _SafariZoneEastText5 + $6567 = _GaryText_7612a + $4430 = _MeetLaprasGuyText + $4852 = _SilphCo7EndBattleText4 + $4861 = _SilphCo7AfterBattleText4 + $488D = _SilphCo7Text_51ebe + $4975 = _SilphCo7Text_51ecd + $4BD5 = _SilphCo8EndBattleText3 + $4BE9 = _SilphCo8AfterBattleText3 + $4CE4 = _SilphCo9EndBattleText2 + $4CF6 = _SilphCo9AfterBattleText2 + $55EC = _SafariZoneEastText6 + $4D57 = _SilphCo9EndBattleText3 + $4D70 = _SilphCo9AfterBattleText3 + $53C7 = _Mansion2Text_520c2 + $562B = _SafariZoneEastText7 + $5D3C = _LanceBeforeBattleText + $6970 = _AgathaEndBattleText + $6998 = _AgathaAfterBattleText + $5CA2 = _VictoryRoad1EndBattleText1 + $5CAF = _VictoryRoad1AfterBattleText1 + $60E1 = _GaryText_760f4 + $53E3 = _Mansion2Text_520c7 + $5D07 = _VictoryRoad1EndBattleText2 + $5D1A = _VictoryRoad1AfterBattleText2 + $4C39 = _SilphCo9Text_5d8ea + $4306 = _SilphCo6BattleText2 + $46FF = _SilphCo7BattleText1 + $623B = _GaryText_760f9 + $435E = _SilphCo6BattleText3 + $449E = _HeresYourLaprasText + $475B = _SilphCo7BattleText2 + $4AFD = _SilphCo8BattleText1 + $403C = _SilphCo5BattleText5 + $43D8 = _SilphCo6BattleText4 + $47BE = _SilphCo7BattleText3 + $4B57 = _SilphCo8BattleText2 + $4C48 = _SilphCo9Text_5d8ef + $4C5C = _SilphCo9BattleText1 + $482D = _SilphCo7BattleText4 + $4BB1 = _SilphCo8BattleText3 + $4CB6 = _SilphCo9BattleText2 + $4F63 = _ReceivedSilphCoMasterBallText + $6805 = _BrunoEndBattleText + $681D = _BrunoAfterBattleText + $4D33 = _SilphCo9BattleText3 + $63C1 = _GaryText2 + $4176 = _SilphCo6Text_1a24a + $5957 = _HM03ExplanationText + $4F74 = _SilphCo10Text_6231c + $65EF = _LoreleiBeforeBattleText + $42A7 = _SilphCo6Text_1a2a6 + $5C79 = _VictoryRoad1BattleText1 + $5CD3 = _VictoryRoad1BattleText2 + $41A4 = _SilphCo6Text_1a24f + $4220 = _SilphCo6Text_1a27d + $529A = _SilphCo10Text_6237b + $5719 = _SafariZoneWestText5 + $684B = _UnnamedText_763d2 + $5336 = _Mansion2Text3 + $5725 = _SafariZoneWestText6 + $5389 = _Mansion2Text4 + $57A3 = _SafariZoneWestText7 + $63CA = _GaryText_76120 + $424F = _SilphCo6Text_1a28f + $46E2 = _SilphCo7Text_51e4b + $48A2 = _SilphCo7Text_51ec3 + $49BD = _SilphCo7Text_51ed2 + $57ED = _SafariZoneWestText8 + $632F = _GaryText_76103 + $4E9B = _SilphCoPresidentText + $54A3 = _Mansion3Text5 + $5013 = _SilphCoMasterBallNoRoomText + $52EA = _Mansion2EndBattleText1 + $5302 = _Mansion2AfterBattleText1 + $541C = _Mansion3EndBattleText1 + $5423 = _Mansion3AfterBattleText1 + $5583 = _Mansion4Text7 + $6463 = _GaryText_76125 + $686B = _AgathaBeforeBattleText + $45F6 = _CanceledMasterBallText + $494A = _SilphCo7Text_51ec8 + $5460 = _Mansion3EndBattleText2 + $5475 = _Mansion3AfterBattleText2 + $54F7 = _Mansion4EndBattleText1 + $54FF = _Mansion4AfterBattleText1 + $5541 = _Mansion4EndBattleText2 + $5555 = _Mansion4AfterBattleText2 + $4599 = _LaprasGuySavedText + $4AC4 = _SilphCo8Text_565be + $5943 = _ReceivedHM03Text + $502F = _SilphCo11Text2 + $5075 = _SilphCo11Text3 + $6729 = _LoreleiText2 + $40F2 = _SilphCo5Text10 + $4C0B = _SilphCo9Text_5d8e5 + $4134 = _SilphCo5Text11 + $6749 = _BrunoBeforeBattleText + $4DF5 = _SilphCo10EndBattleText1 + $4E02 = _SilphCo10AfterBattleText1 + $4E52 = _SilphCo10EndBattleText2 + $4E66 = _SilphCo10AfterBattleText2 + $5119 = _SilphCo10Text_62330 + $51F8 = _SilphCo11EndBattleText1 + $5209 = _SilphCo11AfterBattleText1 + $52B7 = _Mansion2BattleText1 + $6A43 = _RockTunnel2EndBattleText2 + $6A59 = _RockTunnel2AfterBattleText2 + $5257 = _SilphCo11EndBattleText2 + $526A = _SilphCo11AfterBattleText2 + $5401 = _Mansion3BattleText1 + $6A8E = _RockTunnel2EndBattleText3 + $6AA2 = _RockTunnel2AfterBattleText3 + $41C4 = _SilphCo6Text_1a261 + $5444 = _Mansion3BattleText2 + $54DF = _Mansion4BattleText1 + $6AED = _RockTunnel2EndBattleText4 + $6B04 = _RockTunnel2AfterBattleText4 + $455A = _LaprasGuyText + $45B4 = _SilphCo7Text_51e00 + $5521 = _Mansion4BattleText2 + $6B53 = _RockTunnel2EndBattleText5 + $6B66 = _RockTunnel2AfterBattleText5 + $6BBC = _RockTunnel2EndBattleText6 + $6BE0 = _RockTunnel2AfterBattleText6 + $5131 = _SilphCo10Text_62335 + $6C3F = _RockTunnel2EndBattleText7 + $6C4C = _RockTunnel2AfterBattleText7 + $5A02 = _HM03NoRoomText + $6C94 = _RockTunnel2EndBattleText8 + $41E7 = _SilphCo6Text_1a266 + $69FD = _AgathaText2 + $4286 = _SilphCo6Text_1a294 + $4633 = _SilphCo7Text_51e23 + $5C72 = _UnknownDungeon3MewtwoText + $5FB5 = _HallofFameRoomText1 + $41FF = _SilphCo6Text_1a278 + $53F1 = _Mansion2Text_520cc + $5646 = _SafariZoneNorthText3 + $5652 = _SafariZoneNorthText4 + $5E64 = _LanceEndBattleText + $5E9E = _LanceAfterBattleText + $4DC5 = _SilphCo10BattleText1 + $5681 = _SafariZoneNorthText5 + $4670 = _SilphCo7Text_51e28 + $46A2 = _SilphCo7Text_51e46 + $4E35 = _SilphCo10BattleText2 + $51D6 = _SilphCo11BattleText1 + $5689 = _SafariZoneNorthText6 + $6A1D = _RockTunnel2BattleText2 + $5227 = _SilphCo11BattleText2 + $56DF = _SafariZoneNorthText7 + $62B4 = _GaryText_760fe + $6A6E = _RockTunnel2BattleText3 + $4AE6 = _SilphCo8Text_565c3 + $6ACB = _RockTunnel2BattleText4 + $6B2F = _RockTunnel2BattleText5 + $6B91 = _RockTunnel2BattleText6 + $6C10 = _RockTunnel2BattleText7 + $6C77 = _RockTunnel2BattleText8 + $42DD = _SilphCo6Text_1a2ab + $5807 = _SafariZoneCenterText2 + $4D8D = _SilphCo10Text_5a1d3 + $5813 = _SafariZoneCenterText3 + $58A4 = _SecretHouseText_4a350 + $66C4 = _LoreleiEndBattleText + $66D3 = _LoreleiAfterBattleText + $5851 = _SafariZoneRestHouse1Text1 + SLACK: $135F bytes + +Bank #34: + SECTION: $4000-$6CF8 ($2CF9 bytes) + $41AE = _OutOfCoinsSlotMachineText + $5557 = _IndigoPlateauStatuesText1 + $5CD6 = _EnemysWeakText + $6177 = _CantDepositLastMonText + $6AEF = _SaffronGateText_1dff1 + $5567 = _IndigoPlateauStatuesText2 + $5677 = _EnemyRanText + $584B = _AlreadyOutText + $5FBE = _WhatDoYouWantText + $5001 = _LinkCableHelpText1 + $5596 = _IndigoPlateauStatuesText3 + $5689 = _HurtByPoisonText + $5968 = _DisabledNoMoreText + $6AA9 = _SaffronGateText_8aaa9 + $4EC1 = _FightingDojoText_52a10 + $5027 = _LinkCableHelpText2 + $550B = _FoundHiddenCoinsText + $55C1 = _PokemonBooksText + $5C4F = _EnemyAppearedText + $5E65 = _ParlyzHealText + $62CD = _WhichPrizeText + $6329 = _OopsYouDontHaveEnoughRoomText + $504B = _LinkCableInfoText1 + $5A29 = _MoveIsDisabledText + $5BC2 = _GainedText + $6A5C = _SaffronGateText_1dfe7 + $6B74 = _SaffronGateText_1dff6 + $50BD = _LinkCableInfoText2 + $5C9E = _GhostCantBeIDdText + $50E8 = _LinkCableInfoText3 + $5110 = _ViridianSchoolBlackboardText1 + $5A40 = _MonName1Text + $60C9 = _WhatToTossText + $6BD4 = _DayCareMText_56414 + $6C32 = _DayCareMText_56423 + $6CC1 = _DayCareMText_56432 + $4C6F = _TurnPageText + $514E = _ViridianSchoolBlackboardText2 + $5CC3 = _DoItText + $6677 = _WillBeTradedText + $46C9 = _BookcaseText + $47B7 = _CinnabarGymQuizIntroText + $5934 = _FullyParalyzedText + $5D53 = _SafariZoneEatingText + $5DF1 = _PartyMenuBattleText + $607E = _WithdrewItemText + $46A4 = _CeladonCityHotelText + $4FD5 = _KabutopsFossilText + $55DE = _DiglettSculptureText + $6976 = _MtMoonPokecenterText_4935c + $6A39 = _MtMoonPokecenterText_4936b + $4426 = _UnusedBenchGuyText1 + $59DB = _UnleashedEnergyText + $5B20 = _TurnedAwayText + $4124 = _TradeWavesFarewellText + $4442 = _UnusedBenchGuyText2 + $5AE5 = _LoafingAroundText + $6BF0 = _DayCareMText_56419 + $6C7D = _DayCareMText_56428 + $4075 = _SeafoamIslands5BattleText2 + $4460 = _UnusedBenchGuyText3 + $561F = _PokemonStuffText + $5E08 = _PartyMenuUseTMText + $6036 = _NoRoomToStoreText + $6C67 = DayCareMText_8ac67 + $5AC9 = _CriticalHitText + $6000 = _ItemWasStoredText + $6288 = _CF4BExclamationText + $630B = _SorryNeedMoreCoinsText + $6605 = _DoYouWantToNicknameText + $40EF = _TradeWentToText + $471A = _SaveOptionText + $49CF = _BillsHouseMonitorText + $58C7 = _ScaredText + $5AFD = _BeganToNapText + $66FD = _ViridianForestExitText1 + $4F08 = _IndigoPlateauHQText + $5892 = _NoMovesLeftText + $62E7 = _HereYouGoText + $675D = _ViridianForestExitText2 + $53A7 = _VermilionGymTrashText + $56B3 = _HurtByLeechSeedText + $56DD = _MoneyForWinningText + $570C = _PlayerMonFaintedText + $598E = _HurtItselfText + $5A44 = _Used1Text + $6131 = _SwitchOnText + $68EB = _MtMoonPokecenterText1 + $416A = _TradeWillTradeText + $4B75 = _GameCornerNoCoinsText + $57C9 = _NoWillText + $58AA = _MultiHitText + $5920 = _IsFrozenText + $5A4D = _Used2Text + $5AD8 = _OHKOText + $5D80 = _PickUpPayDayMoneyText + $5EE2 = _RareCandyText + $5FD7 = _WhatToDepositText + $640D = _LinkCanceledText + $6929 = _MtMoonPokecenterText3 + $41F7 = _OneMoreGoSlotMachineText + $6268 = _MonWasReleasedText + $4B5B = _GameCornerCoinCaseText + $4BED = _JustAMomentText + $58E3 = _GetOutText + $6073 = _WithdrawHowManyText + $66A7 = _DiglettsCaveRoute2Text1 + $6A5A = _MtMoonPokecenterText5 + $4226 = _NotThisTimeText + $5B96 = _MirrorMoveFailedText + $5DC8 = _PartyMenuNormalText + $4A25 = _BillsHousePokemonListText1 + $53C6 = _VermilionGymTrashSuccesText1 + $4A40 = _BillsHousePokemonListText2 + $5418 = _VermilionGymTrashSuccesText2 + $5914 = _WokeUpText + $5A05 = _AttackContinuesText + $5BAF = _HitXTimesText + $5CF0 = _PlayerMon1Text + $5D22 = _SupperEffectiveText + $634C = _OhFineThenText + $4180 = _TradeforText + $4A60 = _OakLabEmailText + $5451 = _VermilionGymTrashSuccesText3 + $5B10 = _WontObeyText + $5CF6 = _PlayerMon2Text + $5B32 = _IgnoredOrdersText + $5E4B = _AntidoteText + $43C2 = _MtMoonPokecenterBenchGuyText + $5C33 = _HookedMonAttackedText + $4150 = _TradeTakeCareText + $4742 = _StrengthsAndWeaknessesText + $4BFD = TMNotebookText + $5D96 = _ClearSaveDataText + $423E = _DexSeenOwnedText + $42D7 = _ViridianCityPokecenterGuyText + $4B8F = _GameCornerOutOfOrderText + $4236 = _YeahText + $4267 = _DexRatingText + $5860 = _MoveNoPPText + $623D = _OnceReleasedText + $639A = _AccessedOaksPCText + $548C = _VermilionGymTrashFailText + $5D15 = _ComeBackText + $5DD8 = _PartyMenuItemUseText + $60F4 = _AccessedHoFPCText + $59B0 = _ConfusedNoMoreText + $5B47 = _SubstituteTookDamageText + $5D0D = _GoodText + $5B80 = _BuildingRageText + $6519 = _IntroducePlayerText + $69EC = _MtMoonPokecenterText_49361 + $45AF = _CinnabarPokecenterGuyText + $5CFD = _EnoughText + $41DC = _StartSlotMachineText + $4275 = _GymStatueText1 + $55FB = _ElevatorText + $587B = _MoveDisabledText + $5C73 = _UnveiledGhostText + $5F45 = _AccessedSomeonesPCText + $4206 = _LinedUpText + $42A5 = _GymStatueText2 + $5666 = _WildRanText + $5CCD = _GetmText + $5772 = _LinkBattleLostText + $5A67 = _ExclamationPoint1Text + $5C01 = _GrewLevelText + $57E3 = _CantEscapeText + $5A6A = _ExclamationPoint2Text + $5D38 = _NotVeryEffectiveText + $6A17 = _MtMoonPokecenterText_49366 + $448E = _VermilionPokecenterGuyText + $54D0 = _FoundHiddenItemText + $5831 = _ItemsCantBeUsedHereText + $5A6D = _ExclamationPoint3Text + $52B5 = _ViridianBlackboardBurnText + $5A62 = _CF4BText + $5A70 = _ExclamationPoint4Text + $5CBC = _GoText + $5E1F = _PartyMenuSwapMonText + $4BAD = _GameCornerOutToLunchText + $5A73 = _ExclamationPoint5Text + $60E9 = _TossHowManyText + $532F = _ViridianBlackboardFrozenText + $608F = _NothingStoredText + $613D = _WhatText + $5C1D = _WildMonAppearedText + $6696 = _Char00Text + $5EA8 = _AwakeningText + $5ECD = _ReviveText + $413B = _TradeTransferredText + $43FC = _RockTunnelPokecenterGuyText + $51DE = _ViridianBlackboardPoisonText + $6228 = _ReleaseWhichMonText + $4531 = _CeladonCityPokecenterGuyText + $49FB = _BillsHouseInitiatedText + $581F = _GotAwayText + $6198 = _BoxFullText + $4621 = _SaffronCityPokecenterGuyText1 + $4EF9 = _FightingDojoText + $5AB4 = _DoesntAffectMonText + $6018 = _NothingToDepositText + $4664 = _SaffronCityPokecenterGuyText2 + $5A76 = _AttackMissedText + $5BD0 = _WithExpAllText + $5C5E = _TrainerWantsToFightText + $5F7A = _AccessedMyPCText + $572A = _Sony1WinText + $628E = _RequireCoinCaseText + $4000 = _RockTunnel2AfterBattleText8 + $4353 = _CeruleanPokecenterGuyText + $56C7 = _EnemyMonFaintedText + $67B8 = _Route2HouseText1 + $4042 = _RockTunnel2EndBattleText9 + $4057 = _RockTunnel2AfterBattleText9 + $46E6 = _NewBicycleText + $4F58 = _Route15UpstairsBinocularsText + $5523 = _FoundHiddenCoins2Text + $5FF5 = _DepositHowManyText + $4386 = _LavenderPokecenterGuyText + $5784 = _TrainerAboutToUseText + $5E31 = _PotionText + $61D7 = _NoMonText + $647F = _OakSpeechText2A + $4ED9 = _FightingDojoText_52a1d + $4FA7 = _AerodactylFossilText + $54E1 = _HiddenItemBagFullText + $57F1 = _NoRunningText + $5B6A = _SubstituteBrokeText + $64B3 = _OakSpeechText2B + $66A3 = _Char55Text + $40BE = _AIBattleWithdrawText + $49A1 = _MagazinesText + $56F9 = _TrainerDefeatedText + $5901 = _FastAsleepText + $5EB6 = _FullHealText + $635D = _GetDexRatedText + $6868 = _ViridianForestEntranceText1 + $6B95 = _DayCareMText_5640f + $6C19 = _DayCareMText_5641e + $6CAE = _DayCareMText_5642d + $498F = _CinnabarGymQuizIncorrectText + $5639 = _OutOfSafariBallsText + $5A89 = _KeptGoingAndCrashedText + $637B = _ClosedOaksPCText + $68AB = _ViridianForestEntranceText2 + $430C = _PewterCityPokecenterGuyText + $486D = _CinnabarQuizQuestionsText1 + $524B = _ViridianBlackbaordPrlzText + $5611 = _TownMapText + $62A9 = _ExchangeCoinsForPrizesText + $67FC = _Route2GateText_5d616 + $477E = _TimesUpText + $4890 = _CinnabarQuizQuestionsText2 + $5D07 = _OKExclamationText + $6054 = _WhatToWithdrawText + $6159 = _MonWasStoredText + $40D5 = _AIBattleUseItemText + $48BB = _CinnabarQuizQuestionsText3 + $5748 = _PlayerBlackedOutText2 + $5A56 = _InsteadText + $5E7D = _BurnHealText + $61F6 = _CantTakeMonText + $662F = _YourNameIsText + $4112 = _TradeSendsText + $41E4 = _NotEnoughCoinsSlotMachineText + $455F = _FuchsiaCityPokecenterGuyText + $48D5 = _CinnabarQuizQuestionsText4 + $4964 = _CinnabarGymQuizCorrectText + $59F0 = _ThrashingAboutText + $61B9 = _MonIsTakenOutText + $62F6 = _SoYouWantPrizeText + $6425 = _OakSpeechText1 + $418F = _PlaySlotMachineText + $41C7 = _BetHowManySlotMachineText + $4915 = _CinnabarQuizQuestionsText5 + $4CA3 = _ViridianSchoolNotebookText1 + $5F13 = _AccessedBillsPCText + $63D0 = _WhereWouldYouLikeText + $4949 = _CinnabarQuizQuestionsText6 + $4BCD = _GameCornerSomeonesKeysText + $4D46 = _ViridianSchoolNotebookText2 + $5956 = _MustRechargeText + $63ED = _PleaseWaitText + $6597 = _OakSpeechText3 + $4DBD = _ViridianSchoolNotebookText3 + $4798 = _GameOverText + $4E2C = _ViridianSchoolNotebookText4 + $57B4 = _TrainerSentOutText + $4027 = _RockTunnel2BattleText9 + $4103 = _TradeForText + $4C7F = _ViridianSchoolNotebookText5 + $5172 = _ViridianBlackboardSleepText + $553B = _DroppedHiddenCoinsText + $597E = _IsConfusedText + $5BEE = _ExpPointsText + $5EFE = _TurnedOnPC1Text + $664A = _HisNameIsText + $407E = _SeafoamIslands5Text4 + $5BE1 = _BoostedText + $5D6A = _SafariZoneAngryText + $5FA9 = _TurnedOnPC2Text + $682C = _Route2GateText2 + $40A8 = _SeafoamIslands5Text5 + $569D = _HurtByBurnText + $5AA4 = _UnaffectedText + $5DAD = _WhichFloorText + $6534 = _IntroduceRivalText + $571A = _UseNextMonText + $60A9 = _CantCarryMoreText + $6144 = _DepositWhichMonText + $46FC = _PushStartText + $59C6 = _SavingEnergyText + $4F27 = _RedBedroomSNESText + $5949 = _FlinchedText + $5A1B = _CantMoveText + $5E94 = _IceHealText + SLACK: $1307 bytes + +Bank #35: + SECTION: $4000-$6C08 ($2C09 bytes) + $493C = _TM39NoRoomText + $5A08 = _Route3BattleText6 + $5CC8 = _Route6BattleText3 + $5EA9 = _Route8BattleText1 + $5A62 = _Route3BattleText7 + $5D30 = _Route6BattleText4 + $5F06 = _Route8BattleText2 + $6291 = _Route9BattleText1 + $4CA0 = _Route16GateText_49777 + $4EF1 = _Route18GateText_49928 + $5AC0 = _Route3BattleText8 + $5D8F = _Route6BattleText5 + $5F5B = _Route8BattleText3 + $62FF = _Route9BattleText2 + $503E = _Route22GateText_1e71a + $5DE6 = _Route6BattleText6 + $5FC0 = _Route8BattleText4 + $6352 = _Route9BattleText3 + $6028 = _Route8BattleText5 + $63B1 = _Route9BattleText4 + $6092 = _Route8BattleText6 + $6411 = _Route9BattleText5 + $4020 = _DayCareMText_56440 + $42C0 = _RockTunnelPokecenterText1 + $60E9 = _Route8BattleText7 + $6491 = _Route9BattleText6 + $41C8 = _UnnamedText_5d77d + $6162 = _Route8BattleText8 + $64E2 = _Route9BattleText7 + $4316 = _RockTunnelPokecenterText3 + $4758 = _BinocularsNoSnorlaxText + $55BF = _Route1ViridianMartSampleText + $61D4 = _Route8BattleText9 + $6573 = _Route9BattleText8 + $65D2 = _Route9BattleText9 + $4041 = _DayCareMText_56445 + $40AD = _DayCareMText_56454 + $40FF = _UndergroundPathEntRoute7Text1 + $4000 = _DayCareMText_56437 + $428D = _UndergroundPathEntRoute8Text1 + $50A5 = _VictoryRoad2EndBattleText1 + $50AD = _VictoryRoad2AfterBattleText1 + $510F = _VictoryRoad2EndBattleText2 + $511C = _VictoryRoad2AfterBattleText2 + $514F = _VictoryRoad2EndBattleText3 + $515F = _VictoryRoad2AfterBattleText3 + $4689 = _Route11GateUpstairsText_494a3 + $49B3 = _Route12HouseText_564c0 + $51CA = _VictoryRoad2EndBattleText4 + $51DD = _VictoryRoad2AfterBattleText4 + $5345 = _BillsHouseText_1e86a + $5230 = _VictoryRoad2EndBattleText5 + $523C = _VictoryRoad2AfterBattleText5 + $478B = _Route11GateUpstairsText_494d5 + $4986 = _Route12GateUpstairsText_495c4 + $4A00 = _Route12HouseText_564c5 + $4AC2 = _Route12HouseText_564d4 + $4E79 = _HM02ExplanationText + $4EE0 = _Route16HouseText_1e652 + $5391 = _BillsHouseText_1e86f + $495A = _Route12GateUpstairsText_495b8 + $5B07 = _Route3Text10 + $4B38 = _Route12HouseText_564d9 + $4D90 = _Route16GateUpstairsText_4983b + $5077 = _VictoryRoad2BattleText1 + $50E1 = _VictoryRoad2BattleText2 + $5137 = _VictoryRoad2BattleText3 + $68D4 = _Route10Text7 + $4BAC = _Route15GateUpstairsText_4968c + $4D73 = _Route16GateUpstairsText_4982f + $518C = _VictoryRoad2BattleText4 + $5652 = _Route1Text_1caee + $6262 = _Route8Text10 + $667A = _Route10EndBattleText1 + $6690 = _Route10AfterBattleText1 + $5214 = _VictoryRoad2BattleText5 + $66C1 = _Route10EndBattleText2 + $66F5 = _Route10AfterBattleText2 + $68D4 = _Route10Text9 + $6902 = _Route11EndBattleText1 + $691B = _Route11AfterBattleText1 + $4FBB = _Route22GateText_1e704 + $506E = _VictoryRoad2BattleText6 + $661E = _Route9Text11 + $673A = _Route10EndBattleText3 + $674B = _Route10AfterBattleText3 + $6965 = _Route11EndBattleText2 + $6976 = _Route11AfterBattleText2 + $4132 = _UnnamedText_5d773 + $4209 = _UnnamedText_5d782 + $67A8 = _Route10EndBattleText4 + $67BD = _Route10AfterBattleText4 + $69BC = _Route11EndBattleText3 + $69D3 = _Route11AfterBattleText3 + $5012 = _Route22GateText_1e715 + $680C = _Route10EndBattleText5 + $6823 = _Route10AfterBattleText5 + $6A1C = _Route11EndBattleText4 + $6A30 = _Route11AfterBattleText4 + $6872 = _Route10EndBattleText6 + $6884 = _Route10AfterBattleText6 + $6A83 = _Route11EndBattleText5 + $6A95 = _Route11AfterBattleText5 + $4E02 = _Route16HouseText3 + $6AD5 = _Route11EndBattleText6 + $6AE5 = _Route11AfterBattleText6 + $486B = _TM39PreReceiveText + $6B1F = _Route11EndBattleText7 + $6B35 = _Route11AfterBattleText7 + $4195 = _UnnamedText_5d778 + $6B71 = _Route11EndBattleText8 + $6B99 = _Route11AfterBattleText8 + $4E66 = _ReceivedHM02Text + $471B = _BinocularsSnorlaxText + $4F83 = _Route18GateUpstairsText_4999f + $45E2 = _VoltorbBattleText + $6642 = _Route10BattleText1 + $45F3 = _Route11GateText1 + $48D9 = _TM39ExplanationText + $66B0 = _Route10BattleText2 + $68EE = _Route11BattleText1 + $484A = _Route12GateText1 + $53F5 = _BillThankYouText + $671C = _Route10BattleText3 + $6944 = _Route11BattleText2 + $435D = _RockTunnel1EndBattleText1 + $436C = _RockTunnel1AfterBattleText1 + $45B7 = _RockTunnel1Text8 + $5267 = _BillsHouseText_1e865 + $676C = _Route10BattleText4 + $69A2 = _Route11BattleText3 + $43BB = _RockTunnel1EndBattleText2 + $43E8 = _RockTunnel1AfterBattleText2 + $67E7 = _Route10BattleText5 + $69F6 = _Route11BattleText4 + $4459 = _RockTunnel1EndBattleText3 + $4462 = _RockTunnel1AfterBattleText3 + $4B73 = _Route15GateText1 + $4CCD = _Route16GateText_4977c + $4F17 = _Route18GateText_4992d + $6844 = _Route10BattleText6 + $6A51 = _Route11BattleText5 + $449A = _RockTunnel1EndBattleText4 + $44A6 = _RockTunnel1AfterBattleText4 + $4D49 = _Route16GateUpstairsText_49820 + $569F = _Route1Text2 + $6AB8 = _Route11BattleText6 + $44F4 = _RockTunnel1EndBattleText5 + $4506 = _RockTunnel1AfterBattleText5 + $4D2A = _Route16GateText2 + $5720 = _Route1Text3 + $5779 = _Route3Text1 + $6B03 = _Route11BattleText7 + $4541 = _RockTunnel1EndBattleText6 + $4552 = _RockTunnel1AfterBattleText6 + $5745 = _Route2Text3 + $5B1E = _Route4Text1 + $6B57 = _Route11BattleText8 + $458D = _RockTunnel1EndBattleText7 + $459D = _RockTunnel1AfterBattleText7 + $576A = _Route2Text4 + $5C07 = _Route5Text1 + $6BEE = _Route11BattleText9 + $40CB = _UndergrdTunnelEntRoute6Text1 + $4EBE = _HM02NoRoomText + $567C = _Route1Text_1caf3 + $5E7A = _Route7Text1 + $5BCD = _Route4Text5 + $5BE6 = _Route4Text6 + $4013 = _DayCareMText_5643b + $4063 = _DayCareMText_5644a + $57F9 = _Route3EndBattleText1 + $580D = _Route3AfterBattleText1 + $4DC6 = _Route16GateUpstairsText_49847 + $5643 = _Route1Text_1cae8 + $587F = _Route3EndBattleText2 + $5893 = _Route3AfterBattleText2 + $5B6C = _Route4EndBattleText1 + $5B88 = _Route4AfterBattleText1 + $433A = _RockTunnel1BattleText1 + $5499 = _SSTicketReceivedText + $58EE = _Route3EndBattleText3 + $58FB = _Route3AfterBattleText3 + $5E49 = _Route6Text7 + $439C = _RockTunnel1BattleText2 + $5944 = _Route3EndBattleText4 + $5966 = _Route3AfterBattleText4 + $5C5E = _Route6EndBattleText1 + $5C70 = _Route6AfterBattleText1 + $4427 = _RockTunnel1BattleText3 + $48C6 = _ReceivedTM39Text + $4C65 = _Route15GateUpstairsText_49698 + $59D1 = _Route3EndBattleText5 + $59DB = _Route3AfterBattleText5 + $5CB3 = _Route6EndBattleText2 + $4090 = _DayCareMText_5644f + $4482 = _RockTunnel1BattleText4 + $4F4A = _Route18GateUpstairsText_49993 + $5A28 = _Route3EndBattleText6 + $5A3B = _Route3AfterBattleText6 + $5CE9 = _Route6EndBattleText3 + $5CFD = _Route6AfterBattleText3 + $5ED5 = _Route8EndBattleText1 + $5EE4 = _Route8AfterBattleText1 + $44C9 = _RockTunnel1BattleText5 + $54D0 = _BillsHouseText_1e8cb + $557F = _BillsHouseText_1e8da + $5A7E = _Route3EndBattleText7 + $5A91 = _Route3AfterBattleText7 + $5D4E = _Route6EndBattleText4 + $5D61 = _Route6AfterBattleText4 + $5F26 = _Route8EndBattleText2 + $5F3C = _Route8AfterBattleText2 + $62B6 = _Route9EndBattleText1 + $62C8 = _Route9AfterBattleText1 + $4526 = _RockTunnel1BattleText6 + $5AD8 = _Route3EndBattleText8 + $5AE3 = _Route3AfterBattleText8 + $5DA8 = _Route6EndBattleText5 + $5DBA = _Route6AfterBattleText5 + $5F7E = _Route8EndBattleText3 + $5F90 = _Route8AfterBattleText3 + $6330 = _Route9EndBattleText2 + $6343 = _Route9AfterBattleText2 + $4571 = _RockTunnel1BattleText7 + $5E10 = _Route6EndBattleText6 + $5E23 = _Route6AfterBattleText6 + $5FE4 = _Route8EndBattleText4 + $5FF0 = _Route8AfterBattleText4 + $637E = _Route9EndBattleText3 + $6390 = _Route9AfterBattleText3 + $4A4F = _Route12HouseText_564ca + $6049 = _Route8EndBattleText5 + $6060 = _Route8AfterBattleText5 + $63CF = _Route9EndBattleText4 + $63E4 = _Route9AfterBattleText4 + $60B8 = _Route8EndBattleText6 + $60BF = _Route8AfterBattleText6 + $6433 = _Route9EndBattleText5 + $6461 = _Route9AfterBattleText5 + $45EA = _ZapdosBattleText + $6116 = _Route8EndBattleText7 + $612A = _Route8AfterBattleText7 + $64B6 = _Route9EndBattleText6 + $64C3 = _Route9AfterBattleText6 + $6181 = _Route8EndBattleText8 + $6198 = _Route8AfterBattleText8 + $651B = _Route9EndBattleText7 + $653E = _Route9AfterBattleText7 + $57D5 = _Route3BattleText1 + $61FA = _Route8EndBattleText9 + $6221 = _Route8AfterBattleText9 + $658D = _Route9EndBattleText8 + $65AA = _Route9AfterBattleText8 + $4AA1 = _Route12HouseText_564cf + $584C = _Route3BattleText2 + $5B4B = _Route4BattleText1 + $65EA = _Route9EndBattleText9 + $65F6 = _Route9AfterBattleText9 + $68E1 = _Route10Text10 + $4D0E = _Route16GateText_49781 + $4F3E = _Route18GateText_49932 + $58D0 = _Route3BattleText3 + $54B0 = _SSTicketNoRoomText + $5924 = _Route3BattleText4 + $5C38 = _Route6BattleText1 + $47F9 = _DiglettsCaveEntRoute11Text1 + $59A6 = _Route3BattleText5 + $5C87 = _Route6BattleText2 + SLACK: $13F7 bytes + +Bank #36: + SECTION: $4000-$6902 ($2903 bytes) + $43D9 = _Route12Text12 + $4781 = _Route13Text11 + $40BF = _Route12Text13 + $47AE = _Route13Text12 + $4C1F = _Route14Text11 + $40EF = _Route12Text14 + $47EB = _Route13Text13 + $52A8 = _Route16Text10 + $5062 = _Route15Text12 + $52D8 = _Route16Text11 + $4058 = _Route11EndBattleText10 + $406E = _Route11AfterBattleText10 + $5649 = _Route17Text11 + $5F7F = _Route20EndBattleText10 + $5F86 = _Route20AfterBattleText10 + $65A0 = _Route22Text_511d0 + $5677 = _Route17Text12 + $6606 = _Route22FrontGateText + $4702 = _Route13EndBattleText10 + $4719 = _Route13AfterBattleText10 + $56D8 = _Route17Text13 + $5C3C = _Route19Text11 + $63F4 = _Route22RivalDefeatedText1 + $4741 = _Route13EndBattleText11 + $4750 = _Route13AfterBattleText11 + $4BE7 = _Route14EndBattleText10 + $4BF4 = _Route14AfterBattleText10 + $5721 = _Route17Text14 + $6583 = _Route22RivalDefeatedText2 + $5029 = _Route15EndBattleText10 + $503F = _Route15AfterBattleText10 + $5747 = _Route17Text15 + $6779 = _Route24Text_5151a + $5782 = _Route17Text16 + $561A = _Route17EndBattleText10 + $562E = _Route17AfterBattleText10 + $688A = _Route24Text_5152b + $5BF9 = _Route19EndBattleText10 + $5C0A = _Route19AfterBattleText10 + $661E = _VictoryRoadGuardText1 + $4037 = _Route11BattleText10 + $5F53 = _Route20BattleText10 + $6696 = _VictoryRoadGuardText2 + $46EA = _Route13BattleText10 + $4724 = _Route13BattleText11 + $4BCC = _Route14BattleText10 + $500D = _Route15BattleText10 + $409E = _Route12Text1 + $5600 = _Route17BattleText10 + $5BDD = _Route19BattleText10 + $5C85 = _Route20EndBattleText1 + $5C8E = _Route20AfterBattleText1 + $414F = _Route12EndBattleText1 + $4167 = _Route12AfterBattleText1 + $5CC9 = _Route20EndBattleText2 + $5CD3 = _Route20AfterBattleText2 + $5FE2 = _Route21EndBattleText1 + $5FE9 = _Route21AfterBattleText1 + $636F = _Route22RivalAfterBattleText1 + $41AB = _Route12EndBattleText2 + $41BF = _Route12AfterBattleText2 + $5D23 = _Route20EndBattleText3 + $5D2B = _Route20AfterBattleText3 + $602A = _Route21EndBattleText2 + $603A = _Route21AfterBattleText2 + $6506 = _Route22RivalAfterBattleText2 + $420C = _Route12EndBattleText3 + $4212 = _Route12AfterBattleText3 + $440A = _Route13EndBattleText2 + $441F = _Route13AfterBattleText2 + $483F = _Route14EndBattleText1 + $4851 = _Route14AfterBattleText1 + $589D = _Route18Text4 + $5D5D = _Route20EndBattleText4 + $5D6F = _Route20AfterBattleText4 + $607E = _Route21EndBattleText3 + $6085 = _Route21AfterBattleText3 + $6700 = _Route23Text8 + $6721 = _Route24Text_51510 + $4263 = _Route12EndBattleText4 + $426F = _Route12AfterBattleText4 + $4466 = _Route13EndBattleText3 + $4474 = _Route13AfterBattleText3 + $48B8 = _Route14EndBattleText2 + $48C8 = _Route14AfterBattleText2 + $4C6E = _Route15EndBattleText1 + $4C80 = _Route15AfterBattleText1 + $5287 = _Route16Text7 + $58C3 = _Route18Text5 + $5DAC = _Route20EndBattleText5 + $5DB4 = _Route20AfterBattleText5 + $60BF = _Route21EndBattleText4 + $60CC = _Route21AfterBattleText4 + $42C8 = _Route12EndBattleText5 + $42D3 = _Route12AfterBattleText5 + $44C6 = _Route13EndBattleText4 + $44D3 = _Route13AfterBattleText4 + $4928 = _Route14EndBattleText3 + $4936 = _Route14AfterBattleText3 + $4D0A = _Route15EndBattleText2 + $4D16 = _Route15AfterBattleText2 + $5094 = _Route16EndBattleText1 + $50AA = _Route16AfterBattleText1 + $530D = _Route16Text8 + $5E0C = _Route20EndBattleText6 + $5E1E = _Route20AfterBattleText6 + $611D = _Route21EndBattleText5 + $612D = _Route21AfterBattleText5 + $678F = _Route24Text_51521 + $68A0 = _Route24Text_51530 + $4318 = _Route12EndBattleText6 + $4329 = _Route12AfterBattleText6 + $4531 = _Route13EndBattleText5 + $4548 = _Route13AfterBattleText5 + $499D = _Route14EndBattleText4 + $49B3 = _Route14AfterBattleText4 + $4D71 = _Route15EndBattleText3 + $4D84 = _Route15AfterBattleText3 + $50F1 = _Route16EndBattleText2 + $50FD = _Route16AfterBattleText2 + $532C = _Route16Text9 + $5375 = _Route17EndBattleText1 + $5382 = _Route17AfterBattleText1 + $5E58 = _Route20EndBattleText7 + $5E60 = _Route20AfterBattleText7 + $616E = _Route21EndBattleText6 + $6186 = _Route21AfterBattleText6 + $437E = _Route12EndBattleText7 + $4388 = _Route12AfterBattleText7 + $4599 = _Route13EndBattleText6 + $45AA = _Route13AfterBattleText6 + $49F7 = _Route14EndBattleText5 + $4A0A = _Route14AfterBattleText5 + $4DDC = _Route15EndBattleText4 + $4DF0 = _Route15AfterBattleText4 + $5140 = _Route16EndBattleText3 + $5151 = _Route16AfterBattleText3 + $53C9 = _Route17EndBattleText2 + $53D0 = _Route17AfterBattleText2 + $57D1 = _Route18EndBattleText1 + $57D7 = _Route18AfterBattleText1 + $5E9F = _Route20EndBattleText8 + $5EB6 = _Route20AfterBattleText8 + $61E4 = _Route21EndBattleText7 + $61F2 = _Route21AfterBattleText7 + $4000 = _Route11EndBattleText9 + $4017 = _Route11AfterBattleText9 + $45EB = _Route13EndBattleText7 + $45FD = _Route13AfterBattleText7 + $4A59 = _Route14EndBattleText6 + $4A65 = _Route14AfterBattleText6 + $4E4E = _Route15EndBattleText5 + $4E67 = _Route15AfterBattleText5 + $518D = _Route16EndBattleText4 + $5196 = _Route16AfterBattleText4 + $540E = _Route17EndBattleText3 + $541F = _Route17AfterBattleText3 + $5816 = _Route18EndBattleText2 + $5829 = _Route18AfterBattleText2 + $590C = _Route19EndBattleText1 + $591C = _Route19AfterBattleText1 + $5F06 = _Route20EndBattleText9 + $5F1B = _Route20AfterBattleText9 + $622B = _Route21EndBattleText8 + $6244 = _Route21AfterBattleText8 + $6755 = _Route24Text_51515 + $4637 = _Route13EndBattleText8 + $464E = _Route13AfterBattleText8 + $4AC1 = _Route14EndBattleText7 + $4AD8 = _Route14AfterBattleText7 + $4EAA = _Route15EndBattleText6 + $4EC1 = _Route15AfterBattleText6 + $51F5 = _Route16EndBattleText5 + $5205 = _Route16AfterBattleText5 + $5455 = _Route17EndBattleText4 + $545E = _Route17AfterBattleText4 + $5872 = _Route18EndBattleText3 + $5879 = _Route18AfterBattleText3 + $5961 = _Route19EndBattleText2 + $5975 = _Route19AfterBattleText2 + $6297 = _Route21EndBattleText9 + $62AF = _Route21AfterBattleText9 + $469E = _Route13EndBattleText9 + $46B1 = _Route13AfterBattleText9 + $4B21 = _Route14EndBattleText8 + $4B2E = _Route14AfterBattleText8 + $4F0F = _Route15EndBattleText7 + $4F19 = _Route15AfterBattleText7 + $5245 = _Route16EndBattleText6 + $5258 = _Route16AfterBattleText6 + $549A = _Route17EndBattleText5 + $54A9 = _Route17AfterBattleText5 + $59B1 = _Route19EndBattleText3 + $59BE = _Route19AfterBattleText3 + $67A8 = _Route24Text_51526 + $4B78 = _Route14EndBattleText9 + $4B83 = _Route14AfterBattleText9 + $4F8C = _Route15EndBattleText8 + $4FA0 = _Route15AfterBattleText8 + $54F4 = _Route17EndBattleText6 + $54FF = _Route17AfterBattleText6 + $59F7 = _Route19EndBattleText4 + $59FE = _Route19AfterBattleText4 + $4FDF = _Route15EndBattleText9 + $4FEE = _Route15AfterBattleText9 + $554A = _Route17EndBattleText7 + $555F = _Route17AfterBattleText7 + $5A48 = _Route19EndBattleText5 + $5A4F = _Route19AfterBattleText5 + $558A = _Route17EndBattleText8 + $5594 = _Route17AfterBattleText8 + $5A8D = _Route19EndBattleText6 + $5A9E = _Route19AfterBattleText6 + $5C69 = _Route20BattleText1 + $4134 = _Route12BattleText1 + $55D5 = _Route17EndBattleText9 + $55DD = _Route17AfterBattleText9 + $5AF4 = _Route19EndBattleText7 + $5B01 = _Route19AfterBattleText7 + $5CAC = _Route20BattleText2 + $5FB8 = _Route21BattleText1 + $4183 = _Route12BattleText2 + $5B53 = _Route19EndBattleText8 + $5B5D = _Route19AfterBattleText8 + $5D01 = _Route20BattleText3 + $6006 = _Route21BattleText2 + $41EE = _Route12BattleText3 + $43ED = _Route13BattleText2 + $480D = _Route14BattleText1 + $5BAE = _Route19EndBattleText9 + $5BBF = _Route19AfterBattleText9 + $5D43 = _Route20BattleText4 + $605A = _Route21BattleText3 + $4245 = _Route12BattleText4 + $444A = _Route13BattleText3 + $488E = _Route14BattleText2 + $4C3E = _Route15BattleText1 + $5D8F = _Route20BattleText5 + $60A0 = _Route21BattleText4 + $68E2 = _Route24BattleText1 + $42A8 = _Route12BattleText5 + $44A6 = _Route13BattleText4 + $48EA = _Route14BattleText3 + $4CDD = _Route15BattleText2 + $5081 = _Route16BattleText1 + $5DE1 = _Route20BattleText6 + $60FF = _Route21BattleText5 + $4301 = _Route12BattleText6 + $4503 = _Route13BattleText5 + $4971 = _Route14BattleText4 + $4D48 = _Route15BattleText3 + $50D7 = _Route16BattleText2 + $5352 = _Route17BattleText1 + $5E3D = _Route20BattleText7 + $614A = _Route21BattleText6 + $4358 = _Route12BattleText7 + $4579 = _Route13BattleText6 + $49D0 = _Route14BattleText5 + $4DA7 = _Route15BattleText4 + $511E = _Route16BattleText3 + $53AF = _Route17BattleText2 + $57A1 = _Route18BattleText1 + $5E7C = _Route20BattleText8 + $61C3 = _Route21BattleText7 + $45D0 = _Route13BattleText7 + $4A37 = _Route14BattleText6 + $4E33 = _Route15BattleText5 + $5173 = _Route16BattleText4 + $53F5 = _Route17BattleText3 + $57ED = _Route18BattleText2 + $58EB = _Route19BattleText1 + $5EE3 = _Route20BattleText9 + $620B = _Route21BattleText8 + $461D = _Route13BattleText8 + $4A99 = _Route14BattleText7 + $4E86 = _Route15BattleText6 + $51D8 = _Route16BattleText5 + $5438 = _Route17BattleText4 + $584F = _Route18BattleText3 + $593F = _Route19BattleText2 + $6275 = _Route21BattleText9 + $4680 = _Route13BattleText9 + $4AFD = _Route14BattleText8 + $4EED = _Route15BattleText7 + $5236 = _Route16BattleText6 + $547E = _Route17BattleText5 + $598F = _Route19BattleText3 + $4B4C = _Route14BattleText9 + $4F59 = _Route15BattleText8 + $54D9 = _Route17BattleText6 + $59DC = _Route19BattleText4 + $6410 = _Route22Text_511bc + $4FC4 = _Route15BattleText9 + $552F = _Route17BattleText7 + $5A1A = _Route19BattleText5 + $62CD = _Route22RivalBeforeBattleText1 + $557D = _Route17BattleText8 + $5A6F = _Route19BattleText6 + $6450 = _Route22RivalBeforeBattleText2 + $55B9 = _Route17BattleText9 + $5AC0 = _Route19BattleText7 + $5B31 = _Route19BattleText8 + $5B8F = _Route19BattleText9 + $408F = _Route11Text11 + $5FA7 = _Route20Text11 + $66DD = _VictoryRoadGuardText_513a3 + $43BC = _Route12Text11 + $5FA7 = _Route20Text12 + SLACK: $16FD bytes + +Bank #37: + SECTION: $4000-$6A37 ($2A38 bytes) + $46C2 = _EvolvedText + $488C = _MimicLearnedMoveText + $4B94 = _MomHealText2 + $4BD7 = _StandByMeText + $50F2 = _OaksLabGivePokeballsText2 + $5268 = _OaksLabText8 + $54B6 = _OaksLabText_1d3be + $5444 = _OaksLabRivalPickingMonText + $49D0 = _HitWithRecoilText + $5C79 = ViridianMartParcelQuestText + $45D3 = _Route25Text11 + $460E = _WouldYouLikeToSaveText + $4CD0 = _DaisyUseMapText + $5893 = _OaksLabText_44206 + $593D = _OaksLabText_44215 + $59D9 = _OaksLabText_44224 + $5A60 = _OaksLabText_44233 + $5B0A = _OaksLabText_44242 + $67A8 = _Museum1FText_5c299 + $48B6 = _NothingHappenedText + $4C9C = _GotMapText + $5D71 = _ViridianHouseText1 + $4630 = _GameSavedText + $5DC7 = _ViridianHouseText2 + $6841 = _Museum2FText1 + $697A = _PewterGymText_5c49e + $4E06 = _OaksLabCharmanderText + $5A03 = _OaksLabText_44229 + $5AA8 = _OaksLabText_44238 + $5B39 = _OaksLabText_44247 + $5DF3 = _ViridianHouseText4 + $6869 = _Museum2FText2 + $4782 = _FireDefrostedText + $52BB = _OaksLabRivalWaitingText + $68B1 = _Museum2FText3 + $68CF = _Museum2FText4 + $4A87 = _LightScreenProtectedText + $6911 = _Museum2FText5 + $4CAD = _DaisyBagFullText + $6933 = _Museum2FText6 + $46FB = _IsEvolvingText + $5D15 = _SchoolText1 + $67E8 = _Museum1FText_5c2ad + $6823 = _Museum1FText_5c2bc + $694B = _Museum2FText7 + $4838 = _LoweredItsHeadText + $4878 = _BecameConfusedText + $49AF = _WasSeededText + $5D40 = _SchoolText2 + $4A58 = _RegainedHealthText + $4B07 = _MomWakeUpText + $474A = _BadlyPoisonedText + $6154 = _ViridianGymEndBattleText1 + $6167 = _ViridianGymAfterBattleText1 + $61C0 = _ViridianGymEndBattleText2 + $61C8 = _ViridianGymAfterBattleText2 + $4643 = _OlderFileWillBeErasedText + $47B3 = _MonsStatsFellText + $4810 = _MadeWhirlwindText + $620D = _ViridianGymEndBattleText3 + $622A = _ViridianGymAfterBattleText3 + $6285 = _ViridianGymEndBattleText4 + $628D = _ViridianGymAfterBattleText4 + $486A = _DugAHoleText + $62DC = _ViridianGymEndBattleText5 + $62ED = _ViridianGymAfterBattleText5 + $5E09 = _ViridianGymText_74ace + $6336 = _ViridianGymEndBattleText6 + $633D = _ViridianGymAfterBattleText6 + $49BE = _EvadedAttackText + $638F = _ViridianGymEndBattleText7 + $63A1 = _ViridianGymAfterBattleText7 + $4A35 = _FellAsleepBecameHealthyText + $4ED2 = _OaksLabText_1d2f0 + $51E9 = _OaksLabText_1d31d + $5236 = _OaksLabText_1d32c + $6403 = _ViridianGymEndBattleText8 + $6412 = _ViridianGymAfterBattleText8 + $54E4 = _OaksLabText_1d3c3 + $47BE = _GreatlyFellText + $580C = _OaksLabText_441cc + $5461 = _OaksLabRivalReceivedMonText + $46B0 = _ChooseABoxText + $47C9 = _FellText + $4EA0 = _OaksLabReceivedMonText + $490D = _ParalyzedMayNotAttackText + $4EF8 = _OaksLabText_1d2f5 + $475E = _BurnedText + $6125 = _ViridianGymBattleText1 + $49FC = _StatusChangesEliminatedText + $4B01 = _BattleCenterMText1 + $6197 = _ViridianGymBattleText2 + $4D5B = _OaksLabGaryText1 + $61DE = _ViridianGymBattleText3 + $499B = _GettingPumpedText + $6257 = _ViridianGymBattleText4 + $4000 = _Route24EndBattleText1 + $4010 = _Route24AfterBattleText1 + $53FC = _OaksLabBePatientText + $62B8 = _ViridianGymBattleText5 + $4061 = _Route24EndBattleText2 + $4072 = _Route24AfterBattleText2 + $4245 = _Route25EndBattleText1 + $4254 = _Route25AfterBattleText1 + $6308 = _ViridianGymBattleText6 + $40AF = _Route24EndBattleText3 + $40BC = _Route24AfterBattleText3 + $42CF = _Route25EndBattleText2 + $42DC = _Route25AfterBattleText2 + $45F1 = _FileDataDestroyedText + $4739 = _PoisonedText + $485A = _FlewUpHighText + $495E = _TooWeakSubstituteText + $5DE1 = _ViridianHouseText_1d5b1 + $6360 = _ViridianGymBattleText7 + $652C = _Museum1FText_5c21a + $40FD = _Route24EndBattleText4 + $4110 = _Route24AfterBattleText4 + $4337 = _Route25EndBattleText3 + $4345 = _Route25AfterBattleText3 + $63BD = _ViridianGymBattleText8 + $4150 = _Route24EndBattleText5 + $4163 = _Route24AfterBattleText5 + $4385 = _Route25EndBattleText4 + $439E = _Route25AfterBattleText4 + $484C = _SkyAttackGlowingText + $53DC = _OaksLabRivalInterjectionText + $41E8 = _Route24EndBattleText6 + $41FB = _Route24AfterBattleText6 + $43DD = _Route25EndBattleText5 + $43F2 = _Route25AfterBattleText5 + $48FB = _IsUnaffectedText + $4455 = _Route25EndBattleText6 + $4469 = _Route25AfterBattleText6 + $5477 = _OaksLabRivalChallengeText + $5C36 = _ViridianMartText1 + $6095 = _TM27ExplanationText + $44C6 = _Route25EndBattleText7 + $44D8 = _Route25AfterBattleText7 + $4795 = _MonsStatsRoseText + $5CD5 = _ViridianMartText2 + $6539 = _Museum1FText_5c21f + $65A7 = _Museum1FText_5c22e + $6657 = _Museum1FText_5c23d + $452A = _Route25EndBattleText8 + $4537 = _Route25AfterBattleText8 + $5CF6 = _ViridianMartText3 + $4590 = _Route25EndBattleText9 + $45A2 = _Route25AfterBattleText9 + $4AD5 = _SuckedHealthText + $5C58 = _ViridianMartText4 + $489E = _MoveWasDisabledText + $5551 = _OaksLabText21 + $4A20 = _StartedSleepingEffect + $4ABF = _ShroudedInMistText + $4D79 = _OaksLabText40 + $555D = _OaksLabText22 + $4715 = _FellAsleepText + $4AEC = _DreamWasEatenText + $4DBD = _OaksLabText41 + $557B = _OaksLabText23 + $5ED5 = _ViridianGymText_74ad3 + $55A8 = _OaksLabText24 + $66B4 = _Museum1FText_5c28e + $4043 = _Route24BattleText2 + $421E = _Route25BattleText1 + $47A0 = _GreatlyRoseText + $49E5 = _ConvertedTypeText + $526B = _OaksLabText_1d340 + $562A = _OaksLabText25 + $58CC = _OaksLabText_4420b + $596D = _OaksLabText_4421a + $6451 = _ViridianGymText_74bd4 + $67C9 = _Museum1FText_5c29e + $4095 = _Route24BattleText3 + $4292 = _Route25BattleText2 + $52DF = _OaksLabChooseMonText + $5664 = _OaksLabText26 + $40DF = _Route24BattleText4 + $4310 = _Route25BattleText3 + $46DD = _StoppedEvolvingText + $476D = _FrozenText + $47AB = _RoseText + $47E5 = _RanAwayScaredText + $5741 = _OaksLabText27 + $57EB = _OaksLabText_1d405 + $4133 = _Route24BattleText5 + $4369 = _Route25BattleText4 + $46CF = _IntoText + $4186 = _Route24BattleText6 + $43C1 = _Route25BattleText5 + $519E = _OaksLabPleaseVisitText + $5F2B = _ViridianGymText_74ad9 + $442A = _Route25BattleText6 + $47F9 = _WasBlownAwayText + $48D5 = _ButItFailedText + $4DDF = _OaksLabText39 + $59B8 = _OaksLabText_4421f + $5A2E = _OaksLabText_4422e + $5AD9 = _OaksLabText_4423d + $5B6F = _OaksLabText_4424c + $64FB = _ViridianGymText_74bd9 + $4499 = _Route25BattleText7 + $48C9 = _NoEffectText + $497E = _CoinsScatteredText + $6790 = _ReceivedOldAmberText + $44FD = _Route25BattleText8 + $480C = _ChargeMoveEffectText + $4C5D = _DaisyOfferMapText + $4563 = _Route25BattleText9 + $4CFD = _BluesHouseText2 + $6082 = _ReceivedTM27Text + $4C3C = _DaisyInitialText + $4D3B = _BluesHouseText3 + $4949 = _HasSubstituteText + $4AAE = _ReflectGainedArmorText + $5045 = _OaksLabAroundWorldText + $5BA1 = _ViridianPokeCenterText1 + $5FCC = _ViridianGymText12 + $4824 = _TookInSunlightText + $5BA1 = _ViridianPokeCenterText2 + $47D1 = _RanFromBattleText + $5BE8 = _ViridianPokeCenterText3 + $4EB6 = _OaksLabLastMonText + $6572 = _Museum1FText_5c224 + $65F1 = _Museum1FText_5c233 + $6675 = _Museum1FText_5c242 + $6693 = _Museum1FText_5c251 + $4E80 = _OaksLabMonEnergeticText + $4F69 = _OaksLabDeliverParcelText1 + $48E7 = _DidntAffectText + $492F = _SubstituteText + $4A6C = _TransformedText + $4C29 = _TVWrongSideText + $500F = _OaksLabDeliverParcelText2 + $5502 = _OaksLabRivalToughenUpText + $4B04 = _TradeCenterMText1 + $658A = _Museum1FText_5c229 + $6636 = _Museum1FText_5c238 + $4671 = _WhenYouChangeBoxText + $4E57 = _OaksLabBulbasaurText + $5427 = _OaksLabLeavingText + $6104 = _TM27NoRoomText + $4E2F = _OaksLabSquirtleText + $5858 = _OaksLabText_44201 + $5903 = _OaksLabText_44210 + $4725 = _AlreadyAsleepText + $4B6D = _MomHealText1 + $4F36 = _OaksLabText_1d2fa + $506D = _OaksLabGivePokeballsText1 + SLACK: $15C8 bytes + +Bank #38: + SECTION: $4000-$6B7A ($2B7B bytes) + $4EE0 = _BikeShopText_1d82a + $5A1E = _PokemonTower5BattleText3 + $5B72 = _PokemonTower6BattleText2 + $5D31 = _PokemonTower7BattleText1 + $64B2 = _VermilionPokecenterText2 + $43FC = _PewterGymText_5c51f + $5A44 = _PokemonTower5BattleText4 + $5BC6 = _PokemonTower6BattleText3 + $5D80 = _PokemonTower7BattleText2 + $6539 = _VermilionPokecenterText3 + $5E33 = _PokemonTower7BattleText3 + $6AA5 = _VermilionGymText_5cb6d + $6308 = _NameRaterText_1dab3 + $63E5 = _NameRaterText_1dac2 + $646B = _NameRaterText_1dad1 + $66E0 = FanClubChairStoryText + $682E = ReceivedBikeVoucherText + $4E83 = _BikeShopText_1d81f + $4EFC = _BikeShopText_1d82f + $4FC1 = _BikeShopText_1d85c + $6933 = FanClubBagFullText + $47E2 = _CeruleanTrashedText_1d6b0 + $5AC8 = _PokemonTower2Text_60c1f + $6361 = _NameRaterText_1dab8 + $6404 = _NameRaterText_1dac7 + $44CE = _PewterHouse1Text1 + $4C38 = _CeruleanGymEndBattleText1 + $4C4D = _CeruleanGymAfterBattleText1 + $525D = _CeruleanHouse2Text_74ea0 + $44E1 = _PewterHouse1Text2 + $4656 = _PewterHouse2Text1 + $4CB5 = _CeruleanGymEndBattleText2 + $4CC4 = _CeruleanGymAfterBattleText2 + $5FFB = _ReceivedFluteText + $44EF = _PewterHouse1Text3 + $46AE = _PewterHouse2Text2 + $48E5 = _CeruleanPokecenterText1 + $5E8D = _LavenderHouse1Text_1d8d1 + $492A = _CeruleanPokecenterText3 + $540E = _LavenderPokecenterText1 + $52B8 = _CeruleanHouse2Text_74ea5 + $53C7 = _CeruleanHouse2Text_74eb4 + $540E = _LavenderPokecenterText2 + $5F97 = _LavenderHouse1Text_1d94c + $62B9 = _LavenderHouse2Text_1d9e1 + $5442 = _LavenderPokecenterText3 + $5C1A = _PokemonTower7Text_60ec4 + $49C1 = _CeruleanGymText_5c7be + $540E = _LavenderPokecenterText4 + $5EBA = _LavenderHouse1Text_1d8d6 + $5EEE = _LavenderHouse1Text_1d8f4 + $513A = _CeruleanHouse2Text_74e7c + $51F2 = _CeruleanHouse2Text_74e9b + $53F5 = _CeruleanHouse2Text_74eb9 + $6572 = PikachuFanText + $5F4B = _LavenderHouse1Text_1d8f9 + $6641 = FanClubSeelText + $68F2 = FanClubChairFinalText + $69C1 = _VermilionMartText2 + $4C05 = _CeruleanGymBattleText1 + $6A67 = _VermilionMartText3 + $4C93 = _CeruleanGymBattleText2 + $4E03 = _BikeShopText_1d810 + $6069 = _FluteNoRoomText + $4351 = _PewterGymText_5c515 + $4476 = _PewterGymText_5c524 + $65FF = SeelFanBetterText + $4E45 = _BikeShopText_1d815 + $4EB2 = _BikeShopText_1d824 + $4F4D = _BikeShopText_1d834 + $4F6D = _BikeShopText_1d843 + $4FF2 = _BikeShopText_1d861 + $4092 = _TM34PreReceiveText + $449F = _PewterGymText_5c529 + $5AFC = _PokemonTower2Text_60c24 + $5012 = _CeruleanMartText2 + $45AC = _PewterMartText_74cc6 + $460C = _PewterMartText_74cd5 + $507F = _CeruleanMartText3 + $557B = _PokemonTower2Text_6062d + $5657 = _PokemonTower2Text_6063c + $6104 = _LavenderMartText2 + $40C0 = _TM34ExplanationText + $4D0A = _CeruleanGymText_5c82a + $4A7B = _CeruleanGymText_5c7c3 + $4B90 = _CeruleanGymText_5c7d3 + $5170 = _CeruleanHouse2Text_74e81 + $4DB0 = _CeruleanGymText_5c82f + $42F1 = _PewterGymEndBattleText1 + $4325 = _PewterGymAfterBattleText1 + $4AB0 = _CeruleanGymText_5c7c8 + $61B4 = _LavenderMart_5c953 + $6629 = FanClubPikachuText + $41C9 = _PewterGymText_5c4bc + $4704 = _PewterPokecenterText1 + $4BB0 = _CeruleanGymText_5c7d8 + $488C = _CeruleanHouse1Text1 + $50C9 = _CeruleanHouse2Text_74e77 + $547F = _PokemonTower1Text1 + $5192 = _CeruleanHouse2Text_74e96 + $54BC = _PokemonTower1Text2 + $4B7D = _ReceivedTM11Text + $54E6 = _PokemonTower1Text3 + $571A = _PokemonTower2Text2 + $4744 = _PewterPokecenterText5 + $5524 = _PokemonTower1Text4 + $61E3 = _LavenderMart_5c958 + $6238 = _LavenderHouse2Text1 + $659E = PikachuFanBetterText + $5546 = _PokemonTower1Text5 + $5958 = _PokemonTower5Text1 + $5F72 = _LavenderHouse1Text3 + $5F85 = _LavenderHouse1Text4 + $637F = _NameRaterText_1dabd + $644C = _NameRaterText_1dacc + $40AD = _ReceivedTM34Text + $60AA = _LavenderHouse1Text6 + $5794 = _PokemonTower3EndBattleText1 + $57A4 = _PokemonTower3AfterBattleText1 + $42AE = _PewterGymBattleText1 + $475C = _CeruleanTrashedText_1d6ab + $4834 = _CeruleanHouseTrashedText2 + $57EA = _PokemonTower3EndBattleText2 + $5801 = _PokemonTower3AfterBattleText2 + $587D = _PokemonTower4EndBattleText1 + $5892 = _PokemonTower4AfterBattleText1 + $5A8B = _PokemonTower5Text7 + $5C01 = _PokemonTower6Text6 + $486F = _CeruleanHouseTrashedText3 + $532A = _CeruleanHouse2Text_74eaa + $5831 = _PokemonTower3EndBattleText3 + $5849 = _PokemonTower3AfterBattleText3 + $58CC = _PokemonTower4EndBattleText2 + $58D3 = _PokemonTower4AfterBattleText2 + $59BC = _PokemonTower5EndBattleText1 + $59C3 = _PokemonTower5AfterBattleText1 + $55E5 = _PokemonTower2Text_60632 + $5916 = _PokemonTower4EndBattleText3 + $5927 = _PokemonTower4AfterBattleText3 + $59F9 = _PokemonTower5EndBattleText2 + $5A0C = _PokemonTower5AfterBattleText2 + $5B4F = _PokemonTower6EndBattleText1 + $5B57 = _PokemonTower6AfterBattleText1 + $5A28 = _PokemonTower5EndBattleText3 + $5A2D = _PokemonTower5AfterBattleText3 + $5B82 = _PokemonTower6EndBattleText2 + $5B99 = _PokemonTower6AfterBattleText2 + $5D56 = _PokemonTower7EndBattleText1 + $5D62 = _PokemonTower7AfterBattleText1 + $5A57 = _PokemonTower5EndBattleText4 + $5A5E = _PokemonTower5AfterBattleText4 + $5BE4 = _PokemonTower6EndBattleText3 + $5BEB = _PokemonTower6AfterBattleText3 + $5DE1 = _PokemonTower7EndBattleText2 + $5DF3 = _PokemonTower7AfterBattleText2 + $5E52 = _PokemonTower7EndBattleText3 + $5E6A = _PokemonTower7AfterBattleText3 + $5388 = _CeruleanHouse2Text_74eaf + $624C = _LavenderHouse2Text_1d9dc + $6844 = ExplainBikeVoucherText + $5614 = _PokemonTower2Text_60637 + $6011 = _FluteExplanationText + $41AB = _TM34NoRoomText + $43DC = _PewterGymText_5c51a + $5776 = _PokemonTower3BattleText1 + $65CF = SeelFanText + $6948 = _FanClubText6 + $4000 = _PewterGymText_5c4a3 + $4232 = _PewterGymText_5c4c1 + $57D6 = _PokemonTower3BattleText2 + $5869 = _PokemonTower4BattleText1 + $68C3 = FanClubNoStoryText + $6970 = _FanClubText7 + $581A = _PokemonTower3BattleText3 + $58B0 = _PokemonTower4BattleText2 + $599F = _PokemonTower5BattleText1 + $6087 = _MrFujiAfterFluteText + $699D = _FanClubText8 + $4E67 = _BikeShopText_1d81a + $58FE = _PokemonTower4BattleText3 + $59DC = _PokemonTower5BattleText2 + $5B38 = _PokemonTower6BattleText1 + $64B2 = _VermilionPokecenterText1 + $664F = FanClubMeetChairText + SLACK: $1485 bytes + +Bank #39: + SECTION: $4000-$6AA3 ($2AA4 bytes) + $450E = _VermilionDockText1 + $64D2 = _WardenTeethText1 + $432B = _VermilionGymText_5cbf4 + $4E72 = _VendingMachineText1 + $64F9 = _WardenTeethText2 + $67E3 = _SafariZoneEntranceText_75365 + $5AD9 = _CeladonGameCornerText_48dac + $5B11 = _CeladonGameCornerText_48dca + $5EE6 = _CeladonPrizeRoomText1 + $66B0 = _FuchsiaHouse2Text_7517b + $4E96 = _VendingMachineText4 + $5F24 = _CeladonPrizeRoomText2 + $5F3F = _CeladonDinerText1 + $4EAF = _VendingMachineText5 + $5F5D = _CeladonDinerText2 + $66E4 = SafariZoneEntranceText_9e6e4 + $4429 = _VermilionGymText_5cbf9 + $4EC0 = _VendingMachineText6 + $5F99 = _CeladonDinerText3 + $4EE0 = _VendingMachineText7 + $5BAC = _CeladonGameCornerText_48dcf + $5D47 = _CeladonGameCornerText_48ece + $5FC9 = _CeladonDinerText4 + $4194 = _VermilionGymBattleText1 + $4213 = _VermilionGymBattleText2 + $4A64 = _CeladonMart3Text11 + $4290 = _VermilionGymBattleText3 + $4C91 = _CeladonMartRoofText_4850a + $62A3 = _FuchsiaHouse1Text1 + $4A85 = _CeladonMart3Text13 + $62F3 = _FuchsiaHouse1Text2 + $4AA4 = _CeladonMart3Text14 + $634D = _FuchsiaHouse1Text3 + $4AB6 = _CeladonMart3Text15 + $618A = _CeladonHotelText1 + $4D6D = _CeladonMartRoofText_4852c + $61BF = _CeladonHotelText2 + $4CA5 = _CeladonMartRoofText_4850f + $620E = _CeladonHotelText3 + $53C2 = _CeladonGymText_48a63 + $6825 = _SafariZoneEntranceText_753bb + $4510 = _VermilionHouse2Text_560b1 + $4601 = _VermilionHouse2Text_560c0 + $4BCC = _CeladonMartRoofText_484f3 + $68A7 = _SafariZoneEntranceText_753eb + $65B6 = _HM04ExplanationText + $5418 = _CeladonGymText_48a68 + $60D5 = _CeladonHouseText1 + $4554 = _VermilionHouse2Text_560b6 + $4622 = _VermilionHouse2Text_560c5 + $4FBC = _GraphicArtistText + $610A = _CeladonHouseText2 + $4C06 = _CeladonMartRoofText_484f9 + $4D97 = _CeladonMartRoofText1 + $613C = _CeladonHouseText3 + $4000 = _VermilionGymText_5cb72 + $4E16 = _CeladonMartRoofText4 + $59A5 = _CeladonGameCornerText_48d2c + $5A00 = _CeladonGameCornerText_48d3b + $6814 = SafariZoneEntranceText_9e814 + $4E50 = _CeladonMartRoofText6 + $5AA9 = _Received10CoinsText + $4069 = _VermilionGymText_5cb77 + $5C4F = _Received20CoinsText + $4814 = _TM18PreReceiveText + $503A = _GameDesignerText + $5AC0 = _CeladonGameCornerText_48da7 + $5D73 = _CeladonGameCornerText_48ed3 + $4672 = _CeladonMart1Text1 + $5520 = _TM21ExplanationText + $6696 = _FuchsiaHouse2Text_75176 + $46CD = _CeladonMart1Text2 + $6747 = SafariZoneEntranceText_9e747 + $4449 = _VermilionHouse1Text1 + $4752 = _CeladonMart1Text3 + $4FA4 = _ProgrammerText + $5481 = _CeladonGymText9 + $55B9 = _CeladonGymEndBattleText2 + $55CB = _CeladonGymAfterBattleText2 + $40F5 = _TM24ExplanationText + $4488 = _VermilionHouse1Text2 + $476B = _CeladonMart2Text3 + $48C7 = _CeladonMart3Text2 + $5606 = _CeladonGymEndBattleText3 + $5612 = _CeladonGymAfterBattleText3 + $5A8E = _CeladonGameCornerText_48d9c + $449C = _VermilionHouse1Text3 + $47B2 = _CeladonMart2Text4 + $492D = _CeladonMart3Text3 + $4AD4 = _CeladonMart4Text2 + $5226 = _CeladonPokecenterText2 + $5691 = _CeladonGymEndBattleText4 + $569F = _CeladonGymAfterBattleText4 + $5CEB = _CeladonGameCornerText_48e8d + $5D7A = _CeladonGameCornerText_48ed8 + $5DFF = _CeladonMart5Text1 + $47DC = _CeladonMart2Text5 + $4975 = _CeladonMart3Text4 + $4AFD = _CeladonMart4Text3 + $4D30 = _CeladonMartRoofText_48520 + $5262 = _CeladonPokecenterText3 + $5702 = _CeladonGymEndBattleText5 + $5707 = _CeladonGymAfterBattleText5 + $5E79 = _CeladonMart5Text2 + $486E = _TM18ExplanationText + $49D5 = _CeladonMart3Text5 + $4B56 = _CeladonMart4Text4 + $578D = _CeladonGymEndBattleText6 + $5797 = _CeladonGymAfterBattleText6 + $65A2 = _ReceivedHM04Text + $4A13 = _CeladonMart3Text6 + $4C5A = _CeladonMartRoofText_48504 + $5808 = _CeladonGymEndBattleText7 + $5817 = _CeladonGymAfterBattleText7 + $4A21 = _CeladonMart3Text7 + $5897 = _CeladonGymEndBattleText8 + $58A4 = _CeladonGymAfterBattleText8 + $5ED6 = _CeladonMart5Text5 + $6444 = _WardenGibberishText1 + $4CE6 = _CeladonMartRoofText_48515 + $648B = _WardenGibberishText2 + $6854 = _SafariZoneEntranceText_753c0 + $4A43 = _CeladonMart3Text9 + $64B0 = _WardenGibberishText3 + $4D4D = _CeladonMartRoofText_48526 + $6993 = _SafariZoneEntranceText_753f0 + $651B = _WardenThankYouText + $67FB = _SafariZoneEntranceText_7536a + $6860 = _SafariZoneEntranceText_753c5 + $5596 = _CeladonGymBattleText2 + $55F0 = _CeladonGymBattleText3 + $6387 = _FuchsiaPokecenterText1 + $550C = _ReceivedTM21Text + $5675 = _CeladonGymBattleText4 + $6886 = _SafariZoneEntranceText_753e6 + $50AD = _CompletedDexText + $56D1 = _CeladonGymBattleText5 + $63DE = _FuchsiaPokecenterText3 + $5762 = _CeladonGymBattleText6 + $607A = _ReceivedCoinCaseText + $40E0 = _ReceivedTM24Text + $4DEE = _CeladonMartRoofText_48598 + $57D7 = _CeladonGymBattleText7 + $591A = _CeladonGameCornerText_48d22 + $59C5 = _CeladonGameCornerText_48d31 + $667A = _HM04NoRoomText + $5855 = _CeladonGymBattleText8 + $5C66 = _CeladonGameCornerText_48e31 + $66C7 = _SafariZoneEntranceText1 + $485A = _ReceivedTM18Text + $69B1 = _UnnamedText_75581 + $4FE0 = _WriterText + $5984 = _CeladonGameCornerText_48d27 + $59E1 = _CeladonGameCornerText_48d36 + $5C33 = _CeladonGameCornerText_48e26 + $5C7F = _CeladonGameCornerText_48e36 + $4D1D = _ReceivedTM49Text + $5DB0 = _CeladonGameCornerText_48f09 + $5DE2 = _CeladonGameCornerText_48f19 + $6A66 = _UnnamedText_75586 + $4EEE = _CeladonMansion1Text1 + $5D02 = _CeladonGameCornerText_48e93 + $4EFE = _CeladonMansion1Text2 + $4F8B = _CeladonMansion2Text1 + $4F3C = _CeladonMansion1Text3 + $5576 = _TM21NoRoomText + $58D5 = _CeladonGameCornerText1 + $4F55 = _CeladonMansion1Text4 + $51A6 = _CeladonMansion4Text1 + $4F6B = _CeladonMansion1Text5 + $51BA = _CeladonMansion5Text1 + $5A1C = _CeladonGameCornerText3 + $5CAD = _CeladonGameCornerText_48e88 + $6090 = _CoinCaseNoRoomText + $4130 = _TM24NoRoomText + $528F = _CeladonGymText_48a5e + $5A61 = _CeladonGameCornerText4 + $5D1D = _CeladonGameCornerText_48e98 + $45A4 = _VermilionHouse2Text_560bb + $464C = _VermilionHouse2Text_560ca + $4BB5 = _CeladonMartRoofText_484ee + $50ED = _CeladonMansion3Text5 + $4C1A = _CeladonMartRoofText_484fe + $512C = _CeladonMansion3Text6 + $5AF4 = _CeladonGameCornerText6 + $6003 = _CeladonDinerText_491a7 + $4151 = _ReceivedThunderbadgeText + $41C8 = _VermilionGymEndBattleText1 + $41E0 = _VermilionGymAfterBattleText1 + $48AA = _TM18NoRoomText + $5159 = _CeladonMansion3Text7 + $60A5 = _CeladonDinerText_491b7 + $679F = _SafariZoneEntranceText_75360 + $4244 = _VermilionGymEndBattleText2 + $424C = _VermilionGymAfterBattleText2 + $5189 = _CeladonMansion3Text8 + $5C06 = _CeladonGameCornerText8 + $622E = _FuchsiaMartText2 + $42AC = _VermilionGymEndBattleText3 + $42C0 = _VermilionGymAfterBattleText3 + $626E = _FuchsiaMartText3 + SLACK: $155C bytes + +Bank #40: + SECTION: $4000-$6A36 ($2A37 bytes) + $46E8 = _FuchsiaHouse3Text_561c2 + $4782 = _FuchsiaHouse3Text_5621c + $57BE = _CopycatsHouse2FText6 + $5FE0 = _SaffronGymBattleText2 + $6619 = _PokemartTellBuyPriceText + $6042 = _SaffronGymBattleText3 + $60C9 = _SaffronGymBattleText4 + $5842 = _CopycatsHouse2FText_5cd1c + $613C = _SaffronGymBattleText5 + $619C = _SaffronGymBattleText6 + $6277 = _SaffronGymBattleText7 + $55AD = _CopycatsHouse2FText_5ccd4 + $66F0 = _PokemartUnsellableItemText + $6819 = _OneTwoAndText + $4DF7 = _Lab1Text1 + $4A65 = _CinnabarGymText_75964 + $4E49 = _Lab1Text2 + $4EB5 = _Lab2Text1 + $5689 = _TM31ExplanationText1 + $63E3 = _SaffronMartText2 + $65C5 = _PlayerBlackedOutText + $6670 = _PokemartItemBagFullText + $6690 = _PokemonSellingGreetingText + $4E70 = _Lab1Text3 + $56C5 = _TM31ExplanationText2 + $642A = _SaffronMartText3 + $4E87 = _Lab1Text4 + $4FE3 = _Lab3Text2 + $68CE = _NeedYourPokemonText + $4AC0 = _CinnabarGymText_75994 + $4E9E = _Lab1Text5 + $5010 = _Lab3Text3 + $48C7 = _BlaineEndBattleText + $4A7A = _CinnabarGymText_75969 + $50D8 = _Lab3Text5 + $686D = _PokemonCenterWelcomeText + $539B = _CinnabarMartText2 + $6653 = _PokemartNotEnoughMoneyText + $68E8 = _PokemonFightingFitText + $53CB = _CinnabarMartText3 + $5CDC = _SaffronGymText_5d16e + $5E48 = _SaffronGymText_5d1e6 + $4AF4 = _CinnabarGymText_75999 + $4D1B = _CinnabarGymText_75aa2 + $4D5A = _CinnabarGymText_75ac2 + $6608 = _PokemartBuyingGreetingText + $67A4 = _TryingToLearnText + $4C1E = _CinnabarGymText_75a3d + $4D2D = _CinnabarGymText_75aa7 + $66AE = _PokemartTellSellPriceText + $6719 = _PokemartAnythingElseText + $4737 = _FuchsiaHouse3Text_56212 + $48FD = _BlaineFireBlastText + $6305 = _SaffronHouse1Text1 + $4CC1 = _CinnabarGymText_75a6d + $4DD9 = _CinnabarGymText_75ac7 + $5145 = _Lab4Text_75dcb + $6352 = _SaffronHouse1Text2 + $6366 = _SaffronHouse1Text3 + $5636 = _TM31PreReceiveText + $6395 = _SaffronHouse1Text4 + $4844 = _BlaineBattleText + $4D00 = _CinnabarGymText_75a9d + $4758 = _FuchsiaHouse3Text_56217 + $6830 = _ForgotAndText + $4B58 = _CinnabarGymText_759ce + $4F09 = _TM35PreReceiveText + $6639 = _PokemartBoughtItemText + $4000 = _UnnamedText_7558b + $44D2 = _UnnamedText_7564e + $57EF = _CopycatsHouse2FText_5cd17 + $59B7 = _FightingDojoEndBattleText1 + $59C3 = _FightingDojoAfterBattleText1 + $47D5 = _Mansion1EndBattleText2 + $47DC = _Mansion1AfterBattleText2 + $5A22 = _FightingDojoEndBattleText2 + $5A33 = _FightingDojoAfterBattleText2 + $4B95 = _CinnabarGymText_759fe + $5A8D = _FightingDojoEndBattleText3 + $5AA4 = _FightingDojoAfterBattleText3 + $5B4A = _WantHitmonleeText + $64FE = _TM29PreReceiveText + $5B09 = _FightingDojoEndBattleText4 + $5B1A = _FightingDojoAfterBattleText4 + $5DCD = ReceivedTM46Text + $40FF = _TM06ExplanationText + $4946 = _BlaineBadgeText + $65EF = _RepelWoreOffText + $4826 = _MansionSwitchPressedText + $4F5D = _TM35ExplanationText + $5BB4 = _SaffronGymText_5d162 + $5DE0 = _TM46ExplanationText + $49BC = _TM38ExplanationText + $5D16 = _SaffronGymText_5d173 + $653E = _TM29ExplanationText + $68B4 = _ShallWeHealYourPokemonText + $480A = _MansionSwitchText + $51D6 = _Lab4Text_610ae + $52C6 = _Lab4Text_610bd + $6750 = _WhichMoveToForgetText + $4BB3 = _CinnabarGymText_75a03 + $5852 = _FightingDojoText_5ce8e + $5972 = _FightingDojoText_5ce9d + $5C73 = _SaffronGymText_5d167 + $6827 = _PoofText + $684D = _HMCantDeleteText + $6910 = _PokemonCenterFarewellText + $5999 = _FightingDojoBattleText1 + $6969 = _CableClubNPCText1 + $47A8 = _Mansion1BattleText2 + $4BF4 = _CinnabarGymText_75a33 + $5A05 = _FightingDojoBattleText2 + $65B7 = _PokemonFaintedText + $6985 = _CableClubNPCText2 + $41C2 = _FuchsiaGymEndBattleText1 + $41D8 = _FuchsiaGymAfterBattleText1 + $5A51 = _FightingDojoBattleText3 + $5B9A = _OtherHitmonText + $69CC = _CableClubNPCText3 + $423A = _FuchsiaGymEndBattleText2 + $4248 = _FuchsiaGymAfterBattleText2 + $4BC7 = _CinnabarGymText_75a08 + $5AD8 = _FightingDojoBattleText4 + $69DB = _CableClubNPCText4 + $42A8 = _FuchsiaGymEndBattleText3 + $42BC = _FuchsiaGymAfterBattleText3 + $4695 = _FuchsiaHouse3Text_561bd + $4CD2 = _CinnabarGymText_75a72 + $5156 = _Lab4Text_75dd0 + $433A = _FuchsiaGymEndBattleText4 + $434D = _FuchsiaGymAfterBattleText4 + $4402 = _FuchsiaGymEndBattleText5 + $4409 = _FuchsiaGymAfterBattleText5 + $4834 = _MansionSwitchNotPressedText + $4C19 = _CinnabarGymText_75a38 + $53F0 = _IndigoPlateauLobbyText1 + $5675 = _ReceivedTM31Text + $692B = _CableClubNPCText7 + $4470 = _FuchsiaGymEndBattleText6 + $4483 = _FuchsiaGymAfterBattleText6 + $6771 = _AbandonLearningText + $40EB = _ReceivedTM06Text + $548B = _IndigoPlateauLobbyText3 + $670D = _PokemartThankYouText + $4C90 = _CinnabarGymText_75a68 + $50E8 = _Lab4Text_75dc6 + $518D = _Lab4Text_75dd5 + $4B6B = _CinnabarGymText_759d3 + $4F48 = _ReceivedTM35Text + $659C = _PokemartGreetingText + $4069 = _UnnamedText_75590 + $4574 = _UnnamedText_75653 + $49A8 = _ReceivedTM38Text + $652A = _ReceivedTM29Text + $4A36 = _CinnabarGymText_7595f + $5F62 = _SaffronGymEndBattleText1 + $5F74 = _SaffronGymAfterBattleText1 + $678A = _DidNotLearnText + $4160 = _FuchsiaGymBattleText1 + $4B2C = _CinnabarGymText_759c9 + $6002 = _SaffronGymEndBattleText2 + $6019 = _SaffronGymAfterBattleText2 + $4207 = _FuchsiaGymBattleText2 + $5B70 = _WantHitmonchanText + $5EF0 = _SaffronGymText_5d1eb + $6091 = _SaffronGymEndBattleText3 + $609D = _SaffronGymAfterBattleText3 + $648E = _SaffronPokecenterText1 + $66CF = _PokemartItemBagEmptyText + $427E = _FuchsiaGymBattleText3 + $45A1 = _FuchsiaMeetingRoomText1 + $4B02 = _CinnabarGymText_7599e + $60F1 = _SaffronGymEndBattleText4 + $6107 = _SaffronGymAfterBattleText4 + $42FE = _FuchsiaGymBattleText4 + $45E6 = _FuchsiaMeetingRoomText2 + $615E = _SaffronGymEndBattleText5 + $6171 = _SaffronGymAfterBattleText5 + $645A = _SilphCo1Text1 + $64BF = _SaffronPokecenterText3 + $43A1 = _FuchsiaGymBattleText5 + $4642 = _FuchsiaMeetingRoomText3 + $61E4 = _SaffronGymEndBattleText6 + $61FE = _SaffronGymAfterBattleText6 + $4426 = _FuchsiaGymBattleText6 + $5733 = _TM31NoRoomText + $62CA = _SaffronGymEndBattleText7 + $62D3 = _SaffronGymAfterBattleText7 + $673B = _LearnedMove1Text + $5259 = _Lab4Text_610b3 + $4143 = _TM06NoRoomText + $52DE = _CinnabarPokecenterText1 + $54F7 = _CopycatsHouse1FText1 + $58BA = _FightingDojoText_5ce93 + $52DE = _CinnabarPokecenterText2 + $5535 = _CopycatsHouse1FText2 + $4FC7 = _TM35NoRoomText + $533E = _CinnabarPokecenterText3 + $5596 = _CopycatsHouse1FText3 + $5749 = _CopycatsHouse2FText2 + $5792 = _CopycatsHouse2FText3 + $528F = _Lab4Text_610b8 + $5E25 = _TM46NoRoomText + $4A1E = _TM38NoRoomText + $58CF = _FightingDojoText_5ce98 + $5F33 = _SaffronGymBattleText1 + $657C = _TM29NoRoomText + SLACK: $15C9 bytes + +Bank #41: + SECTION: $4000-$6B93 ($2B94 bytes) + $49E0 = _PewterCityText2 + $6298 = _CinnabarIslandText6 + $5980 = _VermilionCityText11 + $62A2 = _CinnabarIslandText7 + $59A6 = _VermilionCityText12 + $5E9C = _FuchsiaCityText1 + $60FD = _FuchsiaCitySlowpokeText + $61CF = _CinnabarIslandText8 + $69C2 = _RestorePPWhichTechniqueText + $6B4E = _NoSurfingHereText + $45EA = _ViridianCityText_191ca + $59E9 = _VermilionCityText13 + $5EDE = _FuchsiaCityText2 + $4BFE = _PewterCityText6 + $586B = _VermilionCityText14 + $5F3E = _FuchsiaCityText3 + $68DD = _PlayedFluteNoEffectText + $4C4A = _PewterCityText7 + $5F6B = _FuchsiaCityText4 + $5F96 = _FuchsiaCityText5 + $4FEB = _CeruleanCityText_196ee + $6A30 = _BootedUpHMText + $6981 = _ItemfinderFoundNothingText + $6AD0 = _ItemUseNotYoursToUseText + $57F1 = _SSAnneNotHereText + $4B55 = _PewterCityText_19431 + $571D = _SSAnneWelcomeText4 + $6050 = _FuchsiaCityChanseyText + $6928 = _PlayedFluteHadEffectText + $403C = _UsedStrengthText + $531F = _CeruleanCityText10 + $6729 = _ItemUseBallText00 + $675F = _ItemUseBallText01 + $539A = _CeruleanCityText12 + $62E7 = _SaffronCityText1 + $6775 = _ItemUseBallText02 + $4BCE = _PewterCityText_19462 + $53CE = _CeruleanCityText13 + $6304 = _SaffronCityText2 + $6791 = _ItemUseBallText03 + $40CC = _WarpToLastPokemonCenterText + $4B14 = _PewterCityText_19427 + $5734 = _SSAnneWelcomeText9 + $6324 = _SaffronCityText3 + $67B2 = _ItemUseBallText04 + $4180 = _GotMonText + $41D6 = _BoxIsFullText + $6339 = _SaffronCityText4 + $67CF = _ItemUseBallText05 + $541A = _CeruleanCityText16 + $635A = _SaffronCityText5 + $6835 = _ItemUseBallText06 + $48C3 = _ViridianCityText10 + $5445 = _CeruleanCityText17 + $60AC = _FuchsiaCityKangaskhanText + $637E = _SaffronCityText6 + $67EE = _ItemUseBallText07 + $6A1F = _BootedUpTMText + $56B5 = _VermilionCityText_198a7 + $639E = _SaffronCityText7 + $6810 = _ItemUseBallText08 + $63DF = _SaffronCityText8 + $688C = _VitaminStatRoseText + $4949 = _ViridianCityText13 + $640F = _SaffronCityText9 + $6AA6 = _ItemUseNotTimeText + $4961 = _ViridianCityText14 + $69E2 = _PPMaxedOutText + $6AE9 = _ItemUseNoEffectText + $5668 = _VermilionCityText1 + $690C = _FluteWokeUpText + $46F9 = _ViridianCityText_1920a + $51EC = _CeruleanCityText_1973a + $40EB = _CannotUseTeleportNowText + $5805 = _VermilionCityText4 + $5852 = _VermilionCityText5 + $6157 = _FuchsiaCityOmanyteText + $5891 = _VermilionCityText6 + $6A6E = _MonCannotLearnMachineMoveText + $4754 = _ViridianCityText_1920f + $5010 = _CeruleanCityText_196f3 + $58DB = _VermilionCityText7 + $4494 = _ViridianCityText_1914d + $4560 = _ViridianCityText_1917a + $4DBE = _CeruleanCityText_1966d + $5909 = _VermilionCityText8 + $4F96 = _ReceivedTM28Text2 + $61CA = _FuchsiaCityText_19b2a + $4088 = _CyclingIsFunText + $40A9 = _FlashLightsAreaText + $4F27 = _CeruleanCityText_196d9 + $526B = _CeruleanCityText_1976f + $52BB = _CeruleanCityText_1977e + $5B6E = _TM41ExplanationText + $68B8 = _ThrewBaitText + $6B34 = _NoCyclingAllowedHereText + $411B = _NotHealthyEnoughText + $4AA2 = _PewterCityText_193fb + $5C82 = _CeladonCityText10 + $6B69 = _BoxFullCannotThrowBallText + $5482 = _LavenderTownText_4413c + $5D18 = _CeladonCityText11 + $5030 = _CeruleanCityText3 + $576C = _SSAnneFlashedTicketText + $506E = _CeruleanCityText4 + $5D41 = _CeladonCityText13 + $6081 = _FuchsiaCityVoltorbText + $50BA = _CeruleanCityText5 + $5D82 = _CeladonCityText14 + $4168 = _CannotGetOffHereText + $50F6 = _CeruleanCityText6 + $5D93 = _CeladonCityText15 + $5DBF = _CeladonCityText16 + $43CC = _ViridianCityText1 + $57A3 = _SSAnneNoTicketText + $5E3E = _CeladonCityText17 + $52D6 = _CeruleanCityText9 + $5E6A = _CeladonCityText18 + $694F = _ItemfinderFoundItemText + $4CB1 = _PewterCityText10 + $4CCB = _PewterCityText11 + $4000 = _CableClubNPCText5 + $4D0C = _PewterCityText12 + $4014 = _CableClubNPCText6 + $4264 = _OakWalksUpText + $4AC6 = _PewterCityText13 + $68CC = _ThrewRockText + $4833 = _ViridianCityText8 + $5188 = _CeruleanCityText_19730 + $5AFD = _TM41PreText + $5F99 = _FuchsiaCityText11 + $689E = _VitaminNoEffectText + $4860 = _ViridianCityText9 + $5B5A = _ReceivedTM41Text + $6B03 = _ThrowBallAtTrainerMonText1 + $4437 = _ViridianCityText_19122 + $469A = _ReceivedTM42Text + $46AD = _TM42Explanation + $5FC1 = _FuchsiaCityText13 + $612C = _FuchsiaCityLaprasText + $69F9 = _PPIncreasedText + $6B22 = _ThrowBallAtTrainerMonText2 + $69A4 = _RaisePPWhichTechniqueText + $4245 = _OakAppearsText + $47E6 = _ViridianCityText_19214 + $5506 = _LavenderTownText2 + $44CD = _ViridianCityText_19152 + $4DE3 = _CeruleanCityText_19672 + $51C5 = _CeruleanCityText_19735 + $555F = _LavenderTownText3 + $5FDC = _FuchsiaCityText16 + $6191 = _FuchsiaCityKabutoText + $6A0D = _PPRestoredText + $4F82 = _ReceivedTM28Text + $55BB = _LavenderTownText4 + $5FF6 = _FuchsiaCityText17 + $6940 = _CoinCaseNumCoinsText + $6A42 = _TeachMachineMoveText + $4051 = _CanMoveBouldersText + $4474 = _ViridianCityText_19127 + $55E0 = _LavenderTownText5 + $6011 = _FuchsiaCityText18 + $685E = _SurfingGotOnText + $45B5 = _ViridianCityText_19191 + $5285 = _CeruleanCityText_19774 + $4807 = _ViridianCityText_19219 + $4B38 = _PewterCityText_1942c + $4069 = _CurrentTooFastText + $44DB = _ViridianCityText_19157 + $4525 = _ViridianCityText_19175 + $4A56 = _PewterCityText_193f1 + $4D2B = _CeruleanCityText_19668 + $4E07 = _CeruleanCityText_19677 + $561D = _LavenderTownText8 + $4107 = _CannotFlyHereText + $549D = _LavenderTownText_44141 + $563C = _LavenderTownText9 + $59FB = _CeladonCityText1 + $6445 = _SaffronCityText10 + $686F = _SurfingNoPlaceToGetOffText + $5A4B = _CeladonCityText2 + $6475 = _SaffronCityText11 + $65F8 = _SaffronCityText20 + $4B87 = _PewterCityText_1945d + $52A3 = _CeruleanCityText_19779 + $56E2 = _VermilionCityText_198ac + $5A79 = _CeladonCityText3 + $64D6 = _SaffronCityText12 + $6667 = _SaffronCityText21 + $5AA6 = _CeladonCityText4 + $64EB = _SaffronCityText13 + $66C7 = _SaffronCityText22 + $4A75 = _PewterCityText_193f6 + $5BB8 = _TM41NoRoomText + $6518 = _SaffronCityText14 + $414E = _CannotUseItemsHereText + $418F = _SetToBoxText + $42DC = _PalletTownText2 + $46D7 = _TM42NoRoomText + $54C0 = _LavenderTownText_44146 + $5BD9 = _CeladonCityText6 + $654F = _SaffronCityText15 + $66E2 = _SaffronCityText24 + $431D = _PalletTownText3 + $5C30 = _CeladonCityText7 + $61E6 = _CinnabarIslandText1 + $6577 = _SaffronCityText16 + $66F5 = _SaffronCityText25 + $4374 = _PalletTownText4 + $5C49 = _CeladonCityText8 + $622A = _CinnabarIslandText2 + $65A6 = _SaffronCityText17 + $4130 = _NewBadgeRequiredText + $438B = _PalletTownText5 + $5C63 = _CeladonCityText9 + $6266 = _CinnabarIslandText3 + $65B5 = _SaffronCityText18 + $43B6 = _PalletTownText6 + $4FB3 = _TM28NoRoomText + $43C1 = _PalletTownText7 + $497F = _PewterCityText1 + SLACK: $146C bytes + +Bank #42: + SECTION: $4000-$432F ($0330 bytes) + $401E = _GotOnBicycleText2 + $4088 = _AlreadyKnowsText + $411D = _WrongMon1Text + $41D3 = _WrongMon2Text + $4284 = _WrongMon3Text + $410B = _NoTrade1Text + $41B5 = _NoTrade2Text + $4274 = _NoTrade3Text + $403C = _ThrewAwayItemText + $4155 = _Thanks1Text + $4209 = _Thanks2Text + $42BC = _Thanks3Text + $4024 = _GotOffBicycleText1 + $40BC = _TradedForText + $4030 = _GotOffBicycleText2 + $404F = _IsItOKToTossItemText + $409A = _ConnectCableText + $4162 = _AfterTrade1Text + $4212 = _AfterTrade2Text + $42C9 = _AfterTrade3Text + $40D8 = _WannaTrade1Text + $417C = _WannaTrade2Text + $4240 = _WannaTrade3Text + $4000 = _ItemUseText001 + $4009 = _ItemUseText002 + $4315 = _UsedCutText + $42F8 = _NothingToCutText + $4068 = _TooImportantToTossText + $400F = _GotOnBicycleText1 + SLACK: $3CD0 bytes + +Bank #43: + SECTION: $4000-$7837 ($3838 bytes) + $5B56 = _KabutopsDexEntry + $667E = _MachampDexEntry + $4DF3 = _MachokeDexEntry + $5FCD = _VaporeonDexEntry + $5743 = _ZapdosDexEntry + $5E4E = _WigglytuffDexEntry + $4A9E = _TangelaDexEntry + $5AA0 = _DragonairDexEntry + $6A5A = _ElectrodeDexEntry + $73AF = _MagnemiteDexEntry + $4000 = _RhydonDexEntry + $48D6 = _GastlyDexEntry + $580E = _MeowthDexEntry + $7290 = _GeodudeDexEntry + $7593 = _CharizardDexEntry + $4A43 = _PinsirDexEntry + $64A7 = _VenomothDexEntry + $6F9F = _GoldeenDexEntry + $771C = _BellsproutDexEntry + $4B61 = _OnixDexEntry + $4C89 = _SlowpokeDexEntry + $550C = _DragoniteDexEntry + $7000 = _SeakingDexEntry + $6A00 = _CloysterDexEntry + $5277 = _KoffingDexEntry + $705D = _PonytaDexEntry + $598C = _PikachuDexEntry + $5EB7 = _EeveeDexEntry + $6AC0 = _ClefableDexEntry + $440C = _ExeggcuteDexEntry + $5CD9 = _SandslashDexEntry + $6E81 = _BulbasaurDexEntry + $53FA = _TaurosDexEntry + $5F18 = _FlareonDexEntry + $6EDF = _VenusaurDexEntry + $7475 = _SquirtleDexEntry + $451F = _NidoranFDexEntry + $592B = _NinetalesDexEntry + $66E4 = _GolduckDexEntry + $4EB4 = _HitmonleeDexEntry + $4F81 = _ArbokDexEntry + $65C7 = _MetapodDexEntry + $49E4 = _BlastoiseDexEntry + $4D9B = _ChanseyDexEntry + $5A3F = _DratiniDexEntry + $6508 = _DewgongDexEntry + $6812 = _MewtwoDexEntry + $699D = _KinglerDexEntry + $6DB9 = _PidgeotDexEntry + $457D = _NidoqueenDexEntry + $5396 = _DiglettDexEntry + $5625 = _JynxDexEntry + $60F1 = _EkansDexEntry + $4872 = _TentacoolDexEntry + $40B4 = _NidoranMDexEntry + $43A7 = _LickitungDexEntry + $50FF = _GolemDexEntry + $498E = _StaryuDexEntry + $58CE = _VulpixDexEntry + $7120 = _RattataDexEntry + $7416 = _CharmanderDexEntry + $614C = _ParasDexEntry + $6B76 = _PersianDexEntry + $6BD9 = _MarowakDexEntry + $405B = _KangaskhanDexEntry + $55C2 = _PoliwagDexEntry + $5C7B = _SandshrewDexEntry + $6D57 = _PidgeottoDexEntry + $6E1E = _StarmieDexEntry + $5565 = _DoduoDexEntry + $5D8E = _OmastarDexEntry + $6C3D = _HaunterDexEntry + $46F2 = _ArcanineDexEntry + $76B6 = _VileplumeDexEntry + $4E59 = _MrMimeDexEntry + $6B1B = _WeezingDexEntry + $6CF9 = _AlakazamDexEntry + $7658 = _GloomDexEntry + $4B05 = _GrowlitheDexEntry + $632D = _BeedrillDexEntry + $74D4 = _CharmeleonDexEntry + $54AE = _VenonatDexEntry + $5F73 = _JolteonDexEntry + $5D37 = _OmanyteDexEntry + $644A = _DugtrioDexEntry + $4340 = _ExeggutorDexEntry + $474F = _MewDexEntry + $57A6 = _DittoDexEntry + $61B2 = _PoliwhirlDexEntry + $620E = _PoliwrathDexEntry + $50A1 = _DrowzeeDexEntry + $4170 = _SpearowDexEntry + $608D = _ZubatDexEntry + $77DA = _VictreebelDexEntry + $4932 = _ScytherDexEntry + $5C1A = _SeadraDexEntry + $5042 = _PsyduckDexEntry + $68D8 = _MagikarpDexEntry + $693C = _MukDexEntry + $6C9D = _AbraDexEntry + $70C4 = _RapidashDexEntry + $777C = _WeepinbellDexEntry + $6565 = _CaterpieDexEntry + $717C = _RaticateDexEntry + $734C = _AerodactylDexEntry + $4F19 = _HitmonchanDexEntry + $4114 = _ClefairyDexEntry + $44C1 = _GengarDexEntry + $5683 = _MoltresDexEntry + $5161 = _MagmarDexEntry + $6878 = _SnorlaxDexEntry + $41CB = _VoltorbDexEntry + $427D = _SlowbroDexEntry + $6275 = _WeedleDexEntry + $674B = _HypnoDexEntry + $752D = _WartortleDexEntry + $4227 = _NidokingDexEntry + $4632 = _RhyhornDexEntry + $4819 = _ShellderDexEntry + $4FDB = _ParasectDexEntry + $602F = _MachopDexEntry + $63E8 = _PrimeapeDexEntry + $67AD = _GolbatDexEntry + $7238 = _NidorinaDexEntry + $5871 = _KrabbyDexEntry + $62CA = _KakunaDexEntry + $75F1 = _OddishDexEntry + $45DB = _CuboneDexEntry + $59EA = _RaichuDexEntry + $72F0 = _PorygonDexEntry + $4CDF = _KadabraDexEntry + $4D39 = _GravelerDexEntry + $5219 = _MagnetonDexEntry + $47B8 = _GyaradosDexEntry + $42DE = _IvysaurDexEntry + $5DE7 = _JigglypuffDexEntry + $638A = _DodrioDexEntry + $6F3B = _TentacruelDexEntry + $4C26 = _PidgeyDexEntry + $5BBD = _HorseaDexEntry + $6626 = _ButterfreeDexEntry + $4693 = _LaprasDexEntry + $51BC = _ElectabuzzDexEntry + $5457 = _FarfetchdDexEntry + $4BC8 = _FearowDexEntry + $533D = _SeelDexEntry + $52DE = _MankeyDexEntry + $4460 = _GrimerDexEntry + $5AFA = _KabutoDexEntry + $71DB = _NidorinoDexEntry + $56E5 = _ArticunoDexEntry + SLACK: $07C8 bytes + +Bank #44: + SECTION: $4000-$460E ($060F bytes) + $4000 = MoveNames + SLACK: $39F1 bytes + +Bank #256: + EMPTY + +Bank #257: + EMPTY + +Bank #258: + EMPTY + +Bank #259: + EMPTY + +Bank #260: + EMPTY + +Bank #261: + EMPTY + +Bank #262: + EMPTY + +Bank #263: + EMPTY + +Bank #264: + EMPTY + +Bank #265: + EMPTY + +Bank #266: + EMPTY + +Bank #267: + EMPTY + +Bank #268: + EMPTY + +Bank #269: + EMPTY + +Bank #270: + EMPTY + +Bank #271: + EMPTY + +Bank #272: + EMPTY + +Bank #273: + EMPTY + +Bank #274: + EMPTY + +Bank #275: + EMPTY + +Bank #276: + EMPTY + +Bank #277: + EMPTY + +Bank #278: + EMPTY + +Bank #279: + EMPTY + +Bank #280: + EMPTY + +Bank #281: + EMPTY + +Bank #282: + EMPTY + +Bank #283: + EMPTY + +Bank #284: + EMPTY + +Bank #285: + EMPTY + +Bank #286: + EMPTY + +Bank #287: + EMPTY + +Bank #288: + EMPTY + +Bank #289: + EMPTY + +Bank #290: + EMPTY + +Bank #291: + EMPTY + +Bank #292: + EMPTY + +Bank #293: + EMPTY + +Bank #294: + EMPTY + +Bank #295: + EMPTY + +Bank #296: + EMPTY + +Bank #297: + EMPTY + +Bank #298: + EMPTY + +Bank #299: + EMPTY + +Bank #300: + EMPTY + +Bank #301: + EMPTY + +Bank #302: + EMPTY + +Bank #303: + EMPTY + +Bank #304: + EMPTY + +Bank #305: + EMPTY + +Bank #306: + EMPTY + +Bank #307: + EMPTY + +Bank #308: + EMPTY + +Bank #309: + EMPTY + +Bank #310: + EMPTY + +Bank #311: + EMPTY + +Bank #312: + EMPTY + +Bank #313: + EMPTY + +Bank #314: + EMPTY + +Bank #315: + EMPTY + +Bank #316: + EMPTY + +Bank #317: + EMPTY + +Bank #318: + EMPTY + +Bank #319: + EMPTY + +Bank #320: + EMPTY + +Bank #321: + EMPTY + +Bank #322: + EMPTY + +Bank #323: + EMPTY + +Bank #324: + EMPTY + +Bank #325: + EMPTY + +Bank #326: + EMPTY + +Bank #327: + EMPTY + +Bank #328: + EMPTY + +Bank #329: + EMPTY + +Bank #330: + EMPTY + +Bank #331: + EMPTY + +Bank #332: + EMPTY + +Bank #333: + EMPTY + +Bank #334: + EMPTY + +Bank #335: + EMPTY + +Bank #336: + EMPTY + +Bank #337: + EMPTY + +Bank #338: + EMPTY + +Bank #339: + EMPTY + +Bank #340: + EMPTY + +Bank #341: + EMPTY + +Bank #342: + EMPTY + +Bank #343: + EMPTY + +Bank #344: + EMPTY + +Bank #345: + EMPTY + +Bank #346: + EMPTY + +Bank #347: + EMPTY + +Bank #348: + EMPTY + +Bank #349: + EMPTY + +Bank #350: + EMPTY + +Bank #351: + EMPTY + +Bank #352: + EMPTY + +Bank #353: + EMPTY + +Bank #354: + EMPTY + +Bank #355: + EMPTY + +Bank #356: + EMPTY + +Bank #357: + EMPTY + +Bank #358: + EMPTY + +Bank #359: + EMPTY + +Bank #360: + EMPTY + +Bank #361: + EMPTY + +Bank #362: + EMPTY + +Bank #363: + EMPTY + +Bank #364: + EMPTY + +Bank #365: + EMPTY + +Bank #366: + EMPTY + +Bank #367: + EMPTY + +Bank #368: + EMPTY + +Bank #369: + EMPTY + +Bank #370: + EMPTY + +Bank #371: + EMPTY + +Bank #372: + EMPTY + +Bank #373: + EMPTY + +Bank #374: + EMPTY + +Bank #375: + EMPTY + +Bank #376: + EMPTY + +Bank #377: + EMPTY + +Bank #378: + EMPTY + +Bank #379: + EMPTY + +Bank #380: + EMPTY + +Bank #381: + EMPTY + +Bank #382: + EMPTY + +Bank #383: + EMPTY + +Bank #384: + EMPTY + +Bank #385: + EMPTY + +Bank #386: + EMPTY + +Bank #387: + EMPTY + +Bank #388: + EMPTY + +Bank #389: + EMPTY + +Bank #390: + EMPTY + +Bank #391: + EMPTY + +Bank #392: + EMPTY + +Bank #393: + EMPTY + +Bank #394: + EMPTY + +Bank #395: + EMPTY + +Bank #396: + EMPTY + +Bank #397: + EMPTY + +Bank #398: + EMPTY + +Bank #399: + EMPTY + +Bank #400: + EMPTY + +Bank #401: + EMPTY + +Bank #402: + EMPTY + +Bank #403: + EMPTY + +Bank #404: + EMPTY + +Bank #405: + EMPTY + +Bank #406: + EMPTY + +Bank #407: + EMPTY + +Bank #408: + EMPTY + +Bank #409: + EMPTY + +Bank #410: + EMPTY + +Bank #411: + EMPTY + +Bank #412: + EMPTY + +Bank #413: + EMPTY + +Bank #414: + EMPTY + +Bank #415: + EMPTY + +Bank #416: + EMPTY + +Bank #417: + EMPTY + +Bank #418: + EMPTY + +Bank #419: + EMPTY + +Bank #420: + EMPTY + +Bank #421: + EMPTY + +Bank #422: + EMPTY + +Bank #423: + EMPTY + +Bank #424: + EMPTY + +Bank #425: + EMPTY + +Bank #426: + EMPTY + +Bank #427: + EMPTY + +Bank #428: + EMPTY + +Bank #429: + EMPTY + +Bank #430: + EMPTY + +Bank #431: + EMPTY + +Bank #432: + EMPTY + +Bank #433: + EMPTY + +Bank #434: + EMPTY + +Bank #435: + EMPTY + +Bank #436: + EMPTY + +Bank #437: + EMPTY + +Bank #438: + EMPTY + +Bank #439: + EMPTY + +Bank #440: + EMPTY + +Bank #441: + EMPTY + +Bank #442: + EMPTY + +Bank #443: + EMPTY + +Bank #444: + EMPTY + +Bank #445: + EMPTY + +Bank #446: + EMPTY + +Bank #447: + EMPTY + +Bank #448: + EMPTY + +Bank #449: + EMPTY + +Bank #450: + EMPTY + +Bank #451: + EMPTY + +Bank #452: + EMPTY + +Bank #453: + EMPTY + +Bank #454: + EMPTY + +Bank #455: + EMPTY + +Bank #456: + EMPTY + +Bank #457: + EMPTY + +Bank #458: + EMPTY + +Bank #459: + EMPTY + +Bank #460: + EMPTY + +Bank #461: + EMPTY + +Bank #462: + EMPTY + +Bank #463: + EMPTY + +Bank #464: + EMPTY + +Bank #465: + EMPTY + +Bank #466: + EMPTY + +Bank #467: + EMPTY + +Bank #468: + EMPTY + +Bank #469: + EMPTY + +Bank #470: + EMPTY + +Bank #471: + EMPTY + +Bank #472: + EMPTY + +Bank #473: + EMPTY + +Bank #474: + EMPTY + +Bank #475: + EMPTY + +Bank #476: + EMPTY + +Bank #477: + EMPTY + +Bank #478: + EMPTY + +Bank #479: + EMPTY + +Bank #480: + EMPTY + +Bank #481: + EMPTY + +Bank #482: + EMPTY + +Bank #483: + EMPTY + +Bank #484: + EMPTY + +Bank #485: + EMPTY + +Bank #486: + EMPTY + +Bank #487: + EMPTY + +Bank #488: + EMPTY + +Bank #489: + EMPTY + +Bank #490: + EMPTY + +Bank #491: + EMPTY + +Bank #492: + EMPTY + +Bank #493: + EMPTY + +Bank #494: + EMPTY + +Bank #495: + EMPTY + +Bank #496: + EMPTY + +Bank #497: + EMPTY + +Bank #498: + EMPTY + +Bank #499: + EMPTY + +Bank #500: + EMPTY + +Bank #501: + EMPTY + +Bank #502: + EMPTY + +Bank #503: + EMPTY + +Bank #504: + EMPTY + +Bank #505: + EMPTY + +Bank #506: + EMPTY + +Bank #507: + EMPTY + +Bank #508: + EMPTY + +Bank #509: + EMPTY + +Bank #510: + EMPTY + +Bank #511: + EMPTY + +WRAM0: + SECTION: $C000-$C0FF ($0100 bytes) + $C003 = wc003 + $C012 = wc012 + $C004 = wc004 + $C005 = wc005 + $C006 = wc006 + $C016 = wc016 + $C026 = wc026 + $C027 = wc027 + $C036 = wc036 + $C028 = wc028 + $C046 = wc046 + $C056 = wc056 + $C066 = wc066 + $C076 = wc076 + $C086 = wc086 + $C096 = wc096 + $C0AE = wc0ae + $C0EA = wc0ea + $C0BE = wc0be + $C0EB = wc0eb + $C0CE = wc0ce + $C0EC = wc0ec + $C0CF = wc0cf + $C0DE = wc0de + $C0ED = wc0ed + $C0EE = wc0ee + $C0EF = wc0ef + $C02A = wc02a + $C02B = wc02b + $C0D0 = wc0d0 + $C00E = wc00e + $C02C = wc02c + $C0D1 = wc0d1 + $C02D = wc02d + $C0D2 = wc0d2 + $C0F0 = wc0f0 + $C02E = wc02e + $C0A6 = wc0a6 + $C0D3 = wc0d3 + $C0F1 = wc0f1 + $C03E = wc03e + $C0B6 = wc0b6 + $C0D4 = wc0d4 + $C0F2 = wc0f2 + $C04E = wc04e + $C0C6 = wc0c6 + $C0D5 = wc0d5 + $C05E = wc05e + $C0D6 = wc0d6 + $C06E = wc06e + $C0E6 = wc0e6 + $C07E = wc07e + $C0E7 = wc0e7 + $C08E = wc08e + $C0E8 = wc0e8 + $C09E = wc09e + $C0E9 = wc0e9 + $C000 = wc000 + $C001 = wc001 + $C002 = wc002 + SECTION: $C100-$C1FF ($0100 bytes) + $C100 = wSpriteStateData1 + SECTION: $C200-$C2FF ($0100 bytes) + $C200 = wSpriteStateData2 + SECTION: $C300-$CFFF ($0D00 bytes) + $C3A0 = wTileMap + $CD2E = wEngagedTrainerSet + $CF07 = wAnimSoundID + $CFD0 = W_ENEMYMOVEACCURACY + $CFDA = wEnemyMonNick + $CC4A = wMenuWrappingEnabled + $CC25 = wTopMenuItemX + $CFBA = wcfba + $CC24 = wTopMenuItemY + $CCD7 = wPlayerSubstituteHP + $CCEB = wcceb + $CFBB = wcfbb + $CFCA = wcfca + $C6E8 = wTempPic + $CCEC = wccec + $CFBC = wcfbc + $CFCB = wcfcb + $CBFC = wScreenEdgeTiles + $CCDE = wccde + $CCED = wcced + $CD1F = wPlayerMonEvasionMod + $CD41 = wTrainerScreenX + $CF70 = wGymLeaderName + $CFEA = wEnemyMonType1 + $CCEE = wccee + $CD40 = wTrainerScreenY + $CD60 = wFlags_0xcd60 + $CFAF = wcfaf + $CFBE = wcfbe + $CFD6 = W_PLAYERMOVEACCURACY + $CFEB = wEnemyMonType2 + $CCEF = wccef + $CFE8 = wEnemyMonPartyPos + $CC2A = wLastMenuItem + $CFC5 = wWalkCounter + $C508 = wTileMapBackup + $CF5F = wStringBuffer1 + $CFD8 = wEnemyMonSpecies2 + $CD2F = wEnemyMonDefenseMod + $CD6B = wJoyIgnore + $CF70 = wStringBuffer2 + $CC30 = wMenuCursorLocation + $CEEF = wHPBarDelta + $CF81 = wStringBuffer3 + $CC36 = wListScrollOffset + $CC2E = wPlayerMoveListIndex + $CD3D = wWhichTrade + $CFF8 = wEnemyMonDefense + $CCDD = wEnemySelectedMove + $CD1E = wPlayerMonAccuracyMod + $CFCC = W_ENEMYMOVENUM + $CD3F = wTrainerFacingDirection + $CD31 = wEnemyMonSpecialMod + $CC34 = wMenuJoypadPollCount + $CEFD = wHPBarHPDifference + $CFD1 = W_ENEMYMOVEMAXPP + $CCA1 = wcca1 + $CFD2 = W_PLAYERMOVENUM + $CFFC = wEnemyMonSpecial + $CC2B = wcc2b + $CC3A = wcc3a + $CF0A = wcf0a + $CFA0 = wcfa0 + $CC2C = wcc2c + $CC3B = wcc3b + $CD1A = wPlayerMonStatMods + $CD1A = wPlayerMonAttackMod + $CD3A = wcd3a + $CF0B = wcf0b + $CFF1 = wEnemyMonDVs + $CC2D = wcc2d + $CC3C = wcc3c + $CC4B = wcc4b + $CCF0 = wccf0 + $CD3B = wcd3b + $CD4A = wcd4a + $CF0C = wcf0c + $CF1B = wcf1b + $CFC0 = wcfc0 + $CFCF = W_ENEMYMOVETYPE + $CC3D = wcc3d + $CC5B = wcc5b + $CCD2 = wRLEByteCount + $CCD3 = wccd3 + $CCF1 = wccf1 + $CD0F = wcd0f + $CD4B = wcd4b + $CD5A = wcd5a + $CF0D = wcf0d + $CF1C = wcf1c + $CFD7 = W_PLAYERMOVEMAXPP + $CC3E = wcc3e + $CC4D = wcc4d + $CC5C = wcc5c + $CC6B = wcc6b + $CCD4 = wccd4 + $CCE3 = wcce3 + $CCF2 = wccf2 + $CD4C = wcd4c + $CD5B = wcd5b + $CD6A = wcd6a + $CEF0 = wcef0 + $CF0E = wcf0e + $CF1A = wGBC + $CF1D = wcf1d + $CFA4 = wcfa4 + $CFC2 = wcfc2 + $CFCE = W_ENEMYMOVEPOWER + $CFEA = wEnemyMonType + $CC5D = wcc5d + $CCD5 = wccd5 + $CCE4 = wcce4 + $CCF3 = wccf3 + $CD4D = wcd4d + $CD5C = wcd5c + $CEF1 = wcef1 + $CF0F = wcf0f + $CF1E = wcf1e + $CF2D = wcf2d + $CF4B = wcf4b + $CC5E = wcc5e + $CCE5 = wcce5 + $CCF4 = wccf4 + $CD30 = wEnemyMonSpeedMod + $CD3F = wcd3f + $CD4E = wcd4e + $CD5D = wcd5d + $CD6C = wcd6c + $CF1F = wcf1f + $CF2E = wcf2e + $CF4C = wcf4c + $CF92 = wWhichPokemon + $CFA6 = wcfa6 + $CFC4 = wcfc4 + $CC29 = wMenuWatchedKeys + $CCF5 = wccf5 + $CD4F = wcd4f + $CD5E = wcd5e + $CD6D = wcd6d + $CF4D = wcf4d + $CCDB = wMoveMenuType + $CCE7 = wcce7 + $CCF6 = wccf6 + $CD5F = wcd5f + $CFA8 = wcfa8 + $CFC6 = wcfc6 + $CFD5 = W_PLAYERMOVETYPE + $CFD9 = wBattleMonSpecies2 + $CCD9 = wccd9 + $CCE8 = wcce8 + $CCF7 = wccf7 + $CF12 = wPredefParentBank + $CF8B = wcf8b + $CF9A = wcf9a + $CCE9 = wcce9 + $CF8C = wcf8c + $CF9B = wcf9b + $CFB9 = wcfb9 + $CFC8 = wcfc8 + $CFD4 = W_PLAYERMOVEPOWER + $CFE5 = wEnemyMonSpecies + $CFFA = wEnemyMonSpeed + $CEEB = wHPBarOldHP + $CF8D = wcf8d + $CF9C = wcf9c + $CFC9 = wcfc9 + $CFE9 = wEnemyMonStatus + $CF8E = wcf8e + $CC5B = wHallOfFame + $CCD8 = wEnemySubstituteHP + $CF8F = wcf8f + $CD33 = wEnemyMonEvasionMod + $CF14 = wCurSpriteMovement2 + $CFF3 = wEnemyMonLevel + $CEE9 = wHPBarMaxHP + $CD3D = wTrainerSpriteOffset + $CF5F = wGymCityName + $CCDF = wAICount + $CD3E = wTrainerEngageDistance + $CC28 = wMaxMenuItem + $CC2F = wPlayerMonNumber + $CEED = wHPBarNewHP + $CFE8 = wEnemyMonBoxLevel + $CC55 = wTrainerHeaderFlagBit + $CD10 = wcd10 + $CD11 = wcd11 + $CFE5 = wEnemyMon + $CD12 = wcd12 + $CF10 = wcf10 + $CD13 = wcd13 + $CD1B = wPlayerMonDefenseMod + $CF11 = wcf11 + $CC42 = wcc42 + $CCE2 = wEnemyMoveListIndex + $CD05 = wcd05 + $CD23 = wcd23 + $CD50 = wcd50 + $CF30 = wcf30 + $CFEC = wEnemyMonCatchRate + $C6E8 = wOverworldMap + $CC43 = wcc43 + $CC4E = wPredefID + $CD06 = wcd06 + $CD32 = wEnemyMonAccuracyMod + $CD42 = wcd42 + $CF13 = wcf13 + $CF94 = wListMenuID + $CC26 = wCurrentMenuItem + $CC35 = wcc35 + $CD34 = wcd34 + $CD43 = wcd43 + $CF05 = wcf05 + $CFC7 = wMusicHeaderPointer + $CD26 = wcd26 + $CD44 = wcd44 + $CD71 = wcd71 + $CF06 = wcf06 + $CFE6 = wEnemyMonHP + $CC37 = wcc37 + $CCDC = wPlayerSelectedMove + $CD2D = wEngagedTrainerClass + $CD45 = wcd45 + $CD72 = wcd72 + $CF25 = wcf25 + $CC38 = wcc38 + $CC47 = wcc47 + $CD37 = wcd37 + $CD46 = wcd46 + $CF08 = wcf08 + $CF17 = wcf17 + $CFF4 = wEnemyMonMaxHP + $CC48 = wcc48 + $CC57 = wcc57 + $CD1D = wPlayerMonSpecialMod + $CD29 = wcd29 + $CD38 = wcd38 + $CD47 = wcd47 + $CF09 = wcf09 + $CF18 = wcf18 + $CF90 = wcf90 + $CC49 = wcc49 + $CC58 = wcc58 + $CD39 = wcd39 + $CD48 = wcd48 + $CF37 = wcf37 + $CF91 = wcf91 + $CC27 = wTileBehindCursor + $CD49 = wcd49 + $CFED = wEnemyMonMoves + $CC4F = wPredefRegisters + $CD2E = wEnemyMonStatMods + $CD2E = wEnemyMonAttackMod + $CD59 = wcd59 + $CD77 = wcd77 + $CF93 = wcf93 + $CFCD = W_ENEMYMOVEEFFECT + $CC79 = wcc79 + $CC97 = wcc97 + $CD78 = wcd78 + $CD81 = wTileMapBackup2 + $CEE9 = wBuffer + $CF95 = wcf95 + $CFFE = wEnemyMonPP + $C300 = wOAMBuffer + $CF96 = wcf96 + $CF97 = wcf97 + $CFF6 = wEnemyMonAttack + $CF98 = wcf98 + $CF99 = wcf99 + $CFD3 = W_PLAYERMOVEEFFECT + $CD1C = wPlayerMonSpeedMod + SLACK: $0000 bytes + + EMPTY + + SECTION: $D000-$DEE1 ($0EE2 bytes) + $D002 = wd002 + $D163 = wPartyCount + $D202 = wPartyMon4AttackExp + $D369 = W_CURMAPWIDTH + $D603 = W_ROUTE25CURSCRIPT + $D626 = W_ROUTE16CURSCRIPT + $D666 = W_SEAFOAMISLANDS4CURSCRIPT + $D70F = W_FOSSILITEM + $D9A6 = wEnemyMon6Defense + $DA45 = W_PLAYTIMEFRAMES + $D092 = W_PBSTOREDROMBANK + $D0AA = W_SPRITEFLIPPED + $D120 = wd120 + $D170 = wPartyMon1Type1 + $D22E = wPartyMon5AttackExp + $D61C = W_ROUTE17CURSCRIPT + $D668 = W_SEAFOAMISLANDS5CURSCRIPT + $DA7C = wDayCareMonPP + $DD2A = wBoxMonOT + $D01B = wBattleMonCatchRate + $D0B7 = wPredefBank + $D0B9 = W_MONHBASESTATS + $D121 = wd121 + $D130 = wd130 + $D171 = wPartyMon1Type2 + $D19C = wPartyMon2Type1 + $D25A = wPartyMon6AttackExp + $D627 = W_ROUTE18CURSCRIPT + $D8CE = wEnemyMon1Special + $DA70 = wDayCareMonHPExp + $D0A7 = W_SPRITEOUTPUTBITOFFSET + $D122 = wd122 + $D131 = wd131 + $D19D = wPartyMon2Type2 + $D1C8 = wPartyMon3Type1 + $D61D = W_ROUTE19CURSCRIPT + $D70D = wSafariSteps + $D8FA = wEnemyMon2Special + $DA80 = W_NUMINBOX + $D033 = wd033 + $D060 = wd060 + $D074 = W_NUMHITS + $D0B8 = W_MONHDEXNUM + $D132 = wd132 + $D141 = wd141 + $D1C9 = wPartyMon3Type2 + $D1F4 = wPartyMon4Type1 + $D639 = W_CINNABARISLANDCURSCRIPT + $D665 = W_SSANNE2CURSCRIPT + $D710 = W_FOSSILMON + $D8B9 = wEnemyMon1DefenseExp + $D8BF = wEnemyMon1DVs + $D926 = wEnemyMon3Special + $D007 = wd007 + $D015 = wBattleMonHP + $D034 = wd034 + $D061 = wd061 + $D070 = wd070 + $D124 = wd124 + $D133 = wd133 + $D1F5 = wPartyMon4Type2 + $D220 = wPartyMon5Type1 + $D359 = wPlayerID + $D643 = W_SILPHCO2CURSCRIPT + $D700 = wd700 + $D8E5 = wEnemyMon2DefenseExp + $D8EB = wEnemyMon2DVs + $D952 = wEnemyMon4Special + $D008 = wd008 + $D0C7 = W_MONHMOVES + $D125 = wd125 + $D143 = wd143 + $D152 = wd152 + $D221 = wPartyMon5Type2 + $D24C = wPartyMon6Type1 + $D365 = wLastMap + $D644 = W_SILPHCO3CURSCRIPT + $D911 = wEnemyMon3DefenseExp + $D917 = wEnemyMon3DVs + $D97E = wEnemyMon5Special + $D023 = wBattleMonMaxHP + $D036 = wd036 + $D126 = wd126 + $D153 = wd153 + $D24D = wPartyMon6Type2 + $D360 = wd360 + $D5A4 = wPlayerCoins + $D5F0 = W_OAKSLABCURSCRIPT + $D617 = W_SSANNE5CURSCRIPT + $D63A = W_MANSION1CURSCRIPT + $D645 = W_SILPHCO4CURSCRIPT + $D888 = W_GRASSMONS + $D8A9 = wEnemyMon1Type + $D93D = wEnemyMon4DefenseExp + $D943 = wEnemyMon4DVs + $D9AA = wEnemyMon6Special + $D046 = wd046 + $D145 = wd145 + $D355 = W_OPTIONS + $D367 = W_CURMAPTILESET + $D3A8 = W_SPRITESETID + $D63C = W_MANSION2CURSCRIPT + $D646 = W_SILPHCO5CURSCRIPT + $D730 = wd730 + $D8D5 = wEnemyMon2Type + $D969 = wEnemyMon5DefenseExp + $D96F = wEnemyMon5DVs + $DA44 = W_PLAYTIMESECONDS + $D047 = wd047 + $D065 = wd065 + $D067 = W_ENEMYBATTSTATUS1 + $D083 = wd083 + $D0A9 = W_SPRITEUNPACKMODE + $D0AD = W_SPRITEOUTPUTPTR + $D0C2 = W_MONHSPRITEDIM + $D119 = wd119 + $D128 = wd128 + $D380 = wd380 + $D524 = wd524 + $D63D = W_MANSION3CURSCRIPT + $D647 = W_SILPHCO6CURSCRIPT + $D65F = W_CELADONGAMECORNERCURSCRIPT + $D740 = wd740 + $D803 = wd803 + $D830 = wd830 + $D901 = wEnemyMon3Type + $D995 = wEnemyMon6DefenseExp + $D99B = wEnemyMon6DVs + $D01C = wBattleMonMoves + $D048 = wd048 + $D066 = wd066 + $D068 = W_ENEMYBATTSTATUS2 + $D075 = wd075 + $D129 = wd129 + $D156 = wd156 + $D372 = wd372 + $D381 = wd381 + $D390 = wd390 + $D525 = wd525 + $D608 = W_SSANNE8CURSCRIPT + $D63E = W_MANSION4CURSCRIPT + $D648 = W_SILPHCO7CURSCRIPT + $D714 = wd714 + $D732 = wd732 + $D813 = wd813 + $D831 = wd831 + $D92D = wEnemyMon4Type + $DAAB = wBoxMon1DefenseExp + $DAB1 = wBoxMon1DVs + $D069 = W_ENEMYBATTSTATUS3 + $D085 = wd085 + $D139 = wd139 + $D148 = wd148 + $D157 = wd157 + $D373 = wd373 + $D382 = wd382 + $D391 = wd391 + $D526 = wd526 + $D609 = W_SSANNE9CURSCRIPT + $D649 = W_SILPHCO8CURSCRIPT + $D751 = wd751 + $D805 = wd805 + $D832 = wd832 + $D8BD = wEnemyMon1SpecialExp + $D959 = wEnemyMon5Type + $D087 = W_SUBANIMCOUNTER + $D374 = wd374 + $D383 = wd383 + $D504 = W_MAPSPRITEEXTRADATA + $D527 = wd527 + $D64A = W_SILPHCO9CURSCRIPT + $D734 = wd734 + $D743 = wd743 + $D752 = wd752 + $D815 = wd815 + $D833 = wd833 + $D8E9 = wEnemyMon2SpecialExp + $D985 = wEnemyMon6Type + $DA39 = W_CURMAPSCRIPT + $DA72 = wDayCareMonAttackExp + $D02D = wBattleMonPP + $D078 = wd078 + $D0D7 = W_DAMAGE + $D191 = wPartyMon1Defense + $D273 = wPartyMonOT + $D366 = wd366 + $D375 = wd375 + $D384 = wd384 + $D393 = wd393 + $D39D = W_SPRITESET + $D528 = wd528 + $D744 = wd744 + $D771 = wd771 + $D807 = wd807 + $D816 = wd816 + $D825 = wd825 + $D834 = wd834 + $D8A4 = wEnemyMon1Species + $D8CC = wEnemyMon1Speed + $D915 = wEnemyMon3SpecialExp + $DA9B = wBoxMon1Type + $D079 = wd079 + $D088 = wd088 + $D08E = W_PBSTOREDREGISTERD + $D127 = W_CURENEMYLVL + $D1BD = wPartyMon2Defense + $D358 = wd358 + $D376 = wd376 + $D385 = wd385 + $D394 = wd394 + $D529 = wd529 + $D70B = W_TOWNVISITEDFLAG + $D718 = wd718 + $D736 = wd736 + $D754 = wd754 + $D790 = wd790 + $D817 = wd817 + $D826 = wd826 + $D835 = wd835 + $D880 = wd880 + $D8A8 = wEnemyMon1Status + $D8D0 = wEnemyMon2Species + $D8F8 = wEnemyMon2Speed + $D941 = wEnemyMon4SpecialExp + $D025 = wBattleMonAttack + $D062 = W_PLAYERBATTSTATUS1 + $D08F = W_PBSTOREDREGISTERE + $D0A3 = W_SPRITEWITDH + $D1E9 = wPartyMon3Defense + $D377 = wd377 + $D386 = wd386 + $D395 = wd395 + $D728 = wd728 + $D737 = wd737 + $D755 = wd755 + $D764 = wd764 + $D773 = wd773 + $D809 = wd809 + $D827 = wd827 + $D836 = wd836 + $D863 = wd863 + $D881 = wd881 + $D8D4 = wEnemyMon2Status + $D8FC = wEnemyMon3Species + $D924 = wEnemyMon3Speed + $D96D = wEnemyMon5SpecialExp + $D063 = W_PLAYERBATTSTATUS2 + $D215 = wPartyMon4Defense + $D378 = wd378 + $D396 = wd396 + $D747 = wd747 + $D765 = wd765 + $D783 = wd783 + $D792 = wd792 + $D819 = wd819 + $D828 = wd828 + $D837 = wd837 + $D864 = wd864 + $D882 = wd882 + $D900 = wEnemyMon3Status + $D928 = wEnemyMon4Species + $D950 = wEnemyMon4Speed + $D999 = wEnemyMon6SpecialExp + $DA64 = wDayCareMonType1 + $D064 = W_PLAYERBATTSTATUS3 + $D0B6 = W_LISTTYPE + $D0BE = W_MONHTYPES + $D241 = wPartyMon5Defense + $D379 = wd379 + $D388 = wd388 + $D397 = wd397 + $D65E = W_CINNABARGYMCURSCRIPT + $D766 = wd766 + $D829 = wd829 + $D838 = wd838 + $D847 = wd847 + $D865 = wd865 + $D92C = wEnemyMon4Status + $D954 = wEnemyMon5Species + $D97C = wEnemyMon5Speed + $DA65 = wDayCareMonType2 + $DAAF = wBoxMon1SpecialExp + $D08C = W_PBSTOREDREGISTERH + $D26D = wPartyMon6Defense + $D356 = W_OBTAINEDBADGES + $D389 = wd389 + $D398 = wd398 + $D5FF = W_CELADONGYMCURSCRIPT + $D715 = W_RIVALSTARTER + $D767 = wd767 + $D857 = wd857 + $D866 = wd866 + $D958 = wEnemyMon5Status + $D980 = wEnemyMon6Species + $D9A8 = wEnemyMon6Speed + $D347 = wPlayerMoney + $D399 = wd399 + $D60C = W_REDSHOUSE2CURSCRIPT + $D768 = wd768 + $D777 = wd777 + $D849 = wd849 + $D867 = wd867 + $D984 = wEnemyMon6Status + $DA96 = wBoxMon1Species + $D195 = wPartyMon1Special + $D619 = W_MUSEUM1FCURSCRIPT + $D662 = W_ROUTE5GATECURSCRIPT + $D769 = wd769 + $D778 = wd778 + $D796 = wd796 + $D8A4 = wEnemyMons + $D8C5 = wEnemyMon1Level + $DA9A = wBoxMon1Status + $D059 = W_CUROPPONENT + $D1C1 = wPartyMon2Special + $D30A = wPokedexOwnedEnd + $D5F8 = W_ROUTE3CURSCRIPT + $D606 = W_MTMOON1CURSCRIPT + $D636 = W_ROUTE6GATECURSCRIPT + $D869 = wd869 + $D8F1 = wEnemyMon2Level + $D08B = W_SUBANIMTRANSFORM + $D08D = W_PBSTOREDREGISTERL + $D096 = W_SUBANIMSUBENTRYADDR + $D0CB = W_MONHGROWTHRATE + $D180 = wPartyMon1DefenseExp + $D186 = wPartyMon1DVs + $D1ED = wPartyMon3Special + $D5F9 = W_ROUTE4CURSCRIPT + $D631 = W_ROCKETHIDEOUT1CURSCRIPT + $D64D = W_LORELEICURSCRIPT + $D663 = W_ROUTE7GATECURSCRIPT + $D798 = wd798 + $D8BB = wEnemyMon1SpeedExp + $D91D = wEnemyMon3Level + $D009 = wBattleMonNick + $D1AC = wPartyMon2DefenseExp + $D1B2 = wPartyMon2DVs + $D219 = wPartyMon4Special + $D31E = wBagItems + $D607 = W_MTMOON3CURSCRIPT + $D632 = W_ROCKETHIDEOUT2CURSCRIPT + $D637 = W_ROUTE8GATECURSCRIPT + $D64B = W_HALLOFFAMEROOMCURSCRIPT + $D8E7 = wEnemyMon2SpeedExp + $D949 = wEnemyMon4Level + $D1D8 = wPartyMon3DefenseExp + $D1DE = wPartyMon3DVs + $D245 = wPartyMon5Special + $D36E = W_MAPSCRIPTPTR + $D600 = W_ROUTE6CURSCRIPT + $D633 = W_ROCKETHIDEOUT3CURSCRIPT + $D64C = W_GARYCURSCRIPT + $D717 = W_PLAYERSTARTER + $D719 = wLastBlackoutMap + $D913 = wEnemyMon3SpeedExp + $D975 = wEnemyMon5Level + $DA48 = W_DAYCARE_IN_USE + $D170 = wPartyMon1Type + $D204 = wPartyMon4DefenseExp + $D20A = wPartyMon4DVs + $D271 = wPartyMon6Special + $D52C = W_TILESETBLOCKSPTR + $D634 = W_ROCKETHIDEOUT4CURSCRIPT + $D642 = W_FIGHTINGDOJOCURSCRIPT + $D8A7 = wEnemyMon1BoxLevel + $D93F = wEnemyMon4SpeedExp + $D9A1 = wEnemyMon6Level + $D19C = wPartyMon2Type + $D230 = wPartyMon5DefenseExp + $D236 = wPartyMon5DVs + $D36C = W_MAPTEXTPTR + $D3AA = wd3aa + $D601 = W_ROUTE8CURSCRIPT + $D8D3 = wEnemyMon2BoxLevel + $D96B = wEnemyMon5SpeedExp + $DA96 = wBoxMons + $D09E = W_FBMODE + $D0DB = wd0db + $D1C8 = wPartyMon3Type + $D25C = wPartyMon6DefenseExp + $D262 = wPartyMon6DVs + $D4E1 = W_NUMSPRITES + $D52E = W_TILESETGFXPTR + $D604 = W_ROUTE9CURSCRIPT + $D8A4 = wEnemyMon1 + $D8FF = wEnemyMon3BoxLevel + $D997 = wEnemyMon6SpeedExp + $D019 = wBattleMonType1 + $D0DC = wd0dc + $D1F4 = wPartyMon4Type + $D621 = W_ROCKTUNNEL1CURSCRIPT + $D8D0 = wEnemyMon2 + $D92B = wEnemyMon4BoxLevel + $DA40 = W_PLAYTIMEHOURS + $DAAD = wBoxMon1SpeedExp + $D01A = wBattleMonType2 + $D09C = W_FBDESTADDR + $D184 = wPartyMon1SpecialExp + $D220 = wPartyMon5Type + $D3AD = wd3ad + $D620 = W_ROCKTUNNEL2CURSCRIPT + $D8FC = wEnemyMon3 + $D957 = wEnemyMon5BoxLevel + $D158 = wPlayerName + $D1B0 = wPartyMon2SpecialExp + $D24C = wPartyMon6Type + $D3AE = wd3ae + $D8AB = wEnemyMon1CatchRate + $D928 = wEnemyMon4 + $D983 = wEnemyMon6BoxLevel + $DA42 = W_PLAYTIMEMINUTES + $D058 = wPartyAliveFlags + $D16B = wPartyMon1Species + $D193 = wPartyMon1Speed + $D1DC = wPartyMon3SpecialExp + $D3AF = wd3af + $D65B = W_FUCHSIAGYMCURSCRIPT + $D8D7 = wEnemyMon2CatchRate + $D954 = wEnemyMon5 + $DA99 = wBoxMon1BoxLevel + $D16F = wPartyMon1Status + $D197 = wPartyMon2Species + $D1BF = wPartyMon2Speed + $D208 = wPartyMon4SpecialExp + $D903 = wEnemyMon3CatchRate + $D980 = wEnemyMon6 + $D19B = wPartyMon2Status + $D1C3 = wPartyMon3Species + $D1EB = wPartyMon3Speed + $D234 = wPartyMon5SpecialExp + $D5CD = wd5cd + $D8A5 = wEnemyMon1HP + $D92F = wEnemyMon4CatchRate + $DA96 = wBoxMon1 + $D1C7 = wPartyMon3Status + $D1EF = wPartyMon4Species + $D217 = wPartyMon4Speed + $D260 = wPartyMon6SpecialExp + $D2F7 = wPokedexOwned + $D5FD = W_CERULEANGYMCURSCRIPT + $D64E = W_BRUNOCURSCRIPT + $D7BD = wd7bd + $D7DB = wd7db + $D8D1 = wEnemyMon2HP + $D95B = wEnemyMon5CatchRate + $DAB7 = wBoxMon2 + $D1F3 = wPartyMon4Status + $D21B = wPartyMon5Species + $D243 = wPartyMon5Speed + $D31D = wNumBagItems + $D7AF = wd7af + $D7CD = wd7cd + $D7EB = wd7eb + $D8C6 = wEnemyMon1MaxHP + $D8FD = wEnemyMon3HP + $D987 = wEnemyMon6CatchRate + $D0BB = W_MONHBASEDEFENSE + $D21F = wPartyMon5Status + $D247 = wPartyMon6Species + $D26F = wPartyMon6Speed + $D651 = W_VICTORYROAD1CURSCRIPT + $D7BF = wd7bf + $D7DD = wd7dd + $D8B2 = wEnemyMon1Exp + $D8F2 = wEnemyMon2MaxHP + $D929 = wEnemyMon4HP + $DA9D = wBoxMon1CatchRate + $D24B = wPartyMon6Status + $D60D = W_VIRIDIANMARKETCURSCRIPT + $D60F = W_CERULEANCITYCURSCRIPT + $D63F = W_VICTORYROAD2CURSCRIPT + $D7CF = wd7cf + $D7ED = wd7ed + $D89D = wEnemyPartyMons + $D8DE = wEnemyMon2Exp + $D91E = wEnemyMon3MaxHP + $D955 = wEnemyMon5HP + $DA74 = wDayCareMonDefenseExp + $DA7A = wDayCareMonDVs + $DA81 = wBoxSpecies + $DEE2 = wBoxMonNicksEnd + $D0B8 = W_MONHEADER + $D0C3 = W_MONHFRONTSPRITE + $D16B = wPartyMons + $D18C = wPartyMon1Level + $D640 = W_VICTORYROAD3CURSCRIPT + $D6FE = wd6fe + $D7DF = wd7df + $D7EE = wd7ee + $D8AC = wEnemyMon1Moves + $D90A = wEnemyMon3Exp + $D94A = wEnemyMon4MaxHP + $D981 = wEnemyMon6HP + $D071 = W_ENEMYTOXICCOUNTER + $D1B8 = wPartyMon2Level + $D7EF = wd7ef + $D8B0 = wEnemyMon1OTID + $D8D8 = wEnemyMon2Moves + $D936 = wEnemyMon4Exp + $D976 = wEnemyMon5MaxHP + $DA97 = wBoxMon1HP + $D027 = wBattleMonDefense + $D182 = wPartyMon1SpeedExp + $D1E4 = wPartyMon3Level + $D7FF = wd7ff + $D8DC = wEnemyMon2OTID + $D904 = wEnemyMon3Moves + $D962 = wEnemyMon5Exp + $D9A2 = wEnemyMon6MaxHP + $DA64 = wDayCareMonType + $D13D = W_PRIZE1 + $D1AE = wPartyMon2SpeedExp + $D210 = wPartyMon4Level + $D5FB = W_VIRIDIANGYMCURSCRIPT + $D61F = W_SAFARIZONEENTRANCECURSCRIPT + $D661 = W_BILLSHOUSECURSCRIPT + $D713 = W_ENEMYMONORTRAINERCLASS + $D8C1 = wEnemyMon1PP + $D908 = wEnemyMon3OTID + $D930 = wEnemyMon4Moves + $D98E = wEnemyMon6Exp + $D0D7 = W_MONHPADDING + $D13E = W_PRIZE2 + $D1DA = wPartyMon3SpeedExp + $D23C = wPartyMon5Level + $D8B5 = wEnemyMon1HPExp + $D8ED = wEnemyMon2PP + $D934 = wEnemyMon4OTID + $D95C = wEnemyMon5Moves + $DA49 = W_DAYCAREMONNAME + $DAA4 = wBoxMon1Exp + $D0BA = W_MONHBASEATTACK + $D0BD = W_MONHBASESPECIAL + $D13F = W_PRIZE3 + $D16E = wPartyMon1BoxLevel + $D206 = wPartyMon4SpeedExp + $D268 = wPartyMon6Level + $D65C = W_SAFFRONGYMCURSCRIPT + $D8C6 = wEnemyMon1Stats + $D8C8 = wEnemyMon1Attack + $D8E1 = wEnemyMon2HPExp + $D919 = wEnemyMon3PP + $D960 = wEnemyMon5OTID + $D988 = wEnemyMon6Moves + $D19A = wPartyMon2BoxLevel + $D232 = wPartyMon5SpeedExp + $D530 = W_TILESETCOLLISIONPTR + $D5F4 = W_VIRIDIANCITYCURSCRIPT + $D8F2 = wEnemyMon2Stats + $D8F4 = wEnemyMon2Attack + $D90D = wEnemyMon3HPExp + $D945 = wEnemyMon4PP + $D98C = wEnemyMon6OTID + $D9EE = wEnemyMonNicks + $DA78 = wDayCareMonSpecialExp + $DA9E = wBoxMon1Moves + $D06C = W_PLAYERTOXICCOUNTER + $D0BC = W_MONHBASESPEED + $D16B = wPartyMon1 + $D1C6 = wPartyMon3BoxLevel + $D25E = wPartyMon6SpeedExp + $D532 = W_TILESETTALKINGOVERTILES + $D5A6 = W_MISSABLEOBJECTFLAGS + $D91E = wEnemyMon3Stats + $D920 = wEnemyMon3Attack + $D939 = wEnemyMon4HPExp + $D971 = wEnemyMon5PP + $DAA2 = wBoxMon1OTID + $D07C = W_ANIMATIONID + $D197 = wPartyMon2 + $D1F2 = wPartyMon4BoxLevel + $D5F3 = W_BLUESHOUSECURSCRIPT + $D94A = wEnemyMon4Stats + $D94C = wEnemyMon4Attack + $D965 = wEnemyMon5HPExp + $D99D = wEnemyMon6PP + $DA5F = wDayCareMonSpecies + $D02B = wBattleMonSpecial + $D0A0 = wd0a0 + $D0B9 = W_MONHBASEHP + $D1C3 = wPartyMon3 + $D21E = wPartyMon5BoxLevel + $D976 = wEnemyMon5Stats + $D978 = wEnemyMon5Attack + $D991 = wEnemyMon6HPExp + $DA63 = wDayCareMonStatus + $DAB3 = wBoxMon1PP + $D0B1 = W_SPRITEDECODETABLE0PTR + $D0C0 = W_MONHCATCHRATE + $D172 = wPartyMon1CatchRate + $D1EF = wPartyMon4 + $D24A = wPartyMon6BoxLevel + $D62B = W_POKEMONTOWER2CURSCRIPT + $D9A2 = wEnemyMon6Stats + $D9A4 = wEnemyMon6Attack + $DAA7 = wBoxMon1HPExp + $D020 = wBattleMonDVs + $D0A1 = W_SPRITECURPOSX + $D0B3 = W_SPRITEDECODETABLE1PTR + $D11A = wd11a + $D164 = wPartySpecies + $D19E = wPartyMon2CatchRate + $D21B = wPartyMon5 + $D62C = W_POKEMONTOWER3CURSCRIPT + $D0A2 = W_SPRITECURPOSY + $D11B = wd11b + $D12A = wd12a + $D16A = wPartyEnd + $D1CA = wPartyMon3CatchRate + $D247 = wPartyMon6 + $D34A = W_RIVALNAME + $D62D = W_POKEMONTOWER4CURSCRIPT + $DE06 = wBoxMonNicks + $D0E0 = wd0e0 + $D11C = wd11c + $D13A = wd13a + $D16C = wPartyMon1HP + $D1F6 = wPartyMon4CatchRate + $D629 = W_SSANNE10CURSCRIPT + $D62E = W_POKEMONTOWER5CURSCRIPT + $D019 = wBattleMonType + $D081 = W_BASECOORDX + $D086 = W_SUBANIMFRAMEDELAY + $D0AF = W_SPRITEOUTPUTPTRCACHED + $D0E1 = wd0e1 + $D11D = wd11d + $D12C = wd12c + $D13B = wd13b + $D198 = wPartyMon2HP + $D222 = wPartyMon5CatchRate + $D371 = W_MAPCONN1PTR + $D4B0 = wd4b0 + $D5A0 = wd5a0 + $D618 = W_VIRIDIANFORESTCURSCRIPT + $D62F = W_POKEMONTOWER6CURSCRIPT + $D658 = W_SILPHCO10CURSCRIPT + $D8B7 = wEnemyMon1AttackExp + $D05B = wd05b + $D06A = wd06a + $D082 = W_BASECOORDY + $D0B5 = wd0b5 + $D11E = wd11e + $D12D = wd12d + $D13C = wd13c + $D18D = wPartyMon1MaxHP + $D1C4 = wPartyMon3HP + $D24E = wPartyMon6CatchRate + $D31D = wPokedexSeenEnd + $D37C = W_MAPCONN2PTR + $D4B1 = wd4b1 + $D630 = W_POKEMONTOWER7CURSCRIPT + $D650 = W_UNKNOWNDUNGEON3CURSCRIPT + $D659 = W_SILPHCO11CURSCRIPT + $D8E3 = wEnemyMon2AttackExp + $D06B = wd06b + $D07A = wd07a + $D0D4 = wd0d4 + $D11F = wd11f + $D12E = wd12e + $D179 = wPartyMon1Exp + $D1B9 = wPartyMon2MaxHP + $D1F0 = wPartyMon4HP + $D35E = W_CURMAP + $D387 = W_MAPCONN3PTR + $D52A = wd52a + $D53B = wBoxItems + $D5A2 = wd5a2 + $D90F = wEnemyMon3AttackExp + $D04A = W_TRAINERNAME + $D07B = wd07b + $D08A = wd08a + $D12F = wd12f + $D1A5 = wPartyMon2Exp + $D1E5 = wPartyMon3MaxHP + $D21C = wPartyMon5HP + $D392 = W_MAPCONN4PTR + $D4D1 = wd4d1 + $D52B = W_TILESETBANK + $D5A3 = wd5a3 + $D71A = wd71a + $D7A1 = wd7a1 + $D93B = wEnemyMon4AttackExp + $DA76 = wDayCareMonSpeedExp + $D05C = W_GYMLEADERNO + $D05E = wd05e + $D072 = W_ENEMYDISABLEDMOVE + $D09A = wd09a + $D0BE = W_MONHTYPE1 + $D173 = wPartyMon1Moves + $D1D1 = wPartyMon3Exp + $D211 = wPartyMon4MaxHP + $D248 = wPartyMon6HP + $D35B = wd35b + $D36A = W_MAPDATAPTR + $D71B = wd71b + $D72A = wd72a + $D7B1 = wd7b1 + $D8A9 = wEnemyMon1Type1 + $D967 = wEnemyMon5AttackExp + $D057 = W_ISINBATTLE + $D07D = wd07d + $D09B = wd09b + $D0BF = W_MONHTYPE2 + $D177 = wPartyMon1OTID + $D19F = wPartyMon2Moves + $D1FD = wPartyMon4Exp + $D23D = wPartyMon5MaxHP + $D35C = wd35c + $D368 = W_CURMAPHEIGHT + $D37A = wd37a + $D4E2 = wd4e2 + $D5F1 = W_PALLETTOWNCURSCRIPT + $D71C = wd71c + $D7A3 = wd7a3 + $D81B = wd81b + $D82A = wd82a + $D8AA = wEnemyMon1Type2 + $D8D5 = wEnemyMon2Type1 + $D993 = wEnemyMon6AttackExp + $DA46 = wda46 + $D014 = wBattleMonSpecies + $D029 = wBattleMonSpeed + $D06F = wd06f + $D07E = wd07e + $D0AB = W_SPRITEINPUTPTR + $D0D8 = wd0d8 + $D1A3 = wPartyMon2OTID + $D1CB = wPartyMon3Moves + $D229 = wPartyMon5Exp + $D269 = wPartyMon6MaxHP + $D35D = wd35d + $D37B = wd37b + $D38A = wd38a + $D42F = wd42f + $D4E3 = wd4e3 + $D6F0 = wd6f0 + $D71D = wd71d + $D72C = wd72c + $D73B = wd73b + $D74A = wd74a + $D7B3 = wd7b3 + $D7C2 = wd7c2 + $D7D1 = wd7d1 + $D7E0 = wd7e0 + $D82B = wd82b + $D8D6 = wEnemyMon2Type2 + $D901 = wEnemyMon3Type1 + $DA38 = wda38 + $DA47 = W_NUMSAFARIBALLS + $DA62 = wDayCareMonBoxLevel + $DAA9 = wBoxMon1AttackExp + $D018 = wBattleMonStatus + $D05C = W_LONEATTACKNO + $D188 = wPartyMon1PP + $D1CF = wPartyMon3OTID + $D1F7 = wPartyMon4Moves + $D255 = wPartyMon6Exp + $D364 = W_XBLOCKCOORD + $D38B = wd38b + $D39A = wd39a + $D3A9 = wd3a9 + $D663 = W_POWERPLANTCURSCRIPT + $D71E = wd71e + $D72D = wd72d + $D73C = wd73c + $D74B = wd74b + $D75A = wd75a + $D7B4 = wd7b4 + $D7C3 = wd7c3 + $D7D2 = wd7d2 + $D7E1 = wd7e1 + $D7F0 = wd7f0 + $D82C = wd82c + $D902 = wEnemyMon3Type2 + $D92D = wEnemyMon4Type1 + $D17C = wPartyMon1HPExp + $D1B4 = wPartyMon2PP + $D1FB = wPartyMon4OTID + $D223 = wPartyMon5Moves + $D35F = wd35f + $D363 = W_YBLOCKCOORD + $D37D = wd37d + $D38C = wd38c + $D39B = wd39b + $D5FC = W_PEWTERGYMCURSCRIPT + $D71F = wd71f + $D72E = wd72e + $D74C = wd74c + $D75B = wd75b + $D7D3 = wd7d3 + $D7F1 = wd7f1 + $D82D = wd82d + $D84B = wd84b + $D92E = wEnemyMon4Type2 + $D959 = wEnemyMon5Type1 + $DA5F = wDayCareMon + $D09F = wd09f + $D18D = wPartyMon1Stats + $D18F = wPartyMon1Attack + $D1A8 = wPartyMon2HPExp + $D1E0 = wPartyMon3PP + $D227 = wPartyMon5OTID + $D24F = wPartyMon6Moves + $D362 = W_XCOORD + $D37E = wd37e + $D38D = wd38d + $D39C = wd39c + $D7C5 = wd7c5 + $D7E3 = wd7e3 + $D7F2 = wd7f2 + $D82E = wd82e + $D95A = wEnemyMon5Type2 + $D985 = wEnemyMon6Type1 + $D06D = W_PLAYERDISABLEDMOVE + $D0A5 = W_SPRITEINPUTCURBYTE + $D12B = W_ISLINKBATTLE + $D1B9 = wPartyMon2Stats + $D1BB = wPartyMon2Attack + $D1D4 = wPartyMon3HPExp + $D20C = wPartyMon4PP + $D253 = wPartyMon6OTID + $D2B5 = wPartyMonNicks + $D361 = W_YCOORD + $D37F = wd37f + $D38E = wd38e + $D4E4 = W_MAPSPRITEDATA + $D73F = wd73f + $D74E = wd74e + $D76C = wd76c + $D7C6 = wd7c6 + $D7D5 = wd7d5 + $D7F3 = wd7f3 + $D82F = wd82f + $D986 = wEnemyMon6Type2 + $DA54 = W_DAYCAREMONOT + $DA9B = wBoxMon1Type1 + $D0C1 = W_MONHBASEXP + $D1E5 = wPartyMon3Stats + $D1E7 = wPartyMon3Attack + $D200 = wPartyMon4HPExp + $D238 = wPartyMon5PP + $D38F = wd38f + $D5F7 = W_PEWTERCITYCURSCRIPT + $D5FE = W_VERMILIONGYMCURSCRIPT + $D75E = wd75e + $D77C = wd77c + $D79A = wd79a + $D7D6 = wd7d6 + $D7E5 = wd7e5 + $D887 = W_GRASSRATE + $DA66 = wDayCareMonCatchRate + $DA9C = wBoxMon1Type2 + $D0C5 = W_MONHBACKSPRITE + $D211 = wPartyMon4Stats + $D213 = wPartyMon4Attack + $D22C = wPartyMon5HPExp + $D264 = wPartyMon6PP + $D733 = W_FLAGS_D733 + $D75F = wd75f + $D77D = wd77d + $D79B = wd79b + $D7B9 = wd7b9 + $D7D7 = wd7d7 + $D7F5 = wd7f5 + $D022 = wBattleMonLevel + $D0A8 = W_SPRITELOADFLAGS + $D23D = wPartyMon5Stats + $D23F = wPartyMon5Attack + $D258 = wPartyMon6HPExp + $D535 = W_GRASSTILE + $D77E = wd77e + $D79C = wd79c + $D7C9 = wd7c9 + $D7D8 = wd7d8 + $D7E7 = wd7e7 + $D7F6 = wd7f6 + $D85F = wd85f + $D87D = wd87d + $D269 = wPartyMon6Stats + $D26B = wPartyMon6Attack + $D30A = wPokedexSeen + $D53A = wNumBoxItems + $D62A = W_VERMILIONCITYCURSCRIPT + $D64F = W_AGATHACURSCRIPT + $D78E = wd78e + $D7D9 = wd7d9 + $D7E8 = wd7e8 + $DA60 = wDayCareMonHP + $D031 = W_TRAINERCLASS + $D089 = W_NUMFBTILES + $D605 = W_ROUTE10CURSCRIPT + $D60E = W_ROUTE22GATECURSCRIPT + $D7E9 = wd7e9 + $D87F = wd87f + $D0A6 = W_SPRITEINPUTBITCOUNTER + $D623 = W_ROUTE11CURSCRIPT + $D628 = W_ROUTE20CURSCRIPT + $D8CA = wEnemyMon1Defense + $D9AC = wEnemyMonOT + $D05D = W_TRAINERNO + $D084 = W_FBTILECOUNTER + $D5CE = W_MISSABLEOBJECTLIST + $D61E = W_ROUTE21CURSCRIPT + $D624 = W_ROUTE12CURSCRIPT + $D8F6 = wEnemyMon2Defense + $DA6D = wDayCareMonExp + $D017 = wBattleMonBoxLevel + $D05F = W_MOVEMISSED + $D094 = W_SUBANIMADDRPTR + $D17E = wPartyMon1AttackExp + $D60A = W_ROUTE22CURSCRIPT + $D61A = W_ROUTE13CURSCRIPT + $D660 = W_ROUTE16GATECURSCRIPT + $D922 = wEnemyMon3Defense + $D1AA = wPartyMon2AttackExp + $D370 = W_MAPCONNECTIONS + $D5F0 = W_GAMEPROGRESSFLAGS + $D61B = W_ROUTE14CURSCRIPT + $D667 = W_ROUTE23CURSCRIPT + $D94E = wEnemyMon4Defense + $DA67 = wDayCareMonMoves + $D014 = wBattleMon + $D05A = W_BATTLETYPE + $D0A4 = W_SPRITEHEIGHT + $D0CC = W_MONHLEARNSET + $D1D6 = wPartyMon3AttackExp + $D602 = W_ROUTE24CURSCRIPT + $D625 = W_ROUTE15CURSCRIPT + $D653 = W_LANCECURSCRIPT + $D669 = W_ROUTE18GATECURSCRIPT + $D89C = wEnemyPartyCount + $D97A = wEnemyMon5Defense + $DA30 = W_TRAINERHEADERPTR + $DA6B = wDayCareMonOTID + SECTION: $DFFF-$DEFE ($FFFFFF00 bytes) + $DFFF = wStack + SLACK: $021E bytes + + EMPTY + + EMPTY + + EMPTY + + EMPTY + + EMPTY + +VRAM Bank #0: + EMPTY + +VRAM Bank #1: + EMPTY + +HRAM: + EMPTY + + SECTION: $A000-$B857 ($1858 bytes) + $A598 = sHallOfFame + $A000 = S_SPRITEBUFFER0 + $A188 = S_SPRITEBUFFER1 + $A310 = S_SPRITEBUFFER2 + SLACK: $07A8 bytes + + EMPTY + + EMPTY + + EMPTY + diff --git a/pokered.map b/pokered.map new file mode 100755 index 0000000000..7a61054d5c --- /dev/null +++ b/pokered.map @@ -0,0 +1,15840 @@ +Bank #0 (HOME): + SECTION: $0000-$0000 ($0001 bytes) + SECTION: $0008-$0008 ($0001 bytes) + SECTION: $0010-$0010 ($0001 bytes) + SECTION: $0018-$0018 ($0001 bytes) + SECTION: $0020-$0020 ($0001 bytes) + SECTION: $0028-$0028 ($0001 bytes) + SECTION: $0030-$0030 ($0001 bytes) + SECTION: $0038-$0038 ($0001 bytes) + SECTION: $0040-$0042 ($0003 bytes) + SECTION: $0048-$0048 ($0001 bytes) + SECTION: $0050-$0052 ($0003 bytes) + SECTION: $0058-$005A ($0003 bytes) + SECTION: $0060-$0060 ($0001 bytes) + SECTION: $0061-$00BD ($005D bytes) + $00B5 = CopyData + $0061 = DisableLCD + $007B = EnableLCD + $0082 = ClearSprites + $008D = HideSprites + $009D = FarCopyData + SECTION: $0100-$0103 ($0004 bytes) + SECTION: $0150-$3FBA ($3E6B bytes) + $2031 = VBlank + $2313 = Timer + $2132 = Serial + $0150 = Start + $1F61 = Init + $35E4 = Bankswitch + $1260 = LoadMapData + $1306 = Func_12e7 + $092A = MapEntryAfterBattle + $2436 = UpdateSprites + $20BC = DelayFrame + $20C7 = LoadGBPal + $039E = HandleMidJump + $05B5 = OverworldLoopLessDelay.moveAhead + $0F58 = JoypadOverworld + $0747 = WarpFound2 + $0970 = HandleFlyOrTeleportAway + $0637 = OverworldLoopLessDelay.newBattle + $047D = OverworldLoopLessDelay.displayDialogue + $04EB = OverworldLoopLessDelay.checkIfDownButtonIsPressed + $04CD = OverworldLoopLessDelay.noDirectionButtonsPressed + $310A = Func_30fd + $3ECA = Func_3eb5 + $03FF = OverworldLoop + $0B2E = IsSpriteOrSignInFrontOfPlayer + $3E82 = Predef + $292D = DisplayTextID + $12DB = SwitchToMapRomBank + $03A6 = EnterMap + $068E = NewBattle + $0642 = OverworldLoopLessDelay.battleOccurred + $0BDC = CollisionCheckOnLand + $08F4 = ExtraWarpCheck + $0711 = CheckWarpsCollision + $0FC2 = CollisionCheckOnWater + $06AB = BikeSpeedup + $0D32 = AdvancePlayerSprite + $07C5 = CheckMapConnections + $06BF = CheckWarpsNoCollision + $093C = HandleBlackOut + $067B = OverworldLoopLessDelay.noFaintCheck + $3747 = DelayFrames + $1026 = RunMapScript + $019A = Joypad + $07C0 = ContinueCheckWarpsNoCollisionLoop + $08EC = CheckIfInOutsideMap + $20FC = GBFadeIn1 + $08D4 = PlayMapChangeSound + $099A = LeaveMapAnim + $12F9 = Func_12da + $06D7 = CheckWarpsNoCollisionLoop + $08B8 = CheckMapConnections.loadNewMap + $109B = LoadMapHeader + $231F = Func_2312 + $3E04 = GoPAL_SET + $0A07 = LoadTileBlockMap + $0402 = OverworldLoopLessDelay + $23BE = PlaySound + $2103 = GBFadeIn2 + $095C = StopMusic + $201B = StopAllSounds + $3DEC = Delay3 + $09D0 = IsBikeRidingAllowed + $1058 = LoadWalkingPlayerSpriteGraphics + $1072 = LoadBikePlayerSpriteGraphics + $106A = LoadSurfingPlayerSpriteGraphics + $09ED = BikeRidingTilesets + $1804 = FarCopyData2 + $0AE9 = LoadNorthSouthConnectionsTileMap + $0B0D = LoadEastWestConnectionsTileMap + $0B76 = IsSpriteInFrontOfPlayer + $0C89 = TilePairCollisionsLand + $0C35 = CheckForJumpingAndTilePairCollisions + $0C1B = CheckTilePassable + $0F28 = DrawTileBlock + $0E41 = AdvancePlayerSprite.scrollBackgroundAndSprites + $0E70 = MoveTileBlockMapPointerEast + $0E7A = MoveTileBlockMapPointerWest + $0E84 = MoveTileBlockMapPointerSouth + $0E90 = MoveTileBlockMapPointerNorth + $0CB5 = LoadCurrentMapView + $0EBD = ScheduleSouthRowRedraw + $0E9C = ScheduleNorthRowRedraw + $0EDE = ScheduleEastColumnRedraw + $0F13 = ScheduleWestColumnRedraw + $0EB1 = ScheduleRowRedrawHelper + $0EFD = ScheduleColumnRedrawHelper + $100F = CollisionCheckOnWater.noCollision + $0CAB = TilePairCollisionsWater + $09A2 = LoadPlayerSpriteGraphics + $2314 = Func_2307 + $311B = Func_310e + $1057 = RunMapScript.return + $1855 = CopyVideoData + $01AE = MapHeaderPointers + $1257 = CopyMapConnectionHeader + $1217 = LoadMapHeader.finishUp + $11A7 = LoadMapHeader.loadSpriteLoop + $36AE = LoadTextBoxTilePatterns + $09F3 = LoadTilesetTilePatternData + $236C = Func_235f + $35CA = BankswitchHome + $35DB = BankswitchBack + $3846 = JoypadLowSensitivity + $1672 = LoadMonFrontSprite + $13F8 = GetCryData + $3756 = WaitForSoundToFinish + $3DE9 = GBPalWhiteOutWithDelay3 + $143F = PartyMenuInit + $14F3 = DrawPartyMenu + $1479 = HandlePartyMenuInput + $14F8 = RedrawPartyMenu + $36CE = LoadHpBarAndStatusTilePatterns + $3AD7 = HandleMenuInputPokemonSelection + $3C01 = PlaceUnfilledArrowMenuCursor + $14CB = HandlePartyMenuInput.swappingPokemon + $3C74 = PrintNumber + $3A9C = AddNTimes + $3A92 = SkipFixedLengthTextEntries + $1611 = PrintBCDDigit + $38E8 = PrintLetterDelay + $250A = UncompressSpriteData + $1634 = UncompressMonSprite + $16EC = ZeroSpriteBuffer + $16CF = AlignSpriteDataCentered + $16F7 = InterlaceMergeSpriteBuffers + $1909 = CopyScreenTileBufferToVRAM.setup + $1CEA = GetRowColAddressBgMap + $195C = NPlaceChar + $19F5 = Next19E8 + $19F9 = Char00 + $1B17 = Char4C + $1B05 = Char4B + $1AC1 = Char51 + $1AE2 = Char49 + $1A06 = Char52 + $1A0C = Char53 + $1A2A = Char54 + $1A1E = Char5B + $1A24 = Char5E + $1A18 = Char5C + $1A12 = Char5D + $1A89 = Char55 + $1A30 = Char56 + $1ABA = Char57 + $1AA2 = Char58 + $1A36 = Char4A + $1A9E = Char5F + $1A3C = Char59 + $1A42 = Char5A + $1963 = PlaceNextChar + $1A01 = Char00Text + $1A65 = Char5DText + $1A62 = Char5CText + $1A6D = Char5BText + $1A70 = Char5EText + $1A77 = Char54Text + $1A7C = Char56Text + $1A86 = Char4AText + $1A7F = Char5AText + $1962 = PlaceString + $1A99 = Char55Text + $1B4D = TextCommandProcessor + $1AAF = Next1AA2 + $1B47 = ProtectedDelay3 + $38AD = ManualTextScroll + $1AC0 = Char58Text + $18D1 = ClearScreenArea + $1B25 = Next1B18 + $1CB0 = TextCommand17 + $1C3E = TextCommand0B + $1CCE = TextCommandJumpTable + $192F = TextBoxBorder + $15DA = PrintBCDNumber + $1B62 = NextTextCommand + $1CA7 = TextCommand0D + $1C71 = TextCommandSounds + $13EF = PlayCry + $1B97 = TextCommand00 + $1BA4 = TextCommand01 + $1BB2 = TextCommand02 + $1BC4 = TextCommand03 + $1B85 = TextCommand04 + $1BD2 = TextCommand05 + $1BD9 = TextCommand06 + $1BF4 = TextCommand07 + $1C06 = TextCommand08 + $1C0C = TextCommand09 + $1C2A = TextCommand0A + $1C85 = TextCommand0C + $1D4F = RedrawExposedScreenEdge.drawHalf + $1F26 = FlowerTile1 + $1F36 = FlowerTile2 + $1F46 = FlowerTile3 + $3DFA = GBPalWhiteOut + $2011 = ClearVram + $36EE = FillMemory + $1CFD = ClearBgMap + $3DF1 = GBPalNormal + $1D64 = AutoBgMapTransfer + $1DEE = VBlankCopyBgMap + $1D0E = RedrawExposedScreenEdge + $1E6B = VBlankCopy + $1E0F = VBlankCopyDouble + $1ECB = UpdateMovingBgTiles + $3E71 = Random + $28D8 = Func_28cb + $015F = ReadJoypad + $2123 = FadePal4 + $211A = FadePal1 + $2129 = FadePal6 + $212C = FadePal7 + $21A7 = Func_219a + $2244 = Func_2237 + $223E = Func_2231 + $224C = Func_223f + $3727 = SaveScreenTilesToBuffer1 + $228C = Func_227f + $3733 = LoadScreenTilesFromBuffer1 + $22D0 = Func_22c3 + $22FA = Func_22ed + $22E4 = asm_22d7 + $2392 = Func_2385 + $24E3 = TextScriptEndingChar + $24E4 = TextScriptEnd + $2527 = _UncompressSpriteData + $2698 = ReadNextInputByte + $267D = ReadNextInputBit + $28A4 = StoreSpriteOutputPointer + $2656 = WriteSpriteBitsToBuffer + $25E5 = MoveToNextBufferPosition + $26AC = LengthEncodingOffsetList + $2563 = UncompressSpriteDataLoop + $26CC = UnpackSprite + $2884 = UnpackSpriteMode2 + $27D4 = XorSpriteChunks + $26E1 = SpriteDifferentialDecode + $27C4 = DecodeNybble0TableFlipped + $27CC = DecodeNybble1TableFlipped + $27B4 = DecodeNybble0Table + $27BC = DecodeNybble1Table + $277A = DifferentialDecodeNybble + $284E = ResetSpriteBufferPointers + $2844 = ReverseNybble + $2874 = NybbleReverseTable + $28D1 = ResetPlayerSpriteData_ClearSpriteData + $2ADA = DisplayStartMenu + $2A9D = DisplaySafariGameOverText + $2AA8 = DisplayPokemonFaintedText + $2AB6 = DisplayPlayerBlackedOutText + $2ACC = DisplayRepelWoreOffText + $2A3B = DisplayPokemartDialogue + $2A7F = DisplayPokemonCenterDialogue + $346E = FuncTX_ItemStoragePC + $3478 = FuncTX_BillsPC + $348D = FuncTX_PokemonCenterPC + $3482 = FuncTX_SlotMachine + $3C6E = Func_3c59 + $387A = WaitForTextScrollButtonPress + $2A62 = PokemartGreetingText + $3C5E = PrintText + $2A67 = LoadItemList + $29E3 = AfterDisplayingTextID + $2AB1 = PokemonFaintedText + $2AC7 = PlayerBlackedOutText + $29EC = HoldTextDisplayOpen + $2AD5 = RepelWoreOffText + $3AD3 = HandleMenuInput + $3C0E = EraseMenuCursor + $2B7D = CloseStartMenu + $3702 = SaveScreenTilesToBuffer2 + $29F5 = CloseTextDisplay + $30F5 = DisplayTextBoxID + $374E = PlaySoundWaitForCurrent + $2E67 = PrintListMenuEntries + $3B91 = PlaceMenuCursor + $2D3A = DisplayListMenuIDLoop.checkOtherKeys + $2E48 = ExitListMenu + $37F4 = GetItemPrice + $3779 = GetName + $15C7 = GetPartyMonName + $383B = CopyStringToCF4B + $2C60 = DisplayListMenuIDLoop + $2E3D = InitialQuantityText + $2DAF = DisplayChooseQuantityMenu.incrementQuantity + $2E31 = DisplayChooseQuantityMenu.buttonAPressed + $2E36 = DisplayChooseQuantityMenu.buttonBPressed + $2E41 = SpacesBetweenQuantityAndPriceText + $2D96 = DisplayChooseQuantityMenu.waitForKeyPressLoop + $2F9E = PrintListMenuEntries.printCancelMenuItem + $2FDC = GetItemName + $3065 = GetMoveName + $1391 = LoadMonData + $152A = PrintLevel + $30E6 = IsKeyItem + $2E94 = PrintListMenuEntries.loop + $2FA4 = ListMenuCancelText + $3000 = GetMachineName + $304B = HiddenPrefix + $3049 = TechnicalPrefix + $305F = HMMoves + $3DC0 = IsInArray + $314D = Func_310e.pointerTable_3140 + $3DAC = CallFunctionInTable + $3164 = StoreTrainerHeaderPointer + $31A0 = ReadTrainerHeaderInfo + $31D4 = TrainerFlagAction + $3361 = PreBattleSaveRegisters + $3377 = EngageMapTrainer + $326A = Func_325d + $3313 = CheckForEngagingTrainers + $32DC = TrainerWalkUpToPlayer_Bank0 + $32E4 = InitBattleEnemyParameters + $32CE = ResetButtonPressedAndMapScript + $33F5 = PlayTrainerMusic + $33DC = TrainerNameText + $33C4 = Func_33b7 + $3447 = EvilTrainerList + $3441 = FemaleTrainerList + $351A = DecodeRLEList + $34BC = Func_34ae + $350A = Func_34fc + $34D5 = CheckCoords + $355C = GetSpriteMovementByte1Pointer + $3566 = GetSpriteMovementByte2Pointer + $35AC = GetTrainerName + $3AA3 = StringCmp + $35F2 = Bankswitch.Return + $360D = InitYesNoTextBoxParameters + $354F = SetSpriteMovementBytesToFF + $1838 = FarCopyDataDouble + $1893 = CopyVideoDataDouble + $3717 = LoadScreenTilesFromBuffer2DisableBGTransfer + $2FAB = GetMonName + $376B = NamePointers + $3C19 = HandleDownArrowBlinkTiming + $395F = CalcStat + $38C1 = Multiply + $38CE = Divide + $3AC8 = WriteOAMBlock.writeOneEntry + $3AE4 = HandleMenuInputPokemonSelection.loop1 + $3D3A = PrintNumber_PrintDigit + $3D9E = PrintNumber_AdvancePointer + $3D98 = PrintNumber_PrintLeadingZero + $3DBC = CallFunctionInTable.returnAddress + $3E1D = Func_3e08 + $370F = LoadScreenTilesFromBuffer2 + $3E02 = GoPAL_SET_CF1C + $368E = LoadFontTilePatterns + $2BDC = AddItemToInventory + $3EA2 = Predef.done + $3EEF = Func_3eb5.asm_3eda + $3F37 = PointerTable_3f22 + $3F24 = Func_3f0f + $35B4 = HasEnoughMoney + $1556 = GetMonHeader + $191C = ClearScreen + $1317 = CheckForUserInterruption + $13A8 = LoadFrontSpriteByMonIndex + $393C = AddPartyMon + $3C51 = EnableAutoTextBoxDrawing + $3E43 = GiveItem + $217C = Func_216f + $23AE = PlayMusic + $227B = Func_226e + $3934 = RemovePokemon + $3A68 = AddEnemyMonToPlayerParty + $17DE = Club_Coll + $3EA9 = GetPredefRegisters + $2254 = Func_2247 + $28B3 = ResetPlayerSpriteData + $2B8C = CountSetBits + $20E5 = GBFadeOut2 + $13A3 = LoadFlippedFrontSpriteByMonIndex + $36F9 = UncompressSpriteFromDE + $3DD3 = Func_3dbe + $2BF3 = DisplayListMenuID + $304D = IsItemHM + $2D64 = DisplayChooseQuantityMenu + $2BAB = AddAmountSoldToMoney + $2BC8 = RemoveItemFromInventory + $2BA3 = SubtractAmountPaidFromMoney + $3056 = IsMoveHM + $3618 = YesNoChoicePokeCenter + $18E3 = CopyScreenTileBufferToVRAM + $35FA = YesNoChoice + $30D1 = TossItem + $3928 = CopyDataUntil + $307E = ReloadMapData + $1F56 = SoftReset + $130C = ForceBikeOrSurf + $0C4F = Func_c44 + $1332 = LoadDestinationWarpPosition + $1742 = Overworld_Coll + $1756 = RedsHouse1_Coll + $1760 = Mart_Coll + $1772 = Forest_Coll + $1756 = RedsHouse2_Coll + $1766 = Dojo_Coll + $1760 = Pokecenter_Coll + $1766 = Gym_Coll + $1782 = House_Coll + $178C = ForestGate_Coll + $178C = Museum_Coll + $173C = Underground_Coll + $178C = Gate_Coll + $1797 = Ship_Coll + $17A2 = ShipPort_Coll + $17A7 = Cemetery_Coll + $17AF = Interior_Coll + $17B9 = Cavern_Coll + $17C5 = Lobby_Coll + $17CD = Mansion_Coll + $17D7 = Lab_Coll + $17EA = Facility_Coll + $17FD = Plateau_Coll + $34CD = ArePlayerCoordsInArray + $0C55 = CheckForTilePairCollisions + $0B78 = IsSpriteInFrontOfPlayer2 + $141B = DisplayPartyMenu + $1430 = GoBackToPartyMenu + $394B = CalcStats + $3AAC = WriteOAMBlock + $3648 = MoveSprite + $3641 = CalcDifference + $3679 = Func_366b + $1355 = DrawHPBar + $3F0A = PrintPredefTextID + $3E0E = GetHealthBarColor + $1500 = PrintStatusCondition + $2AEC = RedisplayStartMenu + $30B6 = ChooseFlyDestination + $30C9 = UseItem + $34B4 = Func_34a6 + $3494 = Func_3486 + $24F7 = MartSignText + $24FC = PokeCenterSignText + $34C7 = Func_34b9 + $3306 = Func_32f9 + $330B = Func_32fe + $3301 = Func_32f4 + $350E = Func_3500 + $34A9 = DisplayPokedex + $2307 = Func_22fa + $24D9 = IndigoPlateauLobbyText4 + $316D = ExecuteCurMapScriptInTable + $3226 = CheckFightingMapTrainers + $3259 = Func_324c + $3282 = EndTrainerBattle + $2501 = Predef5CText + $31D9 = TalkToTrainer + $315B = Func_314e + $34A1 = IsItemInBag + $32FC = Func_32ef + $244F = ViridianMartText6 + $15C1 = GetPartyMonName2 + $3E5D = GivePokemon + $24B5 = FuchsiaMartText1 + $309D = ReloadTilesetTilePatterns + $338E = Func_3381 + $1515 = PrintStatusConditionNotFainted + $3574 = GetTrainerInformation + $167F = LoadUncompressedSpriteData + $167D = LoadUncompressedBackSprite + $34F2 = CheckBoulderCoords + $24F2 = BoulderText + $3450 = Func_3442 + $20DE = GBFadeOut1 + $249B = CeladonMart4Text1 + $318C = LoadGymLeaderAndCityName + $30C3 = DisableWaitingAfterTextDisplay + $35BF = HasEnoughCoins + $24A3 = CeladonMart5Text3 + $24AD = CeladonMart5Text4 + $3C54 = DisableAutoTextBoxDrawing + $383E = CopyString + $2483 = CeladonMart2Text1 + $248F = CeladonMart2Text2 + $3A7D = Func_3a68 + $364B = MoveSprite_ + $2460 = CeruleanMartText1 + $2477 = LavenderMartText1 + $246E = VermilionMartText1 + $24D0 = SaffronMartText1 + $1542 = PrintLevelCommon + $3F1A = Func_3f05 + $3DC2 = IsInRestOfArray + $2456 = PewterMartText1 + $3EC2 = Func_3ead + $24C6 = CinnabarMartText1 + $1082 = LoadPlayerSpriteGraphicsCommon + $3628 = Func_361a + $1399 = Func_137a + $073A = CheckWarpsNoCollisionRetry1 + $154D = Func_152e + $073B = CheckWarpsNoCollisionRetry2 + $33E1 = Func_33d4 + $0740 = WarpFound1 + $3602 = Func_35f4 + $181A = FarCopyData3 + $1A58 = FinishDTE + $24E8 = ExclamationText + $330E = asm_3301 + $3510 = asm_3502 + $2331 = asm_2324 + $3163 = Func_3156 + $153A = PrintLevelFull + $1DAB = TransferBgRows + $211D = FadePal2 + $20EA = GBFadeOutCommon + $2120 = FadePal3 + $2126 = FadePal5 + $14FB = DrawPartyMenuCommon + $3C56 = AutoTextBoxDrawingCommon + $212F = FadePal8 + $1A44 = MonsterNameCharsCommon + $3636 = DisplayYesNoChoice + $33EA = Func_33dd + $2108 = GBFadeInCommon + $3487 = bankswitchAndContinue + $24ED = GroundRoseText + $3541 = SetSpriteMovementBytesToFE + SLACK: $0121 bytes + +Bank #1: + SECTION: $4000-$7B9E ($3B9F bytes) + $61BF = Func_62ce + $40B0 = Func_40b0 + $5BEE = Func_5d5f + $4440 = LoadMonData_ + $4A7C = WriteDMACodeToHRAM + $4152 = SetDefaultNamesBeforeTitlescreen + $499E = PrepareOAMData + $4A94 = PrintWaitingText + $4AC3 = _UpdateSprites + $6FEE = DisplayTextIDInit + $711D = CableClubNPC + $6B78 = DisplayPokemartDialogue_ + $6F3E = DisplayPokemonCenterDialogue_ + $7063 = DrawStartMenu + $6A79 = SubtractAmountPaidFromMoney_ + $6A9C = HandleItemListSwapping + $4492 = ItemPrices + $45B5 = ItemNames + $7242 = DisplayTextBoxID_ + $783C = PlayerPC + $7B6E = Func_7c18 + $4921 = UnusedNames + $7ABE = _RemovePokemon + $4080 = SpriteFacingDownAndStanding + $4098 = SpriteOAMParameters + $4084 = SpriteFacingDownAndWalking + $40A4 = SpriteOAMParametersFlipped + $4088 = SpriteFacingUpAndStanding + $408C = SpriteFacingUpAndWalking + $4090 = SpriteFacingLeftAndStanding + $4094 = SpriteFacingLeftAndWalking + $4142 = SafariZoneEatingText + $4147 = SafariZoneAngryText + $4434 = NintenText + $414C = CopyFixedLengthText + $443B = SonyText + $43B2 = Func_4519 + $4376 = Func_44dd + $421A = LoadTitlescreenGraphics.titlescreenTilemap + $43BD = Func_4524 + $43CC = Func_4533 + $4276 = LoadTitlescreenGraphics.TitleScreenPokemonLogoYScrolls + $4285 = LoadTitlescreenGraphics.ScrollTitleScreenPokemonLogo + $4421 = PrintGameVersionOnTitleScreen + $4368 = Func_44cf + $435A = Func_44c1 + $4331 = Func_4496 + $4329 = Func_448e + $5981 = MainMenu + $4336 = Func_4496.new + $43EF = CopyrightTextString + $442A = VersionOnTitleScreenText + $4A3C = PrepareOAMData.asm_4bad + $4A60 = Func_4bd1 + $4000 = SpriteFacingAndAnimationTable + $49B0 = PrepareOAMData.asm_4b21 + $4A94 = DMARoutineEnd + $4A8A = DMARoutine + $5942 = Func_5ab3 + $4AB7 = WaitingText + $4AE3 = _UpdateSprites.updateCurrentSprite + $4AEB = UpdateNonPlayerSprite + $4CC0 = UpdatePlayerSprite + $50C5 = Func_5236 + $4D60 = Func_4ed1 + $4C01 = Func_4d72 + $4BF8 = Func_4c70.next + $4C14 = DiagonalLines + $4B34 = Func_4c70.loop + $4CB5 = FoundItemText + $4CBB = NoMoreRoomForItemText + $4AFF = Func_4c70 + $4F3C = InitializeSpriteStatus + $4F6B = CheckSpriteAvailability + $4F0E = InitializeSpriteFacingDirection + $4F02 = notYetMoving + $4EE6 = UpdateSpriteMovementDelay + $4E8D = UpdateSpriteInWalkingAnimation + $4F4C = InitializeSpriteScreenPosition + $50BE = LoadDEPlusA + $4E57 = ChangeFacingDirection + $5096 = getTileSpriteStandsOn + $4FFD = CanWalkOntoTile + $4FE6 = UpdateSpriteImage + $4FBD = CheckSpriteAvailability.spriteInvisible + $5135 = Func_52a6 + $5141 = Func_52b2 + $5146 = Func_52b7 + $5152 = Func_52c3 + $5190 = Func_5301 + $5975 = LoadTrainerInfoTextBoxTiles + $539E = PleaseWaitString + $560C = Func_577d + $58EA = PointerTable_5a5b + $4178 = LoadTitlescreenGraphics + $5681 = Func_57f2 + $5631 = Func_57a2 + $546B = TradeCenter_SelectMon.asm_55dc + $54EA = TradeCenter_SelectMon.asm_565b + $5665 = Func_57d6 + $55BE = TradeCenter_SelectMon.asm_572f + $54F4 = TradeCenter_SelectMon.asm_5665 + $53E6 = TradeCenter_SelectMon.asm_5557 + $5490 = TradeCenter_SelectMon.asm_5601 + $5403 = TradeCenter_SelectMon.asm_5574 + $55AE = TradeCenter_SelectMon.statsTrade + $53AB = Func_551c + $5656 = Func_57c7 + $564F = CancelTextString + $56B6 = Func_5827 + $58B3 = WillBeTradedText + $58C9 = TradeCanceled + $58A7 = Func_5a18 + $58B8 = TradeCompleted + $51D4 = Func_5345 + $53BF = TradeCenter_SelectMon + $56D8 = TradeCenter_Trade + $51A6 = Func_5317 + $596F = Func_5ae0 + $5A8E = Func_5bff + $5F2D = Func_609e + $5C0D = ContinueText + $5C16 = NewGameText + $5A2D = MainMenu.next3 + $5BE1 = Func_5d52 + $5D19 = DisplayOptionMenu + $5996 = MainMenu.next0 + $5C44 = ContinueGame + $6A78 = TextTerminator_6b20 + $5BD2 = WhereWouldYouLikeText + $5C26 = TradeCenterText + $5BD7 = PleaseWaitText + $722F = Func_72d7 + $5BDC = LinkCanceledText + $5FA4 = OakSpeech + $5CF9 = SaveScreenInfoText + $5CBE = Func_5e2f + $5CD1 = Func_5e42 + $5CE4 = Func_5e55 + $5E4F = TextSpeedOptionText + $5E6D = BattleAnimationOptionText + $5E8C = BattleStyleOptionText + $5EA7 = OptionMenuCancelText + $5EDB = SetCursorPositionsFromOptions + $5EAE = SetOptionsFromCursorPositions + $5D7E = DisplayOptionMenu.loop + $5E25 = DisplayOptionMenu.pressedLeftInTextSpeed + $5E38 = DisplayOptionMenu.pressedRightInTextSpeed + $5DA7 = DisplayOptionMenu.eraseOldMenuCursor + $5F25 = TextSpeedOptionData + $5F1E = SetCursorPositionsFromOptions.placeUnfilledRightArrow + $5F59 = SetDefaultNames + $606F = Func_61bc + $613E = BoyGirlText + $61A0 = BoyGirlChoice + $6176 = IntroPredef3B + $6143 = FadeInIntroPic + $6120 = OakSpeechText1 + $615A = MovePicLeft + $6125 = OakSpeechText2 + $612F = IntroducePlayerText + $684E = LoadDefaultNamesPlayer + $6134 = IntroduceRivalText + $68C2 = LoadDefaultNamesRival + $6139 = OakSpeechText3 + $6154 = IntroFadePalettes + $61A8 = InitBoyGirlTextBoxParameters + $61F0 = Func_62ff + $63DB = Func_64ea + $6319 = BattleCenterSpec1 + $6321 = BattleCenterSpec2 + $6329 = TradeCenterSpec1 + $6331 = TradeCenterSpec2 + $6311 = FirstMapSpec + $62B0 = DungeonWarpList + $62C9 = DungeonWarpData + $6339 = FlyWarpDataPtr + $636D = PalletTownFlyWarp + $6373 = ViridianCityFlyWarp + $6379 = PewterCityFlyWarp + $637F = CeruleanCityFlyWarp + $6385 = LavenderTownFlyWarp + $638B = VermilionCityFlyWarp + $6391 = CeladonCityFlyWarp + $6397 = FuchsiaCityFlyWarp + $639D = CinnabarIslandFlyWarp + $63A3 = IndigoPlateauFlyWarp + $63A9 = SaffronCityFlyWarp + $63AF = Route4FlyWarp + $63B5 = Route10FlyWarp + $63D0 = IshiharaTeam + $6448 = DoYouWantToNicknameText + $6487 = DisplayNamingScreen + $664C = LoadEDTile + $67E9 = PrintNamingText + $6660 = PrintAlphabet + $66FF = Func_680e + $654F = DisplayNamingScreen.unknownPointerTable_665e + $64ED = DisplayNamingScreen.asm_65fc + $662F = DisplayNamingScreen.asm_673e + $661D = DisplayNamingScreen.asm_672c + $6609 = DisplayNamingScreen.asm_6718 + $65F3 = DisplayNamingScreen.asm_6702 + $64E4 = DisplayNamingScreen.asm_65f3 + $657D = DisplayNamingScreen.asm_668c + $64DE = DisplayNamingScreen.asm_65ed + $6574 = DisplayNamingScreen.asm_6683 + $65E7 = DisplayNamingScreen.deleteLetter + $6583 = DisplayNamingScreen.asm_6692 + $67DC = CalcStringLength + $6776 = Dakutens + $67C7 = Handakutens + $6762 = Func_6871 + $6605 = DisplayNamingScreen.asm_6714 + $6619 = DisplayNamingScreen.asm_6728 + $6658 = ED_Tile + $668F = LowerCaseAlphabet + $66C7 = UpperCaseAlphabet + $6830 = YourTextString + $6836 = RivalsTextString + $6844 = NicknameTextString + $683E = NameTextString + $6930 = Func_6a12 + $69C6 = DefaultNamesPlayer + $698A = DisplayIntroNameTextBox + $6A2D = DefaultNamesPlayerList + $6A11 = Func_6ad6 + $690A = Func_69ec + $69DC = DefaultNamesGirl + $6A5B = DefaultNamesGirlList + $68BD = YourNameIsText + $69F9 = DefaultNamesRival + $6A43 = DefaultNamesRivalList + $6905 = HisNameIsText + $69C1 = DisplayIntroNameTextBox.namestring + $6D4F = DisplayPokemartDialogue_.done + $6C76 = DisplayPokemartDialogue_.buyMenu + $6BC0 = DisplayPokemartDialogue_.sellMenu + $6C6A = DisplayPokemartDialogue_.bagEmpty + $6D7D = PokemonSellingGreetingText + $6D20 = DisplayPokemartDialogue_.returnToMainPokemartMenu + $6D82 = PokemartTellSellPriceText + $6BE1 = DisplayPokemartDialogue_.sellMenuLoop + $6D8C = PokemartUnsellableItemText + $6D87 = PokemartItemBagEmptyText + $6D64 = PokemartBuyingGreetingText + $6D69 = PokemartTellBuyPriceText + $6C91 = DisplayPokemartDialogue_.buyMenuLoop + $6D34 = DisplayPokemartDialogue_.isThereEnoughMoney + $6D6E = PokemartBoughtItemText + $6D96 = PokemartAnythingElseText + $6B85 = DisplayPokemartDialogue_.loop + $6D73 = PokemartNotEnoughMoneyText + $6D78 = PokemartItemBagFullText + $6D91 = PokemartThankYouText + $6E5F = TryingToLearn + $6E32 = AbandonLearning + $6F20 = OneTwoAndText + $6E56 = PrintLearnedMove + $6F11 = AbandonLearningText + $6DB3 = DontAbandonLearning + $6F16 = DidNotLearnText + $6F05 = LearnedMove1Text + $6F1B = TryingToLearnText + $6F0C = WhichMoveToForgetText + $6F39 = HMCantDeleteText + $6F2F = PoofText + $6FB5 = PokemonCenterWelcomeText + $6FBA = ShallWeHealYourPokemonText + $6FD0 = SetLastBlackoutMap + $6FC0 = NeedYourPokemonText + $6FC5 = PokemonFightingFitText + $6FCA = PokemonCenterFarewellText + $6FEA = SafariZoneRestHouses + $70E7 = StartMenuPokedexText + $7113 = PrintStartMenuItem + $70EF = StartMenuPokemonText + $70F7 = StartMenuItemText + $70FC = StartMenuSaveText + $7101 = StartMenuResetText + $710C = StartMenuOptionText + $7107 = StartMenuExitText + $7210 = CableClubNPCText1 + $7139 = Func_71e1 + $722A = CableClubNPCText6 + $71F0 = Func_7298 + $7215 = CableClubNPCText2 + $721A = CableClubNPCText3 + $7220 = CableClubNPCText4 + $720B = CableClubNPCText7 + $7225 = CableClubNPCText5 + $5A99 = LinkMenu + $74B1 = DisplayYesNoTextBox + $72DF = TextBoxFunctionTable + $72A4 = SearchTextBoxTable + $72E9 = TextBoxCoordTable + $7308 = TextBoxTextAndCoordTable + $726C = DisplayTextBoxID_.done + $72B2 = GetTextBoxIDCoords + $72CD = GetAddressOfScreenCoords + $72BF = GetTextBoxIDText + $7412 = Func_74ba + $7442 = Func_74ea + $7637 = Func_76e1 + $739B = JapaneseMochimonoText + $737A = UseTossText + $7383 = JapaneseSaveMessageText + $738D = JapaneseSpeedOptionsText + $73AD = BattleMenuText + $73C0 = SafariZoneBattleMenuText + $73E1 = SwitchStatsCancelText + $736B = BuySellQuitText + $7395 = MoneyText + $73F5 = JapaneseAhText + $73F9 = JapanesePokedexMenu + $7596 = Func_763e + $75C9 = MenuStrings + $75AE = Func_7656 + $75F8 = MenuStrings.YesNoMenu + $75FF = MenuStrings.BoyGirlMenu + $7608 = MenuStrings.SouthEastMenu + $7613 = MenuStrings.NorthEastMenu + $761E = MenuStrings.TradeCancelMenu + $762B = MenuStrings.HealCancelMenu + $75F1 = MenuStrings.NoYesMenu + $772C = GetMonFieldMoves + $7718 = PokemonMenuEntries + $76E3 = FieldMoveNames + $7779 = FieldMoveDisplayData + $77B7 = Func_7861 + $7832 = SuckedHealthText + $7837 = DreamWasEatenText + $7A78 = TurnedOnPC2Text + $7A4B = PlayersPCMenuEntries + $7A7D = WhatDoYouWantText + $78C3 = Func_796d + $7968 = Func_7a12 + $78EB = Func_7995 + $79E5 = Func_7a8f + $7A91 = NothingToDepositText + $7862 = Func_790c + $7A82 = WhatToDepositText + $7A87 = DepositHowManyText + $7901 = Func_79ab + $7A96 = NoRoomToStoreText + $7A8C = ItemWasStoredText + $7AAA = NothingStoredText + $7A9B = WhatToWithdrawText + $7AA0 = WithdrawHowManyText + $797E = Func_7a28 + $7AAF = CantCarryMoreText + $7AA5 = WithdrewItemText + $7AB4 = WhatToTossText + $7AB9 = TossHowManyText + $79FB = Func_7aa5 + $644D = Func_655c + $4112 = PrintSafariZoneBattleText + $7795 = DrainHPEffect_ + $43D1 = LoadCopyrightAndTextBoxTiles + $6D9B = LearnMove + $593F = Func_5ab0 + $58EE = Func_5a5f + $6173 = Predef3B + $593E = Func_5aaf + $63DC = AskName + $4C70 = PickupItem + $5C7E = PrintSaveScreenText + $43DA = LoadCopyrightTiles + $61B4 = DisplayBoyGirlChoice + SLACK: $0461 bytes + +Bank #2: + SECTION: $4000-$422D ($022E bytes) + $4000 = SFX_Headers_02 + $41B3 = SFX_02_41 + $4192 = SFX_02_3a + $41BC = SFX_02_42 + $419B = SFX_02_3b + $401E = SFX_02_0a + $4021 = SFX_02_0b + $4072 = SFX_02_1a + $4024 = SFX_02_0c + $407B = SFX_02_1b + $4102 = SFX_02_2a + $4027 = SFX_02_0d + $4084 = SFX_02_1c + $410B = SFX_02_2b + $402A = SFX_02_0e + $408D = SFX_02_1d + $4114 = SFX_02_2c + $41DA = SFX_02_4a + $402D = SFX_02_0f + $4096 = SFX_02_1e + $411D = SFX_02_2d + $41A4 = SFX_02_3c + $41DD = SFX_02_4b + $4216 = SFX_02_5a + $409F = SFX_02_1f + $4126 = SFX_02_2e + $41A7 = SFX_02_3d + $41E0 = SFX_02_4c + $421C = SFX_02_5b + $412F = SFX_02_2f + $41AA = SFX_02_3e + $41E3 = SFX_02_4d + $421F = SFX_02_5c + $41AD = SFX_02_3f + $41E6 = SFX_02_4e + $4222 = SFX_02_5d + $41E9 = SFX_02_4f + $4228 = SFX_02_5e + $422B = SFX_02_5f + $4003 = SFX_02_01 + $4030 = SFX_02_10 + $4006 = SFX_02_02 + $4033 = SFX_02_11 + $40A8 = SFX_02_20 + $4009 = SFX_02_03 + $4036 = SFX_02_12 + $40B1 = SFX_02_21 + $4138 = SFX_02_30 + $400C = SFX_02_04 + $4039 = SFX_02_13 + $40BA = SFX_02_22 + $4141 = SFX_02_31 + $41B0 = SFX_02_40 + $400F = SFX_02_05 + $403C = SFX_02_14 + $40C3 = SFX_02_23 + $414A = SFX_02_32 + $41EC = SFX_02_50 + $4012 = SFX_02_06 + $4045 = SFX_02_15 + $40CC = SFX_02_24 + $4153 = SFX_02_33 + $41EF = SFX_02_51 + $4015 = SFX_02_07 + $404E = SFX_02_16 + $40D5 = SFX_02_25 + $415C = SFX_02_34 + $41C5 = SFX_02_43 + $41F5 = SFX_02_52 + $4018 = SFX_02_08 + $4057 = SFX_02_17 + $40DE = SFX_02_26 + $4165 = SFX_02_35 + $41C8 = SFX_02_44 + $41F8 = SFX_02_53 + $401B = SFX_02_09 + $4060 = SFX_02_18 + $40E7 = SFX_02_27 + $416E = SFX_02_36 + $41CB = SFX_02_45 + $41FB = SFX_02_54 + $4069 = SFX_02_19 + $40F0 = SFX_02_28 + $4177 = SFX_02_37 + $41CE = SFX_02_46 + $4201 = SFX_02_55 + $40F9 = SFX_02_29 + $4180 = SFX_02_38 + $41D1 = SFX_02_47 + $4204 = SFX_02_56 + $4189 = SFX_02_39 + $41D4 = SFX_02_48 + $4207 = SFX_02_57 + $41D7 = SFX_02_49 + $420A = SFX_02_58 + $4210 = SFX_02_59 + SECTION: $422E-$42FC ($00CF bytes) + $429A = Music_MeetRival + $4249 = Music_Cities1 + $42AF = Music_SafariZone + $4291 = Music_MeetProfOak + $4267 = Music_Cinnabar + $42A3 = Music_MuseumGuy + $4270 = Music_Vermilion + $4255 = Music_Cities2 + $42F1 = Music_IndigoPlateau + $4240 = Music_Gym + $422E = Music_PalletTown + $427C = Music_Lavender + $4237 = Music_Pokecenter + $42C1 = Music_Routes1 + $42CD = Music_Routes2 + $42B8 = Music_PkmnHealed + $42D9 = Music_Routes3 + $425E = Music_Celadon + $42E5 = Music_Routes4 + $4288 = Music_SSAnne + SECTION: $42FD-$50C5 ($0DC9 bytes) + $42FD = SFX_02_01_Ch1 + $4301 = SFX_02_02_Ch1 + $4305 = SFX_02_03_Ch1 + $4309 = SFX_02_04_Ch1 + $430D = SFX_02_05_Ch1 + $4320 = SFX_02_06_Ch1 + $4324 = SFX_02_07_Ch1 + $432B = SFX_02_08_Ch1 + $432F = SFX_02_09_Ch1 + $4333 = SFX_02_0a_Ch1 + $4337 = SFX_02_0b_Ch1 + $433B = SFX_02_0c_Ch1 + $433F = SFX_02_0d_Ch1 + $4343 = SFX_02_0e_Ch1 + $4347 = SFX_02_0f_Ch1 + $434E = SFX_02_10_Ch1 + $4355 = SFX_02_11_Ch1 + $4359 = SFX_02_12_Ch1 + $435D = SFX_02_13_Ch1 + $4987 = SFX_02_14_Ch1 + $4996 = SFX_02_14_Ch2 + $49A5 = SFX_02_14_Ch3 + $4B97 = SFX_02_15_Ch1 + $4BAA = SFX_02_15_Ch2 + $4BBD = SFX_02_15_Ch3 + $4B0C = SFX_02_16_Ch1 + $4B1B = SFX_02_16_Ch2 + $4B29 = SFX_02_16_Ch3 + $48A6 = SFX_02_17_Ch1 + $48C5 = SFX_02_17_Ch2 + $48E4 = SFX_02_17_Ch3 + $4C55 = SFX_02_18_Ch1 + $4C74 = SFX_02_18_Ch2 + $4C93 = SFX_02_18_Ch3 + $4A35 = SFX_02_19_Ch1 + $4A48 = SFX_02_19_Ch2 + $4A5A = SFX_02_19_Ch3 + $49DF = SFX_02_1a_Ch1 + $49F9 = SFX_02_1a_Ch2 + $49FA = SFX_02_1a_Ch3 + $4A0D = SFX_02_1b_Ch1 + $4A1C = SFX_02_1b_Ch2 + $4A2B = SFX_02_1b_Ch3 + $4C25 = SFX_02_1c_Ch1 + $4C38 = SFX_02_1c_Ch2 + $4C4B = SFX_02_1c_Ch3 + $472F = SFX_02_1d_Ch1 + $474C = SFX_02_1d_Ch2 + $476D = SFX_02_1d_Ch3 + $4BCA = SFX_02_1e_Ch1 + $4BE9 = SFX_02_1e_Ch2 + $4C0C = SFX_02_1e_Ch3 + $4A5B = SFX_02_1f_Ch1 + $4A86 = SFX_02_1f_Ch2 + $4AA5 = SFX_02_1f_Ch3 + $4ABE = SFX_02_20_Ch1 + $4AE5 = SFX_02_20_Ch2 + $4B0B = SFX_02_20_Ch3 + $4B2A = SFX_02_21_Ch1 + $4B49 = SFX_02_21_Ch2 + $4B78 = SFX_02_21_Ch3 + $49AF = SFX_02_22_Ch1 + $49C2 = SFX_02_22_Ch2 + $49D5 = SFX_02_22_Ch3 + $48F1 = SFX_02_23_Ch1 + $490C = SFX_02_23_Ch2 + $4927 = SFX_02_23_Ch3 + $4937 = SFX_02_24_Ch1 + $495A = SFX_02_24_Ch2 + $497D = SFX_02_24_Ch3 + $4813 = SFX_02_25_Ch1 + $4832 = SFX_02_25_Ch2 + $4855 = SFX_02_25_Ch3 + $4D2B = SFX_02_26_Ch1 + $4D3E = SFX_02_26_Ch2 + $4D51 = SFX_02_26_Ch3 + $4D5E = SFX_02_27_Ch1 + $4D79 = SFX_02_27_Ch2 + $4D94 = SFX_02_27_Ch3 + $4DA7 = SFX_02_28_Ch1 + $4DB6 = SFX_02_28_Ch2 + $4DC5 = SFX_02_28_Ch3 + $4E35 = SFX_02_29_Ch1 + $4E50 = SFX_02_29_Ch2 + $4E6B = SFX_02_29_Ch3 + $4CC8 = SFX_02_2a_Ch1 + $4CD7 = SFX_02_2a_Ch2 + $4CE6 = SFX_02_2a_Ch3 + $4E7E = SFX_02_2b_Ch1 + $4E91 = SFX_02_2b_Ch2 + $4EA4 = SFX_02_2b_Ch3 + $4F8E = SFX_02_2c_Ch1 + $4FB1 = SFX_02_2c_Ch2 + $4FD4 = SFX_02_2c_Ch3 + $4CA6 = SFX_02_2d_Ch1 + $4CB5 = SFX_02_2d_Ch2 + $4CC7 = SFX_02_2d_Ch3 + $4EFF = SFX_02_2e_Ch1 + $4F1A = SFX_02_2e_Ch2 + $4F35 = SFX_02_2e_Ch3 + $4CF0 = SFX_02_2f_Ch1 + $4D07 = SFX_02_2f_Ch2 + $4D1E = SFX_02_2f_Ch3 + $4EB1 = SFX_02_30_Ch1 + $4ED4 = SFX_02_30_Ch2 + $4EEF = SFX_02_30_Ch3 + $4F48 = SFX_02_31_Ch1 + $4F63 = SFX_02_31_Ch2 + $4F7E = SFX_02_31_Ch3 + $4DCF = SFX_02_32_Ch1 + $4DF2 = SFX_02_32_Ch2 + $4E19 = SFX_02_32_Ch3 + $4FE7 = SFX_02_33_Ch1 + $4FFA = SFX_02_33_Ch2 + $500D = SFX_02_33_Ch3 + $501A = SFX_02_34_Ch1 + $502D = SFX_02_34_Ch2 + $5040 = SFX_02_34_Ch3 + $504D = SFX_02_35_Ch1 + $5070 = SFX_02_35_Ch2 + $5092 = SFX_02_35_Ch3 + $5093 = SFX_02_36_Ch1 + $50A6 = SFX_02_36_Ch2 + $50B9 = SFX_02_36_Ch3 + $4786 = SFX_02_37_Ch1 + $479D = SFX_02_37_Ch2 + $47B0 = SFX_02_37_Ch3 + $47BD = SFX_02_38_Ch1 + $47E0 = SFX_02_38_Ch2 + $4803 = SFX_02_38_Ch3 + $486B = SFX_02_39_Ch1 + $4882 = SFX_02_39_Ch2 + $4899 = SFX_02_39_Ch3 + $440A = SFX_02_3c_Ch1 + $44B7 = SFX_02_3d_Ch1 + $44D9 = SFX_02_3e_Ch1 + $43C3 = SFX_02_3f_Ch1 + $4462 = SFX_02_40_Ch1 + $44C6 = SFX_02_43_Ch1 + $44EE = SFX_02_44_Ch1 + $44FD = SFX_02_45_Ch1 + $4528 = SFX_02_46_Ch1 + $453B = SFX_02_47_Ch1 + $454E = SFX_02_48_Ch1 + $4569 = SFX_02_49_Ch1 + $4580 = SFX_02_4a_Ch1 + $4595 = SFX_02_4b_Ch1 + $45B0 = SFX_02_4c_Ch1 + $45CB = SFX_02_4d_Ch1 + $45D6 = SFX_02_4e_Ch1 + $45E1 = SFX_02_4f_Ch1 + $45EE = SFX_02_50_Ch1 + $461F = SFX_02_51_Ch1 + $4636 = SFX_02_51_Ch2 + $4649 = SFX_02_52_Ch1 + $4654 = SFX_02_53_Ch1 + $466D = SFX_02_54_Ch1 + $468C = SFX_02_54_Ch2 + $46AB = SFX_02_55_Ch1 + $43E1 = SFX_02_56_Ch1 + $43F1 = SFX_02_57_Ch1 + $43F8 = SFX_02_58_Ch1 + $43FF = SFX_02_58_Ch2 + $441B = SFX_02_59_Ch1 + $4422 = SFX_02_59_Ch2 + $442D = SFX_02_5a_Ch1 + $4438 = SFX_02_5a_Ch2 + $4447 = SFX_02_5b_Ch1 + $4452 = SFX_02_5c_Ch1 + $4475 = SFX_02_5d_Ch1 + $4494 = SFX_02_5d_Ch2 + $43CA = SFX_02_5e_Ch1 + $46C8 = SFX_02_5f_Ch1 + $4373 = Music2_WavePointers.wave0 + $4383 = Music2_WavePointers.wave1 + $4393 = Music2_WavePointers.wave2 + $43A3 = Music2_WavePointers.wave3 + $43B3 = Music2_WavePointers.wave4 + $43C3 = Music2_WavePointers.wave5 + $4361 = Music2_WavePointers + SECTION: $50C6-$5BA2 ($0ADD bytes) + $5138 = Music2_ApplyMusicAffects + $51D0 = Music2_PlayNextNote + $580D = Music2_ApplyDutyCycle + $56F9 = Music2_ApplyPitchBend + $5838 = Func_9838 + $51E6 = Music2_endchannel + $5825 = Music2_GetNextMusicByte + $5274 = Music2_callchannel + $5B1F = Unknown_9b1f + $56C7 = Func_96c7 + $52A9 = Music2_loopchannel + $52E4 = Music2_notetype + $5323 = Music2_toggleperfectpitch + $5858 = Func_9858 + $550A = Music2_notelength + $5876 = Func_9876 + $5629 = Func_9629 + $55F8 = Func_95f8 + $564B = Func_964b + $5847 = Func_9847 + $5693 = Func_9693 + $578F = Func_978f + $5B27 = Unknown_9b27 + $56B5 = Func_96b5 + $56E5 = Func_96e5 + $5740 = Music2_ApplyPitchBend.asm_9740 + $5786 = Music2_ApplyPitchBend.asm_9786 + $5B17 = Unknown_9b17 + $5B2F = Music2_Pitches + $5A34 = Func_9a34 + $594E = Func_994e + $5A89 = FillMusicRAM2 + $5A8F = Func_9a8f + $5967 = Func_994e.asm_9967 + $5B16 = Noise2_endchannel + $5B60 = Music2_OverwriteChannelPointer + $5B47 = Music_RivalAlternateStart + $5B75 = Music_RivalAlternateStartAndTempo + $5B65 = Music_RivalAlternateTempo + $5B81 = Music_Cities1AlternateTempo + $5103 = Music2_UpdateMusic + $50C6 = PlayBattleMusic + SECTION: $5BA3-$7FF3 ($2451 bytes) + $6D77 = SFX_02_3a_Ch1 + $6D8E = SFX_02_3a_Ch2 + $6D9E = SFX_02_3a_Ch3 + $7316 = SFX_02_3b_Ch1 + $7335 = SFX_02_3b_Ch2 + $734D = SFX_02_3b_Ch3 + $72C8 = SFX_02_41_Ch1 + $72E1 = SFX_02_41_Ch2 + $72F7 = SFX_02_41_Ch3 + $7362 = SFX_02_42_Ch1 + $7381 = SFX_02_42_Ch2 + $739D = SFX_02_42_Ch3 + $67C5 = Music_PalletTown_Ch1 + $685F = Music_PalletTown_Ch2 + $68DE = Music_PalletTown_Ch3 + $7E56 = Music_Pokecenter_Ch1 + $7EF9 = Music_Pokecenter_Ch2 + $7F70 = Music_Pokecenter_Ch3 + $7CBB = Music_Gym_Ch1 + $7D6B = Music_Gym_Ch2 + $7DFA = Music_Gym_Ch3 + $6A76 = Music_Cities1_Ch1 + $6B92 = Music_Cities1_Ch2 + $6C32 = Music_Cities1_Ch3 + $6CEF = Music_Cities1_Ch4 + $7504 = Music_Cities2_Ch1 + $7569 = Music_Cities2_Ch2 + $7640 = Music_Cities2_Ch3 + $76C7 = Music_Celadon_Ch1 + $773A = Music_Celadon_Ch2 + $77B5 = Music_Celadon_Ch3 + $786D = Music_Cinnabar_Ch1 + $78D4 = Music_Cinnabar_Ch2 + $793D = Music_Cinnabar_Ch3 + $79EB = Music_Vermilion_Ch1 + $7A61 = Music_Vermilion_Ch2 + $7AA6 = Music_Vermilion_Ch3 + $7B0D = Music_Vermilion_Ch4 + $7B58 = Music_Lavender_Ch1 + $7B9E = Music_Lavender_Ch2 + $7BAE = Music_Lavender_Ch3 + $7C21 = Music_Lavender_Ch4 + $73A7 = Music_SSAnne_Ch1 + $7419 = Music_SSAnne_Ch2 + $74CB = Music_SSAnne_Ch3 + $6F59 = Music_MeetProfOak_Ch1 + $6FA9 = Music_MeetProfOak_Ch2 + $703D = Music_MeetProfOak_Ch3 + $7120 = Music_MeetRival_Ch1 + $71BB = Music_MeetRival_Ch2 + $7233 = Music_MeetRival_Ch3 + $6DAE = Music_MuseumGuy_Ch1 + $6DF1 = Music_MuseumGuy_Ch2 + $6E6E = Music_MuseumGuy_Ch3 + $6ED1 = Music_MuseumGuy_Ch4 + $7C2E = Music_SafariZone_Ch1 + $7C6A = Music_SafariZone_Ch2 + $7C94 = Music_SafariZone_Ch3 + $5BA3 = Music_PkmnHealed_Ch1 + $5BC4 = Music_PkmnHealed_Ch2 + $5BD2 = Music_PkmnHealed_Ch3 + $5BDE = Music_Routes1_Ch1 + $5C51 = Music_Routes1_Ch2 + $5CD8 = Music_Routes1_Ch3 + $5D24 = Music_Routes1_Ch4 + $5DB9 = Music_Routes2_Ch1 + $5E4F = Music_Routes2_Ch2 + $5E9B = Music_Routes2_Ch3 + $5F08 = Music_Routes2_Ch4 + $5FAD = Music_Routes3_Ch1 + $6009 = Music_Routes3_Ch2 + $607F = Music_Routes3_Ch3 + $6131 = Music_Routes3_Ch4 + $626A = Music_Routes4_Ch1 + $6304 = Music_Routes4_Ch2 + $63C4 = Music_Routes4_Ch3 + $649D = Music_Routes4_Ch4 + $65F0 = Music_IndigoPlateau_Ch1 + $6664 = Music_IndigoPlateau_Ch2 + $66BA = Music_IndigoPlateau_Ch3 + $670F = Music_IndigoPlateau_Ch4 + $71A2 = Music_MeetRival_branch_b1a2 + $721D = Music_MeetRival_branch_b21d + $72B5 = Music_MeetRival_branch_b2b5 + $7119 = Music_MeetRival_branch_b119 + $719B = Music_MeetRival_branch_b19b + $6A6F = Music_Cities1_branch_aa6f + $5BE9 = Music_Routes1_branch_9be9 + $5C65 = Music_Routes1_branch_9c65 + $5C78 = Music_Routes1_branch_9c78 + $5C8D = Music_Routes1_branch_9c8d + $5C53 = Music_Routes1_branch_9c53 + $5CDD = Music_Routes1_branch_9cdd + $5DC3 = Music_Routes2_branch_9dc3 + $5E54 = Music_Routes2_branch_9e54 + $5E9E = Music_Routes2_branch_9e9e + $5FC3 = Music_Routes3_branch_9fc3 + $601A = Music_Routes3_branch_a01a + $60A3 = Music_Routes3_branch_a0a3 + $617A = Music_Routes3_branch_a17a + $628A = Music_Routes4_branch_a28a + $6325 = Music_Routes4_branch_a325 + $63D7 = Music_Routes4_branch_a3d7 + $64A8 = Music_Routes4_branch_a4a8 + $6659 = Music_IndigoPlateau_branch_a659 + $6605 = Music_IndigoPlateau_branch_a605 + $66AF = Music_IndigoPlateau_branch_a6af + $6673 = Music_IndigoPlateau_branch_a673 + $66FE = Music_IndigoPlateau_branch_a6fe + $66C6 = Music_IndigoPlateau_branch_a6c6 + $6791 = Music_IndigoPlateau_branch_a791 + $677E = Music_IndigoPlateau_branch_a77e + $67A8 = Music_IndigoPlateau_branch_a7a8 + $6728 = Music_IndigoPlateau_branch_a728 + $67CE = Music_PalletTown_branch_a7ce + $6861 = Music_PalletTown_branch_a861 + $68E3 = Music_PalletTown_branch_a8e3 + $691B = Music_UnusedSong_branch_a91b + $69D8 = Music_UnusedSong_branch_a9d8 + $6A79 = Music_Cities1_branch_aa79 + $6B7D = Music_Cities1_branch_ab7d + $6B8A = Music_Cities1_branch_ab8a + $6B12 = Music_Cities1_branch_ab12 + $6A80 = Music_Cities1_branch_aa80 + $6C00 = Music_Cities1_branch_ac00 + $6CC5 = Music_Cities1_branch_acc5 + $6CCE = Music_Cities1_branch_acce + $6C35 = Music_Cities1_branch_ac35 + $6D36 = Music_Cities1_branch_ad36 + $6D45 = Music_Cities1_branch_ad45 + $6CF3 = Music_Cities1_branch_acf3 + $6D5F = Music_Cities1_branch_ad5f + $6D52 = Music_Cities1_branch_ad52 + $6D6E = Music_Cities1_branch_ad6e + $6DE7 = Music_MuseumGuy_branch_ade7 + $6DEC = Music_MuseumGuy_branch_adec + $6DD6 = Music_MuseumGuy_branch_add6 + $6E26 = Music_MuseumGuy_branch_ae26 + $6EB8 = Music_MuseumGuy_branch_aeb8 + $6EC1 = Music_MuseumGuy_branch_aec1 + $6E8E = Music_MuseumGuy_branch_ae8e + $6EE1 = Music_MuseumGuy_branch_aee1 + $6F85 = Music_MeetProfOak_branch_af85 + $7005 = Music_MeetProfOak_branch_b005 + $70BC = Music_MeetProfOak_branch_b0bc + $70D8 = Music_MeetProfOak_branch_b0d8 + $70ED = Music_MeetProfOak_branch_b0ed + $7101 = Music_MeetProfOak_branch_b101 + $7123 = Music_MeetRival_branch_b123 + $7140 = Music_MeetRival_branch_b140 + $71A5 = Music_MeetRival_branch_b1a5 + $71D8 = Music_MeetRival_branch_b1d8 + $724B = Music_MeetRival_branch_b24b + $73B2 = Music_SSAnne_branch_b3b2 + $741E = Music_SSAnne_branch_b41e + $751A = Music_Cities2_branch_b51a + $758B = Music_Cities2_branch_b58b + $764C = Music_Cities2_branch_b64c + $76D4 = Music_Celadon_branch_b6d4 + $774A = Music_Celadon_branch_b74a + $77C1 = Music_Celadon_branch_b7c1 + $7878 = Music_Cinnabar_branch_b878 + $78D9 = Music_Cinnabar_branch_b8d9 + $793F = Music_Cinnabar_branch_b93f + $79F6 = Music_Vermilion_branch_b9f6 + $7A66 = Music_Vermilion_branch_ba66 + $7AA8 = Music_Vermilion_branch_baa8 + $7B3F = Music_Vermilion_branch_bb3f + $7B0E = Music_Vermilion_branch_bb0e + $7B6B = Music_Lavender_branch_bb6b + $7BA5 = Music_Lavender_branch_bba5 + $7BB9 = Music_Lavender_branch_bbb9 + $7C26 = Music_Lavender_branch_bc26 + $7C5F = Music_SafariZone_branch_bc5f + $7C4F = Music_SafariZone_branch_bc4f + $7C89 = Music_SafariZone_branch_bc89 + $7C79 = Music_SafariZone_branch_bc79 + $7CA5 = Music_SafariZone_branch_bca5 + $7C97 = Music_SafariZone_branch_bc97 + $7CD8 = Music_Gym_branch_bcd8 + $7D82 = Music_Gym_branch_bd82 + $7E3B = Music_Gym_branch_be3b + $7E44 = Music_Gym_branch_be44 + $7E4D = Music_Gym_branch_be4d + $7E02 = Music_Gym_branch_be02 + $7E61 = Music_Pokecenter_branch_be61 + $7F4E = Music_Pokecenter_branch_bf4e + $7F60 = Music_Pokecenter_branch_bf60 + $7EFC = Music_Pokecenter_branch_befc + $7FD9 = Music_Pokecenter_branch_bfd9 + $7FE2 = Music_Pokecenter_branch_bfe2 + $7FEB = Music_Pokecenter_branch_bfeb + $7F72 = Music_Pokecenter_branch_bf72 + $6913 = Music_UnusedSong_Ch1 + $69CF = Music_UnusedSong_Ch2 + SLACK: $000C bytes + +Bank #3: + SECTION: $4000-$7C5A ($3C5B bytes) + $4000 = _Joypad + $4335 = Func_c335 + $438B = CheckForceBikeOrSurf + $449D = Func_c49d + $43FF = Func_c3ff + $444E = Func_c44e + $435F = Func_c35f + $7236 = Func_f225 + $72C6 = Func_f2b5 + $7124 = Func_f113 + $4EB8 = LoadWildData + $404D = MapSongBanks + $423D = MapHeaderBanks + $452F = PrintSafariZoneSteps + $4E74 = RemoveItemFromInventory_ + $4E04 = AddItemToInventory_ + $55C7 = UseItem_ + $6702 = TossItem_ + $6775 = IsKeyItem_ + $72F6 = _AddPartyMon + $74AE = _AddEnemyMonToPlayerParty + $752F = Func_f51e + $7B61 = PrintBookshelfText + $7BD0 = IndigoPlateauStatues + $7C23 = TownMapText + $7BF9 = BookOrSculptureText + $7C1E = ElevatorText + $7C56 = PokemonStuffText + $403C = TrySoftReset + $43E6 = ForcedBikeOrSurfMaps + $4422 = PointerTable_c422 + $441E = Func_c3ff.asm_c41e + $442A = PointerTable_c422.asm_c42a + $4434 = PointerTable_c422.asm_4434 + $443A = PointerTable_c422.asm_443A + $4440 = PointerTable_c422.asm_4440 + $4589 = Func_c589 + $4477 = Func_c44e.pointerTable_c477 + $447F = Func_c44e.arrayData_c47f + $4487 = Func_c44e.arrayData_c487 + $448A = Func_c44e.arrayData_c48a + $448D = Func_c44e.arrayData_c48d + $44CC = WarpTileIDPointers + $44FC = OverworldWarpTileIDs + $4500 = RedsHouse1WarpTileIDs + $4503 = MartWarpTileIDs + $4505 = ForestWarpTileIDs + $4500 = RedsHouse2WarpTileIDs + $4509 = DojoWarpTileIDs + $4503 = PokecenterWarpTileIDs + $4509 = GymWarpTileIDs + $450B = HouseWarpTileIDs + $44FF = ForestGateWarpTileIDs + $44FF = MuseumWarpTileIDs + $452A = UndergroundWarpTileIDs + $44FF = GateWarpTileIDs + $450F = ShipWarpTileIDs + $452E = ShipPortWarpTileIDs + $4529 = CemeteryWarpTileIDs + $4514 = InteriorWarpTileIDs + $4518 = CavernWarpTileIDs + $451C = LobbyWarpTileIDs + $4520 = MansionWarpTileIDs + $4524 = LabWarpTileIDs + $452E = ClubWarpTileIDs + $4526 = FacilityWarpTileIDs + $452C = PlateauWarpTileIDs + $4579 = SafariSteps + $457E = SafariBallText + $45BE = Func_c5be + $4636 = Func_c636 + $474F = Func_c69c.asm_c74f + $48DE = Func_c8de + $47BE = Tilesets + $47B2 = DungeonTilesets + $4AEA = MapHS00 + $4AED = MapHS01 + $4AF3 = MapHS02 + $4AF9 = MapHS03 + $4AE7 = MapHSXX + $4B08 = MapHS0A + $4B35 = MapHS0D + $4B3B = MapHS0F + $4B3E = MapHS14 + $4B41 = MapHS17 + $4B4A = MapHS1A + $4B4D = MapHS1B + $4B50 = MapHS21 + $4B56 = MapHS23 + $4B5C = MapHS24 + $4B5F = MapHS27 + $4B68 = MapHS28 + $4B80 = MapHS2D + $4C16 = MapHS33 + $4B86 = MapHS34 + $4C1F = MapHS3B + $4C31 = MapHS3D + $4BD1 = MapHS53 + $4C0D = MapHS58 + $4C3D = MapHS60 + $4C40 = MapHS66 + $4C43 = MapHS67 + $4C49 = MapHS68 + $4D66 = MapHS6C + $4D6C = MapHS78 + $4BB9 = MapHS84 + $4BBC = MapHS87 + $4B92 = MapHS8F + $4B95 = MapHS90 + $4B98 = MapHS91 + $4BA1 = MapHS92 + $4BA4 = MapHS93 + $4BAA = MapHS94 + $4BB6 = MapHS95 + $4BBF = MapHS9B + $4D75 = MapHS9F + $4D7B = MapHSA0 + $4D81 = MapHSA1 + $4D8D = MapHSA2 + $4BC2 = MapHSA5 + $4BC8 = MapHSB1 + $4BCE = MapHSB5 + $4D6F = MapHSC0 + $4BFB = MapHSC2 + $4C52 = MapHSC6 + $4C5B = MapHSC7 + $4C61 = MapHSC8 + $4C6D = MapHSC9 + $4C73 = MapHSCA + $4C85 = MapHSCF + $4C94 = MapHSD0 + $4C9D = MapHSD1 + $4CAF = MapHSD2 + $4CC4 = MapHSD3 + $4CD3 = MapHSD4 + $4CEB = MapHSD5 + $4D1B = MapHSD6 + $4D1E = MapHSD7 + $4D24 = MapHSD8 + $4D33 = MapHSD9 + $4D3F = MapHSDA + $4D45 = MapHSDB + $4D51 = MapHSDC + $4D54 = MapHSE2 + $4D5D = MapHSE3 + $4B89 = MapHSE4 + $4CF4 = MapHSE9 + $4CFD = MapHSEA + $4D0F = MapHSEB + $4D18 = MapHSF4 + $4DAA = UsedStrengthText + $4DBB = CanMoveBouldersText + $4DF7 = CoordsData_cdf7 + $4DFA = CurrentTooFastText + $4DFF = CyclingIsFunText + $4E4A = AddItemToInventory_.increaseItemQuantity + $4E6A = AddItemToInventory_.success + $4E68 = AddItemToInventory_.storeNewQuantity + $4E21 = AddItemToInventory_.loop + $4EEB = WildDataPointers + $50DD = NoMons + $50DF = Route1Mons + $50F5 = Route2Mons + $5137 = Route3Mons + $518F = Route4Mons + $51E7 = Route5Mons + $51FD = Route6Mons + $5297 = Route7Mons + $5281 = Route8Mons + $51D1 = Route9Mons + $5255 = Route10Mons + $5213 = Route11Mons + $526B = Route12Mons + $531F = Route13Mons + $5335 = Route14Mons + $534B = Route15Mons + $5361 = Route16Mons + $5377 = Route17Mons + $538D = Route18Mons + $53FB = WaterMons + $54D7 = Route21Mons + $510B = Route22Mons + $5559 = Route23Mons + $51A5 = Route24Mons + $51BB = Route25Mons + $5121 = ForestMons + $514D = MoonMons1 + $5163 = MoonMonsB1 + $5179 = MoonMonsB2 + $5229 = TunnelMonsB1 + $5543 = PowerPlantMons + $559B = PlateauMons1 + $52AD = TowerMons1 + $52AF = TowerMons2 + $52B1 = TowerMons3 + $52C7 = TowerMons4 + $52DD = TowerMons5 + $52F3 = TowerMons6 + $5309 = TowerMons7 + $5427 = IslandMonsB1 + $543D = IslandMonsB2 + $5453 = IslandMonsB3 + $5469 = IslandMonsB4 + $547F = MansionMons1 + $5411 = IslandMons1 + $556F = PlateauMons2 + $55B1 = CaveMons + $5585 = PlateauMons3 + $5495 = MansionMons2 + $54AB = MansionMons3 + $54C1 = MansionMonsB1 + $53B9 = ZoneMons1 + $53CF = ZoneMons2 + $53E5 = ZoneMons3 + $53A3 = ZoneMonsCenter + $5517 = DungeonMons2 + $552D = DungeonMonsB1 + $5501 = DungeonMons1 + $523F = TunnelMonsB2 + $648A = ItemUseTMHM + $55E1 = ItemUsePtrTable + $5691 = ItemUseBall + $5979 = ItemUseTownMap + $5988 = ItemUseBicycle + $59C5 = ItemUseSurfboard + $5A67 = ItemUsePokedex + $5A6C = ItemUseEvoStone + $5ACC = ItemUseMedicine + $5F63 = ItemUseBait + $5F78 = ItemUseRock + $6487 = UnusableItem + $5FC0 = ItemUseEscapeRope + $6014 = ItemUseRepel + $5AC5 = ItemUseVitamin + $6024 = ItemUseXAccuracy + $6033 = ItemUseCardKey + $5687 = ItemThiefBall + $60DE = ItemUsePokedoll + $60ED = ItemUseGuardSpec + $60FC = ItemUseSuperRepel + $6101 = ItemUseMaxRepel + $6106 = ItemUseDireHit + $6115 = ItemUseXStat + $624B = ItemUseCoinCase + $62EF = ItemUseOaksParcel + $62F2 = ItemUseItemfinder + $6151 = ItemUsePokeflute + $625D = OldRodCode + $626A = GoodRodCode + $6294 = SuperRodCode + $6328 = ItemUsePPUp + $632F = ItemUsePPRestore + $6592 = ItemUseNotTime + $569C = BallAnyway + $659C = ThrowBallAtTrainerMon + $65C2 = BoxFullCannotThrowBall + $65F9 = ItemUseText00 + $5812 = BallAnyway.next12 + $579C = BallAnyway.BallSuccess + $5948 = ItemUseBallText00 + $5933 = BallAnyway.printText0 + $594D = ItemUseBallText01 + $5952 = ItemUseBallText02 + $5957 = ItemUseBallText03 + $595C = ItemUseBallText04 + $5961 = ItemUseBallText05 + $5972 = ItemUseBallText06 + $67B5 = Func_e7a4 + $5968 = ItemUseBallText07 + $596D = ItemUseBallText08 + $69D6 = ItemUseReloadOverworldData + $660D = GotOffBicycleText + $65BD = NoCyclingAllowedHere + $6603 = GotOnBicycleText + $68C9 = IsNextTileShoreOrWater + $65C7 = SurfingAttemptFailed + $5A39 = ItemUseSurfboard.makePlayerMoveForward + $5A5D = SurfingGotOnText + $5A62 = SurfingNoPlaceToGetOffText + $658D = ItemUseNoEffect + $5AF0 = ItemUseMedicine.emptyParty + $5AFA = ItemUseMedicine.emptyPartyText + $5DF2 = ItemUseMedicine.canceledItemUse + $5E0B = ItemUseMedicine.useVitamin + $5D84 = ItemUseMedicine.healingItemNoEffect + $5D8A = ItemUseMedicine.doneHealing + $5B5B = ItemUseMedicine.cureStatusAilment + $5CD6 = ItemUseMedicine.notUsingSoftboiled2 + $5DF8 = ItemUseMedicine.done + $6582 = RemoveUsedItem + $5E94 = ItemUseMedicine.useRareCandy + $5E85 = ItemUseMedicine.recalculateStats + $5F3F = VitaminText + $5F35 = VitaminStatRoseText + $5F3A = VitaminNoEffectText + $5FB6 = ThrewBaitText + $5FBB = ThrewRockText + $600E = EscapeRopeTilesets + $6574 = PrintItemUseTextAndRemoveItem + $4586 = Func_c586 + $6083 = CardKeyTable1 + $60AC = CardKeyTable2 + $60D5 = CardKeyTable3 + $6016 = ItemUseRepelCommon + $620E = Route12SnorlaxFluteCoords + $6226 = PlayedFluteHadEffectText + $6217 = Route16SnorlaxFluteCoords + $621C = PlayedFluteNoEffectText + $61F6 = WakeUpEntireParty + $6221 = FluteWokeUpText + $6258 = CoinCaseNumCoinsText + $62C5 = FishingInit + $6290 = GoodRodMons + $68FB = ReadSuperRodData + $6597 = ItemUseNotYoursToUse + $6323 = ItemfinderFoundNothingText + $631E = ItemfinderFoundItemText + $6462 = ItemUsePPRestore.itemNotUsed + $642C = ItemUsePPRestore.useElixir + $646E = RaisePPWhichTechniqueText + $6473 = RestorePPWhichTechniqueText + $66F4 = GetSelectedMoveOffset + $6478 = PPMaxedOutText + $6617 = RestoreBonusPP + $647D = PPIncreasedText + $6482 = PPRestoredText + $63F7 = ItemUsePPRestore.restorePP + $645F = ItemUsePPRestore.noEffect + $6688 = GetMaxPP + $63C6 = ItemUsePPRestore.afterRestoringPP + $6560 = BootedUpTMText + $6565 = BootedUpHMText + $656A = TeachMachineMoveText + $656F = MonCannotLearnMachineMoveText + $65DB = ItemUseNoEffectText + $65D1 = ItemUseNotTimeText + $65D6 = ItemUseNotYoursToUseText + $65E0 = ThrowBallAtTrainerMonText1 + $65E5 = ThrowBallAtTrainerMonText2 + $65EA = NoCyclingAllowedHereText + $65F4 = BoxFullCannotThrowBallText + $65EF = NoSurfingHereText + $6653 = AddBonusPP + $66FA = GetSelectedMoveOffset2 + $676B = IsItOKToTossItemText + $6766 = ThrewAwayItemText + $6770 = TooImportantToTossText + $67AA = KeyItemBitfield + $68F1 = WaterTilesets + $692A = SuperRodData + $698E = FishingGroup1 + $6998 = FishingGroup3 + $699F = FishingGroup4 + $69A4 = FishingGroup5 + $69CD = FishingGroup10 + $69BB = FishingGroup8 + $69B2 = FishingGroup7 + $6993 = FishingGroup2 + $69C4 = FishingGroup9 + $69A9 = FishingGroup6 + $6A01 = Func_e9f0 + $6AA7 = DrawBadges.FaceBadgeTiles + $6A5D = DrawBadges.DrawBadgeRow + $6AA2 = DrawBadges.PlaceTiles + $6F5F = Func_ef4e + $6F8E = NothingToCutText + $7003 = UsedCutText + $7008 = AnimateCutTree + $7111 = CutTreeBlockSwaps + $70B0 = Func_f09f + $6EED = Func_eedc + $705D = LoadCutTreeOAM + $7066 = asm_f055 + $7079 = Func_f068 + $7071 = CutTreeOAM + $70A0 = CutTreeAnimationOffsets + $70A8 = CutTreeAnimationOffsets2 + $48F5 = MapHSPointers + $71F7 = MissableObjectFlagAction + $72EE = Func_f2dd + $72C0 = MovementData_f2af + $72BE = MovementData_f2ad + $72C2 = MovementData_f2b1 + $72C4 = MovementData_f2b3 + $4034 = DiscardButtonPresses + $767A = FlagAction + $7487 = AddPartyMon_WriteMovePP + $7811 = Func_f800 + $77E8 = Func_f7d7 + $784A = SubBCD + $78B1 = InitializeEmptyList + $7186 = InitializeMissableObjectsFlags + $78D9 = Func_f8c8 + $79D0 = Func_f9bf + $79E3 = DataTable_f9d2 + $7AE8 = UpdateHPBar_CalcHPDifference + $7AE2 = UpdateHPBar_CompareNewHPToOldHP + $7B41 = UpdateHPBar_CalcOldNewHPBarPixels + $7B06 = UpdateHPBar_PrintHPNumber + $7AC2 = UpdateHPBar_AnimateHPBar + $79F0 = GetHPBarLength + $7B9C = BookshelfTileIDs + $7BEA = IndigoPlateauStatuesText1 + $7BEF = IndigoPlateauStatuesText2 + $7BF4 = IndigoPlateauStatuesText3 + $7C14 = PokemonBooksText + $7C19 = DiglettSculptureText + $4DC0 = CheckForForcedBikeSurf + $6AAF = GymLeaderFaceAndBadgeTileGraphics + $7143 = Func_f132 + $76B6 = HealParty + $772F = DivideBCDPredef + $772F = DivideBCDPredef2 + $782E = AddBCDPredef + $7847 = SubBCDPredef + $772F = DivideBCDPredef3 + $772F = DivideBCDPredef4 + $7861 = InitPlayerData + $7677 = FlagActionPredef + $71E8 = HideObject + $71B7 = IsObjectHidden + $469C = Func_c69c + $71D9 = ShowObject + $71D9 = ShowObject2 + $6EAF = Func_ee9e + $7861 = InitPlayerData2 + $4754 = Func_c754 + $78B6 = IsItemInBag_ + $78CB = Func_f8ba + $793A = Func_f929 + $79B1 = Func_f9a0 + $7A2E = UpdateHPBar + $79ED = HPBarLength + $6A14 = DrawBadges + $6F65 = UsedCut + $7A2E = UpdateHPBar2 + $460B = Func_c60b + $4D99 = PrintStrengthTxt + $7484 = LoadMovePPs + $69DC = Func_e9cb + $7831 = AddBCD + $7732 = DivideBCD + SLACK: $03A5 bytes + +Bank #4: + SECTION: $4000-$55BF ($15C0 bytes) + $4000 = GiovanniSprite + $4180 = RocketSprite + $4480 = OakAideSprite + $4600 = RockerSprite + $4780 = SwimmerSprite + $4900 = WhitePlayerSprite + $49C0 = GymHelperSprite + $4A80 = OldPersonSprite + $4B40 = MartGuySprite + $4C00 = FisherSprite + $4CC0 = OldMediumWomanSprite + $4D80 = NurseSprite + $4E40 = CableClubWomanSprite + $4F00 = MrMasterballSprite + $4FC0 = LaprasGiverSprite + $5080 = WardenSprite + $5140 = SsCaptainSprite + $5200 = Fisher2Sprite + $5380 = BlackbeltSprite + $5500 = GuardSprite + $4300 = RocketFSprite + SECTION: $55C0-$6B17 ($1558 bytes) + $5CC0 = FontGraphics + $64C8 = TextBoxGraphics + $60E0 = HpBarAndStatusGraphics + $6308 = NintendoCopyrightLogoGraphics + $6438 = GamefreakLogoGraphics + $55C0 = PokemonLogoGraphics + $68E8 = PlayerCharacterTitleGraphics + $62C0 = BattleHudTiles1 + $62D8 = BattleHudTiles2 + $62F0 = BattleHudTiles3 + $66C8 = PokedexTileGraphics + $67E8 = WorldMapTileGraphics + SECTION: $6B18-$7E3C ($1325 bytes) + $767D = ErasePartyMenuCursors + $79B0 = SwitchPartyMon + $6F12 = DrawPartyMenu_ + $6F23 = RedrawPartyMenu_ + $7404 = Func_13074 + $7425 = StartMenu_Pokedex + $7439 = StartMenu_Pokemon + $7692 = StartMenu_Item + $77F0 = StartMenu_TrainerInfo + $7980 = StartMenu_SaveReset + $7993 = StartMenu_Option + $711E = RedPicFront + $7DF5 = GetTrainerName_ + $7E2C = Random_ + $723D = LeafPicFront + $7378 = ShrinkPic1 + $73D2 = ShrinkPic2 + $6D24 = PrintStatsBox + $6B2A = Func_128ea + $6B64 = Func_12924 + $6D1C = PTile + $6D07 = DrawLineBox + $6CE5 = Type1Text + $6D04 = OKText + $6CFC = StatusText + $6CDD = NamePointers2 + $6CBE = StatusScreen.unk_12a7e + $6CD5 = OTPointers + $6D7A = StatsText + $6D70 = PrintStat + $6F0B = Func_12ccb + $6EEF = EXPPointsText + $6EC6 = StatusScreen2.asm_12c86 + $6F03 = Func_12cc3 + $705A = RedrawPartyMenu_.printMessage + $7055 = RedrawPartyMenu_.afterDrawingMonEntries + $7107 = SetPartyMenuHealthBarColor + $6FE3 = RedrawPartyMenu_.ableToLearnMoveText + $6FE8 = RedrawPartyMenu_.notAbleToLearnMoveText + $6F43 = RedrawPartyMenu_.loop + $704C = RedrawPartyMenu_.notAbleToEvolveText + $7047 = RedrawPartyMenu_.ableToEvolveText + $70B3 = PartyMenuMessagePointers + $70A1 = PartyMenuItemUseMessagePointers + $70DD = AntidoteText + $70E7 = BurnHealText + $70EC = IceHealText + $70F1 = AwakeningText + $70E2 = ParlyzHealText + $70D8 = PotionText + $70F6 = FullHealText + $70FB = ReviveText + $7100 = RareCandyText + $70BF = PartyMenuNormalText + $70C4 = PartyMenuItemUseText + $70C9 = PartyMenuBattleText + $70CE = PartyMenuUseTMText + $70D3 = PartyMenuSwapMonText + $744F = StartMenu_Pokemon.loop + $745B = StartMenu_Pokemon.exitMenu + $74D9 = StartMenu_Pokemon.choseStats + $74F0 = StartMenu_Pokemon.choseOutOfBattleMove + $79F0 = SwitchPartyMon_Stats + $7459 = StartMenu_Pokemon.checkIfPokemonChosen + $750C = StartMenu_Pokemon.outOfBattleMovePointers + $7550 = StartMenu_Pokemon.cut + $751E = StartMenu_Pokemon.fly + $7564 = StartMenu_Pokemon.surf + $7593 = StartMenu_Pokemon.strength + $75A3 = StartMenu_Pokemon.flash + $75BD = StartMenu_Pokemon.dig + $75D5 = StartMenu_Pokemon.teleport + $761A = StartMenu_Pokemon.softboiled + $766F = StartMenu_Pokemon.newBadgeRequired + $7615 = StartMenu_Pokemon.cannotFlyHereText + $7669 = StartMenu_Pokemon.goBackToMap + $75B8 = StartMenu_Pokemon.flashLightsAreaText + $7610 = StartMenu_Pokemon.cannotUseTeleportNowText + $760B = StartMenu_Pokemon.warpToLastPokemonCenterText + $765B = StartMenu_Pokemon.notHealthyEnough + $7664 = StartMenu_Pokemon.notHealthyEnoughText + $7678 = StartMenu_Pokemon.newBadgeRequiredText + $77BA = CannotUseItemsHereText + $7714 = StartMenu_Item.useOrTossItem + $768C = ItemMenuLoop + $77BF = CannotGetOffHereText + $77E9 = UsableItems_CloseMenu + $77C4 = UsableItems_PartyMenu + $7793 = StartMenu_Item.partyMenuNotDisplayed + $782A = DrawTrainerInfo + $7975 = TrainerInfo_DrawVerticalLine + $791C = TrainerInfo_FarCopyData + $793D = TrainerInfo_DrawTextBox + $7934 = TrainerInfo_BadgesText + $7921 = TrainerInfo_NameMoneyTimeText + $7960 = TrainerInfo_DrawHorizontalEdge + $796D = TrainerInfo_NextTextBoxRow + $79C2 = SwitchPartyMon_OAM + $7B10 = TechnicalMachines + $7BF0 = YouWinText + $7BF8 = YouLoseText + $7C01 = DrawText + $7C08 = PickUpPayDayMoneyText + $6B18 = Func_128d8 + $7CB5 = WildMonEncounterSlotChances + $7D3B = HitWithRecoilText + $7D72 = Func_139d5 + $7D6A = ConvertedTypeText + $7DE0 = Func_13a43 + $7DE7 = Func_13a4a + $7DD4 = Func_13a37 + $7DF0 = StatusChangesEliminatedText + $7C0D = Func_13870 + $7B47 = Func_137aa + $7CC9 = RecoilEffect_ + $7D40 = ConversionEffect_ + $7D77 = HazeEffect_ + $6B93 = StatusScreen + $6D97 = StatusScreen2 + $7ADB = CanLearnTM + $7B00 = TMToMove + $6B2F = DrawHP + $6B36 = Func_128f6 + SLACK: $01C3 bytes + +Bank #5: + SECTION: $4000-$783F ($3840 bytes) + $4180 = RedSprite + $4300 = LeafSprite + $76C0 = SeelSprite + $4000 = RedCyclingSprite + $4480 = LeafCyclingSprite + $4600 = BlueSprite + $4780 = OakSprite + $4900 = BugCatcherSprite + $4A80 = SlowbroSprite + $4C00 = LassSprite + $4D80 = BlackHairBoy1Sprite + $4F00 = LittleGirlSprite + $5080 = BirdSprite + $5200 = FatBaldGuySprite + $5380 = GamblerSprite + $5500 = BlackHairBoy2Sprite + $5680 = GirlSprite + $5800 = HikerSprite + $5980 = FoulardWomanSprite + $5B00 = GentlemanSprite + $5C80 = DaisySprite + $5E00 = BikerSprite + $5F80 = SailorSprite + $6100 = CookSprite + $6280 = BikeShopGuySprite + $6340 = MrFujiSprite + $64C0 = MediumSprite + $6640 = WaiterSprite + $67C0 = ErikaSprite + $6940 = MomGeishaSprite + $6AC0 = BrunetteGirlSprite + $6C40 = LanceSprite + $6DC0 = MomSprite + $6E80 = BaldingGuySprite + $6F40 = YoungBoySprite + $7000 = GameboyKidSprite + $70C0 = ClefairySprite + $7240 = AgathaSprite + $73C0 = BrunoSprite + $7540 = LoreleiSprite + SECTION: $7840-$7F5E ($071F bytes) + $785B = InitMapSprites + $7E2C = ActivatePC + $797B = InitOutsideMapSprites + $7957 = LoadMapSpriteTilePatterns.alreadyLoaded + $7B27 = SpriteSheetPointerTable + $7971 = ReadSpriteSheetData + $788D = LoadMapSpriteTilePatterns.loadTilePatternLoop + $7A64 = MapSpriteSets + $7A1A = GetSplitMapSpriteSetID + $7AB9 = SpriteSets + $7871 = LoadMapSpriteTilePatterns + $7A89 = SplitMapSpriteSets + $7CAF = EmotionBubblesPointerTable + $7CB5 = EmotionBubblesOAM + $7CBD = EmotionBubbles + $7E1D = SubstituteText + $7E22 = HasSubstituteText + $7E27 = TooWeakSubstituteText + $7F23 = TurnedOnPC1Text + $7F13 = LogOff + $7EE4 = BillsPC + $7EC0 = OaksPC + $7ED2 = PKMNLeague + $7F32 = AccessedMyPCText + $7F2D = AccessedSomeonesPCText + $7F28 = AccessedBillsPCText + $7E48 = PCMainMenu + $7F37 = RemoveItemByID + $7DAD = SubstituteEffectHandler + $7840 = LoadPokedexTilePatterns + $7C47 = EmotionBubble + $7D7D = EvolveTradeMon + SLACK: $00A1 bytes + +Bank #6: + SECTION: $4000-$6717 ($2718 bytes) + $42A1 = PalletTown_h + $4357 = ViridianCity_h + $4554 = PewterCity_h + $474E = CeruleanCity_h + $4998 = VermilionCity_h + $4000 = CeladonCity_h + $4BA7 = FuchsiaCity_h + $5B2F = BluesHouse_h + $5C4F = IndigoPlateauLobby_h + $5C06 = VermilionHouse3_h + $5CFF = SilphCo4_h + $5F2B = SilphCo5_h + $619D = SilphCo6_h + $6672 = HandleLedges + $4DEE = Func_18dee + $6442 = PointerTable_1a442 + $6510 = PointerTable_1a510 + $657D = PointerTable_1a57d + $63E0 = Func_1a3e0 + $641D = Func_1a41d + $65E7 = Func_1a5e7 + $6609 = HandleDoors + $40DF = CeladonCityBlocks + $5966 = CeladonCityTextPointers + $5956 = CeladonCityScript + $4022 = CeladonCityObject + $42FD = PalletTownBlocks + $4F88 = PalletTownTextPointers + $4E5B = PalletTownScript + $42C3 = PalletTownObject + $43EC = ViridianCityBlocks + $50E4 = ViridianCityTextPointers + $4FF1 = ViridianCityScript + $4384 = ViridianCityObject + $45E6 = PewterCityBlocks + $538B = PewterCityTextPointers + $5237 = PewterCityScript + $4577 = PewterCityObject + $4830 = CeruleanCityBlocks + $562D = CeruleanCityTextPointers + $5480 = CeruleanCityScript + $4786 = CeruleanCityObject + $4A3F = VermilionCityBlocks + $586F = VermilionCityTextPointers + $57A1 = VermilionCityScript + $49BA = VermilionCityObject + $4C86 = FuchsiaCityBlocks + $5A2E = FuchsiaCityTextPointers + $5A2B = FuchsiaCityScript + $4BD4 = FuchsiaCityObject + $4E36 = Func_18e36 + $4E73 = PalletTownScriptPointers + $4E81 = PalletTownScript0 + $4EB2 = PalletTownScript1 + $4ED2 = PalletTownScript2 + $4F12 = PalletTownScript3 + $4F4B = PalletTownScript4 + $4F56 = PalletTownScript5 + $4F87 = PalletTownScript6 + $4F96 = PalletTownText1 + $4FD3 = PalletTownText2 + $4FD8 = PalletTownText3 + $4FDD = PalletTownText4 + $4FE2 = PalletTownText5 + $4FE7 = PalletTownText6 + $4FEC = PalletTownText7 + $4FB0 = OakAppearsText + $4FCE = OakWalksUpText + $4FFD = ViridianCityScriptPointers + $5005 = ViridianCityScript0 + $5062 = ViridianCityScript1 + $508F = ViridianCityScript2 + $50C1 = ViridianCityScript3 + $500B = ViridianCityScript_1900b + $503D = ViridianCityScript_1903d + $50CF = ViridianCityScript_190cf + $5102 = ViridianCityText1 + $5107 = ViridianCityText2 + $512C = ViridianCityText3 + $515C = ViridianCityText4 + $517F = ViridianCityText5 + $5196 = ViridianCityText6 + $51DF = ViridianCityText7 + $521E = ViridianCityText8 + $5223 = ViridianCityText9 + $5228 = ViridianCityText10 + $522D = ViridianCityText13 + $5232 = ViridianCityText14 + $5219 = ViridianCityText15 + $5127 = ViridianCityText_19127 + $5122 = ViridianCityText_19122 + $514D = ViridianCityText_1914d + $5157 = ViridianCityText_19157 + $5152 = ViridianCityText_19152 + $5175 = ViridianCityText_19175 + $517A = ViridianCityText_1917a + $5191 = ViridianCityText_19191 + $51CA = ViridianCityText_191ca + $51CF = ReceivedTM42Text + $51DA = TM42NoRoomText + $51D5 = TM42Explanation + $520A = ViridianCityText_1920a + $520F = ViridianCityText_1920f + $5214 = ViridianCityText_19214 + $5243 = PewterCityScriptPointers + $5251 = PewterCityScript0 + $5280 = PewterCityScript1 + $52D3 = PewterCityScript2 + $52E9 = PewterCityScript3 + $5305 = PewterCityScript4 + $5359 = PewterCityScript5 + $536F = PewterCityScript6 + $525E = PewterCityScript_1925e + $5277 = CoordsData_19277 + $52CE = MovementData_PewterMuseumGuyExit + $5353 = MovementData_PewterGymGuyExit + $53A7 = PewterCityText1 + $53AC = PewterCityText2 + $53B1 = PewterCityText3 + $5405 = PewterCityText4 + $5436 = PewterCityText5 + $5467 = PewterCityText6 + $546C = PewterCityText7 + $5471 = PewterCityText10 + $5476 = PewterCityText11 + $547B = PewterCityText12 + $5400 = PewterCityText13 + $5462 = PewterCityText14 + $53F1 = PewterCityText_193f1 + $53F6 = PewterCityText_193f6 + $53FB = PewterCityText_193fb + $5427 = PewterCityText_19427 + $542C = PewterCityText_1942c + $5431 = PewterCityText_19431 + $545D = PewterCityText_1945d + $549D = CeruleanCityScriptPointers + $54C8 = CeruleanCityScript0 + $5567 = CeruleanCityScript1 + $55B1 = CeruleanCityScript2 + $5610 = CeruleanCityScript3 + $54A7 = CeruleanCityScript4 + $548C = CeruleanCityScript_1948c + $554F = CeruleanCityCoords1 + $5554 = CeruleanCityCoords2 + $5559 = CeruleanCityMovement1 + $566D = CeruleanCityText_1966d + $5672 = CeruleanCityText_19672 + $555D = CeruleanCityScript_1955d + $5608 = CeruleanCityMovement4 + $5600 = CeruleanCityMovement3 + $564F = CeruleanCityText1 + $567C = CeruleanCityText2 + $56F8 = CeruleanCityText3 + $56FD = CeruleanCityText4 + $5702 = CeruleanCityText5 + $5707 = CeruleanCityText6 + $570C = CeruleanCityText7 + $573F = CeruleanCityText8 + $5783 = CeruleanCityText9 + $5788 = CeruleanCityText10 + $5707 = CeruleanCityText11 + $578D = CeruleanCityText12 + $5792 = CeruleanCityText13 + $5797 = CeruleanCityText16 + $579C = CeruleanCityText17 + $5677 = CeruleanCityText_19677 + $5668 = CeruleanCityText_19668 + $56D9 = CeruleanCityText_196d9 + $56EE = CeruleanCityText_196ee + $56F3 = CeruleanCityText_196f3 + $56E9 = TM28NoRoomText + $56DE = ReceivedTM28Text + $5730 = CeruleanCityText_19730 + $5735 = CeruleanCityText_19735 + $573A = CeruleanCityText_1973a + $576F = CeruleanCityText_1976f + $5774 = CeruleanCityText_19774 + $5779 = CeruleanCityText_19779 + $577E = CeruleanCityText_1977e + $57CB = VermilionCityScript_197cb + $57C0 = VermilionCityScript_197c0 + $57DC = VermilionCityScriptPointers + $57E6 = VermilionCityScript0 + $585F = VermilionCityScript1 + $5833 = VermilionCityScript2 + $584E = VermilionCityScript3 + $5826 = VermilionCityScript4 + $5823 = CoordsData_19823 + $5889 = VermilionCityText1 + $588E = VermilionCityText2 + $58B1 = VermilionCityText3 + $591D = VermilionCityText4 + $5922 = VermilionCityText5 + $5938 = VermilionCityText6 + $593D = VermilionCityText7 + $5942 = VermilionCityText8 + $5947 = VermilionCityText11 + $594C = VermilionCityText12 + $5951 = VermilionCityText13 + $58A7 = VermilionCityText_198a7 + $58AC = VermilionCityText_198ac + $58FF = VermilionCityCoords1 + $5904 = SSAnneWelcomeText4 + $5909 = SSAnneWelcomeText9 + $5913 = SSAnneNoTicketText + $590E = SSAnneFlashedTicketText + $5918 = SSAnneNotHereText + $5933 = VermilionCityText14 + $598A = CeladonCityText1 + $598F = CeladonCityText2 + $5994 = CeladonCityText3 + $5999 = CeladonCityText4 + $599E = CeladonCityText5 + $59E7 = CeladonCityText6 + $59EC = CeladonCityText7 + $59F9 = CeladonCityText8 + $59FE = CeladonCityText9 + $5A03 = CeladonCityText10 + $5A08 = CeladonCityText11 + $5A0D = CeladonCityText13 + $5A12 = CeladonCityText14 + $5A17 = CeladonCityText15 + $5A1C = CeladonCityText16 + $5A21 = CeladonCityText17 + $5A26 = CeladonCityText18 + $59D2 = TM41PreText + $59E2 = TM41NoRoomText + $59D7 = ReceivedTM41Text + $59DD = TM41ExplanationText + $5A5E = FuchsiaCityText1 + $5A63 = FuchsiaCityText2 + $5A68 = FuchsiaCityText3 + $5A6D = FuchsiaCityText4 + $5A72 = FuchsiaCityText5 + $5A72 = FuchsiaCityText6 + $5A72 = FuchsiaCityText7 + $5A72 = FuchsiaCityText8 + $5A72 = FuchsiaCityText9 + $5A72 = FuchsiaCityText10 + $5A77 = FuchsiaCityText11 + $5A77 = FuchsiaCityText12 + $5A7C = FuchsiaCityText13 + $5A81 = FuchsiaCityText16 + $5A86 = FuchsiaCityText17 + $5A8B = FuchsiaCityText18 + $5A90 = FuchsiaCityText19 + $5AA4 = FuchsiaCityText20 + $5AB8 = FuchsiaCityText21 + $5ACC = FuchsiaCityText22 + $5AE0 = FuchsiaCityText23 + $5AF4 = FuchsiaCityText24 + $5A9F = FuchsiaCityChanseyText + $5AB3 = FuchsiaCityVoltorbText + $5AC7 = FuchsiaCityKangaskhanText + $5ADB = FuchsiaCitySlowpokeText + $5AEF = FuchsiaCityLaprasText + $5B2A = FuchsiaCityText_19b2a + $5B20 = FuchsiaCityOmanyteText + $5B25 = FuchsiaCityKabutoText + $5BF6 = BluesHouseBlocks + $5B57 = BluesHouseTextPointers + $5B3B = BluesHouseScript + $5BCE = BluesHouseObject + $5B47 = BluesHouseScriptPointers + $5B4B = BluesHouseScript0 + $5B56 = BluesHouseScript1 + $5B5D = BluesHouseText1 + $5BC4 = BluesHouseText2 + $5BC9 = BluesHouseText3 + $5BAA = DaisyInitialText + $5BAF = DaisyOfferMapText + $5BB4 = GotMapText + $5BBF = DaisyUseMapText + $5BBA = DaisyBagFullText + $5C3F = VermilionHouse3Blocks + $5C15 = VermilionHouse3TextPointers + $5C12 = VermilionHouse3Script + $5C25 = VermilionHouse3Object + $5C17 = VermilionHouse3Text1 + $5CCF = IndigoPlateauLobbyBlocks + $5C7F = IndigoPlateauLobbyTextPointers + $5C5B = IndigoPlateauLobbyScript + $5C95 = IndigoPlateauLobbyObject + $5C89 = IndigoPlateauLobbyText1 + $5C8A = IndigoPlateauLobbyText2 + $5C8F = IndigoPlateauLobbyText3 + $5C94 = IndigoPlateauLobbyText5 + $5EA4 = SilphCo4Blocks + $5DA0 = SilphCo4TextPointers + $5D0B = SilphCo4Script + $5E35 = SilphCo4Object + $5D21 = SilphCo4Script_19d21 + $5DAE = SilphCo4TrainerHeaders + $5D9A = SilphCo4ScriptPointers + $5D58 = SilphCo4Data19d58 + $5D5D = SilphCo4Script_19d5d + $5D89 = SilphCo4Script_19d89 + $5DD3 = SilphCo4Text1 + $5DEA = SilphCo4Text2 + $5E03 = SilphCo4Text3 + $5E1C = SilphCo4Text4 + $5DF4 = SilphCo4BattleText2 + $5DFE = SilphCo4AfterBattleText2 + $5DF9 = SilphCo4EndBattleText2 + $5E0D = SilphCo4BattleText3 + $5E17 = SilphCo4AfterBattleText3 + $5E12 = SilphCo4EndBattleText3 + $5E26 = SilphCo4BattleText4 + $5E30 = SilphCo4AfterBattleText4 + $5E2B = SilphCo4EndBattleText4 + $5DE0 = SilphCo4Text_19de0 + $5DE5 = SilphCo4Text_19de5 + $622F = SilphCo6Script_1a22f + $5DAE = SilphCo4TrainerHeader0 + $5DBA = SilphCo4TrainerHeader2 + $5DC6 = SilphCo4TrainerHeader3 + $6116 = SilphCo5Blocks + $5FBC = SilphCo5TextPointers + $5F37 = SilphCo5Script + $608D = SilphCo5Object + $5F4D = SilphCo5Script_19f4d + $5FD2 = SilphCo5TrainerHeaders + $5FB6 = SilphCo5ScriptPointers + $5F97 = SilphCo5Coords + $5F9E = SilphCo5Script_19f9e + $6003 = SilphCo5Text1 + $601A = SilphCo5Text2 + $6033 = SilphCo5Text3 + $604C = SilphCo5Text4 + $6065 = SilphCo5Text5 + $607E = SilphCo5Text9 + $6083 = SilphCo5Text10 + $6088 = SilphCo5Text11 + $6024 = SilphCo5BattleText2 + $602E = SilphCo5AfterBattleText2 + $6029 = SilphCo5EndBattleText2 + $603D = SilphCo5BattleText3 + $6047 = SilphCo5AfterBattleText3 + $6042 = SilphCo5EndBattleText3 + $6056 = SilphCo5BattleText4 + $6060 = SilphCo5AfterBattleText4 + $605B = SilphCo5EndBattleText4 + $606F = SilphCo5BattleText5 + $6079 = SilphCo5AfterBattleText5 + $6074 = SilphCo5EndBattleText5 + $6010 = SilphCo5Text_1a010 + $6015 = SilphCo5Text_1a015 + $5FD2 = Silphco5TrainerHeader0 + $5FDE = Silphco5TrainerHeader2 + $5FEA = Silphco5TrainerHeader3 + $5FF6 = Silphco5TrainerHeader4 + $636B = SilphCo6Blocks + $61F6 = SilphCo6TextPointers + $61A9 = SilphCo6Script + $62FB = SilphCo6Object + $61BF = SilphCo6Script_1a1bf + $620A = SilphCo6TrainerHeaders + $61F0 = SilphCo6ScriptPointers + $61E3 = SilphCo6Coords1 + $61E6 = SilphCo6Script_1a1e6 + $623D = SilphCo6Text1 + $6254 = SilphCo6Text2 + $626B = SilphCo6Text3 + $6282 = SilphCo6Text4 + $6299 = SilphCo6Text5 + $62B0 = SilphCo6Text6 + $62C9 = SilphCo6Text7 + $62E2 = SilphCo6Text8 + $62BA = SilphCo6BattleText2 + $62C4 = SilphCo6AfterBattleText2 + $62BF = SilphCo6EndBattleText2 + $62D3 = SilphCo6BattleText3 + $62DD = SilphCo6AfterBattleText3 + $62D8 = SilphCo6EndBattleText3 + $62EC = SilphCo6BattleText4 + $62F6 = SilphCo6AfterBattleText4 + $62F1 = SilphCo6EndBattleText4 + $624A = SilphCo6Text_1a24a + $624F = SilphCo6Text_1a24f + $6261 = SilphCo6Text_1a261 + $6266 = SilphCo6Text_1a266 + $6278 = SilphCo6Text_1a278 + $627D = SilphCo6Text_1a27d + $628F = SilphCo6Text_1a28f + $6294 = SilphCo6Text_1a294 + $62A6 = SilphCo6Text_1a2a6 + $62AB = SilphCo6Text_1a2ab + $620A = SilphCo6TrainerHeader0 + $6216 = SilphCo6TrainerHeader2 + $6222 = SilphCo6TrainerHeader3 + $644C = Func_1a44c + $6485 = Func_1a485 + $64A1 = Func_1a4a1 + $64A6 = Func_1a4a6 + $64F4 = Func_1a4f4 + $64E9 = RLEList_1a4e9 + $64DC = RLEList_1a4dc + $6514 = Func_1a514 + $656B = Func_1a56b + $6559 = RLEList_PewterMuseumPlayer + $6562 = RLEList_PewterMuseumGuy + $6581 = Func_1a581 + $65CD = RLEList_PewterGymPlayer + $65DA = RLEList_PewterGymGuy + $6605 = RivalIDs + $662C = DoorTileIDPointers + $6654 = OverworldDoorTileIDs + $6657 = ForestDoorTileIDs + $6659 = MartDoorTileIDs + $665B = HouseDoorTileIDs + $665D = TilesetMuseumDoorTileIDs + $665F = ShipDoorTileIDs + $6661 = LobbyDoorTileIDs + $6665 = MansionDoorTileIDs + $6669 = LabDoorTileIDs + $666B = FacilityDoorTileIDs + $666F = PlateauDoorTileIDs + $66CF = LedgeTiles + $66F0 = LoadHoppingShadowOAM + $6708 = LedgeHoppingShadow + $6710 = LedgeHoppingShadowOAM + SLACK: $18E8 bytes + +Bank #7: + SECTION: $4000-$6B45 ($2B46 bytes) + $4000 = CinnabarIsland_h + $40C3 = Route1_h + $4986 = OaksLab_h + $52E6 = ViridianMart_h + $53C4 = School_h + $5401 = ViridianHouse_h + $5D28 = DiglettsCaveRoute2_h + $5D65 = Route2House_h + $546B = PewterHouse1_h + $54C0 = PewterHouse2_h + $54FD = CeruleanHouseTrashed_h + $556E = CeruleanHouse1_h + $55B4 = BikeShop_h + $5DAB = Route5Gate_h + $5EB5 = Route6Gate_h + $5F78 = Route7Gate_h + $603F = Route8Gate_h + $6101 = UndergroundPathEntranceRoute8_h + $613E = PowerPlant_h + $6432 = DiglettsCaveEntranceRoute11_h + $65E2 = BillsHouse_h + $5974 = VermilionHouse1_h + $59CA = VermilionDock_h + $5BB2 = CeladonMansion5_h + $5720 = LavenderHouse1_h + $5826 = LavenderHouse2_h + $5C00 = FuchsiaMart_h + $5C55 = SaffronHouse1_h + $5CB4 = SaffronHouse2_h + $6470 = Route16House_h + $64FB = Route22Gate_h + $588A = NameRater_h + $680C = SafariZoneCheck + $681B = SafariZoneCheckSteps + $6871 = PrintSafariGameOverText + $421E = MonsterNames + $698E = CinnabarGymQuiz_1eb0a + $67E4 = PushStartText + $6802 = SaveOptionText + $6807 = StrengthsAndWeaknessesText + $6B41 = OakLabEmailText + $6A61 = BillsHouseMonitorText + $6A66 = BillsHouseInitiatedText + $6A89 = BillsHousePokemonList + $69ED = MagazinesText + $68A9 = CinnabarGymQuiz + $67D7 = NewBicycleText + $480E = Func_1c98a + $6799 = OpenOaksPC + $40FC = Route1Blocks + $4069 = CinnabarIslandBlocks + $4905 = CinnabarIslandTextPointers + $489D = CinnabarIslandScript + $4022 = CinnabarIslandObject + $4936 = Route1TextPointers + $4933 = Route1Script + $40E5 = Route1Object + $4845 = ClearSaveDataText + $4898 = WhichFloorText + $4891 = Func_1ca0d + $48B8 = CinnabarIslandScriptPointers + $48BC = CinnabarIslandScript0 + $48F7 = CinnabarIslandScript1 + $491A = CinnabarIslandText1 + $491F = CinnabarIslandText2 + $4924 = CinnabarIslandText3 + $4929 = CinnabarIslandText6 + $492E = CinnabarIslandText7 + $4915 = CinnabarIslandText8 + $493C = Route1Text1 + $497C = Route1Text2 + $4981 = Route1Text3 + $4967 = Route1ViridianMartSampleText + $496C = Route1Text_1cae8 + $4977 = Route1Text_1caf3 + $4972 = Route1Text_1caee + $41C0 = OaksLabBlocks + $4F06 = OaksLabTextPointers + $4992 = OaksLabScript + $528E = OaksLabObject + $4EFA = OaksLabScript_1d076 + $49AC = OaksLabScriptPointers + $49D2 = OaksLabScript0 + $49F2 = OaksLabScript1 + $4A06 = OaksLabScript2 + $4A26 = OaksLabScript3 + $4A56 = OaksLabScript4 + $4A81 = OaksLabScript5 + $4ABA = OaksLabScript6 + $4AF6 = OaksLabScript7 + $4B04 = OaksLabScript8 + $4B84 = OaksLabScript9 + $4BF1 = OaksLabScript10 + $4C3D = OaksLabScript11 + $4C87 = OaksLabScript12 + $4CB6 = OaksLabScript13 + $4CF1 = OaksLabScript14 + $4D34 = OaksLabScript15 + $4D96 = OaksLabScript16 + $4E58 = OaksLabScript17 + $4E8D = OaksLabScript18 + $4A02 = OakEntryMovement + $4A53 = PlayerEntryMovementRLE + $4B20 = OaksLabScript8.MiddleBallMovement1 + $4B27 = OaksLabScript8.MiddleBallMovement2 + $4B3B = OaksLabScript8.RightBallMovement1 + $4B43 = OaksLabScript8.RightBallMovement2 + $4B73 = OaksLabScript8.LeftBallMovement1 + $4B75 = OaksLabScript8.LeftBallMovement2 + $5242 = OaksLabText_1d3be + $5247 = OaksLabText_1d3c3 + $4CEA = OaksLabScript13.RivalExitMovement + $4EAF = OaksLabScript_1d02b + $4D81 = OaksLabScript_1cefd + $4F52 = OaksLabText1 + $4F86 = OaksLabText2 + $4F97 = OaksLabText3 + $4FA8 = OaksLabText4 + $50CC = OaksLabText5 + $51A6 = OaksLabText6 + $51A6 = OaksLabText7 + $51B5 = OaksLabText8 + $51BA = OaksLabText9 + $527F = OaksLabText10 + $527F = OaksLabText11 + $5205 = OaksLabText12 + $5214 = OaksLabText13 + $5223 = OaksLabText14 + $5233 = OaksLabText15 + $524C = OaksLabText16 + $51C9 = OaksLabText17 + $51D8 = OaksLabText18 + $51E7 = OaksLabText19 + $51F6 = OaksLabText20 + $525B = OaksLabText21 + $5260 = OaksLabText22 + $5265 = OaksLabText23 + $526A = OaksLabText24 + $526F = OaksLabText25 + $5275 = OaksLabText26 + $527A = OaksLabText27 + $4F52 = OaksLabText28 + $4F86 = OaksLabText29 + $4F97 = OaksLabText30 + $4FA8 = OaksLabText31 + $50CC = OaksLabText32 + $51A6 = OaksLabText33 + $51A6 = OaksLabText34 + $51B5 = OaksLabText35 + $51BA = OaksLabText36 + $527F = OaksLabText37 + $527F = OaksLabText38 + $4F77 = OaksLabGaryText1 + $4F7C = OaksLabText40 + $4F81 = OaksLabText41 + $50B1 = OaksLabScript_1d22d + $4FD6 = OaksLabText39 + $501E = OaksLabCharmanderText + $5028 = OaksLabSquirtleText + $5032 = OaksLabBulbasaurText + $50A6 = OaksLabMonEnergeticText + $50AB = OaksLabReceivedMonText + $50C7 = OaksLabLastMonText + $51A1 = OaksLabText_1d31d + $5171 = OaksLabText5.asm_0f042 + $5174 = OaksLabText_1d2f0 + $5179 = OaksLabText_1d2f5 + $517E = OaksLabText_1d2fa + $5183 = OaksLabDeliverParcelText + $4E8E = OaksLabScript_1d00a + $518D = OaksLabAroundWorldText + $5192 = OaksLabGivePokeballsText + $519C = OaksLabPleaseVisitText + $51B0 = OaksLabText_1d32c + $51C4 = OaksLabText_1d340 + $51D3 = OaksLabRivalWaitingText + $51E2 = OaksLabChooseMonText + $51F1 = OaksLabRivalInterjectionText + $5200 = OaksLabBePatientText + $520F = OaksLabLeavingText + $521E = OaksLabRivalPickingMonText + $522D = OaksLabRivalReceivedMonText + $523D = OaksLabRivalChallengeText + $5256 = OaksLabRivalToughenUpText + $5289 = OaksLabText_1d405 + $53B4 = ViridianMartBlocks + $5364 = ViridianMartTextPointers + $52F2 = ViridianMartScript + $538E = ViridianMartObject + $5301 = ViridianMartScript_1d47d + $5319 = ViridianMartScriptPointers + $531F = ViridianMartScript0 + $5344 = ViridianMartScript1 + $5363 = ViridianMartScript2 + $533F = RLEMovement1d4bb + $5374 = ViridianMartText1 + $5384 = ViridianMartText2 + $5389 = ViridianMartText3 + $5379 = ViridianMartText4 + $537E = ViridianMartText5 + $41EE = SchoolBlocks + $53D3 = SchoolTextPointers + $53D0 = SchoolScript + $53E1 = SchoolObject + $53D7 = SchoolText1 + $53DC = SchoolText2 + $41DE = ViridianHouseBlocks + $5411 = ViridianHouseTextPointers + $540E = ViridianHouseScript + $543F = ViridianHouseObject + $5419 = ViridianHouseText1 + $541E = ViridianHouseText2 + $5423 = ViridianHouseText3 + $543A = ViridianHouseText4 + $5435 = ViridianHouseText_1d5b1 + $41DE = PewterHouse1Blocks + $547A = PewterHouse1TextPointers + $5477 = PewterHouse1Script + $549A = PewterHouse1Object + $5480 = PewterHouse1Text1 + $5490 = PewterHouse1Text2 + $5495 = PewterHouse1Text3 + $41DE = PewterHouse2Blocks + $54CF = PewterHouse2TextPointers + $54CC = PewterHouse2Script + $54DD = PewterHouse2Object + $54D3 = PewterHouse2Text1 + $54D8 = PewterHouse2Text2 + $41FE = CeruleanHouseTrashedBlocks + $550D = CeruleanHouseTrashedTextPointers + $5509 = CeruleanHouseTrashedScript + $5543 = CeruleanHouseTrashedObject + $5513 = CeruleanHouseTrashedText1 + $5539 = CeruleanHouseTrashedText2 + $553E = CeruleanHouseTrashedText3 + $5534 = CeruleanHouseTrashedText_1d6b0 + $552F = CeruleanHouseTrashedText_1d6ab + $41DE = CeruleanHouse1Blocks + $557D = CeruleanHouse1TextPointers + $557A = CeruleanHouse1Script + $5594 = CeruleanHouse1Object + $5581 = CeruleanHouse1Text1 + $5586 = CeruleanHouse1Text2 + $5710 = BikeShopBlocks + $55C3 = BikeShopTextPointers + $55C0 = BikeShopScript + $56EA = BikeShopObject + $55C9 = BikeShopText1 + $56BD = BikeShopText2 + $56CC = BikeShopText3 + $56B3 = BikeShopText_1d82f + $5679 = BikeShopText1.Done + $56A3 = BikeShopText_1d81f + $56A8 = BikeShopText_1d824 + $56B8 = BikeShopText_1d834 + $5694 = BikeShopText_1d810 + $567C = BikeShopMenuText + $568B = BikeShopMenuPrice + $5699 = BikeShopText_1d815 + $569E = BikeShopText_1d81a + $56AE = BikeShopText_1d82a + $56C7 = BikeShopText_1d843 + $56E5 = BikeShopText_1d861 + $56E0 = BikeShopText_1d85c + $41DE = LavenderHouse1Blocks + $5730 = LavenderHouse1TextPointers + $572C = LavenderHouse1Script + $57EE = LavenderHouse1Object + $573C = LavenderHouse1Text1 + $575F = LavenderHouse1Text2 + $5782 = LavenderHouse1Text3 + $578F = LavenderHouse1Text4 + $579C = LavenderHouse1Text5 + $57E9 = LavenderHouse1Text6 + $5755 = LavenderHouse1Text_1d8d1 + $575A = LavenderHouse1Text_1d8d6 + $5778 = LavenderHouse1Text_1d8f4 + $577D = LavenderHouse1Text_1d8f9 + $57D0 = LavenderHouse1Text_1d94c + $57D5 = ReceivedFluteText + $57DF = FluteNoRoomText + $57E4 = MrFujiAfterFluteText + $41DE = LavenderHouse2Blocks + $5836 = LavenderHouse2TextPointers + $5832 = LavenderHouse2Script + $586A = LavenderHouse2Object + $583A = LavenderHouse2Text1 + $5847 = LavenderHouse2Text2 + $5860 = LavenderHouse2Text_1d9dc + $5865 = LavenderHouse2Text_1d9e1 + $41DE = NameRaterBlocks + $58D8 = NameRaterTextPointers + $5896 = NameRaterScript + $595A = NameRaterObject + $58CB = NameRaterScript_1da20.asm_1da47 + $58DA = NameRaterText1 + $5937 = NameRaterText_1dab3 + $5899 = NameRaterScript_1da15 + $593C = NameRaterText_1dab8 + $58A4 = NameRaterScript_1da20 + $5955 = NameRaterText_1dad1 + $5941 = NameRaterText_1dabd + $5946 = NameRaterText_1dac2 + $594B = NameRaterText_1dac7 + $5950 = NameRaterText_1dacc + $41DE = VermilionHouse1Blocks + $5984 = VermilionHouse1TextPointers + $5980 = VermilionHouse1Script + $59A4 = VermilionHouse1Object + $598A = VermilionHouse1Text1 + $598F = VermilionHouse1Text2 + $599F = VermilionHouse1Text3 + $5B5E = VermilionDockBlocks + $5B43 = VermilionDockTextPointers + $59D6 = VermilionDockScript + $5B4A = VermilionDockObject + $5A1F = VermilionDock_1db9b + $5ADD = VermilionDock_1dc59 + $5AC6 = VermilionDock_1dc42 + $5B00 = VermilionDock_1dc7c + $5B18 = VermilionDock_1dc94 + $5AF8 = VermilionDockOAMBlock + $5B0A = VermilionDock_1dc7c.asm_1dc86 + $5B45 = VermilionDockText1 + $41EE = CeladonMansion5Blocks + $5BC1 = CeladonMansion5TextPointers + $5BBE = CeladonMansion5Script + $5BE0 = CeladonMansion5Object + $5BC5 = CeladonMansion5Text1 + $5BCA = CeladonMansion5Text2 + $5C45 = FuchsiaMartBlocks + $5C0F = FuchsiaMartTextPointers + $5C0C = FuchsiaMartScript + $5C1F = FuchsiaMartObject + $5C15 = FuchsiaMartText2 + $5C1A = FuchsiaMartText3 + $41DE = SaffronHouse1Blocks + $5C64 = SaffronHouse1TextPointers + $5C61 = SaffronHouse1Script + $5C88 = SaffronHouse1Object + $5C6C = SaffronHouse1Text1 + $5C71 = SaffronHouse1Text2 + $5C7E = SaffronHouse1Text3 + $5C83 = SaffronHouse1Text4 + $41DE = SaffronHouse2Blocks + $5CC3 = SaffronHouse2TextPointers + $5CC0 = SaffronHouse2Script + $5D0E = SaffronHouse2Object + $5CC5 = SaffronHouse2Text1 + $5CF9 = TM29PreReceiveText + $5CFE = ReceivedTM29Text + $5D09 = TM29NoRoomText + $5D04 = TM29ExplanationText + $420E = DiglettsCaveRoute2Blocks + $5D3C = DiglettsCaveRoute2TextPointers + $5D34 = DiglettsCaveRoute2Script + $5D43 = DiglettsCaveRoute2Object + $5D3E = DiglettsCaveRoute2Text1 + $41DE = Route2HouseBlocks + $5D74 = Route2HouseTextPointers + $5D71 = Route2HouseScript + $5D8B = Route2HouseObject + $5D78 = Route2HouseText1 + $5D7D = Route2HouseText2 + $5EA9 = Route5GateBlocks + $5E28 = Route5GateTextPointers + $5DB7 = Route5GateScript + $5E7F = Route5GateObject + $5DC3 = Route5GateScriptPointers + $5DD4 = Route5GateScript0 + $5E18 = Route5GateScript1 + $5E13 = CoordsData_1df8f + $5DC7 = Route5GateScript_1df43 + $5E2E = Route5GateText1 + $5E6B = Route5GateText2 + $5E70 = Route5GateText3 + $5E7A = SaffronGateText_1dff6 + $5F6C = Route6GateBlocks + $5F3C = Route6GateTextPointers + $5EC1 = Route6GateScript + $5F42 = Route6GateObject + $5ECE = Route6GateScriptPointers + $5ED2 = Route6GateScript0 + $5F15 = Route6GateScript1 + $5F10 = CoordsData_1e08c + $5F25 = Route6GateScript_1e0a1 + $5E2E = Route6GateText1 + $5E6B = Route6GateText2 + $5E70 = Route6GateText3 + $6033 = Route7GateBlocks + $6003 = Route7GateTextPointers + $5F84 = Route7GateScript + $6009 = Route7GateObject + $5F91 = Route7GateScriptPointers + $5FAC = Route7GateScript0 + $5FF0 = Route7GateScript1 + $5FEB = CoordsData_1e167 + $5F95 = Route7GateScript_1e111 + $5E2E = Route7GateText1 + $5E6B = Route7GateText2 + $5E70 = Route7GateText3 + $60F5 = Route8GateBlocks + $60C5 = Route8GateTextPointers + $604B = Route8GateScript + $60CB = Route8GateObject + $6057 = Route8GateScriptPointers + $6072 = Route8GateScript0 + $60B5 = Route8GateScript1 + $60B0 = CoordsData_1e22c + $605B = Route8GateScript_1e1d7 + $5E2E = Route8GateText1 + $5E6B = Route8GateText2 + $5E70 = Route8GateText3 + $41B0 = UndergroundPathEntranceRoute8Blocks + $6115 = UndergroundPathEntranceRoute8TextPointers + $610D = UndergroundPathEntranceRoute8Script + $611C = UndergroundPathEntranceRoute8Object + $6117 = UndergroundPathEntranceRoute8Text1 + $62CA = PowerPlantBlocks + $6163 = PowerPlantTextPointers + $614A = PowerPlantScript + $6243 = PowerPlantObject + $617F = PowerPlantTrainerHeaders + $615D = PowerPlantScriptPointers + $61F8 = PowerPlantText1 + $61FE = PowerPlantText2 + $6204 = PowerPlantText3 + $620A = PowerPlantText4 + $6210 = PowerPlantText5 + $6216 = PowerPlantText6 + $621C = PowerPlantText7 + $6222 = PowerPlantText8 + $6228 = PowerPlantText9 + $622E = VoltorbBattleText + $6233 = ZapdosBattleText + $617F = PowerPlantTrainerHeader0 + $618B = PowerPlantTrainerHeader1 + $6197 = PowerPlantTrainerHeader2 + $61A3 = PowerPlantTrainerHeader3 + $61AF = PowerPlantTrainerHeader4 + $61BB = PowerPlantTrainerHeader5 + $61C7 = PowerPlantTrainerHeader6 + $61D3 = PowerPlantTrainerHeader7 + $61DF = PowerPlantTrainerHeader8 + $420E = DiglettsCaveEntranceRoute11Blocks + $6447 = DiglettsCaveEntranceRoute11TextPointers + $643E = DiglettsCaveEntranceRoute11Script + $644E = DiglettsCaveEntranceRoute11Object + $6449 = DiglettsCaveEntranceRoute11Text1 + $41DE = Route16HouseBlocks + $647F = Route16HouseTextPointers + $647C = Route16HouseScript + $64DB = Route16HouseObject + $6483 = Route16HouseText1 + $64C4 = Route16HouseText2 + $64BA = HM02ExplanationText + $64AF = Route16HouseText3 + $64B4 = ReceivedHM02Text + $64BF = HM02NoRoomText + $64D6 = Route16HouseText_1e652 + $65CE = Route22GateBlocks + $6563 = Route22GateTextPointers + $6507 = Route22GateScript + $65A4 = Route22GateObject + $6522 = Route22GateScriptPointers + $6528 = Route22GateScript0 + $6551 = Route22GateScript1 + $6562 = Route22GateScript2 + $6539 = Route22GateScriptCoords + $6565 = Route22GateText1 + $6588 = Route22GateText_1e704 + $653E = Route22GateScript_1e6ba + $659E = Route22GateText_1e71a + $6599 = Route22GateText_1e715 + $6789 = BillsHouseBlocks + $66B8 = BillsHouseTextPointers + $65EE = BillsHouseScript + $6763 = BillsHouseObject + $65FA = BillsHouseScriptPointers + $6606 = BillsHouseScript0 + $6607 = BillsHouseScript1 + $662A = BillsHouseScript2 + $6649 = BillsHouseScript3 + $6691 = BillsHouseScript4 + $66AB = BillsHouseScript5 + $6620 = MovementData_1e79c + $6624 = MovementData_1e7a0 + $668B = MovementData_1e807 + $66C1 = BillsHouseText1 + $66F8 = BillsHouseText2 + $6754 = BillsHouseText3 + $66C0 = BillsHouseText4 + $66E9 = BillsHouseText_1e865 + $66EE = BillsHouseText_1e86a + $66F3 = BillsHouseText_1e86f + $673E = BillThankYouText + $6743 = SSTicketReceivedText + $674F = BillsHouseText_1e8cb + $674A = SSTicketNoRoomText + $675E = BillsHouseText_1e8da + $67CA = AccessedOaksPCText + $67BF = GetDexRatedText + $67C4 = ClosedOaksPCText + $687B = SafariGameOverText + $6891 = TimesUpText + $6896 = GameOverText + $68DF = CinnabarGymQuizIntroText + $68E4 = CinnabarQuizQuestions + $6916 = CinnabarGymQuiz_1ea92 + $68F0 = CinnabarQuizQuestionsText1 + $68F5 = CinnabarQuizQuestionsText2 + $68FA = CinnabarQuizQuestionsText3 + $68FF = CinnabarQuizQuestionsText4 + $6904 = CinnabarQuizQuestionsText5 + $6909 = CinnabarQuizQuestionsText6 + $6967 = CinnabarGymQuizCorrectText + $690E = CinnabarGymQuiz_1ea8a + $6989 = CinnabarGymQuizIncorrectText + $69CC = CinnabarGymGateCoords + $6B03 = BillsHousePokemonListText1 + $6B08 = BillsMonListText + $6B2E = BillsHousePokemonListText2 + $67DC = DisplayOakLabLeftPoster + $67E9 = DisplayOakLabRightPoster + $6B33 = DisplayOakLabEmailText + $689B = PrintCinnabarQuiz + $69F2 = BillsHousePC + $69E4 = PrintMagazinesText + $67CF = PrintNewBikeText + $484A = Func_1c9c6 + SLACK: $14BA bytes + +Bank #8: + SECTION: $4000-$42BD ($02BE bytes) + $4000 = SFX_Headers_08 + $41CE = SFX_08_46 + $4192 = SFX_08_3a + $401E = SFX_08_0a + $4021 = SFX_08_0b + $4072 = SFX_08_1a + $4024 = SFX_08_0c + $407B = SFX_08_1b + $4102 = SFX_08_2a + $4027 = SFX_08_0d + $4084 = SFX_08_1c + $410B = SFX_08_2b + $402A = SFX_08_0e + $408D = SFX_08_1d + $4114 = SFX_08_2c + $419B = SFX_08_3b + $41E0 = SFX_08_4a + $402D = SFX_08_0f + $4096 = SFX_08_1e + $411D = SFX_08_2d + $41A4 = SFX_08_3c + $41E3 = SFX_08_4b + $4210 = SFX_08_5a + $409F = SFX_08_1f + $4126 = SFX_08_2e + $41A7 = SFX_08_3d + $41E6 = SFX_08_4c + $4213 = SFX_08_5b + $4255 = SFX_08_6a + $412F = SFX_08_2f + $41AA = SFX_08_3e + $41E9 = SFX_08_4d + $4216 = SFX_08_5c + $425E = SFX_08_6b + $41AD = SFX_08_3f + $41EC = SFX_08_4e + $4219 = SFX_08_5d + $4264 = SFX_08_6c + $41EF = SFX_08_4f + $421C = SFX_08_5e + $426D = SFX_08_6d + $4222 = SFX_08_5f + $4276 = SFX_08_6e + $427F = SFX_08_6f + $4003 = SFX_08_01 + $4030 = SFX_08_10 + $4006 = SFX_08_02 + $4033 = SFX_08_11 + $40A8 = SFX_08_20 + $4009 = SFX_08_03 + $4036 = SFX_08_12 + $40B1 = SFX_08_21 + $4138 = SFX_08_30 + $400C = SFX_08_04 + $4039 = SFX_08_13 + $40BA = SFX_08_22 + $4141 = SFX_08_31 + $41B0 = SFX_08_40 + $400F = SFX_08_05 + $403C = SFX_08_14 + $40C3 = SFX_08_23 + $414A = SFX_08_32 + $41B3 = SFX_08_41 + $41F2 = SFX_08_50 + $4012 = SFX_08_06 + $4045 = SFX_08_15 + $40CC = SFX_08_24 + $4153 = SFX_08_33 + $41B9 = SFX_08_42 + $41F5 = SFX_08_51 + $4225 = SFX_08_60 + $4015 = SFX_08_07 + $404E = SFX_08_16 + $40D5 = SFX_08_25 + $415C = SFX_08_34 + $41BF = SFX_08_43 + $41F8 = SFX_08_52 + $4228 = SFX_08_61 + $4288 = SFX_08_70 + $4018 = SFX_08_08 + $4057 = SFX_08_17 + $40DE = SFX_08_26 + $4165 = SFX_08_35 + $41C5 = SFX_08_44 + $41FB = SFX_08_53 + $422B = SFX_08_62 + $4291 = SFX_08_71 + $401B = SFX_08_09 + $4060 = SFX_08_18 + $40E7 = SFX_08_27 + $416E = SFX_08_36 + $41C8 = SFX_08_45 + $41FE = SFX_08_54 + $422E = SFX_08_63 + $4297 = SFX_08_72 + $4069 = SFX_08_19 + $40F0 = SFX_08_28 + $4177 = SFX_08_37 + $4201 = SFX_08_55 + $4231 = SFX_08_64 + $429D = SFX_08_73 + $40F9 = SFX_08_29 + $4180 = SFX_08_38 + $41D7 = SFX_08_47 + $4204 = SFX_08_56 + $4237 = SFX_08_65 + $42A3 = SFX_08_74 + $4189 = SFX_08_39 + $41DA = SFX_08_48 + $4207 = SFX_08_57 + $423A = SFX_08_66 + $42AC = SFX_08_75 + $41DD = SFX_08_49 + $420A = SFX_08_58 + $423D = SFX_08_67 + $42B2 = SFX_08_76 + $420D = SFX_08_59 + $4246 = SFX_08_68 + $42BB = SFX_08_77 + $424F = SFX_08_69 + SECTION: $42BE-$42FC ($003F bytes) + $42BE = Music_GymLeaderBattle + $42C7 = Music_TrainerBattle + $42D9 = Music_FinalBattle + $42D0 = Music_WildBattle + $42E2 = Music_DefeatedTrainer + $42F4 = Music_DefeatedGymLeader + $42EB = Music_DefeatedWildMon + SECTION: $42FD-$536D ($1071 bytes) + $42FD = SFX_08_01_Ch1 + $4301 = SFX_08_02_Ch1 + $4305 = SFX_08_03_Ch1 + $4309 = SFX_08_04_Ch1 + $430D = SFX_08_05_Ch1 + $4320 = SFX_08_06_Ch1 + $4324 = SFX_08_07_Ch1 + $432B = SFX_08_08_Ch1 + $432F = SFX_08_09_Ch1 + $4333 = SFX_08_0a_Ch1 + $4337 = SFX_08_0b_Ch1 + $433B = SFX_08_0c_Ch1 + $433F = SFX_08_0d_Ch1 + $4343 = SFX_08_0e_Ch1 + $4347 = SFX_08_0f_Ch1 + $434E = SFX_08_10_Ch1 + $4355 = SFX_08_11_Ch1 + $4359 = SFX_08_12_Ch1 + $435D = SFX_08_13_Ch1 + $4C2F = SFX_08_14_Ch1 + $4C3E = SFX_08_14_Ch2 + $4C4D = SFX_08_14_Ch3 + $4E3F = SFX_08_15_Ch1 + $4E52 = SFX_08_15_Ch2 + $4E65 = SFX_08_15_Ch3 + $4DB4 = SFX_08_16_Ch1 + $4DC3 = SFX_08_16_Ch2 + $4DD1 = SFX_08_16_Ch3 + $4B4E = SFX_08_17_Ch1 + $4B6D = SFX_08_17_Ch2 + $4B8C = SFX_08_17_Ch3 + $4EFD = SFX_08_18_Ch1 + $4F1C = SFX_08_18_Ch2 + $4F3B = SFX_08_18_Ch3 + $4CDD = SFX_08_19_Ch1 + $4CF0 = SFX_08_19_Ch2 + $4D02 = SFX_08_19_Ch3 + $4C87 = SFX_08_1a_Ch1 + $4CA1 = SFX_08_1a_Ch2 + $4CA2 = SFX_08_1a_Ch3 + $4CB5 = SFX_08_1b_Ch1 + $4CC4 = SFX_08_1b_Ch2 + $4CD3 = SFX_08_1b_Ch3 + $4ECD = SFX_08_1c_Ch1 + $4EE0 = SFX_08_1c_Ch2 + $4EF3 = SFX_08_1c_Ch3 + $49D7 = SFX_08_1d_Ch1 + $49F4 = SFX_08_1d_Ch2 + $4A15 = SFX_08_1d_Ch3 + $4E72 = SFX_08_1e_Ch1 + $4E91 = SFX_08_1e_Ch2 + $4EB4 = SFX_08_1e_Ch3 + $4D03 = SFX_08_1f_Ch1 + $4D2E = SFX_08_1f_Ch2 + $4D4D = SFX_08_1f_Ch3 + $4D66 = SFX_08_20_Ch1 + $4D8D = SFX_08_20_Ch2 + $4DB3 = SFX_08_20_Ch3 + $4DD2 = SFX_08_21_Ch1 + $4DF1 = SFX_08_21_Ch2 + $4E20 = SFX_08_21_Ch3 + $4C57 = SFX_08_22_Ch1 + $4C6A = SFX_08_22_Ch2 + $4C7D = SFX_08_22_Ch3 + $4B99 = SFX_08_23_Ch1 + $4BB4 = SFX_08_23_Ch2 + $4BCF = SFX_08_23_Ch3 + $4BDF = SFX_08_24_Ch1 + $4C02 = SFX_08_24_Ch2 + $4C25 = SFX_08_24_Ch3 + $4ABB = SFX_08_25_Ch1 + $4ADA = SFX_08_25_Ch2 + $4AFD = SFX_08_25_Ch3 + $4FD3 = SFX_08_26_Ch1 + $4FE6 = SFX_08_26_Ch2 + $4FF9 = SFX_08_26_Ch3 + $5006 = SFX_08_27_Ch1 + $5021 = SFX_08_27_Ch2 + $503C = SFX_08_27_Ch3 + $504F = SFX_08_28_Ch1 + $505E = SFX_08_28_Ch2 + $506D = SFX_08_28_Ch3 + $50DD = SFX_08_29_Ch1 + $50F8 = SFX_08_29_Ch2 + $5113 = SFX_08_29_Ch3 + $4F70 = SFX_08_2a_Ch1 + $4F7F = SFX_08_2a_Ch2 + $4F8E = SFX_08_2a_Ch3 + $5126 = SFX_08_2b_Ch1 + $5139 = SFX_08_2b_Ch2 + $514C = SFX_08_2b_Ch3 + $5236 = SFX_08_2c_Ch1 + $5259 = SFX_08_2c_Ch2 + $527C = SFX_08_2c_Ch3 + $4F4E = SFX_08_2d_Ch1 + $4F5D = SFX_08_2d_Ch2 + $4F6F = SFX_08_2d_Ch3 + $51A7 = SFX_08_2e_Ch1 + $51C2 = SFX_08_2e_Ch2 + $51DD = SFX_08_2e_Ch3 + $4F98 = SFX_08_2f_Ch1 + $4FAF = SFX_08_2f_Ch2 + $4FC6 = SFX_08_2f_Ch3 + $5159 = SFX_08_30_Ch1 + $517C = SFX_08_30_Ch2 + $5197 = SFX_08_30_Ch3 + $51F0 = SFX_08_31_Ch1 + $520B = SFX_08_31_Ch2 + $5226 = SFX_08_31_Ch3 + $5077 = SFX_08_32_Ch1 + $509A = SFX_08_32_Ch2 + $50C1 = SFX_08_32_Ch3 + $528F = SFX_08_33_Ch1 + $52A2 = SFX_08_33_Ch2 + $52B5 = SFX_08_33_Ch3 + $52C2 = SFX_08_34_Ch1 + $52D5 = SFX_08_34_Ch2 + $52E8 = SFX_08_34_Ch3 + $52F5 = SFX_08_35_Ch1 + $5318 = SFX_08_35_Ch2 + $533A = SFX_08_35_Ch3 + $533B = SFX_08_36_Ch1 + $534E = SFX_08_36_Ch2 + $5361 = SFX_08_36_Ch3 + $4A2E = SFX_08_37_Ch1 + $4A45 = SFX_08_37_Ch2 + $4A58 = SFX_08_37_Ch3 + $4A65 = SFX_08_38_Ch1 + $4A88 = SFX_08_38_Ch2 + $4AAB = SFX_08_38_Ch3 + $4B13 = SFX_08_39_Ch1 + $4B2A = SFX_08_39_Ch2 + $4B41 = SFX_08_39_Ch3 + $43DD = SFX_08_3c_Ch1 + $43EE = SFX_08_3d_Ch1 + $43FD = SFX_08_3e_Ch1 + $43D6 = SFX_08_3f_Ch1 + $43C3 = SFX_08_40_Ch1 + $442D = SFX_08_41_Ch1 + $4436 = SFX_08_41_Ch2 + $443D = SFX_08_42_Ch1 + $4448 = SFX_08_42_Ch2 + $444C = SFX_08_43_Ch1 + $4453 = SFX_08_43_Ch2 + $445D = SFX_08_44_Ch1 + $447F = SFX_08_45_Ch1 + $4490 = SFX_08_45_Ch2 + $44AA = SFX_08_47_Ch1 + $44AE = SFX_08_48_Ch1 + $44B9 = SFX_08_49_Ch1 + $44C4 = SFX_08_4a_Ch1 + $44C8 = SFX_08_4b_Ch1 + $44CC = SFX_08_4c_Ch1 + $44D6 = SFX_08_4d_Ch1 + $44E0 = SFX_08_4e_Ch1 + $44E7 = SFX_08_4f_Ch1 + $44F4 = SFX_08_50_Ch1 + $44FE = SFX_08_51_Ch1 + $450B = SFX_08_52_Ch1 + $4519 = SFX_08_53_Ch1 + $4526 = SFX_08_54_Ch1 + $4533 = SFX_08_55_Ch1 + $454C = SFX_08_56_Ch1 + $4556 = SFX_08_57_Ch1 + $4563 = SFX_08_58_Ch1 + $456A = SFX_08_59_Ch1 + $4574 = SFX_08_5a_Ch1 + $457B = SFX_08_5b_Ch1 + $4582 = SFX_08_5c_Ch1 + $458C = SFX_08_5d_Ch1 + $4593 = SFX_08_5e_Ch1 + $45A4 = SFX_08_5e_Ch2 + $45B1 = SFX_08_5f_Ch1 + $45BE = SFX_08_60_Ch1 + $45C5 = SFX_08_61_Ch1 + $45D5 = SFX_08_62_Ch1 + $45DC = SFX_08_63_Ch1 + $45EC = SFX_08_64_Ch1 + $45F7 = SFX_08_64_Ch2 + $45FE = SFX_08_65_Ch1 + $460E = SFX_08_66_Ch1 + $4624 = SFX_08_67_Ch1 + $4637 = SFX_08_67_Ch2 + $464A = SFX_08_67_Ch3 + $4655 = SFX_08_68_Ch1 + $4664 = SFX_08_68_Ch2 + $4673 = SFX_08_68_Ch3 + $467E = SFX_08_69_Ch1 + $4695 = SFX_08_69_Ch2 + $46A9 = SFX_08_6a_Ch1 + $46C4 = SFX_08_6a_Ch2 + $46DB = SFX_08_6a_Ch3 + $46EC = SFX_08_6b_Ch1 + $470B = SFX_08_6b_Ch2 + $4722 = SFX_08_6c_Ch1 + $4735 = SFX_08_6c_Ch2 + $4748 = SFX_08_6c_Ch3 + $4759 = SFX_08_6d_Ch1 + $4770 = SFX_08_6d_Ch2 + $4787 = SFX_08_6d_Ch3 + $4792 = SFX_08_6e_Ch1 + $47A9 = SFX_08_6e_Ch2 + $47C0 = SFX_08_6e_Ch3 + $47D1 = SFX_08_6f_Ch1 + $47E0 = SFX_08_6f_Ch2 + $47EF = SFX_08_6f_Ch3 + $47FA = SFX_08_70_Ch1 + $4819 = SFX_08_70_Ch2 + $4834 = SFX_08_70_Ch3 + $4847 = SFX_08_71_Ch1 + $485E = SFX_08_71_Ch2 + $4875 = SFX_08_72_Ch1 + $4880 = SFX_08_72_Ch2 + $4887 = SFX_08_73_Ch1 + $489E = SFX_08_73_Ch2 + $48B5 = SFX_08_74_Ch1 + $48C4 = SFX_08_74_Ch2 + $48D3 = SFX_08_74_Ch3 + $48E0 = SFX_08_75_Ch1 + $48F0 = SFX_08_75_Ch2 + $4902 = SFX_08_76_Ch1 + $4941 = SFX_08_76_Ch2 + $4980 = SFX_08_76_Ch3 + $4412 = SFX_08_77_Ch1 + $4373 = Music8_WavePointers.wave0 + $4383 = Music8_WavePointers.wave1 + $4393 = Music8_WavePointers.wave2 + $43A3 = Music8_WavePointers.wave3 + $43B3 = Music8_WavePointers.wave4 + $43C3 = Music8_WavePointers.wave5 + $462A = SFX_08_67_branch_2062a + $463D = SFX_08_67_branch_2063d + $4930 = SFX_08_76_branch_20930 + $4361 = Music8_WavePointers + $449B = SFX_08_PokeFlute_Ch3 + SECTION: $536E-$6321 ($0FB4 bytes) + $53A7 = Func_213a7 + $53AC = Func_213ac + $53C4 = Unknown_213c4 + $53BC = Unknown_213bc + $53C0 = Unknown_213c0 + $548B = SomeonesPCText + $5497 = BillsPCText + $54A0 = PlayersPCText + $54A5 = OaksPCText + $54B2 = PKMNLeaguePCText + $54BA = LogOffPCText + $57E9 = SwitchOnText + $56E1 = BillsPCMenuText + $57EE = WhatText + $5713 = BoxNoPCText + $5588 = Func_21588 + $5618 = Func_21618 + $55AC = Func_215ac + $5673 = Func_21673 + $56B3 = Func_216b3 + $57FD = CantDepositLastMonText + $54E8 = BillsPCMenu + $5802 = BoxFullText + $56BE = Func_216be + $574B = Func_2174b + $57F8 = MonWasStoredText + $580C = NoMonText + $54E8 = Func_214e8 + $5811 = CantTakeMonText + $5807 = MonIsTakenOutText + $581B = OnceReleasedText + $5820 = MonWasReleasedText + $5745 = HMMoveArray + $57CB = DepositPCText + $57D3 = WithdrawPCText + $57DC = StatsCancelPCText + $58AE = Music8_ApplyMusicAffects + $5946 = Music8_PlayNextNote + $5FCC = Music8_ApplyDutyCycle + $5EB8 = Music8_ApplyPitchBend + $5FF7 = Func_21ff7 + $5967 = Music8_endchannel + $5FE4 = Music8_GetNextMusicByte + $59F5 = Music8_callchannel + $62DE = Unknown_222de + $5E6D = Func_21e6d + $5A2A = Music8_loopchannel + $5A65 = Music8_notetype + $5AA4 = Music8_toggleperfectpitch + $6017 = Func_22017 + $5C8B = Music8_notelength + $6035 = Func_22035 + $5DAA = Func_21daa + $5D79 = Func_21d79 + $5DCC = Func_21dcc + $6006 = Func_22006 + $5E2F = Func_21e2f + $5F4E = Func_21f4e + $62E6 = Unknown_222e6 + $5E56 = Func_21e56 + $5E8B = Func_21e8b + $5E9F = Func_21e9f + $5EFF = Music8_ApplyPitchBend.asm_21eff + $5F45 = Music8_ApplyPitchBend.asm_21f45 + $62D6 = Unknown_222d6 + $62EE = Music8_Pitches + $61F3 = Func_221f3 + $610D = Func_2210d + $6248 = FillMusicRAM8 + $624E = Func_2224e + $6126 = Func_2210d.asm_22126 + $62D5 = Noise8_endchannel + $631D = Music8_OverwriteChannelPointer + $54C2 = BillsPC_ + $5878 = PredefText23 + $5879 = Music8_UpdateMusic + $6306 = Music_PokeFluteInBattle + $54C2 = Func_214c2 + $571B = Func_2171b + $5825 = PrintJustAMomentText1 + $5845 = PrintJustAMomentText2 + $536E = Func_2136e + $53C8 = Func_213c8 + $5865 = JustAMomentText + SECTION: $6322-$7F51 ($1C30 bytes) + $797D = SFX_08_3a_Ch1 + $7998 = SFX_08_3a_Ch2 + $79B0 = SFX_08_3a_Ch3 + $79C7 = SFX_08_3b_Ch1 + $79E6 = SFX_08_3b_Ch2 + $79FE = SFX_08_3b_Ch3 + $7A13 = SFX_08_46_Ch1 + $7A2E = SFX_08_46_Ch2 + $7A44 = SFX_08_46_Ch3 + $6370 = Music_GymLeaderBattle_Ch1 + $65A1 = Music_GymLeaderBattle_Ch2 + $66EF = Music_GymLeaderBattle_Ch3 + $6919 = Music_TrainerBattle_Ch1 + $6BAE = Music_TrainerBattle_Ch2 + $6D10 = Music_TrainerBattle_Ch3 + $7099 = Music_WildBattle_Ch1 + $71D8 = Music_WildBattle_Ch2 + $7290 = Music_WildBattle_Ch3 + $73A6 = Music_FinalBattle_Ch1 + $756A = Music_FinalBattle_Ch2 + $771C = Music_FinalBattle_Ch3 + $7A53 = Music_DefeatedTrainer_Ch1 + $7AC1 = Music_DefeatedTrainer_Ch2 + $7B15 = Music_DefeatedTrainer_Ch3 + $7B74 = Music_DefeatedWildMon_Ch1 + $7BC1 = Music_DefeatedWildMon_Ch2 + $7C0E = Music_DefeatedWildMon_Ch3 + $7CAD = Music_DefeatedGymLeader_Ch1 + $7D6D = Music_DefeatedGymLeader_Ch2 + $7E52 = Music_DefeatedGymLeader_Ch3 + $6322 = SFX_08_PokeFlute_Ch1 + $6325 = SFX_08_PokeFlute_Ch2 + $63B0 = Music_GymLeaderBattle_branch_223b0 + $65E0 = Music_GymLeaderBattle_branch_225e0 + $67B1 = Music_GymLeaderBattle_branch_227b1 + $6962 = Music_TrainerBattle_branch_22962 + $6BFC = Music_TrainerBattle_branch_22bfc + $6D9C = Music_TrainerBattle_branch_22d9c + $70E0 = Music_WildBattle_branch_230e0 + $7225 = Music_WildBattle_branch_23225 + $72B5 = Music_WildBattle_branch_232b5 + $72D8 = Music_WildBattle_branch_232d8 + $7710 = Music_FinalBattle_branch_23710 + $7429 = Music_FinalBattle_branch_23429 + $7704 = Music_FinalBattle_branch_23704 + $75E6 = Music_FinalBattle_branch_235e6 + $795B = Music_FinalBattle_branch_2395b + $796C = Music_FinalBattle_branch_2396c + $777D = Music_FinalBattle_branch_2377d + $7A76 = Music_DefeatedTrainer_branch_23a76 + $7AD2 = Music_DefeatedTrainer_branch_23ad2 + $7B24 = Music_DefeatedTrainer_branch_23b24 + $7B8B = Music_DefeatedWildMon_branch_23b8b + $7BCE = Music_DefeatedWildMon_branch_23bce + $7C21 = Music_DefeatedWildMon_branch_23c21 + $7CCC = Music_DefeatedGymLeader_branch_23ccc + $7D84 = Music_DefeatedGymLeader_branch_23d84 + $7E65 = Music_DefeatedGymLeader_branch_23e65 + SLACK: $00AE bytes + +Bank #9: + SECTION: $4000-$7A2F ($3A30 bytes) + $4000 = BulbasaurPicFront + $40D5 = BulbasaurPicBack + $41BE = IvysaurPicFront + $42DB = IvysaurPicBack + $43ED = VenusaurPicFront + $45F0 = VenusaurPicBack + $4752 = CharmanderPicFront + $4846 = CharmanderPicBack + $492C = CharmeleonPicFront + $4A8B = CharmeleonPicBack + $4BB2 = CharizardPicFront + $4DB5 = CharizardPicBack + $4ED4 = SquirtlePicFront + $4FB0 = SquirtlePicBack + $5089 = WartortlePicFront + $51F8 = WartortlePicBack + $5329 = BlastoisePicFront + $5541 = BlastoisePicBack + $5682 = CaterpiePicFront + $5718 = CaterpiePicBack + $5808 = MetapodPicFront + $58AD = MetapodPicBack + $5975 = ButterfreePicFront + $5B36 = ButterfreePicBack + $5C8D = WeedlePicFront + $5D5B = WeedlePicBack + $5E36 = KakunaPicFront + $5EE1 = KakunaPicBack + $5FA1 = BeedrillPicFront + $6185 = BeedrillPicBack + $62C0 = PidgeyPicFront + $63B3 = PidgeyPicBack + $650A = PidgeottoPicFront + $665D = PidgeottoPicBack + $6751 = PidgeotPicFront + $68FB = PidgeotPicBack + $6A04 = RattataPicFront + $6AEB = RattataPicBack + $6C0C = RaticatePicFront + $6D77 = RaticatePicBack + $6EA6 = SpearowPicFront + $6F7A = SpearowPicBack + $707E = FearowPicFront + $7236 = FearowPicBack + $7317 = EkansPicFront + $7416 = EkansPicBack + $754A = ArbokPicFront + $7753 = ArbokPicBack + $783A = PikachuPicFront + $791E = PikachuPicBack + SECTION: $7A30-$7B63 ($0134 bytes) + $7B24 = SaveTrainerName + $7A4E = Func_27d89 + $7A73 = TypeNamePointers + $7AAD = Type00Name + $7AB4 = Type01Name + $7ABD = Type02Name + $7AC4 = Type03Name + $7AF1 = Type04Name + $7AF8 = Type05Name + $7AFD = Type06Name + $7B02 = Type07Name + $7B06 = Type08Name + $7B13 = Type09Name + $7ACB = Type14Name + $7AD0 = Type15Name + $7AD6 = Type16Name + $7ADC = Type17Name + $7AE5 = Type18Name + $7AED = Type19Name + $7B0C = Type1AName + $7B19 = Type1BName + $7B1E = Type1CName + $7B5E = GettingPumpedText + $7B32 = FocusEnergyEffect_ + $7A30 = Func_27d6b + $7A5D = Func_27d98 + SLACK: $049C bytes + +Bank #10: + SECTION: $4000-$7CA2 ($3CA3 bytes) + $4000 = RaichuPicFront + $4199 = RaichuPicBack + $42AA = SandshrewPicFront + $43A8 = SandshrewPicBack + $44F6 = SandslashPicFront + $4692 = SandslashPicBack + $47F4 = NidoranFPicFront + $48D8 = NidoranFPicBack + $49E9 = NidorinaPicFront + $4B5F = NidorinaPicBack + $4CAB = NidoqueenPicFront + $4EA1 = NidoqueenPicBack + $4FD8 = NidoranMPicFront + $50CF = NidoranMPicBack + $521A = NidorinoPicFront + $53B2 = NidorinoPicBack + $5509 = NidokingPicFront + $5735 = NidokingPicBack + $58C0 = ClefairyPicFront + $59B3 = ClefairyPicBack + $5AC7 = ClefablePicFront + $5C18 = ClefablePicBack + $5D7E = VulpixPicFront + $5EE8 = VulpixPicBack + $5FFC = NinetalesPicFront + $620C = NinetalesPicBack + $6354 = JigglypuffPicFront + $6429 = JigglypuffPicBack + $64E5 = WigglytuffPicFront + $662E = WigglytuffPicBack + $6700 = ZubatPicFront + $67E6 = ZubatPicBack + $691B = GolbatPicFront + $6ABC = GolbatPicBack + $6B6B = OddishPicFront + $6C16 = OddishPicBack + $6CEC = GloomPicFront + $6E1A = GloomPicBack + $6F4C = VileplumePicFront + $708D = VileplumePicBack + $71AB = ParasPicFront + $72A6 = ParasPicBack + $73AB = ParasectPicFront + $752C = ParasectPicBack + $7616 = VenonatPicFront + $772E = VenonatPicBack + $7821 = VenomothPicFront + $79CF = VenomothPicBack + $7B3A = DiglettPicFront + $7BFB = DiglettPicBack + SECTION: $7CA3-$7CF5 ($0053 bytes) + $7CEC = WasSeededText + $7CF1 = EvadedAttackText + $7CA3 = LeechSeedEffect_ + SLACK: $030A bytes + +Bank #11: + SECTION: $4000-$7BBF ($3BC0 bytes) + $4000 = DugtrioPicFront + $416C = DugtrioPicBack + $427D = MeowthPicFront + $43A8 = MeowthPicBack + $44C1 = PersianPicFront + $4662 = PersianPicBack + $4794 = PsyduckPicFront + $489E = PsyduckPicBack + $49B6 = GolduckPicFront + $4B84 = GolduckPicBack + $4CA2 = MankeyPicFront + $4DC8 = MankeyPicBack + $4F2F = PrimeapePicFront + $50F0 = PrimeapePicBack + $520D = GrowlithePicFront + $531E = GrowlithePicBack + $5440 = ArcaninePicFront + $564E = ArcaninePicBack + $5787 = PoliwagPicFront + $5859 = PoliwagPicBack + $5917 = PoliwhirlPicFront + $5A82 = PoliwhirlPicBack + $5B87 = PoliwrathPicFront + $5D48 = PoliwrathPicBack + $5E6C = AbraPicFront + $5F8D = AbraPicBack + $60B5 = KadabraPicFront + $6276 = KadabraPicBack + $6395 = AlakazamPicFront + $6599 = AlakazamPicBack + $6700 = MachopPicFront + $680A = MachopPicBack + $6930 = MachokePicFront + $6B02 = MachokePicBack + $6C31 = MachampPicFront + $6E85 = MachampPicBack + $700F = BellsproutPicFront + $7107 = BellsproutPicBack + $71FC = WeepinbellPicFront + $731D = WeepinbellPicBack + $742B = VictreebelPicFront + $75E7 = VictreebelPicBack + $7704 = TentacoolPicFront + $77F0 = TentacoolPicBack + $78E7 = TentacruelPicFront + $7A81 = TentacruelPicBack + SECTION: $7BC0-$7F80 ($03C1 bytes) + $7F7C = GameCornerNoCoinsText + $7F77 = GameCornerCoinCaseText + $7BDD = TrainerInfoTextBoxTileGraphics + $7E5D = CheckIfMoveIsKnown + $7C6D = BlankLeaderNames + $7DDD = BadgeNumbersTileGraphics + $7BD3 = SupperEffectiveText + $7BD8 = NotVeryEffectiveText + $7E80 = AlreadyKnowsText + $7EC2 = ScaleLastSpriteColumnByTwo + $7E9A = ScaleFirstThreeSpriteColumnsByTwo + $7EDC = ScalePixelsByTwo + $7EED = DuplicateBitsTable + $7F49 = CoinsScatteredText + $7F4E = AbleToPlaySlotsCheck + $7BC0 = DisplayEffectiveness + $7EFD = PayDayEffect_ + $7E85 = ScaleSpriteByTwo + $7DCD = CircleTile + SLACK: $007F bytes + +Bank #12: + SECTION: $4000-$7B05 ($3B06 bytes) + $4000 = GeodudePicFront + $40E6 = GeodudePicBack + $420C = GravelerPicFront + $4392 = GravelerPicBack + $44B1 = GolemPicFront + $462C = GolemPicBack + $46DA = PonytaPicFront + $4836 = PonytaPicBack + $4968 = RapidashPicFront + $4B7E = RapidashPicBack + $4CB4 = SlowpokePicFront + $4D91 = SlowpokePicBack + $4E53 = SlowbroPicFront + $5002 = SlowbroPicBack + $510B = MagnemitePicFront + $517C = MagnemitePicBack + $520B = MagnetonPicFront + $5369 = MagnetonPicBack + $54B6 = FarfetchdPicFront + $563C = FarfetchdPicBack + $578F = DoduoPicFront + $5882 = DoduoPicBack + $59B3 = DodrioPicFront + $5B69 = DodrioPicBack + $5CE7 = SeelPicFront + $5E39 = SeelPicBack + $5F3D = DewgongPicFront + $611C = DewgongPicBack + $61E2 = GrimerPicFront + $62F9 = GrimerPicBack + $63E3 = MukPicFront + $65A2 = MukPicBack + $66AF = ShellderPicFront + $67BC = ShellderPicBack + $690A = CloysterPicFront + $6B05 = CloysterPicBack + $6C96 = GastlyPicFront + $6DDD = GastlyPicBack + $6E9D = HaunterPicFront + $6FD8 = HaunterPicBack + $70CB = GengarPicFront + $71E5 = GengarPicBack + $72C9 = OnixPicFront + $7485 = OnixPicBack + $75A8 = DrowzeePicFront + $7717 = DrowzeePicBack + $77EC = HypnoPicFront + $79AC = HypnoPicBack + SECTION: $7B06-$7B6A ($0065 bytes) + $7B2D = ShroudedInMistText + $7B32 = OneHitKOEffect_ + $7B06 = MistEffect_ + SLACK: $0495 bytes + +Bank #13: + SECTION: $4000-$7306 ($3307 bytes) + $6E9F = FossilKabutopsPic + $71B1 = GhostPic + $7032 = FossilAerodactylPic + $4000 = KrabbyPicFront + $4123 = KrabbyPicBack + $4285 = KinglerPicFront + $443C = KinglerPicBack + $455A = VoltorbPicFront + $45DB = VoltorbPicBack + $4691 = ElectrodePicFront + $4764 = ElectrodePicBack + $4819 = ExeggcutePicFront + $49FA = ExeggcutePicBack + $4B15 = ExeggutorPicFront + $4CD2 = ExeggutorPicBack + $4E52 = CubonePicFront + $4F62 = CubonePicBack + $50A0 = MarowakPicFront + $51F4 = MarowakPicBack + $531D = HitmonleePicFront + $54CA = HitmonleePicBack + $55C3 = HitmonchanPicFront + $56F5 = HitmonchanPicBack + $581C = LickitungPicFront + $59AA = LickitungPicBack + $5AAA = KoffingPicFront + $5C21 = KoffingPicBack + $5D43 = WeezingPicFront + $5EE8 = WeezingPicBack + $5FFC = RhyhornPicFront + $61D7 = RhyhornPicBack + $6303 = RhydonPicFront + $6539 = RhydonPicBack + $66A7 = ChanseyPicFront + $6804 = ChanseyPicBack + $690B = TangelaPicFront + $6A58 = TangelaPicBack + $6B1D = KangaskhanPicFront + $6D22 = KangaskhanPicBack + SECTION: $7307-$7F4A ($0C44 bytes) + $7E04 = _Multiply + $7E68 = _Divide + $7F3C = GameCornerOutOfOrderText + $7F41 = GameCornerOutToLunchText + $7F46 = GameCornerSomeonesKeysText + $736F = Func_372ac + $731B = TitleScroll + $7399 = Func_372d6 + $730A = TitleScroll_In + $7312 = TitleScroll_Out + $7355 = _TitleScroll.ScrollBetween + $7387 = GetTitleBallY + $7307 = TitleScroll_WaitBall + $732D = _TitleScroll + $7363 = TitleBallYTable + $7453 = PlaySlotMachineText + $796B = LoadSlotMachineTiles + $7458 = MainSlotMachineLoop + $7817 = SlotMachine_37754 + $7822 = SlotMachine_3775f + $752F = BetHowManySlotMachineText + $7521 = CoinMultiplierSlotMachineText + $7539 = NotEnoughCoinsSlotMachineText + $7804 = SlotMachine_37741 + $7898 = SlotMachine_377d5 + $7543 = SlotMachine_37480 + $7534 = StartSlotMachineText + $7570 = SlotMachine_374ad + $764B = SlotMachine_37588 + $752A = OutOfCoinsSlotMachineText + $753E = OneMoreGoSlotMachineText + $7891 = SlotMachine_377ce + $78D6 = SlotMachine_37813 + $78E6 = SlotMachine_37823 + $78F6 = SlotMachine_37833 + $7945 = SlotMachine_37882 + $75A2 = SlotMachine_374df + $75BE = SlotMachine_374fb + $75DA = SlotMachine_37517 + $75EF = SlotMachine_3752c + $7615 = SlotMachine_37552 + $7783 = SlotMachine_GetWheelOneTile + $7777 = SlotMachine_GetWheelTwoTile + $7631 = SlotMachine_3756e + $776B = SlotMachine_GetWheelThreeTile + $7765 = SlotMachine_CheckForMatch + $76C7 = SlotMachine_37588.skip5 + $7760 = NotThisTimeText + $773B = SlotRewardPointers + $76FB = SlotMachine_37588.asm_37638 + $7728 = SlotsMachineText_37665 + $782E = SlotMachine_3776b + $76B3 = SlotMachine_37588.loop + $77EB = SlotMachine_37728 + $7736 = LinedUpText + $77C5 = SlotReward300Func + $7753 = SlotReward300Text + $77B6 = SlotReward100Func + $7757 = SlotReward100Text + $779A = SlotReward8Func + $775B = SlotReward8Text + $77A8 = SlotReward15Func + $775D = SlotReward15Text + $7AF0 = SlotMachineWheel3 + $778C = SlotMachine_GetWheelTile + $7ACC = SlotMachineWheel2 + $7AA8 = SlotMachineWheel1 + $77E5 = YeahText + $78C1 = SlotMachine_377fe + $7B14 = SlotMachineTiles1 + $79B8 = SlotMachineMap + $7DA9 = PointerTable_37ce6 + $7DAD = PewterMuseumGuyCoords + $7DC9 = PewterGymGuyCoords + $7DBD = PewterMuseumGuyCoords.down + $7DC0 = PewterMuseumGuyCoords.up + $7DC3 = PewterMuseumGuyCoords.left + $7DC6 = PewterMuseumGuyCoords.right + $7DDD = PewterGymGuyCoords.one + $7DE2 = PewterGymGuyCoords.two + $7DE7 = PewterGymGuyCoords.three + $7DF3 = PewterGymGuyCoords.four + $7DF8 = PewterGymGuyCoords.five + $73D1 = PromptUserToPlaySlots + $7EF0 = StartSlotMachine + $7D64 = PewterGuys + SLACK: $00B5 bytes + +Bank #14: + SECTION: $4000-$7AE1 ($3AE2 bytes) + $4000 = BaseStats + $5334 = TrainerPicAndMoneyPointers + $541F = TrainerNames + $5654 = Func_39c37 + $55F2 = Func_39bd5 + $65BD = Func_3ad0e + $55A4 = Func_39b87 + $690B = EvosMovesPointerTable + $6383 = PokeballTileGraphics + $634D = SetupPlayerAndEnemyPokeballs + $50BF = Func_3969f + $50E6 = Func_396c6 + $5127 = Func_39707 + $52BB = TrainerClassMoveChoiceModifications + $51BF = AIEnemyTrainerChooseMoves.useOriginalMoveSet + $51C3 = AIMoveChoiceModificationFunctionPointers + $516B = AIEnemyTrainerChooseMoves.nextMoveChoiceModification + $51CB = AIMoveChoiceModification1 + $5207 = AIMoveChoiceModification2 + $5237 = AIMoveChoiceModification3 + $52A3 = AIMoveChoiceModification4 + $52A4 = ReadMove + $5202 = StatusAilmentMoveEffects + $5758 = TrainerDataPointers + $573F = LoneMoves + $574F = TeamMoves + $57B6 = YoungsterData + $57EB = BugCatcherData + $5829 = LassData + $5875 = SailorData + $5895 = JrTrainerMData + $58BA = JrTrainerFData + $5926 = PokemaniacData + $5943 = SuperNerdData + $597B = HikerData + $59B9 = BikerData + $5A01 = BurglarData + $5A24 = EngineerData + $5A30 = Juggler1Data + $5A30 = FisherData + $5A66 = SwimmerData + $5AAA = CueBallData + $5AD0 = GamblerData + $5AEE = BeautyData + $5B3E = PsychicData + $5B50 = RockerData + $5B59 = JugglerData + $5B7A = TamerData + $5B94 = BirdKeeperData + $5BE7 = BlackbeltData + $5C0D = Green1Data + $5AEE = SwimmerFData + $5CA1 = RocketFData + $5C46 = ScientistData + $5C83 = GiovanniData + $5CA1 = RocketData + $5D5F = CooltrainerMData + $5D8A = CooltrainerFData + $5DAE = BrunoData + $5DBA = BrockData + $5DC0 = MistyData + $5DC6 = LtSurgeData + $5DCE = ErikaData + $5DD6 = KogaData + $5DE0 = BlaineData + $5DEA = SabrinaData + $5DF4 = GentlemanData + $5E06 = Green2Data + $5E96 = Green3Data + $5EC0 = LoreleiData + $5ECC = ChannelerData + $5F1B = AgathaData + $5F27 = LanceData + $5F61 = TrainerAIPointers + $6098 = GenericAI + $5FEE = JugglerAI + $5FF4 = BlackbeltAI + $5FFA = GiovanniAI + $6000 = CooltrainerMAI + $6006 = CooltrainerFAI + $6075 = BrunoAI + $6019 = BrockAI + $6021 = MistyAI + $6027 = LtSurgeAI + $602D = ErikaAI + $6039 = KogaAI + $603F = BlaineAI + $6045 = SabrinaAI + $6051 = Sony2AI + $605D = Sony3AI + $6069 = LoreleiAI + $607B = AgathaAI + $608C = LanceAI + $612F = Func_3a72a + $61F7 = AIUseXAttack + $61BA = AIUseGuardSpec + $61D4 = Func_3a7cf + $60DB = AIUseHyperPotion + $618B = AIUseFullHeal + $61FD = AIUseXDefend + $6203 = AIUseXSpeed + $60D5 = AIUseSuperPotion + $60CF = AIUsePotion + $60A5 = AIUseFullRestore + $6196 = AICureStatus + $623A = AIPrintItemUse_ + $609A = DecrementAICount + $6150 = Func_3a74b + $6186 = AIBattleWithdrawText + $60A0 = Func_3a69b + $6231 = AIPrintItemUse + $6249 = AIBattleUseItemText + $6262 = LoadPartyPokeballGfx + $626E = SetupOwnPartyPokeballs + $628C = SetupEnemyPartyPokeballs + $6307 = PlacePlayerHUDTiles + $62AB = SetupPokeballs + $62E6 = Func_3a8e1 + $631E = PlaceEnemyHUDTiles + $62C7 = PickPokeball + $631B = PlayerBattleHUDGraphicsTiles + $6332 = EnemyBattleHUDGraphicsTiles + $646E = Func_3ba97 + $6479 = StartedSleepingEffect + $647E = FellAsleepBecameHealthyText + $65B8 = BankswitchEtoF + $6483 = RegainedHealthText + $6563 = Func_3bb8c + $6554 = Func_3bb7d + $6569 = TransformedText + $65AE = LightScreenProtectedText + $65B3 = ReflectGainedArmorText + $6906 = Func_3b057 + $678D = Func_3aede + $65DD = asm_3ad2e + $6788 = Func_3aed9 + $6789 = Func_3aeda + $67FC = IsEvolvingText + $67DD = Func_3af2e + $67ED = EvolvedText + $67F2 = IntoText + $67A6 = Func_3aef7 + $680A = Func_3af5b + $6801 = Func_3af52 + $6620 = Func_3ad71 + $67F7 = StoppedEvolvingText + $68F9 = WriteMonMoves.done + $68FD = WriteMonMoves_ShiftMoveData + $6A3B = Mon001_EvosMoves + $6A54 = Mon002_EvosMoves + $6A6D = Mon003_EvosMoves + $6A8B = Mon004_EvosMoves + $6AA6 = Mon005_EvosMoves + $6AC1 = Mon006_EvosMoves + $6ADD = Mon007_EvosMoves + $6AFA = Mon008_EvosMoves + $6B17 = Mon009_EvosMoves + $6B33 = Mon010_EvosMoves + $6B38 = Mon011_EvosMoves + $6B3F = Mon012_EvosMoves + $6B5D = Mon013_EvosMoves + $6B62 = Mon014_EvosMoves + $6B69 = Mon015_EvosMoves + $6B81 = Mon016_EvosMoves + $6B9E = Mon017_EvosMoves + $6BBB = Mon018_EvosMoves + $6BD5 = Mon019_EvosMoves + $6BF0 = Mon020_EvosMoves + $6C0A = Mon021_EvosMoves + $6C21 = Mon022_EvosMoves + $6C37 = Mon023_EvosMoves + $6C56 = Mon024_EvosMoves + $6C74 = Mon025_EvosMoves + $6C98 = Mon026_EvosMoves + $6CB6 = Mon027_EvosMoves + $6CD9 = Mon028_EvosMoves + $6CFB = Mon029_EvosMoves + $6D16 = Mon030_EvosMoves + $6D32 = Mon031_EvosMoves + $6D50 = Mon032_EvosMoves + $6D6B = Mon033_EvosMoves + $6D87 = Mon034_EvosMoves + $6DA5 = Mon035_EvosMoves + $6DC5 = Mon036_EvosMoves + $6DE1 = Mon037_EvosMoves + $6E07 = Mon038_EvosMoves + $6E29 = Mon039_EvosMoves + $6E4D = Mon040_EvosMoves + $6E6D = Mon041_EvosMoves + $6E8C = Mon042_EvosMoves + $6EA8 = Mon043_EvosMoves + $6EC9 = Mon044_EvosMoves + $6EEB = Mon045_EvosMoves + $6F0B = Mon046_EvosMoves + $6F26 = Mon047_EvosMoves + $6F3E = Mon048_EvosMoves + $6F59 = Mon049_EvosMoves + $6F77 = Mon050_EvosMoves + $6F94 = Mon051_EvosMoves + $6FAE = Mon052_EvosMoves + $6FCD = Mon053_EvosMoves + $6FE9 = Mon054_EvosMoves + $700A = Mon055_EvosMoves + $7028 = Mon056_EvosMoves + $7045 = Mon057_EvosMoves + $7061 = Mon058_EvosMoves + $7085 = Mon059_EvosMoves + $70A5 = Mon060_EvosMoves + $70C2 = Mon061_EvosMoves + $70E0 = Mon062_EvosMoves + $70FE = Mon063_EvosMoves + $7105 = Mon064_EvosMoves + $711F = Mon065_EvosMoves + $7135 = Mon066_EvosMoves + $7154 = Mon067_EvosMoves + $7173 = Mon068_EvosMoves + $718F = Mon069_EvosMoves + $71AC = Mon070_EvosMoves + $71CA = Mon071_EvosMoves + $71E4 = Mon072_EvosMoves + $7209 = Mon073_EvosMoves + $722B = Mon074_EvosMoves + $724C = Mon075_EvosMoves + $726D = Mon076_EvosMoves + $728B = Mon077_EvosMoves + $72A8 = Mon078_EvosMoves + $72C6 = Mon079_EvosMoves + $72E5 = Mon080_EvosMoves + $7303 = Mon081_EvosMoves + $7328 = Mon082_EvosMoves + $734C = Mon083_EvosMoves + $7368 = Mon084_EvosMoves + $7387 = Mon085_EvosMoves + $73A3 = Mon086_EvosMoves + $73C4 = Mon087_EvosMoves + $73E6 = Mon088_EvosMoves + $7407 = Mon089_EvosMoves + $7425 = Mon090_EvosMoves + $7449 = Mon091_EvosMoves + $746B = Mon092_EvosMoves + $748A = Mon093_EvosMoves + $74A9 = Mon094_EvosMoves + $74C5 = Mon095_EvosMoves + $74E9 = Mon096_EvosMoves + $750A = Mon097_EvosMoves + $7528 = Mon098_EvosMoves + $7547 = Mon099_EvosMoves + $7563 = Mon100_EvosMoves + $7584 = Mon101_EvosMoves + $75A2 = Mon102_EvosMoves + $75C0 = Mon103_EvosMoves + $75DE = Mon104_EvosMoves + $75FD = Mon105_EvosMoves + $7619 = Mon106_EvosMoves + $7633 = Mon107_EvosMoves + $7653 = Mon108_EvosMoves + $7665 = Mon109_EvosMoves + $7684 = Mon110_EvosMoves + $76A0 = Mon111_EvosMoves + $76BF = Mon112_EvosMoves + $76DD = Mon113_EvosMoves + $76FB = Mon114_EvosMoves + $7719 = Mon115_EvosMoves + $7735 = Mon116_EvosMoves + $7750 = Mon117_EvosMoves + $7768 = Mon118_EvosMoves + $7783 = Mon119_EvosMoves + $779B = Mon120_EvosMoves + $77C3 = Mon121_EvosMoves + $77E7 = Mon122_EvosMoves + $7807 = Mon123_EvosMoves + $7825 = Mon124_EvosMoves + $7843 = Mon125_EvosMoves + $785D = Mon126_EvosMoves + $7877 = Mon127_EvosMoves + $7893 = Mon128_EvosMoves + $78AF = Mon129_EvosMoves + $78B6 = Mon130_EvosMoves + $78CE = Mon131_EvosMoves + $78E8 = Mon132_EvosMoves + $78EA = Mon133_EvosMoves + $7914 = Mon134_EvosMoves + $792E = Mon135_EvosMoves + $7948 = Mon136_EvosMoves + $7962 = Mon137_EvosMoves + $797A = Mon138_EvosMoves + $7997 = Mon139_EvosMoves + $79B3 = Mon140_EvosMoves + $79CC = Mon141_EvosMoves + $79E6 = Mon142_EvosMoves + $79FE = Mon143_EvosMoves + $7A1E = Mon144_EvosMoves + $7A30 = Mon145_EvosMoves + $7A42 = Mon146_EvosMoves + $7A54 = Mon147_EvosMoves + $7A71 = Mon148_EvosMoves + $7A8E = Mon149_EvosMoves + $7AAA = Mon150_EvosMoves + $7AB6 = Mon151_EvosMoves + $7ACC = Mon152_EvosMoves + $5F33 = TrainerAI + $625C = DrawEnemyPokeballs + $5139 = AIEnemyTrainerChooseMoves + $50A0 = Func_39680 + $50C7 = Func_396a7 + $50F3 = _ScrollTrainerPicAfterBattle + $5670 = ReadTrainer + $63C3 = HealEffect_ + $6488 = TransformEffect_ + $656E = ReflectLightScreenEffect_ + $65CB = Func_3ad1c + $6867 = WriteMonMoves + $624E = DrawAllPokeballs + SLACK: $051E bytes + +Bank #15: + SECTION: $4000-$7E38 ($3E39 bytes) + $4AA6 = AnyPartyAlive + $7042 = InitBattle + $7200 = asm_3f0d0 + $5050 = OldManItemList + $6F8B = Func_3ee5b + $4D66 = ReadPlayerMonCurHPAndStatus + $5896 = IsGhostBattle + $6C25 = Func_3eb01 + $7578 = StatModifierUpEffect + $523C = MoveSelectionMenu + $7CF8 = Func_3fba8 + $7CA3 = PrintButItFailedText_ + $4D7D = Func_3cd5a + $666B = MoveHitTest + $717B = _LoadTrainerPic + $64D4 = AIGetTypeEffectiveness + $4931 = EnemySendOut + $4000 = BattleCore + $6DB6 = Func_3ec92 + $6F88 = Func_3ee58 + $410F = Func_3c110 + $40FE = Func_3c0ff + $494D = Func_3c92a + $485A = HandlePlayerBlackOut + $41AC = Func_3c1ad + $4ED6 = InitBattleMenu + $41A7 = OutOfSafariBallsText + $4201 = asm_3c202 + $4ABA = Func_3ca97 + $4902 = Func_3c8df + $4BC9 = Func_3cba6 + $4CB4 = Func_3cc91 + $4228 = WildRanText + $422D = EnemyRanText + $4723 = HandlePlayerMonFainted + $4548 = HandleEnemyMonFainted + $55C0 = SelectEnemyMove + $43A0 = MainInBattleLoop.playerMovesFirst + $6FCB = BattleRandom + $67BC = Func_3e6bc + $43E0 = HandlePoisonBurnLeechSeed + $56BA = Func_3d65e + $4532 = Func_3c50f + $4232 = MainInBattleLoop + $4451 = HurtByPoisonText + $4456 = HurtByBurnText + $7037 = PlayMoveAnimation + $4460 = HandlePoisonBurnLeechSeed_DecreaseOwnHP + $44C6 = HandlePoisonBurnLeechSeed_IncreaseEnemyHP + $445B = HurtByLeechSeedText + $4519 = UpdateCurMonHPBar + $458A = FaintEnemyPokemon + $4D83 = Func_3cd60 + $4672 = AnyEnemyPokemonAliveCheck + $46B9 = TrainerBattleVictory + $47BE = Func_3c79b + $47FB = Func_3c7d8 + $4687 = Func_3c664 + $48B6 = Func_3c893 + $4666 = Func_3c643 + $4711 = PlayBattleVictoryMusic + $4764 = Func_3c741 + $4661 = EnemyMonFaintedText + $6FC4 = Func_3ee94 + $4EB3 = GetBattleHealthBarColor + $5661 = Func_3d605 + $470C = TrainerDefeatedText + $6E42 = ScrollTrainerPicAfterBattle + $4707 = MoneyForWinningText + $47B9 = PlayerMonFaintedText + $47F6 = UseNextMonText + $4ADC = Func_3cab9 + $48A7 = Sony1WinText + $48AC = PlayerBlackedOutText2 + $48B1 = LinkBattleLostText + $48FA = SevenSpacesText + $4A9C = TrainerAboutToUseText + $5218 = AlreadyOutText + $4AA1 = TrainerSentOutText + $4E0F = Func_3cdec + $51DD = Func_3d1ba + $4AD7 = NoWillText + $4B7F = Func_3cab9.asm_3cb5c + $4BBA = CantEscapeText + $4BBF = NoRunningText + $4BC4 = GotAwayText + $6E4A = Func_3ed1a + $6F49 = Func_3ee19 + $6E4E = Func_3ed1e + $4CC7 = Func_3cca4 + $4D5D = Func_3cd3a + $4EBF = Func_3ce9c + $4EA2 = Func_3ce7f + $4F3D = RegularBattleMenu + $4F35 = OldManName + $500B = Func_3cfe8 + $50ED = Func_3d0ca + $50E8 = ItemsCantBeUsedHereText + $5031 = asm_3d00e + $521D = Func_3d1fa + $5082 = asm_3d05f + $513C = Func_3d119 + $5103 = Func_3d0e0 + $5128 = Func_3d105 + $4D1D = Func_3ccfa + $5418 = Func_3d3f5 + $5247 = MoveSelectionMenu.loadmoves + $5259 = MoveSelectionMenu.writemoves + $53DB = WhichTechniqueString + $54D9 = Func_3d4b6 + $53EC = Func_3d3c9 + $5400 = Func_3d3dd + $5458 = Func_3d435 + $53D6 = MoveDisabledText + $53D1 = MoveNoPPText + $5321 = Func_3d2fe + $5453 = NoMovesLeftText + $54B6 = Func_3d493 + $559B = DisabledText + $5594 = Func_3d4b6.asm_3d54e + $7D2D = PhysicalSpecialSplit + $5563 = Func_3d4b6.OtherTextShow + $5558 = Func_3d4b6.PhysicalTextShow + $55B7 = SpecialText + $556C = Func_3d4b6.RestOfTheRoutineThing + $55AD = PhysicalText + $55A5 = OtherText + $6BE2 = GetCurrentMove + $565D = SelectEnemyMove.asm_3d601 + $5866 = Func_3d80a + $586D = PrintGhostText + $58B0 = Func_3d854 + $5D08 = Func_3dc88 + $7262 = Func_3f132 + $5B75 = PrintMonName1Text + $4000 = EffectsArray1 + $4048 = EffectsArray5B + $4011 = EffectsArray2 + $575E = asm_3d6dc.asm_3d702 + $60A9 = CriticalHitTest + $6111 = HandleCounterMove + $5E4F = CalculateDamage + $5FEF = MoreCalculateDamage + $57A7 = asm_3d74b + $6430 = AdjustDamageForMoveType + $6787 = Func_3e687 + $7003 = Func_3eed3 + $637B = MirrorMoveCopyMove + $56F6 = Func_3d69a + $63CF = MetronomePickMove + $4014 = EffectsArray3 + $5C62 = PrintMoveFailureText + $615D = ApplyAttackToEnemyPokemon + $5CDC = Func_3dc5c + $402F = EffectsArray4 + $6334 = HandleBuildingRage + $5770 = asm_3d714 + $5861 = MultiHitText + $403A = EffectsArray5 + $588C = ScaredText + $5891 = GetOutText + $5ABD = FastAsleepText + $5AC2 = WokeUpText + $5AB7 = Func_3da37 + $5AC7 = IsFrozenText + $7573 = FireDefrostedText + $592C = FlinchedCheck + $5B03 = CantMoveText + $5942 = HyperBeamCheck + $5AD1 = FlinchedText + $5AD6 = MustRechargeText + $5ADB = DisabledNoMoreText + $5AEA = ConfusedNoMoreText + $5AE0 = IsConfusedText + $5B2D = PrintHurtItselfText + $5B08 = PrintMoveIsDisabledText + $5ACC = FullyParalyzedText + $5AF4 = UnleashedEnergyText + $5761 = asm_3d705 + $5AF9 = ThrashingAboutText + $5738 = asm_3d6dc + $5A9A = Func_3da1a + $5AFE = AttackContinuesText + $5AB9 = Func_3da39 + $570C = asm_3d6b0 + $5B28 = MoveIsDisabledText + $5AE5 = HurtItselfText + $627E = ApplyDamageToPlayerPokemon + $5B7B = MonName1Text + $5C05 = Func_3db85 + $5BB4 = Used2Text + $5BAD = Used1Text + $5BC3 = InsteadText + $5BCC = CF4BText + $5BE2 = ExclamationPointPointerTable + $5BEC = ExclamationPoint1Text + $5BF1 = ExclamationPoint2Text + $5BF6 = ExclamationPoint3Text + $5BFB = ExclamationPoint4Text + $5C00 = ExclamationPoint5Text + $5C23 = UnknownMovesList_3dba3 + $5CD7 = DoesntAffectMonText + $5CC2 = AttackMissedText + $5CCC = UnaffectedText + $5CC7 = KeptGoingAndCrashedText + $61C0 = ApplyDamageToEnemyPokemon + $5CFA = CriticalOHKOTextPointers + $5CFE = CriticalHitText + $5D03 = OHKOText + $5E30 = Func_3ddb0 + $5E40 = WontObeyText + $5E34 = Func_3ddb4 + $5E3B = BeganToNapText + $5E36 = LoafingAroundText + $5E45 = TurnedAwayText + $5E4A = IgnoredOrdersText + $5FA6 = Func_3df1c + $60A0 = Func_3e016 + $6106 = HighCriticalMoves + $60FF = CriticalHitTest.Chances + $621B = ApplyAttackToEnemyPokemonDone + $62DC = AttackSubstitute + $62D9 = ApplyAttackToPlayerPokemonDone + $632A = SubstituteTookDamageText + $632F = SubstituteBrokeText + $6376 = BuildingRageText + $63AB = MirrorMoveFailedText + $63FE = IncrementMovePP + $64FF = TypeEffects + $6485 = AdjustDamageForMoveType.loop + $6709 = MoveHitTest.moveMissed + $7CC9 = CheckTargetSubstitute + $6724 = CalcHitChance + $781B = StatModifierRatios + $6777 = CalcHitChance.nextCalculation + $698C = Func_3e88c + $698F = Func_3e88f + $6DA5 = Func_3ec81 + $687F = Func_3e77f + $5EFA = Func_3de75 + $68D1 = Func_3e7d1 + $67FC = Func_3e6fc + $621E = ApplyAttackToPlayerPokemon + $6894 = Func_3e794 + $6987 = HitXTimesText + $6BDC = Func_3eab8 + $6A0B = Func_3e8e7 + $6A21 = Func_3e8fd + $6ACE = Func_3e9aa + $6882 = asm_3e782 + $6850 = asm_3e750 + $6BBF = Func_3ea9b + $6BDE = Func_3eaba + $682B = asm_3e72b + $6BF0 = GetCurrentMove.player + $4C36 = Func_3cc13 + $7E30 = LoadBackSpriteUnzoomed + $6E57 = Func_3ed27 + $6E94 = Func_3ed64 + $6ED5 = Func_3eda5 + $6F3C = Func_3ee0c + $6F65 = Func_3ee35 + $6FCA = TerminatorText_3ee9a + $70BB = InitWildBattle + $6D56 = Func_3ec32 + $711B = Func_3efeb + $404B = Func_3c04c + $717A = TerminatorText_3f04a + $411D = Func_3c11e + $7268 = JumpMoveEffect + $7280 = MoveEffectPointerTable + $7336 = SleepEffect + $7389 = PoisonEffect + $7423 = DrainHPEffect + $7446 = FreezeBurnParalyzeEffect + $742B = ExplodeEffect + $7C5E = PayDayEffect + $769C = StatModifierDownEffect + $7C66 = ConversionEffect + $7C6E = HazeEffect + $7835 = BideEffect + $7867 = ThrashPetalDanceEffect + $7889 = SwitchAndTeleportEffect + $7961 = TwoToFiveAttacksEffect + $79AB = FlichSideEffect + $79D4 = OneHitKOEffect + $79DC = ChargeEffect + $7A67 = TrappingEffect + $7A91 = MistEffect + $7A99 = FocusEnergyEffect + $7AA1 = RecoilEffect + $7AB1 = ConfusionEffect + $7C76 = HealEffect + $7C7E = TransformEffect + $7C86 = ReflectLightScreenEffect + $7B01 = ParalyzeEffect + $7AA9 = ConfusionSideEffect + $7B09 = SubstituteEffect + $7B11 = HyperBeamEffect + $7B2F = RageEffect + $7B3D = MimicEffect + $7BCC = LeechSeedEffect + $7BD4 = SplashEffect + $7BDA = DisableEffect + $7D18 = FangAttacks + $7D1F = VoltTackleEffect + $7D26 = PoisonFangEffect + $7348 = SleepEffect.asm_3f20e + $7384 = AlreadyAsleepText + $7CD9 = Func_3fb89 + $737F = FellAsleepText + $7CAE = PrintDidntAffectText + $741E = BadlyPoisonedText + $7419 = PoisonedText + $7CE6 = Func_3fb96 + $74CA = opponentAttacker + $7532 = CheckDefrost + $7D09 = Func_3fbb9 + $7CBE = PrintMayNotAttackText + $7528 = BurnedText + $7B1F = Func_3f9cf + $752D = FrozenText + $7672 = Func_3f522 + $7670 = Func_3f520 + $7613 = Func_3f4c3 + $77D8 = Func_3f688 + $7678 = MonsStatsRoseText + $7C8E = NothingHappenedText + $7692 = GreatlyRoseText + $7697 = RoseText + $77AA = Func_3f65a + $77A0 = Func_3f650 + $779D = Func_3f64d + $7774 = Func_3f624 + $77B1 = MonsStatsFellText + $7C9E = Func_3fb4e + $77D3 = FellText + $77CE = GreatlyFellText + $77EF = StatsTextStrings + $7CB9 = IsUnaffectedText + $7952 = RanFromBattleText + $7957 = RanAwayScaredText + $795C = WasBlownAwayText + $7A18 = ChargeMoveEffectText + $7A49 = MadeWhirlwindText + $7A4E = TookInSunlightText + $7A53 = LoweredItsHeadText + $7A58 = SkyAttackGlowingText + $7A5D = FlewUpHighText + $7A62 = DugAHoleText + $7AF1 = BecameConfusedText + $7BC7 = MimicLearnedMoveText + $7C93 = PrintNoEffectText + $7C59 = MoveWasDisabledText + $7C99 = NoEffectText + $7CA9 = ButItFailedText + $7CB4 = DidntAffectText + $7CC4 = ParalyzedMayNotAttackText + $7D0C = Func_3fbbc + $7D36 = PhysicalSpecialSplit.MovesTable + $71F6 = Func_3f0c6 + $71A3 = Func_3f073 + $7233 = LoadMonBackPic + $6E32 = Func_3ed02 + $7048 = InitOpponent + $5CD1 = PrintDoesntAffectText + $6EC9 = Func_3ed99 + SLACK: $01C7 bytes + +Bank #16: + SECTION: $4000-$6F1A ($2F1B bytes) + $6D53 = CryData + $677D = Moves + $4111 = HandlePokedexListMenu + $406D = HandlePokedexSideMenu + $401D = ShowPokedexMenu.setUpGraphics + $42C2 = IsPokemonBitSet + $4FA9 = PokedexToIndex + $4474 = DrawTileLine + $42E2 = ShowPokedexDataInternal + $428E = DrawPokedexVerticalLine + $429D = PokedexSeenText + $42A2 = PokedexOwnText + $42A6 = PokedexContentsText + $42AF = PokedexMenuItemsText + $41ED = HandlePokedexListMenu.dashedLine + $428C = HandlePokedexListMenu.buttonBPressed + $4191 = HandlePokedexListMenu.loop + $445F = PokedexDataDividerLine + $4448 = HeightWeightText + $447E = PokedexEntryPointers + $4FC0 = IndexToPokedex + $4423 = ShowPokedexDataInternal.waitForButtonPress + $4DE7 = BulbasaurDexEntry + $4634 = IvysaurDexEntry + $4DF5 = VenusaurDexEntry + $4EE3 = CharmanderDexEntry + $4F07 = CharmeleonDexEntry + $4F26 = CharizardDexEntry + $4EF3 = SquirtleDexEntry + $4F16 = WartortleDexEntry + $4775 = BlastoiseDexEntry + $4C63 = CaterpieDexEntry + $4C71 = MetapodDexEntry + $4C81 = ButterfreeDexEntry + $4BD0 = WeedleDexEntry + $4BE3 = KakunaDexEntry + $4BF3 = BeedrillDexEntry + $47DB = PidgeyDexEntry + $4DB7 = PidgeottoDexEntry + $4DC5 = PidgeotDexEntry + $4E62 = RattataDexEntry + $4E6F = RaticateDexEntry + $45F0 = SpearowDexEntry + $47CD = FearowDexEntry + $4B8D = EkansDexEntry + $486D = ArbokDexEntry + $4A3F = PikachuDexEntry + $4A4E = RaichuDexEntry + $4AC3 = SandshrewDexEntry + $4AD2 = SandslashDexEntry + $4691 = NidoranFDexEntry + $4E90 = NidorinaDexEntry + $46A5 = NidoqueenDexEntry + $45CD = NidoranMDexEntry + $4E7C = NidorinoDexEntry + $4611 = NidokingDexEntry + $45E1 = ClefairyDexEntry + $4D45 = ClefableDexEntry + $4A25 = VulpixDexEntry + $4A32 = NinetalesDexEntry + $4B01 = JigglypuffDexEntry + $4B12 = WigglytuffDexEntry + $4B80 = ZubatDexEntry + $4CC8 = GolbatDexEntry + $4F35 = OddishDexEntry + $4F43 = GloomDexEntry + $4F51 = VileplumeDexEntry + $4B9C = ParasDexEntry + $487C = ParasectDexEntry + $4961 = VenonatDexEntry + $4C3D = VenomothDexEntry + $492D = DiglettDexEntry + $4C2F = DugtrioDexEntry + $49FD = MeowthDexEntry + $4D68 = PersianDexEntry + $488E = PsyduckDexEntry + $4CA8 = GolduckDexEntry + $4907 = MankeyDexEntry + $4C1B = PrimeapeDexEntry + $47AA = GrowlitheDexEntry + $46E7 = ArcanineDexEntry + $4994 = PoliwagDexEntry + $4BAE = PoliwhirlDexEntry + $4BBF = PoliwrathDexEntry + $4D9D = AbraDexEntry + $47FD = KadabraDexEntry + $4DAA = AlakazamDexEntry + $4B6C = MachopDexEntry + $4825 = MachokeDexEntry + $4C94 = MachampDexEntry + $4F61 = BellsproutDexEntry + $4F71 = WeepinbellDexEntry + $4F85 = VictreebelDexEntry + $4732 = TentacoolDexEntry + $4E03 = TentacruelDexEntry + $4EA4 = GeodudeDexEntry + $480A = GravelerDexEntry + $48AE = GolemDexEntry + $4E3A = PonytaDexEntry + $4E4E = RapidashDexEntry + $47EE = SlowpokeDexEntry + $4620 = SlowbroDexEntry + $4ED3 = MagnemiteDexEntry + $48E3 = MagnetonDexEntry + $494E = FarfetchdDexEntry + $4981 = DoduoDexEntry + $4C07 = DodrioDexEntry + $491B = SeelDexEntry + $4C51 = DewgongDexEntry + $4671 = GrimerDexEntry + $4D06 = MukDexEntry + $4721 = ShellderDexEntry + $4D26 = CloysterDexEntry + $4745 = GastlyDexEntry + $4D90 = HaunterDexEntry + $4681 = GengarDexEntry + $47B9 = OnixDexEntry + $489C = DrowzeeDexEntry + $4CB6 = HypnoDexEntry + $4A11 = KrabbyDexEntry + $4D16 = KinglerDexEntry + $4603 = VoltorbDexEntry + $4D37 = ElectrodeDexEntry + $4664 = ExeggcuteDexEntry + $4642 = ExeggutorDexEntry + $46B4 = CuboneDexEntry + $4D7C = MarowakDexEntry + $484A = HitmonleeDexEntry + $485B = HitmonchanDexEntry + $4653 = LickitungDexEntry + $48F3 = KoffingDexEntry + $4D54 = WeezingDexEntry + $46C4 = RhyhornDexEntry + $45AE = RhydonDexEntry + $4818 = ChanseyDexEntry + $479C = TangelaDexEntry + $45BD = KangaskhanDexEntry + $4AA3 = HorseaDexEntry + $4AB3 = SeadraDexEntry + $4E16 = GoldeenDexEntry + $4E28 = SeakingDexEntry + $4762 = StaryuDexEntry + $4DD3 = StarmieDexEntry + $4839 = MrMimeDexEntry + $4752 = ScytherDexEntry + $49A5 = JynxDexEntry + $48D1 = ElectabuzzDexEntry + $48BF = MagmarDexEntry + $4788 = PinsirDexEntry + $493B = TaurosDexEntry + $4CF8 = MagikarpDexEntry + $470E = GyaradosDexEntry + $46D4 = LaprasDexEntry + $49EA = DittoDexEntry + $4B23 = EeveeDexEntry + $4B58 = VaporeonDexEntry + $4B45 = JolteonDexEntry + $4B36 = FlareonDexEntry + $4EB2 = PorygonDexEntry + $4AE1 = OmanyteDexEntry + $4AF1 = OmastarDexEntry + $4A7D = KabutoDexEntry + $4A90 = KabutopsDexEntry + $4EC3 = AerodactylDexEntry + $4CE6 = SnorlaxDexEntry + $49C8 = ArticunoDexEntry + $49D8 = ZapdosDexEntry + $49B9 = MoltresDexEntry + $4A5D = DratiniDexEntry + $4A6D = DragonairDexEntry + $4971 = DragoniteDexEntry + $4CD5 = MewtwoDexEntry + $46FA = MewDexEntry + $4F99 = LugiaDexEntry + $4FD4 = PokedexOrder + $50C2 = PointerIDs_41138 + $50D3 = PointerIDs_41149 + $50E9 = PointerTable_4115f + $509F = Func_41102.asm_41115 + $512B = LoadTradingGFXAndMonNames + $51CF = Func_41245 + $5222 = Func_41298 + $525C = Func_412d2 + $52C0 = Func_41336 + $5300 = Func_41376 + $5350 = Func_413c6 + $510B = Func_41181 + $5552 = Func_415c8 + $5588 = PrintTradeWentToText + $559B = PrintTradeForSendsText + $55B7 = PrintTradeFarewellText + $55D6 = PrintTradeTakeCareText + $55E4 = PrintTradeWillTradeText + $51C5 = Func_4123b + $5569 = Func_415df + $51A1 = Func_41217 + $5120 = Func_41196 + $66F3 = Func_42769 + $552E = Func_415a4 + $511B = Delay50 + $5600 = Func_41676 + $5438 = Func_414ae + $57CC = Func_41842 + $5110 = Func_41186 + $52B8 = UnknownOAM_4132e + $6731 = Func_427a7 + $539B = Func_41411 + $548F = Func_41505 + $53B7 = Func_4142d + $5429 = Func_4149f + $544F = Func_414c5 + $53E6 = Func_4145c + $54AF = Func_41525 + $5195 = Func_4120b + $5472 = Func_414e8 + $54E2 = Func_41558 + $54C9 = Func_41525.asm_4153f + $549A = Func_41510 + $54FE = OAMPointers_41574 + $550E = UnknownOAM_41584 + $5516 = UnknownOAM_4158c + $551E = UnknownOAM_41594 + $5526 = UnknownOAM_4159c + $5596 = TradeWentToText + $55AD = TradeForText + $55B2 = TradeSendsText + $55CC = TradeWavesFarewellText + $55D1 = TradeTransferredText + $55DF = TradeTakeCareText + $55F6 = TradeWillTradeText + $55FB = TradeforText + $5814 = PlayShootingStar + $5627 = PlayIntroScene + $57C9 = Func_4183f + $5751 = Func_417c7 + $5798 = Func_4180e + $589A = IntroNidorinoAnimation1 + $571D = AnimateIntroNidorino + $58A5 = IntroNidorinoAnimation2 + $58B0 = IntroNidorinoAnimation3 + $58BB = IntroNidorinoAnimation4 + $58C6 = IntroNidorinoAnimation5 + $58D1 = IntroNidorinoAnimation6 + $58DA = IntroNidorinoAnimation7 + $5738 = Func_417ae + $5A23 = FightIntroBackMon + $58E3 = GameFreakIntro + $6023 = FightIntroFrontMon + $5873 = Func_418e9 + $57DC = LoadIntroGraphics + $5782 = Func_417f8 + $577A = Func_417f0 + $5791 = Func_41807 + $676F = OTString67E5 + $4000 = ShowPokedexMenu + $507D = Func_410f3 + $560C = PlayIntro + $506C = Func_410e2 + $42D1 = ShowPokedexData + SLACK: $10E5 bytes + +Bank #17: + SECTION: $4000-$70AA ($30AB bytes) + $4000 = LavenderTown_h + $4251 = ViridianPokecenter_h + $44D0 = RockTunnel1_h + $4926 = SSAnne3_h + $6309 = SeafoamIslands2_h + $6445 = SeafoamIslands3_h + $6581 = SeafoamIslands4_h + $678D = SeafoamIslands5_h + $42A3 = Mansion1_h + $47DD = SeafoamIslands1_h + $4974 = VictoryRoad3_h + $4BBE = RocketHideout1_h + $4E1B = RocketHideout2_h + $5219 = RocketHideout3_h + $5451 = RocketHideout4_h + $5704 = RocketHideoutElevator_h + $585F = SafariZoneEast_h + $599F = SafariZoneNorth_h + $5BA6 = SafariZoneCenter_h + $5CE1 = SafariZoneRestHouse1_h + $5D1E = SafariZoneRestHouse2_h + $5D69 = SafariZoneRestHouse3_h + $5DB4 = SafariZoneRestHouse4_h + $5DFF = UnknownDungeon2_h + $5EE4 = UnknownDungeon3_h + $5FDF = RockTunnel2_h + $57B4 = SilphCoElevator_h + $4FD7 = LoadSpinnerArrowTiles + $69A0 = Func_469a0 + $4085 = LavenderTownBlocks + $410E = LavenderTownTextPointers + $410B = LavenderTownScript + $402D = LavenderTownObject + $4120 = LavenderTownText1 + $414B = LavenderTownText2 + $4150 = LavenderTownText3 + $4155 = LavenderTownText4 + $415A = LavenderTownText5 + $415F = LavenderTownText8 + $4164 = LavenderTownText9 + $413C = LavenderTownText_4413c + $4146 = LavenderTownText_44146 + $4141 = LavenderTownText_44141 + $41D1 = DexRatingsTable + $41CC = PokedexRatingText_441cc + $4201 = PokedexRatingText_44201 + $4206 = PokedexRatingText_44206 + $420B = PokedexRatingText_4420b + $4210 = PokedexRatingText_44210 + $4215 = PokedexRatingText_44215 + $421A = PokedexRatingText_4421a + $421F = PokedexRatingText_4421f + $4224 = PokedexRatingText_44224 + $4229 = PokedexRatingText_44229 + $422E = PokedexRatingText_4422e + $4233 = PokedexRatingText_44233 + $4238 = PokedexRatingText_44238 + $423D = PokedexRatingText_4423d + $4242 = PokedexRatingText_44242 + $4247 = PokedexRatingText_44247 + $424C = PokedexRatingText_4424c + $40DF = ViridianPokecenterBlocks + $4263 = ViridianPokecenterTextPointers + $425D = ViridianPokeCenterScript + $4277 = ViridianPokecenterObject + $426B = ViridianPokeCenterText1 + $426C = ViridianPokeCenterText2 + $4271 = ViridianPokeCenterText3 + $4276 = ViridianPokeCenterText4 + $43FE = Mansion1Blocks + $432C = Mansion1TextPointers + $42AF = Mansion1Script + $43A4 = Mansion1Object + $42C5 = Mansion1Subscript1 + $4334 = Mansion1TrainerHeaders + $4326 = Mansion1ScriptPointers + $430B = Mansion1Script_4430b + $4304 = Mansion1Script_44304 + $4341 = Mansion1Text1 + $435A = Mansion1Text4 + $434B = Mansion1BattleText2 + $4355 = Mansion1AfterBattleText2 + $4350 = Mansion1EndBattleText2 + $4334 = Mansion1TrainerHeader0 + $4395 = MansionSwitchText + $439A = MansionSwitchPressedText + $439F = MansionSwitchNotPressedText + $4675 = RockTunnel1Blocks + $44F5 = RockTunnel1TextPointers + $44DC = RockTunnel1Script + $45F6 = RockTunnel1Object + $4505 = RockTunnel1TrainerHeaders + $44EF = RockTunnel1ScriptPointers + $455A = RockTunnel1Text1 + $4560 = RockTunnel1Text2 + $4566 = RockTunnel1Text3 + $456C = RockTunnel1Text4 + $4572 = RockTunnel1Text5 + $4578 = RockTunnel1Text6 + $457E = RockTunnel1Text7 + $45F1 = RockTunnel1Text8 + $4588 = RockTunnel1BattleText1 + $4592 = RockTunnel1AfterBattleText1 + $458D = RockTunnel1EndBattleText1 + $4597 = RockTunnel1BattleText2 + $45A1 = RockTunnel1AfterBattleText2 + $459C = RockTunnel1EndBattleText2 + $45A6 = RockTunnel1BattleText3 + $45B0 = RockTunnel1AfterBattleText3 + $45AB = RockTunnel1EndBattleText3 + $45B5 = RockTunnel1BattleText4 + $45BF = RockTunnel1AfterBattleText4 + $45BA = RockTunnel1EndBattleText4 + $45C4 = RockTunnel1BattleText5 + $45CE = RockTunnel1AfterBattleText5 + $45C9 = RockTunnel1EndBattleText5 + $45D3 = RockTunnel1BattleText6 + $45DD = RockTunnel1AfterBattleText6 + $45D8 = RockTunnel1EndBattleText6 + $45E2 = RockTunnel1BattleText7 + $45EC = RockTunnel1AfterBattleText7 + $45E7 = RockTunnel1EndBattleText7 + $4505 = RockTunnel1TrainerHeader1 + $4511 = RockTunnel1TrainerHeader2 + $451D = RockTunnel1TrainerHeader3 + $4529 = RockTunnel1TrainerHeader4 + $4535 = RockTunnel1TrainerHeader5 + $4541 = RockTunnel1TrainerHeader6 + $454D = RockTunnel1TrainerHeader7 + $489F = SeafoamIslands1Blocks + $484B = SeafoamIslands1TextPointers + $47E9 = SeafoamIslands1Script + $484F = SeafoamIslands1Object + $4846 = Seafoam1HolesCoords + $6981 = Func_46981 + $4956 = SSAnne3Blocks + $4935 = SSAnne3TextPointers + $4932 = SSAnne3Script + $493C = SSAnne3Object + $4937 = SSAnne3Text1 + $4B37 = VictoryRoad3Blocks + $4A24 = VictoryRoad3TextPointers + $4980 = VictoryRoad3Script + $4ACD = VictoryRoad3Object + $4996 = VictoryRoad3Script_44996 + $4A38 = VictoryRoad3TrainerHeaders + $49B1 = VictoryRoad3ScriptPointers + $49B7 = VictoryRoad3Script0 + $49FE = VictoryRoad3Script0.asm_449fe + $49F9 = VictoryRoad3Script0.coordsData_449f9 + $4A69 = VictoryRoad3Text1 + $4A73 = VictoryRoad3Text2 + $4A7D = VictoryRoad3Text3 + $4A87 = VictoryRoad3Text4 + $4A91 = VictoryRoad3BattleText2 + $4A9B = VictoryRoad3AfterBattleText2 + $4A96 = VictoryRoad3EndBattleText2 + $4AA0 = VictoryRoad3BattleText3 + $4AAA = VictoryRoad3AfterBattleText3 + $4AA5 = VictoryRoad3EndBattleText3 + $4AAF = VictoryRoad3BattleText4 + $4AB9 = VictoryRoad3AfterBattleText4 + $4AB4 = VictoryRoad3EndBattleText4 + $4ABE = VictoryRoad3BattleText5 + $4AC8 = VictoryRoad3AfterBattleText5 + $4AC3 = VictoryRoad3EndBattleText5 + $4A38 = VictoryRoad3TrainerHeader0 + $4A44 = VictoryRoad3TrainerHeader2 + $4A50 = VictoryRoad3TrainerHeader3 + $4A5C = VictoryRoad3TrainerHeader4 + $4D49 = RocketHideout1Blocks + $4C14 = RocketHideout1TextPointers + $4BCA = RocketHideout1Script + $4CE7 = RocketHideout1Object + $4BE0 = RocketHideout1Script_44be0 + $4C22 = RocketHideout1TrainerHeaders + $4C0E = RocketHideout1ScriptPointers + $4C5F = RocketHideout1Text1 + $4C69 = RocketHideout1Text2 + $4C73 = RocketHideout1Text3 + $4C7D = RocketHideout1Text4 + $4C87 = RocketHideout1Text5 + $4CA1 = RocketHideout1BattleText2 + $4CAB = RocketHideout1AfterBattleTxt2 + $4CA6 = RocketHideout1EndBattleText2 + $4CB0 = RocketHideout1BattleText3 + $4CBA = RocketHideout1AfterBattleTxt3 + $4CB5 = RocketHideout1EndBattleText3 + $4CBF = RocketHideout1BattleText4 + $4CC9 = RocketHideout1AfterBattleTxt4 + $4CC4 = RocketHideout1EndBattleText4 + $4CCE = RocketHideout1BattleText5 + $4CD8 = RocketHideout1AfterBattleTxt5 + $4CD3 = RocketHideout1EndBattleText5 + $4CDD = RocketHideout1BattleText6 + $4CE2 = RocketHideout1AfterBattleTxt6 + $4C91 = RocketHideout1EndBattleText6 + $4C22 = RocketHideout1TrainerHeader0 + $4C2E = RocketHideout1TrainerHeader2 + $4C3A = RocketHideout1TrainerHeader3 + $4C46 = RocketHideout1TrainerHeader4 + $4C52 = RocketHideout1TrainerHeader5 + $4C9F = RocketHideout1Text_44c9f + $5147 = RocketHideout2Blocks + $50C7 = RocketHideout2TextPointers + $4E27 = RocketHideout2Script + $50F7 = RocketHideout2Object + $50D1 = RocketHideout2TrainerHeaders + $4E3A = RocketHideout2ScriptPointers + $4E42 = RocketHideout2Script0 + $4FC2 = RocketHideout2Script3 + $4E6D = RocketHideout2ArrowTilePlayerMovement + $4F1A = RocketHideout2ArrowMovement1 + $4F1D = RocketHideout2ArrowMovement2 + $4F20 = RocketHideout2ArrowMovement3 + $4F25 = RocketHideout2ArrowMovement4 + $4F2C = RocketHideout2ArrowMovement5 + $4F31 = RocketHideout2ArrowMovement6 + $4F36 = RocketHideout2ArrowMovement7 + $4F39 = RocketHideout2ArrowMovement8 + $4F3C = RocketHideout2ArrowMovement9 + $4F3F = RocketHideout2ArrowMovement10 + $4F42 = RocketHideout2ArrowMovement11 + $4F47 = RocketHideout2ArrowMovement12 + $4F4A = RocketHideout2ArrowMovement13 + $4F4D = RocketHideout2ArrowMovement14 + $4F52 = RocketHideout2ArrowMovement15 + $4F57 = RocketHideout2ArrowMovement16 + $4F5C = RocketHideout2ArrowMovement17 + $4F63 = RocketHideout2ArrowMovement18 + $4F6A = RocketHideout2ArrowMovement19 + $4F6F = RocketHideout2ArrowMovement20 + $4F72 = RocketHideout2ArrowMovement21 + $4F77 = RocketHideout2ArrowMovement22 + $4F7C = RocketHideout2ArrowMovement23 + $4F81 = RocketHideout2ArrowMovement24 + $4F86 = RocketHideout2ArrowMovement25 + $4F89 = RocketHideout2ArrowMovement26 + $4F8E = RocketHideout2ArrowMovement27 + $4F93 = RocketHideout2ArrowMovement28 + $4F9C = RocketHideout2ArrowMovement29 + $4FA1 = RocketHideout2ArrowMovement30 + $4FA8 = RocketHideout2ArrowMovement31 + $4FAB = RocketHideout2ArrowMovement32 + $4FAE = RocketHideout2ArrowMovement33 + $4FB1 = RocketHideout2ArrowMovement34 + $4FB4 = RocketHideout2ArrowMovement35 + $4FBB = RocketHideout2ArrowMovement36 + $5083 = SpinnerPlayerFacingDirections + $5023 = FacilitySpinnerArrows + $5053 = GymSpinnerArrows + $5087 = SpinnerArrowAnimTiles + $50DE = RocketHideout2Text1 + $50E8 = RocketHideout2BattleText2 + $50F2 = RocketHideout2AfterBattleTxt2 + $50ED = RocketHideout2EndBattleText2 + $50D1 = RocketHideout2TrainerHeader0 + $537F = RocketHideout3Blocks + $52FA = RocketHideout3TextPointers + $5225 = RocketHideout3Script + $534D = RocketHideout3Object + $5302 = RocketHideout3TrainerHeaders + $5238 = RocketHideout3ScriptPointers + $5240 = RocketHideout3Script0 + $52E4 = RocketHideout3Script3 + $526B = RocketHideout3ArrowTilePlayerMovement + $52CB = RocketHideout3ArrowMovement6 + $52AC = RocketHideout3ArrowMovement1 + $52B3 = RocketHideout3ArrowMovement2 + $52B8 = RocketHideout3ArrowMovement3 + $52BB = RocketHideout3ArrowMovement4 + $52C2 = RocketHideout3ArrowMovement5 + $52CE = RocketHideout3ArrowMovement7 + $52D1 = RocketHideout3ArrowMovement8 + $52D6 = RocketHideout3ArrowMovement9 + $52DB = RocketHideout3ArrowMovement10 + $52DE = RocketHideout3ArrowMovement11 + $52E1 = RocketHideout3ArrowMovement12 + $531B = RocketHideout3Text1 + $5334 = RocketHideout3Text2 + $5325 = RocketHideout3BattleText2 + $532F = RocketHideout3AfterBattleTxt2 + $532A = RocketHideout3EndBattleText2 + $533E = RocketHideout3BattleTxt + $5348 = RocketHideout3AfterBattleText3 + $5343 = RocketHideout3EndBattleText3 + $5302 = RocketHideout3TrainerHeader0 + $530E = RocketHideout3TrainerHeader2 + $5650 = RocketHideout4Blocks + $5501 = RocketHideout4TextPointers + $545D = RocketHideout4Script + $55F1 = RocketHideout4Object + $5473 = RocketHideout4Script_45473 + $5515 = RocketHideout4TrainerHeader0 + $54AE = RocketHideout4ScriptPointers + $54B6 = RocketHideout4Script3 + $54A3 = RocketHideout4Script_454a3 + $553A = RocketHideout4Text1 + $5589 = RocketHideout4Text2 + $55A2 = RocketHideout4Text3 + $55BB = RocketHideout4Text4 + $5584 = RocketHideout4Text10 + $5593 = RocketHideout4BattleText2 + $559D = RocketHideout4AfterBattleText2 + $5598 = RocketHideout4EndBattleText2 + $55AC = RocketHideout4BattleText3 + $55B6 = RocketHideout4AfterBattleText3 + $55B1 = RocketHideout4EndBattleText3 + $55C5 = RocketHideout4BattleText4 + $55CF = RocketHideout4AfterBattleText4 + $55CA = RocketHideout4EndBattleText4 + $5571 = RocketHideout4Text1.asm_545571 + $557A = RocketHideout4Text_4557a + $557F = RocketHideout4Text_4557f + $5521 = RocketHideout4TrainerHeader2 + $552D = RocketHideout4TrainerHeader3 + $55EC = RocketHideout4Text_455ec + $57A8 = RocketHideoutElevatorBlocks + $576B = RocketHideoutElevatorTextPointers + $5710 = RocketHideoutElevatorScript + $5791 = RocketHideoutElevatorObject + $572C = RocketHideoutElevatorScript_4572c + $575F = RocketHideoutElevatorScript_4575f + $573A = RocketHideoutElevatorScript_4573a + $5754 = RocketHideoutElavatorFloors + $5759 = RocketHideoutElevatorWarpMaps + $576D = RocketHideoutElevatorText1 + $5741 = RocketHideoutElevatorScript_45741 + $578B = RocketHideoutElevatorText_4578b + $585B = SilphCoElevatorBlocks + $5833 = SilphCoElevatorTextPointers + $57C0 = SilphCoElevatorScript + $5844 = SilphCoElevatorObject + $57DC = SilphCoElevatorScript_457dc + $5827 = SilphCoElevatorScript_45827 + $57EA = SilphCoElevatorScript_457ea + $5804 = SilphCoElavatorFloors + $5811 = SilphCoElevatorWarpMaps + $5835 = SilphCoElevatorText1 + $57F1 = SilphCoElevatorScript_457f1 + $58DC = SafariZoneEastBlocks + $586E = SafariZoneEastTextPointers + $586B = SafariZoneEastScript + $588B = SafariZoneEastObject + $587C = SafariZoneEastText5 + $5881 = SafariZoneEastText6 + $5886 = SafariZoneEastText7 + $5A3E = SafariZoneNorthBlocks + $59AE = SafariZoneNorthTextPointers + $59AB = SafariZoneNorthScript + $59D5 = SafariZoneNorthObject + $59BC = SafariZoneNorthText3 + $59C1 = SafariZoneNorthText4 + $59C6 = SafariZoneNorthText5 + $59CB = SafariZoneNorthText6 + $59D0 = SafariZoneNorthText7 + $5C1E = SafariZoneCenterBlocks + $5BB5 = SafariZoneCenterTextPointers + $5BB2 = SafariZoneCenterScript + $5BC5 = SafariZoneCenterObject + $5BBB = SafariZoneCenterText2 + $5BC0 = SafariZoneCenterText3 + $40FB = SafariZoneRestHouse1Blocks + $5CF0 = SafariZoneRestHouse1TextPointers + $5CED = SafariZoneRestHouse1Script + $5CFE = SafariZoneRestHouse1Object + $5CF4 = SafariZoneRestHouse1Text1 + $5CF9 = SafariZoneRestHouse1Text2 + $40FB = SafariZoneRestHouse2Blocks + $5D2E = SafariZoneRestHouse2TextPointers + $5D2A = SafariZoneRestHouse2Script + $5D43 = SafariZoneRestHouse2Object + $5D34 = SafariZoneRestHouse2Text1 + $5D39 = SafariZoneRestHouse2Text2 + $5D3E = SafariZoneRestHouse2Text3 + $40FB = SafariZoneRestHouse3Blocks + $5D79 = SafariZoneRestHouse3TextPointers + $5D75 = SafariZoneRestHouse3Script + $5D8E = SafariZoneRestHouse3Object + $5D7F = SafariZoneRestHouse3Text1 + $5D84 = SafariZoneRestHouse3Text2 + $5D89 = SafariZoneRestHouse3Text3 + $40FB = SafariZoneRestHouse4Blocks + $5DC4 = SafariZoneRestHouse4TextPointers + $5DC0 = SafariZoneRestHouse4Script + $5DD9 = SafariZoneRestHouse4Object + $5DCA = SafariZoneRestHouse4Text1 + $5DCF = SafariZoneRestHouse4Text2 + $5DD4 = SafariZoneRestHouse4Text3 + $5E5D = UnknownDungeon2Blocks + $5E0E = UnknownDungeon2TextPointers + $5E0B = UnknownDungeon2Script + $5E14 = UnknownDungeon2Object + $5F58 = UnknownDungeon3Blocks + $5F09 = UnknownDungeon3TextPointers + $5EF0 = UnknownDungeon3Script + $5F36 = UnknownDungeon3Object + $5F0F = UnknownDungeon3TrainerHeaders + $5F03 = UnknownDungeon3ScriptPointers + $5F1C = UnknownDungeon3Text1 + $5F26 = UnknownDungeon3MewtwoText + $5F0F = UnknownDungeon3TrainerHeader0 + $61A1 = RockTunnel2Blocks + $6004 = RockTunnel2TextPointers + $5FEB = RockTunnel2Script + $613D = RockTunnel2Object + $6014 = RockTunnel2TrainerHeaders + $5FFE = RockTunnel2ScriptPointers + $6075 = RockTunnel2Text1 + $607F = RockTunnel2Text2 + $6089 = RockTunnel2Text3 + $6093 = RockTunnel2Text4 + $609D = RockTunnel2Text5 + $60A7 = RockTunnel2Text6 + $60B1 = RockTunnel2Text7 + $60BB = RockTunnel2Text8 + $60C5 = RockTunnel2BattleText2 + $60CF = RockTunnel2AfterBattleText2 + $60CA = RockTunnel2EndBattleText2 + $60D4 = RockTunnel2BattleText3 + $60DE = RockTunnel2AfterBattleText3 + $60D9 = RockTunnel2EndBattleText3 + $60E3 = RockTunnel2BattleText4 + $60ED = RockTunnel2AfterBattleText4 + $60E8 = RockTunnel2EndBattleText4 + $60F2 = RockTunnel2BattleText5 + $60FC = RockTunnel2AfterBattleText5 + $60F7 = RockTunnel2EndBattleText5 + $6101 = RockTunnel2BattleText6 + $610B = RockTunnel2AfterBattleText6 + $6106 = RockTunnel2EndBattleText6 + $6110 = RockTunnel2BattleText7 + $611A = RockTunnel2AfterBattleText7 + $6115 = RockTunnel2EndBattleText7 + $611F = RockTunnel2BattleText8 + $6129 = RockTunnel2AfterBattleText8 + $6124 = RockTunnel2EndBattleText8 + $612E = RockTunnel2BattleText9 + $6138 = RockTunnel2AfterBattleText9 + $6133 = RockTunnel2EndBattleText9 + $6014 = RockTunnel2TrainerHeader0 + $6020 = RockTunnel2TrainerHeader2 + $602C = RockTunnel2TrainerHeader3 + $6038 = RockTunnel2TrainerHeader4 + $6044 = RockTunnel2TrainerHeader5 + $6050 = RockTunnel2TrainerHeader6 + $605C = RockTunnel2TrainerHeader7 + $6068 = RockTunnel2TrainerHeader8 + $63BE = SeafoamIslands2Blocks + $6372 = SeafoamIslands2TextPointers + $6315 = SeafoamIslands2Script + $6376 = SeafoamIslands2Object + $636D = Seafoam2HolesCoords + $64FA = SeafoamIslands3Blocks + $64AE = SeafoamIslands3TextPointers + $6451 = SeafoamIslands3Script + $64B2 = SeafoamIslands3Object + $64A9 = Seafoam3HolesCoords + $6706 = SeafoamIslands4Blocks + $669A = SeafoamIslands4TextPointers + $658D = SeafoamIslands4Script + $66A6 = SeafoamIslands4Object + $65F6 = Seafoam4HolesCoords + $65FB = SeafoamIslands4ScriptPointers + $6603 = SeafoamIslands4Script0 + $6639 = SeafoamIslands4Script1 + $6644 = SeafoamIslands4Script2 + $668F = SeafoamIslands4Script3 + $6632 = RLEMovement46632 + $667F = RLEData_4667f + $6688 = RLEData_46688 + $68FA = SeafoamIslands5Blocks + $687C = SeafoamIslands5TextPointers + $6799 = SeafoamIslands5Script + $68BC = SeafoamIslands5Object + $67AD = SeafoamIslands5ScriptPointers + $67C7 = SeafoamIslands5Script0 + $6807 = SeafoamIslands5Script1 + $6816 = SeafoamIslands5Script2 + $6860 = SeafoamIslands5Script3 + $67B7 = SeafoamIslands5Script4 + $67FE = CoordsData_467fe + $684D = CoordsData_4684d + $6859 = RLEMovementData_46859 + $6852 = RLEMovementData_46852 + $6872 = SeaFoamIslands5Script_46872 + $6893 = SeafoamIslands5Text3 + $68B2 = SeafoamIslands5Text4 + $68B7 = SeafoamIslands5Text5 + $68A2 = SeafoamIslands5BattleText2 + $6886 = SeafoamIslands5TrainerHeader0 + $6A40 = HiddenObjectMaps + $6A96 = HiddenObjectPointers + $6A01 = Func_46a01 + $6B5A = RedsHouse2FHiddenObjects + $6B67 = BluesHouseHiddenObjects + $6B7A = OaksLabHiddenObjects + $6B93 = ViridianPokecenterHiddenObjects + $6BA0 = ViridianMartHiddenObjects + $6BA1 = ViridianSchoolHiddenObjects + $6BAE = ViridianGymHiddenObjects + $6BBB = Museum1FHiddenObjects + $6BC8 = PewterGymHiddenObjects + $6BD5 = PewterMartHiddenObjects + $6BD6 = PewterPokecenterHiddenObjects + $6BE3 = CeruleanPokecenterHiddenObjects + $6BF0 = CeruleanGymHiddenObjects + $6BFD = CeruleanMartHiddenObjects + $6BFE = LavenderPokecenterHiddenObjects + $6C0B = VermilionPokecenterHiddenObjects + $6C18 = VermilionGymHiddenObjects + $6C85 = CeladonMansion2HiddenObjects + $6C8C = CeladonPokecenterHiddenObjects + $6C99 = CeladonGymHiddenObjects + $6CA6 = GameCornerHiddenObjects + $6DC7 = CeladonHotelHiddenObjects + $6DD4 = FuchsiaPokecenterHiddenObjects + $6DE1 = FuchsiaGymHiddenObjects + $6DEE = CinnabarGymHiddenObjects + $6E19 = CinnabarPokecenterHiddenObjects + $6E26 = SaffronGymHiddenObjects + $6E2D = MtMoonPokecenterHiddenObjects + $6E3A = RockTunnelPokecenterHiddenObjects + $6B40 = BattleCenterHiddenObjects + $6B4D = TradeCenterHiddenObjects + $6E47 = ViridianForestHiddenObjects + $6E54 = MtMoon3HiddenObjects + $6E61 = IndigoPlateauHiddenObjects + $6E6E = Route25HiddenObjects + $6E7B = Route9HiddenObjects + $6E82 = SSAnne6HiddenObjects + $6E95 = SSAnne10HiddenObjects + $6EA9 = RocketHideout1HiddenObjects + $6EB0 = RocketHideout3HiddenObjects + $6EB7 = RocketHideout4HiddenObjects + $6EBE = SaffronPokecenterHiddenObjects + $6ECB = PokemonTower5HiddenObjects + $6ED2 = Route13HiddenObjects + $6EDF = SafariZoneEntranceHiddenObjects + $6EE6 = SafariZoneWestHiddenObjects + $6EED = SilphCo5FHiddenObjects + $6EF4 = SilphCo9FHiddenObjects + $6EFB = CopycatsHouse2FHiddenObjects + $6F02 = UnknownDungeon1HiddenObjects + $6F09 = UnknownDungeon3HiddenObjects + $6F10 = PowerPlantHiddenObjects + $6F1D = SeafoamIslands3HiddenObjects + $6F24 = SeafoamIslands5HiddenObjects + $6F2B = Mansion1HiddenObjects + $6F3F = Mansion3HiddenObjects + $6F5F = Route23HiddenObjects + $6F72 = VictoryRoad2HiddenObjects + $6F7F = Unused6FHiddenObjects + $6F86 = BillsHouseHiddenObjects + $6F8D = ViridianCityHiddenObjects + $6F94 = SafariZoneRestHouse2HiddenObjects + $6FA1 = SafariZoneRestHouse3HiddenObjects + $6FAE = SafariZoneRestHouse4HiddenObjects + $6FBB = Route15GateUpstairsHiddenObjects + $6FC2 = LavenderHouse1HiddenObjects + $6FD5 = CeladonMansion5HiddenObjects + $6FE8 = FightingDojoHiddenObjects + $6E9C = Route10HiddenObjects + $7001 = IndigoPlateauLobbyHiddenObjects + $7008 = CinnabarLab4HiddenObjects + $7015 = BikeShopHiddenObjects + $703A = Route11HiddenObjects + $7041 = Route12HiddenObjects + $6F38 = Mansion2HiddenObjects + $6F4C = Mansion4HiddenObjects + $7048 = SilphCo11FHiddenObjects + $704F = Route17HiddenObjects + $706E = UndergroundPathNsHiddenObjects + $707B = UndergroundPathWeHiddenObjects + $7088 = CeladonCityHiddenObjects + $708F = SeafoamIslands4HiddenObjects + $7096 = VermilionCityHiddenObjects + $709D = CeruleanCityHiddenObjects + $70A4 = Route4HiddenObjects + $4316 = Mansion1Script_Switches + $4169 = DisplayDexRating + SLACK: $0F55 bytes + +Bank #18: + SECTION: $4000-$638E ($238F bytes) + $4000 = Route7_h + $415C = RedsHouse1F_h + $59BC = MtMoon1_h + $5CFF = MtMoon3_h + $52C3 = MtMoonPokecenter_h + $53AE = RockTunnelPokecenter_h + $5400 = Route11Gate_h + $5448 = Route11GateUpstairs_h + $54F8 = Route12Gate_h + $4219 = CeladonMart3_h + $434A = CeladonMart4_h + $43C9 = CeladonMartRoof_h + $45F4 = CeladonMartElevator_h + $4688 = CeladonMansion1_h + $472E = CeladonMansion2_h + $4784 = CeladonMansion3_h + $485F = CeladonMansion4_h + $48AC = CeladonPokecenter_h + $48FE = CeladonGym_h + $4BB1 = CeladonGameCorner_h + $505D = CeladonMart5_h + $50E4 = CeladonPrizeRoom_h + $5145 = CeladonDiner_h + $5202 = CeladonHouse_h + $525D = CeladonHotel_h + $55F6 = Route15Gate_h + $563E = Route15GateUpstairs_h + $56B2 = Route16Gate_h + $57FF = Route16GateUpstairs_h + $586A = Route18Gate_h + $5969 = Route18GateUpstairs_h + $5554 = Route12GateUpstairs_h + $61A9 = SafariZoneWest_h + $630B = SafariZoneSecretHouse_h + $4051 = Route7Blocks + $4155 = Route7TextPointers + $4152 = Route7Script + $4022 = Route7Object + $4119 = Func_48119 + $413F = Func_4813f + $4157 = Route7Text1 + $4209 = RedsHouse1FBlocks + $416B = RedsHouse1FTextPointers + $4168 = RedsHouse1FScript + $41E4 = RedsHouse1FObject + $416F = RedsHouse1FText1 + $41C6 = RedsHouse1FText2 + $4185 = MomWakeUpText + $418A = MomHealPokemon + $41BC = MomHealText1 + $41C1 = MomHealText2 + $41DF = TVWrongSideText + $41DA = StandByMeText + $4322 = CeladonMart3Blocks + $4228 = CeladonMart3TextPointers + $4225 = CeladonMart3Script + $42C4 = CeladonMart3Object + $424A = CeladonMart3Text1 + $428D = CeladonMart3Text2 + $4292 = CeladonMart3Text3 + $4297 = CeladonMart3Text4 + $429C = CeladonMart3Text5 + $42A1 = CeladonMart3Text6 + $42A6 = CeladonMart3Text7 + $42A1 = CeladonMart3Text8 + $42AB = CeladonMart3Text9 + $42A1 = CeladonMart3Text10 + $42B0 = CeladonMart3Text11 + $42A1 = CeladonMart3Text12 + $42B5 = CeladonMart3Text13 + $42BA = CeladonMart3Text14 + $42BF = CeladonMart3Text15 + $42BF = CeladonMart3Text16 + $42BF = CeladonMart3Text17 + $4278 = TM18PreReceiveText + $427D = ReceivedTM18Text + $4288 = TM18NoRoomText + $4283 = TM18ExplanationText + $43A1 = CeladonMart4Blocks + $4359 = CeladonMart4TextPointers + $4356 = CeladonMart4Script + $4370 = CeladonMart4Object + $4361 = CeladonMart4Text2 + $4366 = CeladonMart4Text3 + $436B = CeladonMart4Text4 + $45CC = CeladonMartRoofBlocks + $455B = CeladonMartRoofTextPointers + $43D5 = CeladonMartRoofScript + $45A8 = CeladonMartRoofObject + $4408 = CeladonMartRoofDrinkList + $44EE = CeladonMartRoofText_484ee + $4532 = CeladonMartRoofScript_48532 + $4515 = CeladonMartRoofText_48515 + $44E6 = RemoveItemByIDBank12 + $451B = ReceivedTM49Text + $4504 = CeladonMartRoofText_48504 + $450A = CeladonMartRoofText_4850a + $44F3 = CeladonMartRoofText_484f3 + $44F9 = CeladonMartRoofText_484f9 + $4526 = CeladonMartRoofText_48526 + $452C = CeladonMartRoofText_4852c + $4567 = CeladonMartRoofText1 + $456C = CeladonMartRoofText2 + $45A2 = CeladonMartRoofText5 + $45A3 = CeladonMartRoofText6 + $43D8 = CeladonMartRoofScript_483d8 + $459D = CeladonMartRoofText4 + $440C = CeladonMartRoofScript_4840c + $4598 = CeladonMartRoofText3 + $4684 = CeladonMartElevatorBlocks + $465C = CeladonMartElevatorTextPointers + $4600 = CeladonMartElevatorScript + $466D = CeladonMartElevatorObject + $461C = CeladonMartElevatorScript_4861c + $4654 = CeladonMartElevatorScript_48654 + $462A = CeladonMartElevatorScript_4862a + $4643 = CeladonMartElavatorFloors + $464A = CeldaonMartElevatorWarpMaps + $465E = CeladonMartElevatorText1 + $4631 = CeladonMartElevatorScript_48631 + $4716 = CeladonMansion1Blocks + $4697 = CeladonMansion1TextPointers + $4694 = CeladonMansion1Script + $46CF = CeladonMansion1Object + $46A7 = CeladonMansion1Text1 + $46B1 = CeladonMansion1Text2 + $46B6 = CeladonMansion1Text3 + $46C0 = CeladonMansion1Text4 + $46CA = CeladonMansion1Text5 + $46A1 = CeladonMansion1_486a1 + $476C = CeladonMansion2Blocks + $473E = CeladonMansion2TextPointers + $473A = CeladonMansion2Script + $4745 = CeladonMansion2Object + $4740 = CeladonMansion2Text1 + $4847 = CeladonMansion3Blocks + $4793 = CeladonMansion3TextPointers + $4790 = CeladonMansion3Script + $47FF = CeladonMansion3Object + $47A3 = ProgrammerText + $47A8 = GraphicArtistText + $47AD = WriterText + $47B2 = DirectorText + $47EB = GameFreakPCText1 + $47F0 = GameFreakPCText2 + $47F5 = GameFreakPCText3 + $47FA = GameFreakSignText + $47D0 = DirectorText.GameDesigner + $47D5 = DirectorText.CompletedDexText + $4894 = CeladonMansion4Blocks + $486E = CeladonMansion4TextPointers + $486B = CeladonMansion4Script + $4875 = CeladonMansion4Object + $4870 = CeladonMansion4Text1 + $40AB = CeladonPokecenterBlocks + $48BE = CeladonPokecenterTextPointers + $48B8 = CeladonPokecenterScript + $48D2 = CeladonPokecenterObject + $48C7 = CeladonPokecenterText1 + $48C8 = CeladonPokecenterText2 + $48CD = CeladonPokecenterText3 + $48C6 = CeladonPokecenterText4 + $4B84 = CeladonGymBlocks + $49A6 = CeladonGymTextPointers + $490A = CeladonGymScript + $4B30 = CeladonGymObject + $4927 = CeladonGymScript_48927 + $49BC = CeladonGymTrainerHeaders + $494E = CeladonGymScriptPointers + $4930 = Gym4CityName + $493D = Gym4LeaderName + $4956 = CeladonGymScript3 + $4943 = CeladonGymText_48943 + $4A11 = CeladonGymText1 + $4A81 = CeladonGymText2 + $4A9A = CeladonGymText3 + $4AB3 = CeladonGymText4 + $4ACC = CeladonGymText5 + $4AE5 = CeladonGymText6 + $4AFE = CeladonGymText7 + $4B17 = CeladonGymText8 + $4A6D = CeladonGymText9 + $4A72 = TM21Text + $4A7C = TM21NoRoomText + $4A8B = CeladonGymBattleText2 + $4A95 = CeladonGymAfterBattleText2 + $4A90 = CeladonGymEndBattleText2 + $4AA4 = CeladonGymBattleText3 + $4AAE = CeladonGymAfterBattleText3 + $4AA9 = CeladonGymEndBattleText3 + $4ABD = CeladonGymBattleText4 + $4AC7 = CeladonGymAfterBattleText4 + $4AC2 = CeladonGymEndBattleText4 + $4AD6 = CeladonGymBattleText5 + $4AE0 = CeladonGymAfterBattleText5 + $4ADB = CeladonGymEndBattleText5 + $4AEF = CeladonGymBattleText6 + $4AF9 = CeladonGymAfterBattleText6 + $4AF4 = CeladonGymEndBattleText6 + $4B08 = CeladonGymBattleText7 + $4B12 = CeladonGymAfterBattleText7 + $4B0D = CeladonGymEndBattleText7 + $4B21 = CeladonGymBattleText8 + $4B2B = CeladonGymAfterBattleText8 + $4B26 = CeladonGymEndBattleText8 + $4963 = CeladonGymText_48963 + $4A68 = CeladonGymText_48a68 + $4A5E = CeladonGymText_48a5e + $4A63 = CeladonGymText_48a63 + $49BC = CeladonGymTrainerHeader0 + $49C8 = CeladonGymTrainerHeader2 + $49D4 = CeladonGymTrainerHeader3 + $49E0 = CeladonGymTrainerHeader4 + $49EC = CeladonGymTrainerHeader5 + $49F8 = CeladonGymTrainerHeader6 + $4A04 = CeladonGymTrainerHeader7 + $5003 = CeladonGameCornerBlocks + $4C8A = CeladonGameCornerTextPointers + $4BBD = CeladonGameCornerScript + $4FA0 = CeladonGameCornerObject + $4BCF = CeladonGameCornerScript_48bcf + $4BEC = CeladonGameCornerScript_48bec + $4C12 = CeladonGameCornerScriptPointers + $4C18 = CeladonGameCornerScript0 + $4C19 = CeladonGameCornerScript1 + $4C69 = CeladonGameCornerScript2 + $4C07 = CeladonGameCornerScript_48c07 + $4C5A = MovementData_48c5a + $4C63 = MovementData_48c63 + $4CA4 = CeladonGameCornerText1 + $4CA9 = CeladonGameCornerText2 + $4D40 = CeladonGameCornerText3 + $4D45 = CeladonGameCornerText4 + $4D4A = CeladonGameCornerText5 + $4DB1 = CeladonGameCornerText6 + $4DB6 = CeladonGameCornerText7 + $4DD4 = CeladonGameCornerText8 + $4DD9 = CeladonGameCornerText9 + $4E3B = CeladonGameCornerText10 + $4E9D = CeladonGameCornerText11 + $4EDD = CeladonGameCornerText12 + $4ED8 = CeladonGameCornerText13 + $4F1E = CeladonGameCornerScript_48f1e + $4D22 = CeladonGameCornerText_48d22 + $4F95 = Has9990Coins + $4D31 = CeladonGameCornerText_48d31 + $4D27 = CeladonGameCornerText_48d27 + $4D2C = CeladonGameCornerText_48d2c + $4D36 = CeladonGameCornerText_48d36 + $4D3B = CeladonGameCornerText_48d3b + $4D9C = CeladonGameCornerText_48d9c + $4DA1 = Received10CoinsText + $4DAC = CeladonGameCornerText_48dac + $4DA7 = CeladonGameCornerText_48da7 + $4F19 = CeladonGameCornerText_48f19 + $4DCA = CeladonGameCornerText_48dca + $4DCF = CeladonGameCornerText_48dcf + $4E26 = CeladonGameCornerText_48e26 + $4E2B = Received20CoinsText + $4E36 = CeladonGameCornerText_48e36 + $4E31 = CeladonGameCornerText_48e31 + $4E88 = CeladonGameCornerText_48e88 + $4E8D = CeladonGameCornerText_48e8d + $4E98 = CeladonGameCornerText_48e98 + $4E93 = CeladonGameCornerText_48e93 + $4ECE = CeladonGameCornerText_48ece + $4ED3 = CeladonGameCornerText_48ed3 + $4F09 = CeladonGameCornerText_48f09 + $4F7A = GameCornerMoneyText + $4F85 = GameCornerBlankText1 + $4F80 = GameCornerCoinText + $4F8D = GameCornerBlankText2 + $50BC = CeladonMart5Blocks + $506C = CeladonMart5TextPointers + $5069 = CeladonMart5Script + $5085 = CeladonMart5Object + $5076 = CeladonMart5Text1 + $507B = CeladonMart5Text2 + $5080 = CeladonMart5Text5 + $5131 = CeladonPrizeRoomBlocks + $50F3 = CeladonPrizeRoomTextPointers + $50F0 = CeladonPrizeRoomScript + $5108 = CeladonPrizeRoomObject + $50FD = CeladonPrizeRoomText1 + $5102 = CeladonPrizeRoomText2 + $5107 = CeladonPrizeRoomText3 + $51EE = CeladonDinerBlocks + $5155 = CeladonDinerTextPointers + $5151 = CeladonDinerScript + $51BC = CeladonDinerObject + $515F = CeladonDinerText1 + $5164 = CeladonDinerText2 + $5169 = CeladonDinerText3 + $516E = CeladonDinerText4 + $5173 = CeladonDinerText5 + $51A7 = CeladonDinerText_491a7 + $51AC = ReceivedCoinCaseText + $51B2 = CoinCaseNoRoomText + $51B7 = CeladonDinerText_491b7 + $524D = CeladonHouseBlocks + $5212 = CeladonHouseTextPointers + $520E = CeladonHouseScript + $5227 = CeladonHouseObject + $5218 = CeladonHouseText1 + $521D = CeladonHouseText2 + $5222 = CeladonHouseText3 + $52A7 = CeladonHotelBlocks + $526C = CeladonHotelTextPointers + $5269 = CeladonHotelScript + $5281 = CeladonHotelObject + $5272 = CeladonHotelText1 + $5277 = CeladonHotelText2 + $527C = CeladonHotelText3 + $40AB = MtMoonPokecenterBlocks + $52D5 = MtMoonPokecenterTextPointers + $52CF = MtMoonPokecenterScript + $5376 = MtMoonPokecenterObject + $52E1 = MtMoonPokecenterText1 + $52E2 = MtMoonPokecenterText2 + $52E7 = MtMoonPokecenterText3 + $52EC = MtMoonPokecenterText4 + $5370 = MtMoonPokecenterText5 + $5375 = MtMoonPokecenterText6 + $5353 = MtMoonPokecenterText4.asm_49353 + $535C = MtMoonPokecenterText_4935c + $534E = MtMoonPokecenterText4.asm_4934e + $5366 = MtMoonPokecenterText_49366 + $5361 = MtMoonPokecenterText_49361 + $536B = MtMoonPokecenterText_4936b + $40AB = RockTunnelPokecenterBlocks + $53C0 = RockTunnelPokecenterTextPointers + $53BA = RockTunnelPokecenterScript + $53D4 = RockTunnelPokecenterObject + $53C8 = RockTunnelPokecenterText1 + $53C9 = RockTunnelPokecenterText2 + $53CE = RockTunnelPokecenterText3 + $53D3 = RockTunnelPokecenterText4 + $40C7 = Route11GateBlocks + $540F = Route11GateTextPointers + $540C = Route11GateScript + $5416 = Route11GateObject + $5411 = Route11GateText1 + $40DB = Route11GateUpstairsBlocks + $5457 = Route11GateUpstairsTextPointers + $5454 = Route11GateUpstairsScript + $54DA = Route11GateUpstairsObject + $545F = Route11GateUpstairsText1 + $546C = Route11GateUpstairsText2 + $54A8 = Route11GateUpstairsText3 + $54CE = Route11GateUpstairsText4 + $54A3 = Route11GateUpstairsText_494a3 + $55C9 = Route12GateUpstairsScript_495c9 + $54C4 = BinocularsSnorlaxText + $54C9 = BinocularsNoSnorlaxText + $54D5 = Route11GateUpstairsText_494d5 + $5540 = Route12GateBlocks + $5507 = Route12GateTextPointers + $5504 = Route12GateScript + $550E = Route12GateObject + $5509 = Route12GateText1 + $40DB = Route12GateUpstairsBlocks + $5563 = Route12GateUpstairsTextPointers + $5560 = Route12GateUpstairsScript + $55DE = Route12GateUpstairsObject + $5569 = Route12GateUpstairsText1 + $55B1 = Route12GateUpstairsText2 + $55BD = Route12GateUpstairsText3 + $559C = TM39PreReceiveText + $55A1 = ReceivedTM39Text + $55AC = TM39NoRoomText + $55A7 = TM39ExplanationText + $55B8 = Route12GateUpstairsText_495b8 + $55C4 = Route12GateUpstairsText_495c4 + $40C7 = Route15GateBlocks + $5605 = Route15GateTextPointers + $5602 = Route15GateScript + $560C = Route15GateObject + $5607 = Route15GateText1 + $40DB = Route15GateUpstairsBlocks + $564D = Route15GateUpstairsTextPointers + $564A = Route15GateUpstairsScript + $569D = Route15GateUpstairsObject + $5651 = Route15GateUpstairsText1 + $5691 = Route15GateUpstairsText2 + $568C = Route15GateUpstairsText_4968c + $5698 = Route15GateUpstairsText_49698 + $57E3 = Route16GateBlocks + $575A = Route16GateTextPointers + $56BE = Route16GateScript + $578B = Route16GateObject + $56CF = Route16GateScriptPointers + $56D7 = Route16GateScript0 + $571D = Route16GateScript1 + $5727 = Route16GateScript2 + $5741 = Route16GateScript3 + $5755 = Route16GateScript_49755 + $5714 = CoordsData_49714 + $5760 = Route16GateText1 + $5786 = Route16GateText2 + $5781 = Route16GateText3 + $577C = Route16GateText_4977c + $5777 = Route16GateText_49777 + $40DB = Route16GateUpstairsBlocks + $580E = Route16GateUpstairsTextPointers + $580B = Route16GateUpstairsScript + $584C = Route16GateUpstairsObject + $5816 = Route16GateUpstairsText1 + $5825 = Route16GateUpstairsText2 + $5834 = Route16GateUpstairsText3 + $5840 = Route16GateUpstairsText4 + $5820 = Route16GateUpstairsText_49820 + $582F = Route16GateUpstairsText_4982f + $583B = Route16GateUpstairsText_4983b + $5847 = Route16GateUpstairsText_49847 + $40C7 = Route18GateBlocks + $590D = Route18GateTextPointers + $5876 = Route18GateScript + $5937 = Route18GateObject + $5887 = Route18GateScriptPointers + $588F = Route18GateScript0 + $58D5 = Route18GateScript1 + $58DF = Route18GateScript2 + $58F9 = Route18GateScript3 + $58CC = CoordsData_498cc + $5911 = Route18GateText1 + $5932 = Route18GateText2 + $592D = Route18GateText_4992d + $5928 = Route18GateText_49928 + $40DB = Route18GateUpstairsBlocks + $5978 = Route18GateUpstairsTextPointers + $5975 = Route18GateUpstairsScript + $59A4 = Route18GateUpstairsObject + $597E = Route18GateUpstairsText1 + $598C = Route18GateUpstairsText2 + $5998 = Route18GateUpstairsText3 + $5993 = Route18GateUpstairsText_49993 + $599F = Route18GateUpstairsText_4999f + $5B97 = MtMoon1Blocks + $59E1 = MtMoon1TextPointers + $59C8 = MtMoon1Script + $5B06 = MtMoon1Object + $59FD = MtMoon1TrainerHeader0 + $59DB = MtMoon1ScriptPointers + $5A52 = MtMoon1Text1 + $5A5C = MtMoon1Text2 + $5A66 = MtMoon1Text3 + $5A70 = MtMoon1Text4 + $5A7A = MtMoon1Text5 + $5A84 = MtMoon1Text6 + $5A8E = MtMoon1Text7 + $5B01 = MtMoon1Text14 + $5A98 = MtMoon1BattleText2 + $5AA2 = MtMoon1AfterBattleText2 + $5A9D = MtMoon1EndBattleText2 + $5AA7 = MtMoon1BattleText3 + $5AB1 = MtMoon1AfterBattleText3 + $5AAC = MtMoon1EndBattleText3 + $5AB6 = MtMoon1BattleText4 + $5AC0 = MtMoon1AfterBattleText4 + $5ABB = MtMoon1EndBattleText4 + $5AC5 = MtMoon1BattleText5 + $5ACF = MtMoon1AfterBattleText5 + $5ACA = MtMoon1EndBattleText5 + $5AD4 = MtMoon1BattleText6 + $5ADE = MtMoon1AfterBattleText6 + $5AD9 = MtMoon1EndBattleText6 + $5AE3 = MtMoon1BattleText7 + $5AED = MtMoon1AfterBattleText7 + $5AE8 = MtMoon1EndBattleText7 + $5AF2 = MtMoon1BattleText8 + $5AFC = MtMoon1AfterBattleText8 + $5AF7 = MtMoon1EndBattleText8 + $5A09 = MtMoon1TrainerHeader2 + $5A15 = MtMoon1TrainerHeader3 + $5A21 = MtMoon1TrainerHeader4 + $5A2D = MtMoon1TrainerHeader5 + $5A39 = MtMoon1TrainerHeader6 + $5A45 = MtMoon1TrainerHeader7 + $6041 = MtMoon3Blocks + $5E34 = MtMoon3TextPointers + $5D0B = MtMoon3Script + $5FDB = MtMoon3Object + $5E48 = MtMoon3TrainerHeader0 + $5D63 = MtMoon3ScriptPointers + $5D37 = CoordsData_49d37 + $5D6F = MtMoon3Script0 + $5D9A = MtMoon3Script3 + $5DBA = MtMoon3Script4 + $5DFB = MtMoon3Script5 + $5D91 = MtMoon3Script_49d91 + $5D58 = MtMoon3Script_49d58 + $5DEA = CoordsData_49dea + $5DF1 = CoordsData_49df1 + $5DF9 = MovementData_49df9 + $5DF8 = MovementData_49df8 + $5E79 = MtMoon3Text1 + $5EC1 = MtMoon3Text2 + $5ECB = MtMoon3Text3 + $5ED5 = MtMoon3Text4 + $5EDF = MtMoon3Text5 + $5EE9 = MtMoon3Text6 + $5F29 = MtMoon3Text7 + $5F99 = MtMoon3Text_49f99 + $5F9F = MtMoon3BattleText2 + $5FA9 = MtMoon3AfterBattleText2 + $5FA4 = MtMoon3EndBattleText2 + $5FAE = MtMoon3BattleText3 + $5FB8 = MtMoon3AfterBattleText3 + $5FB3 = MtMoon3EndBattleText3 + $5FBD = MtMoon3BattleText4 + $5FC7 = MtMoon3AfterBattleText4 + $5FC2 = MtMoon3EndBattleText4 + $5FCC = MtMoon3BattleText5 + $5FD6 = MtMoon3AfterBattleText5 + $5FD1 = MtMoon3EndBattleText5 + $5F8F = MtMoon3Text_49f8f + $5F85 = MtMoon3Text_49f85 + $5F8A = MtMoon3Text_49f8a + $5F94 = MtMoon3Text_49f94 + $5E54 = MtMoon3TrainerHeader2 + $5E60 = MtMoon3TrainerHeader3 + $5E6C = MtMoon3TrainerHeader4 + $5F24 = MtMoon3Text_49f24 + $5F76 = MtMoon3Script_49f76 + $5F69 = MtMoon3Script_49f69 + $5F64 = MtMoon3Text_49f64 + $5F6F = MtMoon3Text_49f6f + $5F7F = MtMoon3Text_49f7f + $6248 = SafariZoneWestBlocks + $61B8 = SafariZoneWestTextPointers + $61B5 = SafariZoneWestScript + $61DC = SafariZoneWestObject + $61C8 = SafariZoneWestText5 + $61CD = SafariZoneWestText6 + $61D2 = SafariZoneWestText7 + $61D7 = SafariZoneWestText8 + $637F = SafariZoneSecretHouseBlocks + $631A = SafariZoneSecretHouseTextPointers + $6317 = SafariZoneSecretHouseScript + $6365 = SafariZoneSecretHouseObject + $631C = SafariZoneSecretHouseText1 + $6350 = SafariZoneSecretHouseText_4a350 + $6355 = ReceivedHM03Text + $6360 = HM03NoRoomText + $635B = HM03ExplanationText + $40EB = Func_480eb + $40FF = Func_480ff + $4125 = Func_48125 + SLACK: $1C71 bytes + +Bank #19: + SECTION: $4000-$7CCB ($3CCC bytes) + $7A2E = BattleCenterM_h + $7A9B = TradeCenterM_h + $7C42 = Func_c586Predef + $7BA3 = PredefPointers + $7C99 = LoadSAVPredef + $7BDC = Func_c69cPredef + $7BEE = Func_c754Predef + $7C51 = IndexToPokedexPredef + $7C63 = LoadSGBPredef + $7C39 = PlayIntroPredef + $7CB7 = PickupItemPredef + $7BC4 = AddBCDPredefPredef + $7BCA = DivideBCDPredef3Predef + $7BD3 = FlagActionPredefPredef + $7C87 = EmotionBubblePredef + $7BD6 = HideObjectPredef + $7C4E = TrainerEngagePredef + $7BF7 = IsItemInBag_Predef + $7C2A = Func_5a5fPredef + $7C72 = Func_71ddfPredef + $7ACF = _GivePokemon + $7B73 = GetPredefPointer + $7BB8 = HealPartyPredef + $7C27 = InitOpponentPredef + $7BD9 = IsObjectHiddenPredef + $7C45 = StatusScreenPredef + $7C48 = StatusScreen2Predef + $7C4B = Func_410e2Predef + $7C30 = Func_410f3Predef + $7C93 = SaveSAVtoSRAM2Predef + $7C8A = Func_5aafPredef + $7BEB = InitPlayerData2Predef + $5F12 = Rival1Pic + $7BA6 = Func_3f0c6Predef + $7BC7 = SubBCDPredefPredef + $7C7B = UpdateHPBar2Predef + $7BA3 = Func_3cd60Predef + $7C7E = Func_3cdecPredef + $7C5A = ShowPokedexDataPredef + $7C00 = Func_480ebPredef + $7BDF = AnyPartyAlivePredef + $7BBB = MoveAnimationPredef + $7C1E = ShowPokedexMenuPredef + $7C1B = Func_3ed02Predef + $7BF1 = Func_3af5bPredef + $7C6F = TMToMovePredef + $7C6C = CanLearnTMPredef + $7BF4 = LearnMovePredef + $7CBD = LoadMovePPsPredef + $7C8D = AskNamePredef + $7CB1 = Func_c60bPredef + $7C5D = WriteMonMovesPredef + $7C15 = HPBarLengthPredef + $7CC0 = DrawHPPredef + $7C84 = Func_27d6bPredef + $7CC3 = Func_128f6Predef + $7C57 = UsedCutPredef + $7CB4 = PrintStrengthTxtPredef + $7C2D = DrawBadgesPredef + $7C54 = Predef3BPredef + $7C60 = SaveSAVPredef + $7C21 = Func_3ad1cPredef + $7BE2 = ShowObjectPredef + $7C09 = Func_f929Predef + $7C03 = Func_f8baPredef + $7C9F = Predef54Predef + $7BE8 = Func_ee9ePredef + $7C0C = Func_f9a0Predef + $7C90 = PewterGuysPredef + $7C75 = StarterDexPredef + $7CA5 = DisplayDexRatingPredef + $4000 = YoungsterPic + $411B = BugCatcherPic + $428E = LassPic + $4392 = SailorPic + $44E7 = JrTrainerMPic + $4608 = JrTrainerFPic + $4714 = PokemaniacPic + $487B = SuperNerdPic + $4994 = HikerPic + $4B44 = BikerPic + $4D17 = BurglarPic + $4E46 = EngineerPic + $5932 = JugglerPic + $4FBD = FisherPic + $514D = SwimmerPic + $5281 = CueBallPic + $53CE = GamblerPic + $558C = BeautyPic + $56F5 = PsychicPic + $57F8 = RockerPic + $5AAB = TamerPic + $5C38 = BirdKeeperPic + $5D71 = BlackbeltPic + $6003 = SwimmerFPic + $612D = RocketFPic + $6223 = ScientistPic + $6378 = GiovanniPic + $6459 = RocketPic + $6580 = CooltrainerMPic + $66AB = CooltrainerFPic + $67CD = BrunoPic + $69BC = BrockPic + $6ABC = MistyPic + $6BC8 = LtSurgePic + $6D12 = ErikaPic + $6E1A = KogaPic + $6F64 = BlainePic + $7074 = SabrinaPic + $718A = GentlemanPic + $7289 = Rival2Pic + $73B0 = Rival3Pic + $74C5 = LoreleiPic + $75EA = ChannelerPic + $775D = AgathaPic + $788E = LancePic + $7C69 = SetPartyMonTypesPredef + $7BA9 = Func_3f073Predef + $7BAF = LoadMonBackPicPredef + $7BB2 = Func_79abaPredef + $7CBA = Func_27d98Predef + $7C0F = Func_48125Predef + $7C33 = BattleTransitionPredef + $4000 = TrainerPics + $7C81 = LoadTownMap_NestPredef + $7C36 = Func_79ddaPredef + $7C3C = Func_79869Predef + $7CC6 = Func_1c9c6Predef + $7CC9 = OaksAideScriptPredef + $7A87 = BattleCenterMBlocks + $7A76 = BattleCenterMTextPointers + $7A3A = BattleCenterMScript + $7A7D = BattleCenterMObject + $7A78 = BattleCenterMText1 + $7ABB = TradeCenterMBlocks + $7AAA = TradeCenterMTextPointers + $7AA7 = TradeCenterMScript + $7AB1 = TradeCenterMObject + $7AAC = TradeCenterMText1 + $7B3B = SetPokedexOwnedFlag + $7B69 = SetToBoxText + $7B6E = BoxIsFullText + $7B63 = GotMonText + $7C18 = Func_5ab0Predef + $7CA2 = HallOfFamePCPredef + $7C06 = Func_480ffPredef + $7BC1 = DivideBCDPredef2Predef + $7BCD = DivideBCDPredef4Predef + $7C96 = LoadSAVCheckSum2Predef + $7C3F = FlashScreenPredef + $7BBE = DivideBCDPredefPredef + $7C66 = Func_f113Predef + $7BB5 = Func_f132Predef + $7BAC = ScaleSpriteByTwoPredef + $7BD0 = InitPlayerDataPredef + $7C12 = UpdateHPBarPredef + $7C78 = _AddPartyMonPredef + $7CAE = Func_c5bePredef + $7BE5 = ShowObject2Predef + $7C24 = SaveSAVtoSRAM0Predef + $7C9C = SaveSAVtoSRAM1Predef + SLACK: $0334 bytes + +Bank #20: + SECTION: $4000-$6A41 ($2A42 bytes) + $491E = IndigoPlateau_h + $49A4 = SaffronCity_h + $40F1 = Route20_h + $4000 = Route22_h + $433F = Route23_h + $4682 = Route24_h + $479B = Route25_h + $5A36 = MtMoon2_h + $5791 = VictoryRoad2_h + $5B55 = SilphCo7_h + $5FCC = Mansion2_h + $61E2 = Mansion3_h + $63AD = Mansion4_h + $671B = CeladonPrizeMenu + $66EE = CardKeySuccessText + $66F8 = CardKeyFailText + $69AA = ViridianSchoolNotebook + $6A3D = IndigoPlateauHQText + $69A4 = TMNotebook + $6A2A = FightingDojoText + $6A10 = FightingDojoText_52a10 + $6A1D = FightingDojoText_52a1d + $6673 = PrintCardKeyText + $403D = Route22Blocks + $46E7 = Route24Blocks + $417D = Route20Blocks + $65AF = Func_525af + $6601 = ParalyzeEffect_ + $6996 = PrintNotebookText + $6A2F = PrintIndigoPlateauHQText + $6037 = Mansion2Script_Switches + $627A = Mansion3Script_Switches + $6420 = Mansion4Script_Switches + $6A22 = PrintFightingDojoText + $6A08 = PrintFightingDojoText2 + $6A15 = PrintFightingDojoText3 + $4A98 = SaffronCityBlocks + $5175 = Route22TextPointers + $4EB2 = Route22Script + $43B2 = Route23Blocks + $4022 = Route22Object + $4D22 = Route20TextPointers + $4CA9 = Route20Script + $4113 = Route20Object + $52F7 = Route23TextPointers + $51DA = Route23Script + $494A = IndigoPlateauBlocks + $4361 = Route23Object + $544B = Route24TextPointers + $53AD = Route24Script + $4810 = Route25Blocks + $46A4 = Route24Object + $5628 = Route25TextPointers + $55CB = Route25Script + $47B2 = Route25Object + $4936 = IndigoPlateauTextPointers + $4935 = IndigoPlateauScript + $4936 = IndigoPlateauObject + $4C03 = SaffronCityTextPointers + $4C00 = SaffronCityScript + $49DC = SaffronCityObject + $4C35 = SaffronCityText1 + $4C3A = SaffronCityText2 + $4C3F = SaffronCityText3 + $4C44 = SaffronCityText4 + $4C49 = SaffronCityText5 + $4C4E = SaffronCityText6 + $4C53 = SaffronCityText7 + $4C58 = SaffronCityText8 + $4C5D = SaffronCityText9 + $4C62 = SaffronCityText10 + $4C67 = SaffronCityText11 + $4C6C = SaffronCityText12 + $4C72 = SaffronCityText13 + $4C77 = SaffronCityText14 + $4C7C = SaffronCityText15 + $4C81 = SaffronCityText16 + $4C86 = SaffronCityText17 + $4C8B = SaffronCityText18 + $4C90 = SaffronCityText20 + $4C95 = SaffronCityText21 + $4C9A = SaffronCityText22 + $4C9F = SaffronCityText24 + $4CA4 = SaffronCityText25 + $4CC6 = Route20Script_50cc6 + $4D3A = Route20TrainerHeader0 + $4D1C = Route20ScriptPointers + $4D0C = Route20Script_50d0c + $4CE8 = Route20Script_50cc6.MissableObjectIDs + $4D14 = Route20Script_50d14 + $4DB3 = Route20Text1 + $4DBD = Route20Text2 + $4DC7 = Route20Text3 + $4DD1 = Route20Text4 + $4DDB = Route20Text5 + $4DE5 = Route20Text6 + $4DEF = Route20Text7 + $4DF9 = Route20Text8 + $4E03 = Route20Text9 + $4E0D = Route20Text10 + $4EAD = Route20Text11 + $4EAD = Route20Text12 + $4E17 = Route20BattleText1 + $4E21 = Route20AfterBattleText1 + $4E1C = Route20EndBattleText1 + $4E26 = Route20BattleText2 + $4E30 = Route20AfterBattleText2 + $4E2B = Route20EndBattleText2 + $4E35 = Route20BattleText3 + $4E3F = Route20AfterBattleText3 + $4E3A = Route20EndBattleText3 + $4E44 = Route20BattleText4 + $4E4E = Route20AfterBattleText4 + $4E49 = Route20EndBattleText4 + $4E53 = Route20BattleText5 + $4E5D = Route20AfterBattleText5 + $4E58 = Route20EndBattleText5 + $4E62 = Route20BattleText6 + $4E6C = Route20AfterBattleText6 + $4E67 = Route20EndBattleText6 + $4E71 = Route20BattleText7 + $4E7B = Route20AfterBattleText7 + $4E76 = Route20EndBattleText7 + $4E80 = Route20BattleText8 + $4E8A = Route20AfterBattleText8 + $4E85 = Route20EndBattleText8 + $4E8F = Route20BattleText9 + $4E99 = Route20AfterBattleText9 + $4E94 = Route20EndBattleText9 + $4E9E = Route20BattleText10 + $4EA8 = Route20AfterBattleText10 + $4EA3 = Route20EndBattleText10 + $4D46 = Route20TrainerHeader2 + $4D52 = Route20TrainerHeader3 + $4D5E = Route20TrainerHeader4 + $4D6A = Route20TrainerHeader5 + $4D76 = Route20TrainerHeader6 + $4D82 = Route20TrainerHeader7 + $4D8E = Route20TrainerHeader8 + $4D9A = Route20TrainerHeader9 + $4DA6 = Route20TrainerHeader10 + $4EBE = Route22ScriptPointers + $4F00 = Route22Script0 + $4F62 = Route22Script1 + $4FB5 = Route22Script2 + $502A = Route22Script3 + $5087 = Route22Script4 + $50DF = Route22Script5 + $5151 = Route22Script6 + $4ED5 = Route22Script7 + $4EFB = Route22RivalMovementData + $4F2D = Route22Script0.Route22RivalBattleCoords + $504E = Route22Script_5104e + $4EE6 = Route22MoveRivalSprite + $51B7 = Route22RivalDefeatedText1 + $51BC = Route22Text_511bc + $4FAF = StarterMons_50faf + $4ED6 = Route22Script_50ed6 + $4ECE = Route22Script_50ece + $5008 = Route22Script_51008 + $500D = Route22Script_5100d + $5017 = Route22RivalExitMovementData1 + $501F = Route22RivalExitMovementData2 + $51CB = Route22RivalDefeatedText2 + $51D0 = Route22Text_511d0 + $50D9 = StarterMons_510d9 + $513D = Route22Script_5113d + $5142 = Route22Script_51142 + $514C = MovementData_5114c + $514D = MovementData_5114d + $517B = Route22Text1 + $5194 = Route22Text2 + $51D5 = Route22FrontGateText + $51B2 = Route22RivalAfterBattleText1 + $51AD = Route22RivalBeforeBattleText1 + $51C6 = Route22RivalAfterBattleText2 + $51C1 = Route22RivalBeforeBattleText2 + $51E9 = Route23Script_511e9 + $5213 = Route23ScriptPointers + $5219 = Route23Script0 + $52EC = Route23Script1 + $52F1 = Route23Script2 + $5255 = YCoordsData_51255 + $525D = Route23Script_5125d + $5276 = BadgeTextPointers + $52CB = CascadeBadgeText + $52BE = ThunderBadgeText + $52B1 = RainbowBadgeText + $52A7 = SoulBadgeText + $529C = MarshBadgeText + $528F = VolcanoBadgeText + $5284 = EarthBadgeText + $5307 = Route23Text1 + $5310 = Route23Text2 + $5319 = Route23Text3 + $5322 = Route23Text4 + $532B = Route23Text5 + $5334 = Route23Text6 + $533D = Route23Text7 + $53A8 = Route23Text8 + $5346 = Route23Script_51346 + $538E = VictoryRoadGuardText1 + $52D8 = Route23Script_512d8 + $539E = VictoryRoadGuardText2 + $545B = Route24TrainerHeaders + $53CB = Route24ScriptPointers + $53D5 = Route24Script0 + $5422 = Route24Script3 + $5411 = Route24Script4 + $540E = CoordsData_5140e + $53C0 = Route24Script_513c0 + $54A4 = Route24Text1 + $5535 = Route24Text2 + $553F = Route24Text3 + $5549 = Route24Text4 + $5553 = Route24Text5 + $555D = Route24Text6 + $5567 = Route24Text7 + $5571 = Route24BattleText1 + $557B = Route24AfterBattleText1 + $5576 = Route24EndBattleText1 + $5580 = Route24BattleText2 + $558A = Route24AfterBattleText2 + $5585 = Route24EndBattleText2 + $558F = Route24BattleText3 + $5599 = Route24AfterBattleText3 + $5594 = Route24EndBattleText3 + $559E = Route24BattleText4 + $55A8 = Route24AfterBattleText4 + $55A3 = Route24EndBattleText4 + $55AD = Route24BattleText5 + $55B7 = Route24AfterBattleText5 + $55B2 = Route24EndBattleText5 + $55BC = Route24BattleText6 + $55C6 = Route24AfterBattleText6 + $55C1 = Route24EndBattleText6 + $5510 = Route24Text_51510 + $551A = Route24Text_5151a + $5526 = Route24Text_51526 + $552B = Route24Text_5152b + $5530 = Route24Text_51530 + $5521 = Route24Text_51521 + $545B = Route24TrainerHeader0 + $5467 = Route24TrainerHeader2 + $5473 = Route24TrainerHeader3 + $547F = Route24TrainerHeader4 + $548B = Route24TrainerHeader5 + $5497 = Route24TrainerHeader6 + $55E1 = Route25Script_515e1 + $563E = Route25TrainerHeaders + $5622 = Route25ScriptPointers + $56AB = Route25Text1 + $56B5 = Route25Text2 + $56BF = Route25Text3 + $56C9 = Route25Text4 + $56D3 = Route25Text5 + $56DD = Route25Text6 + $56E7 = Route25Text7 + $56F1 = Route25Text8 + $56FB = Route25Text9 + $578C = Route25Text11 + $5705 = Route25BattleText1 + $570F = Route25AfterBattleText1 + $570A = Route25EndBattleText1 + $5714 = Route25BattleText2 + $571E = Route25AfterBattleText2 + $5719 = Route25EndBattleText2 + $5723 = Route25BattleText3 + $572D = Route25AfterBattleText3 + $5728 = Route25EndBattleText3 + $5732 = Route25BattleText4 + $573C = Route25AfterBattleText4 + $5737 = Route25EndBattleText4 + $5741 = Route25BattleText5 + $574B = Route25AfterBattleText5 + $5746 = Route25EndBattleText5 + $5750 = Route25BattleText6 + $575A = Route25AfterBattleText6 + $5755 = Route25EndBattleText6 + $575F = Route25BattleText7 + $5769 = Route25AfterBattleText7 + $5764 = Route25EndBattleText7 + $576E = Route25BattleText8 + $5778 = Route25AfterBattleText8 + $5773 = Route25EndBattleText8 + $577D = Route25BattleText9 + $5787 = Route25AfterBattleText9 + $5782 = Route25EndBattleText9 + $563E = Route25TrainerHeader0 + $564A = Route25TrainerHeader2 + $5656 = Route25TrainerHeader3 + $5662 = Route25TrainerHeader4 + $566E = Route25TrainerHeader5 + $567A = Route25TrainerHeader6 + $5686 = Route25TrainerHeader7 + $5692 = Route25TrainerHeader8 + $569E = Route25TrainerHeader9 + $59AF = VictoryRoad2Blocks + $581B = VictoryRoad2TextPointers + $579D = VictoryRoad2Script + $5915 = VictoryRoad2Object + $57C4 = VictoryRoad2Script_517c4 + $57C9 = VictoryRoad2Script_517c9 + $5835 = VictoryRoad2TrainerHeaders + $57EB = VictoryRoad2ScriptPointers + $57E2 = VictoryRoad2Script_517e2 + $57F1 = VictoryRoad2Script0 + $5816 = CoordsData_51816 + $587E = VictoryRoad2Text1 + $5888 = VictoryRoad2Text2 + $5892 = VictoryRoad2Text3 + $589C = VictoryRoad2Text4 + $58A6 = VictoryRoad2Text5 + $58B0 = VictoryRoad2Text6 + $58CA = VictoryRoad2BattleText1 + $58D4 = VictoryRoad2AfterBattleText1 + $58CF = VictoryRoad2EndBattleText1 + $58D9 = VictoryRoad2BattleText2 + $58E3 = VictoryRoad2AfterBattleText2 + $58DE = VictoryRoad2EndBattleText2 + $58E8 = VictoryRoad2BattleText3 + $58F2 = VictoryRoad2AfterBattleText3 + $58ED = VictoryRoad2EndBattleText3 + $58F7 = VictoryRoad2BattleText4 + $5901 = VictoryRoad2AfterBattleText4 + $58FC = VictoryRoad2EndBattleText4 + $5906 = VictoryRoad2BattleText5 + $5910 = VictoryRoad2AfterBattleText5 + $590B = VictoryRoad2EndBattleText5 + $58BA = VictoryRoad2BattleText6 + $5835 = VictoryRoad2TrainerHeader0 + $5841 = VictoryRoad2TrainerHeader2 + $584D = VictoryRoad2TrainerHeader3 + $5859 = VictoryRoad2TrainerHeader4 + $5865 = VictoryRoad2TrainerHeader5 + $5871 = VictoryRoad2TrainerHeader6 + $5A91 = MtMoon2Blocks + $5A46 = MtMoon2TextPointers + $5A42 = MtMoon2Script + $5A4D = MtMoon2Object + $5A48 = MtMoonText1 + $5F57 = SilphCo7Blocks + $5D3F = SilphCo7TextPointers + $5B61 = SilphCo7Script + $5ED7 = SilphCo7Object + $5B77 = SilphCo7Script_51b77 + $5D5D = SilphCo7TrainerHeaders + $5C17 = SilphCo7ScriptPointers + $5BC1 = DataTable_51bc1 + $5BC8 = SilphCo7Text_51bc8 + $5BF4 = SilphCo7Text_51bf4 + $5C23 = SilphCo7Script0 + $5C82 = SilphCo7Script3 + $5CC8 = SilphCo7Script4 + $5D25 = SilphCo7Script5 + $5C78 = CoordsData_51c78 + $5C7D = MovementData_51c7d + $5C10 = SilphCo7Text_51c10 + $5EC8 = SilphCo7Text14 + $5ECD = SilphCo7Text_51ecd + $5C0C = SilphCo7Text_51c0c + $5D1D = MovementData_51d1d + $5D1A = MovementData_51d1a + $5D8E = SilphCo7Text1 + $5DE7 = SilphCo7Text2 + $5E0A = SilphCo7Text3 + $5E2D = SilphCo7Text4 + $5E50 = SilphCo7Text5 + $5E69 = SilphCo7Text6 + $5E82 = SilphCo7Text7 + $5E9B = SilphCo7Text8 + $5EB4 = SilphCo7Text9 + $5EC3 = SilphCo7Text13 + $5ED2 = SilphCo7Text15 + $5E5A = SilphCo7BattleText1 + $5E64 = SilphCo7AfterBattleText1 + $5E5F = SilphCo7EndBattleText1 + $5E73 = SilphCo7BattleText2 + $5E7D = SilphCo7AfterBattleText2 + $5E78 = SilphCo7EndBattleText2 + $5E8C = SilphCo7BattleText3 + $5E96 = SilphCo7AfterBattleText3 + $5E91 = SilphCo7EndBattleText3 + $5EA5 = SilphCo7BattleText4 + $5EAF = SilphCo7AfterBattleText4 + $5EAA = SilphCo7EndBattleText4 + $5DDD = SilphCo7Text1.LaprasGuyText + $5DD3 = SilphCo7Text1.MeetLaprasGuyText + $5DD8 = SilphCo7Text1.HeresYourLaprasText + $5DE2 = SilphCo7Text1.LaprasGuySavedText + $5E00 = SilphCo7Text2.rockettext + $5E05 = SilphCo7Text2.savedtext + $5E23 = SilphCo7Text3.rockettext + $5E28 = SilphCo7Text3.savedtext + $5E46 = SilphCo7Text4.rockettext + $5E4B = SilphCo7Text4.savedtext + $5D5D = SilphCo7TrainerHeader0 + $5D69 = SilphCo7TrainerHeader2 + $5D75 = SilphCo7TrainerHeader3 + $5D81 = SilphCo7TrainerHeader4 + $5EBE = SilphCo7Text_51ebe + $6110 = Mansion2Blocks + $604D = Mansion2TextPointers + $5FD8 = Mansion2Script + $60D1 = Mansion2Object + $5FEE = Mansion2Script_51fee + $6057 = Mansion2TrainerHeaders + $6047 = Mansion2ScriptPointers + $602F = Mansion2Script_5202f + $6064 = Mansion2Text1 + $607D = Mansion2Text3 + $6082 = Mansion2Text4 + $6087 = Mansion2Text5 + $606E = Mansion2BattleText1 + $6078 = Mansion2AfterBattleText1 + $6073 = Mansion2EndBattleText1 + $6057 = Mansion2TrainerHeader0 + $60C2 = Mansion2Text_520c2 + $60C7 = Mansion2Text_520c7 + $60CC = Mansion2Text_520cc + $6326 = Mansion3Blocks + $628A = Mansion3TextPointers + $61EE = Mansion3Script + $62E6 = Mansion3Object + $6204 = Mansion3Script_52204 + $6296 = Mansion3TrainerHeader0 + $6235 = Mansion3ScriptPointers + $623B = Mansion3Script0 + $6254 = CoordsData_52254 + $625B = Mansion3Script_5225b + $62AF = Mansion3Text1 + $62B9 = Mansion3Text2 + $62E1 = Mansion3Text5 + $6087 = Mansion3Text6 + $62C3 = Mansion3BattleText1 + $62CD = Mansion3AfterBattleText1 + $62C8 = Mansion3EndBattleText1 + $62D2 = Mansion3BattleText2 + $62DC = Mansion3AfterBattleText2 + $62D7 = Mansion3EndBattleText2 + $62A2 = Mansion3TrainerHeader2 + $64DD = Mansion4Blocks + $6436 = Mansion4TextPointers + $63B9 = Mansion4Script + $6498 = Mansion4Object + $63CF = Mansion4Script_523cf + $6448 = Mansion4TrainerHeader0 + $6430 = Mansion4ScriptPointers + $6461 = Mansion4Text1 + $646B = Mansion4Text2 + $6493 = Mansion4Text7 + $6475 = Mansion4BattleText1 + $647F = Mansion4AfterBattleText1 + $647A = Mansion4EndBattleText1 + $6484 = Mansion4BattleText2 + $648E = Mansion4AfterBattleText2 + $6489 = Mansion4EndBattleText2 + $6454 = Mansion4TrainerHeader2 + $6613 = ParalyzeEffect_.asm_52613 + $66E3 = SilphCoMapList + $66FD = Func_526fd + $677E = RequireCoinCaseTextPtr + $6784 = ExchangeCoinsForPrizesTextPtr + $687A = PrintPrizePrice + $678E = GetPrizeMenuId + $6789 = WhichPrizeTextPtr + $68C6 = HandlePrizeChoice + $6843 = PrizeDifferentMenuPtrs + $684F = NoThanksText + $6859 = PrizeMenuMon1Entries + $685D = PrizeMenuMon1Cost + $6864 = PrizeMenuMon2Entries + $6868 = PrizeMenuMon2Cost + $686F = PrizeMenuTMsEntries + $6873 = PrizeMenuTMsCost + $68A5 = PrintPrizePrice.CoinText + $68AA = PrintPrizePrice.SixSpacesText + $6960 = SoYouWantPrizeTextPtr + $68B1 = LoadCoinsToSubtract + $6977 = GetPrizeMonLevel + $696B = PrizeRoomBagIsFullTextPtr + $6965 = SorryNeedMoreCoinsText + $6971 = OhFineThenTextPtr + $698A = PrizeMonLevelDictionary + $69F4 = ViridianSchoolNotebookText1 + $69DB = TurnPageSchoolNotebook + $69F9 = ViridianSchoolNotebookText2 + $69FE = ViridianSchoolNotebookText3 + $6A03 = ViridianSchoolNotebookText4 + $69EE = ViridianSchoolNotebookText5 + $69E9 = TurnPageText + SLACK: $15BE bytes + +Bank #21: + SECTION: $4000-$6A4A ($2A4B bytes) + $4000 = Route2_h + $41E6 = Route3_h + $4390 = Route4_h + $4581 = Route5_h + $4686 = Route9_h + $480C = Route13_h + $4999 = Route14_h + $4B20 = Route17_h + $4E78 = Route19_h + $4FFF = Route21_h + $6243 = DayCareM_h + $60E9 = CeladonMart2_h + $6064 = VermilionHouse2_h + $6170 = FuchsiaHouse3_h + $6473 = Route12House_h + $64F8 = SilphCo8_h + $6881 = TrainerWalkUpToPlayer + $67F9 = Func_567f9 + $6819 = Func_56819 + $683D = Func_5683d + $685D = Func_5685d + $506D = Route21Blocks + $407E = Route2Blocks + $4255 = Route3Blocks + $45D2 = Route5Blocks + $43EC = Route4Blocks + $46FE = Route9Blocks + $4EF1 = Route19Blocks + $524F = GainExperience + $66E2 = DisplayDiploma + $690F = TrainerEngage + $54E6 = Route2TextPointers + $54E3 = Route2Script + $4022 = Route2Object + $5511 = Route3TextPointers + $54F8 = Route3Script + $4208 = Route3Object + $5671 = Route4TextPointers + $5658 = Route4Script + $43B2 = Route4Object + $56B5 = Route5TextPointers + $56B2 = Route5Script + $45A3 = Route5Object + $56D5 = Route9TextPointers + $56BC = Route9Script + $46A8 = Route9Object + $488B = Route13Blocks + $5837 = Route13TextPointers + $581E = Route13Script + $4A12 = Route14Blocks + $482E = Route13Object + $59EC = Route14TextPointers + $59D3 = Route14Script + $49BB = Route14Object + $4BA8 = Route17Blocks + $5B93 = Route17TextPointers + $5B7A = Route17Script + $4B42 = Route17Object + $5D5D = Route19TextPointers + $5D44 = Route19Script + $4E9A = Route19Object + $5F04 = Route21TextPointers + $5EEB = Route21Script + $5021 = Route21Object + $546C = Func_5546c + $5436 = Func_55436 + $549F = Func_5549f + $54B2 = GainedText + $54DD = GrewLevelText + $525F = Func_5525f + $54CB = WithExpAllText + $54D8 = ExpPointsText + $54D4 = BoostedText + $54EE = Route2Text3 + $54F3 = Route2Text4 + $5525 = Route3TrainerHeader0 + $550B = Route3ScriptPointers + $5586 = Route3Text1 + $558B = Route3Text2 + $55A4 = Route3Text3 + $55BD = Route3Text4 + $55D6 = Route3Text5 + $55EF = Route3Text6 + $5608 = Route3Text7 + $5621 = Route3Text8 + $563A = Route3Text9 + $5653 = Route3Text10 + $5595 = Route3BattleText1 + $559F = Route3AfterBattleText1 + $559A = Route3EndBattleText1 + $55AE = Route3BattleText2 + $55B8 = Route3AfterBattleText2 + $55B3 = Route3EndBattleText2 + $55C7 = Route3BattleText3 + $55D1 = Route3AfterBattleText3 + $55CC = Route3EndBattleText3 + $55E0 = Route3BattleText4 + $55EA = Route3AfterBattleText4 + $55E5 = Route3EndBattleText4 + $55F9 = Route3BattleText5 + $5603 = Route3AfterBattleText5 + $55FE = Route3EndBattleText5 + $5612 = Route3BattleText6 + $561C = Route3AfterBattleText6 + $5617 = Route3EndBattleText6 + $562B = Route3BattleText7 + $5635 = Route3AfterBattleText7 + $5630 = Route3EndBattleText7 + $5644 = Route3BattleText8 + $564E = Route3AfterBattleText8 + $5649 = Route3EndBattleText8 + $5531 = Route3TrainerHeader2 + $553D = Route3TrainerHeader3 + $5549 = Route3TrainerHeader4 + $5555 = Route3TrainerHeader5 + $5561 = Route3TrainerHeader6 + $556D = Route3TrainerHeader7 + $5579 = Route3TrainerHeader8 + $567D = Route4TrainerHeaders + $566B = Route4ScriptPointers + $568A = Route4Text1 + $568F = Route4Text2 + $56A8 = Route4Text5 + $56AD = Route4Text6 + $5699 = Route4BattleText1 + $56A3 = Route4AfterBattleText1 + $569E = Route4EndBattleText1 + $567D = Route4TrainerHeader0 + $56B7 = Route5Text1 + $56EB = Route9TrainerHeaders + $56CF = Route9ScriptPointers + $5758 = Route9Text1 + $575E = Route9Text2 + $5764 = Route9Text3 + $576A = Route9Text4 + $5770 = Route9Text5 + $5776 = Route9Text6 + $577C = Route9Text7 + $5782 = Route9Text8 + $5788 = Route9Text9 + $5819 = Route9Text11 + $5792 = Route9BattleText1 + $579C = Route9AfterBattleText1 + $5797 = Route9EndBattleText1 + $57A1 = Route9BattleText2 + $57AB = Route9AfterBattleText2 + $57A6 = Route9EndBattleText2 + $57B0 = Route9BattleText3 + $57BA = Route9AfterBattleText3 + $57B5 = Route9EndBattleText3 + $57BF = Route9BattleText4 + $57C9 = Route9AfterBattleText4 + $57C4 = Route9EndBattleText4 + $57CE = Route9BattleText5 + $57D8 = Route9AfterBattleText5 + $57D3 = Route9EndBattleText5 + $57DD = Route9BattleText6 + $57E7 = Route9AfterBattleText6 + $57E2 = Route9EndBattleText6 + $57EC = Route9BattleText7 + $57F6 = Route9AfterBattleText7 + $57F1 = Route9EndBattleText7 + $57FB = Route9BattleText8 + $5805 = Route9AfterBattleText8 + $5800 = Route9EndBattleText8 + $580A = Route9BattleText9 + $5814 = Route9AfterBattleText9 + $580F = Route9EndBattleText9 + $56EB = Route9TrainerHeader0 + $56F7 = Route9TrainerHeader2 + $5703 = Route9TrainerHeader3 + $570F = Route9TrainerHeader4 + $571B = Route9TrainerHeader5 + $5727 = Route9TrainerHeader6 + $5733 = Route9TrainerHeader7 + $573F = Route9TrainerHeader8 + $574B = Route9TrainerHeader9 + $5851 = Route13TrainerHeaders + $5831 = Route13ScriptPointers + $58CA = Route13Text1 + $58E3 = Route13Text2 + $58FC = Route13Text3 + $5915 = Route13Text4 + $592E = Route13Text5 + $5947 = Route13Text6 + $5960 = Route13Text7 + $5979 = Route13Text8 + $5992 = Route13Text9 + $59AB = Route13Text10 + $59C4 = Route13Text11 + $59C9 = Route13Text12 + $59CE = Route13Text13 + $58D4 = Route13BattleText2 + $58DE = Route13AfterBattleText2 + $58D9 = Route13EndBattleText2 + $58ED = Route13BattleText3 + $58F7 = Route13AfterBattleText3 + $58F2 = Route13EndBattleText3 + $5906 = Route13BattleText4 + $5910 = Route13AfterBattleText4 + $590B = Route13EndBattleText4 + $591F = Route13BattleText5 + $5929 = Route13AfterBattleText5 + $5924 = Route13EndBattleText5 + $5938 = Route13BattleText6 + $5942 = Route13AfterBattleText6 + $593D = Route13EndBattleText6 + $5951 = Route13BattleText7 + $595B = Route13AfterBattleText7 + $5956 = Route13EndBattleText7 + $596A = Route13BattleText8 + $5974 = Route13AfterBattleText8 + $596F = Route13EndBattleText8 + $5983 = Route13BattleText9 + $598D = Route13AfterBattleText9 + $5988 = Route13EndBattleText9 + $599C = Route13BattleText10 + $59A6 = Route13AfterBattleText10 + $59A1 = Route13EndBattleText10 + $59B5 = Route13BattleText11 + $59BF = Route13AfterBattleText11 + $59BA = Route13EndBattleText11 + $5851 = Route13TrainerHeader0 + $585D = Route13TrainerHeader2 + $5869 = Route13TrainerHeader3 + $5875 = Route13TrainerHeader4 + $5881 = Route13TrainerHeader5 + $588D = Route13TrainerHeader6 + $5899 = Route13TrainerHeader7 + $58A5 = Route13TrainerHeader8 + $58B1 = Route13TrainerHeader9 + $58BD = Route13TrainerHeader10 + $5A02 = Route14TrainerHeaders + $59E6 = Route14ScriptPointers + $5A7B = Route14Text1 + $5A94 = Route14Text2 + $5AAD = Route14Text3 + $5AC6 = Route14Text4 + $5ADF = Route14Text5 + $5AF8 = Route14Text6 + $5B11 = Route14Text7 + $5B2A = Route14Text8 + $5B43 = Route14Text9 + $5B5C = Route14Text10 + $5B75 = Route14Text11 + $5A85 = Route14BattleText1 + $5A8F = Route14AfterBattleText1 + $5A8A = Route14EndBattleText1 + $5A9E = Route14BattleText2 + $5AA8 = Route14AfterBattleText2 + $5AA3 = Route14EndBattleText2 + $5AB7 = Route14BattleText3 + $5AC1 = Route14AfterBattleText3 + $5ABC = Route14EndBattleText3 + $5AD0 = Route14BattleText4 + $5ADA = Route14AfterBattleText4 + $5AD5 = Route14EndBattleText4 + $5AE9 = Route14BattleText5 + $5AF3 = Route14AfterBattleText5 + $5AEE = Route14EndBattleText5 + $5B02 = Route14BattleText6 + $5B0C = Route14AfterBattleText6 + $5B07 = Route14EndBattleText6 + $5B1B = Route14BattleText7 + $5B25 = Route14AfterBattleText7 + $5B20 = Route14EndBattleText7 + $5B34 = Route14BattleText8 + $5B3E = Route14AfterBattleText8 + $5B39 = Route14EndBattleText8 + $5B4D = Route14BattleText9 + $5B57 = Route14AfterBattleText9 + $5B52 = Route14EndBattleText9 + $5B66 = Route14BattleText10 + $5B70 = Route14AfterBattleText10 + $5B6B = Route14EndBattleText10 + $5A02 = Route14TrainerHeader0 + $5A0E = Route14TrainerHeader1 + $5A1A = Route14TrainerHeader2 + $5A26 = Route14TrainerHeader3 + $5A32 = Route14TrainerHeader4 + $5A3E = Route14TrainerHeader5 + $5A4A = Route14TrainerHeader6 + $5A56 = Route14TrainerHeader7 + $5A62 = Route14TrainerHeader8 + $5A6E = Route14TrainerHeader9 + $5BB3 = Route17TrainerHeaders + $5B8D = Route17ScriptPointers + $5C2C = Route17Text1 + $5C45 = Route17Text2 + $5C5E = Route17Text3 + $5C77 = Route17Text4 + $5C90 = Route17Text5 + $5CA9 = Route17Text6 + $5CC2 = Route17Text7 + $5CDB = Route17Text8 + $5CF4 = Route17Text9 + $5D0D = Route17Text10 + $5D26 = Route17Text11 + $5D2B = Route17Text12 + $5D30 = Route17Text13 + $5D35 = Route17Text14 + $5D3A = Route17Text15 + $5D3F = Route17Text16 + $5C36 = Route17BattleText1 + $5C40 = Route17AfterBattleText1 + $5C3B = Route17EndBattleText1 + $5C4F = Route17BattleText2 + $5C59 = Route17AfterBattleText2 + $5C54 = Route17EndBattleText2 + $5C68 = Route17BattleText3 + $5C72 = Route17AfterBattleText3 + $5C6D = Route17EndBattleText3 + $5C81 = Route17BattleText4 + $5C8B = Route17AfterBattleText4 + $5C86 = Route17EndBattleText4 + $5C9A = Route17BattleText5 + $5CA4 = Route17AfterBattleText5 + $5C9F = Route17EndBattleText5 + $5CB3 = Route17BattleText6 + $5CBD = Route17AfterBattleText6 + $5CB8 = Route17EndBattleText6 + $5CCC = Route17BattleText7 + $5CD6 = Route17AfterBattleText7 + $5CD1 = Route17EndBattleText7 + $5CE5 = Route17BattleText8 + $5CEF = Route17AfterBattleText8 + $5CEA = Route17EndBattleText8 + $5CFE = Route17BattleText9 + $5D08 = Route17AfterBattleText9 + $5D03 = Route17EndBattleText9 + $5D17 = Route17BattleText10 + $5D21 = Route17AfterBattleText10 + $5D1C = Route17EndBattleText10 + $5BB3 = Route17TrainerHeader0 + $5BBF = Route17TrainerHeader1 + $5BCB = Route17TrainerHeader2 + $5BD7 = Route17TrainerHeader3 + $5BE3 = Route17TrainerHeader4 + $5BEF = Route17TrainerHeader5 + $5BFB = Route17TrainerHeader6 + $5C07 = Route17TrainerHeader7 + $5C13 = Route17TrainerHeader8 + $5C1F = Route17TrainerHeader9 + $5D73 = Route19TrainerHeaders + $5D57 = Route19ScriptPointers + $5DEC = Route19Text1 + $5DF6 = Route19Text2 + $5E00 = Route19Text3 + $5E0A = Route19Text4 + $5E14 = Route19Text5 + $5E1E = Route19Text6 + $5E28 = Route19Text7 + $5E32 = Route19Text8 + $5E3C = Route19Text9 + $5E46 = Route19Text10 + $5EE6 = Route19Text11 + $5E50 = Route19BattleText1 + $5E5A = Route19AfterBattleText1 + $5E55 = Route19EndBattleText1 + $5E5F = Route19BattleText2 + $5E69 = Route19AfterBattleText2 + $5E64 = Route19EndBattleText2 + $5E6E = Route19BattleText3 + $5E78 = Route19AfterBattleText3 + $5E73 = Route19EndBattleText3 + $5E7D = Route19BattleText4 + $5E87 = Route19AfterBattleText4 + $5E82 = Route19EndBattleText4 + $5E8C = Route19BattleText5 + $5E96 = Route19AfterBattleText5 + $5E91 = Route19EndBattleText5 + $5E9B = Route19BattleText6 + $5EA5 = Route19AfterBattleText6 + $5EA0 = Route19EndBattleText6 + $5EAA = Route19BattleText7 + $5EB4 = Route19AfterBattleText7 + $5EAF = Route19EndBattleText7 + $5EB9 = Route19BattleText8 + $5EC3 = Route19AfterBattleText8 + $5EBE = Route19EndBattleText8 + $5EC8 = Route19BattleText9 + $5ED2 = Route19AfterBattleText9 + $5ECD = Route19EndBattleText9 + $5ED7 = Route19BattleText10 + $5EE1 = Route19AfterBattleText10 + $5EDC = Route19EndBattleText10 + $5D73 = Route19TrainerHeader0 + $5D7F = Route19TrainerHeader1 + $5D8B = Route19TrainerHeader2 + $5D97 = Route19TrainerHeader3 + $5DA3 = Route19TrainerHeader4 + $5DAF = Route19TrainerHeader5 + $5DBB = Route19TrainerHeader6 + $5DC7 = Route19TrainerHeader7 + $5DD3 = Route19TrainerHeader8 + $5DDF = Route19TrainerHeader9 + $5F16 = Route21TrainerHeaders + $5EFE = Route21ScriptPointers + $5F83 = Route21Text1 + $5F8D = Route21Text2 + $5F97 = Route21Text3 + $5FA1 = Route21Text4 + $5FAB = Route21Text5 + $5FB5 = Route21Text6 + $5FBF = Route21Text7 + $5FC9 = Route21Text8 + $5FD3 = Route21Text9 + $5FDD = Route21BattleText1 + $5FE7 = Route21AfterBattleText1 + $5FE2 = Route21EndBattleText1 + $5FEC = Route21BattleText2 + $5FF6 = Route21AfterBattleText2 + $5FF1 = Route21EndBattleText2 + $5FFB = Route21BattleText3 + $6005 = Route21AfterBattleText3 + $6000 = Route21EndBattleText3 + $600A = Route21BattleText4 + $6014 = Route21AfterBattleText4 + $600F = Route21EndBattleText4 + $6019 = Route21BattleText5 + $6023 = Route21AfterBattleText5 + $601E = Route21EndBattleText5 + $6028 = Route21BattleText6 + $6032 = Route21AfterBattleText6 + $602D = Route21EndBattleText6 + $6037 = Route21BattleText7 + $6041 = Route21AfterBattleText7 + $603C = Route21EndBattleText7 + $6046 = Route21BattleText8 + $6050 = Route21AfterBattleText8 + $604B = Route21EndBattleText8 + $6055 = Route21BattleText9 + $605F = Route21AfterBattleText9 + $605A = Route21EndBattleText9 + $5F16 = Route21TrainerHeader0 + $5F22 = Route21TrainerHeader1 + $5F2E = Route21TrainerHeader2 + $5F3A = Route21TrainerHeader3 + $5F46 = Route21TrainerHeader4 + $5F52 = Route21TrainerHeader5 + $5F5E = Route21TrainerHeader6 + $5F6A = Route21TrainerHeader7 + $5F76 = Route21TrainerHeader8 + $522F = VermilionHouse2Blocks + $6073 = VermilionHouse2TextPointers + $6070 = VermilionHouse2Script + $60CF = VermilionHouse2Object + $6075 = VermilionHouse2Text1 + $60B1 = VermilionHouse2Text_560b1 + $60B6 = VermilionHouse2Text_560b6 + $60CA = VermilionHouse2Text_560ca + $60C0 = VermilionHouse2Text_560c0 + $60C5 = VermilionHouse2Text_560c5 + $6148 = CeladonMart2Blocks + $60F8 = CeladonMart2TextPointers + $60F5 = CeladonMart2Script + $6111 = CeladonMart2Object + $6102 = CeladonMart2Text3 + $6107 = CeladonMart2Text4 + $610C = CeladonMart2Text5 + $523F = FuchsiaHouse3Blocks + $617F = FuchsiaHouse3TextPointers + $617C = FuchsiaHouse3Script + $6221 = FuchsiaHouse3Object + $6181 = FuchsiaHouse3Text1 + $61BD = FuchsiaHouse3Text_561bd + $61C2 = FuchsiaHouse3Text_561c2 + $621C = FuchsiaHouse3Text_5621c + $6212 = FuchsiaHouse3Text_56212 + $6217 = FuchsiaHouse3Text_56217 + $522F = DayCareMBlocks + $6252 = DayCareMTextPointers + $624F = DayCareMScript + $6459 = DayCareMObject + $6254 = DayCareMText1 + $62E1 = DayCareMScript_562e1 + $640F = DayCareMText_5640f + $643B = DayCareMText_5643b + $6409 = DayCareMScript_56409 + $6445 = DayCareMText_56445 + $6414 = DayCareMText_56414 + $6437 = DayCareMText_56437 + $644A = DayCareMText_5644a + $6419 = DayCareMText_56419 + $641E = DayCareMText_5641e + $6432 = DayCareMText_56432 + $6423 = DayCareMText_56423 + $6440 = DayCareMText_56440 + $6403 = DayCareMScript_562e1.asm_56403 + $6428 = DayCareMText_56428 + $6454 = DayCareMText_56454 + $644F = DayCareMText_5644f + $642D = DayCareMText_5642d + $522F = Route12HouseBlocks + $6482 = Route12HouseTextPointers + $647F = Route12HouseScript + $64DE = Route12HouseObject + $6484 = Route12HouseText1 + $64C0 = Route12HouseText_564c0 + $64C5 = Route12HouseText_564c5 + $64D9 = Route12HouseText_564d9 + $64CF = Route12HouseText_564cf + $64D4 = Route12HouseText_564d4 + $666D = SilphCo8Blocks + $657D = SilphCo8TextPointers + $6504 = SilphCo8Script + $6613 = SilphCo8Object + $651A = SilphCo8Script_5651a + $6585 = SilphCo8TrainerHeader0 + $6577 = SilphCo8ScriptPointers + $653E = DataTable_5653e + $6541 = SilphCo8Script_56541 + $656D = SilphCo8Script_5656d + $65AA = SilphCo8Text1 + $65C8 = SilphCo8Text2 + $65D2 = SilphCo8Text3 + $65DC = SilphCo8Text4 + $65E6 = SilphCo8BattleText1 + $65F0 = SilphCo8AfterBattleText1 + $65EB = SilphCo8EndBattleText1 + $65F5 = SilphCo8BattleText2 + $65FF = SilphCo8AfterBattleText2 + $65FA = SilphCo8EndBattleText2 + $6604 = SilphCo8BattleText3 + $660E = SilphCo8AfterBattleText3 + $6609 = SilphCo8EndBattleText3 + $65C3 = SilphCo8Text_565c3 + $65BE = SilphCo8Text_565be + $6591 = SilphCo8TrainerHeader1 + $659D = SilphCo8TrainerHeader2 + $6784 = DiplomaTextPointersAndCoords + $6798 = DiplomaText + $67A2 = DiplomaPlayer + $67A9 = DiplomaEmptyText + $67AA = DiplomaCongrats + $67EE = DiplomaGameFreak + $6903 = Func_56903 + $698E = ReadTrainerScreenPosition + $6988 = TrainerEngage.noEngage + $69AF = CheckSpriteCanSeePlayer + $69E3 = CheckPlayerIsInFrontOfSprite + $6A42 = CheckPlayerIsInFrontOfSprite.engage + SLACK: $15B5 bytes + +Bank #22: + SECTION: $4000-$65BA ($25BB bytes) + $4000 = Route6_h + $412D = Route8_h + $42D4 = Route10_h + $44BE = Route11_h + $466D = Route12_h + $492C = Route15_h + $4ADA = Route16_h + $4C38 = Route18_h + $5B64 = FanClub_h + $62A2 = Lance_h + $6492 = HallofFameRoom_h + $5CE5 = SilphCo2_h + $5F4F = SilphCo3_h + $612D = SilphCo10_h + $4F6A = CalcExperience + $4F43 = Func_58f43 + $4B84 = Route16Blocks + $4079 = Route6Blocks + $455F = Route11Blocks + $4C9C = Route18Blocks + $49CC = Route15Blocks + $659F = RemoveGuardDrink + $4D99 = PrintBeginningBattleText + $4E59 = SendOutMon + $4ED1 = RetreatMon + $4356 = Route10Blocks + $4710 = Route12Blocks + $41C6 = Route8Blocks + $5035 = OaksAideScript + $50C9 = Route6TextPointers + $50B0 = Route6Script + $4022 = Route6Object + $51CF = Route8TextPointers + $51B6 = Route8Script + $414F = Route8Object + $534F = Route10TextPointers + $5336 = Route10Script + $42F6 = Route10Object + $5465 = Route11TextPointers + $544C = Route11Script + $44E0 = Route11Object + $5675 = Route12TextPointers + $55F3 = Route12Script + $469A = Route12Object + $57C7 = Route15TextPointers + $57AE = Route15Script + $494E = Route15Object + $59B9 = Route16TextPointers + $5933 = Route16Script + $4AFC = Route16Object + $5AE0 = Route18TextPointers + $5AC7 = Route18Script + $4C5A = Route18Object + $4E3B = WildMonAppearedText + $4E40 = HookedMonAttackedText + $4E29 = PrintBeginningBattleText.playSFX + $4E4A = TrainerWantsToFightText + $4E45 = EnemyAppearedText + $4E54 = GhostCantBeIDdText + $4E4F = UnveiledGhostText + $4EAE = GoText + $4EB5 = DoItText + $4EBC = GetmText + $4EC3 = EnemysWeakText + $4ECC = PlayerMon1Text + $4ED7 = PlayerMon2Text + $4F25 = EnoughText + $4F3E = ComeBackText + $4F2C = OKExclamationText + $4F33 = GoodText + $501D = GrowthRateTable + $5010 = CalcDSquared + $5091 = OaksAideHiText + $50A0 = OaksAideHereYouGoText + $50A5 = OaksAideGotItemText + $50AB = OaksAideNoRoomText + $5096 = OaksAideUhOhText + $509B = OaksAideComeBackText + $50D7 = Route6TrainerHeaders + $50C3 = Route6ScriptPointers + $5120 = Route6Text1 + $5139 = Route6Text2 + $514D = Route6Text3 + $5166 = Route6Text4 + $517F = Route6Text5 + $5198 = Route6Text6 + $51B1 = Route6Text7 + $512A = Route6BattleText1 + $5134 = Route6AfterBattleText1 + $512F = Route6EndBattleText1 + $5143 = Route6BattleText2 + $5148 = Route6EndBattleText2 + $5157 = Route6BattleText3 + $5161 = Route6AfterBattleText3 + $515C = Route6EndBattleText3 + $5170 = Route6BattleText4 + $517A = Route6AfterBattleText4 + $5175 = Route6EndBattleText4 + $5189 = Route6BattleText5 + $5193 = Route6AfterBattleText5 + $518E = Route6EndBattleText5 + $51A2 = Route6BattleText6 + $51AC = Route6AfterBattleText6 + $51A7 = Route6EndBattleText6 + $50D7 = Route6TrainerHeader0 + $50E3 = Route6TrainerHeader1 + $50EF = Route6TrainerHeader2 + $50FB = Route6TrainerHeader3 + $5107 = Route6TrainerHeader4 + $5113 = Route6TrainerHeader5 + $51E3 = Route8TrainerHeaders + $51C9 = Route8ScriptPointers + $5250 = Route8Text1 + $5269 = Route8Text2 + $5282 = Route8Text3 + $529B = Route8Text4 + $52B4 = Route8Text5 + $52CD = Route8Text6 + $52E6 = Route8Text7 + $52FF = Route8Text8 + $5318 = Route8Text9 + $5331 = Route8Text10 + $525A = Route8BattleText1 + $5264 = Route8AfterBattleText1 + $525F = Route8EndBattleText1 + $5273 = Route8BattleText2 + $527D = Route8AfterBattleText2 + $5278 = Route8EndBattleText2 + $528C = Route8BattleText3 + $5296 = Route8AfterBattleText3 + $5291 = Route8EndBattleText3 + $52A5 = Route8BattleText4 + $52AF = Route8AfterBattleText4 + $52AA = Route8EndBattleText4 + $52BE = Route8BattleText5 + $52C8 = Route8AfterBattleText5 + $52C3 = Route8EndBattleText5 + $52D7 = Route8BattleText6 + $52E1 = Route8AfterBattleText6 + $52DC = Route8EndBattleText6 + $52F0 = Route8BattleText7 + $52FA = Route8AfterBattleText7 + $52F5 = Route8EndBattleText7 + $5309 = Route8BattleText8 + $5313 = Route8AfterBattleText8 + $530E = Route8EndBattleText8 + $5322 = Route8BattleText9 + $532C = Route8AfterBattleText9 + $5327 = Route8EndBattleText9 + $51E3 = Route8TrainerHeader0 + $51EF = Route8TrainerHeader1 + $51FB = Route8TrainerHeader2 + $5207 = Route8TrainerHeader3 + $5213 = Route8TrainerHeader4 + $521F = Route8TrainerHeader5 + $522B = Route8TrainerHeader6 + $5237 = Route8TrainerHeader7 + $5243 = Route8TrainerHeader8 + $5363 = Route10TrainerHeaders + $5349 = Route10ScriptPointers + $53AC = Route10Text1 + $53C5 = Route10Text2 + $53DE = Route10Text3 + $53F7 = Route10Text4 + $5410 = Route10Text5 + $5429 = Route10Text6 + $5442 = Route10Text7 + $5442 = Route10Text9 + $5447 = Route10Text10 + $53B6 = Route10BattleText1 + $53C0 = Route10AfterBattleText1 + $53BB = Route10EndBattleText1 + $53CF = Route10BattleText2 + $53D9 = Route10AfterBattleText2 + $53D4 = Route10EndBattleText2 + $53E8 = Route10BattleText3 + $53F2 = Route10AfterBattleText3 + $53ED = Route10EndBattleText3 + $5401 = Route10BattleText4 + $540B = Route10AfterBattleText4 + $5406 = Route10EndBattleText4 + $541A = Route10BattleText5 + $5424 = Route10AfterBattleText5 + $541F = Route10EndBattleText5 + $5433 = Route10BattleText6 + $543D = Route10AfterBattleText6 + $5438 = Route10EndBattleText6 + $5363 = Route10TrainerHeader0 + $536F = Route10TrainerHeader1 + $537B = Route10TrainerHeader2 + $5387 = Route10TrainerHeader3 + $5393 = Route10TrainerHeader4 + $539F = Route10TrainerHeader5 + $547B = Route11TrainerHeaders + $545F = Route11ScriptPointers + $54F4 = Route11Text1 + $550D = Route11Text2 + $5526 = Route11Text3 + $553F = Route11Text4 + $5558 = Route11Text5 + $5571 = Route11Text6 + $558A = Route11Text7 + $55A3 = Route11Text8 + $55BC = Route11Text9 + $55D5 = Route11Text10 + $55EE = Route11Text11 + $54FE = Route11BattleText1 + $5508 = Route11AfterBattleText1 + $5503 = Route11EndBattleText1 + $5517 = Route11BattleText2 + $5521 = Route11AfterBattleText2 + $551C = Route11EndBattleText2 + $5530 = Route11BattleText3 + $553A = Route11AfterBattleText3 + $5535 = Route11EndBattleText3 + $5549 = Route11BattleText4 + $5553 = Route11AfterBattleText4 + $554E = Route11EndBattleText4 + $5562 = Route11BattleText5 + $556C = Route11AfterBattleText5 + $5567 = Route11EndBattleText5 + $557B = Route11BattleText6 + $5585 = Route11AfterBattleText6 + $5580 = Route11EndBattleText6 + $5594 = Route11BattleText7 + $559E = Route11AfterBattleText7 + $5599 = Route11EndBattleText7 + $55AD = Route11BattleText8 + $55B7 = Route11AfterBattleText8 + $55B2 = Route11EndBattleText8 + $55C6 = Route11BattleText9 + $55D0 = Route11AfterBattleText9 + $55CB = Route11EndBattleText9 + $55DF = Route11BattleText10 + $55E9 = Route11AfterBattleText10 + $55E4 = Route11EndBattleText10 + $547B = Route11TrainerHeader0 + $5487 = Route11TrainerHeader1 + $5493 = Route11TrainerHeader2 + $549F = Route11TrainerHeader3 + $54AB = Route11TrainerHeader4 + $54B7 = Route11TrainerHeader5 + $54C3 = Route11TrainerHeader6 + $54CF = Route11TrainerHeader7 + $54DB = Route11TrainerHeader8 + $54E7 = Route11TrainerHeader9 + $5691 = Route12TrainerHeaders + $5611 = Route12ScriptPointers + $5619 = Route12Script0 + $564C = Route12Script3 + $56E6 = Route12Text1 + $56F5 = Route12Text2 + $570E = Route12Text3 + $5727 = Route12Text4 + $5740 = Route12Text5 + $5759 = Route12Text6 + $5772 = Route12Text7 + $578B = Route12Text8 + $57A4 = Route12Text11 + $57A9 = Route12Text12 + $56EB = Route12Text13 + $56F0 = Route12Text14 + $56FF = Route12BattleText1 + $5709 = Route12AfterBattleText1 + $5704 = Route12EndBattleText1 + $5718 = Route12BattleText2 + $5722 = Route12AfterBattleText2 + $571D = Route12EndBattleText2 + $5731 = Route12BattleText3 + $573B = Route12AfterBattleText3 + $5736 = Route12EndBattleText3 + $574A = Route12BattleText4 + $5754 = Route12AfterBattleText4 + $574F = Route12EndBattleText4 + $5763 = Route12BattleText5 + $576D = Route12AfterBattleText5 + $5768 = Route12EndBattleText5 + $577C = Route12BattleText6 + $5786 = Route12AfterBattleText6 + $5781 = Route12EndBattleText6 + $5795 = Route12BattleText7 + $579F = Route12AfterBattleText7 + $579A = Route12EndBattleText7 + $5691 = Route12TrainerHeader0 + $569D = Route12TrainerHeader1 + $56A9 = Route12TrainerHeader2 + $56B5 = Route12TrainerHeader3 + $56C1 = Route12TrainerHeader4 + $56CD = Route12TrainerHeader5 + $56D9 = Route12TrainerHeader6 + $57DF = Route15TrainerHeaders + $57C1 = Route15ScriptPointers + $5858 = Route15Text1 + $585E = Route15Text2 + $5864 = Route15Text3 + $586A = Route15Text4 + $5870 = Route15Text5 + $5876 = Route15Text6 + $587C = Route15Text7 + $5882 = Route15Text8 + $5888 = Route15Text9 + $588E = Route15Text10 + $592E = Route15Text12 + $5898 = Route15BattleText1 + $58A2 = Route15AfterBattleText1 + $589D = Route15EndBattleText1 + $58A7 = Route15BattleText2 + $58B1 = Route15AfterBattleText2 + $58AC = Route15EndBattleText2 + $58B6 = Route15BattleText3 + $58C0 = Route15AfterBattleText3 + $58BB = Route15EndBattleText3 + $58C5 = Route15BattleText4 + $58CF = Route15AfterBattleText4 + $58CA = Route15EndBattleText4 + $58D4 = Route15BattleText5 + $58DE = Route15AfterBattleText5 + $58D9 = Route15EndBattleText5 + $58E3 = Route15BattleText6 + $58ED = Route15AfterBattleText6 + $58E8 = Route15EndBattleText6 + $58F2 = Route15BattleText7 + $58FC = Route15AfterBattleText7 + $58F7 = Route15EndBattleText7 + $5901 = Route15BattleText8 + $590B = Route15AfterBattleText8 + $5906 = Route15EndBattleText8 + $5910 = Route15BattleText9 + $591A = Route15AfterBattleText9 + $5915 = Route15EndBattleText9 + $591F = Route15BattleText10 + $5929 = Route15AfterBattleText10 + $5924 = Route15EndBattleText10 + $57DF = Route15TrainerHeader0 + $57EB = Route15TrainerHeader1 + $57F7 = Route15TrainerHeader2 + $5803 = Route15TrainerHeader3 + $580F = Route15TrainerHeader4 + $581B = Route15TrainerHeader5 + $5827 = Route15TrainerHeader6 + $5833 = Route15TrainerHeader7 + $583F = Route15TrainerHeader8 + $584B = Route15TrainerHeader9 + $59CF = Route16TrainerHeaders + $5951 = Route16ScriptPointers + $5959 = Route16Script0 + $598F = Route16Script3 + $5946 = Route16Script_59946 + $5A18 = Route16Text1 + $5A31 = Route16Text2 + $5A4A = Route16Text3 + $5A63 = Route16Text4 + $5A7C = Route16Text5 + $5A95 = Route16Text6 + $5AAE = Route16Text7 + $5ABD = Route16Text8 + $5AC2 = Route16Text9 + $5AB3 = Route16Text10 + $5AB8 = Route16Text11 + $5A22 = Route16BattleText1 + $5A2C = Route16AfterBattleText1 + $5A27 = Route16EndBattleText1 + $5A3B = Route16BattleText2 + $5A45 = Route16AfterBattleText2 + $5A40 = Route16EndBattleText2 + $5A54 = Route16BattleText3 + $5A5E = Route16AfterBattleText3 + $5A59 = Route16EndBattleText3 + $5A6D = Route16BattleText4 + $5A77 = Route16AfterBattleText4 + $5A72 = Route16EndBattleText4 + $5A86 = Route16BattleText5 + $5A90 = Route16AfterBattleText5 + $5A8B = Route16EndBattleText5 + $5A9F = Route16BattleText6 + $5AA9 = Route16AfterBattleText6 + $5AA4 = Route16EndBattleText6 + $59CF = Route16TrainerHeader0 + $59DB = Route16TrainerHeader1 + $59E7 = Route16TrainerHeader2 + $59F3 = Route16TrainerHeader3 + $59FF = Route16TrainerHeader4 + $5A0B = Route16TrainerHeader5 + $5AEA = Route18TrainerHeaders + $5ADA = Route18ScriptPointers + $5B0F = Route18Text1 + $5B28 = Route18Text2 + $5B41 = Route18Text3 + $5B5A = Route18Text4 + $5B5F = Route18Text5 + $5B19 = Route18BattleText1 + $5B23 = Route18AfterBattleText1 + $5B1E = Route18EndBattleText1 + $5B32 = Route18BattleText2 + $5B3C = Route18AfterBattleText2 + $5B37 = Route18EndBattleText2 + $5B4B = Route18BattleText3 + $5B55 = Route18AfterBattleText3 + $5B50 = Route18EndBattleText3 + $5AEA = Route18TrainerHeader0 + $5AF6 = Route18TrainerHeader1 + $5B02 = Route18TrainerHeader2 + $5CD5 = FanClubBlocks + $5B84 = FanClubTextPointers + $5B70 = FanClubScript + $5C97 = FanClubObject + $5B94 = FanClubText1 + $5BC1 = FanClubText2 + $5BEE = FanClubText3 + $5C05 = FanClubText4 + $5C1C = FanClubText5 + $5C88 = FanClubText6 + $5C8D = FanClubText7 + $5C92 = FanClubText8 + $5BB7 = FanClubText1.normaltext + $5BBC = FanClubText1.bettertext + $5BE4 = FanClubText2.normaltext + $5BE9 = FanClubText2.bettertext + $5C00 = FanClubText3.text + $5C17 = FanClubText4.text + $5B73 = FanClubBikeInBag + $5C65 = FanClubText5.meetchairtext + $5C6A = FanClubText5.storytext + $5C6F = FanClubText5.receivedvouchertext + $5C83 = FanClubText5.bagfulltext + $5C79 = FanClubText5.nostorytext + $5C7E = FanClubText5.finaltext + $5EC8 = SilphCo2Blocks + $5D86 = SilphCo2TextPointers + $5CF1 = SilphCo2Script + $5E66 = SilphCo2Object + $5D07 = SilphCo2Script_59d07 + $5D90 = SilphCo2TrainerHeaders + $5D80 = SilphCo2ScriptPointers + $5D3E = DataTable_59d3e + $5D43 = SilphCo2Script_59d43 + $5D6F = SilphCo2Script_59d6f + $5DC1 = SilphCo2Text1 + $5E02 = SilphCo2Text2 + $5E0C = SilphCo2Text3 + $5E16 = SilphCo2Text4 + $5E20 = SilphCo2Text5 + $5E2A = SilphCo2BattleText1 + $5E34 = SilphCo2AfterBattleText1 + $5E2F = SilphCo2EndBattleText1 + $5E39 = SilphCo2BattleText2 + $5E43 = SilphCo2AfterBattleText2 + $5E3E = SilphCo2EndBattleText2 + $5E48 = SilphCo2BattleText3 + $5E52 = SilphCo2AfterBattleText3 + $5E4D = SilphCo2EndBattleText3 + $5E57 = SilphCo2BattleText4 + $5E61 = SilphCo2AfterBattleText4 + $5E5C = SilphCo2EndBattleText4 + $5DED = SilphCo2Text_59ded + $5DFD = TM36NoRoomText + $5DF2 = ReceivedTM36Text + $5DF8 = TM36ExplanationText + $5D90 = SilphCo2TrainerHeader0 + $5D9C = SilphCo2TrainerHeader1 + $5DA8 = SilphCo2TrainerHeader2 + $5DB4 = SilphCo2TrainerHeader3 + $60A6 = SilphCo3Blocks + $5FC4 = SilphCo3TextPointers + $5F5B = SilphCo3Script + $6035 = SilphCo3Object + $5F71 = SilphCo3Script_59f71 + $5FCC = SilphCo3TrainerHeaders + $5FBE = SilphCo3ScriptPointers + $5FA8 = DataTable_59fa8 + $5FAD = SilphCo3Script_59fad + $5FE5 = SilphCo3Text1 + $6003 = SilphCo3Text2 + $601C = SilphCo3Text3 + $600D = SilphCo3BattleText1 + $6017 = SilphCo3AfterBattleText1 + $6012 = SilphCo3EndBattleText1 + $6026 = SilphCo3BattleText2 + $6030 = SilphCo3AfterBattleText2 + $602B = SilphCo3EndBattleText2 + $5FFE = SilphCo3Text_59ffe + $5FF9 = SilphCo3Text_59ff9 + $5FCC = SilphCo3TrainerHeader0 + $5FD8 = SilphCo3TrainerHeader1 + $625A = SilphCo10Blocks + $6186 = SilphCo10TextPointers + $6139 = SilphCo10Script + $61FB = SilphCo10Object + $614F = SilphCo10Script_5a14f + $6192 = SilphCo10TrainerHeaders + $6180 = SilphCo10ScriptPointers + $6173 = DataTable_5a173 + $6176 = SilphCo10Text_5a176 + $61AB = SilphCo10Text1 + $61B5 = SilphCo10Text2 + $61BF = SilphCo10Text3 + $61DD = SilphCo10BattleText1 + $61E7 = SilphCo10AfterBattleText1 + $61E2 = SilphCo10EndBattleText1 + $61EC = SilphCo10BattleText2 + $61F6 = SilphCo10AfterBattleText2 + $61F1 = SilphCo10EndBattleText2 + $6192 = SilphCo10TrainerHeader0 + $619E = SilphCo10TrainerHeader1 + $61D8 = SilphCo10Text_5a1d8 + $61D3 = SilphCo10Text_5a1d3 + $63E9 = LanceBlocks + $6395 = LanceTextPointers + $62AE = LanceScript + $63C5 = LanceObject + $62C4 = LanceScript_5a2c4 + $6397 = LanceTrainerHeaders + $62FA = LanceScriptPointers + $62DE = LanceScript_5a2de + $62F0 = LanceScript_5a2f0 + $6305 = LanceScript0 + $6349 = LanceScript2 + $6382 = LanceScript3 + $6304 = LanceScript4 + $633E = CoordsData_5a33e + $62F5 = LanceScript_5a2f5 + $6379 = RLEList_5a379 + $63A4 = LanceText1 + $63AE = LanceBeforeBattleText + $63B8 = LanceAfterBattleText + $63B3 = LanceEndBattleText + $6397 = LanceTrainerHeader0 + $658B = HallofFameRoomBlocks + $656A = HallofFameRoomTextPointers + $649E = HallofFameRoomScript + $6571 = HallofFameRoomObject + $64B2 = HallofFameRoomScriptPointers + $650D = HallofFameRoomScript0 + $652B = HallofFameRoomScript1 + $64BB = HallofFameRoomScript2 + $64BA = HallofFameRoomScript3 + $6528 = RLEMovement5a528 + $656C = HallofFameRoomText1 + $65B7 = GuardDrinksList + SLACK: $1A45 bytes + +Bank #23: + SECTION: $4000-$5F14 ($1F15 bytes) + $40A4 = RedsHouse2F_h + $557B = ViridianForestExit_h + $55C8 = Route2Gate_h + $5650 = ViridianForestEntrance_h + $40EB = Museum1F_h + $430B = Museum2F_h + $437B = PewterGym_h + $457B = PewterPokecenter_h + $4639 = CeruleanPokecenter_h + $46A7 = CeruleanGym_h + $4889 = CeruleanMart_h + $569D = UndergroundPathEntranceRoute5_h + $56E3 = UndergroundPathEntranceRoute6_h + $5720 = UndergroundPathEntranceRoute7_h + $575D = UndergroundPathEntranceRoute7Copy_h + $4983 = VermilionPokecenter_h + $49D5 = VermilionMart_h + $4A1A = VermilionGym_h + $59FE = VictoryRoad1_h + $48CE = LavenderPokecenter_h + $4920 = LavenderMart_h + $4C65 = CopycatsHouse2F_h + $4D51 = FightingDojo_h + $5001 = SaffronGym_h + $53FD = SaffronMart_h + $5442 = SilphCo1_h + $5529 = SaffronPokecenter_h + $57AF = SilphCo9_h + $5B8E = RedBedroomPC + $5B81 = RedBedroomSNESText + $5BBE = AerodactylFossilText + $5BA8 = Route15UpstairsBinocularsText + $5BD4 = KabutopsFossilText + $5CED = ViridianSchoolBlackboard + $5DF7 = VermilionGymTrashText + $5C29 = LinkCableHelp + $5EC8 = VermilionGymTrashSuccesText1 + $5EDB = VermilionGymTrashSuccesText2 + $5EEF = VermilionGymTrashSuccesText3 + $5F02 = VermilionGymTrashFailText + $5B86 = OpenRedsPC + $5B79 = PrintRedsNESText + $5C1A = PrintBlackboardLinkCableText + $5BAD = AerodactylFossil + $5BC3 = KabutopsFossil + $5DEF = PrintTrashText + $5DFC = GymTrashScript + $5B8F = Route15GateLeftBinoculars + $5B5E = SetPartyMonTypes + $40DC = StarterDex + $4010 = RedsHouse2FBlocks + $40CF = RedsHouse2FTextPointers + $40B0 = RedsHouse2FScript + $40D0 = RedsHouse2FObject + $40BC = RedsHouse2FScriptPointers + $40C0 = RedsHouse2FScript0 + $40CE = RedsHouse2FScript1 + $4020 = Museum1FBlocks + $412B = Museum1FTextPointers + $40F7 = Museum1FScript + $42C1 = Museum1FObject + $4109 = Museum1FScriptPointers + $410D = Museum1FScript0 + $412A = Museum1FScript1 + $4135 = Museum1FText1 + $4247 = Museum1FText2 + $4256 = Museum1FText3 + $42A3 = Museum1FText4 + $42B2 = Museum1FText5 + $41F9 = Museum1FScript_5c1f9 + $423D = Museum1FText_5c23d + $4217 = asm_d1145 + $4242 = Museum1FText_5c242 + $421F = Museum1FText_5c21f + $4229 = Museum1FText_5c229 + $41DA = Museum1FText1.asm_de133 + $4224 = Museum1FText_5c224 + $421A = Museum1FText_5c21a + $422E = Museum1FText_5c22e + $4233 = Museum1FText_5c233 + $4238 = Museum1FText_5c238 + $4251 = Museum1FText_5c251 + $428E = Museum1FText_5c28e + $4293 = ReceivedOldAmberText + $429E = Museum1FText_5c29e + $4299 = Museum1FText_5c299 + $42AD = Museum1FText_5c2ad + $42BC = Museum1FText_5c2bc + $4048 = Museum2FBlocks + $431A = Museum2FTextPointers + $4317 = Museum2FScript + $434B = Museum2FObject + $4328 = Museum2FText1 + $432D = Museum2FText2 + $4332 = Museum2FText3 + $4337 = Museum2FText4 + $433C = Museum2FText5 + $4341 = Museum2FText6 + $4346 = Museum2FText7 + $4558 = PewterGymBlocks + $4435 = PewterGymTextPointers + $4387 = PewterGymScript + $452E = PewterGymObject + $43A4 = PewterGymScript_5c3a4 + $4441 = PewterGymTrainerHeaders + $43CA = PewterGymScriptPointers + $43AD = Gym1CityName + $43B9 = Gym1LeaderName + $43D2 = PewterGymScript3 + $43BF = PewterGymScript_5c3bf + $444E = PewterGymText1 + $44C6 = PewterGymText2 + $44DF = PewterGymText3 + $44A8 = PewterGymText4 + $44AD = PewterGymText5 + $44B7 = PewterGymText6 + $44D0 = PewterGymBattleText1 + $44DA = PewterGymAfterBattleText1 + $44D5 = PewterGymEndBattleText1 + $43DF = PewterGymScript_5c3df + $44A3 = PewterGymText_5c4a3 + $449E = PewterGymText_5c49e + $44BC = PewterGymText_5c4bc + $4441 = PewterGymTrainerHeader0 + $4515 = PewterGymText_5c515 + $451A = PewterGymText_5c51a + $4524 = PewterGymText_5c524 + $451F = PewterGymText_5c51f + $4529 = PewterGymText_5c529 + $4064 = PewterPokecenterBlocks + $458D = PewterPokecenterTextPointers + $4587 = PewterPokecenterScript + $460D = PewterPokecenterObject + $4595 = PewterPokecenterText1 + $4596 = PewterPokecenterText2 + $459B = PewterPokecenterText3 + $460C = PewterPokecenterText4 + $4603 = PewterPokecenterText5 + $4608 = Unknown_5c608 + $468B = CeruleanPokecenterBlocks + $464B = CeruleanPokecenterTextPointers + $4645 = CeruleanPokecenterScript + $465F = CeruleanPokecenterObject + $4654 = CeruleanPokecenterText1 + $4655 = CeruleanPokecenterText2 + $465A = CeruleanPokecenterText3 + $4653 = CeruleanPokecenterText4 + $4866 = CeruleanGymBlocks + $474A = CeruleanGymTextPointers + $46B3 = CeruleanGymScript + $4834 = CeruleanGymObject + $46D0 = CeruleanGymScript_5c6d0 + $4758 = CeruleanGymTrainerHeaders + $46F8 = CeruleanGymScriptPointers + $46D9 = Gym2CityName + $46E7 = Gym2LeaderName + $4700 = CeruleanGymScript3 + $46ED = CeruleanGymScript_5c6ed + $4771 = CeruleanGymText1 + $47DF = CeruleanGymText2 + $47F8 = CeruleanGymText3 + $4811 = CeruleanGymText4 + $47C8 = CeruleanGymText5 + $47CD = CeruleanGymText6 + $47D3 = CeruleanGymText7 + $47E9 = CeruleanGymBattleText1 + $47F3 = CeruleanGymAfterBattleText1 + $47EE = CeruleanGymEndBattleText1 + $4802 = CeruleanGymBattleText2 + $480C = CeruleanGymAfterBattleText2 + $4807 = CeruleanGymEndBattleText2 + $470D = CeruleanGymScript_5c70d + $47C3 = CeruleanGymText_5c7c3 + $47BE = CeruleanGymText_5c7be + $47D8 = CeruleanGymText_5c7d8 + $4758 = CeruleanGymTrainerHeader0 + $4764 = CeruleanGymTrainerHeader1 + $482A = CeruleanGymText_5c82a + $482F = CeruleanGymText_5c82f + $4000 = CeruleanMartBlocks + $4898 = CeruleanMartTextPointers + $4895 = CeruleanMartScript + $48A8 = CeruleanMartObject + $489E = CeruleanMartText2 + $48A3 = CeruleanMartText3 + $4064 = LavenderPokecenterBlocks + $48E0 = LavenderPokecenterTextPointers + $48DA = LavenderPokecenterScript + $48F4 = LavenderPokecenterObject + $48E9 = LavenderPokecenterText1 + $48EA = LavenderPokecenterText2 + $48EF = LavenderPokecenterText3 + $48E8 = LavenderPokecenterText4 + $4000 = LavenderMartBlocks + $492F = LavenderMartTextPointers + $492C = LavenderMartScript + $495D = LavenderMartObject + $4935 = LavenderMartText2 + $493A = LavenderMartText3 + $4953 = LavenderMart_5c953 + $4958 = LavenderMart_5c958 + $4064 = VermilionPokecenterBlocks + $4995 = VermilionPokecenterTextPointers + $498F = VermilionPokecenterScript + $49A9 = VermilionPokecenterObject + $499D = VermilionPokecenterText1 + $499E = VermilionPokecenterText2 + $49A3 = VermilionPokecenterText3 + $49A8 = VermilionPokecenterText4 + $4000 = VermilionMartBlocks + $49E4 = VermilionMartTextPointers + $49E1 = VermilionMartScript + $49F4 = VermilionMartObject + $49EA = VermilionMartText2 + $49EF = VermilionMartText3 + $4C38 = VermilionGymBlocks + $4AE8 = VermilionGymTextPointers + $4A26 = VermilionGymScript + $4BFE = VermilionGymObject + $4A4C = VermilionGymScript_5ca4c + $4A6D = VermilionGymScript_5ca6d + $4AF8 = VermilionGymTrainerHeader0 + $4A95 = VermilionGymScriptPointers + $4A55 = Gym3CityName + $4A64 = Gym3LeaderName + $4A9D = VermilionGymScript3 + $4A8A = VermilionGymScript_5ca8a + $4B1D = VermilionGymText1 + $4B90 = VermilionGymText2 + $4BA9 = VermilionGymText3 + $4BC2 = VermilionGymText4 + $4BDB = VermilionGymText5 + $4B77 = VermilionGymText6 + $4B7C = VermilionGymText7 + $4B86 = VermilionGymText8 + $4B9A = VermilionGymBattleText1 + $4BA4 = VermilionGymAfterBattleText1 + $4B9F = VermilionGymEndBattleText1 + $4BB3 = VermilionGymBattleText2 + $4BBD = VermilionGymAfterBattleText2 + $4BB8 = VermilionGymEndBattleText2 + $4BCC = VermilionGymBattleText3 + $4BD6 = VermilionGymAfterBattleText3 + $4BD1 = VermilionGymEndBattleText3 + $4AAA = VermilionGymScript_5caaa + $4B72 = VermilionGymText_5cb72 + $4B6D = VermilionGymText_5cb6d + $4B8B = ReceivedThunderbadgeText + $4B04 = VermilionGymTrainerHeader1 + $4B10 = VermilionGymTrainerHeader2 + $4BF4 = VermilionGymText_5cbf4 + $4BF9 = VermilionGymText_5cbf9 + $4010 = CopycatsHouse2FBlocks + $4C74 = CopycatsHouse2FTextPointers + $4C71 = CopycatsHouse2FScript + $4D21 = CopycatsHouse2FObject + $4C82 = CopycatsHouse2FText1 + $4CF4 = CopycatsHouse2FText2 + $4CF9 = CopycatsHouse2FText3 + $4CF9 = CopycatsHouse2FText4 + $4CF9 = CopycatsHouse2FText5 + $4CFE = CopycatsHouse2FText6 + $4D03 = CopycatsHouse2FText7 + $4CD4 = CopycatsHouse2FText_5ccd4 + $4CD9 = TM31PreReceiveText + $4CDE = ReceivedTM31Text + $4CEE = TM31NoRoomText + $4CE9 = TM31ExplanationText2 + $4D1C = CopycatsHouse2FText_5cd1c + $4D17 = CopycatsHouse2FText_5cd17 + $4FE3 = FightingDojoBlocks + $4E03 = FightingDojoTextPointers + $4D5D = FightingDojoScript + $4F9B = FightingDojoObject + $4E13 = FightingDojoTrainerHeaders + $4D7B = FightingDojoScriptPointers + $4D83 = FightingDojoScript1 + $4DC6 = FightingDojoScript3 + $4D70 = FightingDojoScript_5cd70 + $4E44 = FightingDojoText1 + $4EA2 = FightingDojoText2 + $4EBB = FightingDojoText3 + $4ED4 = FightingDojoText4 + $4EED = FightingDojoText5 + $4F06 = FightingDojoText6 + $4F4E = FightingDojoText7 + $4E98 = FightingDojoText8 + $4EAC = FightingDojoBattleText1 + $4EB6 = FightingDojoAfterBattleText1 + $4EB1 = FightingDojoEndBattleText1 + $4EC5 = FightingDojoBattleText2 + $4ECF = FightingDojoAfterBattleText2 + $4ECA = FightingDojoEndBattleText2 + $4EDE = FightingDojoBattleText3 + $4EE8 = FightingDojoAfterBattleText3 + $4EE3 = FightingDojoEndBattleText3 + $4EF7 = FightingDojoBattleText4 + $4F01 = FightingDojoAfterBattleText4 + $4EFC = FightingDojoEndBattleText4 + $4E7D = FightingDojoText1.continue1 + $4E85 = FightingDojoText1.continue2 + $4E8E = FightingDojoText_5ce8e + $4E93 = FightingDojoText_5ce93 + $4E9D = FightingDojoText_5ce9d + $4E13 = FightingDojoTrainerHeader0 + $4E1F = FightingDojoTrainerHeader1 + $4E2B = FightingDojoTrainerHeader2 + $4E37 = FightingDojoTrainerHeader3 + $4F96 = OtherHitmonText + $4F49 = WantHitmonleeText + $4F91 = WantHitmonchanText + $53A3 = SaffronGymBlocks + $50AB = SaffronGymTextPointers + $500D = SaffronGymScript + $5259 = SaffronGymObject + $502A = SaffronGymScript.extra + $50C3 = SaffronGymTrainerHeader0 + $5053 = SaffronGymScriptPointers + $5033 = Gym6CityName + $5040 = Gym6LeaderName + $505B = SaffronGymScript3 + $5048 = SaffronGymText_5d048 + $5118 = SaffronGymText1 + $5187 = SaffronGymText2 + $5191 = SaffronGymText3 + $519B = SaffronGymText4 + $51A5 = SaffronGymText5 + $51AF = SaffronGymText6 + $51B9 = SaffronGymText7 + $51C3 = SaffronGymText8 + $51CD = SaffronGymText9 + $5173 = SaffronGymText10 + $5178 = SaffronGymText11 + $5182 = SaffronGymText12 + $51F0 = SaffronGymBattleText1 + $51FA = SaffronGymAfterBattleText1 + $51F5 = SaffronGymEndBattleText1 + $51FF = SaffronGymBattleText2 + $5209 = SaffronGymAfterBattleText2 + $5204 = SaffronGymEndBattleText2 + $520E = SaffronGymBattleText3 + $5218 = SaffronGymAfterBattleText3 + $5213 = SaffronGymEndBattleText3 + $521D = SaffronGymBattleText4 + $5227 = SaffronGymAfterBattleText4 + $5222 = SaffronGymEndBattleText4 + $522C = SaffronGymBattleText5 + $5236 = SaffronGymAfterBattleText5 + $5231 = SaffronGymEndBattleText5 + $523B = SaffronGymBattleText6 + $5245 = SaffronGymAfterBattleText6 + $5240 = SaffronGymEndBattleText6 + $524A = SaffronGymBattleText7 + $5254 = SaffronGymAfterBattleText7 + $524F = SaffronGymEndBattleText7 + $5068 = SaffronGymText_5d068 + $516E = SaffronGymText_5d16e + $5162 = SaffronGymText_5d162 + $5167 = SaffronGymText_5d167 + $50CF = SaffronGymTrainerHeader1 + $50DB = SaffronGymTrainerHeader2 + $50E7 = SaffronGymTrainerHeader3 + $50F3 = SaffronGymTrainerHeader4 + $50FF = SaffronGymTrainerHeader5 + $510B = SaffronGymTrainerHeader6 + $51E6 = SaffronGymText_5d1e6 + $51EB = SaffronGymText_5d1eb + $4000 = SaffronMartBlocks + $540C = SaffronMartTextPointers + $5409 = SaffronMartScript + $541C = SaffronMartObject + $5412 = SaffronMartText2 + $5417 = SaffronMartText3 + $54A2 = SilphCo1Blocks + $5469 = SilphCo1TextPointers + $544E = SilphCo1Script + $5470 = SilphCo1Object + $546B = SilphCo1Text1 + $4064 = SaffronPokecenterBlocks + $553B = SaffronPokecenterTextPointers + $5535 = SaffronPokecenterScript + $554F = SaffronPokecenterObject + $5543 = SaffronPokecenterText1 + $5544 = SaffronPokecenterText2 + $5549 = SaffronPokecenterText3 + $554E = SaffronPokecenterText4 + $4090 = ViridianForestExitBlocks + $558A = ViridianForestExitTextPointers + $5587 = ViridianForestExitScript + $5598 = ViridianForestExitObject + $558E = ViridianForestExitText1 + $5593 = ViridianForestExitText2 + $4090 = Route2GateBlocks + $55D7 = Route2GateTextPointers + $55D4 = Route2GateScript + $5620 = Route2GateObject + $55DB = Route2GateText1 + $561B = Route2GateText2 + $5616 = Route2GateText_5d616 + $4090 = ViridianForestEntranceBlocks + $565F = ViridianForestEntranceTextPointers + $565C = ViridianForestEntranceScript + $566D = ViridianForestEntranceObject + $5663 = ViridianForestEntranceText1 + $5668 = ViridianForestEntranceText2 + $4080 = UndergroundPathEntranceRoute5Blocks + $56B0 = UndergroundPathEntranceRoute5TextPointers + $56A9 = UndergroundPathEntranceRoute5Script + $56C1 = UndergroundPathEntranceRoute5Object + $56B2 = UndergroundPathEntranceRoute5Text1 + $56AF = UndergroundPathEntranceRoute5_5d6af + $4080 = UndergroundPathEntranceRoute6Blocks + $56F7 = UndergroundPathEntranceRoute6TextPointers + $56EF = UndergroundPathEntranceRoute6Script + $56FE = UndergroundPathEntranceRoute6Object + $56F9 = UndergroundPathEntranceRoute6Text1 + $4080 = UndergroundPathEntranceRoute7Blocks + $5734 = UndergroundPathEntranceRoute7TextPointers + $572C = UndergroundPathEntranceRoute7Script + $573B = UndergroundPathEntranceRoute7Object + $5736 = UndergroundPathEntranceRoute7Text1 + $4080 = UndergroundPathEntranceRoute7CopyBlocks + $576F = UndergroundPathEntranceRoute7CopyTextPointers + $5769 = UndergroundPathEntranceRoute7CopyScript + $5787 = UndergroundPathEntranceRoute7CopyObject + $5773 = UnnamedText_5d773 + $577D = UnnamedText_5d77d + $5989 = SilphCo9Blocks + $588B = SilphCo9TextPointers + $57BB = SilphCo9Script + $593F = SilphCo9Object + $57D1 = SilphCo9Script_5d7d1 + $5893 = SilphCo9TrainerHeaders + $5885 = SilphCo9ScriptPointers + $582E = DataTable_5d82e + $5837 = SilphCo9Script_5d837 + $5863 = SilphCo9Script_5d863 + $58B8 = SilphCo9Text1 + $58F4 = SilphCo9Text2 + $58FE = SilphCo9Text3 + $5908 = SilphCo9Text4 + $5912 = SilphCo9BattleText1 + $591C = SilphCo9AfterBattleText1 + $5917 = SilphCo9EndBattleText1 + $5921 = SilphCo9BattleText2 + $592B = SilphCo9AfterBattleText2 + $5926 = SilphCo9EndBattleText2 + $5930 = SilphCo9BattleText3 + $593A = SilphCo9AfterBattleText3 + $5935 = SilphCo9EndBattleText3 + $58E5 = SilphCo9Text_5d8e5 + $58EA = SilphCo9Text_5d8ea + $58EF = SilphCo9Text_5d8ef + $5893 = SilphCo9TrainerHeader0 + $589F = SilphCo9TrainerHeader1 + $58AB = SilphCo9TrainerHeader2 + $5B04 = VictoryRoad1Blocks + $5A5F = VictoryRoad1TextPointers + $5A0A = VictoryRoad1Script + $5AB8 = VictoryRoad1Object + $5A27 = VictoryRoad1Script.next + $5A6D = VictoryRoad1TrainerHeaders + $5A3A = VictoryRoad1ScriptPointers + $5A40 = VictoryRoad1Script0 + $5A5C = CoordsData_5da5c + $5A86 = VictoryRoad1Text1 + $5A90 = VictoryRoad1Text2 + $5A9A = VictoryRoad1BattleText1 + $5AA4 = VictoryRoad1AfterBattleText1 + $5A9F = VictoryRoad1EndBattleText1 + $5AA9 = VictoryRoad1BattleText2 + $5AB3 = VictoryRoad1AfterBattleText2 + $5AAE = VictoryRoad1EndBattleText2 + $5A6D = VictoryRoad1TrainerHeader0 + $5A79 = VictoryRoad1TrainerHeader1 + $5BD9 = DisplayMonFrontSpriteInBox + $5C9E = LinkCableHelpText1 + $5CA8 = HowToLinkText + $5CA3 = LinkCableHelpText2 + $5CD8 = LinkCableInfoTexts + $5C51 = LinkCableHelp.asm_5c51 + $5CDE = LinkCableInfoText1 + $5CE3 = LinkCableInfoText2 + $5CE8 = LinkCableInfoText3 + $5DA2 = ViridianSchoolBlackboardText1 + $5DAC = StatusAilmentText1 + $5DBB = StatusAilmentText2 + $5DA7 = ViridianSchoolBlackboardText2 + $5DCC = ViridianBlackboardStatusPointers + $5D15 = ViridianSchoolBlackboard.asm_5dd15 + $5DD6 = ViridianBlackboardSleepText + $5DDB = ViridianBlackboardPoisonText + $5DE0 = ViridianBlackbaordPrlzText + $5DE5 = ViridianBlackboardBurnText + $5DEA = ViridianBlackboardFrozenText + $5E7D = GymTrashCans + SLACK: $20EB bytes + +Bank #24: + SECTION: $4000-$6529 ($252A bytes) + $5101 = ViridianForest_h + $5259 = SSAnne1_h + $5393 = SSAnne2_h + $5622 = SSAnne4_h + $56A2 = SSAnne5_h + $57A7 = SSAnne6_h + $5889 = SSAnne7_h + $596A = SSAnne8_h + $5B3F = SSAnne9_h + $5D49 = SSAnne10_h + $5F1A = UndergroundPathNS_h + $5F3E = UndergroundPathWE_h + $4F7A = CeladonMart1_h + $4420 = PokemonTower1_h + $44E6 = PokemonTower2_h + $46C0 = PokemonTower3_h + $47EA = PokemonTower4_h + $4926 = PokemonTower5_h + $4AE3 = PokemonTower6_h + $4CF9 = PokemonTower7_h + $5F62 = DiglettsCave_h + $60EE = SilphCo11_h + $6453 = GymStatueText1 + $6458 = GymStatueText2 + $6511 = BookcaseText + $64A3 = ViridianCityPokecenterBenchGuyText + $64A8 = PewterCityPokecenterBenchGuyText + $64AD = CeruleanCityPokecenterBenchGuyText + $64B2 = LavenderCityPokecenterBenchGuyText + $64D0 = VermilionCityPokecenterBenchGuyText + $64D5 = CeladonCityPokecenterBenchGuyText + $6502 = CeladonCityHotelText + $64DA = FuchsiaCityPokecenterBenchGuyText + $64DF = CinnabarIslandPokecenterBenchGuyText + $64E4 = SaffronCityPokecenterBenchGuyText + $64B7 = MtMoonPokecenterBenchGuyText + $64BC = RockTunnelPokecenterBenchGuyText + $64C1 = UnusedBenchGuyText1 + $64C6 = UnusedBenchGuyText2 + $64CB = UnusedBenchGuyText3 + $6508 = TerminatorText_62508 + $6529 = PredefText1f + $6509 = PrintBookcaseText + $645D = PrintBenchGuyText + $6516 = OpenPokemonCenterPC + $6419 = GymStatues + $448C = PokemonTower1Blocks + $442F = PokemonTower1TextPointers + $442C = PokemonTower1Script + $4452 = PokemonTower1Object + $4439 = PokemonTower1Text1 + $443E = PokemonTower1Text2 + $4443 = PokemonTower1Text3 + $4448 = PokemonTower1Text4 + $444D = PokemonTower1Text5 + $4666 = PokemonTower2Blocks + $45DB = PokemonTower2TextPointers + $44F2 = PokemonTower2Script + $4646 = PokemonTower2Object + $4509 = PokemonTower2ScriptPointers + $450F = PokemonTower2Script0 + $4563 = PokemonTower2Script1 + $45BB = PokemonTower2Script2 + $455E = CoordsData_6055e + $44FE = PokemonTower2Script_604fe + $45B2 = MovementData_605b2 + $45A9 = MovementData_605a9 + $45DF = PokemonTower2Text1 + $4641 = PokemonTower2Text2 + $463C = PokemonTower2Text_6063c + $462D = PokemonTower2Text_6062d + $4632 = PokemonTower2Text_60632 + $4637 = PokemonTower2Text_60637 + $4790 = PokemonTower3Blocks + $46E5 = PokemonTower3TextPointers + $46CC = PokemonTower3Script + $475D = PokemonTower3Object + $46ED = PokemonTower3TrainerHeaders + $46DF = PokemonTower3ScriptPointers + $4712 = PokemonTower3Text1 + $471C = PokemonTower3Text2 + $4726 = PokemonTower3Text3 + $4730 = PokemonTower3BattleText1 + $473A = PokemonTower3AfterBattleText1 + $4735 = PokemonTower3EndBattleText1 + $473F = PokemonTower3BattleText2 + $4749 = PokemonTower3AfterBattleText2 + $4744 = PokemonTower3EndBattleText2 + $474E = PokemonTower3BattleText3 + $4758 = PokemonTower3AfterBattleText3 + $4753 = PokemonTower3EndBattleText3 + $46ED = PokemonTower3TrainerHeader0 + $46F9 = PokemonTower3TrainerHeader1 + $4705 = PokemonTower3TrainerHeader2 + $48CC = PokemonTower4Blocks + $480F = PokemonTower4TextPointers + $47F6 = PokemonTower4Script + $488B = PokemonTower4Object + $481B = PokemonTower4TrainerHeaders + $4809 = PokemonTower4ScriptPointers + $4840 = PokemonTower4Text1 + $484A = PokemonTower4Text2 + $4854 = PokemonTower4Text3 + $485E = PokemonTower4BattleText1 + $4868 = PokemonTower4AfterBattleText1 + $4863 = PokemonTower4EndBattleText1 + $486D = PokemonTower4BattleText2 + $4877 = PokemonTower4AfterBattleText2 + $4872 = PokemonTower4EndBattleText2 + $487C = PokemonTower4BattleText3 + $4886 = PokemonTower4AfterBattleText3 + $4881 = PokemonTower4EndBattleText3 + $481B = PokemonTower4TrainerHeader0 + $4827 = PokemonTower4TrainerHeader1 + $4833 = PokemonTower4TrainerHeader2 + $4A89 = PokemonTower5Blocks + $499B = PokemonTower5TextPointers + $4932 = PokemonTower5Script + $4A48 = PokemonTower5Object + $49A9 = PokemonTower5TrainerHeaders + $4945 = PokemonTower5ScriptPointers + $494B = PokemonTower5Script0 + $4992 = CoordsData_60992 + $49DA = PokemonTower5Text1 + $49DF = PokemonTower5Text2 + $49F8 = PokemonTower5Text3 + $4A11 = PokemonTower5Text4 + $4A2A = PokemonTower5Text5 + $4A43 = PokemonTower5Text7 + $49E9 = PokemonTower5BattleText1 + $49F3 = PokemonTower5AfterBattleText1 + $49EE = PokemonTower5EndBattleText1 + $4A02 = PokemonTower5BattleText2 + $4A0C = PokemonTower5AfterBattleText2 + $4A07 = PokemonTower5EndBattleText2 + $4A1B = PokemonTower5BattleText3 + $4A25 = PokemonTower5AfterBattleText3 + $4A20 = PokemonTower5EndBattleText3 + $4A34 = PokemonTower5BattleText4 + $4A3E = PokemonTower5AfterBattleText4 + $4A39 = PokemonTower5EndBattleText4 + $49A9 = PokemonTower5TrainerHeader0 + $49B5 = PokemonTower5TrainerHeader1 + $49C1 = PokemonTower5TrainerHeader2 + $49CD = PokemonTower5TrainerHeader3 + $4C95 = PokemonTower6Blocks + $4BB1 = PokemonTower6TextPointers + $4AEF = PokemonTower6Script + $4C5B = PokemonTower6Object + $4BBF = PokemonTower6TrainerHeaders + $4B0D = PokemonTower6ScriptPointers + $4B17 = PokemonTower6Script0 + $4BA1 = PokemonTower6Script3 + $4B48 = PokemonTower6Script4 + $4B45 = CoordsData_60b45 + $4B02 = PokemonTower6Script_60b02 + $4BE4 = PokemonTower6Text1 + $4BEE = PokemonTower6Text2 + $4BF8 = PokemonTower6Text3 + $4C56 = PokemonTower6Text6 + $4C02 = PokemonTower6Text7 + $4C29 = PokemonTower6BattleText1 + $4C33 = PokemonTower6AfterBattleText1 + $4C2E = PokemonTower6EndBattleText1 + $4C38 = PokemonTower6BattleText2 + $4C42 = PokemonTower6AfterBattleText2 + $4C3D = PokemonTower6EndBattleText2 + $4C47 = PokemonTower6BattleText3 + $4C51 = PokemonTower6AfterBattleText3 + $4C4C = PokemonTower6EndBattleText3 + $4BBF = PokemonTower6TrainerHeader0 + $4BCB = PokemonTower6TrainerHeader1 + $4BD7 = PokemonTower6TrainerHeader2 + $4C1F = PokemonTower2Text_60c1f + $4C24 = PokemonTower2Text_60c24 + $4F20 = PokemonTower7Blocks + $4E3F = PokemonTower7TextPointers + $4D05 = PokemonTower7Script + $4EF6 = PokemonTower7Object + $4E47 = PokemonTower7TrainerHeaders + $4D23 = PokemonTower7ScriptPointers + $4D2D = PokemonTower7Script2 + $4D56 = PokemonTower7Script3 + $4D86 = PokemonTower7Script4 + $4D18 = PokemonTower7Script_60d18 + $4DB6 = PokemonTower7Script_60db6 + $4DE3 = CoordsData_60de3 + $4E13 = MovementData_60e13 + $4E1B = MovementData_60e1b + $4E22 = MovementData_60e22 + $4E28 = MovementData_60e28 + $4E30 = MovementData_60e30 + $4E37 = MovementData_60e37 + $4E6C = PokemonTower7Text1 + $4E76 = PokemonTower7Text2 + $4E80 = PokemonTower7Text3 + $4E8A = PokemonTower7Text4 + $4EC9 = PokemonTower7BattleText1 + $4ED3 = PokemonTower7AfterBattleText1 + $4ECE = PokemonTower7EndBattleText1 + $4ED8 = PokemonTower7BattleText2 + $4EE2 = PokemonTower7AfterBattleText2 + $4EDD = PokemonTower7EndBattleText2 + $4EE7 = PokemonTower7BattleText3 + $4EF1 = PokemonTower7AfterBattleText3 + $4EEC = PokemonTower7EndBattleText3 + $4E47 = PokemonTower7TrainerHeader0 + $4E53 = PokemonTower7TrainerHeader1 + $4E5F = PokemonTower7TrainerHeader2 + $4EC4 = PokemonTower7Text_60ec4 + $4FDE = CeladonMart1Blocks + $4F89 = CeladonMart1TextPointers + $4F86 = CeladonMart1Script + $4F9E = CeladonMart1Object + $4F8F = CeladonMart1Text1 + $4F94 = CeladonMart1Text2 + $4F99 = CeladonMart1Text3 + $50C2 = Func_610c2 + $50EB = LoadFossilItemAndMonName + $50AE = LabFossil_610ae + $50B3 = LabFossil_610b3 + $50B8 = LabFossil_610b8 + $50BD = LabFossil_610bd + $4000 = ViridianForestBlocks + $5126 = ViridianForestTextPointers + $510D = ViridianForestScript + $51DA = ViridianForestObject + $5142 = ViridianForestTrainerHeaders + $5120 = ViridianForestScriptPointers + $5167 = ViridianForestText1 + $516C = ViridianForestText2 + $5176 = ViridianForestText3 + $5180 = ViridianForestText4 + $51B7 = ViridianForestText8 + $51BC = ViridianForestText9 + $51C1 = ViridianForestText10 + $51C6 = ViridianForestText11 + $51CB = ViridianForestText12 + $51D0 = ViridianForestText13 + $51D5 = ViridianForestText14 + $518A = ViridianForestBattleText1 + $5194 = ViridianForestAfterBattleText1 + $518F = ViridianForestEndBattleText1 + $5199 = ViridianForestBattleText2 + $51A3 = ViridianForestAfterBattleText2 + $519E = ViridianForestEndBattleText2 + $51A8 = ViridianForestBattleText3 + $51B2 = ViridianForestAfterBattleText3 + $51AD = ViridianForestEndBattleText3 + $5142 = ViridianForestTrainerHeader0 + $514E = ViridianForestTrainerHeader1 + $515A = ViridianForestTrainerHeader2 + $52DF = SSAnne1Blocks + $5269 = SSAnne1TextPointers + $5265 = SSAnne1Script + $5277 = SSAnne1Object + $526D = SSAnne1Text1 + $5272 = SSAnne1Text2 + $556E = SSAnne2Blocks + $54DB = SSAnne2TextPointers + $539F = SSAnne2Script + $5514 = SSAnne2Object + $53B3 = SSAnne2ScriptPointers + $53BE = SSAnne2Script0 + $5430 = SSAnne2Script1 + $546D = SSAnne2Script2 + $54BE = SSAnne2Script3 + $53BD = SSAnne2Script4 + $5411 = CoordsData_61411 + $540C = MovementData_6140c + $540D = MovementData_6140d + $5416 = SSAnne2Script_61416 + $53AB = SSAnne2Script_613ab + $54B9 = MovementData_614b9 + $54B7 = MovementData_614b7 + $54E1 = SSAnne2Text1 + $54E6 = SSAnne2Text2 + $550F = SSAnne2Text3 + $5500 = SSAnneRivalBeforeBattleText + $5505 = SSAnneRivalDefeatedText + $550A = SSAnneRivalWonText + $5666 = SSAnne4Blocks + $5631 = SSAnne4TextPointers + $562E = SSAnne4Script + $5632 = SSAnne4Object + $5761 = SSAnne5Blocks + $56C7 = SSAnne5TextPointers + $56AE = SSAnne5Script + $572B = SSAnne5Object + $56D1 = SSAnne5TrainerHeader0 + $56C1 = SSAnne5ScriptPointers + $56EA = SSAnne5Text1 + $56EF = SSAnne5Text2 + $56F4 = SSAnne5Text3 + $56F9 = SSAnne5Text4 + $5712 = SSAnne5Text5 + $5703 = SSAnne5BattleText1 + $570D = SSAnne5AfterBattleText1 + $5708 = SSAnne5EndBattleText1 + $571C = SSAnne5BattleText2 + $5726 = SSAnne5AfterBattleText2 + $5721 = SSAnne5EndBattleText2 + $56DD = SSAnne5TrainerHeader1 + $5851 = SSAnne6Blocks + $57B7 = SSAnne6TextPointers + $57B3 = SSAnne6Script + $581B = SSAnne6Object + $57C5 = SSAnne6Text1 + $57CA = SSAnne6Text2 + $57CF = SSAnne6Text3 + $57D4 = SSAnne6Text4 + $57D9 = SSAnne6Text5 + $57DE = SSAnne6Text6 + $57E3 = SSAnne6Text7 + $5807 = SSAnne6Text_61807 + $580C = SSAnne6Text_6180c + $5811 = SSAnne6Text_61811 + $5816 = SSAnne6Text_61816 + $595E = SSAnne7Blocks + $58A7 = SSAnne7TextPointers + $5895 = SSAnne7Script + $5946 = SSAnne7Object + $589B = SSAnne7Script_6189b + $58AD = SSAnne7Text1 + $593C = SSAnne7Text2 + $5941 = SSAnne7Text3 + $58EC = SSAnne7RubText + $5927 = ReceivingHM01Text + $592C = ReceivedHM01Text + $5937 = HM01NoRoomText + $5932 = SSAnne7Text_61932 + $5ADF = SSAnne8Blocks + $598F = SSAnne8TextPointers + $5976 = SSAnne8Script + $5A60 = SSAnne8Object + $59A5 = SSAnne8TrainerHeaders + $5989 = SSAnne8ScriptPointers + $59D6 = SSAnne8Text1 + $59E0 = SSAnne8Text2 + $59EA = SSAnne8Text3 + $59F4 = SSAnne8Text4 + $5A47 = SSAnne8Text5 + $5A4C = SSAnne8Text6 + $5A51 = SSAnne8Text7 + $59FE = SSAnne8Text8 + $5A56 = SSAnne8Text9 + $5A5B = SSAnne8Text11 + $5A0B = SSAnne8BattleText1 + $5A15 = SSAnne8AfterBattleText1 + $5A10 = SSAnne8EndBattleText1 + $5A1A = SSAnne8BattleText2 + $5A24 = SSAnne8AfterBattleText2 + $5A1F = SSAnne8EndBattleText2 + $5A29 = SSAnne8BattleText3 + $5A33 = SSAnne8AfterBattleText3 + $5A2E = SSAnne8EndBattleText3 + $5A38 = SSAnne8BattleText4 + $5A42 = SSAnne8AfterBattleText4 + $5A3D = SSAnne8EndBattleText4 + $59A5 = SSAnne8TrainerHeader0 + $59B1 = SSAnne8TrainerHeader1 + $59BD = SSAnne8TrainerHeader2 + $59C9 = SSAnne8TrainerHeader3 + $43C0 = SSAnne9Blocks + $5B6A = SSAnne9TextPointers + $5B4B = SSAnne9Script + $5C8D = SSAnne9Object + $5B84 = SSAnne9TrainerHeaders + $5B64 = SSAnne9ScriptPointers + $5BB5 = SSAnne9Text1 + $5BBF = SSAnne9Text2 + $5BC9 = SSAnne9Text3 + $5BD3 = SSAnne9Text4 + $5BDD = SSAnne9Text5 + $5BF7 = SSAnne9Text7 + $5C06 = SSAnne9Text8 + $5C15 = SSAnne9Text10 + $5C24 = SSAnne9Text11 + $5C33 = SSAnne9Text12 + $5C42 = SSAnne9Text13 + $5C51 = SSAnne9BattleText1 + $5C5B = SSAnne9AfterBattleText1 + $5C56 = SSAnne9EndBattleText1 + $5C60 = SSAnne9BattleText2 + $5C6A = SSAnne9AfterBattleText2 + $5C65 = SSAnne9EndBattleText2 + $5C6F = SSAnne9BattleText3 + $5C79 = SSAnne9AfterBattleText3 + $5C74 = SSAnne9EndBattleText3 + $5C7E = SSAnne9BattleText4 + $5C88 = SSAnne9AfterBattleText4 + $5C83 = SSAnne9EndBattleText4 + $5B84 = SSAnne9TrainerHeader0 + $5B90 = SSAnne9TrainerHeader1 + $5B9C = SSAnne9TrainerHeader2 + $5BA8 = SSAnne9TrainerHeader3 + $5BF2 = SSAnne9Text_61bf2 + $5C01 = SSAnne9Text_61c01 + $5C10 = SSAnne9Text_61c10 + $5C1F = SSAnne9Text_61c1f + $5C2E = SSAnne9Text_61c2e + $5C3D = SSAnne9Text_61c3d + $5C4C = SSAnne9Text_61c4c + $43C0 = SSAnne10Blocks + $5D6E = SSAnne10TextPointers + $5D55 = SSAnne10Script + $5E75 = SSAnne10Object + $5D84 = SSAnne10TrainerHeaders + $5D68 = SSAnne10ScriptPointers + $5DCD = SSAnne10Text1 + $5DD7 = SSAnne10Text2 + $5DE1 = SSAnne10Text3 + $5DEB = SSAnne10Text4 + $5DF5 = SSAnne10Text5 + $5DFF = SSAnne10Text6 + $5E70 = SSAnne10Text7 + $5E09 = SSAnne10Text8 + $5E16 = SSAnne10BattleText1 + $5E20 = SSAnne10AfterBattleText1 + $5E1B = SSAnne10EndBattleText1 + $5E25 = SSAnne10BattleText2 + $5E2F = SSAnne10AfterBattleText2 + $5E2A = SSAnne10EndBattleText2 + $5E34 = SSAnne10BattleText3 + $5E3E = SSAnne10AfterBattleText3 + $5E39 = SSAnne10EndBattleText3 + $5E43 = SSAnne10BattleText4 + $5E4D = SSAnne10AfterBattleText4 + $5E48 = SSAnne10EndBattleText4 + $5E52 = SSAnne10BattleText5 + $5E5C = SSAnne10AfterBattleText5 + $5E57 = SSAnne10EndBattleText5 + $5E61 = SSAnne10BattleText6 + $5E6B = SSAnne10AfterBattleText6 + $5E66 = SSAnne10EndBattleText6 + $5D84 = SSAnne10TrainerHeader0 + $5D90 = SSAnne10TrainerHeader1 + $5D9C = SSAnne10TrainerHeader2 + $5DA8 = SSAnne10TrainerHeader3 + $5DB4 = SSAnne10TrainerHeader4 + $5DC0 = SSAnne10TrainerHeader5 + $4198 = UndergroundPathNSBlocks + $5F29 = UndergroundPathNSTextPointers + $5F26 = UndergroundPathNSScript + $5F2A = UndergroundPathNSObject + $41F4 = UndergroundPathWEBlocks + $5F4D = UndergroundPathWETextPointers + $5F4A = UndergroundPathWEScript + $5F4E = UndergroundPathWEObject + $5F86 = DiglettsCaveBlocks + $5F71 = DiglettsCaveTextPointers + $5F6E = DiglettsCaveScript + $5F72 = DiglettsCaveObject + $63C8 = SilphCo11Blocks + $62B7 = SilphCo11TextPointers + $60FA = SilphCo11Script + $6380 = SilphCo11Object + $6110 = SilphCo11Script_62110 + $62C3 = SilphCo11TrainerHeaders + $61CF = SilphCo11ScriptPointers + $6134 = DataTable_62134 + $6137 = SilphCo11Script_62137 + $6163 = SilphCo11Script_62163 + $619B = MissableObjectIDs_6219b + $6194 = MissableObjectIDs_62194 + $61DB = SilphCo11Script0 + $626A = SilphCo11Script3 + $6293 = SilphCo11Script4 + $6227 = SilphCo11Script5 + $6211 = CoordsData_62211 + $6216 = MovementData_62216 + $61C8 = SilphCo11Script_621c8 + $61C4 = SilphCo11Script_621c4 + $621A = SilphCo11Script_6221a + $616D = SilphCo11Script_6216d + $6330 = SilphCo10Text_62330 + $62DC = SilphCo11Text1 + $6326 = SilphCo11Text2 + $632B = SilphCo11Text3 + $633A = SilphCo11Text4 + $6353 = SilphCo11Text5 + $6335 = SilphCo11Text6 + $6344 = SilphCo11BattleText1 + $634E = SilphCo11AfterBattleText1 + $6349 = SilphCo11EndBattleText1 + $635D = SilphCo11BattleText2 + $6367 = SilphCo11AfterBattleText2 + $6362 = SilphCo11EndBattleText2 + $6308 = SilphCo11Text1.asm_62308 + $6311 = SilphCoPresidentText + $6316 = ReceivedSilphCoMasterBallText + $6321 = SilphCoMasterBallNoRoomText + $631C = SilphCo10Text_6231c + $62C3 = SilphCo11TrainerHeader0 + $62CF = SilphCo11TrainerHeader1 + $637B = SilphCo10Text_6237b + $6442 = GymStatues.BadgeFlags + $647E = PokeCenterMapIDList + $64FD = SaffronCityPokecenterBenchGuyText2 + $64F8 = SaffronCityPokecenterBenchGuyText1 + $5006 = GiveFossilToCinnabarLab + SLACK: $1AD6 bytes + +Bank #25: + SECTION: $4000-$7FFF ($4000 bytes) + $4000 = Overworld_GFX + $45E0 = Overworld_Block + $4DE0 = RedsHouse1_GFX + $5270 = RedsHouse1_Block + $4DE0 = RedsHouse2_GFX + $5270 = RedsHouse2_Block + $53A0 = House_GFX + $5980 = House_Block + $6610 = ShipPort_GFX + $6BF0 = ShipPort_Block + $6D60 = Interior_GFX + $7350 = Interior_Block + $5BB0 = Mansion_GFX + $6190 = Mansion_Block + $76F0 = Plateau_GFX + $7B50 = Plateau_Block + SLACK: $0000 bytes + +Bank #26: + SECTION: $4000-$7FFF ($4000 bytes) + $402F = Version_GFX + $4DBF = Mart_GFX + $53BF = Mart_Block + $63FF = Forest_GFX + $69FF = Forest_Block + $407F = Dojo_GFX + $467F = Dojo_Block + $4DBF = Pokecenter_GFX + $53BF = Pokecenter_Block + $407F = Gym_GFX + $467F = Gym_Block + $560F = ForestGate_GFX + $5BFF = ForestGate_Block + $560F = Museum_GFX + $5BFF = Museum_Block + $560F = Gate_GFX + $5BFF = Gate_Block + $71FF = Facility_GFX + $77FF = Facility_Block + $4000 = DecrementPP + $4026 = DecrementPP.DecrementPP + SLACK: $0000 bytes + +Bank #27: + SECTION: $4000-$7FFF ($4000 bytes) + $7670 = Club_GFX + $7D60 = Underground_GFX + $7EF0 = Underground_Block + $6390 = Ship_GFX + $6930 = Ship_Block + $4000 = Cemetery_GFX + $45C0 = Cemetery_Block + $4CA0 = Cavern_GFX + $50C0 = Cavern_Block + $58C0 = Lobby_GFX + $5EA0 = Lobby_Block + $6D10 = Lab_GFX + $72D0 = Lab_Block + $7B20 = Club_Block + SLACK: $0000 bytes + +Bank #28: + SECTION: $4000-$7C80 ($3C81 bytes) + $48D1 = _HandleMidJump + $452B = Func_70510 + $47A2 = Func_70787 + $45D5 = _LeaveMapAnim + $4FE3 = LoadTownMap_Fly + $5719 = Func_716c6 + $5752 = AnimatePartyMon + $57BF = Func_7176c + $574A = AnimatePartyMon_ForceSpeed1 + $58D5 = Func_71882 + $444E = AnimateHealingMachine + $792C = SaveSAVtoSRAM + $4E91 = DisplayTownMap + $47D1 = Func_707b6 + $57E4 = Func_71791 + $6029 = SendBlkPacket_PartyMenu + $58BB = Func_71868 + $7C4E = Func_73b6a + $4044 = AnimateShootingStar + $7870 = SaveSAVtoSRAM0 + $49C0 = BattleTransition + $4BB0 = FlashScreen + $77EE = SaveSAV + $609E = LoadSGB + $5E32 = Func_71ddf + $4FB3 = LoadTownMap_Nest + $78F3 = SaveSAVtoSRAM2 + $77A1 = LoadSAVCheckSum2 + $76CC = LoadSAV + $78C6 = SaveSAVtoSRAM1 + $5B2C = Predef54 + $491D = Func_708ca + $4190 = FallingStar + $4140 = GameFreakLogoOAMData + $4180 = GameFreakShootingStarOAMData + $4000 = LoadShootingStarGraphics + $40EE = OAMData_700ee + $40F2 = PointerTable_700f2 + $411F = Func_7011f + $40FE = OAMData_700fe + $4106 = OAMData_70106 + $410E = OAMData_7010e + $4116 = OAMData_70116 + $411E = OAMData_7011e + $443E = Func_70423 + $4278 = Func_70278 + $42E1 = Func_702e1 + $426B = HallOfFameText + $7BF1 = SaveHallOfFameTeams + $4392 = Func_70377 + $433E = Func_7033e + $4388 = Func_7036d + $42D5 = Func_70278.asm_702d5 + $42F0 = Func_702f0 + $441F = Func_70404 + $4329 = HoFMonInfoText + $4405 = HoFPlayTimeText + $440F = HoFMoneyText + $4415 = DexSeenOwnedText + $43FD = Func_703e2 + $441A = DexRatingText + $44D2 = PokeCenterFlashingMonitorAndHealBall + $44F2 = PokeCenterOAMData + $451E = Func_70503 + $450E = Func_704f3 + $470A = Func_706ef + $45C5 = Func_705aa + $474B = Func_70730 + $478D = Func_70772 + $46F2 = Func_706d7 + $45AD = FlyAnimationEnterScreenCoords + $46C9 = Func_706ae + $479A = Func_7077f + $4770 = Func_70755 + $4698 = Func_7067d + $466A = FlyAnimationScreenCoords1 + $4682 = FlyAnimationScreenCoords2 + $472E = PlayerSpinningFacingOrder + $4732 = Func_70717 + $47C4 = DataTable_707a9 + $48B9 = LeafFishingTiles + $48A1 = RedFishingTiles + $57C4 = Func_71771 + $4891 = FishingRodGfxProperties + $4882 = NoNibbleText + $4887 = NothingHereText + $487D = Func_70842 + $488C = ItsABiteText + $490D = PlayerJumpingYScreenCoords + $497D = Func_7092a + $4AA0 = LoadBattleTransitionTile + $4A35 = GetBattleTransitionID_WildOrTrainer + $4A42 = GetBattleTransitionID_CompareLevels + $4A6C = GetBattleTransitionID_IsDungeonMap + $4A25 = BattleTransitions + $4D77 = BattleTransition_DoubleCircle + $4AC5 = BattleTransition_Spiral + $4D37 = BattleTransition_Circle + $4D07 = BattleTransition_HorizontalStripes + $4BD2 = BattleTransition_Shrink + $4CD1 = BattleTransition_VerticalStripes + $4C1D = BattleTransition_Split + $4A92 = DungeonMaps1 + $4A97 = DungeonMaps2 + $4AAC = BattleTransitionTile + $4AFD = BattleTransition_InwardSpiral + $4B4C = BattleTransition_OutwardSpiral_ + $4ABC = BattleTransition_BlackScreen + $4B33 = BattleTransition_InwardSpiral_ + $4D6C = BattleTransition_TransferDelay3 + $4BC5 = BattleTransition_FlashScreenPalettes + $4C65 = BattleTransition_CopyTiles1 + $4C92 = BattleTransition_CopyTiles2 + $4CFD = BattleTransition_VerticalStripes_ + $4D2B = BattleTransition_HorizontalStripes_ + $4D50 = BattleTransition_FlashScreen + $4DB4 = BattleTransition_HalfCircle1 + $4D59 = BattleTransition_Circle_Sub1 + $4DE6 = BattleTransition_HalfCircle2 + $4BB0 = BattleTransition_FlashScreen_ + $4DA3 = BattleTransition_Circle_Sub2 + $4E18 = BattleTransition_Circle_Sub3 + $4E51 = BattleTransition_CircleData1 + $4E57 = BattleTransition_CircleData2 + $4E61 = BattleTransition_CircleData3 + $4E73 = BattleTransition_CircleData4 + $4E81 = BattleTransition_CircleData5 + $50EE = LoadTownMap + $5217 = Func_711c4 + $4F93 = TownMapCursor + $4F64 = TownMapOrder + $5344 = Func_712f1 + $52AB = Func_71258 + $52CC = Func_71279 + $51FE = Func_711ab + $4ED1 = Func_70e7e + $5242 = Func_711ef + $4FDC = MonsNestText + $50E6 = TownMapUpArrow + $50C3 = Func_71070 + $50C0 = ToText + $5029 = LoadTownMap_Fly.townMapFlyLoop + $5711 = MonNestIcon + $5153 = CompressedMap + $52C0 = Func_7126d + $532C = Func_712d9 + $529D = AreaUnknownText + $53D5 = InternalMapEntries + $5366 = ExternalMapEntries + $54C6 = PalletTownName + $54D2 = ViridianCityName + $54E0 = PewterCityName + $54EC = CeruleanCityName + $54FA = LavenderTownName + $5508 = VermilionCityName + $5517 = CeladonCityName + $5524 = FuchsiaCityName + $5531 = CinnabarIslandName + $5541 = IndigoPlateauName + $5550 = SaffronCityName + $555D = Route1Name + $5565 = Route2Name + $556D = Route3Name + $5575 = Route4Name + $557D = Route5Name + $5585 = Route6Name + $558D = Route7Name + $5595 = Route8Name + $559D = Route9Name + $55A5 = Route10Name + $55AE = Route11Name + $55B7 = Route12Name + $55C0 = Route13Name + $55C9 = Route14Name + $55D2 = Route15Name + $55DB = Route16Name + $55E4 = Route17Name + $55ED = Route18Name + $55F6 = Route19Name + $5603 = Route20Name + $5610 = Route21Name + $561D = Route22Name + $5626 = Route23Name + $562F = Route24Name + $5638 = Route25Name + $5641 = ViridianForestName + $5651 = MountMoonName + $5659 = RockTunnelName + $5705 = PowerPlantName + $5665 = SeaCottageName + $5671 = SSAnneName + $56B2 = VictoryRoadName + $567A = PokemonLeagueName + $5686 = UndergroundPathName + $5697 = PokemonTowerName + $56EB = SafariZoneName + $56A2 = SeafoamIslandsName + $56E1 = PokemonMansionName + $56BF = DiglettsCaveName + $56CD = RocketHQName + $56D7 = SilphCoName + $56F7 = CeruleanCaveName + $57BC = PartyMonSpeeds + $5813 = MonPartySpritePointers + $59AC = MonPartySprites + $593C = GetPartyMonSpriteID + $5916 = Func_718c3 + $58FF = Func_718ac + $52F9 = Func_712a6 + $52D4 = Func_71281 + $5960 = MonPartyData + $5BCE = TradeMons + $5DB7 = InGameTradeTextPointers + $5BBD = Func_71b6a + $5BAB = Predef54.asm_99bca + $5C5A = Func_71c07 + $5DE0 = TradedForText + $5CF5 = Func_71ca2 + $5CF0 = Func_71c07.asm_c4bc2 + $5DDB = ConnectCableText + $5D14 = Func_71cc1 + $5D6C = Func_71d19 + $5D64 = Func_71d11 + $5DAC = String_71d59 + $5DA2 = Func_71d4f + $5DBD = TradeTextPointers1 + $5DC7 = TradeTextPointers2 + $5DD1 = TradeTextPointers3 + $5DE7 = WannaTrade1Text + $5DEC = NoTrade1Text + $5DF1 = WrongMon1Text + $5DF6 = Thanks1Text + $5DFB = AfterTrade1Text + $5E00 = WannaTrade2Text + $5E05 = NoTrade2Text + $5E0A = WrongMon2Text + $5E0F = Thanks2Text + $5E14 = AfterTrade2Text + $5E19 = WannaTrade3Text + $5E1E = NoTrade3Text + $5E23 = WrongMon3Text + $5E28 = Thanks3Text + $5E2D = AfterTrade3Text + $6035 = Func_71fc2 + $5FC6 = PointerTable_71f73 + $61C9 = Func_72156 + $64BB = PalPacket_Black + $6228 = BlkPacket_Battle + $649B = PalPacket_Empty + $5FFE = DeterminePaletteIDBack + $5FEA = DeterminePaletteID + $64CB = PalPacket_TownMap + $6211 = BlkPacket_WholeScreen + $5FF0 = DeterminePaletteIDOutOfBattle + $626D = BlkPacket_StatusScreen + $64AB = PalPacket_PartyMenu + $64DB = PalPacket_Pokedex + $6295 = BlkPacket_Pokedex + $64EB = PalPacket_Slots + $62C2 = BlkPacket_Slots + $64FB = PalPacket_Titlescreen + $6301 = BlkPacket_Titlescreen + $651B = PalPacket_Generic + $652B = PalPacket_NidorinoIntro + $6334 = BlkPacket_NidorinoIntro + $653B = PalPacket_GameFreakIntro + $6450 = BlkPacket_GameFreakIntro + $63D3 = BlkPacket_TrainerCard + $5FE2 = LoopCounts_71f8f + $650B = PalPacket_TrainerCard + $5E52 = SendPalPacket_Black + $5E59 = BuildBattlePalPacket + $5E9B = SendPalPacket_TownMap + $5EA2 = BuildStatusScreenPalPacket + $5ED5 = SendPalPacket_Pokedex + $5EF2 = SendPalPacket_Slots + $5EF9 = SendPalPacket_Titlescreen + $5F07 = SendPalPacket_NidorinoIntro + $5F00 = SendPalPacket_Generic + $5F1A = BuildOverworldPalPacket + $5ECE = SendPalPacket_PartyMenu + $5F6A = SendPokemonPalette_WholeScreen + $5F0E = SendPalPacket_GameFreakIntro + $5F8E = BuildTrainerCardPalPacket + $66D4 = TrainerPalletes + $663B = MonsterPalettes + $6367 = BlkPacket_PartyMenu + $61BD = Wait7000 + $610E = Func_7209b + $60E8 = Func_72075 + $657B = ChrTrnPacket + $70CC = SGBBorderGraphics + $617E = Func_7210b + $658B = PctTrnPacket + $686C = BorderPalettes + $654B = PalTrnPacket + $6704 = SuperPalettes + $65AB = MaskEnCancelPacket + $605E = SendSGBPacket + $60FC = PointerTable_72089 + $659B = MaskEnFreezePacket + $65BB = DataSnd_72548 + $65CB = DataSnd_72558 + $65DB = DataSnd_72568 + $65EB = DataSnd_72578 + $65FB = DataSnd_72588 + $660B = DataSnd_72598 + $661B = DataSnd_725a8 + $662B = DataSnd_725b8 + $656B = MltReq2Packet + $6175 = Func_72102 + $655B = MltReq1Packet + $61FB = Func_72188 + $61E0 = Func_7216d + $61FA = Func_72187 + $7707 = LoadSAVCheckSum + $7774 = LoadSAVCheckSum1 + $7702 = FileDataDestroyedText + $793A = SAVCheckSum + $7736 = LoadSAVCheckSum.Func_73652 + $77DB = SAVBadCheckSum + $77DC = SAVGoodChecksum + $7861 = WouldYouLikeToSaveText + $784C = SaveSAVConfirm + $7BB5 = SAVCheckRandomID + $786B = OlderFileWillBeErasedText + $783E = NowSavingString + $7866 = GameSavedText + $7979 = PointerTable_73895 + $79ED = WhenYouChangeBoxText + $7B0D = Func_73a29 + $7A23 = Func_7393f + $795F = Func_7387b + $79F2 = Func_7390e + $7947 = Func_73863 + $7AB8 = ChooseABoxText + $7ABD = BoxNames + $7B05 = BoxNoText + $7B68 = Func_73a84 + $7B2F = Func_73a4b + $7B63 = Func_73a7f + $7B9C = Func_73ab8 + $7C35 = HallOfFame_Copy + $7C73 = PadSRAM_FF + $41A0 = AnimateHallOfFame + $7C23 = LoadHallOfFameTeams + $7985 = Func_738a1 + SLACK: $037F bytes + +Bank #29: + SECTION: $4000-$687A ($287B bytes) + $4897 = ViridianGym_h + $4CA1 = PewterMart_h + $5F11 = Gary_h + $500C = FuchsiaHouse1_h + $5057 = FuchsiaPokecenter_h + $50A9 = FuchsiaHouse2_h + $51C1 = SafariZoneEntrance_h + $5431 = FuchsiaGym_h + $56D7 = FuchsiaMeetingRoom_h + $573E = CinnabarGym_h + $5B80 = Lab1_h + $5C15 = Lab2_h + $5C7B = Lab3_h + $5D25 = Lab4_h + $5E20 = CinnabarPokecenter_h + $5E72 = CinnabarMart_h + $5EB7 = CopycatsHouse1F_h + $4D00 = UnknownDungeon1_h + $4DFD = CeruleanHouse2_h + $616F = Lorelei_h + $62CA = Bruno_h + $6421 = Agatha_h + $47DE = PrintStatusAilment + $4EE0 = VendingMachineMenu + $675B = FoundHiddenItemText + $6794 = HiddenItemBagFullText + $6847 = FoundHiddenCoinsText + $684D = DroppedHiddenCoinsText + $481F = HiddenItemNear + $657E = PKMNLeaguePC + $4872 = Func_74872 + $6799 = HiddenCoins + $6688 = HiddenItems + $405C = HallOfFamePC + $4171 = Func_74171 + $417B = Func_7417b + $418E = Credits + $4160 = DataTable_74160 + $4183 = FillMiddleOfScreenWithWhite + $4131 = CreditsMons + $4164 = Func_74164 + $4140 = Func_74140 + $4152 = Func_74152 + $4243 = CreditsOrder + $42C3 = CreditsTextPointers + $40BA = Func_740ba + $40CB = DisplayCreditsMon + $473E = TheEndGfx + $4229 = TheEndTextString + $4343 = CredVersion + $4356 = CredTajiri + $4366 = CredTaOota + $4375 = CredMorimoto + $4387 = CredWatanabe + $4399 = CredMasuda + $43A9 = CredNisino + $43B7 = CredSugimori + $43C5 = CredNishida + $43D5 = CredMiyamoto + $43E7 = CredKawaguchi + $43FA = CredIshihara + $440E = CredYamauchi + $4420 = CredZinnai + $4431 = CredHishida + $4442 = CredSakai + $4452 = CredYamaguchi + $4464 = CredYamamoto + $4477 = CredTaniguchi + $448B = CredNonomura + $449E = CredFuziwara + $44B1 = CredMatsusima + $44C2 = CredTomisawa + $44D4 = CredKawamoto + $44E6 = CredKakei + $44F6 = CredTsuchiya + $4507 = CredTaNakamura + $4517 = CredYuda + $4527 = CredMon + $452D = CredDirector + $4537 = CredProgrammers + $4544 = CredCharDesign + $4556 = CredMusic + $455D = CredSoundEffects + $456C = CredGameDesign + $4579 = CredMonsterDesign + $4589 = CredGameScene + $4598 = CredParam + $45AB = CredMap + $45B7 = CredTest + $45C8 = CredSpecial + $45D8 = CredProducers + $45E3 = CredProducer + $45ED = CredExecutive + $4601 = CredTamada + $4611 = CredSaOota + $461F = CredYoshikawa + $462F = CredToOota + $463F = CredUSStaff + $4651 = CredUSCoord + $4662 = CredTilden + $466F = CredKawakami + $467F = CredHiNakamura + $468E = CredGiese + $469D = CredOsborne + $46AB = CredTrans + $46BD = CredOgasawara + $46CC = CredIwata + $46DA = CredIzushi + $46EB = CredHarada + $46FC = CredMurakawa + $470D = CredFukui + $471A = CredClub + $4730 = CredPAAD + $66B8 = HiddenItemCoords + $486B = Func_7486b + $4C47 = ViridianGymBlocks + $49EC = ViridianGymTextPointers + $48A3 = ViridianGymScript + $4BDE = ViridianGymObject + $48BF = Gym8CityName + $48CD = Gym8LeaderName + $4A08 = ViridianGymTrainerHeaders + $48E1 = ViridianGymScriptPointers + $48EB = ViridianGymScript0 + $4988 = ViridianGymScript3 + $496B = ViridianGymScript4 + $4916 = ViridianGymArrowTilePlayerMovement + $4947 = ViridianGymArrowMovement1 + $494A = ViridianGymArrowMovement2 + $494D = ViridianGymArrowMovement3 + $4950 = ViridianGymArrowMovement4 + $4953 = ViridianGymArrowMovement5 + $4956 = ViridianGymArrowMovement6 + $4959 = ViridianGymArrowMovement7 + $495C = ViridianGymArrowMovement8 + $495F = ViridianGymArrowMovement9 + $4962 = ViridianGymArrowMovement10 + $4965 = ViridianGymArrowMovement11 + $4968 = ViridianGymArrowMovement12 + $48D6 = ViridianGymScript_748d6 + $4A69 = ViridianGymText1 + $4AF3 = ViridianGymText2 + $4B0C = ViridianGymText3 + $4B25 = ViridianGymText4 + $4B3E = ViridianGymText5 + $4B57 = ViridianGymText6 + $4B70 = ViridianGymText7 + $4B89 = ViridianGymText8 + $4BA2 = ViridianGymText9 + $4BBB = ViridianGymText10 + $4ADF = ViridianGymText12 + $4AE4 = ViridianGymText13 + $4AEE = ViridianGymText14 + $4AFD = ViridianGymBattleText1 + $4B07 = ViridianGymAfterBattleText1 + $4B02 = ViridianGymEndBattleText1 + $4B16 = ViridianGymBattleText2 + $4B20 = ViridianGymAfterBattleText2 + $4B1B = ViridianGymEndBattleText2 + $4B2F = ViridianGymBattleText3 + $4B39 = ViridianGymAfterBattleText3 + $4B34 = ViridianGymEndBattleText3 + $4B48 = ViridianGymBattleText4 + $4B52 = ViridianGymAfterBattleText4 + $4B4D = ViridianGymEndBattleText4 + $4B61 = ViridianGymBattleText5 + $4B6B = ViridianGymAfterBattleText5 + $4B66 = ViridianGymEndBattleText5 + $4B7A = ViridianGymBattleText6 + $4B84 = ViridianGymAfterBattleText6 + $4B7F = ViridianGymEndBattleText6 + $4B93 = ViridianGymBattleText7 + $4B9D = ViridianGymAfterBattleText7 + $4B98 = ViridianGymEndBattleText7 + $4BAC = ViridianGymBattleText8 + $4BB6 = ViridianGymAfterBattleText8 + $4BB1 = ViridianGymEndBattleText8 + $4995 = ViridianGymScript3_74995 + $4AD9 = ViridianGymText_74ad9 + $4ACE = ViridianGymText_74ace + $4AD3 = ViridianGymText_74ad3 + $4A08 = ViridianGymTrainerHeader0 + $4A14 = ViridianGymTrainerHeader1 + $4A20 = ViridianGymTrainerHeader2 + $4A2C = ViridianGymTrainerHeader3 + $4A38 = ViridianGymTrainerHeader4 + $4A44 = ViridianGymTrainerHeader5 + $4A50 = ViridianGymTrainerHeader6 + $4A5C = ViridianGymTrainerHeader7 + $4BD4 = ViridianGymText_74bd4 + $4BD9 = ViridianGymText_74bd9 + $4010 = PewterMartBlocks + $4CB6 = PewterMartTextPointers + $4CAD = PewterMartScript + $4CDA = PewterMartObject + $4CBC = PewterMartText2 + $4CCB = PewterMartText3 + $4CC6 = PewterMartText_74cc6 + $4CD5 = PewterMartText_74cd5 + $4D76 = UnknownDungeon1Blocks + $4D0F = UnknownDungeon1TextPointers + $4D0C = UnknownDungeon1Script + $4D15 = UnknownDungeon1Object + $404C = CeruleanHouse2Blocks + $4E13 = CeruleanHouse2TextPointers + $4E09 = CeruleanHouse2Script + $4EBE = CeruleanHouse2Object + $4E15 = CeruleanHouse2Text1 + $4E77 = CeruleanHouse2Text_74e77 + $4E7C = CeruleanHouse2Text_74e7c + $4E6D = BadgeItemList + $4E86 = TextPointers_74e86 + $4E81 = CeruleanHouse2Text_74e81 + $4E96 = CeruleanHouse2Text_74e96 + $4E9B = CeruleanHouse2Text_74e9b + $4EA0 = CeruleanHouse2Text_74ea0 + $4EA5 = CeruleanHouse2Text_74ea5 + $4EAA = CeruleanHouse2Text_74eaa + $4EAF = CeruleanHouse2Text_74eaf + $4EB4 = CeruleanHouse2Text_74eb4 + $4EB9 = CeruleanHouse2Text_74eb9 + $4F99 = VendingMachineText1 + $4F9E = DrinkText + $4FC3 = DrinkPriceText + $4FD3 = VendingMachineText4 + $4FE7 = Func_74fe7 + $4FD8 = VendingMachineText5 + $4FDD = VendingMachineText6 + $4FE2 = VendingMachineText7 + $5000 = VendingPrices + $4020 = FuchsiaHouse1Blocks + $501C = FuchsiaHouse1TextPointers + $5018 = FuchsiaHouse1Script + $5031 = FuchsiaHouse1Object + $5022 = FuchsiaHouse1Text1 + $5027 = FuchsiaHouse1Text2 + $502C = FuchsiaHouse1Text3 + $4030 = FuchsiaPokecenterBlocks + $5069 = FuchsiaPokecenterTextPointers + $5063 = FuchsiaPokecenterScript + $507D = FuchsiaPokecenterObject + $5071 = FuchsiaPokecenterText1 + $5072 = FuchsiaPokecenterText2 + $5077 = FuchsiaPokecenterText3 + $507C = FuchsiaPokecenterText4 + $51AD = FuchsiaHouse2Blocks + $50B8 = FuchsiaHouse2TextPointers + $50B5 = FuchsiaHouse2Script + $5180 = FuchsiaHouse2Object + $50C2 = FuchsiaHouse2Text1 + $5163 = FuchsiaHouse2Text4 + $5163 = FuchsiaHouse2Text5 + $5135 = WardenGibberishText1 + $513F = WardenGibberishText3 + $513A = WardenGibberishText2 + $5144 = WardenTeethText1 + $514E = WardenThankYouText + $5153 = ReceivedHM04Text + $5159 = HM04ExplanationText + $515E = HM04NoRoomText + $517B = FuchsiaHouse2Text_7517b + $5176 = FuchsiaHouse2Text_75176 + $5425 = SafariZoneEntranceBlocks + $52B9 = SafariZoneEntranceTextPointers + $51CD = SafariZoneEntranceScript + $53F5 = SafariZoneEntranceObject + $51D9 = SafariZoneEntranceScriptPointers + $51E7 = SafariZoneEntranceScript0 + $5226 = SafariZoneEntranceScript1 + $522A = SafariZoneEntranceScript2 + $5240 = SafariZoneEntranceScript3 + $5287 = SafariZoneEntranceScript4 + $524E = SafariZoneEntranceScript5 + $5295 = SafariZoneEntranceScript6 + $5221 = CoordsData_75221 + $52A3 = SafariZoneEntranceScript_752a3 + $52B4 = SafariZoneEntranceScript_752b4 + $52C5 = SafariZoneEntranceText1 + $53CA = SafariZoneEntranceText2 + $52C5 = SafariZoneEntranceText3 + $52CA = SafariZoneEntranceText4 + $536F = SafariZoneEntranceText5 + $53C5 = SafariZoneEntranceText6 + $5346 = SafariZoneEntranceText4.asm_75346 + $536A = SafariZoneEntranceText_7536a + $535B = SafariZoneEntranceText_7535b + $5365 = SafariZoneEntranceText_75365 + $53BB = SafariZoneEntranceText_753bb + $53C0 = SafariZoneEntranceText_753c0 + $53E6 = SafariZoneEntranceText_753e6 + $53F0 = SafariZoneEntranceText_753f0 + $53EB = SafariZoneEntranceText_753eb + $56AA = FuchsiaGymBlocks + $54D5 = FuchsiaGymTextPointers + $543D = FuchsiaGymScript + $5658 = FuchsiaGymObject + $5453 = FuchsiaGymScript_75453 + $54EB = FuchsiaGymTrainerHeaders + $5482 = FuchsiaGymScriptPointers + $5465 = Gym5CityName + $5472 = Gym5LeaderName + $548A = FuchsiaGymScript3 + $5477 = FuchsiaGymScript_75477 + $5534 = FuchsiaGymText1 + $55A4 = FuchsiaGymText2 + $55BD = FuchsiaGymText3 + $55D6 = FuchsiaGymText4 + $55EF = FuchsiaGymText5 + $5608 = FuchsiaGymText6 + $5621 = FuchsiaGymText7 + $563A = FuchsiaGymText8 + $5590 = FuchsiaGymText9 + $5595 = FuchsiaGymText10 + $559F = FuchsiaGymText11 + $55AE = FuchsiaGymBattleText1 + $55B8 = FuchsiaGymAfterBattleText1 + $55B3 = FuchsiaGymEndBattleText1 + $55C7 = FuchsiaGymBattleText2 + $55D1 = FuchsiaGymAfterBattleText2 + $55CC = FuchsiaGymEndBattleText2 + $55E0 = FuchsiaGymBattleText3 + $55EA = FuchsiaGymAfterBattleText3 + $55E5 = FuchsiaGymEndBattleText3 + $55F9 = FuchsiaGymBattleText4 + $5603 = FuchsiaGymAfterBattleText4 + $55FE = FuchsiaGymEndBattleText4 + $5612 = FuchsiaGymBattleText5 + $561C = FuchsiaGymAfterBattleText5 + $5617 = FuchsiaGymEndBattleText5 + $562B = FuchsiaGymBattleText6 + $5635 = FuchsiaGymAfterBattleText6 + $5630 = FuchsiaGymEndBattleText6 + $5497 = FuchsiaGymScript3_75497 + $558B = UnnamedText_7558b + $5581 = UnnamedText_75581 + $5586 = UnnamedText_75586 + $54EB = FuchsiaGymTrainerHeader0 + $54F7 = FuchsiaGymTrainerHeader2 + $5503 = FuchsiaGymTrainerHeader3 + $550F = FuchsiaGymTrainerHeader4 + $551B = FuchsiaGymTrainerHeader5 + $5527 = FuchsiaGymTrainerHeader6 + $5653 = UnnamedText_75653 + $564E = UnnamedText_7564e + $5722 = FuchsiaMeetingRoomBlocks + $56E7 = FuchsiaMeetingRoomTextPointers + $56E3 = FuchsiaMeetingRoomScript + $56FC = FuchsiaMeetingRoomObject + $56ED = FuchsiaMeetingRoomText1 + $56F2 = FuchsiaMeetingRoomText2 + $56F7 = FuchsiaMeetingRoomText3 + $5B26 = CinnabarGymBlocks + $589F = CinnabarGymTextPointers + $574A = CinnabarGymScript + $5ACC = CinnabarGymObject + $5759 = CinnabarGymScript_75759 + $57A6 = CinnabarGymScriptPointers + $5772 = CinnabarGymScript_75772 + $577B = Gym7CityName + $578B = Gym7LeaderName + $57AE = CinnabarGymScript0 + $57DC = CinnabarGymScript1 + $57F6 = CinnabarGymScript2 + $584A = CinnabarGymScript3 + $57D7 = MovementData_757d7 + $57DA = MovementData_757da + $5792 = CinnabarGymScript_75792 + $57F1 = CinnabarGymScript_757f1 + $58DF = CinnabarGymText1 + $5939 = CinnabarGymText2 + $596E = CinnabarGymText3 + $59A3 = CinnabarGymText4 + $59D8 = CinnabarGymText5 + $5A0D = CinnabarGymText6 + $5A42 = CinnabarGymText7 + $5A77 = CinnabarGymText8 + $5AAC = CinnabarGymText9 + $5925 = BlaineBadgeText + $592A = ReceivedTM38Text + $5934 = TM38NoRoomText + $5857 = CinnabarGymScript3_75857 + $5920 = BlaineFireBlastText + $5914 = BlaineBattleText + $5919 = BlaineEndBattleText + $58B7 = CinnabarGymScript_758b7 + $57A0 = CinnabarGymScript_757a0 + $595F = CinnabarGymText_7595f + $5964 = CinnabarGymText_75964 + $5969 = CinnabarGymText_75969 + $5994 = CinnabarGymText_75994 + $5999 = CinnabarGymText_75999 + $599E = CinnabarGymText_7599e + $59C9 = CinnabarGymText_759c9 + $59CE = CinnabarGymText_759ce + $59D3 = CinnabarGymText_759d3 + $59FE = CinnabarGymText_759fe + $5A03 = CinnabarGymText_75a03 + $5A08 = CinnabarGymText_75a08 + $5A33 = CinnabarGymText_75a33 + $5A38 = CinnabarGymText_75a38 + $5A3D = CinnabarGymText_75a3d + $5A68 = CinnabarGymText_75a68 + $5A6D = CinnabarGymText_75a6d + $5A72 = CinnabarGymText_75a72 + $5A9D = CinnabarGymText_75a9d + $5AA2 = CinnabarGymText_75aa2 + $5AA7 = CinnabarGymText_75aa7 + $5AC2 = CinnabarGymText_75ac2 + $5AC7 = CinnabarGymText_75ac7 + $5BF1 = Lab1Blocks + $5B90 = Lab1TextPointers + $5B8C = Lab1Script + $5BB3 = Lab1Object + $5B9A = Lab1Text1 + $5B9F = Lab1Text2 + $5BA4 = Lab1Text3 + $5BA9 = Lab1Text4 + $5BAE = Lab1Text5 + $5C6B = Lab2Blocks + $5C24 = Lab2TextPointers + $5C21 = Lab2Script + $5C45 = Lab2Object + $5C2A = Lab2Text1 + $5C2F = Lab2Text2 + $5C37 = Lab2Text3 + $5D15 = Lab3Blocks + $5C8A = Lab3TextPointers + $5C87 = Lab3Script + $5CEC = Lab3Object + $5C94 = Lab3Text1 + $5CDD = Lab3Text2 + $5CE2 = Lab3Text3 + $5CE2 = Lab3Text4 + $5CE7 = Lab3Text5 + $5CC8 = TM35PreReceiveText + $5CCD = ReceivedTM35Text + $5CD8 = TM35NoRoomText + $5CD3 = TM35ExplanationText + $5E10 = Lab4Blocks + $5D34 = Lab4TextPointers + $5D31 = Lab4Script + $5DF0 = Lab4Object + $5D6C = Lab4Text1 + $5DDA = Lab4Text2 + $5D68 = FossilsList + $5DC6 = Lab4Text_75dc6 + $5D38 = Lab4Script_75d38 + $5DCB = Lab4Text_75dcb + $5DD0 = Lab4Text_75dd0 + $5DE8 = LoadFossilItemAndMonNameBank1D + $5DD5 = Lab4Text_75dd5 + $4030 = CinnabarPokecenterBlocks + $5E32 = CinnabarPokecenterTextPointers + $5E2C = CinnabarPokecenterScript + $5E46 = CinnabarPokecenterObject + $5E3A = CinnabarPokecenterText1 + $5E3B = CinnabarPokecenterText2 + $5E40 = CinnabarPokecenterText3 + $5E45 = CinnabarPokecenterText4 + $4010 = CinnabarMartBlocks + $5E81 = CinnabarMartTextPointers + $5E7E = CinnabarMartScript + $5E91 = CinnabarMartObject + $5E87 = CinnabarMartText2 + $5E8C = CinnabarMartText3 + $4000 = CopycatsHouse1FBlocks + $5EC6 = CopycatsHouse1FTextPointers + $5EC3 = CopycatsHouse1FScript + $5EE3 = CopycatsHouse1FObject + $5ECC = CopycatsHouse1FText1 + $5ED1 = CopycatsHouse1FText2 + $5ED6 = CopycatsHouse1FText3 + $615F = GaryBlocks + $60D6 = GaryTextPointers + $5F1D = GaryScript + $612F = GaryObject + $5F31 = GaryScriptPointers + $5F47 = GaryScript0 + $5F48 = GaryScript1 + $5F6A = GaryScript2 + $5FBB = GaryScript3 + $5FE4 = GaryScript4 + $601A = GaryScript5 + $6047 = GaryScript6 + $605F = GaryScript7 + $6083 = GaryScript8 + $6099 = GaryScript9 + $60B9 = GaryScript10 + $5F63 = RLEMovement75f63 + $60F9 = GaryText_760f9 + $60FE = GaryText_760fe + $5F29 = GaryScript_75f29 + $60C8 = GaryScript_760c8 + $6014 = MovementData_76014 + $6080 = MovementData_76080 + $60B4 = RLEMovement760b4 + $60E0 = GaryText1 + $6108 = GaryText2 + $610D = GaryText3 + $6125 = GaryText4 + $612A = GaryText5 + $60F4 = GaryText_760f4 + $6103 = GaryText_76103 + $6120 = GaryText_76120 + $62AC = LoreleiBlocks + $6251 = LoreleiTextPointers + $617B = LoreleiScript + $6280 = LoreleiObject + $6191 = LoreleiScript_76191 + $6255 = LoreleiTrainerHeaders + $61BB = LoreleiScriptPointers + $61E2 = LoreleiScript0 + $623F = LoreleiScript2 + $622C = LoreleiScript3 + $61C5 = LoreleiScript4 + $6223 = CoordsData_76223 + $61B6 = LoreleiScript_761b6 + $6262 = LoreleiText1 + $627B = LoreleiText2 + $626C = LoreleiBeforeBattleText + $6276 = LoreleiAfterBattleText + $6271 = LoreleiEndBattleText + $6255 = LoreleiTrainerHeader0 + $6403 = BrunoBlocks + $63A8 = BrunoTextPointers + $62D6 = BrunoScript + $63D7 = BrunoObject + $62EC = BrunoScript_762ec + $63AC = BrunoTrainerHeaders + $6312 = BrunoScriptPointers + $6302 = BrunoScript_76302 + $6339 = BrunoScript0 + $6396 = BrunoScript2 + $6383 = BrunoScript3 + $631C = BrunoScript4 + $637A = CoordsData_7637a + $630D = BrunoScript_7630d + $63B9 = BrunoText1 + $63D2 = BrunoText2 + $63C3 = BrunoBeforeBattleText + $63CD = BrunoAfterBattleText + $63C8 = BrunoEndBattleText + $63AC = BrunoTrainerHeader0 + $6560 = AgathaBlocks + $6505 = AgathaTextPointers + $642D = AgathaScript + $6534 = AgathaObject + $6443 = AgathaScript_76443 + $6509 = AgathaTrainerHeaders + $6469 = AgathaScriptPointers + $6459 = AgathaScript_76459 + $6490 = AgathaScript0 + $64ED = AgathaScript2 + $64DA = AgathaScript3 + $6473 = AgathaScript4 + $64D1 = CoordsData_764d1 + $6464 = AgathaScript_76464 + $6516 = AgathaText1 + $652F = AgathaText2 + $6520 = AgathaBeforeBattleText + $652A = AgathaAfterBattleText + $6525 = AgathaEndBattleText + $6509 = AgathaTrainerHeader0 + $6683 = AccessedHoFPCText + $65E5 = Func_765e5 + $6610 = Func_76610 + $6670 = HallOfFameNoText + $6857 = Func_76857 + $6822 = HiddenCoinCoords + SLACK: $1785 bytes + +Bank #30: + SECTION: $4000-$7FC7 ($3FC8 bytes) + $7F8E = GetMachinePrice + $5E9E = Func_79e96 + $46EE = AnimationTileset2 + $5F5C = Func_79f54 + $56E0 = AnimationSubstitute + $5FC8 = LoadSmokeTileFourTimes + $4BDE = SlotMachineTiles2 + $5747 = Func_79747 + $5787 = AnimationTransformMon + $5771 = Func_79771 + $7DF1 = Func_7bde9 + $52B9 = AnimationSlideEnemyMonOut + $559F = AnimationMinimizeMon + $7F1D = ShakeElevator + $5ABA = Func_79aba + $4D5E = MoveAnimation + $5DDA = Func_79dda + $5869 = Func_79869 + $5FF5 = RedFishingTilesFront + $6015 = RedFishingTilesBack + $6035 = RedFishingTilesSide + $6055 = RedFishingRodTiles + $5793 = Func_79793 + $4088 = DrawFrameBlock.flipHorizontalTranslateDown + $40AE = DrawFrameBlock.nextTile + $4012 = DrawFrameBlock.loop + $4EC8 = AnimationCleanOAM + $6085 = AttackAnimationPointers + $50DA = SpecialEffectPointers + $586F = Func_7986f + $4178 = PlayAnimation.nextAnimationCommand + $6775 = SubanimationPointers + $41D2 = LoadAnimationTileset + $417C = LoadSubanimation + $4E53 = PlaySubanimation + $41CA = GetSubanimationTransform2 + $41C2 = GetSubanimationTransform1 + $41F2 = AnimationTilesetPointers + $41FE = AnimationTileset1 + $4E23 = Func_78e23 + $4D90 = MoveAnimation.AnimationFinished + $5E16 = TossBallAnimation + $4DA6 = ShareMoveAnimations + $40F1 = PlayAnimation + $4DBD = Func_78dbd + $4DCF = PointerTable_78dcf + $4DDB = Func_78ddb + $4DE3 = Func_78de3 + $4DEB = Func_78deb + $4DF0 = Func_78df0 + $4DF6 = Func_78df6 + $4DFE = Func_78dfe + $5E72 = Func_79e6a + $5209 = Func_79209 + $5210 = Func_79210 + $5369 = AnimationBlinkEnemyMon + $6F7C = FrameBlockPointers + $7C8D = FrameBlockBaseCoords + $4000 = DrawFrameBlock + $4ED7 = DoSpecialEffectByAnimationId + $4E73 = PlaySubanimation.loop + $4EF5 = AnimationIdSpecialEffects + $4EF1 = DoSpecialEffectByAnimationId.done + $51BE = AnimationFlashScreen + $50D0 = Func_790d0 + $50BC = DoGrowlSpecialEffects + $5016 = DoBlizzardSpecialEffects + $5000 = FlashScreenEveryFourFrameBlocks + $4FF7 = FlashScreenEveryEightFrameBlocks + $5009 = DoExplodeSpecialEffects + $4FD9 = DoRockSlideSpecialEffects + $5041 = Func_79041 + $504C = Func_7904c + $507C = Func_7907c + $4F3E = DoBallTossSpecialEffects + $4F96 = DoBallShakeSpecialEffects + $4FCE = DoPoofSpecialEffects + $5862 = Func_79862 + $5801 = AnimationHideMonPic + $580C = Func_7980c + $5078 = BallMoveDistances1 + $50B3 = BallMoveDistances2 + $51D6 = AnimationDarkScreenPalette + $51EA = AnimationResetScreenPalette + $520E = AnimationShakeScreen + $5215 = AnimationWaterDropletsEverywhere + $51DB = AnimationDarkenMonPalette + $5165 = AnimationFlashScreenLong + $527A = AnimationSlideMonUp + $5297 = AnimationSlideMonDown + $5389 = AnimationFlashMonPic + $52AF = AnimationSlideMonOut + $536F = AnimationBlinkMon + $53F9 = AnimationMoveMonHorizontally + $5415 = AnimationResetMonPosition + $51F4 = AnimationLightScreenPalette + $54A1 = AnimationSquishMonPic + $54F9 = AnimationShootBallsUpward + $5566 = AnimationShootManyBallsUpward + $577A = AnimationBoundUpAndDown + $55C9 = AnimationSlideMonDownAndHide + $5C74 = AnimationLeavesFalling + $5C8A = AnimationPetalsFalling + $5645 = AnimationSlideMonHalfLeft + $5D77 = AnimationShakeEnemyHUD + $5424 = AnimationSpiralBallsInward + $5150 = AnimationDelay10 + $5398 = AnimationFlashEnemyMonPic + $57D8 = AnimationHideEnemyMonPic + $539E = AnimationShowMonPic + $53AB = AnimationShowEnemyMonPic + $53B1 = AnimationShakeBackAndForth + $5666 = AnimationWavyScreen + $5161 = CallWithTurnFlipped.returnAddress + $518E = FlashScreenLongMonochrome + $519B = FlashScreenLongSGB + $51A8 = FlashScreenLongDelay + $5246 = Func_79246 + $52BF = Func_792bf + $5842 = Func_79842 + $5820 = Func_79820 + $5AAE = Func_79aae + $55F8 = Func_795f8 + $5155 = CallWithTurnFlipped + $5329 = Func_79329 + $57E8 = Func_797e8 + $5476 = SpiralBallAnimationCoordinates + $54D4 = Func_794d4 + $585B = Func_7985b + $5517 = Func_79517 + $5591 = UpwardBallsAnimXCoordinatesPlayerTurn + $5598 = UpwardBallsAnimXCoordinatesEnemyTurn + $55C4 = MinimizedMonSprite + $5652 = Func_79652 + $563C = Func_7963c + $5633 = Func_79633 + $5E0D = Func_79e0d + $56BF = WavyScreenLineOffsets + $56AE = Func_796ae + $573F = CopySlowbroSpriteData + $5AEA = PointerTable_79aea + $58BC = MoveSoundTable + $58AD = IsCryMove + $5B02 = Unknown_79b02 + $5B1B = Unknown_79b1b + $5B24 = Unknown_79b24 + $5B55 = Unknown_79b55 + $5B78 = Unknown_79b78 + $5B8D = Unknown_79b8d + $5BBE = Unknown_79bbe + $5BEF = Unknown_79bef + $5C20 = Unknown_79c20 + $5C50 = Unknown_79c50 + $5C97 = Func_79c97 + $5D2A = Func_79d2a + $5D52 = Func_79d52 + $5D16 = Func_79d16 + $5CDB = Func_79cdb + $5D0D = Unknown_79d0d + $5D3E = Unknown_79d3e + $5D63 = Unknown_79d63 + $52FD = Func_792fd + $5DE9 = Func_79de9 + $5ACE = Func_79ace + $5E25 = TossBallAnimation.skipTrainerCheck + $5E58 = TossBallAnimation.PokeBallAnimations + $5339 = Func_79339 + $5EF5 = Func_79eed + $5F38 = Func_79f30 + $5352 = Func_79352 + $5F9A = Func_79f92 + $5F86 = Func_79f54.asm_79f7e + $5FB8 = PointerTable_79fb0 + $5350 = Func_79350 + $5337 = Func_79337 + $5FDC = LoadSmokeTile + $5FE5 = SSAnneSmokePuffTile + $621E = PoundAnim + $6222 = KarateChopAnim + $6226 = DoubleSlapAnim + $622D = CometPunchAnim + $6234 = MegaPunchAnim + $6238 = PayDayAnim + $623F = FirePunchAnim + $6246 = IcePunchAnim + $624D = ThunderPunchAnim + $6258 = ScratchAnim + $625C = VicegripAnim + $6260 = GuillotineAnim + $6264 = RazorWindAnim + $6268 = SwordsDanceAnim + $6272 = CutAnim + $6278 = GustAnim + $627F = WingAttackAnim + $6283 = WhirlwindAnim + $6289 = FlyAnim + $628F = BindAnim + $6296 = SlamAnim + $629A = VineWhipAnim + $62A1 = StompAnim + $62A5 = DoubleKickAnim + $62AC = MegaKickAnim + $62B0 = JumpKickAnim + $62B4 = RollingKickAnim + $62BA = SandAttackAnim + $62BE = HeatButtAnim + $62C2 = HornAttackAnim + $62C9 = FuryAttackAnim + $62D0 = HornDrillAnim + $62E0 = TackleAnim + $62E5 = BodySlamAnim + $62EE = WrapAnim + $62F8 = TakeDownAnim + $62FF = ThrashAnim + $6303 = DoubleEdgeAnim + $6311 = TailWhipAnim + $6320 = PoisonStingAnim + $6324 = TwineedleAnim + $632B = PinMissileAnim + $632F = LeerAnim + $6338 = BiteAnim + $633C = GrowlAnim + $6340 = RoarAnim + $634A = SingAnim + $6354 = SupersonicAnim + $6358 = SonicBoomAnim + $6365 = DisableAnim + $636E = AcidAnim + $6375 = EmberAnim + $6379 = FlamethrowerAnim + $6383 = MistAnim + $638A = WaterGunAnim + $638E = HydroPumpAnim + $6395 = SurfAnim + $639B = IceBeamAnim + $63A2 = BlizzardAnim + $63A9 = PsyBeamAnim + $63AF = BubbleBeamAnim + $63B3 = AuroraBeamAnim + $63BB = HyperBeamAnim + $63CC = PeckAnim + $63D0 = DrillPeckAnim + $63D4 = SubmissionAnim + $63DC = LowKickAnim + $63E4 = CounterAnim + $63EC = SeismicTossAnim + $6406 = StrengthAnim + $640E = AbsorbAnim + $6419 = MegaDrainAnim + $6428 = LeechSeedAnim + $642F = GrowthAnim + $6436 = RazorLeafAnim + $643F = SolarBeamAnim + $6446 = PoisonPowderAnim + $644A = StunSporeAnim + $644E = SleepPowderAnim + $6452 = PedalDanceAnim + $6459 = StringShotAnim + $645D = DragonRageAnim + $646A = FireSpinAnim + $6474 = ThunderShockAnim + $6478 = ThunderBoltAnim + $647F = ThunderWaveAnim + $6489 = ThunderAnim + $6498 = RockThrowAnim + $649C = EarthquakeAnim + $64A1 = FissureAnim + $64AA = DigAnim + $64B0 = ToxicAnim + $64B6 = ConfusionAnim + $64B9 = PsychicAnim + $64BE = HypnosisAnim + $64C1 = MeditateAnim + $64CB = AgilityAnim + $64D0 = QuickAttackAnim + $64D8 = RageAnim + $64DC = TeleportAnim + $64E1 = NightShadeAnim + $64E6 = MimicAnim + $64ED = ScreechAnim + $64F1 = DoubleTeamAnim + $6505 = RecoverAnim + $650E = HardenAnim + $6518 = MinimizeAnim + $6521 = SmokeScreenAnim + $6542 = ConfuseRayAnim + $654A = WithdrawAnim + $6556 = DefenseCurlAnim + $6560 = BarrierAnim + $6567 = LightScreenAnim + $6572 = HazeAnim + $6579 = ReflectAnim + $6584 = FocusEnergyAnim + $6587 = BideAnim + $658B = MetronomeAnim + $659A = MirrorMoveAnim + $659E = SelfdestructAnim + $65A2 = EggBombAnim + $65A9 = LickAnim + $65AD = SmogAnim + $65B5 = SludgeAnim + $65BC = BoneClubAnim + $65C0 = FireBlastAnim + $65D0 = WaterfallAnim + $65DB = ClampAnim + $65E5 = SwiftAnim + $65E9 = SkullBashAnim + $65ED = SpikeCannonAnim + $65F1 = ConstrictAnim + $65FB = AmnesiaAnim + $6602 = KinesisAnim + $6606 = SoftboiledAnim + $6614 = HiJumpKickAnim + $6618 = GlareAnim + $6621 = DreamEaterAnim + $662B = PoisonGasAnim + $662F = BarrageAnim + $6636 = LeechLifeAnim + $6644 = LovelyKissAnim + $6648 = SkyAttackAnim + $6652 = TransformAnim + $665E = BubbleAnim + $6662 = DizzyPunchAnim + $666F = SporeAnim + $6673 = FlashAnim + $667C = PsywaveAnim + $6682 = SplashAnim + $6685 = AcidArmorAnim + $6688 = CrabHammerAnim + $668F = ExplosionAnim + $6693 = FurySwipesAnim + $6697 = BonemerangAnim + $669B = RestAnim + $66A2 = RockSlideAnim + $66AC = HyperFangAnim + $66B0 = SharpenAnim + $66BA = ConversionAnim + $66C5 = TriAttackAnim + $66CD = SuperFangAnim + $66D5 = SlashAnim + $66D9 = SubstituteAnim + $621E = StruggleAnim + $66F5 = ShowPicAnim + $66FB = EnemyFlashAnim + $66FE = PlayerFlashAnim + $6701 = EnemyHUDShakeAnim + $6704 = TradeBallDropAnim + $6708 = TradeBallAppear1Anim + $670C = TradeBallAppear2Anim + $6710 = TradeBallPoofAnim + $6714 = XStatItemAnim + $671B = ShrinkingSquareAnim + $6723 = XStatItemBlackAnim + $672A = ShrinkingSquareBlackAnim + $6732 = UnusedAnim + $6739 = ParalyzeAnim + $6740 = PoisonAnim + $6747 = SleepPlayerAnim + $674E = SleepEnemyAnim + $6755 = ConfusedPlayerAnim + $675C = ConfusedEnemyAnim + $6767 = FaintAnim + $66E1 = BallTossAnim + $66ED = BallShakeAnim + $66F1 = BallPoofAnim + $6763 = BallBlockAnim + $66E5 = GreatTossAnim + $66E9 = UltraTossAnim + $676A = ShakeScreenAnim + $66F8 = HidePicAnim + $676D = ThrowRockAnim + $6771 = ThrowBaitAnim + $621B = ZigZagScreenAnim + $694E = Subanimation00 + $6952 = Subanimation01 + $6959 = Subanimation02 + $6963 = Subanimation03 + $6821 = Subanimation04 + $682B = Subanimation05 + $6873 = Subanimation06 + $6851 = Subanimation07 + $682F = Subanimation08 + $6895 = Subanimation09 + $68A2 = Subanimation0a + $68B5 = Subanimation0b + $6970 = Subanimation0c + $697A = Subanimation0d + $698D = Subanimation0e + $6A28 = Subanimation0f + $6A72 = Subanimation10 + $68C6 = Subanimation11 + $6932 = Subanimation12 + $6AAA = Subanimation13 + $6ABD = Subanimation14 + $6AF3 = Subanimation15 + $6A4D = Subanimation16 + $6AFA = Subanimation17 + $6B07 = Subanimation18 + $6B27 = Subanimation19 + $6B4C = Subanimation1a + $6B7D = Subanimation1b + $6B8A = Subanimation1c + $6B94 = Subanimation1d + $6BC2 = Subanimation1e + $69A9 = Subanimation1f + $6BC6 = Subanimation20 + $6BCD = Subanimation21 + $6BD7 = Subanimation22 + $6CA8 = Subanimation23 + $6CAF = Subanimation24 + $6CB6 = Subanimation25 + $6CBD = Subanimation26 + $6CD8 = Subanimation27 + $6CDF = Subanimation28 + $6C43 = Subanimation29 + $6C9B = Subanimation2a + $68EB = Subanimation2b + $690D = Subanimation2c + $6BF9 = Subanimation2d + $69B9 = Subanimation2e + $69E4 = Subanimation2f + $69F1 = Subanimation30 + $6A8B = Subanimation31 + $6CE9 = Subanimation32 + $6CF3 = Subanimation33 + $6D35 = Subanimation34 + $6D75 = Subanimation35 + $6D82 = Subanimation36 + $6D9B = Subanimation37 + $6DBA = Subanimation38 + $6C0C = Subanimation39 + $6CC4 = Subanimation3a + $6CCE = Subanimation3b + $6D06 = Subanimation3c + $6D1C = Subanimation3d + $6DEB = Subanimation3e + $6E22 = Subanimation3f + $6B14 = Subanimation40 + $6AD9 = Subanimation41 + $6AE9 = Subanimation42 + $6E7E = Subanimation43 + $6E59 = Subanimation44 + $6E88 = Subanimation45 + $6E95 = Subanimation46 + $6EA8 = Subanimation47 + $6EB2 = Subanimation48 + $6EC5 = Subanimation49 + $6ED2 = Subanimation4a + $6ED6 = Subanimation4b + $6EE0 = Subanimation4c + $6EF9 = Subanimation4d + $6C10 = Subanimation4e + $6C14 = Subanimation4f + $6C2A = Subanimation50 + $6F0C = Subanimation51 + $6F1F = Subanimation52 + $6F35 = Subanimation53 + $6F5A = Subanimation54 + $68C2 = Subanimation55 + $7DEF = FrameBlock00 + $7070 = FrameBlock01 + $7095 = FrameBlock02 + $70D6 = FrameBlock03 + $70E7 = FrameBlock04 + $70F8 = FrameBlock05 + $7109 = FrameBlock06 + $713A = FrameBlock07 + $717B = FrameBlock08 + $71BC = FrameBlock09 + $71ED = FrameBlock0a + $721E = FrameBlock0b + $722F = FrameBlock0c + $7240 = FrameBlock0d + $7261 = FrameBlock0e + $7272 = FrameBlock0f + $7283 = FrameBlock10 + $72A4 = FrameBlock11 + $72C5 = FrameBlock12 + $72D2 = FrameBlock13 + $72E3 = FrameBlock14 + $7304 = FrameBlock15 + $7335 = FrameBlock16 + $7356 = FrameBlock17 + $7367 = FrameBlock18 + $736C = FrameBlock19 + $7375 = FrameBlock1a + $737E = FrameBlock1b + $7387 = FrameBlock1c + $7390 = FrameBlock1d + $7399 = FrameBlock1e + $73B3 = FrameBlock1f + $73BC = FrameBlock20 + $73D5 = FrameBlock21 + $7406 = FrameBlock22 + $7453 = FrameBlock23 + $7464 = FrameBlock24 + $746D = FrameBlock25 + $749E = FrameBlock26 + $74AF = FrameBlock27 + $74C4 = FrameBlock28 + $74DD = FrameBlock29 + $74EE = FrameBlock2a + $74FF = FrameBlock2b + $7508 = FrameBlock2c + $750D = FrameBlock2d + $752E = FrameBlock2e + $754F = FrameBlock2f + $7560 = FrameBlock30 + $7571 = FrameBlock31 + $7576 = FrameBlock32 + $7593 = FrameBlock33 + $75B0 = FrameBlock34 + $75B5 = FrameBlock35 + $75CE = FrameBlock36 + $75DF = FrameBlock37 + $75F0 = FrameBlock38 + $7601 = FrameBlock39 + $7612 = FrameBlock3a + $7623 = FrameBlock3b + $7638 = FrameBlock3c + $7651 = FrameBlock3d + $766E = FrameBlock3e + $768F = FrameBlock3f + $76B0 = FrameBlock40 + $76BD = FrameBlock41 + $76CE = FrameBlock42 + $76FB = FrameBlock43 + $7728 = FrameBlock44 + $7739 = FrameBlock45 + $774A = FrameBlock46 + $775B = FrameBlock47 + $776C = SmallBlackCircleFrameBlock + $777D = LargeBlockCircleFrameBlock + $7862 = FrameBlock4a + $7873 = FrameBlock4b + $7884 = FrameBlock4c + $7895 = FrameBlock4d + $78A6 = FrameBlock4e + $78C7 = FrameBlock4f + $78F8 = FrameBlock50 + $7919 = FrameBlock51 + $793A = FrameBlock52 + $794B = FrameBlock53 + $7958 = FrameBlock54 + $7969 = FrameBlock55 + $7976 = FrameBlock56 + $798F = FrameBlock57 + $79B4 = FrameBlock58 + $79D1 = FrameBlock59 + $79D6 = FrameBlock5a + $7A07 = FrameBlock5b + $7A18 = FrameBlock5c + $7A39 = FrameBlock5d + $7A66 = FrameBlock5e + $7AA3 = FrameBlock5f + $7AB4 = FrameBlock60 + $7AD5 = FrameBlock61 + $7B06 = FrameBlock62 + $7B47 = FrameBlock63 + $7B60 = FrameBlock64 + $7B79 = FrameBlock65 + $7B92 = FrameBlock66 + $7B9B = FrameBlock67 + $7BA0 = FrameBlock68 + $7BB1 = FrameBlock69 + $7BB6 = FrameBlock6a + $7BD7 = FrameBlock6b + $7BF8 = FrameBlock6c + $7C19 = FrameBlock6d + $7C22 = FrameBlock6e + $7C33 = FrameBlock6f + $7C44 = FrameBlock70 + $77BE = FrameBlock71 + $77FF = FrameBlock72 + $7830 = FrameBlock73 + $7851 = FrameBlock74 + $73A2 = FrameBlock75 + $7C55 = FrameBlock76 + $7C72 = FrameBlock77 + $7C83 = FrameBlock78 + $7C88 = FrameBlock79 + $7EBC = Func_7beb4 + $7EC1 = Func_7beb9 + $7F02 = asm_7befa + $7ECA = asm_7bec2 + $7EDE = Func_7bed6 + $7F6C = Func_7bf64 + $7FAF = TechnicalMachinePrices + SLACK: $0038 bytes + +Bank #31: + SECTION: $4000-$4248 ($0249 bytes) + $41EF = SFX_1f_51 + $4000 = SFX_Headers_1f + $4027 = SFX_1f_0d + $4084 = SFX_1f_1c + $410B = SFX_1f_2b + $4192 = SFX_1f_3a + $402A = SFX_1f_0e + $408D = SFX_1f_1d + $4114 = SFX_1f_2c + $419B = SFX_1f_3b + $41DA = SFX_1f_4a + $402D = SFX_1f_0f + $4096 = SFX_1f_1e + $411D = SFX_1f_2d + $41A4 = SFX_1f_3c + $41DD = SFX_1f_4b + $4216 = SFX_1f_5a + $409F = SFX_1f_1f + $4126 = SFX_1f_2e + $41A7 = SFX_1f_3d + $41E0 = SFX_1f_4c + $421C = SFX_1f_5b + $412F = SFX_1f_2f + $41AA = SFX_1f_3e + $41E3 = SFX_1f_4d + $421F = SFX_1f_5c + $41AD = SFX_1f_3f + $41E6 = SFX_1f_4e + $4222 = SFX_1f_5d + $41E9 = SFX_1f_4f + $4228 = SFX_1f_5e + $422B = SFX_1f_5f + $4003 = SFX_1f_01 + $4030 = SFX_1f_10 + $4006 = SFX_1f_02 + $4033 = SFX_1f_11 + $40A8 = SFX_1f_20 + $4009 = SFX_1f_03 + $4036 = SFX_1f_12 + $40B1 = SFX_1f_21 + $4138 = SFX_1f_30 + $400C = SFX_1f_04 + $4039 = SFX_1f_13 + $40BA = SFX_1f_22 + $4141 = SFX_1f_31 + $41B0 = SFX_1f_40 + $400F = SFX_1f_05 + $403C = SFX_1f_14 + $40C3 = SFX_1f_23 + $414A = SFX_1f_32 + $41B3 = SFX_1f_41 + $41EC = SFX_1f_50 + $4012 = SFX_1f_06 + $4045 = SFX_1f_15 + $40CC = SFX_1f_24 + $4153 = SFX_1f_33 + $41BC = SFX_1f_42 + $422E = SFX_1f_60 + $4015 = SFX_1f_07 + $404E = SFX_1f_16 + $40D5 = SFX_1f_25 + $415C = SFX_1f_34 + $41C5 = SFX_1f_43 + $41F5 = SFX_1f_52 + $4231 = SFX_1f_61 + $4018 = SFX_1f_08 + $4057 = SFX_1f_17 + $40DE = SFX_1f_26 + $4165 = SFX_1f_35 + $41C8 = SFX_1f_44 + $41F8 = SFX_1f_53 + $4234 = SFX_1f_62 + $401B = SFX_1f_09 + $4060 = SFX_1f_18 + $40E7 = SFX_1f_27 + $416E = SFX_1f_36 + $41CB = SFX_1f_45 + $41FB = SFX_1f_54 + $4237 = SFX_1f_63 + $4069 = SFX_1f_19 + $40F0 = SFX_1f_28 + $4177 = SFX_1f_37 + $41CE = SFX_1f_46 + $4201 = SFX_1f_55 + $423A = SFX_1f_64 + $40F9 = SFX_1f_29 + $4180 = SFX_1f_38 + $41D1 = SFX_1f_47 + $4204 = SFX_1f_56 + $423D = SFX_1f_65 + $4189 = SFX_1f_39 + $41D4 = SFX_1f_48 + $4207 = SFX_1f_57 + $4240 = SFX_1f_66 + $41D7 = SFX_1f_49 + $420A = SFX_1f_58 + $4246 = SFX_1f_67 + $4210 = SFX_1f_59 + $401E = SFX_1f_0a + $4021 = SFX_1f_0b + $4072 = SFX_1f_1a + $4024 = SFX_1f_0c + $407B = SFX_1f_1b + $4102 = SFX_1f_2a + SECTION: $4249-$42FC ($00B4 bytes) + $42E2 = Music_MeetEvilTrainer + $4255 = Music_Credits + $42C4 = Music_CinnabarMansion + $425E = Music_HallOfFame + $4270 = Music_JigglypuffSong + $4282 = Music_Surfing + $4267 = Music_OaksLab + $42D0 = Music_PokemonTower + $4249 = Music_TitleScreen + $42EB = Music_MeetFemaleTrainer + $4294 = Music_IntroBattle + $42D9 = Music_SilphCo + $4276 = Music_BikeRiding + $42A0 = Music_Dungeon1 + $42AC = Music_Dungeon2 + $42B8 = Music_Dungeon3 + $42F4 = Music_MeetMaleTrainer + $428B = Music_GameCorner + SECTION: $42FD-$513A ($0E3E bytes) + $42FD = SFX_1f_01_Ch1 + $4301 = SFX_1f_02_Ch1 + $4305 = SFX_1f_03_Ch1 + $4309 = SFX_1f_04_Ch1 + $430D = SFX_1f_05_Ch1 + $4320 = SFX_1f_06_Ch1 + $4324 = SFX_1f_07_Ch1 + $432B = SFX_1f_08_Ch1 + $432F = SFX_1f_09_Ch1 + $4333 = SFX_1f_0a_Ch1 + $4337 = SFX_1f_0b_Ch1 + $433B = SFX_1f_0c_Ch1 + $433F = SFX_1f_0d_Ch1 + $4343 = SFX_1f_0e_Ch1 + $4347 = SFX_1f_0f_Ch1 + $434E = SFX_1f_10_Ch1 + $4355 = SFX_1f_11_Ch1 + $4359 = SFX_1f_12_Ch1 + $435D = SFX_1f_13_Ch1 + $49FC = SFX_1f_14_Ch1 + $4A0B = SFX_1f_14_Ch2 + $4A1A = SFX_1f_14_Ch3 + $4C0C = SFX_1f_15_Ch1 + $4C1F = SFX_1f_15_Ch2 + $4C32 = SFX_1f_15_Ch3 + $4B81 = SFX_1f_16_Ch1 + $4B90 = SFX_1f_16_Ch2 + $4B9E = SFX_1f_16_Ch3 + $491B = SFX_1f_17_Ch1 + $493A = SFX_1f_17_Ch2 + $4959 = SFX_1f_17_Ch3 + $4CCA = SFX_1f_18_Ch1 + $4CE9 = SFX_1f_18_Ch2 + $4D08 = SFX_1f_18_Ch3 + $4AAA = SFX_1f_19_Ch1 + $4ABD = SFX_1f_19_Ch2 + $4ACF = SFX_1f_19_Ch3 + $4A54 = SFX_1f_1a_Ch1 + $4A6E = SFX_1f_1a_Ch2 + $4A6F = SFX_1f_1a_Ch3 + $4A82 = SFX_1f_1b_Ch1 + $4A91 = SFX_1f_1b_Ch2 + $4AA0 = SFX_1f_1b_Ch3 + $4C9A = SFX_1f_1c_Ch1 + $4CAD = SFX_1f_1c_Ch2 + $4CC0 = SFX_1f_1c_Ch3 + $47A4 = SFX_1f_1d_Ch1 + $47C1 = SFX_1f_1d_Ch2 + $47E2 = SFX_1f_1d_Ch3 + $4C3F = SFX_1f_1e_Ch1 + $4C5E = SFX_1f_1e_Ch2 + $4C81 = SFX_1f_1e_Ch3 + $4AD0 = SFX_1f_1f_Ch1 + $4AFB = SFX_1f_1f_Ch2 + $4B1A = SFX_1f_1f_Ch3 + $4B33 = SFX_1f_20_Ch1 + $4B5A = SFX_1f_20_Ch2 + $4B80 = SFX_1f_20_Ch3 + $4B9F = SFX_1f_21_Ch1 + $4BBE = SFX_1f_21_Ch2 + $4BED = SFX_1f_21_Ch3 + $4A24 = SFX_1f_22_Ch1 + $4A37 = SFX_1f_22_Ch2 + $4A4A = SFX_1f_22_Ch3 + $4966 = SFX_1f_23_Ch1 + $4981 = SFX_1f_23_Ch2 + $499C = SFX_1f_23_Ch3 + $49AC = SFX_1f_24_Ch1 + $49CF = SFX_1f_24_Ch2 + $49F2 = SFX_1f_24_Ch3 + $4888 = SFX_1f_25_Ch1 + $48A7 = SFX_1f_25_Ch2 + $48CA = SFX_1f_25_Ch3 + $4DA0 = SFX_1f_26_Ch1 + $4DB3 = SFX_1f_26_Ch2 + $4DC6 = SFX_1f_26_Ch3 + $4DD3 = SFX_1f_27_Ch1 + $4DEE = SFX_1f_27_Ch2 + $4E09 = SFX_1f_27_Ch3 + $4E1C = SFX_1f_28_Ch1 + $4E2B = SFX_1f_28_Ch2 + $4E3A = SFX_1f_28_Ch3 + $4EAA = SFX_1f_29_Ch1 + $4EC5 = SFX_1f_29_Ch2 + $4EE0 = SFX_1f_29_Ch3 + $4D3D = SFX_1f_2a_Ch1 + $4D4C = SFX_1f_2a_Ch2 + $4D5B = SFX_1f_2a_Ch3 + $4EF3 = SFX_1f_2b_Ch1 + $4F06 = SFX_1f_2b_Ch2 + $4F19 = SFX_1f_2b_Ch3 + $5003 = SFX_1f_2c_Ch1 + $5026 = SFX_1f_2c_Ch2 + $5049 = SFX_1f_2c_Ch3 + $4D1B = SFX_1f_2d_Ch1 + $4D2A = SFX_1f_2d_Ch2 + $4D3C = SFX_1f_2d_Ch3 + $4F74 = SFX_1f_2e_Ch1 + $4F8F = SFX_1f_2e_Ch2 + $4FAA = SFX_1f_2e_Ch3 + $4D65 = SFX_1f_2f_Ch1 + $4D7C = SFX_1f_2f_Ch2 + $4D93 = SFX_1f_2f_Ch3 + $4F26 = SFX_1f_30_Ch1 + $4F49 = SFX_1f_30_Ch2 + $4F64 = SFX_1f_30_Ch3 + $4FBD = SFX_1f_31_Ch1 + $4FD8 = SFX_1f_31_Ch2 + $4FF3 = SFX_1f_31_Ch3 + $4E44 = SFX_1f_32_Ch1 + $4E67 = SFX_1f_32_Ch2 + $4E8E = SFX_1f_32_Ch3 + $505C = SFX_1f_33_Ch1 + $506F = SFX_1f_33_Ch2 + $5082 = SFX_1f_33_Ch3 + $508F = SFX_1f_34_Ch1 + $50A2 = SFX_1f_34_Ch2 + $50B5 = SFX_1f_34_Ch3 + $50C2 = SFX_1f_35_Ch1 + $50E5 = SFX_1f_35_Ch2 + $5107 = SFX_1f_35_Ch3 + $5108 = SFX_1f_36_Ch1 + $511B = SFX_1f_36_Ch2 + $512E = SFX_1f_36_Ch3 + $47FB = SFX_1f_37_Ch1 + $4812 = SFX_1f_37_Ch2 + $4825 = SFX_1f_37_Ch3 + $4832 = SFX_1f_38_Ch1 + $4855 = SFX_1f_38_Ch2 + $4878 = SFX_1f_38_Ch3 + $48E0 = SFX_1f_39_Ch1 + $48F7 = SFX_1f_39_Ch2 + $490E = SFX_1f_39_Ch3 + $43F3 = SFX_1f_3c_Ch1 + $4490 = SFX_1f_3d_Ch1 + $44B2 = SFX_1f_3e_Ch1 + $43C3 = SFX_1f_3f_Ch1 + $444B = SFX_1f_40_Ch1 + $449F = SFX_1f_43_Ch1 + $44C7 = SFX_1f_44_Ch1 + $44D6 = SFX_1f_45_Ch1 + $4505 = SFX_1f_46_Ch1 + $4518 = SFX_1f_47_Ch1 + $452B = SFX_1f_48_Ch1 + $4546 = SFX_1f_49_Ch1 + $455D = SFX_1f_4a_Ch1 + $4572 = SFX_1f_4b_Ch1 + $458D = SFX_1f_4c_Ch1 + $45A8 = SFX_1f_4d_Ch1 + $45B3 = SFX_1f_4e_Ch1 + $45BE = SFX_1f_4f_Ch1 + $45CB = SFX_1f_50_Ch1 + $45FC = SFX_1f_51_Ch1 + $4613 = SFX_1f_51_Ch2 + $4626 = SFX_1f_52_Ch1 + $4631 = SFX_1f_53_Ch1 + $464A = SFX_1f_54_Ch1 + $4669 = SFX_1f_54_Ch2 + $4688 = SFX_1f_55_Ch1 + $43CA = SFX_1f_56_Ch1 + $43DA = SFX_1f_57_Ch1 + $43E1 = SFX_1f_58_Ch1 + $43E8 = SFX_1f_58_Ch2 + $4404 = SFX_1f_59_Ch1 + $440B = SFX_1f_59_Ch2 + $4416 = SFX_1f_5a_Ch1 + $4421 = SFX_1f_5a_Ch2 + $4430 = SFX_1f_5b_Ch1 + $443B = SFX_1f_5c_Ch1 + $445E = SFX_1f_5d_Ch1 + $4475 = SFX_1f_5d_Ch2 + $46A5 = SFX_1f_5e_Ch1 + $46BE = SFX_1f_5f_Ch1 + $46C9 = SFX_1f_60_Ch1 + $46D4 = SFX_1f_61_Ch1 + $46DE = SFX_1f_62_Ch1 + $46E5 = SFX_1f_63_Ch1 + $46F5 = SFX_1f_64_Ch1 + $4704 = SFX_1f_65_Ch1 + $470F = SFX_1f_66_Ch1 + $471E = SFX_1f_66_Ch2 + $472D = SFX_1f_67_Ch1 + $4373 = Music1f_WavePointers.wave0 + $4383 = Music1f_WavePointers.wave1 + $4393 = Music1f_WavePointers.wave2 + $43A3 = Music1f_WavePointers.wave3 + $43B3 = Music1f_WavePointers.wave4 + $43C3 = Music1f_WavePointers.wave5 + $4361 = Music1f_WavePointers + SECTION: $513B-$5BBA ($0A80 bytes) + $5170 = OwnedMonValues + $5162 = PokedexRatingSfxPointers + $51AC = Music1f_ApplyMusicAffects + $5244 = Music1f_PlayNextNote + $5881 = Music1f_ApplyDutyCycle + $576D = Music1f_ApplyPitchBend + $58AC = Func_7d8ac + $525A = Music1f_endchannel + $5899 = Music1f_GetNextMusicByte + $52E8 = Music1f_callchannel + $5B93 = Unknown_7db93 + $573B = Func_7d73b + $531D = Music1f_loopchannel + $5358 = Music1f_notetype + $5397 = Music1f_toggleperfectpitch + $58CC = Func_7d8cc + $557E = Music1f_notelength + $58EA = Func_7d8ea + $569D = Func_7d69d + $566C = Func_7d66c + $56BF = Func_7d6bf + $58BB = Func_7d8bb + $5707 = Func_7d707 + $5803 = Func_7d803 + $5B9B = Unknown_7db9b + $5729 = Func_7d729 + $5759 = Func_7d759 + $57B4 = Music1f_ApplyPitchBend.asm_7d7b4 + $57FA = Music1f_ApplyPitchBend.asm_7d7fa + $5B8B = Unknown_7db8b + $5BA3 = Music1f_Pitches + $5AA8 = Func_7daa8 + $59C2 = Func_7d9c2 + $5AFD = FillMusicRAM1f + $5B03 = Func_7db03 + $59DB = Func_7d9c2.asm_7d9db + $5B8A = Noise1f_endchannel + $513B = Func_7d13b + $5177 = Music1f_UpdateMusic + SECTION: $5BBB-$7FF9 ($243F bytes) + $6850 = SFX_1f_3a_Ch1 + $6867 = SFX_1f_3a_Ch2 + $6877 = SFX_1f_3a_Ch3 + $6E28 = SFX_1f_3b_Ch1 + $6E47 = SFX_1f_3b_Ch2 + $6E5F = SFX_1f_3b_Ch3 + $6DDA = SFX_1f_41_Ch1 + $6DF3 = SFX_1f_41_Ch2 + $6E09 = SFX_1f_41_Ch3 + $6E74 = SFX_1f_42_Ch1 + $6E93 = SFX_1f_42_Ch2 + $6EAF = SFX_1f_42_Ch3 + $64C0 = Music_TitleScreen_Ch1 + $6578 = Music_TitleScreen_Ch2 + $6643 = Music_TitleScreen_Ch3 + $66EB = Music_TitleScreen_Ch4 + $7C1F = Music_Credits_Ch1 + $7D5F = Music_Credits_Ch2 + $7EC2 = Music_Credits_Ch3 + $7BAF = Music_HallOfFame_Ch1 + $7BDA = Music_HallOfFame_Ch2 + $7BFC = Music_HallOfFame_Ch3 + $6EB9 = Music_OaksLab_Ch1 + $6F05 = Music_OaksLab_Ch2 + $6F52 = Music_OaksLab_Ch3 + $7B7D = Music_JigglypuffSong_Ch1 + $7B9A = Music_JigglypuffSong_Ch2 + $5BBB = Music_BikeRiding_Ch1 + $5C6C = Music_BikeRiding_Ch2 + $5D14 = Music_BikeRiding_Ch3 + $5E68 = Music_BikeRiding_Ch4 + $7A19 = Music_Surfing_Ch1 + $7A9C = Music_Surfing_Ch2 + $7AFA = Music_Surfing_Ch3 + $620B = Music_GameCorner_Ch1 + $62DF = Music_GameCorner_Ch2 + $638B = Music_GameCorner_Ch3 + $7844 = Music_IntroBattle_Ch1 + $78BC = Music_IntroBattle_Ch2 + $791D = Music_IntroBattle_Ch3 + $795B = Music_IntroBattle_Ch4 + $5ED1 = Music_Dungeon1_Ch1 + $5FDE = Music_Dungeon1_Ch2 + $60DC = Music_Dungeon1_Ch3 + $618A = Music_Dungeon1_Ch4 + $6887 = Music_Dungeon2_Ch1 + $68D8 = Music_Dungeon2_Ch2 + $693B = Music_Dungeon2_Ch3 + $69DC = Music_Dungeon2_Ch4 + $69F1 = Music_Dungeon3_Ch1 + $6B68 = Music_Dungeon3_Ch2 + $6C7A = Music_Dungeon3_Ch3 + $6CE4 = Music_Dungeon3_Ch4 + $6D0F = Music_CinnabarMansion_Ch1 + $6D40 = Music_CinnabarMansion_Ch2 + $6D7E = Music_CinnabarMansion_Ch3 + $6DB0 = Music_CinnabarMansion_Ch4 + $704A = Music_PokemonTower_Ch1 + $70E3 = Music_PokemonTower_Ch2 + $719A = Music_PokemonTower_Ch3 + $7243 = Music_SilphCo_Ch1 + $7409 = Music_SilphCo_Ch2 + $75BE = Music_SilphCo_Ch3 + $769D = Music_MeetEvilTrainer_Ch1 + $76BA = Music_MeetEvilTrainer_Ch2 + $76E6 = Music_MeetEvilTrainer_Ch3 + $76F9 = Music_MeetFemaleTrainer_Ch1 + $771C = Music_MeetFemaleTrainer_Ch2 + $774B = Music_MeetFemaleTrainer_Ch3 + $777B = Music_MeetMaleTrainer_Ch1 + $77A2 = Music_MeetMaleTrainer_Ch2 + $77D2 = Music_MeetMaleTrainer_Ch3 + $5BC9 = Music_BikeRiding_branch_7dbc9 + $5C75 = Music_BikeRiding_branch_7dc75 + $5D17 = Music_BikeRiding_branch_7dd17 + $5EA7 = Music_BikeRiding_branch_7dea7 + $5EB4 = Music_BikeRiding_branch_7deb4 + $5EC2 = Music_BikeRiding_branch_7dec2 + $5E6A = Music_BikeRiding_branch_7de6a + $5FAA = Music_Dungeon1_branch_7dfaa + $5EE8 = Music_Dungeon1_branch_7dee8 + $5EFF = Music_Dungeon1_branch_7deff + $5FD5 = Music_Dungeon1_branch_7dfd5 + $5FC5 = Music_Dungeon1_branch_7dfc5 + $5F6E = Music_Dungeon1_branch_7df6e + $5FBB = Music_Dungeon1_branch_7dfbb + $5EE5 = Music_Dungeon1_branch_7dee5 + $6097 = Music_Dungeon1_branch_7e097 + $5FED = Music_Dungeon1_branch_7dfed + $6006 = Music_Dungeon1_branch_7e006 + $60AB = Music_Dungeon1_branch_7e0ab + $60B5 = Music_Dungeon1_branch_7e0b5 + $60BA = Music_Dungeon1_branch_7e0ba + $60CD = Music_Dungeon1_branch_7e0cd + $60C0 = Music_Dungeon1_branch_7e0c0 + $5FEB = Music_Dungeon1_branch_7dfeb + $6140 = Music_Dungeon1_branch_7e140 + $6154 = Music_Dungeon1_branch_7e154 + $6177 = Music_Dungeon1_branch_7e177 + $615E = Music_Dungeon1_branch_7e15e + $6164 = Music_Dungeon1_branch_7e164 + $60E5 = Music_Dungeon1_branch_7e0e5 + $61F1 = Music_Dungeon1_branch_7e1f1 + $6190 = Music_Dungeon1_branch_7e190 + $61A1 = Music_Dungeon1_branch_7e1a1 + $61FA = Music_Dungeon1_branch_7e1fa + $61B0 = Music_Dungeon1_branch_7e1b0 + $6202 = Music_Dungeon1_branch_7e202 + $61BA = Music_Dungeon1_branch_7e1ba + $61CF = Music_Dungeon1_branch_7e1cf + $61D5 = Music_Dungeon1_branch_7e1d5 + $6222 = Music_GameCorner_branch_7e222 + $62FA = Music_GameCorner_branch_7e2fa + $6418 = Music_GameCorner_branch_7e418 + $642D = Music_GameCorner_branch_7e42d + $6442 = Music_GameCorner_branch_7e442 + $6457 = Music_GameCorner_branch_7e457 + $646C = Music_GameCorner_branch_7e46c + $6481 = Music_GameCorner_branch_7e481 + $6496 = Music_GameCorner_branch_7e496 + $64AB = Music_GameCorner_branch_7e4ab + $63A5 = Music_GameCorner_branch_7e3a5 + $6541 = Music_TitleScreen_branch_7e541 + $654A = Music_TitleScreen_branch_7e54a + $655C = Music_TitleScreen_branch_7e55c + $64E2 = Music_TitleScreen_branch_7e4e2 + $6622 = Music_TitleScreen_branch_7e622 + $662C = Music_TitleScreen_branch_7e62c + $6636 = Music_TitleScreen_branch_7e636 + $6594 = Music_TitleScreen_branch_7e594 + $66C9 = Music_TitleScreen_branch_7e6c9 + $66D0 = Music_TitleScreen_branch_7e6d0 + $6664 = Music_TitleScreen_branch_7e664 + $66D7 = Music_TitleScreen_branch_7e6d7 + $66DC = Music_TitleScreen_branch_7e6dc + $66E5 = Music_TitleScreen_branch_7e6e5 + $665E = Music_TitleScreen_branch_7e65e + $6834 = Music_TitleScreen_branch_7e834 + $6842 = Music_TitleScreen_branch_7e842 + $6716 = Music_TitleScreen_branch_7e716 + $6892 = Music_Dungeon2_branch_7e892 + $68DB = Music_Dungeon2_branch_7e8db + $69D1 = Music_Dungeon2_branch_7e9d1 + $6940 = Music_Dungeon2_branch_7e940 + $6958 = Music_Dungeon2_branch_7e958 + $69DD = Music_Dungeon2_branch_7e9dd + $6AB2 = Music_Dungeon3_branch_7eab2 + $69FE = Music_Dungeon3_branch_7e9fe + $6AC1 = Music_Dungeon3_branch_7eac1 + $6A11 = Music_Dungeon3_branch_7ea11 + $6A18 = Music_Dungeon3_branch_7ea18 + $6AFC = Music_Dungeon3_branch_7eafc + $6ACE = Music_Dungeon3_branch_7eace + $6A3C = Music_Dungeon3_branch_7ea3c + $6ADD = Music_Dungeon3_branch_7eadd + $6A43 = Music_Dungeon3_branch_7ea43 + $6AEA = Music_Dungeon3_branch_7eaea + $6AF7 = Music_Dungeon3_branch_7eaf7 + $69FC = Music_Dungeon3_branch_7e9fc + $6B6D = Music_Dungeon3_branch_7eb6d + $6D19 = Music_CinnabarMansion_branch_7ed19 + $6D48 = Music_CinnabarMansion_branch_7ed48 + $6D6C = Music_CinnabarMansion_branch_7ed6c + $6D50 = Music_CinnabarMansion_branch_7ed50 + $6D4E = Music_CinnabarMansion_branch_7ed4e + $6D80 = Music_CinnabarMansion_branch_7ed80 + $6DB5 = Music_CinnabarMansion_branch_7edb5 + $6ED0 = Music_OaksLab_branch_7eed0 + $6F16 = Music_OaksLab_branch_7ef16 + $6F5C = Music_OaksLab_branch_7ef5c + $705A = Music_PokemonTower_branch_7f05a + $70EE = Music_PokemonTower_branch_7f0ee + $71A2 = Music_PokemonTower_branch_7f1a2 + $73F0 = Music_SilphCo_branch_7f3f0 + $726D = Music_SilphCo_branch_7f26d + $742E = Music_SilphCo_branch_7f42e + $75C9 = Music_SilphCo_branch_7f5c9 + $76AE = Music_MeetEvilTrainer_branch_7f6ae + $76C2 = Music_MeetEvilTrainer_branch_7f6c2 + $76EE = Music_MeetEvilTrainer_branch_7f6ee + $770C = Music_MeetFemaleTrainer_branch_7f70c + $7726 = Music_MeetFemaleTrainer_branch_7f726 + $7770 = Music_MeetFemaleTrainer_branch_7f770 + $7756 = Music_MeetFemaleTrainer_branch_7f756 + $778F = Music_MeetMaleTrainer_branch_7f78f + $77B5 = Music_MeetMaleTrainer_branch_7f7b5 + $77EA = Music_MeetMaleTrainer_branch_7f7ea + $7A30 = Music_Surfing_branch_7fa30 + $7AAE = Music_Surfing_branch_7faae + $7B03 = Music_Surfing_branch_7fb03 + $7BC5 = Music_HallOfFame_branch_7fbc5 + $7BDF = Music_HallOfFame_branch_7fbdf + $7BFE = Music_HallOfFame_branch_7fbfe + $7FA4 = Music_Credits_branch_7ffa4 + $7FAE = Music_Credits_branch_7ffae + $7FB8 = Music_Credits_branch_7ffb8 + $7FC1 = Music_Credits_branch_7ffc1 + $7FD2 = Music_Credits_branch_7ffd2 + $7FDB = Music_Credits_branch_7ffdb + $7FE4 = Music_Credits_branch_7ffe4 + $7FED = Music_Credits_branch_7ffed + SLACK: $0006 bytes + +Bank #32: + SECTION: $4000-$6AAE ($2AAF bytes) + $47F2 = _MtMoon1BattleText6 + $4B9E = _MtMoon3BattleText4 + $4F4B = _SSAnne3Text1 + $660F = _SilphCo2EndBattleText3 + $6617 = _SilphCo2AfterBattleText3 + $6785 = _SilphCo3EndBattleText2 + $6799 = _SilphCo3AfterBattleText2 + $485D = _MtMoon1BattleText7 + $4C0E = _MtMoon3BattleText5 + $6682 = _SilphCo2EndBattleText4 + $668D = _SilphCo2AfterBattleText4 + $684B = _SilphCo4EndBattleText2 + $6853 = _SilphCo4AfterBattleText2 + $4143 = _OaksAideHiText + $48C9 = _MtMoon1BattleText8 + $4F88 = _SSAnne5Text1 + $5F34 = _RocketHideout1BattleText2 + $68A2 = _SilphCo4EndBattleText3 + $68B8 = _SilphCo4AfterBattleText3 + $69CF = _SilphCo5EndBattleText2 + $69D6 = _SilphCo5AfterBattleText2 + $4D9A = _SSAnneRivalBeforeBattleText + $4FBB = _SSAnne5Text2 + $50E5 = _SSAnne6Text1 + $5F84 = _RocketHideout1BattleText3 + $60BB = _RocketHideout2BattleText2 + $6908 = _SilphCo4EndBattleText4 + $6916 = _SilphCo4AfterBattleText4 + $6A32 = _SilphCo5EndBattleText3 + $6A43 = _SilphCo5AfterBattleText3 + $4FDA = _SSAnne5Text3 + $5116 = _SSAnne6Text2 + $5FD9 = _RocketHideout1BattleText4 + $6140 = _RocketHideout3BattleText2 + $6283 = _RocketHideout4Text_45584 + $5137 = _SSAnne6Text3 + $5480 = _SSAnne7Text2 + $6020 = _RocketHideout1BattleText5 + $6326 = _RocketHideout4BattleText2 + $5155 = _SSAnne6Text4 + $549D = _SSAnne7Text3 + $6078 = _RocketHideout1BattleText6 + $638F = _RocketHideout4BattleText3 + $40D2 = _MartSignText + $518E = _SSAnne6Text5 + $5347 = _ReceivingHM01Text + $63E2 = _RocketHideout4BattleText4 + $51C9 = _SSAnne6Text6 + $502D = _SSAnne5EndBattleText1 + $5040 = _SSAnne5AfterBattleText1 + $56C7 = _SSAnne8Text5 + $508E = _SSAnne5EndBattleText2 + $50A4 = _SSAnne5AfterBattleText2 + $56F2 = _SSAnne8Text6 + $6454 = _SilphCo2Text_59ded + $42D9 = _OaksAideGotItemText + $5714 = _SSAnne8Text7 + $653E = _SilphCo2BattleText1 + $54D7 = _SSAnne8Text8 + $552E = _SSAnne8EndBattleText1 + $5541 = _SSAnne8AfterBattleText1 + $65A4 = _SilphCo2BattleText2 + $66FE = _SilphCo3BattleText1 + $5582 = _SSAnne8EndBattleText2 + $559A = _SSAnne8AfterBattleText2 + $5736 = _SSAnne8Text9 + $5956 = _SSAnne9EndBattleText1 + $597B = _SSAnne9AfterBattleText1 + $61FC = _RocketHide3AfterBattleText3 + $6363 = _RocketHide4AfterBattleText2 + $65F1 = _SilphCo2BattleText3 + $6753 = _SilphCo3BattleText2 + $5273 = _SSAnne6Text_61811 + $55D3 = _SSAnne8EndBattleText3 + $55E7 = _SSAnne8AfterBattleText3 + $59B9 = _SSAnne9EndBattleText2 + $59C6 = _SSAnne9AfterBattleText2 + $5DBF = _VictoryRoad3EndBattleText2 + $5DD6 = _VictoryRoad3AfterBattleText2 + $63C4 = _RocketHide4AfterBattleText3 + $665F = _SilphCo2BattleText4 + $681E = _SilphCo4BattleText2 + $4096 = _GroundRoseText + $564E = _SSAnne8EndBattleText4 + $5679 = _SSAnne8AfterBattleText4 + $5A29 = _SSAnne9EndBattleText3 + $5A3D = _SSAnne9AfterBattleText3 + $5E1E = _VictoryRoad3EndBattleText3 + $5E2B = _VictoryRoad3AfterBattleText3 + $66DE = _SilphCo3Text_59ffe + $6882 = _SilphCo4BattleText3 + $69AA = _SilphCo5BattleText2 + $5A7C = _SSAnne9EndBattleText4 + $5A8B = _SSAnne9AfterBattleText4 + $5E6F = _VictoryRoad3EndBattleText4 + $5E83 = _VictoryRoad3AfterBattleText4 + $68F5 = _SilphCo4BattleText4 + $6A07 = _SilphCo5BattleText3 + $5EEC = _VictoryRoad3EndBattleText5 + $5EFC = _VictoryRoad3AfterBattleText5 + $6A81 = _SilphCo5BattleText4 + $4553 = _ViridianForestText10 + $4584 = _ViridianForestText11 + $4EB6 = _SSAnneRivalCaptainText + $5203 = _SSAnne6Text_61807 + $52A6 = _SSAnne6Text_61816 + $541C = _SSAnne7Text_61932 + $4045 = _TrainerNameText + $45C6 = _ViridianForestText12 + $4613 = _ViridianForestText13 + $4667 = _ViridianForestText14 + $4A01 = _MtMoon3Text_49f8a + $500B = _SSAnne5BattleText1 + $5070 = _SSAnne5BattleText2 + $6418 = _RocketHideout4Text_455ec + $4061 = _NothingHereText + $412A = _NoMoreRoomForItemText + $4995 = _MtMoon3Text_49f6f + $54F1 = _SSAnne8BattleText1 + $49A8 = _MtMoon3Text_49f7f + $5561 = _SSAnne8BattleText2 + $5926 = _SSAnne9BattleText1 + $40FC = _PokeCenterSignText + $493A = _MtMoon1Text14 + $4A11 = _MtMoon3Text_49f8f + $55BD = _SSAnne8BattleText3 + $599C = _SSAnne9BattleText2 + $5D9B = _VictoryRoad3BattleText2 + $4E57 = _SSAnneRivalDefeatedText + $561B = _SSAnne8BattleText4 + $59FC = _SSAnne9BattleText3 + $5DF9 = _VictoryRoad3BattleText3 + $5A5D = _SSAnne9BattleText4 + $5E4F = _VictoryRoad3BattleText4 + $67E4 = _SilphCo4Text_19de0 + $5EC1 = _VictoryRoad3BattleText5 + $4082 = _ItsABiteText + $52DD = _SSAnne7RubText + $5F66 = _RocketHideout1AfterBattleTxt2 + $6803 = _SilphCo4Text_19de5 + $5FAB = _RocketHideout1AfterBattleTxt3 + $60FD = _RocketHideout2AfterBattleTxt2 + $4119 = _FoundItemText + $540D = _ReceivedHM01Text + $5FF9 = _RocketHideout1AfterBattleTxt4 + $617A = _RocketHideout3AfterBattleTxt2 + $6047 = _RocketHideout1AfterBattleTxt5 + $4029 = _CardKeyFailText + $6097 = _RocketHideout1AfterBattleTxt6 + $6438 = _RocketElevatorText_4578b + $64C9 = _TM36ExplanationText + $6936 = _SilphCo5Text_1a010 + $5799 = _SSAnne9Text_61bf2 + $5854 = _SSAnne9Text_61c1f + $58A8 = _SSAnne9Text_61c2e + $58DB = _SSAnne9Text_61c3d + $5905 = _SSAnne9Text_61c4c + $431D = _ViridianForestText1 + $495E = _MtMoon3Text_49f24 + $66B9 = _SilphCo3Text_59ff9 + $6978 = _SilphCo5Text_1a015 + $4979 = _MtMoon3Text_49f64 + $623E = _RocketHideout4Text_4557a + $4387 = _ViridianForestEndBattleText1 + $44C7 = _ViridianForestText8 + $545D = _HM01NoRoomText + $4093 = _ExclamationText + $41E4 = _OaksAideUhOhText + $43F2 = _ViridianForestEndBattleText2 + $450A = _ViridianForestText9 + $49CC = _MtMoon3Text_49f85 + $4A37 = _MtMoon3Text_49f94 + $404D = _NoNibbleText + $4458 = _ViridianForestEndBattleText3 + $5D4C = _SSAnne10Text7 + $5AAA = _SSAnne10Text8 + $5AF7 = _SSAnne10EndBattleText1 + $5B11 = _SSAnne10AfterBattleText1 + $626C = _RocketHideout4Text_4557f + $5759 = _SSAnne8Text11 + $5B52 = _SSAnne10EndBattleText2 + $5B68 = _SSAnne10AfterBattleText2 + $428C = _OaksAideHereYouGoText + $5BB4 = _SSAnne10EndBattleText3 + $5BC9 = _SSAnne10AfterBattleText3 + $46BF = _MtMoon1EndBattleText2 + $46D4 = _MtMoon1AfterBattleText2 + $4A93 = _MtMoon3Text_49f99 + $5C12 = _SSAnne10EndBattleText4 + $5C22 = _SSAnne10AfterBattleText4 + $64BA = _ReceivedTM36Text + $43A2 = _ViridianFrstAfterBattleText1 + $4713 = _MtMoon1EndBattleText3 + $4723 = _MtMoon1AfterBattleText3 + $5C7F = _SSAnne10EndBattleText5 + $5C97 = _SSAnne10AfterBattleText5 + $440B = _ViridianFrstAfterBattleText2 + $4778 = _MtMoon1EndBattleText4 + $4788 = _MtMoon1AfterBattleText4 + $4AF6 = _MtMoon3EndBattleText2 + $4B09 = _MtMoon3AfterBattleText2 + $5D01 = _SSAnne10EndBattleText6 + $5D21 = _SSAnne10AfterBattleText6 + $4475 = _ViridianFrstAfterBattleText3 + $47C1 = _MtMoon1EndBattleText5 + $47D3 = _MtMoon1AfterBattleText5 + $4B61 = _MtMoon3EndBattleText3 + $4B6D = _MtMoon3AfterBattleText3 + $57F5 = _SSAnne9Text_61c01 + $5833 = _SSAnne9Text_61c10 + $4824 = _MtMoon1EndBattleText6 + $482D = _MtMoon1AfterBattleText6 + $4BCB = _MtMoon3EndBattleText4 + $4BDE = _MtMoon3AfterBattleText4 + $488E = _MtMoon1EndBattleText7 + $489B = _MtMoon1AfterBattleText7 + $4C39 = _MtMoon3EndBattleText5 + $4C46 = _MtMoon3AfterBattleText5 + $4E81 = _SSAnneRivalWonText + $42EC = _OaksAideNoRoomText + $48F8 = _MtMoon1EndBattleText8 + $4901 = _MtMoon1AfterBattleText8 + $5F58 = _RocketHideout1EndBattleText2 + $4359 = _ViridianForestBattleText1 + $5233 = _SSAnne6Text_6180c + $5FA3 = _RocketHideout1EndBattleText3 + $60EF = _RocketHideout2EndBattleText2 + $43C3 = _ViridianForestBattleText2 + $5FEA = _RocketHideout1EndBattleText4 + $6168 = _RocketHideout3EndBattleText2 + $40B1 = _BoulderText + $4438 = _ViridianForestBattleText3 + $6038 = _RocketHideout1EndBattleText5 + $61E9 = _RocketHideout3EndBattleText3 + $6354 = _RocketHideout4EndBattleText2 + $5AC3 = _SSAnne10BattleText1 + $5F2A = _RocketHideout1EndBattleText6 + $63BC = _RocketHideout4EndBattleText3 + $5B33 = _SSAnne10BattleText2 + $6413 = _RocketHideout4EndBattleText4 + $5B99 = _SSAnne10BattleText3 + $4692 = _MtMoon1BattleText2 + $5BF3 = _SSAnne10BattleText4 + $46F5 = _MtMoon1BattleText3 + $5C52 = _SSAnne10BattleText5 + $651C = _TM36NoRoomText + $4000 = _CardKeySuccessText1 + $4250 = _OaksAideComeBackText + $474B = _MtMoon1BattleText4 + $4AB3 = _MtMoon3BattleText2 + $4C70 = _SSAnne1Text1 + $5CC3 = _SSAnne10BattleText6 + $655A = _SilphCo2EndBattleText1 + $657C = _SilphCo2AfterBattleText1 + $4009 = _CardKeySuccessText2 + $47A5 = _MtMoon1BattleText5 + $495C = _MtMoonText1 + $4B3B = _MtMoon3BattleText3 + $4CE6 = _SSAnne1Text2 + $4D34 = _SSAnne2Text1 + $61B8 = _RocketHideout3BattleTxt + $65C3 = _SilphCo2EndBattleText2 + $65D0 = _SilphCo2AfterBattleText2 + $671A = _SilphCo3EndBattleText1 + $6726 = _SilphCo3AfterBattleText1 + SLACK: $1551 bytes + +Bank #33: + SECTION: $4000-$6CA0 ($2CA1 bytes) + $587B = _SafariZoneRestHouse1Text2 + $5A2F = _SafariZoneRestHouse2Text1 + $4DA1 = _SilphCo10Text_5a1d8 + $5A7A = _SafariZoneRestHouse2Text2 + $5AD9 = _SafariZoneRestHouse3Text1 + $40A4 = _SilphCo5Text9 + $5AA6 = _SafariZoneRestHouse2Text3 + $5B0B = _SafariZoneRestHouse3Text2 + $5B62 = _SafariZoneRestHouse4Text1 + $432A = _SilphCo6EndBattleText2 + $4336 = _SilphCo6AfterBattleText2 + $471D = _SilphCo7EndBattleText1 + $472A = _SilphCo7AfterBattleText1 + $5B40 = _SafariZoneRestHouse3Text3 + $5BD5 = _SafariZoneRestHouse4Text2 + $4000 = _SilphCo5EndBattleText4 + $400E = _SilphCo5AfterBattleText4 + $43A4 = _SilphCo6EndBattleText3 + $43AC = _SilphCo6AfterBattleText3 + $4786 = _SilphCo7EndBattleText2 + $4790 = _SilphCo7AfterBattleText2 + $4B18 = _SilphCo8EndBattleText1 + $4B2A = _SilphCo8AfterBattleText1 + $5C17 = _SafariZoneRestHouse4Text3 + $4060 = _SilphCo5EndBattleText5 + $4073 = _SilphCo5AfterBattleText5 + $43F6 = _SilphCo6EndBattleText4 + $4404 = _SilphCo6AfterBattleText4 + $47E2 = _SilphCo7EndBattleText3 + $47FB = _SilphCo7AfterBattleText3 + $4B73 = _SilphCo8EndBattleText2 + $4B81 = _SilphCo8AfterBattleText2 + $4C7F = _SilphCo9EndBattleText1 + $4C88 = _SilphCo9AfterBattleText1 + $55E0 = _SafariZoneEastText5 + $6567 = _GaryText_7612a + $4430 = _MeetLaprasGuyText + $4852 = _SilphCo7EndBattleText4 + $4861 = _SilphCo7AfterBattleText4 + $488D = _SilphCo7Text_51ebe + $4975 = _SilphCo7Text_51ecd + $4BD5 = _SilphCo8EndBattleText3 + $4BE9 = _SilphCo8AfterBattleText3 + $4CE4 = _SilphCo9EndBattleText2 + $4CF6 = _SilphCo9AfterBattleText2 + $55EC = _SafariZoneEastText6 + $4D57 = _SilphCo9EndBattleText3 + $4D70 = _SilphCo9AfterBattleText3 + $53C7 = _Mansion2Text_520c2 + $562B = _SafariZoneEastText7 + $5D3C = _LanceBeforeBattleText + $6970 = _AgathaEndBattleText + $6998 = _AgathaAfterBattleText + $5CA2 = _VictoryRoad1EndBattleText1 + $5CAF = _VictoryRoad1AfterBattleText1 + $60E1 = _GaryText_760f4 + $53E3 = _Mansion2Text_520c7 + $5D07 = _VictoryRoad1EndBattleText2 + $5D1A = _VictoryRoad1AfterBattleText2 + $4C39 = _SilphCo9Text_5d8ea + $4306 = _SilphCo6BattleText2 + $46FF = _SilphCo7BattleText1 + $623B = _GaryText_760f9 + $435E = _SilphCo6BattleText3 + $449E = _HeresYourLaprasText + $475B = _SilphCo7BattleText2 + $4AFD = _SilphCo8BattleText1 + $403C = _SilphCo5BattleText5 + $43D8 = _SilphCo6BattleText4 + $47BE = _SilphCo7BattleText3 + $4B57 = _SilphCo8BattleText2 + $4C48 = _SilphCo9Text_5d8ef + $4C5C = _SilphCo9BattleText1 + $482D = _SilphCo7BattleText4 + $4BB1 = _SilphCo8BattleText3 + $4CB6 = _SilphCo9BattleText2 + $4F63 = _ReceivedSilphCoMasterBallText + $6805 = _BrunoEndBattleText + $681D = _BrunoAfterBattleText + $4D33 = _SilphCo9BattleText3 + $63C1 = _GaryText2 + $4176 = _SilphCo6Text_1a24a + $5957 = _HM03ExplanationText + $4F74 = _SilphCo10Text_6231c + $65EF = _LoreleiBeforeBattleText + $42A7 = _SilphCo6Text_1a2a6 + $5C79 = _VictoryRoad1BattleText1 + $5CD3 = _VictoryRoad1BattleText2 + $41A4 = _SilphCo6Text_1a24f + $4220 = _SilphCo6Text_1a27d + $529A = _SilphCo10Text_6237b + $5719 = _SafariZoneWestText5 + $684B = _UnnamedText_763d2 + $5336 = _Mansion2Text3 + $5725 = _SafariZoneWestText6 + $5389 = _Mansion2Text4 + $57A3 = _SafariZoneWestText7 + $63CA = _GaryText_76120 + $424F = _SilphCo6Text_1a28f + $46E2 = _SilphCo7Text_51e4b + $48A2 = _SilphCo7Text_51ec3 + $49BD = _SilphCo7Text_51ed2 + $57ED = _SafariZoneWestText8 + $632F = _GaryText_76103 + $4E9B = _SilphCoPresidentText + $54A3 = _Mansion3Text5 + $5013 = _SilphCoMasterBallNoRoomText + $52EA = _Mansion2EndBattleText1 + $5302 = _Mansion2AfterBattleText1 + $541C = _Mansion3EndBattleText1 + $5423 = _Mansion3AfterBattleText1 + $5583 = _Mansion4Text7 + $6463 = _GaryText_76125 + $686B = _AgathaBeforeBattleText + $45F6 = _CanceledMasterBallText + $494A = _SilphCo7Text_51ec8 + $5460 = _Mansion3EndBattleText2 + $5475 = _Mansion3AfterBattleText2 + $54F7 = _Mansion4EndBattleText1 + $54FF = _Mansion4AfterBattleText1 + $5541 = _Mansion4EndBattleText2 + $5555 = _Mansion4AfterBattleText2 + $4599 = _LaprasGuySavedText + $4AC4 = _SilphCo8Text_565be + $5943 = _ReceivedHM03Text + $502F = _SilphCo11Text2 + $5075 = _SilphCo11Text3 + $6729 = _LoreleiText2 + $40F2 = _SilphCo5Text10 + $4C0B = _SilphCo9Text_5d8e5 + $4134 = _SilphCo5Text11 + $6749 = _BrunoBeforeBattleText + $4DF5 = _SilphCo10EndBattleText1 + $4E02 = _SilphCo10AfterBattleText1 + $4E52 = _SilphCo10EndBattleText2 + $4E66 = _SilphCo10AfterBattleText2 + $5119 = _SilphCo10Text_62330 + $51F8 = _SilphCo11EndBattleText1 + $5209 = _SilphCo11AfterBattleText1 + $52B7 = _Mansion2BattleText1 + $6A43 = _RockTunnel2EndBattleText2 + $6A59 = _RockTunnel2AfterBattleText2 + $5257 = _SilphCo11EndBattleText2 + $526A = _SilphCo11AfterBattleText2 + $5401 = _Mansion3BattleText1 + $6A8E = _RockTunnel2EndBattleText3 + $6AA2 = _RockTunnel2AfterBattleText3 + $41C4 = _SilphCo6Text_1a261 + $5444 = _Mansion3BattleText2 + $54DF = _Mansion4BattleText1 + $6AED = _RockTunnel2EndBattleText4 + $6B04 = _RockTunnel2AfterBattleText4 + $455A = _LaprasGuyText + $45B4 = _SilphCo7Text_51e00 + $5521 = _Mansion4BattleText2 + $6B53 = _RockTunnel2EndBattleText5 + $6B66 = _RockTunnel2AfterBattleText5 + $6BBC = _RockTunnel2EndBattleText6 + $6BE0 = _RockTunnel2AfterBattleText6 + $5131 = _SilphCo10Text_62335 + $6C3F = _RockTunnel2EndBattleText7 + $6C4C = _RockTunnel2AfterBattleText7 + $5A02 = _HM03NoRoomText + $6C94 = _RockTunnel2EndBattleText8 + $41E7 = _SilphCo6Text_1a266 + $69FD = _AgathaText2 + $4286 = _SilphCo6Text_1a294 + $4633 = _SilphCo7Text_51e23 + $5C72 = _UnknownDungeon3MewtwoText + $5FB5 = _HallofFameRoomText1 + $41FF = _SilphCo6Text_1a278 + $53F1 = _Mansion2Text_520cc + $5646 = _SafariZoneNorthText3 + $5652 = _SafariZoneNorthText4 + $5E64 = _LanceEndBattleText + $5E9E = _LanceAfterBattleText + $4DC5 = _SilphCo10BattleText1 + $5681 = _SafariZoneNorthText5 + $4670 = _SilphCo7Text_51e28 + $46A2 = _SilphCo7Text_51e46 + $4E35 = _SilphCo10BattleText2 + $51D6 = _SilphCo11BattleText1 + $5689 = _SafariZoneNorthText6 + $6A1D = _RockTunnel2BattleText2 + $5227 = _SilphCo11BattleText2 + $56DF = _SafariZoneNorthText7 + $62B4 = _GaryText_760fe + $6A6E = _RockTunnel2BattleText3 + $4AE6 = _SilphCo8Text_565c3 + $6ACB = _RockTunnel2BattleText4 + $6B2F = _RockTunnel2BattleText5 + $6B91 = _RockTunnel2BattleText6 + $6C10 = _RockTunnel2BattleText7 + $6C77 = _RockTunnel2BattleText8 + $42DD = _SilphCo6Text_1a2ab + $5807 = _SafariZoneCenterText2 + $4D8D = _SilphCo10Text_5a1d3 + $5813 = _SafariZoneCenterText3 + $58A4 = _SecretHouseText_4a350 + $66C4 = _LoreleiEndBattleText + $66D3 = _LoreleiAfterBattleText + $5851 = _SafariZoneRestHouse1Text1 + SLACK: $135F bytes + +Bank #34: + SECTION: $4000-$6D21 ($2D22 bytes) + $41AE = _OutOfCoinsSlotMachineText + $5557 = _IndigoPlateauStatuesText1 + $5CD6 = _EnemysWeakText + $6177 = _CantDepositLastMonText + $6B18 = _SaffronGateText_1dff1 + $5567 = _IndigoPlateauStatuesText2 + $5677 = _EnemyRanText + $584B = _AlreadyOutText + $5FBE = _WhatDoYouWantText + $5001 = _LinkCableHelpText1 + $5596 = _IndigoPlateauStatuesText3 + $5689 = _HurtByPoisonText + $5968 = _DisabledNoMoreText + $6AD2 = _SaffronGateText_8aaa9 + $4EC1 = _FightingDojoText_52a10 + $5027 = _LinkCableHelpText2 + $550B = _FoundHiddenCoinsText + $55C1 = _PokemonBooksText + $5C4F = _EnemyAppearedText + $5E65 = _ParlyzHealText + $62CD = _WhichPrizeText + $6329 = _OopsYouDontHaveEnoughRoomText + $504B = _LinkCableInfoText1 + $5A29 = _MoveIsDisabledText + $5BC2 = _GainedText + $6A85 = _SaffronGateText_1dfe7 + $6B9D = _SaffronGateText_1dff6 + $50BD = _LinkCableInfoText2 + $5C9E = _GhostCantBeIDdText + $50E8 = _LinkCableInfoText3 + $5110 = _ViridianSchoolBlackboardText1 + $5A40 = _MonName1Text + $60C9 = _WhatToTossText + $6BFD = _DayCareMText_56414 + $6C5B = _DayCareMText_56423 + $6CEA = _DayCareMText_56432 + $4C6F = _TurnPageText + $514E = _ViridianSchoolBlackboardText2 + $5CC3 = _DoItText + $66A0 = _WillBeTradedText + $46C9 = _BookcaseText + $47B7 = _CinnabarGymQuizIntroText + $5934 = _FullyParalyzedText + $5D53 = _SafariZoneEatingText + $5DF1 = _PartyMenuBattleText + $607E = _WithdrewItemText + $46A4 = _CeladonCityHotelText + $4FD5 = _KabutopsFossilText + $55DE = _DiglettSculptureText + $699F = _MtMoonPokecenterText_4935c + $6A62 = _MtMoonPokecenterText_4936b + $4426 = _UnusedBenchGuyText1 + $59DB = _UnleashedEnergyText + $5B20 = _TurnedAwayText + $4124 = _TradeWavesFarewellText + $4442 = _UnusedBenchGuyText2 + $5AE5 = _LoafingAroundText + $6C19 = _DayCareMText_56419 + $6CA6 = _DayCareMText_56428 + $4075 = _SeafoamIslands5BattleText2 + $4460 = _UnusedBenchGuyText3 + $561F = _PokemonStuffText + $5E08 = _PartyMenuUseTMText + $6036 = _NoRoomToStoreText + $6C90 = DayCareMText_8ac67 + $5AC9 = _CriticalHitText + $6000 = _ItemWasStoredText + $6288 = _CF4BExclamationText + $630B = _SorryNeedMoreCoinsText + $662E = _DoYouWantToNicknameText + $40EF = _TradeWentToText + $471A = _SaveOptionText + $49CF = _BillsHouseMonitorText + $58C7 = _ScaredText + $5AFD = _BeganToNapText + $6726 = _ViridianForestExitText1 + $4F08 = _IndigoPlateauHQText + $5892 = _NoMovesLeftText + $62E7 = _HereYouGoText + $6786 = _ViridianForestExitText2 + $53A7 = _VermilionGymTrashText + $56B3 = _HurtByLeechSeedText + $56DD = _MoneyForWinningText + $570C = _PlayerMonFaintedText + $598E = _HurtItselfText + $5A44 = _Used1Text + $6131 = _SwitchOnText + $6914 = _MtMoonPokecenterText1 + $416A = _TradeWillTradeText + $4B75 = _GameCornerNoCoinsText + $57C9 = _NoWillText + $58AA = _MultiHitText + $5920 = _IsFrozenText + $5A4D = _Used2Text + $5AD8 = _OHKOText + $5D80 = _PickUpPayDayMoneyText + $5EE2 = _RareCandyText + $5FD7 = _WhatToDepositText + $640D = _LinkCanceledText + $6952 = _MtMoonPokecenterText3 + $41F7 = _OneMoreGoSlotMachineText + $6268 = _MonWasReleasedText + $4B5B = _GameCornerCoinCaseText + $4BED = _JustAMomentText + $58E3 = _GetOutText + $6073 = _WithdrawHowManyText + $66D0 = _DiglettsCaveRoute2Text1 + $6A83 = _MtMoonPokecenterText5 + $4226 = _NotThisTimeText + $5B96 = _MirrorMoveFailedText + $5DC8 = _PartyMenuNormalText + $4A25 = _BillsHousePokemonListText1 + $53C6 = _VermilionGymTrashSuccesText1 + $4A40 = _BillsHousePokemonListText2 + $5418 = _VermilionGymTrashSuccesText2 + $5914 = _WokeUpText + $5A05 = _AttackContinuesText + $5BAF = _HitXTimesText + $5CF0 = _PlayerMon1Text + $5D22 = _SupperEffectiveText + $634C = _OhFineThenText + $4180 = _TradeforText + $4A60 = _OakLabEmailText + $5451 = _VermilionGymTrashSuccesText3 + $5B10 = _WontObeyText + $5CF6 = _PlayerMon2Text + $5B32 = _IgnoredOrdersText + $5E4B = _AntidoteText + $43C2 = _MtMoonPokecenterBenchGuyText + $5C33 = _HookedMonAttackedText + $4150 = _TradeTakeCareText + $4742 = _StrengthsAndWeaknessesText + $4BFD = TMNotebookText + $5D96 = _ClearSaveDataText + $423E = _DexSeenOwnedText + $42D7 = _ViridianCityPokecenterGuyText + $4B8F = _GameCornerOutOfOrderText + $4236 = _YeahText + $4267 = _DexRatingText + $5860 = _MoveNoPPText + $623D = _OnceReleasedText + $639A = _AccessedOaksPCText + $548C = _VermilionGymTrashFailText + $5D15 = _ComeBackText + $5DD8 = _PartyMenuItemUseText + $60F4 = _AccessedHoFPCText + $59B0 = _ConfusedNoMoreText + $5B47 = _SubstituteTookDamageText + $5D0D = _GoodText + $5B80 = _BuildingRageText + $6521 = _IntroducePlayerText + $6A15 = _MtMoonPokecenterText_49361 + $45AF = _CinnabarPokecenterGuyText + $5CFD = _EnoughText + $41DC = _StartSlotMachineText + $4275 = _GymStatueText1 + $55FB = _ElevatorText + $587B = _MoveDisabledText + $5C73 = _UnveiledGhostText + $5F45 = _AccessedSomeonesPCText + $4206 = _LinedUpText + $42A5 = _GymStatueText2 + $5666 = _WildRanText + $5CCD = _GetmText + $5772 = _LinkBattleLostText + $5A67 = _ExclamationPoint1Text + $5C01 = _GrewLevelText + $57E3 = _CantEscapeText + $5A6A = _ExclamationPoint2Text + $5D38 = _NotVeryEffectiveText + $6A40 = _MtMoonPokecenterText_49366 + $448E = _VermilionPokecenterGuyText + $54D0 = _FoundHiddenItemText + $5831 = _ItemsCantBeUsedHereText + $5A6D = _ExclamationPoint3Text + $52B5 = _ViridianBlackboardBurnText + $5A62 = _CF4BText + $5A70 = _ExclamationPoint4Text + $5CBC = _GoText + $5E1F = _PartyMenuSwapMonText + $4BAD = _GameCornerOutToLunchText + $5A73 = _ExclamationPoint5Text + $60E9 = _TossHowManyText + $532F = _ViridianBlackboardFrozenText + $608F = _NothingStoredText + $613D = _WhatText + $6610 = _BoyGirlText + $5C1D = _WildMonAppearedText + $66BF = _Char00Text + $5EA8 = _AwakeningText + $5ECD = _ReviveText + $413B = _TradeTransferredText + $43FC = _RockTunnelPokecenterGuyText + $51DE = _ViridianBlackboardPoisonText + $6228 = _ReleaseWhichMonText + $4531 = _CeladonCityPokecenterGuyText + $49FB = _BillsHouseInitiatedText + $581F = _GotAwayText + $6198 = _BoxFullText + $4621 = _SaffronCityPokecenterGuyText1 + $4EF9 = _FightingDojoText + $5AB4 = _DoesntAffectMonText + $6018 = _NothingToDepositText + $4664 = _SaffronCityPokecenterGuyText2 + $5A76 = _AttackMissedText + $5BD0 = _WithExpAllText + $5C5E = _TrainerWantsToFightText + $5F7A = _AccessedMyPCText + $572A = _Sony1WinText + $628E = _RequireCoinCaseText + $4000 = _RockTunnel2AfterBattleText8 + $4353 = _CeruleanPokecenterGuyText + $56C7 = _EnemyMonFaintedText + $67E1 = _Route2HouseText1 + $4042 = _RockTunnel2EndBattleText9 + $4057 = _RockTunnel2AfterBattleText9 + $46E6 = _NewBicycleText + $4F58 = _Route15UpstairsBinocularsText + $5523 = _FoundHiddenCoins2Text + $5FF5 = _DepositHowManyText + $4386 = _LavenderPokecenterGuyText + $5784 = _TrainerAboutToUseText + $5E31 = _PotionText + $61D7 = _NoMonText + $6488 = _OakSpeechText2A + $4ED9 = _FightingDojoText_52a1d + $4FA7 = _AerodactylFossilText + $54E1 = _HiddenItemBagFullText + $57F1 = _NoRunningText + $5B6A = _SubstituteBrokeText + $64BC = _OakSpeechText2B + $66CC = _Char55Text + $40BE = _AIBattleWithdrawText + $49A1 = _MagazinesText + $56F9 = _TrainerDefeatedText + $5901 = _FastAsleepText + $5EB6 = _FullHealText + $635D = _GetDexRatedText + $6891 = _ViridianForestEntranceText1 + $6BBE = _DayCareMText_5640f + $6C42 = _DayCareMText_5641e + $6CD7 = _DayCareMText_5642d + $498F = _CinnabarGymQuizIncorrectText + $5639 = _OutOfSafariBallsText + $5A89 = _KeptGoingAndCrashedText + $637B = _ClosedOaksPCText + $68D4 = _ViridianForestEntranceText2 + $430C = _PewterCityPokecenterGuyText + $486D = _CinnabarQuizQuestionsText1 + $524B = _ViridianBlackbaordPrlzText + $5611 = _TownMapText + $62A9 = _ExchangeCoinsForPrizesText + $6825 = _Route2GateText_5d616 + $477E = _TimesUpText + $4890 = _CinnabarQuizQuestionsText2 + $5D07 = _OKExclamationText + $6054 = _WhatToWithdrawText + $6159 = _MonWasStoredText + $40D5 = _AIBattleUseItemText + $48BB = _CinnabarQuizQuestionsText3 + $5748 = _PlayerBlackedOutText2 + $5A56 = _InsteadText + $5E7D = _BurnHealText + $61F6 = _CantTakeMonText + $6658 = _YourNameIsText + $4112 = _TradeSendsText + $41E4 = _NotEnoughCoinsSlotMachineText + $455F = _FuchsiaCityPokecenterGuyText + $48D5 = _CinnabarQuizQuestionsText4 + $4964 = _CinnabarGymQuizCorrectText + $59F0 = _ThrashingAboutText + $61B9 = _MonIsTakenOutText + $62F6 = _SoYouWantPrizeText + $6425 = _OakSpeechText1 + $418F = _PlaySlotMachineText + $41C7 = _BetHowManySlotMachineText + $4915 = _CinnabarQuizQuestionsText5 + $4CA3 = _ViridianSchoolNotebookText1 + $5F13 = _AccessedBillsPCText + $63D0 = _WhereWouldYouLikeText + $4949 = _CinnabarQuizQuestionsText6 + $4BCD = _GameCornerSomeonesKeysText + $4D46 = _ViridianSchoolNotebookText2 + $5956 = _MustRechargeText + $63ED = _PleaseWaitText + $65A1 = _OakSpeechText3 + $4DBD = _ViridianSchoolNotebookText3 + $4798 = _GameOverText + $4E2C = _ViridianSchoolNotebookText4 + $57B4 = _TrainerSentOutText + $4027 = _RockTunnel2BattleText9 + $4103 = _TradeForText + $4C7F = _ViridianSchoolNotebookText5 + $5172 = _ViridianBlackboardSleepText + $553B = _DroppedHiddenCoinsText + $597E = _IsConfusedText + $5BEE = _ExpPointsText + $5EFE = _TurnedOnPC1Text + $6673 = _HisNameIsText + $407E = _SeafoamIslands5Text4 + $5BE1 = _BoostedText + $5D6A = _SafariZoneAngryText + $5FA9 = _TurnedOnPC2Text + $6855 = _Route2GateText2 + $40A8 = _SeafoamIslands5Text5 + $569D = _HurtByBurnText + $5AA4 = _UnaffectedText + $5DAD = _WhichFloorText + $653E = _IntroduceRivalText + $571A = _UseNextMonText + $60A9 = _CantCarryMoreText + $6144 = _DepositWhichMonText + $46FC = _PushStartText + $59C6 = _SavingEnergyText + $4F27 = _RedBedroomSNESText + $5949 = _FlinchedText + $5A1B = _CantMoveText + $5E94 = _IceHealText + SLACK: $12DE bytes + +Bank #35: + SECTION: $4000-$6C08 ($2C09 bytes) + $493C = _TM39NoRoomText + $5A08 = _Route3BattleText6 + $5CC8 = _Route6BattleText3 + $5EA9 = _Route8BattleText1 + $5A62 = _Route3BattleText7 + $5D30 = _Route6BattleText4 + $5F06 = _Route8BattleText2 + $6291 = _Route9BattleText1 + $4CA0 = _Route16GateText_49777 + $4EF1 = _Route18GateText_49928 + $5AC0 = _Route3BattleText8 + $5D8F = _Route6BattleText5 + $5F5B = _Route8BattleText3 + $62FF = _Route9BattleText2 + $503E = _Route22GateText_1e71a + $5DE6 = _Route6BattleText6 + $5FC0 = _Route8BattleText4 + $6352 = _Route9BattleText3 + $6028 = _Route8BattleText5 + $63B1 = _Route9BattleText4 + $6092 = _Route8BattleText6 + $6411 = _Route9BattleText5 + $4020 = _DayCareMText_56440 + $42C0 = _RockTunnelPokecenterText1 + $60E9 = _Route8BattleText7 + $6491 = _Route9BattleText6 + $41C8 = _UnnamedText_5d77d + $6162 = _Route8BattleText8 + $64E2 = _Route9BattleText7 + $4316 = _RockTunnelPokecenterText3 + $4758 = _BinocularsNoSnorlaxText + $55BF = _Route1ViridianMartSampleText + $61D4 = _Route8BattleText9 + $6573 = _Route9BattleText8 + $65D2 = _Route9BattleText9 + $4041 = _DayCareMText_56445 + $40AD = _DayCareMText_56454 + $40FF = _UndergroundPathEntRoute7Text1 + $4000 = _DayCareMText_56437 + $428D = _UndergroundPathEntRoute8Text1 + $50A5 = _VictoryRoad2EndBattleText1 + $50AD = _VictoryRoad2AfterBattleText1 + $510F = _VictoryRoad2EndBattleText2 + $511C = _VictoryRoad2AfterBattleText2 + $514F = _VictoryRoad2EndBattleText3 + $515F = _VictoryRoad2AfterBattleText3 + $4689 = _Route11GateUpstairsText_494a3 + $49B3 = _Route12HouseText_564c0 + $51CA = _VictoryRoad2EndBattleText4 + $51DD = _VictoryRoad2AfterBattleText4 + $5345 = _BillsHouseText_1e86a + $5230 = _VictoryRoad2EndBattleText5 + $523C = _VictoryRoad2AfterBattleText5 + $478B = _Route11GateUpstairsText_494d5 + $4986 = _Route12GateUpstairsText_495c4 + $4A00 = _Route12HouseText_564c5 + $4AC2 = _Route12HouseText_564d4 + $4E79 = _HM02ExplanationText + $4EE0 = _Route16HouseText_1e652 + $5391 = _BillsHouseText_1e86f + $495A = _Route12GateUpstairsText_495b8 + $5B07 = _Route3Text10 + $4B38 = _Route12HouseText_564d9 + $4D90 = _Route16GateUpstairsText_4983b + $5077 = _VictoryRoad2BattleText1 + $50E1 = _VictoryRoad2BattleText2 + $5137 = _VictoryRoad2BattleText3 + $68D4 = _Route10Text7 + $4BAC = _Route15GateUpstairsText_4968c + $4D73 = _Route16GateUpstairsText_4982f + $518C = _VictoryRoad2BattleText4 + $5652 = _Route1Text_1caee + $6262 = _Route8Text10 + $667A = _Route10EndBattleText1 + $6690 = _Route10AfterBattleText1 + $5214 = _VictoryRoad2BattleText5 + $66C1 = _Route10EndBattleText2 + $66F5 = _Route10AfterBattleText2 + $68D4 = _Route10Text9 + $6902 = _Route11EndBattleText1 + $691B = _Route11AfterBattleText1 + $4FBB = _Route22GateText_1e704 + $506E = _VictoryRoad2BattleText6 + $661E = _Route9Text11 + $673A = _Route10EndBattleText3 + $674B = _Route10AfterBattleText3 + $6965 = _Route11EndBattleText2 + $6976 = _Route11AfterBattleText2 + $4132 = _UnnamedText_5d773 + $4209 = _UnnamedText_5d782 + $67A8 = _Route10EndBattleText4 + $67BD = _Route10AfterBattleText4 + $69BC = _Route11EndBattleText3 + $69D3 = _Route11AfterBattleText3 + $5012 = _Route22GateText_1e715 + $680C = _Route10EndBattleText5 + $6823 = _Route10AfterBattleText5 + $6A1C = _Route11EndBattleText4 + $6A30 = _Route11AfterBattleText4 + $6872 = _Route10EndBattleText6 + $6884 = _Route10AfterBattleText6 + $6A83 = _Route11EndBattleText5 + $6A95 = _Route11AfterBattleText5 + $4E02 = _Route16HouseText3 + $6AD5 = _Route11EndBattleText6 + $6AE5 = _Route11AfterBattleText6 + $486B = _TM39PreReceiveText + $6B1F = _Route11EndBattleText7 + $6B35 = _Route11AfterBattleText7 + $4195 = _UnnamedText_5d778 + $6B71 = _Route11EndBattleText8 + $6B99 = _Route11AfterBattleText8 + $4E66 = _ReceivedHM02Text + $471B = _BinocularsSnorlaxText + $4F83 = _Route18GateUpstairsText_4999f + $45E2 = _VoltorbBattleText + $6642 = _Route10BattleText1 + $45F3 = _Route11GateText1 + $48D9 = _TM39ExplanationText + $66B0 = _Route10BattleText2 + $68EE = _Route11BattleText1 + $484A = _Route12GateText1 + $53F5 = _BillThankYouText + $671C = _Route10BattleText3 + $6944 = _Route11BattleText2 + $435D = _RockTunnel1EndBattleText1 + $436C = _RockTunnel1AfterBattleText1 + $45B7 = _RockTunnel1Text8 + $5267 = _BillsHouseText_1e865 + $676C = _Route10BattleText4 + $69A2 = _Route11BattleText3 + $43BB = _RockTunnel1EndBattleText2 + $43E8 = _RockTunnel1AfterBattleText2 + $67E7 = _Route10BattleText5 + $69F6 = _Route11BattleText4 + $4459 = _RockTunnel1EndBattleText3 + $4462 = _RockTunnel1AfterBattleText3 + $4B73 = _Route15GateText1 + $4CCD = _Route16GateText_4977c + $4F17 = _Route18GateText_4992d + $6844 = _Route10BattleText6 + $6A51 = _Route11BattleText5 + $449A = _RockTunnel1EndBattleText4 + $44A6 = _RockTunnel1AfterBattleText4 + $4D49 = _Route16GateUpstairsText_49820 + $569F = _Route1Text2 + $6AB8 = _Route11BattleText6 + $44F4 = _RockTunnel1EndBattleText5 + $4506 = _RockTunnel1AfterBattleText5 + $4D2A = _Route16GateText2 + $5720 = _Route1Text3 + $5779 = _Route3Text1 + $6B03 = _Route11BattleText7 + $4541 = _RockTunnel1EndBattleText6 + $4552 = _RockTunnel1AfterBattleText6 + $5745 = _Route2Text3 + $5B1E = _Route4Text1 + $6B57 = _Route11BattleText8 + $458D = _RockTunnel1EndBattleText7 + $459D = _RockTunnel1AfterBattleText7 + $576A = _Route2Text4 + $5C07 = _Route5Text1 + $6BEE = _Route11BattleText9 + $40CB = _UndergrdTunnelEntRoute6Text1 + $4EBE = _HM02NoRoomText + $567C = _Route1Text_1caf3 + $5E7A = _Route7Text1 + $5BCD = _Route4Text5 + $5BE6 = _Route4Text6 + $4013 = _DayCareMText_5643b + $4063 = _DayCareMText_5644a + $57F9 = _Route3EndBattleText1 + $580D = _Route3AfterBattleText1 + $4DC6 = _Route16GateUpstairsText_49847 + $5643 = _Route1Text_1cae8 + $587F = _Route3EndBattleText2 + $5893 = _Route3AfterBattleText2 + $5B6C = _Route4EndBattleText1 + $5B88 = _Route4AfterBattleText1 + $433A = _RockTunnel1BattleText1 + $5499 = _SSTicketReceivedText + $58EE = _Route3EndBattleText3 + $58FB = _Route3AfterBattleText3 + $5E49 = _Route6Text7 + $439C = _RockTunnel1BattleText2 + $5944 = _Route3EndBattleText4 + $5966 = _Route3AfterBattleText4 + $5C5E = _Route6EndBattleText1 + $5C70 = _Route6AfterBattleText1 + $4427 = _RockTunnel1BattleText3 + $48C6 = _ReceivedTM39Text + $4C65 = _Route15GateUpstairsText_49698 + $59D1 = _Route3EndBattleText5 + $59DB = _Route3AfterBattleText5 + $5CB3 = _Route6EndBattleText2 + $4090 = _DayCareMText_5644f + $4482 = _RockTunnel1BattleText4 + $4F4A = _Route18GateUpstairsText_49993 + $5A28 = _Route3EndBattleText6 + $5A3B = _Route3AfterBattleText6 + $5CE9 = _Route6EndBattleText3 + $5CFD = _Route6AfterBattleText3 + $5ED5 = _Route8EndBattleText1 + $5EE4 = _Route8AfterBattleText1 + $44C9 = _RockTunnel1BattleText5 + $54D0 = _BillsHouseText_1e8cb + $557F = _BillsHouseText_1e8da + $5A7E = _Route3EndBattleText7 + $5A91 = _Route3AfterBattleText7 + $5D4E = _Route6EndBattleText4 + $5D61 = _Route6AfterBattleText4 + $5F26 = _Route8EndBattleText2 + $5F3C = _Route8AfterBattleText2 + $62B6 = _Route9EndBattleText1 + $62C8 = _Route9AfterBattleText1 + $4526 = _RockTunnel1BattleText6 + $5AD8 = _Route3EndBattleText8 + $5AE3 = _Route3AfterBattleText8 + $5DA8 = _Route6EndBattleText5 + $5DBA = _Route6AfterBattleText5 + $5F7E = _Route8EndBattleText3 + $5F90 = _Route8AfterBattleText3 + $6330 = _Route9EndBattleText2 + $6343 = _Route9AfterBattleText2 + $4571 = _RockTunnel1BattleText7 + $5E10 = _Route6EndBattleText6 + $5E23 = _Route6AfterBattleText6 + $5FE4 = _Route8EndBattleText4 + $5FF0 = _Route8AfterBattleText4 + $637E = _Route9EndBattleText3 + $6390 = _Route9AfterBattleText3 + $4A4F = _Route12HouseText_564ca + $6049 = _Route8EndBattleText5 + $6060 = _Route8AfterBattleText5 + $63CF = _Route9EndBattleText4 + $63E4 = _Route9AfterBattleText4 + $60B8 = _Route8EndBattleText6 + $60BF = _Route8AfterBattleText6 + $6433 = _Route9EndBattleText5 + $6461 = _Route9AfterBattleText5 + $45EA = _ZapdosBattleText + $6116 = _Route8EndBattleText7 + $612A = _Route8AfterBattleText7 + $64B6 = _Route9EndBattleText6 + $64C3 = _Route9AfterBattleText6 + $6181 = _Route8EndBattleText8 + $6198 = _Route8AfterBattleText8 + $651B = _Route9EndBattleText7 + $653E = _Route9AfterBattleText7 + $57D5 = _Route3BattleText1 + $61FA = _Route8EndBattleText9 + $6221 = _Route8AfterBattleText9 + $658D = _Route9EndBattleText8 + $65AA = _Route9AfterBattleText8 + $4AA1 = _Route12HouseText_564cf + $584C = _Route3BattleText2 + $5B4B = _Route4BattleText1 + $65EA = _Route9EndBattleText9 + $65F6 = _Route9AfterBattleText9 + $68E1 = _Route10Text10 + $4D0E = _Route16GateText_49781 + $4F3E = _Route18GateText_49932 + $58D0 = _Route3BattleText3 + $54B0 = _SSTicketNoRoomText + $5924 = _Route3BattleText4 + $5C38 = _Route6BattleText1 + $47F9 = _DiglettsCaveEntRoute11Text1 + $59A6 = _Route3BattleText5 + $5C87 = _Route6BattleText2 + SLACK: $13F7 bytes + +Bank #36: + SECTION: $4000-$6902 ($2903 bytes) + $43D9 = _Route12Text12 + $4781 = _Route13Text11 + $40BF = _Route12Text13 + $47AE = _Route13Text12 + $4C1F = _Route14Text11 + $40EF = _Route12Text14 + $47EB = _Route13Text13 + $52A8 = _Route16Text10 + $5062 = _Route15Text12 + $52D8 = _Route16Text11 + $4058 = _Route11EndBattleText10 + $406E = _Route11AfterBattleText10 + $5649 = _Route17Text11 + $5F7F = _Route20EndBattleText10 + $5F86 = _Route20AfterBattleText10 + $65A0 = _Route22Text_511d0 + $5677 = _Route17Text12 + $6606 = _Route22FrontGateText + $4702 = _Route13EndBattleText10 + $4719 = _Route13AfterBattleText10 + $56D8 = _Route17Text13 + $5C3C = _Route19Text11 + $63F4 = _Route22RivalDefeatedText1 + $4741 = _Route13EndBattleText11 + $4750 = _Route13AfterBattleText11 + $4BE7 = _Route14EndBattleText10 + $4BF4 = _Route14AfterBattleText10 + $5721 = _Route17Text14 + $6583 = _Route22RivalDefeatedText2 + $5029 = _Route15EndBattleText10 + $503F = _Route15AfterBattleText10 + $5747 = _Route17Text15 + $6779 = _Route24Text_5151a + $5782 = _Route17Text16 + $561A = _Route17EndBattleText10 + $562E = _Route17AfterBattleText10 + $688A = _Route24Text_5152b + $5BF9 = _Route19EndBattleText10 + $5C0A = _Route19AfterBattleText10 + $661E = _VictoryRoadGuardText1 + $4037 = _Route11BattleText10 + $5F53 = _Route20BattleText10 + $6696 = _VictoryRoadGuardText2 + $46EA = _Route13BattleText10 + $4724 = _Route13BattleText11 + $4BCC = _Route14BattleText10 + $500D = _Route15BattleText10 + $409E = _Route12Text1 + $5600 = _Route17BattleText10 + $5BDD = _Route19BattleText10 + $5C85 = _Route20EndBattleText1 + $5C8E = _Route20AfterBattleText1 + $414F = _Route12EndBattleText1 + $4167 = _Route12AfterBattleText1 + $5CC9 = _Route20EndBattleText2 + $5CD3 = _Route20AfterBattleText2 + $5FE2 = _Route21EndBattleText1 + $5FE9 = _Route21AfterBattleText1 + $636F = _Route22RivalAfterBattleText1 + $41AB = _Route12EndBattleText2 + $41BF = _Route12AfterBattleText2 + $5D23 = _Route20EndBattleText3 + $5D2B = _Route20AfterBattleText3 + $602A = _Route21EndBattleText2 + $603A = _Route21AfterBattleText2 + $6506 = _Route22RivalAfterBattleText2 + $420C = _Route12EndBattleText3 + $4212 = _Route12AfterBattleText3 + $440A = _Route13EndBattleText2 + $441F = _Route13AfterBattleText2 + $483F = _Route14EndBattleText1 + $4851 = _Route14AfterBattleText1 + $589D = _Route18Text4 + $5D5D = _Route20EndBattleText4 + $5D6F = _Route20AfterBattleText4 + $607E = _Route21EndBattleText3 + $6085 = _Route21AfterBattleText3 + $6700 = _Route23Text8 + $6721 = _Route24Text_51510 + $4263 = _Route12EndBattleText4 + $426F = _Route12AfterBattleText4 + $4466 = _Route13EndBattleText3 + $4474 = _Route13AfterBattleText3 + $48B8 = _Route14EndBattleText2 + $48C8 = _Route14AfterBattleText2 + $4C6E = _Route15EndBattleText1 + $4C80 = _Route15AfterBattleText1 + $5287 = _Route16Text7 + $58C3 = _Route18Text5 + $5DAC = _Route20EndBattleText5 + $5DB4 = _Route20AfterBattleText5 + $60BF = _Route21EndBattleText4 + $60CC = _Route21AfterBattleText4 + $42C8 = _Route12EndBattleText5 + $42D3 = _Route12AfterBattleText5 + $44C6 = _Route13EndBattleText4 + $44D3 = _Route13AfterBattleText4 + $4928 = _Route14EndBattleText3 + $4936 = _Route14AfterBattleText3 + $4D0A = _Route15EndBattleText2 + $4D16 = _Route15AfterBattleText2 + $5094 = _Route16EndBattleText1 + $50AA = _Route16AfterBattleText1 + $530D = _Route16Text8 + $5E0C = _Route20EndBattleText6 + $5E1E = _Route20AfterBattleText6 + $611D = _Route21EndBattleText5 + $612D = _Route21AfterBattleText5 + $678F = _Route24Text_51521 + $68A0 = _Route24Text_51530 + $4318 = _Route12EndBattleText6 + $4329 = _Route12AfterBattleText6 + $4531 = _Route13EndBattleText5 + $4548 = _Route13AfterBattleText5 + $499D = _Route14EndBattleText4 + $49B3 = _Route14AfterBattleText4 + $4D71 = _Route15EndBattleText3 + $4D84 = _Route15AfterBattleText3 + $50F1 = _Route16EndBattleText2 + $50FD = _Route16AfterBattleText2 + $532C = _Route16Text9 + $5375 = _Route17EndBattleText1 + $5382 = _Route17AfterBattleText1 + $5E58 = _Route20EndBattleText7 + $5E60 = _Route20AfterBattleText7 + $616E = _Route21EndBattleText6 + $6186 = _Route21AfterBattleText6 + $437E = _Route12EndBattleText7 + $4388 = _Route12AfterBattleText7 + $4599 = _Route13EndBattleText6 + $45AA = _Route13AfterBattleText6 + $49F7 = _Route14EndBattleText5 + $4A0A = _Route14AfterBattleText5 + $4DDC = _Route15EndBattleText4 + $4DF0 = _Route15AfterBattleText4 + $5140 = _Route16EndBattleText3 + $5151 = _Route16AfterBattleText3 + $53C9 = _Route17EndBattleText2 + $53D0 = _Route17AfterBattleText2 + $57D1 = _Route18EndBattleText1 + $57D7 = _Route18AfterBattleText1 + $5E9F = _Route20EndBattleText8 + $5EB6 = _Route20AfterBattleText8 + $61E4 = _Route21EndBattleText7 + $61F2 = _Route21AfterBattleText7 + $4000 = _Route11EndBattleText9 + $4017 = _Route11AfterBattleText9 + $45EB = _Route13EndBattleText7 + $45FD = _Route13AfterBattleText7 + $4A59 = _Route14EndBattleText6 + $4A65 = _Route14AfterBattleText6 + $4E4E = _Route15EndBattleText5 + $4E67 = _Route15AfterBattleText5 + $518D = _Route16EndBattleText4 + $5196 = _Route16AfterBattleText4 + $540E = _Route17EndBattleText3 + $541F = _Route17AfterBattleText3 + $5816 = _Route18EndBattleText2 + $5829 = _Route18AfterBattleText2 + $590C = _Route19EndBattleText1 + $591C = _Route19AfterBattleText1 + $5F06 = _Route20EndBattleText9 + $5F1B = _Route20AfterBattleText9 + $622B = _Route21EndBattleText8 + $6244 = _Route21AfterBattleText8 + $6755 = _Route24Text_51515 + $4637 = _Route13EndBattleText8 + $464E = _Route13AfterBattleText8 + $4AC1 = _Route14EndBattleText7 + $4AD8 = _Route14AfterBattleText7 + $4EAA = _Route15EndBattleText6 + $4EC1 = _Route15AfterBattleText6 + $51F5 = _Route16EndBattleText5 + $5205 = _Route16AfterBattleText5 + $5455 = _Route17EndBattleText4 + $545E = _Route17AfterBattleText4 + $5872 = _Route18EndBattleText3 + $5879 = _Route18AfterBattleText3 + $5961 = _Route19EndBattleText2 + $5975 = _Route19AfterBattleText2 + $6297 = _Route21EndBattleText9 + $62AF = _Route21AfterBattleText9 + $469E = _Route13EndBattleText9 + $46B1 = _Route13AfterBattleText9 + $4B21 = _Route14EndBattleText8 + $4B2E = _Route14AfterBattleText8 + $4F0F = _Route15EndBattleText7 + $4F19 = _Route15AfterBattleText7 + $5245 = _Route16EndBattleText6 + $5258 = _Route16AfterBattleText6 + $549A = _Route17EndBattleText5 + $54A9 = _Route17AfterBattleText5 + $59B1 = _Route19EndBattleText3 + $59BE = _Route19AfterBattleText3 + $67A8 = _Route24Text_51526 + $4B78 = _Route14EndBattleText9 + $4B83 = _Route14AfterBattleText9 + $4F8C = _Route15EndBattleText8 + $4FA0 = _Route15AfterBattleText8 + $54F4 = _Route17EndBattleText6 + $54FF = _Route17AfterBattleText6 + $59F7 = _Route19EndBattleText4 + $59FE = _Route19AfterBattleText4 + $4FDF = _Route15EndBattleText9 + $4FEE = _Route15AfterBattleText9 + $554A = _Route17EndBattleText7 + $555F = _Route17AfterBattleText7 + $5A48 = _Route19EndBattleText5 + $5A4F = _Route19AfterBattleText5 + $558A = _Route17EndBattleText8 + $5594 = _Route17AfterBattleText8 + $5A8D = _Route19EndBattleText6 + $5A9E = _Route19AfterBattleText6 + $5C69 = _Route20BattleText1 + $4134 = _Route12BattleText1 + $55D5 = _Route17EndBattleText9 + $55DD = _Route17AfterBattleText9 + $5AF4 = _Route19EndBattleText7 + $5B01 = _Route19AfterBattleText7 + $5CAC = _Route20BattleText2 + $5FB8 = _Route21BattleText1 + $4183 = _Route12BattleText2 + $5B53 = _Route19EndBattleText8 + $5B5D = _Route19AfterBattleText8 + $5D01 = _Route20BattleText3 + $6006 = _Route21BattleText2 + $41EE = _Route12BattleText3 + $43ED = _Route13BattleText2 + $480D = _Route14BattleText1 + $5BAE = _Route19EndBattleText9 + $5BBF = _Route19AfterBattleText9 + $5D43 = _Route20BattleText4 + $605A = _Route21BattleText3 + $4245 = _Route12BattleText4 + $444A = _Route13BattleText3 + $488E = _Route14BattleText2 + $4C3E = _Route15BattleText1 + $5D8F = _Route20BattleText5 + $60A0 = _Route21BattleText4 + $68E2 = _Route24BattleText1 + $42A8 = _Route12BattleText5 + $44A6 = _Route13BattleText4 + $48EA = _Route14BattleText3 + $4CDD = _Route15BattleText2 + $5081 = _Route16BattleText1 + $5DE1 = _Route20BattleText6 + $60FF = _Route21BattleText5 + $4301 = _Route12BattleText6 + $4503 = _Route13BattleText5 + $4971 = _Route14BattleText4 + $4D48 = _Route15BattleText3 + $50D7 = _Route16BattleText2 + $5352 = _Route17BattleText1 + $5E3D = _Route20BattleText7 + $614A = _Route21BattleText6 + $4358 = _Route12BattleText7 + $4579 = _Route13BattleText6 + $49D0 = _Route14BattleText5 + $4DA7 = _Route15BattleText4 + $511E = _Route16BattleText3 + $53AF = _Route17BattleText2 + $57A1 = _Route18BattleText1 + $5E7C = _Route20BattleText8 + $61C3 = _Route21BattleText7 + $45D0 = _Route13BattleText7 + $4A37 = _Route14BattleText6 + $4E33 = _Route15BattleText5 + $5173 = _Route16BattleText4 + $53F5 = _Route17BattleText3 + $57ED = _Route18BattleText2 + $58EB = _Route19BattleText1 + $5EE3 = _Route20BattleText9 + $620B = _Route21BattleText8 + $461D = _Route13BattleText8 + $4A99 = _Route14BattleText7 + $4E86 = _Route15BattleText6 + $51D8 = _Route16BattleText5 + $5438 = _Route17BattleText4 + $584F = _Route18BattleText3 + $593F = _Route19BattleText2 + $6275 = _Route21BattleText9 + $4680 = _Route13BattleText9 + $4AFD = _Route14BattleText8 + $4EED = _Route15BattleText7 + $5236 = _Route16BattleText6 + $547E = _Route17BattleText5 + $598F = _Route19BattleText3 + $4B4C = _Route14BattleText9 + $4F59 = _Route15BattleText8 + $54D9 = _Route17BattleText6 + $59DC = _Route19BattleText4 + $6410 = _Route22Text_511bc + $4FC4 = _Route15BattleText9 + $552F = _Route17BattleText7 + $5A1A = _Route19BattleText5 + $62CD = _Route22RivalBeforeBattleText1 + $557D = _Route17BattleText8 + $5A6F = _Route19BattleText6 + $6450 = _Route22RivalBeforeBattleText2 + $55B9 = _Route17BattleText9 + $5AC0 = _Route19BattleText7 + $5B31 = _Route19BattleText8 + $5B8F = _Route19BattleText9 + $408F = _Route11Text11 + $5FA7 = _Route20Text11 + $66DD = _VictoryRoadGuardText_513a3 + $43BC = _Route12Text11 + $5FA7 = _Route20Text12 + SLACK: $16FD bytes + +Bank #37: + SECTION: $4000-$6A35 ($2A36 bytes) + $46C2 = _EvolvedText + $488B = _MimicLearnedMoveText + $4B93 = _MomHealText2 + $4BD6 = _StandByMeText + $50FE = _OaksLabGivePokeballsText2 + $5266 = _OaksLabText8 + $54B4 = _OaksLabText_1d3be + $5442 = _OaksLabRivalPickingMonText + $49CF = _HitWithRecoilText + $5C77 = ViridianMartParcelQuestText + $45D3 = _Route25Text11 + $460E = _WouldYouLikeToSaveText + $4CCF = _DaisyUseMapText + $5891 = _OaksLabText_44206 + $593B = _OaksLabText_44215 + $59D7 = _OaksLabText_44224 + $5A5E = _OaksLabText_44233 + $5B08 = _OaksLabText_44242 + $67A6 = _Museum1FText_5c299 + $48B5 = _NothingHappenedText + $4C9B = _GotMapText + $5D6F = _ViridianHouseText1 + $4630 = _GameSavedText + $5DC5 = _ViridianHouseText2 + $683F = _Museum2FText1 + $6978 = _PewterGymText_5c49e + $4E05 = _OaksLabCharmanderText + $5A01 = _OaksLabText_44229 + $5AA6 = _OaksLabText_44238 + $5B37 = _OaksLabText_44247 + $5DF1 = _ViridianHouseText4 + $6867 = _Museum2FText2 + $4782 = _FireDefrostedText + $52B9 = _OaksLabRivalWaitingText + $68AF = _Museum2FText3 + $68CD = _Museum2FText4 + $4A86 = _LightScreenProtectedText + $690F = _Museum2FText5 + $4CAC = _DaisyBagFullText + $6931 = _Museum2FText6 + $46FB = _IsEvolvingText + $5D13 = _SchoolText1 + $67E6 = _Museum1FText_5c2ad + $6821 = _Museum1FText_5c2bc + $6949 = _Museum2FText7 + $4837 = _LoweredItsHeadText + $4877 = _BecameConfusedText + $49AE = _WasSeededText + $5D3E = _SchoolText2 + $4A57 = _RegainedHealthText + $4B06 = _MomWakeUpText + $474A = _BadlyPoisonedText + $6152 = _ViridianGymEndBattleText1 + $6165 = _ViridianGymAfterBattleText1 + $61BE = _ViridianGymEndBattleText2 + $61C6 = _ViridianGymAfterBattleText2 + $4643 = _OlderFileWillBeErasedText + $47B2 = _MonsStatsFellText + $480F = _MadeWhirlwindText + $620B = _ViridianGymEndBattleText3 + $6228 = _ViridianGymAfterBattleText3 + $6283 = _ViridianGymEndBattleText4 + $628B = _ViridianGymAfterBattleText4 + $4869 = _DugAHoleText + $62DA = _ViridianGymEndBattleText5 + $62EB = _ViridianGymAfterBattleText5 + $5E07 = _ViridianGymText_74ace + $6334 = _ViridianGymEndBattleText6 + $633B = _ViridianGymAfterBattleText6 + $49BD = _EvadedAttackText + $638D = _ViridianGymEndBattleText7 + $639F = _ViridianGymAfterBattleText7 + $4A34 = _FellAsleepBecameHealthyText + $4EDE = _OaksLabText_1d2f0 + $51F5 = _OaksLabText_1d31d + $5242 = _OaksLabText_1d32c + $6401 = _ViridianGymEndBattleText8 + $6410 = _ViridianGymAfterBattleText8 + $54E2 = _OaksLabText_1d3c3 + $47BD = _GreatlyFellText + $580A = _OaksLabText_441cc + $545F = _OaksLabRivalReceivedMonText + $46B0 = _ChooseABoxText + $47C8 = _FellText + $4E9F = _OaksLabReceivedMonText + $490C = _ParalyzedMayNotAttackText + $4F04 = _OaksLabText_1d2f5 + $475E = _BurnedText + $6123 = _ViridianGymBattleText1 + $49FB = _StatusChangesEliminatedText + $4B00 = _BattleCenterMText1 + $6195 = _ViridianGymBattleText2 + $4D5A = _OaksLabGaryText1 + $61DC = _ViridianGymBattleText3 + $499A = _GettingPumpedText + $6255 = _ViridianGymBattleText4 + $4000 = _Route24EndBattleText1 + $4010 = _Route24AfterBattleText1 + $53FA = _OaksLabBePatientText + $62B6 = _ViridianGymBattleText5 + $4061 = _Route24EndBattleText2 + $4072 = _Route24AfterBattleText2 + $4245 = _Route25EndBattleText1 + $4254 = _Route25AfterBattleText1 + $6306 = _ViridianGymBattleText6 + $40AF = _Route24EndBattleText3 + $40BC = _Route24AfterBattleText3 + $42CF = _Route25EndBattleText2 + $42DC = _Route25AfterBattleText2 + $45F1 = _FileDataDestroyedText + $4739 = _PoisonedText + $4859 = _FlewUpHighText + $495D = _TooWeakSubstituteText + $5DDF = _ViridianHouseText_1d5b1 + $635E = _ViridianGymBattleText7 + $652A = _Museum1FText_5c21a + $40FD = _Route24EndBattleText4 + $4110 = _Route24AfterBattleText4 + $4337 = _Route25EndBattleText3 + $4345 = _Route25AfterBattleText3 + $63BB = _ViridianGymBattleText8 + $4150 = _Route24EndBattleText5 + $4163 = _Route24AfterBattleText5 + $4385 = _Route25EndBattleText4 + $439E = _Route25AfterBattleText4 + $484B = _SkyAttackGlowingText + $53DA = _OaksLabRivalInterjectionText + $41E8 = _Route24EndBattleText6 + $41FB = _Route24AfterBattleText6 + $43DD = _Route25EndBattleText5 + $43F2 = _Route25AfterBattleText5 + $48FA = _IsUnaffectedText + $4455 = _Route25EndBattleText6 + $4469 = _Route25AfterBattleText6 + $5475 = _OaksLabRivalChallengeText + $5C34 = _ViridianMartText1 + $6093 = _TM27ExplanationText + $44C6 = _Route25EndBattleText7 + $44D8 = _Route25AfterBattleText7 + $4794 = _MonsStatsRoseText + $5CD3 = _ViridianMartText2 + $6537 = _Museum1FText_5c21f + $65A5 = _Museum1FText_5c22e + $6655 = _Museum1FText_5c23d + $452A = _Route25EndBattleText8 + $4537 = _Route25AfterBattleText8 + $5CF4 = _ViridianMartText3 + $4590 = _Route25EndBattleText9 + $45A2 = _Route25AfterBattleText9 + $4AD4 = _SuckedHealthText + $5C56 = _ViridianMartText4 + $489D = _MoveWasDisabledText + $554F = _OaksLabText21 + $4A1F = _StartedSleepingEffect + $4ABE = _ShroudedInMistText + $4D78 = _OaksLabText40 + $555B = _OaksLabText22 + $4715 = _FellAsleepText + $4AEB = _DreamWasEatenText + $4DBC = _OaksLabText41 + $5579 = _OaksLabText23 + $5ED3 = _ViridianGymText_74ad3 + $55A6 = _OaksLabText24 + $66B2 = _Museum1FText_5c28e + $4043 = _Route24BattleText2 + $421E = _Route25BattleText1 + $479F = _GreatlyRoseText + $49E4 = _ConvertedTypeText + $5269 = _OaksLabText_1d340 + $5628 = _OaksLabText25 + $58CA = _OaksLabText_4420b + $596B = _OaksLabText_4421a + $644F = _ViridianGymText_74bd4 + $67C7 = _Museum1FText_5c29e + $4095 = _Route24BattleText3 + $4292 = _Route25BattleText2 + $52DD = _OaksLabChooseMonText + $5662 = _OaksLabText26 + $40DF = _Route24BattleText4 + $4310 = _Route25BattleText3 + $46DD = _StoppedEvolvingText + $476D = _FrozenText + $47AA = _RoseText + $47E4 = _RanAwayScaredText + $573F = _OaksLabText27 + $57E9 = _OaksLabText_1d405 + $4133 = _Route24BattleText5 + $4369 = _Route25BattleText4 + $46CF = _IntoText + $4186 = _Route24BattleText6 + $43C1 = _Route25BattleText5 + $51AA = _OaksLabPleaseVisitText + $5F29 = _ViridianGymText_74ad9 + $442A = _Route25BattleText6 + $47F8 = _WasBlownAwayText + $48D4 = _ButItFailedText + $4DDE = _OaksLabText39 + $59B6 = _OaksLabText_4421f + $5A2C = _OaksLabText_4422e + $5AD7 = _OaksLabText_4423d + $5B6D = _OaksLabText_4424c + $64F9 = _ViridianGymText_74bd9 + $4499 = _Route25BattleText7 + $48C8 = _NoEffectText + $497D = _CoinsScatteredText + $678E = _ReceivedOldAmberText + $44FD = _Route25BattleText8 + $480B = _ChargeMoveEffectText + $4C5C = _DaisyOfferMapText + $4563 = _Route25BattleText9 + $4CFC = _BluesHouseText2 + $6080 = _ReceivedTM27Text + $4C3B = _DaisyInitialText + $4D3A = _BluesHouseText3 + $4948 = _HasSubstituteText + $4AAD = _ReflectGainedArmorText + $5051 = _OaksLabAroundWorldText + $5B9F = _ViridianPokeCenterText1 + $5FCA = _ViridianGymText12 + $4823 = _TookInSunlightText + $5B9F = _ViridianPokeCenterText2 + $47D0 = _RanFromBattleText + $5BE6 = _ViridianPokeCenterText3 + $4EB5 = _OaksLabLastMonText + $6570 = _Museum1FText_5c224 + $65EF = _Museum1FText_5c233 + $6673 = _Museum1FText_5c242 + $6691 = _Museum1FText_5c251 + $4E7F = _OaksLabMonEnergeticText + $4F75 = _OaksLabDeliverParcelText1 + $48E6 = _DidntAffectText + $492E = _SubstituteText + $4A6B = _TransformedText + $4C28 = _TVWrongSideText + $501B = _OaksLabDeliverParcelText2 + $5500 = _OaksLabRivalToughenUpText + $4B03 = _TradeCenterMText1 + $6588 = _Museum1FText_5c229 + $6634 = _Museum1FText_5c238 + $4671 = _WhenYouChangeBoxText + $4E56 = _OaksLabBulbasaurText + $5425 = _OaksLabLeavingText + $6102 = _TM27NoRoomText + $4E2E = _OaksLabSquirtleText + $5856 = _OaksLabText_44201 + $5901 = _OaksLabText_44210 + $4725 = _AlreadyAsleepText + $4B6C = _MomHealText1 + $4F42 = _OaksLabText_1d2fa + $5079 = _OaksLabGivePokeballsText1 + SLACK: $15CA bytes + +Bank #38: + SECTION: $4000-$6B7A ($2B7B bytes) + $4EE0 = _BikeShopText_1d82a + $5A1E = _PokemonTower5BattleText3 + $5B72 = _PokemonTower6BattleText2 + $5D31 = _PokemonTower7BattleText1 + $64B2 = _VermilionPokecenterText2 + $43FC = _PewterGymText_5c51f + $5A44 = _PokemonTower5BattleText4 + $5BC6 = _PokemonTower6BattleText3 + $5D80 = _PokemonTower7BattleText2 + $6539 = _VermilionPokecenterText3 + $5E33 = _PokemonTower7BattleText3 + $6AA5 = _VermilionGymText_5cb6d + $6308 = _NameRaterText_1dab3 + $63E5 = _NameRaterText_1dac2 + $646B = _NameRaterText_1dad1 + $66E0 = FanClubChairStoryText + $682E = ReceivedBikeVoucherText + $4E83 = _BikeShopText_1d81f + $4EFC = _BikeShopText_1d82f + $4FC1 = _BikeShopText_1d85c + $6933 = FanClubBagFullText + $47E2 = _CeruleanTrashedText_1d6b0 + $5AC8 = _PokemonTower2Text_60c1f + $6361 = _NameRaterText_1dab8 + $6404 = _NameRaterText_1dac7 + $44CE = _PewterHouse1Text1 + $4C38 = _CeruleanGymEndBattleText1 + $4C4D = _CeruleanGymAfterBattleText1 + $525D = _CeruleanHouse2Text_74ea0 + $44E1 = _PewterHouse1Text2 + $4656 = _PewterHouse2Text1 + $4CB5 = _CeruleanGymEndBattleText2 + $4CC4 = _CeruleanGymAfterBattleText2 + $5FFB = _ReceivedFluteText + $44EF = _PewterHouse1Text3 + $46AE = _PewterHouse2Text2 + $48E5 = _CeruleanPokecenterText1 + $5E8D = _LavenderHouse1Text_1d8d1 + $492A = _CeruleanPokecenterText3 + $540E = _LavenderPokecenterText1 + $52B8 = _CeruleanHouse2Text_74ea5 + $53C7 = _CeruleanHouse2Text_74eb4 + $540E = _LavenderPokecenterText2 + $5F97 = _LavenderHouse1Text_1d94c + $62B9 = _LavenderHouse2Text_1d9e1 + $5442 = _LavenderPokecenterText3 + $5C1A = _PokemonTower7Text_60ec4 + $49C1 = _CeruleanGymText_5c7be + $540E = _LavenderPokecenterText4 + $5EBA = _LavenderHouse1Text_1d8d6 + $5EEE = _LavenderHouse1Text_1d8f4 + $513A = _CeruleanHouse2Text_74e7c + $51F2 = _CeruleanHouse2Text_74e9b + $53F5 = _CeruleanHouse2Text_74eb9 + $6572 = PikachuFanText + $5F4B = _LavenderHouse1Text_1d8f9 + $6641 = FanClubSeelText + $68F2 = FanClubChairFinalText + $69C1 = _VermilionMartText2 + $4C05 = _CeruleanGymBattleText1 + $6A67 = _VermilionMartText3 + $4C93 = _CeruleanGymBattleText2 + $4E03 = _BikeShopText_1d810 + $6069 = _FluteNoRoomText + $4351 = _PewterGymText_5c515 + $4476 = _PewterGymText_5c524 + $65FF = SeelFanBetterText + $4E45 = _BikeShopText_1d815 + $4EB2 = _BikeShopText_1d824 + $4F4D = _BikeShopText_1d834 + $4F6D = _BikeShopText_1d843 + $4FF2 = _BikeShopText_1d861 + $4092 = _TM34PreReceiveText + $449F = _PewterGymText_5c529 + $5AFC = _PokemonTower2Text_60c24 + $5012 = _CeruleanMartText2 + $45AC = _PewterMartText_74cc6 + $460C = _PewterMartText_74cd5 + $507F = _CeruleanMartText3 + $557B = _PokemonTower2Text_6062d + $5657 = _PokemonTower2Text_6063c + $6104 = _LavenderMartText2 + $40C0 = _TM34ExplanationText + $4D0A = _CeruleanGymText_5c82a + $4A7B = _CeruleanGymText_5c7c3 + $4B90 = _CeruleanGymText_5c7d3 + $5170 = _CeruleanHouse2Text_74e81 + $4DB0 = _CeruleanGymText_5c82f + $42F1 = _PewterGymEndBattleText1 + $4325 = _PewterGymAfterBattleText1 + $4AB0 = _CeruleanGymText_5c7c8 + $61B4 = _LavenderMart_5c953 + $6629 = FanClubPikachuText + $41C9 = _PewterGymText_5c4bc + $4704 = _PewterPokecenterText1 + $4BB0 = _CeruleanGymText_5c7d8 + $488C = _CeruleanHouse1Text1 + $50C9 = _CeruleanHouse2Text_74e77 + $547F = _PokemonTower1Text1 + $5192 = _CeruleanHouse2Text_74e96 + $54BC = _PokemonTower1Text2 + $4B7D = _ReceivedTM11Text + $54E6 = _PokemonTower1Text3 + $571A = _PokemonTower2Text2 + $4744 = _PewterPokecenterText5 + $5524 = _PokemonTower1Text4 + $61E3 = _LavenderMart_5c958 + $6238 = _LavenderHouse2Text1 + $659E = PikachuFanBetterText + $5546 = _PokemonTower1Text5 + $5958 = _PokemonTower5Text1 + $5F72 = _LavenderHouse1Text3 + $5F85 = _LavenderHouse1Text4 + $637F = _NameRaterText_1dabd + $644C = _NameRaterText_1dacc + $40AD = _ReceivedTM34Text + $60AA = _LavenderHouse1Text6 + $5794 = _PokemonTower3EndBattleText1 + $57A4 = _PokemonTower3AfterBattleText1 + $42AE = _PewterGymBattleText1 + $475C = _CeruleanTrashedText_1d6ab + $4834 = _CeruleanHouseTrashedText2 + $57EA = _PokemonTower3EndBattleText2 + $5801 = _PokemonTower3AfterBattleText2 + $587D = _PokemonTower4EndBattleText1 + $5892 = _PokemonTower4AfterBattleText1 + $5A8B = _PokemonTower5Text7 + $5C01 = _PokemonTower6Text6 + $486F = _CeruleanHouseTrashedText3 + $532A = _CeruleanHouse2Text_74eaa + $5831 = _PokemonTower3EndBattleText3 + $5849 = _PokemonTower3AfterBattleText3 + $58CC = _PokemonTower4EndBattleText2 + $58D3 = _PokemonTower4AfterBattleText2 + $59BC = _PokemonTower5EndBattleText1 + $59C3 = _PokemonTower5AfterBattleText1 + $55E5 = _PokemonTower2Text_60632 + $5916 = _PokemonTower4EndBattleText3 + $5927 = _PokemonTower4AfterBattleText3 + $59F9 = _PokemonTower5EndBattleText2 + $5A0C = _PokemonTower5AfterBattleText2 + $5B4F = _PokemonTower6EndBattleText1 + $5B57 = _PokemonTower6AfterBattleText1 + $5A28 = _PokemonTower5EndBattleText3 + $5A2D = _PokemonTower5AfterBattleText3 + $5B82 = _PokemonTower6EndBattleText2 + $5B99 = _PokemonTower6AfterBattleText2 + $5D56 = _PokemonTower7EndBattleText1 + $5D62 = _PokemonTower7AfterBattleText1 + $5A57 = _PokemonTower5EndBattleText4 + $5A5E = _PokemonTower5AfterBattleText4 + $5BE4 = _PokemonTower6EndBattleText3 + $5BEB = _PokemonTower6AfterBattleText3 + $5DE1 = _PokemonTower7EndBattleText2 + $5DF3 = _PokemonTower7AfterBattleText2 + $5E52 = _PokemonTower7EndBattleText3 + $5E6A = _PokemonTower7AfterBattleText3 + $5388 = _CeruleanHouse2Text_74eaf + $624C = _LavenderHouse2Text_1d9dc + $6844 = ExplainBikeVoucherText + $5614 = _PokemonTower2Text_60637 + $6011 = _FluteExplanationText + $41AB = _TM34NoRoomText + $43DC = _PewterGymText_5c51a + $5776 = _PokemonTower3BattleText1 + $65CF = SeelFanText + $6948 = _FanClubText6 + $4000 = _PewterGymText_5c4a3 + $4232 = _PewterGymText_5c4c1 + $57D6 = _PokemonTower3BattleText2 + $5869 = _PokemonTower4BattleText1 + $68C3 = FanClubNoStoryText + $6970 = _FanClubText7 + $581A = _PokemonTower3BattleText3 + $58B0 = _PokemonTower4BattleText2 + $599F = _PokemonTower5BattleText1 + $6087 = _MrFujiAfterFluteText + $699D = _FanClubText8 + $4E67 = _BikeShopText_1d81a + $58FE = _PokemonTower4BattleText3 + $59DC = _PokemonTower5BattleText2 + $5B38 = _PokemonTower6BattleText1 + $64B2 = _VermilionPokecenterText1 + $664F = FanClubMeetChairText + SLACK: $1485 bytes + +Bank #39: + SECTION: $4000-$6AA3 ($2AA4 bytes) + $450E = _VermilionDockText1 + $64D2 = _WardenTeethText1 + $432B = _VermilionGymText_5cbf4 + $4E72 = _VendingMachineText1 + $64F9 = _WardenTeethText2 + $67E3 = _SafariZoneEntranceText_75365 + $5AD9 = _CeladonGameCornerText_48dac + $5B11 = _CeladonGameCornerText_48dca + $5EE6 = _CeladonPrizeRoomText1 + $66B0 = _FuchsiaHouse2Text_7517b + $4E96 = _VendingMachineText4 + $5F24 = _CeladonPrizeRoomText2 + $5F3F = _CeladonDinerText1 + $4EAF = _VendingMachineText5 + $5F5D = _CeladonDinerText2 + $66E4 = SafariZoneEntranceText_9e6e4 + $4429 = _VermilionGymText_5cbf9 + $4EC0 = _VendingMachineText6 + $5F99 = _CeladonDinerText3 + $4EE0 = _VendingMachineText7 + $5BAC = _CeladonGameCornerText_48dcf + $5D47 = _CeladonGameCornerText_48ece + $5FC9 = _CeladonDinerText4 + $4194 = _VermilionGymBattleText1 + $4213 = _VermilionGymBattleText2 + $4A64 = _CeladonMart3Text11 + $4290 = _VermilionGymBattleText3 + $4C91 = _CeladonMartRoofText_4850a + $62A3 = _FuchsiaHouse1Text1 + $4A85 = _CeladonMart3Text13 + $62F3 = _FuchsiaHouse1Text2 + $4AA4 = _CeladonMart3Text14 + $634D = _FuchsiaHouse1Text3 + $4AB6 = _CeladonMart3Text15 + $618A = _CeladonHotelText1 + $4D6D = _CeladonMartRoofText_4852c + $61BF = _CeladonHotelText2 + $4CA5 = _CeladonMartRoofText_4850f + $620E = _CeladonHotelText3 + $53C2 = _CeladonGymText_48a63 + $6825 = _SafariZoneEntranceText_753bb + $4510 = _VermilionHouse2Text_560b1 + $4601 = _VermilionHouse2Text_560c0 + $4BCC = _CeladonMartRoofText_484f3 + $68A7 = _SafariZoneEntranceText_753eb + $65B6 = _HM04ExplanationText + $5418 = _CeladonGymText_48a68 + $60D5 = _CeladonHouseText1 + $4554 = _VermilionHouse2Text_560b6 + $4622 = _VermilionHouse2Text_560c5 + $4FBC = _GraphicArtistText + $610A = _CeladonHouseText2 + $4C06 = _CeladonMartRoofText_484f9 + $4D97 = _CeladonMartRoofText1 + $613C = _CeladonHouseText3 + $4000 = _VermilionGymText_5cb72 + $4E16 = _CeladonMartRoofText4 + $59A5 = _CeladonGameCornerText_48d2c + $5A00 = _CeladonGameCornerText_48d3b + $6814 = SafariZoneEntranceText_9e814 + $4E50 = _CeladonMartRoofText6 + $5AA9 = _Received10CoinsText + $4069 = _VermilionGymText_5cb77 + $5C4F = _Received20CoinsText + $4814 = _TM18PreReceiveText + $503A = _GameDesignerText + $5AC0 = _CeladonGameCornerText_48da7 + $5D73 = _CeladonGameCornerText_48ed3 + $4672 = _CeladonMart1Text1 + $5520 = _TM21ExplanationText + $6696 = _FuchsiaHouse2Text_75176 + $46CD = _CeladonMart1Text2 + $6747 = SafariZoneEntranceText_9e747 + $4449 = _VermilionHouse1Text1 + $4752 = _CeladonMart1Text3 + $4FA4 = _ProgrammerText + $5481 = _CeladonGymText9 + $55B9 = _CeladonGymEndBattleText2 + $55CB = _CeladonGymAfterBattleText2 + $40F5 = _TM24ExplanationText + $4488 = _VermilionHouse1Text2 + $476B = _CeladonMart2Text3 + $48C7 = _CeladonMart3Text2 + $5606 = _CeladonGymEndBattleText3 + $5612 = _CeladonGymAfterBattleText3 + $5A8E = _CeladonGameCornerText_48d9c + $449C = _VermilionHouse1Text3 + $47B2 = _CeladonMart2Text4 + $492D = _CeladonMart3Text3 + $4AD4 = _CeladonMart4Text2 + $5226 = _CeladonPokecenterText2 + $5691 = _CeladonGymEndBattleText4 + $569F = _CeladonGymAfterBattleText4 + $5CEB = _CeladonGameCornerText_48e8d + $5D7A = _CeladonGameCornerText_48ed8 + $5DFF = _CeladonMart5Text1 + $47DC = _CeladonMart2Text5 + $4975 = _CeladonMart3Text4 + $4AFD = _CeladonMart4Text3 + $4D30 = _CeladonMartRoofText_48520 + $5262 = _CeladonPokecenterText3 + $5702 = _CeladonGymEndBattleText5 + $5707 = _CeladonGymAfterBattleText5 + $5E79 = _CeladonMart5Text2 + $486E = _TM18ExplanationText + $49D5 = _CeladonMart3Text5 + $4B56 = _CeladonMart4Text4 + $578D = _CeladonGymEndBattleText6 + $5797 = _CeladonGymAfterBattleText6 + $65A2 = _ReceivedHM04Text + $4A13 = _CeladonMart3Text6 + $4C5A = _CeladonMartRoofText_48504 + $5808 = _CeladonGymEndBattleText7 + $5817 = _CeladonGymAfterBattleText7 + $4A21 = _CeladonMart3Text7 + $5897 = _CeladonGymEndBattleText8 + $58A4 = _CeladonGymAfterBattleText8 + $5ED6 = _CeladonMart5Text5 + $6444 = _WardenGibberishText1 + $4CE6 = _CeladonMartRoofText_48515 + $648B = _WardenGibberishText2 + $6854 = _SafariZoneEntranceText_753c0 + $4A43 = _CeladonMart3Text9 + $64B0 = _WardenGibberishText3 + $4D4D = _CeladonMartRoofText_48526 + $6993 = _SafariZoneEntranceText_753f0 + $651B = _WardenThankYouText + $67FB = _SafariZoneEntranceText_7536a + $6860 = _SafariZoneEntranceText_753c5 + $5596 = _CeladonGymBattleText2 + $55F0 = _CeladonGymBattleText3 + $6387 = _FuchsiaPokecenterText1 + $550C = _ReceivedTM21Text + $5675 = _CeladonGymBattleText4 + $6886 = _SafariZoneEntranceText_753e6 + $50AD = _CompletedDexText + $56D1 = _CeladonGymBattleText5 + $63DE = _FuchsiaPokecenterText3 + $5762 = _CeladonGymBattleText6 + $607A = _ReceivedCoinCaseText + $40E0 = _ReceivedTM24Text + $4DEE = _CeladonMartRoofText_48598 + $57D7 = _CeladonGymBattleText7 + $591A = _CeladonGameCornerText_48d22 + $59C5 = _CeladonGameCornerText_48d31 + $667A = _HM04NoRoomText + $5855 = _CeladonGymBattleText8 + $5C66 = _CeladonGameCornerText_48e31 + $66C7 = _SafariZoneEntranceText1 + $485A = _ReceivedTM18Text + $69B1 = _UnnamedText_75581 + $4FE0 = _WriterText + $5984 = _CeladonGameCornerText_48d27 + $59E1 = _CeladonGameCornerText_48d36 + $5C33 = _CeladonGameCornerText_48e26 + $5C7F = _CeladonGameCornerText_48e36 + $4D1D = _ReceivedTM49Text + $5DB0 = _CeladonGameCornerText_48f09 + $5DE2 = _CeladonGameCornerText_48f19 + $6A66 = _UnnamedText_75586 + $4EEE = _CeladonMansion1Text1 + $5D02 = _CeladonGameCornerText_48e93 + $4EFE = _CeladonMansion1Text2 + $4F8B = _CeladonMansion2Text1 + $4F3C = _CeladonMansion1Text3 + $5576 = _TM21NoRoomText + $58D5 = _CeladonGameCornerText1 + $4F55 = _CeladonMansion1Text4 + $51A6 = _CeladonMansion4Text1 + $4F6B = _CeladonMansion1Text5 + $51BA = _CeladonMansion5Text1 + $5A1C = _CeladonGameCornerText3 + $5CAD = _CeladonGameCornerText_48e88 + $6090 = _CoinCaseNoRoomText + $4130 = _TM24NoRoomText + $528F = _CeladonGymText_48a5e + $5A61 = _CeladonGameCornerText4 + $5D1D = _CeladonGameCornerText_48e98 + $45A4 = _VermilionHouse2Text_560bb + $464C = _VermilionHouse2Text_560ca + $4BB5 = _CeladonMartRoofText_484ee + $50ED = _CeladonMansion3Text5 + $4C1A = _CeladonMartRoofText_484fe + $512C = _CeladonMansion3Text6 + $5AF4 = _CeladonGameCornerText6 + $6003 = _CeladonDinerText_491a7 + $4151 = _ReceivedThunderbadgeText + $41C8 = _VermilionGymEndBattleText1 + $41E0 = _VermilionGymAfterBattleText1 + $48AA = _TM18NoRoomText + $5159 = _CeladonMansion3Text7 + $60A5 = _CeladonDinerText_491b7 + $679F = _SafariZoneEntranceText_75360 + $4244 = _VermilionGymEndBattleText2 + $424C = _VermilionGymAfterBattleText2 + $5189 = _CeladonMansion3Text8 + $5C06 = _CeladonGameCornerText8 + $622E = _FuchsiaMartText2 + $42AC = _VermilionGymEndBattleText3 + $42C0 = _VermilionGymAfterBattleText3 + $626E = _FuchsiaMartText3 + SLACK: $155C bytes + +Bank #40: + SECTION: $4000-$6A36 ($2A37 bytes) + $46E8 = _FuchsiaHouse3Text_561c2 + $4782 = _FuchsiaHouse3Text_5621c + $57BE = _CopycatsHouse2FText6 + $5FE0 = _SaffronGymBattleText2 + $6619 = _PokemartTellBuyPriceText + $6042 = _SaffronGymBattleText3 + $60C9 = _SaffronGymBattleText4 + $5842 = _CopycatsHouse2FText_5cd1c + $613C = _SaffronGymBattleText5 + $619C = _SaffronGymBattleText6 + $6277 = _SaffronGymBattleText7 + $55AD = _CopycatsHouse2FText_5ccd4 + $66F0 = _PokemartUnsellableItemText + $6819 = _OneTwoAndText + $4DF7 = _Lab1Text1 + $4A65 = _CinnabarGymText_75964 + $4E49 = _Lab1Text2 + $4EB5 = _Lab2Text1 + $5689 = _TM31ExplanationText1 + $63E3 = _SaffronMartText2 + $65C5 = _PlayerBlackedOutText + $6670 = _PokemartItemBagFullText + $6690 = _PokemonSellingGreetingText + $4E70 = _Lab1Text3 + $56C5 = _TM31ExplanationText2 + $642A = _SaffronMartText3 + $4E87 = _Lab1Text4 + $4FE3 = _Lab3Text2 + $68CE = _NeedYourPokemonText + $4AC0 = _CinnabarGymText_75994 + $4E9E = _Lab1Text5 + $5010 = _Lab3Text3 + $48C7 = _BlaineEndBattleText + $4A7A = _CinnabarGymText_75969 + $50D8 = _Lab3Text5 + $686D = _PokemonCenterWelcomeText + $539B = _CinnabarMartText2 + $6653 = _PokemartNotEnoughMoneyText + $68E8 = _PokemonFightingFitText + $53CB = _CinnabarMartText3 + $5CDC = _SaffronGymText_5d16e + $5E48 = _SaffronGymText_5d1e6 + $4AF4 = _CinnabarGymText_75999 + $4D1B = _CinnabarGymText_75aa2 + $4D5A = _CinnabarGymText_75ac2 + $6608 = _PokemartBuyingGreetingText + $67A4 = _TryingToLearnText + $4C1E = _CinnabarGymText_75a3d + $4D2D = _CinnabarGymText_75aa7 + $66AE = _PokemartTellSellPriceText + $6719 = _PokemartAnythingElseText + $4737 = _FuchsiaHouse3Text_56212 + $48FD = _BlaineFireBlastText + $6305 = _SaffronHouse1Text1 + $4CC1 = _CinnabarGymText_75a6d + $4DD9 = _CinnabarGymText_75ac7 + $5145 = _Lab4Text_75dcb + $6352 = _SaffronHouse1Text2 + $6366 = _SaffronHouse1Text3 + $5636 = _TM31PreReceiveText + $6395 = _SaffronHouse1Text4 + $4844 = _BlaineBattleText + $4D00 = _CinnabarGymText_75a9d + $4758 = _FuchsiaHouse3Text_56217 + $6830 = _ForgotAndText + $4B58 = _CinnabarGymText_759ce + $4F09 = _TM35PreReceiveText + $6639 = _PokemartBoughtItemText + $4000 = _UnnamedText_7558b + $44D2 = _UnnamedText_7564e + $57EF = _CopycatsHouse2FText_5cd17 + $59B7 = _FightingDojoEndBattleText1 + $59C3 = _FightingDojoAfterBattleText1 + $47D5 = _Mansion1EndBattleText2 + $47DC = _Mansion1AfterBattleText2 + $5A22 = _FightingDojoEndBattleText2 + $5A33 = _FightingDojoAfterBattleText2 + $4B95 = _CinnabarGymText_759fe + $5A8D = _FightingDojoEndBattleText3 + $5AA4 = _FightingDojoAfterBattleText3 + $5B4A = _WantHitmonleeText + $64FE = _TM29PreReceiveText + $5B09 = _FightingDojoEndBattleText4 + $5B1A = _FightingDojoAfterBattleText4 + $5DCD = ReceivedTM46Text + $40FF = _TM06ExplanationText + $4946 = _BlaineBadgeText + $65EF = _RepelWoreOffText + $4826 = _MansionSwitchPressedText + $4F5D = _TM35ExplanationText + $5BB4 = _SaffronGymText_5d162 + $5DE0 = _TM46ExplanationText + $49BC = _TM38ExplanationText + $5D16 = _SaffronGymText_5d173 + $653E = _TM29ExplanationText + $68B4 = _ShallWeHealYourPokemonText + $480A = _MansionSwitchText + $51D6 = _Lab4Text_610ae + $52C6 = _Lab4Text_610bd + $6750 = _WhichMoveToForgetText + $4BB3 = _CinnabarGymText_75a03 + $5852 = _FightingDojoText_5ce8e + $5972 = _FightingDojoText_5ce9d + $5C73 = _SaffronGymText_5d167 + $6827 = _PoofText + $684D = _HMCantDeleteText + $6910 = _PokemonCenterFarewellText + $5999 = _FightingDojoBattleText1 + $6969 = _CableClubNPCText1 + $47A8 = _Mansion1BattleText2 + $4BF4 = _CinnabarGymText_75a33 + $5A05 = _FightingDojoBattleText2 + $65B7 = _PokemonFaintedText + $6985 = _CableClubNPCText2 + $41C2 = _FuchsiaGymEndBattleText1 + $41D8 = _FuchsiaGymAfterBattleText1 + $5A51 = _FightingDojoBattleText3 + $5B9A = _OtherHitmonText + $69CC = _CableClubNPCText3 + $423A = _FuchsiaGymEndBattleText2 + $4248 = _FuchsiaGymAfterBattleText2 + $4BC7 = _CinnabarGymText_75a08 + $5AD8 = _FightingDojoBattleText4 + $69DB = _CableClubNPCText4 + $42A8 = _FuchsiaGymEndBattleText3 + $42BC = _FuchsiaGymAfterBattleText3 + $4695 = _FuchsiaHouse3Text_561bd + $4CD2 = _CinnabarGymText_75a72 + $5156 = _Lab4Text_75dd0 + $433A = _FuchsiaGymEndBattleText4 + $434D = _FuchsiaGymAfterBattleText4 + $4402 = _FuchsiaGymEndBattleText5 + $4409 = _FuchsiaGymAfterBattleText5 + $4834 = _MansionSwitchNotPressedText + $4C19 = _CinnabarGymText_75a38 + $53F0 = _IndigoPlateauLobbyText1 + $5675 = _ReceivedTM31Text + $692B = _CableClubNPCText7 + $4470 = _FuchsiaGymEndBattleText6 + $4483 = _FuchsiaGymAfterBattleText6 + $6771 = _AbandonLearningText + $40EB = _ReceivedTM06Text + $548B = _IndigoPlateauLobbyText3 + $670D = _PokemartThankYouText + $4C90 = _CinnabarGymText_75a68 + $50E8 = _Lab4Text_75dc6 + $518D = _Lab4Text_75dd5 + $4B6B = _CinnabarGymText_759d3 + $4F48 = _ReceivedTM35Text + $659C = _PokemartGreetingText + $4069 = _UnnamedText_75590 + $4574 = _UnnamedText_75653 + $49A8 = _ReceivedTM38Text + $652A = _ReceivedTM29Text + $4A36 = _CinnabarGymText_7595f + $5F62 = _SaffronGymEndBattleText1 + $5F74 = _SaffronGymAfterBattleText1 + $678A = _DidNotLearnText + $4160 = _FuchsiaGymBattleText1 + $4B2C = _CinnabarGymText_759c9 + $6002 = _SaffronGymEndBattleText2 + $6019 = _SaffronGymAfterBattleText2 + $4207 = _FuchsiaGymBattleText2 + $5B70 = _WantHitmonchanText + $5EF0 = _SaffronGymText_5d1eb + $6091 = _SaffronGymEndBattleText3 + $609D = _SaffronGymAfterBattleText3 + $648E = _SaffronPokecenterText1 + $66CF = _PokemartItemBagEmptyText + $427E = _FuchsiaGymBattleText3 + $45A1 = _FuchsiaMeetingRoomText1 + $4B02 = _CinnabarGymText_7599e + $60F1 = _SaffronGymEndBattleText4 + $6107 = _SaffronGymAfterBattleText4 + $42FE = _FuchsiaGymBattleText4 + $45E6 = _FuchsiaMeetingRoomText2 + $615E = _SaffronGymEndBattleText5 + $6171 = _SaffronGymAfterBattleText5 + $645A = _SilphCo1Text1 + $64BF = _SaffronPokecenterText3 + $43A1 = _FuchsiaGymBattleText5 + $4642 = _FuchsiaMeetingRoomText3 + $61E4 = _SaffronGymEndBattleText6 + $61FE = _SaffronGymAfterBattleText6 + $4426 = _FuchsiaGymBattleText6 + $5733 = _TM31NoRoomText + $62CA = _SaffronGymEndBattleText7 + $62D3 = _SaffronGymAfterBattleText7 + $673B = _LearnedMove1Text + $5259 = _Lab4Text_610b3 + $4143 = _TM06NoRoomText + $52DE = _CinnabarPokecenterText1 + $54F7 = _CopycatsHouse1FText1 + $58BA = _FightingDojoText_5ce93 + $52DE = _CinnabarPokecenterText2 + $5535 = _CopycatsHouse1FText2 + $4FC7 = _TM35NoRoomText + $533E = _CinnabarPokecenterText3 + $5596 = _CopycatsHouse1FText3 + $5749 = _CopycatsHouse2FText2 + $5792 = _CopycatsHouse2FText3 + $528F = _Lab4Text_610b8 + $5E25 = _TM46NoRoomText + $4A1E = _TM38NoRoomText + $58CF = _FightingDojoText_5ce98 + $5F33 = _SaffronGymBattleText1 + $657C = _TM29NoRoomText + SLACK: $15C9 bytes + +Bank #41: + SECTION: $4000-$6B93 ($2B94 bytes) + $49E0 = _PewterCityText2 + $6298 = _CinnabarIslandText6 + $5980 = _VermilionCityText11 + $62A2 = _CinnabarIslandText7 + $59A6 = _VermilionCityText12 + $5E9C = _FuchsiaCityText1 + $60FD = _FuchsiaCitySlowpokeText + $61CF = _CinnabarIslandText8 + $69C2 = _RestorePPWhichTechniqueText + $6B4E = _NoSurfingHereText + $45EA = _ViridianCityText_191ca + $59E9 = _VermilionCityText13 + $5EDE = _FuchsiaCityText2 + $4BFE = _PewterCityText6 + $586B = _VermilionCityText14 + $5F3E = _FuchsiaCityText3 + $68DD = _PlayedFluteNoEffectText + $4C4A = _PewterCityText7 + $5F6B = _FuchsiaCityText4 + $5F96 = _FuchsiaCityText5 + $4FEB = _CeruleanCityText_196ee + $6A30 = _BootedUpHMText + $6981 = _ItemfinderFoundNothingText + $6AD0 = _ItemUseNotYoursToUseText + $57F1 = _SSAnneNotHereText + $4B55 = _PewterCityText_19431 + $571D = _SSAnneWelcomeText4 + $6050 = _FuchsiaCityChanseyText + $6928 = _PlayedFluteHadEffectText + $403C = _UsedStrengthText + $531F = _CeruleanCityText10 + $6729 = _ItemUseBallText00 + $675F = _ItemUseBallText01 + $539A = _CeruleanCityText12 + $62E7 = _SaffronCityText1 + $6775 = _ItemUseBallText02 + $4BCE = _PewterCityText_19462 + $53CE = _CeruleanCityText13 + $6304 = _SaffronCityText2 + $6791 = _ItemUseBallText03 + $40CC = _WarpToLastPokemonCenterText + $4B14 = _PewterCityText_19427 + $5734 = _SSAnneWelcomeText9 + $6324 = _SaffronCityText3 + $67B2 = _ItemUseBallText04 + $4180 = _GotMonText + $41D6 = _BoxIsFullText + $6339 = _SaffronCityText4 + $67CF = _ItemUseBallText05 + $541A = _CeruleanCityText16 + $635A = _SaffronCityText5 + $6835 = _ItemUseBallText06 + $48C3 = _ViridianCityText10 + $5445 = _CeruleanCityText17 + $60AC = _FuchsiaCityKangaskhanText + $637E = _SaffronCityText6 + $67EE = _ItemUseBallText07 + $6A1F = _BootedUpTMText + $56B5 = _VermilionCityText_198a7 + $639E = _SaffronCityText7 + $6810 = _ItemUseBallText08 + $63DF = _SaffronCityText8 + $688C = _VitaminStatRoseText + $4949 = _ViridianCityText13 + $640F = _SaffronCityText9 + $6AA6 = _ItemUseNotTimeText + $4961 = _ViridianCityText14 + $69E2 = _PPMaxedOutText + $6AE9 = _ItemUseNoEffectText + $5668 = _VermilionCityText1 + $690C = _FluteWokeUpText + $46F9 = _ViridianCityText_1920a + $51EC = _CeruleanCityText_1973a + $40EB = _CannotUseTeleportNowText + $5805 = _VermilionCityText4 + $5852 = _VermilionCityText5 + $6157 = _FuchsiaCityOmanyteText + $5891 = _VermilionCityText6 + $6A6E = _MonCannotLearnMachineMoveText + $4754 = _ViridianCityText_1920f + $5010 = _CeruleanCityText_196f3 + $58DB = _VermilionCityText7 + $4494 = _ViridianCityText_1914d + $4560 = _ViridianCityText_1917a + $4DBE = _CeruleanCityText_1966d + $5909 = _VermilionCityText8 + $4F96 = _ReceivedTM28Text2 + $61CA = _FuchsiaCityText_19b2a + $4088 = _CyclingIsFunText + $40A9 = _FlashLightsAreaText + $4F27 = _CeruleanCityText_196d9 + $526B = _CeruleanCityText_1976f + $52BB = _CeruleanCityText_1977e + $5B6E = _TM41ExplanationText + $68B8 = _ThrewBaitText + $6B34 = _NoCyclingAllowedHereText + $411B = _NotHealthyEnoughText + $4AA2 = _PewterCityText_193fb + $5C82 = _CeladonCityText10 + $6B69 = _BoxFullCannotThrowBallText + $5482 = _LavenderTownText_4413c + $5D18 = _CeladonCityText11 + $5030 = _CeruleanCityText3 + $576C = _SSAnneFlashedTicketText + $506E = _CeruleanCityText4 + $5D41 = _CeladonCityText13 + $6081 = _FuchsiaCityVoltorbText + $50BA = _CeruleanCityText5 + $5D82 = _CeladonCityText14 + $4168 = _CannotGetOffHereText + $50F6 = _CeruleanCityText6 + $5D93 = _CeladonCityText15 + $5DBF = _CeladonCityText16 + $43CC = _ViridianCityText1 + $57A3 = _SSAnneNoTicketText + $5E3E = _CeladonCityText17 + $52D6 = _CeruleanCityText9 + $5E6A = _CeladonCityText18 + $694F = _ItemfinderFoundItemText + $4CB1 = _PewterCityText10 + $4CCB = _PewterCityText11 + $4000 = _CableClubNPCText5 + $4D0C = _PewterCityText12 + $4014 = _CableClubNPCText6 + $4264 = _OakWalksUpText + $4AC6 = _PewterCityText13 + $68CC = _ThrewRockText + $4833 = _ViridianCityText8 + $5188 = _CeruleanCityText_19730 + $5AFD = _TM41PreText + $5F99 = _FuchsiaCityText11 + $689E = _VitaminNoEffectText + $4860 = _ViridianCityText9 + $5B5A = _ReceivedTM41Text + $6B03 = _ThrowBallAtTrainerMonText1 + $4437 = _ViridianCityText_19122 + $469A = _ReceivedTM42Text + $46AD = _TM42Explanation + $5FC1 = _FuchsiaCityText13 + $612C = _FuchsiaCityLaprasText + $69F9 = _PPIncreasedText + $6B22 = _ThrowBallAtTrainerMonText2 + $69A4 = _RaisePPWhichTechniqueText + $4245 = _OakAppearsText + $47E6 = _ViridianCityText_19214 + $5506 = _LavenderTownText2 + $44CD = _ViridianCityText_19152 + $4DE3 = _CeruleanCityText_19672 + $51C5 = _CeruleanCityText_19735 + $555F = _LavenderTownText3 + $5FDC = _FuchsiaCityText16 + $6191 = _FuchsiaCityKabutoText + $6A0D = _PPRestoredText + $4F82 = _ReceivedTM28Text + $55BB = _LavenderTownText4 + $5FF6 = _FuchsiaCityText17 + $6940 = _CoinCaseNumCoinsText + $6A42 = _TeachMachineMoveText + $4051 = _CanMoveBouldersText + $4474 = _ViridianCityText_19127 + $55E0 = _LavenderTownText5 + $6011 = _FuchsiaCityText18 + $685E = _SurfingGotOnText + $45B5 = _ViridianCityText_19191 + $5285 = _CeruleanCityText_19774 + $4807 = _ViridianCityText_19219 + $4B38 = _PewterCityText_1942c + $4069 = _CurrentTooFastText + $44DB = _ViridianCityText_19157 + $4525 = _ViridianCityText_19175 + $4A56 = _PewterCityText_193f1 + $4D2B = _CeruleanCityText_19668 + $4E07 = _CeruleanCityText_19677 + $561D = _LavenderTownText8 + $4107 = _CannotFlyHereText + $549D = _LavenderTownText_44141 + $563C = _LavenderTownText9 + $59FB = _CeladonCityText1 + $6445 = _SaffronCityText10 + $686F = _SurfingNoPlaceToGetOffText + $5A4B = _CeladonCityText2 + $6475 = _SaffronCityText11 + $65F8 = _SaffronCityText20 + $4B87 = _PewterCityText_1945d + $52A3 = _CeruleanCityText_19779 + $56E2 = _VermilionCityText_198ac + $5A79 = _CeladonCityText3 + $64D6 = _SaffronCityText12 + $6667 = _SaffronCityText21 + $5AA6 = _CeladonCityText4 + $64EB = _SaffronCityText13 + $66C7 = _SaffronCityText22 + $4A75 = _PewterCityText_193f6 + $5BB8 = _TM41NoRoomText + $6518 = _SaffronCityText14 + $414E = _CannotUseItemsHereText + $418F = _SetToBoxText + $42DC = _PalletTownText2 + $46D7 = _TM42NoRoomText + $54C0 = _LavenderTownText_44146 + $5BD9 = _CeladonCityText6 + $654F = _SaffronCityText15 + $66E2 = _SaffronCityText24 + $431D = _PalletTownText3 + $5C30 = _CeladonCityText7 + $61E6 = _CinnabarIslandText1 + $6577 = _SaffronCityText16 + $66F5 = _SaffronCityText25 + $4374 = _PalletTownText4 + $5C49 = _CeladonCityText8 + $622A = _CinnabarIslandText2 + $65A6 = _SaffronCityText17 + $4130 = _NewBadgeRequiredText + $438B = _PalletTownText5 + $5C63 = _CeladonCityText9 + $6266 = _CinnabarIslandText3 + $65B5 = _SaffronCityText18 + $43B6 = _PalletTownText6 + $4FB3 = _TM28NoRoomText + $43C1 = _PalletTownText7 + $497F = _PewterCityText1 + SLACK: $146C bytes + +Bank #42: + SECTION: $4000-$432F ($0330 bytes) + $401E = _GotOnBicycleText2 + $4088 = _AlreadyKnowsText + $411D = _WrongMon1Text + $41D3 = _WrongMon2Text + $4284 = _WrongMon3Text + $410B = _NoTrade1Text + $41B5 = _NoTrade2Text + $4274 = _NoTrade3Text + $403C = _ThrewAwayItemText + $4155 = _Thanks1Text + $4209 = _Thanks2Text + $42BC = _Thanks3Text + $4024 = _GotOffBicycleText1 + $40BC = _TradedForText + $4030 = _GotOffBicycleText2 + $404F = _IsItOKToTossItemText + $409A = _ConnectCableText + $4162 = _AfterTrade1Text + $4212 = _AfterTrade2Text + $42C9 = _AfterTrade3Text + $40D8 = _WannaTrade1Text + $417C = _WannaTrade2Text + $4240 = _WannaTrade3Text + $4000 = _ItemUseText001 + $4009 = _ItemUseText002 + $4315 = _UsedCutText + $42F8 = _NothingToCutText + $4068 = _TooImportantToTossText + $400F = _GotOnBicycleText1 + SLACK: $3CD0 bytes + +Bank #43: + SECTION: $4000-$789D ($389E bytes) + $5B56 = _KabutopsDexEntry + $667E = _MachampDexEntry + $4DF3 = _MachokeDexEntry + $5FCD = _VaporeonDexEntry + $5743 = _ZapdosDexEntry + $5E4E = _WigglytuffDexEntry + $4A9E = _TangelaDexEntry + $5AA0 = _DragonairDexEntry + $6A5A = _ElectrodeDexEntry + $73AF = _MagnemiteDexEntry + $4000 = _RhydonDexEntry + $48D6 = _GastlyDexEntry + $580E = _MeowthDexEntry + $7290 = _GeodudeDexEntry + $7593 = _CharizardDexEntry + $4A43 = _PinsirDexEntry + $64A7 = _VenomothDexEntry + $6F9F = _GoldeenDexEntry + $771C = _BellsproutDexEntry + $4B61 = _OnixDexEntry + $4C89 = _SlowpokeDexEntry + $550C = _DragoniteDexEntry + $7000 = _SeakingDexEntry + $6A00 = _CloysterDexEntry + $5277 = _KoffingDexEntry + $705D = _PonytaDexEntry + $598C = _PikachuDexEntry + $5EB7 = _EeveeDexEntry + $6AC0 = _ClefableDexEntry + $440C = _ExeggcuteDexEntry + $5CD9 = _SandslashDexEntry + $6E81 = _BulbasaurDexEntry + $53FA = _TaurosDexEntry + $5F18 = _FlareonDexEntry + $6EDF = _VenusaurDexEntry + $7475 = _SquirtleDexEntry + $451F = _NidoranFDexEntry + $592B = _NinetalesDexEntry + $66E4 = _GolduckDexEntry + $4EB4 = _HitmonleeDexEntry + $4F81 = _ArbokDexEntry + $65C7 = _MetapodDexEntry + $49E4 = _BlastoiseDexEntry + $4D9B = _ChanseyDexEntry + $5A3F = _DratiniDexEntry + $6508 = _DewgongDexEntry + $6812 = _MewtwoDexEntry + $699D = _KinglerDexEntry + $6DB9 = _PidgeotDexEntry + $457D = _NidoqueenDexEntry + $5396 = _DiglettDexEntry + $5625 = _JynxDexEntry + $60F1 = _EkansDexEntry + $7838 = _LugiaDexEntry + $4872 = _TentacoolDexEntry + $40B4 = _NidoranMDexEntry + $43A7 = _LickitungDexEntry + $50FF = _GolemDexEntry + $498E = _StaryuDexEntry + $58CE = _VulpixDexEntry + $7120 = _RattataDexEntry + $7416 = _CharmanderDexEntry + $614C = _ParasDexEntry + $6B76 = _PersianDexEntry + $6BD9 = _MarowakDexEntry + $405B = _KangaskhanDexEntry + $55C2 = _PoliwagDexEntry + $5C7B = _SandshrewDexEntry + $6D57 = _PidgeottoDexEntry + $6E1E = _StarmieDexEntry + $5565 = _DoduoDexEntry + $5D8E = _OmastarDexEntry + $6C3D = _HaunterDexEntry + $46F2 = _ArcanineDexEntry + $76B6 = _VileplumeDexEntry + $4E59 = _MrMimeDexEntry + $6B1B = _WeezingDexEntry + $6CF9 = _AlakazamDexEntry + $7658 = _GloomDexEntry + $4B05 = _GrowlitheDexEntry + $632D = _BeedrillDexEntry + $74D4 = _CharmeleonDexEntry + $54AE = _VenonatDexEntry + $5F73 = _JolteonDexEntry + $5D37 = _OmanyteDexEntry + $644A = _DugtrioDexEntry + $4340 = _ExeggutorDexEntry + $474F = _MewDexEntry + $57A6 = _DittoDexEntry + $61B2 = _PoliwhirlDexEntry + $620E = _PoliwrathDexEntry + $50A1 = _DrowzeeDexEntry + $4170 = _SpearowDexEntry + $608D = _ZubatDexEntry + $77DA = _VictreebelDexEntry + $4932 = _ScytherDexEntry + $5C1A = _SeadraDexEntry + $5042 = _PsyduckDexEntry + $68D8 = _MagikarpDexEntry + $693C = _MukDexEntry + $6C9D = _AbraDexEntry + $70C4 = _RapidashDexEntry + $777C = _WeepinbellDexEntry + $6565 = _CaterpieDexEntry + $717C = _RaticateDexEntry + $734C = _AerodactylDexEntry + $4F19 = _HitmonchanDexEntry + $4114 = _ClefairyDexEntry + $44C1 = _GengarDexEntry + $5683 = _MoltresDexEntry + $5161 = _MagmarDexEntry + $6878 = _SnorlaxDexEntry + $41CB = _VoltorbDexEntry + $427D = _SlowbroDexEntry + $6275 = _WeedleDexEntry + $674B = _HypnoDexEntry + $752D = _WartortleDexEntry + $4227 = _NidokingDexEntry + $4632 = _RhyhornDexEntry + $4819 = _ShellderDexEntry + $4FDB = _ParasectDexEntry + $602F = _MachopDexEntry + $63E8 = _PrimeapeDexEntry + $67AD = _GolbatDexEntry + $7238 = _NidorinaDexEntry + $5871 = _KrabbyDexEntry + $62CA = _KakunaDexEntry + $75F1 = _OddishDexEntry + $45DB = _CuboneDexEntry + $59EA = _RaichuDexEntry + $72F0 = _PorygonDexEntry + $4CDF = _KadabraDexEntry + $4D39 = _GravelerDexEntry + $5219 = _MagnetonDexEntry + $47B8 = _GyaradosDexEntry + $42DE = _IvysaurDexEntry + $5DE7 = _JigglypuffDexEntry + $638A = _DodrioDexEntry + $6F3B = _TentacruelDexEntry + $4C26 = _PidgeyDexEntry + $5BBD = _HorseaDexEntry + $6626 = _ButterfreeDexEntry + $4693 = _LaprasDexEntry + $51BC = _ElectabuzzDexEntry + $5457 = _FarfetchdDexEntry + $4BC8 = _FearowDexEntry + $533D = _SeelDexEntry + $52DE = _MankeyDexEntry + $4460 = _GrimerDexEntry + $5AFA = _KabutoDexEntry + $71DB = _NidorinoDexEntry + $56E5 = _ArticunoDexEntry + SLACK: $0762 bytes + +Bank #44: + SECTION: $4000-$49B9 ($09BA bytes) + $4000 = MoveNames + SLACK: $3646 bytes + +Bank #45: + SECTION: $4000-$7B6F ($3B70 bytes) + $4000 = HorseaPicFront + $40B7 = HorseaPicBack + $4180 = SeadraPicFront + $42C4 = SeadraPicBack + $4410 = GoldeenPicFront + $454B = GoldeenPicBack + $4681 = SeakingPicFront + $486D = SeakingPicBack + $4995 = StaryuPicFront + $4AAF = StaryuPicBack + $4BA2 = StarmiePicFront + $4D29 = StarmiePicBack + $4DF7 = MrMimePicFront + $4F46 = MrMimePicBack + $503B = ScytherPicFront + $51B2 = ScytherPicBack + $52F4 = JynxPicFront + $544B = JynxPicBack + $5514 = ElectabuzzPicFront + $56CC = ElectabuzzPicBack + $57FF = MagmarPicFront + $599D = MagmarPicBack + $5AF1 = PinsirPicFront + $5CA3 = PinsirPicBack + $5DDE = TaurosPicFront + $5FDE = TaurosPicBack + $60AD = MagikarpPicFront + $6202 = MagikarpPicBack + $6340 = GyaradosPicFront + $654C = GyaradosPicBack + $66BB = LaprasPicFront + $6838 = LaprasPicBack + $6957 = DittoPicFront + $69F7 = DittoPicBack + $6AB6 = EeveePicFront + $6BBA = EeveePicBack + $6CF2 = VaporeonPicFront + $6E80 = VaporeonPicBack + $6F79 = JolteonPicFront + $70E0 = JolteonPicBack + $71E4 = FlareonPicFront + $7334 = FlareonPicBack + $7457 = PorygonPicFront + $757F = PorygonPicBack + $767E = OmanytePicFront + $776A = OmanytePicBack + $7895 = OmastarPicFront + $7A14 = OmastarPicBack + SLACK: $0490 bytes + +Bank #46: + SECTION: $4000-$6151 ($2152 bytes) + $4000 = KabutoPicFront + $40CC = KabutoPicBack + $41C1 = KabutopsPicFront + $4351 = KabutopsPicBack + $4496 = AerodactylPicFront + $4685 = AerodactylPicBack + $47A0 = SnorlaxPicFront + $4921 = SnorlaxPicBack + $49A6 = ArticunoPicFront + $4B91 = ArticunoPicBack + $4C87 = ZapdosPicFront + $4E82 = ZapdosPicBack + $4F96 = MoltresPicFront + $5163 = MoltresPicBack + $52A5 = DratiniPicFront + $5380 = DratiniPicBack + $5468 = DragonairPicFront + $55B7 = DragonairPicBack + $56B3 = DragonitePicFront + $589F = DragonitePicBack + $5991 = MewtwoPicFront + $5B4E = MewtwoPicBack + $5C79 = MewPicFront + $5D52 = MewPicBack + $5E70 = LugiaPicFront + $605A = LugiaPicBack + SLACK: $1EAE bytes + +Bank #47: + SECTION: $4000-$4CC0 ($0CC1 bytes) + $4000 = ProfOakPic + $449E = RedMugShot + $45B2 = LeafMugShot + $4A41 = BallSprite + $4A81 = OmanyteSprite + $4AC1 = BoulderSprite + $4B01 = PaperSheetSprite + $4B41 = BookMapDexSprite + $4B81 = ClipboardSprite + $4BC1 = SnorlaxSprite + $4C01 = OldAmberSprite + $4C81 = PokedexSprite + $4C41 = LyingOldManSprite + $4344 = OldManPic + $422E = LeafPicBack + $4124 = RedPicBack + $46F1 = TradingAnimationGraphics + $4A01 = TradingAnimationGraphics2 + $443E = LeafFishingTilesFront + $445E = LeafFishingTilesBack + $447E = LeafFishingTilesSide + SLACK: $333F bytes + +Bank #256: + EMPTY + +Bank #257: + EMPTY + +Bank #258: + EMPTY + +Bank #259: + EMPTY + +Bank #260: + EMPTY + +Bank #261: + EMPTY + +Bank #262: + EMPTY + +Bank #263: + EMPTY + +Bank #264: + EMPTY + +Bank #265: + EMPTY + +Bank #266: + EMPTY + +Bank #267: + EMPTY + +Bank #268: + EMPTY + +Bank #269: + EMPTY + +Bank #270: + EMPTY + +Bank #271: + EMPTY + +Bank #272: + EMPTY + +Bank #273: + EMPTY + +Bank #274: + EMPTY + +Bank #275: + EMPTY + +Bank #276: + EMPTY + +Bank #277: + EMPTY + +Bank #278: + EMPTY + +Bank #279: + EMPTY + +Bank #280: + EMPTY + +Bank #281: + EMPTY + +Bank #282: + EMPTY + +Bank #283: + EMPTY + +Bank #284: + EMPTY + +Bank #285: + EMPTY + +Bank #286: + EMPTY + +Bank #287: + EMPTY + +Bank #288: + EMPTY + +Bank #289: + EMPTY + +Bank #290: + EMPTY + +Bank #291: + EMPTY + +Bank #292: + EMPTY + +Bank #293: + EMPTY + +Bank #294: + EMPTY + +Bank #295: + EMPTY + +Bank #296: + EMPTY + +Bank #297: + EMPTY + +Bank #298: + EMPTY + +Bank #299: + EMPTY + +Bank #300: + EMPTY + +Bank #301: + EMPTY + +Bank #302: + EMPTY + +Bank #303: + EMPTY + +Bank #304: + EMPTY + +Bank #305: + EMPTY + +Bank #306: + EMPTY + +Bank #307: + EMPTY + +Bank #308: + EMPTY + +Bank #309: + EMPTY + +Bank #310: + EMPTY + +Bank #311: + EMPTY + +Bank #312: + EMPTY + +Bank #313: + EMPTY + +Bank #314: + EMPTY + +Bank #315: + EMPTY + +Bank #316: + EMPTY + +Bank #317: + EMPTY + +Bank #318: + EMPTY + +Bank #319: + EMPTY + +Bank #320: + EMPTY + +Bank #321: + EMPTY + +Bank #322: + EMPTY + +Bank #323: + EMPTY + +Bank #324: + EMPTY + +Bank #325: + EMPTY + +Bank #326: + EMPTY + +Bank #327: + EMPTY + +Bank #328: + EMPTY + +Bank #329: + EMPTY + +Bank #330: + EMPTY + +Bank #331: + EMPTY + +Bank #332: + EMPTY + +Bank #333: + EMPTY + +Bank #334: + EMPTY + +Bank #335: + EMPTY + +Bank #336: + EMPTY + +Bank #337: + EMPTY + +Bank #338: + EMPTY + +Bank #339: + EMPTY + +Bank #340: + EMPTY + +Bank #341: + EMPTY + +Bank #342: + EMPTY + +Bank #343: + EMPTY + +Bank #344: + EMPTY + +Bank #345: + EMPTY + +Bank #346: + EMPTY + +Bank #347: + EMPTY + +Bank #348: + EMPTY + +Bank #349: + EMPTY + +Bank #350: + EMPTY + +Bank #351: + EMPTY + +Bank #352: + EMPTY + +Bank #353: + EMPTY + +Bank #354: + EMPTY + +Bank #355: + EMPTY + +Bank #356: + EMPTY + +Bank #357: + EMPTY + +Bank #358: + EMPTY + +Bank #359: + EMPTY + +Bank #360: + EMPTY + +Bank #361: + EMPTY + +Bank #362: + EMPTY + +Bank #363: + EMPTY + +Bank #364: + EMPTY + +Bank #365: + EMPTY + +Bank #366: + EMPTY + +Bank #367: + EMPTY + +Bank #368: + EMPTY + +Bank #369: + EMPTY + +Bank #370: + EMPTY + +Bank #371: + EMPTY + +Bank #372: + EMPTY + +Bank #373: + EMPTY + +Bank #374: + EMPTY + +Bank #375: + EMPTY + +Bank #376: + EMPTY + +Bank #377: + EMPTY + +Bank #378: + EMPTY + +Bank #379: + EMPTY + +Bank #380: + EMPTY + +Bank #381: + EMPTY + +Bank #382: + EMPTY + +Bank #383: + EMPTY + +Bank #384: + EMPTY + +Bank #385: + EMPTY + +Bank #386: + EMPTY + +Bank #387: + EMPTY + +Bank #388: + EMPTY + +Bank #389: + EMPTY + +Bank #390: + EMPTY + +Bank #391: + EMPTY + +Bank #392: + EMPTY + +Bank #393: + EMPTY + +Bank #394: + EMPTY + +Bank #395: + EMPTY + +Bank #396: + EMPTY + +Bank #397: + EMPTY + +Bank #398: + EMPTY + +Bank #399: + EMPTY + +Bank #400: + EMPTY + +Bank #401: + EMPTY + +Bank #402: + EMPTY + +Bank #403: + EMPTY + +Bank #404: + EMPTY + +Bank #405: + EMPTY + +Bank #406: + EMPTY + +Bank #407: + EMPTY + +Bank #408: + EMPTY + +Bank #409: + EMPTY + +Bank #410: + EMPTY + +Bank #411: + EMPTY + +Bank #412: + EMPTY + +Bank #413: + EMPTY + +Bank #414: + EMPTY + +Bank #415: + EMPTY + +Bank #416: + EMPTY + +Bank #417: + EMPTY + +Bank #418: + EMPTY + +Bank #419: + EMPTY + +Bank #420: + EMPTY + +Bank #421: + EMPTY + +Bank #422: + EMPTY + +Bank #423: + EMPTY + +Bank #424: + EMPTY + +Bank #425: + EMPTY + +Bank #426: + EMPTY + +Bank #427: + EMPTY + +Bank #428: + EMPTY + +Bank #429: + EMPTY + +Bank #430: + EMPTY + +Bank #431: + EMPTY + +Bank #432: + EMPTY + +Bank #433: + EMPTY + +Bank #434: + EMPTY + +Bank #435: + EMPTY + +Bank #436: + EMPTY + +Bank #437: + EMPTY + +Bank #438: + EMPTY + +Bank #439: + EMPTY + +Bank #440: + EMPTY + +Bank #441: + EMPTY + +Bank #442: + EMPTY + +Bank #443: + EMPTY + +Bank #444: + EMPTY + +Bank #445: + EMPTY + +Bank #446: + EMPTY + +Bank #447: + EMPTY + +Bank #448: + EMPTY + +Bank #449: + EMPTY + +Bank #450: + EMPTY + +Bank #451: + EMPTY + +Bank #452: + EMPTY + +Bank #453: + EMPTY + +Bank #454: + EMPTY + +Bank #455: + EMPTY + +Bank #456: + EMPTY + +Bank #457: + EMPTY + +Bank #458: + EMPTY + +Bank #459: + EMPTY + +Bank #460: + EMPTY + +Bank #461: + EMPTY + +Bank #462: + EMPTY + +Bank #463: + EMPTY + +Bank #464: + EMPTY + +Bank #465: + EMPTY + +Bank #466: + EMPTY + +Bank #467: + EMPTY + +Bank #468: + EMPTY + +Bank #469: + EMPTY + +Bank #470: + EMPTY + +Bank #471: + EMPTY + +Bank #472: + EMPTY + +Bank #473: + EMPTY + +Bank #474: + EMPTY + +Bank #475: + EMPTY + +Bank #476: + EMPTY + +Bank #477: + EMPTY + +Bank #478: + EMPTY + +Bank #479: + EMPTY + +Bank #480: + EMPTY + +Bank #481: + EMPTY + +Bank #482: + EMPTY + +Bank #483: + EMPTY + +Bank #484: + EMPTY + +Bank #485: + EMPTY + +Bank #486: + EMPTY + +Bank #487: + EMPTY + +Bank #488: + EMPTY + +Bank #489: + EMPTY + +Bank #490: + EMPTY + +Bank #491: + EMPTY + +Bank #492: + EMPTY + +Bank #493: + EMPTY + +Bank #494: + EMPTY + +Bank #495: + EMPTY + +Bank #496: + EMPTY + +Bank #497: + EMPTY + +Bank #498: + EMPTY + +Bank #499: + EMPTY + +Bank #500: + EMPTY + +Bank #501: + EMPTY + +Bank #502: + EMPTY + +Bank #503: + EMPTY + +Bank #504: + EMPTY + +Bank #505: + EMPTY + +Bank #506: + EMPTY + +Bank #507: + EMPTY + +Bank #508: + EMPTY + +Bank #509: + EMPTY + +Bank #510: + EMPTY + +Bank #511: + EMPTY + +WRAM0: + SECTION: $C000-$C0FF ($0100 bytes) + $C003 = wc003 + $C012 = wc012 + $C004 = wc004 + $C005 = wc005 + $C006 = wc006 + $C016 = wc016 + $C026 = wc026 + $C027 = wc027 + $C036 = wc036 + $C028 = wc028 + $C046 = wc046 + $C056 = wc056 + $C066 = wc066 + $C076 = wc076 + $C086 = wc086 + $C096 = wc096 + $C0AE = wc0ae + $C0EA = wc0ea + $C0BE = wc0be + $C0EB = wc0eb + $C0CE = wc0ce + $C0EC = wc0ec + $C0CF = wc0cf + $C0DE = wc0de + $C0ED = wc0ed + $C0EE = wc0ee + $C0EF = wc0ef + $C02A = wc02a + $C02B = wc02b + $C0D0 = wc0d0 + $C00E = wc00e + $C02C = wc02c + $C0D1 = wc0d1 + $C02D = wc02d + $C0D2 = wc0d2 + $C0F0 = wc0f0 + $C02E = wc02e + $C0A6 = wc0a6 + $C0D3 = wc0d3 + $C0F1 = wc0f1 + $C03E = wc03e + $C0B6 = wc0b6 + $C0D4 = wc0d4 + $C0F2 = wc0f2 + $C04E = wc04e + $C0C6 = wc0c6 + $C0D5 = wc0d5 + $C05E = wc05e + $C0D6 = wc0d6 + $C06E = wc06e + $C0E6 = wc0e6 + $C07E = wc07e + $C0E7 = wc0e7 + $C08E = wc08e + $C0E8 = wc0e8 + $C09E = wc09e + $C0E9 = wc0e9 + $C000 = wc000 + $C001 = wc001 + $C002 = wc002 + SECTION: $C100-$C1FF ($0100 bytes) + $C100 = wSpriteStateData1 + SECTION: $C200-$C2FF ($0100 bytes) + $C200 = wSpriteStateData2 + SECTION: $C300-$CFFF ($0D00 bytes) + $C3A0 = wTileMap + $CD2E = wEngagedTrainerSet + $CF07 = wAnimSoundID + $CFD0 = W_ENEMYMOVEACCURACY + $CFDA = wEnemyMonNick + $CC4A = wMenuWrappingEnabled + $CC25 = wTopMenuItemX + $CFBA = wcfba + $CC24 = wTopMenuItemY + $CCD7 = wPlayerSubstituteHP + $CCEB = wcceb + $CFBB = wcfbb + $CFCA = wcfca + $C6E8 = wTempPic + $CCEC = wccec + $CFBC = wcfbc + $CFCB = wcfcb + $CBFC = wScreenEdgeTiles + $CCDE = wccde + $CCED = wcced + $CD1F = wPlayerMonEvasionMod + $CD41 = wTrainerScreenX + $CF70 = wGymLeaderName + $CFEA = wEnemyMonType1 + $CCEE = wccee + $CD40 = wTrainerScreenY + $CD60 = wFlags_0xcd60 + $CFAF = wcfaf + $CFBE = wcfbe + $CFD6 = W_PLAYERMOVEACCURACY + $CFEB = wEnemyMonType2 + $CCEF = wccef + $CFE8 = wEnemyMonPartyPos + $CC2A = wLastMenuItem + $CFC5 = wWalkCounter + $C508 = wTileMapBackup + $CF5F = wStringBuffer1 + $CFD8 = wEnemyMonSpecies2 + $CD2F = wEnemyMonDefenseMod + $CD6B = wJoyIgnore + $CF70 = wStringBuffer2 + $CC30 = wMenuCursorLocation + $CEEF = wHPBarDelta + $CF81 = wStringBuffer3 + $CC36 = wListScrollOffset + $CC2E = wPlayerMoveListIndex + $CD3D = wWhichTrade + $CFF8 = wEnemyMonDefense + $CCDD = wEnemySelectedMove + $CD1E = wPlayerMonAccuracyMod + $CFCC = W_ENEMYMOVENUM + $CD3F = wTrainerFacingDirection + $CD31 = wEnemyMonSpecialMod + $CC34 = wMenuJoypadPollCount + $CEFD = wHPBarHPDifference + $CFD1 = W_ENEMYMOVEMAXPP + $CCA1 = wcca1 + $CFD2 = W_PLAYERMOVENUM + $CFFC = wEnemyMonSpecial + $CC2B = wcc2b + $CC3A = wcc3a + $CF0A = wcf0a + $CFA0 = wcfa0 + $CC2C = wcc2c + $CC3B = wcc3b + $CD1A = wPlayerMonStatMods + $CD1A = wPlayerMonAttackMod + $CD3A = wcd3a + $CF0B = wcf0b + $CFF1 = wEnemyMonDVs + $CC2D = wcc2d + $CC3C = wcc3c + $CC4B = wcc4b + $CCF0 = wccf0 + $CD3B = wcd3b + $CD4A = wcd4a + $CF0C = wcf0c + $CF1B = wcf1b + $CFC0 = wcfc0 + $CFCF = W_ENEMYMOVETYPE + $CC3D = wcc3d + $CC5B = wcc5b + $CCD2 = wRLEByteCount + $CCD3 = wccd3 + $CCF1 = wccf1 + $CD0F = wcd0f + $CD4B = wcd4b + $CD5A = wcd5a + $CF0D = wcf0d + $CF1C = wcf1c + $CFD7 = W_PLAYERMOVEMAXPP + $CC3E = wcc3e + $CC4D = wcc4d + $CC5C = wcc5c + $CC6B = wcc6b + $CCD4 = wccd4 + $CCE3 = wcce3 + $CCF2 = wccf2 + $CD4C = wcd4c + $CD5B = wcd5b + $CD6A = wcd6a + $CEF0 = wcef0 + $CF0E = wcf0e + $CF1A = wGBC + $CF1D = wcf1d + $CFA4 = wcfa4 + $CFC2 = wcfc2 + $CFCE = W_ENEMYMOVEPOWER + $CFEA = wEnemyMonType + $CC5D = wcc5d + $CCD5 = wccd5 + $CCE4 = wcce4 + $CCF3 = wccf3 + $CD4D = wcd4d + $CD5C = wcd5c + $CEF1 = wcef1 + $CF0F = wcf0f + $CF1E = wcf1e + $CF2D = wcf2d + $CF4B = wcf4b + $CC5E = wcc5e + $CCE5 = wcce5 + $CCF4 = wccf4 + $CD30 = wEnemyMonSpeedMod + $CD3F = wcd3f + $CD4E = wcd4e + $CD5D = wcd5d + $CD6C = wcd6c + $CF1F = wcf1f + $CF2E = wcf2e + $CF4C = wcf4c + $CF92 = wWhichPokemon + $CFA6 = wcfa6 + $CFC4 = wcfc4 + $CC29 = wMenuWatchedKeys + $CCF5 = wccf5 + $CD4F = wcd4f + $CD5E = wcd5e + $CD6D = wcd6d + $CF4D = wcf4d + $CCDB = wMoveMenuType + $CCE7 = wcce7 + $CCF6 = wccf6 + $CD5F = wcd5f + $CFA8 = wcfa8 + $CFC6 = wcfc6 + $CFD5 = W_PLAYERMOVETYPE + $CFD9 = wBattleMonSpecies2 + $CCD9 = wccd9 + $CCE8 = wcce8 + $CCF7 = wccf7 + $CF12 = wPredefParentBank + $CF8B = wcf8b + $CF9A = wcf9a + $CCE9 = wcce9 + $CF8C = wcf8c + $CF9B = wcf9b + $CFB9 = wcfb9 + $CFC8 = wcfc8 + $CFD4 = W_PLAYERMOVEPOWER + $CFE5 = wEnemyMonSpecies + $CFFA = wEnemyMonSpeed + $CEEB = wHPBarOldHP + $CF8D = wcf8d + $CF9C = wcf9c + $CFC9 = wcfc9 + $CFE9 = wEnemyMonStatus + $CF8E = wcf8e + $CC5B = wHallOfFame + $CCD8 = wEnemySubstituteHP + $CF8F = wcf8f + $CD33 = wEnemyMonEvasionMod + $CF14 = wCurSpriteMovement2 + $CFF3 = wEnemyMonLevel + $CEE9 = wHPBarMaxHP + $CD3D = wTrainerSpriteOffset + $CF5F = wGymCityName + $CCDF = wAICount + $CD3E = wTrainerEngageDistance + $CC28 = wMaxMenuItem + $CC2F = wPlayerMonNumber + $CEED = wHPBarNewHP + $CFE8 = wEnemyMonBoxLevel + $CC55 = wTrainerHeaderFlagBit + $CD10 = wcd10 + $CD11 = wcd11 + $CFE5 = wEnemyMon + $CD12 = wcd12 + $CF10 = wcf10 + $CD13 = wcd13 + $CD1B = wPlayerMonDefenseMod + $CF11 = wcf11 + $CC42 = wcc42 + $CCE2 = wEnemyMoveListIndex + $CD05 = wcd05 + $CD23 = wcd23 + $CD50 = wcd50 + $CF30 = wcf30 + $CFEC = wEnemyMonCatchRate + $C6E8 = wOverworldMap + $CC43 = wcc43 + $CC4E = wPredefID + $CD06 = wcd06 + $CD32 = wEnemyMonAccuracyMod + $CD42 = wcd42 + $CF13 = wcf13 + $CF94 = wListMenuID + $CC26 = wCurrentMenuItem + $CC35 = wcc35 + $CD34 = wcd34 + $CD43 = wcd43 + $CF05 = wcf05 + $CFC7 = wMusicHeaderPointer + $CD26 = wcd26 + $CD44 = wcd44 + $CD71 = wcd71 + $CF06 = wcf06 + $CFE6 = wEnemyMonHP + $CC37 = wcc37 + $CCDC = wPlayerSelectedMove + $CD2D = wEngagedTrainerClass + $CD45 = wcd45 + $CD72 = wcd72 + $CF25 = wcf25 + $CC38 = wcc38 + $CC47 = wcc47 + $CD37 = wcd37 + $CD46 = wcd46 + $CF08 = wcf08 + $CF17 = wcf17 + $CFF4 = wEnemyMonMaxHP + $CC48 = wcc48 + $CC57 = wcc57 + $CD1D = wPlayerMonSpecialMod + $CD29 = wcd29 + $CD38 = wcd38 + $CD47 = wcd47 + $CF09 = wcf09 + $CF18 = wcf18 + $CF90 = wcf90 + $CC49 = wcc49 + $CC58 = wcc58 + $CD39 = wcd39 + $CD48 = wcd48 + $CF37 = wcf37 + $CF91 = wcf91 + $CC27 = wTileBehindCursor + $CD49 = wcd49 + $CFED = wEnemyMonMoves + $CC4F = wPredefRegisters + $CD2E = wEnemyMonStatMods + $CD2E = wEnemyMonAttackMod + $CD59 = wcd59 + $CD77 = wcd77 + $CF93 = wcf93 + $CFCD = W_ENEMYMOVEEFFECT + $CC79 = wcc79 + $CC97 = wcc97 + $CD78 = wcd78 + $CD81 = wTileMapBackup2 + $CEE9 = wBuffer + $CF95 = wcf95 + $CFFE = wEnemyMonPP + $C300 = wOAMBuffer + $CF96 = wcf96 + $CF97 = wcf97 + $CFF6 = wEnemyMonAttack + $CF98 = wcf98 + $CF99 = wcf99 + $CFD3 = W_PLAYERMOVEEFFECT + $CD1C = wPlayerMonSpeedMod + SLACK: $0000 bytes + + EMPTY + + SECTION: $D000-$DEE1 ($0EE2 bytes) + $D002 = wd002 + $D163 = wPartyCount + $D202 = wPartyMon4AttackExp + $D369 = W_CURMAPWIDTH + $D603 = W_ROUTE25CURSCRIPT + $D626 = W_ROUTE16CURSCRIPT + $D666 = W_SEAFOAMISLANDS4CURSCRIPT + $D70F = W_FOSSILITEM + $D9A6 = wEnemyMon6Defense + $DA45 = W_PLAYTIMEFRAMES + $D092 = W_PBSTOREDROMBANK + $D0AA = W_SPRITEFLIPPED + $D120 = wd120 + $D170 = wPartyMon1Type1 + $D22E = wPartyMon5AttackExp + $D61C = W_ROUTE17CURSCRIPT + $D668 = W_SEAFOAMISLANDS5CURSCRIPT + $DA7C = wDayCareMonPP + $DD2A = wBoxMonOT + $D01B = wBattleMonCatchRate + $D0B7 = wPredefBank + $D0B9 = W_MONHBASESTATS + $D121 = wd121 + $D130 = wd130 + $D171 = wPartyMon1Type2 + $D19C = wPartyMon2Type1 + $D25A = wPartyMon6AttackExp + $D627 = W_ROUTE18CURSCRIPT + $D8CE = wEnemyMon1Special + $DA70 = wDayCareMonHPExp + $D0A7 = W_SPRITEOUTPUTBITOFFSET + $D122 = wd122 + $D131 = wd131 + $D19D = wPartyMon2Type2 + $D1C8 = wPartyMon3Type1 + $D61D = W_ROUTE19CURSCRIPT + $D70D = wSafariSteps + $D8FA = wEnemyMon2Special + $DA80 = W_NUMINBOX + $D033 = wd033 + $D060 = wd060 + $D074 = W_NUMHITS + $D0B8 = W_MONHDEXNUM + $D132 = wd132 + $D141 = wd141 + $D1C9 = wPartyMon3Type2 + $D1F4 = wPartyMon4Type1 + $D639 = W_CINNABARISLANDCURSCRIPT + $D665 = W_SSANNE2CURSCRIPT + $D710 = W_FOSSILMON + $D8B9 = wEnemyMon1DefenseExp + $D8BF = wEnemyMon1DVs + $D926 = wEnemyMon3Special + $D007 = wd007 + $D015 = wBattleMonHP + $D034 = wd034 + $D061 = wd061 + $D070 = wd070 + $D124 = wd124 + $D133 = wd133 + $D1F5 = wPartyMon4Type2 + $D220 = wPartyMon5Type1 + $D359 = wPlayerID + $D643 = W_SILPHCO2CURSCRIPT + $D700 = wd700 + $D8E5 = wEnemyMon2DefenseExp + $D8EB = wEnemyMon2DVs + $D952 = wEnemyMon4Special + $D008 = wd008 + $D0C7 = W_MONHMOVES + $D125 = wd125 + $D143 = wd143 + $D152 = wd152 + $D221 = wPartyMon5Type2 + $D24C = wPartyMon6Type1 + $D365 = wLastMap + $D644 = W_SILPHCO3CURSCRIPT + $D911 = wEnemyMon3DefenseExp + $D917 = wEnemyMon3DVs + $D97E = wEnemyMon5Special + $D023 = wBattleMonMaxHP + $D036 = wd036 + $D126 = wd126 + $D153 = wd153 + $D24D = wPartyMon6Type2 + $D360 = wd360 + $D5A4 = wPlayerCoins + $D5F0 = W_OAKSLABCURSCRIPT + $D617 = W_SSANNE5CURSCRIPT + $D63A = W_MANSION1CURSCRIPT + $D645 = W_SILPHCO4CURSCRIPT + $D888 = W_GRASSMONS + $D8A9 = wEnemyMon1Type + $D93D = wEnemyMon4DefenseExp + $D943 = wEnemyMon4DVs + $D9AA = wEnemyMon6Special + $D046 = wd046 + $D145 = wd145 + $D355 = W_OPTIONS + $D367 = W_CURMAPTILESET + $D3A8 = W_SPRITESETID + $D63C = W_MANSION2CURSCRIPT + $D646 = W_SILPHCO5CURSCRIPT + $D730 = wd730 + $D8D5 = wEnemyMon2Type + $D969 = wEnemyMon5DefenseExp + $D96F = wEnemyMon5DVs + $DA44 = W_PLAYTIMESECONDS + $D047 = wd047 + $D065 = wd065 + $D067 = W_ENEMYBATTSTATUS1 + $D083 = wd083 + $D0A9 = W_SPRITEUNPACKMODE + $D0AD = W_SPRITEOUTPUTPTR + $D0C2 = W_MONHSPRITEDIM + $D119 = wd119 + $D128 = wd128 + $D380 = wd380 + $D524 = wd524 + $D63D = W_MANSION3CURSCRIPT + $D647 = W_SILPHCO6CURSCRIPT + $D65F = W_CELADONGAMECORNERCURSCRIPT + $D740 = wd740 + $D803 = wd803 + $D830 = wd830 + $D901 = wEnemyMon3Type + $D995 = wEnemyMon6DefenseExp + $D99B = wEnemyMon6DVs + $D01C = wBattleMonMoves + $D048 = wd048 + $D066 = wd066 + $D068 = W_ENEMYBATTSTATUS2 + $D075 = wd075 + $D129 = wd129 + $D156 = wd156 + $D372 = wd372 + $D381 = wd381 + $D390 = wd390 + $D525 = wd525 + $D608 = W_SSANNE8CURSCRIPT + $D63E = W_MANSION4CURSCRIPT + $D648 = W_SILPHCO7CURSCRIPT + $D714 = wd714 + $D732 = wd732 + $D813 = wd813 + $D831 = wd831 + $D92D = wEnemyMon4Type + $DAAB = wBoxMon1DefenseExp + $DAB1 = wBoxMon1DVs + $D069 = W_ENEMYBATTSTATUS3 + $D085 = wd085 + $D139 = wd139 + $D148 = wd148 + $D157 = wd157 + $D373 = wd373 + $D382 = wd382 + $D391 = wd391 + $D526 = wd526 + $D609 = W_SSANNE9CURSCRIPT + $D649 = W_SILPHCO8CURSCRIPT + $D751 = wd751 + $D805 = wd805 + $D832 = wd832 + $D8BD = wEnemyMon1SpecialExp + $D959 = wEnemyMon5Type + $D087 = W_SUBANIMCOUNTER + $D374 = wd374 + $D383 = wd383 + $D504 = W_MAPSPRITEEXTRADATA + $D527 = wd527 + $D64A = W_SILPHCO9CURSCRIPT + $D734 = wd734 + $D743 = wd743 + $D752 = wd752 + $D815 = wd815 + $D833 = wd833 + $D8E9 = wEnemyMon2SpecialExp + $D985 = wEnemyMon6Type + $DA39 = W_CURMAPSCRIPT + $DA72 = wDayCareMonAttackExp + $D02D = wBattleMonPP + $D078 = wd078 + $D0D7 = W_DAMAGE + $D191 = wPartyMon1Defense + $D273 = wPartyMonOT + $D366 = wd366 + $D375 = wd375 + $D384 = wd384 + $D393 = wd393 + $D39D = W_SPRITESET + $D528 = wd528 + $D744 = wd744 + $D771 = wd771 + $D807 = wd807 + $D816 = wd816 + $D825 = wd825 + $D834 = wd834 + $D8A4 = wEnemyMon1Species + $D8CC = wEnemyMon1Speed + $D915 = wEnemyMon3SpecialExp + $DA9B = wBoxMon1Type + $D079 = wd079 + $D088 = wd088 + $D08E = W_PBSTOREDREGISTERD + $D127 = W_CURENEMYLVL + $D1BD = wPartyMon2Defense + $D358 = wd358 + $D376 = wd376 + $D385 = wd385 + $D394 = wd394 + $D529 = wd529 + $D70B = W_TOWNVISITEDFLAG + $D718 = wd718 + $D736 = wd736 + $D754 = wd754 + $D790 = wd790 + $D817 = wd817 + $D826 = wd826 + $D835 = wd835 + $D880 = wd880 + $D8A8 = wEnemyMon1Status + $D8D0 = wEnemyMon2Species + $D8F8 = wEnemyMon2Speed + $D941 = wEnemyMon4SpecialExp + $D025 = wBattleMonAttack + $D062 = W_PLAYERBATTSTATUS1 + $D08F = W_PBSTOREDREGISTERE + $D0A3 = W_SPRITEWITDH + $D1E9 = wPartyMon3Defense + $D377 = wd377 + $D386 = wd386 + $D395 = wd395 + $D728 = wd728 + $D737 = wd737 + $D755 = wd755 + $D764 = wd764 + $D773 = wd773 + $D809 = wd809 + $D827 = wd827 + $D836 = wd836 + $D863 = wd863 + $D881 = wd881 + $D8D4 = wEnemyMon2Status + $D8FC = wEnemyMon3Species + $D924 = wEnemyMon3Speed + $D96D = wEnemyMon5SpecialExp + $D063 = W_PLAYERBATTSTATUS2 + $D215 = wPartyMon4Defense + $D378 = wd378 + $D396 = wd396 + $D747 = wd747 + $D765 = wd765 + $D783 = wd783 + $D792 = wd792 + $D819 = wd819 + $D828 = wd828 + $D837 = wd837 + $D864 = wd864 + $D882 = wd882 + $D900 = wEnemyMon3Status + $D928 = wEnemyMon4Species + $D950 = wEnemyMon4Speed + $D999 = wEnemyMon6SpecialExp + $DA64 = wDayCareMonType1 + $D064 = W_PLAYERBATTSTATUS3 + $D0B6 = W_LISTTYPE + $D0BE = W_MONHTYPES + $D241 = wPartyMon5Defense + $D379 = wd379 + $D388 = wd388 + $D397 = wd397 + $D65E = W_CINNABARGYMCURSCRIPT + $D766 = wd766 + $D829 = wd829 + $D838 = wd838 + $D847 = wd847 + $D865 = wd865 + $D92C = wEnemyMon4Status + $D954 = wEnemyMon5Species + $D97C = wEnemyMon5Speed + $DA65 = wDayCareMonType2 + $DAAF = wBoxMon1SpecialExp + $D08C = W_PBSTOREDREGISTERH + $D26D = wPartyMon6Defense + $D356 = W_OBTAINEDBADGES + $D389 = wd389 + $D398 = wd398 + $D5FF = W_CELADONGYMCURSCRIPT + $D715 = W_RIVALSTARTER + $D767 = wd767 + $D857 = wd857 + $D866 = wd866 + $D958 = wEnemyMon5Status + $D980 = wEnemyMon6Species + $D9A8 = wEnemyMon6Speed + $D347 = wPlayerMoney + $D399 = wd399 + $D60C = W_REDSHOUSE2CURSCRIPT + $D768 = wd768 + $D777 = wd777 + $D849 = wd849 + $D867 = wd867 + $D984 = wEnemyMon6Status + $DA96 = wBoxMon1Species + $D195 = wPartyMon1Special + $D619 = W_MUSEUM1FCURSCRIPT + $D662 = W_ROUTE5GATECURSCRIPT + $D769 = wd769 + $D778 = wd778 + $D796 = wd796 + $D8A4 = wEnemyMons + $D8C5 = wEnemyMon1Level + $DA9A = wBoxMon1Status + $D059 = W_CUROPPONENT + $D1C1 = wPartyMon2Special + $D30A = wPokedexOwnedEnd + $D5F8 = W_ROUTE3CURSCRIPT + $D606 = W_MTMOON1CURSCRIPT + $D636 = W_ROUTE6GATECURSCRIPT + $D869 = wd869 + $D8F1 = wEnemyMon2Level + $D08B = W_SUBANIMTRANSFORM + $D08D = W_PBSTOREDREGISTERL + $D096 = W_SUBANIMSUBENTRYADDR + $D0CB = W_MONHGROWTHRATE + $D180 = wPartyMon1DefenseExp + $D186 = wPartyMon1DVs + $D1ED = wPartyMon3Special + $D5F9 = W_ROUTE4CURSCRIPT + $D631 = W_ROCKETHIDEOUT1CURSCRIPT + $D64D = W_LORELEICURSCRIPT + $D663 = W_ROUTE7GATECURSCRIPT + $D798 = wd798 + $D8BB = wEnemyMon1SpeedExp + $D91D = wEnemyMon3Level + $D009 = wBattleMonNick + $D1AC = wPartyMon2DefenseExp + $D1B2 = wPartyMon2DVs + $D219 = wPartyMon4Special + $D31E = wBagItems + $D607 = W_MTMOON3CURSCRIPT + $D632 = W_ROCKETHIDEOUT2CURSCRIPT + $D637 = W_ROUTE8GATECURSCRIPT + $D64B = W_HALLOFFAMEROOMCURSCRIPT + $D8E7 = wEnemyMon2SpeedExp + $D949 = wEnemyMon4Level + $D1D8 = wPartyMon3DefenseExp + $D1DE = wPartyMon3DVs + $D245 = wPartyMon5Special + $D36E = W_MAPSCRIPTPTR + $D600 = W_ROUTE6CURSCRIPT + $D633 = W_ROCKETHIDEOUT3CURSCRIPT + $D64C = W_GARYCURSCRIPT + $D717 = W_PLAYERSTARTER + $D719 = wLastBlackoutMap + $D913 = wEnemyMon3SpeedExp + $D975 = wEnemyMon5Level + $DA48 = W_DAYCARE_IN_USE + $D170 = wPartyMon1Type + $D204 = wPartyMon4DefenseExp + $D20A = wPartyMon4DVs + $D271 = wPartyMon6Special + $D52C = W_TILESETBLOCKSPTR + $D634 = W_ROCKETHIDEOUT4CURSCRIPT + $D642 = W_FIGHTINGDOJOCURSCRIPT + $D8A7 = wEnemyMon1BoxLevel + $D93F = wEnemyMon4SpeedExp + $D9A1 = wEnemyMon6Level + $D19C = wPartyMon2Type + $D230 = wPartyMon5DefenseExp + $D236 = wPartyMon5DVs + $D36C = W_MAPTEXTPTR + $D3AA = wd3aa + $D601 = W_ROUTE8CURSCRIPT + $D8D3 = wEnemyMon2BoxLevel + $D96B = wEnemyMon5SpeedExp + $DA96 = wBoxMons + $D09E = W_FBMODE + $D0DB = wd0db + $D1C8 = wPartyMon3Type + $D25C = wPartyMon6DefenseExp + $D262 = wPartyMon6DVs + $D4E1 = W_NUMSPRITES + $D52E = W_TILESETGFXPTR + $D604 = W_ROUTE9CURSCRIPT + $D8A4 = wEnemyMon1 + $D8FF = wEnemyMon3BoxLevel + $D997 = wEnemyMon6SpeedExp + $D019 = wBattleMonType1 + $D0DC = wd0dc + $D1F4 = wPartyMon4Type + $D621 = W_ROCKTUNNEL1CURSCRIPT + $D8D0 = wEnemyMon2 + $D92B = wEnemyMon4BoxLevel + $DA40 = W_PLAYTIMEHOURS + $DAAD = wBoxMon1SpeedExp + $D01A = wBattleMonType2 + $D09C = W_FBDESTADDR + $D184 = wPartyMon1SpecialExp + $D220 = wPartyMon5Type + $D3AD = wd3ad + $D620 = W_ROCKTUNNEL2CURSCRIPT + $D8FC = wEnemyMon3 + $D957 = wEnemyMon5BoxLevel + $D158 = wPlayerName + $D1B0 = wPartyMon2SpecialExp + $D24C = wPartyMon6Type + $D3AE = wd3ae + $D8AB = wEnemyMon1CatchRate + $D928 = wEnemyMon4 + $D983 = wEnemyMon6BoxLevel + $DA42 = W_PLAYTIMEMINUTES + $D058 = wPartyAliveFlags + $D16B = wPartyMon1Species + $D193 = wPartyMon1Speed + $D1DC = wPartyMon3SpecialExp + $D3AF = wd3af + $D65B = W_FUCHSIAGYMCURSCRIPT + $D8D7 = wEnemyMon2CatchRate + $D954 = wEnemyMon5 + $DA99 = wBoxMon1BoxLevel + $D16F = wPartyMon1Status + $D197 = wPartyMon2Species + $D1BF = wPartyMon2Speed + $D208 = wPartyMon4SpecialExp + $D903 = wEnemyMon3CatchRate + $D980 = wEnemyMon6 + $D19B = wPartyMon2Status + $D1C3 = wPartyMon3Species + $D1EB = wPartyMon3Speed + $D234 = wPartyMon5SpecialExp + $D5CD = wd5cd + $D8A5 = wEnemyMon1HP + $D92F = wEnemyMon4CatchRate + $DA96 = wBoxMon1 + $D1C7 = wPartyMon3Status + $D1EF = wPartyMon4Species + $D217 = wPartyMon4Speed + $D260 = wPartyMon6SpecialExp + $D2F7 = wPokedexOwned + $D5FD = W_CERULEANGYMCURSCRIPT + $D64E = W_BRUNOCURSCRIPT + $D7BD = wd7bd + $D7DB = wd7db + $D8D1 = wEnemyMon2HP + $D95B = wEnemyMon5CatchRate + $DAB7 = wBoxMon2 + $D1F3 = wPartyMon4Status + $D21B = wPartyMon5Species + $D243 = wPartyMon5Speed + $D31D = wNumBagItems + $D7AF = wd7af + $D7CD = wd7cd + $D7EB = wd7eb + $D8C6 = wEnemyMon1MaxHP + $D8FD = wEnemyMon3HP + $D987 = wEnemyMon6CatchRate + $D0BB = W_MONHBASEDEFENSE + $D21F = wPartyMon5Status + $D247 = wPartyMon6Species + $D26F = wPartyMon6Speed + $D651 = W_VICTORYROAD1CURSCRIPT + $D7BF = wd7bf + $D7DD = wd7dd + $D8B2 = wEnemyMon1Exp + $D8F2 = wEnemyMon2MaxHP + $D929 = wEnemyMon4HP + $DA9D = wBoxMon1CatchRate + $D24B = wPartyMon6Status + $D60D = W_VIRIDIANMARKETCURSCRIPT + $D60F = W_CERULEANCITYCURSCRIPT + $D63F = W_VICTORYROAD2CURSCRIPT + $D7CF = wd7cf + $D7ED = wd7ed + $D89D = wEnemyPartyMons + $D8DE = wEnemyMon2Exp + $D91E = wEnemyMon3MaxHP + $D955 = wEnemyMon5HP + $DA74 = wDayCareMonDefenseExp + $DA7A = wDayCareMonDVs + $DA81 = wBoxSpecies + $DEE2 = wBoxMonNicksEnd + $D0B8 = W_MONHEADER + $D0C3 = W_MONHFRONTSPRITE + $D16B = wPartyMons + $D18C = wPartyMon1Level + $D640 = W_VICTORYROAD3CURSCRIPT + $D6FE = wd6fe + $D7DF = wd7df + $D7EE = wd7ee + $D8AC = wEnemyMon1Moves + $D90A = wEnemyMon3Exp + $D94A = wEnemyMon4MaxHP + $D981 = wEnemyMon6HP + $D071 = W_ENEMYTOXICCOUNTER + $D1B8 = wPartyMon2Level + $D7EF = wd7ef + $D8B0 = wEnemyMon1OTID + $D8D8 = wEnemyMon2Moves + $D936 = wEnemyMon4Exp + $D976 = wEnemyMon5MaxHP + $DA97 = wBoxMon1HP + $D027 = wBattleMonDefense + $D182 = wPartyMon1SpeedExp + $D1E4 = wPartyMon3Level + $D7FF = wd7ff + $D8DC = wEnemyMon2OTID + $D904 = wEnemyMon3Moves + $D962 = wEnemyMon5Exp + $D9A2 = wEnemyMon6MaxHP + $DA64 = wDayCareMonType + $D13D = W_PRIZE1 + $D1AE = wPartyMon2SpeedExp + $D210 = wPartyMon4Level + $D5FB = W_VIRIDIANGYMCURSCRIPT + $D61F = W_SAFARIZONEENTRANCECURSCRIPT + $D661 = W_BILLSHOUSECURSCRIPT + $D713 = W_ENEMYMONORTRAINERCLASS + $D8C1 = wEnemyMon1PP + $D908 = wEnemyMon3OTID + $D930 = wEnemyMon4Moves + $D98E = wEnemyMon6Exp + $D0D7 = W_MONHPADDING + $D13E = W_PRIZE2 + $D1DA = wPartyMon3SpeedExp + $D23C = wPartyMon5Level + $D8B5 = wEnemyMon1HPExp + $D8ED = wEnemyMon2PP + $D934 = wEnemyMon4OTID + $D95C = wEnemyMon5Moves + $DA49 = W_DAYCAREMONNAME + $DAA4 = wBoxMon1Exp + $D0BA = W_MONHBASEATTACK + $D0BD = W_MONHBASESPECIAL + $D13F = W_PRIZE3 + $D16E = wPartyMon1BoxLevel + $D206 = wPartyMon4SpeedExp + $D268 = wPartyMon6Level + $D65C = W_SAFFRONGYMCURSCRIPT + $D8C6 = wEnemyMon1Stats + $D8C8 = wEnemyMon1Attack + $D8E1 = wEnemyMon2HPExp + $D919 = wEnemyMon3PP + $D960 = wEnemyMon5OTID + $D988 = wEnemyMon6Moves + $D19A = wPartyMon2BoxLevel + $D232 = wPartyMon5SpeedExp + $D530 = W_TILESETCOLLISIONPTR + $D5F4 = W_VIRIDIANCITYCURSCRIPT + $D8F2 = wEnemyMon2Stats + $D8F4 = wEnemyMon2Attack + $D90D = wEnemyMon3HPExp + $D945 = wEnemyMon4PP + $D98C = wEnemyMon6OTID + $D9EE = wEnemyMonNicks + $DA78 = wDayCareMonSpecialExp + $DA9E = wBoxMon1Moves + $D06C = W_PLAYERTOXICCOUNTER + $D0BC = W_MONHBASESPEED + $D16B = wPartyMon1 + $D1C6 = wPartyMon3BoxLevel + $D25E = wPartyMon6SpeedExp + $D532 = W_TILESETTALKINGOVERTILES + $D5A6 = W_MISSABLEOBJECTFLAGS + $D91E = wEnemyMon3Stats + $D920 = wEnemyMon3Attack + $D939 = wEnemyMon4HPExp + $D971 = wEnemyMon5PP + $DAA2 = wBoxMon1OTID + $D07C = W_ANIMATIONID + $D197 = wPartyMon2 + $D1F2 = wPartyMon4BoxLevel + $D5F3 = W_BLUESHOUSECURSCRIPT + $D94A = wEnemyMon4Stats + $D94C = wEnemyMon4Attack + $D965 = wEnemyMon5HPExp + $D99D = wEnemyMon6PP + $DA5F = wDayCareMonSpecies + $D02B = wBattleMonSpecial + $D0A0 = wd0a0 + $D0B9 = W_MONHBASEHP + $D1C3 = wPartyMon3 + $D21E = wPartyMon5BoxLevel + $D976 = wEnemyMon5Stats + $D978 = wEnemyMon5Attack + $D991 = wEnemyMon6HPExp + $DA63 = wDayCareMonStatus + $DAB3 = wBoxMon1PP + $D0B1 = W_SPRITEDECODETABLE0PTR + $D0C0 = W_MONHCATCHRATE + $D172 = wPartyMon1CatchRate + $D1EF = wPartyMon4 + $D24A = wPartyMon6BoxLevel + $D62B = W_POKEMONTOWER2CURSCRIPT + $D9A2 = wEnemyMon6Stats + $D9A4 = wEnemyMon6Attack + $DAA7 = wBoxMon1HPExp + $D020 = wBattleMonDVs + $D0A1 = W_SPRITECURPOSX + $D0B3 = W_SPRITEDECODETABLE1PTR + $D11A = wd11a + $D164 = wPartySpecies + $D19E = wPartyMon2CatchRate + $D21B = wPartyMon5 + $D62C = W_POKEMONTOWER3CURSCRIPT + $D0A2 = W_SPRITECURPOSY + $D11B = wd11b + $D12A = wd12a + $D16A = wPartyEnd + $D1CA = wPartyMon3CatchRate + $D247 = wPartyMon6 + $D34A = W_RIVALNAME + $D62D = W_POKEMONTOWER4CURSCRIPT + $DE06 = wBoxMonNicks + $D0E0 = wd0e0 + $D11C = wd11c + $D13A = wd13a + $D16C = wPartyMon1HP + $D1F6 = wPartyMon4CatchRate + $D629 = W_SSANNE10CURSCRIPT + $D62E = W_POKEMONTOWER5CURSCRIPT + $D019 = wBattleMonType + $D081 = W_BASECOORDX + $D086 = W_SUBANIMFRAMEDELAY + $D0AF = W_SPRITEOUTPUTPTRCACHED + $D0E1 = wd0e1 + $D11D = wd11d + $D12C = wd12c + $D13B = wd13b + $D198 = wPartyMon2HP + $D222 = wPartyMon5CatchRate + $D371 = W_MAPCONN1PTR + $D4B0 = wd4b0 + $D5A0 = wd5a0 + $D618 = W_VIRIDIANFORESTCURSCRIPT + $D62F = W_POKEMONTOWER6CURSCRIPT + $D658 = W_SILPHCO10CURSCRIPT + $D8B7 = wEnemyMon1AttackExp + $D05B = wd05b + $D06A = wd06a + $D082 = W_BASECOORDY + $D0B5 = wd0b5 + $D11E = wd11e + $D12D = wd12d + $D13C = wd13c + $D18D = wPartyMon1MaxHP + $D1C4 = wPartyMon3HP + $D24E = wPartyMon6CatchRate + $D31D = wPokedexSeenEnd + $D37C = W_MAPCONN2PTR + $D4B1 = wd4b1 + $D630 = W_POKEMONTOWER7CURSCRIPT + $D650 = W_UNKNOWNDUNGEON3CURSCRIPT + $D659 = W_SILPHCO11CURSCRIPT + $D8E3 = wEnemyMon2AttackExp + $D06B = wd06b + $D07A = wd07a + $D0D4 = wd0d4 + $D11F = wd11f + $D12E = wd12e + $D179 = wPartyMon1Exp + $D1B9 = wPartyMon2MaxHP + $D1F0 = wPartyMon4HP + $D35E = W_CURMAP + $D387 = W_MAPCONN3PTR + $D52A = wd52a + $D53B = wBoxItems + $D5A2 = wd5a2 + $D90F = wEnemyMon3AttackExp + $D04A = W_TRAINERNAME + $D07B = wd07b + $D08A = wd08a + $D12F = wd12f + $D1A5 = wPartyMon2Exp + $D1E5 = wPartyMon3MaxHP + $D21C = wPartyMon5HP + $D392 = W_MAPCONN4PTR + $D4D1 = wd4d1 + $D52B = W_TILESETBANK + $D5A3 = wd5a3 + $D71A = wd71a + $D7A1 = wd7a1 + $D93B = wEnemyMon4AttackExp + $DA76 = wDayCareMonSpeedExp + $D05C = W_GYMLEADERNO + $D05E = wd05e + $D072 = W_ENEMYDISABLEDMOVE + $D09A = wd09a + $D0BE = W_MONHTYPE1 + $D173 = wPartyMon1Moves + $D1D1 = wPartyMon3Exp + $D211 = wPartyMon4MaxHP + $D248 = wPartyMon6HP + $D35B = wd35b + $D36A = W_MAPDATAPTR + $D71B = wd71b + $D72A = wd72a + $D7B1 = wd7b1 + $D8A9 = wEnemyMon1Type1 + $D967 = wEnemyMon5AttackExp + $D057 = W_ISINBATTLE + $D07D = wd07d + $D09B = wd09b + $D0BF = W_MONHTYPE2 + $D177 = wPartyMon1OTID + $D19F = wPartyMon2Moves + $D1FD = wPartyMon4Exp + $D23D = wPartyMon5MaxHP + $D35C = wd35c + $D368 = W_CURMAPHEIGHT + $D37A = wd37a + $D4E2 = wd4e2 + $D5F1 = W_PALLETTOWNCURSCRIPT + $D71C = wd71c + $D7A3 = wd7a3 + $D81B = wd81b + $D82A = wd82a + $D8AA = wEnemyMon1Type2 + $D8D5 = wEnemyMon2Type1 + $D993 = wEnemyMon6AttackExp + $DA46 = wda46 + $D014 = wBattleMonSpecies + $D029 = wBattleMonSpeed + $D06F = wd06f + $D07E = wd07e + $D0AB = W_SPRITEINPUTPTR + $D0D8 = wd0d8 + $D1A3 = wPartyMon2OTID + $D1CB = wPartyMon3Moves + $D229 = wPartyMon5Exp + $D269 = wPartyMon6MaxHP + $D35D = wd35d + $D37B = wd37b + $D38A = wd38a + $D42F = wd42f + $D4E3 = wd4e3 + $D6F0 = wd6f0 + $D71D = wd71d + $D72C = wd72c + $D73B = wd73b + $D74A = wd74a + $D7B3 = wd7b3 + $D7C2 = wd7c2 + $D7D1 = wd7d1 + $D7E0 = wd7e0 + $D82B = wd82b + $D8D6 = wEnemyMon2Type2 + $D901 = wEnemyMon3Type1 + $DA38 = wda38 + $DA47 = W_NUMSAFARIBALLS + $DA62 = wDayCareMonBoxLevel + $DAA9 = wBoxMon1AttackExp + $D018 = wBattleMonStatus + $D05C = W_LONEATTACKNO + $D188 = wPartyMon1PP + $D1CF = wPartyMon3OTID + $D1F7 = wPartyMon4Moves + $D255 = wPartyMon6Exp + $D364 = W_XBLOCKCOORD + $D38B = wd38b + $D39A = wd39a + $D3A9 = wd3a9 + $D663 = W_POWERPLANTCURSCRIPT + $D71E = wd71e + $D72D = wd72d + $D73C = wd73c + $D74B = wd74b + $D75A = wd75a + $D7B4 = wd7b4 + $D7C3 = wd7c3 + $D7D2 = wd7d2 + $D7E1 = wd7e1 + $D7F0 = wd7f0 + $D82C = wd82c + $D902 = wEnemyMon3Type2 + $D92D = wEnemyMon4Type1 + $D17C = wPartyMon1HPExp + $D1B4 = wPartyMon2PP + $D1FB = wPartyMon4OTID + $D223 = wPartyMon5Moves + $D35F = wd35f + $D363 = W_YBLOCKCOORD + $D37D = wd37d + $D38C = wd38c + $D39B = wd39b + $D5FC = W_PEWTERGYMCURSCRIPT + $D71F = wd71f + $D72E = wd72e + $D74C = wd74c + $D75B = wd75b + $D7D3 = wd7d3 + $D7F1 = wd7f1 + $D82D = wd82d + $D84B = wd84b + $D92E = wEnemyMon4Type2 + $D959 = wEnemyMon5Type1 + $DA5F = wDayCareMon + $D09F = wd09f + $D18D = wPartyMon1Stats + $D18F = wPartyMon1Attack + $D1A8 = wPartyMon2HPExp + $D1E0 = wPartyMon3PP + $D227 = wPartyMon5OTID + $D24F = wPartyMon6Moves + $D362 = W_XCOORD + $D37E = wd37e + $D38D = wd38d + $D39C = wd39c + $D7C5 = wd7c5 + $D7E3 = wd7e3 + $D7F2 = wd7f2 + $D82E = wd82e + $D95A = wEnemyMon5Type2 + $D985 = wEnemyMon6Type1 + $D06D = W_PLAYERDISABLEDMOVE + $D0A5 = W_SPRITEINPUTCURBYTE + $D12B = W_ISLINKBATTLE + $D1B9 = wPartyMon2Stats + $D1BB = wPartyMon2Attack + $D1D4 = wPartyMon3HPExp + $D20C = wPartyMon4PP + $D253 = wPartyMon6OTID + $D2B5 = wPartyMonNicks + $D361 = W_YCOORD + $D37F = wd37f + $D38E = wd38e + $D4E4 = W_MAPSPRITEDATA + $D73F = wd73f + $D74E = wd74e + $D76C = wd76c + $D7C6 = wd7c6 + $D7D5 = wd7d5 + $D7F3 = wd7f3 + $D82F = wd82f + $D986 = wEnemyMon6Type2 + $DA54 = W_DAYCAREMONOT + $DA9B = wBoxMon1Type1 + $D0C1 = W_MONHBASEXP + $D1E5 = wPartyMon3Stats + $D1E7 = wPartyMon3Attack + $D200 = wPartyMon4HPExp + $D238 = wPartyMon5PP + $D38F = wd38f + $D5F7 = W_PEWTERCITYCURSCRIPT + $D5FE = W_VERMILIONGYMCURSCRIPT + $D75E = wd75e + $D77C = wd77c + $D79A = wd79a + $D7D6 = wd7d6 + $D7E5 = wd7e5 + $D887 = W_GRASSRATE + $DA66 = wDayCareMonCatchRate + $DA9C = wBoxMon1Type2 + $D0C5 = W_MONHBACKSPRITE + $D211 = wPartyMon4Stats + $D213 = wPartyMon4Attack + $D22C = wPartyMon5HPExp + $D264 = wPartyMon6PP + $D733 = W_FLAGS_D733 + $D75F = wd75f + $D77D = wd77d + $D79B = wd79b + $D7B9 = wd7b9 + $D7D7 = wd7d7 + $D7F5 = wd7f5 + $D022 = wBattleMonLevel + $D0A8 = W_SPRITELOADFLAGS + $D23D = wPartyMon5Stats + $D23F = wPartyMon5Attack + $D258 = wPartyMon6HPExp + $D535 = W_GRASSTILE + $D77E = wd77e + $D79C = wd79c + $D7C9 = wd7c9 + $D7D8 = wd7d8 + $D7E7 = wd7e7 + $D7F6 = wd7f6 + $D85F = wd85f + $D87D = wd87d + $D269 = wPartyMon6Stats + $D26B = wPartyMon6Attack + $D30A = wPokedexSeen + $D53A = wNumBoxItems + $D62A = W_VERMILIONCITYCURSCRIPT + $D64F = W_AGATHACURSCRIPT + $D78E = wd78e + $D7D9 = wd7d9 + $D7E8 = wd7e8 + $DA60 = wDayCareMonHP + $D031 = W_TRAINERCLASS + $D089 = W_NUMFBTILES + $D605 = W_ROUTE10CURSCRIPT + $D60E = W_ROUTE22GATECURSCRIPT + $D7E9 = wd7e9 + $D87F = wd87f + $D0A6 = W_SPRITEINPUTBITCOUNTER + $D623 = W_ROUTE11CURSCRIPT + $D628 = W_ROUTE20CURSCRIPT + $D8CA = wEnemyMon1Defense + $D9AC = wEnemyMonOT + $D05D = W_TRAINERNO + $D084 = W_FBTILECOUNTER + $D5CE = W_MISSABLEOBJECTLIST + $D61E = W_ROUTE21CURSCRIPT + $D624 = W_ROUTE12CURSCRIPT + $D8F6 = wEnemyMon2Defense + $DA6D = wDayCareMonExp + $D017 = wBattleMonBoxLevel + $D05F = W_MOVEMISSED + $D094 = W_SUBANIMADDRPTR + $D17E = wPartyMon1AttackExp + $D60A = W_ROUTE22CURSCRIPT + $D61A = W_ROUTE13CURSCRIPT + $D660 = W_ROUTE16GATECURSCRIPT + $D922 = wEnemyMon3Defense + $D1AA = wPartyMon2AttackExp + $D370 = W_MAPCONNECTIONS + $D5F0 = W_GAMEPROGRESSFLAGS + $D61B = W_ROUTE14CURSCRIPT + $D667 = W_ROUTE23CURSCRIPT + $D94E = wEnemyMon4Defense + $DA67 = wDayCareMonMoves + $D014 = wBattleMon + $D05A = W_BATTLETYPE + $D0A4 = W_SPRITEHEIGHT + $D0CC = W_MONHLEARNSET + $D1D6 = wPartyMon3AttackExp + $D602 = W_ROUTE24CURSCRIPT + $D625 = W_ROUTE15CURSCRIPT + $D653 = W_LANCECURSCRIPT + $D669 = W_ROUTE18GATECURSCRIPT + $D89C = wEnemyPartyCount + $D97A = wEnemyMon5Defense + $DA30 = W_TRAINERHEADERPTR + $DA6B = wDayCareMonOTID + SECTION: $DFFF-$DEFE ($FFFFFF00 bytes) + $DFFF = wStack + SLACK: $021E bytes + + EMPTY + + EMPTY + + EMPTY + + EMPTY + + EMPTY + +VRAM Bank #0: + EMPTY + +VRAM Bank #1: + EMPTY + +HRAM: + EMPTY + + SECTION: $A000-$B857 ($1858 bytes) + $A598 = sHallOfFame + $A000 = S_SPRITEBUFFER0 + $A188 = S_SPRITEBUFFER1 + $A310 = S_SPRITEBUFFER2 + SLACK: $07A8 bytes + + EMPTY + + EMPTY + + EMPTY + diff --git a/preprocessor.py b/preprocessor.py deleted file mode 100755 index ee22761236..0000000000 --- a/preprocessor.py +++ /dev/null @@ -1,286 +0,0 @@ -# -*- coding: utf-8 -*- - -import extras.pokemontools.preprocessor as preprocessor - -import extras.pokemontools.configuration as configuration -config = configuration.Config() - -import sys - -from extras.pokemontools.crystal import ( - callchannel, - loopchannel, -) - -chars = { -"ガ": 0x05, -"ギ": 0x06, -"グ": 0x07, -"ゲ": 0x08, -"ゴ": 0x09, -"ザ": 0x0A, -"ジ": 0x0B, -"ズ": 0x0C, -"ゼ": 0x0D, -"ゾ": 0x0E, -"ダ": 0x0F, -"ヂ": 0x10, -"ヅ": 0x11, -"デ": 0x12, -"ド": 0x13, -"バ": 0x19, -"ビ": 0x1A, -"ブ": 0x1B, -"ボ": 0x1C, -"が": 0x26, -"ぎ": 0x27, -"ぐ": 0x28, -"げ": 0x29, -"ご": 0x2A, -"ざ": 0x2B, -"じ": 0x2C, -"ず": 0x2D, -"ぜ": 0x2E, -"ぞ": 0x2F, -"だ": 0x30, -"ぢ": 0x31, -"づ": 0x32, -"で": 0x33, -"ど": 0x34, -"ば": 0x3A, -"び": 0x3B, -"ぶ": 0x3C, -"べ": 0x3D, -"ぼ": 0x3E, -"パ": 0x40, -"ピ": 0x41, -"プ": 0x42, -"ポ": 0x43, -"ぱ": 0x44, -"ぴ": 0x45, -"ぷ": 0x46, -"ぺ": 0x47, -"ぽ": 0x48, -"ア": 0x80, -"イ": 0x81, -"ウ": 0x82, -"エ": 0x83, -"ォ": 0x84, -"カ": 0x85, -"キ": 0x86, -"ク": 0x87, -"ケ": 0x88, -"コ": 0x89, -"サ": 0x8A, -"シ": 0x8B, -"ス": 0x8C, -"セ": 0x8D, -"ソ": 0x8E, -"タ": 0x8F, -"チ": 0x90, -"ツ": 0x91, -"テ": 0x92, -"ト": 0x93, -"ナ": 0x94, -"ニ": 0x95, -"ヌ": 0x96, -"ネ": 0x97, -"ノ": 0x98, -"ハ": 0x99, -"ヒ": 0x9A, -"フ": 0x9B, -"ホ": 0x9C, -"マ": 0x9D, -"ミ": 0x9E, -"ム": 0x9F, -"メ": 0xA0, -"モ": 0xA1, -"ヤ": 0xA2, -"ユ": 0xA3, -"ヨ": 0xA4, -"ラ": 0xA5, -"ル": 0xA6, -"レ": 0xA7, -"ロ": 0xA8, -"ワ": 0xA9, -"ヲ": 0xAA, -"ン": 0xAB, -"ッ": 0xAC, -"ャ": 0xAD, -"ュ": 0xAE, -"ョ": 0xAF, -"ィ": 0xB0, -"あ": 0xB1, -"い": 0xB2, -"う": 0xB3, -"え": 0xB4, -"お": 0xB5, -"か": 0xB6, -"き": 0xB7, -"く": 0xB8, -"け": 0xB9, -"こ": 0xBA, -"さ": 0xBB, -"し": 0xBC, -"す": 0xBD, -"せ": 0xBE, -"そ": 0xBF, -"た": 0xC0, -"ち": 0xC1, -"つ": 0xC2, -"て": 0xC3, -"と": 0xC4, -"な": 0xC5, -"に": 0xC6, -"ぬ": 0xC7, -"ね": 0xC8, -"の": 0xC9, -"は": 0xCA, -"ひ": 0xCB, -"ふ": 0xCC, -"へ": 0xCD, -"ほ": 0xCE, -"ま": 0xCF, -"み": 0xD0, -"む": 0xD1, -"め": 0xD2, -"も": 0xD3, -"や": 0xD4, -"ゆ": 0xD5, -"よ": 0xD6, -"ら": 0xD7, -"り": 0xD8, -"る": 0xD9, -"れ": 0xDA, -"ろ": 0xDB, -"わ": 0xDC, -"を": 0xDD, -"ん": 0xDE, -"っ": 0xDF, -"ゃ": 0xE0, -"ゅ": 0xE1, -"ょ": 0xE2, -"ー": 0xE3, - - -"@": 0x50, -"#": 0x54, -"…": 0x75, - -"┌": 0x79, -"─": 0x7A, -"┐": 0x7B, -"│": 0x7C, -"└": 0x7D, -"┘": 0x7E, - -"№": 0x74, - -" ": 0x7F, -"A": 0x80, -"B": 0x81, -"C": 0x82, -"D": 0x83, -"E": 0x84, -"F": 0x85, -"G": 0x86, -"H": 0x87, -"I": 0x88, -"J": 0x89, -"K": 0x8A, -"L": 0x8B, -"M": 0x8C, -"N": 0x8D, -"O": 0x8E, -"P": 0x8F, -"Q": 0x90, -"R": 0x91, -"S": 0x92, -"T": 0x93, -"U": 0x94, -"V": 0x95, -"W": 0x96, -"X": 0x97, -"Y": 0x98, -"Z": 0x99, -"(": 0x9A, -")": 0x9B, -":": 0x9C, -";": 0x9D, -"[": 0x9E, -"]": 0x9F, -"a": 0xA0, -"b": 0xA1, -"c": 0xA2, -"d": 0xA3, -"e": 0xA4, -"f": 0xA5, -"g": 0xA6, -"h": 0xA7, -"i": 0xA8, -"j": 0xA9, -"k": 0xAA, -"l": 0xAB, -"m": 0xAC, -"n": 0xAD, -"o": 0xAE, -"p": 0xAF, -"q": 0xB0, -"r": 0xB1, -"s": 0xB2, -"t": 0xB3, -"u": 0xB4, -"v": 0xB5, -"w": 0xB6, -"x": 0xB7, -"y": 0xB8, -"z": 0xB9, -"é": 0xBA, -"'d": 0xBB, -"'l": 0xBC, -"'s": 0xBD, -"'t": 0xBE, -"'v": 0xBF, -"'": 0xE0, -"-": 0xE3, -"'r": 0xE4, -"'m": 0xE5, -"?": 0xE6, -"!": 0xE7, -".": 0xE8, -"▶": 0xED, -"♂": 0xEF, -"¥": 0xF0, -"×": 0xF1, -"/": 0xF3, -",": 0xF4, -"♀": 0xF5, -"0": 0xF6, -"1": 0xF7, -"2": 0xF8, -"3": 0xF9, -"4": 0xFA, -"5": 0xFB, -"6": 0xFC, -"7": 0xFD, -"8": 0xFE, -"9": 0xFF, -} - -def load_pokered_macros(): - macros = [callchannel, loopchannel] - return macros - -def setup_processor(): - preprocessor.chars = chars - macros = load_pokered_macros() - processor = preprocessor.Preprocessor(config, macros) - return processor - -def main(): - processor = setup_processor() - output = processor.preprocess() - return output - -if __name__ == '__main__': - main() diff --git a/prequeue.py b/prequeue.py deleted file mode 100755 index 85549c373c..0000000000 --- a/prequeue.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 -""" -Starting a new python process to preprocess each source file creates too much -overhead. Instead, a list of files to preprocess is fed into a script run from -a single process. -""" - -import os -import sys - -import preprocessor - -def preprocess_queue(filenames=sys.argv[1:]): - - stdin = sys.stdin - stdout = sys.stdout - - processor = preprocessor.setup_processor() - - for source in filenames: - dest = os.path.splitext(source)[0] + '.tx' - sys.stdin = open(source, 'r') - sys.stdout = open(dest, 'w') - processor.preprocess() - - sys.stdin = stdin - sys.stdout = stdout - -def main(): - filenames = list(set(sys.argv[1:])) - if filenames: - num_files = len(filenames) - s = '' if num_files == 1 else 's' - sys.stdout.write('Preprocessing {0} file{1}...\n'.format(num_files, s)) - preprocess_queue(filenames) - -if __name__ == '__main__': - main() diff --git a/red.asm b/red.asm index 571f24e063..901a611a80 100755 --- a/red.asm +++ b/red.asm @@ -1 +1,2 @@ _RED EQU 1 +INCLUDE "charmap.asm" diff --git a/scripts/agatha.asm b/scripts/agatha.asm index b31fc4127c..a8f9e13764 100755 --- a/scripts/agatha.asm +++ b/scripts/agatha.asm @@ -24,7 +24,7 @@ AgathaScript_76443: ; 76443 (1d:6443) AgathaScript_76459: ; 76459 (1d:6459) ld [wd09f], a ld bc, $2 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock AgathaScript_76464: ; 76464 (1d:6464) xor a @@ -33,7 +33,7 @@ AgathaScript_76464: ; 76464 (1d:6464) AgathaScriptPointers: ; 76469 (1d:6469) dw AgathaScript0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw AgathaScript2 dw AgathaScript3 dw AgathaScript4 @@ -41,8 +41,8 @@ AgathaScriptPointers: ; 76469 (1d:6469) AgathaScript4: ; 76473 (1d:6473) ret asm_76474: ; 76474 (1d:6474) - ld hl, wccd3 - ld a, $40 + ld hl, wSimulatedJoypadStatesEnd + ld a, D_UP ld [hli], a ld [hli], a ld [hli], a @@ -50,8 +50,8 @@ asm_76474: ; 76474 (1d:6474) ld [hli], a ld [hl], a ld a, $6 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_AGATHACURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -64,8 +64,8 @@ AgathaScript0: ; 76490 (1d:6490) xor a ld [hJoyPressed], a ld [hJoyHeld], a - ld [wccd3], a - ld [wcd38], a + ld [wSimulatedJoypadStatesEnd], a + ld [wSimulatedJoypadStatesIndex], a ld a, [wWhichTrade] ; wWhichTrade cp $3 jr c, .asm_764b4 @@ -77,11 +77,11 @@ AgathaScript0: ; 76490 (1d:6490) ld a, $2 ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID - ld a, $40 - ld [wccd3], a + ld a, D_UP + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_AGATHACURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -95,7 +95,7 @@ CoordsData_764d1: ; 764d1 (1d:64d1) db $FF AgathaScript3: ; 764da (1d:64da) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/battlecenterm.asm b/scripts/battlecenterm.asm index b65380d2fa..5ab697a121 100755 --- a/scripts/battlecenterm.asm +++ b/scripts/battlecenterm.asm @@ -9,7 +9,7 @@ BattleCenterMScript: ; 4fd10 (13:7d10) ld [$ff8d], a ld a, $1 ld [$ff8c], a - call Func_34ae + call SetSpriteFacingDirection ld hl, wd72d bit 0, [hl] set 0, [hl] diff --git a/scripts/beach_house.asm b/scripts/beach_house.asm new file mode 100644 index 0000000000..67c29f1b6b --- /dev/null +++ b/scripts/beach_house.asm @@ -0,0 +1,195 @@ +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/billshouse.asm b/scripts/billshouse.asm index 3a8a33c0ae..61a575b9ab 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -39,7 +39,7 @@ BillsHouseScript2: ; 1e7a6 (7:67a6) ld a, [wd730] bit 0, a ret nz - ld a, $61 + ld a, HS_BILL_POKEMON ld [wcc4d], a predef HideObject ld hl, wd7f2 @@ -57,7 +57,7 @@ BillsHouseScript3: ; 1e7c5 (7:67c5) ld a, $f0 ld [wJoyIgnore], a ld a, $2 - ld [wcf13], a + ld [wSpriteIndex], a ld a, $c ld [$ffeb], a ld a, $40 @@ -66,8 +66,8 @@ BillsHouseScript3: ; 1e7c5 (7:67c5) ld [$ffed], a ld a, $5 ld [$ffee], a - call Func_32f9 - ld a, $62 + call SetSpritePosition1 + ld a, HS_BILL_1 ld [wcc4d], a predef ShowObject ld c, $8 @@ -161,10 +161,10 @@ BillsHouseText2: ; 1e874 (7:6874) call PrintText ld hl, wd7f2 set 4, [hl] - ld a, $7 + ld a, HS_CERULEAN_GUARD_1 ld [wcc4d], a predef ShowObject - ld a, $9 + ld a, HS_CERULEAN_GUARD_2 ld [wcc4d], a predef HideObject .asm_5491f ; 0x1e8a9 diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm index 4f336ea9d2..ab05e28616 100755 --- a/scripts/blueshouse.asm +++ b/scripts/blueshouse.asm @@ -42,7 +42,7 @@ BluesHouseText1: ; 19b5d (6:5b5d) ld bc,(TOWN_MAP << 8) | 1 call GiveItem jr nc, .BagFull - ld a,$29 + ld a,HS_TOWN_MAP ld [wcc4d],a predef HideObject ; hide table map object ld hl,GotMapText diff --git a/scripts/bruno.asm b/scripts/bruno.asm index d0382fa4de..ffe05bcead 100755 --- a/scripts/bruno.asm +++ b/scripts/bruno.asm @@ -24,7 +24,7 @@ BrunoScript_762ec: ; 762ec (1d:62ec) BrunoScript_76302: ; 76302 (1d:6302) ld [wd09f], a ld bc, $2 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock BrunoScript_7630d: ; 7630d (1d:630d) xor a @@ -33,7 +33,7 @@ BrunoScript_7630d: ; 7630d (1d:630d) BrunoScriptPointers: ; 76312 (1d:6312) dw BrunoScript0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw BrunoScript2 dw BrunoScript3 dw BrunoScript4 @@ -41,8 +41,8 @@ BrunoScriptPointers: ; 76312 (1d:6312) BrunoScript4: ; 7631c (1d:631c) ret asm_7631d: ; 7631d (1d:631d) - ld hl, wccd3 - ld a, $40 + ld hl, wSimulatedJoypadStatesEnd + ld a, D_UP ld [hli], a ld [hli], a ld [hli], a @@ -50,8 +50,8 @@ asm_7631d: ; 7631d (1d:631d) ld [hli], a ld [hl], a ld a, $6 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_BRUNOCURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -64,8 +64,8 @@ BrunoScript0: ; 76339 (1d:6339) xor a ld [hJoyPressed], a ld [hJoyHeld], a - ld [wccd3], a - ld [wcd38], a + ld [wSimulatedJoypadStatesEnd], a + ld [wSimulatedJoypadStatesIndex], a ld a, [wWhichTrade] ; wWhichTrade cp $3 jr c, .asm_7635d @@ -77,11 +77,11 @@ BrunoScript0: ; 76339 (1d:6339) ld a, $2 ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID - ld a, $40 - ld [wccd3], a + ld a, D_UP + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_BRUNOCURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -95,7 +95,7 @@ CoordsData_7637a: ; 7637a (1d:637a) db $FF BrunoScript3: ; 76383 (1d:6383) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index 9746f54ea3..91d6742df9 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -20,7 +20,7 @@ CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf) srl a srl a srl a - ld [wcd05], a + ld [wUnknownSlotVar], a ret CeladonGameCornerScript_48bec: ; 48bec (12:4bec) @@ -34,7 +34,7 @@ CeladonGameCornerScript_48bec: ; 48bec (12:4bec) ld a, $2a ld [wd09f], a ld bc, $0208 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock CeladonGameCornerScript_48c07: ; 48c07 (12:4c07) xor a @@ -94,7 +94,7 @@ CeladonGameCornerScript2: ; 48c69 (12:4c69) ret nz xor a ld [wJoyIgnore], a - ld a, $46 + ld a, HS_GAME_CORNER_ROCKET ld [wcc4d], a predef HideObject ld hl, wd126 @@ -236,7 +236,7 @@ CeladonGameCornerText5: ; 48d4a (12:4d4a) ld hl, wd77e set 2, [hl] ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, Received10CoinsText jr .asm_c7d1a ; 0x48d87 .asm_d0957 ; 0x48d89 @@ -409,9 +409,9 @@ CeladonGameCornerText11: ; 48e9d (12:4e9d) set 7, [hl] ld hl, CeladonGameCornerText_48ed3 ld de, CeladonGameCornerText_48ed3 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a @@ -437,7 +437,7 @@ CeladonGameCornerText13: ; 48ed8 (12:4ed8) CeladonGameCornerText12: ; 48edd (12:4edd) db $08 ; asm ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CeladonGameCornerText_48f09 call PrintText call WaitForSoundToFinish @@ -449,7 +449,7 @@ CeladonGameCornerText12: ; 48edd (12:4edd) ld a, $43 ld [wd09f], a ld bc, $0208 - predef Func_ee9e + predef ReplaceTileBlock jp TextScriptEnd CeladonGameCornerText_48f09: ; 48f09 (12:4f09) diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm index 6d44175ebb..b1b1060c00 100755 --- a/scripts/celadongym.asm +++ b/scripts/celadongym.asm @@ -31,7 +31,7 @@ CeladonGymText_48943: ; 48943 (12:4943) CeladonGymScriptPointers: ; 4894e (12:494e) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw CeladonGymScript3 @@ -177,9 +177,9 @@ CeladonGymText1: ; 48a11 (12:4a11) set 7, [hl] ld hl, CeladonGymText_48a63 ld de, CeladonGymText_48a63 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $4 diff --git a/scripts/celadonmansion3.asm b/scripts/celadonmansion3.asm index 73cd45ed66..47190c92b6 100755 --- a/scripts/celadonmansion3.asm +++ b/scripts/celadonmansion3.asm @@ -51,7 +51,7 @@ DirectorText: ; 487b2 (12:47b2) db $8 ; asm callab DisplayDiploma ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a jp TextScriptEnd GameFreakPCText1: ; 487eb (12:47eb) diff --git a/scripts/celadonmansion5.asm b/scripts/celadonmansion5.asm index 66ef96d8f7..c18e36c651 100755 --- a/scripts/celadonmansion5.asm +++ b/scripts/celadonmansion5.asm @@ -14,7 +14,7 @@ CeladonMansion5Text2: ; 1dd46 (7:5d46) ld bc,(EEVEE << 8) | 25 call GivePokemon jr nc, .asm_24365 ; 0x1dd4d - ld a, $45 + ld a, HS_CELADON_MANSION_5_GIFT ld [wcc4d], a predef HideObject .asm_24365 ; 0x1dd59 diff --git a/scripts/celadonmartelevator.asm b/scripts/celadonmartelevator.asm index 1e32647de2..ff83576577 100755 --- a/scripts/celadonmartelevator.asm +++ b/scripts/celadonmartelevator.asm @@ -9,13 +9,13 @@ CeladonMartElevatorScript: ; 48600 (12:4600) res 7, [hl] call nz, CeladonMartElevatorScript_48654 xor a - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a inc a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret CeladonMartElevatorScript_4861c: ; 4861c (12:461c) - ld hl, wd3af + ld hl, wWarpEntries ld a, [wd73b] ld b, a ld a, [wd73c] diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm index 370255250a..d4bb431981 100755 --- a/scripts/celadonmartroof.asm +++ b/scripts/celadonmartroof.asm @@ -14,7 +14,7 @@ CeladonMartRoofScript_483d8: ; 483d8 (12:43d8) push de ld [wd11e], a ld b, a - predef IsItemInBag_ + predef IsItemInBag_ pop de pop hl ld a, b @@ -230,7 +230,7 @@ CeladonMartRoofText2: ; 4856c (12:456c) and a jr z, .asm_914b9 ; 0x48574 ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CeladonMartRoofText4 call PrintText call YesNoChoice diff --git a/scripts/celadonpokecenter.asm b/scripts/celadonpokecenter.asm index e7bfd1d2c9..1b8d3a1bbd 100755 --- a/scripts/celadonpokecenter.asm +++ b/scripts/celadonpokecenter.asm @@ -1,5 +1,5 @@ CeladonPokecenterScript: ; 488b8 (12:48b8) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing CeladonPokecenterTextPointers: ; 488be (12:48be) diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm index 419dbd8c2c..bbddad79be 100755 --- a/scripts/ceruleancity.asm +++ b/scripts/ceruleancity.asm @@ -8,7 +8,7 @@ CeruleanCityScript_1948c: ; 1948c (6:548c) xor a ld [wJoyIgnore], a ld [W_CERULEANCITYCURSCRIPT], a - ld a, $5 + ld a, HS_CERULEAN_RIVAL ld [wcc4d], a predef_jump HideObject @@ -64,7 +64,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8) ld hl, CeruleanCityCoords2 call ArePlayerCoordsInArray ret nc - ld a, [wd700] + ld a, [wWalkBikeSurfState] and a jr z, .asm_19512 ; 0x19508 $8 ld a, $ff @@ -85,10 +85,10 @@ CeruleanCityScript0: ; 194c8 (6:54c8) ld [$ff8c], a ld a, $5 ld [$ff8b], a - call Func_3500 + call GetPointerWithinSpriteStateData2 ld [hl], $19 .asm_19535 - ld a, $5 + ld a, HS_CERULEAN_RIVAL ld [wcc4d], a predef ShowObject ld de, CeruleanCityMovement1 @@ -117,7 +117,7 @@ CeruleanCityScript_1955d: ; 1955d (6:555d) ld [$ff8c],a xor a ld [$ff8d],a - jp Func_34a6 ; face object + jp SetSpriteFacingDirectionAndDelay ; face object CeruleanCityScript1: ; 19567 (6:5567) ld a, [wd730] @@ -133,7 +133,7 @@ CeruleanCityScript1: ; 19567 (6:5567) set 7, [hl] ld hl, CeruleanCityText_1966d ld de, CeruleanCityText_19672 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, SONY1 + $c8 ld [W_CUROPPONENT], a @@ -204,12 +204,12 @@ CeruleanCityScript3: ; 19610 (6:5610) ld a, [wd730] bit 0, a ret nz - ld a, $5 + ld a, HS_CERULEAN_RIVAL ld [wcc4d], a predef HideObject xor a ld [wJoyIgnore], a - call Func_2307 + call PlayDefaultMusic ld a, $0 ld [W_CERULEANCITYCURSCRIPT], a ret @@ -277,9 +277,9 @@ CeruleanCityText2: ; 1967c (6:567c) set 7, [hl] ld hl, CeruleanCityText_196ee ld de, CeruleanCityText_196ee - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, [$ff8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $4 @@ -296,7 +296,7 @@ CeruleanCityText2: ; 1967c (6:567c) jr .Done .Success ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, ReceivedTM28Text call PrintText callba Func_74872 diff --git a/scripts/ceruleancity2.asm b/scripts/ceruleancity2.asm index 57c9ea4af7..72ee4a86bc 100755 --- a/scripts/ceruleancity2.asm +++ b/scripts/ceruleancity2.asm @@ -2,15 +2,15 @@ Func_74872: ; 74872 (1d:4872) ; code similar to this appears in a lot of banks; this particular ; one is called after you beat the Rocket that gives you TM28 DIG. ; the screen then fades out, he disappears, and fades back in - call GBFadeIn1 - ld a, $07 + call GBFadeOutToBlack + ld a, HS_CERULEAN_GUARD_1 ld [wcc4d], a predef ShowObject - ld a, $09 + ld a, HS_CERULEAN_GUARD_2 ld [wcc4d], a predef HideObject - ld a, $06 + ld a, HS_CERULEAN_ROCKET ld [wcc4d], a predef HideObject - call GBFadeOut1 + call GBFadeInFromBlack ret diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm index 19296fe234..079844f39b 100755 --- a/scripts/ceruleangym.asm +++ b/scripts/ceruleangym.asm @@ -31,7 +31,7 @@ CeruleanGymScript_5c6ed: ; 5c6ed (17:46ed) CeruleanGymScriptPointers: ; 5c6f8 (17:46f8) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw CeruleanGymScript3 @@ -126,9 +126,9 @@ CeruleanGymText1: ; 5c771 (17:4771) set 7, [hl] ld hl, CeruleanGymText_5c7d8 ld de, CeruleanGymText_5c7d8 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $2 diff --git a/scripts/ceruleanhouse1.asm b/scripts/ceruleanhouse1.asm index 27a91ab596..4b6a240a54 100755 --- a/scripts/ceruleanhouse1.asm +++ b/scripts/ceruleanhouse1.asm @@ -13,5 +13,5 @@ CeruleanHouse1Text2: ; 1d702 (7:5702) db $08 ; asm ld a, $6 ld [wWhichTrade], a - predef Predef54 + predef DoInGameTradeDialogue jp TextScriptEnd diff --git a/scripts/ceruleanhouse2.asm b/scripts/ceruleanhouse2.asm index a45c0fdab7..a40d922478 100755 --- a/scripts/ceruleanhouse2.asm +++ b/scripts/ceruleanhouse2.asm @@ -1,8 +1,8 @@ CeruleanHouse2Script: ; 74e09 (1d:4e09) ld a, $1 - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a dec a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret CeruleanHouse2TextPointers: ; 74e13 (1d:4e13) @@ -22,12 +22,12 @@ CeruleanHouse2Text1: ; 74e15 (1d:4e15) call LoadItemList ld hl, wStringBuffer2 + 11 ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a - ld [wcc35], a + ld [wMenuItemToSwap], a ld a, SPECIALLISTMENU ld [wListMenuID], a call DisplayListMenuID diff --git a/scripts/ceruleanhousetrashed.asm b/scripts/ceruleanhousetrashed.asm index 02b40dcb2d..ee60cda73c 100755 --- a/scripts/ceruleanhousetrashed.asm +++ b/scripts/ceruleanhousetrashed.asm @@ -10,7 +10,7 @@ CeruleanHouseTrashedTextPointers: ; 1d689 (7:5689) CeruleanHouseTrashedText1: ; 1d68f (7:568f) db $08 ; asm ld b, $e4 - predef IsItemInBag_ + predef IsItemInBag_ and b jr z, .asm_f8734 ; 0x1d698 ld hl, CeruleanHouseTrashedText_1d6b0 diff --git a/scripts/ceruleanpokecenter.asm b/scripts/ceruleanpokecenter.asm index b6f88b418b..5d88831786 100755 --- a/scripts/ceruleanpokecenter.asm +++ b/scripts/ceruleanpokecenter.asm @@ -1,5 +1,5 @@ CeruleanPokecenterScript: ; 5c645 (17:4645) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing CeruleanPokecenterTextPointers: ; 5c64b (17:464b) diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 8ce02e8140..48133c5265 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -187,13 +187,13 @@ CinnabarGymTextPointers: ; 7589f (1d:589f) CinnabarGymScript_758b7: ; 758b7 (1d:58b7) ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld hl, wd72d set 6, [hl] set 7, [hl] - ld a, [wcf13] + ld a, [wSpriteIndex] cp $1 jr z, .asm_758d4 ld a, $2 @@ -224,7 +224,7 @@ CinnabarGymText1: ; 758df (1d:58df) call PrintText ld hl, BlaineEndBattleText ld de, BlaineEndBattleText - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, $7 ld [W_GYMLEADERNO], a jp CinnabarGymScript_758b7 @@ -267,7 +267,7 @@ CinnabarGymText2: ; 75939 (1d:5939) call PrintText ld hl, CinnabarGymText_75964 ld de, CinnabarGymText_75964 ; $5964 XXX - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp CinnabarGymScript_758b7 .asm_46bb4 ; 0x75956 ld hl, CinnabarGymText_75969 @@ -296,7 +296,7 @@ CinnabarGymText3: ; 7596e (1d:596e) call PrintText ld hl, CinnabarGymText_75999 ld de, CinnabarGymText_75999 ; $5999 XXX - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp CinnabarGymScript_758b7 .asm_4b406 ; 0x7598b ld hl, CinnabarGymText_7599e @@ -325,7 +325,7 @@ CinnabarGymText4: ; 759a3 (1d:59a3) call PrintText ld hl, CinnabarGymText_759ce ld de, CinnabarGymText_759ce ; $59ce XXX - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp CinnabarGymScript_758b7 .asm_c0673 ; 0x759c0 ld hl, CinnabarGymText_759d3 @@ -354,7 +354,7 @@ CinnabarGymText5: ; 759d8 (1d:59d8) call PrintText ld hl, CinnabarGymText_75a03 ld de, CinnabarGymText_75a03 ; $5a03 XXX - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp CinnabarGymScript_758b7 .asm_5cfd7 ; 0x759f5 ld hl, CinnabarGymText_75a08 @@ -383,7 +383,7 @@ CinnabarGymText6: ; 75a0d (1d:5a0d) call PrintText ld hl, CinnabarGymText_75a38 ld de, CinnabarGymText_75a38 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp CinnabarGymScript_758b7 .asm_776b4 ; 0x75a2a ld hl, CinnabarGymText_75a3d @@ -412,7 +412,7 @@ CinnabarGymText7: ; 75a42 (1d:5a42) call PrintText ld hl, CinnabarGymText_75a6d ld de, CinnabarGymText_75a6d - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp CinnabarGymScript_758b7 .asm_2f755 ; 0x75a5f ld hl, CinnabarGymText_75a72 @@ -441,7 +441,7 @@ CinnabarGymText8: ; 75a77 (1d:5a77) call PrintText ld hl, CinnabarGymText_75aa2 ld de, CinnabarGymText_75aa2 ; $5aa2 XXX - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp CinnabarGymScript_758b7 .asm_d87be ; 0x75a94 ld hl, CinnabarGymText_75aa7 diff --git a/scripts/cinnabarisland.asm b/scripts/cinnabarisland.asm index 8d27198b57..33a497c459 100755 --- a/scripts/cinnabarisland.asm +++ b/scripts/cinnabarisland.asm @@ -32,10 +32,10 @@ CinnabarIslandScript0: ; 1ca38 (7:4a38) xor a ld [hJoyHeld], a ld a, $1 - ld [wcd38], a - ld a, $80 - ld [wccd3], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + ld a, D_DOWN + ld [wSimulatedJoypadStatesEnd], a + call StartSimulatingJoypadStates xor a ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a @@ -44,7 +44,7 @@ CinnabarIslandScript0: ; 1ca38 (7:4a38) ret CinnabarIslandScript1: ; 1ca73 (7:4a73) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/cinnabarpokecenter.asm b/scripts/cinnabarpokecenter.asm index a2a4159254..abae9d8d38 100755 --- a/scripts/cinnabarpokecenter.asm +++ b/scripts/cinnabarpokecenter.asm @@ -1,5 +1,5 @@ CinnabarPokecenterScript: ; 75e2c (1d:5e2c) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing CinnabarPokecenterTextPointers: ; 75e32 (1d:5e32) diff --git a/scripts/copycatshouse2f.asm b/scripts/copycatshouse2f.asm index ea1e91b3b6..b7a1255cd5 100755 --- a/scripts/copycatshouse2f.asm +++ b/scripts/copycatshouse2f.asm @@ -16,7 +16,7 @@ CopycatsHouse2FText1: ; 5cc82 (17:4c82) bit 0, a jr nz, .asm_7ccf3 ; 0x5cc88 ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CopycatsHouse2FText_5ccd4 call PrintText ld b, POKE_DOLL diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index e463d38003..1830d2c059 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -24,13 +24,13 @@ DayCareMText1: ; 56254 (15:6254) ld hl, DayCareMText_56414 call PrintText xor a - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld [wd07d], a - ld [wcc35], a + ld [wMenuItemToSwap], a call DisplayPartyMenu push af call GBPalWhiteOutWithDelay3 - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal pop af ld hl, DayCareMText_56437 @@ -65,11 +65,11 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) ld a, $3 ld [wcc49], a call LoadMonData - callab Func_58f43 + callab CalcLevelFromExperience ld a, d - cp $64 + cp MAX_LEVEL jr c, .asm_56315 - ld d, $64 + ld d, MAX_LEVEL callab CalcExperience ld hl, wDayCareMonExp ld a, [H_NUMTOPRINT] @@ -78,7 +78,7 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) ld [hli], a ld a, [$ff98] ld [hl], a - ld d, $64 + ld d, MAX_LEVEL .asm_56315 xor a @@ -100,7 +100,7 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) .asm_56333 call PrintText ld a, [wPartyCount] - cp $6 + cp PARTY_LENGTH ld hl, DayCareMText_56440 jp z, .asm_56403 ld de, wTrainerFacingDirection @@ -129,7 +129,7 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) ld hl, DayCareMText_56428 call PrintText ld a, $13 - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID call YesNoChoice ld hl, DayCareMText_56437 @@ -159,7 +159,7 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) ld a, (SFX_02_5a - SFX_Headers_02) / 3 call PlaySoundWaitForCurrent ld a, $13 - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID ld hl, DayCareMText_5644f call PrintText diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm index 5f244781c4..e26da1b119 100755 --- a/scripts/fightingdojo.asm +++ b/scripts/fightingdojo.asm @@ -16,7 +16,7 @@ FightingDojoScript_5cd70: ; 5cd70 (17:4d70) FightingDojoScriptPointers: ; 5cd7b (17:4d7b) dw FightingDojoScript1 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw FightingDojoScript3 @@ -48,7 +48,7 @@ FightingDojoScript1: ; 5cd83 (17:4d83) ld [$ff8c], a ld a, $8 ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay ld a, $1 ld [$ff8c], a call DisplayTextID @@ -67,7 +67,7 @@ FightingDojoScript3: ; 5cdc6 (17:4dc6) ld [$ff8c], a ld a, $8 ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay .asm_5cde4 ld a, $f0 @@ -147,9 +147,9 @@ FightingDojoText1: ; 5ce44 (17:4e44) set 7, [hl] ld hl, FightingDojoText_5ce93 ld de, FightingDojoText_5ce93 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $3 @@ -279,7 +279,7 @@ FightingDojoText6: ; 5cf06 (17:4f06) jr nc, .done ; once Poké Ball is taken, hide sprite - ld a, $4a + ld a, HS_FIGHTING_DOJO_GIFT_1 ld [wcc4d], a predef HideObject ld hl, wd7b1 @@ -320,7 +320,7 @@ FightingDojoText7: ; 5cf4e (17:4f4e) set 0, [hl] ; once Poké Ball is taken, hide sprite - ld a, $4b + ld a, HS_FIGHTING_DOJO_GIFT_2 ld [wcc4d], a predef HideObject .done diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm index 09a767eba3..43d977d7ad 100755 --- a/scripts/fuchsiagym.asm +++ b/scripts/fuchsiagym.asm @@ -32,7 +32,7 @@ FuchsiaGymScript_75477: ; 75477 (1d:5477) FuchsiaGymScriptPointers: ; 75482 (1d:5482) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw FuchsiaGymScript3 @@ -166,9 +166,9 @@ FuchsiaGymText1: ; 75534 (1d:5534) set 7, [hl] ld hl, UnnamedText_75586 ld de, UnnamedText_75586 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $5 diff --git a/scripts/fuchsiapokecenter.asm b/scripts/fuchsiapokecenter.asm index 621a483f83..26f88844cd 100755 --- a/scripts/fuchsiapokecenter.asm +++ b/scripts/fuchsiapokecenter.asm @@ -1,5 +1,5 @@ FuchsiaPokecenterScript: ; 75063 (1d:5063) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing FuchsiaPokecenterTextPointers: ; 75069 (1d:5069) diff --git a/scripts/gary.asm b/scripts/gary.asm index f909a618d3..c0785cabb2 100755 --- a/scripts/gary.asm +++ b/scripts/gary.asm @@ -29,12 +29,12 @@ GaryScript0: ; 75f47 (1d:5f47) GaryScript1: ; 75f48 (1d:5f48) ld a, $ff ld [wJoyIgnore], a - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement75f63 call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $2 ld [W_GARYCURSCRIPT], a ret @@ -46,7 +46,7 @@ RLEMovement75f63: ; 75f63 (1d:5f63) db $ff GaryScript2: ; 75f6a (1d:5f6a) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 @@ -63,7 +63,7 @@ GaryScript2: ; 75f6a (1d:5f6a) set 7, [hl] ld hl, GaryText_760f9 ld de, GaryText_760fe - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, SONY3 + $c8 ld [W_CUROPPONENT], a @@ -120,7 +120,7 @@ GaryScript4: ; 75fe4 (1d:5fe4) ld a, $2 ld [$ff8c], a call MoveSprite - ld a, $d6 + ld a, HS_CHAMPIONS_ROOM_OAK ld [wcc4d], a predef ShowObject ld a, $5 @@ -140,12 +140,12 @@ GaryScript5: ; 7601a (1d:601a) ld [$ff8c], a ld a, $8 ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay ld a, $2 ld [$ff8c], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ; face object ld a, $3 ld [$ff8c], a call GaryScript_760c8 @@ -158,7 +158,7 @@ GaryScript6: ; 76047 (1d:6047) ld [$ff8c], a ld a, $c ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ; face object ld a, $4 ld [$ff8c], a call GaryScript_760c8 @@ -171,7 +171,7 @@ GaryScript7: ; 7605f (1d:605f) ld [$ff8c], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ; face object ld a, $5 ld [$ff8c], a call GaryScript_760c8 @@ -190,7 +190,7 @@ GaryScript8: ; 76083 (1d:6083) ld a, [wd730] bit 0, a ret nz - ld a, $d6 + ld a, HS_CHAMPIONS_ROOM_OAK ld [wcc4d], a predef HideObject ld a, $9 @@ -200,12 +200,12 @@ GaryScript8: ; 76083 (1d:6083) GaryScript9: ; 76099 (1d:6099) ld a, $ff ld [wJoyIgnore], a - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement760b4 call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $a ld [W_GARYCURSCRIPT], a ret @@ -216,7 +216,7 @@ RLEMovement760b4 ; 760b4 (1d:60b4) db $ff GaryScript10: ; 760b9 (1d:60b9) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm index 1273305e2d..c44622c711 100755 --- a/scripts/halloffameroom.asm +++ b/scripts/halloffameroom.asm @@ -62,12 +62,12 @@ HallofFameRoomScript2: ; 5a4bb (16:64bb) HallofFameRoomScript0: ; 5a50d (16:650d) ld a, $ff ld [wJoyIgnore], a - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement5a528 call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $1 ld [W_HALLOFFAMEROOMCURSCRIPT], a ret @@ -77,7 +77,7 @@ RLEMovement5a528: ; 5a528 (16:6528) db $ff HallofFameRoomScript1: ; 5a52b (16:652b) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $1 @@ -87,7 +87,7 @@ HallofFameRoomScript1: ; 5a52b (16:652b) call SetSpriteMovementBytesToFF ld a, $8 ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay call Delay3 xor a ld [wJoyIgnore], a @@ -98,7 +98,7 @@ HallofFameRoomScript1: ; 5a52b (16:652b) call DisplayTextID ld a, $ff ld [wJoyIgnore], a - ld a, $8 + ld a, HS_UNKNOWN_DUNGEON_GUY ld [wcc4d], a predef HideObject ld a, $2 diff --git a/scripts/indigoplateaulobby.asm b/scripts/indigoplateaulobby.asm index 96221c9793..1b09a61d28 100755 --- a/scripts/indigoplateaulobby.asm +++ b/scripts/indigoplateaulobby.asm @@ -1,5 +1,5 @@ IndigoPlateauLobbyScript: ; 19c5b (6:5c5b) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection call EnableAutoTextBoxDrawing ld hl, wd126 bit 6, [hl] diff --git a/scripts/lab2.asm b/scripts/lab2.asm index 4075f73797..9839a56359 100755 --- a/scripts/lab2.asm +++ b/scripts/lab2.asm @@ -21,5 +21,5 @@ Lab2Text3: ; 75c37 (1d:5c37) ld a, $8 ld [wWhichTrade], a asm_78552: ; 75c3d (1d:5c3d) - predef Predef54 + predef DoInGameTradeDialogue jp TextScriptEnd diff --git a/scripts/lab4.asm b/scripts/lab4.asm index a1df338769..1e81867610 100755 --- a/scripts/lab4.asm +++ b/scripts/lab4.asm @@ -6,24 +6,28 @@ Lab4TextPointers: ; 75d34 (1d:5d34) dw Lab4Text2 Lab4Script_75d38: ; 75d38 (1d:5d38) +; construct a list of all fossils in the player's bag + xor a ld [wcd37], a ld de, wcc5b ld hl, FossilsList -.asm_75d42 +.loop ld a, [hli] and a - jr z, .asm_75d64 + jr z, .done push hl push de ld [wd11e], a ld b, a - predef IsItemInBag_ + predef IsItemInBag_ pop de pop hl ld a, b and a - jr z, .asm_75d42 + jr z, .loop + + ; A fossil's in the bag ld a, [wd11e] ld [de], a inc de @@ -31,8 +35,8 @@ Lab4Script_75d38: ; 75d38 (1d:5d38) ld hl, wcd37 inc [hl] pop hl - jr .asm_75d42 -.asm_75d64 + jr .loop +.done ld a, $ff ld [de], a ret @@ -75,7 +79,7 @@ Lab4Text1: ; 75d6c (1d:5d6c) set 2, [hl] ld a, [W_FOSSILMON] ld b, a - ld c, $1e + ld c, 30 call GivePokemon jr nc, .asm_75d93 ; 0x75db9 $d8 ld hl, wd7a3 @@ -104,7 +108,7 @@ Lab4Text2: ; 75dda (1d:5dda) db $08 ; asm ld a, $3 ld [wWhichTrade], a - predef Predef54 + predef DoInGameTradeDialogue jp TextScriptEnd LoadFossilItemAndMonNameBank1D: ; 75de8 (1d:5de8) diff --git a/scripts/lance.asm b/scripts/lance.asm index 9029504249..f252309800 100755 --- a/scripts/lance.asm +++ b/scripts/lance.asm @@ -34,7 +34,7 @@ LanceScript_5a2de: ; 5a2de (16:62de) ld bc, $603 LanceScript_5a2f0: ; 5a2f0 (16:62f0) - predef_jump Func_ee9e + predef_jump ReplaceTileBlock LanceScript_5a2f5: ; 5a2f5 (16:62f5) xor a @@ -43,7 +43,7 @@ LanceScript_5a2f5: ; 5a2f5 (16:62f5) LanceScriptPointers: ; 5a2fa (16:62fa) dw LanceScript0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw LanceScript2 dw LanceScript3 dw LanceScript4 @@ -99,12 +99,12 @@ LanceScript2: ; 5a349 (16:6349) LanceScript_5a35b: ; 5a35b (16:635b) ld a, $ff ld [wJoyIgnore], a - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, RLEList_5a379 call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_LANCECURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -118,7 +118,7 @@ RLEList_5a379: ; 5a379 (16:6379) db $FF LanceScript3: ; 5a382 (16:6382) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/lavenderpokecenter.asm b/scripts/lavenderpokecenter.asm index 31a50aef58..452cc8a463 100755 --- a/scripts/lavenderpokecenter.asm +++ b/scripts/lavenderpokecenter.asm @@ -1,5 +1,5 @@ LavenderPokecenterScript: ; 5c8da (17:48da) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing LavenderPokecenterTextPointers: ; 5c8e0 (17:48e0) diff --git a/scripts/lorelei.asm b/scripts/lorelei.asm index 670b6b66b9..ab769d948c 100755 --- a/scripts/lorelei.asm +++ b/scripts/lorelei.asm @@ -25,7 +25,7 @@ LoreleiScript_76191: ; 76191 (1d:6191) .asm_761ab ld [wd09f], a ld bc, $2 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock LoreleiScript_761b6: ; 761b6 (1d:61b6) xor a @@ -34,7 +34,7 @@ LoreleiScript_761b6: ; 761b6 (1d:61b6) LoreleiScriptPointers: ; 761bb (1d:61bb) dw LoreleiScript0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw LoreleiScript2 dw LoreleiScript3 dw LoreleiScript4 @@ -42,8 +42,8 @@ LoreleiScriptPointers: ; 761bb (1d:61bb) LoreleiScript4: ; 761c5 (1d:61c5) ret asm_761c6: ; 761c6 (1d:61c6) - ld hl, wccd3 - ld a, $40 + ld hl, wSimulatedJoypadStatesEnd + ld a, D_UP ld [hli], a ld [hli], a ld [hli], a @@ -51,8 +51,8 @@ asm_761c6: ; 761c6 (1d:61c6) ld [hli], a ld [hl], a ld a, $6 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_LORELEICURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -64,8 +64,8 @@ LoreleiScript0: ; 761e2 (1d:61e2) xor a ld [hJoyPressed], a ld [hJoyHeld], a - ld [wccd3], a - ld [wcd38], a + ld [wSimulatedJoypadStatesEnd], a + ld [wSimulatedJoypadStatesIndex], a ld a, [wWhichTrade] ; wWhichTrade cp $3 jr c, .asm_76206 @@ -77,11 +77,11 @@ LoreleiScript0: ; 761e2 (1d:61e2) ld a, $2 ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID - ld a, $40 - ld [wccd3], a + ld a, D_UP + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_LORELEICURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -95,7 +95,7 @@ CoordsData_76223: ; 76223 (1d:6223) db $FF LoreleiScript3: ; 7622c (1d:622c) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm index ee1b42b47b..3e067a98b4 100755 --- a/scripts/mansion1.asm +++ b/scripts/mansion1.asm @@ -43,7 +43,7 @@ Mansion1Script_4430b: ; 4430b (11:430b) ld a, $e ld [wd09f], a asm_44310: ; 44310 (11:4310) - predef Func_ee9e + predef ReplaceTileBlock ret Mansion1Script_Switches: ; 44316 (11:4316) @@ -58,7 +58,7 @@ Mansion1Script_Switches: ; 44316 (11:4316) Mansion1ScriptPointers: ; 44326 (11:4326) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Mansion1TextPointers: ; 4432c (11:432c) @@ -106,7 +106,7 @@ Mansion1Text4: ; 4435a (11:435a) and a jr nz, .asm_4438c ; 0x44368 $22 ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, wd126 set 5, [hl] ld hl, MansionSwitchPressedText diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm index 302616376f..c643d22946 100755 --- a/scripts/mansion2.asm +++ b/scripts/mansion2.asm @@ -40,7 +40,7 @@ Mansion2Script_51fee: ; 51fee (14:5fee) Mansion2Script_5202f: ; 5202f (14:602f) ld [wd09f], a - predef_jump Func_ee9e + predef_jump ReplaceTileBlock Mansion2Script_Switches: ; 52037 (14:6037) ld a, [wSpriteStateData1 + 9] @@ -54,7 +54,7 @@ Mansion2Script_Switches: ; 52037 (14:6037) Mansion2ScriptPointers: ; 52047 (14:6047) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Mansion2TextPointers: ; 5204d (14:604d) @@ -112,7 +112,7 @@ Mansion2Text5: ; 52087 (14:6087) and a jr nz, .asm_520b9 ; 0x52095 $22 ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, wd126 set 5, [hl] ld hl, Mansion2Text_520c7 diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm index 4e9c227101..6ad02dd9c9 100755 --- a/scripts/mansion3.asm +++ b/scripts/mansion3.asm @@ -34,13 +34,13 @@ Mansion3Script_52204: ; 52204 (14:6204) Mansion3ScriptPointers: ; 52235 (14:6235) dw Mansion3Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Mansion3Script0: ; 5223b (14:623b) ld hl, CoordsData_52254 call Mansion3Script_5225b - ld a, [wd71e] + ld a, [wWhichDungeonWarp] and a jp z, CheckFightingMapTrainers cp $3 @@ -48,7 +48,7 @@ Mansion3Script0: ; 5223b (14:623b) jr nz, .asm_52250 ld a, $d6 .asm_52250 - ld [wd71d], a + ld [wDungeonWarpDestinationMap], a ret CoordsData_52254: ; 52254 (14:6254) @@ -59,14 +59,14 @@ CoordsData_52254: ; 52254 (14:6254) Mansion3Script_5225b: ; 5225b (14:625b) xor a - ld [wd71e], a + ld [wWhichDungeonWarp], a ld a, [wd72d] bit 4, a ret nz call ArePlayerCoordsInArray ret nc ld a, [wWhichTrade] ; wWhichTrade - ld [wd71e], a + ld [wWhichDungeonWarp], a ld hl, wd72d set 4, [hl] ld hl, wd732 diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm index cfd78c5f43..b89af5f208 100755 --- a/scripts/mansion4.asm +++ b/scripts/mansion4.asm @@ -56,7 +56,7 @@ Mansion4Script_Switches: ; 52420 (14:6420) Mansion4ScriptPointers: ; 52430 (14:6430) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Mansion4TextPointers: ; 52436 (14:6436) diff --git a/scripts/mtmoon1.asm b/scripts/mtmoon1.asm index 42f98d98fa..def597ba66 100755 --- a/scripts/mtmoon1.asm +++ b/scripts/mtmoon1.asm @@ -9,7 +9,7 @@ MtMoon1Script: ; 499c8 (12:59c8) MtMoon1ScriptPointers: ; 499db (12:59db) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle MtMoon1TextPointers: ; 499e1 (12:59e1) diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm index 8d6aaeed4f..eb0fc301fe 100755 --- a/scripts/mtmoon3.asm +++ b/scripts/mtmoon3.asm @@ -47,7 +47,7 @@ MtMoon3Script_49d58: ; 49d58 (12:5d58) MtMoon3ScriptPointers: ; 49d63 (12:5d63) dw MtMoon3Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw MtMoon3Script3 dw MtMoon3Script4 @@ -138,17 +138,17 @@ MtMoon3Script5: ; 49dfb (12:5dfb) ld a, $f0 ld [wJoyIgnore], a ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $a ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID ld a, [wd7f6] bit 6, a jr z, .asm_49e1d - ld a, $6e + ld a, HS_MT_MOON_3_FOSSIL_2 jr .asm_49e1f .asm_49e1d - ld a, $6d + ld a, HS_MT_MOON_3_FOSSIL_1 .asm_49e1f ld [wcc4d], a predef HideObject @@ -228,9 +228,9 @@ MtMoon3Text1: ; 49e79 (12:5e79) set 7, [hl] ld hl, MtMoon3Text_49f8a ld de, MtMoon3Text_49f8a - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $3 @@ -270,7 +270,7 @@ MtMoon3Text5: ; 49edf (12:5edf) MtMoon3Text6: ; 49ee9 (12:5ee9) db $08 ; asm ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, MtMoon3Text_49f24 call PrintText call YesNoChoice @@ -281,7 +281,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9) call GiveItem jp nc, MtMoon3Script_49f76 call MtMoon3Script_49f69 - ld a, $6d + ld a, HS_MT_MOON_3_FOSSIL_1 ld [wcc4d], a predef HideObject ld hl, wd7f6 @@ -299,7 +299,7 @@ MtMoon3Text_49f24: ; 49f24 (12:5f24) MtMoon3Text7: ; 49f29 (12:5f29) db $08 ; asm ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, MtMoon3Text_49f64 call PrintText call YesNoChoice @@ -310,7 +310,7 @@ MtMoon3Text7: ; 49f29 (12:5f29) call GiveItem jp nc, MtMoon3Script_49f76 call MtMoon3Script_49f69 - ld a, $6e + ld a, HS_MT_MOON_3_FOSSIL_2 ld [wcc4d], a predef HideObject ld hl, wd7f6 diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm index 94054561ba..bfe9add885 100755 --- a/scripts/mtmoonpokecenter.asm +++ b/scripts/mtmoonpokecenter.asm @@ -1,5 +1,5 @@ MtMoonPokecenterScript: ; 492cf (12:52cf) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing MtMoonPokecenterTextPointers: ; 492d5 (12:52d5) @@ -29,7 +29,7 @@ MtMoonPokecenterText4: ; 492ec (12:52ec) ld hl, MtMoonPokecenterText_4935c call PrintText ld a, $13 - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID call YesNoChoice ld a, [wCurrentMenuItem] @@ -57,7 +57,7 @@ MtMoonPokecenterText4: ; 492ec (12:52ec) ld c, $3 predef SubBCDPredef ld a, $13 - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID ld hl, wd7c6 set 7, [hl] diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index e593cf397c..cd2b3c29e0 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -1,8 +1,8 @@ Museum1FScript: ; 5c0f7 (17:40f7) ld a, $1 - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a xor a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, Museum1FScriptPointers ld a, [W_MUSEUM1FCURSCRIPT] jp CallFunctionInTable @@ -70,7 +70,7 @@ Museum1FText1: ; 5c135 (17:4135) jp asm_d1145 .asm_3ded4 ld a, $13 - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID xor a ld [hJoyHeld], a @@ -105,7 +105,7 @@ Museum1FText1: ; 5c135 (17:4135) ld c, $3 predef SubBCDPredef ld a, $13 - ld [wd125], a + ld [wTextBoxID], a call DisplayTextBoxID ld a, (SFX_02_5a - SFX_Headers_02) / 3 call PlaySoundWaitForCurrent @@ -115,10 +115,10 @@ Museum1FText1: ; 5c135 (17:4135) ld hl, Museum1FText_5c21a ; $421a call PrintText ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $80 - ld [wccd3], a - call Func_3486 + ld [wSimulatedJoypadStatesEnd], a + call StartSimulatingJoypadStates call UpdateSprites jr asm_d1145 .asm_0b094 @@ -200,7 +200,7 @@ Museum1FText3: ; 5c256 (17:4256) jr nc, .BagFull ld hl, wd754 set 1, [hl] - ld a, $34 + ld a, HS_OLD_AMBER ld [wcc4d], a predef HideObject ld hl, ReceivedOldAmberText diff --git a/scripts/namerater.asm b/scripts/namerater.asm index ca357ad14a..c9e3bfb467 100755 --- a/scripts/namerater.asm +++ b/scripts/namerater.asm @@ -50,12 +50,12 @@ NameRaterText1: ; 1da56 (7:5a56) call PrintText xor a ld [wd07d], a - ld [wcfcb], a - ld [wcc35], a + ld [wUpdateSpritesEnabled], a + ld [wMenuItemToSwap], a call DisplayPartyMenu push af call GBPalWhiteOutWithDelay3 - call Func_3dbe + call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal pop af jr c, .asm_1daae ; 0x1da80 $2c diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index fb56aade3f..8f23cd3e14 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -3,9 +3,9 @@ OaksLabScript: ; 1cb0e (7:4b0e) bit 6, a call nz, OaksLabScript_1d076 ld a, $1 - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a xor a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, OaksLabScriptPointers ld a, [W_OAKSLABCURSCRIPT] jp CallFunctionInTable @@ -35,10 +35,10 @@ OaksLabScript0: ; 1cb4e (7:4b4e) ld a, [wd74b] bit 7, a ret z - ld a, [wcf10] + ld a, [wNPCMovementScriptFunctionNum] and a ret nz - ld a, $31 + ld a, HS_OAKS_LAB_OAK_2 ld [wcc4d], a predef ShowObject ld hl, wd72e @@ -50,7 +50,7 @@ OaksLabScript0: ; 1cb4e (7:4b4e) OaksLabScript1: ; 1cb6e (7:4b6e) ld a, $8 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld de, OakEntryMovement call MoveSprite @@ -65,10 +65,10 @@ OaksLabScript2: ; 1cb82 (7:4b82) ld a, [wd730] bit 0, a ret nz - ld a, $31 + ld a, HS_OAKS_LAB_OAK_2 ld [wcc4d], a predef HideObject - ld a, $2e + ld a, HS_OAKS_LAB_OAK_1 ld [wcc4d], a predef ShowObject @@ -78,22 +78,22 @@ OaksLabScript2: ; 1cb82 (7:4b82) OaksLabScript3: ; 1cba2 (7:4ba2) call Delay3 - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, PlayerEntryMovementRLE call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ld a, $4 ld [W_OAKSLABCURSCRIPT], a @@ -103,7 +103,7 @@ PlayerEntryMovementRLE: ; 1cbcf (7:4bcf) db $40, $8, $ff OaksLabScript4: ; 1cbd2 (7:4bd2) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld hl, wd747 @@ -111,14 +111,14 @@ OaksLabScript4: ; 1cbd2 (7:4bd2) ld hl, wd74b set 0, [hl] ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $4 ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay call UpdateSprites ld hl, W_FLAGS_D733 res 1, [hl] - call Func_2307 + call PlayDefaultMusic ld a, $5 ld [W_OAKSLABCURSCRIPT], a @@ -156,24 +156,24 @@ OaksLabScript6: ; 1cc36 (7:4c36) cp $6 ret nz ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay call UpdateSprites ld a, $c ld [$ff8c], a call DisplayTextID ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $40 - ld [wccd3], a - call Func_3486 + ld [wSimulatedJoypadStatesEnd], a + call StartSimulatingJoypadStates ld a, $8 ld [wd528], a @@ -182,7 +182,7 @@ OaksLabScript6: ; 1cc36 (7:4c36) ret OaksLabScript7: ; 1cc72 (7:4c72) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 @@ -231,10 +231,10 @@ OaksLabScript8: ; 1cc80 (7:4c80) jr nz, .asm_1ccf3 ; 0x1cccd $24 push hl ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $4 ld [$ff8b], a - call Func_34fc + call GetPointerWithinSpriteStateData1 push hl ld [hl], $4c inc hl @@ -256,7 +256,7 @@ OaksLabScript8: ; 1cc80 (7:4c80) .asm_1ccf3 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $9 @@ -270,25 +270,25 @@ OaksLabScript9: ; 1cd00 (7:4d00) ld a, $fc ld [wJoyIgnore], a ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $4 ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ld a, $d ld [$ff8c], a call DisplayTextID ld a, [wTrainerEngageDistance] cp $2 jr nz, .asm_1cd28 ; 0x1cd22 $4 - ld a, $2b + ld a, HS_STARTER_BALL_1 jr .asm_1cd32 ; 0x1cd26 $a .asm_1cd28 cp $3 jr nz, .asm_1cd30 ; 0x1cd2a $4 - ld a, $2c + ld a, HS_STARTER_BALL_2 jr .asm_1cd32 ; 0x1cd2e $2 .asm_1cd30 - ld a, $2d + ld a, HS_STARTER_BALL_3 .asm_1cd32 ld [wcc4d], a predef HideObject @@ -299,10 +299,10 @@ OaksLabScript9: ; 1cd00 (7:4d00) ld [wd11e], a call GetMonName ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $4 ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ld a, $e ld [$ff8c], a call DisplayTextID @@ -320,10 +320,10 @@ OaksLabScript10: ; 1cd6d (7:4d6d) cp $6 ret nz ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ld a, $8 ld [wd528], a ld c, BANK(Music_MeetRival) @@ -337,14 +337,14 @@ OaksLabScript10: ; 1cd6d (7:4d6d) ld a, $1 swap a ld [$ff95], a - predef Func_f929 + predef CalcPositionOfPlayerRelativeToNPC ld a, [$ff95] dec a ld [$ff95], a - predef Func_f8ba - ld de, wcc97 + predef FindPathToPlayer + ld de, wNPCMovementDirections2 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $b @@ -374,11 +374,11 @@ OaksLabScript11: ; 1cdb9 (7:4db9) .done ld [W_TRAINERNO], a ld a, $1 - ld [wcf13], a - call Func_32ef + ld [wSpriteIndex], a + call GetSpritePosition1 ld hl, OaksLabText_1d3be ld de, OaksLabText_1d3c3 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld hl, wd72d set 6, [hl] set 7, [hl] @@ -397,13 +397,13 @@ OaksLabScript12: ; 1ce03 (7:4e03) ld [wd528], a call UpdateSprites ld a, $1 - ld [wcf13], a - call Func_32f9 + ld [wSpriteIndex], a + call SetSpritePosition1 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a xor a ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay predef HealParty ld hl, wd74b set 3, [hl] @@ -420,7 +420,7 @@ OaksLabScript13: ; 1ce32 (7:4e32) call DisplayTextID callba Music_RivalAlternateStart ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld de, .RivalExitMovement call MoveSprite ld a, [W_XCOORD] @@ -445,12 +445,12 @@ OaksLabScript14: ; 1ce6d (7:4e6d) ld a, [wd730] bit 0, a jr nz, .asm_1ce8c ; 0x1ce72 $18 - ld a, $2a + ld a, HS_OAKS_LAB_RIVAL ld [wcc4d], a predef HideObject xor a ld [wJoyIgnore], a - call Func_2307 ; reset to map music + call PlayDefaultMusic ; reset to map music ld a, $12 ld [W_OAKSLABCURSCRIPT], a jr .done ; 0x1ce8a $23 @@ -488,20 +488,20 @@ OaksLabScript15: ; 1ceb0 (7:4eb0) ld [$ff8c], a call DisplayTextID call OaksLabScript_1d02b - ld a, $2a + ld a, HS_OAKS_LAB_RIVAL ld [wcc4d], a predef ShowObject - ld a, [wcd37] + ld a, [wNPCMovementDirections2Index] ld [wd157], a ld b, $0 ld c, a - ld hl, wcc97 + ld hl, wNPCMovementDirections2 ld a, $40 call FillMemory ld [hl], $ff ld a, $1 - ld [$ff8c], a - ld de, wcc97 + ld [H_SPRITEINDEX], a + ld de, wNPCMovementDirections2 call MoveSprite ld a, $10 @@ -510,22 +510,22 @@ OaksLabScript15: ; 1ceb0 (7:4eb0) OaksLabScript_1cefd ; 1cefd (7:4efd) ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $4 ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay ld a, $8 - ld [$ff8c], a + ld [H_SPRITEINDEX], a xor a ld [$ff8d], a - jp Func_34a6 ; face object + jp SetSpriteFacingDirectionAndDelay OaksLabScript16: ; 1cf12 (7:4f12) ld a, [wd730] bit 0, a ret nz call EnableAutoTextBoxDrawing - call Func_2307 + call PlayDefaultMusic ld a, $fc ld [wJoyIgnore], a call OaksLabScript_1cefd @@ -547,10 +547,10 @@ OaksLabScript16: ; 1cf12 (7:4f12) ld [$ff8c], a call DisplayTextID call Delay3 - ld a, $2f + ld a, HS_POKEDEX_1 ld [wcc4d], a predef HideObject - ld a, $30 + ld a, HS_POKEDEX_2 ld [wcc4d], a predef HideObject call OaksLabScript_1cefd @@ -558,10 +558,10 @@ OaksLabScript16: ; 1cf12 (7:4f12) ld [$ff8c], a call DisplayTextID ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $c ld [$ff8d], a - call Func_34a6 ; face object + call SetSpriteFacingDirectionAndDelay call Delay3 ld a, $1b ld [$ff8c], a @@ -570,16 +570,16 @@ OaksLabScript16: ; 1cf12 (7:4f12) set 5, [hl] ld hl, wd74e set 0, [hl] - ld a, $1 + ld a, HS_LYING_OLD_MAN ld [wcc4d], a predef HideObject - ld a, $2 + ld a, HS_OLD_MAN ld [wcc4d], a predef ShowObject ld a, [wd157] ld b, $0 ld c, a - ld hl, wcc97 + ld hl, wNPCMovementDirections2 xor a call FillMemory ld [hl], $ff @@ -588,8 +588,8 @@ OaksLabScript16: ; 1cf12 (7:4f12) call PlaySound callba Music_RivalAlternateStart ld a, $1 - ld [$ff8c], a - ld de, wcc97 + ld [H_SPRITEINDEX], a + ld de, wNPCMovementDirections2 call MoveSprite ld a, $11 @@ -600,15 +600,15 @@ OaksLabScript17: ; 1cfd4 (7:4fd4) ld a, [wd730] bit 0, a ret nz - call Func_2307 - ld a, $2a + call PlayDefaultMusic + ld a, HS_OAKS_LAB_RIVAL ld [wcc4d], a predef HideObject ld hl, wd7eb set 0, [hl] res 1, [hl] set 7, [hl] - ld a, $22 + ld a, HS_ROUTE_22_RIVAL_1 ld [wcc4d], a predef ShowObject ld a, $5 @@ -652,7 +652,7 @@ OaksLabScript_1d02b: ; 1d02b (7:502b) cp $3 jr nz, .asm_1d045 ; 0x1d038 $b ld a, $4 - ld [wcd37], a + ld [wNPCMovementDirections2Index], a ld a, $30 ld b, $b jr .asm_1d068 ; 0x1d043 $23 @@ -660,13 +660,13 @@ OaksLabScript_1d02b: ; 1d02b (7:502b) cp $1 jr nz, .asm_1d054 ; 0x1d047 $b ld a, $2 - ld [wcd37], a + ld [wNPCMovementDirections2Index], a ld a, $30 ld b, $9 jr .asm_1d068 ; 0x1d052 $14 .asm_1d054 ld a, $3 - ld [wcd37], a + ld [wNPCMovementDirections2Index], a ld b, $a ld a, [W_XCOORD] cp $4 @@ -680,8 +680,8 @@ OaksLabScript_1d02b: ; 1d02b (7:502b) ld a, b ld [$ffed], a ld a, $1 - ld [wcf13], a - call Func_32f9 + ld [wSpriteIndex], a + call SetSpritePosition1 ret OaksLabScript_1d076: ; 1d076 (7:5076) @@ -801,7 +801,7 @@ OaksLabScript_1d133: ; 1d133 (7:5133) ld [wcf91], a ld [wd11e], a ld a, b - ld [wcf13], a + ld [wSpriteIndex], a ld a, [wd74b] bit 2, a jp nz, OaksLabScript_1d22d @@ -817,17 +817,17 @@ OaksLabText39: ; 1d152 (7:5152) OaksLabScript_1d157: ; 1d157 (7:5157) ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $9 ld [$ff8b], a - call Func_34fc + call GetPointerWithinSpriteStateData1 ld [hl], $0 ; manually fixed some disassembler issues around here ld a, $1 - ld [$FF8c], a + ld [H_SPRITEINDEX], a ld a, $9 ld [$ff8b], a - call Func_34fc + call GetPointerWithinSpriteStateData1 ld [hl], $c ld hl, wd730 set 6, [hl] @@ -837,7 +837,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157) call ReloadMapData ld c, $a call DelayFrames - ld a, [wcf13] + ld a, [wSpriteIndex] cp $2 jr z, OaksLabLookAtCharmander cp $3 @@ -868,7 +868,7 @@ OaksLabBulbasaurText: ; 1d1ae (7:51ae) OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3) call PrintText ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a call YesNoChoice ; yes/no menu ld a, [wCurrentMenuItem] and a @@ -877,23 +877,23 @@ OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3) ld [W_PLAYERSTARTER], a ld [wd11e], a call GetMonName - ld a, [wcf13] + ld a, [wSpriteIndex] cp $2 jr nz, asm_1d1db ; 0x1d1d5 $4 - ld a, $2b + ld a, HS_STARTER_BALL_1 jr asm_1d1e5 ; 0x1d1d9 $a asm_1d1db: ; 1d1db (7:51db) cp $3 jr nz, asm_1d1e3 ; 0x1d1dd $4 - ld a, $2c + ld a, HS_STARTER_BALL_2 jr asm_1d1e5 ; 0x1d1e1 $2 asm_1d1e3: ; 1d1e3 (7:51e3) - ld a, $2d + ld a, HS_STARTER_BALL_3 asm_1d1e5: ; 1d1e5 (7:51e5) ld [wcc4d], a predef HideObject ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, OaksLabMonEnergeticText call PrintText ld hl, OaksLabReceivedMonText @@ -924,10 +924,10 @@ OaksLabReceivedMonText: ; 1d227 (7:5227) OaksLabScript_1d22d: ; 1d22d (7:522d) ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $9 ld [$ff8b], a - call Func_34fc + call GetPointerWithinSpriteStateData1 ld [hl], $0 ld hl, OaksLabLastMonText call PrintText @@ -944,7 +944,7 @@ OaksLabText5: ; 1d248 (7:5248) bit 6, a jr nz, .asm_50e81 ; 0x1d24e ld hl, wPokedexOwned - ld b, $13 + ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits ld a, [wd11e] cp $2 @@ -956,7 +956,7 @@ OaksLabText5: ; 1d248 (7:5248) ld hl, OaksLabText_1d31d call PrintText ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a predef DisplayDexRating jp .asm_0f042 .asm_b28b0 ; 0x1d279 diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 16098dcf96..c43b96825a 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -54,7 +54,7 @@ PalletTownScript1: ; 18eb2 (6:4eb2) call DisplayTextID ld a,$FF ld [wJoyIgnore],a - ld a,0 + ld a,HS_PALLET_TOWN_OAK ld [wcc4d],a predef ShowObject @@ -68,7 +68,7 @@ PalletTownScript2: ; 18ed2 (6:4ed2) ld [$FF8C],a ld a,4 ld [$FF8D],a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay call Delay3 ld a,1 ld [W_YCOORD],a @@ -77,11 +77,11 @@ PalletTownScript2: ; 18ed2 (6:4ed2) ld a,1 swap a ld [$FF95],a - predef Func_f929 + predef CalcPositionOfPlayerRelativeToNPC ld hl,$FF95 dec [hl] - predef Func_f8ba ; load Oak’s movement into wcc97 - ld de,wcc97 + predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2 + ld de,wNPCMovementDirections2 ld a,1 ; oak ld [$FF8C],a call MoveSprite @@ -109,13 +109,13 @@ PalletTownScript3: ; 18f12 (6:4f12) ld a,$FF ld [wJoyIgnore],a ld a,1 - ld [wcf13],a + ld [wSpriteIndex],a xor a - ld [wcf10],a + ld [wNPCMovementScriptFunctionNum],a ld a,1 - ld [wcc57],a + ld [wNPCMovementScriptPointerTableNum],a ld a,[H_LOADEDROMBANK] - ld [wcc58],a + ld [wNPCMovementScriptBank],a ; trigger the next script ld a,4 @@ -123,7 +123,7 @@ PalletTownScript3: ; 18f12 (6:4f12) ret PalletTownScript4: ; 18f4b (6:4f4b) - ld a,[wcc57] + ld a,[wNPCMovementScriptPointerTableNum] and a ret nz @@ -141,10 +141,10 @@ PalletTownScript5: ; 18f56 (6:4f56) jr nz,.next ld hl,wd74a set 2,[hl] - ld a,$27 + ld a,HS_DAISY_SITTING ld [wcc4d],a predef HideObject - ld a,$28 + ld a,HS_DAISY_WALKING ld [wcc4d],a predef_jump ShowObject .next @@ -171,7 +171,7 @@ PalletTownText1: ; 18f96 (6:4f96) and a jr nz,.next ld a,1 - ld [wcc3c],a + ld [wDoNotWaitForButtonPressAfterDisplayingText],a ld hl,OakAppearsText jr .done .next diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm index e7a143f9e0..55369df9d5 100755 --- a/scripts/pewtercity.asm +++ b/scripts/pewtercity.asm @@ -42,18 +42,18 @@ CoordsData_19277: ; 19277 (6:5277) db $ff PewterCityScript1: ; 19280 (6:5280) - ld a, [wcc57] + ld a, [wNPCMovementScriptPointerTableNum] and a ret nz ld a, $3 - ld [$ff8c], a - ld a, $4 + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_UP ld [$ff8d], a - call Func_34a6 - ld a, $34 + call SetSpriteFacingDirectionAndDelay + ld a, ($3 << 4) | SPRITE_FACING_UP ld [$ff8d], a - call Func_34b9 - call Func_2307 + call SetSpriteImageIndexAfterSettingFacingDirection + call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $d @@ -68,8 +68,8 @@ PewterCityScript1: ; 19280 (6:5280) ld a, $11 ld [$ffee], a ld a, $3 - ld [wcf13], a - call Func_32f9 + ld [wSpriteIndex], a + call SetSpritePosition1 ld a, $3 ld [$ff8c], a ld de, MovementData_PewterMuseumGuyExit ; $52ce @@ -85,7 +85,7 @@ PewterCityScript2: ; 192d3 (6:52d3) ld a, [wd730] bit 0, a ret nz - ld a, $3 + ld a, HS_MUSEUM_GUY ld [wcc4d], a predef HideObject ld a, $3 @@ -94,9 +94,9 @@ PewterCityScript2: ; 192d3 (6:52d3) PewterCityScript3: ; 192e9 (6:52e9) ld a, $3 - ld [wcf13], a - call Func_32fe - ld a, $3 + ld [wSpriteIndex], a + call SetSpritePosition2 + ld a, HS_MUSEUM_GUY ld [wcc4d], a predef ShowObject xor a @@ -106,18 +106,18 @@ PewterCityScript3: ; 192e9 (6:52e9) ret PewterCityScript4: ; 19305 (6:5305) - ld a, [wcc57] + ld a, [wNPCMovementScriptPointerTableNum] and a ret nz ld a, $5 ld [$ff8c], a - ld a, $8 + ld a, SPRITE_FACING_LEFT ld [$ff8d], a - call Func_34a6 - ld a, $18 + call SetSpriteFacingDirectionAndDelay + ld a, ($1 << 4) | SPRITE_FACING_LEFT ld [$ff8d], a - call Func_34b9 - call Func_2307 + call SetSpriteImageIndexAfterSettingFacingDirection + call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $e @@ -132,8 +132,8 @@ PewterCityScript4: ; 19305 (6:5305) ld a, $10 ld [$ffee], a ld a, $5 - ld [wcf13], a - call Func_32f9 + ld [wSpriteIndex], a + call SetSpritePosition1 ld a, $5 ld [$ff8c], a ld de, MovementData_PewterGymGuyExit @@ -149,7 +149,7 @@ PewterCityScript5: ; 19359 (6:5359) ld a, [wd730] bit 0, a ret nz - ld a, $4 + ld a, HS_GYM_GUY ld [wcc4d], a predef HideObject ld a, $6 @@ -158,9 +158,9 @@ PewterCityScript5: ; 19359 (6:5359) PewterCityScript6: ; 1936f (6:536f) ld a, $5 - ld [wcf13], a - call Func_32fe - ld a, $4 + ld [wSpriteIndex], a + call SetSpritePosition2 + ld a, HS_GYM_GUY ld [wcc4d], a predef ShowObject xor a @@ -210,14 +210,14 @@ PewterCityText3: ; 193b1 (6:53b1) xor a ldh [$b3], a ldh [$b4], a - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a ld a, $2 - ld [wcc57], a + ld [wNPCMovementScriptPointerTableNum], a ldh a, [$b8] - ld [wcc58], a + ld [wNPCMovementScriptBank], a ld a, $3 - ld [wcf13], a - call Func_32f4 + ld [wSpriteIndex], a + call GetSpritePosition2 ld a, $1 ld [W_PEWTERCITYCURSCRIPT], a .asm_ac429 ; 0x193ee @@ -274,14 +274,14 @@ PewterCityText5: ; 19436 (6:5436) call PrintText xor a ldh [$b4], a - ld [wcf10], a + ld [wNPCMovementScriptFunctionNum], a ld a, $3 - ld [wcc57], a + ld [wNPCMovementScriptPointerTableNum], a ldh a, [$b8] - ld [wcc58], a + ld [wNPCMovementScriptBank], a ld a, $5 - ld [wcf13], a - call Func_32f4 + ld [wSpriteIndex], a + call GetSpritePosition2 ld a, $4 ld [W_PEWTERCITYCURSCRIPT], a jp TextScriptEnd diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm index 2feb981768..9f9c7c3b59 100755 --- a/scripts/pewtergym.asm +++ b/scripts/pewtergym.asm @@ -31,7 +31,7 @@ PewterGymScript_5c3bf: ; 5c3bf (17:43bf) PewterGymScriptPointers: ; 5c3ca (17:43ca) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw PewterGymScript3 @@ -67,10 +67,10 @@ PewterGymScript_5c3df: ; 5c3df (17:43df) ld hl, wd72a set 0, [hl] - ld a, $4 + ld a, HS_GYM_GUY ld [wcc4d], a predef HideObject - ld a, $22 + ld a, HS_ROUTE_22_RIVAL_1 ld [wcc4d], a predef HideObject @@ -126,9 +126,9 @@ PewterGymText1: ; 5c44e (17:444e) set 7, [hl] ld hl, PewterGymText_5c4bc ld de, PewterGymText_5c4bc - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $1 diff --git a/scripts/pewtermart.asm b/scripts/pewtermart.asm index 4e867aee17..8fe99d94b8 100755 --- a/scripts/pewtermart.asm +++ b/scripts/pewtermart.asm @@ -1,7 +1,7 @@ PewterMartScript: ; 74cad (1d:4cad) call EnableAutoTextBoxDrawing ld a, $1 - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a ret PewterMartTextPointers: ; 74cb6 (1d:4cb6) diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm index 252c6d5be8..1f3cabe0d0 100755 --- a/scripts/pewterpokecenter.asm +++ b/scripts/pewterpokecenter.asm @@ -1,5 +1,5 @@ PewterPokecenterScript: ; 5c587 (17:4587) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing PewterPokecenterTextPointers: ; 5c58d (17:458d) @@ -18,7 +18,7 @@ PewterPokecenterText2: ; 5c596 (17:4596) PewterPokecenterText3: ; 5c59b (17:459b) db $8 ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, PewterPokecenterText5 call PrintText ld a, $ff @@ -61,7 +61,7 @@ PewterPokecenterText3: ; 5c59b (17:459b) jr nz, .asm_5c5d1 ; 0x5c5f6 $d9 ld c, $30 call DelayFrames - call Func_2307 + call PlayDefaultMusic jp TextScriptEnd PewterPokecenterText5: ; 5c603 (17:4603) diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm index f370d7b718..dc9275f256 100755 --- a/scripts/pokemontower2.asm +++ b/scripts/pokemontower2.asm @@ -46,7 +46,7 @@ PokemonTower2Script0: ; 6050f (18:450f) ld [$ff8c], a ld a, b ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay ld a, $1 ld [$ff8c], a call DisplayTextID @@ -99,12 +99,12 @@ PokemonTower2Script2: ; 605bb (18:45bb) ld a, [wd730] bit 0, a ret nz - ld a, $38 + ld a, HS_POKEMONTOWER_2_RIVAL ld [wcc4d], a predef HideObject xor a ld [wJoyIgnore], a - call Func_2307 + call PlayDefaultMusic ld a, $0 ld [W_POKEMONTOWER2CURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -130,7 +130,7 @@ PokemonTower2Text1: ; 605df (18:45df) set 7, [hl] ld hl, PokemonTower2Text_60632 ld de, PokemonTower2Text_60637 ; XXX $4637 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, SONY2 + $c8 ld [W_CUROPPONENT], a diff --git a/scripts/pokemontower3.asm b/scripts/pokemontower3.asm index f05623fbf9..8df5bfc5d4 100755 --- a/scripts/pokemontower3.asm +++ b/scripts/pokemontower3.asm @@ -9,7 +9,7 @@ PokemonTower3Script: ; 606cc (18:46cc) PokemonTower3ScriptPointers: ; 606df (18:46df) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle PokemonTower3TextPointers: ; 606e5 (18:46e5) diff --git a/scripts/pokemontower4.asm b/scripts/pokemontower4.asm index e48b968193..760bb6042c 100755 --- a/scripts/pokemontower4.asm +++ b/scripts/pokemontower4.asm @@ -9,7 +9,7 @@ PokemonTower4Script: ; 607f6 (18:47f6) PokemonTower4ScriptPointers: ; 60809 (18:4809) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle PokemonTower4TextPointers: ; 6080f (18:480f) diff --git a/scripts/pokemontower5.asm b/scripts/pokemontower5.asm index 317690a26e..b70f9e2861 100755 --- a/scripts/pokemontower5.asm +++ b/scripts/pokemontower5.asm @@ -9,7 +9,7 @@ PokemonTower5Script: ; 60932 (18:4932) PokemonTower5ScriptPointers: ; 60945 (18:4945) dw PokemonTower5Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle PokemonTower5Script0: ; 6094b (18:494b) @@ -33,10 +33,10 @@ PokemonTower5Script0: ; 6094b (18:494b) ld hl, wd72e set 4, [hl] predef HealParty - call GBFadeOut2 + call GBFadeOutToWhite call Delay3 call Delay3 - call GBFadeIn2 + call GBFadeInFromWhite ld a, $7 ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID diff --git a/scripts/pokemontower6.asm b/scripts/pokemontower6.asm index fe33ce2957..58968d172d 100755 --- a/scripts/pokemontower6.asm +++ b/scripts/pokemontower6.asm @@ -16,7 +16,7 @@ PokemonTower6Script_60b02: ; 60b02 (18:4b02) PokemonTower6ScriptPointers: ; 60b0d (18:4b0d) dw PokemonTower6Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw PokemonTower6Script3 dw PokemonTower6Script4 @@ -57,7 +57,7 @@ PokemonTower6Script4: ; 60b48 (18:4b48) call UpdateSprites ld a, $f0 ld [wJoyIgnore], a - ld a, [wcf0b] + ld a, [wBattleResult] and a jr nz, .asm_60b82 ld hl, wd768 @@ -73,12 +73,12 @@ PokemonTower6Script4: ; 60b48 (18:4b48) ret .asm_60b82 ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $10 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a xor a ld [wSpriteStateData2 + $06], a - ld [wcd3b], a + ld [wOverrideSimulatedJoypadStatesMask], a ld hl, wd730 set 7, [hl] ld a, $3 @@ -87,7 +87,7 @@ PokemonTower6Script4: ; 60b48 (18:4b48) ret PokemonTower6Script3: ; 60ba1 (18:4ba1) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm index 431855cb69..ab42121d88 100755 --- a/scripts/pokemontower7.asm +++ b/scripts/pokemontower7.asm @@ -14,9 +14,9 @@ PokemonTower7Script_60d18: ; 60d18 (18:4d18) ld [W_CURMAPSCRIPT], a ret -PokemonTower7ScriptPointers: ; 60d23 (18:4d23) +PokemonTower7ScriptPointers: dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw PokemonTower7Script2 dw PokemonTower7Script3 dw PokemonTower7Script4 @@ -30,7 +30,7 @@ PokemonTower7Script2: ; 60d23 (18:4d23) call EndTrainerBattle ld a, $f0 ld [wJoyIgnore], a - ld a, [wcf13] + ld a, [wSpriteIndex] ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID call PokemonTower7Script_60db6 @@ -44,7 +44,7 @@ PokemonTower7Script3: ; 60d56 (18:4d56) bit 0, a ret nz ld hl, W_MISSABLEOBJECTLIST - ld a, [wcf13] + ld a, [wSpriteIndex] ld b, a .missableObjectsListLoop ld a, [hli] @@ -55,7 +55,7 @@ PokemonTower7Script3: ; 60d56 (18:4d56) predef HideObject xor a ld [wJoyIgnore], a - ld [wcf13], a + ld [wSpriteIndex], a ld [wTrainerHeaderFlagBit], a ld [wda38], a ld a, $0 @@ -66,15 +66,15 @@ PokemonTower7Script3: ; 60d56 (18:4d56) PokemonTower7Script4: ; 60d86 (18:4d86) ld a, $ff ld [wJoyIgnore], a - ld a, $43 + ld a, HS_POKEMONTOWER_7_MR_FUJI ld [wcc4d], a predef HideObject ld a, $4 ld [wSpriteStateData1 + 9], a - ld a, $95 + ld a, LAVENDER_HOUSE_1 ld [H_DOWNARROWBLINKCNT1], a ; $ff8b ld a, $1 - ld [wd42f], a + ld [wDestinationWarpID], a ld a, LAVENDER_TOWN ld [wLastMap], a ld hl, wd72d @@ -86,7 +86,7 @@ PokemonTower7Script4: ; 60d86 (18:4d86) PokemonTower7Script_60db6: ; 60db6 (18:4db6) ld hl, CoordsData_60de3 ; $4de3 - ld a, [wcf13] + ld a, [wSpriteIndex] dec a swap a ld d, $0 @@ -106,7 +106,7 @@ PokemonTower7Script_60db6: ; 60db6 (18:4db6) ld a, [hli] ld d, [hl] ld e, a - ld a, [wcf13] + ld a, [wSpriteIndex] ld [H_DOWNARROWBLINKCNT2], a ; $ff8c jp MoveSprite .asm_60dde @@ -164,7 +164,7 @@ PokemonTower7TextPointers: ; 60e3f (18:4e3f) dw PokemonTower7Text1 dw PokemonTower7Text2 dw PokemonTower7Text3 - dw PokemonTower7Text4 + dw PokemonTower7FujiText PokemonTower7TrainerHeaders: ; 60e47 (18:4e47) PokemonTower7TrainerHeader0: ; 60e47 (18:4e47) @@ -214,21 +214,21 @@ PokemonTower7Text3: ; 60e80 (18:4e80) call TalkToTrainer jp TextScriptEnd -PokemonTower7Text4: ; 60e8a (18:4e8a) - db $08 ; asm - ld hl, PokemonTower7Text_60ec4 +PokemonTower7FujiText: + db 8 ; asm + ld hl, TowerRescueFujiText call PrintText ld hl, wd7e0 set 7, [hl] ld hl, wd769 set 7, [hl] - ld a, $44 + ld a, HS_LAVENDER_HOUSE_1_MR_FUJI ld [wcc4d], a predef ShowObject - ld a, $17 + ld a, HS_SAFFRON_CITY_E ld [wcc4d], a predef HideObject - ld a, $18 + ld a, HS_SAFFRON_CITY_F ld [wcc4d], a predef ShowObject ld a, $4 @@ -236,8 +236,8 @@ PokemonTower7Text4: ; 60e8a (18:4e8a) ld [W_CURMAPSCRIPT], a jp TextScriptEnd -PokemonTower7Text_60ec4: ; 60ec4 (18:4ec4) - TX_FAR _PokemonTower7Text_60ec4 +TowerRescueFujiText: + TX_FAR _TowerRescueFujiText db "@" PokemonTower7BattleText1: ; 60ec9 (18:4ec9) diff --git a/scripts/powerplant.asm b/scripts/powerplant.asm index b90ba7a1c2..ec4f89b3e6 100755 --- a/scripts/powerplant.asm +++ b/scripts/powerplant.asm @@ -9,7 +9,7 @@ PowerPlantScript: ; 1e2c6 (7:62c6) PowerPlantScriptPointers: ; 1e2d9 (7:62d9) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle PowerPlantTextPointers: ; 1e2df (7:62df) diff --git a/scripts/redshouse1f.asm b/scripts/redshouse1f.asm index 0e3e331b2f..7b3f1f8744 100755 --- a/scripts/redshouse1f.asm +++ b/scripts/redshouse1f.asm @@ -25,7 +25,7 @@ MomWakeUpText: ; 48185 (12:4185) MomHealPokemon: ; 4818a (12:418a) ld hl, MomHealText1 call PrintText - call GBFadeOut2 + call GBFadeOutToWhite call ReloadMapData predef HealParty ld a, MUSIC_PKMN_HEALED @@ -38,7 +38,7 @@ MomHealPokemon: ; 4818a (12:418a) ld a, [wd35b] ld [wc0ee], a call PlaySound - call GBFadeIn2 + call GBFadeInFromWhite ld hl, MomHealText2 jp PrintText diff --git a/scripts/rockethideout1.asm b/scripts/rockethideout1.asm index 43e4fd2669..499f77ef03 100755 --- a/scripts/rockethideout1.asm +++ b/scripts/rockethideout1.asm @@ -30,11 +30,11 @@ RocketHideout1Script_44be0: ; 44be0 (11:4be0) .asm_44c03 ld [wd09f], a ld bc, $080c - predef_jump Func_ee9e + predef_jump ReplaceTileBlock RocketHideout1ScriptPointers: ; 44c0e (11:4c0e) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle RocketHideout1TextPointers: ; 44c14 (11:4c14) diff --git a/scripts/rockethideout2.asm b/scripts/rockethideout2.asm index aa8d31a4f5..9975465831 100755 --- a/scripts/rockethideout2.asm +++ b/scripts/rockethideout2.asm @@ -9,7 +9,7 @@ RocketHideout2Script: ; 44e27 (11:4e27) RocketHideout2ScriptPointers: ; 44e3a (11:4e3a) dw RocketHideout2Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw RocketHideout2Script3 @@ -19,12 +19,12 @@ RocketHideout2Script0: ; 44e42 (11:4e42) ld a, [W_XCOORD] ld c, a ld hl, RocketHideout2ArrowTilePlayerMovement - call Func_3442 + call DecodeArrowMovementRLE cp $ff jp z, CheckFightingMapTrainers ld hl, wd736 set 7, [hl] - call Func_3486 + call StartSimulatingJoypadStates ld a, (SFX_02_52 - SFX_Headers_02) / 3 call PlaySound ld a, $ff @@ -306,7 +306,7 @@ RocketHideout2ArrowMovement36: ; 44fbb (11:4fbb) db $FF RocketHideout2Script3: ; 44fc2 (11:4fc2) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a jr nz, LoadSpinnerArrowTiles xor a @@ -333,7 +333,7 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7) jr z, .asm_44ff6 ld hl, GymSpinnerArrows ; $5053 .asm_44ff6 - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] bit 0, a jr nz, .asm_45001 ld de, $18 diff --git a/scripts/rockethideout3.asm b/scripts/rockethideout3.asm index e3223a85e9..6dc467ab42 100755 --- a/scripts/rockethideout3.asm +++ b/scripts/rockethideout3.asm @@ -9,7 +9,7 @@ RocketHideout3Script: ; 45225 (11:5225) RocketHideout3ScriptPointers: ; 45238 (11:5238) dw RocketHideout3Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw RocketHideout3Script3 @@ -19,12 +19,12 @@ RocketHideout3Script0: ; 45240 (11:5240) ld a, [W_XCOORD] ld c, a ld hl, RocketHideout3ArrowTilePlayerMovement - call Func_3442 + call DecodeArrowMovementRLE cp $ff jp z, CheckFightingMapTrainers ld hl, wd736 set 7, [hl] - call Func_3486 + call StartSimulatingJoypadStates ld a, (SFX_02_52 - SFX_Headers_02) / 3 call PlaySound ld a, $ff @@ -136,7 +136,7 @@ RocketHideout3ArrowMovement12: ; 452e1 (11:52e1) db $FF RocketHideout3Script3 ; 452e4 (11:452e4) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a jp nz, LoadSpinnerArrowTiles xor a diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm index 5c99f3a12f..f1b466536c 100755 --- a/scripts/rockethideout4.asm +++ b/scripts/rockethideout4.asm @@ -31,7 +31,7 @@ RocketHideout4Script_45473: ; 45473 (11:5473) .asm_45498 ld [wd09f], a ld bc, $050c - predef_jump Func_ee9e + predef_jump ReplaceTileBlock RocketHideout4Script_454a3: ; 454a3 (11:54a3) xor a @@ -42,7 +42,7 @@ RocketHideout4Script_454a3: ; 454a3 (11:54a3) RocketHideout4ScriptPointers: ; 454ae (11:54ae)c dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw RocketHideout4Script3 @@ -58,15 +58,15 @@ RocketHideout4Script3: ; 454b6 (11:54b6) ld a, $a ld [H_SPRITEHEIGHT], a call DisplayTextID - call GBFadeIn1 - ld a, $83 + call GBFadeOutToBlack + ld a, HS_ROCKET_HIDEOUT_4_GIOVANNI ld [wcc4d], a predef HideObject - ld a, $87 + ld a, HS_ROCKET_HIDEOUT_4_ITEM_4 ld [wcc4d], a predef ShowObject call UpdateSprites - call GBFadeOut1 + call GBFadeInFromBlack xor a ld [wJoyIgnore], a ld hl, wd126 @@ -130,9 +130,9 @@ RocketHideout4Text1: ; 4553a (11:553a) set 7, [hl] ld hl, RocketHideout4Text_4557f ld de, RocketHideout4Text_4557f - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a @@ -217,7 +217,7 @@ RocketHideout4AfterBattleText4: ; 455cf (11:55cf) bit 6, [hl] set 6, [hl] jr nz, .asm_455e9 ; 0x455dd $a - ld a, $88 + ld a, HS_ROCKET_HIDEOUT_4_ITEM_5 ld [wcc4d], a predef ShowObject .asm_455e9 diff --git a/scripts/rockethideoutelevator.asm b/scripts/rockethideoutelevator.asm index 73313dd79a..e7bc24f3d5 100755 --- a/scripts/rockethideoutelevator.asm +++ b/scripts/rockethideoutelevator.asm @@ -9,13 +9,13 @@ RocketHideoutElevatorScript: ; 45710 (11:5710) res 7, [hl] call nz, RocketHideoutElevatorScript_4575f xor a - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a inc a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret RocketHideoutElevatorScript_4572c: ; 4572c (11:572c) - ld hl, wd3af + ld hl, wWarpEntries ld a, [wd73b] ld b, a ld a, [wd73c] diff --git a/scripts/rocktunnel1.asm b/scripts/rocktunnel1.asm index ad6e493f67..1d514a051d 100755 --- a/scripts/rocktunnel1.asm +++ b/scripts/rocktunnel1.asm @@ -9,7 +9,7 @@ RockTunnel1Script: ; 444dc (11:44dc) RockTunnel1ScriptPointers: ; 444ef (11:44ef) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle RockTunnel1TextPointers: ; 444f5 (11:44f5) diff --git a/scripts/rocktunnel2.asm b/scripts/rocktunnel2.asm index a35a7325bc..98b804a7c2 100755 --- a/scripts/rocktunnel2.asm +++ b/scripts/rocktunnel2.asm @@ -9,7 +9,7 @@ RockTunnel2Script: ; 45feb (11:5feb) RockTunnel2ScriptPointers: ; 45ffe (11:5ffe) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle RockTunnel2TextPointers: ; 46004 (11:6004) diff --git a/scripts/rocktunnelpokecenter.asm b/scripts/rocktunnelpokecenter.asm index 62336edcae..5e822bca8e 100755 --- a/scripts/rocktunnelpokecenter.asm +++ b/scripts/rocktunnelpokecenter.asm @@ -1,5 +1,5 @@ RockTunnelPokecenterScript: ; 493ba (12:53ba) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing RockTunnelPokecenterTextPointers: ; 493c0 (12:53c0) diff --git a/scripts/route10.asm b/scripts/route10.asm index e5e0dec248..c587b1df81 100755 --- a/scripts/route10.asm +++ b/scripts/route10.asm @@ -9,7 +9,7 @@ Route10Script: ; 59336 (16:5336) Route10ScriptPointers: ; 59349 (16:5349) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route10TextPointers: ; 5934f (16:534f) diff --git a/scripts/route11.asm b/scripts/route11.asm index fb50937e35..629a6efd9a 100755 --- a/scripts/route11.asm +++ b/scripts/route11.asm @@ -9,7 +9,7 @@ Route11Script: ; 5944c (16:544c) Route11ScriptPointers: ; 5945f (16:545f) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route11TextPointers: ; 59465 (16:5465) diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm index 5c0cc574e0..d87409867f 100755 --- a/scripts/route11gateupstairs.asm +++ b/scripts/route11gateupstairs.asm @@ -11,7 +11,7 @@ Route11GateUpstairsText1: ; 4945f (12:545f) db $08 ; asm xor a ld [wWhichTrade], a - predef Predef54 + predef DoInGameTradeDialogue asm_49469: ; 49469 (12:5469) jp TextScriptEnd diff --git a/scripts/route12.asm b/scripts/route12.asm index b7ec451a9d..fdaf2a85cd 100755 --- a/scripts/route12.asm +++ b/scripts/route12.asm @@ -16,7 +16,7 @@ Route12Script_59606: ; 59606 (16:5606) Route12ScriptPointers: ; 59611 (16:5611) dw Route12Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw Route12Script3 @@ -34,7 +34,7 @@ Route12Script0: ; 59619 (16:5619) ld [W_CUROPPONENT], a ; wd059 ld a, 30 ld [W_CURENEMYLVL], a ; W_CURENEMYLVL - ld a, $1d + ld a, HS_ROUTE_12_SNORLAX ld [wcc4d], a predef HideObject ld a, $3 @@ -47,7 +47,7 @@ Route12Script3: ; 5964c (16:564c) cp $ff jr z, Route12Script_59606 call UpdateSprites - ld a, [wcf0b] + ld a, [wBattleResult] cp $2 jr z, .asm_59664 ld a, $e diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm index 94a4f9a21e..c4c05cd69b 100755 --- a/scripts/route12gateupstairs.asm +++ b/scripts/route12gateupstairs.asm @@ -75,5 +75,5 @@ Route12GateUpstairsScript_495c9: ; 495c9 (12:55c9) call PrintText xor a .asm_495d8 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a jp TextScriptEnd diff --git a/scripts/route13.asm b/scripts/route13.asm index b78b7cb241..21862dfc09 100755 --- a/scripts/route13.asm +++ b/scripts/route13.asm @@ -9,7 +9,7 @@ Route13Script: ; 5581e (15:581e) Route13ScriptPointers: ; 55831 (15:5831) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route13TextPointers: ; 55837 (15:5837) diff --git a/scripts/route14.asm b/scripts/route14.asm index 9d8d8fcb7d..d430f85890 100755 --- a/scripts/route14.asm +++ b/scripts/route14.asm @@ -9,7 +9,7 @@ Route14Script: ; 559d3 (15:59d3) Route14ScriptPointers: ; 559e6 (15:59e6) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route14TextPointers: ; 559ec (15:59ec) diff --git a/scripts/route15.asm b/scripts/route15.asm index 789ace2101..733d4a1cc1 100755 --- a/scripts/route15.asm +++ b/scripts/route15.asm @@ -9,7 +9,7 @@ Route15Script: ; 597ae (16:57ae) Route15ScriptPointers: ; 597c1 (16:57c1) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route15TextPointers: ; 597c7 (16:57c7) diff --git a/scripts/route16.asm b/scripts/route16.asm index 01bd35ad83..ef5b5859ba 100755 --- a/scripts/route16.asm +++ b/scripts/route16.asm @@ -16,7 +16,7 @@ Route16Script_59946: ; 59946 (16:5946) Route16ScriptPointers: ; 59951 (16:5951) dw Route16Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw Route16Script3 @@ -34,7 +34,7 @@ Route16Script0: ; 59959 (16:5959) ld [W_CUROPPONENT], a ; wd059 ld a, 30 ld [W_CURENEMYLVL], a ; W_CURENEMYLVL - ld a, $21 + ld a, HS_ROUTE_16_SNORLAX ld [wcc4d], a predef HideObject call UpdateSprites @@ -48,7 +48,7 @@ Route16Script3: ; 5998f (16:598f) cp $ff jp z, Route16Script_59946 call UpdateSprites - ld a, [wcf0b] + ld a, [wBattleResult] cp $2 jr z, .asm_599a8 ld a, $b diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm index e7179ea7ae..54bca41360 100755 --- a/scripts/route16gate.asm +++ b/scripts/route16gate.asm @@ -28,13 +28,13 @@ Route16GateScript0: ; 496d7 (12:56d7) jr z, .asm_4970e ; 0x496f1 $1b ld a, [wWhichTrade] dec a - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld b, $0 ld c, a ld a, $40 - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd call FillMemory - call Func_3486 + call StartSimulatingJoypadStates ld a, $1 ld [W_ROUTE16GATECURSCRIPT], a ret @@ -51,7 +51,7 @@ CoordsData_49714: ; 49714 (12:5714) db $FF Route16GateScript1: ; 4971d (12:571d) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $f0 @@ -62,16 +62,16 @@ Route16GateScript2: ; 49727 (12:5727) ld [H_SPRITEHEIGHT], a call DisplayTextID ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $10 - ld [wccd3], a - call Func_3486 + ld [wSimulatedJoypadStatesEnd], a + call StartSimulatingJoypadStates ld a, $3 ld [W_ROUTE16GATECURSCRIPT], a ret Route16GateScript3: ; 49741 (12:5741) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a diff --git a/scripts/route17.asm b/scripts/route17.asm index 78ceb2ae7e..ffd006346c 100755 --- a/scripts/route17.asm +++ b/scripts/route17.asm @@ -9,7 +9,7 @@ Route17Script: ; 55b7a (15:5b7a) Route17ScriptPointers: ; 55b8d (15:5b8d) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route17TextPointers: ; 55b93 (15:5b93) diff --git a/scripts/route18.asm b/scripts/route18.asm index a0e4487aad..de2fe19a99 100755 --- a/scripts/route18.asm +++ b/scripts/route18.asm @@ -9,7 +9,7 @@ Route18Script: ; 59ac7 (16:5ac7) Route18ScriptPointers: ; 59ada (16:5ada) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route18TextPointers: ; 59ae0 (16:5ae0) diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm index 03c4b9218c..1500f5789d 100755 --- a/scripts/route18gate.asm +++ b/scripts/route18gate.asm @@ -28,13 +28,13 @@ Route18GateScript0: ; 4988f (12:588f) jr z, .asm_498c6 ; 0x498a9 $1b ld a, [wWhichTrade] dec a - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld b, $0 ld c, a ld a, $40 - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd call FillMemory - call Func_3486 + call StartSimulatingJoypadStates ld a, $1 ld [W_ROUTE18GATECURSCRIPT], a ret @@ -51,7 +51,7 @@ CoordsData_498cc: ; 498cc (12:58cc) db $FF Route18GateScript1: ; 498d5 (12:58d5) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $f0 @@ -62,16 +62,16 @@ Route18GateScript2: ; 498df (12:58df) ld [H_SPRITEHEIGHT], a call DisplayTextID ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $10 - ld [wccd3], a - call Func_3486 + ld [wSimulatedJoypadStatesEnd], a + call StartSimulatingJoypadStates ld a, $3 ld [W_ROUTE18GATECURSCRIPT], a ret Route18GateScript3: ; 498f9 (12:58f9) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a diff --git a/scripts/route18gateupstairs.asm b/scripts/route18gateupstairs.asm index 9db16aeb72..aaa1b34ea3 100755 --- a/scripts/route18gateupstairs.asm +++ b/scripts/route18gateupstairs.asm @@ -10,7 +10,7 @@ Route18GateUpstairsText1: ; 4997e (12:597e) db $08 ; asm ld a, $5 ld [wWhichTrade], a - predef Predef54 + predef DoInGameTradeDialogue jp TextScriptEnd Route18GateUpstairsText2: ; 4998c (12:598c) diff --git a/scripts/route19.asm b/scripts/route19.asm index 6c749b0375..40c7aeb324 100755 --- a/scripts/route19.asm +++ b/scripts/route19.asm @@ -9,7 +9,7 @@ Route19Script: ; 55d44 (15:5d44) Route19ScriptPointers: ; 55d57 (15:5d57) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route19TextPointers: ; 55d5d (15:5d5d) diff --git a/scripts/route20.asm b/scripts/route20.asm index 7e8df3dac8..4ef57e232e 100755 --- a/scripts/route20.asm +++ b/scripts/route20.asm @@ -31,20 +31,26 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6) jr .asm_50cdc .MissableObjectIDs: ; 50ce8 (14:4ce8) - db $D9,$DA,$DB,$DC,$DF,$E0,$FF + db HS_SEAFOAM_ISLANDS_2_BOULDER_1 + db HS_SEAFOAM_ISLANDS_2_BOULDER_2 + db HS_SEAFOAM_ISLANDS_3_BOULDER_1 + db HS_SEAFOAM_ISLANDS_3_BOULDER_2 + db HS_SEAFOAM_ISLANDS_4_BOULDER_3 + db HS_SEAFOAM_ISLANDS_4_BOULDER_4 + db $FF .asm_50cef ld a, [wd881] and $3 cp $3 ret z - ld a, $dd + ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1 call Route20Script_50d0c - ld a, $de + ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2 call Route20Script_50d0c - ld a, $e1 + ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1 call Route20Script_50d14 - ld a, $e2 + ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_2 call Route20Script_50d14 ret @@ -58,7 +64,7 @@ Route20Script_50d14: ; 50d14 (14:4d14) Route20ScriptPointers: ; 50d1c (14:4d1c) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route20TextPointers: ; 50d22 (14:4d22) diff --git a/scripts/route21.asm b/scripts/route21.asm index 034282f881..de2046dc81 100755 --- a/scripts/route21.asm +++ b/scripts/route21.asm @@ -9,7 +9,7 @@ Route21Script: ; 55eeb (15:5eeb) Route21ScriptPointers: ; 55efe (15:5efe) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route21TextPointers: ; 55f04 (15:5f04) diff --git a/scripts/route22.asm b/scripts/route22.asm index aba6a479f7..9181380aaa 100755 --- a/scripts/route22.asm +++ b/scripts/route22.asm @@ -45,7 +45,7 @@ Route22MoveRivalSprite: ; 50ee6 (14:4ee6) call MoveSprite ld a, $c ld [$ff8d], a - jp Func_34a6 + jp SetSpriteFacingDirectionAndDelay Route22RivalMovementData: ; 50efb (14:4efb) db $C0,$C0,$C0,$C0,$FF ; move right 4 times @@ -83,7 +83,7 @@ Route22Script0: ; 50f00 (14:4f00) xor a ld [wcd50], a predef EmotionBubble - ld a, [wd700] + ld a, [wWalkBikeSurfState] and a jr z, .asm_50f4e ; 0x50f44 $8 ld a, $ff @@ -117,7 +117,7 @@ Route22Script1: ; 50f62 (14:4f62) ld [$ff8d], a ld a, $1 ld [$ff8c], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $1 @@ -128,7 +128,7 @@ Route22Script1: ; 50f62 (14:4f62) set 7, [hl] ld hl, Route22RivalDefeatedText1 ld de, Route22Text_511bc - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, SONY1 + $c8 ld [W_CUROPPONENT], a ld hl, StarterMons_50faf ; $4faf @@ -158,7 +158,7 @@ Route22Script2: ; 50fb5 (14:4fb5) ld [$ff8d], a ld a, $1 ld [$ff8c], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a ld hl, wd7eb @@ -205,10 +205,10 @@ Route22Script3: ; 5102a (14:502a) ret nz xor a ld [wJoyIgnore], a - ld a, $22 + ld a, HS_ROUTE_22_RIVAL_1 ld [wcc4d], a predef HideObject - call Func_2307 + call PlayDefaultMusic ld hl, wd7eb res 0, [hl] res 7, [hl] @@ -222,7 +222,7 @@ Route22Script_5104e: ; 5104e (14:504e) xor a ld [wcd50], a predef EmotionBubble - ld a, [wd700] + ld a, [wWalkBikeSurfState] and a jr z, .skipYVisibilityTesta ld a, $ff @@ -259,7 +259,7 @@ Route22Script4: ; 51087 (14:5087) ld a, $c .asm_510a8 ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $2 @@ -270,7 +270,7 @@ Route22Script4: ; 51087 (14:5087) set 7, [hl] ld hl, Route22RivalDefeatedText2 ; $51cb ld de, Route22Text_511d0 ; $51d0 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, SONY2 + $c8 ld [W_CUROPPONENT], a ; wd059 ld hl, StarterMons_510d9 ; $50d9 @@ -303,7 +303,7 @@ Route22Script5: ; 510df (14:50df) ld a, $c .asm_51102 ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a ld hl, wd7eb @@ -350,10 +350,10 @@ Route22Script6: ; 51151 (14:5151) ret nz xor a ld [wJoyIgnore], a - ld a, $23 + ld a, HS_ROUTE_22_RIVAL_2 ld [wcc4d], a predef HideObject - call Func_2307 + call PlayDefaultMusic ld hl, wd7eb res 1, [hl] res 7, [hl] diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm index 107926cf7b..6618d6a2ce 100755 --- a/scripts/route22gate.asm +++ b/scripts/route22gate.asm @@ -34,15 +34,15 @@ Route22GateScriptCoords: ; 1e6b5 (7:66b5) Route22GateScript_1e6ba: ; 1e6ba (7:66ba) ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $80 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a - jp Func_3486 + jp StartSimulatingJoypadStates Route22GateScript1: ; 1e6cd (7:66cd) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a diff --git a/scripts/route23.asm b/scripts/route23.asm index 5518460020..6d3849f415 100755 --- a/scripts/route23.asm +++ b/scripts/route23.asm @@ -16,10 +16,10 @@ Route23Script_511e9: ; 511e9 (14:51e9) ld hl, wd813 res 0, [hl] res 6, [hl] - ld a, $7a + ld a, HS_VICTORY_ROAD_3_BOULDER ld [wcc4d], a predef ShowObject - ld a, $60 + ld a, HS_VICTORY_ROAD_2_BOULDER ld [wcc4d], a predef_jump HideObject @@ -118,16 +118,16 @@ CascadeBadgeText: ; 512cb (14:52cb) Route23Script_512d8: ; 512d8 (14:52d8) ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $80 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a xor a ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a - jp Func_3486 + jp StartSimulatingJoypadStates Route23Script1: ; 512ec (14:52ec) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz Route23Script2: ; 512f1 (14:52f1) diff --git a/scripts/route24.asm b/scripts/route24.asm index cafb3f8ead..6916cbe724 100755 --- a/scripts/route24.asm +++ b/scripts/route24.asm @@ -16,7 +16,7 @@ Route24Script_513c0: ; 513c0 (14:53c0) Route24ScriptPointers: ; 513cb (14:53cb) dw Route24Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw Route24Script3 dw Route24Script4 @@ -38,10 +38,10 @@ Route24Script0: ; 513d5 (14:53d5) res 1, [hl] ret z ld a, $80 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $4 ld [W_ROUTE24CURSCRIPT], a ld [W_CURMAPSCRIPT], a @@ -51,7 +51,7 @@ CoordsData_5140e: ; 5140e (14:540e) db $0F,$0A,$FF Route24Script4: ; 51411 (14:5411) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 @@ -169,9 +169,9 @@ Route24Text1: ; 514a4 (14:54a4) set 7, [hl] ld hl, Route24Text_5152b ld de, Route24Text_5152b - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, [$ff8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a diff --git a/scripts/route25.asm b/scripts/route25.asm index 088be3a292..b915bdeeda 100755 --- a/scripts/route25.asm +++ b/scripts/route25.asm @@ -19,26 +19,26 @@ Route25Script_515e1: ; 515e1 (14:55e1) bit 5, [hl] jr nz, .asm_515ff res 6, [hl] - ld a, $61 + ld a, HS_BILL_POKEMON ld [wcc4d], a predef_jump ShowObject .asm_515ff bit 4, [hl] ret z set 7, [hl] - ld a, $24 + ld a, HS_NUGGET_BRIDGE_GUY ld [wcc4d], a predef HideObject - ld a, $62 + ld a, HS_BILL_1 ld [wcc4d], a predef HideObject - ld a, $63 + ld a, HS_BILL_2 ld [wcc4d], a predef_jump ShowObject Route25ScriptPointers: ; 51622 (14:5622) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route25TextPointers: ; 51628 (14:5628) diff --git a/scripts/route2house.asm b/scripts/route2house.asm index 75da399b65..ba13605bef 100755 --- a/scripts/route2house.asm +++ b/scripts/route2house.asm @@ -13,5 +13,5 @@ Route2HouseText2: ; 1def9 (7:5ef9) db $08 ; asm ld a, $1 ld [wWhichTrade], a - predef Predef54 + predef DoInGameTradeDialogue jp TextScriptEnd diff --git a/scripts/route3.asm b/scripts/route3.asm index 5cd35fd97c..acb2afce85 100755 --- a/scripts/route3.asm +++ b/scripts/route3.asm @@ -9,7 +9,7 @@ Route3Script: ; 554f8 (15:54f8) Route3ScriptPointers: ; 5550b (15:550b) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route3TextPointers: ; 55511 (15:5511) diff --git a/scripts/route4.asm b/scripts/route4.asm index fa23459058..5eafb4f725 100755 --- a/scripts/route4.asm +++ b/scripts/route4.asm @@ -9,7 +9,7 @@ Route4Script: ; 55658 (15:5658) Route4ScriptPointers: ; 5566b (15:566b) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route4TextPointers: ; 55671 (15:5671) diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm index d7abeff5ab..bee70e774d 100755 --- a/scripts/route5gate.asm +++ b/scripts/route5gate.asm @@ -10,10 +10,10 @@ Route5GateScriptPointers: ; 1df3f (7:5f3f) Route5GateScript_1df43: ; 1df43 (7:5f43) ld a, $40 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a - jp Func_3486 + ld [wSimulatedJoypadStatesIndex], a + jp StartSimulatingJoypadStates Route5GateScript0: ; 1df50 (7:5f50) ld a, [wd728] @@ -27,11 +27,11 @@ Route5GateScript0: ; 1df50 (7:5f50) xor a ld [hJoyHeld], a callba RemoveGuardDrink - ld a, [$ff00+$db] + ld a, [$ffdb] and a jr nz, .asm_1df82 ; 0x1df70 $10 ld a, $2 - ld [$ff00+$8c], a + ld [$ff8c], a call DisplayTextID call Route5GateScript_1df43 ld a, $1 @@ -39,7 +39,7 @@ Route5GateScript0: ; 1df50 (7:5f50) ret .asm_1df82 ld a, $3 - ld [$ff00+$8c], a + ld [$ff8c], a call DisplayTextID ld hl, wd728 set 6, [hl] @@ -51,7 +51,7 @@ CoordsData_1df8f: ; 1df8f (7:5f8f) db $ff Route5GateScript1: ; 1df94 (7:5f94) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 @@ -74,7 +74,7 @@ Route5GateText1: ; 1dfaa (7:5faa) bit 6, a jr nz, .asm_88856 ; 0x1dfb0 $2c callba RemoveGuardDrink - ld a, [$ff00+$db] + ld a, [$ffdb] and a jr nz, .asm_768a2 ; 0x1dfbd $11 ld hl, Route5GateText2 diff --git a/scripts/route6.asm b/scripts/route6.asm index 018c1b806a..ee6258cd74 100755 --- a/scripts/route6.asm +++ b/scripts/route6.asm @@ -9,7 +9,7 @@ Route6Script: ; 590b0 (16:50b0) Route6ScriptPointers: ; 590c3 (16:50c3) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route6TextPointers: ; 590c9 (16:50c9) diff --git a/scripts/route6gate.asm b/scripts/route6gate.asm index 9945f80f3e..44d03a757c 100755 --- a/scripts/route6gate.asm +++ b/scripts/route6gate.asm @@ -43,7 +43,7 @@ CoordsData_1e08c: ; 1e08c (7:608c) db $02,$04,$FF Route6GateScript1: ; 1e091 (7:6091) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 @@ -56,12 +56,12 @@ Route6GateScript_1e0a1: ; 1e0a1 (7:60a1) ld hl, wd730 set 7, [hl] ld a, $80 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a xor a ld [wSpriteStateData2 + $06], a - ld [wcd3b], a + ld [wOverrideSimulatedJoypadStatesMask], a ret Route6GateTextPointers: ; 1e0b8 (7:60b8) diff --git a/scripts/route7gate.asm b/scripts/route7gate.asm index c959970621..beab96bf47 100755 --- a/scripts/route7gate.asm +++ b/scripts/route7gate.asm @@ -13,12 +13,12 @@ Route7GateScript_1e111: ; 1e111 (7:6111) ld hl, wd730 set 7, [hl] ld a, $20 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a xor a ld [wSpriteStateData2 + $06], a - ld [wcd3b], a + ld [wOverrideSimulatedJoypadStatesMask], a ret Route7GateScript0: ; 1e128 (7:6128) @@ -57,7 +57,7 @@ CoordsData_1e167: ; 1e167 (7:6167) db $ff Route7GateScript1: ; 1e16c (7:616c) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/route8.asm b/scripts/route8.asm index bf41b5ae75..eed57c7bbf 100755 --- a/scripts/route8.asm +++ b/scripts/route8.asm @@ -9,7 +9,7 @@ Route8Script: ; 591b6 (16:51b6) Route8ScriptPointers: ; 591c9 (16:51c9) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route8TextPointers: ; 591cf (16:51cf) diff --git a/scripts/route8gate.asm b/scripts/route8gate.asm index aff001b464..8ea12f0418 100755 --- a/scripts/route8gate.asm +++ b/scripts/route8gate.asm @@ -12,12 +12,12 @@ Route8GateScript_1e1d7: ; 1e1d7 (7:61d7) ld hl, wd730 set 7, [hl] ld a, $10 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a xor a ld [wSpriteStateData2 + $06], a - ld [wcd3b], a + ld [wOverrideSimulatedJoypadStatesMask], a ret Route8GateScript0: ; 1e1ee (7:61ee) @@ -55,7 +55,7 @@ CoordsData_1e22c: ; 1e22c (7:622c) db $ff Route8GateScript1: ; 1e231 (7:6231) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/route9.asm b/scripts/route9.asm index f14abef88f..77b216c633 100755 --- a/scripts/route9.asm +++ b/scripts/route9.asm @@ -9,7 +9,7 @@ Route9Script: ; 556bc (15:56bc) Route9ScriptPointers: ; 556cf (15:56cf) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle Route9TextPointers: ; 556d5 (15:56d5) diff --git a/scripts/safarizoneentrance-yellow.asm b/scripts/safarizoneentrance-yellow.asm new file mode 100644 index 0000000000..c43430953b --- /dev/null +++ b/scripts/safarizoneentrance-yellow.asm @@ -0,0 +1,256 @@ +.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 ffc7f40202..294dcf58b5 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -5,16 +5,16 @@ SafariZoneEntranceScript: ; 751cd (1d:51cd) jp CallFunctionInTable SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) - dw SafariZoneEntranceScript0 - dw SafariZoneEntranceScript1 - dw SafariZoneEntranceScript2 - dw SafariZoneEntranceScript3 - dw SafariZoneEntranceScript4 - dw SafariZoneEntranceScript5 - dw SafariZoneEntranceScript6 + dw .SafariZoneEntranceScript0 + dw .SafariZoneEntranceScript1 + dw .SafariZoneEntranceScript2 + dw .SafariZoneEntranceScript3 + dw .SafariZoneEntranceScript4 + dw .SafariZoneEntranceScript5 + dw .SafariZoneEntranceScript6 -SafariZoneEntranceScript0: ; 751e7 (1d:51e7) - ld hl, CoordsData_75221 +.SafariZoneEntranceScript0 + ld hl, .CoordsData_75221 call ArePlayerCoordsInArray ret nc ld a, $3 @@ -35,22 +35,22 @@ SafariZoneEntranceScript0: ; 751e7 (1d:51e7) .asm_7520f ld a, $10 ld c, $1 - call SafariZoneEntranceScript_752a3 + call SafariZoneEntranceAutoWalk ld a, $f0 ld [wJoyIgnore], a ld a, $1 ld [W_SAFARIZONEENTRANCECURSCRIPT], a ret -CoordsData_75221: ; 75221 (1d:5221) +.CoordsData_75221: ; 75221 (1d:5221) db $02,$03 db $02,$04 db $FF -SafariZoneEntranceScript1: ; 75226 (1d:5226) +.SafariZoneEntranceScript1 call SafariZoneEntranceScript_752b4 ret nz -SafariZoneEntranceScript2: ; 7522a (1d:522a) +.SafariZoneEntranceScript2 xor a ld [hJoyHeld], a ld [wJoyIgnore], a @@ -62,7 +62,7 @@ SafariZoneEntranceScript2: ; 7522a (1d:522a) ld [wJoyIgnore], a ret -SafariZoneEntranceScript3: ; 75240 (1d:5240) +.SafariZoneEntranceScript3 call SafariZoneEntranceScript_752b4 ret nz xor a @@ -71,7 +71,7 @@ SafariZoneEntranceScript3: ; 75240 (1d:5240) ld [W_SAFARIZONEENTRANCECURSCRIPT], a ret -SafariZoneEntranceScript5: ; 7524e (1d:524e) +.SafariZoneEntranceScript5 ld a, $4 ld [wd528], a ld hl, wd790 @@ -89,7 +89,7 @@ SafariZoneEntranceScript5: ; 7524e (1d:524e) ld [W_NUMSAFARIBALLS], a ld a, $80 ld c, $3 - call SafariZoneEntranceScript_752a3 + call SafariZoneEntranceAutoWalk ld a, $4 ld [W_SAFARIZONEENTRANCECURSCRIPT], a jr .asm_75286 ; 0x7527d $7 @@ -100,7 +100,7 @@ SafariZoneEntranceScript5: ; 7524e (1d:524e) .asm_75286 ret -SafariZoneEntranceScript4: ; 75287 (1d:5287) +.SafariZoneEntranceScript4 call SafariZoneEntranceScript_752b4 ret nz xor a @@ -109,7 +109,7 @@ SafariZoneEntranceScript4: ; 75287 (1d:5287) ld [W_SAFARIZONEENTRANCECURSCRIPT], a ret -SafariZoneEntranceScript6: ; 75295 (1d:5295) +.SafariZoneEntranceScript6 call SafariZoneEntranceScript_752b4 ret nz call Delay3 @@ -117,128 +117,127 @@ SafariZoneEntranceScript6: ; 75295 (1d:5295) ld [W_SAFARIZONEENTRANCECURSCRIPT], a ret -SafariZoneEntranceScript_752a3: ; 752a3 (1d:52a3) +SafariZoneEntranceAutoWalk: push af - ld b, $0 - ld a, c - ld [wcd38], a - ld hl, wccd3 + ld b,0 + ld a,c + ld [wSimulatedJoypadStatesIndex],a + ld hl,wSimulatedJoypadStatesEnd pop af call FillMemory - jp Func_3486 + jp StartSimulatingJoypadStates -SafariZoneEntranceScript_752b4: ; 752b4 (1d:52b4) - ld a, [wcd38] +SafariZoneEntranceScript_752b4: + ld a, [wSimulatedJoypadStatesIndex] and a ret SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) - dw SafariZoneEntranceText1 - dw SafariZoneEntranceText2 - dw SafariZoneEntranceText3 - dw SafariZoneEntranceText4 - dw SafariZoneEntranceText5 - dw SafariZoneEntranceText6 + dw .SafariZoneEntranceText1 + dw .SafariZoneEntranceText2 + dw .SafariZoneEntranceText1 + dw .SafariZoneEntranceText4 + dw .SafariZoneEntranceText5 + dw .SafariZoneEntranceText6 -SafariZoneEntranceText3: ; 752c5 (1d:52c5) -SafariZoneEntranceText1: ; 752c5 (1d:52c5) +.SafariZoneEntranceText1 TX_FAR _SafariZoneEntranceText1 db "@" -SafariZoneEntranceText4: ; 752ca (1d:52ca) +.SafariZoneEntranceText4 TX_FAR SafariZoneEntranceText_9e6e4 ; 0x9e6e4 db $8 ld a, $13 - ld [wd125], a + ld [wTextBoxID],a call DisplayTextBoxID call YesNoChoice - ld a, [wCurrentMenuItem] + ld a,[wCurrentMenuItem] and a - jp nz, .asm_75346 + jp nz,.PleaseComeAgain xor a - ld [$ff9f], a - ld a, $5 - ld [$ffa0], a - ld a, $0 - ld [$ffa1], a + ld [$ff9f],a + ld a,$05 + ld [$ffa0],a + ld a,$00 + ld [$ffa1],a call HasEnoughMoney - jr nc, .asm_752f9 ; 0x752ef $8 - ld hl, SafariZoneEntranceText_7536a + jr nc,.success + ld hl,.NotEnoughMoneyText call PrintText - jr .asm_7534c ; 0x752f7 $53 -.asm_752f9 + jr .CantPayWalkDown + +.success xor a - ld [wWhichTrade], a - ld a, $5 - ld [wTrainerEngageDistance], a - ld a, $0 - ld [wTrainerFacingDirection], a - ld hl, wTrainerFacingDirection - ld de, wPlayerMoney + 2 - ld c, $3 + 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, $13 - ld [wd125], a + ld a,$13 + ld [wTextBoxID],a call DisplayTextBoxID - ld hl, SafariZoneEntranceText_7535b + ld hl,.MakePaymentText call PrintText - ld a, $1e - ld [W_NUMSAFARIBALLS], a - ld a, 502 / $100 - ld [wSafariSteps], a + ld a,30 + ld [W_NUMSAFARIBALLS],a + ld a,502 / $100 + ld [wSafariSteps],a ld a, 502 % $100 - ld [wSafariSteps + 1], a - ld a, $40 - ld c, $3 - call SafariZoneEntranceScript_752a3 - ld hl, wd790 - set 7, [hl] - res 6, [hl] - ld a, $3 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a - jr .asm_75358 ; 0x75344 $12 -.asm_75346 - ld hl, SafariZoneEntranceText_75365 + 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 -.asm_7534c - ld a, $80 - ld c, $1 - call SafariZoneEntranceScript_752a3 - ld a, $4 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a -.asm_75358 +.CantPayWalkDown + ld a,$80 + ld c,1 + call SafariZoneEntranceAutoWalk + ld a,4 + ld [W_SAFARIZONEENTRANCECURSCRIPT],a +.done jp TextScriptEnd -SafariZoneEntranceText_7535b: ; 7535b (1d:535b) - TX_FAR SafariZoneEntranceText_9e747 ; 0x9e747 - db $0B - -SafariZoneEntranceText_75360: ; 75360 (1d:5360) +.MakePaymentText + TX_FAR SafariZoneEntranceText_9e747 + db $b TX_FAR _SafariZoneEntranceText_75360 db "@" -SafariZoneEntranceText_75365: ; 75365 (1d:5365) +.PleaseComeAgainText TX_FAR _SafariZoneEntranceText_75365 db "@" -SafariZoneEntranceText_7536a: ; 7536a (1d:536a) +.NotEnoughMoneyText TX_FAR _SafariZoneEntranceText_7536a db "@" -SafariZoneEntranceText5: ; 7536f (1d:536f) +.SafariZoneEntranceText5 TX_FAR SafariZoneEntranceText_9e814 ; 0x9e814 db $8 call YesNoChoice - ld a, [wCurrentMenuItem] + ld a,[wCurrentMenuItem] and a jr nz, .asm_7539c ; 0x7537b $1f - ld hl, SafariZoneEntranceText_753bb + ld hl, .SafariZoneEntranceText_753bb call PrintText xor a ld [wSpriteStateData1 + 9], a ld a, $80 ld c, $3 - call SafariZoneEntranceScript_752a3 + call SafariZoneEntranceAutoWalk ld hl, wd790 res 6, [hl] res 7, [hl] @@ -246,13 +245,13 @@ SafariZoneEntranceText5: ; 7536f (1d:536f) ld [wcf0d], a jr .asm_753b3 ; 0x7539a $17 .asm_7539c - ld hl, SafariZoneEntranceText_753c0 + ld hl, .SafariZoneEntranceText_753c0 call PrintText ld a, $4 ld [wSpriteStateData1 + 9], a ld a, $40 ld c, $1 - call SafariZoneEntranceScript_752a3 + call SafariZoneEntranceAutoWalk ld a, $5 ld [wcf0d], a .asm_753b3 @@ -260,40 +259,40 @@ SafariZoneEntranceText5: ; 7536f (1d:536f) ld [W_SAFARIZONEENTRANCECURSCRIPT], a jp TextScriptEnd -SafariZoneEntranceText_753bb: ; 753bb (1d:53bb) +.SafariZoneEntranceText_753bb TX_FAR _SafariZoneEntranceText_753bb db "@" -SafariZoneEntranceText_753c0: ; 753c0 (1d:53c0) +.SafariZoneEntranceText_753c0 TX_FAR _SafariZoneEntranceText_753c0 db "@" -SafariZoneEntranceText6: ; 753c5 (1d:53c5) +.SafariZoneEntranceText6 TX_FAR _SafariZoneEntranceText_753c5 db "@" -SafariZoneEntranceText2: ; 753ca (1d:53ca) +.SafariZoneEntranceText2 db $08 ; asm - ld hl, SafariZoneEntranceText_753e6 + ld hl,.FirstTimeQuestionText call PrintText call YesNoChoice - ld a, [wCurrentMenuItem] + ld a,[wCurrentMenuItem] and a - ld hl, SafariZoneEntranceText_753f0 - jr nz, .asm_278a6 ; 0x753db - ld hl, SafariZoneEntranceText_753eb -.asm_278a6 ; 0x753e0 + ld hl,.RegularText + jr nz,.Explanation + ld hl,.ExplanationText +.Explanation call PrintText jp TextScriptEnd -SafariZoneEntranceText_753e6: ; 753e6 (1d:53e6) +.FirstTimeQuestionText TX_FAR _SafariZoneEntranceText_753e6 db "@" -SafariZoneEntranceText_753eb: ; 753eb (1d:53eb) +.ExplanationText TX_FAR _SafariZoneEntranceText_753eb db "@" -SafariZoneEntranceText_753f0: ; 753f0 (1d:53f0) +.RegularText TX_FAR _SafariZoneEntranceText_753f0 db "@" diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm index 336d40e9b8..7c2eb5594d 100755 --- a/scripts/saffrongym.asm +++ b/scripts/saffrongym.asm @@ -31,7 +31,7 @@ SaffronGymText_5d048: ; 5d048 (17:5048) SaffronGymScriptPointers: ; 5d053 (17:5053) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw SaffronGymScript3 @@ -178,9 +178,9 @@ SaffronGymText1: ; 5d118 (17:5118) set 7, [hl] ld hl, SaffronGymText_5d167 ld de, SaffronGymText_5d167 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $6 diff --git a/scripts/saffronpokecenter.asm b/scripts/saffronpokecenter.asm index 7f3a656ad6..8f569a8ea1 100755 --- a/scripts/saffronpokecenter.asm +++ b/scripts/saffronpokecenter.asm @@ -1,5 +1,5 @@ SaffronPokecenterScript: ; 5d535 (17:5535) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing SaffronPokecenterTextPointers: ; 5d53b (17:553b) diff --git a/scripts/seafoamislands1.asm b/scripts/seafoamislands1.asm index 55bbd43e8a..2e64c9d7d9 100755 --- a/scripts/seafoamislands1.asm +++ b/scripts/seafoamislands1.asm @@ -14,16 +14,16 @@ SeafoamIslands1Script: ; 447e9 (11:47e9) cp $1 jr nz, .asm_44819 ; 0x44809 $e set 6, [hl] - ld a, $d7 + ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1 ld [wd079], a - ld a, $d9 + ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1 ld [wd07a], a jr .asm_44825 ; 0x44817 $c .asm_44819 set 7, [hl] - ld a, $d8 + ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2 ld [wd079], a - ld a, $da + ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 ld [wd07a], a .asm_44825 ld a, [wd079] @@ -34,7 +34,7 @@ SeafoamIslands1Script: ; 447e9 (11:47e9) predef_jump ShowObject .asm_4483b ld a, $9f - ld [wd71d], a + ld [wDungeonWarpDestinationMap], a ld hl, Seafoam1HolesCoords jp Func_46981 diff --git a/scripts/seafoamislands2.asm b/scripts/seafoamislands2.asm index b14c16d8ff..66fe9297ea 100755 --- a/scripts/seafoamislands2.asm +++ b/scripts/seafoamislands2.asm @@ -12,16 +12,16 @@ SeafoamIslands2Script: ; 46315 (11:6315) cp $1 jr nz, .asm_46340 ; 0x46330 $e set 0, [hl] - ld a, $d9 + ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1 ld [wd079], a - ld a, $db + ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1 ld [wd07a], a jr .asm_4634c ; 0x4633e $c .asm_46340 set 1, [hl] - ld a, $da + ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 ld [wd079], a - ld a, $dc + ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 ld [wd07a], a .asm_4634c ld a, [wd079] @@ -32,7 +32,7 @@ SeafoamIslands2Script: ; 46315 (11:6315) predef_jump ShowObject .asm_46362 ld a, $a0 - ld [wd71d], a + ld [wDungeonWarpDestinationMap], a ld hl, Seafoam2HolesCoords jp Func_46981 diff --git a/scripts/seafoamislands3.asm b/scripts/seafoamislands3.asm index aa7b361587..fb7d05baf6 100755 --- a/scripts/seafoamislands3.asm +++ b/scripts/seafoamislands3.asm @@ -12,16 +12,16 @@ SeafoamIslands3Script: ; 46451 (11:6451) cp $1 jr nz, .asm_4647c ; 0x4646c $e set 0, [hl] - ld a, $db + ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1 ld [wd079], a - ld a, $df + ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_3 ld [wd07a], a jr .asm_46488 ; 0x4647a $c .asm_4647c set 1, [hl] - ld a, $dc + ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 ld [wd079], a - ld a, $e0 + ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_4 ld [wd07a], a .asm_46488 ld a, [wd079] @@ -32,7 +32,7 @@ SeafoamIslands3Script: ; 46451 (11:6451) predef_jump ShowObject .asm_4649e ld a, $a1 - ld [wd71d], a + ld [wDungeonWarpDestinationMap], a ld hl, Seafoam3HolesCoords jp Func_46981 diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm index ac573994e8..7e519f86d2 100755 --- a/scripts/seafoamislands4.asm +++ b/scripts/seafoamislands4.asm @@ -12,16 +12,16 @@ SeafoamIslands4Script: ; 4658d (11:658d) cp $1 jr nz, .asm_465b8 ; 0x465a8 $e set 0, [hl] - ld a, $dd + ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1 ld [wd079], a - ld a, $e1 + ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1 ld [wd07a], a jr .asm_465c4 ; 0x465b6 $c .asm_465b8 set 1, [hl] - ld a, $de + ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2 ld [wd079], a - ld a, $e2 + ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_2 ld [wd07a], a .asm_465c4 ld a, [wd079] @@ -33,7 +33,7 @@ SeafoamIslands4Script: ; 4658d (11:658d) jr .asm_465ed ; 0x465da $11 .asm_465dc ld a, $a2 - ld [wd71d], a + ld [wDungeonWarpDestinationMap], a ld hl, Seafoam4HolesCoords call Func_46981 ld a, [wd732] @@ -66,12 +66,12 @@ SeafoamIslands4Script0: ; 46603 (11:6603) ld a, [W_XCOORD] cp $f ret nz - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement46632 call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld hl, W_FLAGS_D733 set 2, [hl] ld a, $1 @@ -85,7 +85,7 @@ RLEMovement46632: ; 46632 (11:6632) db $ff SeafoamIslands4Script1: ; 46639 (11:6639) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $0 @@ -108,10 +108,10 @@ SeafoamIslands4Script2: ; 46644 (11:6644) .asm_4665e ld de, RLEData_46688 .asm_46661 - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd call DecodeRLEList dec a - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a xor a ld [wSpriteStateData2 + $06], a ld hl, wd730 @@ -130,7 +130,7 @@ RLEData_46688: ; 46688 (11:6688) db $80,$06,$10,$02,$80,$04,$FF SeafoamIslands4Script3: ; 4668f (11:668f) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $0 diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm index bea63321e2..b554034b48 100755 --- a/scripts/seafoamislands5.asm +++ b/scripts/seafoamislands5.asm @@ -44,10 +44,10 @@ SeafoamIslands5Script0: ; 467c7 (11:67c7) .asm_467e6 ld a, $1 .asm_467e8 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $40 - ld [wccd3], a - call Func_3486 + ld [wSimulatedJoypadStatesEnd], a + call StartSimulatingJoypadStates ld hl, W_FLAGS_D733 res 2, [hl] ld a, $1 @@ -62,7 +62,7 @@ CoordsData_467fe: ; 467fe (11:67fe) db $FF SeafoamIslands5Script1: ; 46807 (11:6807) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a @@ -89,11 +89,11 @@ SeafoamIslands5Script2: ; 46816 (11:6816) .asm_46837 ld de, RLEMovementData_46852 .asm_4683a - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 .asm_46849 ld [W_SEAFOAMISLANDS5CURSCRIPT], a @@ -117,7 +117,7 @@ RLEMovementData_46859: ; 46859 (11:6859) db $FF SeafoamIslands5Script3: ; 46860 (11:6860) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] ld b, a cp $1 call z, SeaFoamIslands5Script_46872 @@ -130,8 +130,8 @@ SeafoamIslands5Script3: ; 46860 (11:6860) SeaFoamIslands5Script_46872: ; 46872 (11:6872) xor a - ld [wd700], a - ld [wd11a], a + ld [wWalkBikeSurfState], a + ld [wWalkBikeSurfStateCopy], a jp ForceBikeOrSurf SeafoamIslands5TextPointers: ; 4687c (11:687c) diff --git a/scripts/silphco1.asm b/scripts/silphco1.asm index 990e5c2aa4..8a399a4c69 100755 --- a/scripts/silphco1.asm +++ b/scripts/silphco1.asm @@ -7,7 +7,7 @@ SilphCo1Script: ; 5d44e (17:544e) bit 7, [hl] set 7, [hl] ret nz - ld a, $4c + ld a, HS_SILPH_CO_1F_1 ld [wcc4d], a predef_jump ShowObject diff --git a/scripts/silphco10.asm b/scripts/silphco10.asm index c831655f00..7d044aca37 100755 --- a/scripts/silphco10.asm +++ b/scripts/silphco10.asm @@ -22,7 +22,7 @@ SilphCo10Script_5a14f: ; 5a14f (16:614f) ld a, $54 ld [wd09f], a ld bc, $405 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock DataTable_5a173: ; 5a173 (16:6173) db $04,$05,$FF @@ -37,7 +37,7 @@ SilphCo10Text_5a176: ; 5a176 (16:6176) SilphCo10ScriptPointers: ; 5a180 (16:6180) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo10TextPointers: ; 5a186 (16:6186) diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm index b63bc5231e..7bb6e44852 100755 --- a/scripts/silphco11.asm +++ b/scripts/silphco11.asm @@ -22,14 +22,14 @@ SilphCo11Script_62110: ; 62110 (18:6110) ld a, $20 ld [wd09f], a ld bc, $603 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock DataTable_62134: ; 62134 (18:6134) db $06,$03,$FF SilphCo11Script_62137: ; 62137 (18:6137) push hl - ld hl, wd73f + ld hl, wCardKeyDoorY ld a, [hli] ld b, a ld a, [hl] @@ -53,7 +53,7 @@ SilphCo11Script_62137: ; 62137 (18:6137) ld a, [hli] cp c jr nz, .asm_62143 - ld hl, wd73f + ld hl, wCardKeyDoorY xor a ld [hli], a ld [hl], a @@ -95,14 +95,55 @@ SilphCo11Script_6216d: ; 6216d (18:616d) jr .asm_62184 MissableObjectIDs_62194: ; 62194 (18:6194) - db $11,$12,$13,$14,$15,$16,$FF + db HS_SAFFRON_CITY_8 + db HS_SAFFRON_CITY_9 + db HS_SAFFRON_CITY_A + db HS_SAFFRON_CITY_B + db HS_SAFFRON_CITY_C + db HS_SAFFRON_CITY_D + db $FF MissableObjectIDs_6219b: ; 6219b (18:619b) - db $0A,$0B,$0C,$0D,$0E,$0F,$10,$17 - db $18,$8A,$8B,$8C,$8D,$8E,$8F,$91 - db $92,$93,$97,$98,$99,$9A,$9E,$9F - db $A0,$A3,$A4,$A5,$A6,$AB,$AC,$AD - db $AE,$AF,$B0,$B1,$B2,$B7,$B8,$B9 + db HS_SAFFRON_CITY_1 + db HS_SAFFRON_CITY_2 + db HS_SAFFRON_CITY_3 + db HS_SAFFRON_CITY_4 + db HS_SAFFRON_CITY_5 + db HS_SAFFRON_CITY_6 + db HS_SAFFRON_CITY_7 + db HS_SAFFRON_CITY_E + db HS_SAFFRON_CITY_F + db HS_SILPH_CO_2F_2 + db HS_SILPH_CO_2F_3 + db HS_SILPH_CO_2F_4 + db HS_SILPH_CO_2F_5 + db HS_SILPH_CO_3F_1 + db HS_SILPH_CO_3F_2 + db HS_SILPH_CO_4F_1 + db HS_SILPH_CO_4F_2 + db HS_SILPH_CO_4F_3 + db HS_SILPH_CO_5F_1 + db HS_SILPH_CO_5F_2 + db HS_SILPH_CO_5F_3 + db HS_SILPH_CO_5F_4 + db HS_SILPH_CO_6F_1 + db HS_SILPH_CO_6F_2 + db HS_SILPH_CO_6F_3 + db HS_SILPH_CO_7F_1 + db HS_SILPH_CO_7F_2 + db HS_SILPH_CO_7F_3 + db HS_SILPH_CO_7F_4 + db HS_SILPH_CO_8F_1 + db HS_SILPH_CO_8F_2 + db HS_SILPH_CO_8F_3 + db HS_SILPH_CO_9F_1 + db HS_SILPH_CO_9F_2 + db HS_SILPH_CO_9F_3 + db HS_SILPH_CO_10F_1 + db HS_SILPH_CO_10F_2 + db HS_SILPH_CO_11F_1 + db HS_SILPH_CO_11F_2 + db HS_SILPH_CO_11F_3 db $FF SilphCo11Script_621c4: ; 621c4 (18:61c4) @@ -116,7 +157,7 @@ SilphCo11Script_621c8: ; 621c8 (18:61c8) SilphCo11ScriptPointers: ; 621cf (18:61cf) dw SilphCo11Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw SilphCo11Script3 dw SilphCo11Script4 @@ -160,7 +201,7 @@ SilphCo11Script_6221a: ; 6221a (18:621a) ld [H_DOWNARROWBLINKCNT2], a ; $ff8c ld a, b ld [$ff8d], a - jp Func_34a6 + jp SetSpriteFacingDirectionAndDelay SilphCo11Script5: ; 62227 (18:6227) ld a, [W_ISINBATTLE] ; W_ISINBATTLE @@ -182,11 +223,11 @@ SilphCo11Script5: ; 62227 (18:6227) ld a, $6 ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID - call GBFadeIn1 + call GBFadeOutToBlack call SilphCo11Script_6216d call UpdateSprites call Delay3 - call GBFadeOut1 + call GBFadeInFromBlack ld hl, wd838 set 7, [hl] xor a @@ -221,9 +262,9 @@ SilphCo11Script4: ; 62293 (18:6293) set 7, [hl] ld hl, SilphCo10Text_62330 ; $6330 ld de, SilphCo10Text_62330 ; $6330 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a diff --git a/scripts/silphco2.asm b/scripts/silphco2.asm index 20d689e66b..63803acd94 100755 --- a/scripts/silphco2.asm +++ b/scripts/silphco2.asm @@ -23,7 +23,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07) ld a, $54 ld [wd09f], a ld bc, $0202 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_59d2e bit 6, a @@ -31,14 +31,14 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07) ld a, $54 ld [wd09f], a ld bc, $0502 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock DataTable_59d3e: ; 59d3e (16:5d3e) db $02,$02,$05,$02,$FF SilphCo2Script_59d43: ; 59d43 (16:5d43) push hl - ld hl, wd73f + ld hl, wCardKeyDoorY ld a, [hli] ld b, a ld a, [hl] @@ -62,7 +62,7 @@ SilphCo2Script_59d43: ; 59d43 (16:5d43) ld a, [hli] cp c jr nz, .asm_59d4f - ld hl, wd73f + ld hl, wCardKeyDoorY xor a ld [hli], a ld [hl], a @@ -87,7 +87,7 @@ SilphCo2Script_59d6f: ; 59d6f (16:5d6f) SilphCo2ScriptPointers: ; 59d80 (16:5d80) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo2TextPointers: ; 59d86 (16:5d86) diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 5527d92389..7b0c67c136 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -23,7 +23,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) ld a, $5f ld [wd09f], a ld bc, $404 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_59f98 bit 1, a @@ -31,7 +31,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) ld a, $5f ld [wd09f], a ld bc, $408 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock DataTable_59fa8: ; 59fa8 (16:5fa8) db $04,$04,$04,$08,$FF @@ -51,7 +51,7 @@ SilphCo3Script_59fad: ; 59fad (16:5fad) SilphCo3ScriptPointers: ; 59fbe (16:5fbe) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo3TextPointers: ; 59fc4 (16:5fc4) diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 718077ce73..15a46dd319 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -23,7 +23,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) ld a, $54 ld [wd09f], a ld bc, $0602 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_19d48 bit 1, a @@ -31,14 +31,14 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) ld a, $54 ld [wd09f], a ld bc, $0406 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock SilphCo4Data19d58: ; 19d58 (6:5d58) db $06, $02, $04, $06, $ff SilphCo4Script_19d5d: ; 19d5d (6:5d5d) push hl - ld hl, wd73f + ld hl, wCardKeyDoorY ld a, [hli] ld b, a ld a, [hl] @@ -62,7 +62,7 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d) ld a, [hli] cp c jr nz, .asm_19d69 ; 0x19d7c $eb - ld hl, wd73f + ld hl, wCardKeyDoorY xor a ld [hli], a ld [hl], a @@ -87,7 +87,7 @@ SilphCo4Script_19d89: ; 19d89 (6:5d89) SilphCo4ScriptPointers: ; 19d9a (6:5d9a) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo4TextPointers: ; 19da0 (6:5da0) diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index 709af20bdd..0b63708bda 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -23,7 +23,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ld a, $5f ld [wd09f], a ld bc, $0203 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_19f74 bit 1, a @@ -32,7 +32,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ld a, $5f ld [wd09f], a ld bc, $0603 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_19f87 bit 2, a @@ -40,7 +40,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ld a, $5f ld [wd09f], a ld bc, $0507 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock SilphCo5Coords: ; 19f97 (6:5f97) ; coords? db $02, $03, $06, $03, $05, $07, $ff @@ -65,7 +65,7 @@ SilphCo5Script_19f9e: ; 19f9e (6:5f9e) SilphCo5ScriptPointers: ; 19fb6 (6:5fb6) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo5TextPointers: ; 19fbc (6:5fbc) diff --git a/scripts/silphco6.asm b/scripts/silphco6.asm index 4a9477c667..137e31be00 100755 --- a/scripts/silphco6.asm +++ b/scripts/silphco6.asm @@ -22,7 +22,7 @@ SilphCo6Script_1a1bf: ; 1a1bf (6:61bf) ld a, $5f ld [wd09f], a ld bc, $0602 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock SilphCo6Coords1: ; 1a1e3 (6:61e3) db $06, $02 @@ -38,7 +38,7 @@ SilphCo6Script_1a1e6: ; 1a1e6 (6:61e6) SilphCo6ScriptPointers: ; 1a1f0 (6:61f0) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo6TextPointers: ; 1a1f6 (6:61f6) diff --git a/scripts/silphco7.asm b/scripts/silphco7.asm index bd611763fb..23eb795c92 100755 --- a/scripts/silphco7.asm +++ b/scripts/silphco7.asm @@ -23,7 +23,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) ld a, $54 ld [wd09f], a ld bc, $305 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_51b9e bit 5, a @@ -32,7 +32,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) ld a, $54 ld [wd09f], a ld bc, $20a - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_51bb1 bit 6, a @@ -40,14 +40,14 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) ld a, $54 ld [wd09f], a ld bc, $60a - predef_jump Func_ee9e + predef_jump ReplaceTileBlock DataTable_51bc1: ; 51bc1 (14:5bc1) db $03,$05,$02,$0A,$06,$0A,$FF SilphCo7Text_51bc8: ; 51bc8 (14:5bc8) push hl - ld hl, wd73f + ld hl, wCardKeyDoorY ld a, [hli] ld b, a ld a, [hl] @@ -71,7 +71,7 @@ SilphCo7Text_51bc8: ; 51bc8 (14:5bc8) ld a, [hli] cp c jr nz, .asm_51bd4 - ld hl, wd73f + ld hl, wCardKeyDoorY xor a ld [hli], a ld [hl], a @@ -110,7 +110,7 @@ SilphCo7Text_51c10: ; 51c10 (14:5c10) SilphCo7ScriptPointers: ; 51c17 (14:5c17) dw SilphCo7Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw SilphCo7Script3 dw SilphCo7Script4 @@ -177,7 +177,7 @@ SilphCo7Script3: ; 51c82 (14:5c82) set 7, [hl] ld hl, SilphCo7Text14 ; $5ec8 ld de, SilphCo7Text_51ecd ; $5ecd - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ld a, SONY2 + $c8 ld [W_CUROPPONENT], a ; wd059 ld a, [W_RIVALSTARTER] ; wd715 @@ -211,7 +211,7 @@ SilphCo7Script4: ; 51cc8 (14:5cc8) ld [H_DOWNARROWBLINKCNT2], a ; $ff8c ld a, $4 ld [$ff8d], a - call Func_34a6 + call SetSpriteFacingDirectionAndDelay ld a, $f ld [H_DOWNARROWBLINKCNT2], a ; $ff8c call DisplayTextID @@ -241,10 +241,10 @@ SilphCo7Script5: ; 51d25 (14:5d25) ld a, [wd730] bit 0, a ret nz - ld a, $a7 + ld a, HS_SILPH_CO_7F_RIVAL ld [wcc4d], a predef HideObject - call Func_2307 + call PlayDefaultMusic xor a ld [wJoyIgnore], a jp SilphCo7Text_51c10 @@ -323,7 +323,7 @@ SilphCo7Text1: ld bc, (LAPRAS << 8) | 15 call GivePokemon jr nc, .done - ld a, [wccd3] + ld a, [wSimulatedJoypadStatesEnd] and a call z, WaitForTextScrollButtonPress call EnableAutoTextBoxDrawing diff --git a/scripts/silphco8.asm b/scripts/silphco8.asm index cc508e6183..ebca9b95e3 100755 --- a/scripts/silphco8.asm +++ b/scripts/silphco8.asm @@ -22,14 +22,14 @@ SilphCo8Script_5651a: ; 5651a (15:651a) ld a, $5f ld [wd09f], a ld bc, $403 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock DataTable_5653e: ; 5653e (15:653e) db $04,$03,$FF SilphCo8Script_56541: ; 56541 (15:6541) push hl - ld hl, wd73f + ld hl, wCardKeyDoorY ld a, [hli] ld b, a ld a, [hl] @@ -53,7 +53,7 @@ SilphCo8Script_56541: ; 56541 (15:6541) ld a, [hli] cp c jr nz, .asm_5654d - ld hl, wd73f + ld hl, wCardKeyDoorY xor a ld [hli], a ld [hl], a @@ -73,7 +73,7 @@ SilphCo8Script_5656d: ; 5656d (15:656d) SilphCo8ScriptPointers: ; 56577 (15:6577) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo8TextPointers: ; 5657d (15:657d) diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm index c4f7a89509..e8b16927e9 100755 --- a/scripts/silphco9.asm +++ b/scripts/silphco9.asm @@ -23,7 +23,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) ld a, $5f ld [wd09f], a ld bc, $401 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_5d7f8 bit 1, a @@ -32,7 +32,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) ld a, $54 ld [wd09f], a ld bc, $209 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_5d80b bit 2, a @@ -41,7 +41,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) ld a, $54 ld [wd09f], a ld bc, $509 - predef Func_ee9e + predef ReplaceTileBlock pop af .asm_5d81e bit 3, a @@ -49,14 +49,14 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) ld a, $5f ld [wd09f], a ld bc, $605 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock DataTable_5d82e: ; 5d82e (17:582e) db $04,$01,$02,$09,$05,$09,$06,$05,$FF SilphCo9Script_5d837: ; 5d837 (17:5837) push hl - ld hl, wd73f + ld hl, wCardKeyDoorY ld a, [hli] ld b, a ld a, [hl] @@ -80,7 +80,7 @@ SilphCo9Script_5d837: ; 5d837 (17:5837) ld a, [hli] cp c jr nz, .asm_5d843 - ld hl, wd73f + ld hl, wCardKeyDoorY xor a ld [hli], a ld [hl], a @@ -117,7 +117,7 @@ SilphCo9Script_5d863: ; 5d863 (17:5863) SilphCo9ScriptPointers: ; 5d885 (17:5885) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SilphCo9TextPointers: ; 5d88b (17:588b) @@ -164,9 +164,9 @@ SilphCo9Text1: ; 5d8b8 (17:58b8) ld hl, SilphCo9Text_5d8e5 call PrintText predef HealParty - call GBFadeOut2 + call GBFadeOutToWhite call Delay3 - call GBFadeIn2 + call GBFadeInFromWhite ld hl, SilphCo9Text_5d8ea call PrintText jr .asm_b6e28 ; 0x5d8da diff --git a/scripts/silphcoelevator.asm b/scripts/silphcoelevator.asm index 853d735769..48d406cc3d 100755 --- a/scripts/silphcoelevator.asm +++ b/scripts/silphcoelevator.asm @@ -9,13 +9,13 @@ SilphCoElevatorScript: ; 457c0 (11:57c0) res 7, [hl] call nz, SilphCoElevatorScript_45827 xor a - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a inc a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret SilphCoElevatorScript_457dc: ; 457dc (11:57dc) - ld hl, wd3af + ld hl, wWarpEntries ld a, [wd73b] ld b, a ld a, [wd73c] diff --git a/scripts/ssanne10.asm b/scripts/ssanne10.asm index 60eb28f237..8f3ff9a447 100755 --- a/scripts/ssanne10.asm +++ b/scripts/ssanne10.asm @@ -9,7 +9,7 @@ SSAnne10Script: ; 61d55 (18:5d55) SSAnne10ScriptPointers: ; 61d68 (18:5d68) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SSAnne10TextPointers: ; 61d6e (18:5d6e) diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm index f3822ec701..474aaa6057 100755 --- a/scripts/ssanne2.asm +++ b/scripts/ssanne2.asm @@ -32,7 +32,7 @@ SSAnne2Script0: ; 613be (18:53be) call PlayMusic ld a, [wWhichTrade] ld [$ffdb], a - ld a, $71 + ld a, HS_SS_ANNE_2_RIVAL ld [wcc4d], a predef ShowObject call Delay3 @@ -79,7 +79,7 @@ SSAnne2Script_61416: ; 61416 (18:5416) ld [$ff8d], a ld a, $2 ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - jp Func_34a6 + jp SetSpriteFacingDirectionAndDelay SSAnne2Script1: ; 61430 (18:5430) ld a, [wd730] @@ -160,10 +160,10 @@ SSAnne2Script3: ; 614be (18:54be) ret nz xor a ld [wJoyIgnore], a - ld a, $71 + ld a, HS_SS_ANNE_2_RIVAL ld [wcc4d], a predef HideObject - call Func_2307 + call PlayDefaultMusic ld a, $4 ld [W_SSANNE2CURSCRIPT], a ret @@ -186,7 +186,7 @@ SSAnne2Text2: ; 614e6 (18:54e6) set 7, [hl] ld hl, SSAnneRivalDefeatedText ld de, SSAnneRivalWonText - call PreBattleSaveRegisters + call SaveEndBattleTextPointers jp TextScriptEnd SSAnneRivalBeforeBattleText: ; 61500 (18:5500) diff --git a/scripts/ssanne5.asm b/scripts/ssanne5.asm index ea7ff2825f..96b94c523d 100755 --- a/scripts/ssanne5.asm +++ b/scripts/ssanne5.asm @@ -9,7 +9,7 @@ SSAnne5Script: ; 616ae (18:56ae) SSAnne5ScriptPointers: ; 616c1 (18:56c1) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SSAnne5TextPointers: ; 616c7 (18:56c7) diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm index b708b4fd24..1ca97ce28c 100755 --- a/scripts/ssanne7.asm +++ b/scripts/ssanne7.asm @@ -64,7 +64,7 @@ SSAnne7RubText: ; 618ec (18:58ec) ld a, [wc026] cp MUSIC_PKMN_HEALED jr z, .asm_61910 ; 0x61915 $f9 - call Func_2307 + call PlayDefaultMusic ld hl, wd803 set 1, [hl] ld hl, wd72d diff --git a/scripts/ssanne8.asm b/scripts/ssanne8.asm index a2abb4bb84..ff7fc57b26 100755 --- a/scripts/ssanne8.asm +++ b/scripts/ssanne8.asm @@ -9,7 +9,7 @@ SSAnne8Script: ; 61976 (18:5976) SSAnne8ScriptPointers: ; 61989 (18:5989) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SSAnne8TextPointers: ; 6198f (18:598f) diff --git a/scripts/ssanne9.asm b/scripts/ssanne9.asm index 2ec0f28c5f..db34fcf284 100755 --- a/scripts/ssanne9.asm +++ b/scripts/ssanne9.asm @@ -1,8 +1,8 @@ SSAnne9Script: ; 61b4b (18:5b4b) ld a, $1 - ld [wcf0c], a + ld [wAutoTextBoxDrawingControl], a xor a - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, SSAnne9TrainerHeaders ld de, SSAnne9ScriptPointers ld a, [W_SSANNE9CURSCRIPT] @@ -12,7 +12,7 @@ SSAnne9Script: ; 61b4b (18:5b4b) SSAnne9ScriptPointers: ; 61b64 (18:5b64) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle SSAnne9TextPointers: ; 61b6a (18:5b6a) diff --git a/scripts/undergroundpathentranceroute5.asm b/scripts/undergroundpathentranceroute5.asm index 1fb62f4881..03f1c35dc7 100755 --- a/scripts/undergroundpathentranceroute5.asm +++ b/scripts/undergroundpathentranceroute5.asm @@ -13,6 +13,6 @@ UndergroundPathEntranceRoute5Text1: ; 5d6b2 (17:56b2) db $08 ; asm ld a, $9 ld [wWhichTrade], a - predef Predef54 + predef DoInGameTradeDialogue ld hl, UndergroundPathEntranceRoute5_5d6af ret diff --git a/scripts/unknowndungeon3.asm b/scripts/unknowndungeon3.asm index 2ca624a895..d207891606 100755 --- a/scripts/unknowndungeon3.asm +++ b/scripts/unknowndungeon3.asm @@ -9,7 +9,7 @@ UnknownDungeon3Script: ; 45ef0 (11:5ef0) UnknownDungeon3ScriptPointers: ; 45f03 (11:5f03) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle UnknownDungeon3TextPointers: ; 45f09 (11:5f09) diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index da70b819cd..1214b27c31 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -55,16 +55,16 @@ VermilionCityScript0: ; 197e6 (6:57e6) bit 2, a jr nz, .asm_19810 ; 0x19804 $a ld b, $3f - predef IsItemInBag_ + predef IsItemInBag_ ld a, b and a ret nz .asm_19810 ld a, $40 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld a, $1 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $1 ld [W_VERMILIONCITYCURSCRIPT], a ret @@ -85,17 +85,17 @@ VermilionCityScript2: ; 19833 (6:5833) ld a, $ff ld [wJoyIgnore], a ld a, $40 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a ld [wccd4], a ld a, $2 - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $3 ld [W_VERMILIONCITYCURSCRIPT], a ret VermilionCityScript3: ; 1984e (6:584e) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a @@ -106,7 +106,7 @@ VermilionCityScript3: ; 1984e (6:584e) ret VermilionCityScript1: ; 1985f (6:585f) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld c, $a @@ -175,7 +175,7 @@ VermilionCityText3: ; 198b1 (6:58b1) ld hl, SSAnneWelcomeText9 call PrintText ld b, S_S__TICKET - predef IsItemInBag_ + predef IsItemInBag_ ld a, b and a jr nz, .asm_0419b ; 0x198df diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm index 03dc4377d7..7b23c41eb3 100755 --- a/scripts/vermiliondock.asm +++ b/scripts/vermiliondock.asm @@ -5,7 +5,7 @@ VermilionDockScript: ; 1db52 (7:5b52) jr nz, .asm_1db8d ; 0x1db5a $31 bit 0, [hl] ret z - ld a, [wd42f] + ld a, [wDestinationWarpID] cp $1 ret nz bit 2, [hl] @@ -14,23 +14,23 @@ VermilionDockScript: ; 1db52 (7:5b52) call Delay3 ld hl, wd730 set 7, [hl] - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld a, $40 ld [hli], a ld [hli], a ld [hl], a ld a, $3 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a xor a ld [wSpriteStateData2 + $06], a - ld [wcd3b], a + ld [wOverrideSimulatedJoypadStatesMask], a dec a ld [wJoyIgnore], a ret .asm_1db8d bit 5, [hl] ret nz - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld [wJoyIgnore], a @@ -66,7 +66,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) ld [$ff49], a ld a, $58 ld [wTrainerEngageDistance], a - ld hl, wd526 + ld hl, wMapViewVRAMPointer ld c, [hl] inc hl ld b, [hl] @@ -75,16 +75,16 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) ld a, (SFX_02_54 - SFX_Headers_02) / 3 call PlaySoundWaitForCurrent ld a, $ff - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a ld d, $0 ld e, $8 .asm_1dbfa ld hl, $0002 add hl, bc ld a, l - ld [wd526], a + ld [wMapViewVRAMPointer], a ld a, h - ld [wd527], a + ld [wMapViewVRAMPointer + 1], a push hl push de call ScheduleEastColumnRedraw @@ -106,19 +106,19 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) jr nz, .asm_1dbfa ; 0x1dc22 $d6 xor a ld [$ff4a], a - ld [$ffb0], a + ld [hWY], a call VermilionDock_1dc94 ld a, $90 - ld [$ffb0], a + ld [hWY], a ld a, $1 - ld [wcfcb], a + ld [wUpdateSpritesEnabled], a pop hl pop bc ld [hl], b dec hl ld [hl], c call LoadPlayerSpriteGraphics - ld hl, wd3ae + ld hl, wNumberOfWarps dec [hl] ret diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm index fa6b2fc2af..6178dafb9c 100755 --- a/scripts/vermiliongym.asm +++ b/scripts/vermiliongym.asm @@ -40,7 +40,7 @@ VermilionGymScript_5ca6d: ; 5ca6d (17:4a6d) .asm_5ca7f ld [wd09f], a ld bc, $202 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a) xor a @@ -51,7 +51,7 @@ VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a) VermilionGymScriptPointers: ; 5ca95 (17:4a95) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw VermilionGymScript3 @@ -156,9 +156,9 @@ VermilionGymText1: ; 5cb1d (17:4b1d) set 7, [hl] ld hl, ReceivedThunderbadgeText ld de, ReceivedThunderbadgeText - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $3 diff --git a/scripts/vermilionhouse3.asm b/scripts/vermilionhouse3.asm index 7b4e95fdcf..08e2e39581 100755 --- a/scripts/vermilionhouse3.asm +++ b/scripts/vermilionhouse3.asm @@ -8,5 +8,5 @@ VermilionHouse3Text1: ; 19c17 (6:5c17) db $08 ; asm ld a, $4 ld [wWhichTrade], a - predef Predef54 + predef DoInGameTradeDialogue jp TextScriptEnd diff --git a/scripts/vermilionpokecenter.asm b/scripts/vermilionpokecenter.asm index 00d139f5b1..6e85b3e3c1 100755 --- a/scripts/vermilionpokecenter.asm +++ b/scripts/vermilionpokecenter.asm @@ -1,5 +1,5 @@ VermilionPokecenterScript: ; 5c98f (17:498f) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing VermilionPokecenterTextPointers: ; 5c995 (17:4995) diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm index cebd807024..b6d2bf3e3d 100755 --- a/scripts/victoryroad1.asm +++ b/scripts/victoryroad1.asm @@ -17,11 +17,11 @@ VictoryRoad1Script: ; 5da0a (17:5a0a) ld a, $1d ld [wd09f], a ld bc, $604 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a) dw VictoryRoad1Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle VictoryRoad1Script0: ; 5da40 (17:5a40) diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm index cf52e3a3e0..4aab61ca5f 100755 --- a/scripts/victoryroad2.asm +++ b/scripts/victoryroad2.asm @@ -36,12 +36,12 @@ VictoryRoad2Script_517c9: ; 517c9 (14:57c9) VictoryRoad2Script_517e2: ; 517e2 (14:57e2) ld [wd09f], a - predef Func_ee9e + predef ReplaceTileBlock ret VictoryRoad2ScriptPointers: ; 517eb (14:57eb) dw VictoryRoad2Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle VictoryRoad2Script0: ; 517f1 (14:57f1) diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm index e35e9131f7..01269a3f2e 100755 --- a/scripts/victoryroad3.asm +++ b/scripts/victoryroad3.asm @@ -19,11 +19,11 @@ VictoryRoad3Script_44996: ; 44996 (11:4996) ld a, $1d ld [wd09f], a ld bc, $503 - predef_jump Func_ee9e + predef_jump ReplaceTileBlock VictoryRoad3ScriptPointers: ; 449b1 (11:49b1) dw VictoryRoad3Script0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle VictoryRoad3Script0: ; 449b7 (11:49b7) @@ -47,10 +47,10 @@ VictoryRoad3Script0: ; 449b7 (11:49b7) bit 6, [hl] set 6, [hl] jr nz, .asm_449fe - ld a, $7a + ld a, HS_VICTORY_ROAD_3_BOULDER ld [wcc4d], a predef HideObject - ld a, $60 + ld a, HS_VICTORY_ROAD_2_BOULDER ld [wcc4d], a predef_jump ShowObject @@ -61,7 +61,7 @@ VictoryRoad3Script0: ; 449b7 (11:49b7) .asm_449fe ld a, $c2 - ld [wd71d], a + ld [wDungeonWarpDestinationMap], a ld hl, .coordsData_449f9 ; $49f9 call Func_46981 ld a, [wWhichTrade] ; wWhichTrade diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm index 7a76928008..d0b2b4ae23 100755 --- a/scripts/viridiancity.asm +++ b/scripts/viridiancity.asm @@ -108,7 +108,7 @@ ViridianCityScript2: ; 1908f (6:508f) ret ViridianCityScript3: ; 190c1 (6:50c1) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 @@ -117,11 +117,11 @@ ViridianCityScript3: ; 190c1 (6:50c1) ret ViridianCityScript_190cf: ; 190cf (6:50cf) - call Func_3486 + call StartSimulatingJoypadStates ld a, $1 - ld [wcd38], a + ld [wSimulatedJoypadStatesIndex], a ld a, $80 - ld [wccd3], a + ld [wSimulatedJoypadStatesEnd], a xor a ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a diff --git a/scripts/viridianforest.asm b/scripts/viridianforest.asm index 3744fc7886..4ec1c0aad4 100755 --- a/scripts/viridianforest.asm +++ b/scripts/viridianforest.asm @@ -9,7 +9,7 @@ ViridianForestScript: ; 6110d (18:510d) ViridianForestScriptPointers: ; 61120 (18:5120) dw CheckFightingMapTrainers - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle ViridianForestTextPointers: ; 61126 (18:5126) diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm index 65ad3553ba..6ced7d8297 100755 --- a/scripts/viridiangym.asm +++ b/scripts/viridiangym.asm @@ -24,7 +24,7 @@ ViridianGymScript_748d6: ; 748d6 (1d:48d6) ViridianGymScriptPointers: ; 748e1 (1d:48e1) dw ViridianGymScript0 - dw Func_324c + dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw ViridianGymScript3 dw ViridianGymScript4 @@ -35,10 +35,10 @@ ViridianGymScript0: ; 748eb (1d:48eb) ld a, [W_XCOORD] ; wd362 ld c, a ld hl, ViridianGymArrowTilePlayerMovement - call Func_3442 + call DecodeArrowMovementRLE cp $ff jp z, CheckFightingMapTrainers - call Func_3486 + call StartSimulatingJoypadStates ld hl, wd736 set 7, [hl] ld a, (SFX_02_52 - SFX_Headers_02) / 3 @@ -121,7 +121,7 @@ ViridianGymArrowMovement12: ; 74968 (1d:4968) db $20,$0C,$FF ViridianGymScript4: ; 7496b (1d:496b) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a jr nz, .asm_74980 xor a @@ -175,7 +175,7 @@ ViridianGymScript3_74995: ; 74995 (1d:4995) or %00000011 ld [wd752], a - ld a, $23 + ld a, HS_ROUTE_22_RIVAL_2 ld [wcc4d], a predef ShowObject ld hl, wd7eb @@ -286,16 +286,16 @@ ViridianGymText1: ; 74a69 (1d:4a69) jr .asm_6dff7 ; 0x74a7b .asm_9fc95 ; 0x74a7d ld a, $1 - ld [wcc3c], a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, ViridianGymText_74ad9 call PrintText - call GBFadeIn1 - ld a, $32 + call GBFadeOutToBlack + ld a, HS_VIRIDIAN_GYM_GIOVANNI ld [wcc4d], a predef HideObject call UpdateSprites call Delay3 - call GBFadeOut1 + call GBFadeInFromBlack jr .asm_6dff7 ; 0x74a9e .asm_6de66 ; 0x74aa0 ld hl, ViridianGymText_74ace @@ -305,9 +305,9 @@ ViridianGymText1: ; 74a69 (1d:4a69) set 7, [hl] ld hl, ViridianGymText_74ad3 ld de, ViridianGymText_74ad3 - call PreBattleSaveRegisters + call SaveEndBattleTextPointers ldh a, [$8c] - ld [wcf13], a + ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $8 diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index a02231f8ca..d33dfe8133 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -30,12 +30,12 @@ ViridianMartScript0: ; 1d49b (7:549b) ld a, $4 ld [$ff8c], a call DisplayTextID - ld hl, wccd3 + ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement1d4bb call DecodeRLEList dec a - ld [wcd38], a - call Func_3486 + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates ld a, $1 ld [W_VIRIDIANMARKETCURSCRIPT], a ret @@ -46,7 +46,7 @@ RLEMovement1d4bb: ; 1d4bb (7:54bb) db $ff ViridianMartScript1: ; 1d4c0 (7:54c0) - ld a, [wcd38] + ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 diff --git a/scripts/viridianpokecenter.asm b/scripts/viridianpokecenter.asm index 08371ce353..ae5e32c84e 100755 --- a/scripts/viridianpokecenter.asm +++ b/scripts/viridianpokecenter.asm @@ -1,5 +1,5 @@ ViridianPokeCenterScript: ; 4425d (11:425d) - call Func_22fa + call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing ViridianPokecenterTextPointers: ; 44263 (11:4263) diff --git a/text.asm b/text.asm index 2c51babab0..90590aacef 100755 --- a/text.asm +++ b/text.asm @@ -166,6 +166,13 @@ _OaksAideNoRoomText:: ; 802ec (20:42ec) 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" @@ -573,6 +580,12 @@ _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) text "CATERPIE evolves" line "into BUTTERFREE?" @@ -834,6 +847,16 @@ _KabutopsFossilText:: ; 88fd5 (22:4fd5) cont "rare #MON." done +IF DEF(_YELLOW) +_FanClubPicture1Text:: + text "My cute RAPIDASH." + done + +_FanClubPicture2Text:: + text "My beloved FEAROW." + done +ENDC + _LinkCableHelpText1:: ; 89001 (22:5001) text "TRAINER TIPS" @@ -1172,6 +1195,12 @@ _GotAwayText:: ; 8981f (22:581f) text "Got away safely!" prompt +IF DEF(_YELLOW) +_RunAwayText:: + text "Hurry, get away!" + prompt +ENDC + _ItemsCantBeUsedHereText:: ; 89831 (22:5831) text "Items can't be" line "used here." @@ -1202,7 +1231,7 @@ _NoMovesLeftText:: ; 89892 (22:5892) _MultiHitText:: ; 898aa (22:58aa) text "Hit the enemy" line "@" - TX_NUM W_NUMHITS,1,1 + TX_NUM wPlayerNumHits,1,1 text " times!" prompt @@ -1421,7 +1450,7 @@ _MirrorMoveFailedText:: ; 89b96 (22:5b96) _HitXTimesText:: ; 89baf (22:5baf) text "Hit @" - TX_NUM wcd05, 1, 1 + TX_NUM wEnemyNumHits, 1, 1 text " times!" prompt @@ -1551,7 +1580,7 @@ _SafariZoneAngryText:: ; 89d6a (22:5d6a) _PickUpPayDayMoneyText:: ; 89d80 (22:5d80) text $52, " picked up" line "¥@" - TX_BCD wcce5, $c3 + TX_BCD wTotalPayDayMoney, $c3 text "!" prompt @@ -1565,6 +1594,13 @@ _WhichFloorText:: ; 89dad (22:5dad) line "you want? " done +IF DEF(_YELLOW) +_SleepingPikachuText1:: + text "There isn't any" + line "response..." + prompt +ENDC + _PartyMenuNormalText:: ; 89dc8 (22:5dc8) text "Choose a #MON." done @@ -1580,7 +1616,11 @@ _PartyMenuBattleText:: ; 89df1 (22:5df1) done _PartyMenuUseTMText:: ; 89e08 (22:5e08) +IF DEF(_YELLOW) + text "Teach to which" +ELSE text "Use TM on which" +ENDC line "#MON?" done @@ -1752,6 +1792,13 @@ _AccessedHoFPCText:: ; 8a0f4 (22:60f4) line "OF FAME List." prompt +IF DEF(_YELLOW) +_SleepingPikachuText2:: + text "There isn't any" + line "response..." + prompt +ENDC + _SwitchOnText:: ; 0x8a131 text "Switch on!" prompt @@ -1805,6 +1852,14 @@ _CantTakeMonText:: ; 0x8a1f6 line "first." prompt +IF DEF(_YELLOW) +_PikachuUnhappyText:: + TX_RAM $cd6d + text "looks" + line "unhappy about it!" + prompt +ENDC + _ReleaseWhichMonText:: ; 0x8a228 text "Release which" line "#MON?" @@ -1918,7 +1973,7 @@ _HisNameIsText:: ; 8a64a (22:664a) prompt _WillBeTradedText:: ; 8a677 (22:6677) - TX_RAM wTrainerFacingDirection + TX_RAM wNameOfPlayerMonToBeTraded text " and" line "@" TX_RAM wcd6d @@ -1926,6 +1981,111 @@ _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 text " ERROR." @@ -1934,6 +2094,13 @@ _Char00Text:: ; 8a696 (22:6696) _Char55Text:: ; 8a6a3 (22:66a3) 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" @@ -1968,6 +2135,9 @@ 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" @@ -2617,19 +2787,19 @@ _PokemonCenterFarewellText:: ; a2910 (28:6910) line "you again!" done -_CableClubNPCText7:: ; a292b (28:692b) +_CableClubNPCAreaReservedFor2FriendsLinkedByCableText:: ; a292b (28:692b) text "This area is" line "reserved for 2" cont "friends who are" cont "linked by cable." done -_CableClubNPCText1:: ; a2969 (28:6969) +_CableClubNPCWelcomeText:: ; a2969 (28:6969) text "Welcome to the" line "Cable Club!" done -_CableClubNPCText2:: ; a2985 (28:6985) +_CableClubNPCPleaseApplyHereHaveToSaveText:: ; a2985 (28:6985) text "Please apply here." para "Before opening" @@ -2637,10 +2807,10 @@ _CableClubNPCText2:: ; a2985 (28:6985) cont "to save the game." done -_CableClubNPCText3:: ; a29cc (28:69cc) +_CableClubNPCPleaseWaitText:: ; a29cc (28:69cc) text "Please wait.@@" -_CableClubNPCText4:: ; a29db (28:69db) +_CableClubNPCLinkClosedBecauseOfInactivityText:: ; a29db (28:69db) text "The link has been" line "closed because of" cont "inactivity." @@ -2653,11 +2823,11 @@ _CableClubNPCText4:: ; a29db (28:69db) SECTION "Text 10", ROMX, BANK[TEXT_10] -_CableClubNPCText5:: ; a4000 (29:4000) +_CableClubNPCPleaseComeAgainText:: ; a4000 (29:4000) text "Please come again!" done -_CableClubNPCText6:: ; a4014 (29:4014) +_CableClubNPCMakingPreparationsText:: ; a4014 (29:4014) text "We're making" line "preparations." cont "Please wait." @@ -3059,21 +3229,21 @@ _ConnectCableText:: ; a809a (2a:409a) _TradedForText:: ; a80bc (2a:40bc) text $52, " traded" line "@" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName text " for" cont "@" - TX_RAM wPlayerMonAccuracyMod + TX_RAM wInGameTradeReceiveMonName text "!@@" _WannaTrade1Text:: ; a80d8 (2a:40d8) text "I'm looking for" line "@" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName text "! Wanna" para "trade one for" line "@" - TX_RAM wPlayerMonAccuracyMod + TX_RAM wInGameTradeReceiveMonName text "? " done @@ -3085,7 +3255,7 @@ _NoTrade1Text:: ; a810b (2a:410b) _WrongMon1Text:: ; a811d (2a:411d) text "What? That's not" line "@" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName text "!" para "If you get one," @@ -3099,7 +3269,7 @@ _Thanks1Text:: ; a8155 (2a:4155) _AfterTrade1Text:: ; a8162 (2a:4162) text "Isn't my old" line "@" - TX_RAM wPlayerMonAccuracyMod + TX_RAM wInGameTradeReceiveMonName text " great?" done @@ -3108,10 +3278,10 @@ _WannaTrade2Text:: ; a817c (2a:417c) line "you want to trade" para "your @" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName db $0 line "for @" - TX_RAM wPlayerMonAccuracyMod + TX_RAM wInGameTradeReceiveMonName text "?" done @@ -3123,7 +3293,7 @@ _NoTrade2Text:: ; a81b5 (2a:41b5) _WrongMon2Text:: ; a81d3 (2a:41d3) text "Hmmm? This isn't" line "@" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName text "." para "Think of me when" @@ -3135,23 +3305,31 @@ _Thanks2Text:: ; a8209 (2a:4209) done _AfterTrade2Text:: ; a8212 (2a:4212) - text "The @" +IF DEF(_YELLOW) + text "Hello there! Your" + line "old @" TX_RAM wcd13 + db " is" + cont "magnificent!" +ELSE + text "The @" + TX_RAM wInGameTradeGiveMonName text " you" line "traded to me" para "went and evolved!" +ENDC done _WannaTrade3Text:: ; a8240 (2a:4240) text "Hi! Do you have" line "@" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName text "?" para "Want to trade it" line "for @" - TX_RAM wPlayerMonAccuracyMod + TX_RAM wInGameTradeReceiveMonName text "?" done @@ -3162,7 +3340,7 @@ _NoTrade3Text:: ; a8274 (2a:4274) _WrongMon3Text:: ; a8284 (2a:4284) text "...This is no" line "@" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName text "." para "If you get one," @@ -3170,17 +3348,21 @@ _WrongMon3Text:: ; a8284 (2a:4284) done _Thanks3Text:: ; a82bc (2a:42bc) +IF DEF(_YELLOW) + text "Thanks, pal!" +ELSE text "Thanks pal!" +ENDC done _AfterTrade3Text:: ; a82c9 (2a:42c9) text "How is my old" line "@" - TX_RAM wPlayerMonAccuracyMod + TX_RAM wInGameTradeReceiveMonName text "?" para "My @" - TX_RAM wcd13 + TX_RAM wInGameTradeGiveMonName text " is" line "doing great!" done diff --git a/text/credits_text.asm b/text/credits_text.asm index c2c9e429a3..2c638b9eab 100755 --- a/text/credits_text.asm +++ b/text/credits_text.asm @@ -65,10 +65,10 @@ CreditsTextPointers: ; 742c3 (1d:42c3) dw CredPAAD CredVersion: ; 74343 (1d:4343) ; this 1 byte difference makes all bank addresses offset by 1 in the blue version -IF _RED +IF DEF(_RED) db -8, "RED VERSION STAFF@" ENDC -IF _BLUE +IF DEF(_BLUE) db -8, "BLUE VERSION STAFF@" ENDC CredTajiri: ; 74356 (1d:4356) diff --git a/text/maps/agatha.asm b/text/maps/agatha.asm index cd0b1bb539..9e20b7aab9 100755 --- a/text/maps/agatha.asm +++ b/text/maps/agatha.asm @@ -23,7 +23,11 @@ _AgathaBeforeBattleText:: ; 8686b (21:686b) done _AgathaEndBattleText:: ; 86970 (21:6970) +IF DEF(_YELLOW) + text "Woo-hoo!" +ELSE text "Oh ho!" +ENDC line "You're something" cont "special, child!" prompt diff --git a/text/maps/beach_house.asm b/text/maps/beach_house.asm new file mode 100644 index 0000000000..318b6013d6 --- /dev/null +++ b/text/maps/beach_house.asm @@ -0,0 +1,103 @@ +_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/bills_house.asm b/text/maps/bills_house.asm index 5963d7ea09..3ec1e3f320 100755 --- a/text/maps/bills_house.asm +++ b/text/maps/bills_house.asm @@ -1,3 +1,10 @@ +IF DEF(_YELLOW) +_BillsHouseDontLeaveText:: + text "Whoa, don't go" + line "anywhere, wait!" + done +ENDC + _BillsHouseText_1e865:: ; 8d267 (23:5267) text "Hiya! I'm a" line "#MON..." diff --git a/text/maps/blues_house.asm b/text/maps/blues_house.asm index 147b23fbf7..a5b155f2c9 100755 --- a/text/maps/blues_house.asm +++ b/text/maps/blues_house.asm @@ -29,11 +29,19 @@ _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!" diff --git a/text/maps/celadon_city.asm b/text/maps/celadon_city.asm index 585ece03b3..6a02d125df 100755 --- a/text/maps/celadon_city.asm +++ b/text/maps/celadon_city.asm @@ -1,10 +1,18 @@ _CeladonCityText1:: ; a59fb (29:59fb) 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) @@ -111,7 +119,11 @@ _CeladonCityText13:: ; a5d41 (29:5d41) line "#MON GYM" cont "LEADER: ERIKA" +IF DEF(_YELLOW) + para "The Nature-Loving" +ELSE para "The Nature Loving" +ENDC line "Princess!" done @@ -148,6 +160,10 @@ _CeladonCityText17:: ; a5e3e (29:5e3e) _CeladonCityText18:: ; a5e6a (29:5e6a) 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_4f.asm b/text/maps/celadon_dept_store_4f.asm index ed4898427b..de33021b38 100755 --- a/text/maps/celadon_dept_store_4f.asm +++ b/text/maps/celadon_dept_store_4f.asm @@ -1,7 +1,16 @@ _CeladonMart4Text2:: ; 9cad4 (27:4ad4) 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) diff --git a/text/maps/celadon_dept_store_roof.asm b/text/maps/celadon_dept_store_roof.asm index 851afc41fb..f2eef61388 100755 --- a/text/maps/celadon_dept_store_roof.asm +++ b/text/maps/celadon_dept_store_roof.asm @@ -50,10 +50,14 @@ _CeladonMartRoofText_4850f:: ; 9cca5 (27:4ca5) 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) text "Yay!" diff --git a/text/maps/cerulean_badge_house.asm b/text/maps/cerulean_badge_house.asm index cc0be65932..d546066ab7 100755 --- a/text/maps/cerulean_badge_house.asm +++ b/text/maps/cerulean_badge_house.asm @@ -19,7 +19,11 @@ _CeruleanHouse2Text_74e7c:: ; 9913a (26:513a) done _CeruleanHouse2Text_74e81:: ; 99170 (26:5170) +IF DEF(_YELLOW) + text "Come visit me any-" +ELSE text "Come visit me any" +ENDC line "time you wish." done @@ -29,7 +33,11 @@ _CeruleanHouse2Text_74e96:: ; 99192 (26:5192) 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 diff --git a/text/maps/cerulean_city.asm b/text/maps/cerulean_city.asm index 1daf316613..f014ee5d48 100755 --- a/text/maps/cerulean_city.asm +++ b/text/maps/cerulean_city.asm @@ -120,6 +120,15 @@ _CeruleanCityText5:: ; a50ba (29:50ba) 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 text "The people here" line "were robbed." @@ -127,31 +136,57 @@ _CeruleanCityText6:: ; a50f6 (29:50f6) 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 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 text "SLOWBRO punch!" +ENDC line "No! You blew it" cont "again!" done _CeruleanCityText_1973a:: ; a51ec (29:51ec) +IF DEF(_YELLOW) + text "ELECTRODE, SWIFT!" +ELSE 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" @@ -160,22 +195,38 @@ _CeruleanCityText_1973a:: ; a51ec (29:51ec) done _CeruleanCityText_1976f:: ; a526b (29:526b) +IF DEF(_YELLOW) + text "ELECTRODE took a" +ELSE text "SLOWBRO took a" +ENDC line "snooze..." done _CeruleanCityText_19774:: ; a5285 (29:5285) +IF DEF(_YELLOW) + text "ELECTRODE is" +ELSE text "SLOWBRO is" +ENDC line "loafing around..." done _CeruleanCityText_19779:: ; a52a3 (29:52a3) +IF DEF(_YELLOW) + text "ELECTRODE turned" +ELSE text "SLOWBRO turned" +ENDC line "away..." done _CeruleanCityText_1977e:: ; a52bb (29:52bb) +IF DEF(_YELLOW) + text "ELECTRODE" +ELSE text "SLOWBRO" +ENDC line "ignored orders..." done diff --git a/text/maps/cerulean_gym.asm b/text/maps/cerulean_gym.asm index b0d2d3d143..f4234fc489 100755 --- a/text/maps/cerulean_gym.asm +++ b/text/maps/cerulean_gym.asm @@ -2,6 +2,11 @@ _CeruleanGymText_5c7be:: ; 989c1 (26:49c1) 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" @@ -10,11 +15,21 @@ _CeruleanGymText_5c7be:: ; 989c1 (26:49c1) 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) @@ -35,7 +50,11 @@ _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" @@ -55,8 +74,13 @@ _CeruleanGymText_5c7d3:: ; 98b90 (26:4b90) done _CeruleanGymText_5c7d8:: ; 98bb0 (26:4bb0) +IF DEF(_YELLOW) + text "I can't" + line "believe I lost!" +ELSE text "Wow!" line "You're too much!" +ENDC para "All right!" @@ -125,7 +149,11 @@ _CeruleanGymText_5c82f:: ; 98db0 (26:4db0) 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_trade_house.asm b/text/maps/cerulean_trade_house.asm index 78c9f76ad6..c22f24a97d 100755 --- a/text/maps/cerulean_trade_house.asm +++ b/text/maps/cerulean_trade_house.asm @@ -1,3 +1,42 @@ +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) text "My husband likes" line "trading #MON." @@ -7,4 +46,3 @@ _CeruleanHouse1Text1:: ; 9888c (26:488c) cont "you please trade" cont "with him?" done - diff --git a/text/maps/cinnabar_island.asm b/text/maps/cinnabar_island.asm index dea97d1053..897368d274 100755 --- a/text/maps/cinnabar_island.asm +++ b/text/maps/cinnabar_island.asm @@ -13,7 +13,11 @@ _CinnabarIslandText1:: ; a61e6 (29:61e6) _CinnabarIslandText2:: ; a622a (29:622a) text "Scientists conduct" line "experiments in" +IF DEF(_YELLOW) + cont "the burned-out" +ELSE cont "the burned out" +ENDC cont "building." done diff --git a/text/maps/copycats_house_1f.asm b/text/maps/copycats_house_1f.asm index 0af104a4ba..da99566bb7 100755 --- a/text/maps/copycats_house_1f.asm +++ b/text/maps/copycats_house_1f.asm @@ -16,6 +16,10 @@ _CopycatsHouse1FText2:: ; a1535 (28:5535) done _CopycatsHouse1FText3:: ; a1596 (28:5596) +IF DEF(_YELLOW) + text "CHANSEY: Chaan" + line "sey!@@" +ELSE text "CHANSEY: Chaan!" line "Sii!@@" - +ENDC diff --git a/text/maps/daycare_2.asm b/text/maps/daycare_2.asm index ac9720bab8..c6478a764e 100755 --- a/text/maps/daycare_2.asm +++ b/text/maps/daycare_2.asm @@ -3,7 +3,11 @@ _DayCareMText_56437:: ; 8c000 (23:4000) line "@@" _DayCareMText_5643b:: ; 8c013 (23:4013) +IF DEF(_YELLOW) + text "Come again." +ELSE text "come again." +ENDC done _DayCareMText_56440:: ; 8c020 (23:4020) diff --git a/text/maps/fan_club.asm b/text/maps/fan_club.asm index b623fa4a0e..bb1ca0f0a3 100755 --- a/text/maps/fan_club.asm +++ b/text/maps/fan_club.asm @@ -1,15 +1,35 @@ 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!" @@ -25,9 +45,22 @@ 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:: @@ -38,8 +71,14 @@ 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" @@ -47,8 +86,13 @@ FanClubMeetChairText:: 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 @@ -125,8 +169,43 @@ 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 text "Our Chairman is" +ENDC line "very vocal about" cont "#MON." done diff --git a/text/maps/fighting_dojo.asm b/text/maps/fighting_dojo.asm index 6f01e5fa2c..9cf7ba4e72 100755 --- a/text/maps/fighting_dojo.asm +++ b/text/maps/fighting_dojo.asm @@ -114,13 +114,21 @@ _FightingDojoAfterBattleText4:: ; a1b1a (28:5b1a) _WantHitmonleeText:: ; a1b4a (28:5b4a) text "You want the" +IF DEF(_YELLOW) + line "hard-kicking" +ELSE line "hard kicking" +ENDC cont "HITMONLEE?" done _WantHitmonchanText:: ; a1b70 (28:5b70) text "You want the" +IF DEF(_YELLOW) + line "piston-punching" +ELSE line "piston punching" +ENDC cont "HITMONCHAN?" done diff --git a/text/maps/fuchsia_city.asm b/text/maps/fuchsia_city.asm index aa35c16d74..bcb80d0e2e 100755 --- a/text/maps/fuchsia_city.asm +++ b/text/maps/fuchsia_city.asm @@ -58,7 +58,11 @@ _FuchsiaCityText18:: ; a6011 (29:6011) cont "LEADER: KOGA" para "The Poisonous" +IF DEF(_YELLOW) + line "Ninja Master!" +ELSE line "Ninja Master" +ENDC done _FuchsiaCityChanseyText:: ; a6050 (29:6050) diff --git a/text/maps/hall_of_fame.asm b/text/maps/hall_of_fame.asm index ab5b9b15b7..cb0cc6227f 100755 --- a/text/maps/hall_of_fame.asm +++ b/text/maps/hall_of_fame.asm @@ -1,6 +1,10 @@ _HallofFameRoomText1:: ; 85fb5 (21:5fb5) text "OAK: Er-hem!" +IF DEF(_YELLOW) + line "Congratulations," +ELSE line "Congratulations" +ENDC cont $52, "!" para "This floor is the" diff --git a/text/maps/lance.asm b/text/maps/lance.asm index 1da4e8f15f..35ef354636 100755 --- a/text/maps/lance.asm +++ b/text/maps/lance.asm @@ -1,6 +1,10 @@ _LanceBeforeBattleText:: ; 85d3c (21:5d3c) text "Ah! I heard about" +IF DEF(_YELLOW) + line "you, ", $52, "!" +ELSE line "you ", $52, "!" +ENDC para "I lead the ELITE" line "FOUR! You can" diff --git a/text/maps/mt_moon_1f.asm b/text/maps/mt_moon_1f.asm index ad9c859893..0577adf3cc 100755 --- a/text/maps/mt_moon_1f.asm +++ b/text/maps/mt_moon_1f.asm @@ -115,6 +115,9 @@ _MtMoon1AfterBattleText8:: ; 80901 (20:4901) _MtMoon1Text14:: ; 8093a (20:493a) text "Beware! ZUBAT is" +IF DEF(_YELLOW) + line "a bloodsucker!" +ELSE line "a blood sucker!" +ENDC done - diff --git a/text/maps/mt_moon_b2f.asm b/text/maps/mt_moon_b2f.asm index f8357f00a3..648238714e 100755 --- a/text/maps/mt_moon_b2f.asm +++ b/text/maps/mt_moon_b2f.asm @@ -1,3 +1,26 @@ +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) text "You want the" line "DOME FOSSIL?" @@ -120,4 +143,3 @@ _MtMoon3AfterBattleText5:: ; 80c46 (20:4c46) line "here long before" cont "people came." done - diff --git a/text/maps/museum_1f.asm b/text/maps/museum_1f.asm index f5f847d310..7371a3121a 100755 --- a/text/maps/museum_1f.asm +++ b/text/maps/museum_1f.asm @@ -72,7 +72,11 @@ _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" diff --git a/text/maps/museum_2f.asm b/text/maps/museum_2f.asm index 7594c7976c..46238725e2 100755 --- a/text/maps/museum_2f.asm +++ b/text/maps/museum_2f.asm @@ -33,6 +33,21 @@ _Museum2FText5:: ; 96911 (25:6911) 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) text "SPACE SHUTTLE" line "COLUMBIA" @@ -43,4 +58,3 @@ _Museum2FText7:: ; 9694b (25:694b) line "fell on MT.MOON." cont "(MOON STONE?)" done - diff --git a/text/maps/name_rater.asm b/text/maps/name_rater.asm index 4a81ecf15a..2baec7272e 100755 --- a/text/maps/name_rater.asm +++ b/text/maps/name_rater.asm @@ -43,7 +43,11 @@ _NameRaterText_1dac7:: ; 9a404 (26:6404) done _NameRaterText_1dacc:: ; 9a44c (26:644c) +IF DEF(_YELLOW) + text "Fine! Come any-" +ELSE text "Fine! Come any" +ENDC line "time you like!" done diff --git a/text/maps/oaks_lab.asm b/text/maps/oaks_lab.asm index 2f45556258..26e576c9ca 100755 --- a/text/maps/oaks_lab.asm +++ b/text/maps/oaks_lab.asm @@ -1,29 +1,60 @@ _OaksLabGaryText1:: ; 94d5b (25:4d5b) - text $53, ": Yo" - line $52, "! Gramps" + text $53,": Yo" + line $52,"! 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) - text $53, ": Heh, I" +IF DEF(_YELLOW) + text $53,": Humph!" + line "I'll get a better" + cont "#MON than you!" + done +ELSE + text $53,": 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) - text $53, ": My" +IF DEF(_YELLOW) + text $53,": Heh, my" +ELSE + text $53,": My" +ENDC 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 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) text "So! You want the" @@ -71,14 +102,26 @@ _OaksLabText_1d2f5:: ; 94ef8 (25:4ef8) 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, "," line "raise your young" cont "#MON by making" cont "it fight!" done +ENDC _OaksLabDeliverParcelText1:: ; 94f69 (25:4f69) text "OAK: Oh, ", $52, "!" @@ -104,7 +147,15 @@ _OaksLabDeliverParcelText2:: ; 9500f (25:500f) 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) @@ -133,7 +184,12 @@ _OaksLabGivePokeballsText2:: ; 950f2 (25:50f2) 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!" @@ -188,6 +244,29 @@ _OaksLabRivalWaitingText:: ; 952bb (25:52bb) 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, "?" line "Let me think..." @@ -214,6 +293,7 @@ _OaksLabChooseMonText:: ; 952df (25:52df) cont "but you can have" cont "one! Choose!" done +ENDC _OaksLabRivalInterjectionText:: ; 953dc (25:53dc) text $53, ": Hey!" @@ -222,10 +302,70 @@ _OaksLabRivalInterjectionText:: ; 953dc (25:53dc) done _OaksLabBePatientText:: ; 953fc (25:53fc) +IF DEF(_YELLOW) + text "OAK: Be patient," + line $53,", I'll give" + cont "you one later." + done +ELSE text "OAK: Be patient!" line $53, ", 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) text "OAK: Hey! Don't go" @@ -275,20 +415,64 @@ _OaksLabRivalToughenUpText:: ; 95502 (25:5502) line "Smell you later!" done +IF DEF(_YELLOW) +_OaksLabPikachuDislikesPokeballsText1:: + text "OAK: What?" + 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" 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 text "OAK: Oh right! I" line "have a request" cont "of you two." done +ENDC _OaksLabText24:: ; 955a8 (25:55a8) text "On the desk there" @@ -416,8 +600,13 @@ _OaksLabText_4421a:: ; 9596d (25:596d) done _OaksLabText_4421f:: ; 959b8 (25:59b8) +IF DEF(_YELLOW) + text "Oh! This is get-" + line "ting even better!" +ELSE text "Ho! This is geting" line "even better!" +ENDC done _OaksLabText_44224:: ; 959d9 (25:59d9) @@ -472,7 +661,11 @@ _OaksLabText_44247:: ; 95b39 (25:5b39) _OaksLabText_4424c:: ; 95b6f (25:5b6f) text "Your #DEX is" +IF DEF(_YELLOW) + line "fully complete!" +ELSE line "entirely complete!" +ENDC cont "Congratulations!" done diff --git a/text/maps/pewter_gym_2.asm b/text/maps/pewter_gym_2.asm index a503f75523..433fd649de 100755 --- a/text/maps/pewter_gym_2.asm +++ b/text/maps/pewter_gym_2.asm @@ -3,6 +3,23 @@ _PewterGymText_5c4a3:: ; 98000 (26:4000) 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!" @@ -11,6 +28,7 @@ _PewterGymText_5c4a3:: ; 98000 (26:4000) line "CERULEAN and test" cont "your abilities!" done +ENDC _TM34PreReceiveText:: ; 98092 (26:4092) text "Wait! Take this" @@ -72,7 +90,11 @@ _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) @@ -141,3 +163,18 @@ _PewterGymText_5c529:: ; 9849f (26:449f) 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_mart.asm b/text/maps/pewter_mart.asm index a33974dbed..71760b7b77 100755 --- a/text/maps/pewter_mart.asm +++ b/text/maps/pewter_mart.asm @@ -1,5 +1,9 @@ _PewterMartText_74cc6:: ; 985ac (26:45ac) +IF DEF(_YELLOW) + text "A shady old man" +ELSE text "A shady, old man" +ENDC line "got me to buy" cont "this really weird" cont "fish #MON!" diff --git a/text/maps/pewter_pokecenter.asm b/text/maps/pewter_pokecenter.asm index 4493c079a7..114fed16c6 100755 --- a/text/maps/pewter_pokecenter.asm +++ b/text/maps/pewter_pokecenter.asm @@ -8,8 +8,22 @@ _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) text "JIGGLYPUFF: Puu" line "pupuu!" done - diff --git a/text/maps/pokemon_tower_7f.asm b/text/maps/pokemon_tower_7f.asm index 235fc218a5..2c1449b107 100755 --- a/text/maps/pokemon_tower_7f.asm +++ b/text/maps/pokemon_tower_7f.asm @@ -1,4 +1,30 @@ -_PokemonTower7Text_60ec4:: ; 99c1a (26:5c1a) +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) text "MR.FUJI: Heh? You" line "came to save me?" diff --git a/text/maps/reds_house_1f.asm b/text/maps/reds_house_1f.asm index 6bdc12b028..d352a6a08f 100755 --- a/text/maps/reds_house_1f.asm +++ b/text/maps/reds_house_1f.asm @@ -1,7 +1,7 @@ _MomWakeUpText:: text "MOM: Right." line "All kids leave" - cont "home some day." + cont "home someday." cont "It said so on TV." para "PROF.OAK, next" @@ -10,10 +10,22 @@ _MomWakeUpText:: 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,"!" line "You should take a" cont "quick rest." prompt +ENDC _MomHealText2:: text "MOM: Oh good!" diff --git a/text/maps/rocket_hideout_b4f.asm b/text/maps/rocket_hideout_b4f.asm index ecf01ec88c..e069e4a975 100755 --- a/text/maps/rocket_hideout_b4f.asm +++ b/text/maps/rocket_hideout_b4f.asm @@ -1,3 +1,28 @@ +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) text "So! I must say, I" line "am impressed you" diff --git a/text/maps/route_10.asm b/text/maps/route_10.asm index f6e4e394e3..795f7e692d 100755 --- a/text/maps/route_10.asm +++ b/text/maps/route_10.asm @@ -33,7 +33,11 @@ _Route10AfterBattleText2:: ; 8e6f5 (23:66f5) done _Route10BattleText3:: ; 8e71c (23:671c) +IF DEF(_YELLOW) + text "Hi, kid, want to" +ELSE text "Hi kid, want to" +ENDC line "see my #MON?" done diff --git a/text/maps/route_12.asm b/text/maps/route_12.asm index ef71d2795c..12925104de 100755 --- a/text/maps/route_12.asm +++ b/text/maps/route_12.asm @@ -109,7 +109,11 @@ _Route12EndBattleText6:: ; 90318 (24:4318) _Route12AfterBattleText6:: ; 90329 (24:4329) 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) diff --git a/text/maps/route_12_gate_upstairs.asm b/text/maps/route_12_gate_upstairs.asm index 3d22e3894f..3e8fb60cb1 100755 --- a/text/maps/route_12_gate_upstairs.asm +++ b/text/maps/route_12_gate_upstairs.asm @@ -5,7 +5,11 @@ _TM39PreReceiveText:: ; 8c86b (23:486b) 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) diff --git a/text/maps/route_14.asm b/text/maps/route_14.asm index d58630a840..b542274ea8 100755 --- a/text/maps/route_14.asm +++ b/text/maps/route_14.asm @@ -10,7 +10,11 @@ _Route14EndBattleText1:: ; 9083f (24:483f) prompt _Route14AfterBattleText1:: ; 90851 (24:4851) +IF DEF(_YELLOW) + text "You have some HMs," +ELSE text "You have some HMs" +ENDC line "right? #MON" cont "can't ever forget" cont "those moves." diff --git a/text/maps/route_16.asm b/text/maps/route_16.asm index d98aaa12a6..ec77ec6fd3 100755 --- a/text/maps/route_16.asm +++ b/text/maps/route_16.asm @@ -19,7 +19,11 @@ _Route16BattleText2:: ; 910d7 (24:50d7) done _Route16EndBattleText2:: ; 910f1 (24:50f1) +IF DEF(_YELLOW) + text "Knock-" +ELSE text "Knock" +ENDC line "out!" prompt diff --git a/text/maps/route_17.asm b/text/maps/route_17.asm index d07c3a860f..b053b47339 100755 --- a/text/maps/route_17.asm +++ b/text/maps/route_17.asm @@ -133,7 +133,11 @@ _Route17AfterBattleText9:: ; 915dd (24:55dd) done _Route17BattleText10:: ; 91600 (24:5600) +IF DEF(_YELLOW) + text "Get lost, kid!" +ELSE text "Get lost kid!" +ENDC line "I'm bushed!" done diff --git a/text/maps/route_22.asm b/text/maps/route_22.asm index 5ce0b87944..9935ce80d7 100755 --- a/text/maps/route_22.asm +++ b/text/maps/route_22.asm @@ -59,9 +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" cont "warm up for" +ENDC cont "#MON LEAGUE!" para "Come on!" diff --git a/text/maps/route_25.asm b/text/maps/route_25.asm index fb65cad867..d73611f2df 100755 --- a/text/maps/route_25.asm +++ b/text/maps/route_25.asm @@ -1,3 +1,33 @@ +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) text "Local trainers" line "come here to" @@ -56,8 +86,13 @@ _Route25BattleText4:: ; 94369 (25:4369) done _Route25EndBattleText4:: ; 94385 (25:4385) +IF DEF(_YELLOW) + text "I'm in" + line "a slump!" +ELSE text "I was in" line "bad condition!" +ENDC prompt _Route25AfterBattleText4:: ; 9439e (25:439e) diff --git a/text/maps/route_3.asm b/text/maps/route_3.asm index 248a11dd5f..95612425cb 100755 --- a/text/maps/route_3.asm +++ b/text/maps/route_3.asm @@ -66,8 +66,13 @@ _Route3BattleText4:: ; 8d924 (23:5924) _Route3EndBattleText4:: ; 8d944 (23:5944) 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) diff --git a/text/maps/route_6.asm b/text/maps/route_6.asm index 7d0a6097c4..3a54f4618f 100755 --- a/text/maps/route_6.asm +++ b/text/maps/route_6.asm @@ -1,3 +1,38 @@ +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" @@ -24,6 +59,7 @@ _Route6EndBattleText2:: ; 8dcb3 (23:5cb3) text "Ugh!" line "I hate losing!" prompt +ENDC _Route6BattleText3:: ; 8dcc8 (23:5cc8) text "There aren't many" diff --git a/text/maps/route_8.asm b/text/maps/route_8.asm index 1f3f74fdce..62e2aff31a 100755 --- a/text/maps/route_8.asm +++ b/text/maps/route_8.asm @@ -104,7 +104,11 @@ _Route8EndBattleText7:: ; 8e116 (23:6116) prompt _Route8AfterBattleText7:: ; 8e12a (23:612a) +if DEF(_YELLOW) + text "SAFFRON's gate-" +ELSE text "SAFFRON's gate" +ENDC line "keeper won't let" cont "us through." cont "He's so mean!" diff --git a/text/maps/route_9.asm b/text/maps/route_9.asm index 978a5a3f66..353eb7792d 100755 --- a/text/maps/route_9.asm +++ b/text/maps/route_9.asm @@ -15,6 +15,23 @@ _Route9AfterBattleText1:: ; 8e2c8 (23:62c8) 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) text "Who's that walking" line "with those good" diff --git a/text/maps/safari_zone_entrance.asm b/text/maps/safari_zone_entrance.asm index 119d23019e..79f70ea4a9 100755 --- a/text/maps/safari_zone_entrance.asm +++ b/text/maps/safari_zone_entrance.asm @@ -92,3 +92,49 @@ _SafariZoneEntranceText_753f0:: ; 9e993 (27:6993) 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/saffron_gates.asm b/text/maps/saffron_gates.asm index 0212a7dd99..b7db175127 100755 --- a/text/maps/saffron_gates.asm +++ b/text/maps/saffron_gates.asm @@ -3,7 +3,11 @@ _SaffronGateText_1dfe7:: ; 8aa5c (22:6a5c) 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 @@ -18,7 +22,11 @@ _SaffronGateText_8aaa9:: ; 8aaa9 (22:6aa9) _SaffronGateText_1dff1:: ; 8aaef (22:6aef) db $0 para "..." +IF DEF(_YELLOW) + line "Glug, glug..." +ELSE line "Glug glug..." +ENDC cont "..." cont "Gulp..." cont "If you want to go" diff --git a/text/maps/saffron_gym.asm b/text/maps/saffron_gym.asm index d85e1b1ac1..3236c7b2e4 100755 --- a/text/maps/saffron_gym.asm +++ b/text/maps/saffron_gym.asm @@ -131,8 +131,12 @@ _SaffronGymEndBattleText2:: ; a2002 (28:6002) _SaffronGymAfterBattleText2:: ; a2019 (28:6019) text "Psychic #MON" +IF DEF(_YELLOW) + line "fear only bugs!" +ELSE line "fear only ghosts" cont "and bugs!" +ENDC done _SaffronGymBattleText3:: ; a2042 (28:6042) diff --git a/text/maps/school.asm b/text/maps/school.asm index ce0c017512..9bdd900498 100755 --- a/text/maps/school.asm +++ b/text/maps/school.asm @@ -4,6 +4,14 @@ _SchoolText1:: ; 95d15 (25:5d15) 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) text "Okay!" @@ -11,4 +19,3 @@ _SchoolText2:: ; 95d40 (25:5d40) line "the blackboard" cont "carefully!" done - diff --git a/text/maps/silph_co_10f.asm b/text/maps/silph_co_10f.asm index a5a3877e97..75aa60039a 100755 --- a/text/maps/silph_co_10f.asm +++ b/text/maps/silph_co_10f.asm @@ -41,3 +41,28 @@ _SilphCo10AfterBattleText2:: ; 84e66 (21:4e66) 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 caacd757b8..3dbeee95a5 100755 --- a/text/maps/silph_co_11f.asm +++ b/text/maps/silph_co_11f.asm @@ -58,7 +58,11 @@ _SilphCo11Text2:: ; 8502f (21:502f) done _SilphCo11Text3:: ; 85075 (21:5075) +IF DEF(_YELLOW) + text "Ah, ", $52, "!" +ELSE text "Ah ", $52, "!" +ENDC line "So we meet again!" para "The PRESIDENT and" @@ -70,7 +74,11 @@ _SilphCo11Text3:: ; 85075 (21:5075) 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 diff --git a/text/maps/silph_co_2f.asm b/text/maps/silph_co_2f.asm index 8096d806e5..4437880c0c 100755 --- a/text/maps/silph_co_2f.asm +++ b/text/maps/silph_co_2f.asm @@ -72,7 +72,11 @@ _SilphCo2EndBattleText3:: ; 8260f (20:660f) prompt _SilphCo2AfterBattleText3:: ; 82617 (20:6617) +IF DEF(_YELLOW) + text "Diamond-shaped" +ELSE text "Diamond shaped" +ENDC line "tiles are" cont "teleport blocks!" diff --git a/text/maps/silph_co_5f_1.asm b/text/maps/silph_co_5f_1.asm index 8a406e677e..7435c91074 100755 --- a/text/maps/silph_co_5f_1.asm +++ b/text/maps/silph_co_5f_1.asm @@ -47,6 +47,10 @@ _SilphCo5AfterBattleText3:: ; 82a43 (20:6a43) _SilphCo5BattleText4:: ; 82a81 (20:6a81) 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_7f.asm b/text/maps/silph_co_7f.asm index b3c92aaf8f..5b56ad4388 100755 --- a/text/maps/silph_co_7f.asm +++ b/text/maps/silph_co_7f.asm @@ -79,7 +79,11 @@ _SilphCo7Text_51e4b:: done _SilphCo7BattleText1:: ; 846ff (21:46ff) +IF DEF(_YELLOW) + text "Aha! I smell a" +ELSE text "Oh ho! I smell a" +ENDC line "little rat!" done @@ -167,7 +171,11 @@ _SilphCo7Text_51ec3:: ; 848a2 (21:48a2) done _SilphCo7Text_51ec8:: ; 8494a (21:494a) +IF DEF(_YELLOW) + text "Oh-oh!" +ELSE text "Oh ho!" +ENDC line "So, you are ready" cont "for BOSS ROCKET!" prompt diff --git a/text/maps/ss_anne_6.asm b/text/maps/ss_anne_6.asm index 5909c8b960..59828a5160 100755 --- a/text/maps/ss_anne_6.asm +++ b/text/maps/ss_anne_6.asm @@ -47,7 +47,11 @@ _SSAnne6Text_61807:: ; 81203 (20:5203) prompt _SSAnne6Text_6180c:: ; 81233 (20:5233) +IF DEF(_YELLOW) + text "Salade de Salmon!" +ELSE text "Salmon du Salad!" +ENDC para "Les guests may" line "gripe it's fish" diff --git a/text/maps/ss_anne_7.asm b/text/maps/ss_anne_7.asm index daef3e4a42..2a77046486 100755 --- a/text/maps/ss_anne_7.asm +++ b/text/maps/ss_anne_7.asm @@ -27,7 +27,11 @@ _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) @@ -40,7 +44,11 @@ _SSAnne7Text_61932:: ; 8141c (20:541c) 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 diff --git a/text/maps/ss_anne_9.asm b/text/maps/ss_anne_9.asm index e133fc2cc8..c96a758183 100755 --- a/text/maps/ss_anne_9.asm +++ b/text/maps/ss_anne_9.asm @@ -1,5 +1,9 @@ _SSAnne9Text_61bf2:: ; 81799 (20:5799) +IF DEF(_YELLOW) + text "In all my travels," +ELSE text "In all my travels" +ENDC line "I've never seen" cont "any #MON sleep" cont "like this one!" diff --git a/text/maps/vermilion_gym_1.asm b/text/maps/vermilion_gym_1.asm index 10868bd434..dfa452795b 100755 --- a/text/maps/vermilion_gym_1.asm +++ b/text/maps/vermilion_gym_1.asm @@ -1,4 +1,25 @@ _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 text "Hey, kid! What do" line "you think you're" cont "doing here?" @@ -18,5 +39,5 @@ _VermilionGymText_5cb6d:: ; 9aaa5 (26:6aa5) 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 2788d840de..ee7d14ee14 100755 --- a/text/maps/vermilion_gym_2.asm +++ b/text/maps/vermilion_gym_2.asm @@ -16,7 +16,11 @@ _VermilionGymText_5cb77:: ; 9c069 (27:4069) 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," diff --git a/text/maps/viridian_forest.asm b/text/maps/viridian_forest.asm index 9b0f6d9965..aa6ab4abf4 100755 --- a/text/maps/viridian_forest.asm +++ b/text/maps/viridian_forest.asm @@ -9,7 +9,11 @@ _ViridianForestText1:: ; 8031d (20:431d) _ViridianForestBattleText1:: ; 80359 (20:4359) 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) @@ -62,6 +66,42 @@ _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) text "I ran out of #" line "BALLs to catch" diff --git a/text/maps/viridian_forest_entrance.asm b/text/maps/viridian_forest_entrance.asm index dcba02b4ea..770f2b5b0a 100755 --- a/text/maps/viridian_forest_entrance.asm +++ b/text/maps/viridian_forest_entrance.asm @@ -6,9 +6,19 @@ _ViridianForestEntranceText1:: ; 8a868 (22:6868) 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 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_gym.asm b/text/maps/viridian_gym.asm index e1828c3206..10a2a5979f 100755 --- a/text/maps/viridian_gym.asm +++ b/text/maps/viridian_gym.asm @@ -38,7 +38,11 @@ _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) @@ -205,7 +209,11 @@ _ViridianGymEndBattleText8:: ; 96403 (25:6403) prompt _ViridianGymAfterBattleText8:: ; 96412 (25:6412) +IF DEF(_YELLOW) + text "You can go on to" +ELSE text "You can go onto" +ENDC line "#MON LEAGUE" cont "only by defeating" cont "our GYM LEADER!" diff --git a/text/maps/viridian_mart.asm b/text/maps/viridian_mart.asm index 6cddaeaf3e..ed3343f1f7 100755 --- a/text/maps/viridian_mart.asm +++ b/text/maps/viridian_mart.asm @@ -38,12 +38,23 @@ ViridianMartParcelQuestText:: ; 95c79 (25:5c79) line "OAK's PARCEL!@@" _ViridianMartText2:: ; 95cd5 (25:5cd5) +IF DEF(_YELLOW) + text "This shop sells a" + line "lot of PARLYZ" + cont "HEALs." +ELSE 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 text "No! POTIONs are" line "all sold out." +ENDC done - diff --git a/text/type_names.asm b/text/type_names.asm index 03448b2154..3bcd0013e4 100755 --- a/text/type_names.asm +++ b/text/type_names.asm @@ -1,69 +1,53 @@ -TypeNamePointers: ; 27dae (9:7dae) - dw Type00Name - dw Type01Name - dw Type02Name - dw Type03Name - dw Type04Name - dw Type05Name - dw Type06Name - dw Type07Name - dw Type08Name - dw Type09Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type00Name - dw Type14Name - dw Type15Name - dw Type16Name - dw Type17Name - dw Type18Name - dw Type19Name - dw Type1AName - dw Type1BName - dw Type1CName +TypeNames: -Type00Name: ; 27de4 (9:7de4) - db "NORMAL@" -Type01Name: ; 27deb (9:7deb) - db "FIGHTING@" -Type02Name: ; 27df4 (9:7df4) - db "FLYING@" -Type03Name: ; 27dfb (9:7dfb) - db "POISON@" -Type14Name: ; 27e02 (9:7e02) - db "FIRE@" -Type15Name: ; 27e07 (9:7e07) - db "WATER@" -Type16Name: ; 27e0d (9:7e0d) - db "GRASS@" -Type17Name: ; 27e13 (9:7e13) - db "ELECTRIC@" -Type18Name: ; 27e1c (9:7e1c) - db "PSYCHIC@" -Type19Name: ; 27e24 (9:7e24) - db "ICE@" -Type04Name: ; 27e28 (9:7e28) - db "GROUND@" -Type05Name: ; 27e2f (9:7e2f) - db "ROCK@" -Type06Name: ; 27e34 (9:7e34) - db "BIRD@" -Type07Name: ; 27e39 (9:7e39) - db "BUG@" -Type08Name: ; 27e3d (9:7e3d) - db "GHOST@" -Type1AName: ; 27e43 (9:7e43) - db "DRAGON@" -Type09Name: - db "STEEL@" -Type1BName: - db "DARK@" -Type1CName: - db "FAIRY@" + dw .Normal + dw .Fighting + dw .Flying + dw .Poison + dw .Ground + dw .Rock + dw .Bird + dw .Bug + dw .Ghost + dw .Steel + + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + dw .Normal ; Unused + + dw .Fire + dw .Water + dw .Grass + dw .Electric + dw .Psychic + dw .Ice + dw .Dragon + dw .Dark + dw .Fairy + +.Normal: db "NORMAL@" +.Fighting: db "FIGHTING@" +.Flying: db "FLYING@" +.Poison: db "POISON@" +.Fire: db "FIRE@" +.Water: db "WATER@" +.Grass: db "GRASS@" +.Electric: db "ELECTRIC@" +.Psychic: db "PSYCHIC@" +.Ice: db "ICE@" +.Ground: db "GROUND@" +.Rock: db "ROCK@" +.Bird: db "BIRD@" +.Bug: db "BUG@" +.Ghost: db "GHOST@" +.Dragon: db "DRAGON@" +.Steel: db "STEEL@" +.Dark: db "DARK@" +.Fairy: db "FAIRY@" diff --git a/version.asm b/version.asm deleted file mode 100755 index 6f80aa1cff..0000000000 --- a/version.asm +++ /dev/null @@ -1,20 +0,0 @@ -if !def(_RED) -_RED EQU 0 -endc - -if !def(_BLUE) -_BLUE EQU 0 -endc - -if !def(_JAPAN) -_JAPAN EQU 0 -endc - -if !def(_GREEN) -_GREEN EQU 0 -endc - -if !def(_YELLOW) -_YELLOW EQU 0 -endc - diff --git a/wram.asm b/wram.asm index 7e22f1249f..7091bd4c73 100755 --- a/wram.asm +++ b/wram.asm @@ -183,12 +183,21 @@ wTileMap:: ; c3a0 ; buffer for tiles that are visible on screen (20 columns by 18 rows) ds 20 * 18 +wSerialPartyMonsPatchList:: ; c508 +; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer + wTileMapBackup:: ; c508 ; buffer for temporarily saving and restoring current screen's tiles ; (e.g. if menus are drawn on top) - ds 20 * 18 +; ds 20 * 18 + + ds 200 - ds 120 +wSerialEnemyMonsPatchList:: ; c5d0 +; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer + ds 200 + + ds 80 wTempPic:: wOverworldMap:: ; c6e8 @@ -247,7 +256,9 @@ wMenuJoypadPollCount:: ; cc34 ; how many times should HandleMenuInput poll the joypad state before it returns? ds 1 -wcc35:: ds 1 +wMenuItemToSwap:: ; cc35 +; id of menu item selected for swapping (counts from 1) (0 means that no menu item has been selected for swapping) + ds 1 wListScrollOffset:: ; cc36 ; offset of the current top menu item from the beginning of the list @@ -255,16 +266,59 @@ wListScrollOffset:: ; cc36 ds 1 wcc37:: ds 1 -wcc38:: ds 2 + +wTradeCenterPointerTableIndex:: ; cc38 + ds 1 + + ds 1 + wcc3a:: ds 1 wcc3b:: ds 1 -wcc3c:: ds 1 + +wDoNotWaitForButtonPressAfterDisplayingText:: ; cc3c +; if non-zero, skip waiting for a button press after displaying text in DisplayTextID + ds 1 + +wSerialSyncAndExchangeNybbleReceiveData:: ; cc3d +; the final received nybble is stored here by Serial_SyncAndExchangeNybble + +wSerialExchangeNybbleTempReceiveData:: ; cc3d +; temporary nybble used by Serial_ExchangeNybble + +wLinkMenuSelectionReceiveBuffer:: ; cc3d +; two byte buffer +; the received menu selection is stored twice + wcc3d:: ds 1 -wcc3e:: ds 4 -wcc42:: ds 1 -wcc43:: ds 4 + +wSerialExchangeNybbleReceiveData:: ; cc3e +; the final received nybble is stored here by Serial_ExchangeNybble + ds 1 + + ds 3 + +wSerialExchangeNybbleSendData:: ; cc42 +; this nybble is sent when using Serial_SyncAndExchangeNybble or Serial_ExchangeNybble + +wLinkMenuSelectionSendBuffer:: ; cc42 +; two byte buffer +; the menu selection byte is stored twice before sending + + ds 5 + +wLinkTimeoutCounter:: ; cc47 +; 1 byte + +wUnknownSerialCounter:: ; cc47 +; 2 bytes + wcc47:: ds 1 wcc48:: ds 1 + +wWhichTradeMonSelectionMenu:: ; cc49 +; $00 = player mons +; $01 = enemy mons + wcc49:: ds 1 wMenuWrappingEnabled:: ; cc4a @@ -285,8 +339,16 @@ wTrainerHeaderFlagBit:: ; cc55 ds 1 -wcc57:: ds 1 -wcc58:: ds 3 +wNPCMovementScriptPointerTableNum:: ; cc57 +; which NPC movement script pointer is being used +; 0 if an NPC movement script is not running + ds 1 + +wNPCMovementScriptBank:: ; cc58 +; ROM bank of current NPC movement script + ds 1 + + ds 2 wHallOfFame:: ; cc5b wcc5b:: ds 1 @@ -296,12 +358,23 @@ wcc5e:: ds 13 wcc6b:: ds 14 wcc79:: ds 30 -wcc97:: ds 10 + +wNPCMovementDirections2:: ; cc97 + +wSwitchPartyMonTempBuffer:: ; cc97 +; temporary buffer when swapping party mon data + ds 10 + wcca1:: ds 49 wRLEByteCount:: ; ccd2 ds 1 +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 wccd5:: ds 2 @@ -323,7 +396,8 @@ wPlayerSelectedMove:: ; ccdc wEnemySelectedMove:: ; ccdd ds 1 -wccde:: ds 1 +wLinkBattleRandomNumberListIndex:: ; ccde + ds 1 wAICount:: ; ccdf ; number of times remaining that AI action can occur @@ -336,30 +410,68 @@ wEnemyMoveListIndex:: ; cce2 wcce3:: ds 1 wcce4:: ds 1 -wcce5:: ds 2 -wcce7:: ds 1 -wcce8:: ds 1 -wcce9:: ds 2 + +wTotalPayDayMoney:: ; cce5 +; total amount of money made using Pay Day during the current battle + ds 3 + +wSafariEscapeFactor:: ; cce8 + ds 1 +wSafariBaitFactor:: ; cce9 + ds 1; + + ds 1 + wcceb:: ds 1 wccec:: ds 1 wcced:: ds 1 wccee:: ds 1 wccef:: ds 1 wccf0:: ds 1 -wccf1:: ds 1 -wccf2:: ds 1 +wPlayerUsedMove:: ds 1 +wEnemyUsedMove:: ds 1 wccf3:: ds 1 wccf4:: ds 1 -wccf5:: ds 1 + +wPartyFoughtCurrentEnemyFlags:: +; flags that indicate which party members have fought the current enemy mon + flag_array 6 + wccf6:: ds 1 wccf7:: ds 14 -wcd05:: ds 1 -wcd06:: ds 9 -wcd0f:: ds 1 -wcd10:: ds 1 -wcd11:: ds 1 -wcd12:: ds 1 -wcd13:: ds 7 + +wUnknownSlotVar:: ; cd05 + +wEnemyNumHits:: ; cd05 +; number of hits by enemy in attacks like Double Slap, etc. + +wEnemyBideAccumulatedDamage:: ; cd05 +; the amount of damage accumulated by the enemy while biding (2 bytes) + +ds 10 + +wInGameTradeGiveMonSpecies:: ; cd0f + +wPlayerMonUnmodifiedLevel:: ; cd0f + ds 1 + +wInGameTradeTextPointerTablePointer:: ; cd10 + +wPlayerMonUnmodifiedMaxHP:: ; cd10 + ds 2 + +wInGameTradeTextPointerTableIndex:: ; cd12 + +wPlayerMonUnmodifiedAttack:: ; cd12 + ds 1 +wInGameTradeGiveMonName:: ; cd13 + ds 1 +wPlayerMonUnmodifiedDefense:: ; cd14 + ds 2 +wPlayerMonUnmodifiedSpeed:: ; cd16 + ds 2 +wPlayerMonUnmodifiedSpecial:: ; cd18 + ds 2 ; stat modifiers for the player's current pokemon ; value can range from 1 - 13 ($1 to $D) @@ -374,6 +486,9 @@ wPlayerMonSpeedMod:: ; cd1c ds 1 wPlayerMonSpecialMod:: ; cd1d ds 1 + +wInGameTradeReceiveMonName:: ; cd1e + wPlayerMonAccuracyMod:: ; cd1e ds 1 wPlayerMonEvasionMod:: ; cd1f @@ -381,9 +496,22 @@ wPlayerMonEvasionMod:: ; cd1f ds 3 -wcd23:: ds 3 -wcd26:: ds 3 -wcd29:: ds 4 +wEnemyMonUnmodifiedLevel:: ; cd23 + ds 1 +wEnemyMonUnmodifiedMaxHP:: ; cd24 + ds 2 +wEnemyMonUnmodifiedAttack:: ; cd26 + ds 2 +wEnemyMonUnmodifiedDefense:: ; cd28 + ds 1 + +wInGameTradeMonNick:: ; cd29 + ds 1 + +wEnemyMonUnmodifiedSpeed:: ; cd2a + ds 2 +wEnemyMonUnmodifiedSpecial:: ; cd2c + ds 1 wEngagedTrainerClass:: ; cd2d ds 1 @@ -408,26 +536,98 @@ wEnemyMonAccuracyMod:: ; cd32 wEnemyMonEvasionMod:: ; cd33 ds 1 -wcd34:: ds 3 +wInGameTradeReceiveMonSpecies:: + ds 1 + + ds 2 + +wNPCMovementDirections2Index:: ; cd37 + wcd37:: ds 1 -wcd38:: ds 1 -wcd39:: ds 1 -wcd3a:: ds 1 -wcd3b:: ds 2 + +wSimulatedJoypadStatesIndex:: ; cd38 +; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1 +; 0 if the joypad state is not being simulated + ds 1 + +wWastedByteCD39:: ; cd39 +; written to but nothing ever reads it + ds 1 + +wWastedByteCD3A:: ; cd3a +; written to but nothing ever reads it + ds 1 + +wOverrideSimulatedJoypadStatesMask:: ; cd3b +; mask indicating which real button presses can override simulated ones +; XXX is it ever not 0? + ds 1 + + ds 1 + +wTradedPlayerMonSpecies:: ; cd3d + +wTradingWhichPlayerMon:: ; cd3d + +wChangeBoxSavedMapTextPointer:: ; cd3d + +wFlyAnimUsingCoordList:: ; cd3d + +wPlayerSpinInPlaceAnimFrameDelay:: ; cd3d + +wPlayerSpinWhileMovingUpOrDownAnimDeltaY:: ; cd3d + +wHiddenObjectFunctionArgument:: ; cd3d + +wSubtrahend:: ; cd3d +; subtract (BCD) wSubtrahend, wSubtrahend+1, wSubtrahend+2 wWhichTrade:: ; cd3d ; which entry from TradeMons to select -; ds 1 wTrainerSpriteOffset:: ; cd3d ds 1 + +wTradedEnemyMonSpecies:: ; cd3e + +wTradingWhichEnemyMon:: ; cd3e + +wFlyAnimCounter:: ; cd3e + +wPlayerSpinInPlaceAnimFrameDelayDelta:: ; cd3e + +wPlayerSpinWhileMovingUpOrDownAnimMaxY:: ; cd3e + +wHiddenObjectFunctionRomBank:: ; cd3e + wTrainerEngageDistance:: ; cd3e ds 1 + +wNameOfPlayerMonToBeTraded:: ; cd3f + +wFlyAnimBirdSpriteImageIndex:: ; cd3f + +wPlayerSpinInPlaceAnimFrameDelayEndValue:: ; cd3f + +wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f + +wHiddenObjectIndex:: ; cd3f + wTrainerFacingDirection:: ; cd3f wcd3f:: ds 1 + +wPlayerSpinInPlaceAnimSoundID:: ; cd40 + +wHiddenObjectY:: ; cd40 + wTrainerScreenY:: ; cd40 ds 1 + +wTradedPlayerMonOT:: ; cd41 + +wHiddenObjectX:: ; cd41 + wTrainerScreenX:: ; cd41 ds 1 @@ -441,13 +641,21 @@ wcd48:: ds 1 wcd49:: ds 1 wcd4a:: ds 1 wcd4b:: ds 1 + +wTradedPlayerMonOTID:: ; cd4c + wcd4c:: ds 1 wcd4d:: ds 1 + +wTradedEnemyMonOT:: ; cd4e + wcd4e:: ds 1 wcd4f:: ds 1 wcd50:: ds 9 -wcd59:: ds 1 -wcd5a:: ds 1 + +wTradedEnemyMonOTID:: ; cd59 + ds 2 + wcd5b:: ds 1 wcd5c:: ds 1 wcd5d:: ds 1 @@ -456,6 +664,9 @@ wcd5f:: ds 1 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 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 @@ -473,6 +684,9 @@ wcd72:: ds 5 wcd77:: ds 1 wcd78:: ds 9 +wSerialOtherGameboyRandomNumberListBlock:: ; cd81 +; buffer for transferring the random number list generated by the other gameboy + wTileMapBackup2:: ; cd81 ; second buffer for temporarily saving and restoring current screen's tiles (e.g. if menus are drawn on top) ds 20 * 18 @@ -505,18 +719,31 @@ wAnimSoundID:: ; cf07 wcf08:: ds 1 wcf09:: ds 1 wcf0a:: ds 1 -wcf0b:: ds 1 -wcf0c:: ds 1 +wBattleResult:: ; cf0b +; $00 - win +; $01 - lose +; $02 - draw + ds 1 + +wAutoTextBoxDrawingControl:: ; cf0c +; bit 0: if set, DisplayTextID automatically draws a text box + ds 1 + wcf0d:: ds 1 wcf0e:: ds 1 wcf0f:: ds 1 -wcf10:: ds 1 + +wNPCMovementScriptFunctionNum:: ; cf10 +; which script function within the pointer table indicated by +; wNPCMovementScriptPointerTableNum + ds 1 + wcf11:: ds 1 wPredefParentBank:: ; cf12 ds 1 -wcf13:: ds 1 +wSpriteIndex:: ds 1 wCurSpriteMovement2:: ; cf14 ; movement byte 2 of current sprite @@ -524,13 +751,19 @@ wCurSpriteMovement2:: ; cf14 ds 2 -wcf17:: ds 1 +wNPCMovementScriptSpriteOffset:: ; cf17 +; sprite offset of sprite being controlled by NPC movement script + ds 1 + wcf18:: ds 2 wGBC:: ; cf1a ds 1 -wcf1b:: ds 1 +wOnSGB:: ; cf1b +; if running on SGB, it's 1, else it's 0 + ds 1 + wcf1c:: ds 1 wcf1d:: ds 1 wcf1e:: ds 1 @@ -553,12 +786,15 @@ wStringBuffer2:: ; cf70 wStringBuffer3:: ; cf81 ds 9 + 1 -wcf8b:: ds 1 -wcf8c:: ds 1 +wList:: ; cf8b + ds 2 + wcf8d:: ds 1 wcf8e:: ds 1 -wcf8f:: ds 1 -wcf90:: ds 1 + +wItemPrices:: ; cf8f + ds 2 + wcf91:: ds 1 wWhichPokemon:: ; cf92 @@ -567,6 +803,12 @@ wWhichPokemon:: ; cf92 wcf93:: ds 1 +wHPBarType:: ; cf94 +; type of HP bar +; $00 = enemy HUD in battle +; $01 = player HUD in battle / status screen +; $02 = party menu + wListMenuID:: ; cf94 ; ID used by DisplayListMenuID ds 1 @@ -574,30 +816,24 @@ wListMenuID:: ; cf94 wcf95:: ds 1 wcf96:: ds 1 wcf97:: ds 1 -wcf98:: ds 1 -wcf99:: ds 1 -wcf9a:: ds 1 -wcf9b:: ds 1 -wcf9c:: ds 4 -wcfa0:: ds 4 -wcfa4:: ds 2 -wcfa6:: ds 2 -wcfa8:: ds 7 -wcfaf:: ds 10 -wcfb9:: ds 1 -wcfba:: ds 1 -wcfbb:: ds 1 -wcfbc:: ds 2 -wcfbe:: ds 2 -wcfc0:: ds 2 -wcfc2:: ds 2 -wcfc4:: ds 1 + +; LoadMonData copies mon data here +wLoadedMon:: party_struct wLoadedMon ; cf98 + +wFontLoaded:: ; cfc4 +; bit 0: The space in VRAM that is used to store walk animation tile patterns +; for the player and NPCs is in use for font tile patterns. +; This means that NPC movement must be disabled. +; The other bits are unused. + ds 1 wWalkCounter:: ; cfc5 ; walk animation counter ds 1 -wcfc6:: ds 1 +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 @@ -606,7 +842,10 @@ wMusicHeaderPointer:: ; cfc7 wcfc8:: ds 1 wcfc9:: ds 1 wcfca:: ds 1 -wcfcb:: ds 1 + +wUpdateSpritesEnabled:: ; cfcb +; $01 enables UpdateSprites; anything else disables it + ds 1 W_ENEMYMOVENUM:: ; cfcc ds 1 @@ -660,7 +899,7 @@ wEnemyMonStatus:: db wEnemyMonType:: wEnemyMonType1:: db wEnemyMonType2:: db -wEnemyMonCatchRate:: db +wEnemyMonCatchRate_NotReferenced:: db wEnemyMonMoves:: ds NUM_MOVES wEnemyMonDVs:: ds 2 wEnemyMonLevel:: db @@ -673,9 +912,9 @@ wEnemyMonPP:: ds 2 ; NUM_MOVES - 2 SECTION "WRAM Bank 1", WRAMX, BANK[1] ds 2 ; NUM_MOVES - 2 -wd002:: ds 5 -wd007:: ds 1 -wd008:: ds 1 +wEnemyMonBaseStats:: ds 5 +wEnemyMonCatchRate:: ds 1 +wEnemyMonBaseExp:: ds 1 wBattleMonNick:: ds 11 ; d009 wBattleMon:: battle_struct wBattleMon ; d014 @@ -705,7 +944,8 @@ W_ISINBATTLE:: ; d057 ; trainer battle, this is 2 ds 1 -wPartyAliveFlags:: ; d058 +wPartyGainExpFlags:: ; d058 +; flags that indicate which party members should be be given exp when GainExperience is called flag_array 6 W_CUROPPONENT:: ; d059 @@ -730,13 +970,23 @@ W_TRAINERNO:: ; d05d ; which instance of [youngster, lass, etc] is this? ds 1 -wd05e:: ds 1 +wCriticalHitOrOHKO:: ; d05e +; $00 = normal attack +; $01 = critical hit +; $02 = successful OHKO +; $ff = failed OHKO + ds 1 W_MOVEMISSED:: ; d05f ds 1 -wd060:: ds 1 -wd061:: ds 1 +wPlayerStatsToDouble:: ; d060 +; always 0 + ds 1 + +wPlayerStatsToHalve:: ; d061 +; always 0 + ds 1 W_PLAYERBATTSTATUS1:: ; d062 ; bit 0 - bide @@ -766,8 +1016,13 @@ W_PLAYERBATTSTATUS3:: ; d064 ; bit 3 - tranformed ds 1 -wd065:: ds 1 -wd066:: ds 1 +wEnemyStatsToDouble:: ; d065 +; always 0 + ds 1 + +wEnemyStatsToHalve:: ; d066 +; always 0 + ds 1 W_ENEMYBATTSTATUS1:: ; d067 ds 1 @@ -776,8 +1031,12 @@ W_ENEMYBATTSTATUS2:: ; d068 W_ENEMYBATTSTATUS3:: ; d069 ds 1 -wd06a:: ds 1 -wd06b:: ds 1 +wPlayerNumAttacksLeft:: +; when the player is attacking multiple times, the number of attacks left + ds 1 + +W_PLAYERCONFUSEDCOUNTER:: ; wd06b + ds 1 W_PLAYERTOXICCOUNTER:: ; d06c ds 1 @@ -786,8 +1045,12 @@ W_PLAYERDISABLEDMOVE:: ; d06d ds 1 -wd06f:: ds 1 -wd070:: ds 1 +wEnemyNumAttacksLeft:: +; when the enemy is attacking multiple times, the number of attacks left + ds 1 + +W_ENEMYCONFUSEDCOUNTER:: ; wd070 + ds 1 W_ENEMYTOXICCOUNTER:: ; d071 ds 1 @@ -796,12 +1059,21 @@ W_ENEMYDISABLEDMOVE:: ; d072 ds 1 -W_NUMHITS:: ; d074 -; number of hits in attacks like Doubleslap, etc. +wPlayerNumHits:: ; d074 +; number of hits by player in attacks like Double Slap, etc. + +wPlayerBideAccumulatedDamage:: ; d074 +; the amount of damage accumulated by the player while biding (2 bytes) + +wUnknownSerialCounter2:: ; d075 +; 2 bytes + +ds 4 + +wEscapedFromBattle:: +; non-zero when an item or move that allows escape from battle was used ds 1 -wd075:: ds 3 -wd078:: ds 1 wd079:: ds 1 wd07a:: ds 1 wd07b:: ds 1 @@ -842,6 +1114,8 @@ W_NUMFBTILES:: ; d089 wd08a:: ds 1 +wTownMapSpriteBlinkingCounter:: ; d08b + W_SUBANIMTRANSFORM:: ; d08b ; controls what transformations are applied to the subanimation ; 01: flip horizontally and vertically @@ -850,18 +1124,15 @@ W_SUBANIMTRANSFORM:: ; d08b ; 04: reverse the subanimation ds 1 -W_PBSTOREDREGISTERH:: ; d08c - ds 1 -W_PBSTOREDREGISTERL:: ; d08d - ds 1 -W_PBSTOREDREGISTERD:: ; d08e - ds 1 -W_PBSTOREDREGISTERE:: ; d08f - ds 1 +wEndBattleWinTextPointer:: ; d08c + ds 2 + +wEndBattleLoseTextPointer:: ; d08e + ds 2 ds 2 -W_PBSTOREDROMBANK:: ; d092 +wEndBattleTextRomBank:: ; d092 ds 1 ds 1 @@ -876,6 +1147,11 @@ W_SUBANIMSUBENTRYADDR:: ; d096 ds 2 wd09a:: ds 1 + +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 W_FBDESTADDR:: ; d09c @@ -894,6 +1170,8 @@ W_FBMODE:: ; d09e ; contain the upper and lower bit of each of the 8 pixels, respectively ds 1 +wNewTileBlockID:: ; d09f + wd09f:: ds 1 wd0a0:: ds 1 @@ -946,7 +1224,7 @@ W_SPRITEDECODETABLE1PTR:: ; d0b3 wd0b5:: ds 1 -W_LISTTYPE:: ; d0b6 +wNameListType:: ; d0b6 ds 1 wPredefBank:: ; d0b7 @@ -1002,25 +1280,46 @@ W_MONHPADDING:: ; d0d7 W_DAMAGE:: ; d0d7 + ds 2 + +ds 2 + +wRepelRemainingSteps:: ; wd0db + ds 1 + +wMoves:: ; wd0dc +; list of moves for FormatMovesString + ds 4 + +wMoveNum:: ; d0e0 ds 1 -wd0d8:: ds 3 -wd0db:: ds 1 -wd0dc:: ds 4 -wd0e0:: ds 1 -wd0e1:: ds 56 +wMovesString:: ; d0e1 + ds 56 + wd119:: ds 1 -wd11a:: 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 -wd120:: 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 -wd125:: ds 1 + +wTextBoxID:: ; d125 + ds 1 + wd126:: ds 1 W_CURENEMYLVL:: ; d127 @@ -1030,10 +1329,10 @@ wd128:: ds 1 wd129:: ds 1 wd12a:: ds 1 -W_ISLINKBATTLE:: ; d12b +wLinkState:: ; d12b ds 1 -wd12c:: ds 1 +wTwoOptionMenuID:: ds 1 wd12d:: ds 1 wd12e:: ds 1 wd12f:: ds 1 @@ -1042,9 +1341,19 @@ wd131:: ds 1 wd132:: ds 1 wd133:: ds 6 wd139:: ds 1 -wd13a:: ds 1 -wd13b:: ds 1 -wd13c:: ds 1 + +wIgnoreInputCounter:: ; d13a +; counts downward each frame +; when it hits 0, bit 5 (ignore input bit) of wd730 is reset + ds 1 + +wStepCounter:: ; d13b +; counts down once every step + ds 1 + +wNumberOfNoRandomBattleStepsLeft:: ; d13c +; after a battle, you have at least 3 steps before a random battle can occur + ds 1 W_PRIZE1:: ; d13d ds 1 @@ -1055,10 +1364,20 @@ W_PRIZE3:: ; d13f ds 1 +wSerialRandomNumberListBlock:: ; d141 +; the first 7 bytes are the preamble + wd141:: ds 2 wd143:: ds 2 wd145:: ds 3 -wd148:: ds 10 + +wLinkBattleRandomNumberList:: ; d148 +; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex + ds 10 + +wSerialPlayerDataBlock:: ; d152 +; the first 6 bytes are the preamble + wd152:: ds 1 wd153:: ds 3 wd156:: ds 1 @@ -1131,13 +1450,18 @@ wPlayerID:: ; d359 wd35b:: ds 1 wd35c:: ds 1 -wd35d:: 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 ds 1 -wd35f:: ds 1 -wd360:: ds 1 +wCurrentTileBlockMapViewPointer:: ; d35f +; pointer to the upper left corner of the current view in the tile block map + ds 2 W_YCOORD:: ; d361 ; player’s position on the current map @@ -1249,32 +1573,51 @@ W_SPRITESETID:: ; d3a8 wd3a9:: ds 1 wd3aa:: ds 3 wd3ad:: ds 1 -wd3ae:: ds 1 -wd3af:: ds 128 -wd42f:: ds 129 + +wNumberOfWarps:: ; d3ae +; number of warps in current map + ds 1 + +wWarpEntries:: ; d3af +; current map warp entries + ds 128 + +wDestinationWarpID:: ; d42f +; if $ff, the player's coordinates are not updated when entering the map + ds 1 + + ds 128 + wd4b0:: ds 1 wd4b1:: ds 32 wd4d1:: ds 16 W_NUMSPRITES:: ; d4e1 ; number of sprites on the current map -; two bytes per sprite (movement byte 2 , text ID) ds 1 -wd4e2:: ds 1 -wd4e3:: ds 1 +; these two variables track the X and Y offset in blocks from the last special warp used +; they don't seem to be used for anything +wYOffsetSinceLastSpecialWarp:: ; d4e2 + ds 1 +wXOffsetSinceLastSpecialWarp:: ; d4e3 + ds 1 W_MAPSPRITEDATA:: ; d4e4 -; two bytes per sprite (trainer class/item ID , trainer set ID) +; two bytes per sprite (movement byte 2, text ID) ds 32 W_MAPSPRITEEXTRADATA:: ; d504 +; two bytes per sprite (trainer class/item ID, trainer set ID) ds 32 wd524:: ds 1 wd525:: ds 1 -wd526:: ds 1 -wd527:: 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 @@ -1546,7 +1889,14 @@ W_ROUTE18GATECURSCRIPT:: ; d669 wd6f0:: ds 14 wd6fe:: ds 2 -wd700:: ds 11 + +wWalkBikeSurfState:: ; d700 +; $00 = walking +; $01 = biking +; $02 = surfing + ds 1 + + ds 10 W_TOWNVISITEDFLAG:: ; d70b flag_array 13 @@ -1569,7 +1919,8 @@ W_ENEMYMONORTRAINERCLASS:: ; d713 ; trainer classes start at $c8 ds 1 -wd714:: ds 1 +wPlayerJumpingYScreenCoordsIndex:: ; d714 + ds 1 W_RIVALSTARTER:: ; d715 ds 1 @@ -1579,41 +1930,116 @@ W_RIVALSTARTER:: ; d715 W_PLAYERSTARTER:: ; d717 ds 1 -wd718:: ds 1 +wBoulderSpriteIndex:: ; d718 +; sprite index of the boulder the player is trying to push + ds 1 wLastBlackoutMap:: ; d719 ds 1 -wd71a:: ds 1 +wDestinationMap:: ; d71a +; destination map (for certain types of special warps, not ordinary walking) + ds 1 + wd71b:: ds 1 -wd71c:: ds 1 -wd71d:: ds 1 -wd71e:: ds 1 + +wTileInFrontOfBoulderAndBoulderCollisionResult:: ; d71c +; used to store the tile in front of the boulder when trying to push a boulder +; also used to store the result of the collision check ($ff for a collision and $00 for no collision) + ds 1 + +wDungeonWarpDestinationMap:: ; d71d +; destination map for dungeon warps + ds 1 + +wWhichDungeonWarp:: ; d71e +; which dungeon warp within the source map was used + ds 1 + wd71f:: ds 9 -wd728:: ds 2 + +wd728:: +; bit 0: using Strength outside of battle + ds 1 + + ds 1 + wd72a:: ds 2 -wd72c:: ds 1 + +wd72c:: ; d72c +; bit 0: if not set, the 3 minimum steps between random battles have passed + ds 1 + wd72d:: ds 1 wd72e:: ds 2 -wd730:: ds 2 -wd732:: ds 1 + +wd730:: +; 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 + ds 1 + + ds 1 + +wd732:: ; d732 +; bit 0: play time being counted +; bit 1: remnant of debug mode? not set by the game code. +; if it is set +; 1. skips most of Prof. Oak's speech, and uses NINTEN as the player's name and SONY as the rival's name +; 2. does not have the player start in floor two of the playyer's house (instead sending them to [wLastMap]) +; 3. allows wild battles to be avoided by holding down B +; bit 2: the target warp is a fly warp (bit 3 set or blacked out) or a dungeon warp (bit 4 set) +; bit 3: used warp pad, escape rope, dig, teleport, or fly, so the target warp is a "fly warp" +; bit 4: jumped into hole (Pokemon Mansion, Seafoam Islands, Victory Road) or went down waterfall (Seafoam Islands), so the target warp is a "dungeon warp" +; bit 5: currently being forced to ride bike (cycling road) +; 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) +; bit 7: used fly out of battle ds 1 wd734:: ds 2 -wd736:: ds 1 -wd737:: ds 4 + +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 + ds 1 + +wCompletedInGameTradeFlags:: ; d737 + ds 2 + + ds 2 + wd73b:: ds 1 wd73c:: ds 3 -wd73f:: ds 1 -wd740:: ds 3 + +wCardKeyDoorY:: ; d73f + ds 1 + +wCardKeyDoorX:: ; d740 + ds 1 + + ds 2 + wd743:: ds 1 wd744:: ds 3 wd747:: ds 3 wd74a:: ds 1 -wd74b:: 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 @@ -1739,6 +2165,9 @@ wd880:: ds 1 wd881:: ds 1 wd882:: ds 5 +wLinkEnemyTrainerName:: ; d887 +; linked game's trainer name + W_GRASSRATE:: ; d887 ds 1 @@ -1784,7 +2213,8 @@ W_PLAYTIMESECONDS:: ; da44 W_PLAYTIMEFRAMES:: ; da45 ds 1 -wda46:: ds 1 +wSafariZoneGameOver:: ; da46 + ds 1 W_NUMSAFARIBALLS:: ; da47 ds 1 diff --git a/yellow.asm b/yellow.asm index 2dedf5862b..3edffe013e 100755 --- a/yellow.asm +++ b/yellow.asm @@ -1 +1,4 @@ _YELLOW EQU 1 +_OPTION_BEACH_HOUSE EQU 1 +_OPTION_LOWCOST_SAFARI EQU 1 +INCLUDE "charmap.asm"