diff --git a/.travis.yml b/.travis.yml index bd38f51b..d3cce374 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,12 @@ language: c install: - |- path="$(pwd)"; cd; - wget https://github.com/rednex/rgbds/archive/v0.2.5.tar.gz -O rgbds.tar.gz && - tar xf rgbds.tar.gz && - cd rgbds-0.2.5 && - sudo make install && - cd - && - rm -rf rgbds && + wget https://github.com/rednex/rgbds/archive/v0.3.3.tar.gz -O rgbds.tar.gz && + tar xf rgbds.tar.gz && + cd rgbds-0.3.3 && + sudo make install && + cd - && + rm -rf rgbds && cd "$path" before_script: - |- @@ -19,6 +19,6 @@ before_script: fi; } script: - - make + - make -j2 - make compare - check_status diff --git a/INSTALL.md b/INSTALL.md index dee3eea1..c708a013 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,14 +1,14 @@ # Linux - sudo apt-get install make gcc bison git python + sudo apt-get install make git gcc + sudo apt-get install byacc flex pkg-config libpng-dev git clone https://github.com/rednex/rgbds cd rgbds - git checkout v0.2.5 sudo make install cd .. - git clone --recursive https://github.com/pret/pokered + git clone https://github.com/pret/pokered cd pokered To build **pokered.gbc** and **pokeblue.gbc**: @@ -23,34 +23,38 @@ To build them individually: # Mac -In **Terminal**, run: +Get [**Homebrew**](http://brew.sh/). + +Then in **Terminal**, run: xcode-select --install + brew install rgbds - git clone https://github.com/rednex/rgbds - cd rgbds - git checkout v0.2.5 - sudo make install - cd .. - - git clone --recursive https://github.com/pret/pokered + git clone https://github.com/pret/pokered cd pokered +To build **pokered.gbc** and **pokeblue.gbc**: + make # Windows -To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings. +Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit. -In the installer, select the following packages: `make` `git` `python` `gettext` +Run setup and leave the default settings. At "Select Packages", choose to install the following: -Then get [**rgbds 0.2.5**](https://github.com/bentley/rgbds/releases/tag/v0.2.5). -Extract the archive and put `rgbasm.exe`, `rgblink.exe`, `rgbfix.exe` and `rgbgfx.exe` in `C:\cygwin\usr\local\bin`. If your Cygwin installation directory differs, ensure the `bin` directory is present in the PATH variable. +- `make` +- `git` +- `gcc-core` -In the **Cygwin terminal**: +Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.tar.gz** or **win32.tar.gz** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**. - git clone --recursive https://github.com/pret/pokered +In the **Cygwin terminal**, enter these commands: + + git clone https://github.com/pret/pokered cd pokered +To build **pokered.gbc** and **pokeblue.gbc**: + make diff --git a/Makefile b/Makefile index 12532d73..dd266f23 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,13 @@ -PYTHON := python -MD5 := md5sum -c --quiet - -2bpp := $(PYTHON) extras/pokemontools/gfx.py 2bpp -1bpp := $(PYTHON) extras/pokemontools/gfx.py 1bpp -pic := $(PYTHON) extras/pokemontools/pic.py compress -includes := $(PYTHON) extras/pokemontools/scan_includes.py +MD5 := md5sum -c pokered_obj := audio_red.o main_red.o text_red.o wram_red.o pokeblue_obj := audio_blue.o main_blue.o text_blue.o wram_blue.o .SUFFIXES: -.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic .SECONDEXPANSION: -# Suppress annoying intermediate file deletion messages. -.PRECIOUS: %.2bpp -.PHONY: all clean red blue compare +.PRECIOUS: +.SECONDARY: +.PHONY: all clean red blue compare tools roms := pokered.gbc pokeblue.gbc @@ -29,14 +22,26 @@ compare: red blue clean: rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.sym) find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} + + $(MAKE) clean -C tools/ + +tools: + $(MAKE) -C tools/ + + +# Build tools when building the rom. +# This has to happen before the rules are processed, since that's when scan_includes is run. +ifeq (,$(filter clean tools,$(MAKECMDGOALS))) +$(info $(shell $(MAKE) -C tools)) +endif + %.asm: ; -%_red.o: dep = $(shell $(includes) $(@D)/$*.asm) +%_red.o: dep = $(shell tools/scan_includes $(@D)/$*.asm) $(pokered_obj): %_red.o: %.asm $$(dep) rgbasm -D _RED -h -o $@ $*.asm -%_blue.o: dep = $(shell $(includes) $(@D)/$*.asm) +%_blue.o: dep = $(shell tools/scan_includes $(@D)/$*.asm) $(pokeblue_obj): %_blue.o: %.asm $$(dep) rgbasm -D _BLUE -h -o $@ $*.asm @@ -44,10 +49,30 @@ pokered_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON RED" pokeblue_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE" %.gbc: $$(%_obj) - rgblink -n $*.sym -o $@ $^ + rgblink -n $*.sym -l pokered.link -o $@ $^ rgbfix $($*_opt) $@ + sort $*.sym -o $*.sym -%.png: ; -%.2bpp: %.png ; @$(2bpp) $< -%.1bpp: %.png ; @$(1bpp) $< -%.pic: %.2bpp ; @$(pic) $< +gfx/blue/intro_purin_1.2bpp: rgbgfx += -h +gfx/blue/intro_purin_2.2bpp: rgbgfx += -h +gfx/blue/intro_purin_3.2bpp: rgbgfx += -h +gfx/red/intro_nido_1.2bpp: rgbgfx += -h +gfx/red/intro_nido_2.2bpp: rgbgfx += -h +gfx/red/intro_nido_3.2bpp: rgbgfx += -h + +gfx/game_boy.2bpp: tools/gfx += --remove-duplicates +gfx/theend.2bpp: tools/gfx += --interleave --png=$< +gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace + +%.png: ; + +%.2bpp: %.png + rgbgfx $(rgbgfx) -o $@ $< + $(if $(tools/gfx),\ + tools/gfx $(tools/gfx) -o $@ $@) +%.1bpp: %.png + rgbgfx -d1 $(rgbgfx) -o $@ $< + $(if $(tools/gfx),\ + tools/gfx $(tools/gfx) -d1 -o $@ $@) +%.pic: %.2bpp + tools/pkmncompress $< $@ diff --git a/README.md b/README.md index abaaa653..a12514a0 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,24 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md). ## See also +* Disassembly of [**Pokémon Yellow**][pokeyellow] +* Disassembly of [**Pokémon Gold**][pokegold] * Disassembly of [**Pokémon Crystal**][pokecrystal] +* Disassembly of [**Pokémon Pinball**][pokepinball] +* Disassembly of [**Pokémon TCG**][poketcg] +* Disassembly of [**Pokémon Ruby**][pokeruby] +* Disassembly of [**Pokémon Fire Red**][pokefirered] +* Disassembly of [**Pokémon Emerald**][pokeemerald] +* Discord: [**pret**][Discord] * irc: **irc.freenode.net** [**#pret**][irc] -[pokecrystal]: https://github.com/kanzure/pokecrystal +[pokeyellow]: https://github.com/pret/pokeyellow +[pokegold]: https://github.com/pret/pokegold +[pokecrystal]: https://github.com/pret/pokecrystal +[pokepinball]: https://github.com/pret/pokepinball +[poketcg]: https://github.com/pret/poketcg +[pokeruby]: https://github.com/pret/pokeruby +[pokefirered]: https://github.com/pret/pokefirered +[pokeemerald]: https://github.com/pret/pokeemerald +[Discord]: https://discord.gg/cJxDDVP [irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm index 21a3ad93..d6af3584 100644 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -68,7 +68,7 @@ rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W) rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W) rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W) rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W) -rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Inital (R/W) +rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Initial (R/W) rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W) rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W) rNR52 EQU $ff26 ; Sound on/off diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 57b19a37..d4f231b5 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -120,7 +120,7 @@ TMHM_PARTY_MENU EQU 3 SWAP_MONS_PARTY_MENU EQU 4 EVO_STONE_PARTY_MENU EQU 5 -; party memu message IDs +; party menu message IDs ANTIDOTE_MSG EQU $F0 BURN_HEAL_MSG EQU $F1 ICE_HEAL_MSG EQU $F2 diff --git a/constants/music_constants.asm b/constants/music_constants.asm index cfa04850..0b1e29ad 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -137,7 +137,7 @@ const_value = 1 const SFX_SAVE ; AUDIO_1 - const SFX_POKEFLUE + const SFX_POKEFLUTE const SFX_SAFARI_ZONE_PA ; AUDIO_2 diff --git a/constants/status_constants.asm b/constants/status_constants.asm index d9be6250..25babb82 100755 --- a/constants/status_constants.asm +++ b/constants/status_constants.asm @@ -6,27 +6,27 @@ 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 +STORING_ENERGY EQU 0 ; Bide +THRASHING_ABOUT EQU 1 ; e.g. Thrash +ATTACKING_MULTIPLE_TIMES EQU 2 ; e.g. Double Kick, Fury Attack +FLINCHED EQU 3 +CHARGING_UP EQU 4 ; e.g. Solar Beam, Fly +USING_TRAPPING_MOVE 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 +USING_X_ACCURACY EQU 0 +PROTECTED_BY_MIST EQU 1 +GETTING_PUMPED EQU 2 ; Focus Energy +; EQU 3 ; unused +HAS_SUBSTITUTE_UP EQU 4 +NEEDS_TO_RECHARGE EQU 5 ; Hyper Beam +USING_RAGE EQU 6 +SEEDED EQU 7 ; volatile statuses 3 -BadlyPoisoned EQU 0 -HasLightScreenUp EQU 1 -HasReflectUp EQU 2 -Transformed EQU 3 +BADLY_POISONED EQU 0 +HAS_LIGHT_SCREEN_UP EQU 1 +HAS_REFLECT_UP EQU 2 +TRANSFORMED EQU 3 diff --git a/data/mapHeaders/agatha.asm b/data/mapHeaders/agatha.asm index f3389579..155f07db 100755 --- a/data/mapHeaders/agatha.asm +++ b/data/mapHeaders/agatha.asm @@ -2,5 +2,5 @@ Agatha_h: db CEMETERY ; tileset db AGATHAS_ROOM_HEIGHT, AGATHAS_ROOM_WIDTH ; dimensions (y, x) dw AgathaBlocks, AgathaTextPointers, AgathaScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw AgathaObject ; objects diff --git a/data/mapHeaders/bikeshop.asm b/data/mapHeaders/bikeshop.asm index b63b03df..1524f59b 100755 --- a/data/mapHeaders/bikeshop.asm +++ b/data/mapHeaders/bikeshop.asm @@ -2,5 +2,5 @@ BikeShop_h: db CLUB ; tileset db BIKE_SHOP_HEIGHT, BIKE_SHOP_WIDTH ; dimensions (y, x) dw BikeShopBlocks, BikeShopTextPointers, BikeShopScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw BikeShopObject ; objects diff --git a/data/mapHeaders/billshouse.asm b/data/mapHeaders/billshouse.asm index 735f8d62..832affe9 100755 --- a/data/mapHeaders/billshouse.asm +++ b/data/mapHeaders/billshouse.asm @@ -2,5 +2,5 @@ BillsHouse_h: db INTERIOR ; tileset db BILLS_HOUSE_HEIGHT, BILLS_HOUSE_WIDTH ; dimensions (y, x) dw BillsHouseBlocks, BillsHouseTextPointers, BillsHouseScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw BillsHouseObject ; objects diff --git a/data/mapHeaders/bruno.asm b/data/mapHeaders/bruno.asm index 1267ebe2..921fa80c 100755 --- a/data/mapHeaders/bruno.asm +++ b/data/mapHeaders/bruno.asm @@ -2,5 +2,5 @@ Bruno_h: db GYM ; tileset db BRUNOS_ROOM_HEIGHT, BRUNOS_ROOM_WIDTH ; dimensions (y, x) dw BrunoBlocks, BrunoTextPointers, BrunoScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw BrunoObject ; objects diff --git a/data/mapHeaders/celadondiner.asm b/data/mapHeaders/celadondiner.asm index 9520d76e..f608af16 100755 --- a/data/mapHeaders/celadondiner.asm +++ b/data/mapHeaders/celadondiner.asm @@ -2,5 +2,5 @@ CeladonDiner_h: db LOBBY ; tileset db CELADON_DINER_HEIGHT, CELADON_DINER_WIDTH ; dimensions (y, x) dw CeladonDinerBlocks, CeladonDinerTextPointers, CeladonDinerScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonDinerObject ; objects diff --git a/data/mapHeaders/celadongamecorner.asm b/data/mapHeaders/celadongamecorner.asm index 3c5674a7..76403d92 100755 --- a/data/mapHeaders/celadongamecorner.asm +++ b/data/mapHeaders/celadongamecorner.asm @@ -2,5 +2,5 @@ CeladonGameCorner_h: db LOBBY ; tileset db GAME_CORNER_HEIGHT, GAME_CORNER_WIDTH ; dimensions (y, x) dw CeladonGameCornerBlocks, CeladonGameCornerTextPointers, CeladonGameCornerScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonGameCornerObject ; objects diff --git a/data/mapHeaders/celadongym.asm b/data/mapHeaders/celadongym.asm index c0dcf162..78e486f3 100755 --- a/data/mapHeaders/celadongym.asm +++ b/data/mapHeaders/celadongym.asm @@ -2,5 +2,5 @@ CeladonGym_h: db GYM ; tileset db CELADON_GYM_HEIGHT, CELADON_GYM_WIDTH ; dimensions (y, x) dw CeladonGymBlocks, CeladonGymTextPointers, CeladonGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonGymObject ; objects diff --git a/data/mapHeaders/celadonhotel.asm b/data/mapHeaders/celadonhotel.asm index 019c3cc3..ddc27cd6 100755 --- a/data/mapHeaders/celadonhotel.asm +++ b/data/mapHeaders/celadonhotel.asm @@ -2,5 +2,5 @@ CeladonHotel_h: db POKECENTER ; tileset db CELADON_HOTEL_HEIGHT, CELADON_HOTEL_WIDTH ; dimensions (y, x) dw CeladonHotelBlocks, CeladonHotelTextPointers, CeladonHotelScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonHotelObject ; objects diff --git a/data/mapHeaders/celadonhouse.asm b/data/mapHeaders/celadonhouse.asm index ba510282..d6d27a64 100755 --- a/data/mapHeaders/celadonhouse.asm +++ b/data/mapHeaders/celadonhouse.asm @@ -2,5 +2,5 @@ CeladonHouse_h: db MANSION ; tileset db CELADON_HOUSE_HEIGHT, CELADON_HOUSE_WIDTH ; dimensions (y, x) dw CeladonHouseBlocks, CeladonHouseTextPointers, CeladonHouseScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonHouseObject ; objects diff --git a/data/mapHeaders/celadonmansion1.asm b/data/mapHeaders/celadonmansion1.asm index 8c94cc63..da773943 100755 --- a/data/mapHeaders/celadonmansion1.asm +++ b/data/mapHeaders/celadonmansion1.asm @@ -2,5 +2,5 @@ CeladonMansion1_h: db MANSION ; tileset db CELADON_MANSION_1_HEIGHT, CELADON_MANSION_1_WIDTH ; dimensions (y, x) dw CeladonMansion1Blocks, CeladonMansion1TextPointers, CeladonMansion1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMansion1Object ; objects diff --git a/data/mapHeaders/celadonmansion2.asm b/data/mapHeaders/celadonmansion2.asm index 462dfdf3..92970148 100755 --- a/data/mapHeaders/celadonmansion2.asm +++ b/data/mapHeaders/celadonmansion2.asm @@ -2,5 +2,5 @@ CeladonMansion2_h: db MANSION ; tileset db CELADON_MANSION_2_HEIGHT, CELADON_MANSION_2_WIDTH ; dimensions (y, x) dw CeladonMansion2Blocks, CeladonMansion2TextPointers, CeladonMansion2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMansion2Object ; objects diff --git a/data/mapHeaders/celadonmansion3.asm b/data/mapHeaders/celadonmansion3.asm index 81b3f2e2..95c93bd7 100755 --- a/data/mapHeaders/celadonmansion3.asm +++ b/data/mapHeaders/celadonmansion3.asm @@ -2,5 +2,5 @@ CeladonMansion3_h: db MANSION ; tileset db CELADON_MANSION_3_HEIGHT, CELADON_MANSION_3_WIDTH ; dimensions (y, x) dw CeladonMansion3Blocks, CeladonMansion3TextPointers, CeladonMansion3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMansion3Object ; objects diff --git a/data/mapHeaders/celadonmansion4.asm b/data/mapHeaders/celadonmansion4.asm index c5cf2da9..6b4e833a 100755 --- a/data/mapHeaders/celadonmansion4.asm +++ b/data/mapHeaders/celadonmansion4.asm @@ -2,5 +2,5 @@ CeladonMansion4_h: db MANSION ; tileset db CELADON_MANSION_4_HEIGHT, CELADON_MANSION_4_WIDTH ; dimensions (y, x) dw CeladonMansion4Blocks, CeladonMansion4TextPointers, CeladonMansion4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMansion4Object ; objects diff --git a/data/mapHeaders/celadonmansion5.asm b/data/mapHeaders/celadonmansion5.asm index d26faccf..7cc16d24 100755 --- a/data/mapHeaders/celadonmansion5.asm +++ b/data/mapHeaders/celadonmansion5.asm @@ -2,5 +2,5 @@ CeladonMansion5_h: db HOUSE ; tileset db CELADON_MANSION_5_HEIGHT, CELADON_MANSION_5_WIDTH ; dimensions (y, x) dw CeladonMansion5Blocks, CeladonMansion5TextPointers, CeladonMansion5Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMansion5Object ; objects diff --git a/data/mapHeaders/celadonmart1.asm b/data/mapHeaders/celadonmart1.asm index 50d171bc..12b013a4 100755 --- a/data/mapHeaders/celadonmart1.asm +++ b/data/mapHeaders/celadonmart1.asm @@ -2,5 +2,5 @@ CeladonMart1_h: db LOBBY ; tileset db CELADON_MART_1_HEIGHT, CELADON_MART_1_WIDTH ; dimensions (y, x) dw CeladonMart1Blocks, CeladonMart1TextPointers, CeladonMart1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMart1Object ; objects diff --git a/data/mapHeaders/celadonmart2.asm b/data/mapHeaders/celadonmart2.asm index ecd609cb..210f85af 100755 --- a/data/mapHeaders/celadonmart2.asm +++ b/data/mapHeaders/celadonmart2.asm @@ -2,5 +2,5 @@ CeladonMart2_h: db LOBBY ; tileset db CELADON_MART_2_HEIGHT, CELADON_MART_2_WIDTH ; dimensions (y, x) dw CeladonMart2Blocks, CeladonMart2TextPointers, CeladonMart2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMart2Object ; objects diff --git a/data/mapHeaders/celadonmart3.asm b/data/mapHeaders/celadonmart3.asm index af109528..511b1405 100755 --- a/data/mapHeaders/celadonmart3.asm +++ b/data/mapHeaders/celadonmart3.asm @@ -2,5 +2,5 @@ CeladonMart3_h: db LOBBY ; tileset db CELADON_MART_3_HEIGHT, CELADON_MART_3_WIDTH ; dimensions (y, x) dw CeladonMart3Blocks, CeladonMart3TextPointers, CeladonMart3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMart3Object ; objects diff --git a/data/mapHeaders/celadonmart4.asm b/data/mapHeaders/celadonmart4.asm index 4ae820d9..fd34406d 100755 --- a/data/mapHeaders/celadonmart4.asm +++ b/data/mapHeaders/celadonmart4.asm @@ -2,5 +2,5 @@ CeladonMart4_h: db LOBBY ; tileset db CELADON_MART_4_HEIGHT, CELADON_MART_4_WIDTH ; dimensions (y, x) dw CeladonMart4Blocks, CeladonMart4TextPointers, CeladonMart4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMart4Object ; objects diff --git a/data/mapHeaders/celadonmart5.asm b/data/mapHeaders/celadonmart5.asm index 0d28464f..66e70f28 100755 --- a/data/mapHeaders/celadonmart5.asm +++ b/data/mapHeaders/celadonmart5.asm @@ -2,5 +2,5 @@ CeladonMart5_h: db LOBBY ; tileset db CELADON_MART_5_HEIGHT, CELADON_MART_5_WIDTH ; dimensions (y, x) dw CeladonMart5Blocks, CeladonMart5TextPointers, CeladonMart5Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMart5Object ; objects diff --git a/data/mapHeaders/celadonmartelevator.asm b/data/mapHeaders/celadonmartelevator.asm index 498587c6..149e5b0f 100755 --- a/data/mapHeaders/celadonmartelevator.asm +++ b/data/mapHeaders/celadonmartelevator.asm @@ -2,5 +2,5 @@ CeladonMartElevator_h: db LOBBY ; tileset db CELADON_MART_ELEVATOR_HEIGHT, CELADON_MART_ELEVATOR_WIDTH ; dimensions (y, x) dw CeladonMartElevatorBlocks, CeladonMartElevatorTextPointers, CeladonMartElevatorScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMartElevatorObject ; objects diff --git a/data/mapHeaders/celadonmartroof.asm b/data/mapHeaders/celadonmartroof.asm index 8814092b..2073afd2 100755 --- a/data/mapHeaders/celadonmartroof.asm +++ b/data/mapHeaders/celadonmartroof.asm @@ -2,5 +2,5 @@ CeladonMartRoof_h: db LOBBY ; tileset db CELADON_MART_ROOF_HEIGHT, CELADON_MART_ROOF_WIDTH ; dimensions (y, x) dw CeladonMartRoofBlocks, CeladonMartRoofTextPointers, CeladonMartRoofScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonMartRoofObject ; objects diff --git a/data/mapHeaders/celadonpokecenter.asm b/data/mapHeaders/celadonpokecenter.asm index b9464c68..bfeb76b7 100755 --- a/data/mapHeaders/celadonpokecenter.asm +++ b/data/mapHeaders/celadonpokecenter.asm @@ -2,5 +2,5 @@ CeladonPokecenter_h: db POKECENTER ; tileset db CELADON_POKECENTER_HEIGHT, CELADON_POKECENTER_WIDTH ; dimensions (y, x) dw CeladonPokecenterBlocks, CeladonPokecenterTextPointers, CeladonPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonPokecenterObject ; objects diff --git a/data/mapHeaders/celadonprizeroom.asm b/data/mapHeaders/celadonprizeroom.asm index f7a5dc12..83161b30 100755 --- a/data/mapHeaders/celadonprizeroom.asm +++ b/data/mapHeaders/celadonprizeroom.asm @@ -2,5 +2,5 @@ CeladonPrizeRoom_h: db LOBBY ; tileset db CELADON_PRIZE_ROOM_HEIGHT, CELADON_PRIZE_ROOM_WIDTH ; dimensions (y, x) dw CeladonPrizeRoomBlocks, CeladonPrizeRoomTextPointers, CeladonPrizeRoomScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeladonPrizeRoomObject ; objects diff --git a/data/mapHeaders/ceruleangym.asm b/data/mapHeaders/ceruleangym.asm index f95e1a79..3c4f8052 100755 --- a/data/mapHeaders/ceruleangym.asm +++ b/data/mapHeaders/ceruleangym.asm @@ -2,5 +2,5 @@ CeruleanGym_h: db GYM ; tileset db CERULEAN_GYM_HEIGHT, CERULEAN_GYM_WIDTH ; dimensions (y, x) dw CeruleanGymBlocks, CeruleanGymTextPointers, CeruleanGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeruleanGymObject ; objects diff --git a/data/mapHeaders/ceruleanhouse1.asm b/data/mapHeaders/ceruleanhouse1.asm index 2a8c9197..fa12c61c 100755 --- a/data/mapHeaders/ceruleanhouse1.asm +++ b/data/mapHeaders/ceruleanhouse1.asm @@ -2,5 +2,5 @@ CeruleanHouse1_h: db HOUSE ; tileset db CERULEAN_HOUSE_1_HEIGHT, CERULEAN_HOUSE_1_WIDTH ; dimensions (y, x) dw CeruleanHouse1Blocks, CeruleanHouse1TextPointers, CeruleanHouse1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeruleanHouse1Object ; objects diff --git a/data/mapHeaders/ceruleanhouse2.asm b/data/mapHeaders/ceruleanhouse2.asm index 1e040ffd..78f6d821 100755 --- a/data/mapHeaders/ceruleanhouse2.asm +++ b/data/mapHeaders/ceruleanhouse2.asm @@ -2,5 +2,5 @@ CeruleanHouse2_h: db SHIP ; tileset db CERULEAN_HOUSE_2_HEIGHT, CERULEAN_HOUSE_2_WIDTH ; dimensions (y, x) dw CeruleanHouse2Blocks, CeruleanHouse2TextPointers, CeruleanHouse2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeruleanHouse2Object ; objects diff --git a/data/mapHeaders/ceruleanhousetrashed.asm b/data/mapHeaders/ceruleanhousetrashed.asm index 90119dc5..53eaa581 100755 --- a/data/mapHeaders/ceruleanhousetrashed.asm +++ b/data/mapHeaders/ceruleanhousetrashed.asm @@ -2,5 +2,5 @@ CeruleanHouseTrashed_h: db HOUSE ; tileset db TRASHED_HOUSE_HEIGHT, TRASHED_HOUSE_WIDTH ; dimensions (y, x) dw CeruleanHouseTrashedBlocks, CeruleanHouseTrashedTextPointers, CeruleanHouseTrashedScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeruleanHouseTrashedObject ; objects diff --git a/data/mapHeaders/ceruleanmart.asm b/data/mapHeaders/ceruleanmart.asm index 3f3231e8..12bafa98 100755 --- a/data/mapHeaders/ceruleanmart.asm +++ b/data/mapHeaders/ceruleanmart.asm @@ -2,5 +2,5 @@ CeruleanMart_h: db MART ; tileset db CERULEAN_MART_HEIGHT, CERULEAN_MART_WIDTH ; dimensions (y, x) dw CeruleanMartBlocks, CeruleanMartTextPointers, CeruleanMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeruleanMartObject ; objects diff --git a/data/mapHeaders/ceruleanpokecenter.asm b/data/mapHeaders/ceruleanpokecenter.asm index 636a89ae..41fcdd90 100755 --- a/data/mapHeaders/ceruleanpokecenter.asm +++ b/data/mapHeaders/ceruleanpokecenter.asm @@ -2,5 +2,5 @@ CeruleanPokecenter_h: db POKECENTER ; tileset db CERULEAN_POKECENTER_HEIGHT, CERULEAN_POKECENTER_WIDTH ; dimensions (y, x) dw CeruleanPokecenterBlocks, CeruleanPokecenterTextPointers, CeruleanPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CeruleanPokecenterObject ; objects diff --git a/data/mapHeaders/cinnabargym.asm b/data/mapHeaders/cinnabargym.asm index 3f05790c..2cb7dc74 100755 --- a/data/mapHeaders/cinnabargym.asm +++ b/data/mapHeaders/cinnabargym.asm @@ -2,5 +2,5 @@ CinnabarGym_h: db FACILITY ; tileset db CINNABAR_GYM_HEIGHT, CINNABAR_GYM_WIDTH ; dimensions (y, x) dw CinnabarGymBlocks, CinnabarGymTextPointers, CinnabarGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CinnabarGymObject ; objects diff --git a/data/mapHeaders/cinnabarmart.asm b/data/mapHeaders/cinnabarmart.asm index b686713f..e2c8437d 100755 --- a/data/mapHeaders/cinnabarmart.asm +++ b/data/mapHeaders/cinnabarmart.asm @@ -2,5 +2,5 @@ CinnabarMart_h: db MART ; tileset db CINNABAR_MART_HEIGHT, CINNABAR_MART_WIDTH ; dimensions (y, x) dw CinnabarMartBlocks, CinnabarMartTextPointers, CinnabarMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CinnabarMartObject ; objects diff --git a/data/mapHeaders/cinnabarpokecenter.asm b/data/mapHeaders/cinnabarpokecenter.asm index b1f002bd..a11a02f3 100755 --- a/data/mapHeaders/cinnabarpokecenter.asm +++ b/data/mapHeaders/cinnabarpokecenter.asm @@ -2,5 +2,5 @@ CinnabarPokecenter_h: db POKECENTER ; tileset db CINNABAR_POKECENTER_HEIGHT, CINNABAR_POKECENTER_WIDTH ; dimensions (y, x) dw CinnabarPokecenterBlocks, CinnabarPokecenterTextPointers, CinnabarPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CinnabarPokecenterObject ; objects diff --git a/data/mapHeaders/colosseum.asm b/data/mapHeaders/colosseum.asm index 67e1188b..13d9f0c4 100755 --- a/data/mapHeaders/colosseum.asm +++ b/data/mapHeaders/colosseum.asm @@ -2,5 +2,5 @@ Colosseum_h: db CLUB ; tileset db COLOSSEUM_HEIGHT, COLOSSEUM_WIDTH ; dimensions (y, x) dw ColosseumBlocks, ColosseumTextPointers, ColosseumScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ColosseumObject ; objects diff --git a/data/mapHeaders/copycatshouse1f.asm b/data/mapHeaders/copycatshouse1f.asm index bdca2189..7489eed7 100755 --- a/data/mapHeaders/copycatshouse1f.asm +++ b/data/mapHeaders/copycatshouse1f.asm @@ -2,5 +2,5 @@ CopycatsHouse1F_h: db REDS_HOUSE_1 ; tileset db COPYCATS_HOUSE_1F_HEIGHT, COPYCATS_HOUSE_1F_WIDTH ; dimensions (y, x) dw CopycatsHouse1FBlocks, CopycatsHouse1FTextPointers, CopycatsHouse1FScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CopycatsHouse1FObject ; objects diff --git a/data/mapHeaders/copycatshouse2f.asm b/data/mapHeaders/copycatshouse2f.asm index 3eecf718..7566143f 100755 --- a/data/mapHeaders/copycatshouse2f.asm +++ b/data/mapHeaders/copycatshouse2f.asm @@ -2,5 +2,5 @@ CopycatsHouse2F_h: db REDS_HOUSE_2 ; tileset db COPYCATS_HOUSE_2F_HEIGHT, COPYCATS_HOUSE_2F_WIDTH ; dimensions (y, x) dw CopycatsHouse2FBlocks, CopycatsHouse2FTextPointers, CopycatsHouse2FScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw CopycatsHouse2FObject ; objects diff --git a/data/mapHeaders/daycarem.asm b/data/mapHeaders/daycarem.asm index 1b8d4c1c..b61a00f2 100755 --- a/data/mapHeaders/daycarem.asm +++ b/data/mapHeaders/daycarem.asm @@ -2,5 +2,5 @@ DayCareM_h: db HOUSE ; tileset db DAYCAREM_HEIGHT, DAYCAREM_WIDTH ; dimensions (y, x) dw DayCareMBlocks, DayCareMTextPointers, DayCareMScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw DayCareMObject ; objects diff --git a/data/mapHeaders/diglettscave.asm b/data/mapHeaders/diglettscave.asm index 0e68a55c..29c1db3e 100755 --- a/data/mapHeaders/diglettscave.asm +++ b/data/mapHeaders/diglettscave.asm @@ -2,5 +2,5 @@ DiglettsCave_h: db CAVERN ; tileset db DIGLETTS_CAVE_HEIGHT, DIGLETTS_CAVE_WIDTH ; dimensions (y, x) dw DiglettsCaveBlocks, DiglettsCaveTextPointers, DiglettsCaveScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw DiglettsCaveObject ; objects diff --git a/data/mapHeaders/diglettscaveroute11.asm b/data/mapHeaders/diglettscaveroute11.asm index 7670c83f..bb3817ea 100755 --- a/data/mapHeaders/diglettscaveroute11.asm +++ b/data/mapHeaders/diglettscaveroute11.asm @@ -2,5 +2,5 @@ DiglettsCaveEntranceRoute11_h: db CAVERN ; tileset db DIGLETTS_CAVE_ENTRANCE_HEIGHT, DIGLETTS_CAVE_ENTRANCE_WIDTH ; dimensions (y, x) dw DiglettsCaveEntranceRoute11Blocks, DiglettsCaveEntranceRoute11TextPointers, DiglettsCaveEntranceRoute11Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw DiglettsCaveEntranceRoute11Object ; objects diff --git a/data/mapHeaders/diglettscaveroute2.asm b/data/mapHeaders/diglettscaveroute2.asm index 0499b4c3..505fbbff 100755 --- a/data/mapHeaders/diglettscaveroute2.asm +++ b/data/mapHeaders/diglettscaveroute2.asm @@ -2,5 +2,5 @@ DiglettsCaveRoute2_h: db CAVERN ; tileset db DIGLETTS_CAVE_EXIT_HEIGHT, DIGLETTS_CAVE_EXIT_WIDTH ; dimensions (y, x) dw DiglettsCaveRoute2Blocks, DiglettsCaveRoute2TextPointers, DiglettsCaveRoute2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw DiglettsCaveRoute2Object ; objects diff --git a/data/mapHeaders/fanclub.asm b/data/mapHeaders/fanclub.asm index 8e8205b4..6b70e935 100755 --- a/data/mapHeaders/fanclub.asm +++ b/data/mapHeaders/fanclub.asm @@ -2,5 +2,5 @@ FanClub_h: db INTERIOR ; tileset db POKEMON_FAN_CLUB_HEIGHT, POKEMON_FAN_CLUB_WIDTH ; dimensions (y, x) dw FanClubBlocks, FanClubTextPointers, FanClubScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FanClubObject ; objects diff --git a/data/mapHeaders/fightingdojo.asm b/data/mapHeaders/fightingdojo.asm index cb0a2fdb..37f9437c 100755 --- a/data/mapHeaders/fightingdojo.asm +++ b/data/mapHeaders/fightingdojo.asm @@ -2,5 +2,5 @@ FightingDojo_h: db DOJO ; tileset db FIGHTING_DOJO_HEIGHT, FIGHTING_DOJO_WIDTH ; dimensions (y, x) dw FightingDojoBlocks, FightingDojoTextPointers, FightingDojoScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FightingDojoObject ; objects diff --git a/data/mapHeaders/fuchsiagym.asm b/data/mapHeaders/fuchsiagym.asm index 9d16f178..9bad3a7f 100755 --- a/data/mapHeaders/fuchsiagym.asm +++ b/data/mapHeaders/fuchsiagym.asm @@ -2,5 +2,5 @@ FuchsiaGym_h: db GYM ; tileset db FUCHSIA_GYM_HEIGHT, FUCHSIA_GYM_WIDTH ; dimensions (y, x) dw FuchsiaGymBlocks, FuchsiaGymTextPointers, FuchsiaGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FuchsiaGymObject ; objects diff --git a/data/mapHeaders/fuchsiahouse1.asm b/data/mapHeaders/fuchsiahouse1.asm index c4ab2c95..7de94ad5 100755 --- a/data/mapHeaders/fuchsiahouse1.asm +++ b/data/mapHeaders/fuchsiahouse1.asm @@ -2,5 +2,5 @@ FuchsiaHouse1_h: db HOUSE ; tileset db FUCHSIA_HOUSE_1_HEIGHT, FUCHSIA_HOUSE_1_WIDTH ; dimensions (y, x) dw FuchsiaHouse1Blocks, FuchsiaHouse1TextPointers, FuchsiaHouse1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FuchsiaHouse1Object ; objects diff --git a/data/mapHeaders/fuchsiahouse2.asm b/data/mapHeaders/fuchsiahouse2.asm index 530f44b6..7032f549 100755 --- a/data/mapHeaders/fuchsiahouse2.asm +++ b/data/mapHeaders/fuchsiahouse2.asm @@ -2,5 +2,5 @@ FuchsiaHouse2_h: db LAB ; tileset db FUCHSIA_HOUSE_2_HEIGHT, FUCHSIA_HOUSE_2_WIDTH ; dimensions (y, x) dw FuchsiaHouse2Blocks, FuchsiaHouse2TextPointers, FuchsiaHouse2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FuchsiaHouse2Object ; objects diff --git a/data/mapHeaders/fuchsiahouse3.asm b/data/mapHeaders/fuchsiahouse3.asm index e52b6b8a..01917145 100755 --- a/data/mapHeaders/fuchsiahouse3.asm +++ b/data/mapHeaders/fuchsiahouse3.asm @@ -2,5 +2,5 @@ FuchsiaHouse3_h: db SHIP ; tileset db FUCHSIA_HOUSE_3_HEIGHT, FUCHSIA_HOUSE_3_WIDTH ; dimensions (y, x) dw FuchsiaHouse3Blocks, FuchsiaHouse3TextPointers, FuchsiaHouse3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FuchsiaHouse3Object ; objects diff --git a/data/mapHeaders/fuchsiamart.asm b/data/mapHeaders/fuchsiamart.asm index dcdfe8c7..c1445bc8 100755 --- a/data/mapHeaders/fuchsiamart.asm +++ b/data/mapHeaders/fuchsiamart.asm @@ -2,5 +2,5 @@ FuchsiaMart_h: db MART ; tileset db FUCHSIA_MART_HEIGHT, FUCHSIA_MART_WIDTH ; dimensions (y, x) dw FuchsiaMartBlocks, FuchsiaMartTextPointers, FuchsiaMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FuchsiaMartObject ; objects diff --git a/data/mapHeaders/fuchsiameetingroom.asm b/data/mapHeaders/fuchsiameetingroom.asm index b44acf29..e7f31770 100755 --- a/data/mapHeaders/fuchsiameetingroom.asm +++ b/data/mapHeaders/fuchsiameetingroom.asm @@ -2,5 +2,5 @@ FuchsiaMeetingRoom_h: db LAB ; tileset db FUCHSIA_MEETING_ROOM_HEIGHT, FUCHSIA_MEETING_ROOM_WIDTH ; dimensions (y, x) dw FuchsiaMeetingRoomBlocks, FuchsiaMeetingRoomTextPointers, FuchsiaMeetingRoomScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FuchsiaMeetingRoomObject ; objects diff --git a/data/mapHeaders/fuchsiapokecenter.asm b/data/mapHeaders/fuchsiapokecenter.asm index dc6f1e6b..4625c980 100755 --- a/data/mapHeaders/fuchsiapokecenter.asm +++ b/data/mapHeaders/fuchsiapokecenter.asm @@ -2,5 +2,5 @@ FuchsiaPokecenter_h: db POKECENTER ; tileset db FUCHSIA_POKECENTER_HEIGHT, FUCHSIA_POKECENTER_WIDTH ; dimensions (y, x) dw FuchsiaPokecenterBlocks, FuchsiaPokecenterTextPointers, FuchsiaPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw FuchsiaPokecenterObject ; objects diff --git a/data/mapHeaders/halloffameroom.asm b/data/mapHeaders/halloffameroom.asm index a90464a8..9c06c434 100755 --- a/data/mapHeaders/halloffameroom.asm +++ b/data/mapHeaders/halloffameroom.asm @@ -2,5 +2,5 @@ HallofFameRoom_h: db GYM ; tileset db HALL_OF_FAME_HEIGHT, HALL_OF_FAME_WIDTH ; dimensions (y, x) dw HallofFameRoomBlocks, HallofFameRoomTextPointers, HallofFameRoomScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw HallofFameRoomObject ; objects diff --git a/data/mapHeaders/indigoplateaulobby.asm b/data/mapHeaders/indigoplateaulobby.asm index 4cf92d82..67153dbc 100755 --- a/data/mapHeaders/indigoplateaulobby.asm +++ b/data/mapHeaders/indigoplateaulobby.asm @@ -2,5 +2,5 @@ IndigoPlateauLobby_h: db MART ; tileset db INDIGO_PLATEAU_LOBBY_HEIGHT, INDIGO_PLATEAU_LOBBY_WIDTH ; dimensions (y, x) dw IndigoPlateauLobbyBlocks, IndigoPlateauLobbyTextPointers, IndigoPlateauLobbyScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw IndigoPlateauLobbyObject ; objects diff --git a/data/mapHeaders/lab1.asm b/data/mapHeaders/lab1.asm index d0e976e7..d4d04e3d 100755 --- a/data/mapHeaders/lab1.asm +++ b/data/mapHeaders/lab1.asm @@ -2,5 +2,5 @@ Lab1_h: db LAB ; tileset db CINNABAR_LAB_1_HEIGHT, CINNABAR_LAB_1_WIDTH ; dimensions (y, x) dw Lab1Blocks, Lab1TextPointers, Lab1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Lab1Object ; objects diff --git a/data/mapHeaders/lab2.asm b/data/mapHeaders/lab2.asm index 75cbcf1f..3d264741 100755 --- a/data/mapHeaders/lab2.asm +++ b/data/mapHeaders/lab2.asm @@ -2,5 +2,5 @@ Lab2_h: db LAB ; tileset db CINNABAR_LAB_2_HEIGHT, CINNABAR_LAB_2_WIDTH ; dimensions (y, x) dw Lab2Blocks, Lab2TextPointers, Lab2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Lab2Object ; objects diff --git a/data/mapHeaders/lab3.asm b/data/mapHeaders/lab3.asm index 9af39022..0f401f65 100755 --- a/data/mapHeaders/lab3.asm +++ b/data/mapHeaders/lab3.asm @@ -2,5 +2,5 @@ Lab3_h: db LAB ; tileset db CINNABAR_LAB_3_HEIGHT, CINNABAR_LAB_3_WIDTH ; dimensions (y, x) dw Lab3Blocks, Lab3TextPointers, Lab3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Lab3Object ; objects diff --git a/data/mapHeaders/lab4.asm b/data/mapHeaders/lab4.asm index e0b23c7d..10ded376 100755 --- a/data/mapHeaders/lab4.asm +++ b/data/mapHeaders/lab4.asm @@ -2,5 +2,5 @@ Lab4_h: db LAB ; tileset db CINNABAR_LAB_4_HEIGHT, CINNABAR_LAB_4_WIDTH ; dimensions (y, x) dw Lab4Blocks, Lab4TextPointers, Lab4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Lab4Object ; objects diff --git a/data/mapHeaders/lance.asm b/data/mapHeaders/lance.asm index 13b2a343..d9a1ae75 100755 --- a/data/mapHeaders/lance.asm +++ b/data/mapHeaders/lance.asm @@ -2,5 +2,5 @@ Lance_h: db DOJO ; tileset db LANCES_ROOM_HEIGHT, LANCES_ROOM_WIDTH ; dimensions (y, x) dw LanceBlocks, LanceTextPointers, LanceScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw LanceObject ; objects diff --git a/data/mapHeaders/lavenderhouse1.asm b/data/mapHeaders/lavenderhouse1.asm index f1750dc0..362e4359 100755 --- a/data/mapHeaders/lavenderhouse1.asm +++ b/data/mapHeaders/lavenderhouse1.asm @@ -2,5 +2,5 @@ LavenderHouse1_h: db HOUSE ; tileset db LAVENDER_HOUSE_1_HEIGHT, LAVENDER_HOUSE_1_WIDTH ; dimensions (y, x) dw LavenderHouse1Blocks, LavenderHouse1TextPointers, LavenderHouse1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw LavenderHouse1Object ; objects diff --git a/data/mapHeaders/lavenderhouse2.asm b/data/mapHeaders/lavenderhouse2.asm index 449ccf07..971e1e8d 100755 --- a/data/mapHeaders/lavenderhouse2.asm +++ b/data/mapHeaders/lavenderhouse2.asm @@ -2,5 +2,5 @@ LavenderHouse2_h: db HOUSE ; tileset db LAVENDER_HOUSE_2_HEIGHT, LAVENDER_HOUSE_2_WIDTH ; dimensions (y, x) dw LavenderHouse2Blocks, LavenderHouse2TextPointers, LavenderHouse2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw LavenderHouse2Object ; objects diff --git a/data/mapHeaders/lavendermart.asm b/data/mapHeaders/lavendermart.asm index e2bd0c9c..13cb06c5 100755 --- a/data/mapHeaders/lavendermart.asm +++ b/data/mapHeaders/lavendermart.asm @@ -2,5 +2,5 @@ LavenderMart_h: db MART ; tileset db LAVENDER_MART_HEIGHT, LAVENDER_MART_WIDTH ; dimensions (y, x) dw LavenderMartBlocks, LavenderMartTextPointers, LavenderMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw LavenderMartObject ; objects diff --git a/data/mapHeaders/lavenderpokecenter.asm b/data/mapHeaders/lavenderpokecenter.asm index c0d41294..ce9650f1 100755 --- a/data/mapHeaders/lavenderpokecenter.asm +++ b/data/mapHeaders/lavenderpokecenter.asm @@ -2,5 +2,5 @@ LavenderPokecenter_h: db POKECENTER ; tileset db LAVENDER_POKECENTER_HEIGHT, LAVENDER_POKECENTER_WIDTH ; dimensions (y, x) dw LavenderPokecenterBlocks, LavenderPokecenterTextPointers, LavenderPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw LavenderPokecenterObject ; objects diff --git a/data/mapHeaders/lorelei.asm b/data/mapHeaders/lorelei.asm index 634435d3..82efe164 100755 --- a/data/mapHeaders/lorelei.asm +++ b/data/mapHeaders/lorelei.asm @@ -2,5 +2,5 @@ Lorelei_h: db GYM ; tileset db LORELEIS_ROOM_HEIGHT, LORELEIS_ROOM_WIDTH ; dimensions (y, x) dw LoreleiBlocks, LoreleiTextPointers, LoreleiScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw LoreleiObject ; objects diff --git a/data/mapHeaders/mansion1.asm b/data/mapHeaders/mansion1.asm index 46b0a83e..8b326941 100755 --- a/data/mapHeaders/mansion1.asm +++ b/data/mapHeaders/mansion1.asm @@ -2,5 +2,5 @@ Mansion1_h: db FACILITY ; tileset db MANSION_1_HEIGHT, MANSION_1_WIDTH ; dimensions (y, x) dw Mansion1Blocks, Mansion1TextPointers, Mansion1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Mansion1Object ; objects diff --git a/data/mapHeaders/mansion2.asm b/data/mapHeaders/mansion2.asm index ee4b570c..fba95ed8 100755 --- a/data/mapHeaders/mansion2.asm +++ b/data/mapHeaders/mansion2.asm @@ -2,5 +2,5 @@ Mansion2_h: db FACILITY ; tileset db MANSION_2_HEIGHT, MANSION_2_WIDTH ; dimensions (y, x) dw Mansion2Blocks, Mansion2TextPointers, Mansion2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Mansion2Object ; objects diff --git a/data/mapHeaders/mansion3.asm b/data/mapHeaders/mansion3.asm index 97074347..933d4c6f 100755 --- a/data/mapHeaders/mansion3.asm +++ b/data/mapHeaders/mansion3.asm @@ -2,5 +2,5 @@ Mansion3_h: db FACILITY ; tileset db MANSION_3_HEIGHT, MANSION_3_WIDTH ; dimensions (y, x) dw Mansion3Blocks, Mansion3TextPointers, Mansion3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Mansion3Object ; objects diff --git a/data/mapHeaders/mansion4.asm b/data/mapHeaders/mansion4.asm index 45b1636a..806b66b6 100755 --- a/data/mapHeaders/mansion4.asm +++ b/data/mapHeaders/mansion4.asm @@ -2,5 +2,5 @@ Mansion4_h: db FACILITY ; tileset db MANSION_4_HEIGHT, MANSION_4_WIDTH ; dimensions (y, x) dw Mansion4Blocks, Mansion4TextPointers, Mansion4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Mansion4Object ; objects diff --git a/data/mapHeaders/mtmoon1.asm b/data/mapHeaders/mtmoon1.asm index da64b667..4fbd8de0 100755 --- a/data/mapHeaders/mtmoon1.asm +++ b/data/mapHeaders/mtmoon1.asm @@ -2,5 +2,5 @@ MtMoon1_h: db CAVERN ; tileset db MT_MOON_1_HEIGHT, MT_MOON_1_WIDTH ; dimensions (y, x) dw MtMoon1Blocks, MtMoon1TextPointers, MtMoon1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw MtMoon1Object ; objects diff --git a/data/mapHeaders/mtmoon2.asm b/data/mapHeaders/mtmoon2.asm index 7121c33e..81b0b365 100755 --- a/data/mapHeaders/mtmoon2.asm +++ b/data/mapHeaders/mtmoon2.asm @@ -2,5 +2,5 @@ MtMoon2_h: db CAVERN ; tileset db MT_MOON_2_HEIGHT, MT_MOON_2_WIDTH ; dimensions (y, x) dw MtMoon2Blocks, MtMoon2TextPointers, MtMoon2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw MtMoon2Object ; objects diff --git a/data/mapHeaders/mtmoon3.asm b/data/mapHeaders/mtmoon3.asm index 643eb95d..f89d77cb 100755 --- a/data/mapHeaders/mtmoon3.asm +++ b/data/mapHeaders/mtmoon3.asm @@ -2,5 +2,5 @@ MtMoon3_h: db CAVERN ; tileset db MT_MOON_3_HEIGHT, MT_MOON_3_WIDTH ; dimensions (y, x) dw MtMoon3Blocks, MtMoon3TextPointers, MtMoon3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw MtMoon3Object ; objects diff --git a/data/mapHeaders/mtmoonpokecenter.asm b/data/mapHeaders/mtmoonpokecenter.asm index ba82c478..0cb1791b 100755 --- a/data/mapHeaders/mtmoonpokecenter.asm +++ b/data/mapHeaders/mtmoonpokecenter.asm @@ -2,5 +2,5 @@ MtMoonPokecenter_h: db POKECENTER ; tileset db MT_MOON_POKECENTER_HEIGHT, MT_MOON_POKECENTER_WIDTH ; dimensions (y, x) dw MtMoonPokecenterBlocks, MtMoonPokecenterTextPointers, MtMoonPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw MtMoonPokecenterObject ; objects diff --git a/data/mapHeaders/museum1f.asm b/data/mapHeaders/museum1f.asm index 10611513..eca97706 100755 --- a/data/mapHeaders/museum1f.asm +++ b/data/mapHeaders/museum1f.asm @@ -2,5 +2,5 @@ Museum1F_h: db MUSEUM ; tileset db MUSEUM_1F_HEIGHT, MUSEUM_1F_WIDTH ; dimensions (y, x) dw Museum1FBlocks, Museum1FTextPointers, Museum1FScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Museum1FObject ; objects diff --git a/data/mapHeaders/museum2f.asm b/data/mapHeaders/museum2f.asm index 62f9f7ca..973f5045 100755 --- a/data/mapHeaders/museum2f.asm +++ b/data/mapHeaders/museum2f.asm @@ -2,5 +2,5 @@ Museum2F_h: db MUSEUM ; tileset db MUSEUM_2F_HEIGHT, MUSEUM_2F_WIDTH ; dimensions (y, x) dw Museum2FBlocks, Museum2FTextPointers, Museum2FScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Museum2FObject ; objects diff --git a/data/mapHeaders/namerater.asm b/data/mapHeaders/namerater.asm index 3fdef0d7..01a488a7 100755 --- a/data/mapHeaders/namerater.asm +++ b/data/mapHeaders/namerater.asm @@ -2,5 +2,5 @@ NameRater_h: db HOUSE ; tileset db NAME_RATERS_HOUSE_HEIGHT, NAME_RATERS_HOUSE_WIDTH ; dimensions (y, x) dw NameRaterBlocks, NameRaterTextPointers, NameRaterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw NameRaterObject ; objects diff --git a/data/mapHeaders/oakslab.asm b/data/mapHeaders/oakslab.asm index ba2c9d22..94608ef2 100755 --- a/data/mapHeaders/oakslab.asm +++ b/data/mapHeaders/oakslab.asm @@ -2,5 +2,5 @@ OaksLab_h: db DOJO ; tileset db OAKS_LAB_HEIGHT, OAKS_LAB_WIDTH ; dimensions (y, x) dw OaksLabBlocks, OaksLabTextPointers, OaksLabScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw OaksLabObject ; objects diff --git a/data/mapHeaders/pewtergym.asm b/data/mapHeaders/pewtergym.asm index 8eee73b3..a335ab50 100755 --- a/data/mapHeaders/pewtergym.asm +++ b/data/mapHeaders/pewtergym.asm @@ -2,5 +2,5 @@ PewterGym_h: db GYM ; tileset db PEWTER_GYM_HEIGHT, PEWTER_GYM_WIDTH ; dimensions (y, x) dw PewterGymBlocks, PewterGymTextPointers, PewterGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PewterGymObject ; objects diff --git a/data/mapHeaders/pewterhouse1.asm b/data/mapHeaders/pewterhouse1.asm index 40209926..90b69d00 100755 --- a/data/mapHeaders/pewterhouse1.asm +++ b/data/mapHeaders/pewterhouse1.asm @@ -2,5 +2,5 @@ PewterHouse1_h: db HOUSE ; tileset db PEWTER_HOUSE_1_HEIGHT, PEWTER_HOUSE_1_WIDTH ; dimensions (y, x) dw PewterHouse1Blocks, PewterHouse1TextPointers, PewterHouse1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PewterHouse1Object ; objects diff --git a/data/mapHeaders/pewterhouse2.asm b/data/mapHeaders/pewterhouse2.asm index 25fc3e9d..9baa3d41 100755 --- a/data/mapHeaders/pewterhouse2.asm +++ b/data/mapHeaders/pewterhouse2.asm @@ -2,5 +2,5 @@ PewterHouse2_h: db HOUSE ; tileset db PEWTER_HOUSE_2_HEIGHT, PEWTER_HOUSE_2_WIDTH ; dimensions (y, x) dw PewterHouse2Blocks, PewterHouse2TextPointers, PewterHouse2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PewterHouse2Object ; objects diff --git a/data/mapHeaders/pewtermart.asm b/data/mapHeaders/pewtermart.asm index 02481bfc..00b91247 100755 --- a/data/mapHeaders/pewtermart.asm +++ b/data/mapHeaders/pewtermart.asm @@ -2,5 +2,5 @@ PewterMart_h: db MART ; tileset db PEWTER_MART_HEIGHT, PEWTER_MART_WIDTH ; dimensions (y, x) dw PewterMartBlocks, PewterMartTextPointers, PewterMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PewterMartObject ; objects diff --git a/data/mapHeaders/pewterpokecenter.asm b/data/mapHeaders/pewterpokecenter.asm index f3abc838..29851a96 100755 --- a/data/mapHeaders/pewterpokecenter.asm +++ b/data/mapHeaders/pewterpokecenter.asm @@ -2,5 +2,5 @@ PewterPokecenter_h: db POKECENTER ; tileset db PEWTER_POKECENTER_HEIGHT, PEWTER_POKECENTER_WIDTH ; dimensions (y, x) dw PewterPokecenterBlocks, PewterPokecenterTextPointers, PewterPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PewterPokecenterObject ; objects diff --git a/data/mapHeaders/pokemontower1.asm b/data/mapHeaders/pokemontower1.asm index 9a799d73..5ea76d21 100755 --- a/data/mapHeaders/pokemontower1.asm +++ b/data/mapHeaders/pokemontower1.asm @@ -2,5 +2,5 @@ PokemonTower1_h: db CEMETERY ; tileset db POKEMONTOWER_1_HEIGHT, POKEMONTOWER_1_WIDTH ; dimensions (y, x) dw PokemonTower1Blocks, PokemonTower1TextPointers, PokemonTower1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PokemonTower1Object ; objects diff --git a/data/mapHeaders/pokemontower2.asm b/data/mapHeaders/pokemontower2.asm index a2c395c9..3da497e4 100755 --- a/data/mapHeaders/pokemontower2.asm +++ b/data/mapHeaders/pokemontower2.asm @@ -2,5 +2,5 @@ PokemonTower2_h: db CEMETERY ; tileset db POKEMONTOWER_2_HEIGHT, POKEMONTOWER_2_WIDTH ; dimensions (y, x) dw PokemonTower2Blocks, PokemonTower2TextPointers, PokemonTower2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PokemonTower2Object ; objects diff --git a/data/mapHeaders/pokemontower3.asm b/data/mapHeaders/pokemontower3.asm index af81c9e6..bec35122 100755 --- a/data/mapHeaders/pokemontower3.asm +++ b/data/mapHeaders/pokemontower3.asm @@ -2,5 +2,5 @@ PokemonTower3_h: db CEMETERY ; tileset db POKEMONTOWER_3_HEIGHT, POKEMONTOWER_3_WIDTH ; dimensions (y, x) dw PokemonTower3Blocks, PokemonTower3TextPointers, PokemonTower3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PokemonTower3Object ; objects diff --git a/data/mapHeaders/pokemontower4.asm b/data/mapHeaders/pokemontower4.asm index 073c34c0..4d96c709 100755 --- a/data/mapHeaders/pokemontower4.asm +++ b/data/mapHeaders/pokemontower4.asm @@ -2,5 +2,5 @@ PokemonTower4_h: db CEMETERY ; tileset db POKEMONTOWER_4_HEIGHT, POKEMONTOWER_4_WIDTH ; dimensions (y, x) dw PokemonTower4Blocks, PokemonTower4TextPointers, PokemonTower4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PokemonTower4Object ; objects diff --git a/data/mapHeaders/pokemontower5.asm b/data/mapHeaders/pokemontower5.asm index a7636534..f91911b0 100755 --- a/data/mapHeaders/pokemontower5.asm +++ b/data/mapHeaders/pokemontower5.asm @@ -2,5 +2,5 @@ PokemonTower5_h: db CEMETERY ; tileset db POKEMONTOWER_5_HEIGHT, POKEMONTOWER_5_WIDTH ; dimensions (y, x) dw PokemonTower5Blocks, PokemonTower5TextPointers, PokemonTower5Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PokemonTower5Object ; objects diff --git a/data/mapHeaders/pokemontower6.asm b/data/mapHeaders/pokemontower6.asm index a83ae0ba..10a54cd5 100755 --- a/data/mapHeaders/pokemontower6.asm +++ b/data/mapHeaders/pokemontower6.asm @@ -2,5 +2,5 @@ PokemonTower6_h: db CEMETERY ; tileset db POKEMONTOWER_6_HEIGHT, POKEMONTOWER_6_WIDTH ; dimensions (y, x) dw PokemonTower6Blocks, PokemonTower6TextPointers, PokemonTower6Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PokemonTower6Object ; objects diff --git a/data/mapHeaders/pokemontower7.asm b/data/mapHeaders/pokemontower7.asm index 4e13bcee..b69fd01e 100755 --- a/data/mapHeaders/pokemontower7.asm +++ b/data/mapHeaders/pokemontower7.asm @@ -2,5 +2,5 @@ PokemonTower7_h: db CEMETERY ; tileset db POKEMONTOWER_7_HEIGHT, POKEMONTOWER_7_WIDTH ; dimensions (y, x) dw PokemonTower7Blocks, PokemonTower7TextPointers, PokemonTower7Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PokemonTower7Object ; objects diff --git a/data/mapHeaders/powerplant.asm b/data/mapHeaders/powerplant.asm index 9c78311d..3b13491d 100755 --- a/data/mapHeaders/powerplant.asm +++ b/data/mapHeaders/powerplant.asm @@ -2,5 +2,5 @@ PowerPlant_h: db FACILITY ; tileset db POWER_PLANT_HEIGHT, POWER_PLANT_WIDTH ; dimensions (y, x) dw PowerPlantBlocks, PowerPlantTextPointers, PowerPlantScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw PowerPlantObject ; objects diff --git a/data/mapHeaders/rockethideout1.asm b/data/mapHeaders/rockethideout1.asm index a9dcf424..bbe721ab 100755 --- a/data/mapHeaders/rockethideout1.asm +++ b/data/mapHeaders/rockethideout1.asm @@ -2,5 +2,5 @@ RocketHideout1_h: db FACILITY ; tileset db ROCKET_HIDEOUT_1_HEIGHT, ROCKET_HIDEOUT_1_WIDTH ; dimensions (y, x) dw RocketHideout1Blocks, RocketHideout1TextPointers, RocketHideout1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RocketHideout1Object ; objects diff --git a/data/mapHeaders/rockethideout2.asm b/data/mapHeaders/rockethideout2.asm index 8f034360..cc2ed948 100755 --- a/data/mapHeaders/rockethideout2.asm +++ b/data/mapHeaders/rockethideout2.asm @@ -2,5 +2,5 @@ RocketHideout2_h: db FACILITY ; tileset db ROCKET_HIDEOUT_2_HEIGHT, ROCKET_HIDEOUT_2_WIDTH ; dimensions (y, x) dw RocketHideout2Blocks, RocketHideout2TextPointers, RocketHideout2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RocketHideout2Object ; objects diff --git a/data/mapHeaders/rockethideout3.asm b/data/mapHeaders/rockethideout3.asm index 5fc9fb95..12e9aa1e 100755 --- a/data/mapHeaders/rockethideout3.asm +++ b/data/mapHeaders/rockethideout3.asm @@ -2,5 +2,5 @@ RocketHideout3_h: db FACILITY ; tileset db ROCKET_HIDEOUT_3_HEIGHT, ROCKET_HIDEOUT_3_WIDTH ; dimensions (y, x) dw RocketHideout3Blocks, RocketHideout3TextPointers, RocketHideout3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RocketHideout3Object ; objects diff --git a/data/mapHeaders/rockethideout4.asm b/data/mapHeaders/rockethideout4.asm index 0cde5bee..0b858dc9 100755 --- a/data/mapHeaders/rockethideout4.asm +++ b/data/mapHeaders/rockethideout4.asm @@ -2,5 +2,5 @@ RocketHideout4_h: db FACILITY ; tileset db ROCKET_HIDEOUT_4_HEIGHT, ROCKET_HIDEOUT_4_WIDTH ; dimensions (y, x) dw RocketHideout4Blocks, RocketHideout4TextPointers, RocketHideout4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RocketHideout4Object ; objects diff --git a/data/mapHeaders/rockethideoutelevator.asm b/data/mapHeaders/rockethideoutelevator.asm index d4917812..b4269444 100755 --- a/data/mapHeaders/rockethideoutelevator.asm +++ b/data/mapHeaders/rockethideoutelevator.asm @@ -2,5 +2,5 @@ RocketHideoutElevator_h: db LOBBY ; tileset db ROCKET_HIDEOUT_ELEVATOR_HEIGHT, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; dimensions (y, x) dw RocketHideoutElevatorBlocks, RocketHideoutElevatorTextPointers, RocketHideoutElevatorScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RocketHideoutElevatorObject ; objects diff --git a/data/mapHeaders/rocktunnel1.asm b/data/mapHeaders/rocktunnel1.asm index db67517d..14fc41b1 100755 --- a/data/mapHeaders/rocktunnel1.asm +++ b/data/mapHeaders/rocktunnel1.asm @@ -2,5 +2,5 @@ RockTunnel1_h: db CAVERN ; tileset db ROCK_TUNNEL_1_HEIGHT, ROCK_TUNNEL_1_WIDTH ; dimensions (y, x) dw RockTunnel1Blocks, RockTunnel1TextPointers, RockTunnel1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RockTunnel1Object ; objects diff --git a/data/mapHeaders/rocktunnel2.asm b/data/mapHeaders/rocktunnel2.asm index 5b85701b..c4184b8d 100755 --- a/data/mapHeaders/rocktunnel2.asm +++ b/data/mapHeaders/rocktunnel2.asm @@ -2,5 +2,5 @@ RockTunnel2_h: db CAVERN ; tileset db ROCK_TUNNEL_2_HEIGHT, ROCK_TUNNEL_2_WIDTH ; dimensions (y, x) dw RockTunnel2Blocks, RockTunnel2TextPointers, RockTunnel2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RockTunnel2Object ; objects diff --git a/data/mapHeaders/rocktunnelpokecenter.asm b/data/mapHeaders/rocktunnelpokecenter.asm index e1bad3bd..977dd1cf 100755 --- a/data/mapHeaders/rocktunnelpokecenter.asm +++ b/data/mapHeaders/rocktunnelpokecenter.asm @@ -2,5 +2,5 @@ RockTunnelPokecenter_h: db POKECENTER ; tileset db ROCK_TUNNEL_POKECENTER_HEIGHT, ROCK_TUNNEL_POKECENTER_WIDTH ; dimensions (y, x) dw RockTunnelPokecenterBlocks, RockTunnelPokecenterTextPointers, RockTunnelPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw RockTunnelPokecenterObject ; objects diff --git a/data/mapHeaders/route11gate.asm b/data/mapHeaders/route11gate.asm index 26539a19..22f90adb 100755 --- a/data/mapHeaders/route11gate.asm +++ b/data/mapHeaders/route11gate.asm @@ -2,5 +2,5 @@ Route11Gate_h: db GATE ; tileset db ROUTE_11_GATE_1F_HEIGHT, ROUTE_11_GATE_1F_WIDTH ; dimensions (y, x) dw Route11GateBlocks, Route11GateTextPointers, Route11GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route11GateObject ; objects diff --git a/data/mapHeaders/route11gateupstairs.asm b/data/mapHeaders/route11gateupstairs.asm index ac556804..d3f4a3e1 100755 --- a/data/mapHeaders/route11gateupstairs.asm +++ b/data/mapHeaders/route11gateupstairs.asm @@ -2,5 +2,5 @@ Route11GateUpstairs_h: db GATE ; tileset db ROUTE_11_GATE_2F_HEIGHT, ROUTE_11_GATE_2F_WIDTH ; dimensions (y, x) dw Route11GateUpstairsBlocks, Route11GateUpstairsTextPointers, Route11GateUpstairsScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route11GateUpstairsObject ; objects diff --git a/data/mapHeaders/route12gate.asm b/data/mapHeaders/route12gate.asm index bcd36d73..a870a191 100755 --- a/data/mapHeaders/route12gate.asm +++ b/data/mapHeaders/route12gate.asm @@ -2,5 +2,5 @@ Route12Gate_h: db GATE ; tileset db ROUTE_12_GATE_1F_HEIGHT, ROUTE_12_GATE_1F_WIDTH ; dimensions (y, x) dw Route12GateBlocks, Route12GateTextPointers, Route12GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route12GateObject ; objects diff --git a/data/mapHeaders/route12gateupstairs.asm b/data/mapHeaders/route12gateupstairs.asm index 96109a38..767cb764 100755 --- a/data/mapHeaders/route12gateupstairs.asm +++ b/data/mapHeaders/route12gateupstairs.asm @@ -2,5 +2,5 @@ Route12GateUpstairs_h: db GATE ; tileset db ROUTE_12_GATE_2F_HEIGHT, ROUTE_12_GATE_2F_WIDTH ; dimensions (y, x) dw Route12GateUpstairsBlocks, Route12GateUpstairsTextPointers, Route12GateUpstairsScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route12GateUpstairsObject ; objects diff --git a/data/mapHeaders/route12house.asm b/data/mapHeaders/route12house.asm index 11f45d24..48428b10 100755 --- a/data/mapHeaders/route12house.asm +++ b/data/mapHeaders/route12house.asm @@ -2,5 +2,5 @@ Route12House_h: db HOUSE ; tileset db ROUTE_12_HOUSE_HEIGHT, ROUTE_12_HOUSE_WIDTH ; dimensions (y, x) dw Route12HouseBlocks, Route12HouseTextPointers, Route12HouseScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route12HouseObject ; objects diff --git a/data/mapHeaders/route15gate.asm b/data/mapHeaders/route15gate.asm index 072d8f72..ae71bc35 100755 --- a/data/mapHeaders/route15gate.asm +++ b/data/mapHeaders/route15gate.asm @@ -2,5 +2,5 @@ Route15Gate_h: db GATE ; tileset db ROUTE_15_GATE_1F_HEIGHT, ROUTE_15_GATE_1F_WIDTH ; dimensions (y, x) dw Route15GateBlocks, Route15GateTextPointers, Route15GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route15GateObject ; objects diff --git a/data/mapHeaders/route15gateupstairs.asm b/data/mapHeaders/route15gateupstairs.asm index 96e7e2ca..02996057 100755 --- a/data/mapHeaders/route15gateupstairs.asm +++ b/data/mapHeaders/route15gateupstairs.asm @@ -2,5 +2,5 @@ Route15GateUpstairs_h: db GATE ; tileset db ROUTE_15_GATE_2F_HEIGHT, ROUTE_15_GATE_2F_WIDTH ; dimensions (y, x) dw Route15GateUpstairsBlocks, Route15GateUpstairsTextPointers, Route15GateUpstairsScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route15GateUpstairsObject ; objects diff --git a/data/mapHeaders/route16gate.asm b/data/mapHeaders/route16gate.asm index b3381258..32d0729b 100755 --- a/data/mapHeaders/route16gate.asm +++ b/data/mapHeaders/route16gate.asm @@ -2,5 +2,5 @@ Route16Gate_h: db GATE ; tileset db ROUTE_16_GATE_1F_HEIGHT, ROUTE_16_GATE_1F_WIDTH ; dimensions (y, x) dw Route16GateBlocks, Route16GateTextPointers, Route16GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route16GateObject ; objects diff --git a/data/mapHeaders/route16gateupstairs.asm b/data/mapHeaders/route16gateupstairs.asm index e8dd7d45..32c32433 100755 --- a/data/mapHeaders/route16gateupstairs.asm +++ b/data/mapHeaders/route16gateupstairs.asm @@ -2,5 +2,5 @@ Route16GateUpstairs_h: db GATE ; tileset db ROUTE_16_GATE_2F_HEIGHT, ROUTE_16_GATE_2F_WIDTH ; dimensions (y, x) dw Route16GateUpstairsBlocks, Route16GateUpstairsTextPointers, Route16GateUpstairsScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route16GateUpstairsObject ; objects diff --git a/data/mapHeaders/route16house.asm b/data/mapHeaders/route16house.asm index 5945e11b..2b633873 100755 --- a/data/mapHeaders/route16house.asm +++ b/data/mapHeaders/route16house.asm @@ -2,5 +2,5 @@ Route16House_h: db HOUSE ; tileset db ROUTE_16_HOUSE_HEIGHT, ROUTE_16_HOUSE_WIDTH ; dimensions (y, x) dw Route16HouseBlocks, Route16HouseTextPointers, Route16HouseScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route16HouseObject ; objects diff --git a/data/mapHeaders/route18gate.asm b/data/mapHeaders/route18gate.asm index 090d43df..1b519527 100755 --- a/data/mapHeaders/route18gate.asm +++ b/data/mapHeaders/route18gate.asm @@ -2,5 +2,5 @@ Route18Gate_h: db GATE ; tileset db ROUTE_18_GATE_1F_HEIGHT, ROUTE_18_GATE_1F_WIDTH ; dimensions (y, x) dw Route18GateBlocks, Route18GateTextPointers, Route18GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route18GateObject ; objects diff --git a/data/mapHeaders/route18gateupstairs.asm b/data/mapHeaders/route18gateupstairs.asm index ac9e3d0a..3f78af1b 100755 --- a/data/mapHeaders/route18gateupstairs.asm +++ b/data/mapHeaders/route18gateupstairs.asm @@ -2,5 +2,5 @@ Route18GateUpstairs_h: db GATE ; tileset db ROUTE_18_GATE_2F_HEIGHT, ROUTE_18_GATE_2F_WIDTH ; dimensions (y, x) dw Route18GateUpstairsBlocks, Route18GateUpstairsTextPointers, Route18GateUpstairsScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route18GateUpstairsObject ; objects diff --git a/data/mapHeaders/route22gate.asm b/data/mapHeaders/route22gate.asm index 7b8963ba..a8c20e97 100755 --- a/data/mapHeaders/route22gate.asm +++ b/data/mapHeaders/route22gate.asm @@ -2,5 +2,5 @@ Route22Gate_h: db GATE ; tileset db ROUTE_22_GATE_HEIGHT, ROUTE_22_GATE_WIDTH ; dimensions (y, x) dw Route22GateBlocks, Route22GateTextPointers, Route22GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route22GateObject ; objects diff --git a/data/mapHeaders/route2gate.asm b/data/mapHeaders/route2gate.asm index 5cb7bcbc..7ef9f1a8 100755 --- a/data/mapHeaders/route2gate.asm +++ b/data/mapHeaders/route2gate.asm @@ -2,5 +2,5 @@ Route2Gate_h: db GATE ; tileset db ROUTE_2_GATE_HEIGHT, ROUTE_2_GATE_WIDTH ; dimensions (y, x) dw Route2GateBlocks, Route2GateTextPointers, Route2GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route2GateObject ; objects diff --git a/data/mapHeaders/route2house.asm b/data/mapHeaders/route2house.asm index c7c140f6..2fc12748 100755 --- a/data/mapHeaders/route2house.asm +++ b/data/mapHeaders/route2house.asm @@ -2,5 +2,5 @@ Route2House_h: db HOUSE ; tileset db ROUTE_2_HOUSE_HEIGHT, ROUTE_2_HOUSE_WIDTH ; dimensions (y, x) dw Route2HouseBlocks, Route2HouseTextPointers, Route2HouseScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route2HouseObject ; objects diff --git a/data/mapHeaders/route5gate.asm b/data/mapHeaders/route5gate.asm index 68810da1..be3fd45c 100755 --- a/data/mapHeaders/route5gate.asm +++ b/data/mapHeaders/route5gate.asm @@ -2,5 +2,5 @@ Route5Gate_h: db GATE ; tileset db ROUTE_5_GATE_HEIGHT, ROUTE_5_GATE_WIDTH ; dimensions (y, x) dw Route5GateBlocks, Route5GateTextPointers, Route5GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route5GateObject ; objects diff --git a/data/mapHeaders/route6gate.asm b/data/mapHeaders/route6gate.asm index f689240c..37c5032f 100755 --- a/data/mapHeaders/route6gate.asm +++ b/data/mapHeaders/route6gate.asm @@ -2,5 +2,5 @@ Route6Gate_h: db GATE ; tileset db ROUTE_6_GATE_HEIGHT, ROUTE_6_GATE_WIDTH ; dimensions (y, x) dw Route6GateBlocks, Route6GateTextPointers, Route6GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route6GateObject ; objects diff --git a/data/mapHeaders/route7gate.asm b/data/mapHeaders/route7gate.asm index 9e01914f..9b5802b3 100755 --- a/data/mapHeaders/route7gate.asm +++ b/data/mapHeaders/route7gate.asm @@ -2,5 +2,5 @@ Route7Gate_h: db GATE ; tileset db ROUTE_7_GATE_HEIGHT, ROUTE_7_GATE_WIDTH ; dimensions (y, x) dw Route7GateBlocks, Route7GateTextPointers, Route7GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route7GateObject ; objects diff --git a/data/mapHeaders/route8gate.asm b/data/mapHeaders/route8gate.asm index d206e978..66593058 100755 --- a/data/mapHeaders/route8gate.asm +++ b/data/mapHeaders/route8gate.asm @@ -2,5 +2,5 @@ Route8Gate_h: db GATE ; tileset db ROUTE_8_GATE_HEIGHT, ROUTE_8_GATE_WIDTH ; dimensions (y, x) dw Route8GateBlocks, Route8GateTextPointers, Route8GateScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw Route8GateObject ; objects diff --git a/data/mapHeaders/safarizonecenter.asm b/data/mapHeaders/safarizonecenter.asm index 6da27c12..39f20b5d 100755 --- a/data/mapHeaders/safarizonecenter.asm +++ b/data/mapHeaders/safarizonecenter.asm @@ -2,5 +2,5 @@ SafariZoneCenter_h: db FOREST ; tileset db SAFARI_ZONE_CENTER_HEIGHT, SAFARI_ZONE_CENTER_WIDTH ; dimensions (y, x) dw SafariZoneCenterBlocks, SafariZoneCenterTextPointers, SafariZoneCenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneCenterObject ; objects diff --git a/data/mapHeaders/safarizoneeast.asm b/data/mapHeaders/safarizoneeast.asm index 089620dc..f94a92bf 100755 --- a/data/mapHeaders/safarizoneeast.asm +++ b/data/mapHeaders/safarizoneeast.asm @@ -2,5 +2,5 @@ SafariZoneEast_h: db FOREST ; tileset db SAFARI_ZONE_EAST_HEIGHT, SAFARI_ZONE_EAST_WIDTH ; dimensions (y, x) dw SafariZoneEastBlocks, SafariZoneEastTextPointers, SafariZoneEastScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneEastObject ; objects diff --git a/data/mapHeaders/safarizoneentrance.asm b/data/mapHeaders/safarizoneentrance.asm index 1122d5a3..e2eabdcd 100755 --- a/data/mapHeaders/safarizoneentrance.asm +++ b/data/mapHeaders/safarizoneentrance.asm @@ -2,5 +2,5 @@ SafariZoneEntrance_h: db GATE ; tileset db SAFARI_ZONE_ENTRANCE_HEIGHT, SAFARI_ZONE_ENTRANCE_WIDTH ; dimensions (y, x) dw SafariZoneEntranceBlocks, SafariZoneEntranceTextPointers, SafariZoneEntranceScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneEntranceObject ; objects diff --git a/data/mapHeaders/safarizonenorth.asm b/data/mapHeaders/safarizonenorth.asm index a3a46769..5b01138d 100755 --- a/data/mapHeaders/safarizonenorth.asm +++ b/data/mapHeaders/safarizonenorth.asm @@ -2,5 +2,5 @@ SafariZoneNorth_h: db FOREST ; tileset db SAFARI_ZONE_NORTH_HEIGHT, SAFARI_ZONE_NORTH_WIDTH ; dimensions (y, x) dw SafariZoneNorthBlocks, SafariZoneNorthTextPointers, SafariZoneNorthScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneNorthObject ; objects diff --git a/data/mapHeaders/safarizoneresthouse1.asm b/data/mapHeaders/safarizoneresthouse1.asm index b2988b47..0169c61f 100755 --- a/data/mapHeaders/safarizoneresthouse1.asm +++ b/data/mapHeaders/safarizoneresthouse1.asm @@ -2,5 +2,5 @@ SafariZoneRestHouse1_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_1_HEIGHT, SAFARI_ZONE_REST_HOUSE_1_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse1Blocks, SafariZoneRestHouse1TextPointers, SafariZoneRestHouse1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneRestHouse1Object ; objects diff --git a/data/mapHeaders/safarizoneresthouse2.asm b/data/mapHeaders/safarizoneresthouse2.asm index 589d9850..804d619c 100755 --- a/data/mapHeaders/safarizoneresthouse2.asm +++ b/data/mapHeaders/safarizoneresthouse2.asm @@ -2,5 +2,5 @@ SafariZoneRestHouse2_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_2_HEIGHT, SAFARI_ZONE_REST_HOUSE_2_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse2Blocks, SafariZoneRestHouse2TextPointers, SafariZoneRestHouse2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneRestHouse2Object ; objects diff --git a/data/mapHeaders/safarizoneresthouse3.asm b/data/mapHeaders/safarizoneresthouse3.asm index 21ffd3b6..becd3e7c 100755 --- a/data/mapHeaders/safarizoneresthouse3.asm +++ b/data/mapHeaders/safarizoneresthouse3.asm @@ -2,5 +2,5 @@ SafariZoneRestHouse3_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_3_HEIGHT, SAFARI_ZONE_REST_HOUSE_3_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse3Blocks, SafariZoneRestHouse3TextPointers, SafariZoneRestHouse3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneRestHouse3Object ; objects diff --git a/data/mapHeaders/safarizoneresthouse4.asm b/data/mapHeaders/safarizoneresthouse4.asm index fa7de7ad..7cc8fd25 100755 --- a/data/mapHeaders/safarizoneresthouse4.asm +++ b/data/mapHeaders/safarizoneresthouse4.asm @@ -2,5 +2,5 @@ SafariZoneRestHouse4_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_4_HEIGHT, SAFARI_ZONE_REST_HOUSE_4_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse4Blocks, SafariZoneRestHouse4TextPointers, SafariZoneRestHouse4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneRestHouse4Object ; objects diff --git a/data/mapHeaders/safarizonesecrethouse.asm b/data/mapHeaders/safarizonesecrethouse.asm index 6b081b1a..35575a10 100755 --- a/data/mapHeaders/safarizonesecrethouse.asm +++ b/data/mapHeaders/safarizonesecrethouse.asm @@ -2,5 +2,5 @@ SafariZoneSecretHouse_h: db LAB ; tileset db SAFARI_ZONE_SECRET_HOUSE_HEIGHT, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; dimensions (y, x) dw SafariZoneSecretHouseBlocks, SafariZoneSecretHouseTextPointers, SafariZoneSecretHouseScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneSecretHouseObject ; objects diff --git a/data/mapHeaders/safarizonewest.asm b/data/mapHeaders/safarizonewest.asm index c1c54d13..24ac7686 100755 --- a/data/mapHeaders/safarizonewest.asm +++ b/data/mapHeaders/safarizonewest.asm @@ -2,5 +2,5 @@ SafariZoneWest_h: db FOREST ; tileset db SAFARI_ZONE_WEST_HEIGHT, SAFARI_ZONE_WEST_WIDTH ; dimensions (y, x) dw SafariZoneWestBlocks, SafariZoneWestTextPointers, SafariZoneWestScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SafariZoneWestObject ; objects diff --git a/data/mapHeaders/saffrongym.asm b/data/mapHeaders/saffrongym.asm index da3b4c04..4e9fe383 100755 --- a/data/mapHeaders/saffrongym.asm +++ b/data/mapHeaders/saffrongym.asm @@ -2,5 +2,5 @@ SaffronGym_h: db FACILITY ; tileset db SAFFRON_GYM_HEIGHT, SAFFRON_GYM_WIDTH ; dimensions (y, x) dw SaffronGymBlocks, SaffronGymTextPointers, SaffronGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SaffronGymObject ; objects diff --git a/data/mapHeaders/saffronhouse1.asm b/data/mapHeaders/saffronhouse1.asm index 9e22b03b..747b46b4 100755 --- a/data/mapHeaders/saffronhouse1.asm +++ b/data/mapHeaders/saffronhouse1.asm @@ -2,5 +2,5 @@ SaffronHouse1_h: db HOUSE ; tileset db SAFFRON_HOUSE_1_HEIGHT, SAFFRON_HOUSE_1_WIDTH ; dimensions (y, x) dw SaffronHouse1Blocks, SaffronHouse1TextPointers, SaffronHouse1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SaffronHouse1Object ; objects diff --git a/data/mapHeaders/saffronhouse2.asm b/data/mapHeaders/saffronhouse2.asm index c38d0231..6a642a73 100755 --- a/data/mapHeaders/saffronhouse2.asm +++ b/data/mapHeaders/saffronhouse2.asm @@ -2,5 +2,5 @@ SaffronHouse2_h: db HOUSE ; tileset db SAFFRON_HOUSE_2_HEIGHT, SAFFRON_HOUSE_2_WIDTH ; dimensions (y, x) dw SaffronHouse2Blocks, SaffronHouse2TextPointers, SaffronHouse2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SaffronHouse2Object ; objects diff --git a/data/mapHeaders/saffronmart.asm b/data/mapHeaders/saffronmart.asm index 747e4da9..72aadb56 100755 --- a/data/mapHeaders/saffronmart.asm +++ b/data/mapHeaders/saffronmart.asm @@ -2,5 +2,5 @@ SaffronMart_h: db MART ; tileset db SAFFRON_MART_HEIGHT, SAFFRON_MART_WIDTH ; dimensions (y, x) dw SaffronMartBlocks, SaffronMartTextPointers, SaffronMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SaffronMartObject ; objects diff --git a/data/mapHeaders/saffronpokecenter.asm b/data/mapHeaders/saffronpokecenter.asm index aa972289..85e3b5e3 100755 --- a/data/mapHeaders/saffronpokecenter.asm +++ b/data/mapHeaders/saffronpokecenter.asm @@ -2,5 +2,5 @@ SaffronPokecenter_h: db POKECENTER ; tileset db SAFFRON_POKECENTER_HEIGHT, SAFFRON_POKECENTER_WIDTH ; dimensions (y, x) dw SaffronPokecenterBlocks, SaffronPokecenterTextPointers, SaffronPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SaffronPokecenterObject ; objects diff --git a/data/mapHeaders/school.asm b/data/mapHeaders/school.asm index 8ace4fba..4c122f2a 100755 --- a/data/mapHeaders/school.asm +++ b/data/mapHeaders/school.asm @@ -2,5 +2,5 @@ School_h: db HOUSE ; tileset db VIRIDIAN_SCHOOL_HEIGHT, VIRIDIAN_SCHOOL_WIDTH ; dimensions (y, x) dw SchoolBlocks, SchoolTextPointers, SchoolScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SchoolObject ; objects diff --git a/data/mapHeaders/seafoamislands1.asm b/data/mapHeaders/seafoamislands1.asm index f52a65a8..32754b23 100755 --- a/data/mapHeaders/seafoamislands1.asm +++ b/data/mapHeaders/seafoamislands1.asm @@ -2,5 +2,5 @@ SeafoamIslands1_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_1_HEIGHT, SEAFOAM_ISLANDS_1_WIDTH ; dimensions (y, x) dw SeafoamIslands1Blocks, SeafoamIslands1TextPointers, SeafoamIslands1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SeafoamIslands1Object ; objects diff --git a/data/mapHeaders/seafoamislands2.asm b/data/mapHeaders/seafoamislands2.asm index 08ec4bfa..f59d7201 100755 --- a/data/mapHeaders/seafoamislands2.asm +++ b/data/mapHeaders/seafoamislands2.asm @@ -2,5 +2,5 @@ SeafoamIslands2_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_2_HEIGHT, SEAFOAM_ISLANDS_2_WIDTH ; dimensions (y, x) dw SeafoamIslands2Blocks, SeafoamIslands2TextPointers, SeafoamIslands2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SeafoamIslands2Object ; objects diff --git a/data/mapHeaders/seafoamislands3.asm b/data/mapHeaders/seafoamislands3.asm index 4050cd71..e75325ea 100755 --- a/data/mapHeaders/seafoamislands3.asm +++ b/data/mapHeaders/seafoamislands3.asm @@ -2,5 +2,5 @@ SeafoamIslands3_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_3_HEIGHT, SEAFOAM_ISLANDS_3_WIDTH ; dimensions (y, x) dw SeafoamIslands3Blocks, SeafoamIslands3TextPointers, SeafoamIslands3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SeafoamIslands3Object ; objects diff --git a/data/mapHeaders/seafoamislands4.asm b/data/mapHeaders/seafoamislands4.asm index d3912ce0..297ecbbb 100755 --- a/data/mapHeaders/seafoamislands4.asm +++ b/data/mapHeaders/seafoamislands4.asm @@ -2,5 +2,5 @@ SeafoamIslands4_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_4_HEIGHT, SEAFOAM_ISLANDS_4_WIDTH ; dimensions (y, x) dw SeafoamIslands4Blocks, SeafoamIslands4TextPointers, SeafoamIslands4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SeafoamIslands4Object ; objects diff --git a/data/mapHeaders/seafoamislands5.asm b/data/mapHeaders/seafoamislands5.asm index 2ae6d4b7..1e8af6f7 100755 --- a/data/mapHeaders/seafoamislands5.asm +++ b/data/mapHeaders/seafoamislands5.asm @@ -2,5 +2,5 @@ SeafoamIslands5_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_5_HEIGHT, SEAFOAM_ISLANDS_5_WIDTH ; dimensions (y, x) dw SeafoamIslands5Blocks, SeafoamIslands5TextPointers, SeafoamIslands5Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SeafoamIslands5Object ; objects diff --git a/data/mapHeaders/silphco1.asm b/data/mapHeaders/silphco1.asm index 203f08b7..4a2b176f 100755 --- a/data/mapHeaders/silphco1.asm +++ b/data/mapHeaders/silphco1.asm @@ -2,5 +2,5 @@ SilphCo1_h: db FACILITY ; tileset db SILPH_CO_1F_HEIGHT, SILPH_CO_1F_WIDTH ; dimensions (y, x) dw SilphCo1Blocks, SilphCo1TextPointers, SilphCo1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo1Object ; objects diff --git a/data/mapHeaders/silphco10.asm b/data/mapHeaders/silphco10.asm index a16a6323..716fa025 100755 --- a/data/mapHeaders/silphco10.asm +++ b/data/mapHeaders/silphco10.asm @@ -2,5 +2,5 @@ SilphCo10_h: db FACILITY ; tileset db SILPH_CO_10F_HEIGHT, SILPH_CO_10F_WIDTH ; dimensions (y, x) dw SilphCo10Blocks, SilphCo10TextPointers, SilphCo10Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo10Object ; objects diff --git a/data/mapHeaders/silphco11.asm b/data/mapHeaders/silphco11.asm index a5d2f1b0..4ed282a9 100755 --- a/data/mapHeaders/silphco11.asm +++ b/data/mapHeaders/silphco11.asm @@ -2,5 +2,5 @@ SilphCo11_h: db INTERIOR ; tileset db SILPH_CO_11F_HEIGHT, SILPH_CO_11F_WIDTH ; dimensions (y, x) dw SilphCo11Blocks, SilphCo11TextPointers, SilphCo11Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo11Object ; objects diff --git a/data/mapHeaders/silphco2.asm b/data/mapHeaders/silphco2.asm index f0783e98..fae02d5b 100755 --- a/data/mapHeaders/silphco2.asm +++ b/data/mapHeaders/silphco2.asm @@ -2,5 +2,5 @@ SilphCo2_h: db FACILITY ; tileset db SILPH_CO_2F_HEIGHT, SILPH_CO_2F_WIDTH ; dimensions (y, x) dw SilphCo2Blocks, SilphCo2TextPointers, SilphCo2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo2Object ; objects diff --git a/data/mapHeaders/silphco3.asm b/data/mapHeaders/silphco3.asm index b89a3802..98a130c0 100755 --- a/data/mapHeaders/silphco3.asm +++ b/data/mapHeaders/silphco3.asm @@ -2,5 +2,5 @@ SilphCo3_h: db FACILITY ; tileset db SILPH_CO_3F_HEIGHT, SILPH_CO_3F_WIDTH ; dimensions (y, x) dw SilphCo3Blocks, SilphCo3TextPointers, SilphCo3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo3Object ; objects diff --git a/data/mapHeaders/silphco4.asm b/data/mapHeaders/silphco4.asm index 3c03a771..bc91f24b 100755 --- a/data/mapHeaders/silphco4.asm +++ b/data/mapHeaders/silphco4.asm @@ -2,5 +2,5 @@ SilphCo4_h: db FACILITY ; tileset db SILPH_CO_4F_HEIGHT, SILPH_CO_4F_WIDTH ; dimensions (y, x) dw SilphCo4Blocks, SilphCo4TextPointers, SilphCo4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo4Object ; objects diff --git a/data/mapHeaders/silphco5.asm b/data/mapHeaders/silphco5.asm index 42704025..c9a4c1d2 100755 --- a/data/mapHeaders/silphco5.asm +++ b/data/mapHeaders/silphco5.asm @@ -2,5 +2,5 @@ SilphCo5_h: db FACILITY ; tileset db SILPH_CO_5F_HEIGHT, SILPH_CO_5F_WIDTH ; dimensions (y, x) dw SilphCo5Blocks, SilphCo5TextPointers, SilphCo5Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo5Object ; objects diff --git a/data/mapHeaders/silphco6.asm b/data/mapHeaders/silphco6.asm index c204360a..675709c2 100755 --- a/data/mapHeaders/silphco6.asm +++ b/data/mapHeaders/silphco6.asm @@ -2,5 +2,5 @@ SilphCo6_h: db FACILITY ; tileset db SILPH_CO_6F_HEIGHT, SILPH_CO_6F_WIDTH ; dimensions (y, x) dw SilphCo6Blocks, SilphCo6TextPointers, SilphCo6Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo6Object ; objects diff --git a/data/mapHeaders/silphco7.asm b/data/mapHeaders/silphco7.asm index bc31b335..ee46c3fb 100755 --- a/data/mapHeaders/silphco7.asm +++ b/data/mapHeaders/silphco7.asm @@ -2,5 +2,5 @@ SilphCo7_h: db FACILITY ; tileset db SILPH_CO_7F_HEIGHT, SILPH_CO_7F_WIDTH ; dimensions (y, x) dw SilphCo7Blocks, SilphCo7TextPointers, SilphCo7Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo7Object ; objects diff --git a/data/mapHeaders/silphco8.asm b/data/mapHeaders/silphco8.asm index aa3e0317..90c0ba0f 100755 --- a/data/mapHeaders/silphco8.asm +++ b/data/mapHeaders/silphco8.asm @@ -2,5 +2,5 @@ SilphCo8_h: db FACILITY ; tileset db SILPH_CO_8F_HEIGHT, SILPH_CO_8F_WIDTH ; dimensions (y, x) dw SilphCo8Blocks, SilphCo8TextPointers, SilphCo8Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo8Object ; objects diff --git a/data/mapHeaders/silphco9.asm b/data/mapHeaders/silphco9.asm index 97427fa3..182ec5b2 100755 --- a/data/mapHeaders/silphco9.asm +++ b/data/mapHeaders/silphco9.asm @@ -2,5 +2,5 @@ SilphCo9_h: db FACILITY ; tileset db SILPH_CO_9F_HEIGHT, SILPH_CO_9F_WIDTH ; dimensions (y, x) dw SilphCo9Blocks, SilphCo9TextPointers, SilphCo9Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCo9Object ; objects diff --git a/data/mapHeaders/silphcoelevator.asm b/data/mapHeaders/silphcoelevator.asm index 8a6ae1ca..3663cacd 100755 --- a/data/mapHeaders/silphcoelevator.asm +++ b/data/mapHeaders/silphcoelevator.asm @@ -2,5 +2,5 @@ SilphCoElevator_h: db LOBBY ; tileset db SILPH_CO_ELEVATOR_HEIGHT, SILPH_CO_ELEVATOR_WIDTH ; dimensions (y, x) dw SilphCoElevatorBlocks, SilphCoElevatorTextPointers, SilphCoElevatorScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SilphCoElevatorObject ; objects diff --git a/data/mapHeaders/ssanne1.asm b/data/mapHeaders/ssanne1.asm index e6b48564..c69481d6 100755 --- a/data/mapHeaders/ssanne1.asm +++ b/data/mapHeaders/ssanne1.asm @@ -2,5 +2,5 @@ SSAnne1_h: db SHIP ; tileset db SS_ANNE_1_HEIGHT, SS_ANNE_1_WIDTH ; dimensions (y, x) dw SSAnne1Blocks, SSAnne1TextPointers, SSAnne1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne1Object ; objects diff --git a/data/mapHeaders/ssanne10.asm b/data/mapHeaders/ssanne10.asm index ef07424b..79464beb 100755 --- a/data/mapHeaders/ssanne10.asm +++ b/data/mapHeaders/ssanne10.asm @@ -2,5 +2,5 @@ SSAnne10_h: db SHIP ; tileset db SS_ANNE_10_HEIGHT, SS_ANNE_10_WIDTH ; dimensions (y, x) dw SSAnne10Blocks, SSAnne10TextPointers, SSAnne10Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne10Object ; objects diff --git a/data/mapHeaders/ssanne2.asm b/data/mapHeaders/ssanne2.asm index cd5f3aa4..7a6294e5 100755 --- a/data/mapHeaders/ssanne2.asm +++ b/data/mapHeaders/ssanne2.asm @@ -2,5 +2,5 @@ SSAnne2_h: db SHIP ; tileset db SS_ANNE_2_HEIGHT, SS_ANNE_2_WIDTH ; dimensions (y, x) dw SSAnne2Blocks, SSAnne2TextPointers, SSAnne2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne2Object ; objects diff --git a/data/mapHeaders/ssanne3.asm b/data/mapHeaders/ssanne3.asm index ffa57ddd..78f9660b 100755 --- a/data/mapHeaders/ssanne3.asm +++ b/data/mapHeaders/ssanne3.asm @@ -2,5 +2,5 @@ SSAnne3_h: db SHIP ; tileset db SS_ANNE_3_HEIGHT, SS_ANNE_3_WIDTH ; dimensions (y, x) dw SSAnne3Blocks, SSAnne3TextPointers, SSAnne3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne3Object ; objects diff --git a/data/mapHeaders/ssanne4.asm b/data/mapHeaders/ssanne4.asm index 492b4b8d..9ad2c66c 100755 --- a/data/mapHeaders/ssanne4.asm +++ b/data/mapHeaders/ssanne4.asm @@ -2,5 +2,5 @@ SSAnne4_h: db SHIP ; tileset db SS_ANNE_4_HEIGHT, SS_ANNE_4_WIDTH ; dimensions (y, x) dw SSAnne4Blocks, SSAnne4TextPointers, SSAnne4Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne4Object ; objects diff --git a/data/mapHeaders/ssanne5.asm b/data/mapHeaders/ssanne5.asm index 29ffb6b9..a2c2b943 100755 --- a/data/mapHeaders/ssanne5.asm +++ b/data/mapHeaders/ssanne5.asm @@ -2,5 +2,5 @@ SSAnne5_h: db SHIP ; tileset db SS_ANNE_5_HEIGHT, SS_ANNE_5_WIDTH ; dimensions (y, x) dw SSAnne5Blocks, SSAnne5TextPointers, SSAnne5Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne5Object ; objects diff --git a/data/mapHeaders/ssanne6.asm b/data/mapHeaders/ssanne6.asm index e347528a..5a939b8f 100755 --- a/data/mapHeaders/ssanne6.asm +++ b/data/mapHeaders/ssanne6.asm @@ -2,5 +2,5 @@ SSAnne6_h: db SHIP ; tileset db SS_ANNE_6_HEIGHT, SS_ANNE_6_WIDTH ; dimensions (y, x) dw SSAnne6Blocks, SSAnne6TextPointers, SSAnne6Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne6Object ; objects diff --git a/data/mapHeaders/ssanne7.asm b/data/mapHeaders/ssanne7.asm index 9b437688..97666530 100755 --- a/data/mapHeaders/ssanne7.asm +++ b/data/mapHeaders/ssanne7.asm @@ -2,5 +2,5 @@ SSAnne7_h: db SHIP ; tileset db SS_ANNE_7_HEIGHT, SS_ANNE_7_WIDTH ; dimensions (y, x) dw SSAnne7Blocks, SSAnne7TextPointers, SSAnne7Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne7Object ; objects diff --git a/data/mapHeaders/ssanne8.asm b/data/mapHeaders/ssanne8.asm index 64b5c565..2771ad40 100755 --- a/data/mapHeaders/ssanne8.asm +++ b/data/mapHeaders/ssanne8.asm @@ -2,5 +2,5 @@ SSAnne8_h: db SHIP ; tileset db SS_ANNE_8_HEIGHT, SS_ANNE_8_WIDTH ; dimensions (y, x) dw SSAnne8Blocks, SSAnne8TextPointers, SSAnne8Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne8Object ; objects diff --git a/data/mapHeaders/ssanne9.asm b/data/mapHeaders/ssanne9.asm index c8e6e16f..8f944cf9 100755 --- a/data/mapHeaders/ssanne9.asm +++ b/data/mapHeaders/ssanne9.asm @@ -2,5 +2,5 @@ SSAnne9_h: db SHIP ; tileset db SS_ANNE_9_HEIGHT, SS_ANNE_9_WIDTH ; dimensions (y, x) dw SSAnne9Blocks, SSAnne9TextPointers, SSAnne9Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw SSAnne9Object ; objects diff --git a/data/mapHeaders/tradecenter.asm b/data/mapHeaders/tradecenter.asm index 09217ff0..5d6c7d95 100755 --- a/data/mapHeaders/tradecenter.asm +++ b/data/mapHeaders/tradecenter.asm @@ -2,5 +2,5 @@ TradeCenter_h: db CLUB ; tileset db TRADE_CENTER_HEIGHT, TRADE_CENTER_WIDTH ; dimensions (y, x) dw TradeCenterBlocks, TradeCenterTextPointers, TradeCenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw TradeCenterObject ; objects diff --git a/data/mapHeaders/undergroundpathentranceroute5.asm b/data/mapHeaders/undergroundpathentranceroute5.asm index 6e2c5727..9f5a2125 100755 --- a/data/mapHeaders/undergroundpathentranceroute5.asm +++ b/data/mapHeaders/undergroundpathentranceroute5.asm @@ -2,5 +2,5 @@ UndergroundPathEntranceRoute5_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_5_HEIGHT, PATH_ENTRANCE_ROUTE_5_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute5Blocks, UndergroundPathEntranceRoute5TextPointers, UndergroundPathEntranceRoute5Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UndergroundPathEntranceRoute5Object ; objects diff --git a/data/mapHeaders/undergroundpathentranceroute6.asm b/data/mapHeaders/undergroundpathentranceroute6.asm index bb22e93e..4a5670af 100755 --- a/data/mapHeaders/undergroundpathentranceroute6.asm +++ b/data/mapHeaders/undergroundpathentranceroute6.asm @@ -2,5 +2,5 @@ UndergroundPathEntranceRoute6_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_6_HEIGHT, PATH_ENTRANCE_ROUTE_6_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute6Blocks, UndergroundPathEntranceRoute6TextPointers, UndergroundPathEntranceRoute6Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UndergroundPathEntranceRoute6Object ; objects diff --git a/data/mapHeaders/undergroundpathentranceroute7.asm b/data/mapHeaders/undergroundpathentranceroute7.asm index 49b03415..e3fe68f0 100755 --- a/data/mapHeaders/undergroundpathentranceroute7.asm +++ b/data/mapHeaders/undergroundpathentranceroute7.asm @@ -2,5 +2,5 @@ UndergroundPathEntranceRoute7_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_7_HEIGHT, PATH_ENTRANCE_ROUTE_7_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute7Blocks, UndergroundPathEntranceRoute7TextPointers, UndergroundPathEntranceRoute7Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UndergroundPathEntranceRoute7Object ; objects diff --git a/data/mapHeaders/undergroundpathentranceroute7copy.asm b/data/mapHeaders/undergroundpathentranceroute7copy.asm index e12ee454..a15f2f4d 100755 --- a/data/mapHeaders/undergroundpathentranceroute7copy.asm +++ b/data/mapHeaders/undergroundpathentranceroute7copy.asm @@ -2,5 +2,5 @@ UndergroundPathEntranceRoute7Copy_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_7_HEIGHT, PATH_ENTRANCE_ROUTE_7_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute7CopyBlocks, UndergroundPathEntranceRoute7CopyTextPointers, UndergroundPathEntranceRoute7CopyScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UndergroundPathEntranceRoute7CopyObject ; objects diff --git a/data/mapHeaders/undergroundpathentranceroute8.asm b/data/mapHeaders/undergroundpathentranceroute8.asm index c70cb697..0698da9a 100755 --- a/data/mapHeaders/undergroundpathentranceroute8.asm +++ b/data/mapHeaders/undergroundpathentranceroute8.asm @@ -2,5 +2,5 @@ UndergroundPathEntranceRoute8_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_8_HEIGHT, PATH_ENTRANCE_ROUTE_8_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute8Blocks, UndergroundPathEntranceRoute8TextPointers, UndergroundPathEntranceRoute8Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UndergroundPathEntranceRoute8Object ; objects diff --git a/data/mapHeaders/undergroundpathns.asm b/data/mapHeaders/undergroundpathns.asm index 4dc86647..ba021bea 100755 --- a/data/mapHeaders/undergroundpathns.asm +++ b/data/mapHeaders/undergroundpathns.asm @@ -2,5 +2,5 @@ UndergroundPathNS_h: db UNDERGROUND ; tileset db UNDERGROUND_PATH_NS_HEIGHT, UNDERGROUND_PATH_NS_WIDTH ; dimensions (y, x) dw UndergroundPathNSBlocks, UndergroundPathNSTextPointers, UndergroundPathNSScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UndergroundPathNSObject ; objects diff --git a/data/mapHeaders/undergroundpathwe.asm b/data/mapHeaders/undergroundpathwe.asm index df2f98e1..7061a8d1 100755 --- a/data/mapHeaders/undergroundpathwe.asm +++ b/data/mapHeaders/undergroundpathwe.asm @@ -2,5 +2,5 @@ UndergroundPathWE_h: db UNDERGROUND ; tileset db UNDERGROUND_PATH_WE_HEIGHT, UNDERGROUND_PATH_WE_WIDTH ; dimensions (y, x) dw UndergroundPathWEBlocks, UndergroundPathWETextPointers, UndergroundPathWEScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UndergroundPathWEObject ; objects diff --git a/data/mapHeaders/unknowndungeon1.asm b/data/mapHeaders/unknowndungeon1.asm index e784ffac..0c6adbbd 100755 --- a/data/mapHeaders/unknowndungeon1.asm +++ b/data/mapHeaders/unknowndungeon1.asm @@ -2,5 +2,5 @@ UnknownDungeon1_h: db CAVERN ; tileset db UNKNOWN_DUNGEON_1_HEIGHT, UNKNOWN_DUNGEON_1_WIDTH ; dimensions (y, x) dw UnknownDungeon1Blocks, UnknownDungeon1TextPointers, UnknownDungeon1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UnknownDungeon1Object ; objects diff --git a/data/mapHeaders/unknowndungeon2.asm b/data/mapHeaders/unknowndungeon2.asm index 3c4c8d4e..b5147da2 100755 --- a/data/mapHeaders/unknowndungeon2.asm +++ b/data/mapHeaders/unknowndungeon2.asm @@ -2,5 +2,5 @@ UnknownDungeon2_h: db CAVERN ; tileset db UNKNOWN_DUNGEON_2_HEIGHT, UNKNOWN_DUNGEON_2_WIDTH ; dimensions (y, x) dw UnknownDungeon2Blocks, UnknownDungeon2TextPointers, UnknownDungeon2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UnknownDungeon2Object ; objects diff --git a/data/mapHeaders/unknowndungeon3.asm b/data/mapHeaders/unknowndungeon3.asm index 2e01c079..4b5372d2 100755 --- a/data/mapHeaders/unknowndungeon3.asm +++ b/data/mapHeaders/unknowndungeon3.asm @@ -2,5 +2,5 @@ UnknownDungeon3_h: db CAVERN ; tileset db UNKNOWN_DUNGEON_3_HEIGHT, UNKNOWN_DUNGEON_3_WIDTH ; dimensions (y, x) dw UnknownDungeon3Blocks, UnknownDungeon3TextPointers, UnknownDungeon3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw UnknownDungeon3Object ; objects diff --git a/data/mapHeaders/vermiliondock.asm b/data/mapHeaders/vermiliondock.asm index 16b1c7d8..5d93f284 100755 --- a/data/mapHeaders/vermiliondock.asm +++ b/data/mapHeaders/vermiliondock.asm @@ -2,5 +2,5 @@ VermilionDock_h: db SHIP_PORT ; tileset db VERMILION_DOCK_HEIGHT, VERMILION_DOCK_WIDTH ; dimensions (y, x) dw VermilionDockBlocks, VermilionDockTextPointers, VermilionDockScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VermilionDockObject ; objects diff --git a/data/mapHeaders/vermiliongym.asm b/data/mapHeaders/vermiliongym.asm index 7624ed75..e960a70f 100755 --- a/data/mapHeaders/vermiliongym.asm +++ b/data/mapHeaders/vermiliongym.asm @@ -2,5 +2,5 @@ VermilionGym_h: db GYM ; tileset db VERMILION_GYM_HEIGHT, VERMILION_GYM_WIDTH ; dimensions (y, x) dw VermilionGymBlocks, VermilionGymTextPointers, VermilionGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VermilionGymObject ; objects diff --git a/data/mapHeaders/vermilionhouse1.asm b/data/mapHeaders/vermilionhouse1.asm index 94aac1d0..47375c91 100755 --- a/data/mapHeaders/vermilionhouse1.asm +++ b/data/mapHeaders/vermilionhouse1.asm @@ -2,5 +2,5 @@ VermilionHouse1_h: db HOUSE ; tileset db VERMILION_HOUSE_1_HEIGHT, VERMILION_HOUSE_1_WIDTH ; dimensions (y, x) dw VermilionHouse1Blocks, VermilionHouse1TextPointers, VermilionHouse1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VermilionHouse1Object ; objects diff --git a/data/mapHeaders/vermilionhouse2.asm b/data/mapHeaders/vermilionhouse2.asm index b4124088..3a870db3 100755 --- a/data/mapHeaders/vermilionhouse2.asm +++ b/data/mapHeaders/vermilionhouse2.asm @@ -2,5 +2,5 @@ VermilionHouse2_h: db HOUSE ; tileset db VERMILION_HOUSE_2_HEIGHT, VERMILION_HOUSE_2_WIDTH ; dimensions (y, x) dw VermilionHouse2Blocks, VermilionHouse2TextPointers, VermilionHouse2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VermilionHouse2Object ; objects diff --git a/data/mapHeaders/vermilionhouse3.asm b/data/mapHeaders/vermilionhouse3.asm index 01683532..139f69f6 100755 --- a/data/mapHeaders/vermilionhouse3.asm +++ b/data/mapHeaders/vermilionhouse3.asm @@ -2,5 +2,5 @@ VermilionHouse3_h: db HOUSE ; tileset db VERMILION_HOUSE_3_HEIGHT, VERMILION_HOUSE_3_WIDTH ; dimensions (y, x) dw VermilionHouse3Blocks, VermilionHouse3TextPointers, VermilionHouse3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VermilionHouse3Object ; objects diff --git a/data/mapHeaders/vermilionmart.asm b/data/mapHeaders/vermilionmart.asm index 97fccc4d..e9dcd913 100755 --- a/data/mapHeaders/vermilionmart.asm +++ b/data/mapHeaders/vermilionmart.asm @@ -2,5 +2,5 @@ VermilionMart_h: db MART ; tileset db VERMILION_MART_HEIGHT, VERMILION_MART_WIDTH ; dimensions (y, x) dw VermilionMartBlocks, VermilionMartTextPointers, VermilionMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VermilionMartObject ; objects diff --git a/data/mapHeaders/vermilionpokecenter.asm b/data/mapHeaders/vermilionpokecenter.asm index e1a63f9e..6a84204d 100755 --- a/data/mapHeaders/vermilionpokecenter.asm +++ b/data/mapHeaders/vermilionpokecenter.asm @@ -2,5 +2,5 @@ VermilionPokecenter_h: db POKECENTER ; tileset db VERMILION_POKECENTER_HEIGHT, VERMILION_POKECENTER_WIDTH ; dimensions (y, x) dw VermilionPokecenterBlocks, VermilionPokecenterTextPointers, VermilionPokecenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VermilionPokecenterObject ; objects diff --git a/data/mapHeaders/victoryroad1.asm b/data/mapHeaders/victoryroad1.asm index 6d2f4338..cb902e37 100755 --- a/data/mapHeaders/victoryroad1.asm +++ b/data/mapHeaders/victoryroad1.asm @@ -2,5 +2,5 @@ VictoryRoad1_h: db CAVERN ; tileset db VICTORY_ROAD_1_HEIGHT, VICTORY_ROAD_1_WIDTH ; dimensions (y, x) dw VictoryRoad1Blocks, VictoryRoad1TextPointers, VictoryRoad1Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VictoryRoad1Object ; objects diff --git a/data/mapHeaders/victoryroad2.asm b/data/mapHeaders/victoryroad2.asm index fa9803b2..223652e5 100755 --- a/data/mapHeaders/victoryroad2.asm +++ b/data/mapHeaders/victoryroad2.asm @@ -2,5 +2,5 @@ VictoryRoad2_h: db CAVERN ; tileset db VICTORY_ROAD_2_HEIGHT, VICTORY_ROAD_2_WIDTH ; dimensions (y, x) dw VictoryRoad2Blocks, VictoryRoad2TextPointers, VictoryRoad2Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VictoryRoad2Object ; objects diff --git a/data/mapHeaders/victoryroad3.asm b/data/mapHeaders/victoryroad3.asm index 4202bfb6..5401fe10 100755 --- a/data/mapHeaders/victoryroad3.asm +++ b/data/mapHeaders/victoryroad3.asm @@ -2,5 +2,5 @@ VictoryRoad3_h: db CAVERN ; tileset db VICTORY_ROAD_3_HEIGHT, VICTORY_ROAD_3_WIDTH ; dimensions (y, x) dw VictoryRoad3Blocks, VictoryRoad3TextPointers, VictoryRoad3Script ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw VictoryRoad3Object ; objects diff --git a/data/mapHeaders/viridianforest.asm b/data/mapHeaders/viridianforest.asm index ef7905b0..250f3de8 100755 --- a/data/mapHeaders/viridianforest.asm +++ b/data/mapHeaders/viridianforest.asm @@ -2,5 +2,5 @@ ViridianForest_h: db FOREST ; tileset db VIRIDIAN_FOREST_HEIGHT, VIRIDIAN_FOREST_WIDTH ; dimensions (y, x) dw ViridianForestBlocks, ViridianForestTextPointers, ViridianForestScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ViridianForestObject ; objects diff --git a/data/mapHeaders/viridianforestentrance.asm b/data/mapHeaders/viridianforestentrance.asm index 6e861c58..81534daa 100755 --- a/data/mapHeaders/viridianforestentrance.asm +++ b/data/mapHeaders/viridianforestentrance.asm @@ -2,5 +2,5 @@ ViridianForestEntrance_h: db FOREST_GATE ; tileset db VIRIDIAN_FOREST_ENTRANCE_HEIGHT, VIRIDIAN_FOREST_ENTRANCE_WIDTH ; dimensions (y, x) dw ViridianForestEntranceBlocks, ViridianForestEntranceTextPointers, ViridianForestEntranceScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ViridianForestEntranceObject ; objects diff --git a/data/mapHeaders/viridianforestexit.asm b/data/mapHeaders/viridianforestexit.asm index 8e1dd25e..9c492487 100755 --- a/data/mapHeaders/viridianforestexit.asm +++ b/data/mapHeaders/viridianforestexit.asm @@ -2,5 +2,5 @@ ViridianForestExit_h: db FOREST_GATE ; tileset db VIRIDIAN_FOREST_EXIT_HEIGHT, VIRIDIAN_FOREST_EXIT_WIDTH ; dimensions (y, x) dw ViridianForestExitBlocks, ViridianForestExitTextPointers, ViridianForestExitScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ViridianForestExitObject ; objects diff --git a/data/mapHeaders/viridiangym.asm b/data/mapHeaders/viridiangym.asm index 40b0d69f..19833cf0 100755 --- a/data/mapHeaders/viridiangym.asm +++ b/data/mapHeaders/viridiangym.asm @@ -2,5 +2,5 @@ ViridianGym_h: db GYM ; tileset db VIRIDIAN_GYM_HEIGHT, VIRIDIAN_GYM_WIDTH ; dimensions (y, x) dw ViridianGymBlocks, ViridianGymTextPointers, ViridianGymScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ViridianGymObject ; objects diff --git a/data/mapHeaders/viridianhouse.asm b/data/mapHeaders/viridianhouse.asm index c8724b4e..a80953f9 100755 --- a/data/mapHeaders/viridianhouse.asm +++ b/data/mapHeaders/viridianhouse.asm @@ -2,7 +2,7 @@ ViridianHouse_h: db HOUSE ; tileset db VIRIDIAN_HOUSE_HEIGHT, VIRIDIAN_HOUSE_WIDTH ; dimensions (y, x) dw ViridianHouseBlocks, ViridianHouseTextPointers, ViridianHouseScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ViridianHouseObject ; objects db $0 diff --git a/data/mapHeaders/viridianmart.asm b/data/mapHeaders/viridianmart.asm index 3d799a5b..39281567 100755 --- a/data/mapHeaders/viridianmart.asm +++ b/data/mapHeaders/viridianmart.asm @@ -2,5 +2,5 @@ ViridianMart_h: db MART ; tileset db VIRIDIAN_MART_HEIGHT, VIRIDIAN_MART_WIDTH ; dimensions (y, x) dw ViridianMartBlocks, ViridianMartTextPointers, ViridianMartScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ViridianMartObject ; objects diff --git a/data/mapHeaders/viridianpokecenter.asm b/data/mapHeaders/viridianpokecenter.asm index 3218e89d..fbef5193 100755 --- a/data/mapHeaders/viridianpokecenter.asm +++ b/data/mapHeaders/viridianpokecenter.asm @@ -2,5 +2,5 @@ ViridianPokecenter_h: db POKECENTER ; tileset db VIRIDIAN_POKECENTER_HEIGHT, VIRIDIAN_POKECENTER_WIDTH ; dimensions (y, x) dw ViridianPokecenterBlocks, ViridianPokecenterTextPointers, ViridianPokeCenterScript ; blocks, texts, scripts - db $00 ; connections + db 0 ; connections dw ViridianPokecenterObject ; objects diff --git a/data/mapObjects/agatha.asm b/data/mapObjects/agatha.asm index 22000dde..cd8bbfe7 100755 --- a/data/mapObjects/agatha.asm +++ b/data/mapObjects/agatha.asm @@ -1,19 +1,19 @@ AgathaObject: db $0 ; border block - db $4 ; warps - db $b, $4, $2, BRUNOS_ROOM - db $b, $5, $3, BRUNOS_ROOM - db $0, $4, $0, LANCES_ROOM - db $0, $5, $0, LANCES_ROOM + db 4 ; warps + warp 4, 11, 2, BRUNOS_ROOM + warp 5, 11, 3, BRUNOS_ROOM + warp 4, 0, 0, LANCES_ROOM + warp 5, 0, 0, LANCES_ROOM - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_AGATHA, $5, $2, STAY, DOWN, $1, OPP_AGATHA, $1 + db 1 ; objects + object SPRITE_AGATHA, 5, 2, STAY, DOWN, 1, OPP_AGATHA, 1 ; warp-to - EVENT_DISP AGATHAS_ROOM_WIDTH, $b, $4 ; BRUNOS_ROOM - EVENT_DISP AGATHAS_ROOM_WIDTH, $b, $5 ; BRUNOS_ROOM - EVENT_DISP AGATHAS_ROOM_WIDTH, $0, $4 ; LANCES_ROOM - EVENT_DISP AGATHAS_ROOM_WIDTH, $0, $5 ; LANCES_ROOM + warp_to 4, 11, AGATHAS_ROOM_WIDTH ; BRUNOS_ROOM + warp_to 5, 11, AGATHAS_ROOM_WIDTH ; BRUNOS_ROOM + warp_to 4, 0, AGATHAS_ROOM_WIDTH ; LANCES_ROOM + warp_to 5, 0, AGATHAS_ROOM_WIDTH ; LANCES_ROOM diff --git a/data/mapObjects/bikeshop.asm b/data/mapObjects/bikeshop.asm index 5a7e832c..98208a94 100755 --- a/data/mapObjects/bikeshop.asm +++ b/data/mapObjects/bikeshop.asm @@ -1,17 +1,17 @@ BikeShopObject: db $e ; border block - db $2 ; warps - db $7, $2, $4, $ff - db $7, $3, $4, $ff + db 2 ; warps + warp 2, 7, 4, -1 + warp 3, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_BIKE_SHOP_GUY, $6, $2, STAY, NONE, $1 ; person - object SPRITE_MOM_GEISHA, $5, $6, WALK, $1, $2 ; person - object SPRITE_BUG_CATCHER, $1, $3, STAY, UP, $3 ; person + db 3 ; objects + object SPRITE_BIKE_SHOP_GUY, 6, 2, STAY, NONE, 1 ; person + object SPRITE_MOM_GEISHA, 5, 6, WALK, 1, 2 ; person + object SPRITE_BUG_CATCHER, 1, 3, STAY, UP, 3 ; person ; warp-to - EVENT_DISP BIKE_SHOP_WIDTH, $7, $2 - EVENT_DISP BIKE_SHOP_WIDTH, $7, $3 + warp_to 2, 7, BIKE_SHOP_WIDTH + warp_to 3, 7, BIKE_SHOP_WIDTH diff --git a/data/mapObjects/billshouse.asm b/data/mapObjects/billshouse.asm index ef52e1dd..317d7c01 100755 --- a/data/mapObjects/billshouse.asm +++ b/data/mapObjects/billshouse.asm @@ -1,17 +1,17 @@ BillsHouseObject: db $d ; border block - db $2 ; warps - db $7, $2, $0, $ff - db $7, $3, $0, $ff + db 2 ; warps + warp 2, 7, 0, -1 + warp 3, 7, 0, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_SLOWBRO, $6, $5, STAY, NONE, $1 ; person - object SPRITE_BLACK_HAIR_BOY_2, $4, $4, STAY, NONE, $2 ; person - object SPRITE_BLACK_HAIR_BOY_2, $6, $5, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_SLOWBRO, 6, 5, STAY, NONE, 1 ; person + object SPRITE_BLACK_HAIR_BOY_2, 4, 4, STAY, NONE, 2 ; person + object SPRITE_BLACK_HAIR_BOY_2, 6, 5, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP BILLS_HOUSE_WIDTH, $7, $2 - EVENT_DISP BILLS_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, BILLS_HOUSE_WIDTH + warp_to 3, 7, BILLS_HOUSE_WIDTH diff --git a/data/mapObjects/blueshouse.asm b/data/mapObjects/blueshouse.asm index 231e852d..19338885 100755 --- a/data/mapObjects/blueshouse.asm +++ b/data/mapObjects/blueshouse.asm @@ -1,17 +1,17 @@ BluesHouseObject: - db $0A ; border block + db $a ; border block - db $2 ; warps - db $7, $2, $1, $FF - db $7, $3, $1, $FF + db 2 ; warps + warp 2, 7, 1, -1 + warp 3, 7, 1, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_DAISY, $2, $3, STAY, RIGHT, $1 ; Daisy, sitting by map - object SPRITE_DAISY, $6, $4, WALK, $1, $2, $0 ; Daisy, walking around - object SPRITE_BOOK_MAP_DEX, $3, $3, STAY, NONE, $3, $0 ; map on table + db 3 ; objects + object SPRITE_DAISY, 2, 3, STAY, RIGHT, 1 ; Daisy, sitting by map + object SPRITE_DAISY, 6, 4, WALK, 1, 2, 0 ; Daisy, walking around + object SPRITE_BOOK_MAP_DEX, 3, 3, STAY, NONE, 3, 0 ; map on table ; warp-to - EVENT_DISP BLUES_HOUSE_WIDTH, $7, $2 - EVENT_DISP BLUES_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, BLUES_HOUSE_WIDTH + warp_to 3, 7, BLUES_HOUSE_WIDTH diff --git a/data/mapObjects/bruno.asm b/data/mapObjects/bruno.asm index a734b07b..45d21186 100755 --- a/data/mapObjects/bruno.asm +++ b/data/mapObjects/bruno.asm @@ -1,19 +1,19 @@ BrunoObject: db $3 ; border block - db $4 ; warps - db $b, $4, $2, LORELEIS_ROOM - db $b, $5, $3, LORELEIS_ROOM - db $0, $4, $0, AGATHAS_ROOM - db $0, $5, $1, AGATHAS_ROOM + db 4 ; warps + warp 4, 11, 2, LORELEIS_ROOM + warp 5, 11, 3, LORELEIS_ROOM + warp 4, 0, 0, AGATHAS_ROOM + warp 5, 0, 1, AGATHAS_ROOM - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_BRUNO, $5, $2, STAY, DOWN, $1, OPP_BRUNO, $1 + db 1 ; objects + object SPRITE_BRUNO, 5, 2, STAY, DOWN, 1, OPP_BRUNO, 1 ; warp-to - EVENT_DISP BRUNOS_ROOM_WIDTH, $b, $4 ; LORELEIS_ROOM - EVENT_DISP BRUNOS_ROOM_WIDTH, $b, $5 ; LORELEIS_ROOM - EVENT_DISP BRUNOS_ROOM_WIDTH, $0, $4 ; AGATHAS_ROOM - EVENT_DISP BRUNOS_ROOM_WIDTH, $0, $5 ; AGATHAS_ROOM + warp_to 4, 11, BRUNOS_ROOM_WIDTH ; LORELEIS_ROOM + warp_to 5, 11, BRUNOS_ROOM_WIDTH ; LORELEIS_ROOM + warp_to 4, 0, BRUNOS_ROOM_WIDTH ; AGATHAS_ROOM + warp_to 5, 0, BRUNOS_ROOM_WIDTH ; AGATHAS_ROOM diff --git a/data/mapObjects/celadoncity.asm b/data/mapObjects/celadoncity.asm index c2a7fd78..f3e481f4 100755 --- a/data/mapObjects/celadoncity.asm +++ b/data/mapObjects/celadoncity.asm @@ -1,54 +1,54 @@ CeladonCityObject: db $f ; border block - db $d ; warps - db $d, $8, $0, CELADON_MART_1 - db $d, $a, $2, CELADON_MART_1 - db $9, $18, $0, CELADON_MANSION_1 - db $3, $18, $2, CELADON_MANSION_1 - db $3, $19, $2, CELADON_MANSION_1 - db $9, $29, $0, CELADON_POKECENTER - db $1b, $c, $0, CELADON_GYM - db $13, $1c, $0, GAME_CORNER - db $13, $27, $0, CELADON_MART_5 ; beta warp! no longer used - db $13, $21, $0, CELADON_PRIZE_ROOM - db $1b, $1f, $0, CELADON_DINER - db $1b, $23, $0, CELADON_HOUSE - db $1b, $2b, $0, CELADON_HOTEL + db 13 ; warps + warp 8, 13, 0, CELADON_MART_1 + warp 10, 13, 2, CELADON_MART_1 + warp 24, 9, 0, CELADON_MANSION_1 + warp 24, 3, 2, CELADON_MANSION_1 + warp 25, 3, 2, CELADON_MANSION_1 + warp 41, 9, 0, CELADON_POKECENTER + warp 12, 27, 0, CELADON_GYM + warp 28, 19, 0, GAME_CORNER + warp 39, 19, 0, CELADON_MART_5 ; beta warp! no longer used + warp 33, 19, 0, CELADON_PRIZE_ROOM + warp 31, 27, 0, CELADON_DINER + warp 35, 27, 0, CELADON_HOUSE + warp 43, 27, 0, CELADON_HOTEL - db $9 ; signs - db $f, $1b, $a ; CeladonCityText10 - db $f, $13, $b ; CeladonCityText11 - db $9, $2a, $c ; PokeCenterSignText - db $1d, $d, $d ; CeladonCityText13 - db $9, $15, $e ; CeladonCityText14 - db $d, $c, $f ; CeladonCityText15 - db $15, $27, $10 ; CeladonCityText16 - db $15, $21, $11 ; CeladonCityText17 - db $15, $1b, $12 ; CeladonCityText18 + db 9 ; signs + sign 27, 15, 10 ; CeladonCityText10 + sign 19, 15, 11 ; CeladonCityText11 + sign 42, 9, 12 ; PokeCenterSignText + sign 13, 29, 13 ; CeladonCityText13 + sign 21, 9, 14 ; CeladonCityText14 + sign 12, 13, 15 ; CeladonCityText15 + sign 39, 21, 16 ; CeladonCityText16 + sign 33, 21, 17 ; CeladonCityText17 + sign 27, 21, 18 ; CeladonCityText18 - db $9 ; objects - object SPRITE_LITTLE_GIRL, $8, $11, WALK, $0, $1 ; person - object SPRITE_OLD_PERSON, $b, $1c, STAY, UP, $2 ; person - object SPRITE_GIRL, $e, $13, WALK, $1, $3 ; person - object SPRITE_OLD_PERSON, $19, $16, STAY, DOWN, $4 ; person - object SPRITE_OLD_PERSON, $16, $10, STAY, DOWN, $5 ; person - object SPRITE_FISHER2, $20, $c, STAY, LEFT, $6 ; person - object SPRITE_SLOWBRO, $1e, $c, STAY, RIGHT, $7 ; person - object SPRITE_ROCKET, $20, $1d, WALK, $2, $8 ; person - object SPRITE_ROCKET, $2a, $e, WALK, $2, $9 ; person + db 9 ; objects + object SPRITE_LITTLE_GIRL, 8, 17, WALK, 0, 1 ; person + object SPRITE_OLD_PERSON, 11, 28, STAY, UP, 2 ; person + object SPRITE_GIRL, 14, 19, WALK, 1, 3 ; person + object SPRITE_OLD_PERSON, 25, 22, STAY, DOWN, 4 ; person + object SPRITE_OLD_PERSON, 22, 16, STAY, DOWN, 5 ; person + object SPRITE_FISHER2, 32, 12, STAY, LEFT, 6 ; person + object SPRITE_SLOWBRO, 30, 12, STAY, RIGHT, 7 ; person + object SPRITE_ROCKET, 32, 29, WALK, 2, 8 ; person + object SPRITE_ROCKET, 42, 14, WALK, 2, 9 ; person ; warp-to - EVENT_DISP CELADON_CITY_WIDTH, $d, $8 ; CELADON_MART_1 - EVENT_DISP CELADON_CITY_WIDTH, $d, $a ; CELADON_MART_1 - EVENT_DISP CELADON_CITY_WIDTH, $9, $18 ; CELADON_MANSION_1 - EVENT_DISP CELADON_CITY_WIDTH, $3, $18 ; CELADON_MANSION_1 - EVENT_DISP CELADON_CITY_WIDTH, $3, $19 ; CELADON_MANSION_1 - EVENT_DISP CELADON_CITY_WIDTH, $9, $29 ; CELADON_POKECENTER - EVENT_DISP CELADON_CITY_WIDTH, $1b, $c ; CELADON_GYM - EVENT_DISP CELADON_CITY_WIDTH, $13, $1c ; GAME_CORNER - EVENT_DISP CELADON_CITY_WIDTH, $13, $27 ; CELADON_MART_5 - EVENT_DISP CELADON_CITY_WIDTH, $13, $21 ; CELADON_PRIZE_ROOM - EVENT_DISP CELADON_CITY_WIDTH, $1b, $1f ; CELADON_DINER - EVENT_DISP CELADON_CITY_WIDTH, $1b, $23 ; CELADON_HOUSE - EVENT_DISP CELADON_CITY_WIDTH, $1b, $2b ; CELADON_HOTEL + warp_to 8, 13, CELADON_CITY_WIDTH ; CELADON_MART_1 + warp_to 10, 13, CELADON_CITY_WIDTH ; CELADON_MART_1 + warp_to 24, 9, CELADON_CITY_WIDTH ; CELADON_MANSION_1 + warp_to 24, 3, CELADON_CITY_WIDTH ; CELADON_MANSION_1 + warp_to 25, 3, CELADON_CITY_WIDTH ; CELADON_MANSION_1 + warp_to 41, 9, CELADON_CITY_WIDTH ; CELADON_POKECENTER + warp_to 12, 27, CELADON_CITY_WIDTH ; CELADON_GYM + warp_to 28, 19, CELADON_CITY_WIDTH ; GAME_CORNER + warp_to 39, 19, CELADON_CITY_WIDTH ; CELADON_MART_5 + warp_to 33, 19, CELADON_CITY_WIDTH ; CELADON_PRIZE_ROOM + warp_to 31, 27, CELADON_CITY_WIDTH ; CELADON_DINER + warp_to 35, 27, CELADON_CITY_WIDTH ; CELADON_HOUSE + warp_to 43, 27, CELADON_CITY_WIDTH ; CELADON_HOTEL diff --git a/data/mapObjects/celadondiner.asm b/data/mapObjects/celadondiner.asm index fd202a96..b976a045 100755 --- a/data/mapObjects/celadondiner.asm +++ b/data/mapObjects/celadondiner.asm @@ -1,19 +1,19 @@ CeladonDinerObject: db $f ; border block - db $2 ; warps - db $7, $3, $a, $ff - db $7, $4, $a, $ff + db 2 ; warps + warp 3, 7, 10, -1 + warp 4, 7, 10, -1 - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_COOK, $8, $5, WALK, $2, $1 ; person - object SPRITE_MOM_GEISHA, $7, $2, STAY, NONE, $2 ; person - object SPRITE_FAT_BALD_GUY, $1, $4, STAY, DOWN, $3 ; person - object SPRITE_FISHER2, $5, $3, STAY, RIGHT, $4 ; person - object SPRITE_GYM_HELPER, $0, $1, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_COOK, 8, 5, WALK, 2, 1 ; person + object SPRITE_MOM_GEISHA, 7, 2, STAY, NONE, 2 ; person + object SPRITE_FAT_BALD_GUY, 1, 4, STAY, DOWN, 3 ; person + object SPRITE_FISHER2, 5, 3, STAY, RIGHT, 4 ; person + object SPRITE_GYM_HELPER, 0, 1, STAY, DOWN, 5 ; person ; warp-to - EVENT_DISP CELADON_DINER_WIDTH, $7, $3 - EVENT_DISP CELADON_DINER_WIDTH, $7, $4 + warp_to 3, 7, CELADON_DINER_WIDTH + warp_to 4, 7, CELADON_DINER_WIDTH diff --git a/data/mapObjects/celadongamecorner.asm b/data/mapObjects/celadongamecorner.asm index 46b1c906..a09691d6 100755 --- a/data/mapObjects/celadongamecorner.asm +++ b/data/mapObjects/celadongamecorner.asm @@ -1,28 +1,28 @@ CeladonGameCornerObject: db $f ; border block - db $3 ; warps - db $11, $f, $7, $ff - db $11, $10, $7, $ff - db $4, $11, $1, ROCKET_HIDEOUT_1 + db 3 ; warps + warp 15, 17, 7, -1 + warp 16, 17, 7, -1 + warp 17, 4, 1, ROCKET_HIDEOUT_1 - db $1 ; signs - db $4, $9, $c ; CeladonGameCornerText12 + db 1 ; signs + sign 9, 4, 12 ; CeladonGameCornerText12 - db $b ; objects - object SPRITE_FOULARD_WOMAN, $2, $6, STAY, DOWN, $1 ; person - object SPRITE_MART_GUY, $5, $6, STAY, DOWN, $2 ; person - object SPRITE_FAT_BALD_GUY, $2, $a, STAY, LEFT, $3 ; person - object SPRITE_FOULARD_WOMAN, $2, $d, STAY, LEFT, $4 ; person - object SPRITE_FISHER, $5, $b, STAY, RIGHT, $5 ; person - object SPRITE_MOM_GEISHA, $8, $b, STAY, LEFT, $6 ; person - object SPRITE_GYM_HELPER, $8, $e, STAY, LEFT, $7 ; person - object SPRITE_GAMBLER, $b, $f, STAY, RIGHT, $8 ; person - object SPRITE_MART_GUY, $e, $b, STAY, LEFT, $9 ; person - object SPRITE_GENTLEMAN, $11, $d, STAY, RIGHT, $a ; person - object SPRITE_ROCKET, $9, $5, STAY, UP, $b, OPP_ROCKET, $7 + db 11 ; objects + object SPRITE_FOULARD_WOMAN, 2, 6, STAY, DOWN, 1 ; person + object SPRITE_MART_GUY, 5, 6, STAY, DOWN, 2 ; person + object SPRITE_FAT_BALD_GUY, 2, 10, STAY, LEFT, 3 ; person + object SPRITE_FOULARD_WOMAN, 2, 13, STAY, LEFT, 4 ; person + object SPRITE_FISHER, 5, 11, STAY, RIGHT, 5 ; person + object SPRITE_MOM_GEISHA, 8, 11, STAY, LEFT, 6 ; person + object SPRITE_GYM_HELPER, 8, 14, STAY, LEFT, 7 ; person + object SPRITE_GAMBLER, 11, 15, STAY, RIGHT, 8 ; person + object SPRITE_MART_GUY, 14, 11, STAY, LEFT, 9 ; person + object SPRITE_GENTLEMAN, 17, 13, STAY, RIGHT, 10 ; person + object SPRITE_ROCKET, 9, 5, STAY, UP, 11, OPP_ROCKET, 7 ; warp-to - EVENT_DISP GAME_CORNER_WIDTH, $11, $f - EVENT_DISP GAME_CORNER_WIDTH, $11, $10 - EVENT_DISP GAME_CORNER_WIDTH, $4, $11 ; ROCKET_HIDEOUT_1 + warp_to 15, 17, GAME_CORNER_WIDTH + warp_to 16, 17, GAME_CORNER_WIDTH + warp_to 17, 4, GAME_CORNER_WIDTH ; ROCKET_HIDEOUT_1 diff --git a/data/mapObjects/celadongym.asm b/data/mapObjects/celadongym.asm index 212c389e..b087153b 100755 --- a/data/mapObjects/celadongym.asm +++ b/data/mapObjects/celadongym.asm @@ -1,22 +1,22 @@ CeladonGymObject: db $3 ; border block - db $2 ; warps - db $11, $4, $6, $ff - db $11, $5, $6, $ff + db 2 ; warps + warp 4, 17, 6, -1 + warp 5, 17, 6, -1 - db $0 ; signs + db 0 ; signs - db $8 ; objects - object SPRITE_ERIKA, $4, $3, STAY, DOWN, $1, OPP_ERIKA, $1 - object SPRITE_LASS, $2, $b, STAY, RIGHT, $2, OPP_LASS, $11 - object SPRITE_FOULARD_WOMAN, $7, $a, STAY, LEFT, $3, OPP_BEAUTY, $1 - object SPRITE_LASS, $9, $5, STAY, DOWN, $4, OPP_JR_TRAINER_F, $b - object SPRITE_FOULARD_WOMAN, $1, $5, STAY, DOWN, $5, OPP_BEAUTY, $2 - object SPRITE_LASS, $6, $3, STAY, DOWN, $6, OPP_LASS, $12 - object SPRITE_FOULARD_WOMAN, $3, $3, STAY, DOWN, $7, OPP_BEAUTY, $3 - object SPRITE_LASS, $5, $3, STAY, DOWN, $8, OPP_COOLTRAINER_F, $1 + db 8 ; objects + object SPRITE_ERIKA, 4, 3, STAY, DOWN, 1, OPP_ERIKA, 1 + object SPRITE_LASS, 2, 11, STAY, RIGHT, 2, OPP_LASS, 17 + object SPRITE_FOULARD_WOMAN, 7, 10, STAY, LEFT, 3, OPP_BEAUTY, 1 + object SPRITE_LASS, 9, 5, STAY, DOWN, 4, OPP_JR_TRAINER_F, 11 + object SPRITE_FOULARD_WOMAN, 1, 5, STAY, DOWN, 5, OPP_BEAUTY, 2 + object SPRITE_LASS, 6, 3, STAY, DOWN, 6, OPP_LASS, 18 + object SPRITE_FOULARD_WOMAN, 3, 3, STAY, DOWN, 7, OPP_BEAUTY, 3 + object SPRITE_LASS, 5, 3, STAY, DOWN, 8, OPP_COOLTRAINER_F, 1 ; warp-to - EVENT_DISP CELADON_GYM_WIDTH, $11, $4 - EVENT_DISP CELADON_GYM_WIDTH, $11, $5 + warp_to 4, 17, CELADON_GYM_WIDTH + warp_to 5, 17, CELADON_GYM_WIDTH diff --git a/data/mapObjects/celadonhotel.asm b/data/mapObjects/celadonhotel.asm index 8d7dcb03..09b4d99c 100755 --- a/data/mapObjects/celadonhotel.asm +++ b/data/mapObjects/celadonhotel.asm @@ -1,17 +1,17 @@ CeladonHotelObject: db $0 ; border block - db $2 ; warps - db $7, $3, $c, $ff - db $7, $4, $c, $ff + db 2 ; warps + warp 3, 7, 12, -1 + warp 4, 7, 12, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_OLD_MEDIUM_WOMAN, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_FOULARD_WOMAN, $2, $4, STAY, NONE, $2 ; person - object SPRITE_BLACK_HAIR_BOY_2, $8, $4, WALK, $2, $3 ; person + db 3 ; objects + object SPRITE_OLD_MEDIUM_WOMAN, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_FOULARD_WOMAN, 2, 4, STAY, NONE, 2 ; person + object SPRITE_BLACK_HAIR_BOY_2, 8, 4, WALK, 2, 3 ; person ; warp-to - EVENT_DISP CELADON_HOTEL_WIDTH, $7, $3 - EVENT_DISP CELADON_HOTEL_WIDTH, $7, $4 + warp_to 3, 7, CELADON_HOTEL_WIDTH + warp_to 4, 7, CELADON_HOTEL_WIDTH diff --git a/data/mapObjects/celadonhouse.asm b/data/mapObjects/celadonhouse.asm index 6bd847a4..d24354a6 100755 --- a/data/mapObjects/celadonhouse.asm +++ b/data/mapObjects/celadonhouse.asm @@ -1,17 +1,17 @@ CeladonHouseObject: db $f ; border block - db $2 ; warps - db $7, $2, $b, $ff - db $7, $3, $b, $ff + db 2 ; warps + warp 2, 7, 11, -1 + warp 3, 7, 11, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_OLD_PERSON, $4, $2, STAY, DOWN, $1 ; person - object SPRITE_ROCKET, $1, $4, WALK, $0, $2 ; person - object SPRITE_SAILOR, $5, $6, STAY, LEFT, $3 ; person + db 3 ; objects + object SPRITE_OLD_PERSON, 4, 2, STAY, DOWN, 1 ; person + object SPRITE_ROCKET, 1, 4, WALK, 0, 2 ; person + object SPRITE_SAILOR, 5, 6, STAY, LEFT, 3 ; person ; warp-to - EVENT_DISP CELADON_HOUSE_WIDTH, $7, $2 - EVENT_DISP CELADON_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, CELADON_HOUSE_WIDTH + warp_to 3, 7, CELADON_HOUSE_WIDTH diff --git a/data/mapObjects/celadonmansion1.asm b/data/mapObjects/celadonmansion1.asm index 47fbb0e5..423a9a2e 100755 --- a/data/mapObjects/celadonmansion1.asm +++ b/data/mapObjects/celadonmansion1.asm @@ -1,25 +1,25 @@ CeladonMansion1Object: db $f ; border block - db $5 ; warps - db $b, $4, $2, $ff - db $b, $5, $2, $ff - db $0, $4, $4, $ff - db $1, $7, $1, CELADON_MANSION_2 - db $1, $2, $2, CELADON_MANSION_2 + db 5 ; warps + warp 4, 11, 2, -1 + warp 5, 11, 2, -1 + warp 4, 0, 4, -1 + warp 7, 1, 1, CELADON_MANSION_2 + warp 2, 1, 2, CELADON_MANSION_2 - db $1 ; signs - db $9, $4, $5 ; CeladonMansion1Text5 + db 1 ; signs + sign 4, 9, 5 ; CeladonMansion1Text5 - db $4 ; objects - object SPRITE_SLOWBRO, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_OLD_MEDIUM_WOMAN, $1, $5, STAY, DOWN, $2 ; person - object SPRITE_CLEFAIRY, $1, $8, WALK, $2, $3 ; person - object SPRITE_SLOWBRO, $4, $4, WALK, $1, $4 ; person + db 4 ; objects + object SPRITE_SLOWBRO, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_OLD_MEDIUM_WOMAN, 1, 5, STAY, DOWN, 2 ; person + object SPRITE_CLEFAIRY, 1, 8, WALK, 2, 3 ; person + object SPRITE_SLOWBRO, 4, 4, WALK, 1, 4 ; person ; warp-to - EVENT_DISP CELADON_MANSION_1_WIDTH, $b, $4 - EVENT_DISP CELADON_MANSION_1_WIDTH, $b, $5 - EVENT_DISP CELADON_MANSION_1_WIDTH, $0, $4 - EVENT_DISP CELADON_MANSION_1_WIDTH, $1, $7 ; CELADON_MANSION_2 - EVENT_DISP CELADON_MANSION_1_WIDTH, $1, $2 ; CELADON_MANSION_2 + warp_to 4, 11, CELADON_MANSION_1_WIDTH + warp_to 5, 11, CELADON_MANSION_1_WIDTH + warp_to 4, 0, CELADON_MANSION_1_WIDTH + warp_to 7, 1, CELADON_MANSION_1_WIDTH ; CELADON_MANSION_2 + warp_to 2, 1, CELADON_MANSION_1_WIDTH ; CELADON_MANSION_2 diff --git a/data/mapObjects/celadonmansion2.asm b/data/mapObjects/celadonmansion2.asm index 883cae36..f2b96d89 100755 --- a/data/mapObjects/celadonmansion2.asm +++ b/data/mapObjects/celadonmansion2.asm @@ -1,19 +1,19 @@ CeladonMansion2Object: db $f ; border block - db $4 ; warps - db $1, $6, $0, CELADON_MANSION_3 - db $1, $7, $3, CELADON_MANSION_1 - db $1, $2, $4, CELADON_MANSION_1 - db $1, $4, $3, CELADON_MANSION_3 + db 4 ; warps + warp 6, 1, 0, CELADON_MANSION_3 + warp 7, 1, 3, CELADON_MANSION_1 + warp 2, 1, 4, CELADON_MANSION_1 + warp 4, 1, 3, CELADON_MANSION_3 - db $1 ; signs - db $9, $4, $1 ; CeladonMansion2Text1 + db 1 ; signs + sign 4, 9, 1 ; CeladonMansion2Text1 - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP CELADON_MANSION_2_WIDTH, $1, $6 ; CELADON_MANSION_3 - EVENT_DISP CELADON_MANSION_2_WIDTH, $1, $7 ; CELADON_MANSION_1 - EVENT_DISP CELADON_MANSION_2_WIDTH, $1, $2 ; CELADON_MANSION_1 - EVENT_DISP CELADON_MANSION_2_WIDTH, $1, $4 ; CELADON_MANSION_3 + warp_to 6, 1, CELADON_MANSION_2_WIDTH ; CELADON_MANSION_3 + warp_to 7, 1, CELADON_MANSION_2_WIDTH ; CELADON_MANSION_1 + warp_to 2, 1, CELADON_MANSION_2_WIDTH ; CELADON_MANSION_1 + warp_to 4, 1, CELADON_MANSION_2_WIDTH ; CELADON_MANSION_3 diff --git a/data/mapObjects/celadonmansion3.asm b/data/mapObjects/celadonmansion3.asm index 0564b1cb..e9718d9f 100755 --- a/data/mapObjects/celadonmansion3.asm +++ b/data/mapObjects/celadonmansion3.asm @@ -1,26 +1,26 @@ CeladonMansion3Object: db $f ; border block - db $4 ; warps - db $1, $6, $0, CELADON_MANSION_2 - db $1, $7, $0, CELADON_MANSION_4 - db $1, $2, $1, CELADON_MANSION_4 - db $1, $4, $3, CELADON_MANSION_2 + db 4 ; warps + warp 6, 1, 0, CELADON_MANSION_2 + warp 7, 1, 0, CELADON_MANSION_4 + warp 2, 1, 1, CELADON_MANSION_4 + warp 4, 1, 3, CELADON_MANSION_2 - db $4 ; signs - db $3, $1, $5 ; CeladonMansion3Text5 - db $3, $4, $6 ; CeladonMansion3Text6 - db $6, $1, $7 ; CeladonMansion3Text7 - db $9, $4, $8 ; CeladonMansion3Text8 + db 4 ; signs + sign 1, 3, 5 ; CeladonMansion3Text5 + sign 4, 3, 6 ; CeladonMansion3Text6 + sign 1, 6, 7 ; CeladonMansion3Text7 + sign 4, 9, 8 ; CeladonMansion3Text8 - db $4 ; objects - object SPRITE_BIKE_SHOP_GUY, $0, $4, STAY, UP, $1 ; person - object SPRITE_MART_GUY, $3, $4, STAY, UP, $2 ; person - object SPRITE_BLACK_HAIR_BOY_2, $0, $7, STAY, UP, $3 ; person - object SPRITE_LAPRAS_GIVER, $2, $3, STAY, NONE, $4 ; person + db 4 ; objects + object SPRITE_BIKE_SHOP_GUY, 0, 4, STAY, UP, 1 ; person + object SPRITE_MART_GUY, 3, 4, STAY, UP, 2 ; person + object SPRITE_BLACK_HAIR_BOY_2, 0, 7, STAY, UP, 3 ; person + object SPRITE_LAPRAS_GIVER, 2, 3, STAY, NONE, 4 ; person ; warp-to - EVENT_DISP CELADON_MANSION_3_WIDTH, $1, $6 ; CELADON_MANSION_2 - EVENT_DISP CELADON_MANSION_3_WIDTH, $1, $7 ; CELADON_MANSION_4 - EVENT_DISP CELADON_MANSION_3_WIDTH, $1, $2 ; CELADON_MANSION_4 - EVENT_DISP CELADON_MANSION_3_WIDTH, $1, $4 ; CELADON_MANSION_2 + warp_to 6, 1, CELADON_MANSION_3_WIDTH ; CELADON_MANSION_2 + warp_to 7, 1, CELADON_MANSION_3_WIDTH ; CELADON_MANSION_4 + warp_to 2, 1, CELADON_MANSION_3_WIDTH ; CELADON_MANSION_4 + warp_to 4, 1, CELADON_MANSION_3_WIDTH ; CELADON_MANSION_2 diff --git a/data/mapObjects/celadonmansion4.asm b/data/mapObjects/celadonmansion4.asm index c4f667fa..98f538eb 100755 --- a/data/mapObjects/celadonmansion4.asm +++ b/data/mapObjects/celadonmansion4.asm @@ -1,17 +1,17 @@ CeladonMansion4Object: db $9 ; border block - db $3 ; warps - db $1, $6, $1, CELADON_MANSION_3 - db $1, $2, $2, CELADON_MANSION_3 - db $7, $2, $0, CELADON_MANSION_5 + db 3 ; warps + warp 6, 1, 1, CELADON_MANSION_3 + warp 2, 1, 2, CELADON_MANSION_3 + warp 2, 7, 0, CELADON_MANSION_5 - db $1 ; signs - db $7, $3, $1 ; CeladonMansion4Text1 + db 1 ; signs + sign 3, 7, 1 ; CeladonMansion4Text1 - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP CELADON_MANSION_4_WIDTH, $1, $6 ; CELADON_MANSION_3 - EVENT_DISP CELADON_MANSION_4_WIDTH, $1, $2 ; CELADON_MANSION_3 - EVENT_DISP CELADON_MANSION_4_WIDTH, $7, $2 ; CELADON_MANSION_5 + warp_to 6, 1, CELADON_MANSION_4_WIDTH ; CELADON_MANSION_3 + warp_to 2, 1, CELADON_MANSION_4_WIDTH ; CELADON_MANSION_3 + warp_to 2, 7, CELADON_MANSION_4_WIDTH ; CELADON_MANSION_5 diff --git a/data/mapObjects/celadonmansion5.asm b/data/mapObjects/celadonmansion5.asm index 243e345b..0fd06d13 100755 --- a/data/mapObjects/celadonmansion5.asm +++ b/data/mapObjects/celadonmansion5.asm @@ -1,16 +1,16 @@ CeladonMansion5Object: db $a ; border block - db $2 ; warps - db $7, $2, $2, CELADON_MANSION_4 - db $7, $3, $2, CELADON_MANSION_4 + db 2 ; warps + warp 2, 7, 2, CELADON_MANSION_4 + warp 3, 7, 2, CELADON_MANSION_4 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_HIKER, $2, $2, STAY, DOWN, $1 ; person - object SPRITE_BALL, $4, $3, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_HIKER, 2, 2, STAY, DOWN, 1 ; person + object SPRITE_BALL, 4, 3, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP CELADON_MANSION_5_WIDTH, $7, $2 ; CELADON_MANSION_4 - EVENT_DISP CELADON_MANSION_5_WIDTH, $7, $3 ; CELADON_MANSION_4 + warp_to 2, 7, CELADON_MANSION_5_WIDTH ; CELADON_MANSION_4 + warp_to 3, 7, CELADON_MANSION_5_WIDTH ; CELADON_MANSION_4 diff --git a/data/mapObjects/celadonmart1.asm b/data/mapObjects/celadonmart1.asm index af647cf2..bfd66996 100755 --- a/data/mapObjects/celadonmart1.asm +++ b/data/mapObjects/celadonmart1.asm @@ -1,25 +1,25 @@ CeladonMart1Object: db $f ; border block - db $6 ; warps - db $7, $2, $0, $ff - db $7, $3, $0, $ff - db $7, $10, $1, $ff - db $7, $11, $1, $ff - db $1, $c, $0, CELADON_MART_2 - db $1, $1, $0, CELADON_MART_ELEVATOR + db 6 ; warps + warp 2, 7, 0, -1 + warp 3, 7, 0, -1 + warp 16, 7, 1, -1 + warp 17, 7, 1, -1 + warp 12, 1, 0, CELADON_MART_2 + warp 1, 1, 0, CELADON_MART_ELEVATOR - db $2 ; signs - db $4, $b, $2 ; CeladonMart1Text2 - db $1, $e, $3 ; CeladonMart1Text3 + db 2 ; signs + sign 11, 4, 2 ; CeladonMart1Text2 + sign 14, 1, 3 ; CeladonMart1Text3 - db $1 ; objects - object SPRITE_CABLE_CLUB_WOMAN, $8, $3, STAY, DOWN, $1 ; person + db 1 ; objects + object SPRITE_CABLE_CLUB_WOMAN, 8, 3, STAY, DOWN, 1 ; person ; warp-to - EVENT_DISP CELADON_MART_1_WIDTH, $7, $2 - EVENT_DISP CELADON_MART_1_WIDTH, $7, $3 - EVENT_DISP CELADON_MART_1_WIDTH, $7, $10 - EVENT_DISP CELADON_MART_1_WIDTH, $7, $11 - EVENT_DISP CELADON_MART_1_WIDTH, $1, $c ; CELADON_MART_2 - EVENT_DISP CELADON_MART_1_WIDTH, $1, $1 ; CELADON_MART_ELEVATOR + warp_to 2, 7, CELADON_MART_1_WIDTH + warp_to 3, 7, CELADON_MART_1_WIDTH + warp_to 16, 7, CELADON_MART_1_WIDTH + warp_to 17, 7, CELADON_MART_1_WIDTH + warp_to 12, 1, CELADON_MART_1_WIDTH ; CELADON_MART_2 + warp_to 1, 1, CELADON_MART_1_WIDTH ; CELADON_MART_ELEVATOR diff --git a/data/mapObjects/celadonmart2.asm b/data/mapObjects/celadonmart2.asm index a6c9af59..215861e6 100755 --- a/data/mapObjects/celadonmart2.asm +++ b/data/mapObjects/celadonmart2.asm @@ -1,21 +1,21 @@ CeladonMart2Object: db $f ; border block - db $3 ; warps - db $1, $c, $4, CELADON_MART_1 - db $1, $10, $1, CELADON_MART_3 - db $1, $1, $0, CELADON_MART_ELEVATOR + db 3 ; warps + warp 12, 1, 4, CELADON_MART_1 + warp 16, 1, 1, CELADON_MART_3 + warp 1, 1, 0, CELADON_MART_ELEVATOR - db $1 ; signs - db $1, $e, $5 ; CeladonMart2Text5 + db 1 ; signs + sign 14, 1, 5 ; CeladonMart2Text5 - db $4 ; objects - object SPRITE_MART_GUY, $5, $3, STAY, DOWN, $1 ; person - object SPRITE_MART_GUY, $6, $3, STAY, DOWN, $2 ; person - object SPRITE_FAT_BALD_GUY, $13, $5, STAY, NONE, $3 ; person - object SPRITE_GIRL, $e, $4, WALK, $1, $4 ; person + db 4 ; objects + object SPRITE_MART_GUY, 5, 3, STAY, DOWN, 1 ; person + object SPRITE_MART_GUY, 6, 3, STAY, DOWN, 2 ; person + object SPRITE_FAT_BALD_GUY, 19, 5, STAY, NONE, 3 ; person + object SPRITE_GIRL, 14, 4, WALK, 1, 4 ; person ; warp-to - EVENT_DISP CELADON_MART_2_WIDTH, $1, $c ; CELADON_MART_1 - EVENT_DISP CELADON_MART_2_WIDTH, $1, $10 ; CELADON_MART_3 - EVENT_DISP CELADON_MART_2_WIDTH, $1, $1 ; CELADON_MART_ELEVATOR + warp_to 12, 1, CELADON_MART_2_WIDTH ; CELADON_MART_1 + warp_to 16, 1, CELADON_MART_2_WIDTH ; CELADON_MART_3 + warp_to 1, 1, CELADON_MART_2_WIDTH ; CELADON_MART_ELEVATOR diff --git a/data/mapObjects/celadonmart3.asm b/data/mapObjects/celadonmart3.asm index 41054371..023e3b46 100755 --- a/data/mapObjects/celadonmart3.asm +++ b/data/mapObjects/celadonmart3.asm @@ -1,33 +1,33 @@ CeladonMart3Object: db $f ; border block - db $3 ; warps - db $1, $c, $0, CELADON_MART_4 - db $1, $10, $1, CELADON_MART_2 - db $1, $1, $0, CELADON_MART_ELEVATOR + db 3 ; warps + warp 12, 1, 0, CELADON_MART_4 + warp 16, 1, 1, CELADON_MART_2 + warp 1, 1, 0, CELADON_MART_ELEVATOR - db $c ; signs - db $4, $2, $6 ; CeladonMart3Text6 - db $4, $3, $7 ; CeladonMart3Text7 - db $4, $5, $8 ; CeladonMart3Text8 - db $4, $6, $9 ; CeladonMart3Text9 - db $6, $2, $a ; CeladonMart3Text10 - db $6, $3, $b ; CeladonMart3Text11 - db $6, $5, $c ; CeladonMart3Text12 - db $6, $6, $d ; CeladonMart3Text13 - db $1, $e, $e ; CeladonMart3Text14 - db $1, $4, $f ; CeladonMart3Text15 - db $1, $6, $10 ; CeladonMart3Text16 - db $1, $a, $11 ; CeladonMart3Text17 + db 12 ; signs + sign 2, 4, 6 ; CeladonMart3Text6 + sign 3, 4, 7 ; CeladonMart3Text7 + sign 5, 4, 8 ; CeladonMart3Text8 + sign 6, 4, 9 ; CeladonMart3Text9 + sign 2, 6, 10 ; CeladonMart3Text10 + sign 3, 6, 11 ; CeladonMart3Text11 + sign 5, 6, 12 ; CeladonMart3Text12 + sign 6, 6, 13 ; CeladonMart3Text13 + sign 14, 1, 14 ; CeladonMart3Text14 + sign 4, 1, 15 ; CeladonMart3Text15 + sign 6, 1, 16 ; CeladonMart3Text16 + sign 10, 1, 17 ; CeladonMart3Text17 - db $5 ; objects - object SPRITE_MART_GUY, $10, $5, STAY, NONE, $1 ; person - object SPRITE_GAMEBOY_KID_COPY, $b, $6, STAY, RIGHT, $2 ; person - object SPRITE_GAMEBOY_KID_COPY, $7, $2, STAY, DOWN, $3 ; person - object SPRITE_GAMEBOY_KID_COPY, $8, $2, STAY, DOWN, $4 ; person - object SPRITE_YOUNG_BOY, $2, $5, STAY, UP, $5 ; person + db 5 ; objects + object SPRITE_MART_GUY, 16, 5, STAY, NONE, 1 ; person + object SPRITE_GAMEBOY_KID_COPY, 11, 6, STAY, RIGHT, 2 ; person + object SPRITE_GAMEBOY_KID_COPY, 7, 2, STAY, DOWN, 3 ; person + object SPRITE_GAMEBOY_KID_COPY, 8, 2, STAY, DOWN, 4 ; person + object SPRITE_YOUNG_BOY, 2, 5, STAY, UP, 5 ; person ; warp-to - EVENT_DISP CELADON_MART_3_WIDTH, $1, $c ; CELADON_MART_4 - EVENT_DISP CELADON_MART_3_WIDTH, $1, $10 ; CELADON_MART_2 - EVENT_DISP CELADON_MART_3_WIDTH, $1, $1 ; CELADON_MART_ELEVATOR + warp_to 12, 1, CELADON_MART_3_WIDTH ; CELADON_MART_4 + warp_to 16, 1, CELADON_MART_3_WIDTH ; CELADON_MART_2 + warp_to 1, 1, CELADON_MART_3_WIDTH ; CELADON_MART_ELEVATOR diff --git a/data/mapObjects/celadonmart4.asm b/data/mapObjects/celadonmart4.asm index 386dba8c..e3ea8955 100755 --- a/data/mapObjects/celadonmart4.asm +++ b/data/mapObjects/celadonmart4.asm @@ -1,20 +1,20 @@ CeladonMart4Object: db $f ; border block - db $3 ; warps - db $1, $c, $0, CELADON_MART_3 - db $1, $10, $1, CELADON_MART_5 - db $1, $1, $0, CELADON_MART_ELEVATOR + db 3 ; warps + warp 12, 1, 0, CELADON_MART_3 + warp 16, 1, 1, CELADON_MART_5 + warp 1, 1, 0, CELADON_MART_ELEVATOR - db $1 ; signs - db $1, $e, $4 ; CeladonMart4Text4 + db 1 ; signs + sign 14, 1, 4 ; CeladonMart4Text4 - db $3 ; objects - object SPRITE_MART_GUY, $5, $7, STAY, NONE, $1 ; person - object SPRITE_BLACK_HAIR_BOY_2, $f, $5, WALK, $2, $2 ; person - object SPRITE_BUG_CATCHER, $5, $2, WALK, $2, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 5, 7, STAY, NONE, 1 ; person + object SPRITE_BLACK_HAIR_BOY_2, 15, 5, WALK, 2, 2 ; person + object SPRITE_BUG_CATCHER, 5, 2, WALK, 2, 3 ; person ; warp-to - EVENT_DISP CELADON_MART_4_WIDTH, $1, $c ; CELADON_MART_3 - EVENT_DISP CELADON_MART_4_WIDTH, $1, $10 ; CELADON_MART_5 - EVENT_DISP CELADON_MART_4_WIDTH, $1, $1 ; CELADON_MART_ELEVATOR + warp_to 12, 1, CELADON_MART_4_WIDTH ; CELADON_MART_3 + warp_to 16, 1, CELADON_MART_4_WIDTH ; CELADON_MART_5 + warp_to 1, 1, CELADON_MART_4_WIDTH ; CELADON_MART_ELEVATOR diff --git a/data/mapObjects/celadonmart5.asm b/data/mapObjects/celadonmart5.asm index df47a70d..ac2fa454 100755 --- a/data/mapObjects/celadonmart5.asm +++ b/data/mapObjects/celadonmart5.asm @@ -1,21 +1,21 @@ CeladonMart5Object: db $f ; border block - db $3 ; warps - db $1, $c, $0, CELADON_MART_ROOF - db $1, $10, $1, CELADON_MART_4 - db $1, $1, $0, CELADON_MART_ELEVATOR + db 3 ; warps + warp 12, 1, 0, CELADON_MART_ROOF + warp 16, 1, 1, CELADON_MART_4 + warp 1, 1, 0, CELADON_MART_ELEVATOR - db $1 ; signs - db $1, $e, $5 ; CeladonMart5Text5 + db 1 ; signs + sign 14, 1, 5 ; CeladonMart5Text5 - db $4 ; objects - object SPRITE_GENTLEMAN, $e, $5, WALK, $1, $1 ; person - object SPRITE_SAILOR, $2, $6, STAY, NONE, $2 ; person - object SPRITE_MART_GUY, $5, $3, STAY, DOWN, $3 ; person - object SPRITE_MART_GUY, $6, $3, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_GENTLEMAN, 14, 5, WALK, 1, 1 ; person + object SPRITE_SAILOR, 2, 6, STAY, NONE, 2 ; person + object SPRITE_MART_GUY, 5, 3, STAY, DOWN, 3 ; person + object SPRITE_MART_GUY, 6, 3, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP CELADON_MART_5_WIDTH, $1, $c ; CELADON_MART_ROOF - EVENT_DISP CELADON_MART_5_WIDTH, $1, $10 ; CELADON_MART_4 - EVENT_DISP CELADON_MART_5_WIDTH, $1, $1 ; CELADON_MART_ELEVATOR + warp_to 12, 1, CELADON_MART_5_WIDTH ; CELADON_MART_ROOF + warp_to 16, 1, CELADON_MART_5_WIDTH ; CELADON_MART_4 + warp_to 1, 1, CELADON_MART_5_WIDTH ; CELADON_MART_ELEVATOR diff --git a/data/mapObjects/celadonmartelevator.asm b/data/mapObjects/celadonmartelevator.asm index 2db8635a..49745aa9 100755 --- a/data/mapObjects/celadonmartelevator.asm +++ b/data/mapObjects/celadonmartelevator.asm @@ -1,15 +1,15 @@ CeladonMartElevatorObject: db $f ; border block - db $2 ; warps - db $3, $1, $5, CELADON_MART_1 - db $3, $2, $5, CELADON_MART_1 + db 2 ; warps + warp 1, 3, 5, CELADON_MART_1 + warp 2, 3, 5, CELADON_MART_1 - db $1 ; signs - db $0, $3, $1 ; CeladonMartElevatorText1 + db 1 ; signs + sign 3, 0, 1 ; CeladonMartElevatorText1 - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP CELADON_MART_ELEVATOR_WIDTH, $3, $1 ; CELADON_MART_1 - EVENT_DISP CELADON_MART_ELEVATOR_WIDTH, $3, $2 ; CELADON_MART_1 + warp_to 1, 3, CELADON_MART_ELEVATOR_WIDTH ; CELADON_MART_1 + warp_to 2, 3, CELADON_MART_ELEVATOR_WIDTH ; CELADON_MART_1 diff --git a/data/mapObjects/celadonmartroof.asm b/data/mapObjects/celadonmartroof.asm index 63a1b4d7..0268b1ec 100755 --- a/data/mapObjects/celadonmartroof.asm +++ b/data/mapObjects/celadonmartroof.asm @@ -1,18 +1,18 @@ CeladonMartRoofObject: db $42 ; border block - db $1 ; warps - db $2, $f, $0, CELADON_MART_5 + db 1 ; warps + warp 15, 2, 0, CELADON_MART_5 - db $4 ; signs - db $1, $a, $3 ; CeladonMartRoofText3 - db $1, $b, $4 ; CeladonMartRoofText4 - db $2, $c, $5 ; CeladonMartRoofText5 - db $2, $d, $6 ; CeladonMartRoofText6 + db 4 ; signs + sign 10, 1, 3 ; CeladonMartRoofText3 + sign 11, 1, 4 ; CeladonMartRoofText4 + sign 12, 2, 5 ; CeladonMartRoofText5 + sign 13, 2, 6 ; CeladonMartRoofText6 - db $2 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $a, $4, STAY, LEFT, $1 ; person - object SPRITE_LITTLE_GIRL, $5, $5, WALK, $0, $2 ; person + db 2 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 10, 4, STAY, LEFT, 1 ; person + object SPRITE_LITTLE_GIRL, 5, 5, WALK, 0, 2 ; person ; warp-to - EVENT_DISP CELADON_MART_ROOF_WIDTH, $2, $f ; CELADON_MART_5 + warp_to 15, 2, CELADON_MART_ROOF_WIDTH ; CELADON_MART_5 diff --git a/data/mapObjects/celadonpokecenter.asm b/data/mapObjects/celadonpokecenter.asm index c4ce1700..ab037ec0 100755 --- a/data/mapObjects/celadonpokecenter.asm +++ b/data/mapObjects/celadonpokecenter.asm @@ -1,18 +1,18 @@ CeladonPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $5, $ff - db $7, $4, $5, $ff + db 2 ; warps + warp 3, 7, 5, -1 + warp 4, 7, 5, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $7, $3, WALK, $2, $2 ; person - object SPRITE_FOULARD_WOMAN, $a, $5, WALK, $0, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 7, 3, WALK, 2, 2 ; person + object SPRITE_FOULARD_WOMAN, 10, 5, WALK, 0, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP CELADON_POKECENTER_WIDTH, $7, $3 - EVENT_DISP CELADON_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, CELADON_POKECENTER_WIDTH + warp_to 4, 7, CELADON_POKECENTER_WIDTH diff --git a/data/mapObjects/celadonprizeroom.asm b/data/mapObjects/celadonprizeroom.asm index c440bad5..bdaafe02 100755 --- a/data/mapObjects/celadonprizeroom.asm +++ b/data/mapObjects/celadonprizeroom.asm @@ -1,19 +1,19 @@ CeladonPrizeRoomObject: db $f ; border block - db $2 ; warps - db $7, $4, $9, $ff - db $7, $5, $9, $ff + db 2 ; warps + warp 4, 7, 9, -1 + warp 5, 7, 9, -1 - db $3 ; signs - db $2, $2, $3 ; CeladonPrizeRoomText3 - db $2, $4, $4 ; CeladonPrizeRoomText4 - db $2, $6, $5 ; CeladonPrizeRoomText5 + db 3 ; signs + sign 2, 2, 3 ; CeladonPrizeRoomText3 + sign 4, 2, 4 ; CeladonPrizeRoomText4 + sign 6, 2, 5 ; CeladonPrizeRoomText5 - db $2 ; objects - object SPRITE_BALDING_GUY, $1, $4, STAY, NONE, $1 ; person - object SPRITE_GAMBLER, $7, $3, WALK, $2, $2 ; person + db 2 ; objects + object SPRITE_BALDING_GUY, 1, 4, STAY, NONE, 1 ; person + object SPRITE_GAMBLER, 7, 3, WALK, 2, 2 ; person ; warp-to - EVENT_DISP CELADON_PRIZE_ROOM_WIDTH, $7, $4 - EVENT_DISP CELADON_PRIZE_ROOM_WIDTH, $7, $5 + warp_to 4, 7, CELADON_PRIZE_ROOM_WIDTH + warp_to 5, 7, CELADON_PRIZE_ROOM_WIDTH diff --git a/data/mapObjects/ceruleancity.asm b/data/mapObjects/ceruleancity.asm index b6317e2c..66d18a29 100755 --- a/data/mapObjects/ceruleancity.asm +++ b/data/mapObjects/ceruleancity.asm @@ -1,47 +1,47 @@ CeruleanCityObject: db $f ; border block - db $a ; warps - db $b, $1b, $0, TRASHED_HOUSE - db $f, $d, $0, CERULEAN_HOUSE_1 - db $11, $13, $0, CERULEAN_POKECENTER - db $13, $1e, $0, CERULEAN_GYM - db $19, $d, $0, BIKE_SHOP - db $19, $19, $0, CERULEAN_MART - db $b, $4, $0, UNKNOWN_DUNGEON_1 - db $9, $1b, $2, TRASHED_HOUSE - db $b, $9, $1, CERULEAN_HOUSE_2 - db $9, $9, $0, CERULEAN_HOUSE_2 + db 10 ; warps + warp 27, 11, 0, TRASHED_HOUSE + warp 13, 15, 0, CERULEAN_HOUSE_1 + warp 19, 17, 0, CERULEAN_POKECENTER + warp 30, 19, 0, CERULEAN_GYM + warp 13, 25, 0, BIKE_SHOP + warp 25, 25, 0, CERULEAN_MART + warp 4, 11, 0, UNKNOWN_DUNGEON_1 + warp 27, 9, 2, TRASHED_HOUSE + warp 9, 11, 1, CERULEAN_HOUSE_2 + warp 9, 9, 0, CERULEAN_HOUSE_2 - db $6 ; signs - db $13, $17, $c ; CeruleanCityText12 - db $1d, $11, $d ; CeruleanCityText13 - db $19, $1a, $e ; MartSignText - db $11, $14, $f ; PokeCenterSignText - db $19, $b, $10 ; CeruleanCityText16 - db $15, $1b, $11 ; CeruleanCityText17 + db 6 ; signs + sign 23, 19, 12 ; CeruleanCityText12 + sign 17, 29, 13 ; CeruleanCityText13 + sign 26, 25, 14 ; MartSignText + sign 20, 17, 15 ; PokeCenterSignText + sign 11, 25, 16 ; CeruleanCityText16 + sign 27, 21, 17 ; CeruleanCityText17 - db $b ; objects - object SPRITE_BLUE, $14, $2, STAY, DOWN, $1 ; person - object SPRITE_ROCKET, $1e, $8, STAY, NONE, $2, OPP_ROCKET, $5 - object SPRITE_BLACK_HAIR_BOY_1, $1f, $14, STAY, DOWN, $3 ; person - object SPRITE_BLACK_HAIR_BOY_2, $f, $12, WALK, $1, $4 ; person - object SPRITE_BLACK_HAIR_BOY_2, $9, $15, WALK, $2, $5 ; person - object SPRITE_GUARD, $1c, $c, STAY, DOWN, $6 ; person - object SPRITE_LASS, $1d, $1a, STAY, LEFT, $7 ; person - object SPRITE_SLOWBRO, $1c, $1a, STAY, DOWN, $8 ; person - object SPRITE_LASS, $9, $1b, WALK, $2, $9 ; person - object SPRITE_BLACK_HAIR_BOY_2, $4, $c, STAY, DOWN, $a ; person - object SPRITE_GUARD, $1b, $c, STAY, DOWN, $b ; person + db 11 ; objects + object SPRITE_BLUE, 20, 2, STAY, DOWN, 1 ; person + object SPRITE_ROCKET, 30, 8, STAY, NONE, 2, OPP_ROCKET, 5 + object SPRITE_BLACK_HAIR_BOY_1, 31, 20, STAY, DOWN, 3 ; person + object SPRITE_BLACK_HAIR_BOY_2, 15, 18, WALK, 1, 4 ; person + object SPRITE_BLACK_HAIR_BOY_2, 9, 21, WALK, 2, 5 ; person + object SPRITE_GUARD, 28, 12, STAY, DOWN, 6 ; person + object SPRITE_LASS, 29, 26, STAY, LEFT, 7 ; person + object SPRITE_SLOWBRO, 28, 26, STAY, DOWN, 8 ; person + object SPRITE_LASS, 9, 27, WALK, 2, 9 ; person + object SPRITE_BLACK_HAIR_BOY_2, 4, 12, STAY, DOWN, 10 ; person + object SPRITE_GUARD, 27, 12, STAY, DOWN, 11 ; person ; warp-to - EVENT_DISP CERULEAN_CITY_WIDTH, $b, $1b ; TRASHED_HOUSE - EVENT_DISP CERULEAN_CITY_WIDTH, $f, $d ; CERULEAN_HOUSE_1 - EVENT_DISP CERULEAN_CITY_WIDTH, $11, $13 ; CERULEAN_POKECENTER - EVENT_DISP CERULEAN_CITY_WIDTH, $13, $1e ; CERULEAN_GYM - EVENT_DISP CERULEAN_CITY_WIDTH, $19, $d ; BIKE_SHOP - EVENT_DISP CERULEAN_CITY_WIDTH, $19, $19 ; CERULEAN_MART - EVENT_DISP CERULEAN_CITY_WIDTH, $b, $4 ; UNKNOWN_DUNGEON_1 - EVENT_DISP CERULEAN_CITY_WIDTH, $9, $1b ; TRASHED_HOUSE - EVENT_DISP CERULEAN_CITY_WIDTH, $b, $9 ; CERULEAN_HOUSE_2 - EVENT_DISP CERULEAN_CITY_WIDTH, $9, $9 ; CERULEAN_HOUSE_2 + warp_to 27, 11, CERULEAN_CITY_WIDTH ; TRASHED_HOUSE + warp_to 13, 15, CERULEAN_CITY_WIDTH ; CERULEAN_HOUSE_1 + warp_to 19, 17, CERULEAN_CITY_WIDTH ; CERULEAN_POKECENTER + warp_to 30, 19, CERULEAN_CITY_WIDTH ; CERULEAN_GYM + warp_to 13, 25, CERULEAN_CITY_WIDTH ; BIKE_SHOP + warp_to 25, 25, CERULEAN_CITY_WIDTH ; CERULEAN_MART + warp_to 4, 11, CERULEAN_CITY_WIDTH ; UNKNOWN_DUNGEON_1 + warp_to 27, 9, CERULEAN_CITY_WIDTH ; TRASHED_HOUSE + warp_to 9, 11, CERULEAN_CITY_WIDTH ; CERULEAN_HOUSE_2 + warp_to 9, 9, CERULEAN_CITY_WIDTH ; CERULEAN_HOUSE_2 diff --git a/data/mapObjects/ceruleangym.asm b/data/mapObjects/ceruleangym.asm index 66d22260..d774c5dd 100755 --- a/data/mapObjects/ceruleangym.asm +++ b/data/mapObjects/ceruleangym.asm @@ -1,18 +1,18 @@ CeruleanGymObject: db $3 ; border block - db $2 ; warps - db $d, $4, $3, $ff - db $d, $5, $3, $ff + db 2 ; warps + warp 4, 13, 3, -1 + warp 5, 13, 3, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_BRUNETTE_GIRL, $4, $2, STAY, DOWN, $1, OPP_MISTY, $1 - object SPRITE_LASS, $2, $3, STAY, RIGHT, $2, OPP_JR_TRAINER_F, $1 - object SPRITE_SWIMMER, $8, $7, STAY, LEFT, $3, OPP_SWIMMER, $1 - object SPRITE_GYM_HELPER, $7, $a, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_BRUNETTE_GIRL, 4, 2, STAY, DOWN, 1, OPP_MISTY, 1 + object SPRITE_LASS, 2, 3, STAY, RIGHT, 2, OPP_JR_TRAINER_F, 1 + object SPRITE_SWIMMER, 8, 7, STAY, LEFT, 3, OPP_SWIMMER, 1 + object SPRITE_GYM_HELPER, 7, 10, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP CERULEAN_GYM_WIDTH, $d, $4 - EVENT_DISP CERULEAN_GYM_WIDTH, $d, $5 + warp_to 4, 13, CERULEAN_GYM_WIDTH + warp_to 5, 13, CERULEAN_GYM_WIDTH diff --git a/data/mapObjects/ceruleanhouse1.asm b/data/mapObjects/ceruleanhouse1.asm index 27373825..a8c636cf 100755 --- a/data/mapObjects/ceruleanhouse1.asm +++ b/data/mapObjects/ceruleanhouse1.asm @@ -1,16 +1,16 @@ CeruleanHouse1Object: db $a ; border block - db $2 ; warps - db $7, $2, $1, $ff - db $7, $3, $1, $ff + db 2 ; warps + warp 2, 7, 1, -1 + warp 3, 7, 1, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_OLD_MEDIUM_WOMAN, $5, $4, STAY, LEFT, $1 ; person - object SPRITE_GAMBLER, $1, $2, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_OLD_MEDIUM_WOMAN, 5, 4, STAY, LEFT, 1 ; person + object SPRITE_GAMBLER, 1, 2, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP CERULEAN_HOUSE_1_WIDTH, $7, $2 - EVENT_DISP CERULEAN_HOUSE_1_WIDTH, $7, $3 + warp_to 2, 7, CERULEAN_HOUSE_1_WIDTH + warp_to 3, 7, CERULEAN_HOUSE_1_WIDTH diff --git a/data/mapObjects/ceruleanhouse2.asm b/data/mapObjects/ceruleanhouse2.asm index 669cd098..cf54c719 100755 --- a/data/mapObjects/ceruleanhouse2.asm +++ b/data/mapObjects/ceruleanhouse2.asm @@ -1,17 +1,17 @@ CeruleanHouse2Object: db $c ; border block - db $3 ; warps - db $0, $2, $9, $ff - db $7, $2, $8, $ff - db $7, $3, $8, $ff + db 3 ; warps + warp 2, 0, 9, -1 + warp 2, 7, 8, -1 + warp 3, 7, 8, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FAT_BALD_GUY, $5, $3, STAY, RIGHT, $1 ; person + db 1 ; objects + object SPRITE_FAT_BALD_GUY, 5, 3, STAY, RIGHT, 1 ; person ; warp-to - EVENT_DISP CERULEAN_HOUSE_2_WIDTH, $0, $2 - EVENT_DISP CERULEAN_HOUSE_2_WIDTH, $7, $2 - EVENT_DISP CERULEAN_HOUSE_2_WIDTH, $7, $3 + warp_to 2, 0, CERULEAN_HOUSE_2_WIDTH + warp_to 2, 7, CERULEAN_HOUSE_2_WIDTH + warp_to 3, 7, CERULEAN_HOUSE_2_WIDTH diff --git a/data/mapObjects/ceruleanhousetrashed.asm b/data/mapObjects/ceruleanhousetrashed.asm index 4f154191..7b90ff73 100755 --- a/data/mapObjects/ceruleanhousetrashed.asm +++ b/data/mapObjects/ceruleanhousetrashed.asm @@ -1,19 +1,19 @@ CeruleanHouseTrashedObject: db $a ; border block - db $3 ; warps - db $7, $2, $0, $ff - db $7, $3, $0, $ff - db $0, $3, $7, $ff + db 3 ; warps + warp 2, 7, 0, -1 + warp 3, 7, 0, -1 + warp 3, 0, 7, -1 - db $1 ; signs - db $0, $3, $3 ; CeruleanHouseTrashedText3 + db 1 ; signs + sign 3, 0, 3 ; CeruleanHouseTrashedText3 - db $2 ; objects - object SPRITE_FISHER, $2, $1, STAY, DOWN, $1 ; person - object SPRITE_GIRL, $5, $6, WALK, $2, $2 ; person + db 2 ; objects + object SPRITE_FISHER, 2, 1, STAY, DOWN, 1 ; person + object SPRITE_GIRL, 5, 6, WALK, 2, 2 ; person ; warp-to - EVENT_DISP TRASHED_HOUSE_WIDTH, $7, $2 - EVENT_DISP TRASHED_HOUSE_WIDTH, $7, $3 - EVENT_DISP TRASHED_HOUSE_WIDTH, $0, $3 + warp_to 2, 7, TRASHED_HOUSE_WIDTH + warp_to 3, 7, TRASHED_HOUSE_WIDTH + warp_to 3, 0, TRASHED_HOUSE_WIDTH diff --git a/data/mapObjects/ceruleanmart.asm b/data/mapObjects/ceruleanmart.asm index 301d11a2..389e0317 100755 --- a/data/mapObjects/ceruleanmart.asm +++ b/data/mapObjects/ceruleanmart.asm @@ -1,17 +1,17 @@ CeruleanMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $5, $ff - db $7, $4, $5, $ff + db 2 ; warps + warp 3, 7, 5, -1 + warp 4, 7, 5, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_BLACK_HAIR_BOY_1, $3, $4, WALK, $1, $2 ; person - object SPRITE_LASS, $6, $2, WALK, $2, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_BLACK_HAIR_BOY_1, 3, 4, WALK, 1, 2 ; person + object SPRITE_LASS, 6, 2, WALK, 2, 3 ; person ; warp-to - EVENT_DISP CERULEAN_MART_WIDTH, $7, $3 - EVENT_DISP CERULEAN_MART_WIDTH, $7, $4 + warp_to 3, 7, CERULEAN_MART_WIDTH + warp_to 4, 7, CERULEAN_MART_WIDTH diff --git a/data/mapObjects/ceruleanpokecenter.asm b/data/mapObjects/ceruleanpokecenter.asm index 1e92ec07..a6d7a5b5 100755 --- a/data/mapObjects/ceruleanpokecenter.asm +++ b/data/mapObjects/ceruleanpokecenter.asm @@ -1,18 +1,18 @@ CeruleanPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $2, $ff - db $7, $4, $2, $ff + db 2 ; warps + warp 3, 7, 2, -1 + warp 4, 7, 2, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_BLACK_HAIR_BOY_2, $a, $5, WALK, $0, $2 ; person - object SPRITE_GENTLEMAN, $4, $3, STAY, DOWN, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_BLACK_HAIR_BOY_2, 10, 5, WALK, 0, 2 ; person + object SPRITE_GENTLEMAN, 4, 3, STAY, DOWN, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP CERULEAN_POKECENTER_WIDTH, $7, $3 - EVENT_DISP CERULEAN_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, CERULEAN_POKECENTER_WIDTH + warp_to 4, 7, CERULEAN_POKECENTER_WIDTH diff --git a/data/mapObjects/cinnabargym.asm b/data/mapObjects/cinnabargym.asm index 24bdba3d..3fc25a02 100755 --- a/data/mapObjects/cinnabargym.asm +++ b/data/mapObjects/cinnabargym.asm @@ -1,23 +1,23 @@ CinnabarGymObject: db $2e ; border block - db $2 ; warps - db $11, $10, $1, $ff - db $11, $11, $1, $ff + db 2 ; warps + warp 16, 17, 1, -1 + warp 17, 17, 1, -1 - db $0 ; signs + db 0 ; signs - db $9 ; objects - object SPRITE_FAT_BALD_GUY, $3, $3, STAY, DOWN, $1, OPP_BLAINE, $1 - object SPRITE_BLACK_HAIR_BOY_2, $11, $2, STAY, DOWN, $2, OPP_SUPER_NERD, $9 - object SPRITE_BLACK_HAIR_BOY_2, $11, $8, STAY, DOWN, $3, OPP_BURGLAR, $4 - object SPRITE_BLACK_HAIR_BOY_2, $b, $4, STAY, DOWN, $4, OPP_SUPER_NERD, $a - object SPRITE_BLACK_HAIR_BOY_2, $b, $8, STAY, DOWN, $5, OPP_BURGLAR, $5 - object SPRITE_BLACK_HAIR_BOY_2, $b, $e, STAY, DOWN, $6, OPP_SUPER_NERD, $b - object SPRITE_BLACK_HAIR_BOY_2, $3, $e, STAY, DOWN, $7, OPP_BURGLAR, $6 - object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, DOWN, $8, OPP_SUPER_NERD, $c - object SPRITE_GYM_HELPER, $10, $d, STAY, DOWN, $9 ; person + db 9 ; objects + object SPRITE_FAT_BALD_GUY, 3, 3, STAY, DOWN, 1, OPP_BLAINE, 1 + object SPRITE_BLACK_HAIR_BOY_2, 17, 2, STAY, DOWN, 2, OPP_SUPER_NERD, 9 + object SPRITE_BLACK_HAIR_BOY_2, 17, 8, STAY, DOWN, 3, OPP_BURGLAR, 4 + object SPRITE_BLACK_HAIR_BOY_2, 11, 4, STAY, DOWN, 4, OPP_SUPER_NERD, 10 + object SPRITE_BLACK_HAIR_BOY_2, 11, 8, STAY, DOWN, 5, OPP_BURGLAR, 5 + object SPRITE_BLACK_HAIR_BOY_2, 11, 14, STAY, DOWN, 6, OPP_SUPER_NERD, 11 + object SPRITE_BLACK_HAIR_BOY_2, 3, 14, STAY, DOWN, 7, OPP_BURGLAR, 6 + object SPRITE_BLACK_HAIR_BOY_2, 3, 8, STAY, DOWN, 8, OPP_SUPER_NERD, 12 + object SPRITE_GYM_HELPER, 16, 13, STAY, DOWN, 9 ; person ; warp-to - EVENT_DISP CINNABAR_GYM_WIDTH, $11, $10 - EVENT_DISP CINNABAR_GYM_WIDTH, $11, $11 + warp_to 16, 17, CINNABAR_GYM_WIDTH + warp_to 17, 17, CINNABAR_GYM_WIDTH diff --git a/data/mapObjects/cinnabarisland.asm b/data/mapObjects/cinnabarisland.asm index 05f4c06c..a66d6444 100755 --- a/data/mapObjects/cinnabarisland.asm +++ b/data/mapObjects/cinnabarisland.asm @@ -1,27 +1,27 @@ CinnabarIslandObject: db $43 ; border block - db $5 ; warps - db $3, $6, $1, MANSION_1 - db $3, $12, $0, CINNABAR_GYM - db $9, $6, $0, CINNABAR_LAB_1 - db $b, $b, $0, CINNABAR_POKECENTER - db $b, $f, $0, CINNABAR_MART + db 5 ; warps + warp 6, 3, 1, MANSION_1 + warp 18, 3, 0, CINNABAR_GYM + warp 6, 9, 0, CINNABAR_LAB_1 + warp 11, 11, 0, CINNABAR_POKECENTER + warp 15, 11, 0, CINNABAR_MART - db $5 ; signs - db $5, $9, $3 ; CinnabarIslandText3 - db $b, $10, $4 ; MartSignText - db $b, $c, $5 ; PokeCenterSignText - db $b, $9, $6 ; CinnabarIslandText6 - db $3, $d, $7 ; CinnabarIslandText7 + db 5 ; signs + sign 9, 5, 3 ; CinnabarIslandText3 + sign 16, 11, 4 ; MartSignText + sign 12, 11, 5 ; PokeCenterSignText + sign 9, 11, 6 ; CinnabarIslandText6 + sign 13, 3, 7 ; CinnabarIslandText7 - db $2 ; objects - object SPRITE_GIRL, $c, $5, WALK, $2, $1 ; person - object SPRITE_GAMBLER, $e, $6, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_GIRL, 12, 5, WALK, 2, 1 ; person + object SPRITE_GAMBLER, 14, 6, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP CINNABAR_ISLAND_WIDTH, $3, $6 ; MANSION_1 - EVENT_DISP CINNABAR_ISLAND_WIDTH, $3, $12 ; CINNABAR_GYM - EVENT_DISP CINNABAR_ISLAND_WIDTH, $9, $6 ; CINNABAR_LAB_1 - EVENT_DISP CINNABAR_ISLAND_WIDTH, $b, $b ; CINNABAR_POKECENTER - EVENT_DISP CINNABAR_ISLAND_WIDTH, $b, $f ; CINNABAR_MART + warp_to 6, 3, CINNABAR_ISLAND_WIDTH ; MANSION_1 + warp_to 18, 3, CINNABAR_ISLAND_WIDTH ; CINNABAR_GYM + warp_to 6, 9, CINNABAR_ISLAND_WIDTH ; CINNABAR_LAB_1 + warp_to 11, 11, CINNABAR_ISLAND_WIDTH ; CINNABAR_POKECENTER + warp_to 15, 11, CINNABAR_ISLAND_WIDTH ; CINNABAR_MART diff --git a/data/mapObjects/cinnabarmart.asm b/data/mapObjects/cinnabarmart.asm index 79494686..cf135039 100755 --- a/data/mapObjects/cinnabarmart.asm +++ b/data/mapObjects/cinnabarmart.asm @@ -1,17 +1,17 @@ CinnabarMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $4, $ff - db $7, $4, $4, $ff + db 2 ; warps + warp 3, 7, 4, -1 + warp 4, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_ERIKA, $6, $2, STAY, NONE, $2 ; person - object SPRITE_OAK_AIDE, $3, $4, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_ERIKA, 6, 2, STAY, NONE, 2 ; person + object SPRITE_OAK_AIDE, 3, 4, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP CINNABAR_MART_WIDTH, $7, $3 - EVENT_DISP CINNABAR_MART_WIDTH, $7, $4 + warp_to 3, 7, CINNABAR_MART_WIDTH + warp_to 4, 7, CINNABAR_MART_WIDTH diff --git a/data/mapObjects/cinnabarpokecenter.asm b/data/mapObjects/cinnabarpokecenter.asm index 7d15f050..d1707ec7 100755 --- a/data/mapObjects/cinnabarpokecenter.asm +++ b/data/mapObjects/cinnabarpokecenter.asm @@ -1,18 +1,18 @@ CinnabarPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $3, $ff - db $7, $4, $3, $ff + db 2 ; warps + warp 3, 7, 3, -1 + warp 4, 7, 3, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_LASS, $9, $4, WALK, $0, $2 ; person - object SPRITE_GENTLEMAN, $2, $6, STAY, NONE, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_LASS, 9, 4, WALK, 0, 2 ; person + object SPRITE_GENTLEMAN, 2, 6, STAY, NONE, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP CINNABAR_POKECENTER_WIDTH, $7, $3 - EVENT_DISP CINNABAR_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, CINNABAR_POKECENTER_WIDTH + warp_to 4, 7, CINNABAR_POKECENTER_WIDTH diff --git a/data/mapObjects/colosseum.asm b/data/mapObjects/colosseum.asm index 91fea6b9..1c32de2f 100755 --- a/data/mapObjects/colosseum.asm +++ b/data/mapObjects/colosseum.asm @@ -1,9 +1,9 @@ ColosseumObject: db $e ; border block - db $0 ; warps + db 0 ; warps - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_RED, $2, $2, STAY, $0, $1 ; person + db 1 ; objects + object SPRITE_RED, 2, 2, STAY, 0, 1 ; person diff --git a/data/mapObjects/copycatshouse1f.asm b/data/mapObjects/copycatshouse1f.asm index 7d842cad..e0e02a8d 100755 --- a/data/mapObjects/copycatshouse1f.asm +++ b/data/mapObjects/copycatshouse1f.asm @@ -1,19 +1,19 @@ CopycatsHouse1FObject: db $a ; border block - db $3 ; warps - db $7, $2, $0, $ff - db $7, $3, $0, $ff - db $1, $7, $0, COPYCATS_HOUSE_2F + db 3 ; warps + warp 2, 7, 0, -1 + warp 3, 7, 0, -1 + warp 7, 1, 0, COPYCATS_HOUSE_2F - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MOM_GEISHA, $2, $2, STAY, DOWN, $1 ; person - object SPRITE_FAT_BALD_GUY, $5, $4, STAY, LEFT, $2 ; person - object SPRITE_CLEFAIRY, $1, $4, WALK, $1, $3 ; person + db 3 ; objects + object SPRITE_MOM_GEISHA, 2, 2, STAY, DOWN, 1 ; person + object SPRITE_FAT_BALD_GUY, 5, 4, STAY, LEFT, 2 ; person + object SPRITE_CLEFAIRY, 1, 4, WALK, 1, 3 ; person ; warp-to - EVENT_DISP COPYCATS_HOUSE_1F_WIDTH, $7, $2 - EVENT_DISP COPYCATS_HOUSE_1F_WIDTH, $7, $3 - EVENT_DISP COPYCATS_HOUSE_1F_WIDTH, $1, $7 ; COPYCATS_HOUSE_2F + warp_to 2, 7, COPYCATS_HOUSE_1F_WIDTH + warp_to 3, 7, COPYCATS_HOUSE_1F_WIDTH + warp_to 7, 1, COPYCATS_HOUSE_1F_WIDTH ; COPYCATS_HOUSE_2F diff --git a/data/mapObjects/copycatshouse2f.asm b/data/mapObjects/copycatshouse2f.asm index 0d53965a..529f3416 100755 --- a/data/mapObjects/copycatshouse2f.asm +++ b/data/mapObjects/copycatshouse2f.asm @@ -1,19 +1,19 @@ CopycatsHouse2FObject: db $a ; border block - db $1 ; warps - db $1, $7, $2, COPYCATS_HOUSE_1F + db 1 ; warps + warp 7, 1, 2, COPYCATS_HOUSE_1F - db $2 ; signs - db $5, $3, $6 ; CopycatsHouse2FText6 - db $1, $0, $7 ; CopycatsHouse2FText7 + db 2 ; signs + sign 3, 5, 6 ; CopycatsHouse2FText6 + sign 0, 1, 7 ; CopycatsHouse2FText7 - db $5 ; objects - object SPRITE_BRUNETTE_GIRL, $4, $3, WALK, $0, $1 ; person - object SPRITE_BIRD, $4, $6, WALK, $2, $2 ; person - object SPRITE_SLOWBRO, $5, $1, STAY, DOWN, $3 ; person - object SPRITE_BIRD, $2, $0, STAY, DOWN, $4 ; person - object SPRITE_CLEFAIRY, $1, $6, STAY, RIGHT, $5 ; person + db 5 ; objects + object SPRITE_BRUNETTE_GIRL, 4, 3, WALK, 0, 1 ; person + object SPRITE_BIRD, 4, 6, WALK, 2, 2 ; person + object SPRITE_SLOWBRO, 5, 1, STAY, DOWN, 3 ; person + object SPRITE_BIRD, 2, 0, STAY, DOWN, 4 ; person + object SPRITE_CLEFAIRY, 1, 6, STAY, RIGHT, 5 ; person ; warp-to - EVENT_DISP COPYCATS_HOUSE_2F_WIDTH, $1, $7 ; COPYCATS_HOUSE_1F + warp_to 7, 1, COPYCATS_HOUSE_2F_WIDTH ; COPYCATS_HOUSE_1F diff --git a/data/mapObjects/daycarem.asm b/data/mapObjects/daycarem.asm index 98d4c184..7c10fe70 100755 --- a/data/mapObjects/daycarem.asm +++ b/data/mapObjects/daycarem.asm @@ -1,15 +1,15 @@ DayCareMObject: db $a ; border block - db $2 ; warps - db $7, $2, $4, $ff - db $7, $3, $4, $ff + db 2 ; warps + warp 2, 7, 4, -1 + warp 3, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GENTLEMAN, $2, $3, STAY, RIGHT, $1 ; person + db 1 ; objects + object SPRITE_GENTLEMAN, 2, 3, STAY, RIGHT, 1 ; person ; warp-to - EVENT_DISP DAYCAREM_WIDTH, $7, $2 - EVENT_DISP DAYCAREM_WIDTH, $7, $3 + warp_to 2, 7, DAYCAREM_WIDTH + warp_to 3, 7, DAYCAREM_WIDTH diff --git a/data/mapObjects/diglettscave.asm b/data/mapObjects/diglettscave.asm index cdcffce0..ef4de039 100755 --- a/data/mapObjects/diglettscave.asm +++ b/data/mapObjects/diglettscave.asm @@ -1,14 +1,14 @@ DiglettsCaveObject: db $19 ; border block - db $2 ; warps - db $5, $5, $2, DIGLETTS_CAVE_EXIT - db $1f, $25, $2, DIGLETTS_CAVE_ENTRANCE + db 2 ; warps + warp 5, 5, 2, DIGLETTS_CAVE_EXIT + warp 37, 31, 2, DIGLETTS_CAVE_ENTRANCE - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP DIGLETTS_CAVE_WIDTH, $5, $5 ; DIGLETTS_CAVE_EXIT - EVENT_DISP DIGLETTS_CAVE_WIDTH, $1f, $25 ; DIGLETTS_CAVE_ENTRANCE + warp_to 5, 5, DIGLETTS_CAVE_WIDTH ; DIGLETTS_CAVE_EXIT + warp_to 37, 31, DIGLETTS_CAVE_WIDTH ; DIGLETTS_CAVE_ENTRANCE diff --git a/data/mapObjects/diglettscaveroute11.asm b/data/mapObjects/diglettscaveroute11.asm index e5d6b69f..af28bfbf 100755 --- a/data/mapObjects/diglettscaveroute11.asm +++ b/data/mapObjects/diglettscaveroute11.asm @@ -1,17 +1,17 @@ DiglettsCaveEntranceRoute11Object: db $7d ; border block - db $3 ; warps - db $7, $2, $4, $ff - db $7, $3, $4, $ff - db $4, $4, $1, DIGLETTS_CAVE + db 3 ; warps + warp 2, 7, 4, -1 + warp 3, 7, 4, -1 + warp 4, 4, 1, DIGLETTS_CAVE - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GAMBLER, $2, $3, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_GAMBLER, 2, 3, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP DIGLETTS_CAVE_ENTRANCE_WIDTH, $7, $2 - EVENT_DISP DIGLETTS_CAVE_ENTRANCE_WIDTH, $7, $3 - EVENT_DISP DIGLETTS_CAVE_ENTRANCE_WIDTH, $4, $4 ; DIGLETTS_CAVE + warp_to 2, 7, DIGLETTS_CAVE_ENTRANCE_WIDTH + warp_to 3, 7, DIGLETTS_CAVE_ENTRANCE_WIDTH + warp_to 4, 4, DIGLETTS_CAVE_ENTRANCE_WIDTH ; DIGLETTS_CAVE diff --git a/data/mapObjects/diglettscaveroute2.asm b/data/mapObjects/diglettscaveroute2.asm index f1310cce..645cc385 100755 --- a/data/mapObjects/diglettscaveroute2.asm +++ b/data/mapObjects/diglettscaveroute2.asm @@ -1,17 +1,17 @@ DiglettsCaveRoute2Object: db $7d ; border block - db $3 ; warps - db $7, $2, $0, $ff - db $7, $3, $0, $ff - db $4, $4, $0, DIGLETTS_CAVE + db 3 ; warps + warp 2, 7, 0, -1 + warp 3, 7, 0, -1 + warp 4, 4, 0, DIGLETTS_CAVE - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FISHER, $3, $3, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_FISHER, 3, 3, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP DIGLETTS_CAVE_EXIT_WIDTH, $7, $2 - EVENT_DISP DIGLETTS_CAVE_EXIT_WIDTH, $7, $3 - EVENT_DISP DIGLETTS_CAVE_EXIT_WIDTH, $4, $4 ; DIGLETTS_CAVE + warp_to 2, 7, DIGLETTS_CAVE_EXIT_WIDTH + warp_to 3, 7, DIGLETTS_CAVE_EXIT_WIDTH + warp_to 4, 4, DIGLETTS_CAVE_EXIT_WIDTH ; DIGLETTS_CAVE diff --git a/data/mapObjects/fanclub.asm b/data/mapObjects/fanclub.asm index f0f544ef..8e0fd931 100755 --- a/data/mapObjects/fanclub.asm +++ b/data/mapObjects/fanclub.asm @@ -1,22 +1,22 @@ FanClubObject: db $d ; border block - db $2 ; warps - db $7, $2, $1, $ff - db $7, $3, $1, $ff + db 2 ; warps + warp 2, 7, 1, -1 + warp 3, 7, 1, -1 - db $2 ; signs - db $0, $1, $7 ; FanClubText7 - db $0, $6, $8 ; FanClubText8 + db 2 ; signs + sign 1, 0, 7 ; FanClubText7 + sign 6, 0, 8 ; FanClubText8 - db $6 ; objects - object SPRITE_FISHER2, $6, $3, STAY, LEFT, $1 ; person - object SPRITE_GIRL, $1, $3, STAY, RIGHT, $2 ; person - object SPRITE_CLEFAIRY, $6, $4, STAY, LEFT, $3 ; person - object SPRITE_SEEL, $1, $4, STAY, RIGHT, $4 ; person - object SPRITE_GENTLEMAN, $3, $1, STAY, DOWN, $5 ; person - object SPRITE_CABLE_CLUB_WOMAN, $5, $1, STAY, DOWN, $6 ; person + db 6 ; objects + object SPRITE_FISHER2, 6, 3, STAY, LEFT, 1 ; person + object SPRITE_GIRL, 1, 3, STAY, RIGHT, 2 ; person + object SPRITE_CLEFAIRY, 6, 4, STAY, LEFT, 3 ; person + object SPRITE_SEEL, 1, 4, STAY, RIGHT, 4 ; person + object SPRITE_GENTLEMAN, 3, 1, STAY, DOWN, 5 ; person + object SPRITE_CABLE_CLUB_WOMAN, 5, 1, STAY, DOWN, 6 ; person ; warp-to - EVENT_DISP POKEMON_FAN_CLUB_WIDTH, $7, $2 - EVENT_DISP POKEMON_FAN_CLUB_WIDTH, $7, $3 + warp_to 2, 7, POKEMON_FAN_CLUB_WIDTH + warp_to 3, 7, POKEMON_FAN_CLUB_WIDTH diff --git a/data/mapObjects/fightingdojo.asm b/data/mapObjects/fightingdojo.asm index 44fed88f..b9ff9449 100755 --- a/data/mapObjects/fightingdojo.asm +++ b/data/mapObjects/fightingdojo.asm @@ -1,21 +1,21 @@ FightingDojoObject: db $3 ; border block - db $2 ; warps - db $b, $4, $1, $ff - db $b, $5, $1, $ff + db 2 ; warps + warp 4, 11, 1, -1 + warp 5, 11, 1, -1 - db $0 ; signs + db 0 ; signs - db $7 ; objects - object SPRITE_HIKER, $5, $3, STAY, DOWN, $1, OPP_BLACKBELT, $1 - object SPRITE_HIKER, $3, $4, STAY, RIGHT, $2, OPP_BLACKBELT, $2 - object SPRITE_HIKER, $3, $6, STAY, RIGHT, $3, OPP_BLACKBELT, $3 - object SPRITE_HIKER, $5, $5, STAY, LEFT, $4, OPP_BLACKBELT, $4 - object SPRITE_HIKER, $5, $7, STAY, LEFT, $5, OPP_BLACKBELT, $5 - object SPRITE_BALL, $4, $1, STAY, NONE, $6 ; person - object SPRITE_BALL, $5, $1, STAY, NONE, $7 ; person + db 7 ; objects + object SPRITE_HIKER, 5, 3, STAY, DOWN, 1, OPP_BLACKBELT, 1 + object SPRITE_HIKER, 3, 4, STAY, RIGHT, 2, OPP_BLACKBELT, 2 + object SPRITE_HIKER, 3, 6, STAY, RIGHT, 3, OPP_BLACKBELT, 3 + object SPRITE_HIKER, 5, 5, STAY, LEFT, 4, OPP_BLACKBELT, 4 + object SPRITE_HIKER, 5, 7, STAY, LEFT, 5, OPP_BLACKBELT, 5 + object SPRITE_BALL, 4, 1, STAY, NONE, 6 ; person + object SPRITE_BALL, 5, 1, STAY, NONE, 7 ; person ; warp-to - EVENT_DISP FIGHTING_DOJO_WIDTH, $b, $4 - EVENT_DISP FIGHTING_DOJO_WIDTH, $b, $5 + warp_to 4, 11, FIGHTING_DOJO_WIDTH + warp_to 5, 11, FIGHTING_DOJO_WIDTH diff --git a/data/mapObjects/fuchsiacity.asm b/data/mapObjects/fuchsiacity.asm index bcca4004..c89c03cd 100755 --- a/data/mapObjects/fuchsiacity.asm +++ b/data/mapObjects/fuchsiacity.asm @@ -1,52 +1,52 @@ FuchsiaCityObject: db $f ; border block - db $9 ; warps - db $d, $5, $0, FUCHSIA_MART - db $1b, $b, $0, FUCHSIA_HOUSE_1 - db $1b, $13, $0, FUCHSIA_POKECENTER - db $1b, $1b, $0, FUCHSIA_HOUSE_2 - db $3, $12, $0, SAFARI_ZONE_ENTRANCE - db $1b, $5, $0, FUCHSIA_GYM - db $d, $16, $0, FUCHSIA_MEETING_ROOM - db $1b, $1f, $1, FUCHSIA_HOUSE_3 - db $18, $1f, $0, FUCHSIA_HOUSE_3 + db 9 ; warps + warp 5, 13, 0, FUCHSIA_MART + warp 11, 27, 0, FUCHSIA_HOUSE_1 + warp 19, 27, 0, FUCHSIA_POKECENTER + warp 27, 27, 0, FUCHSIA_HOUSE_2 + warp 18, 3, 0, SAFARI_ZONE_ENTRANCE + warp 5, 27, 0, FUCHSIA_GYM + warp 22, 13, 0, FUCHSIA_MEETING_ROOM + warp 31, 27, 1, FUCHSIA_HOUSE_3 + warp 31, 24, 0, FUCHSIA_HOUSE_3 - db $e ; signs - db $17, $f, $b ; FuchsiaCityText11 - db $f, $19, $c ; FuchsiaCityText12 - db $5, $11, $d ; FuchsiaCityText13 - db $d, $6, $e ; MartSignText - db $1b, $14, $f ; PokeCenterSignText - db $1d, $1b, $10 ; FuchsiaCityText16 - db $f, $15, $11 ; FuchsiaCityText17 - db $1d, $5, $12 ; FuchsiaCityText18 - db $7, $21, $13 ; FuchsiaCityText19 - db $7, $1b, $14 ; FuchsiaCityText20 - db $7, $d, $15 ; FuchsiaCityText21 - db $d, $1f, $16 ; FuchsiaCityText22 - db $f, $d, $17 ; FuchsiaCityText23 - db $7, $7, $18 ; FuchsiaCityText24 + db 14 ; signs + sign 15, 23, 11 ; FuchsiaCityText11 + sign 25, 15, 12 ; FuchsiaCityText12 + sign 17, 5, 13 ; FuchsiaCityText13 + sign 6, 13, 14 ; MartSignText + sign 20, 27, 15 ; PokeCenterSignText + sign 27, 29, 16 ; FuchsiaCityText16 + sign 21, 15, 17 ; FuchsiaCityText17 + sign 5, 29, 18 ; FuchsiaCityText18 + sign 33, 7, 19 ; FuchsiaCityText19 + sign 27, 7, 20 ; FuchsiaCityText20 + sign 13, 7, 21 ; FuchsiaCityText21 + sign 31, 13, 22 ; FuchsiaCityText22 + sign 13, 15, 23 ; FuchsiaCityText23 + sign 7, 7, 24 ; FuchsiaCityText24 - db $a ; objects - object SPRITE_BUG_CATCHER, $a, $c, WALK, $2, $1 ; person - object SPRITE_GAMBLER, $1c, $11, WALK, $2, $2 ; person - object SPRITE_FISHER2, $1e, $e, STAY, DOWN, $3 ; person - object SPRITE_BUG_CATCHER, $18, $8, STAY, UP, $4 ; person - object SPRITE_CLEFAIRY, $1f, $5, WALK, $0, $5 ; person - object SPRITE_BALL, $19, $6, STAY, NONE, $6 ; person - object SPRITE_SLOWBRO, $c, $6, WALK, $2, $7 ; person - object SPRITE_SLOWBRO, $1e, $c, WALK, $2, $8 ; person - object SPRITE_SEEL, $8, $11, WALK, $0, $9 ; person - object SPRITE_OMANYTE, $6, $5, STAY, NONE, $a ; person + db 10 ; objects + object SPRITE_BUG_CATCHER, 10, 12, WALK, 2, 1 ; person + object SPRITE_GAMBLER, 28, 17, WALK, 2, 2 ; person + object SPRITE_FISHER2, 30, 14, STAY, DOWN, 3 ; person + object SPRITE_BUG_CATCHER, 24, 8, STAY, UP, 4 ; person + object SPRITE_CLEFAIRY, 31, 5, WALK, 0, 5 ; person + object SPRITE_BALL, 25, 6, STAY, NONE, 6 ; person + object SPRITE_SLOWBRO, 12, 6, WALK, 2, 7 ; person + object SPRITE_SLOWBRO, 30, 12, WALK, 2, 8 ; person + object SPRITE_SEEL, 8, 17, WALK, 0, 9 ; person + object SPRITE_OMANYTE, 6, 5, STAY, NONE, 10 ; person ; warp-to - EVENT_DISP FUCHSIA_CITY_WIDTH, $d, $5 ; FUCHSIA_MART - EVENT_DISP FUCHSIA_CITY_WIDTH, $1b, $b ; FUCHSIA_HOUSE_1 - EVENT_DISP FUCHSIA_CITY_WIDTH, $1b, $13 ; FUCHSIA_POKECENTER - EVENT_DISP FUCHSIA_CITY_WIDTH, $1b, $1b ; FUCHSIA_HOUSE_2 - EVENT_DISP FUCHSIA_CITY_WIDTH, $3, $12 ; SAFARI_ZONE_ENTRANCE - EVENT_DISP FUCHSIA_CITY_WIDTH, $1b, $5 ; FUCHSIA_GYM - EVENT_DISP FUCHSIA_CITY_WIDTH, $d, $16 ; FUCHSIA_MEETING_ROOM - EVENT_DISP FUCHSIA_CITY_WIDTH, $1b, $1f ; FUCHSIA_HOUSE_3 - EVENT_DISP FUCHSIA_CITY_WIDTH, $18, $1f ; FUCHSIA_HOUSE_3 + warp_to 5, 13, FUCHSIA_CITY_WIDTH ; FUCHSIA_MART + warp_to 11, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_HOUSE_1 + warp_to 19, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_POKECENTER + warp_to 27, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_HOUSE_2 + warp_to 18, 3, FUCHSIA_CITY_WIDTH ; SAFARI_ZONE_ENTRANCE + warp_to 5, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_GYM + warp_to 22, 13, FUCHSIA_CITY_WIDTH ; FUCHSIA_MEETING_ROOM + warp_to 31, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_HOUSE_3 + warp_to 31, 24, FUCHSIA_CITY_WIDTH ; FUCHSIA_HOUSE_3 diff --git a/data/mapObjects/fuchsiagym.asm b/data/mapObjects/fuchsiagym.asm index 023c23d3..23314fb9 100755 --- a/data/mapObjects/fuchsiagym.asm +++ b/data/mapObjects/fuchsiagym.asm @@ -1,22 +1,22 @@ FuchsiaGymObject: db $3 ; border block - db $2 ; warps - db $11, $4, $5, $ff - db $11, $5, $5, $ff + db 2 ; warps + warp 4, 17, 5, -1 + warp 5, 17, 5, -1 - db $0 ; signs + db 0 ; signs - db $8 ; objects - object SPRITE_BLACKBELT, $4, $a, STAY, DOWN, $1, OPP_KOGA, $1 - object SPRITE_ROCKER, $8, $d, STAY, DOWN, $2, OPP_JUGGLER, $7 - object SPRITE_ROCKER, $7, $8, STAY, RIGHT, $3, OPP_JUGGLER, $3 - object SPRITE_ROCKER, $1, $c, STAY, DOWN, $4, OPP_JUGGLER, $8 - object SPRITE_ROCKER, $3, $5, STAY, UP, $5, OPP_TAMER, $1 - object SPRITE_ROCKER, $8, $2, STAY, DOWN, $6, OPP_TAMER, $2 - object SPRITE_ROCKER, $2, $7, STAY, LEFT, $7, OPP_JUGGLER, $4 - object SPRITE_GYM_HELPER, $7, $f, STAY, DOWN, $8 ; person + db 8 ; objects + object SPRITE_BLACKBELT, 4, 10, STAY, DOWN, 1, OPP_KOGA, 1 + object SPRITE_ROCKER, 8, 13, STAY, DOWN, 2, OPP_JUGGLER, 7 + object SPRITE_ROCKER, 7, 8, STAY, RIGHT, 3, OPP_JUGGLER, 3 + object SPRITE_ROCKER, 1, 12, STAY, DOWN, 4, OPP_JUGGLER, 8 + object SPRITE_ROCKER, 3, 5, STAY, UP, 5, OPP_TAMER, 1 + object SPRITE_ROCKER, 8, 2, STAY, DOWN, 6, OPP_TAMER, 2 + object SPRITE_ROCKER, 2, 7, STAY, LEFT, 7, OPP_JUGGLER, 4 + object SPRITE_GYM_HELPER, 7, 15, STAY, DOWN, 8 ; person ; warp-to - EVENT_DISP FUCHSIA_GYM_WIDTH, $11, $4 - EVENT_DISP FUCHSIA_GYM_WIDTH, $11, $5 + warp_to 4, 17, FUCHSIA_GYM_WIDTH + warp_to 5, 17, FUCHSIA_GYM_WIDTH diff --git a/data/mapObjects/fuchsiahouse1.asm b/data/mapObjects/fuchsiahouse1.asm index 4d3c3b6e..ca4638f9 100755 --- a/data/mapObjects/fuchsiahouse1.asm +++ b/data/mapObjects/fuchsiahouse1.asm @@ -1,17 +1,17 @@ FuchsiaHouse1Object: db $a ; border block - db $2 ; warps - db $7, $2, $1, $ff - db $7, $3, $1, $ff + db 2 ; warps + warp 2, 7, 1, -1 + warp 3, 7, 1, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MOM_GEISHA, $2, $3, STAY, RIGHT, $1 ; person - object SPRITE_GAMBLER, $7, $2, STAY, UP, $2 ; person - object SPRITE_BUG_CATCHER, $5, $5, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_MOM_GEISHA, 2, 3, STAY, RIGHT, 1 ; person + object SPRITE_GAMBLER, 7, 2, STAY, UP, 2 ; person + object SPRITE_BUG_CATCHER, 5, 5, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP FUCHSIA_HOUSE_1_WIDTH, $7, $2 - EVENT_DISP FUCHSIA_HOUSE_1_WIDTH, $7, $3 + warp_to 2, 7, FUCHSIA_HOUSE_1_WIDTH + warp_to 3, 7, FUCHSIA_HOUSE_1_WIDTH diff --git a/data/mapObjects/fuchsiahouse2.asm b/data/mapObjects/fuchsiahouse2.asm index 3a3d07c3..e3702594 100755 --- a/data/mapObjects/fuchsiahouse2.asm +++ b/data/mapObjects/fuchsiahouse2.asm @@ -1,19 +1,19 @@ FuchsiaHouse2Object: db $17 ; border block - db $2 ; warps - db $7, $4, $3, $ff - db $7, $5, $3, $ff + db 2 ; warps + warp 4, 7, 3, -1 + warp 5, 7, 3, -1 - db $2 ; signs - db $3, $4, $4 ; FuchsiaHouse2Text4 - db $3, $5, $5 ; FuchsiaHouse2Text5 + db 2 ; signs + sign 4, 3, 4 ; FuchsiaHouse2Text4 + sign 5, 3, 5 ; FuchsiaHouse2Text5 - db $3 ; objects - object SPRITE_WARDEN, $2, $3, STAY, NONE, $1 ; person - object SPRITE_BALL, $8, $3, STAY, NONE, $2, RARE_CANDY - object SPRITE_BOULDER, $8, $4, STAY, BOULDER_MOVEMENT_BYTE_2, $3 ; person + db 3 ; objects + object SPRITE_WARDEN, 2, 3, STAY, NONE, 1 ; person + object SPRITE_BALL, 8, 3, STAY, NONE, 2, RARE_CANDY + object SPRITE_BOULDER, 8, 4, STAY, BOULDER_MOVEMENT_BYTE_2, 3 ; person ; warp-to - EVENT_DISP FUCHSIA_HOUSE_2_WIDTH, $7, $4 - EVENT_DISP FUCHSIA_HOUSE_2_WIDTH, $7, $5 + warp_to 4, 7, FUCHSIA_HOUSE_2_WIDTH + warp_to 5, 7, FUCHSIA_HOUSE_2_WIDTH diff --git a/data/mapObjects/fuchsiahouse3.asm b/data/mapObjects/fuchsiahouse3.asm index aaf05bd6..0bed500b 100755 --- a/data/mapObjects/fuchsiahouse3.asm +++ b/data/mapObjects/fuchsiahouse3.asm @@ -1,17 +1,17 @@ FuchsiaHouse3Object: db $c ; border block - db $3 ; warps - db $0, $2, $8, $ff - db $7, $2, $7, $ff - db $7, $3, $7, $ff + db 3 ; warps + warp 2, 0, 8, -1 + warp 2, 7, 7, -1 + warp 3, 7, 7, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FISHER, $5, $3, STAY, RIGHT, $1 ; person + db 1 ; objects + object SPRITE_FISHER, 5, 3, STAY, RIGHT, 1 ; person ; warp-to - EVENT_DISP FUCHSIA_HOUSE_3_WIDTH, $0, $2 - EVENT_DISP FUCHSIA_HOUSE_3_WIDTH, $7, $2 - EVENT_DISP FUCHSIA_HOUSE_3_WIDTH, $7, $3 + warp_to 2, 0, FUCHSIA_HOUSE_3_WIDTH + warp_to 2, 7, FUCHSIA_HOUSE_3_WIDTH + warp_to 3, 7, FUCHSIA_HOUSE_3_WIDTH diff --git a/data/mapObjects/fuchsiamart.asm b/data/mapObjects/fuchsiamart.asm index 431e7c2f..bfb93979 100755 --- a/data/mapObjects/fuchsiamart.asm +++ b/data/mapObjects/fuchsiamart.asm @@ -1,17 +1,17 @@ FuchsiaMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $0, $ff - db $7, $4, $0, $ff + db 2 ; warps + warp 3, 7, 0, -1 + warp 4, 7, 0, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_FAT_BALD_GUY, $4, $2, STAY, NONE, $2 ; person - object SPRITE_LASS, $6, $5, WALK, $1, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_FAT_BALD_GUY, 4, 2, STAY, NONE, 2 ; person + object SPRITE_LASS, 6, 5, WALK, 1, 3 ; person ; warp-to - EVENT_DISP FUCHSIA_MART_WIDTH, $7, $3 - EVENT_DISP FUCHSIA_MART_WIDTH, $7, $4 + warp_to 3, 7, FUCHSIA_MART_WIDTH + warp_to 4, 7, FUCHSIA_MART_WIDTH diff --git a/data/mapObjects/fuchsiameetingroom.asm b/data/mapObjects/fuchsiameetingroom.asm index 8106b9ec..c6c10415 100755 --- a/data/mapObjects/fuchsiameetingroom.asm +++ b/data/mapObjects/fuchsiameetingroom.asm @@ -1,17 +1,17 @@ FuchsiaMeetingRoomObject: db $17 ; border block - db $2 ; warps - db $7, $4, $6, $ff - db $7, $5, $6, $ff + db 2 ; warps + warp 4, 7, 6, -1 + warp 5, 7, 6, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_WHITE_PLAYER, $4, $1, STAY, DOWN, $1 ; person - object SPRITE_WHITE_PLAYER, $0, $2, STAY, UP, $2 ; person - object SPRITE_WHITE_PLAYER, $a, $1, STAY, DOWN, $3 ; person + db 3 ; objects + object SPRITE_WHITE_PLAYER, 4, 1, STAY, DOWN, 1 ; person + object SPRITE_WHITE_PLAYER, 0, 2, STAY, UP, 2 ; person + object SPRITE_WHITE_PLAYER, 10, 1, STAY, DOWN, 3 ; person ; warp-to - EVENT_DISP FUCHSIA_MEETING_ROOM_WIDTH, $7, $4 - EVENT_DISP FUCHSIA_MEETING_ROOM_WIDTH, $7, $5 + warp_to 4, 7, FUCHSIA_MEETING_ROOM_WIDTH + warp_to 5, 7, FUCHSIA_MEETING_ROOM_WIDTH diff --git a/data/mapObjects/fuchsiapokecenter.asm b/data/mapObjects/fuchsiapokecenter.asm index 8cf103fa..12540cd3 100755 --- a/data/mapObjects/fuchsiapokecenter.asm +++ b/data/mapObjects/fuchsiapokecenter.asm @@ -1,18 +1,18 @@ FuchsiaPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $2, $ff - db $7, $4, $2, $ff + db 2 ; warps + warp 3, 7, 2, -1 + warp 4, 7, 2, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_ROCKER, $2, $3, STAY, NONE, $2 ; person - object SPRITE_LASS, $6, $5, WALK, $2, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_ROCKER, 2, 3, STAY, NONE, 2 ; person + object SPRITE_LASS, 6, 5, WALK, 2, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP FUCHSIA_POKECENTER_WIDTH, $7, $3 - EVENT_DISP FUCHSIA_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, FUCHSIA_POKECENTER_WIDTH + warp_to 4, 7, FUCHSIA_POKECENTER_WIDTH diff --git a/data/mapObjects/gary.asm b/data/mapObjects/gary.asm index e0f37b91..10d9f0ed 100755 --- a/data/mapObjects/gary.asm +++ b/data/mapObjects/gary.asm @@ -1,20 +1,20 @@ GaryObject: db $3 ; border block - db $4 ; warps - db $7, $3, $1, LANCES_ROOM - db $7, $4, $2, LANCES_ROOM - db $0, $3, $0, HALL_OF_FAME - db $0, $4, $0, HALL_OF_FAME + db 4 ; warps + warp 3, 7, 1, LANCES_ROOM + warp 4, 7, 2, LANCES_ROOM + warp 3, 0, 0, HALL_OF_FAME + warp 4, 0, 0, HALL_OF_FAME - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BLUE, $4, $2, STAY, DOWN, $1 ; person - object SPRITE_OAK, $3, $7, STAY, UP, $2 ; person + db 2 ; objects + object SPRITE_BLUE, 4, 2, STAY, DOWN, 1 ; person + object SPRITE_OAK, 3, 7, STAY, UP, 2 ; person ; warp-to - EVENT_DISP CHAMPIONS_ROOM_WIDTH, $7, $3 ; LANCES_ROOM - EVENT_DISP CHAMPIONS_ROOM_WIDTH, $7, $4 ; LANCES_ROOM - EVENT_DISP CHAMPIONS_ROOM_WIDTH, $0, $3 ; HALL_OF_FAME - EVENT_DISP CHAMPIONS_ROOM_WIDTH, $0, $4 ; HALL_OF_FAME + warp_to 3, 7, CHAMPIONS_ROOM_WIDTH ; LANCES_ROOM + warp_to 4, 7, CHAMPIONS_ROOM_WIDTH ; LANCES_ROOM + warp_to 3, 0, CHAMPIONS_ROOM_WIDTH ; HALL_OF_FAME + warp_to 4, 0, CHAMPIONS_ROOM_WIDTH ; HALL_OF_FAME diff --git a/data/mapObjects/halloffameroom.asm b/data/mapObjects/halloffameroom.asm index 8e245c2c..a815a053 100755 --- a/data/mapObjects/halloffameroom.asm +++ b/data/mapObjects/halloffameroom.asm @@ -1,15 +1,15 @@ HallofFameRoomObject: db $3 ; border block - db $2 ; warps - db $7, $4, $2, CHAMPIONS_ROOM - db $7, $5, $3, CHAMPIONS_ROOM + db 2 ; warps + warp 4, 7, 2, CHAMPIONS_ROOM + warp 5, 7, 3, CHAMPIONS_ROOM - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_OAK, $5, $2, STAY, DOWN, $1 ; person + db 1 ; objects + object SPRITE_OAK, 5, 2, STAY, DOWN, 1 ; person ; warp-to - EVENT_DISP HALL_OF_FAME_WIDTH, $7, $4 ; CHAMPIONS_ROOM - EVENT_DISP HALL_OF_FAME_WIDTH, $7, $5 ; CHAMPIONS_ROOM + warp_to 4, 7, HALL_OF_FAME_WIDTH ; CHAMPIONS_ROOM + warp_to 5, 7, HALL_OF_FAME_WIDTH ; CHAMPIONS_ROOM diff --git a/data/mapObjects/indigoplateau.asm b/data/mapObjects/indigoplateau.asm index 145f2f39..d18f25e1 100755 --- a/data/mapObjects/indigoplateau.asm +++ b/data/mapObjects/indigoplateau.asm @@ -1,14 +1,14 @@ IndigoPlateauObject: db $e ; border block - db $2 ; warps - db $5, $9, $0, INDIGO_PLATEAU_LOBBY - db $5, $a, $0, INDIGO_PLATEAU_LOBBY + db 2 ; warps + warp 9, 5, 0, INDIGO_PLATEAU_LOBBY + warp 10, 5, 0, INDIGO_PLATEAU_LOBBY - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP INDIGO_PLATEAU_WIDTH, $5, $9 ; INDIGO_PLATEAU_LOBBY - EVENT_DISP INDIGO_PLATEAU_WIDTH, $5, $a ; INDIGO_PLATEAU_LOBBY + warp_to 9, 5, INDIGO_PLATEAU_WIDTH ; INDIGO_PLATEAU_LOBBY + warp_to 10, 5, INDIGO_PLATEAU_WIDTH ; INDIGO_PLATEAU_LOBBY diff --git a/data/mapObjects/indigoplateaulobby.asm b/data/mapObjects/indigoplateaulobby.asm index 13438153..d82256a1 100755 --- a/data/mapObjects/indigoplateaulobby.asm +++ b/data/mapObjects/indigoplateaulobby.asm @@ -1,21 +1,21 @@ IndigoPlateauLobbyObject: db $0 ; border block - db $3 ; warps - db $b, $7, $0, $ff - db $b, $8, $1, $ff - db $0, $8, $0, LORELEIS_ROOM + db 3 ; warps + warp 7, 11, 0, -1 + warp 8, 11, 1, -1 + warp 8, 0, 0, LORELEIS_ROOM - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_NURSE, $7, $5, STAY, DOWN, $1 ; person - object SPRITE_GYM_HELPER, $4, $9, STAY, RIGHT, $2 ; person - object SPRITE_LASS, $5, $1, STAY, DOWN, $3 ; person - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $4 ; person - object SPRITE_CABLE_CLUB_WOMAN, $d, $6, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_NURSE, 7, 5, STAY, DOWN, 1 ; person + object SPRITE_GYM_HELPER, 4, 9, STAY, RIGHT, 2 ; person + object SPRITE_LASS, 5, 1, STAY, DOWN, 3 ; person + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 4 ; person + object SPRITE_CABLE_CLUB_WOMAN, 13, 6, STAY, DOWN, 5 ; person ; warp-to - EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $b, $7 - EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $b, $8 - EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $0, $8 ; LORELEIS_ROOM + warp_to 7, 11, INDIGO_PLATEAU_LOBBY_WIDTH + warp_to 8, 11, INDIGO_PLATEAU_LOBBY_WIDTH + warp_to 8, 0, INDIGO_PLATEAU_LOBBY_WIDTH ; LORELEIS_ROOM diff --git a/data/mapObjects/lab1.asm b/data/mapObjects/lab1.asm index e0adaedc..b9eea581 100755 --- a/data/mapObjects/lab1.asm +++ b/data/mapObjects/lab1.asm @@ -1,25 +1,25 @@ Lab1Object: db $17 ; border block - db $5 ; warps - db $7, $2, $2, $ff - db $7, $3, $2, $ff - db $4, $8, $0, CINNABAR_LAB_2 - db $4, $c, $0, CINNABAR_LAB_3 - db $4, $10, $0, CINNABAR_LAB_4 + db 5 ; warps + warp 2, 7, 2, -1 + warp 3, 7, 2, -1 + warp 8, 4, 0, CINNABAR_LAB_2 + warp 12, 4, 0, CINNABAR_LAB_3 + warp 16, 4, 0, CINNABAR_LAB_4 - db $4 ; signs - db $2, $3, $2 ; Lab1Text2 - db $4, $9, $3 ; Lab1Text3 - db $4, $d, $4 ; Lab1Text4 - db $4, $11, $5 ; Lab1Text5 + db 4 ; signs + sign 3, 2, 2 ; Lab1Text2 + sign 9, 4, 3 ; Lab1Text3 + sign 13, 4, 4 ; Lab1Text4 + sign 17, 4, 5 ; Lab1Text5 - db $1 ; objects - object SPRITE_FISHER, $1, $3, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_FISHER, 1, 3, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP CINNABAR_LAB_1_WIDTH, $7, $2 - EVENT_DISP CINNABAR_LAB_1_WIDTH, $7, $3 - EVENT_DISP CINNABAR_LAB_1_WIDTH, $4, $8 ; CINNABAR_LAB_2 - EVENT_DISP CINNABAR_LAB_1_WIDTH, $4, $c ; CINNABAR_LAB_3 - EVENT_DISP CINNABAR_LAB_1_WIDTH, $4, $10 ; CINNABAR_LAB_4 + warp_to 2, 7, CINNABAR_LAB_1_WIDTH + warp_to 3, 7, CINNABAR_LAB_1_WIDTH + warp_to 8, 4, CINNABAR_LAB_1_WIDTH ; CINNABAR_LAB_2 + warp_to 12, 4, CINNABAR_LAB_1_WIDTH ; CINNABAR_LAB_3 + warp_to 16, 4, CINNABAR_LAB_1_WIDTH ; CINNABAR_LAB_4 diff --git a/data/mapObjects/lab2.asm b/data/mapObjects/lab2.asm index ed541ada..3062fcae 100755 --- a/data/mapObjects/lab2.asm +++ b/data/mapObjects/lab2.asm @@ -1,17 +1,17 @@ Lab2Object: db $17 ; border block - db $2 ; warps - db $7, $2, $2, CINNABAR_LAB_1 - db $7, $3, $2, CINNABAR_LAB_1 + db 2 ; warps + warp 2, 7, 2, CINNABAR_LAB_1 + warp 3, 7, 2, CINNABAR_LAB_1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $3, $2, STAY, DOWN, $1 ; person - object SPRITE_OLD_PERSON, $1, $4, STAY, NONE, $2 ; person - object SPRITE_FOULARD_WOMAN, $5, $5, STAY, UP, $3 ; person + db 3 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 3, 2, STAY, DOWN, 1 ; person + object SPRITE_OLD_PERSON, 1, 4, STAY, NONE, 2 ; person + object SPRITE_FOULARD_WOMAN, 5, 5, STAY, UP, 3 ; person ; warp-to - EVENT_DISP CINNABAR_LAB_2_WIDTH, $7, $2 ; CINNABAR_LAB_1 - EVENT_DISP CINNABAR_LAB_2_WIDTH, $7, $3 ; CINNABAR_LAB_1 + warp_to 2, 7, CINNABAR_LAB_2_WIDTH ; CINNABAR_LAB_1 + warp_to 3, 7, CINNABAR_LAB_2_WIDTH ; CINNABAR_LAB_1 diff --git a/data/mapObjects/lab3.asm b/data/mapObjects/lab3.asm index c5ee01c3..73ba321d 100755 --- a/data/mapObjects/lab3.asm +++ b/data/mapObjects/lab3.asm @@ -1,19 +1,19 @@ Lab3Object: db $17 ; border block - db $2 ; warps - db $7, $2, $3, CINNABAR_LAB_1 - db $7, $3, $3, CINNABAR_LAB_1 + db 2 ; warps + warp 2, 7, 3, CINNABAR_LAB_1 + warp 3, 7, 3, CINNABAR_LAB_1 - db $3 ; signs - db $4, $0, $3 ; Lab3Text3 - db $4, $1, $4 ; Lab3Text4 - db $1, $2, $5 ; Lab3Text5 + db 3 ; signs + sign 0, 4, 3 ; Lab3Text3 + sign 1, 4, 4 ; Lab3Text4 + sign 2, 1, 5 ; Lab3Text5 - db $2 ; objects - object SPRITE_OAK_AIDE, $7, $2, STAY, DOWN, $1 ; person - object SPRITE_OAK_AIDE, $2, $3, WALK, $2, $2 ; person + db 2 ; objects + object SPRITE_OAK_AIDE, 7, 2, STAY, DOWN, 1 ; person + object SPRITE_OAK_AIDE, 2, 3, WALK, 2, 2 ; person ; warp-to - EVENT_DISP CINNABAR_LAB_3_WIDTH, $7, $2 ; CINNABAR_LAB_1 - EVENT_DISP CINNABAR_LAB_3_WIDTH, $7, $3 ; CINNABAR_LAB_1 + warp_to 2, 7, CINNABAR_LAB_3_WIDTH ; CINNABAR_LAB_1 + warp_to 3, 7, CINNABAR_LAB_3_WIDTH ; CINNABAR_LAB_1 diff --git a/data/mapObjects/lab4.asm b/data/mapObjects/lab4.asm index 361f9533..b9956f5f 100755 --- a/data/mapObjects/lab4.asm +++ b/data/mapObjects/lab4.asm @@ -1,16 +1,16 @@ Lab4Object: db $17 ; border block - db $2 ; warps - db $7, $2, $4, CINNABAR_LAB_1 - db $7, $3, $4, CINNABAR_LAB_1 + db 2 ; warps + warp 2, 7, 4, CINNABAR_LAB_1 + warp 3, 7, 4, CINNABAR_LAB_1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_OAK_AIDE, $5, $2, WALK, $2, $1 ; person - object SPRITE_OAK_AIDE, $7, $6, STAY, UP, $2 ; person + db 2 ; objects + object SPRITE_OAK_AIDE, 5, 2, WALK, 2, 1 ; person + object SPRITE_OAK_AIDE, 7, 6, STAY, UP, 2 ; person ; warp-to - EVENT_DISP CINNABAR_LAB_4_WIDTH, $7, $2 ; CINNABAR_LAB_1 - EVENT_DISP CINNABAR_LAB_4_WIDTH, $7, $3 ; CINNABAR_LAB_1 + warp_to 2, 7, CINNABAR_LAB_4_WIDTH ; CINNABAR_LAB_1 + warp_to 3, 7, CINNABAR_LAB_4_WIDTH ; CINNABAR_LAB_1 diff --git a/data/mapObjects/lance.asm b/data/mapObjects/lance.asm index e7bf0ad6..77c0058c 100755 --- a/data/mapObjects/lance.asm +++ b/data/mapObjects/lance.asm @@ -1,17 +1,17 @@ LanceObject: db $3 ; border block - db $3 ; warps - db $10, $18, $2, AGATHAS_ROOM - db $0, $5, $0, CHAMPIONS_ROOM - db $0, $6, $0, CHAMPIONS_ROOM + db 3 ; warps + warp 24, 16, 2, AGATHAS_ROOM + warp 5, 0, 0, CHAMPIONS_ROOM + warp 6, 0, 0, CHAMPIONS_ROOM - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_LANCE, $6, $1, STAY, DOWN, $1, OPP_LANCE, $1 + db 1 ; objects + object SPRITE_LANCE, 6, 1, STAY, DOWN, 1, OPP_LANCE, 1 ; warp-to - EVENT_DISP LANCES_ROOM_WIDTH, $10, $18 ; AGATHAS_ROOM - EVENT_DISP LANCES_ROOM_WIDTH, $0, $5 ; CHAMPIONS_ROOM - EVENT_DISP LANCES_ROOM_WIDTH, $0, $6 ; CHAMPIONS_ROOM + warp_to 24, 16, LANCES_ROOM_WIDTH ; AGATHAS_ROOM + warp_to 5, 0, LANCES_ROOM_WIDTH ; CHAMPIONS_ROOM + warp_to 6, 0, LANCES_ROOM_WIDTH ; CHAMPIONS_ROOM diff --git a/data/mapObjects/lavenderhouse1.asm b/data/mapObjects/lavenderhouse1.asm index 54f57270..d9b61302 100755 --- a/data/mapObjects/lavenderhouse1.asm +++ b/data/mapObjects/lavenderhouse1.asm @@ -1,20 +1,20 @@ LavenderHouse1Object: db $a ; border block - db $2 ; warps - db $7, $2, $2, $ff - db $7, $3, $2, $ff + db 2 ; warps + warp 2, 7, 2, -1 + warp 3, 7, 2, -1 - db $0 ; signs + db 0 ; signs - db $6 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $3, $5, STAY, NONE, $1 ; person - object SPRITE_LITTLE_GIRL, $6, $3, STAY, DOWN, $2 ; person - object SPRITE_SLOWBRO, $6, $4, STAY, UP, $3 ; person - object SPRITE_SLOWBRO, $1, $3, STAY, NONE, $4 ; person - object SPRITE_MR_FUJI, $3, $1, STAY, NONE, $5 ; person - object SPRITE_BOOK_MAP_DEX, $3, $3, STAY, NONE, $6 ; person + db 6 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 3, 5, STAY, NONE, 1 ; person + object SPRITE_LITTLE_GIRL, 6, 3, STAY, DOWN, 2 ; person + object SPRITE_SLOWBRO, 6, 4, STAY, UP, 3 ; person + object SPRITE_SLOWBRO, 1, 3, STAY, NONE, 4 ; person + object SPRITE_MR_FUJI, 3, 1, STAY, NONE, 5 ; person + object SPRITE_BOOK_MAP_DEX, 3, 3, STAY, NONE, 6 ; person ; warp-to - EVENT_DISP LAVENDER_HOUSE_1_WIDTH, $7, $2 - EVENT_DISP LAVENDER_HOUSE_1_WIDTH, $7, $3 + warp_to 2, 7, LAVENDER_HOUSE_1_WIDTH + warp_to 3, 7, LAVENDER_HOUSE_1_WIDTH diff --git a/data/mapObjects/lavenderhouse2.asm b/data/mapObjects/lavenderhouse2.asm index 7638ff66..6d900f45 100755 --- a/data/mapObjects/lavenderhouse2.asm +++ b/data/mapObjects/lavenderhouse2.asm @@ -1,16 +1,16 @@ LavenderHouse2Object: db $a ; border block - db $2 ; warps - db $7, $2, $4, $ff - db $7, $3, $4, $ff + db 2 ; warps + warp 2, 7, 4, -1 + warp 3, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_SLOWBRO, $3, $5, STAY, UP, $1 ; person - object SPRITE_BRUNETTE_GIRL, $2, $4, STAY, RIGHT, $2 ; person + db 2 ; objects + object SPRITE_SLOWBRO, 3, 5, STAY, UP, 1 ; person + object SPRITE_BRUNETTE_GIRL, 2, 4, STAY, RIGHT, 2 ; person ; warp-to - EVENT_DISP LAVENDER_HOUSE_2_WIDTH, $7, $2 - EVENT_DISP LAVENDER_HOUSE_2_WIDTH, $7, $3 + warp_to 2, 7, LAVENDER_HOUSE_2_WIDTH + warp_to 3, 7, LAVENDER_HOUSE_2_WIDTH diff --git a/data/mapObjects/lavendermart.asm b/data/mapObjects/lavendermart.asm index 2d8e7636..6661fee9 100755 --- a/data/mapObjects/lavendermart.asm +++ b/data/mapObjects/lavendermart.asm @@ -1,17 +1,17 @@ LavenderMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $3, $ff - db $7, $4, $3, $ff + db 2 ; warps + warp 3, 7, 3, -1 + warp 4, 7, 3, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_BALDING_GUY, $3, $4, STAY, NONE, $2 ; person - object SPRITE_BLACK_HAIR_BOY_1, $7, $2, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_BALDING_GUY, 3, 4, STAY, NONE, 2 ; person + object SPRITE_BLACK_HAIR_BOY_1, 7, 2, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP LAVENDER_MART_WIDTH, $7, $3 - EVENT_DISP LAVENDER_MART_WIDTH, $7, $4 + warp_to 3, 7, LAVENDER_MART_WIDTH + warp_to 4, 7, LAVENDER_MART_WIDTH diff --git a/data/mapObjects/lavenderpokecenter.asm b/data/mapObjects/lavenderpokecenter.asm index 617e7fb8..b3eea8ec 100755 --- a/data/mapObjects/lavenderpokecenter.asm +++ b/data/mapObjects/lavenderpokecenter.asm @@ -1,18 +1,18 @@ LavenderPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $0, $ff - db $7, $4, $0, $ff + db 2 ; warps + warp 3, 7, 0, -1 + warp 4, 7, 0, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $5, $3, STAY, NONE, $2 ; person - object SPRITE_LITTLE_GIRL, $2, $6, WALK, $1, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 5, 3, STAY, NONE, 2 ; person + object SPRITE_LITTLE_GIRL, 2, 6, WALK, 1, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP LAVENDER_POKECENTER_WIDTH, $7, $3 - EVENT_DISP LAVENDER_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, LAVENDER_POKECENTER_WIDTH + warp_to 4, 7, LAVENDER_POKECENTER_WIDTH diff --git a/data/mapObjects/lavendertown.asm b/data/mapObjects/lavendertown.asm index 49347aba..5788c4f3 100755 --- a/data/mapObjects/lavendertown.asm +++ b/data/mapObjects/lavendertown.asm @@ -1,31 +1,31 @@ LavenderTownObject: db $2c ; border block - db $6 ; warps - db $5, $3, $0, LAVENDER_POKECENTER - db $5, $e, $0, POKEMONTOWER_1 - db $9, $7, $0, LAVENDER_HOUSE_1 - db $d, $f, $0, LAVENDER_MART - db $d, $3, $0, LAVENDER_HOUSE_2 - db $d, $7, $0, NAME_RATERS_HOUSE + db 6 ; warps + warp 3, 5, 0, LAVENDER_POKECENTER + warp 14, 5, 0, POKEMONTOWER_1 + warp 7, 9, 0, LAVENDER_HOUSE_1 + warp 15, 13, 0, LAVENDER_MART + warp 3, 13, 0, LAVENDER_HOUSE_2 + warp 7, 13, 0, NAME_RATERS_HOUSE - db $6 ; signs - db $9, $b, $4 ; LavenderTownText4 - db $3, $9, $5 ; LavenderTownText5 - db $d, $10, $6 ; MartSignText - db $5, $4, $7 ; PokeCenterSignText - db $9, $5, $8 ; LavenderTownText8 - db $7, $11, $9 ; LavenderTownText9 + db 6 ; signs + sign 11, 9, 4 ; LavenderTownText4 + sign 9, 3, 5 ; LavenderTownText5 + sign 16, 13, 6 ; MartSignText + sign 4, 5, 7 ; PokeCenterSignText + sign 5, 9, 8 ; LavenderTownText8 + sign 17, 7, 9 ; LavenderTownText9 - db $3 ; objects - object SPRITE_LITTLE_GIRL, $f, $9, WALK, $0, $1 ; person - object SPRITE_BLACK_HAIR_BOY_1, $9, $a, STAY, NONE, $2 ; person - object SPRITE_BLACK_HAIR_BOY_2, $8, $7, WALK, $2, $3 ; person + db 3 ; objects + object SPRITE_LITTLE_GIRL, 15, 9, WALK, 0, 1 ; person + object SPRITE_BLACK_HAIR_BOY_1, 9, 10, STAY, NONE, 2 ; person + object SPRITE_BLACK_HAIR_BOY_2, 8, 7, WALK, 2, 3 ; person ; warp-to - EVENT_DISP LAVENDER_TOWN_WIDTH, $5, $3 ; LAVENDER_POKECENTER - EVENT_DISP LAVENDER_TOWN_WIDTH, $5, $e ; POKEMONTOWER_1 - EVENT_DISP LAVENDER_TOWN_WIDTH, $9, $7 ; LAVENDER_HOUSE_1 - EVENT_DISP LAVENDER_TOWN_WIDTH, $d, $f ; LAVENDER_MART - EVENT_DISP LAVENDER_TOWN_WIDTH, $d, $3 ; LAVENDER_HOUSE_2 - EVENT_DISP LAVENDER_TOWN_WIDTH, $d, $7 ; NAME_RATERS_HOUSE + warp_to 3, 5, LAVENDER_TOWN_WIDTH ; LAVENDER_POKECENTER + warp_to 14, 5, LAVENDER_TOWN_WIDTH ; POKEMONTOWER_1 + warp_to 7, 9, LAVENDER_TOWN_WIDTH ; LAVENDER_HOUSE_1 + warp_to 15, 13, LAVENDER_TOWN_WIDTH ; LAVENDER_MART + warp_to 3, 13, LAVENDER_TOWN_WIDTH ; LAVENDER_HOUSE_2 + warp_to 7, 13, LAVENDER_TOWN_WIDTH ; NAME_RATERS_HOUSE diff --git a/data/mapObjects/lorelei.asm b/data/mapObjects/lorelei.asm index 5b985369..e5f0f9f2 100755 --- a/data/mapObjects/lorelei.asm +++ b/data/mapObjects/lorelei.asm @@ -1,19 +1,19 @@ LoreleiObject: db $3 ; border block - db $4 ; warps - db $b, $4, $2, INDIGO_PLATEAU_LOBBY - db $b, $5, $2, INDIGO_PLATEAU_LOBBY - db $0, $4, $0, BRUNOS_ROOM - db $0, $5, $1, BRUNOS_ROOM + db 4 ; warps + warp 4, 11, 2, INDIGO_PLATEAU_LOBBY + warp 5, 11, 2, INDIGO_PLATEAU_LOBBY + warp 4, 0, 0, BRUNOS_ROOM + warp 5, 0, 1, BRUNOS_ROOM - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_LORELEI, $5, $2, STAY, DOWN, $1, OPP_LORELEI, $1 + db 1 ; objects + object SPRITE_LORELEI, 5, 2, STAY, DOWN, 1, OPP_LORELEI, 1 ; warp-to - EVENT_DISP LORELEIS_ROOM_WIDTH, $b, $4 ; INDIGO_PLATEAU_LOBBY - EVENT_DISP LORELEIS_ROOM_WIDTH, $b, $5 ; INDIGO_PLATEAU_LOBBY - EVENT_DISP LORELEIS_ROOM_WIDTH, $0, $4 ; BRUNOS_ROOM - EVENT_DISP LORELEIS_ROOM_WIDTH, $0, $5 ; BRUNOS_ROOM + warp_to 4, 11, LORELEIS_ROOM_WIDTH ; INDIGO_PLATEAU_LOBBY + warp_to 5, 11, LORELEIS_ROOM_WIDTH ; INDIGO_PLATEAU_LOBBY + warp_to 4, 0, LORELEIS_ROOM_WIDTH ; BRUNOS_ROOM + warp_to 5, 0, LORELEIS_ROOM_WIDTH ; BRUNOS_ROOM diff --git a/data/mapObjects/mansion1.asm b/data/mapObjects/mansion1.asm index ed6529f2..fe543f27 100755 --- a/data/mapObjects/mansion1.asm +++ b/data/mapObjects/mansion1.asm @@ -1,29 +1,29 @@ Mansion1Object: db $2e ; border block - db $8 ; warps - db $1b, $4, $0, $ff - db $1b, $5, $0, $ff - db $1b, $6, $0, $ff - db $1b, $7, $0, $ff - db $a, $5, $0, MANSION_2 - db $17, $15, $0, MANSION_4 - db $1b, $1a, $0, $ff - db $1b, $1b, $0, $ff + db 8 ; warps + warp 4, 27, 0, -1 + warp 5, 27, 0, -1 + warp 6, 27, 0, -1 + warp 7, 27, 0, -1 + warp 5, 10, 0, MANSION_2 + warp 21, 23, 0, MANSION_4 + warp 26, 27, 0, -1 + warp 27, 27, 0, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_OAK_AIDE, $11, $11, STAY, LEFT, $1, OPP_SCIENTIST, $4 - object SPRITE_BALL, $e, $3, STAY, NONE, $2, ESCAPE_ROPE - object SPRITE_BALL, $12, $15, STAY, NONE, $3, CARBOS + db 3 ; objects + object SPRITE_OAK_AIDE, 17, 17, STAY, LEFT, 1, OPP_SCIENTIST, 4 + object SPRITE_BALL, 14, 3, STAY, NONE, 2, ESCAPE_ROPE + object SPRITE_BALL, 18, 21, STAY, NONE, 3, CARBOS ; warp-to - EVENT_DISP MANSION_1_WIDTH, $1b, $4 - EVENT_DISP MANSION_1_WIDTH, $1b, $5 - EVENT_DISP MANSION_1_WIDTH, $1b, $6 - EVENT_DISP MANSION_1_WIDTH, $1b, $7 - EVENT_DISP MANSION_1_WIDTH, $a, $5 ; MANSION_2 - EVENT_DISP MANSION_1_WIDTH, $17, $15 ; MANSION_4 - EVENT_DISP MANSION_1_WIDTH, $1b, $1a - EVENT_DISP MANSION_1_WIDTH, $1b, $1b + warp_to 4, 27, MANSION_1_WIDTH + warp_to 5, 27, MANSION_1_WIDTH + warp_to 6, 27, MANSION_1_WIDTH + warp_to 7, 27, MANSION_1_WIDTH + warp_to 5, 10, MANSION_1_WIDTH ; MANSION_2 + warp_to 21, 23, MANSION_1_WIDTH ; MANSION_4 + warp_to 26, 27, MANSION_1_WIDTH + warp_to 27, 27, MANSION_1_WIDTH diff --git a/data/mapObjects/mansion2.asm b/data/mapObjects/mansion2.asm index bda2ad27..cea8c8fc 100755 --- a/data/mapObjects/mansion2.asm +++ b/data/mapObjects/mansion2.asm @@ -1,22 +1,22 @@ Mansion2Object: db $1 ; border block - db $4 ; warps - db $a, $5, $4, MANSION_1 - db $a, $7, $0, MANSION_3 - db $e, $19, $2, MANSION_3 - db $1, $6, $1, MANSION_3 + db 4 ; warps + warp 5, 10, 4, MANSION_1 + warp 7, 10, 0, MANSION_3 + warp 25, 14, 2, MANSION_3 + warp 6, 1, 1, MANSION_3 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $3, $11, WALK, $2, $1, OPP_BURGLAR, $7 - object SPRITE_BALL, $1c, $7, STAY, NONE, $2, CALCIUM - object SPRITE_BOOK_MAP_DEX, $12, $2, STAY, NONE, $3 ; person - object SPRITE_BOOK_MAP_DEX, $3, $16, STAY, NONE, $4 ; person + db 4 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 3, 17, WALK, 2, 1, OPP_BURGLAR, 7 + object SPRITE_BALL, 28, 7, STAY, NONE, 2, CALCIUM + object SPRITE_BOOK_MAP_DEX, 18, 2, STAY, NONE, 3 ; person + object SPRITE_BOOK_MAP_DEX, 3, 22, STAY, NONE, 4 ; person ; warp-to - EVENT_DISP MANSION_2_WIDTH, $a, $5 ; MANSION_1 - EVENT_DISP MANSION_2_WIDTH, $a, $7 ; MANSION_3 - EVENT_DISP MANSION_2_WIDTH, $e, $19 ; MANSION_3 - EVENT_DISP MANSION_2_WIDTH, $1, $6 ; MANSION_3 + warp_to 5, 10, MANSION_2_WIDTH ; MANSION_1 + warp_to 7, 10, MANSION_2_WIDTH ; MANSION_3 + warp_to 25, 14, MANSION_2_WIDTH ; MANSION_3 + warp_to 6, 1, MANSION_2_WIDTH ; MANSION_3 diff --git a/data/mapObjects/mansion3.asm b/data/mapObjects/mansion3.asm index 72431402..f6ec7aee 100755 --- a/data/mapObjects/mansion3.asm +++ b/data/mapObjects/mansion3.asm @@ -1,21 +1,21 @@ Mansion3Object: db $1 ; border block - db $3 ; warps - db $a, $7, $1, MANSION_2 - db $1, $6, $3, MANSION_2 - db $e, $19, $2, MANSION_2 + db 3 ; warps + warp 7, 10, 1, MANSION_2 + warp 6, 1, 3, MANSION_2 + warp 25, 14, 2, MANSION_2 - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $5, $b, WALK, $2, $1, OPP_BURGLAR, $8 - object SPRITE_OAK_AIDE, $14, $b, STAY, LEFT, $2, OPP_SCIENTIST, $c - object SPRITE_BALL, $1, $10, STAY, NONE, $3, MAX_POTION - object SPRITE_BALL, $19, $5, STAY, NONE, $4, IRON - object SPRITE_BOOK_MAP_DEX, $6, $c, STAY, NONE, $5 ; person + db 5 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 5, 11, WALK, 2, 1, OPP_BURGLAR, 8 + object SPRITE_OAK_AIDE, 20, 11, STAY, LEFT, 2, OPP_SCIENTIST, 12 + object SPRITE_BALL, 1, 16, STAY, NONE, 3, MAX_POTION + object SPRITE_BALL, 25, 5, STAY, NONE, 4, IRON + object SPRITE_BOOK_MAP_DEX, 6, 12, STAY, NONE, 5 ; person ; warp-to - EVENT_DISP MANSION_3_WIDTH, $a, $7 ; MANSION_2 - EVENT_DISP MANSION_3_WIDTH, $1, $6 ; MANSION_2 - EVENT_DISP MANSION_3_WIDTH, $e, $19 ; MANSION_2 + warp_to 7, 10, MANSION_3_WIDTH ; MANSION_2 + warp_to 6, 1, MANSION_3_WIDTH ; MANSION_2 + warp_to 25, 14, MANSION_3_WIDTH ; MANSION_2 diff --git a/data/mapObjects/mansion4.asm b/data/mapObjects/mansion4.asm index 94a6f612..3db9d016 100755 --- a/data/mapObjects/mansion4.asm +++ b/data/mapObjects/mansion4.asm @@ -1,20 +1,20 @@ Mansion4Object: db $1 ; border block - db $1 ; warps - db $16, $17, $5, MANSION_1 + db 1 ; warps + warp 23, 22, 5, MANSION_1 - db $0 ; signs + db 0 ; signs - db $8 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $10, $17, STAY, NONE, $1, OPP_BURGLAR, $9 - object SPRITE_OAK_AIDE, $1b, $b, STAY, DOWN, $2, OPP_SCIENTIST, $d - object SPRITE_BALL, $a, $2, STAY, NONE, $3, RARE_CANDY - object SPRITE_BALL, $1, $16, STAY, NONE, $4, FULL_RESTORE - object SPRITE_BALL, $13, $19, STAY, NONE, $5, TM_14 - object SPRITE_BALL, $5, $4, STAY, NONE, $6, TM_22 - object SPRITE_BOOK_MAP_DEX, $10, $14, STAY, NONE, $7 ; person - object SPRITE_BALL, $5, $d, STAY, NONE, $8, SECRET_KEY + db 8 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 16, 23, STAY, NONE, 1, OPP_BURGLAR, 9 + object SPRITE_OAK_AIDE, 27, 11, STAY, DOWN, 2, OPP_SCIENTIST, 13 + object SPRITE_BALL, 10, 2, STAY, NONE, 3, RARE_CANDY + object SPRITE_BALL, 1, 22, STAY, NONE, 4, FULL_RESTORE + object SPRITE_BALL, 19, 25, STAY, NONE, 5, TM_14 + object SPRITE_BALL, 5, 4, STAY, NONE, 6, TM_22 + object SPRITE_BOOK_MAP_DEX, 16, 20, STAY, NONE, 7 ; person + object SPRITE_BALL, 5, 13, STAY, NONE, 8, SECRET_KEY ; warp-to - EVENT_DISP MANSION_4_WIDTH, $16, $17 ; MANSION_1 + warp_to 23, 22, MANSION_4_WIDTH ; MANSION_1 diff --git a/data/mapObjects/mtmoon1.asm b/data/mapObjects/mtmoon1.asm index 42c45016..707281aa 100755 --- a/data/mapObjects/mtmoon1.asm +++ b/data/mapObjects/mtmoon1.asm @@ -1,34 +1,34 @@ MtMoon1Object: db $3 ; border block - db $5 ; warps - db $23, $e, $1, $ff - db $23, $f, $1, $ff - db $5, $5, $0, MT_MOON_2 - db $b, $11, $2, MT_MOON_2 - db $f, $19, $3, MT_MOON_2 + db 5 ; warps + warp 14, 35, 1, -1 + warp 15, 35, 1, -1 + warp 5, 5, 0, MT_MOON_2 + warp 17, 11, 2, MT_MOON_2 + warp 25, 15, 3, MT_MOON_2 - db $1 ; signs - db $17, $f, $e ; MtMoon1Text14 + db 1 ; signs + sign 15, 23, 14 ; MtMoon1Text14 - db $d ; objects - object SPRITE_HIKER, $5, $6, STAY, DOWN, $1, OPP_HIKER, $1 - object SPRITE_BUG_CATCHER, $c, $10, STAY, RIGHT, $2, OPP_YOUNGSTER, $3 - object SPRITE_LASS, $1e, $4, STAY, DOWN, $3, OPP_LASS, $5 - object SPRITE_BLACK_HAIR_BOY_2, $18, $1f, STAY, UP, $4, OPP_SUPER_NERD, $1 - object SPRITE_LASS, $10, $17, STAY, DOWN, $5, OPP_LASS, $6 - object SPRITE_BUG_CATCHER, $7, $16, STAY, DOWN, $6, OPP_BUG_CATCHER, $7 - object SPRITE_BUG_CATCHER, $1e, $1b, STAY, RIGHT, $7, OPP_BUG_CATCHER, $8 - object SPRITE_BALL, $2, $14, STAY, NONE, $8, POTION - object SPRITE_BALL, $2, $2, STAY, NONE, $9, MOON_STONE - object SPRITE_BALL, $23, $1f, STAY, NONE, $a, RARE_CANDY - object SPRITE_BALL, $24, $17, STAY, NONE, $b, ESCAPE_ROPE - object SPRITE_BALL, $14, $21, STAY, NONE, $c, POTION - object SPRITE_BALL, $5, $20, STAY, NONE, $d, TM_12 + db 13 ; objects + object SPRITE_HIKER, 5, 6, STAY, DOWN, 1, OPP_HIKER, 1 + object SPRITE_BUG_CATCHER, 12, 16, STAY, RIGHT, 2, OPP_YOUNGSTER, 3 + object SPRITE_LASS, 30, 4, STAY, DOWN, 3, OPP_LASS, 5 + object SPRITE_BLACK_HAIR_BOY_2, 24, 31, STAY, UP, 4, OPP_SUPER_NERD, 1 + object SPRITE_LASS, 16, 23, STAY, DOWN, 5, OPP_LASS, 6 + object SPRITE_BUG_CATCHER, 7, 22, STAY, DOWN, 6, OPP_BUG_CATCHER, 7 + object SPRITE_BUG_CATCHER, 30, 27, STAY, RIGHT, 7, OPP_BUG_CATCHER, 8 + object SPRITE_BALL, 2, 20, STAY, NONE, 8, POTION + object SPRITE_BALL, 2, 2, STAY, NONE, 9, MOON_STONE + object SPRITE_BALL, 35, 31, STAY, NONE, 10, RARE_CANDY + object SPRITE_BALL, 36, 23, STAY, NONE, 11, ESCAPE_ROPE + object SPRITE_BALL, 20, 33, STAY, NONE, 12, POTION + object SPRITE_BALL, 5, 32, STAY, NONE, 13, TM_12 ; warp-to - EVENT_DISP MT_MOON_1_WIDTH, $23, $e - EVENT_DISP MT_MOON_1_WIDTH, $23, $f - EVENT_DISP MT_MOON_1_WIDTH, $5, $5 ; MT_MOON_2 - EVENT_DISP MT_MOON_1_WIDTH, $b, $11 ; MT_MOON_2 - EVENT_DISP MT_MOON_1_WIDTH, $f, $19 ; MT_MOON_2 + warp_to 14, 35, MT_MOON_1_WIDTH + warp_to 15, 35, MT_MOON_1_WIDTH + warp_to 5, 5, MT_MOON_1_WIDTH ; MT_MOON_2 + warp_to 17, 11, MT_MOON_1_WIDTH ; MT_MOON_2 + warp_to 25, 15, MT_MOON_1_WIDTH ; MT_MOON_2 diff --git a/data/mapObjects/mtmoon2.asm b/data/mapObjects/mtmoon2.asm index f39cd4a5..abff4094 100755 --- a/data/mapObjects/mtmoon2.asm +++ b/data/mapObjects/mtmoon2.asm @@ -1,26 +1,26 @@ MtMoon2Object: db $3 ; border block - db $8 ; warps - db $5, $5, $2, MT_MOON_1 - db $b, $11, $0, MT_MOON_3 - db $9, $19, $3, MT_MOON_1 - db $f, $19, $4, MT_MOON_1 - db $11, $15, $1, MT_MOON_3 - db $1b, $d, $2, MT_MOON_3 - db $3, $17, $3, MT_MOON_3 - db $3, $1b, $2, $ff + db 8 ; warps + warp 5, 5, 2, MT_MOON_1 + warp 17, 11, 0, MT_MOON_3 + warp 25, 9, 3, MT_MOON_1 + warp 25, 15, 4, MT_MOON_1 + warp 21, 17, 1, MT_MOON_3 + warp 13, 27, 2, MT_MOON_3 + warp 23, 3, 3, MT_MOON_3 + warp 27, 3, 2, -1 - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP MT_MOON_2_WIDTH, $5, $5 ; MT_MOON_1 - EVENT_DISP MT_MOON_2_WIDTH, $b, $11 ; MT_MOON_3 - EVENT_DISP MT_MOON_2_WIDTH, $9, $19 ; MT_MOON_1 - EVENT_DISP MT_MOON_2_WIDTH, $f, $19 ; MT_MOON_1 - EVENT_DISP MT_MOON_2_WIDTH, $11, $15 ; MT_MOON_3 - EVENT_DISP MT_MOON_2_WIDTH, $1b, $d ; MT_MOON_3 - EVENT_DISP MT_MOON_2_WIDTH, $3, $17 ; MT_MOON_3 - EVENT_DISP MT_MOON_2_WIDTH, $3, $1b + warp_to 5, 5, MT_MOON_2_WIDTH ; MT_MOON_1 + warp_to 17, 11, MT_MOON_2_WIDTH ; MT_MOON_3 + warp_to 25, 9, MT_MOON_2_WIDTH ; MT_MOON_1 + warp_to 25, 15, MT_MOON_2_WIDTH ; MT_MOON_1 + warp_to 21, 17, MT_MOON_2_WIDTH ; MT_MOON_3 + warp_to 13, 27, MT_MOON_2_WIDTH ; MT_MOON_3 + warp_to 23, 3, MT_MOON_2_WIDTH ; MT_MOON_3 + warp_to 27, 3, MT_MOON_2_WIDTH diff --git a/data/mapObjects/mtmoon3.asm b/data/mapObjects/mtmoon3.asm index 7fe29180..13aa5a79 100755 --- a/data/mapObjects/mtmoon3.asm +++ b/data/mapObjects/mtmoon3.asm @@ -1,27 +1,27 @@ MtMoon3Object: db $3 ; border block - db $4 ; warps - db $9, $19, $1, MT_MOON_2 - db $11, $15, $4, MT_MOON_2 - db $1b, $f, $5, MT_MOON_2 - db $7, $5, $6, MT_MOON_2 + db 4 ; warps + warp 25, 9, 1, MT_MOON_2 + warp 21, 17, 4, MT_MOON_2 + warp 15, 27, 5, MT_MOON_2 + warp 5, 7, 6, MT_MOON_2 - db $0 ; signs + db 0 ; signs - db $9 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $c, $8, STAY, RIGHT, $1, OPP_SUPER_NERD, $2 - object SPRITE_ROCKET, $b, $10, STAY, DOWN, $2, OPP_ROCKET, $1 - object SPRITE_ROCKET, $f, $16, STAY, DOWN, $3, OPP_ROCKET, $2 - object SPRITE_ROCKET, $1d, $b, STAY, UP, $4, OPP_ROCKET, $3 - object SPRITE_ROCKET, $1d, $11, STAY, LEFT, $5, OPP_ROCKET, $4 - object SPRITE_OMANYTE, $c, $6, STAY, NONE, $6 ; person - object SPRITE_OMANYTE, $d, $6, STAY, NONE, $7 ; person - object SPRITE_BALL, $19, $15, STAY, NONE, $8, HP_UP - object SPRITE_BALL, $1d, $5, STAY, NONE, $9, TM_01 + db 9 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 12, 8, STAY, RIGHT, 1, OPP_SUPER_NERD, 2 + object SPRITE_ROCKET, 11, 16, STAY, DOWN, 2, OPP_ROCKET, 1 + object SPRITE_ROCKET, 15, 22, STAY, DOWN, 3, OPP_ROCKET, 2 + object SPRITE_ROCKET, 29, 11, STAY, UP, 4, OPP_ROCKET, 3 + object SPRITE_ROCKET, 29, 17, STAY, LEFT, 5, OPP_ROCKET, 4 + object SPRITE_OMANYTE, 12, 6, STAY, NONE, 6 ; person + object SPRITE_OMANYTE, 13, 6, STAY, NONE, 7 ; person + object SPRITE_BALL, 25, 21, STAY, NONE, 8, HP_UP + object SPRITE_BALL, 29, 5, STAY, NONE, 9, TM_01 ; warp-to - EVENT_DISP MT_MOON_3_WIDTH, $9, $19 ; MT_MOON_2 - EVENT_DISP MT_MOON_3_WIDTH, $11, $15 ; MT_MOON_2 - EVENT_DISP MT_MOON_3_WIDTH, $1b, $f ; MT_MOON_2 - EVENT_DISP MT_MOON_3_WIDTH, $7, $5 ; MT_MOON_2 + warp_to 25, 9, MT_MOON_3_WIDTH ; MT_MOON_2 + warp_to 21, 17, MT_MOON_3_WIDTH ; MT_MOON_2 + warp_to 15, 27, MT_MOON_3_WIDTH ; MT_MOON_2 + warp_to 5, 7, MT_MOON_3_WIDTH ; MT_MOON_2 diff --git a/data/mapObjects/mtmoonpokecenter.asm b/data/mapObjects/mtmoonpokecenter.asm index 1e168895..841d0194 100755 --- a/data/mapObjects/mtmoonpokecenter.asm +++ b/data/mapObjects/mtmoonpokecenter.asm @@ -1,20 +1,20 @@ MtMoonPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $0, $ff - db $7, $4, $0, $ff + db 2 ; warps + warp 3, 7, 0, -1 + warp 4, 7, 0, -1 - db $0 ; signs + db 0 ; signs - db $6 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_BUG_CATCHER, $4, $3, STAY, UP, $2 ; person - object SPRITE_GENTLEMAN, $7, $3, STAY, UP, $3 ; person - object SPRITE_FAT_BALD_GUY, $a, $6, WALK, $2, $4 ; person - object SPRITE_CLIPBOARD, $7, $2, STAY, NONE, $5 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $6 ; person + db 6 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_BUG_CATCHER, 4, 3, STAY, UP, 2 ; person + object SPRITE_GENTLEMAN, 7, 3, STAY, UP, 3 ; person + object SPRITE_FAT_BALD_GUY, 10, 6, WALK, 2, 4 ; person + object SPRITE_CLIPBOARD, 7, 2, STAY, NONE, 5 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 6 ; person ; warp-to - EVENT_DISP MT_MOON_POKECENTER_WIDTH, $7, $3 - EVENT_DISP MT_MOON_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, MT_MOON_POKECENTER_WIDTH + warp_to 4, 7, MT_MOON_POKECENTER_WIDTH diff --git a/data/mapObjects/museum1f.asm b/data/mapObjects/museum1f.asm index 56932af8..3034dc74 100755 --- a/data/mapObjects/museum1f.asm +++ b/data/mapObjects/museum1f.asm @@ -1,25 +1,25 @@ Museum1FObject: db $a ; border block - db $5 ; warps - db $7, $a, $0, $ff - db $7, $b, $0, $ff - db $7, $10, $1, $ff - db $7, $11, $1, $ff - db $7, $7, $0, MUSEUM_2F + db 5 ; warps + warp 10, 7, 0, -1 + warp 11, 7, 0, -1 + warp 16, 7, 1, -1 + warp 17, 7, 1, -1 + warp 7, 7, 0, MUSEUM_2F - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_OAK_AIDE, $c, $4, STAY, LEFT, $1 ; person - object SPRITE_GAMBLER, $1, $4, STAY, NONE, $2 ; person - object SPRITE_OAK_AIDE, $f, $2, STAY, DOWN, $3 ; person - object SPRITE_OAK_AIDE, $11, $4, STAY, NONE, $4 ; person - object SPRITE_OLD_AMBER, $10, $2, STAY, NONE, $5 ; person + db 5 ; objects + object SPRITE_OAK_AIDE, 12, 4, STAY, LEFT, 1 ; person + object SPRITE_GAMBLER, 1, 4, STAY, NONE, 2 ; person + object SPRITE_OAK_AIDE, 15, 2, STAY, DOWN, 3 ; person + object SPRITE_OAK_AIDE, 17, 4, STAY, NONE, 4 ; person + object SPRITE_OLD_AMBER, 16, 2, STAY, NONE, 5 ; person ; warp-to - EVENT_DISP MUSEUM_1F_WIDTH, $7, $a - EVENT_DISP MUSEUM_1F_WIDTH, $7, $b - EVENT_DISP MUSEUM_1F_WIDTH, $7, $10 - EVENT_DISP MUSEUM_1F_WIDTH, $7, $11 - EVENT_DISP MUSEUM_1F_WIDTH, $7, $7 ; MUSEUM_2F + warp_to 10, 7, MUSEUM_1F_WIDTH + warp_to 11, 7, MUSEUM_1F_WIDTH + warp_to 16, 7, MUSEUM_1F_WIDTH + warp_to 17, 7, MUSEUM_1F_WIDTH + warp_to 7, 7, MUSEUM_1F_WIDTH ; MUSEUM_2F diff --git a/data/mapObjects/museum2f.asm b/data/mapObjects/museum2f.asm index 689391d9..11fad941 100755 --- a/data/mapObjects/museum2f.asm +++ b/data/mapObjects/museum2f.asm @@ -1,19 +1,19 @@ Museum2FObject: db $a ; border block - db $1 ; warps - db $7, $7, $4, MUSEUM_1F + db 1 ; warps + warp 7, 7, 4, MUSEUM_1F - db $2 ; signs - db $2, $b, $6 ; Museum2FText6 - db $5, $2, $7 ; Museum2FText7 + db 2 ; signs + sign 11, 2, 6 ; Museum2FText6 + sign 2, 5, 7 ; Museum2FText7 - db $5 ; objects - object SPRITE_BUG_CATCHER, $1, $7, WALK, $2, $1 ; person - object SPRITE_OLD_PERSON, $0, $5, STAY, DOWN, $2 ; person - object SPRITE_OAK_AIDE, $7, $5, STAY, DOWN, $3 ; person - object SPRITE_BRUNETTE_GIRL, $b, $5, STAY, NONE, $4 ; person - object SPRITE_HIKER, $c, $5, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_BUG_CATCHER, 1, 7, WALK, 2, 1 ; person + object SPRITE_OLD_PERSON, 0, 5, STAY, DOWN, 2 ; person + object SPRITE_OAK_AIDE, 7, 5, STAY, DOWN, 3 ; person + object SPRITE_BRUNETTE_GIRL, 11, 5, STAY, NONE, 4 ; person + object SPRITE_HIKER, 12, 5, STAY, DOWN, 5 ; person ; warp-to - EVENT_DISP MUSEUM_2F_WIDTH, $7, $7 ; MUSEUM_1F + warp_to 7, 7, MUSEUM_2F_WIDTH ; MUSEUM_1F diff --git a/data/mapObjects/namerater.asm b/data/mapObjects/namerater.asm index 0118b2f7..10487f0b 100755 --- a/data/mapObjects/namerater.asm +++ b/data/mapObjects/namerater.asm @@ -1,15 +1,15 @@ NameRaterObject: db $a ; border block - db $2 ; warps - db $7, $2, $5, $ff - db $7, $3, $5, $ff + db 2 ; warps + warp 2, 7, 5, -1 + warp 3, 7, 5, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_MR_MASTERBALL, $5, $3, STAY, LEFT, $1 ; person + db 1 ; objects + object SPRITE_MR_MASTERBALL, 5, 3, STAY, LEFT, 1 ; person ; warp-to - EVENT_DISP NAME_RATERS_HOUSE_WIDTH, $7, $2 - EVENT_DISP NAME_RATERS_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, NAME_RATERS_HOUSE_WIDTH + warp_to 3, 7, NAME_RATERS_HOUSE_WIDTH diff --git a/data/mapObjects/oakslab.asm b/data/mapObjects/oakslab.asm index 3834c49a..d7fc8029 100755 --- a/data/mapObjects/oakslab.asm +++ b/data/mapObjects/oakslab.asm @@ -1,25 +1,25 @@ OaksLabObject: db $3 ; border block - db $2 ; warps - db $b, $4, $2, $ff - db $b, $5, $2, $ff + db 2 ; warps + warp 4, 11, 2, -1 + warp 5, 11, 2, -1 - db $0 ; signs + db 0 ; signs - db $b ; objects - object SPRITE_BLUE, $4, $3, STAY, NONE, $1, OPP_SONY1, $1 - object SPRITE_BALL, $6, $3, STAY, NONE, $2 ; person - object SPRITE_BALL, $7, $3, STAY, NONE, $3 ; person - object SPRITE_BALL, $8, $3, STAY, NONE, $4 ; person - object SPRITE_OAK, $5, $2, STAY, DOWN, $5 ; person - object SPRITE_BOOK_MAP_DEX, $2, $1, STAY, NONE, $6 ; person - object SPRITE_BOOK_MAP_DEX, $3, $1, STAY, NONE, $7 ; person - object SPRITE_OAK, $5, $a, STAY, UP, $8 ; person - object SPRITE_GIRL, $1, $9, WALK, $1, $9 ; person - object SPRITE_OAK_AIDE, $2, $a, STAY, NONE, $a ; person - object SPRITE_OAK_AIDE, $8, $a, STAY, NONE, $b ; person + db 11 ; objects + object SPRITE_BLUE, 4, 3, STAY, NONE, 1, OPP_SONY1, 1 + object SPRITE_BALL, 6, 3, STAY, NONE, 2 ; person + object SPRITE_BALL, 7, 3, STAY, NONE, 3 ; person + object SPRITE_BALL, 8, 3, STAY, NONE, 4 ; person + object SPRITE_OAK, 5, 2, STAY, DOWN, 5 ; person + object SPRITE_BOOK_MAP_DEX, 2, 1, STAY, NONE, 6 ; person + object SPRITE_BOOK_MAP_DEX, 3, 1, STAY, NONE, 7 ; person + object SPRITE_OAK, 5, 10, STAY, UP, 8 ; person + object SPRITE_GIRL, 1, 9, WALK, 1, 9 ; person + object SPRITE_OAK_AIDE, 2, 10, STAY, NONE, 10 ; person + object SPRITE_OAK_AIDE, 8, 10, STAY, NONE, 11 ; person ; warp-to - EVENT_DISP OAKS_LAB_WIDTH, $b, $4 - EVENT_DISP OAKS_LAB_WIDTH, $b, $5 + warp_to 4, 11, OAKS_LAB_WIDTH + warp_to 5, 11, OAKS_LAB_WIDTH diff --git a/data/mapObjects/pallettown.asm b/data/mapObjects/pallettown.asm index d02cbae2..1bd3d62b 100755 --- a/data/mapObjects/pallettown.asm +++ b/data/mapObjects/pallettown.asm @@ -1,23 +1,23 @@ PalletTownObject: db $b ; border block - db $3 ; warps - db $5, $5, $0, REDS_HOUSE_1F - db $5, $d, $0, BLUES_HOUSE - db $b, $c, $1, OAKS_LAB + db 3 ; warps + warp 5, 5, 0, REDS_HOUSE_1F + warp 13, 5, 0, BLUES_HOUSE + warp 12, 11, 1, OAKS_LAB - db $4 ; signs - db $d, $d, $4 ; PalletTownText4 - db $9, $7, $5 ; PalletTownText5 - db $5, $3, $6 ; PalletTownText6 - db $5, $b, $7 ; PalletTownText7 + db 4 ; signs + sign 13, 13, 4 ; PalletTownText4 + sign 7, 9, 5 ; PalletTownText5 + sign 3, 5, 6 ; PalletTownText6 + sign 11, 5, 7 ; PalletTownText7 - db $3 ; objects - object SPRITE_OAK, $8, $5, STAY, NONE, $1 ; person - object SPRITE_GIRL, $3, $8, WALK, $0, $2 ; person - object SPRITE_FISHER2, $b, $e, WALK, $0, $3 ; person + db 3 ; objects + object SPRITE_OAK, 8, 5, STAY, NONE, 1 ; person + object SPRITE_GIRL, 3, 8, WALK, 0, 2 ; person + object SPRITE_FISHER2, 11, 14, WALK, 0, 3 ; person ; warp-to - EVENT_DISP PALLET_TOWN_WIDTH, $5, $5 ; REDS_HOUSE_1F - EVENT_DISP PALLET_TOWN_WIDTH, $5, $d ; BLUES_HOUSE - EVENT_DISP PALLET_TOWN_WIDTH, $b, $c ; OAKS_LAB + warp_to 5, 5, PALLET_TOWN_WIDTH ; REDS_HOUSE_1F + warp_to 13, 5, PALLET_TOWN_WIDTH ; BLUES_HOUSE + warp_to 12, 11, PALLET_TOWN_WIDTH ; OAKS_LAB diff --git a/data/mapObjects/pewtercity.asm b/data/mapObjects/pewtercity.asm index 7b389bd2..4e7d24d0 100755 --- a/data/mapObjects/pewtercity.asm +++ b/data/mapObjects/pewtercity.asm @@ -1,36 +1,36 @@ PewterCityObject: db $a ; border block - db $7 ; warps - db $7, $e, $0, MUSEUM_1F - db $5, $13, $2, MUSEUM_1F - db $11, $10, $0, PEWTER_GYM - db $d, $1d, $0, PEWTER_HOUSE_1 - db $11, $17, $0, PEWTER_MART - db $1d, $7, $0, PEWTER_HOUSE_2 - db $19, $d, $0, PEWTER_POKECENTER + db 7 ; warps + warp 14, 7, 0, MUSEUM_1F + warp 19, 5, 2, MUSEUM_1F + warp 16, 17, 0, PEWTER_GYM + warp 29, 13, 0, PEWTER_HOUSE_1 + warp 23, 17, 0, PEWTER_MART + warp 7, 29, 0, PEWTER_HOUSE_2 + warp 13, 25, 0, PEWTER_POKECENTER - db $7 ; signs - db $1d, $13, $6 ; PewterCityText6 - db $13, $21, $7 ; PewterCityText7 - db $11, $18, $8 ; MartSignText - db $19, $e, $9 ; PokeCenterSignText - db $9, $f, $a ; PewterCityText10 - db $11, $b, $b ; PewterCityText11 - db $17, $19, $c ; PewterCityText12 + db 7 ; signs + sign 19, 29, 6 ; PewterCityText6 + sign 33, 19, 7 ; PewterCityText7 + sign 24, 17, 8 ; MartSignText + sign 14, 25, 9 ; PokeCenterSignText + sign 15, 9, 10 ; PewterCityText10 + sign 11, 17, 11 ; PewterCityText11 + sign 25, 23, 12 ; PewterCityText12 - db $5 ; objects - object SPRITE_LASS, $8, $f, STAY, NONE, $1 ; person - object SPRITE_BLACK_HAIR_BOY_1, $11, $19, STAY, NONE, $2 ; person - object SPRITE_BLACK_HAIR_BOY_2, $1b, $11, STAY, NONE, $3 ; person - object SPRITE_BLACK_HAIR_BOY_2, $1a, $19, WALK, $2, $4 ; person - object SPRITE_BUG_CATCHER, $23, $10, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_LASS, 8, 15, STAY, NONE, 1 ; person + object SPRITE_BLACK_HAIR_BOY_1, 17, 25, STAY, NONE, 2 ; person + object SPRITE_BLACK_HAIR_BOY_2, 27, 17, STAY, NONE, 3 ; person + object SPRITE_BLACK_HAIR_BOY_2, 26, 25, WALK, 2, 4 ; person + object SPRITE_BUG_CATCHER, 35, 16, STAY, DOWN, 5 ; person ; warp-to - EVENT_DISP PEWTER_CITY_WIDTH, $7, $e ; MUSEUM_1F - EVENT_DISP PEWTER_CITY_WIDTH, $5, $13 ; MUSEUM_1F - EVENT_DISP PEWTER_CITY_WIDTH, $11, $10 ; PEWTER_GYM - EVENT_DISP PEWTER_CITY_WIDTH, $d, $1d ; PEWTER_HOUSE_1 - EVENT_DISP PEWTER_CITY_WIDTH, $11, $17 ; PEWTER_MART - EVENT_DISP PEWTER_CITY_WIDTH, $1d, $7 ; PEWTER_HOUSE_2 - EVENT_DISP PEWTER_CITY_WIDTH, $19, $d ; PEWTER_POKECENTER + warp_to 14, 7, PEWTER_CITY_WIDTH ; MUSEUM_1F + warp_to 19, 5, PEWTER_CITY_WIDTH ; MUSEUM_1F + warp_to 16, 17, PEWTER_CITY_WIDTH ; PEWTER_GYM + warp_to 29, 13, PEWTER_CITY_WIDTH ; PEWTER_HOUSE_1 + warp_to 23, 17, PEWTER_CITY_WIDTH ; PEWTER_MART + warp_to 7, 29, PEWTER_CITY_WIDTH ; PEWTER_HOUSE_2 + warp_to 13, 25, PEWTER_CITY_WIDTH ; PEWTER_POKECENTER diff --git a/data/mapObjects/pewtergym.asm b/data/mapObjects/pewtergym.asm index 280f1a7e..fc571f26 100755 --- a/data/mapObjects/pewtergym.asm +++ b/data/mapObjects/pewtergym.asm @@ -1,17 +1,17 @@ PewterGymObject: db $3 ; border block - db $2 ; warps - db $d, $4, $2, $ff - db $d, $5, $2, $ff + db 2 ; warps + warp 4, 13, 2, -1 + warp 5, 13, 2, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $4, $1, STAY, DOWN, $1, OPP_BROCK, $1 - object SPRITE_BLACK_HAIR_BOY_1, $3, $6, STAY, RIGHT, $2, OPP_JR_TRAINER_M, $1 - object SPRITE_GYM_HELPER, $7, $a, STAY, DOWN, $3 ; person + db 3 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 4, 1, STAY, DOWN, 1, OPP_BROCK, 1 + object SPRITE_BLACK_HAIR_BOY_1, 3, 6, STAY, RIGHT, 2, OPP_JR_TRAINER_M, 1 + object SPRITE_GYM_HELPER, 7, 10, STAY, DOWN, 3 ; person ; warp-to - EVENT_DISP PEWTER_GYM_WIDTH, $d, $4 - EVENT_DISP PEWTER_GYM_WIDTH, $d, $5 + warp_to 4, 13, PEWTER_GYM_WIDTH + warp_to 5, 13, PEWTER_GYM_WIDTH diff --git a/data/mapObjects/pewterhouse1.asm b/data/mapObjects/pewterhouse1.asm index d973e53b..63abe6b3 100755 --- a/data/mapObjects/pewterhouse1.asm +++ b/data/mapObjects/pewterhouse1.asm @@ -1,17 +1,17 @@ PewterHouse1Object: db $a ; border block - db $2 ; warps - db $7, $2, $3, $ff - db $7, $3, $3, $ff + db 2 ; warps + warp 2, 7, 3, -1 + warp 3, 7, 3, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_SLOWBRO, $4, $5, STAY, LEFT, $1 ; person - object SPRITE_YOUNG_BOY, $3, $5, STAY, RIGHT, $2 ; person - object SPRITE_FAT_BALD_GUY, $1, $2, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_SLOWBRO, 4, 5, STAY, LEFT, 1 ; person + object SPRITE_YOUNG_BOY, 3, 5, STAY, RIGHT, 2 ; person + object SPRITE_FAT_BALD_GUY, 1, 2, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP PEWTER_HOUSE_1_WIDTH, $7, $2 - EVENT_DISP PEWTER_HOUSE_1_WIDTH, $7, $3 + warp_to 2, 7, PEWTER_HOUSE_1_WIDTH + warp_to 3, 7, PEWTER_HOUSE_1_WIDTH diff --git a/data/mapObjects/pewterhouse2.asm b/data/mapObjects/pewterhouse2.asm index 6c111acb..48cb243d 100755 --- a/data/mapObjects/pewterhouse2.asm +++ b/data/mapObjects/pewterhouse2.asm @@ -1,16 +1,16 @@ PewterHouse2Object: db $a ; border block - db $2 ; warps - db $7, $2, $5, $ff - db $7, $3, $5, $ff + db 2 ; warps + warp 2, 7, 5, -1 + warp 3, 7, 5, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_GAMBLER, $2, $3, STAY, RIGHT, $1 ; person - object SPRITE_BUG_CATCHER, $4, $5, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_GAMBLER, 2, 3, STAY, RIGHT, 1 ; person + object SPRITE_BUG_CATCHER, 4, 5, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP PEWTER_HOUSE_2_WIDTH, $7, $2 - EVENT_DISP PEWTER_HOUSE_2_WIDTH, $7, $3 + warp_to 2, 7, PEWTER_HOUSE_2_WIDTH + warp_to 3, 7, PEWTER_HOUSE_2_WIDTH diff --git a/data/mapObjects/pewtermart.asm b/data/mapObjects/pewtermart.asm index 50ccd288..e79952c9 100755 --- a/data/mapObjects/pewtermart.asm +++ b/data/mapObjects/pewtermart.asm @@ -1,17 +1,17 @@ PewterMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $4, $ff - db $7, $4, $4, $ff + db 2 ; warps + warp 3, 7, 4, -1 + warp 4, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_BUG_CATCHER, $3, $3, WALK, $1, $2 ; person - object SPRITE_BLACK_HAIR_BOY_2, $5, $5, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_BUG_CATCHER, 3, 3, WALK, 1, 2 ; person + object SPRITE_BLACK_HAIR_BOY_2, 5, 5, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP PEWTER_MART_WIDTH, $7, $3 - EVENT_DISP PEWTER_MART_WIDTH, $7, $4 + warp_to 3, 7, PEWTER_MART_WIDTH + warp_to 4, 7, PEWTER_MART_WIDTH diff --git a/data/mapObjects/pewterpokecenter.asm b/data/mapObjects/pewterpokecenter.asm index 44e10ed6..29f02eb9 100755 --- a/data/mapObjects/pewterpokecenter.asm +++ b/data/mapObjects/pewterpokecenter.asm @@ -1,18 +1,18 @@ PewterPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $6, $ff - db $7, $4, $6, $ff + db 2 ; warps + warp 3, 7, 6, -1 + warp 4, 7, 6, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $b, $7, STAY, LEFT, $2 ; person - object SPRITE_CLEFAIRY, $1, $3, STAY, DOWN, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 11, 7, STAY, LEFT, 2 ; person + object SPRITE_CLEFAIRY, 1, 3, STAY, DOWN, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP PEWTER_POKECENTER_WIDTH, $7, $3 - EVENT_DISP PEWTER_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, PEWTER_POKECENTER_WIDTH + warp_to 4, 7, PEWTER_POKECENTER_WIDTH diff --git a/data/mapObjects/pokemontower1.asm b/data/mapObjects/pokemontower1.asm index 54af9efc..f15299da 100755 --- a/data/mapObjects/pokemontower1.asm +++ b/data/mapObjects/pokemontower1.asm @@ -1,21 +1,21 @@ PokemonTower1Object: db $1 ; border block - db $3 ; warps - db $11, $a, $1, $ff - db $11, $b, $1, $ff - db $9, $12, $1, POKEMONTOWER_2 + db 3 ; warps + warp 10, 17, 1, -1 + warp 11, 17, 1, -1 + warp 18, 9, 1, POKEMONTOWER_2 - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_CABLE_CLUB_WOMAN, $f, $d, STAY, UP, $1 ; person - object SPRITE_MOM_GEISHA, $6, $8, STAY, NONE, $2 ; person - object SPRITE_BALDING_GUY, $8, $c, STAY, NONE, $3 ; person - object SPRITE_GIRL, $d, $7, STAY, NONE, $4 ; person - object SPRITE_MEDIUM, $11, $7, STAY, LEFT, $5 ; person + db 5 ; objects + object SPRITE_CABLE_CLUB_WOMAN, 15, 13, STAY, UP, 1 ; person + object SPRITE_MOM_GEISHA, 6, 8, STAY, NONE, 2 ; person + object SPRITE_BALDING_GUY, 8, 12, STAY, NONE, 3 ; person + object SPRITE_GIRL, 13, 7, STAY, NONE, 4 ; person + object SPRITE_MEDIUM, 17, 7, STAY, LEFT, 5 ; person ; warp-to - EVENT_DISP POKEMONTOWER_1_WIDTH, $11, $a - EVENT_DISP POKEMONTOWER_1_WIDTH, $11, $b - EVENT_DISP POKEMONTOWER_1_WIDTH, $9, $12 ; POKEMONTOWER_2 + warp_to 10, 17, POKEMONTOWER_1_WIDTH + warp_to 11, 17, POKEMONTOWER_1_WIDTH + warp_to 18, 9, POKEMONTOWER_1_WIDTH ; POKEMONTOWER_2 diff --git a/data/mapObjects/pokemontower2.asm b/data/mapObjects/pokemontower2.asm index 33bc048d..80615cd5 100755 --- a/data/mapObjects/pokemontower2.asm +++ b/data/mapObjects/pokemontower2.asm @@ -1,16 +1,16 @@ PokemonTower2Object: db $1 ; border block - db $2 ; warps - db $9, $3, $0, POKEMONTOWER_3 - db $9, $12, $2, POKEMONTOWER_1 + db 2 ; warps + warp 3, 9, 0, POKEMONTOWER_3 + warp 18, 9, 2, POKEMONTOWER_1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BLUE, $e, $5, STAY, NONE, $1 ; person - object SPRITE_MEDIUM, $3, $7, STAY, RIGHT, $2 ; person + db 2 ; objects + object SPRITE_BLUE, 14, 5, STAY, NONE, 1 ; person + object SPRITE_MEDIUM, 3, 7, STAY, RIGHT, 2 ; person ; warp-to - EVENT_DISP POKEMONTOWER_2_WIDTH, $9, $3 ; POKEMONTOWER_3 - EVENT_DISP POKEMONTOWER_2_WIDTH, $9, $12 ; POKEMONTOWER_1 + warp_to 3, 9, POKEMONTOWER_2_WIDTH ; POKEMONTOWER_3 + warp_to 18, 9, POKEMONTOWER_2_WIDTH ; POKEMONTOWER_1 diff --git a/data/mapObjects/pokemontower3.asm b/data/mapObjects/pokemontower3.asm index 9899276a..0e7f5e1f 100755 --- a/data/mapObjects/pokemontower3.asm +++ b/data/mapObjects/pokemontower3.asm @@ -1,18 +1,18 @@ PokemonTower3Object: db $1 ; border block - db $2 ; warps - db $9, $3, $0, POKEMONTOWER_2 - db $9, $12, $1, POKEMONTOWER_4 + db 2 ; warps + warp 3, 9, 0, POKEMONTOWER_2 + warp 18, 9, 1, POKEMONTOWER_4 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_MEDIUM, $c, $3, STAY, LEFT, $1, OPP_CHANNELER, $5 - object SPRITE_MEDIUM, $9, $8, STAY, DOWN, $2, OPP_CHANNELER, $6 - object SPRITE_MEDIUM, $a, $d, STAY, DOWN, $3, OPP_CHANNELER, $8 - object SPRITE_BALL, $c, $1, STAY, NONE, $4, ESCAPE_ROPE + db 4 ; objects + object SPRITE_MEDIUM, 12, 3, STAY, LEFT, 1, OPP_CHANNELER, 5 + object SPRITE_MEDIUM, 9, 8, STAY, DOWN, 2, OPP_CHANNELER, 6 + object SPRITE_MEDIUM, 10, 13, STAY, DOWN, 3, OPP_CHANNELER, 8 + object SPRITE_BALL, 12, 1, STAY, NONE, 4, ESCAPE_ROPE ; warp-to - EVENT_DISP POKEMONTOWER_3_WIDTH, $9, $3 ; POKEMONTOWER_2 - EVENT_DISP POKEMONTOWER_3_WIDTH, $9, $12 ; POKEMONTOWER_4 + warp_to 3, 9, POKEMONTOWER_3_WIDTH ; POKEMONTOWER_2 + warp_to 18, 9, POKEMONTOWER_3_WIDTH ; POKEMONTOWER_4 diff --git a/data/mapObjects/pokemontower4.asm b/data/mapObjects/pokemontower4.asm index 19f4f4e3..9acea43e 100755 --- a/data/mapObjects/pokemontower4.asm +++ b/data/mapObjects/pokemontower4.asm @@ -1,20 +1,20 @@ PokemonTower4Object: db $1 ; border block - db $2 ; warps - db $9, $3, $0, POKEMONTOWER_5 - db $9, $12, $1, POKEMONTOWER_3 + db 2 ; warps + warp 3, 9, 0, POKEMONTOWER_5 + warp 18, 9, 1, POKEMONTOWER_3 - db $0 ; signs + db 0 ; signs - db $6 ; objects - object SPRITE_MEDIUM, $5, $a, STAY, RIGHT, $1, OPP_CHANNELER, $9 - object SPRITE_MEDIUM, $f, $7, STAY, DOWN, $2, OPP_CHANNELER, $a - object SPRITE_MEDIUM, $e, $c, STAY, LEFT, $3, OPP_CHANNELER, $c - object SPRITE_BALL, $c, $a, STAY, NONE, $4, ELIXER - object SPRITE_BALL, $9, $a, STAY, NONE, $5, AWAKENING - object SPRITE_BALL, $c, $10, STAY, NONE, $6, HP_UP + db 6 ; objects + object SPRITE_MEDIUM, 5, 10, STAY, RIGHT, 1, OPP_CHANNELER, 9 + object SPRITE_MEDIUM, 15, 7, STAY, DOWN, 2, OPP_CHANNELER, 10 + object SPRITE_MEDIUM, 14, 12, STAY, LEFT, 3, OPP_CHANNELER, 12 + object SPRITE_BALL, 12, 10, STAY, NONE, 4, ELIXER + object SPRITE_BALL, 9, 10, STAY, NONE, 5, AWAKENING + object SPRITE_BALL, 12, 16, STAY, NONE, 6, HP_UP ; warp-to - EVENT_DISP POKEMONTOWER_4_WIDTH, $9, $3 ; POKEMONTOWER_5 - EVENT_DISP POKEMONTOWER_4_WIDTH, $9, $12 ; POKEMONTOWER_3 + warp_to 3, 9, POKEMONTOWER_4_WIDTH ; POKEMONTOWER_5 + warp_to 18, 9, POKEMONTOWER_4_WIDTH ; POKEMONTOWER_3 diff --git a/data/mapObjects/pokemontower5.asm b/data/mapObjects/pokemontower5.asm index 5a73825c..ac0668b2 100755 --- a/data/mapObjects/pokemontower5.asm +++ b/data/mapObjects/pokemontower5.asm @@ -1,20 +1,20 @@ PokemonTower5Object: db $1 ; border block - db $2 ; warps - db $9, $3, $0, POKEMONTOWER_4 - db $9, $12, $0, POKEMONTOWER_6 + db 2 ; warps + warp 3, 9, 0, POKEMONTOWER_4 + warp 18, 9, 0, POKEMONTOWER_6 - db $0 ; signs + db 0 ; signs - db $6 ; objects - object SPRITE_MEDIUM, $c, $8, STAY, NONE, $1 ; person - object SPRITE_MEDIUM, $11, $7, STAY, LEFT, $2, OPP_CHANNELER, $e - object SPRITE_MEDIUM, $e, $3, STAY, LEFT, $3, OPP_CHANNELER, $10 - object SPRITE_MEDIUM, $6, $a, STAY, RIGHT, $4, OPP_CHANNELER, $11 - object SPRITE_MEDIUM, $9, $10, STAY, RIGHT, $5, OPP_CHANNELER, $12 - object SPRITE_BALL, $6, $e, STAY, NONE, $6, NUGGET + db 6 ; objects + object SPRITE_MEDIUM, 12, 8, STAY, NONE, 1 ; person + object SPRITE_MEDIUM, 17, 7, STAY, LEFT, 2, OPP_CHANNELER, 14 + object SPRITE_MEDIUM, 14, 3, STAY, LEFT, 3, OPP_CHANNELER, 16 + object SPRITE_MEDIUM, 6, 10, STAY, RIGHT, 4, OPP_CHANNELER, 17 + object SPRITE_MEDIUM, 9, 16, STAY, RIGHT, 5, OPP_CHANNELER, 18 + object SPRITE_BALL, 6, 14, STAY, NONE, 6, NUGGET ; warp-to - EVENT_DISP POKEMONTOWER_5_WIDTH, $9, $3 ; POKEMONTOWER_4 - EVENT_DISP POKEMONTOWER_5_WIDTH, $9, $12 ; POKEMONTOWER_6 + warp_to 3, 9, POKEMONTOWER_5_WIDTH ; POKEMONTOWER_4 + warp_to 18, 9, POKEMONTOWER_5_WIDTH ; POKEMONTOWER_6 diff --git a/data/mapObjects/pokemontower6.asm b/data/mapObjects/pokemontower6.asm index d0035faa..1dd66629 100755 --- a/data/mapObjects/pokemontower6.asm +++ b/data/mapObjects/pokemontower6.asm @@ -1,19 +1,19 @@ PokemonTower6Object: db $1 ; border block - db $2 ; warps - db $9, $12, $1, POKEMONTOWER_5 - db $10, $9, $0, POKEMONTOWER_7 + db 2 ; warps + warp 18, 9, 1, POKEMONTOWER_5 + warp 9, 16, 0, POKEMONTOWER_7 - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_MEDIUM, $c, $a, STAY, RIGHT, $1, OPP_CHANNELER, $13 - object SPRITE_MEDIUM, $9, $5, STAY, DOWN, $2, OPP_CHANNELER, $14 - object SPRITE_MEDIUM, $10, $5, STAY, LEFT, $3, OPP_CHANNELER, $15 - object SPRITE_BALL, $6, $8, STAY, NONE, $4, RARE_CANDY - object SPRITE_BALL, $e, $e, STAY, NONE, $5, X_ACCURACY + db 5 ; objects + object SPRITE_MEDIUM, 12, 10, STAY, RIGHT, 1, OPP_CHANNELER, 19 + object SPRITE_MEDIUM, 9, 5, STAY, DOWN, 2, OPP_CHANNELER, 20 + object SPRITE_MEDIUM, 16, 5, STAY, LEFT, 3, OPP_CHANNELER, 21 + object SPRITE_BALL, 6, 8, STAY, NONE, 4, RARE_CANDY + object SPRITE_BALL, 14, 14, STAY, NONE, 5, X_ACCURACY ; warp-to - EVENT_DISP POKEMONTOWER_6_WIDTH, $9, $12 ; POKEMONTOWER_5 - EVENT_DISP POKEMONTOWER_6_WIDTH, $10, $9 ; POKEMONTOWER_7 + warp_to 18, 9, POKEMONTOWER_6_WIDTH ; POKEMONTOWER_5 + warp_to 9, 16, POKEMONTOWER_6_WIDTH ; POKEMONTOWER_7 diff --git a/data/mapObjects/pokemontower7.asm b/data/mapObjects/pokemontower7.asm index 6ee1e8fd..9609253f 100755 --- a/data/mapObjects/pokemontower7.asm +++ b/data/mapObjects/pokemontower7.asm @@ -1,16 +1,16 @@ PokemonTower7Object: db $1 ; border block - db $1 ; warps - db $10, $9, $1, POKEMONTOWER_6 + db 1 ; warps + warp 9, 16, 1, POKEMONTOWER_6 - db $0 ; signs + db 0 ; signs db 4 ; objects - object SPRITE_ROCKET, $9, $b, STAY, RIGHT, $1, OPP_ROCKET, $13 - object SPRITE_ROCKET, $c, $9, STAY, LEFT, $2, OPP_ROCKET, $14 - object SPRITE_ROCKET, $9, $7, STAY, RIGHT, $3, OPP_ROCKET, $15 - object SPRITE_MR_FUJI, $a, $3, STAY, DOWN, $4 ; person + object SPRITE_ROCKET, 9, 11, STAY, RIGHT, 1, OPP_ROCKET, 19 + object SPRITE_ROCKET, 12, 9, STAY, LEFT, 2, OPP_ROCKET, 20 + object SPRITE_ROCKET, 9, 7, STAY, RIGHT, 3, OPP_ROCKET, 21 + object SPRITE_MR_FUJI, 10, 3, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP POKEMONTOWER_7_WIDTH, $10, $9 ; POKEMONTOWER_6 + warp_to 9, 16, POKEMONTOWER_7_WIDTH ; POKEMONTOWER_6 diff --git a/data/mapObjects/powerplant.asm b/data/mapObjects/powerplant.asm index a04cb657..402f899f 100755 --- a/data/mapObjects/powerplant.asm +++ b/data/mapObjects/powerplant.asm @@ -1,30 +1,30 @@ PowerPlantObject: db $2e ; border block - db $3 ; warps - db $23, $4, $3, $ff - db $23, $5, $3, $ff - db $b, $0, $3, $ff + db 3 ; warps + warp 4, 35, 3, -1 + warp 5, 35, 3, -1 + warp 0, 11, 3, -1 - db $0 ; signs + db 0 ; signs - db $e ; objects - object SPRITE_BALL, $9, $14, STAY, NONE, $1, VOLTORB, 40 - object SPRITE_BALL, $20, $12, STAY, NONE, $2, VOLTORB, 40 - object SPRITE_BALL, $15, $19, STAY, NONE, $3, VOLTORB, 40 - object SPRITE_BALL, $19, $12, STAY, NONE, $4, ELECTRODE, 43 - object SPRITE_BALL, $17, $22, STAY, NONE, $5, VOLTORB, 40 - object SPRITE_BALL, $1a, $1c, STAY, NONE, $6, VOLTORB, 40 - object SPRITE_BALL, $15, $e, STAY, NONE, $7, ELECTRODE, 43 - object SPRITE_BALL, $25, $20, STAY, NONE, $8, VOLTORB, 40 - object SPRITE_BIRD, $4, $9, STAY, UP, $9, ZAPDOS, 50 - object SPRITE_BALL, $7, $19, STAY, NONE, $a, CARBOS - object SPRITE_BALL, $1c, $3, STAY, NONE, $b, HP_UP - object SPRITE_BALL, $22, $3, STAY, NONE, $c, RARE_CANDY - object SPRITE_BALL, $1a, $20, STAY, NONE, $d, TM_25 - object SPRITE_BALL, $14, $20, STAY, NONE, $e, TM_33 + db 14 ; objects + object SPRITE_BALL, 9, 20, STAY, NONE, 1, VOLTORB, 40 + object SPRITE_BALL, 32, 18, STAY, NONE, 2, VOLTORB, 40 + object SPRITE_BALL, 21, 25, STAY, NONE, 3, VOLTORB, 40 + object SPRITE_BALL, 25, 18, STAY, NONE, 4, ELECTRODE, 43 + object SPRITE_BALL, 23, 34, STAY, NONE, 5, VOLTORB, 40 + object SPRITE_BALL, 26, 28, STAY, NONE, 6, VOLTORB, 40 + object SPRITE_BALL, 21, 14, STAY, NONE, 7, ELECTRODE, 43 + object SPRITE_BALL, 37, 32, STAY, NONE, 8, VOLTORB, 40 + object SPRITE_BIRD, 4, 9, STAY, UP, 9, ZAPDOS, 50 + object SPRITE_BALL, 7, 25, STAY, NONE, 10, CARBOS + object SPRITE_BALL, 28, 3, STAY, NONE, 11, HP_UP + object SPRITE_BALL, 34, 3, STAY, NONE, 12, RARE_CANDY + object SPRITE_BALL, 26, 32, STAY, NONE, 13, TM_25 + object SPRITE_BALL, 20, 32, STAY, NONE, 14, TM_33 ; warp-to - EVENT_DISP POWER_PLANT_WIDTH, $23, $4 - EVENT_DISP POWER_PLANT_WIDTH, $23, $5 - EVENT_DISP POWER_PLANT_WIDTH, $b, $0 + warp_to 4, 35, POWER_PLANT_WIDTH + warp_to 5, 35, POWER_PLANT_WIDTH + warp_to 0, 11, POWER_PLANT_WIDTH diff --git a/data/mapObjects/redshouse1f.asm b/data/mapObjects/redshouse1f.asm index 4d32ea3d..aabe6656 100755 --- a/data/mapObjects/redshouse1f.asm +++ b/data/mapObjects/redshouse1f.asm @@ -1,18 +1,18 @@ RedsHouse1FObject: - db $0A ; border block + db $a ; border block - db $3 ; warps - db $7, $2, $0, $FF ; exit1 - db $7, $3, $0, $FF ; exit2 - db $1, $7, $0, REDS_HOUSE_2F ; staircase + db 3 ; warps + warp 2, 7, 0, -1 ; exit1 + warp 3, 7, 0, -1 ; exit2 + warp 7, 1, 0, REDS_HOUSE_2F ; staircase - db $1 ; signs - db $1, $3, $2 ; TV + db 1 ; signs + sign 3, 1, 2 ; TV - db $1 ; objects - object SPRITE_MOM, $5, $4, STAY, LEFT, $1 ; Mom + db 1 ; objects + object SPRITE_MOM, 5, 4, STAY, LEFT, 1 ; Mom ; warp-to - EVENT_DISP REDS_HOUSE_1F_WIDTH, $7, $2 - EVENT_DISP REDS_HOUSE_1F_WIDTH, $7, $3 - EVENT_DISP REDS_HOUSE_1F_WIDTH, $1, $7 + warp_to 2, 7, REDS_HOUSE_1F_WIDTH + warp_to 3, 7, REDS_HOUSE_1F_WIDTH + warp_to 7, 1, REDS_HOUSE_1F_WIDTH diff --git a/data/mapObjects/redshouse2f.asm b/data/mapObjects/redshouse2f.asm index ebd57e59..af3c4b6b 100755 --- a/data/mapObjects/redshouse2f.asm +++ b/data/mapObjects/redshouse2f.asm @@ -1,12 +1,12 @@ RedsHouse2FObject: - db $0A ; border block + db $a ; border block - db $1 ; warps - db $1, $7, $2, REDS_HOUSE_1F + db 1 ; warps + warp 7, 1, 2, REDS_HOUSE_1F - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP REDS_HOUSE_2F_WIDTH, $1, $7 + warp_to 7, 1, REDS_HOUSE_2F_WIDTH diff --git a/data/mapObjects/rockethideout1.asm b/data/mapObjects/rockethideout1.asm index 0b2bf374..3a51808d 100755 --- a/data/mapObjects/rockethideout1.asm +++ b/data/mapObjects/rockethideout1.asm @@ -1,27 +1,27 @@ RocketHideout1Object: db $2e ; border block - db $5 ; warps - db $2, $17, $0, ROCKET_HIDEOUT_2 - db $2, $15, $2, GAME_CORNER - db $13, $18, $0, ROCKET_HIDEOUT_ELEVATOR - db $18, $15, $3, ROCKET_HIDEOUT_2 - db $13, $19, $1, ROCKET_HIDEOUT_ELEVATOR + db 5 ; warps + warp 23, 2, 0, ROCKET_HIDEOUT_2 + warp 21, 2, 2, GAME_CORNER + warp 24, 19, 0, ROCKET_HIDEOUT_ELEVATOR + warp 21, 24, 3, ROCKET_HIDEOUT_2 + warp 25, 19, 1, ROCKET_HIDEOUT_ELEVATOR - db $0 ; signs + db 0 ; signs - db $7 ; objects - object SPRITE_ROCKET, $1a, $8, STAY, LEFT, $1, OPP_ROCKET, $8 - object SPRITE_ROCKET, $c, $6, STAY, RIGHT, $2, OPP_ROCKET, $9 - object SPRITE_ROCKET, $12, $11, STAY, DOWN, $3, OPP_ROCKET, $a - object SPRITE_ROCKET, $f, $19, STAY, RIGHT, $4, OPP_ROCKET, $b - object SPRITE_ROCKET, $1c, $12, STAY, LEFT, $5, OPP_ROCKET, $c - object SPRITE_BALL, $b, $e, STAY, NONE, $6, ESCAPE_ROPE - object SPRITE_BALL, $9, $11, STAY, NONE, $7, HYPER_POTION + db 7 ; objects + object SPRITE_ROCKET, 26, 8, STAY, LEFT, 1, OPP_ROCKET, 8 + object SPRITE_ROCKET, 12, 6, STAY, RIGHT, 2, OPP_ROCKET, 9 + object SPRITE_ROCKET, 18, 17, STAY, DOWN, 3, OPP_ROCKET, 10 + object SPRITE_ROCKET, 15, 25, STAY, RIGHT, 4, OPP_ROCKET, 11 + object SPRITE_ROCKET, 28, 18, STAY, LEFT, 5, OPP_ROCKET, 12 + object SPRITE_BALL, 11, 14, STAY, NONE, 6, ESCAPE_ROPE + object SPRITE_BALL, 9, 17, STAY, NONE, 7, HYPER_POTION ; warp-to - EVENT_DISP ROCKET_HIDEOUT_1_WIDTH, $2, $17 ; ROCKET_HIDEOUT_2 - EVENT_DISP ROCKET_HIDEOUT_1_WIDTH, $2, $15 ; GAME_CORNER - EVENT_DISP ROCKET_HIDEOUT_1_WIDTH, $13, $18 ; ROCKET_HIDEOUT_ELEVATOR - EVENT_DISP ROCKET_HIDEOUT_1_WIDTH, $18, $15 ; ROCKET_HIDEOUT_2 - EVENT_DISP ROCKET_HIDEOUT_1_WIDTH, $13, $19 ; ROCKET_HIDEOUT_ELEVATOR + warp_to 23, 2, ROCKET_HIDEOUT_1_WIDTH ; ROCKET_HIDEOUT_2 + warp_to 21, 2, ROCKET_HIDEOUT_1_WIDTH ; GAME_CORNER + warp_to 24, 19, ROCKET_HIDEOUT_1_WIDTH ; ROCKET_HIDEOUT_ELEVATOR + warp_to 21, 24, ROCKET_HIDEOUT_1_WIDTH ; ROCKET_HIDEOUT_2 + warp_to 25, 19, ROCKET_HIDEOUT_1_WIDTH ; ROCKET_HIDEOUT_ELEVATOR diff --git a/data/mapObjects/rockethideout2.asm b/data/mapObjects/rockethideout2.asm index 6689110c..328a4fb5 100755 --- a/data/mapObjects/rockethideout2.asm +++ b/data/mapObjects/rockethideout2.asm @@ -1,25 +1,25 @@ RocketHideout2Object: db $2e ; border block - db $5 ; warps - db $8, $1b, $0, ROCKET_HIDEOUT_1 - db $8, $15, $0, ROCKET_HIDEOUT_3 - db $13, $18, $0, ROCKET_HIDEOUT_ELEVATOR - db $16, $15, $3, ROCKET_HIDEOUT_1 - db $13, $19, $1, ROCKET_HIDEOUT_ELEVATOR + db 5 ; warps + warp 27, 8, 0, ROCKET_HIDEOUT_1 + warp 21, 8, 0, ROCKET_HIDEOUT_3 + warp 24, 19, 0, ROCKET_HIDEOUT_ELEVATOR + warp 21, 22, 3, ROCKET_HIDEOUT_1 + warp 25, 19, 1, ROCKET_HIDEOUT_ELEVATOR - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_ROCKET, $14, $c, STAY, DOWN, $1, OPP_ROCKET, $d - object SPRITE_BALL, $1, $b, STAY, NONE, $2, MOON_STONE - object SPRITE_BALL, $10, $8, STAY, NONE, $3, NUGGET - object SPRITE_BALL, $6, $c, STAY, NONE, $4, TM_07 - object SPRITE_BALL, $3, $15, STAY, NONE, $5, SUPER_POTION + db 5 ; objects + object SPRITE_ROCKET, 20, 12, STAY, DOWN, 1, OPP_ROCKET, 13 + object SPRITE_BALL, 1, 11, STAY, NONE, 2, MOON_STONE + object SPRITE_BALL, 16, 8, STAY, NONE, 3, NUGGET + object SPRITE_BALL, 6, 12, STAY, NONE, 4, TM_07 + object SPRITE_BALL, 3, 21, STAY, NONE, 5, SUPER_POTION ; warp-to - EVENT_DISP ROCKET_HIDEOUT_2_WIDTH, $8, $1b ; ROCKET_HIDEOUT_1 - EVENT_DISP ROCKET_HIDEOUT_2_WIDTH, $8, $15 ; ROCKET_HIDEOUT_3 - EVENT_DISP ROCKET_HIDEOUT_2_WIDTH, $13, $18 ; ROCKET_HIDEOUT_ELEVATOR - EVENT_DISP ROCKET_HIDEOUT_2_WIDTH, $16, $15 ; ROCKET_HIDEOUT_1 - EVENT_DISP ROCKET_HIDEOUT_2_WIDTH, $13, $19 ; ROCKET_HIDEOUT_ELEVATOR + warp_to 27, 8, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_1 + warp_to 21, 8, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_3 + warp_to 24, 19, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_ELEVATOR + warp_to 21, 22, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_1 + warp_to 25, 19, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_ELEVATOR diff --git a/data/mapObjects/rockethideout3.asm b/data/mapObjects/rockethideout3.asm index 90bfbb57..a8da69d2 100755 --- a/data/mapObjects/rockethideout3.asm +++ b/data/mapObjects/rockethideout3.asm @@ -1,18 +1,18 @@ RocketHideout3Object: db $2e ; border block - db $2 ; warps - db $6, $19, $1, ROCKET_HIDEOUT_2 - db $12, $13, $0, ROCKET_HIDEOUT_4 + db 2 ; warps + warp 25, 6, 1, ROCKET_HIDEOUT_2 + warp 19, 18, 0, ROCKET_HIDEOUT_4 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_ROCKET, $a, $16, STAY, RIGHT, $1, OPP_ROCKET, $e - object SPRITE_ROCKET, $1a, $c, STAY, UP, $2, OPP_ROCKET, $f - object SPRITE_BALL, $1a, $11, STAY, NONE, $3, TM_10 - object SPRITE_BALL, $14, $e, STAY, NONE, $4, RARE_CANDY + db 4 ; objects + object SPRITE_ROCKET, 10, 22, STAY, RIGHT, 1, OPP_ROCKET, 14 + object SPRITE_ROCKET, 26, 12, STAY, UP, 2, OPP_ROCKET, 15 + object SPRITE_BALL, 26, 17, STAY, NONE, 3, TM_10 + object SPRITE_BALL, 20, 14, STAY, NONE, 4, RARE_CANDY ; warp-to - EVENT_DISP ROCKET_HIDEOUT_3_WIDTH, $6, $19 ; ROCKET_HIDEOUT_2 - EVENT_DISP ROCKET_HIDEOUT_3_WIDTH, $12, $13 ; ROCKET_HIDEOUT_4 + warp_to 25, 6, ROCKET_HIDEOUT_3_WIDTH ; ROCKET_HIDEOUT_2 + warp_to 19, 18, ROCKET_HIDEOUT_3_WIDTH ; ROCKET_HIDEOUT_4 diff --git a/data/mapObjects/rockethideout4.asm b/data/mapObjects/rockethideout4.asm index b4e98d04..97025c71 100755 --- a/data/mapObjects/rockethideout4.asm +++ b/data/mapObjects/rockethideout4.asm @@ -1,25 +1,25 @@ RocketHideout4Object: db $2e ; border block - db $3 ; warps - db $a, $13, $1, ROCKET_HIDEOUT_3 - db $f, $18, $0, ROCKET_HIDEOUT_ELEVATOR - db $f, $19, $1, ROCKET_HIDEOUT_ELEVATOR + db 3 ; warps + warp 19, 10, 1, ROCKET_HIDEOUT_3 + warp 24, 15, 0, ROCKET_HIDEOUT_ELEVATOR + warp 25, 15, 1, ROCKET_HIDEOUT_ELEVATOR - db $0 ; signs + db 0 ; signs - db $9 ; objects - object SPRITE_GIOVANNI, $19, $3, STAY, DOWN, $1, OPP_GIOVANNI, $1 - object SPRITE_ROCKET, $17, $c, STAY, DOWN, $2, OPP_ROCKET, $10 - object SPRITE_ROCKET, $1a, $c, STAY, DOWN, $3, OPP_ROCKET, $11 - object SPRITE_ROCKET, $b, $2, STAY, DOWN, $4, OPP_ROCKET, $12 - object SPRITE_BALL, $a, $c, STAY, NONE, $5, HP_UP - object SPRITE_BALL, $9, $4, STAY, NONE, $6, TM_02 - object SPRITE_BALL, $c, $14, STAY, NONE, $7, IRON - object SPRITE_BALL, $19, $2, STAY, NONE, $8, SILPH_SCOPE - object SPRITE_BALL, $a, $2, STAY, NONE, $9, LIFT_KEY + db 9 ; objects + object SPRITE_GIOVANNI, 25, 3, STAY, DOWN, 1, OPP_GIOVANNI, 1 + object SPRITE_ROCKET, 23, 12, STAY, DOWN, 2, OPP_ROCKET, 16 + object SPRITE_ROCKET, 26, 12, STAY, DOWN, 3, OPP_ROCKET, 17 + object SPRITE_ROCKET, 11, 2, STAY, DOWN, 4, OPP_ROCKET, 18 + object SPRITE_BALL, 10, 12, STAY, NONE, 5, HP_UP + object SPRITE_BALL, 9, 4, STAY, NONE, 6, TM_02 + object SPRITE_BALL, 12, 20, STAY, NONE, 7, IRON + object SPRITE_BALL, 25, 2, STAY, NONE, 8, SILPH_SCOPE + object SPRITE_BALL, 10, 2, STAY, NONE, 9, LIFT_KEY ; warp-to - EVENT_DISP ROCKET_HIDEOUT_4_WIDTH, $a, $13 ; ROCKET_HIDEOUT_3 - EVENT_DISP ROCKET_HIDEOUT_4_WIDTH, $f, $18 ; ROCKET_HIDEOUT_ELEVATOR - EVENT_DISP ROCKET_HIDEOUT_4_WIDTH, $f, $19 ; ROCKET_HIDEOUT_ELEVATOR + warp_to 19, 10, ROCKET_HIDEOUT_4_WIDTH ; ROCKET_HIDEOUT_3 + warp_to 24, 15, ROCKET_HIDEOUT_4_WIDTH ; ROCKET_HIDEOUT_ELEVATOR + warp_to 25, 15, ROCKET_HIDEOUT_4_WIDTH ; ROCKET_HIDEOUT_ELEVATOR diff --git a/data/mapObjects/rockethideoutelevator.asm b/data/mapObjects/rockethideoutelevator.asm index c1dfe961..583c9f89 100755 --- a/data/mapObjects/rockethideoutelevator.asm +++ b/data/mapObjects/rockethideoutelevator.asm @@ -1,15 +1,15 @@ RocketHideoutElevatorObject: db $f ; border block - db $2 ; warps - db $1, $2, $2, ROCKET_HIDEOUT_1 - db $1, $3, $4, ROCKET_HIDEOUT_1 + db 2 ; warps + warp 2, 1, 2, ROCKET_HIDEOUT_1 + warp 3, 1, 4, ROCKET_HIDEOUT_1 - db $1 ; signs - db $1, $1, $1 ; RocketHideoutElevatorText1 + db 1 ; signs + sign 1, 1, 1 ; RocketHideoutElevatorText1 - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP ROCKET_HIDEOUT_ELEVATOR_WIDTH, $1, $2 ; ROCKET_HIDEOUT_1 - EVENT_DISP ROCKET_HIDEOUT_ELEVATOR_WIDTH, $1, $3 ; ROCKET_HIDEOUT_1 + warp_to 2, 1, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; ROCKET_HIDEOUT_1 + warp_to 3, 1, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; ROCKET_HIDEOUT_1 diff --git a/data/mapObjects/rocktunnel1.asm b/data/mapObjects/rocktunnel1.asm index 932efb87..1cfeca65 100755 --- a/data/mapObjects/rocktunnel1.asm +++ b/data/mapObjects/rocktunnel1.asm @@ -1,34 +1,34 @@ RockTunnel1Object: db $3 ; border block - db $8 ; warps - db $3, $f, $1, $ff - db $0, $f, $1, $ff - db $21, $f, $2, $ff - db $23, $f, $2, $ff - db $3, $25, $0, ROCK_TUNNEL_2 - db $3, $5, $1, ROCK_TUNNEL_2 - db $b, $11, $2, ROCK_TUNNEL_2 - db $11, $25, $3, ROCK_TUNNEL_2 + db 8 ; warps + warp 15, 3, 1, -1 + warp 15, 0, 1, -1 + warp 15, 33, 2, -1 + warp 15, 35, 2, -1 + warp 37, 3, 0, ROCK_TUNNEL_2 + warp 5, 3, 1, ROCK_TUNNEL_2 + warp 17, 11, 2, ROCK_TUNNEL_2 + warp 37, 17, 3, ROCK_TUNNEL_2 - db $1 ; signs - db $1d, $b, $8 ; RockTunnel1Text8 + db 1 ; signs + sign 11, 29, 8 ; RockTunnel1Text8 - db $7 ; objects - object SPRITE_HIKER, $7, $5, STAY, DOWN, $1, OPP_HIKER, $c - object SPRITE_HIKER, $5, $10, STAY, DOWN, $2, OPP_HIKER, $d - object SPRITE_HIKER, $11, $f, STAY, LEFT, $3, OPP_HIKER, $e - object SPRITE_BLACK_HAIR_BOY_2, $17, $8, STAY, LEFT, $4, OPP_POKEMANIAC, $7 - object SPRITE_LASS, $25, $15, STAY, LEFT, $5, OPP_JR_TRAINER_F, $11 - object SPRITE_LASS, $16, $18, STAY, DOWN, $6, OPP_JR_TRAINER_F, $12 - object SPRITE_LASS, $20, $18, STAY, RIGHT, $7, OPP_JR_TRAINER_F, $13 + db 7 ; objects + object SPRITE_HIKER, 7, 5, STAY, DOWN, 1, OPP_HIKER, 12 + object SPRITE_HIKER, 5, 16, STAY, DOWN, 2, OPP_HIKER, 13 + object SPRITE_HIKER, 17, 15, STAY, LEFT, 3, OPP_HIKER, 14 + object SPRITE_BLACK_HAIR_BOY_2, 23, 8, STAY, LEFT, 4, OPP_POKEMANIAC, 7 + object SPRITE_LASS, 37, 21, STAY, LEFT, 5, OPP_JR_TRAINER_F, 17 + object SPRITE_LASS, 22, 24, STAY, DOWN, 6, OPP_JR_TRAINER_F, 18 + object SPRITE_LASS, 32, 24, STAY, RIGHT, 7, OPP_JR_TRAINER_F, 19 ; warp-to - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $3, $f - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $0, $f - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $21, $f - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $23, $f - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $3, $25 ; ROCK_TUNNEL_2 - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $3, $5 ; ROCK_TUNNEL_2 - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $b, $11 ; ROCK_TUNNEL_2 - EVENT_DISP ROCK_TUNNEL_1_WIDTH, $11, $25 ; ROCK_TUNNEL_2 + warp_to 15, 3, ROCK_TUNNEL_1_WIDTH + warp_to 15, 0, ROCK_TUNNEL_1_WIDTH + warp_to 15, 33, ROCK_TUNNEL_1_WIDTH + warp_to 15, 35, ROCK_TUNNEL_1_WIDTH + warp_to 37, 3, ROCK_TUNNEL_1_WIDTH ; ROCK_TUNNEL_2 + warp_to 5, 3, ROCK_TUNNEL_1_WIDTH ; ROCK_TUNNEL_2 + warp_to 17, 11, ROCK_TUNNEL_1_WIDTH ; ROCK_TUNNEL_2 + warp_to 37, 17, ROCK_TUNNEL_1_WIDTH ; ROCK_TUNNEL_2 diff --git a/data/mapObjects/rocktunnel2.asm b/data/mapObjects/rocktunnel2.asm index 3589ec60..d60863c1 100755 --- a/data/mapObjects/rocktunnel2.asm +++ b/data/mapObjects/rocktunnel2.asm @@ -1,26 +1,26 @@ RockTunnel2Object: db $3 ; border block - db $4 ; warps - db $19, $21, $4, ROCK_TUNNEL_1 - db $3, $1b, $5, ROCK_TUNNEL_1 - db $b, $17, $6, ROCK_TUNNEL_1 - db $3, $3, $7, ROCK_TUNNEL_1 + db 4 ; warps + warp 33, 25, 4, ROCK_TUNNEL_1 + warp 27, 3, 5, ROCK_TUNNEL_1 + warp 23, 11, 6, ROCK_TUNNEL_1 + warp 3, 3, 7, ROCK_TUNNEL_1 - db $0 ; signs + db 0 ; signs - db $8 ; objects - object SPRITE_LASS, $b, $d, STAY, DOWN, $1, OPP_JR_TRAINER_F, $9 - object SPRITE_HIKER, $6, $a, STAY, DOWN, $2, OPP_HIKER, $9 - object SPRITE_BLACK_HAIR_BOY_2, $3, $5, STAY, DOWN, $3, OPP_POKEMANIAC, $3 - object SPRITE_BLACK_HAIR_BOY_2, $14, $15, STAY, RIGHT, $4, OPP_POKEMANIAC, $4 - object SPRITE_HIKER, $1e, $a, STAY, DOWN, $5, OPP_HIKER, $a - object SPRITE_LASS, $e, $1c, STAY, RIGHT, $6, OPP_JR_TRAINER_F, $a - object SPRITE_HIKER, $21, $5, STAY, RIGHT, $7, OPP_HIKER, $b - object SPRITE_BLACK_HAIR_BOY_2, $1a, $1e, STAY, DOWN, $8, OPP_POKEMANIAC, $5 + db 8 ; objects + object SPRITE_LASS, 11, 13, STAY, DOWN, 1, OPP_JR_TRAINER_F, 9 + object SPRITE_HIKER, 6, 10, STAY, DOWN, 2, OPP_HIKER, 9 + object SPRITE_BLACK_HAIR_BOY_2, 3, 5, STAY, DOWN, 3, OPP_POKEMANIAC, 3 + object SPRITE_BLACK_HAIR_BOY_2, 20, 21, STAY, RIGHT, 4, OPP_POKEMANIAC, 4 + object SPRITE_HIKER, 30, 10, STAY, DOWN, 5, OPP_HIKER, 10 + object SPRITE_LASS, 14, 28, STAY, RIGHT, 6, OPP_JR_TRAINER_F, 10 + object SPRITE_HIKER, 33, 5, STAY, RIGHT, 7, OPP_HIKER, 11 + object SPRITE_BLACK_HAIR_BOY_2, 26, 30, STAY, DOWN, 8, OPP_POKEMANIAC, 5 ; warp-to - EVENT_DISP ROCK_TUNNEL_2_WIDTH, $19, $21 ; ROCK_TUNNEL_1 - EVENT_DISP ROCK_TUNNEL_2_WIDTH, $3, $1b ; ROCK_TUNNEL_1 - EVENT_DISP ROCK_TUNNEL_2_WIDTH, $b, $17 ; ROCK_TUNNEL_1 - EVENT_DISP ROCK_TUNNEL_2_WIDTH, $3, $3 ; ROCK_TUNNEL_1 + warp_to 33, 25, ROCK_TUNNEL_2_WIDTH ; ROCK_TUNNEL_1 + warp_to 27, 3, ROCK_TUNNEL_2_WIDTH ; ROCK_TUNNEL_1 + warp_to 23, 11, ROCK_TUNNEL_2_WIDTH ; ROCK_TUNNEL_1 + warp_to 3, 3, ROCK_TUNNEL_2_WIDTH ; ROCK_TUNNEL_1 diff --git a/data/mapObjects/rocktunnelpokecenter.asm b/data/mapObjects/rocktunnelpokecenter.asm index 90efc3ea..c664b206 100755 --- a/data/mapObjects/rocktunnelpokecenter.asm +++ b/data/mapObjects/rocktunnelpokecenter.asm @@ -1,18 +1,18 @@ RockTunnelPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $0, $ff - db $7, $4, $0, $ff + db 2 ; warps + warp 3, 7, 0, -1 + warp 4, 7, 0, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $7, $3, WALK, $2, $2 ; person - object SPRITE_FISHER2, $2, $5, STAY, NONE, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 7, 3, WALK, 2, 2 ; person + object SPRITE_FISHER2, 2, 5, STAY, NONE, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP ROCK_TUNNEL_POKECENTER_WIDTH, $7, $3 - EVENT_DISP ROCK_TUNNEL_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, ROCK_TUNNEL_POKECENTER_WIDTH + warp_to 4, 7, ROCK_TUNNEL_POKECENTER_WIDTH diff --git a/data/mapObjects/route1.asm b/data/mapObjects/route1.asm index 0e6237e7..26505ea6 100755 --- a/data/mapObjects/route1.asm +++ b/data/mapObjects/route1.asm @@ -1,14 +1,14 @@ Route1Object: db $b ; border block - db $0 ; warps + db 0 ; warps - db $1 ; signs - db $1b, $9, $3 ; Route1Text3 + db 1 ; signs + sign 9, 27, 3 ; Route1Text3 - db $2 ; objects - object SPRITE_BUG_CATCHER, $5, $18, WALK, $1, $1 ; person - object SPRITE_BUG_CATCHER, $f, $d, WALK, $2, $2 ; person + db 2 ; objects + object SPRITE_BUG_CATCHER, 5, 24, WALK, 1, 1 ; person + object SPRITE_BUG_CATCHER, 15, 13, WALK, 2, 2 ; person ; warp-to (unused) - EVENT_DISP $4, $7, $2 + warp_to 2, 7, 4 diff --git a/data/mapObjects/route10.asm b/data/mapObjects/route10.asm index a1590ded..90abb47d 100755 --- a/data/mapObjects/route10.asm +++ b/data/mapObjects/route10.asm @@ -1,28 +1,28 @@ Route10Object: db $2c ; border block - db $4 ; warps - db $13, $b, $0, ROCK_TUNNEL_POKECENTER - db $11, $8, $0, ROCK_TUNNEL_1 - db $35, $8, $2, ROCK_TUNNEL_1 - db $27, $6, $0, POWER_PLANT + db 4 ; warps + warp 11, 19, 0, ROCK_TUNNEL_POKECENTER + warp 8, 17, 0, ROCK_TUNNEL_1 + warp 8, 53, 2, ROCK_TUNNEL_1 + warp 6, 39, 0, POWER_PLANT - db $4 ; signs - db $13, $7, $7 ; Route10Text7 - db $13, $c, $8 ; PokeCenterSignText - db $37, $9, $9 ; Route10Text9 - db $29, $5, $a ; Route10Text10 + db 4 ; signs + sign 7, 19, 7 ; Route10Text7 + sign 12, 19, 8 ; PokeCenterSignText + sign 9, 55, 9 ; Route10Text9 + sign 5, 41, 10 ; Route10Text10 - db $6 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $a, $2c, STAY, LEFT, $1, OPP_POKEMANIAC, $1 - object SPRITE_HIKER, $3, $39, STAY, UP, $2, OPP_HIKER, $7 - object SPRITE_BLACK_HAIR_BOY_2, $e, $40, STAY, LEFT, $3, OPP_POKEMANIAC, $2 - object SPRITE_LASS, $7, $19, STAY, LEFT, $4, OPP_JR_TRAINER_F, $7 - object SPRITE_HIKER, $3, $3d, STAY, DOWN, $5, OPP_HIKER, $8 - object SPRITE_LASS, $7, $36, STAY, DOWN, $6, OPP_JR_TRAINER_F, $8 + db 6 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 10, 44, STAY, LEFT, 1, OPP_POKEMANIAC, 1 + object SPRITE_HIKER, 3, 57, STAY, UP, 2, OPP_HIKER, 7 + object SPRITE_BLACK_HAIR_BOY_2, 14, 64, STAY, LEFT, 3, OPP_POKEMANIAC, 2 + object SPRITE_LASS, 7, 25, STAY, LEFT, 4, OPP_JR_TRAINER_F, 7 + object SPRITE_HIKER, 3, 61, STAY, DOWN, 5, OPP_HIKER, 8 + object SPRITE_LASS, 7, 54, STAY, DOWN, 6, OPP_JR_TRAINER_F, 8 ; warp-to - EVENT_DISP ROUTE_10_WIDTH, $13, $b ; ROCK_TUNNEL_POKECENTER - EVENT_DISP ROUTE_10_WIDTH, $11, $8 ; ROCK_TUNNEL_1 - EVENT_DISP ROUTE_10_WIDTH, $35, $8 ; ROCK_TUNNEL_1 - EVENT_DISP ROUTE_10_WIDTH, $27, $6 ; POWER_PLANT + warp_to 11, 19, ROUTE_10_WIDTH ; ROCK_TUNNEL_POKECENTER + warp_to 8, 17, ROUTE_10_WIDTH ; ROCK_TUNNEL_1 + warp_to 8, 53, ROUTE_10_WIDTH ; ROCK_TUNNEL_1 + warp_to 6, 39, ROUTE_10_WIDTH ; POWER_PLANT diff --git a/data/mapObjects/route11.asm b/data/mapObjects/route11.asm index 0c7828f2..8d8e35d6 100755 --- a/data/mapObjects/route11.asm +++ b/data/mapObjects/route11.asm @@ -1,31 +1,31 @@ Route11Object: db $f ; border block - db $5 ; warps - db $8, $31, $0, ROUTE_11_GATE_1F - db $9, $31, $1, ROUTE_11_GATE_1F - db $8, $3a, $2, ROUTE_11_GATE_1F - db $9, $3a, $3, ROUTE_11_GATE_1F - db $5, $4, $0, DIGLETTS_CAVE_ENTRANCE + db 5 ; warps + warp 49, 8, 0, ROUTE_11_GATE_1F + warp 49, 9, 1, ROUTE_11_GATE_1F + warp 58, 8, 2, ROUTE_11_GATE_1F + warp 58, 9, 3, ROUTE_11_GATE_1F + warp 4, 5, 0, DIGLETTS_CAVE_ENTRANCE - db $1 ; signs - db $5, $1, $b ; Route11Text11 + db 1 ; signs + sign 1, 5, 11 ; Route11Text11 - db $a ; objects - object SPRITE_GAMBLER, $a, $e, STAY, DOWN, $1, OPP_GAMBLER, $1 - object SPRITE_GAMBLER, $1a, $9, STAY, DOWN, $2, OPP_GAMBLER, $2 - object SPRITE_BUG_CATCHER, $d, $5, STAY, LEFT, $3, OPP_YOUNGSTER, $9 - object SPRITE_BLACK_HAIR_BOY_2, $24, $b, STAY, DOWN, $4, OPP_ENGINEER, $2 - object SPRITE_BUG_CATCHER, $16, $4, STAY, UP, $5, OPP_YOUNGSTER, $a - object SPRITE_GAMBLER, $2d, $7, STAY, DOWN, $6, OPP_GAMBLER, $3 - object SPRITE_GAMBLER, $21, $3, STAY, UP, $7, OPP_GAMBLER, $4 - object SPRITE_BUG_CATCHER, $2b, $5, STAY, RIGHT, $8, OPP_YOUNGSTER, $b - object SPRITE_BLACK_HAIR_BOY_2, $2d, $10, STAY, LEFT, $9, OPP_ENGINEER, $3 - object SPRITE_BUG_CATCHER, $16, $c, STAY, UP, $a, OPP_YOUNGSTER, $c + db 10 ; objects + object SPRITE_GAMBLER, 10, 14, STAY, DOWN, 1, OPP_GAMBLER, 1 + object SPRITE_GAMBLER, 26, 9, STAY, DOWN, 2, OPP_GAMBLER, 2 + object SPRITE_BUG_CATCHER, 13, 5, STAY, LEFT, 3, OPP_YOUNGSTER, 9 + object SPRITE_BLACK_HAIR_BOY_2, 36, 11, STAY, DOWN, 4, OPP_ENGINEER, 2 + object SPRITE_BUG_CATCHER, 22, 4, STAY, UP, 5, OPP_YOUNGSTER, 10 + object SPRITE_GAMBLER, 45, 7, STAY, DOWN, 6, OPP_GAMBLER, 3 + object SPRITE_GAMBLER, 33, 3, STAY, UP, 7, OPP_GAMBLER, 4 + object SPRITE_BUG_CATCHER, 43, 5, STAY, RIGHT, 8, OPP_YOUNGSTER, 11 + object SPRITE_BLACK_HAIR_BOY_2, 45, 16, STAY, LEFT, 9, OPP_ENGINEER, 3 + object SPRITE_BUG_CATCHER, 22, 12, STAY, UP, 10, OPP_YOUNGSTER, 12 ; warp-to - EVENT_DISP ROUTE_11_WIDTH, $8, $31 ; ROUTE_11_GATE_1F - EVENT_DISP ROUTE_11_WIDTH, $9, $31 ; ROUTE_11_GATE_1F - EVENT_DISP ROUTE_11_WIDTH, $8, $3a ; ROUTE_11_GATE_1F - EVENT_DISP ROUTE_11_WIDTH, $9, $3a ; ROUTE_11_GATE_1F - EVENT_DISP ROUTE_11_WIDTH, $5, $4 ; DIGLETTS_CAVE_ENTRANCE + warp_to 49, 8, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F + warp_to 49, 9, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F + warp_to 58, 8, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F + warp_to 58, 9, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F + warp_to 4, 5, ROUTE_11_WIDTH ; DIGLETTS_CAVE_ENTRANCE diff --git a/data/mapObjects/route11gate.asm b/data/mapObjects/route11gate.asm index d8e6bff1..fa627963 100755 --- a/data/mapObjects/route11gate.asm +++ b/data/mapObjects/route11gate.asm @@ -1,21 +1,21 @@ Route11GateObject: db $a ; border block - db $5 ; warps - db $4, $0, $0, $ff - db $5, $0, $1, $ff - db $4, $7, $2, $ff - db $5, $7, $3, $ff - db $8, $6, $0, ROUTE_11_GATE_2F + db 5 ; warps + warp 0, 4, 0, -1 + warp 0, 5, 1, -1 + warp 7, 4, 2, -1 + warp 7, 5, 3, -1 + warp 6, 8, 0, ROUTE_11_GATE_2F - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $4, $1, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 4, 1, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP ROUTE_11_GATE_1F_WIDTH, $4, $0 - EVENT_DISP ROUTE_11_GATE_1F_WIDTH, $5, $0 - EVENT_DISP ROUTE_11_GATE_1F_WIDTH, $4, $7 - EVENT_DISP ROUTE_11_GATE_1F_WIDTH, $5, $7 - EVENT_DISP ROUTE_11_GATE_1F_WIDTH, $8, $6 ; ROUTE_11_GATE_2F + warp_to 0, 4, ROUTE_11_GATE_1F_WIDTH + warp_to 0, 5, ROUTE_11_GATE_1F_WIDTH + warp_to 7, 4, ROUTE_11_GATE_1F_WIDTH + warp_to 7, 5, ROUTE_11_GATE_1F_WIDTH + warp_to 6, 8, ROUTE_11_GATE_1F_WIDTH ; ROUTE_11_GATE_2F diff --git a/data/mapObjects/route11gateupstairs.asm b/data/mapObjects/route11gateupstairs.asm index 6228851d..e112c685 100755 --- a/data/mapObjects/route11gateupstairs.asm +++ b/data/mapObjects/route11gateupstairs.asm @@ -1,16 +1,16 @@ Route11GateUpstairsObject: db $a ; border block - db $1 ; warps - db $7, $7, $4, ROUTE_11_GATE_1F + db 1 ; warps + warp 7, 7, 4, ROUTE_11_GATE_1F - db $2 ; signs - db $2, $1, $3 ; Route11GateUpstairsText3 - db $2, $6, $4 ; Route11GateUpstairsText4 + db 2 ; signs + sign 1, 2, 3 ; Route11GateUpstairsText3 + sign 6, 2, 4 ; Route11GateUpstairsText4 - db $2 ; objects - object SPRITE_BUG_CATCHER, $4, $2, WALK, $2, $1 ; person - object SPRITE_OAK_AIDE, $2, $6, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_BUG_CATCHER, 4, 2, WALK, 2, 1 ; person + object SPRITE_OAK_AIDE, 2, 6, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP ROUTE_11_GATE_2F_WIDTH, $7, $7 ; ROUTE_11_GATE_1F + warp_to 7, 7, ROUTE_11_GATE_2F_WIDTH ; ROUTE_11_GATE_1F diff --git a/data/mapObjects/route12.asm b/data/mapObjects/route12.asm index dd461e6c..b72317d4 100755 --- a/data/mapObjects/route12.asm +++ b/data/mapObjects/route12.asm @@ -1,30 +1,30 @@ Route12Object: db $43 ; border block - db $4 ; warps - db $f, $a, $0, ROUTE_12_GATE_1F - db $f, $b, $1, ROUTE_12_GATE_1F - db $15, $a, $2, ROUTE_12_GATE_1F - db $4d, $b, $0, ROUTE_12_HOUSE + db 4 ; warps + warp 10, 15, 0, ROUTE_12_GATE_1F + warp 11, 15, 1, ROUTE_12_GATE_1F + warp 10, 21, 2, ROUTE_12_GATE_1F + warp 11, 77, 0, ROUTE_12_HOUSE - db $2 ; signs - db $d, $d, $b ; Route12Text11 - db $3f, $b, $c ; Route12Text12 + db 2 ; signs + sign 13, 13, 11 ; Route12Text11 + sign 11, 63, 12 ; Route12Text12 - db $a ; objects - object SPRITE_SNORLAX, $a, $3e, STAY, DOWN, $1 ; person - object SPRITE_FISHER2, $e, $1f, STAY, LEFT, $2, OPP_FISHER, $3 - object SPRITE_FISHER2, $5, $27, STAY, UP, $3, OPP_FISHER, $4 - object SPRITE_BLACK_HAIR_BOY_1, $b, $5c, STAY, LEFT, $4, OPP_JR_TRAINER_M, $9 - object SPRITE_BLACK_HAIR_BOY_2, $e, $4c, STAY, UP, $5, OPP_ROCKER, $2 - object SPRITE_FISHER2, $c, $28, STAY, LEFT, $6, OPP_FISHER, $5 - object SPRITE_FISHER2, $9, $34, STAY, RIGHT, $7, OPP_FISHER, $6 - object SPRITE_FISHER2, $6, $57, STAY, DOWN, $8, OPP_FISHER, $b - object SPRITE_BALL, $e, $23, STAY, NONE, $9, TM_16 - object SPRITE_BALL, $5, $59, STAY, NONE, $a, IRON + db 10 ; objects + object SPRITE_SNORLAX, 10, 62, STAY, DOWN, 1 ; person + object SPRITE_FISHER2, 14, 31, STAY, LEFT, 2, OPP_FISHER, 3 + object SPRITE_FISHER2, 5, 39, STAY, UP, 3, OPP_FISHER, 4 + object SPRITE_BLACK_HAIR_BOY_1, 11, 92, STAY, LEFT, 4, OPP_JR_TRAINER_M, 9 + object SPRITE_BLACK_HAIR_BOY_2, 14, 76, STAY, UP, 5, OPP_ROCKER, 2 + object SPRITE_FISHER2, 12, 40, STAY, LEFT, 6, OPP_FISHER, 5 + object SPRITE_FISHER2, 9, 52, STAY, RIGHT, 7, OPP_FISHER, 6 + object SPRITE_FISHER2, 6, 87, STAY, DOWN, 8, OPP_FISHER, 11 + object SPRITE_BALL, 14, 35, STAY, NONE, 9, TM_16 + object SPRITE_BALL, 5, 89, STAY, NONE, 10, IRON ; warp-to - EVENT_DISP ROUTE_12_WIDTH, $f, $a ; ROUTE_12_GATE_1F - EVENT_DISP ROUTE_12_WIDTH, $f, $b ; ROUTE_12_GATE_1F - EVENT_DISP ROUTE_12_WIDTH, $15, $a ; ROUTE_12_GATE_1F - EVENT_DISP ROUTE_12_WIDTH, $4d, $b ; ROUTE_12_HOUSE + warp_to 10, 15, ROUTE_12_WIDTH ; ROUTE_12_GATE_1F + warp_to 11, 15, ROUTE_12_WIDTH ; ROUTE_12_GATE_1F + warp_to 10, 21, ROUTE_12_WIDTH ; ROUTE_12_GATE_1F + warp_to 11, 77, ROUTE_12_WIDTH ; ROUTE_12_HOUSE diff --git a/data/mapObjects/route12gate.asm b/data/mapObjects/route12gate.asm index 27e8532a..bbfab54c 100755 --- a/data/mapObjects/route12gate.asm +++ b/data/mapObjects/route12gate.asm @@ -1,21 +1,21 @@ Route12GateObject: db $a ; border block - db $5 ; warps - db $0, $4, $0, $ff - db $0, $5, $1, $ff - db $7, $4, $2, $ff - db $7, $5, $2, $ff - db $6, $8, $0, ROUTE_12_GATE_2F + db 5 ; warps + warp 4, 0, 0, -1 + warp 5, 0, 1, -1 + warp 4, 7, 2, -1 + warp 5, 7, 2, -1 + warp 8, 6, 0, ROUTE_12_GATE_2F - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $1, $3, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 1, 3, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP ROUTE_12_GATE_1F_WIDTH, $0, $4 - EVENT_DISP ROUTE_12_GATE_1F_WIDTH, $0, $5 - EVENT_DISP ROUTE_12_GATE_1F_WIDTH, $7, $4 - EVENT_DISP ROUTE_12_GATE_1F_WIDTH, $7, $5 - EVENT_DISP ROUTE_12_GATE_1F_WIDTH, $6, $8 ; ROUTE_12_GATE_2F + warp_to 4, 0, ROUTE_12_GATE_1F_WIDTH + warp_to 5, 0, ROUTE_12_GATE_1F_WIDTH + warp_to 4, 7, ROUTE_12_GATE_1F_WIDTH + warp_to 5, 7, ROUTE_12_GATE_1F_WIDTH + warp_to 8, 6, ROUTE_12_GATE_1F_WIDTH ; ROUTE_12_GATE_2F diff --git a/data/mapObjects/route12gateupstairs.asm b/data/mapObjects/route12gateupstairs.asm index f1221c44..9351ebac 100755 --- a/data/mapObjects/route12gateupstairs.asm +++ b/data/mapObjects/route12gateupstairs.asm @@ -1,15 +1,15 @@ Route12GateUpstairsObject: db $a ; border block - db $1 ; warps - db $7, $7, $4, ROUTE_12_GATE_1F + db 1 ; warps + warp 7, 7, 4, ROUTE_12_GATE_1F - db $2 ; signs - db $2, $1, $2 ; Route12GateUpstairsText2 - db $2, $6, $3 ; Route12GateUpstairsText3 + db 2 ; signs + sign 1, 2, 2 ; Route12GateUpstairsText2 + sign 6, 2, 3 ; Route12GateUpstairsText3 - db $1 ; objects - object SPRITE_BRUNETTE_GIRL, $3, $4, WALK, $1, $1 ; person + db 1 ; objects + object SPRITE_BRUNETTE_GIRL, 3, 4, WALK, 1, 1 ; person ; warp-to - EVENT_DISP ROUTE_12_GATE_2F_WIDTH, $7, $7 ; ROUTE_12_GATE_1F + warp_to 7, 7, ROUTE_12_GATE_2F_WIDTH ; ROUTE_12_GATE_1F diff --git a/data/mapObjects/route12house.asm b/data/mapObjects/route12house.asm index 104b01f7..3161ebe6 100755 --- a/data/mapObjects/route12house.asm +++ b/data/mapObjects/route12house.asm @@ -1,15 +1,15 @@ Route12HouseObject: db $a ; border block - db $2 ; warps - db $7, $2, $3, $ff - db $7, $3, $3, $ff + db 2 ; warps + warp 2, 7, 3, -1 + warp 3, 7, 3, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FISHER, $2, $4, STAY, RIGHT, $1 ; person + db 1 ; objects + object SPRITE_FISHER, 2, 4, STAY, RIGHT, 1 ; person ; warp-to - EVENT_DISP ROUTE_12_HOUSE_WIDTH, $7, $2 - EVENT_DISP ROUTE_12_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, ROUTE_12_HOUSE_WIDTH + warp_to 3, 7, ROUTE_12_HOUSE_WIDTH diff --git a/data/mapObjects/route13.asm b/data/mapObjects/route13.asm index a01e25a3..b2a40c2c 100755 --- a/data/mapObjects/route13.asm +++ b/data/mapObjects/route13.asm @@ -1,21 +1,21 @@ Route13Object: db $43 ; border block - db $0 ; warps + db 0 ; warps - db $3 ; signs - db $d, $f, $b ; Route13Text11 - db $5, $21, $c ; Route13Text12 - db $b, $1f, $d ; Route13Text13 + db 3 ; signs + sign 15, 13, 11 ; Route13Text11 + sign 33, 5, 12 ; Route13Text12 + sign 31, 11, 13 ; Route13Text13 - db $a ; objects - object SPRITE_BLACK_HAIR_BOY_1, $31, $a, STAY, RIGHT, $1, OPP_BIRD_KEEPER, $1 - object SPRITE_LASS, $30, $a, STAY, DOWN, $2, OPP_JR_TRAINER_F, $c - object SPRITE_LASS, $1b, $9, STAY, DOWN, $3, OPP_JR_TRAINER_F, $d - object SPRITE_LASS, $17, $a, STAY, LEFT, $4, OPP_JR_TRAINER_F, $e - object SPRITE_LASS, $32, $5, STAY, DOWN, $5, OPP_JR_TRAINER_F, $f - object SPRITE_BLACK_HAIR_BOY_1, $c, $4, STAY, RIGHT, $6, OPP_BIRD_KEEPER, $2 - object SPRITE_FOULARD_WOMAN, $21, $6, STAY, DOWN, $7, OPP_BEAUTY, $4 - object SPRITE_FOULARD_WOMAN, $20, $6, STAY, DOWN, $8, OPP_BEAUTY, $5 - object SPRITE_BIKER, $a, $7, STAY, UP, $9, OPP_BIKER, $1 - object SPRITE_BLACK_HAIR_BOY_1, $7, $d, STAY, UP, $a, OPP_BIRD_KEEPER, $3 + db 10 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 49, 10, STAY, RIGHT, 1, OPP_BIRD_KEEPER, 1 + object SPRITE_LASS, 48, 10, STAY, DOWN, 2, OPP_JR_TRAINER_F, 12 + object SPRITE_LASS, 27, 9, STAY, DOWN, 3, OPP_JR_TRAINER_F, 13 + object SPRITE_LASS, 23, 10, STAY, LEFT, 4, OPP_JR_TRAINER_F, 14 + object SPRITE_LASS, 50, 5, STAY, DOWN, 5, OPP_JR_TRAINER_F, 15 + object SPRITE_BLACK_HAIR_BOY_1, 12, 4, STAY, RIGHT, 6, OPP_BIRD_KEEPER, 2 + object SPRITE_FOULARD_WOMAN, 33, 6, STAY, DOWN, 7, OPP_BEAUTY, 4 + object SPRITE_FOULARD_WOMAN, 32, 6, STAY, DOWN, 8, OPP_BEAUTY, 5 + object SPRITE_BIKER, 10, 7, STAY, UP, 9, OPP_BIKER, 1 + object SPRITE_BLACK_HAIR_BOY_1, 7, 13, STAY, UP, 10, OPP_BIRD_KEEPER, 3 diff --git a/data/mapObjects/route14.asm b/data/mapObjects/route14.asm index 48edd284..9694715b 100755 --- a/data/mapObjects/route14.asm +++ b/data/mapObjects/route14.asm @@ -1,19 +1,19 @@ Route14Object: db $43 ; border block - db $0 ; warps + db 0 ; warps - db $1 ; signs - db $d, $11, $b ; Route14Text11 + db 1 ; signs + sign 17, 13, 11 ; Route14Text11 - db $a ; objects - object SPRITE_BLACK_HAIR_BOY_1, $4, $4, STAY, DOWN, $1, OPP_BIRD_KEEPER, $e - object SPRITE_BLACK_HAIR_BOY_1, $f, $6, STAY, DOWN, $2, OPP_BIRD_KEEPER, $f - object SPRITE_BLACK_HAIR_BOY_1, $c, $b, STAY, DOWN, $3, OPP_BIRD_KEEPER, $10 - object SPRITE_BLACK_HAIR_BOY_1, $e, $f, STAY, UP, $4, OPP_BIRD_KEEPER, $11 - object SPRITE_BLACK_HAIR_BOY_1, $f, $1f, STAY, LEFT, $5, OPP_BIRD_KEEPER, $4 - object SPRITE_BLACK_HAIR_BOY_1, $6, $31, STAY, UP, $6, OPP_BIRD_KEEPER, $5 - object SPRITE_BIKER, $5, $27, STAY, DOWN, $7, OPP_BIKER, $d - object SPRITE_BIKER, $4, $1e, STAY, RIGHT, $8, OPP_BIKER, $e - object SPRITE_BIKER, $f, $1e, STAY, LEFT, $9, OPP_BIKER, $f - object SPRITE_BIKER, $4, $1f, STAY, RIGHT, $a, OPP_BIKER, $2 + db 10 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 4, 4, STAY, DOWN, 1, OPP_BIRD_KEEPER, 14 + object SPRITE_BLACK_HAIR_BOY_1, 15, 6, STAY, DOWN, 2, OPP_BIRD_KEEPER, 15 + object SPRITE_BLACK_HAIR_BOY_1, 12, 11, STAY, DOWN, 3, OPP_BIRD_KEEPER, 16 + object SPRITE_BLACK_HAIR_BOY_1, 14, 15, STAY, UP, 4, OPP_BIRD_KEEPER, 17 + object SPRITE_BLACK_HAIR_BOY_1, 15, 31, STAY, LEFT, 5, OPP_BIRD_KEEPER, 4 + object SPRITE_BLACK_HAIR_BOY_1, 6, 49, STAY, UP, 6, OPP_BIRD_KEEPER, 5 + object SPRITE_BIKER, 5, 39, STAY, DOWN, 7, OPP_BIKER, 13 + object SPRITE_BIKER, 4, 30, STAY, RIGHT, 8, OPP_BIKER, 14 + object SPRITE_BIKER, 15, 30, STAY, LEFT, 9, OPP_BIKER, 15 + object SPRITE_BIKER, 4, 31, STAY, RIGHT, 10, OPP_BIKER, 2 diff --git a/data/mapObjects/route15.asm b/data/mapObjects/route15.asm index 1d83b20d..21fd2d97 100755 --- a/data/mapObjects/route15.asm +++ b/data/mapObjects/route15.asm @@ -1,30 +1,30 @@ Route15Object: db $43 ; border block - db $4 ; warps - db $8, $7, $0, ROUTE_15_GATE_1F - db $9, $7, $1, ROUTE_15_GATE_1F - db $8, $e, $2, ROUTE_15_GATE_1F - db $9, $e, $3, ROUTE_15_GATE_1F + db 4 ; warps + warp 7, 8, 0, ROUTE_15_GATE_1F + warp 7, 9, 1, ROUTE_15_GATE_1F + warp 14, 8, 2, ROUTE_15_GATE_1F + warp 14, 9, 3, ROUTE_15_GATE_1F - db $1 ; signs - db $9, $27, $c ; Route15Text12 + db 1 ; signs + sign 39, 9, 12 ; Route15Text12 - db $b ; objects - object SPRITE_LASS, $29, $b, STAY, DOWN, $1, OPP_JR_TRAINER_F, $14 - object SPRITE_LASS, $35, $a, STAY, LEFT, $2, OPP_JR_TRAINER_F, $15 - object SPRITE_BLACK_HAIR_BOY_1, $1f, $d, STAY, UP, $3, OPP_BIRD_KEEPER, $6 - object SPRITE_BLACK_HAIR_BOY_1, $23, $d, STAY, UP, $4, OPP_BIRD_KEEPER, $7 - object SPRITE_FOULARD_WOMAN, $35, $b, STAY, DOWN, $5, OPP_BEAUTY, $9 - object SPRITE_FOULARD_WOMAN, $29, $a, STAY, RIGHT, $6, OPP_BEAUTY, $a - object SPRITE_BIKER, $30, $a, STAY, DOWN, $7, OPP_BIKER, $3 - object SPRITE_BIKER, $2e, $a, STAY, DOWN, $8, OPP_BIKER, $4 - object SPRITE_LASS, $25, $5, STAY, RIGHT, $9, OPP_JR_TRAINER_F, $16 - object SPRITE_LASS, $12, $d, STAY, UP, $a, OPP_JR_TRAINER_F, $17 - object SPRITE_BALL, $12, $5, STAY, NONE, $b, TM_20 + db 11 ; objects + object SPRITE_LASS, 41, 11, STAY, DOWN, 1, OPP_JR_TRAINER_F, 20 + object SPRITE_LASS, 53, 10, STAY, LEFT, 2, OPP_JR_TRAINER_F, 21 + object SPRITE_BLACK_HAIR_BOY_1, 31, 13, STAY, UP, 3, OPP_BIRD_KEEPER, 6 + object SPRITE_BLACK_HAIR_BOY_1, 35, 13, STAY, UP, 4, OPP_BIRD_KEEPER, 7 + object SPRITE_FOULARD_WOMAN, 53, 11, STAY, DOWN, 5, OPP_BEAUTY, 9 + object SPRITE_FOULARD_WOMAN, 41, 10, STAY, RIGHT, 6, OPP_BEAUTY, 10 + object SPRITE_BIKER, 48, 10, STAY, DOWN, 7, OPP_BIKER, 3 + object SPRITE_BIKER, 46, 10, STAY, DOWN, 8, OPP_BIKER, 4 + object SPRITE_LASS, 37, 5, STAY, RIGHT, 9, OPP_JR_TRAINER_F, 22 + object SPRITE_LASS, 18, 13, STAY, UP, 10, OPP_JR_TRAINER_F, 23 + object SPRITE_BALL, 18, 5, STAY, NONE, 11, TM_20 ; warp-to - EVENT_DISP ROUTE_15_WIDTH, $8, $7 ; ROUTE_15_GATE_1F - EVENT_DISP ROUTE_15_WIDTH, $9, $7 ; ROUTE_15_GATE_1F - EVENT_DISP ROUTE_15_WIDTH, $8, $e ; ROUTE_15_GATE_1F - EVENT_DISP ROUTE_15_WIDTH, $9, $e ; ROUTE_15_GATE_1F + warp_to 7, 8, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F + warp_to 7, 9, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F + warp_to 14, 8, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F + warp_to 14, 9, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F diff --git a/data/mapObjects/route15gate.asm b/data/mapObjects/route15gate.asm index 06a6790a..13c39674 100755 --- a/data/mapObjects/route15gate.asm +++ b/data/mapObjects/route15gate.asm @@ -1,21 +1,21 @@ Route15GateObject: db $a ; border block - db $5 ; warps - db $4, $0, $0, $ff - db $5, $0, $1, $ff - db $4, $7, $2, $ff - db $5, $7, $3, $ff - db $8, $6, $0, ROUTE_15_GATE_2F + db 5 ; warps + warp 0, 4, 0, -1 + warp 0, 5, 1, -1 + warp 7, 4, 2, -1 + warp 7, 5, 3, -1 + warp 6, 8, 0, ROUTE_15_GATE_2F - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $4, $1, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 4, 1, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP ROUTE_15_GATE_1F_WIDTH, $4, $0 - EVENT_DISP ROUTE_15_GATE_1F_WIDTH, $5, $0 - EVENT_DISP ROUTE_15_GATE_1F_WIDTH, $4, $7 - EVENT_DISP ROUTE_15_GATE_1F_WIDTH, $5, $7 - EVENT_DISP ROUTE_15_GATE_1F_WIDTH, $8, $6 ; ROUTE_15_GATE_2F + warp_to 0, 4, ROUTE_15_GATE_1F_WIDTH + warp_to 0, 5, ROUTE_15_GATE_1F_WIDTH + warp_to 7, 4, ROUTE_15_GATE_1F_WIDTH + warp_to 7, 5, ROUTE_15_GATE_1F_WIDTH + warp_to 6, 8, ROUTE_15_GATE_1F_WIDTH ; ROUTE_15_GATE_2F diff --git a/data/mapObjects/route15gateupstairs.asm b/data/mapObjects/route15gateupstairs.asm index c4cdcea8..ff180883 100755 --- a/data/mapObjects/route15gateupstairs.asm +++ b/data/mapObjects/route15gateupstairs.asm @@ -1,14 +1,14 @@ Route15GateUpstairsObject: db $a ; border block - db $1 ; warps - db $7, $7, $4, ROUTE_15_GATE_1F + db 1 ; warps + warp 7, 7, 4, ROUTE_15_GATE_1F - db $1 ; signs - db $2, $6, $2 ; Route15GateUpstairsText2 + db 1 ; signs + sign 6, 2, 2 ; Route15GateUpstairsText2 - db $1 ; objects - object SPRITE_OAK_AIDE, $4, $2, STAY, DOWN, $1 + db 1 ; objects + object SPRITE_OAK_AIDE, 4, 2, STAY, DOWN, 1 ; warp-to - EVENT_DISP ROUTE_15_GATE_2F_WIDTH, $7, $7 ; ROUTE_15_GATE_1F + warp_to 7, 7, ROUTE_15_GATE_2F_WIDTH ; ROUTE_15_GATE_1F diff --git a/data/mapObjects/route16.asm b/data/mapObjects/route16.asm index a342d106..35ffea17 100755 --- a/data/mapObjects/route16.asm +++ b/data/mapObjects/route16.asm @@ -1,37 +1,37 @@ Route16Object: db $f ; border block - db $9 ; warps - db $a, $11, $0, ROUTE_16_GATE_1F - db $b, $11, $1, ROUTE_16_GATE_1F - db $a, $18, $2, ROUTE_16_GATE_1F - db $b, $18, $3, ROUTE_16_GATE_1F - db $4, $11, $4, ROUTE_16_GATE_1F - db $5, $11, $5, ROUTE_16_GATE_1F - db $4, $18, $6, ROUTE_16_GATE_1F - db $5, $18, $7, ROUTE_16_GATE_1F - db $5, $7, $0, ROUTE_16_HOUSE + db 9 ; warps + warp 17, 10, 0, ROUTE_16_GATE_1F + warp 17, 11, 1, ROUTE_16_GATE_1F + warp 24, 10, 2, ROUTE_16_GATE_1F + warp 24, 11, 3, ROUTE_16_GATE_1F + warp 17, 4, 4, ROUTE_16_GATE_1F + warp 17, 5, 5, ROUTE_16_GATE_1F + warp 24, 4, 6, ROUTE_16_GATE_1F + warp 24, 5, 7, ROUTE_16_GATE_1F + warp 7, 5, 0, ROUTE_16_HOUSE - db $2 ; signs - db $b, $1b, $8 ; Route16Text8 - db $11, $5, $9 ; Route16Text9 + db 2 ; signs + sign 27, 11, 8 ; Route16Text8 + sign 5, 17, 9 ; Route16Text9 - db $7 ; objects - object SPRITE_BIKER, $11, $c, STAY, LEFT, $1, OPP_BIKER, $5 - object SPRITE_BIKER, $e, $d, STAY, RIGHT, $2, OPP_CUE_BALL, $1 - object SPRITE_BIKER, $b, $c, STAY, UP, $3, OPP_CUE_BALL, $2 - object SPRITE_BIKER, $9, $b, STAY, LEFT, $4, OPP_BIKER, $6 - object SPRITE_BIKER, $6, $a, STAY, RIGHT, $5, OPP_CUE_BALL, $3 - object SPRITE_BIKER, $3, $c, STAY, RIGHT, $6, OPP_BIKER, $7 - object SPRITE_SNORLAX, $1a, $a, STAY, DOWN, $7 ; person + db 7 ; objects + object SPRITE_BIKER, 17, 12, STAY, LEFT, 1, OPP_BIKER, 5 + object SPRITE_BIKER, 14, 13, STAY, RIGHT, 2, OPP_CUE_BALL, 1 + object SPRITE_BIKER, 11, 12, STAY, UP, 3, OPP_CUE_BALL, 2 + object SPRITE_BIKER, 9, 11, STAY, LEFT, 4, OPP_BIKER, 6 + object SPRITE_BIKER, 6, 10, STAY, RIGHT, 5, OPP_CUE_BALL, 3 + object SPRITE_BIKER, 3, 12, STAY, RIGHT, 6, OPP_BIKER, 7 + object SPRITE_SNORLAX, 26, 10, STAY, DOWN, 7 ; person ; warp-to - EVENT_DISP ROUTE_16_WIDTH, $a, $11 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $b, $11 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $a, $18 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $b, $18 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $4, $11 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $5, $11 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $4, $18 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $5, $18 ; ROUTE_16_GATE_1F - EVENT_DISP ROUTE_16_WIDTH, $5, $7 ; ROUTE_16_HOUSE + warp_to 17, 10, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 17, 11, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 24, 10, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 24, 11, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 17, 4, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 17, 5, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 24, 4, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 24, 5, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F + warp_to 7, 5, ROUTE_16_WIDTH ; ROUTE_16_HOUSE diff --git a/data/mapObjects/route16gate.asm b/data/mapObjects/route16gate.asm index fce6c292..4e1863ed 100755 --- a/data/mapObjects/route16gate.asm +++ b/data/mapObjects/route16gate.asm @@ -1,30 +1,30 @@ Route16GateObject: db $a ; border block - db $9 ; warps - db $8, $0, $0, $ff - db $9, $0, $1, $ff - db $8, $7, $2, $ff - db $9, $7, $2, $ff - db $2, $0, $4, $ff - db $3, $0, $5, $ff - db $2, $7, $6, $ff - db $3, $7, $7, $ff - db $c, $6, $0, ROUTE_16_GATE_2F + db 9 ; warps + warp 0, 8, 0, -1 + warp 0, 9, 1, -1 + warp 7, 8, 2, -1 + warp 7, 9, 2, -1 + warp 0, 2, 4, -1 + warp 0, 3, 5, -1 + warp 7, 2, 6, -1 + warp 7, 3, 7, -1 + warp 6, 12, 0, ROUTE_16_GATE_2F - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_GUARD, $4, $5, STAY, DOWN, $1 ; person - object SPRITE_GAMBLER, $4, $3, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_GUARD, 4, 5, STAY, DOWN, 1 ; person + object SPRITE_GAMBLER, 4, 3, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $8, $0 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $9, $0 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $8, $7 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $9, $7 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $2, $0 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $3, $0 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $2, $7 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $3, $7 - EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $c, $6 ; ROUTE_16_GATE_2F + warp_to 0, 8, ROUTE_16_GATE_1F_WIDTH + warp_to 0, 9, ROUTE_16_GATE_1F_WIDTH + warp_to 7, 8, ROUTE_16_GATE_1F_WIDTH + warp_to 7, 9, ROUTE_16_GATE_1F_WIDTH + warp_to 0, 2, ROUTE_16_GATE_1F_WIDTH + warp_to 0, 3, ROUTE_16_GATE_1F_WIDTH + warp_to 7, 2, ROUTE_16_GATE_1F_WIDTH + warp_to 7, 3, ROUTE_16_GATE_1F_WIDTH + warp_to 6, 12, ROUTE_16_GATE_1F_WIDTH ; ROUTE_16_GATE_2F diff --git a/data/mapObjects/route16gateupstairs.asm b/data/mapObjects/route16gateupstairs.asm index 9119bf5e..41487e6e 100755 --- a/data/mapObjects/route16gateupstairs.asm +++ b/data/mapObjects/route16gateupstairs.asm @@ -1,16 +1,16 @@ Route16GateUpstairsObject: db $a ; border block - db $1 ; warps - db $7, $7, $8, ROUTE_16_GATE_1F + db 1 ; warps + warp 7, 7, 8, ROUTE_16_GATE_1F - db $2 ; signs - db $2, $1, $3 ; Route16GateUpstairsText3 - db $2, $6, $4 ; Route16GateUpstairsText4 + db 2 ; signs + sign 1, 2, 3 ; Route16GateUpstairsText3 + sign 6, 2, 4 ; Route16GateUpstairsText4 - db $2 ; objects - object SPRITE_YOUNG_BOY, $4, $2, STAY, NONE, $1 ; person - object SPRITE_LITTLE_GIRL, $2, $5, WALK, $2, $2 ; person + db 2 ; objects + object SPRITE_YOUNG_BOY, 4, 2, STAY, NONE, 1 ; person + object SPRITE_LITTLE_GIRL, 2, 5, WALK, 2, 2 ; person ; warp-to - EVENT_DISP ROUTE_16_GATE_2F_WIDTH, $7, $7 ; ROUTE_16_GATE_1F + warp_to 7, 7, ROUTE_16_GATE_2F_WIDTH ; ROUTE_16_GATE_1F diff --git a/data/mapObjects/route16house.asm b/data/mapObjects/route16house.asm index e1e4244d..7a097105 100755 --- a/data/mapObjects/route16house.asm +++ b/data/mapObjects/route16house.asm @@ -1,16 +1,16 @@ Route16HouseObject: db $a ; border block - db $2 ; warps - db $7, $2, $8, $ff - db $7, $3, $8, $ff + db 2 ; warps + warp 2, 7, 8, -1 + warp 3, 7, 8, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BRUNETTE_GIRL, $2, $3, STAY, RIGHT, $1 ; person - object SPRITE_BIRD, $6, $4, WALK, $0, $2 ; person + db 2 ; objects + object SPRITE_BRUNETTE_GIRL, 2, 3, STAY, RIGHT, 1 ; person + object SPRITE_BIRD, 6, 4, WALK, 0, 2 ; person ; warp-to - EVENT_DISP ROUTE_16_HOUSE_WIDTH, $7, $2 - EVENT_DISP ROUTE_16_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, ROUTE_16_HOUSE_WIDTH + warp_to 3, 7, ROUTE_16_HOUSE_WIDTH diff --git a/data/mapObjects/route17.asm b/data/mapObjects/route17.asm index 3c8e3bce..48750597 100755 --- a/data/mapObjects/route17.asm +++ b/data/mapObjects/route17.asm @@ -1,24 +1,24 @@ Route17Object: db $43 ; border block - db $0 ; warps + db 0 ; warps - db $6 ; signs - db $33, $9, $b ; Route17Text11 - db $3f, $9, $c ; Route17Text12 - db $4b, $9, $d ; Route17Text13 - db $57, $9, $e ; Route17Text14 - db $6f, $9, $f ; Route17Text15 - db $8d, $9, $10 ; Route17Text16 + db 6 ; signs + sign 9, 51, 11 ; Route17Text11 + sign 9, 63, 12 ; Route17Text12 + sign 9, 75, 13 ; Route17Text13 + sign 9, 87, 14 ; Route17Text14 + sign 9, 111, 15 ; Route17Text15 + sign 9, 141, 16 ; Route17Text16 - db $a ; objects - object SPRITE_BIKER, $c, $13, STAY, LEFT, $1, OPP_CUE_BALL, $4 - object SPRITE_BIKER, $b, $10, STAY, RIGHT, $2, OPP_CUE_BALL, $5 - object SPRITE_BIKER, $4, $12, STAY, UP, $3, OPP_BIKER, $8 - object SPRITE_BIKER, $7, $20, STAY, LEFT, $4, OPP_BIKER, $9 - object SPRITE_BIKER, $e, $22, STAY, RIGHT, $5, OPP_BIKER, $a - object SPRITE_BIKER, $11, $3a, STAY, LEFT, $6, OPP_CUE_BALL, $6 - object SPRITE_BIKER, $2, $44, STAY, RIGHT, $7, OPP_CUE_BALL, $7 - object SPRITE_BIKER, $e, $62, STAY, RIGHT, $8, OPP_CUE_BALL, $8 - object SPRITE_BIKER, $5, $62, STAY, LEFT, $9, OPP_BIKER, $b - object SPRITE_BIKER, $a, $76, STAY, DOWN, $a, OPP_BIKER, $c + db 10 ; objects + object SPRITE_BIKER, 12, 19, STAY, LEFT, 1, OPP_CUE_BALL, 4 + object SPRITE_BIKER, 11, 16, STAY, RIGHT, 2, OPP_CUE_BALL, 5 + object SPRITE_BIKER, 4, 18, STAY, UP, 3, OPP_BIKER, 8 + object SPRITE_BIKER, 7, 32, STAY, LEFT, 4, OPP_BIKER, 9 + object SPRITE_BIKER, 14, 34, STAY, RIGHT, 5, OPP_BIKER, 10 + object SPRITE_BIKER, 17, 58, STAY, LEFT, 6, OPP_CUE_BALL, 6 + object SPRITE_BIKER, 2, 68, STAY, RIGHT, 7, OPP_CUE_BALL, 7 + object SPRITE_BIKER, 14, 98, STAY, RIGHT, 8, OPP_CUE_BALL, 8 + object SPRITE_BIKER, 5, 98, STAY, LEFT, 9, OPP_BIKER, 11 + object SPRITE_BIKER, 10, 118, STAY, DOWN, 10, OPP_BIKER, 12 diff --git a/data/mapObjects/route18.asm b/data/mapObjects/route18.asm index 8b36ab7c..d7851f88 100755 --- a/data/mapObjects/route18.asm +++ b/data/mapObjects/route18.asm @@ -1,23 +1,23 @@ Route18Object: db $43 ; border block - db $4 ; warps - db $8, $21, $0, ROUTE_18_GATE_1F - db $9, $21, $1, ROUTE_18_GATE_1F - db $8, $28, $2, ROUTE_18_GATE_1F - db $9, $28, $3, ROUTE_18_GATE_1F + db 4 ; warps + warp 33, 8, 0, ROUTE_18_GATE_1F + warp 33, 9, 1, ROUTE_18_GATE_1F + warp 40, 8, 2, ROUTE_18_GATE_1F + warp 40, 9, 3, ROUTE_18_GATE_1F - db $2 ; signs - db $7, $2b, $4 ; Route18Text4 - db $5, $21, $5 ; Route18Text5 + db 2 ; signs + sign 43, 7, 4 ; Route18Text4 + sign 33, 5, 5 ; Route18Text5 - db $3 ; objects - object SPRITE_BLACK_HAIR_BOY_1, $24, $b, STAY, RIGHT, $1, OPP_BIRD_KEEPER, $8 - object SPRITE_BLACK_HAIR_BOY_1, $28, $f, STAY, LEFT, $2, OPP_BIRD_KEEPER, $9 - object SPRITE_BLACK_HAIR_BOY_1, $2a, $d, STAY, LEFT, $3, OPP_BIRD_KEEPER, $a + db 3 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 36, 11, STAY, RIGHT, 1, OPP_BIRD_KEEPER, 8 + object SPRITE_BLACK_HAIR_BOY_1, 40, 15, STAY, LEFT, 2, OPP_BIRD_KEEPER, 9 + object SPRITE_BLACK_HAIR_BOY_1, 42, 13, STAY, LEFT, 3, OPP_BIRD_KEEPER, 10 ; warp-to - EVENT_DISP ROUTE_18_WIDTH, $8, $21 ; ROUTE_18_GATE_1F - EVENT_DISP ROUTE_18_WIDTH, $9, $21 ; ROUTE_18_GATE_1F - EVENT_DISP ROUTE_18_WIDTH, $8, $28 ; ROUTE_18_GATE_1F - EVENT_DISP ROUTE_18_WIDTH, $9, $28 ; ROUTE_18_GATE_1F + warp_to 33, 8, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F + warp_to 33, 9, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F + warp_to 40, 8, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F + warp_to 40, 9, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F diff --git a/data/mapObjects/route18gate.asm b/data/mapObjects/route18gate.asm index 08b10050..c73d7131 100755 --- a/data/mapObjects/route18gate.asm +++ b/data/mapObjects/route18gate.asm @@ -1,21 +1,21 @@ Route18GateObject: db $a ; border block - db $5 ; warps - db $4, $0, $0, $ff - db $5, $0, $1, $ff - db $4, $7, $2, $ff - db $5, $7, $3, $ff - db $8, $6, $0, ROUTE_18_GATE_2F + db 5 ; warps + warp 0, 4, 0, -1 + warp 0, 5, 1, -1 + warp 7, 4, 2, -1 + warp 7, 5, 3, -1 + warp 6, 8, 0, ROUTE_18_GATE_2F - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $4, $1, STAY, DOWN, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 4, 1, STAY, DOWN, 1 ; person ; warp-to - EVENT_DISP ROUTE_18_GATE_1F_WIDTH, $4, $0 - EVENT_DISP ROUTE_18_GATE_1F_WIDTH, $5, $0 - EVENT_DISP ROUTE_18_GATE_1F_WIDTH, $4, $7 - EVENT_DISP ROUTE_18_GATE_1F_WIDTH, $5, $7 - EVENT_DISP ROUTE_18_GATE_1F_WIDTH, $8, $6 ; ROUTE_18_GATE_2F + warp_to 0, 4, ROUTE_18_GATE_1F_WIDTH + warp_to 0, 5, ROUTE_18_GATE_1F_WIDTH + warp_to 7, 4, ROUTE_18_GATE_1F_WIDTH + warp_to 7, 5, ROUTE_18_GATE_1F_WIDTH + warp_to 6, 8, ROUTE_18_GATE_1F_WIDTH ; ROUTE_18_GATE_2F diff --git a/data/mapObjects/route18gateupstairs.asm b/data/mapObjects/route18gateupstairs.asm index 671b3215..6d298055 100755 --- a/data/mapObjects/route18gateupstairs.asm +++ b/data/mapObjects/route18gateupstairs.asm @@ -1,15 +1,15 @@ Route18GateUpstairsObject: db $a ; border block - db $1 ; warps - db $7, $7, $4, ROUTE_18_GATE_1F + db 1 ; warps + warp 7, 7, 4, ROUTE_18_GATE_1F - db $2 ; signs - db $2, $1, $2 ; Route18GateUpstairsText2 - db $2, $6, $3 ; Route18GateUpstairsText3 + db 2 ; signs + sign 1, 2, 2 ; Route18GateUpstairsText2 + sign 6, 2, 3 ; Route18GateUpstairsText3 - db $1 ; objects - object SPRITE_BUG_CATCHER, $4, $2, WALK, $2, $1 ; person + db 1 ; objects + object SPRITE_BUG_CATCHER, 4, 2, WALK, 2, 1 ; person ; warp-to - EVENT_DISP ROUTE_18_GATE_2F_WIDTH, $7, $7 ; ROUTE_18_GATE_1F + warp_to 7, 7, ROUTE_18_GATE_2F_WIDTH ; ROUTE_18_GATE_1F diff --git a/data/mapObjects/route19.asm b/data/mapObjects/route19.asm index 956caa6e..935b3d4d 100755 --- a/data/mapObjects/route19.asm +++ b/data/mapObjects/route19.asm @@ -1,21 +1,21 @@ Route19Object: db $43 ; border block - db $0 ; warps + db 0 ; warps - db $1 ; signs - db $9, $b, $b ; Route19Text11 + db 1 ; signs + sign 11, 9, 11 ; Route19Text11 - db $a ; objects - object SPRITE_BLACK_HAIR_BOY_1, $8, $7, STAY, LEFT, 1, OPP_SWIMMER, 2 - object SPRITE_BLACK_HAIR_BOY_1, $d, $7, STAY, LEFT, 2, OPP_SWIMMER, 3 - object SPRITE_SWIMMER, $d, $19, STAY, LEFT, $3, OPP_SWIMMER, $4 - object SPRITE_SWIMMER, $4, $1b, STAY, RIGHT, $4, OPP_SWIMMER, $5 - object SPRITE_SWIMMER, $10, $1f, STAY, UP, $5, OPP_SWIMMER, $6 - object SPRITE_SWIMMER, $9, $b, STAY, DOWN, $6, OPP_SWIMMER, $7 - object SPRITE_SWIMMER, $8, $2b, STAY, LEFT, $7, OPP_BEAUTY, $c - object SPRITE_SWIMMER, $b, $2b, STAY, RIGHT, $8, OPP_BEAUTY, $d - object SPRITE_SWIMMER, $9, $2a, STAY, UP, $9, OPP_SWIMMER, $8 - object SPRITE_SWIMMER, $a, $2c, STAY, DOWN, $a, OPP_BEAUTY, $e + db 10 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 8, 7, STAY, LEFT, 1, OPP_SWIMMER, 2 + object SPRITE_BLACK_HAIR_BOY_1, 13, 7, STAY, LEFT, 2, OPP_SWIMMER, 3 + object SPRITE_SWIMMER, 13, 25, STAY, LEFT, 3, OPP_SWIMMER, 4 + object SPRITE_SWIMMER, 4, 27, STAY, RIGHT, 4, OPP_SWIMMER, 5 + object SPRITE_SWIMMER, 16, 31, STAY, UP, 5, OPP_SWIMMER, 6 + object SPRITE_SWIMMER, 9, 11, STAY, DOWN, 6, OPP_SWIMMER, 7 + object SPRITE_SWIMMER, 8, 43, STAY, LEFT, 7, OPP_BEAUTY, 12 + object SPRITE_SWIMMER, 11, 43, STAY, RIGHT, 8, OPP_BEAUTY, 13 + object SPRITE_SWIMMER, 9, 42, STAY, UP, 9, OPP_SWIMMER, 8 + object SPRITE_SWIMMER, 10, 44, STAY, DOWN, 10, OPP_BEAUTY, 14 ; warp-to diff --git a/data/mapObjects/route2.asm b/data/mapObjects/route2.asm index 7db8fe09..b62f9fdb 100755 --- a/data/mapObjects/route2.asm +++ b/data/mapObjects/route2.asm @@ -1,33 +1,33 @@ Route2Object: db $f ; border block - db $6 ; warps - db $9, $c, $0, DIGLETTS_CAVE_EXIT - db $b, $3, $1, VIRIDIAN_FOREST_EXIT - db $13, $f, $0, ROUTE_2_HOUSE - db $23, $10, $1, ROUTE_2_GATE - db $27, $f, $2, ROUTE_2_GATE - db $2b, $3, $2, VIRIDIAN_FOREST_ENTRANCE + db 6 ; warps + warp 12, 9, 0, DIGLETTS_CAVE_EXIT + warp 3, 11, 1, VIRIDIAN_FOREST_EXIT + warp 15, 19, 0, ROUTE_2_HOUSE + warp 16, 35, 1, ROUTE_2_GATE + warp 15, 39, 2, ROUTE_2_GATE + warp 3, 43, 2, VIRIDIAN_FOREST_ENTRANCE - db $2 ; signs - db $41, $5, $3 ; Route2Text3 - db $b, $b, $4 ; Route2Text4 + db 2 ; signs + sign 5, 65, 3 ; Route2Text3 + sign 11, 11, 4 ; Route2Text4 - db $2 ; objects - object SPRITE_BALL, $d, $36, STAY, NONE, $1, MOON_STONE - object SPRITE_BALL, $d, $2d, STAY, NONE, $2, HP_UP + db 2 ; objects + object SPRITE_BALL, 13, 54, STAY, NONE, 1, MOON_STONE + object SPRITE_BALL, 13, 45, STAY, NONE, 2, HP_UP ; warp-to - EVENT_DISP ROUTE_2_WIDTH, $9, $c ; DIGLETTS_CAVE_EXIT - EVENT_DISP ROUTE_2_WIDTH, $b, $3 ; VIRIDIAN_FOREST_EXIT - EVENT_DISP ROUTE_2_WIDTH, $13, $f ; ROUTE_2_HOUSE - EVENT_DISP ROUTE_2_WIDTH, $23, $10 ; ROUTE_2_GATE - EVENT_DISP ROUTE_2_WIDTH, $27, $f ; ROUTE_2_GATE - EVENT_DISP ROUTE_2_WIDTH, $2b, $3 ; VIRIDIAN_FOREST_ENTRANCE + warp_to 12, 9, ROUTE_2_WIDTH ; DIGLETTS_CAVE_EXIT + warp_to 3, 11, ROUTE_2_WIDTH ; VIRIDIAN_FOREST_EXIT + warp_to 15, 19, ROUTE_2_WIDTH ; ROUTE_2_HOUSE + warp_to 16, 35, ROUTE_2_WIDTH ; ROUTE_2_GATE + warp_to 15, 39, ROUTE_2_WIDTH ; ROUTE_2_GATE + warp_to 3, 43, ROUTE_2_WIDTH ; VIRIDIAN_FOREST_ENTRANCE ; unused - EVENT_DISP $4, $7, $2 - db $12, $c7, $9, $7 - EVENT_DISP $4, $7, $2 - EVENT_DISP $4, $7, $2 - EVENT_DISP $4, $7, $2 + warp_to 2, 7, 4 + db $12, $c7, $9, $7 + warp_to 2, 7, 4 + warp_to 2, 7, 4 + warp_to 2, 7, 4 diff --git a/data/mapObjects/route20.asm b/data/mapObjects/route20.asm index a3527525..5f4d5647 100755 --- a/data/mapObjects/route20.asm +++ b/data/mapObjects/route20.asm @@ -1,26 +1,26 @@ Route20Object: db $43 ; border block - db $2 ; warps - db $5, $30, $0, SEAFOAM_ISLANDS_1 - db $9, $3a, $2, SEAFOAM_ISLANDS_1 + db 2 ; warps + warp 48, 5, 0, SEAFOAM_ISLANDS_1 + warp 58, 9, 2, SEAFOAM_ISLANDS_1 - db $2 ; signs - db $7, $33, $b ; Route20Text11 - db $b, $39, $c ; Route20Text12 + db 2 ; signs + sign 51, 7, 11 ; Route20Text11 + sign 57, 11, 12 ; Route20Text12 - db $a ; objects - object SPRITE_SWIMMER, $57, $8, STAY, UP, $1, OPP_SWIMMER, $9 - object SPRITE_SWIMMER, $44, $b, STAY, UP, $2, OPP_BEAUTY, $f - object SPRITE_SWIMMER, $2d, $a, STAY, DOWN, $3, OPP_BEAUTY, $6 - object SPRITE_SWIMMER, $37, $e, STAY, RIGHT, $4, OPP_JR_TRAINER_F, $18 - object SPRITE_SWIMMER, $26, $d, STAY, DOWN, $5, OPP_SWIMMER, $a - object SPRITE_SWIMMER, $57, $d, STAY, UP, $6, OPP_SWIMMER, $b - object SPRITE_BLACK_HAIR_BOY_1, $22, $9, STAY, UP, $7, OPP_BIRD_KEEPER, $b - object SPRITE_SWIMMER, $19, $7, STAY, UP, $8, OPP_BEAUTY, $7 - object SPRITE_SWIMMER, $18, $c, STAY, DOWN, $9, OPP_JR_TRAINER_F, $10 - object SPRITE_SWIMMER, $f, $8, STAY, UP, $a, OPP_BEAUTY, $8 + db 10 ; objects + object SPRITE_SWIMMER, 87, 8, STAY, UP, 1, OPP_SWIMMER, 9 + object SPRITE_SWIMMER, 68, 11, STAY, UP, 2, OPP_BEAUTY, 15 + object SPRITE_SWIMMER, 45, 10, STAY, DOWN, 3, OPP_BEAUTY, 6 + object SPRITE_SWIMMER, 55, 14, STAY, RIGHT, 4, OPP_JR_TRAINER_F, 24 + object SPRITE_SWIMMER, 38, 13, STAY, DOWN, 5, OPP_SWIMMER, 10 + object SPRITE_SWIMMER, 87, 13, STAY, UP, 6, OPP_SWIMMER, 11 + object SPRITE_BLACK_HAIR_BOY_1, 34, 9, STAY, UP, 7, OPP_BIRD_KEEPER, 11 + object SPRITE_SWIMMER, 25, 7, STAY, UP, 8, OPP_BEAUTY, 7 + object SPRITE_SWIMMER, 24, 12, STAY, DOWN, 9, OPP_JR_TRAINER_F, 16 + object SPRITE_SWIMMER, 15, 8, STAY, UP, 10, OPP_BEAUTY, 8 ; warp-to - EVENT_DISP ROUTE_20_WIDTH, $5, $30 ; SEAFOAM_ISLANDS_1 - EVENT_DISP ROUTE_20_WIDTH, $9, $3a ; SEAFOAM_ISLANDS_1 + warp_to 48, 5, ROUTE_20_WIDTH ; SEAFOAM_ISLANDS_1 + warp_to 58, 9, ROUTE_20_WIDTH ; SEAFOAM_ISLANDS_1 diff --git a/data/mapObjects/route21.asm b/data/mapObjects/route21.asm index 1ed7b1cb..bb2409ce 100755 --- a/data/mapObjects/route21.asm +++ b/data/mapObjects/route21.asm @@ -1,17 +1,17 @@ Route21Object: db $43 ; border block - db $0 ; warps + db 0 ; warps - db $0 ; signs + db 0 ; signs - db $9 ; objects - object SPRITE_FISHER2, $4, $18, STAY, LEFT, $1, OPP_FISHER, $7 - object SPRITE_FISHER2, $6, $19, STAY, DOWN, $2, OPP_FISHER, $9 - object SPRITE_SWIMMER, $a, $1f, STAY, UP, $3, OPP_SWIMMER, $c - object SPRITE_SWIMMER, $c, $1e, STAY, RIGHT, $4, OPP_CUE_BALL, $9 - object SPRITE_SWIMMER, $10, $3f, STAY, DOWN, $5, OPP_SWIMMER, $d - object SPRITE_SWIMMER, $5, $47, STAY, RIGHT, $6, OPP_SWIMMER, $e - object SPRITE_SWIMMER, $f, $47, STAY, LEFT, $7, OPP_SWIMMER, $f - object SPRITE_FISHER2, $e, $38, STAY, LEFT, $8, OPP_FISHER, $8 - object SPRITE_FISHER2, $11, $39, STAY, RIGHT, $9, OPP_FISHER, $a + db 9 ; objects + object SPRITE_FISHER2, 4, 24, STAY, LEFT, 1, OPP_FISHER, 7 + object SPRITE_FISHER2, 6, 25, STAY, DOWN, 2, OPP_FISHER, 9 + object SPRITE_SWIMMER, 10, 31, STAY, UP, 3, OPP_SWIMMER, 12 + object SPRITE_SWIMMER, 12, 30, STAY, RIGHT, 4, OPP_CUE_BALL, 9 + object SPRITE_SWIMMER, 16, 63, STAY, DOWN, 5, OPP_SWIMMER, 13 + object SPRITE_SWIMMER, 5, 71, STAY, RIGHT, 6, OPP_SWIMMER, 14 + object SPRITE_SWIMMER, 15, 71, STAY, LEFT, 7, OPP_SWIMMER, 15 + object SPRITE_FISHER2, 14, 56, STAY, LEFT, 8, OPP_FISHER, 8 + object SPRITE_FISHER2, 17, 57, STAY, RIGHT, 9, OPP_FISHER, 10 diff --git a/data/mapObjects/route22.asm b/data/mapObjects/route22.asm index ef568ae8..e91eb792 100755 --- a/data/mapObjects/route22.asm +++ b/data/mapObjects/route22.asm @@ -1,15 +1,15 @@ Route22Object: db $2c ; border block - db $1 ; warps - db $5, $8, $0, ROUTE_22_GATE + db 1 ; warps + warp 8, 5, 0, ROUTE_22_GATE - db $1 ; signs - db $b, $7, $3 ; Route22FrontGateText + db 1 ; signs + sign 7, 11, 3 ; Route22FrontGateText - db $2 ; objects - object SPRITE_BLUE, $19, $5, STAY, NONE, $1 ; person - object SPRITE_BLUE, $19, $5, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_BLUE, 25, 5, STAY, NONE, 1 ; person + object SPRITE_BLUE, 25, 5, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP ROUTE_22_WIDTH, $5, $8 ; ROUTE_22_GATE + warp_to 8, 5, ROUTE_22_WIDTH ; ROUTE_22_GATE diff --git a/data/mapObjects/route22gate.asm b/data/mapObjects/route22gate.asm index 2798311b..aa9512c6 100755 --- a/data/mapObjects/route22gate.asm +++ b/data/mapObjects/route22gate.asm @@ -1,19 +1,19 @@ Route22GateObject: db $a ; border block - db $4 ; warps - db $7, $4, $0, $ff - db $7, $5, $0, $ff - db $0, $4, $0, $ff - db $0, $5, $1, $ff + db 4 ; warps + warp 4, 7, 0, -1 + warp 5, 7, 0, -1 + warp 4, 0, 0, -1 + warp 5, 0, 1, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $6, $2, STAY, LEFT, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 6, 2, STAY, LEFT, 1 ; person ; warp-to - EVENT_DISP ROUTE_22_GATE_WIDTH, $7, $4 - EVENT_DISP ROUTE_22_GATE_WIDTH, $7, $5 - EVENT_DISP ROUTE_22_GATE_WIDTH, $0, $4 - EVENT_DISP ROUTE_22_GATE_WIDTH, $0, $5 + warp_to 4, 7, ROUTE_22_GATE_WIDTH + warp_to 5, 7, ROUTE_22_GATE_WIDTH + warp_to 4, 0, ROUTE_22_GATE_WIDTH + warp_to 5, 0, ROUTE_22_GATE_WIDTH diff --git a/data/mapObjects/route23.asm b/data/mapObjects/route23.asm index 3995e510..2fd3e3d7 100755 --- a/data/mapObjects/route23.asm +++ b/data/mapObjects/route23.asm @@ -1,26 +1,26 @@ Route23Object: db $f ; border block - db $4 ; warps - db $8b, $7, $2, ROUTE_22_GATE - db $8b, $8, $3, ROUTE_22_GATE - db $1f, $4, $0, VICTORY_ROAD_1 - db $1f, $e, $1, VICTORY_ROAD_2 + db 4 ; warps + warp 7, 139, 2, ROUTE_22_GATE + warp 8, 139, 3, ROUTE_22_GATE + warp 4, 31, 0, VICTORY_ROAD_1 + warp 14, 31, 1, VICTORY_ROAD_2 - db $1 ; signs - db $21, $3, $8 ; Route23Text8 + db 1 ; signs + sign 3, 33, 8 ; Route23Text8 - db $7 ; objects - object SPRITE_GUARD, $4, $23, STAY, DOWN, $1 ; person - object SPRITE_GUARD, $a, $38, STAY, DOWN, $2 ; person - object SPRITE_SWIMMER, $8, $55, STAY, DOWN, $3 ; person - object SPRITE_SWIMMER, $b, $60, STAY, DOWN, $4 ; person - object SPRITE_GUARD, $c, $69, STAY, DOWN, $5 ; person - object SPRITE_GUARD, $8, $77, STAY, DOWN, $6 ; person - object SPRITE_GUARD, $8, $88, STAY, DOWN, $7 ; person + db 7 ; objects + object SPRITE_GUARD, 4, 35, STAY, DOWN, 1 ; person + object SPRITE_GUARD, 10, 56, STAY, DOWN, 2 ; person + object SPRITE_SWIMMER, 8, 85, STAY, DOWN, 3 ; person + object SPRITE_SWIMMER, 11, 96, STAY, DOWN, 4 ; person + object SPRITE_GUARD, 12, 105, STAY, DOWN, 5 ; person + object SPRITE_GUARD, 8, 119, STAY, DOWN, 6 ; person + object SPRITE_GUARD, 8, 136, STAY, DOWN, 7 ; person ; warp-to - EVENT_DISP ROUTE_23_WIDTH, $8b, $7 ; ROUTE_22_GATE - EVENT_DISP ROUTE_23_WIDTH, $8b, $8 ; ROUTE_22_GATE - EVENT_DISP ROUTE_23_WIDTH, $1f, $4 ; VICTORY_ROAD_1 - EVENT_DISP ROUTE_23_WIDTH, $1f, $e ; VICTORY_ROAD_2 + warp_to 7, 139, ROUTE_23_WIDTH ; ROUTE_22_GATE + warp_to 8, 139, ROUTE_23_WIDTH ; ROUTE_22_GATE + warp_to 4, 31, ROUTE_23_WIDTH ; VICTORY_ROAD_1 + warp_to 14, 31, ROUTE_23_WIDTH ; VICTORY_ROAD_2 diff --git a/data/mapObjects/route24.asm b/data/mapObjects/route24.asm index 5af90a4b..0fcc1d7b 100755 --- a/data/mapObjects/route24.asm +++ b/data/mapObjects/route24.asm @@ -1,16 +1,16 @@ Route24Object: db $2c ; border block - db $0 ; warps + db 0 ; warps - db $0 ; signs + db 0 ; signs - db $8 ; objects - object SPRITE_BLACK_HAIR_BOY_1, $b, $f, STAY, LEFT, $1, OPP_ROCKET, $6 - object SPRITE_BLACK_HAIR_BOY_1, $5, $14, STAY, UP, $2, OPP_JR_TRAINER_M, $2 - object SPRITE_BLACK_HAIR_BOY_1, $b, $13, STAY, LEFT, $3, OPP_JR_TRAINER_M, $3 - object SPRITE_LASS, $a, $16, STAY, RIGHT, $4, OPP_LASS, $7 - object SPRITE_BUG_CATCHER, $b, $19, STAY, LEFT, $5, OPP_YOUNGSTER, $4 - object SPRITE_LASS, $a, $1c, STAY, RIGHT, $6, OPP_LASS, $8 - object SPRITE_BUG_CATCHER, $b, $1f, STAY, LEFT, $7, OPP_BUG_CATCHER, $9 - object SPRITE_BALL, $a, $5, STAY, NONE, $8, TM_45 + db 8 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 11, 15, STAY, LEFT, 1, OPP_ROCKET, 6 + object SPRITE_BLACK_HAIR_BOY_1, 5, 20, STAY, UP, 2, OPP_JR_TRAINER_M, 2 + object SPRITE_BLACK_HAIR_BOY_1, 11, 19, STAY, LEFT, 3, OPP_JR_TRAINER_M, 3 + object SPRITE_LASS, 10, 22, STAY, RIGHT, 4, OPP_LASS, 7 + object SPRITE_BUG_CATCHER, 11, 25, STAY, LEFT, 5, OPP_YOUNGSTER, 4 + object SPRITE_LASS, 10, 28, STAY, RIGHT, 6, OPP_LASS, 8 + object SPRITE_BUG_CATCHER, 11, 31, STAY, LEFT, 7, OPP_BUG_CATCHER, 9 + object SPRITE_BALL, 10, 5, STAY, NONE, 8, TM_45 diff --git a/data/mapObjects/route25.asm b/data/mapObjects/route25.asm index b26f62ef..3ba5fbdb 100755 --- a/data/mapObjects/route25.asm +++ b/data/mapObjects/route25.asm @@ -1,23 +1,23 @@ Route25Object: db $2c ; border block - db $1 ; warps - db $3, $2d, $0, BILLS_HOUSE + db 1 ; warps + warp 45, 3, 0, BILLS_HOUSE - db $1 ; signs - db $3, $2b, $b ; Route25Text11 + db 1 ; signs + sign 43, 3, 11 ; Route25Text11 - db $a ; objects - object SPRITE_BUG_CATCHER, $e, $2, STAY, DOWN, $1, OPP_YOUNGSTER, $5 - object SPRITE_BUG_CATCHER, $12, $5, STAY, UP, $2, OPP_YOUNGSTER, $6 - object SPRITE_BLACK_HAIR_BOY_1, $18, $4, STAY, DOWN, $3, OPP_JR_TRAINER_M, $2 - object SPRITE_LASS, $12, $8, STAY, RIGHT, $4, OPP_LASS, $9 - object SPRITE_BUG_CATCHER, $20, $3, STAY, LEFT, $5, OPP_YOUNGSTER, $7 - object SPRITE_LASS, $25, $4, STAY, DOWN, $6, OPP_LASS, $a - object SPRITE_HIKER, $8, $4, STAY, RIGHT, $7, OPP_HIKER, $2 - object SPRITE_HIKER, $17, $9, STAY, UP, $8, OPP_HIKER, $3 - object SPRITE_HIKER, $d, $7, STAY, RIGHT, $9, OPP_HIKER, $4 - object SPRITE_BALL, $16, $2, STAY, NONE, $a, TM_19 + db 10 ; objects + object SPRITE_BUG_CATCHER, 14, 2, STAY, DOWN, 1, OPP_YOUNGSTER, 5 + object SPRITE_BUG_CATCHER, 18, 5, STAY, UP, 2, OPP_YOUNGSTER, 6 + object SPRITE_BLACK_HAIR_BOY_1, 24, 4, STAY, DOWN, 3, OPP_JR_TRAINER_M, 2 + object SPRITE_LASS, 18, 8, STAY, RIGHT, 4, OPP_LASS, 9 + object SPRITE_BUG_CATCHER, 32, 3, STAY, LEFT, 5, OPP_YOUNGSTER, 7 + object SPRITE_LASS, 37, 4, STAY, DOWN, 6, OPP_LASS, 10 + object SPRITE_HIKER, 8, 4, STAY, RIGHT, 7, OPP_HIKER, 2 + object SPRITE_HIKER, 23, 9, STAY, UP, 8, OPP_HIKER, 3 + object SPRITE_HIKER, 13, 7, STAY, RIGHT, 9, OPP_HIKER, 4 + object SPRITE_BALL, 22, 2, STAY, NONE, 10, TM_19 ; warp-to - EVENT_DISP ROUTE_25_WIDTH, $3, $2d ; BILLS_HOUSE + warp_to 45, 3, ROUTE_25_WIDTH ; BILLS_HOUSE diff --git a/data/mapObjects/route2gate.asm b/data/mapObjects/route2gate.asm index 53590f69..714b8ee6 100755 --- a/data/mapObjects/route2gate.asm +++ b/data/mapObjects/route2gate.asm @@ -1,20 +1,20 @@ Route2GateObject: db $a ; border block - db $4 ; warps - db $0, $4, $3, $ff - db $0, $5, $3, $ff - db $7, $4, $4, $ff - db $7, $5, $4, $ff + db 4 ; warps + warp 4, 0, 3, -1 + warp 5, 0, 3, -1 + warp 4, 7, 4, -1 + warp 5, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_OAK_AIDE, $1, $4, STAY, LEFT, $1 ; person - object SPRITE_BUG_CATCHER, $5, $4, WALK, $2, $2 ; person + db 2 ; objects + object SPRITE_OAK_AIDE, 1, 4, STAY, LEFT, 1 ; person + object SPRITE_BUG_CATCHER, 5, 4, WALK, 2, 2 ; person ; warp-to - EVENT_DISP ROUTE_2_GATE_WIDTH, $0, $4 - EVENT_DISP ROUTE_2_GATE_WIDTH, $0, $5 - EVENT_DISP ROUTE_2_GATE_WIDTH, $7, $4 - EVENT_DISP ROUTE_2_GATE_WIDTH, $7, $5 + warp_to 4, 0, ROUTE_2_GATE_WIDTH + warp_to 5, 0, ROUTE_2_GATE_WIDTH + warp_to 4, 7, ROUTE_2_GATE_WIDTH + warp_to 5, 7, ROUTE_2_GATE_WIDTH diff --git a/data/mapObjects/route2house.asm b/data/mapObjects/route2house.asm index d6665020..b27b65ef 100755 --- a/data/mapObjects/route2house.asm +++ b/data/mapObjects/route2house.asm @@ -1,16 +1,16 @@ Route2HouseObject: db $a ; border block - db $2 ; warps - db $7, $2, $2, $ff - db $7, $3, $2, $ff + db 2 ; warps + warp 2, 7, 2, -1 + warp 3, 7, 2, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_OAK_AIDE, $2, $4, STAY, RIGHT, $1 ; person - object SPRITE_GAMEBOY_KID_COPY, $4, $1, STAY, DOWN, $2 ; person + db 2 ; objects + object SPRITE_OAK_AIDE, 2, 4, STAY, RIGHT, 1 ; person + object SPRITE_GAMEBOY_KID_COPY, 4, 1, STAY, DOWN, 2 ; person ; warp-to - EVENT_DISP ROUTE_2_HOUSE_WIDTH, $7, $2 - EVENT_DISP ROUTE_2_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, ROUTE_2_HOUSE_WIDTH + warp_to 3, 7, ROUTE_2_HOUSE_WIDTH diff --git a/data/mapObjects/route3.asm b/data/mapObjects/route3.asm index ba446dca..422fa29b 100755 --- a/data/mapObjects/route3.asm +++ b/data/mapObjects/route3.asm @@ -1,18 +1,18 @@ Route3Object: db $2c ; border block - db $0 ; warps + db 0 ; warps - db $1 ; signs - db $9, $3b, $a ; Route3Text10 + db 1 ; signs + sign 59, 9, 10 ; Route3Text10 - db $9 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $39, $b, STAY, NONE, $1 ; person - object SPRITE_BUG_CATCHER, $a, $6, STAY, RIGHT, $2, OPP_BUG_CATCHER, $4 - object SPRITE_BUG_CATCHER, $e, $4, STAY, DOWN, $3, OPP_YOUNGSTER, $1 - object SPRITE_LASS, $10, $9, STAY, LEFT, $4, OPP_LASS, $1 - object SPRITE_BUG_CATCHER, $13, $5, STAY, DOWN, $5, OPP_BUG_CATCHER, $5 - object SPRITE_LASS, $17, $4, STAY, LEFT, $6, OPP_LASS, $2 - object SPRITE_BUG_CATCHER, $16, $9, STAY, LEFT, $7, OPP_YOUNGSTER, $2 - object SPRITE_BUG_CATCHER, $18, $6, STAY, RIGHT, $8, OPP_BUG_CATCHER, $6 - object SPRITE_LASS, $21, $a, STAY, UP, $9, OPP_LASS, $3 + db 9 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 57, 11, STAY, NONE, 1 ; person + object SPRITE_BUG_CATCHER, 10, 6, STAY, RIGHT, 2, OPP_BUG_CATCHER, 4 + object SPRITE_BUG_CATCHER, 14, 4, STAY, DOWN, 3, OPP_YOUNGSTER, 1 + object SPRITE_LASS, 16, 9, STAY, LEFT, 4, OPP_LASS, 1 + object SPRITE_BUG_CATCHER, 19, 5, STAY, DOWN, 5, OPP_BUG_CATCHER, 5 + object SPRITE_LASS, 23, 4, STAY, LEFT, 6, OPP_LASS, 2 + object SPRITE_BUG_CATCHER, 22, 9, STAY, LEFT, 7, OPP_YOUNGSTER, 2 + object SPRITE_BUG_CATCHER, 24, 6, STAY, RIGHT, 8, OPP_BUG_CATCHER, 6 + object SPRITE_LASS, 33, 10, STAY, UP, 9, OPP_LASS, 3 diff --git a/data/mapObjects/route4.asm b/data/mapObjects/route4.asm index e52f4909..7d09c28a 100755 --- a/data/mapObjects/route4.asm +++ b/data/mapObjects/route4.asm @@ -1,22 +1,22 @@ Route4Object: db $2c ; border block - db $3 ; warps - db $5, $b, $0, MT_MOON_POKECENTER - db $5, $12, $0, MT_MOON_1 - db $5, $18, $7, MT_MOON_2 + db 3 ; warps + warp 11, 5, 0, MT_MOON_POKECENTER + warp 18, 5, 0, MT_MOON_1 + warp 24, 5, 7, MT_MOON_2 - db $3 ; signs - db $5, $c, $4 ; PokeCenterSignText - db $7, $11, $5 ; Route4Text5 - db $7, $1b, $6 ; Route4Text6 + db 3 ; signs + sign 12, 5, 4 ; PokeCenterSignText + sign 17, 7, 5 ; Route4Text5 + sign 27, 7, 6 ; Route4Text6 - db $3 ; objects - object SPRITE_LASS, $9, $8, WALK, $0, $1 ; person - object SPRITE_LASS, $3f, $3, STAY, RIGHT, $2, OPP_LASS, $4 - object SPRITE_BALL, $39, $3, STAY, NONE, $3, TM_04 + db 3 ; objects + object SPRITE_LASS, 9, 8, WALK, 0, 1 ; person + object SPRITE_LASS, 63, 3, STAY, RIGHT, 2, OPP_LASS, 4 + object SPRITE_BALL, 57, 3, STAY, NONE, 3, TM_04 ; warp-to - EVENT_DISP ROUTE_4_WIDTH, $5, $b ; MT_MOON_POKECENTER - EVENT_DISP ROUTE_4_WIDTH, $5, $12 ; MT_MOON_1 - EVENT_DISP ROUTE_4_WIDTH, $5, $18 ; MT_MOON_2 + warp_to 11, 5, ROUTE_4_WIDTH ; MT_MOON_POKECENTER + warp_to 18, 5, ROUTE_4_WIDTH ; MT_MOON_1 + warp_to 24, 5, ROUTE_4_WIDTH ; MT_MOON_2 diff --git a/data/mapObjects/route5.asm b/data/mapObjects/route5.asm index 6065f599..62aa6431 100755 --- a/data/mapObjects/route5.asm +++ b/data/mapObjects/route5.asm @@ -1,21 +1,21 @@ Route5Object: db $a ; border block - db $5 ; warps - db $1d, $a, $3, ROUTE_5_GATE - db $1d, $9, $2, ROUTE_5_GATE - db $21, $a, $0, ROUTE_5_GATE - db $1b, $11, $0, PATH_ENTRANCE_ROUTE_5 - db $15, $a, $0, DAYCAREM + db 5 ; warps + warp 10, 29, 3, ROUTE_5_GATE + warp 9, 29, 2, ROUTE_5_GATE + warp 10, 33, 0, ROUTE_5_GATE + warp 17, 27, 0, PATH_ENTRANCE_ROUTE_5 + warp 10, 21, 0, DAYCAREM - db $1 ; signs - db $1d, $11, $1 ; Route5Text1 + db 1 ; signs + sign 17, 29, 1 ; Route5Text1 - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP ROUTE_5_WIDTH, $1d, $a ; ROUTE_5_GATE - EVENT_DISP ROUTE_5_WIDTH, $1d, $9 ; ROUTE_5_GATE - EVENT_DISP ROUTE_5_WIDTH, $21, $a ; ROUTE_5_GATE - EVENT_DISP ROUTE_5_WIDTH, $1b, $11 ; PATH_ENTRANCE_ROUTE_5 - EVENT_DISP ROUTE_5_WIDTH, $15, $a ; DAYCAREM + warp_to 10, 29, ROUTE_5_WIDTH ; ROUTE_5_GATE + warp_to 9, 29, ROUTE_5_WIDTH ; ROUTE_5_GATE + warp_to 10, 33, ROUTE_5_WIDTH ; ROUTE_5_GATE + warp_to 17, 27, ROUTE_5_WIDTH ; PATH_ENTRANCE_ROUTE_5 + warp_to 10, 21, ROUTE_5_WIDTH ; DAYCAREM diff --git a/data/mapObjects/route5gate.asm b/data/mapObjects/route5gate.asm index 9588f511..8b230942 100755 --- a/data/mapObjects/route5gate.asm +++ b/data/mapObjects/route5gate.asm @@ -1,19 +1,19 @@ Route5GateObject: db $a ; border block - db $4 ; warps - db $5, $3, $2, $ff - db $5, $4, $2, $ff - db $0, $3, $1, $ff - db $0, $4, $0, $ff + db 4 ; warps + warp 3, 5, 2, -1 + warp 4, 5, 2, -1 + warp 3, 0, 1, -1 + warp 4, 0, 0, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $1, $3, STAY, RIGHT, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 1, 3, STAY, RIGHT, 1 ; person ; warp-to - EVENT_DISP ROUTE_5_GATE_WIDTH, $5, $3 - EVENT_DISP ROUTE_5_GATE_WIDTH, $5, $4 - EVENT_DISP ROUTE_5_GATE_WIDTH, $0, $3 - EVENT_DISP ROUTE_5_GATE_WIDTH, $0, $4 + warp_to 3, 5, ROUTE_5_GATE_WIDTH + warp_to 4, 5, ROUTE_5_GATE_WIDTH + warp_to 3, 0, ROUTE_5_GATE_WIDTH + warp_to 4, 0, ROUTE_5_GATE_WIDTH diff --git a/data/mapObjects/route6.asm b/data/mapObjects/route6.asm index bfd88fac..e0eea85b 100755 --- a/data/mapObjects/route6.asm +++ b/data/mapObjects/route6.asm @@ -1,25 +1,25 @@ Route6Object: db $f ; border block - db $4 ; warps - db $1, $9, $2, ROUTE_6_GATE - db $1, $a, $2, ROUTE_6_GATE - db $7, $a, $0, ROUTE_6_GATE - db $d, $11, $0, PATH_ENTRANCE_ROUTE_6 + db 4 ; warps + warp 9, 1, 2, ROUTE_6_GATE + warp 10, 1, 2, ROUTE_6_GATE + warp 10, 7, 0, ROUTE_6_GATE + warp 17, 13, 0, PATH_ENTRANCE_ROUTE_6 - db $1 ; signs - db $f, $13, $7 ; Route6Text7 + db 1 ; signs + sign 19, 15, 7 ; Route6Text7 - db $6 ; objects - object SPRITE_BLACK_HAIR_BOY_1, $a, $15, STAY, RIGHT, $1, OPP_JR_TRAINER_M, $4 - object SPRITE_LASS, $b, $15, STAY, LEFT, $2, OPP_JR_TRAINER_F, $2 - object SPRITE_BUG_CATCHER, $0, $f, STAY, RIGHT, $3, OPP_BUG_CATCHER, $a - object SPRITE_BLACK_HAIR_BOY_1, $b, $1f, STAY, LEFT, $4, OPP_JR_TRAINER_M, $5 - object SPRITE_LASS, $b, $1e, STAY, LEFT, $5, OPP_JR_TRAINER_F, $3 - object SPRITE_BUG_CATCHER, $13, $1a, STAY, LEFT, $6, OPP_BUG_CATCHER, $b + db 6 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 10, 21, STAY, RIGHT, 1, OPP_JR_TRAINER_M, 4 + object SPRITE_LASS, 11, 21, STAY, LEFT, 2, OPP_JR_TRAINER_F, 2 + object SPRITE_BUG_CATCHER, 0, 15, STAY, RIGHT, 3, OPP_BUG_CATCHER, 10 + object SPRITE_BLACK_HAIR_BOY_1, 11, 31, STAY, LEFT, 4, OPP_JR_TRAINER_M, 5 + object SPRITE_LASS, 11, 30, STAY, LEFT, 5, OPP_JR_TRAINER_F, 3 + object SPRITE_BUG_CATCHER, 19, 26, STAY, LEFT, 6, OPP_BUG_CATCHER, 11 ; warp-to - EVENT_DISP ROUTE_6_WIDTH, $1, $9 ; ROUTE_6_GATE - EVENT_DISP ROUTE_6_WIDTH, $1, $a ; ROUTE_6_GATE - EVENT_DISP ROUTE_6_WIDTH, $7, $a ; ROUTE_6_GATE - EVENT_DISP ROUTE_6_WIDTH, $d, $11 ; PATH_ENTRANCE_ROUTE_6 + warp_to 9, 1, ROUTE_6_WIDTH ; ROUTE_6_GATE + warp_to 10, 1, ROUTE_6_WIDTH ; ROUTE_6_GATE + warp_to 10, 7, ROUTE_6_WIDTH ; ROUTE_6_GATE + warp_to 17, 13, ROUTE_6_WIDTH ; PATH_ENTRANCE_ROUTE_6 diff --git a/data/mapObjects/route6gate.asm b/data/mapObjects/route6gate.asm index 79f17007..e3b7b2b8 100755 --- a/data/mapObjects/route6gate.asm +++ b/data/mapObjects/route6gate.asm @@ -1,19 +1,19 @@ Route6GateObject: db $a ; border block - db $4 ; warps - db $5, $3, $2, $ff - db $5, $4, $2, $ff - db $0, $3, $1, $ff - db $0, $4, $1, $ff + db 4 ; warps + warp 3, 5, 2, -1 + warp 4, 5, 2, -1 + warp 3, 0, 1, -1 + warp 4, 0, 1, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $6, $2, STAY, LEFT, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 6, 2, STAY, LEFT, 1 ; person ; warp-to - EVENT_DISP ROUTE_6_GATE_WIDTH, $5, $3 - EVENT_DISP ROUTE_6_GATE_WIDTH, $5, $4 - EVENT_DISP ROUTE_6_GATE_WIDTH, $0, $3 - EVENT_DISP ROUTE_6_GATE_WIDTH, $0, $4 + warp_to 3, 5, ROUTE_6_GATE_WIDTH + warp_to 4, 5, ROUTE_6_GATE_WIDTH + warp_to 3, 0, ROUTE_6_GATE_WIDTH + warp_to 4, 0, ROUTE_6_GATE_WIDTH diff --git a/data/mapObjects/route7.asm b/data/mapObjects/route7.asm index d039cb3c..d32e6019 100755 --- a/data/mapObjects/route7.asm +++ b/data/mapObjects/route7.asm @@ -1,21 +1,21 @@ Route7Object: db $f ; border block - db $5 ; warps - db $9, $12, $2, ROUTE_7_GATE - db $a, $12, $3, ROUTE_7_GATE - db $9, $b, $0, ROUTE_7_GATE - db $a, $b, $1, ROUTE_7_GATE - db $d, $5, $0, PATH_ENTRANCE_ROUTE_7 + db 5 ; warps + warp 18, 9, 2, ROUTE_7_GATE + warp 18, 10, 3, ROUTE_7_GATE + warp 11, 9, 0, ROUTE_7_GATE + warp 11, 10, 1, ROUTE_7_GATE + warp 5, 13, 0, PATH_ENTRANCE_ROUTE_7 - db $1 ; signs - db $d, $3, $1 ; Route7Text1 + db 1 ; signs + sign 3, 13, 1 ; Route7Text1 - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP ROUTE_7_WIDTH, $9, $12 ; ROUTE_7_GATE - EVENT_DISP ROUTE_7_WIDTH, $a, $12 ; ROUTE_7_GATE - EVENT_DISP ROUTE_7_WIDTH, $9, $b ; ROUTE_7_GATE - EVENT_DISP ROUTE_7_WIDTH, $a, $b ; ROUTE_7_GATE - EVENT_DISP ROUTE_7_WIDTH, $d, $5 ; PATH_ENTRANCE_ROUTE_7 + warp_to 18, 9, ROUTE_7_WIDTH ; ROUTE_7_GATE + warp_to 18, 10, ROUTE_7_WIDTH ; ROUTE_7_GATE + warp_to 11, 9, ROUTE_7_WIDTH ; ROUTE_7_GATE + warp_to 11, 10, ROUTE_7_WIDTH ; ROUTE_7_GATE + warp_to 5, 13, ROUTE_7_WIDTH ; PATH_ENTRANCE_ROUTE_7 diff --git a/data/mapObjects/route7gate.asm b/data/mapObjects/route7gate.asm index 3aea6a88..0b726fd3 100755 --- a/data/mapObjects/route7gate.asm +++ b/data/mapObjects/route7gate.asm @@ -1,19 +1,19 @@ Route7GateObject: db $a ; border block - db $4 ; warps - db $3, $0, $3, $ff - db $4, $0, $3, $ff - db $3, $5, $0, $ff - db $4, $5, $1, $ff + db 4 ; warps + warp 0, 3, 3, -1 + warp 0, 4, 3, -1 + warp 5, 3, 0, -1 + warp 5, 4, 1, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $3, $1, STAY, DOWN, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 3, 1, STAY, DOWN, 1 ; person ; warp-to - EVENT_DISP ROUTE_7_GATE_WIDTH, $3, $0 - EVENT_DISP ROUTE_7_GATE_WIDTH, $4, $0 - EVENT_DISP ROUTE_7_GATE_WIDTH, $3, $5 - EVENT_DISP ROUTE_7_GATE_WIDTH, $4, $5 + warp_to 0, 3, ROUTE_7_GATE_WIDTH + warp_to 0, 4, ROUTE_7_GATE_WIDTH + warp_to 5, 3, ROUTE_7_GATE_WIDTH + warp_to 5, 4, ROUTE_7_GATE_WIDTH diff --git a/data/mapObjects/route8.asm b/data/mapObjects/route8.asm index 8aa16b82..dc7580fc 100755 --- a/data/mapObjects/route8.asm +++ b/data/mapObjects/route8.asm @@ -1,30 +1,30 @@ Route8Object: db $2c ; border block - db $5 ; warps - db $9, $1, $0, ROUTE_8_GATE - db $a, $1, $1, ROUTE_8_GATE - db $9, $8, $2, ROUTE_8_GATE - db $a, $8, $3, ROUTE_8_GATE - db $3, $d, $0, PATH_ENTRANCE_ROUTE_8 + db 5 ; warps + warp 1, 9, 0, ROUTE_8_GATE + warp 1, 10, 1, ROUTE_8_GATE + warp 8, 9, 2, ROUTE_8_GATE + warp 8, 10, 3, ROUTE_8_GATE + warp 13, 3, 0, PATH_ENTRANCE_ROUTE_8 - db $1 ; signs - db $3, $11, $a ; Route8Text10 + db 1 ; signs + sign 17, 3, 10 ; Route8Text10 - db $9 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $8, $5, STAY, RIGHT, $1, OPP_SUPER_NERD, $3 - object SPRITE_GAMBLER, $d, $9, STAY, UP, $2, OPP_GAMBLER, $5 - object SPRITE_BLACK_HAIR_BOY_2, $2a, $6, STAY, UP, $3, OPP_SUPER_NERD, $4 - object SPRITE_LASS, $1a, $3, STAY, LEFT, $4, OPP_LASS, $d - object SPRITE_BLACK_HAIR_BOY_2, $1a, $4, STAY, RIGHT, $5, OPP_SUPER_NERD, $5 - object SPRITE_LASS, $1a, $5, STAY, LEFT, $6, OPP_LASS, $e - object SPRITE_LASS, $1a, $6, STAY, RIGHT, $7, OPP_LASS, $f - object SPRITE_GAMBLER, $2e, $d, STAY, DOWN, $8, OPP_GAMBLER, $7 - object SPRITE_LASS, $33, $c, STAY, LEFT, $9, OPP_LASS, $10 + db 9 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 8, 5, STAY, RIGHT, 1, OPP_SUPER_NERD, 3 + object SPRITE_GAMBLER, 13, 9, STAY, UP, 2, OPP_GAMBLER, 5 + object SPRITE_BLACK_HAIR_BOY_2, 42, 6, STAY, UP, 3, OPP_SUPER_NERD, 4 + object SPRITE_LASS, 26, 3, STAY, LEFT, 4, OPP_LASS, 13 + object SPRITE_BLACK_HAIR_BOY_2, 26, 4, STAY, RIGHT, 5, OPP_SUPER_NERD, 5 + object SPRITE_LASS, 26, 5, STAY, LEFT, 6, OPP_LASS, 14 + object SPRITE_LASS, 26, 6, STAY, RIGHT, 7, OPP_LASS, 15 + object SPRITE_GAMBLER, 46, 13, STAY, DOWN, 8, OPP_GAMBLER, 7 + object SPRITE_LASS, 51, 12, STAY, LEFT, 9, OPP_LASS, 16 ; warp-to - EVENT_DISP ROUTE_8_WIDTH, $9, $1 ; ROUTE_8_GATE - EVENT_DISP ROUTE_8_WIDTH, $a, $1 ; ROUTE_8_GATE - EVENT_DISP ROUTE_8_WIDTH, $9, $8 ; ROUTE_8_GATE - EVENT_DISP ROUTE_8_WIDTH, $a, $8 ; ROUTE_8_GATE - EVENT_DISP ROUTE_8_WIDTH, $3, $d ; PATH_ENTRANCE_ROUTE_8 + warp_to 1, 9, ROUTE_8_WIDTH ; ROUTE_8_GATE + warp_to 1, 10, ROUTE_8_WIDTH ; ROUTE_8_GATE + warp_to 8, 9, ROUTE_8_WIDTH ; ROUTE_8_GATE + warp_to 8, 10, ROUTE_8_WIDTH ; ROUTE_8_GATE + warp_to 13, 3, ROUTE_8_WIDTH ; PATH_ENTRANCE_ROUTE_8 diff --git a/data/mapObjects/route8gate.asm b/data/mapObjects/route8gate.asm index b059fb36..ac286aa0 100755 --- a/data/mapObjects/route8gate.asm +++ b/data/mapObjects/route8gate.asm @@ -1,19 +1,19 @@ Route8GateObject: db $a ; border block - db $4 ; warps - db $3, $0, $0, $ff - db $4, $0, $1, $ff - db $3, $5, $2, $ff - db $4, $5, $3, $ff + db 4 ; warps + warp 0, 3, 0, -1 + warp 0, 4, 1, -1 + warp 5, 3, 2, -1 + warp 5, 4, 3, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GUARD, $2, $1, STAY, DOWN, $1 ; person + db 1 ; objects + object SPRITE_GUARD, 2, 1, STAY, DOWN, 1 ; person ; warp-to - EVENT_DISP ROUTE_8_GATE_WIDTH, $3, $0 - EVENT_DISP ROUTE_8_GATE_WIDTH, $4, $0 - EVENT_DISP ROUTE_8_GATE_WIDTH, $3, $5 - EVENT_DISP ROUTE_8_GATE_WIDTH, $4, $5 + warp_to 0, 3, ROUTE_8_GATE_WIDTH + warp_to 0, 4, ROUTE_8_GATE_WIDTH + warp_to 5, 3, ROUTE_8_GATE_WIDTH + warp_to 5, 4, ROUTE_8_GATE_WIDTH diff --git a/data/mapObjects/route9.asm b/data/mapObjects/route9.asm index 9e079eab..ab3ceefe 100755 --- a/data/mapObjects/route9.asm +++ b/data/mapObjects/route9.asm @@ -1,19 +1,19 @@ Route9Object: db $2c ; border block - db $0 ; warps + db 0 ; warps - db $1 ; signs - db $7, $19, $b ; Route9Text11 + db 1 ; signs + sign 25, 7, 11 ; Route9Text11 - db $a ; objects - object SPRITE_LASS, $d, $a, STAY, LEFT, $1, OPP_JR_TRAINER_F, $5 - object SPRITE_BLACK_HAIR_BOY_1, $18, $7, STAY, LEFT, $2, OPP_JR_TRAINER_M, $7 - object SPRITE_BLACK_HAIR_BOY_1, $1f, $7, STAY, RIGHT, $3, OPP_JR_TRAINER_M, $8 - object SPRITE_LASS, $30, $8, STAY, RIGHT, $4, OPP_JR_TRAINER_F, $6 - object SPRITE_HIKER, $10, $f, STAY, LEFT, $5, OPP_HIKER, $b - object SPRITE_HIKER, $2b, $3, STAY, LEFT, $6, OPP_HIKER, $6 - object SPRITE_BUG_CATCHER, $16, $2, STAY, DOWN, $7, OPP_BUG_CATCHER, $d - object SPRITE_HIKER, $2d, $f, STAY, RIGHT, $8, OPP_HIKER, $5 - object SPRITE_BUG_CATCHER, $28, $8, STAY, RIGHT, $9, OPP_BUG_CATCHER, $e - object SPRITE_BALL, $a, $f, STAY, NONE, $a, TM_30 + db 10 ; objects + object SPRITE_LASS, 13, 10, STAY, LEFT, 1, OPP_JR_TRAINER_F, 5 + object SPRITE_BLACK_HAIR_BOY_1, 24, 7, STAY, LEFT, 2, OPP_JR_TRAINER_M, 7 + object SPRITE_BLACK_HAIR_BOY_1, 31, 7, STAY, RIGHT, 3, OPP_JR_TRAINER_M, 8 + object SPRITE_LASS, 48, 8, STAY, RIGHT, 4, OPP_JR_TRAINER_F, 6 + object SPRITE_HIKER, 16, 15, STAY, LEFT, 5, OPP_HIKER, 11 + object SPRITE_HIKER, 43, 3, STAY, LEFT, 6, OPP_HIKER, 6 + object SPRITE_BUG_CATCHER, 22, 2, STAY, DOWN, 7, OPP_BUG_CATCHER, 13 + object SPRITE_HIKER, 45, 15, STAY, RIGHT, 8, OPP_HIKER, 5 + object SPRITE_BUG_CATCHER, 40, 8, STAY, RIGHT, 9, OPP_BUG_CATCHER, 14 + object SPRITE_BALL, 10, 15, STAY, NONE, 10, TM_30 diff --git a/data/mapObjects/safarizonecenter.asm b/data/mapObjects/safarizonecenter.asm index b5fa0107..550f9aa4 100755 --- a/data/mapObjects/safarizonecenter.asm +++ b/data/mapObjects/safarizonecenter.asm @@ -1,31 +1,31 @@ SafariZoneCenterObject: db $0 ; border block - db $9 ; warps - db $19, $e, $2, SAFARI_ZONE_ENTRANCE - db $19, $f, $3, SAFARI_ZONE_ENTRANCE - db $a, $0, $4, SAFARI_ZONE_WEST - db $b, $0, $5, SAFARI_ZONE_WEST - db $0, $e, $4, SAFARI_ZONE_NORTH - db $0, $f, $5, SAFARI_ZONE_NORTH - db $a, $1d, $2, SAFARI_ZONE_EAST - db $b, $1d, $3, SAFARI_ZONE_EAST - db $13, $11, $0, SAFARI_ZONE_REST_HOUSE_1 + db 9 ; warps + warp 14, 25, 2, SAFARI_ZONE_ENTRANCE + warp 15, 25, 3, SAFARI_ZONE_ENTRANCE + warp 0, 10, 4, SAFARI_ZONE_WEST + warp 0, 11, 5, SAFARI_ZONE_WEST + warp 14, 0, 4, SAFARI_ZONE_NORTH + warp 15, 0, 5, SAFARI_ZONE_NORTH + warp 29, 10, 2, SAFARI_ZONE_EAST + warp 29, 11, 3, SAFARI_ZONE_EAST + warp 17, 19, 0, SAFARI_ZONE_REST_HOUSE_1 - db $2 ; signs - db $14, $12, $2 ; SafariZoneCenterText2 - db $16, $e, $3 ; SafariZoneCenterText3 + db 2 ; signs + sign 18, 20, 2 ; SafariZoneCenterText2 + sign 14, 22, 3 ; SafariZoneCenterText3 - db $1 ; objects - object SPRITE_BALL, $e, $a, STAY, NONE, $1, NUGGET + db 1 ; objects + object SPRITE_BALL, 14, 10, STAY, NONE, 1, NUGGET ; warp-to - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $19, $e ; SAFARI_ZONE_ENTRANCE - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $19, $f ; SAFARI_ZONE_ENTRANCE - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $a, $0 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $b, $0 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $0, $e ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $0, $f ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $a, $1d ; SAFARI_ZONE_EAST - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $b, $1d ; SAFARI_ZONE_EAST - EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $13, $11 ; SAFARI_ZONE_REST_HOUSE_1 + warp_to 14, 25, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_ENTRANCE + warp_to 15, 25, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_ENTRANCE + warp_to 0, 10, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_WEST + warp_to 0, 11, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_WEST + warp_to 14, 0, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_NORTH + warp_to 15, 0, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_NORTH + warp_to 29, 10, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_EAST + warp_to 29, 11, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_EAST + warp_to 17, 19, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_REST_HOUSE_1 diff --git a/data/mapObjects/safarizoneeast.asm b/data/mapObjects/safarizoneeast.asm index 6c2f8138..53553161 100755 --- a/data/mapObjects/safarizoneeast.asm +++ b/data/mapObjects/safarizoneeast.asm @@ -1,27 +1,27 @@ SafariZoneEastObject: db $0 ; border block - db $5 ; warps - db $4, $0, $6, SAFARI_ZONE_NORTH - db $5, $0, $7, SAFARI_ZONE_NORTH - db $16, $0, $6, SAFARI_ZONE_CENTER - db $17, $0, $6, SAFARI_ZONE_CENTER - db $9, $19, $0, SAFARI_ZONE_REST_HOUSE_3 + db 5 ; warps + warp 0, 4, 6, SAFARI_ZONE_NORTH + warp 0, 5, 7, SAFARI_ZONE_NORTH + warp 0, 22, 6, SAFARI_ZONE_CENTER + warp 0, 23, 6, SAFARI_ZONE_CENTER + warp 25, 9, 0, SAFARI_ZONE_REST_HOUSE_3 - db $3 ; signs - db $a, $1a, $5 ; SafariZoneEastText5 - db $4, $6, $6 ; SafariZoneEastText6 - db $17, $5, $7 ; SafariZoneEastText7 + db 3 ; signs + sign 26, 10, 5 ; SafariZoneEastText5 + sign 6, 4, 6 ; SafariZoneEastText6 + sign 5, 23, 7 ; SafariZoneEastText7 - db $4 ; objects - object SPRITE_BALL, $15, $a, STAY, NONE, $1, FULL_RESTORE - object SPRITE_BALL, $3, $7, STAY, NONE, $2, MAX_POTION - object SPRITE_BALL, $14, $d, STAY, NONE, $3, CARBOS - object SPRITE_BALL, $f, $c, STAY, NONE, $4, TM_37 + db 4 ; objects + object SPRITE_BALL, 21, 10, STAY, NONE, 1, FULL_RESTORE + object SPRITE_BALL, 3, 7, STAY, NONE, 2, MAX_POTION + object SPRITE_BALL, 20, 13, STAY, NONE, 3, CARBOS + object SPRITE_BALL, 15, 12, STAY, NONE, 4, TM_37 ; warp-to - EVENT_DISP SAFARI_ZONE_EAST_WIDTH, $4, $0 ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_EAST_WIDTH, $5, $0 ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_EAST_WIDTH, $16, $0 ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_EAST_WIDTH, $17, $0 ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_EAST_WIDTH, $9, $19 ; SAFARI_ZONE_REST_HOUSE_3 + warp_to 0, 4, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_NORTH + warp_to 0, 5, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_NORTH + warp_to 0, 22, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_CENTER + warp_to 0, 23, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_CENTER + warp_to 25, 9, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_REST_HOUSE_3 diff --git a/data/mapObjects/safarizoneentrance.asm b/data/mapObjects/safarizoneentrance.asm index 9d26aa17..5a3379c7 100755 --- a/data/mapObjects/safarizoneentrance.asm +++ b/data/mapObjects/safarizoneentrance.asm @@ -1,20 +1,20 @@ SafariZoneEntranceObject: db $a ; border block - db $4 ; warps - db $5, $3, $4, $ff - db $5, $4, $4, $ff - db $0, $3, $0, SAFARI_ZONE_CENTER - db $0, $4, $1, SAFARI_ZONE_CENTER + db 4 ; warps + warp 3, 5, 4, -1 + warp 4, 5, 4, -1 + warp 3, 0, 0, SAFARI_ZONE_CENTER + warp 4, 0, 1, SAFARI_ZONE_CENTER - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_WHITE_PLAYER, $6, $2, STAY, LEFT, $1 ; person - object SPRITE_WHITE_PLAYER, $1, $4, STAY, RIGHT, $2 ; person + db 2 ; objects + object SPRITE_WHITE_PLAYER, 6, 2, STAY, LEFT, 1 ; person + object SPRITE_WHITE_PLAYER, 1, 4, STAY, RIGHT, 2 ; person ; warp-to - EVENT_DISP SAFARI_ZONE_ENTRANCE_WIDTH, $5, $3 - EVENT_DISP SAFARI_ZONE_ENTRANCE_WIDTH, $5, $4 - EVENT_DISP SAFARI_ZONE_ENTRANCE_WIDTH, $0, $3 ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_ENTRANCE_WIDTH, $0, $4 ; SAFARI_ZONE_CENTER + warp_to 3, 5, SAFARI_ZONE_ENTRANCE_WIDTH + warp_to 4, 5, SAFARI_ZONE_ENTRANCE_WIDTH + warp_to 3, 0, SAFARI_ZONE_ENTRANCE_WIDTH ; SAFARI_ZONE_CENTER + warp_to 4, 0, SAFARI_ZONE_ENTRANCE_WIDTH ; SAFARI_ZONE_CENTER diff --git a/data/mapObjects/safarizonenorth.asm b/data/mapObjects/safarizonenorth.asm index d0305507..6cbe51f6 100755 --- a/data/mapObjects/safarizonenorth.asm +++ b/data/mapObjects/safarizonenorth.asm @@ -1,35 +1,35 @@ SafariZoneNorthObject: db $0 ; border block - db $9 ; warps - db $23, $2, $0, SAFARI_ZONE_WEST - db $23, $3, $1, SAFARI_ZONE_WEST - db $23, $8, $2, SAFARI_ZONE_WEST - db $23, $9, $3, SAFARI_ZONE_WEST - db $23, $14, $4, SAFARI_ZONE_CENTER - db $23, $15, $5, SAFARI_ZONE_CENTER - db $1e, $27, $0, SAFARI_ZONE_EAST - db $1f, $27, $1, SAFARI_ZONE_EAST - db $3, $23, $0, SAFARI_ZONE_REST_HOUSE_4 + db 9 ; warps + warp 2, 35, 0, SAFARI_ZONE_WEST + warp 3, 35, 1, SAFARI_ZONE_WEST + warp 8, 35, 2, SAFARI_ZONE_WEST + warp 9, 35, 3, SAFARI_ZONE_WEST + warp 20, 35, 4, SAFARI_ZONE_CENTER + warp 21, 35, 5, SAFARI_ZONE_CENTER + warp 39, 30, 0, SAFARI_ZONE_EAST + warp 39, 31, 1, SAFARI_ZONE_EAST + warp 35, 3, 0, SAFARI_ZONE_REST_HOUSE_4 - db $5 ; signs - db $4, $24, $3 ; SafariZoneNorthText3 - db $19, $4, $4 ; SafariZoneNorthText4 - db $1f, $d, $5 ; SafariZoneNorthText5 - db $21, $13, $6 ; SafariZoneNorthText6 - db $1c, $1a, $7 ; SafariZoneNorthText7 + db 5 ; signs + sign 36, 4, 3 ; SafariZoneNorthText3 + sign 4, 25, 4 ; SafariZoneNorthText4 + sign 13, 31, 5 ; SafariZoneNorthText5 + sign 19, 33, 6 ; SafariZoneNorthText6 + sign 26, 28, 7 ; SafariZoneNorthText7 - db $2 ; objects - object SPRITE_BALL, $19, $1, STAY, NONE, $1, PROTEIN - object SPRITE_BALL, $13, $7, STAY, NONE, $2, TM_40 + db 2 ; objects + object SPRITE_BALL, 25, 1, STAY, NONE, 1, PROTEIN + object SPRITE_BALL, 19, 7, STAY, NONE, 2, TM_40 ; warp-to - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $23, $2 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $23, $3 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $23, $8 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $23, $9 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $23, $14 ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $23, $15 ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $1e, $27 ; SAFARI_ZONE_EAST - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $1f, $27 ; SAFARI_ZONE_EAST - EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $3, $23 ; SAFARI_ZONE_REST_HOUSE_4 + warp_to 2, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST + warp_to 3, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST + warp_to 8, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST + warp_to 9, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST + warp_to 20, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_CENTER + warp_to 21, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_CENTER + warp_to 39, 30, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_EAST + warp_to 39, 31, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_EAST + warp_to 35, 3, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_REST_HOUSE_4 diff --git a/data/mapObjects/safarizoneresthouse1.asm b/data/mapObjects/safarizoneresthouse1.asm index 79156825..031debec 100755 --- a/data/mapObjects/safarizoneresthouse1.asm +++ b/data/mapObjects/safarizoneresthouse1.asm @@ -1,16 +1,16 @@ SafariZoneRestHouse1Object: db $a ; border block - db $2 ; warps - db $7, $2, $8, SAFARI_ZONE_CENTER - db $7, $3, $8, SAFARI_ZONE_CENTER + db 2 ; warps + warp 2, 7, 8, SAFARI_ZONE_CENTER + warp 3, 7, 8, SAFARI_ZONE_CENTER - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_GIRL, $3, $2, STAY, DOWN, $1 ; person - object SPRITE_OAK_AIDE, $1, $4, WALK, $1, $2 ; person + db 2 ; objects + object SPRITE_GIRL, 3, 2, STAY, DOWN, 1 ; person + object SPRITE_OAK_AIDE, 1, 4, WALK, 1, 2 ; person ; warp-to - EVENT_DISP SAFARI_ZONE_REST_HOUSE_1_WIDTH, $7, $2 ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_REST_HOUSE_1_WIDTH, $7, $3 ; SAFARI_ZONE_CENTER + warp_to 2, 7, SAFARI_ZONE_REST_HOUSE_1_WIDTH ; SAFARI_ZONE_CENTER + warp_to 3, 7, SAFARI_ZONE_REST_HOUSE_1_WIDTH ; SAFARI_ZONE_CENTER diff --git a/data/mapObjects/safarizoneresthouse2.asm b/data/mapObjects/safarizoneresthouse2.asm index 82f04f9d..7e589731 100755 --- a/data/mapObjects/safarizoneresthouse2.asm +++ b/data/mapObjects/safarizoneresthouse2.asm @@ -1,17 +1,17 @@ SafariZoneRestHouse2Object: db $a ; border block - db $2 ; warps - db $7, $2, $7, SAFARI_ZONE_WEST - db $7, $3, $7, SAFARI_ZONE_WEST + db 2 ; warps + warp 2, 7, 7, SAFARI_ZONE_WEST + warp 3, 7, 7, SAFARI_ZONE_WEST - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_OAK_AIDE, $4, $4, WALK, $0, $1 ; person - object SPRITE_BLACK_HAIR_BOY_1, $0, $2, STAY, RIGHT, $2 ; person - object SPRITE_ERIKA, $6, $2, STAY, DOWN, $3 ; person + db 3 ; objects + object SPRITE_OAK_AIDE, 4, 4, WALK, 0, 1 ; person + object SPRITE_BLACK_HAIR_BOY_1, 0, 2, STAY, RIGHT, 2 ; person + object SPRITE_ERIKA, 6, 2, STAY, DOWN, 3 ; person ; warp-to - EVENT_DISP SAFARI_ZONE_REST_HOUSE_2_WIDTH, $7, $2 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_REST_HOUSE_2_WIDTH, $7, $3 ; SAFARI_ZONE_WEST + warp_to 2, 7, SAFARI_ZONE_REST_HOUSE_2_WIDTH ; SAFARI_ZONE_WEST + warp_to 3, 7, SAFARI_ZONE_REST_HOUSE_2_WIDTH ; SAFARI_ZONE_WEST diff --git a/data/mapObjects/safarizoneresthouse3.asm b/data/mapObjects/safarizoneresthouse3.asm index ae973fa8..00623953 100755 --- a/data/mapObjects/safarizoneresthouse3.asm +++ b/data/mapObjects/safarizoneresthouse3.asm @@ -1,17 +1,17 @@ SafariZoneRestHouse3Object: db $a ; border block - db $2 ; warps - db $7, $2, $4, SAFARI_ZONE_EAST - db $7, $3, $4, SAFARI_ZONE_EAST + db 2 ; warps + warp 2, 7, 4, SAFARI_ZONE_EAST + warp 3, 7, 4, SAFARI_ZONE_EAST - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_OAK_AIDE, $1, $3, WALK, $1, $1 ; person - object SPRITE_ROCKER, $4, $2, STAY, NONE, $2 ; person - object SPRITE_LAPRAS_GIVER, $5, $2, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_OAK_AIDE, 1, 3, WALK, 1, 1 ; person + object SPRITE_ROCKER, 4, 2, STAY, NONE, 2 ; person + object SPRITE_LAPRAS_GIVER, 5, 2, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP SAFARI_ZONE_REST_HOUSE_3_WIDTH, $7, $2 ; SAFARI_ZONE_EAST - EVENT_DISP SAFARI_ZONE_REST_HOUSE_3_WIDTH, $7, $3 ; SAFARI_ZONE_EAST + warp_to 2, 7, SAFARI_ZONE_REST_HOUSE_3_WIDTH ; SAFARI_ZONE_EAST + warp_to 3, 7, SAFARI_ZONE_REST_HOUSE_3_WIDTH ; SAFARI_ZONE_EAST diff --git a/data/mapObjects/safarizoneresthouse4.asm b/data/mapObjects/safarizoneresthouse4.asm index 7502732c..d3b81b4e 100755 --- a/data/mapObjects/safarizoneresthouse4.asm +++ b/data/mapObjects/safarizoneresthouse4.asm @@ -1,17 +1,17 @@ SafariZoneRestHouse4Object: db $a ; border block - db $2 ; warps - db $7, $2, $8, SAFARI_ZONE_NORTH - db $7, $3, $8, SAFARI_ZONE_NORTH + db 2 ; warps + warp 2, 7, 8, SAFARI_ZONE_NORTH + warp 3, 7, 8, SAFARI_ZONE_NORTH - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_OAK_AIDE, $6, $3, WALK, $2, $1 ; person - object SPRITE_WHITE_PLAYER, $3, $4, STAY, NONE, $2 ; person - object SPRITE_GENTLEMAN, $1, $5, WALK, $1, $3 ; person + db 3 ; objects + object SPRITE_OAK_AIDE, 6, 3, WALK, 2, 1 ; person + object SPRITE_WHITE_PLAYER, 3, 4, STAY, NONE, 2 ; person + object SPRITE_GENTLEMAN, 1, 5, WALK, 1, 3 ; person ; warp-to - EVENT_DISP SAFARI_ZONE_REST_HOUSE_4_WIDTH, $7, $2 ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_REST_HOUSE_4_WIDTH, $7, $3 ; SAFARI_ZONE_NORTH + warp_to 2, 7, SAFARI_ZONE_REST_HOUSE_4_WIDTH ; SAFARI_ZONE_NORTH + warp_to 3, 7, SAFARI_ZONE_REST_HOUSE_4_WIDTH ; SAFARI_ZONE_NORTH diff --git a/data/mapObjects/safarizonesecrethouse.asm b/data/mapObjects/safarizonesecrethouse.asm index a96115b8..4faa90c6 100755 --- a/data/mapObjects/safarizonesecrethouse.asm +++ b/data/mapObjects/safarizonesecrethouse.asm @@ -1,15 +1,15 @@ SafariZoneSecretHouseObject: db $17 ; border block - db $2 ; warps - db $7, $2, $6, SAFARI_ZONE_WEST - db $7, $3, $6, SAFARI_ZONE_WEST + db 2 ; warps + warp 2, 7, 6, SAFARI_ZONE_WEST + warp 3, 7, 6, SAFARI_ZONE_WEST - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FISHER, $3, $3, STAY, DOWN, $1 ; person + db 1 ; objects + object SPRITE_FISHER, 3, 3, STAY, DOWN, 1 ; person ; warp-to - EVENT_DISP SAFARI_ZONE_SECRET_HOUSE_WIDTH, $7, $2 ; SAFARI_ZONE_WEST - EVENT_DISP SAFARI_ZONE_SECRET_HOUSE_WIDTH, $7, $3 ; SAFARI_ZONE_WEST + warp_to 2, 7, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; SAFARI_ZONE_WEST + warp_to 3, 7, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; SAFARI_ZONE_WEST diff --git a/data/mapObjects/safarizonewest.asm b/data/mapObjects/safarizonewest.asm index 64ed0876..5d3c6d19 100755 --- a/data/mapObjects/safarizonewest.asm +++ b/data/mapObjects/safarizonewest.asm @@ -1,34 +1,34 @@ SafariZoneWestObject: db $0 ; border block - db $8 ; warps - db $0, $14, $0, SAFARI_ZONE_NORTH - db $0, $15, $1, SAFARI_ZONE_NORTH - db $0, $1a, $2, SAFARI_ZONE_NORTH - db $0, $1b, $3, SAFARI_ZONE_NORTH - db $16, $1d, $2, SAFARI_ZONE_CENTER - db $17, $1d, $3, SAFARI_ZONE_CENTER - db $3, $3, $0, SAFARI_ZONE_SECRET_HOUSE - db $b, $b, $0, SAFARI_ZONE_REST_HOUSE_2 + db 8 ; warps + warp 20, 0, 0, SAFARI_ZONE_NORTH + warp 21, 0, 1, SAFARI_ZONE_NORTH + warp 26, 0, 2, SAFARI_ZONE_NORTH + warp 27, 0, 3, SAFARI_ZONE_NORTH + warp 29, 22, 2, SAFARI_ZONE_CENTER + warp 29, 23, 3, SAFARI_ZONE_CENTER + warp 3, 3, 0, SAFARI_ZONE_SECRET_HOUSE + warp 11, 11, 0, SAFARI_ZONE_REST_HOUSE_2 - db $4 ; signs - db $c, $c, $5 ; SafariZoneWestText5 - db $3, $11, $6 ; SafariZoneWestText6 - db $4, $1a, $7 ; SafariZoneWestText7 - db $16, $18, $8 ; SafariZoneWestText8 + db 4 ; signs + sign 12, 12, 5 ; SafariZoneWestText5 + sign 17, 3, 6 ; SafariZoneWestText6 + sign 26, 4, 7 ; SafariZoneWestText7 + sign 24, 22, 8 ; SafariZoneWestText8 - db $4 ; objects - object SPRITE_BALL, $8, $14, STAY, NONE, $1, MAX_POTION - object SPRITE_BALL, $9, $7, STAY, NONE, $2, TM_32 - object SPRITE_BALL, $12, $12, STAY, NONE, $3, MAX_REVIVE - object SPRITE_BALL, $13, $7, STAY, NONE, $4, GOLD_TEETH + db 4 ; objects + object SPRITE_BALL, 8, 20, STAY, NONE, 1, MAX_POTION + object SPRITE_BALL, 9, 7, STAY, NONE, 2, TM_32 + object SPRITE_BALL, 18, 18, STAY, NONE, 3, MAX_REVIVE + object SPRITE_BALL, 19, 7, STAY, NONE, 4, GOLD_TEETH ; warp-to - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $0, $14 ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $0, $15 ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $0, $1a ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $0, $1b ; SAFARI_ZONE_NORTH - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $16, $1d ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $17, $1d ; SAFARI_ZONE_CENTER - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $3, $3 ; SAFARI_ZONE_SECRET_HOUSE - EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $b, $b ; SAFARI_ZONE_REST_HOUSE_2 + warp_to 20, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH + warp_to 21, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH + warp_to 26, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH + warp_to 27, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH + warp_to 29, 22, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_CENTER + warp_to 29, 23, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_CENTER + warp_to 3, 3, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_SECRET_HOUSE + warp_to 11, 11, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_REST_HOUSE_2 diff --git a/data/mapObjects/saffroncity.asm b/data/mapObjects/saffroncity.asm index 7275800a..d9afc7ec 100755 --- a/data/mapObjects/saffroncity.asm +++ b/data/mapObjects/saffroncity.asm @@ -1,51 +1,51 @@ SaffronCityObject: db $f ; border block - db $8 ; warps - db $5, $7, $0, COPYCATS_HOUSE_1F - db $3, $1a, $0, FIGHTING_DOJO - db $3, $22, $0, SAFFRON_GYM - db $b, $d, $0, SAFFRON_HOUSE_1 - db $b, $19, $0, SAFFRON_MART - db $15, $12, $0, SILPH_CO_1F - db $1d, $9, $0, SAFFRON_POKECENTER - db $1d, $1d, $0, SAFFRON_HOUSE_2 + db 8 ; warps + warp 7, 5, 0, COPYCATS_HOUSE_1F + warp 26, 3, 0, FIGHTING_DOJO + warp 34, 3, 0, SAFFRON_GYM + warp 13, 11, 0, SAFFRON_HOUSE_1 + warp 25, 11, 0, SAFFRON_MART + warp 18, 21, 0, SILPH_CO_1F + warp 9, 29, 0, SAFFRON_POKECENTER + warp 29, 29, 0, SAFFRON_HOUSE_2 - db $a ; signs - db $5, $11, $10 ; SaffronCityText16 - db $5, $1b, $11 ; SaffronCityText17 - db $5, $23, $12 ; SaffronCityText18 - db $b, $1a, $13 ; MartSignText - db $13, $27, $14 ; SaffronCityText20 - db $15, $5, $15 ; SaffronCityText21 - db $15, $f, $16 ; SaffronCityText22 - db $1d, $a, $17 ; PokeCenterSignText - db $1d, $1b, $18 ; SaffronCityText24 - db $13, $1, $19 ; SaffronCityText25 + db 10 ; signs + sign 17, 5, 16 ; SaffronCityText16 + sign 27, 5, 17 ; SaffronCityText17 + sign 35, 5, 18 ; SaffronCityText18 + sign 26, 11, 19 ; MartSignText + sign 39, 19, 20 ; SaffronCityText20 + sign 5, 21, 21 ; SaffronCityText21 + sign 15, 21, 22 ; SaffronCityText22 + sign 10, 29, 23 ; PokeCenterSignText + sign 27, 29, 24 ; SaffronCityText24 + sign 1, 19, 25 ; SaffronCityText25 - db $f ; objects - object SPRITE_ROCKET, $7, $6, STAY, NONE, $1 ; person - object SPRITE_ROCKET, $14, $8, WALK, $2, $2 ; person - object SPRITE_ROCKET, $22, $4, STAY, NONE, $3 ; person - object SPRITE_ROCKET, $d, $c, STAY, NONE, $4 ; person - object SPRITE_ROCKET, $b, $19, WALK, $2, $5 ; person - object SPRITE_ROCKET, $20, $d, WALK, $2, $6 ; person - object SPRITE_ROCKET, $12, $1e, WALK, $2, $7 ; person - object SPRITE_OAK_AIDE, $8, $e, WALK, $0, $8 ; person - object SPRITE_LAPRAS_GIVER, $17, $17, STAY, NONE, $9 ; person - object SPRITE_ERIKA, $11, $1e, WALK, $2, $a ; person - object SPRITE_GENTLEMAN, $1e, $c, STAY, DOWN, $b ; person - object SPRITE_BIRD, $1f, $c, STAY, DOWN, $c ; person - object SPRITE_ROCKER, $12, $8, STAY, UP, $d ; person - object SPRITE_ROCKET, $12, $16, STAY, DOWN, $e ; person - object SPRITE_ROCKET, $13, $16, STAY, DOWN, $f ; person + db 15 ; objects + object SPRITE_ROCKET, 7, 6, STAY, NONE, 1 ; person + object SPRITE_ROCKET, 20, 8, WALK, 2, 2 ; person + object SPRITE_ROCKET, 34, 4, STAY, NONE, 3 ; person + object SPRITE_ROCKET, 13, 12, STAY, NONE, 4 ; person + object SPRITE_ROCKET, 11, 25, WALK, 2, 5 ; person + object SPRITE_ROCKET, 32, 13, WALK, 2, 6 ; person + object SPRITE_ROCKET, 18, 30, WALK, 2, 7 ; person + object SPRITE_OAK_AIDE, 8, 14, WALK, 0, 8 ; person + object SPRITE_LAPRAS_GIVER, 23, 23, STAY, NONE, 9 ; person + object SPRITE_ERIKA, 17, 30, WALK, 2, 10 ; person + object SPRITE_GENTLEMAN, 30, 12, STAY, DOWN, 11 ; person + object SPRITE_BIRD, 31, 12, STAY, DOWN, 12 ; person + object SPRITE_ROCKER, 18, 8, STAY, UP, 13 ; person + object SPRITE_ROCKET, 18, 22, STAY, DOWN, 14 ; person + object SPRITE_ROCKET, 19, 22, STAY, DOWN, 15 ; person ; warp-to - EVENT_DISP SAFFRON_CITY_WIDTH, $5, $7 ; COPYCATS_HOUSE_1F - EVENT_DISP SAFFRON_CITY_WIDTH, $3, $1a ; FIGHTING_DOJO - EVENT_DISP SAFFRON_CITY_WIDTH, $3, $22 ; SAFFRON_GYM - EVENT_DISP SAFFRON_CITY_WIDTH, $b, $d ; SAFFRON_HOUSE_1 - EVENT_DISP SAFFRON_CITY_WIDTH, $b, $19 ; SAFFRON_MART - EVENT_DISP SAFFRON_CITY_WIDTH, $15, $12 ; SILPH_CO_1F - EVENT_DISP SAFFRON_CITY_WIDTH, $1d, $9 ; SAFFRON_POKECENTER - EVENT_DISP SAFFRON_CITY_WIDTH, $1d, $1d ; SAFFRON_HOUSE_2 + warp_to 7, 5, SAFFRON_CITY_WIDTH ; COPYCATS_HOUSE_1F + warp_to 26, 3, SAFFRON_CITY_WIDTH ; FIGHTING_DOJO + warp_to 34, 3, SAFFRON_CITY_WIDTH ; SAFFRON_GYM + warp_to 13, 11, SAFFRON_CITY_WIDTH ; SAFFRON_HOUSE_1 + warp_to 25, 11, SAFFRON_CITY_WIDTH ; SAFFRON_MART + warp_to 18, 21, SAFFRON_CITY_WIDTH ; SILPH_CO_1F + warp_to 9, 29, SAFFRON_CITY_WIDTH ; SAFFRON_POKECENTER + warp_to 29, 29, SAFFRON_CITY_WIDTH ; SAFFRON_HOUSE_2 diff --git a/data/mapObjects/saffrongym.asm b/data/mapObjects/saffrongym.asm index 6a770fdc..b466d152 100755 --- a/data/mapObjects/saffrongym.asm +++ b/data/mapObjects/saffrongym.asm @@ -1,83 +1,83 @@ SaffronGymObject: db $2e ; border block - db $20 ; warps - db $11, $8, $2, $ff - db $11, $9, $2, $ff - db $3, $1, $16, SAFFRON_GYM - db $3, $5, $f, SAFFRON_GYM - db $5, $1, $12, SAFFRON_GYM - db $5, $5, $8, SAFFRON_GYM - db $9, $1, $1b, SAFFRON_GYM - db $9, $5, $10, SAFFRON_GYM - db $b, $1, $5, SAFFRON_GYM - db $b, $5, $d, SAFFRON_GYM - db $f, $1, $17, SAFFRON_GYM - db $f, $5, $1e, SAFFRON_GYM - db $11, $1, $11, SAFFRON_GYM - db $11, $5, $9, SAFFRON_GYM - db $3, $9, $1a, SAFFRON_GYM - db $3, $b, $3, SAFFRON_GYM - db $5, $9, $7, SAFFRON_GYM - db $5, $b, $c, SAFFRON_GYM - db $b, $b, $4, SAFFRON_GYM - db $f, $b, $1f, SAFFRON_GYM - db $3, $f, $18, SAFFRON_GYM - db $3, $13, $1c, SAFFRON_GYM - db $5, $f, $2, SAFFRON_GYM - db $5, $13, $a, SAFFRON_GYM - db $9, $f, $14, SAFFRON_GYM - db $9, $13, $1d, SAFFRON_GYM - db $b, $f, $e, SAFFRON_GYM - db $b, $13, $6, SAFFRON_GYM - db $f, $f, $15, SAFFRON_GYM - db $f, $13, $19, SAFFRON_GYM - db $11, $f, $b, SAFFRON_GYM - db $11, $13, $13, SAFFRON_GYM + db 32 ; warps + warp 8, 17, 2, -1 + warp 9, 17, 2, -1 + warp 1, 3, 22, SAFFRON_GYM + warp 5, 3, 15, SAFFRON_GYM + warp 1, 5, 18, SAFFRON_GYM + warp 5, 5, 8, SAFFRON_GYM + warp 1, 9, 27, SAFFRON_GYM + warp 5, 9, 16, SAFFRON_GYM + warp 1, 11, 5, SAFFRON_GYM + warp 5, 11, 13, SAFFRON_GYM + warp 1, 15, 23, SAFFRON_GYM + warp 5, 15, 30, SAFFRON_GYM + warp 1, 17, 17, SAFFRON_GYM + warp 5, 17, 9, SAFFRON_GYM + warp 9, 3, 26, SAFFRON_GYM + warp 11, 3, 3, SAFFRON_GYM + warp 9, 5, 7, SAFFRON_GYM + warp 11, 5, 12, SAFFRON_GYM + warp 11, 11, 4, SAFFRON_GYM + warp 11, 15, 31, SAFFRON_GYM + warp 15, 3, 24, SAFFRON_GYM + warp 19, 3, 28, SAFFRON_GYM + warp 15, 5, 2, SAFFRON_GYM + warp 19, 5, 10, SAFFRON_GYM + warp 15, 9, 20, SAFFRON_GYM + warp 19, 9, 29, SAFFRON_GYM + warp 15, 11, 14, SAFFRON_GYM + warp 19, 11, 6, SAFFRON_GYM + warp 15, 15, 21, SAFFRON_GYM + warp 19, 15, 25, SAFFRON_GYM + warp 15, 17, 11, SAFFRON_GYM + warp 19, 17, 19, SAFFRON_GYM - db $0 ; signs + db 0 ; signs - db $9 ; objects - object SPRITE_GIRL, $9, $8, STAY, DOWN, $1, OPP_SABRINA, $1 - object SPRITE_MEDIUM, $a, $1, STAY, DOWN, $2, OPP_CHANNELER, $16 - object SPRITE_BUG_CATCHER, $11, $1, STAY, DOWN, $3, OPP_PSYCHIC_TR, $1 - object SPRITE_MEDIUM, $3, $7, STAY, DOWN, $4, OPP_CHANNELER, $17 - object SPRITE_BUG_CATCHER, $11, $7, STAY, DOWN, $5, OPP_PSYCHIC_TR, $2 - object SPRITE_MEDIUM, $3, $d, STAY, DOWN, $6, OPP_CHANNELER, $18 - object SPRITE_BUG_CATCHER, $11, $d, STAY, DOWN, $7, OPP_PSYCHIC_TR, $3 - object SPRITE_BUG_CATCHER, $3, $1, STAY, DOWN, $8, OPP_PSYCHIC_TR, $4 - object SPRITE_GYM_HELPER, $a, $f, STAY, DOWN, $9 ; person + db 9 ; objects + object SPRITE_GIRL, 9, 8, STAY, DOWN, 1, OPP_SABRINA, 1 + object SPRITE_MEDIUM, 10, 1, STAY, DOWN, 2, OPP_CHANNELER, 22 + object SPRITE_BUG_CATCHER, 17, 1, STAY, DOWN, 3, OPP_PSYCHIC_TR, 1 + object SPRITE_MEDIUM, 3, 7, STAY, DOWN, 4, OPP_CHANNELER, 23 + object SPRITE_BUG_CATCHER, 17, 7, STAY, DOWN, 5, OPP_PSYCHIC_TR, 2 + object SPRITE_MEDIUM, 3, 13, STAY, DOWN, 6, OPP_CHANNELER, 24 + object SPRITE_BUG_CATCHER, 17, 13, STAY, DOWN, 7, OPP_PSYCHIC_TR, 3 + object SPRITE_BUG_CATCHER, 3, 1, STAY, DOWN, 8, OPP_PSYCHIC_TR, 4 + object SPRITE_GYM_HELPER, 10, 15, STAY, DOWN, 9 ; person ; warp-to - EVENT_DISP SAFFRON_GYM_WIDTH, $11, $8 - EVENT_DISP SAFFRON_GYM_WIDTH, $11, $9 - EVENT_DISP SAFFRON_GYM_WIDTH, $3, $1 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $3, $5 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $5, $1 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $5, $5 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $9, $1 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $9, $5 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $b, $1 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $b, $5 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $f, $1 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $f, $5 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $11, $1 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $11, $5 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $3, $9 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $3, $b ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $5, $9 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $5, $b ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $b, $b ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $f, $b ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $3, $f ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $3, $13 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $5, $f ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $5, $13 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $9, $f ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $9, $13 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $b, $f ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $b, $13 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $f, $f ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $f, $13 ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $11, $f ; SAFFRON_GYM - EVENT_DISP SAFFRON_GYM_WIDTH, $11, $13 ; SAFFRON_GYM + warp_to 8, 17, SAFFRON_GYM_WIDTH + warp_to 9, 17, SAFFRON_GYM_WIDTH + warp_to 1, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 5, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 1, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 5, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 1, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 5, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 1, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 5, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 1, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 5, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 1, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 5, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 9, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 11, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 9, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 11, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 11, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 11, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 15, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 19, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 15, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 19, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 15, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 19, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 15, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 19, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 15, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 19, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 15, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM + warp_to 19, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM diff --git a/data/mapObjects/saffronhouse1.asm b/data/mapObjects/saffronhouse1.asm index 9f6d7750..c6abb539 100755 --- a/data/mapObjects/saffronhouse1.asm +++ b/data/mapObjects/saffronhouse1.asm @@ -1,18 +1,18 @@ SaffronHouse1Object: db $a ; border block - db $2 ; warps - db $7, $2, $3, $ff - db $7, $3, $3, $ff + db 2 ; warps + warp 2, 7, 3, -1 + warp 3, 7, 3, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_BRUNETTE_GIRL, $2, $3, STAY, RIGHT, $1 ; person - object SPRITE_BIRD, $0, $4, WALK, $1, $2 ; person - object SPRITE_BUG_CATCHER, $4, $1, STAY, DOWN, $3 ; person - object SPRITE_PAPER_SHEET, $3, $3, STAY, NONE, $4 ; person + db 4 ; objects + object SPRITE_BRUNETTE_GIRL, 2, 3, STAY, RIGHT, 1 ; person + object SPRITE_BIRD, 0, 4, WALK, 1, 2 ; person + object SPRITE_BUG_CATCHER, 4, 1, STAY, DOWN, 3 ; person + object SPRITE_PAPER_SHEET, 3, 3, STAY, NONE, 4 ; person ; warp-to - EVENT_DISP SAFFRON_HOUSE_1_WIDTH, $7, $2 - EVENT_DISP SAFFRON_HOUSE_1_WIDTH, $7, $3 + warp_to 2, 7, SAFFRON_HOUSE_1_WIDTH + warp_to 3, 7, SAFFRON_HOUSE_1_WIDTH diff --git a/data/mapObjects/saffronhouse2.asm b/data/mapObjects/saffronhouse2.asm index e57bdbb7..ac1827b9 100755 --- a/data/mapObjects/saffronhouse2.asm +++ b/data/mapObjects/saffronhouse2.asm @@ -1,15 +1,15 @@ SaffronHouse2Object: db $a ; border block - db $2 ; warps - db $7, $2, $7, $ff - db $7, $3, $7, $ff + db 2 ; warps + warp 2, 7, 7, -1 + warp 3, 7, 7, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FISHER, $5, $3, STAY, LEFT, $1 ; person + db 1 ; objects + object SPRITE_FISHER, 5, 3, STAY, LEFT, 1 ; person ; warp-to - EVENT_DISP SAFFRON_HOUSE_2_WIDTH, $7, $2 - EVENT_DISP SAFFRON_HOUSE_2_WIDTH, $7, $3 + warp_to 2, 7, SAFFRON_HOUSE_2_WIDTH + warp_to 3, 7, SAFFRON_HOUSE_2_WIDTH diff --git a/data/mapObjects/saffronmart.asm b/data/mapObjects/saffronmart.asm index 113a1ea9..6293b901 100755 --- a/data/mapObjects/saffronmart.asm +++ b/data/mapObjects/saffronmart.asm @@ -1,17 +1,17 @@ SaffronMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $4, $ff - db $7, $4, $4, $ff + db 2 ; warps + warp 3, 7, 4, -1 + warp 4, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_BLACK_HAIR_BOY_2, $4, $2, STAY, NONE, $2 ; person - object SPRITE_LASS, $6, $5, WALK, $0, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_BLACK_HAIR_BOY_2, 4, 2, STAY, NONE, 2 ; person + object SPRITE_LASS, 6, 5, WALK, 0, 3 ; person ; warp-to - EVENT_DISP SAFFRON_MART_WIDTH, $7, $3 - EVENT_DISP SAFFRON_MART_WIDTH, $7, $4 + warp_to 3, 7, SAFFRON_MART_WIDTH + warp_to 4, 7, SAFFRON_MART_WIDTH diff --git a/data/mapObjects/saffronpokecenter.asm b/data/mapObjects/saffronpokecenter.asm index 896b550a..b367ec89 100755 --- a/data/mapObjects/saffronpokecenter.asm +++ b/data/mapObjects/saffronpokecenter.asm @@ -1,18 +1,18 @@ SaffronPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $6, $ff - db $7, $4, $6, $ff + db 2 ; warps + warp 3, 7, 6, -1 + warp 4, 7, 6, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_FOULARD_WOMAN, $5, $5, STAY, NONE, $2 ; person - object SPRITE_GENTLEMAN, $8, $3, STAY, DOWN, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_FOULARD_WOMAN, 5, 5, STAY, NONE, 2 ; person + object SPRITE_GENTLEMAN, 8, 3, STAY, DOWN, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP SAFFRON_POKECENTER_WIDTH, $7, $3 - EVENT_DISP SAFFRON_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, SAFFRON_POKECENTER_WIDTH + warp_to 4, 7, SAFFRON_POKECENTER_WIDTH diff --git a/data/mapObjects/school.asm b/data/mapObjects/school.asm index 53f7fc00..8f07144f 100755 --- a/data/mapObjects/school.asm +++ b/data/mapObjects/school.asm @@ -1,16 +1,16 @@ SchoolObject: db $a ; border block - db $2 ; warps - db $7, $2, $2, $ff - db $7, $3, $2, $ff + db 2 ; warps + warp 2, 7, 2, -1 + warp 3, 7, 2, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BRUNETTE_GIRL, $3, $5, STAY, UP, $1 ; person - object SPRITE_LASS, $4, $1, STAY, DOWN, $2 ; person + db 2 ; objects + object SPRITE_BRUNETTE_GIRL, 3, 5, STAY, UP, 1 ; person + object SPRITE_LASS, 4, 1, STAY, DOWN, 2 ; person ; warp-to - EVENT_DISP VIRIDIAN_SCHOOL_WIDTH, $7, $2 - EVENT_DISP VIRIDIAN_SCHOOL_WIDTH, $7, $3 + warp_to 2, 7, VIRIDIAN_SCHOOL_WIDTH + warp_to 3, 7, VIRIDIAN_SCHOOL_WIDTH diff --git a/data/mapObjects/seafoamislands1.asm b/data/mapObjects/seafoamislands1.asm index 4f7f7a8e..a1617004 100755 --- a/data/mapObjects/seafoamislands1.asm +++ b/data/mapObjects/seafoamislands1.asm @@ -1,30 +1,30 @@ SeafoamIslands1Object: db $7d ; border block - db $7 ; warps - db $11, $4, $0, $ff - db $11, $5, $0, $ff - db $11, $1a, $1, $ff - db $11, $1b, $1, $ff - db $5, $7, $1, SEAFOAM_ISLANDS_2 - db $3, $19, $6, SEAFOAM_ISLANDS_2 - db $f, $17, $4, SEAFOAM_ISLANDS_2 + db 7 ; warps + warp 4, 17, 0, -1 + warp 5, 17, 0, -1 + warp 26, 17, 1, -1 + warp 27, 17, 1, -1 + warp 7, 5, 1, SEAFOAM_ISLANDS_2 + warp 25, 3, 6, SEAFOAM_ISLANDS_2 + warp 23, 15, 4, SEAFOAM_ISLANDS_2 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BOULDER, $12, $a, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person - object SPRITE_BOULDER, $1a, $7, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person + db 2 ; objects + object SPRITE_BOULDER, 18, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person + object SPRITE_BOULDER, 26, 7, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person ; warp-to - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $11, $4 - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $11, $5 - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $11, $1a - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $11, $1b - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $5, $7 ; SEAFOAM_ISLANDS_2 - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $3, $19 ; SEAFOAM_ISLANDS_2 - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $f, $17 ; SEAFOAM_ISLANDS_2 + warp_to 4, 17, SEAFOAM_ISLANDS_1_WIDTH + warp_to 5, 17, SEAFOAM_ISLANDS_1_WIDTH + warp_to 26, 17, SEAFOAM_ISLANDS_1_WIDTH + warp_to 27, 17, SEAFOAM_ISLANDS_1_WIDTH + warp_to 7, 5, SEAFOAM_ISLANDS_1_WIDTH ; SEAFOAM_ISLANDS_2 + warp_to 25, 3, SEAFOAM_ISLANDS_1_WIDTH ; SEAFOAM_ISLANDS_2 + warp_to 23, 15, SEAFOAM_ISLANDS_1_WIDTH ; SEAFOAM_ISLANDS_2 ; holes - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $6, $11 - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $6, $18 + warp_to 17, 6, SEAFOAM_ISLANDS_1_WIDTH + warp_to 24, 6, SEAFOAM_ISLANDS_1_WIDTH diff --git a/data/mapObjects/seafoamislands2.asm b/data/mapObjects/seafoamislands2.asm index d25e5375..76c2ce3c 100755 --- a/data/mapObjects/seafoamislands2.asm +++ b/data/mapObjects/seafoamislands2.asm @@ -1,26 +1,26 @@ SeafoamIslands2Object: db $7d ; border block - db $7 ; warps - db $2, $4, $0, SEAFOAM_ISLANDS_3 - db $5, $7, $4, SEAFOAM_ISLANDS_1 - db $7, $d, $2, SEAFOAM_ISLANDS_3 - db $f, $13, $3, SEAFOAM_ISLANDS_3 - db $f, $17, $6, SEAFOAM_ISLANDS_1 - db $b, $19, $5, SEAFOAM_ISLANDS_3 - db $3, $19, $5, SEAFOAM_ISLANDS_1 + db 7 ; warps + warp 4, 2, 0, SEAFOAM_ISLANDS_3 + warp 7, 5, 4, SEAFOAM_ISLANDS_1 + warp 13, 7, 2, SEAFOAM_ISLANDS_3 + warp 19, 15, 3, SEAFOAM_ISLANDS_3 + warp 23, 15, 6, SEAFOAM_ISLANDS_1 + warp 25, 11, 5, SEAFOAM_ISLANDS_3 + warp 25, 3, 5, SEAFOAM_ISLANDS_1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BOULDER, $11, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person - object SPRITE_BOULDER, $16, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person + db 2 ; objects + object SPRITE_BOULDER, 17, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person + object SPRITE_BOULDER, 22, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person ; warp-to - EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $2, $4 ; SEAFOAM_ISLANDS_3 - EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $5, $7 ; SEAFOAM_ISLANDS_1 - EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $7, $d ; SEAFOAM_ISLANDS_3 - EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $f, $13 ; SEAFOAM_ISLANDS_3 - EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $f, $17 ; SEAFOAM_ISLANDS_1 - EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $b, $19 ; SEAFOAM_ISLANDS_3 - EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $3, $19 ; SEAFOAM_ISLANDS_1 + warp_to 4, 2, SEAFOAM_ISLANDS_2_WIDTH ; SEAFOAM_ISLANDS_3 + warp_to 7, 5, SEAFOAM_ISLANDS_2_WIDTH ; SEAFOAM_ISLANDS_1 + warp_to 13, 7, SEAFOAM_ISLANDS_2_WIDTH ; SEAFOAM_ISLANDS_3 + warp_to 19, 15, SEAFOAM_ISLANDS_2_WIDTH ; SEAFOAM_ISLANDS_3 + warp_to 23, 15, SEAFOAM_ISLANDS_2_WIDTH ; SEAFOAM_ISLANDS_1 + warp_to 25, 11, SEAFOAM_ISLANDS_2_WIDTH ; SEAFOAM_ISLANDS_3 + warp_to 25, 3, SEAFOAM_ISLANDS_2_WIDTH ; SEAFOAM_ISLANDS_1 diff --git a/data/mapObjects/seafoamislands3.asm b/data/mapObjects/seafoamislands3.asm index a660f2ed..a5cb848a 100755 --- a/data/mapObjects/seafoamislands3.asm +++ b/data/mapObjects/seafoamislands3.asm @@ -1,26 +1,26 @@ SeafoamIslands3Object: db $7d ; border block - db $7 ; warps - db $3, $5, $0, SEAFOAM_ISLANDS_2 - db $d, $5, $0, SEAFOAM_ISLANDS_4 - db $7, $d, $2, SEAFOAM_ISLANDS_2 - db $f, $13, $3, SEAFOAM_ISLANDS_2 - db $3, $19, $3, SEAFOAM_ISLANDS_4 - db $b, $19, $5, SEAFOAM_ISLANDS_2 - db $e, $19, $4, SEAFOAM_ISLANDS_4 + db 7 ; warps + warp 5, 3, 0, SEAFOAM_ISLANDS_2 + warp 5, 13, 0, SEAFOAM_ISLANDS_4 + warp 13, 7, 2, SEAFOAM_ISLANDS_2 + warp 19, 15, 3, SEAFOAM_ISLANDS_2 + warp 25, 3, 3, SEAFOAM_ISLANDS_4 + warp 25, 11, 5, SEAFOAM_ISLANDS_2 + warp 25, 14, 4, SEAFOAM_ISLANDS_4 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BOULDER, $12, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person - object SPRITE_BOULDER, $17, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person + db 2 ; objects + object SPRITE_BOULDER, 18, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person + object SPRITE_BOULDER, 23, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person ; warp-to - EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $3, $5 ; SEAFOAM_ISLANDS_2 - EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $d, $5 ; SEAFOAM_ISLANDS_4 - EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $7, $d ; SEAFOAM_ISLANDS_2 - EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $f, $13 ; SEAFOAM_ISLANDS_2 - EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $3, $19 ; SEAFOAM_ISLANDS_4 - EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $b, $19 ; SEAFOAM_ISLANDS_2 - EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $e, $19 ; SEAFOAM_ISLANDS_4 + warp_to 5, 3, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_2 + warp_to 5, 13, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_4 + warp_to 13, 7, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_2 + warp_to 19, 15, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_2 + warp_to 25, 3, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_4 + warp_to 25, 11, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_2 + warp_to 25, 14, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_4 diff --git a/data/mapObjects/seafoamislands4.asm b/data/mapObjects/seafoamislands4.asm index c7043a93..0faaae28 100755 --- a/data/mapObjects/seafoamislands4.asm +++ b/data/mapObjects/seafoamislands4.asm @@ -1,30 +1,30 @@ SeafoamIslands4Object: db $7d ; border block - db $7 ; warps - db $c, $5, $1, SEAFOAM_ISLANDS_3 - db $6, $8, $2, SEAFOAM_ISLANDS_5 - db $4, $19, $3, SEAFOAM_ISLANDS_5 - db $3, $19, $4, SEAFOAM_ISLANDS_3 - db $e, $19, $6, SEAFOAM_ISLANDS_3 - db $11, $14, $0, SEAFOAM_ISLANDS_5 - db $11, $15, $1, SEAFOAM_ISLANDS_5 + db 7 ; warps + warp 5, 12, 1, SEAFOAM_ISLANDS_3 + warp 8, 6, 2, SEAFOAM_ISLANDS_5 + warp 25, 4, 3, SEAFOAM_ISLANDS_5 + warp 25, 3, 4, SEAFOAM_ISLANDS_3 + warp 25, 14, 6, SEAFOAM_ISLANDS_3 + warp 20, 17, 0, SEAFOAM_ISLANDS_5 + warp 21, 17, 1, SEAFOAM_ISLANDS_5 - db $0 ; signs + db 0 ; signs - db $6 ; objects - object SPRITE_BOULDER, $5, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person - object SPRITE_BOULDER, $3, $f, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person - object SPRITE_BOULDER, $8, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $3 ; person - object SPRITE_BOULDER, $9, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $4 ; person - object SPRITE_BOULDER, $12, $6, STAY, NONE, $5 ; person - object SPRITE_BOULDER, $13, $6, STAY, NONE, $6 ; person + db 6 ; objects + object SPRITE_BOULDER, 5, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person + object SPRITE_BOULDER, 3, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person + object SPRITE_BOULDER, 8, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 3 ; person + object SPRITE_BOULDER, 9, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 4 ; person + object SPRITE_BOULDER, 18, 6, STAY, NONE, 5 ; person + object SPRITE_BOULDER, 19, 6, STAY, NONE, 6 ; person ; warp-to - EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $c, $5 ; SEAFOAM_ISLANDS_3 - EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $6, $8 ; SEAFOAM_ISLANDS_5 - EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $4, $19 ; SEAFOAM_ISLANDS_5 - EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $3, $19 ; SEAFOAM_ISLANDS_3 - EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $e, $19 ; SEAFOAM_ISLANDS_3 - EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $11, $14 ; SEAFOAM_ISLANDS_5 - EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $11, $15 ; SEAFOAM_ISLANDS_5 + warp_to 5, 12, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_3 + warp_to 8, 6, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_5 + warp_to 25, 4, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_5 + warp_to 25, 3, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_3 + warp_to 25, 14, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_3 + warp_to 20, 17, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_5 + warp_to 21, 17, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_5 diff --git a/data/mapObjects/seafoamislands5.asm b/data/mapObjects/seafoamislands5.asm index a05c00cc..9bd82887 100755 --- a/data/mapObjects/seafoamislands5.asm +++ b/data/mapObjects/seafoamislands5.asm @@ -1,23 +1,23 @@ SeafoamIslands5Object: db $7d ; border block - db $4 ; warps - db $11, $14, $5, SEAFOAM_ISLANDS_4 - db $11, $15, $6, SEAFOAM_ISLANDS_4 - db $7, $b, $1, SEAFOAM_ISLANDS_4 - db $4, $19, $2, SEAFOAM_ISLANDS_4 + db 4 ; warps + warp 20, 17, 5, SEAFOAM_ISLANDS_4 + warp 21, 17, 6, SEAFOAM_ISLANDS_4 + warp 11, 7, 1, SEAFOAM_ISLANDS_4 + warp 25, 4, 2, SEAFOAM_ISLANDS_4 - db $2 ; signs - db $f, $9, $4 ; SeafoamIslands5Text4 - db $1, $17, $5 ; SeafoamIslands5Text5 + db 2 ; signs + sign 9, 15, 4 ; SeafoamIslands5Text4 + sign 23, 1, 5 ; SeafoamIslands5Text5 - db $3 ; objects - object SPRITE_BOULDER, $4, $f, STAY, NONE, $1 ; person - object SPRITE_BOULDER, $5, $f, STAY, NONE, $2 ; person - object SPRITE_BIRD, $6, $1, STAY, DOWN, $3, ARTICUNO, 50 + db 3 ; objects + object SPRITE_BOULDER, 4, 15, STAY, NONE, 1 ; person + object SPRITE_BOULDER, 5, 15, STAY, NONE, 2 ; person + object SPRITE_BIRD, 6, 1, STAY, DOWN, 3, ARTICUNO, 50 ; warp-to - EVENT_DISP SEAFOAM_ISLANDS_5_WIDTH, $11, $14 ; SEAFOAM_ISLANDS_4 - EVENT_DISP SEAFOAM_ISLANDS_5_WIDTH, $11, $15 ; SEAFOAM_ISLANDS_4 - EVENT_DISP SEAFOAM_ISLANDS_5_WIDTH, $7, $b ; SEAFOAM_ISLANDS_4 - EVENT_DISP SEAFOAM_ISLANDS_5_WIDTH, $4, $19 ; SEAFOAM_ISLANDS_4 + warp_to 20, 17, SEAFOAM_ISLANDS_5_WIDTH ; SEAFOAM_ISLANDS_4 + warp_to 21, 17, SEAFOAM_ISLANDS_5_WIDTH ; SEAFOAM_ISLANDS_4 + warp_to 11, 7, SEAFOAM_ISLANDS_5_WIDTH ; SEAFOAM_ISLANDS_4 + warp_to 25, 4, SEAFOAM_ISLANDS_5_WIDTH ; SEAFOAM_ISLANDS_4 diff --git a/data/mapObjects/silphco1.asm b/data/mapObjects/silphco1.asm index fe779393..0f98247b 100755 --- a/data/mapObjects/silphco1.asm +++ b/data/mapObjects/silphco1.asm @@ -1,21 +1,21 @@ SilphCo1Object: db $2e ; border block - db $5 ; warps - db $11, $a, $5, $ff - db $11, $b, $5, $ff - db $0, $1a, $0, SILPH_CO_2F - db $0, $14, $0, SILPH_CO_ELEVATOR - db $a, $10, $6, SILPH_CO_3F + db 5 ; warps + warp 10, 17, 5, -1 + warp 11, 17, 5, -1 + warp 26, 0, 0, SILPH_CO_2F + warp 20, 0, 0, SILPH_CO_ELEVATOR + warp 16, 10, 6, SILPH_CO_3F - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_CABLE_CLUB_WOMAN, $4, $2, STAY, DOWN, $1 ; person + db 1 ; objects + object SPRITE_CABLE_CLUB_WOMAN, 4, 2, STAY, DOWN, 1 ; person ; warp-to - EVENT_DISP SILPH_CO_1F_WIDTH, $11, $a - EVENT_DISP SILPH_CO_1F_WIDTH, $11, $b - EVENT_DISP SILPH_CO_1F_WIDTH, $0, $1a ; SILPH_CO_2F - EVENT_DISP SILPH_CO_1F_WIDTH, $0, $14 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_1F_WIDTH, $a, $10 ; SILPH_CO_3F + warp_to 10, 17, SILPH_CO_1F_WIDTH + warp_to 11, 17, SILPH_CO_1F_WIDTH + warp_to 26, 0, SILPH_CO_1F_WIDTH ; SILPH_CO_2F + warp_to 20, 0, SILPH_CO_1F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 16, 10, SILPH_CO_1F_WIDTH ; SILPH_CO_3F diff --git a/data/mapObjects/silphco10.asm b/data/mapObjects/silphco10.asm index 185a23c9..90fa2acd 100755 --- a/data/mapObjects/silphco10.asm +++ b/data/mapObjects/silphco10.asm @@ -1,28 +1,28 @@ SilphCo10Object: db $2e ; border block - db $6 ; warps - db $0, $8, $0, SILPH_CO_9F - db $0, $a, $0, SILPH_CO_11F - db $0, $c, $0, SILPH_CO_ELEVATOR - db $b, $9, $3, SILPH_CO_4F - db $f, $d, $5, SILPH_CO_4F - db $7, $d, $6, SILPH_CO_4F + db 6 ; warps + warp 8, 0, 0, SILPH_CO_9F + warp 10, 0, 0, SILPH_CO_11F + warp 12, 0, 0, SILPH_CO_ELEVATOR + warp 9, 11, 3, SILPH_CO_4F + warp 13, 15, 5, SILPH_CO_4F + warp 13, 7, 6, SILPH_CO_4F - db $0 ; signs + db 0 ; signs - db $6 ; objects - object SPRITE_ROCKET, $1, $9, STAY, RIGHT, $1, OPP_ROCKET, $27 - object SPRITE_OAK_AIDE, $a, $2, STAY, LEFT, $2, OPP_SCIENTIST, $b - object SPRITE_ERIKA, $9, $f, WALK, $0, $3 ; person - object SPRITE_BALL, $2, $c, STAY, NONE, $4, TM_26 - object SPRITE_BALL, $4, $e, STAY, NONE, $5, RARE_CANDY - object SPRITE_BALL, $5, $b, STAY, NONE, $6, CARBOS + db 6 ; objects + object SPRITE_ROCKET, 1, 9, STAY, RIGHT, 1, OPP_ROCKET, 39 + object SPRITE_OAK_AIDE, 10, 2, STAY, LEFT, 2, OPP_SCIENTIST, 11 + object SPRITE_ERIKA, 9, 15, WALK, 0, 3 ; person + object SPRITE_BALL, 2, 12, STAY, NONE, 4, TM_26 + object SPRITE_BALL, 4, 14, STAY, NONE, 5, RARE_CANDY + object SPRITE_BALL, 5, 11, STAY, NONE, 6, CARBOS ; warp-to - EVENT_DISP SILPH_CO_10F_WIDTH, $0, $8 ; SILPH_CO_9F - EVENT_DISP SILPH_CO_10F_WIDTH, $0, $a ; SILPH_CO_11F - EVENT_DISP SILPH_CO_10F_WIDTH, $0, $c ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_10F_WIDTH, $b, $9 ; SILPH_CO_4F - EVENT_DISP SILPH_CO_10F_WIDTH, $f, $d ; SILPH_CO_4F - EVENT_DISP SILPH_CO_10F_WIDTH, $7, $d ; SILPH_CO_4F + warp_to 8, 0, SILPH_CO_10F_WIDTH ; SILPH_CO_9F + warp_to 10, 0, SILPH_CO_10F_WIDTH ; SILPH_CO_11F + warp_to 12, 0, SILPH_CO_10F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 9, 11, SILPH_CO_10F_WIDTH ; SILPH_CO_4F + warp_to 13, 15, SILPH_CO_10F_WIDTH ; SILPH_CO_4F + warp_to 13, 7, SILPH_CO_10F_WIDTH ; SILPH_CO_4F diff --git a/data/mapObjects/silphco11.asm b/data/mapObjects/silphco11.asm index 95712629..a130f4f1 100755 --- a/data/mapObjects/silphco11.asm +++ b/data/mapObjects/silphco11.asm @@ -1,23 +1,23 @@ SilphCo11Object: db $d ; border block - db $4 ; warps - db $0, $9, $1, SILPH_CO_10F - db $0, $d, $0, SILPH_CO_ELEVATOR - db $5, $5, $9, $ff - db $2, $3, $3, SILPH_CO_7F + db 4 ; warps + warp 9, 0, 1, SILPH_CO_10F + warp 13, 0, 0, SILPH_CO_ELEVATOR + warp 5, 5, 9, -1 + warp 3, 2, 3, SILPH_CO_7F - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_MR_MASTERBALL, $7, $5, STAY, DOWN, $1 ; person - object SPRITE_FOULARD_WOMAN, $a, $5, STAY, DOWN, $2 ; person - object SPRITE_GIOVANNI, $6, $9, STAY, DOWN, $3, OPP_GIOVANNI, $2 - object SPRITE_ROCKET, $3, $10, STAY, UP, $4, OPP_ROCKET, $29 - object SPRITE_ROCKET, $f, $9, STAY, UP, $5, OPP_ROCKET, $28 + db 5 ; objects + object SPRITE_MR_MASTERBALL, 7, 5, STAY, DOWN, 1 ; person + object SPRITE_FOULARD_WOMAN, 10, 5, STAY, DOWN, 2 ; person + object SPRITE_GIOVANNI, 6, 9, STAY, DOWN, 3, OPP_GIOVANNI, 2 + object SPRITE_ROCKET, 3, 16, STAY, UP, 4, OPP_ROCKET, 41 + object SPRITE_ROCKET, 15, 9, STAY, UP, 5, OPP_ROCKET, 40 ; warp-to - EVENT_DISP SILPH_CO_11F_WIDTH, $0, $9 ; SILPH_CO_10F - EVENT_DISP SILPH_CO_11F_WIDTH, $0, $d ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_11F_WIDTH, $5, $5 - EVENT_DISP SILPH_CO_11F_WIDTH, $2, $3 ; SILPH_CO_7F + warp_to 9, 0, SILPH_CO_11F_WIDTH ; SILPH_CO_10F + warp_to 13, 0, SILPH_CO_11F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 5, 5, SILPH_CO_11F_WIDTH + warp_to 3, 2, SILPH_CO_11F_WIDTH ; SILPH_CO_7F diff --git a/data/mapObjects/silphco2.asm b/data/mapObjects/silphco2.asm index ae3aca74..4b7f34f6 100755 --- a/data/mapObjects/silphco2.asm +++ b/data/mapObjects/silphco2.asm @@ -1,29 +1,29 @@ SilphCo2Object: db $2e ; border block - db $7 ; warps - db $0, $18, $2, SILPH_CO_1F - db $0, $1a, $0, SILPH_CO_3F - db $0, $14, $0, SILPH_CO_ELEVATOR - db $3, $3, $6, SILPH_CO_3F - db $3, $d, $4, SILPH_CO_8F - db $f, $1b, $5, SILPH_CO_8F - db $f, $9, $4, SILPH_CO_6F + db 7 ; warps + warp 24, 0, 2, SILPH_CO_1F + warp 26, 0, 0, SILPH_CO_3F + warp 20, 0, 0, SILPH_CO_ELEVATOR + warp 3, 3, 6, SILPH_CO_3F + warp 13, 3, 4, SILPH_CO_8F + warp 27, 15, 5, SILPH_CO_8F + warp 9, 15, 4, SILPH_CO_6F - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_ERIKA, $a, $1, STAY, UP, $1 ; person - object SPRITE_OAK_AIDE, $5, $c, STAY, DOWN, $2, OPP_SCIENTIST, $2 - object SPRITE_OAK_AIDE, $18, $d, STAY, LEFT, $3, OPP_SCIENTIST, $3 - object SPRITE_ROCKET, $10, $b, STAY, UP, $4, OPP_ROCKET, $17 - object SPRITE_ROCKET, $18, $7, STAY, UP, $5, OPP_ROCKET, $18 + db 5 ; objects + object SPRITE_ERIKA, 10, 1, STAY, UP, 1 ; person + object SPRITE_OAK_AIDE, 5, 12, STAY, DOWN, 2, OPP_SCIENTIST, 2 + object SPRITE_OAK_AIDE, 24, 13, STAY, LEFT, 3, OPP_SCIENTIST, 3 + object SPRITE_ROCKET, 16, 11, STAY, UP, 4, OPP_ROCKET, 23 + object SPRITE_ROCKET, 24, 7, STAY, UP, 5, OPP_ROCKET, 24 ; warp-to - EVENT_DISP SILPH_CO_2F_WIDTH, $0, $18 ; SILPH_CO_1F - EVENT_DISP SILPH_CO_2F_WIDTH, $0, $1a ; SILPH_CO_3F - EVENT_DISP SILPH_CO_2F_WIDTH, $0, $14 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_2F_WIDTH, $3, $3 ; SILPH_CO_3F - EVENT_DISP SILPH_CO_2F_WIDTH, $3, $d ; SILPH_CO_8F - EVENT_DISP SILPH_CO_2F_WIDTH, $f, $1b ; SILPH_CO_8F - EVENT_DISP SILPH_CO_2F_WIDTH, $f, $9 ; SILPH_CO_6F + warp_to 24, 0, SILPH_CO_2F_WIDTH ; SILPH_CO_1F + warp_to 26, 0, SILPH_CO_2F_WIDTH ; SILPH_CO_3F + warp_to 20, 0, SILPH_CO_2F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 3, 3, SILPH_CO_2F_WIDTH ; SILPH_CO_3F + warp_to 13, 3, SILPH_CO_2F_WIDTH ; SILPH_CO_8F + warp_to 27, 15, SILPH_CO_2F_WIDTH ; SILPH_CO_8F + warp_to 9, 15, SILPH_CO_2F_WIDTH ; SILPH_CO_6F diff --git a/data/mapObjects/silphco3.asm b/data/mapObjects/silphco3.asm index ddea9062..86b3b215 100755 --- a/data/mapObjects/silphco3.asm +++ b/data/mapObjects/silphco3.asm @@ -1,34 +1,34 @@ SilphCo3Object: db $2e ; border block - db $a ; warps - db $0, $1a, $1, SILPH_CO_2F - db $0, $18, $0, SILPH_CO_4F - db $0, $14, $0, SILPH_CO_ELEVATOR - db $b, $17, $9, SILPH_CO_3F - db $3, $3, $5, SILPH_CO_5F - db $f, $3, $6, SILPH_CO_5F - db $3, $1b, $3, SILPH_CO_2F - db $b, $3, $3, SILPH_CO_9F - db $b, $b, $4, SILPH_CO_7F - db $f, $1b, $3, SILPH_CO_3F + db 10 ; warps + warp 26, 0, 1, SILPH_CO_2F + warp 24, 0, 0, SILPH_CO_4F + warp 20, 0, 0, SILPH_CO_ELEVATOR + warp 23, 11, 9, SILPH_CO_3F + warp 3, 3, 5, SILPH_CO_5F + warp 3, 15, 6, SILPH_CO_5F + warp 27, 3, 3, SILPH_CO_2F + warp 3, 11, 3, SILPH_CO_9F + warp 11, 11, 4, SILPH_CO_7F + warp 27, 15, 3, SILPH_CO_3F - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_LAPRAS_GIVER, $18, $8, STAY, NONE, $1 ; person - object SPRITE_ROCKET, $14, $7, STAY, LEFT, $2, OPP_ROCKET, $19 - object SPRITE_OAK_AIDE, $7, $9, STAY, DOWN, $3, OPP_SCIENTIST, $4 - object SPRITE_BALL, $8, $5, STAY, NONE, $4, HYPER_POTION + db 4 ; objects + object SPRITE_LAPRAS_GIVER, 24, 8, STAY, NONE, 1 ; person + object SPRITE_ROCKET, 20, 7, STAY, LEFT, 2, OPP_ROCKET, 25 + object SPRITE_OAK_AIDE, 7, 9, STAY, DOWN, 3, OPP_SCIENTIST, 4 + object SPRITE_BALL, 8, 5, STAY, NONE, 4, HYPER_POTION ; warp-to - EVENT_DISP SILPH_CO_3F_WIDTH, $0, $1a ; SILPH_CO_2F - EVENT_DISP SILPH_CO_3F_WIDTH, $0, $18 ; SILPH_CO_4F - EVENT_DISP SILPH_CO_3F_WIDTH, $0, $14 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_3F_WIDTH, $b, $17 ; SILPH_CO_3F - EVENT_DISP SILPH_CO_3F_WIDTH, $3, $3 ; SILPH_CO_5F - EVENT_DISP SILPH_CO_3F_WIDTH, $f, $3 ; SILPH_CO_5F - EVENT_DISP SILPH_CO_3F_WIDTH, $3, $1b ; SILPH_CO_2F - EVENT_DISP SILPH_CO_3F_WIDTH, $b, $3 ; SILPH_CO_9F - EVENT_DISP SILPH_CO_3F_WIDTH, $b, $b ; SILPH_CO_7F - EVENT_DISP SILPH_CO_3F_WIDTH, $f, $1b ; SILPH_CO_3F + warp_to 26, 0, SILPH_CO_3F_WIDTH ; SILPH_CO_2F + warp_to 24, 0, SILPH_CO_3F_WIDTH ; SILPH_CO_4F + warp_to 20, 0, SILPH_CO_3F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 23, 11, SILPH_CO_3F_WIDTH ; SILPH_CO_3F + warp_to 3, 3, SILPH_CO_3F_WIDTH ; SILPH_CO_5F + warp_to 3, 15, SILPH_CO_3F_WIDTH ; SILPH_CO_5F + warp_to 27, 3, SILPH_CO_3F_WIDTH ; SILPH_CO_2F + warp_to 3, 11, SILPH_CO_3F_WIDTH ; SILPH_CO_9F + warp_to 11, 11, SILPH_CO_3F_WIDTH ; SILPH_CO_7F + warp_to 27, 15, SILPH_CO_3F_WIDTH ; SILPH_CO_3F diff --git a/data/mapObjects/silphco4.asm b/data/mapObjects/silphco4.asm index a2320112..73082342 100755 --- a/data/mapObjects/silphco4.asm +++ b/data/mapObjects/silphco4.asm @@ -1,31 +1,31 @@ SilphCo4Object: db $2e ; border block - db $7 ; warps - db $0, $18, $1, SILPH_CO_3F - db $0, $1a, $1, SILPH_CO_5F - db $0, $14, $0, SILPH_CO_ELEVATOR - db $7, $b, $3, SILPH_CO_10F - db $3, $11, $3, SILPH_CO_6F - db $f, $3, $4, SILPH_CO_10F - db $b, $11, $5, SILPH_CO_10F + db 7 ; warps + warp 24, 0, 1, SILPH_CO_3F + warp 26, 0, 1, SILPH_CO_5F + warp 20, 0, 0, SILPH_CO_ELEVATOR + warp 11, 7, 3, SILPH_CO_10F + warp 17, 3, 3, SILPH_CO_6F + warp 3, 15, 4, SILPH_CO_10F + warp 17, 11, 5, SILPH_CO_10F - db $0 ; signs + db 0 ; signs - db $7 ; objects - object SPRITE_LAPRAS_GIVER, $6, $2, STAY, NONE, $1 ; person - object SPRITE_ROCKET, $9, $e, STAY, RIGHT, $2, OPP_ROCKET, $1a - object SPRITE_OAK_AIDE, $e, $6, STAY, LEFT, $3, OPP_SCIENTIST, $5 - object SPRITE_ROCKET, $1a, $a, STAY, UP, $4, OPP_ROCKET, $1b - object SPRITE_BALL, $3, $9, STAY, NONE, $5, FULL_HEAL - object SPRITE_BALL, $4, $7, STAY, NONE, $6, MAX_REVIVE - object SPRITE_BALL, $5, $8, STAY, NONE, $7, ESCAPE_ROPE + db 7 ; objects + object SPRITE_LAPRAS_GIVER, 6, 2, STAY, NONE, 1 ; person + object SPRITE_ROCKET, 9, 14, STAY, RIGHT, 2, OPP_ROCKET, 26 + object SPRITE_OAK_AIDE, 14, 6, STAY, LEFT, 3, OPP_SCIENTIST, 5 + object SPRITE_ROCKET, 26, 10, STAY, UP, 4, OPP_ROCKET, 27 + object SPRITE_BALL, 3, 9, STAY, NONE, 5, FULL_HEAL + object SPRITE_BALL, 4, 7, STAY, NONE, 6, MAX_REVIVE + object SPRITE_BALL, 5, 8, STAY, NONE, 7, ESCAPE_ROPE ; warp-to - EVENT_DISP SILPH_CO_4F_WIDTH, $0, $18 ; SILPH_CO_3F - EVENT_DISP SILPH_CO_4F_WIDTH, $0, $1a ; SILPH_CO_5F - EVENT_DISP SILPH_CO_4F_WIDTH, $0, $14 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_4F_WIDTH, $7, $b ; SILPH_CO_10F - EVENT_DISP SILPH_CO_4F_WIDTH, $3, $11 ; SILPH_CO_6F - EVENT_DISP SILPH_CO_4F_WIDTH, $f, $3 ; SILPH_CO_10F - EVENT_DISP SILPH_CO_4F_WIDTH, $b, $11 ; SILPH_CO_10F + warp_to 24, 0, SILPH_CO_4F_WIDTH ; SILPH_CO_3F + warp_to 26, 0, SILPH_CO_4F_WIDTH ; SILPH_CO_5F + warp_to 20, 0, SILPH_CO_4F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 11, 7, SILPH_CO_4F_WIDTH ; SILPH_CO_10F + warp_to 17, 3, SILPH_CO_4F_WIDTH ; SILPH_CO_6F + warp_to 3, 15, SILPH_CO_4F_WIDTH ; SILPH_CO_10F + warp_to 17, 11, SILPH_CO_4F_WIDTH ; SILPH_CO_10F diff --git a/data/mapObjects/silphco5.asm b/data/mapObjects/silphco5.asm index 62e30fac..5a7d59fc 100755 --- a/data/mapObjects/silphco5.asm +++ b/data/mapObjects/silphco5.asm @@ -1,35 +1,35 @@ SilphCo5Object: db $2e ; border block - db $7 ; warps - db $0, $18, $1, SILPH_CO_6F - db $0, $1a, $1, SILPH_CO_4F - db $0, $14, $0, SILPH_CO_ELEVATOR - db $3, $1b, $5, SILPH_CO_7F - db $f, $9, $4, SILPH_CO_9F - db $5, $b, $4, SILPH_CO_3F - db $f, $3, $5, SILPH_CO_3F + db 7 ; warps + warp 24, 0, 1, SILPH_CO_6F + warp 26, 0, 1, SILPH_CO_4F + warp 20, 0, 0, SILPH_CO_ELEVATOR + warp 27, 3, 5, SILPH_CO_7F + warp 9, 15, 4, SILPH_CO_9F + warp 11, 5, 4, SILPH_CO_3F + warp 3, 15, 5, SILPH_CO_3F - db $0 ; signs + db 0 ; signs - db $b ; objects - object SPRITE_LAPRAS_GIVER, $d, $9, STAY, NONE, $1 ; person - object SPRITE_ROCKET, $8, $10, STAY, RIGHT, $2, OPP_ROCKET, $1c - object SPRITE_OAK_AIDE, $8, $3, STAY, RIGHT, $3, OPP_SCIENTIST, $6 - object SPRITE_ROCKER, $12, $a, STAY, UP, $4, OPP_JUGGLER, $1 - object SPRITE_ROCKET, $1c, $4, STAY, UP, $5, OPP_ROCKET, $1d - object SPRITE_BALL, $2, $d, STAY, NONE, $6, TM_09 - object SPRITE_BALL, $4, $6, STAY, NONE, $7, PROTEIN - object SPRITE_BALL, $15, $10, STAY, NONE, $8, CARD_KEY - object SPRITE_CLIPBOARD, $16, $c, STAY, NONE, $9 ; person - object SPRITE_CLIPBOARD, $19, $a, STAY, NONE, $a ; person - object SPRITE_CLIPBOARD, $18, $6, STAY, NONE, $b ; person + db 11 ; objects + object SPRITE_LAPRAS_GIVER, 13, 9, STAY, NONE, 1 ; person + object SPRITE_ROCKET, 8, 16, STAY, RIGHT, 2, OPP_ROCKET, 28 + object SPRITE_OAK_AIDE, 8, 3, STAY, RIGHT, 3, OPP_SCIENTIST, 6 + object SPRITE_ROCKER, 18, 10, STAY, UP, 4, OPP_JUGGLER, 1 + object SPRITE_ROCKET, 28, 4, STAY, UP, 5, OPP_ROCKET, 29 + object SPRITE_BALL, 2, 13, STAY, NONE, 6, TM_09 + object SPRITE_BALL, 4, 6, STAY, NONE, 7, PROTEIN + object SPRITE_BALL, 21, 16, STAY, NONE, 8, CARD_KEY + object SPRITE_CLIPBOARD, 22, 12, STAY, NONE, 9 ; person + object SPRITE_CLIPBOARD, 25, 10, STAY, NONE, 10 ; person + object SPRITE_CLIPBOARD, 24, 6, STAY, NONE, 11 ; person ; warp-to - EVENT_DISP SILPH_CO_5F_WIDTH, $0, $18 ; SILPH_CO_6F - EVENT_DISP SILPH_CO_5F_WIDTH, $0, $1a ; SILPH_CO_4F - EVENT_DISP SILPH_CO_5F_WIDTH, $0, $14 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_5F_WIDTH, $3, $1b ; SILPH_CO_7F - EVENT_DISP SILPH_CO_5F_WIDTH, $f, $9 ; SILPH_CO_9F - EVENT_DISP SILPH_CO_5F_WIDTH, $5, $b ; SILPH_CO_3F - EVENT_DISP SILPH_CO_5F_WIDTH, $f, $3 ; SILPH_CO_3F + warp_to 24, 0, SILPH_CO_5F_WIDTH ; SILPH_CO_6F + warp_to 26, 0, SILPH_CO_5F_WIDTH ; SILPH_CO_4F + warp_to 20, 0, SILPH_CO_5F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 27, 3, SILPH_CO_5F_WIDTH ; SILPH_CO_7F + warp_to 9, 15, SILPH_CO_5F_WIDTH ; SILPH_CO_9F + warp_to 11, 5, SILPH_CO_5F_WIDTH ; SILPH_CO_3F + warp_to 3, 15, SILPH_CO_5F_WIDTH ; SILPH_CO_3F diff --git a/data/mapObjects/silphco6.asm b/data/mapObjects/silphco6.asm index 19d66e50..c936970d 100755 --- a/data/mapObjects/silphco6.asm +++ b/data/mapObjects/silphco6.asm @@ -1,30 +1,30 @@ SilphCo6Object: db $2e ; border block - db $5 ; warps - db $0, $10, $1, SILPH_CO_7F - db $0, $e, $0, SILPH_CO_5F - db $0, $12, $0, SILPH_CO_ELEVATOR - db $3, $3, $4, SILPH_CO_4F - db $3, $17, $6, SILPH_CO_2F + db 5 ; warps + warp 16, 0, 1, SILPH_CO_7F + warp 14, 0, 0, SILPH_CO_5F + warp 18, 0, 0, SILPH_CO_ELEVATOR + warp 3, 3, 4, SILPH_CO_4F + warp 23, 3, 6, SILPH_CO_2F - db $0 ; signs + db 0 ; signs - db $a ; objects - object SPRITE_LAPRAS_GIVER, $a, $6, STAY, NONE, $1 ; person - object SPRITE_LAPRAS_GIVER, $14, $6, STAY, NONE, $2 ; person - object SPRITE_ERIKA, $15, $6, STAY, DOWN, $3 ; person - object SPRITE_ERIKA, $b, $a, STAY, RIGHT, $4 ; person - object SPRITE_LAPRAS_GIVER, $12, $d, STAY, UP, $5 ; person - object SPRITE_ROCKET, $11, $3, STAY, RIGHT, $6, OPP_ROCKET, $1e - object SPRITE_OAK_AIDE, $7, $8, STAY, DOWN, $7, OPP_SCIENTIST, $7 - object SPRITE_ROCKET, $e, $f, STAY, LEFT, $8, OPP_ROCKET, $1f - object SPRITE_BALL, $3, $c, STAY, NONE, $9, HP_UP - object SPRITE_BALL, $2, $f, STAY, NONE, $a, X_ACCURACY + db 10 ; objects + object SPRITE_LAPRAS_GIVER, 10, 6, STAY, NONE, 1 ; person + object SPRITE_LAPRAS_GIVER, 20, 6, STAY, NONE, 2 ; person + object SPRITE_ERIKA, 21, 6, STAY, DOWN, 3 ; person + object SPRITE_ERIKA, 11, 10, STAY, RIGHT, 4 ; person + object SPRITE_LAPRAS_GIVER, 18, 13, STAY, UP, 5 ; person + object SPRITE_ROCKET, 17, 3, STAY, RIGHT, 6, OPP_ROCKET, 30 + object SPRITE_OAK_AIDE, 7, 8, STAY, DOWN, 7, OPP_SCIENTIST, 7 + object SPRITE_ROCKET, 14, 15, STAY, LEFT, 8, OPP_ROCKET, 31 + object SPRITE_BALL, 3, 12, STAY, NONE, 9, HP_UP + object SPRITE_BALL, 2, 15, STAY, NONE, 10, X_ACCURACY ; warp-to - EVENT_DISP SILPH_CO_6F_WIDTH, $0, $10 ; SILPH_CO_7F - EVENT_DISP SILPH_CO_6F_WIDTH, $0, $e ; SILPH_CO_5F - EVENT_DISP SILPH_CO_6F_WIDTH, $0, $12 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_6F_WIDTH, $3, $3 ; SILPH_CO_4F - EVENT_DISP SILPH_CO_6F_WIDTH, $3, $17 ; SILPH_CO_2F + warp_to 16, 0, SILPH_CO_6F_WIDTH ; SILPH_CO_7F + warp_to 14, 0, SILPH_CO_6F_WIDTH ; SILPH_CO_5F + warp_to 18, 0, SILPH_CO_6F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 3, 3, SILPH_CO_6F_WIDTH ; SILPH_CO_4F + warp_to 23, 3, SILPH_CO_6F_WIDTH ; SILPH_CO_2F diff --git a/data/mapObjects/silphco7.asm b/data/mapObjects/silphco7.asm index 47e881fe..96dc64a5 100755 --- a/data/mapObjects/silphco7.asm +++ b/data/mapObjects/silphco7.asm @@ -1,33 +1,33 @@ SilphCo7Object: db $2e ; border block - db $6 ; warps - db $0, $10, $1, SILPH_CO_8F - db $0, $16, $0, SILPH_CO_6F - db $0, $12, $0, SILPH_CO_ELEVATOR - db $7, $5, $3, SILPH_CO_11F - db $3, $5, $8, SILPH_CO_3F - db $f, $15, $3, SILPH_CO_5F + db 6 ; warps + warp 16, 0, 1, SILPH_CO_8F + warp 22, 0, 0, SILPH_CO_6F + warp 18, 0, 0, SILPH_CO_ELEVATOR + warp 5, 7, 3, SILPH_CO_11F + warp 5, 3, 8, SILPH_CO_3F + warp 21, 15, 3, SILPH_CO_5F - db $0 ; signs + db 0 ; signs - db $b ; objects - object SPRITE_LAPRAS_GIVER, $1, $5, STAY, NONE, $1 ; person - object SPRITE_LAPRAS_GIVER, $d, $d, STAY, UP, $2 ; person - object SPRITE_LAPRAS_GIVER, $7, $a, STAY, NONE, $3 ; person - object SPRITE_ERIKA, $a, $8, STAY, NONE, $4 ; person - object SPRITE_ROCKET, $d, $1, STAY, DOWN, $5, OPP_ROCKET, $20 - object SPRITE_OAK_AIDE, $2, $d, STAY, DOWN, $6, OPP_SCIENTIST, $8 - object SPRITE_ROCKET, $14, $2, STAY, LEFT, $7, OPP_ROCKET, $21 - object SPRITE_ROCKET, $13, $e, STAY, RIGHT, $8, OPP_ROCKET, $22 - object SPRITE_BLUE, $3, $7, STAY, UP, $9 ; person - object SPRITE_BALL, $1, $9, STAY, NONE, $a, CALCIUM - object SPRITE_BALL, $18, $b, STAY, NONE, $b, TM_03 + db 11 ; objects + object SPRITE_LAPRAS_GIVER, 1, 5, STAY, NONE, 1 ; person + object SPRITE_LAPRAS_GIVER, 13, 13, STAY, UP, 2 ; person + object SPRITE_LAPRAS_GIVER, 7, 10, STAY, NONE, 3 ; person + object SPRITE_ERIKA, 10, 8, STAY, NONE, 4 ; person + object SPRITE_ROCKET, 13, 1, STAY, DOWN, 5, OPP_ROCKET, 32 + object SPRITE_OAK_AIDE, 2, 13, STAY, DOWN, 6, OPP_SCIENTIST, 8 + object SPRITE_ROCKET, 20, 2, STAY, LEFT, 7, OPP_ROCKET, 33 + object SPRITE_ROCKET, 19, 14, STAY, RIGHT, 8, OPP_ROCKET, 34 + object SPRITE_BLUE, 3, 7, STAY, UP, 9 ; person + object SPRITE_BALL, 1, 9, STAY, NONE, 10, CALCIUM + object SPRITE_BALL, 24, 11, STAY, NONE, 11, TM_03 ; warp-to - EVENT_DISP SILPH_CO_7F_WIDTH, $0, $10 ; SILPH_CO_8F - EVENT_DISP SILPH_CO_7F_WIDTH, $0, $16 ; SILPH_CO_6F - EVENT_DISP SILPH_CO_7F_WIDTH, $0, $12 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_7F_WIDTH, $7, $5 ; SILPH_CO_11F - EVENT_DISP SILPH_CO_7F_WIDTH, $3, $5 ; SILPH_CO_3F - EVENT_DISP SILPH_CO_7F_WIDTH, $f, $15 ; SILPH_CO_5F + warp_to 16, 0, SILPH_CO_7F_WIDTH ; SILPH_CO_8F + warp_to 22, 0, SILPH_CO_7F_WIDTH ; SILPH_CO_6F + warp_to 18, 0, SILPH_CO_7F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 5, 7, SILPH_CO_7F_WIDTH ; SILPH_CO_11F + warp_to 5, 3, SILPH_CO_7F_WIDTH ; SILPH_CO_3F + warp_to 21, 15, SILPH_CO_7F_WIDTH ; SILPH_CO_5F diff --git a/data/mapObjects/silphco8.asm b/data/mapObjects/silphco8.asm index 188b27b6..513e84ea 100755 --- a/data/mapObjects/silphco8.asm +++ b/data/mapObjects/silphco8.asm @@ -1,28 +1,28 @@ SilphCo8Object: db $2e ; border block - db $7 ; warps - db $0, $10, $1, SILPH_CO_9F - db $0, $e, $0, SILPH_CO_7F - db $0, $12, $0, SILPH_CO_ELEVATOR - db $b, $3, $6, SILPH_CO_8F - db $f, $3, $4, SILPH_CO_2F - db $5, $b, $5, SILPH_CO_2F - db $9, $b, $3, SILPH_CO_8F + db 7 ; warps + warp 16, 0, 1, SILPH_CO_9F + warp 14, 0, 0, SILPH_CO_7F + warp 18, 0, 0, SILPH_CO_ELEVATOR + warp 3, 11, 6, SILPH_CO_8F + warp 3, 15, 4, SILPH_CO_2F + warp 11, 5, 5, SILPH_CO_2F + warp 11, 9, 3, SILPH_CO_8F - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_LAPRAS_GIVER, $4, $2, STAY, NONE, $1 ; person - object SPRITE_ROCKET, $13, $2, STAY, LEFT, $2, OPP_ROCKET, $23 - object SPRITE_OAK_AIDE, $a, $2, STAY, DOWN, $3, OPP_SCIENTIST, $9 - object SPRITE_ROCKET, $c, $f, STAY, RIGHT, $4, OPP_ROCKET, $24 + db 4 ; objects + object SPRITE_LAPRAS_GIVER, 4, 2, STAY, NONE, 1 ; person + object SPRITE_ROCKET, 19, 2, STAY, LEFT, 2, OPP_ROCKET, 35 + object SPRITE_OAK_AIDE, 10, 2, STAY, DOWN, 3, OPP_SCIENTIST, 9 + object SPRITE_ROCKET, 12, 15, STAY, RIGHT, 4, OPP_ROCKET, 36 ; warp-to - EVENT_DISP SILPH_CO_8F_WIDTH, $0, $10 ; SILPH_CO_9F - EVENT_DISP SILPH_CO_8F_WIDTH, $0, $e ; SILPH_CO_7F - EVENT_DISP SILPH_CO_8F_WIDTH, $0, $12 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_8F_WIDTH, $b, $3 ; SILPH_CO_8F - EVENT_DISP SILPH_CO_8F_WIDTH, $f, $3 ; SILPH_CO_2F - EVENT_DISP SILPH_CO_8F_WIDTH, $5, $b ; SILPH_CO_2F - EVENT_DISP SILPH_CO_8F_WIDTH, $9, $b ; SILPH_CO_8F_WIDTH + warp_to 16, 0, SILPH_CO_8F_WIDTH ; SILPH_CO_9F + warp_to 14, 0, SILPH_CO_8F_WIDTH ; SILPH_CO_7F + warp_to 18, 0, SILPH_CO_8F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 3, 11, SILPH_CO_8F_WIDTH ; SILPH_CO_8F + warp_to 3, 15, SILPH_CO_8F_WIDTH ; SILPH_CO_2F + warp_to 11, 5, SILPH_CO_8F_WIDTH ; SILPH_CO_2F + warp_to 11, 9, SILPH_CO_8F_WIDTH ; SILPH_CO_8F_WIDTH diff --git a/data/mapObjects/silphco9.asm b/data/mapObjects/silphco9.asm index 76d82895..377d7ca0 100755 --- a/data/mapObjects/silphco9.asm +++ b/data/mapObjects/silphco9.asm @@ -1,24 +1,24 @@ SilphCo9Object: db $2e ; border block - db $5 ; warps - db $0, $e, $0, SILPH_CO_10F - db $0, $10, $0, SILPH_CO_8F - db $0, $12, $0, SILPH_CO_ELEVATOR - db $3, $9, $7, SILPH_CO_3F - db $f, $11, $4, SILPH_CO_5F + db 5 ; warps + warp 14, 0, 0, SILPH_CO_10F + warp 16, 0, 0, SILPH_CO_8F + warp 18, 0, 0, SILPH_CO_ELEVATOR + warp 9, 3, 7, SILPH_CO_3F + warp 17, 15, 4, SILPH_CO_5F - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $e, STAY, DOWN, $1 ; person - object SPRITE_ROCKET, $2, $4, STAY, UP, $2, OPP_ROCKET, $25 - object SPRITE_OAK_AIDE, $15, $d, STAY, DOWN, $3, OPP_SCIENTIST, $a - object SPRITE_ROCKET, $d, $10, STAY, UP, $4, OPP_ROCKET, $26 + db 4 ; objects + object SPRITE_NURSE, 3, 14, STAY, DOWN, 1 ; person + object SPRITE_ROCKET, 2, 4, STAY, UP, 2, OPP_ROCKET, 37 + object SPRITE_OAK_AIDE, 21, 13, STAY, DOWN, 3, OPP_SCIENTIST, 10 + object SPRITE_ROCKET, 13, 16, STAY, UP, 4, OPP_ROCKET, 38 ; warp-to - EVENT_DISP SILPH_CO_9F_WIDTH, $0, $e ; SILPH_CO_10F - EVENT_DISP SILPH_CO_9F_WIDTH, $0, $10 ; SILPH_CO_8F - EVENT_DISP SILPH_CO_9F_WIDTH, $0, $12 ; SILPH_CO_ELEVATOR - EVENT_DISP SILPH_CO_9F_WIDTH, $3, $9 ; SILPH_CO_3F - EVENT_DISP SILPH_CO_9F_WIDTH, $f, $11 ; SILPH_CO_5F + warp_to 14, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_10F + warp_to 16, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_8F + warp_to 18, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_ELEVATOR + warp_to 9, 3, SILPH_CO_9F_WIDTH ; SILPH_CO_3F + warp_to 17, 15, SILPH_CO_9F_WIDTH ; SILPH_CO_5F diff --git a/data/mapObjects/silphcoelevator.asm b/data/mapObjects/silphcoelevator.asm index 2de795ae..205fc046 100755 --- a/data/mapObjects/silphcoelevator.asm +++ b/data/mapObjects/silphcoelevator.asm @@ -1,15 +1,15 @@ SilphCoElevatorObject: db $f ; border block - db $2 ; warps - db $3, $1, $0, $ed - db $3, $2, $0, $ed + db 2 ; warps + warp 1, 3, 0, 237 + warp 2, 3, 0, 237 - db $1 ; signs - db $0, $3, $1 ; SilphCoElevatorText1 + db 1 ; signs + sign 3, 0, 1 ; SilphCoElevatorText1 - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP SILPH_CO_ELEVATOR_WIDTH, $3, $1 - EVENT_DISP SILPH_CO_ELEVATOR_WIDTH, $3, $2 + warp_to 1, 3, SILPH_CO_ELEVATOR_WIDTH + warp_to 2, 3, SILPH_CO_ELEVATOR_WIDTH diff --git a/data/mapObjects/ssanne1.asm b/data/mapObjects/ssanne1.asm index 7f6a826c..9d5ddd1f 100755 --- a/data/mapObjects/ssanne1.asm +++ b/data/mapObjects/ssanne1.asm @@ -1,34 +1,34 @@ SSAnne1Object: db $c ; border block - db $b ; warps - db $0, $1a, $1, VERMILION_DOCK - db $0, $1b, $1, VERMILION_DOCK - db $8, $1f, $0, SS_ANNE_8 - db $8, $17, $1, SS_ANNE_8 - db $8, $13, $2, SS_ANNE_8 - db $8, $f, $3, SS_ANNE_8 - db $8, $b, $4, SS_ANNE_8 - db $8, $7, $5, SS_ANNE_8 - db $6, $2, $6, SS_ANNE_2 - db $f, $25, $5, SS_ANNE_4 - db $10, $3, $0, SS_ANNE_6 + db 11 ; warps + warp 26, 0, 1, VERMILION_DOCK + warp 27, 0, 1, VERMILION_DOCK + warp 31, 8, 0, SS_ANNE_8 + warp 23, 8, 1, SS_ANNE_8 + warp 19, 8, 2, SS_ANNE_8 + warp 15, 8, 3, SS_ANNE_8 + warp 11, 8, 4, SS_ANNE_8 + warp 7, 8, 5, SS_ANNE_8 + warp 2, 6, 6, SS_ANNE_2 + warp 37, 15, 5, SS_ANNE_4 + warp 3, 16, 0, SS_ANNE_6 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_WAITER, $c, $6, WALK, $2, $1 ; person - object SPRITE_SAILOR, $1b, $5, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_WAITER, 12, 6, WALK, 2, 1 ; person + object SPRITE_SAILOR, 27, 5, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP SS_ANNE_1_WIDTH, $0, $1a ; VERMILION_DOCK - EVENT_DISP SS_ANNE_1_WIDTH, $0, $1b ; VERMILION_DOCK - EVENT_DISP SS_ANNE_1_WIDTH, $8, $1f ; SS_ANNE_8 - EVENT_DISP SS_ANNE_1_WIDTH, $8, $17 ; SS_ANNE_8 - EVENT_DISP SS_ANNE_1_WIDTH, $8, $13 ; SS_ANNE_8 - EVENT_DISP SS_ANNE_1_WIDTH, $8, $f ; SS_ANNE_8 - EVENT_DISP SS_ANNE_1_WIDTH, $8, $b ; SS_ANNE_8 - EVENT_DISP SS_ANNE_1_WIDTH, $8, $7 ; SS_ANNE_8 - EVENT_DISP SS_ANNE_1_WIDTH, $6, $2 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_1_WIDTH, $f, $25 ; SS_ANNE_4 - EVENT_DISP SS_ANNE_1_WIDTH, $10, $3 ; SS_ANNE_6 + warp_to 26, 0, SS_ANNE_1_WIDTH ; VERMILION_DOCK + warp_to 27, 0, SS_ANNE_1_WIDTH ; VERMILION_DOCK + warp_to 31, 8, SS_ANNE_1_WIDTH ; SS_ANNE_8 + warp_to 23, 8, SS_ANNE_1_WIDTH ; SS_ANNE_8 + warp_to 19, 8, SS_ANNE_1_WIDTH ; SS_ANNE_8 + warp_to 15, 8, SS_ANNE_1_WIDTH ; SS_ANNE_8 + warp_to 11, 8, SS_ANNE_1_WIDTH ; SS_ANNE_8 + warp_to 7, 8, SS_ANNE_1_WIDTH ; SS_ANNE_8 + warp_to 2, 6, SS_ANNE_1_WIDTH ; SS_ANNE_2 + warp_to 37, 15, SS_ANNE_1_WIDTH ; SS_ANNE_4 + warp_to 3, 16, SS_ANNE_1_WIDTH ; SS_ANNE_6 diff --git a/data/mapObjects/ssanne10.asm b/data/mapObjects/ssanne10.asm index a8f49cf7..93fb2cde 100755 --- a/data/mapObjects/ssanne10.asm +++ b/data/mapObjects/ssanne10.asm @@ -1,41 +1,41 @@ SSAnne10Object: db $c ; border block - db $a ; warps - db $5, $2, $4, SS_ANNE_4 - db $5, $3, $4, SS_ANNE_4 - db $5, $c, $3, SS_ANNE_4 - db $5, $d, $3, SS_ANNE_4 - db $5, $16, $2, SS_ANNE_4 - db $5, $17, $2, SS_ANNE_4 - db $f, $2, $1, SS_ANNE_4 - db $f, $3, $1, SS_ANNE_4 - db $f, $c, $0, SS_ANNE_4 - db $f, $d, $0, SS_ANNE_4 + db 10 ; warps + warp 2, 5, 4, SS_ANNE_4 + warp 3, 5, 4, SS_ANNE_4 + warp 12, 5, 3, SS_ANNE_4 + warp 13, 5, 3, SS_ANNE_4 + warp 22, 5, 2, SS_ANNE_4 + warp 23, 5, 2, SS_ANNE_4 + warp 2, 15, 1, SS_ANNE_4 + warp 3, 15, 1, SS_ANNE_4 + warp 12, 15, 0, SS_ANNE_4 + warp 13, 15, 0, SS_ANNE_4 - db $0 ; signs + db 0 ; signs - db $b ; objects - object SPRITE_SAILOR, $0, $d, STAY, DOWN, $1, OPP_SAILOR, $3 - object SPRITE_SAILOR, $2, $b, STAY, DOWN, $2, OPP_SAILOR, $4 - object SPRITE_SAILOR, $c, $3, STAY, LEFT, $3, OPP_SAILOR, $5 - object SPRITE_SAILOR, $16, $2, STAY, DOWN, $4, OPP_SAILOR, $6 - object SPRITE_SAILOR, $0, $2, STAY, RIGHT, $5, OPP_SAILOR, $7 - object SPRITE_FISHER2, $0, $4, STAY, RIGHT, $6, OPP_FISHER, $2 - object SPRITE_BLACK_HAIR_BOY_2, $a, $d, STAY, RIGHT, $7 ; person - object SPRITE_SLOWBRO, $b, $c, STAY, NONE, $8 ; person - object SPRITE_BALL, $14, $2, STAY, NONE, $9, ETHER - object SPRITE_BALL, $a, $2, STAY, NONE, $a, TM_44 - object SPRITE_BALL, $c, $b, STAY, NONE, $b, MAX_POTION + db 11 ; objects + object SPRITE_SAILOR, 0, 13, STAY, DOWN, 1, OPP_SAILOR, 3 + object SPRITE_SAILOR, 2, 11, STAY, DOWN, 2, OPP_SAILOR, 4 + object SPRITE_SAILOR, 12, 3, STAY, LEFT, 3, OPP_SAILOR, 5 + object SPRITE_SAILOR, 22, 2, STAY, DOWN, 4, OPP_SAILOR, 6 + object SPRITE_SAILOR, 0, 2, STAY, RIGHT, 5, OPP_SAILOR, 7 + object SPRITE_FISHER2, 0, 4, STAY, RIGHT, 6, OPP_FISHER, 2 + object SPRITE_BLACK_HAIR_BOY_2, 10, 13, STAY, RIGHT, 7 ; person + object SPRITE_SLOWBRO, 11, 12, STAY, NONE, 8 ; person + object SPRITE_BALL, 20, 2, STAY, NONE, 9, ETHER + object SPRITE_BALL, 10, 2, STAY, NONE, 10, TM_44 + object SPRITE_BALL, 12, 11, STAY, NONE, 11, MAX_POTION ; warp-to - EVENT_DISP SS_ANNE_10_WIDTH, $5, $2 ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $5, $3 ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $5, $c ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $5, $d ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $5, $16 ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $5, $17 ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $f, $2 ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $f, $3 ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $f, $c ; SS_ANNE_4 - EVENT_DISP SS_ANNE_10_WIDTH, $f, $d ; SS_ANNE_4 + warp_to 2, 5, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 3, 5, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 12, 5, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 13, 5, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 22, 5, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 23, 5, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 2, 15, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 3, 15, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 12, 15, SS_ANNE_10_WIDTH ; SS_ANNE_4 + warp_to 13, 15, SS_ANNE_10_WIDTH ; SS_ANNE_4 diff --git a/data/mapObjects/ssanne2.asm b/data/mapObjects/ssanne2.asm index eb761685..3a685610 100755 --- a/data/mapObjects/ssanne2.asm +++ b/data/mapObjects/ssanne2.asm @@ -1,30 +1,30 @@ SSAnne2Object: db $c ; border block - db $9 ; warps - db $b, $9, $0, SS_ANNE_9 - db $b, $d, $2, SS_ANNE_9 - db $b, $11, $4, SS_ANNE_9 - db $b, $15, $6, SS_ANNE_9 - db $b, $19, $8, SS_ANNE_9 - db $b, $1d, $a, SS_ANNE_9 - db $4, $2, $8, SS_ANNE_1 - db $c, $2, $1, SS_ANNE_3 - db $4, $24, $0, SS_ANNE_7 + db 9 ; warps + warp 9, 11, 0, SS_ANNE_9 + warp 13, 11, 2, SS_ANNE_9 + warp 17, 11, 4, SS_ANNE_9 + warp 21, 11, 6, SS_ANNE_9 + warp 25, 11, 8, SS_ANNE_9 + warp 29, 11, 10, SS_ANNE_9 + warp 2, 4, 8, SS_ANNE_1 + warp 2, 12, 1, SS_ANNE_3 + warp 36, 4, 0, SS_ANNE_7 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_WAITER, $3, $7, WALK, $1, $1 ; person - object SPRITE_BLUE, $24, $4, STAY, DOWN, $2, OPP_SONY1, $1 + db 2 ; objects + object SPRITE_WAITER, 3, 7, WALK, 1, 1 ; person + object SPRITE_BLUE, 36, 4, STAY, DOWN, 2, OPP_SONY1, 1 ; warp-to - EVENT_DISP SS_ANNE_2_WIDTH, $b, $9 ; SS_ANNE_9 - EVENT_DISP SS_ANNE_2_WIDTH, $b, $d ; SS_ANNE_9 - EVENT_DISP SS_ANNE_2_WIDTH, $b, $11 ; SS_ANNE_9 - EVENT_DISP SS_ANNE_2_WIDTH, $b, $15 ; SS_ANNE_9 - EVENT_DISP SS_ANNE_2_WIDTH, $b, $19 ; SS_ANNE_9 - EVENT_DISP SS_ANNE_2_WIDTH, $b, $1d ; SS_ANNE_9 - EVENT_DISP SS_ANNE_2_WIDTH, $4, $2 ; SS_ANNE_1 - EVENT_DISP SS_ANNE_2_WIDTH, $c, $2 ; SS_ANNE_3 - EVENT_DISP SS_ANNE_2_WIDTH, $4, $24 ; SS_ANNE_7 + warp_to 9, 11, SS_ANNE_2_WIDTH ; SS_ANNE_9 + warp_to 13, 11, SS_ANNE_2_WIDTH ; SS_ANNE_9 + warp_to 17, 11, SS_ANNE_2_WIDTH ; SS_ANNE_9 + warp_to 21, 11, SS_ANNE_2_WIDTH ; SS_ANNE_9 + warp_to 25, 11, SS_ANNE_2_WIDTH ; SS_ANNE_9 + warp_to 29, 11, SS_ANNE_2_WIDTH ; SS_ANNE_9 + warp_to 2, 4, SS_ANNE_2_WIDTH ; SS_ANNE_1 + warp_to 2, 12, SS_ANNE_2_WIDTH ; SS_ANNE_3 + warp_to 36, 4, SS_ANNE_2_WIDTH ; SS_ANNE_7 diff --git a/data/mapObjects/ssanne3.asm b/data/mapObjects/ssanne3.asm index 567f0363..3a45e1f9 100755 --- a/data/mapObjects/ssanne3.asm +++ b/data/mapObjects/ssanne3.asm @@ -1,15 +1,15 @@ SSAnne3Object: db $c ; border block - db $2 ; warps - db $3, $0, $0, SS_ANNE_5 - db $3, $13, $7, SS_ANNE_2 + db 2 ; warps + warp 0, 3, 0, SS_ANNE_5 + warp 19, 3, 7, SS_ANNE_2 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_SAILOR, $9, $3, WALK, $2, $1 ; person + db 1 ; objects + object SPRITE_SAILOR, 9, 3, WALK, 2, 1 ; person ; warp-to - EVENT_DISP SS_ANNE_3_WIDTH, $3, $0 ; SS_ANNE_5 - EVENT_DISP SS_ANNE_3_WIDTH, $3, $13 ; SS_ANNE_2 + warp_to 0, 3, SS_ANNE_3_WIDTH ; SS_ANNE_5 + warp_to 19, 3, SS_ANNE_3_WIDTH ; SS_ANNE_2 diff --git a/data/mapObjects/ssanne4.asm b/data/mapObjects/ssanne4.asm index fbd1df5b..7f0d6853 100755 --- a/data/mapObjects/ssanne4.asm +++ b/data/mapObjects/ssanne4.asm @@ -1,22 +1,22 @@ SSAnne4Object: db $c ; border block - db $6 ; warps - db $3, $17, $8, SS_ANNE_10 - db $3, $13, $6, SS_ANNE_10 - db $3, $f, $4, SS_ANNE_10 - db $3, $b, $2, SS_ANNE_10 - db $3, $7, $0, SS_ANNE_10 - db $5, $1b, $9, SS_ANNE_1 + db 6 ; warps + warp 23, 3, 8, SS_ANNE_10 + warp 19, 3, 6, SS_ANNE_10 + warp 15, 3, 4, SS_ANNE_10 + warp 11, 3, 2, SS_ANNE_10 + warp 7, 3, 0, SS_ANNE_10 + warp 27, 5, 9, SS_ANNE_1 - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP SS_ANNE_4_WIDTH, $3, $17 ; SS_ANNE_10 - EVENT_DISP SS_ANNE_4_WIDTH, $3, $13 ; SS_ANNE_10 - EVENT_DISP SS_ANNE_4_WIDTH, $3, $f ; SS_ANNE_10 - EVENT_DISP SS_ANNE_4_WIDTH, $3, $b ; SS_ANNE_10 - EVENT_DISP SS_ANNE_4_WIDTH, $3, $7 ; SS_ANNE_10 - EVENT_DISP SS_ANNE_4_WIDTH, $5, $1b ; SS_ANNE_1 + warp_to 23, 3, SS_ANNE_4_WIDTH ; SS_ANNE_10 + warp_to 19, 3, SS_ANNE_4_WIDTH ; SS_ANNE_10 + warp_to 15, 3, SS_ANNE_4_WIDTH ; SS_ANNE_10 + warp_to 11, 3, SS_ANNE_4_WIDTH ; SS_ANNE_10 + warp_to 7, 3, SS_ANNE_4_WIDTH ; SS_ANNE_10 + warp_to 27, 5, SS_ANNE_4_WIDTH ; SS_ANNE_1 diff --git a/data/mapObjects/ssanne5.asm b/data/mapObjects/ssanne5.asm index 6031327e..106557be 100755 --- a/data/mapObjects/ssanne5.asm +++ b/data/mapObjects/ssanne5.asm @@ -1,19 +1,19 @@ SSAnne5Object: db $23 ; border block - db $2 ; warps - db $6, $d, $0, SS_ANNE_3 - db $7, $d, $0, SS_ANNE_3 + db 2 ; warps + warp 13, 6, 0, SS_ANNE_3 + warp 13, 7, 0, SS_ANNE_3 - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $5, $2, STAY, UP, $1 ; person - object SPRITE_SAILOR, $4, $9, STAY, NONE, $2 ; person - object SPRITE_BLACK_HAIR_BOY_1, $7, $b, STAY, NONE, $3 ; person - object SPRITE_SAILOR, $4, $4, STAY, DOWN, $4, OPP_SAILOR, $1 - object SPRITE_SAILOR, $a, $8, STAY, UP, $5, OPP_SAILOR, $2 + db 5 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 5, 2, STAY, UP, 1 ; person + object SPRITE_SAILOR, 4, 9, STAY, NONE, 2 ; person + object SPRITE_BLACK_HAIR_BOY_1, 7, 11, STAY, NONE, 3 ; person + object SPRITE_SAILOR, 4, 4, STAY, DOWN, 4, OPP_SAILOR, 1 + object SPRITE_SAILOR, 10, 8, STAY, UP, 5, OPP_SAILOR, 2 ; warp-to - EVENT_DISP SS_ANNE_5_WIDTH, $6, $d ; SS_ANNE_3 - EVENT_DISP SS_ANNE_5_WIDTH, $7, $d ; SS_ANNE_3 + warp_to 13, 6, SS_ANNE_5_WIDTH ; SS_ANNE_3 + warp_to 13, 7, SS_ANNE_5_WIDTH ; SS_ANNE_3 diff --git a/data/mapObjects/ssanne6.asm b/data/mapObjects/ssanne6.asm index 8c2444f8..a25fe9b3 100755 --- a/data/mapObjects/ssanne6.asm +++ b/data/mapObjects/ssanne6.asm @@ -1,19 +1,19 @@ SSAnne6Object: db $c ; border block - db $1 ; warps - db $0, $6, $a, SS_ANNE_1 + db 1 ; warps + warp 6, 0, 10, SS_ANNE_1 - db $0 ; signs + db 0 ; signs - db $7 ; objects - object SPRITE_COOK, $1, $8, WALK, $1, $1 ; person - object SPRITE_COOK, $5, $8, WALK, $1, $2 ; person - object SPRITE_COOK, $9, $7, WALK, $1, $3 ; person - object SPRITE_COOK, $d, $6, STAY, NONE, $4 ; person - object SPRITE_COOK, $d, $8, STAY, NONE, $5 ; person - object SPRITE_COOK, $d, $a, STAY, NONE, $6 ; person - object SPRITE_COOK, $b, $d, STAY, UP, $7 ; person + db 7 ; objects + object SPRITE_COOK, 1, 8, WALK, 1, 1 ; person + object SPRITE_COOK, 5, 8, WALK, 1, 2 ; person + object SPRITE_COOK, 9, 7, WALK, 1, 3 ; person + object SPRITE_COOK, 13, 6, STAY, NONE, 4 ; person + object SPRITE_COOK, 13, 8, STAY, NONE, 5 ; person + object SPRITE_COOK, 13, 10, STAY, NONE, 6 ; person + object SPRITE_COOK, 11, 13, STAY, UP, 7 ; person ; warp-to - EVENT_DISP SS_ANNE_6_WIDTH, $0, $6 ; SS_ANNE_1 + warp_to 6, 0, SS_ANNE_6_WIDTH ; SS_ANNE_1 diff --git a/data/mapObjects/ssanne7.asm b/data/mapObjects/ssanne7.asm index 6002e85b..7657170e 100755 --- a/data/mapObjects/ssanne7.asm +++ b/data/mapObjects/ssanne7.asm @@ -1,15 +1,15 @@ SSAnne7Object: db $c ; border block - db $1 ; warps - db $7, $0, $8, SS_ANNE_2 + db 1 ; warps + warp 0, 7, 8, SS_ANNE_2 - db $2 ; signs - db $1, $4, $2 ; SSAnne7Text2 - db $2, $1, $3 ; SSAnne7Text3 + db 2 ; signs + sign 4, 1, 2 ; SSAnne7Text2 + sign 1, 2, 3 ; SSAnne7Text3 - db $1 ; objects - object SPRITE_SS_CAPTAIN, $4, $2, STAY, UP, $1 ; person + db 1 ; objects + object SPRITE_SS_CAPTAIN, 4, 2, STAY, UP, 1 ; person ; warp-to - EVENT_DISP SS_ANNE_7_WIDTH, $7, $0 ; SS_ANNE_2 + warp_to 0, 7, SS_ANNE_7_WIDTH ; SS_ANNE_2 diff --git a/data/mapObjects/ssanne8.asm b/data/mapObjects/ssanne8.asm index 37c8cf61..d26921bd 100755 --- a/data/mapObjects/ssanne8.asm +++ b/data/mapObjects/ssanne8.asm @@ -1,33 +1,33 @@ SSAnne8Object: db $c ; border block - db $6 ; warps - db $0, $0, $2, SS_ANNE_1 - db $0, $a, $3, SS_ANNE_1 - db $0, $14, $4, SS_ANNE_1 - db $a, $0, $5, SS_ANNE_1 - db $a, $a, $6, SS_ANNE_1 - db $a, $14, $7, SS_ANNE_1 + db 6 ; warps + warp 0, 0, 2, SS_ANNE_1 + warp 10, 0, 3, SS_ANNE_1 + warp 20, 0, 4, SS_ANNE_1 + warp 0, 10, 5, SS_ANNE_1 + warp 10, 10, 6, SS_ANNE_1 + warp 20, 10, 7, SS_ANNE_1 - db $0 ; signs + db 0 ; signs - db $b ; objects - object SPRITE_GENTLEMAN, $2, $3, STAY, LEFT, $1, OPP_GENTLEMAN, $1 - object SPRITE_GENTLEMAN, $b, $4, STAY, UP, $2, OPP_GENTLEMAN, $2 - object SPRITE_BUG_CATCHER, $b, $e, STAY, UP, $3, OPP_YOUNGSTER, $8 - object SPRITE_LASS, $d, $b, STAY, LEFT, $4, OPP_LASS, $b - object SPRITE_GIRL, $16, $3, WALK, $1, $5 ; person - object SPRITE_FAT_BALD_GUY, $0, $e, STAY, NONE, $6 ; person - object SPRITE_LITTLE_GIRL, $2, $b, STAY, DOWN, $7 ; person - object SPRITE_CLEFAIRY, $3, $b, STAY, DOWN, $8 ; person - object SPRITE_GIRL, $a, $d, STAY, RIGHT, $9 ; person - object SPRITE_BALL, $c, $f, STAY, NONE, $a, TM_08 - object SPRITE_GENTLEMAN, $15, $d, WALK, $2, $b ; person + db 11 ; objects + object SPRITE_GENTLEMAN, 2, 3, STAY, LEFT, 1, OPP_GENTLEMAN, 1 + object SPRITE_GENTLEMAN, 11, 4, STAY, UP, 2, OPP_GENTLEMAN, 2 + object SPRITE_BUG_CATCHER, 11, 14, STAY, UP, 3, OPP_YOUNGSTER, 8 + object SPRITE_LASS, 13, 11, STAY, LEFT, 4, OPP_LASS, 11 + object SPRITE_GIRL, 22, 3, WALK, 1, 5 ; person + object SPRITE_FAT_BALD_GUY, 0, 14, STAY, NONE, 6 ; person + object SPRITE_LITTLE_GIRL, 2, 11, STAY, DOWN, 7 ; person + object SPRITE_CLEFAIRY, 3, 11, STAY, DOWN, 8 ; person + object SPRITE_GIRL, 10, 13, STAY, RIGHT, 9 ; person + object SPRITE_BALL, 12, 15, STAY, NONE, 10, TM_08 + object SPRITE_GENTLEMAN, 21, 13, WALK, 2, 11 ; person ; warp-to - EVENT_DISP SS_ANNE_8_WIDTH, $0, $0 ; SS_ANNE_1 - EVENT_DISP SS_ANNE_8_WIDTH, $0, $a ; SS_ANNE_1 - EVENT_DISP SS_ANNE_8_WIDTH, $0, $14 ; SS_ANNE_1 - EVENT_DISP SS_ANNE_8_WIDTH, $a, $0 ; SS_ANNE_1 - EVENT_DISP SS_ANNE_8_WIDTH, $a, $a ; SS_ANNE_1 - EVENT_DISP SS_ANNE_8_WIDTH, $a, $14 ; SS_ANNE_1 + warp_to 0, 0, SS_ANNE_8_WIDTH ; SS_ANNE_1 + warp_to 10, 0, SS_ANNE_8_WIDTH ; SS_ANNE_1 + warp_to 20, 0, SS_ANNE_8_WIDTH ; SS_ANNE_1 + warp_to 0, 10, SS_ANNE_8_WIDTH ; SS_ANNE_1 + warp_to 10, 10, SS_ANNE_8_WIDTH ; SS_ANNE_1 + warp_to 20, 10, SS_ANNE_8_WIDTH ; SS_ANNE_1 diff --git a/data/mapObjects/ssanne9.asm b/data/mapObjects/ssanne9.asm index 6b5e4b7d..455e6983 100755 --- a/data/mapObjects/ssanne9.asm +++ b/data/mapObjects/ssanne9.asm @@ -1,47 +1,47 @@ SSAnne9Object: db $c ; border block - db $c ; warps - db $5, $2, $0, SS_ANNE_2 - db $5, $3, $0, SS_ANNE_2 - db $5, $c, $1, SS_ANNE_2 - db $5, $d, $1, SS_ANNE_2 - db $5, $16, $2, SS_ANNE_2 - db $5, $17, $2, SS_ANNE_2 - db $f, $2, $3, SS_ANNE_2 - db $f, $3, $3, SS_ANNE_2 - db $f, $c, $4, SS_ANNE_2 - db $f, $d, $4, SS_ANNE_2 - db $f, $16, $5, SS_ANNE_2 - db $f, $17, $5, SS_ANNE_2 + db 12 ; warps + warp 2, 5, 0, SS_ANNE_2 + warp 3, 5, 0, SS_ANNE_2 + warp 12, 5, 1, SS_ANNE_2 + warp 13, 5, 1, SS_ANNE_2 + warp 22, 5, 2, SS_ANNE_2 + warp 23, 5, 2, SS_ANNE_2 + warp 2, 15, 3, SS_ANNE_2 + warp 3, 15, 3, SS_ANNE_2 + warp 12, 15, 4, SS_ANNE_2 + warp 13, 15, 4, SS_ANNE_2 + warp 22, 15, 5, SS_ANNE_2 + warp 23, 15, 5, SS_ANNE_2 - db $0 ; signs + db 0 ; signs - db $d ; objects - object SPRITE_GENTLEMAN, $a, $2, STAY, RIGHT, $1, OPP_GENTLEMAN, $3 - object SPRITE_FISHER2, $d, $4, STAY, LEFT, $2, OPP_FISHER, $1 - object SPRITE_GENTLEMAN, $0, $e, STAY, RIGHT, $3, OPP_GENTLEMAN, $5 - object SPRITE_LASS, $2, $b, STAY, DOWN, $4, OPP_LASS, $c - object SPRITE_GENTLEMAN, $1, $2, STAY, DOWN, $5 ; person - object SPRITE_BALL, $c, $1, STAY, NONE, $6, MAX_ETHER - object SPRITE_GENTLEMAN, $15, $2, STAY, DOWN, $7 ; person - object SPRITE_OLD_PERSON, $16, $1, STAY, DOWN, $8 ; person - object SPRITE_BALL, $0, $c, STAY, NONE, $9, RARE_CANDY - object SPRITE_GENTLEMAN, $c, $c, STAY, DOWN, $a ; person - object SPRITE_YOUNG_BOY, $b, $e, STAY, NONE, $b ; person - object SPRITE_BRUNETTE_GIRL, $16, $c, STAY, LEFT, $c ; person - object SPRITE_FOULARD_WOMAN, $14, $c, STAY, RIGHT, $d ; person + db 13 ; objects + object SPRITE_GENTLEMAN, 10, 2, STAY, RIGHT, 1, OPP_GENTLEMAN, 3 + object SPRITE_FISHER2, 13, 4, STAY, LEFT, 2, OPP_FISHER, 1 + object SPRITE_GENTLEMAN, 0, 14, STAY, RIGHT, 3, OPP_GENTLEMAN, 5 + object SPRITE_LASS, 2, 11, STAY, DOWN, 4, OPP_LASS, 12 + object SPRITE_GENTLEMAN, 1, 2, STAY, DOWN, 5 ; person + object SPRITE_BALL, 12, 1, STAY, NONE, 6, MAX_ETHER + object SPRITE_GENTLEMAN, 21, 2, STAY, DOWN, 7 ; person + object SPRITE_OLD_PERSON, 22, 1, STAY, DOWN, 8 ; person + object SPRITE_BALL, 0, 12, STAY, NONE, 9, RARE_CANDY + object SPRITE_GENTLEMAN, 12, 12, STAY, DOWN, 10 ; person + object SPRITE_YOUNG_BOY, 11, 14, STAY, NONE, 11 ; person + object SPRITE_BRUNETTE_GIRL, 22, 12, STAY, LEFT, 12 ; person + object SPRITE_FOULARD_WOMAN, 20, 12, STAY, RIGHT, 13 ; person ; warp-to - EVENT_DISP SS_ANNE_9_WIDTH, $5, $2 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $5, $3 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $5, $c ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $5, $d ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $5, $16 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $5, $17 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $f, $2 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $f, $3 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $f, $c ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $f, $d ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $f, $16 ; SS_ANNE_2 - EVENT_DISP SS_ANNE_9_WIDTH, $f, $17 ; SS_ANNE_2 + warp_to 2, 5, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 3, 5, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 12, 5, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 13, 5, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 22, 5, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 23, 5, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 2, 15, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 3, 15, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 12, 15, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 13, 15, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 22, 15, SS_ANNE_9_WIDTH ; SS_ANNE_2 + warp_to 23, 15, SS_ANNE_9_WIDTH ; SS_ANNE_2 diff --git a/data/mapObjects/tradecenter.asm b/data/mapObjects/tradecenter.asm index f482fc4f..63c3e04a 100755 --- a/data/mapObjects/tradecenter.asm +++ b/data/mapObjects/tradecenter.asm @@ -1,9 +1,9 @@ TradeCenterObject: db $e ; border block - db $0 ; warps + db 0 ; warps - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_RED, $2, $2, STAY, $0, $1 ; person + db 1 ; objects + object SPRITE_RED, 2, 2, STAY, 0, 1 ; person diff --git a/data/mapObjects/undergroundpathentranceroute5.asm b/data/mapObjects/undergroundpathentranceroute5.asm index 14d7232e..3e3d52dd 100755 --- a/data/mapObjects/undergroundpathentranceroute5.asm +++ b/data/mapObjects/undergroundpathentranceroute5.asm @@ -1,17 +1,17 @@ UndergroundPathEntranceRoute5Object: db $a ; border block - db $3 ; warps - db $7, $3, $3, $ff - db $7, $4, $3, $ff - db $4, $4, $0, UNDERGROUND_PATH_NS + db 3 ; warps + warp 3, 7, 3, -1 + warp 4, 7, 3, -1 + warp 4, 4, 0, UNDERGROUND_PATH_NS - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_LITTLE_GIRL, $2, $3, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_LITTLE_GIRL, 2, 3, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP PATH_ENTRANCE_ROUTE_5_WIDTH, $7, $3 - EVENT_DISP PATH_ENTRANCE_ROUTE_5_WIDTH, $7, $4 - EVENT_DISP PATH_ENTRANCE_ROUTE_5_WIDTH, $4, $4 ; UNDERGROUND_PATH_NS + warp_to 3, 7, PATH_ENTRANCE_ROUTE_5_WIDTH + warp_to 4, 7, PATH_ENTRANCE_ROUTE_5_WIDTH + warp_to 4, 4, PATH_ENTRANCE_ROUTE_5_WIDTH ; UNDERGROUND_PATH_NS diff --git a/data/mapObjects/undergroundpathentranceroute6.asm b/data/mapObjects/undergroundpathentranceroute6.asm index 7bce8774..f9c6d224 100755 --- a/data/mapObjects/undergroundpathentranceroute6.asm +++ b/data/mapObjects/undergroundpathentranceroute6.asm @@ -1,17 +1,17 @@ UndergroundPathEntranceRoute6Object: db $a ; border block - db $3 ; warps - db $7, $3, $3, $ff - db $7, $4, $3, $ff - db $4, $4, $1, UNDERGROUND_PATH_NS + db 3 ; warps + warp 3, 7, 3, -1 + warp 4, 7, 3, -1 + warp 4, 4, 1, UNDERGROUND_PATH_NS - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GIRL, $2, $3, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_GIRL, 2, 3, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP PATH_ENTRANCE_ROUTE_6_WIDTH, $7, $3 - EVENT_DISP PATH_ENTRANCE_ROUTE_6_WIDTH, $7, $4 - EVENT_DISP PATH_ENTRANCE_ROUTE_6_WIDTH, $4, $4 ; UNDERGROUND_PATH_NS + warp_to 3, 7, PATH_ENTRANCE_ROUTE_6_WIDTH + warp_to 4, 7, PATH_ENTRANCE_ROUTE_6_WIDTH + warp_to 4, 4, PATH_ENTRANCE_ROUTE_6_WIDTH ; UNDERGROUND_PATH_NS diff --git a/data/mapObjects/undergroundpathentranceroute7.asm b/data/mapObjects/undergroundpathentranceroute7.asm index 51b4bcda..80dde9a3 100755 --- a/data/mapObjects/undergroundpathentranceroute7.asm +++ b/data/mapObjects/undergroundpathentranceroute7.asm @@ -1,17 +1,17 @@ UndergroundPathEntranceRoute7Object: db $a ; border block - db $3 ; warps - db $7, $3, $4, $ff - db $7, $4, $4, $ff - db $4, $4, $0, UNDERGROUND_PATH_WE + db 3 ; warps + warp 3, 7, 4, -1 + warp 4, 7, 4, -1 + warp 4, 4, 0, UNDERGROUND_PATH_WE - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FAT_BALD_GUY, $2, $4, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_FAT_BALD_GUY, 2, 4, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP PATH_ENTRANCE_ROUTE_7_WIDTH, $7, $3 - EVENT_DISP PATH_ENTRANCE_ROUTE_7_WIDTH, $7, $4 - EVENT_DISP PATH_ENTRANCE_ROUTE_7_WIDTH, $4, $4 ; UNDERGROUND_PATH_WE + warp_to 3, 7, PATH_ENTRANCE_ROUTE_7_WIDTH + warp_to 4, 7, PATH_ENTRANCE_ROUTE_7_WIDTH + warp_to 4, 4, PATH_ENTRANCE_ROUTE_7_WIDTH ; UNDERGROUND_PATH_WE diff --git a/data/mapObjects/undergroundpathentranceroute7copy.asm b/data/mapObjects/undergroundpathentranceroute7copy.asm index 04a5bf2f..20b74599 100755 --- a/data/mapObjects/undergroundpathentranceroute7copy.asm +++ b/data/mapObjects/undergroundpathentranceroute7copy.asm @@ -1,18 +1,18 @@ UndergroundPathEntranceRoute7CopyObject: db $a ; border block - db $3 ; warps - db $7, $3, $5, $ff - db $7, $4, $5, $ff - db $4, $4, $0, UNDERGROUND_PATH_WE + db 3 ; warps + warp 3, 7, 5, -1 + warp 4, 7, 5, -1 + warp 4, 4, 0, UNDERGROUND_PATH_WE - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_GIRL, $3, $2, STAY, NONE, $1 ; person - object SPRITE_FAT_BALD_GUY, $2, $4, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_GIRL, 3, 2, STAY, NONE, 1 ; person + object SPRITE_FAT_BALD_GUY, 2, 4, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP PATH_ENTRANCE_ROUTE_7_COPY_WIDTH, $7, $3 - EVENT_DISP PATH_ENTRANCE_ROUTE_7_COPY_WIDTH, $7, $4 - EVENT_DISP PATH_ENTRANCE_ROUTE_7_COPY_WIDTH, $4, $4 ; UNDERGROUND_PATH_WE + warp_to 3, 7, PATH_ENTRANCE_ROUTE_7_COPY_WIDTH + warp_to 4, 7, PATH_ENTRANCE_ROUTE_7_COPY_WIDTH + warp_to 4, 4, PATH_ENTRANCE_ROUTE_7_COPY_WIDTH ; UNDERGROUND_PATH_WE diff --git a/data/mapObjects/undergroundpathentranceroute8.asm b/data/mapObjects/undergroundpathentranceroute8.asm index 9e98c987..02390322 100755 --- a/data/mapObjects/undergroundpathentranceroute8.asm +++ b/data/mapObjects/undergroundpathentranceroute8.asm @@ -1,17 +1,17 @@ UndergroundPathEntranceRoute8Object: db $a ; border block - db $3 ; warps - db $7, $3, $4, $ff - db $7, $4, $4, $ff - db $4, $4, $1, UNDERGROUND_PATH_WE + db 3 ; warps + warp 3, 7, 4, -1 + warp 4, 7, 4, -1 + warp 4, 4, 1, UNDERGROUND_PATH_WE - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_GIRL, $3, $4, STAY, NONE, $1 ; person + db 1 ; objects + object SPRITE_GIRL, 3, 4, STAY, NONE, 1 ; person ; warp-to - EVENT_DISP PATH_ENTRANCE_ROUTE_8_WIDTH, $7, $3 - EVENT_DISP PATH_ENTRANCE_ROUTE_8_WIDTH, $7, $4 - EVENT_DISP PATH_ENTRANCE_ROUTE_8_WIDTH, $4, $4 ; UNDERGROUND_PATH_WE + warp_to 3, 7, PATH_ENTRANCE_ROUTE_8_WIDTH + warp_to 4, 7, PATH_ENTRANCE_ROUTE_8_WIDTH + warp_to 4, 4, PATH_ENTRANCE_ROUTE_8_WIDTH ; UNDERGROUND_PATH_WE diff --git a/data/mapObjects/undergroundpathns.asm b/data/mapObjects/undergroundpathns.asm index d0188a76..00b096e8 100755 --- a/data/mapObjects/undergroundpathns.asm +++ b/data/mapObjects/undergroundpathns.asm @@ -1,14 +1,14 @@ UndergroundPathNSObject: db $1 ; border block - db $2 ; warps - db $4, $5, $2, PATH_ENTRANCE_ROUTE_5 - db $29, $2, $2, PATH_ENTRANCE_ROUTE_6 + db 2 ; warps + warp 5, 4, 2, PATH_ENTRANCE_ROUTE_5 + warp 2, 41, 2, PATH_ENTRANCE_ROUTE_6 - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP UNDERGROUND_PATH_NS_WIDTH, $4, $5 ; PATH_ENTRANCE_ROUTE_5 - EVENT_DISP UNDERGROUND_PATH_NS_WIDTH, $29, $2 ; PATH_ENTRANCE_ROUTE_6 + warp_to 5, 4, UNDERGROUND_PATH_NS_WIDTH ; PATH_ENTRANCE_ROUTE_5 + warp_to 2, 41, UNDERGROUND_PATH_NS_WIDTH ; PATH_ENTRANCE_ROUTE_6 diff --git a/data/mapObjects/undergroundpathwe.asm b/data/mapObjects/undergroundpathwe.asm index 42bbb9bf..0af2ccc3 100755 --- a/data/mapObjects/undergroundpathwe.asm +++ b/data/mapObjects/undergroundpathwe.asm @@ -1,14 +1,14 @@ UndergroundPathWEObject: db $1 ; border block - db $2 ; warps - db $5, $2, $2, PATH_ENTRANCE_ROUTE_7 - db $2, $2f, $2, PATH_ENTRANCE_ROUTE_8 + db 2 ; warps + warp 2, 5, 2, PATH_ENTRANCE_ROUTE_7 + warp 47, 2, 2, PATH_ENTRANCE_ROUTE_8 - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP UNDERGROUND_PATH_WE_WIDTH, $5, $2 ; PATH_ENTRANCE_ROUTE_7 - EVENT_DISP UNDERGROUND_PATH_WE_WIDTH, $2, $2f ; PATH_ENTRANCE_ROUTE_8 + warp_to 2, 5, UNDERGROUND_PATH_WE_WIDTH ; PATH_ENTRANCE_ROUTE_7 + warp_to 47, 2, UNDERGROUND_PATH_WE_WIDTH ; PATH_ENTRANCE_ROUTE_8 diff --git a/data/mapObjects/unknowndungeon1.asm b/data/mapObjects/unknowndungeon1.asm index e0393f2e..97ff99a8 100755 --- a/data/mapObjects/unknowndungeon1.asm +++ b/data/mapObjects/unknowndungeon1.asm @@ -1,31 +1,31 @@ UnknownDungeon1Object: db $7d ; border block - db $9 ; warps - db $11, $18, $6, $ff - db $11, $19, $6, $ff - db $1, $1b, $0, UNKNOWN_DUNGEON_2 - db $7, $17, $1, UNKNOWN_DUNGEON_2 - db $9, $12, $2, UNKNOWN_DUNGEON_2 - db $1, $7, $3, UNKNOWN_DUNGEON_2 - db $3, $1, $4, UNKNOWN_DUNGEON_2 - db $b, $3, $5, UNKNOWN_DUNGEON_2 - db $6, $0, $0, UNKNOWN_DUNGEON_3 + db 9 ; warps + warp 24, 17, 6, -1 + warp 25, 17, 6, -1 + warp 27, 1, 0, UNKNOWN_DUNGEON_2 + warp 23, 7, 1, UNKNOWN_DUNGEON_2 + warp 18, 9, 2, UNKNOWN_DUNGEON_2 + warp 7, 1, 3, UNKNOWN_DUNGEON_2 + warp 1, 3, 4, UNKNOWN_DUNGEON_2 + warp 3, 11, 5, UNKNOWN_DUNGEON_2 + warp 0, 6, 0, UNKNOWN_DUNGEON_3 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_BALL, $7, $d, STAY, NONE, $1, FULL_RESTORE - object SPRITE_BALL, $13, $3, STAY, NONE, $2, MAX_ELIXER - object SPRITE_BALL, $5, $0, STAY, NONE, $3, NUGGET + db 3 ; objects + object SPRITE_BALL, 7, 13, STAY, NONE, 1, FULL_RESTORE + object SPRITE_BALL, 19, 3, STAY, NONE, 2, MAX_ELIXER + object SPRITE_BALL, 5, 0, STAY, NONE, 3, NUGGET ; warp-to - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $11, $18 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $11, $19 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $1, $1b ; UNKNOWN_DUNGEON_2 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $7, $17 ; UNKNOWN_DUNGEON_2 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $9, $12 ; UNKNOWN_DUNGEON_2 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $1, $7 ; UNKNOWN_DUNGEON_2 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $3, $1 ; UNKNOWN_DUNGEON_2 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $b, $3 ; UNKNOWN_DUNGEON_2 - EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $6, $0 ; UNKNOWN_DUNGEON_3 + warp_to 24, 17, UNKNOWN_DUNGEON_1_WIDTH + warp_to 25, 17, UNKNOWN_DUNGEON_1_WIDTH + warp_to 27, 1, UNKNOWN_DUNGEON_1_WIDTH ; UNKNOWN_DUNGEON_2 + warp_to 23, 7, UNKNOWN_DUNGEON_1_WIDTH ; UNKNOWN_DUNGEON_2 + warp_to 18, 9, UNKNOWN_DUNGEON_1_WIDTH ; UNKNOWN_DUNGEON_2 + warp_to 7, 1, UNKNOWN_DUNGEON_1_WIDTH ; UNKNOWN_DUNGEON_2 + warp_to 1, 3, UNKNOWN_DUNGEON_1_WIDTH ; UNKNOWN_DUNGEON_2 + warp_to 3, 11, UNKNOWN_DUNGEON_1_WIDTH ; UNKNOWN_DUNGEON_2 + warp_to 0, 6, UNKNOWN_DUNGEON_1_WIDTH ; UNKNOWN_DUNGEON_3 diff --git a/data/mapObjects/unknowndungeon2.asm b/data/mapObjects/unknowndungeon2.asm index e1a443bb..51626589 100755 --- a/data/mapObjects/unknowndungeon2.asm +++ b/data/mapObjects/unknowndungeon2.asm @@ -1,25 +1,25 @@ UnknownDungeon2Object: db $7d ; border block - db $6 ; warps - db $1, $1d, $2, UNKNOWN_DUNGEON_1 - db $6, $16, $3, UNKNOWN_DUNGEON_1 - db $7, $13, $4, UNKNOWN_DUNGEON_1 - db $1, $9, $5, UNKNOWN_DUNGEON_1 - db $3, $1, $6, UNKNOWN_DUNGEON_1 - db $b, $3, $7, UNKNOWN_DUNGEON_1 + db 6 ; warps + warp 29, 1, 2, UNKNOWN_DUNGEON_1 + warp 22, 6, 3, UNKNOWN_DUNGEON_1 + warp 19, 7, 4, UNKNOWN_DUNGEON_1 + warp 9, 1, 5, UNKNOWN_DUNGEON_1 + warp 1, 3, 6, UNKNOWN_DUNGEON_1 + warp 3, 11, 7, UNKNOWN_DUNGEON_1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_BALL, $1d, $9, STAY, NONE, $1, PP_UP - object SPRITE_BALL, $4, $f, STAY, NONE, $2, ULTRA_BALL - object SPRITE_BALL, $d, $6, STAY, NONE, $3, FULL_RESTORE + db 3 ; objects + object SPRITE_BALL, 29, 9, STAY, NONE, 1, PP_UP + object SPRITE_BALL, 4, 15, STAY, NONE, 2, ULTRA_BALL + object SPRITE_BALL, 13, 6, STAY, NONE, 3, FULL_RESTORE ; warp-to - EVENT_DISP UNKNOWN_DUNGEON_2_WIDTH, $1, $1d ; UNKNOWN_DUNGEON_1 - EVENT_DISP UNKNOWN_DUNGEON_2_WIDTH, $6, $16 ; UNKNOWN_DUNGEON_1 - EVENT_DISP UNKNOWN_DUNGEON_2_WIDTH, $7, $13 ; UNKNOWN_DUNGEON_1 - EVENT_DISP UNKNOWN_DUNGEON_2_WIDTH, $1, $9 ; UNKNOWN_DUNGEON_1 - EVENT_DISP UNKNOWN_DUNGEON_2_WIDTH, $3, $1 ; UNKNOWN_DUNGEON_1 - EVENT_DISP UNKNOWN_DUNGEON_2_WIDTH, $b, $3 ; UNKNOWN_DUNGEON_1 + warp_to 29, 1, UNKNOWN_DUNGEON_2_WIDTH ; UNKNOWN_DUNGEON_1 + warp_to 22, 6, UNKNOWN_DUNGEON_2_WIDTH ; UNKNOWN_DUNGEON_1 + warp_to 19, 7, UNKNOWN_DUNGEON_2_WIDTH ; UNKNOWN_DUNGEON_1 + warp_to 9, 1, UNKNOWN_DUNGEON_2_WIDTH ; UNKNOWN_DUNGEON_1 + warp_to 1, 3, UNKNOWN_DUNGEON_2_WIDTH ; UNKNOWN_DUNGEON_1 + warp_to 3, 11, UNKNOWN_DUNGEON_2_WIDTH ; UNKNOWN_DUNGEON_1 diff --git a/data/mapObjects/unknowndungeon3.asm b/data/mapObjects/unknowndungeon3.asm index 84fe5e5d..d44ba254 100755 --- a/data/mapObjects/unknowndungeon3.asm +++ b/data/mapObjects/unknowndungeon3.asm @@ -1,15 +1,15 @@ UnknownDungeon3Object: db $7d ; border block - db $1 ; warps - db $6, $3, $8, UNKNOWN_DUNGEON_1 + db 1 ; warps + warp 3, 6, 8, UNKNOWN_DUNGEON_1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_SLOWBRO, $1b, $d, STAY, DOWN, $1, MEWTWO, 70 - object SPRITE_BALL, $10, $9, STAY, NONE, $2, ULTRA_BALL - object SPRITE_BALL, $12, $1, STAY, NONE, $3, MAX_REVIVE + db 3 ; objects + object SPRITE_SLOWBRO, 27, 13, STAY, DOWN, 1, MEWTWO, 70 + object SPRITE_BALL, 16, 9, STAY, NONE, 2, ULTRA_BALL + object SPRITE_BALL, 18, 1, STAY, NONE, 3, MAX_REVIVE ; warp-to - EVENT_DISP UNKNOWN_DUNGEON_3_WIDTH, $6, $3 ; UNKNOWN_DUNGEON_1 + warp_to 3, 6, UNKNOWN_DUNGEON_3_WIDTH ; UNKNOWN_DUNGEON_1 diff --git a/data/mapObjects/vermilioncity.asm b/data/mapObjects/vermilioncity.asm index 8f64e894..86cc5685 100755 --- a/data/mapObjects/vermilioncity.asm +++ b/data/mapObjects/vermilioncity.asm @@ -1,41 +1,41 @@ VermilionCityObject: db $43 ; border block - db $9 ; warps - db $3, $b, $0, VERMILION_POKECENTER - db $d, $9, $0, POKEMON_FAN_CLUB - db $d, $17, $0, VERMILION_MART - db $13, $c, $0, VERMILION_GYM - db $13, $17, $0, VERMILION_HOUSE_1 - db $1f, $12, $0, VERMILION_DOCK - db $1f, $13, $0, VERMILION_DOCK - db $d, $f, $0, VERMILION_HOUSE_3 - db $3, $7, $0, VERMILION_HOUSE_2 + db 9 ; warps + warp 11, 3, 0, VERMILION_POKECENTER + warp 9, 13, 0, POKEMON_FAN_CLUB + warp 23, 13, 0, VERMILION_MART + warp 12, 19, 0, VERMILION_GYM + warp 23, 19, 0, VERMILION_HOUSE_1 + warp 18, 31, 0, VERMILION_DOCK + warp 19, 31, 0, VERMILION_DOCK + warp 15, 13, 0, VERMILION_HOUSE_3 + warp 7, 3, 0, VERMILION_HOUSE_2 - db $7 ; signs - db $3, $1b, $7 ; VermilionCityText7 - db $d, $25, $8 ; VermilionCityText8 - db $d, $18, $9 ; MartSignText - db $3, $c, $a ; PokeCenterSignText - db $d, $7, $b ; VermilionCityText11 - db $13, $7, $c ; VermilionCityText12 - db $f, $1d, $d ; VermilionCityText13 + db 7 ; signs + sign 27, 3, 7 ; VermilionCityText7 + sign 37, 13, 8 ; VermilionCityText8 + sign 24, 13, 9 ; MartSignText + sign 12, 3, 10 ; PokeCenterSignText + sign 7, 13, 11 ; VermilionCityText11 + sign 7, 19, 12 ; VermilionCityText12 + sign 29, 15, 13 ; VermilionCityText13 - db $6 ; objects - object SPRITE_FOULARD_WOMAN, $13, $7, WALK, $2, $1 ; person - object SPRITE_GAMBLER, $e, $6, STAY, NONE, $2 ; person - object SPRITE_SAILOR, $13, $1e, STAY, UP, $3 ; person - object SPRITE_GAMBLER, $1e, $7, STAY, NONE, $4 ; person - object SPRITE_SLOWBRO, $1d, $9, WALK, $1, $5 ; person - object SPRITE_SAILOR, $19, $1b, WALK, $2, $6 ; person + db 6 ; objects + object SPRITE_FOULARD_WOMAN, 19, 7, WALK, 2, 1 ; person + object SPRITE_GAMBLER, 14, 6, STAY, NONE, 2 ; person + object SPRITE_SAILOR, 19, 30, STAY, UP, 3 ; person + object SPRITE_GAMBLER, 30, 7, STAY, NONE, 4 ; person + object SPRITE_SLOWBRO, 29, 9, WALK, 1, 5 ; person + object SPRITE_SAILOR, 25, 27, WALK, 2, 6 ; person ; warp-to - EVENT_DISP VERMILION_CITY_WIDTH, $3, $b ; VERMILION_POKECENTER - EVENT_DISP VERMILION_CITY_WIDTH, $d, $9 ; POKEMON_FAN_CLUB - EVENT_DISP VERMILION_CITY_WIDTH, $d, $17 ; VERMILION_MART - EVENT_DISP VERMILION_CITY_WIDTH, $13, $c ; VERMILION_GYM - EVENT_DISP VERMILION_CITY_WIDTH, $13, $17 ; VERMILION_HOUSE_1 - EVENT_DISP VERMILION_CITY_WIDTH, $1f, $12 ; VERMILION_DOCK - EVENT_DISP VERMILION_CITY_WIDTH, $1f, $13 ; VERMILION_DOCK - EVENT_DISP VERMILION_CITY_WIDTH, $d, $f ; VERMILION_HOUSE_3 - EVENT_DISP VERMILION_CITY_WIDTH, $3, $7 ; VERMILION_HOUSE_2 + warp_to 11, 3, VERMILION_CITY_WIDTH ; VERMILION_POKECENTER + warp_to 9, 13, VERMILION_CITY_WIDTH ; POKEMON_FAN_CLUB + warp_to 23, 13, VERMILION_CITY_WIDTH ; VERMILION_MART + warp_to 12, 19, VERMILION_CITY_WIDTH ; VERMILION_GYM + warp_to 23, 19, VERMILION_CITY_WIDTH ; VERMILION_HOUSE_1 + warp_to 18, 31, VERMILION_CITY_WIDTH ; VERMILION_DOCK + warp_to 19, 31, VERMILION_CITY_WIDTH ; VERMILION_DOCK + warp_to 15, 13, VERMILION_CITY_WIDTH ; VERMILION_HOUSE_3 + warp_to 7, 3, VERMILION_CITY_WIDTH ; VERMILION_HOUSE_2 diff --git a/data/mapObjects/vermiliondock.asm b/data/mapObjects/vermiliondock.asm index 54d6790a..289689b5 100755 --- a/data/mapObjects/vermiliondock.asm +++ b/data/mapObjects/vermiliondock.asm @@ -1,14 +1,14 @@ VermilionDockObject: db $f ; border block - db $2 ; warps - db $0, $e, $5, $ff - db $2, $e, $1, SS_ANNE_1 + db 2 ; warps + warp 14, 0, 5, -1 + warp 14, 2, 1, SS_ANNE_1 - db $0 ; signs + db 0 ; signs - db $0 ; objects + db 0 ; objects ; warp-to - EVENT_DISP VERMILION_DOCK_WIDTH, $0, $e - EVENT_DISP VERMILION_DOCK_WIDTH, $2, $e ; SS_ANNE_1 + warp_to 14, 0, VERMILION_DOCK_WIDTH + warp_to 14, 2, VERMILION_DOCK_WIDTH ; SS_ANNE_1 diff --git a/data/mapObjects/vermiliongym.asm b/data/mapObjects/vermiliongym.asm index 9058ec4c..843454c0 100755 --- a/data/mapObjects/vermiliongym.asm +++ b/data/mapObjects/vermiliongym.asm @@ -1,19 +1,19 @@ VermilionGymObject: db $3 ; border block - db $2 ; warps - db $11, $4, $3, $ff - db $11, $5, $3, $ff + db 2 ; warps + warp 4, 17, 3, -1 + warp 5, 17, 3, -1 - db $0 ; signs + db 0 ; signs - db $5 ; objects - object SPRITE_ROCKER, $5, $1, STAY, DOWN, $1, OPP_LT_SURGE, $1 - object SPRITE_GENTLEMAN, $9, $6, STAY, LEFT, $2, OPP_GENTLEMAN, $3 - object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, LEFT, $3, OPP_ROCKER, $1 - object SPRITE_SAILOR, $0, $a, STAY, RIGHT, $4, OPP_SAILOR, $8 - object SPRITE_GYM_HELPER, $4, $e, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_ROCKER, 5, 1, STAY, DOWN, 1, OPP_LT_SURGE, 1 + object SPRITE_GENTLEMAN, 9, 6, STAY, LEFT, 2, OPP_GENTLEMAN, 3 + object SPRITE_BLACK_HAIR_BOY_2, 3, 8, STAY, LEFT, 3, OPP_ROCKER, 1 + object SPRITE_SAILOR, 0, 10, STAY, RIGHT, 4, OPP_SAILOR, 8 + object SPRITE_GYM_HELPER, 4, 14, STAY, DOWN, 5 ; person ; warp-to - EVENT_DISP VERMILION_GYM_WIDTH, $11, $4 - EVENT_DISP VERMILION_GYM_WIDTH, $11, $5 + warp_to 4, 17, VERMILION_GYM_WIDTH + warp_to 5, 17, VERMILION_GYM_WIDTH diff --git a/data/mapObjects/vermilionhouse1.asm b/data/mapObjects/vermilionhouse1.asm index 199489ba..bbb7491b 100755 --- a/data/mapObjects/vermilionhouse1.asm +++ b/data/mapObjects/vermilionhouse1.asm @@ -1,17 +1,17 @@ VermilionHouse1Object: db $a ; border block - db $2 ; warps - db $7, $2, $4, $ff - db $7, $3, $4, $ff + db 2 ; warps + warp 2, 7, 4, -1 + warp 3, 7, 4, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_BUG_CATCHER, $5, $3, STAY, LEFT, $1 ; person - object SPRITE_BIRD, $3, $5, WALK, $2, $2 ; person - object SPRITE_PAPER_SHEET, $4, $3, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_BUG_CATCHER, 5, 3, STAY, LEFT, 1 ; person + object SPRITE_BIRD, 3, 5, WALK, 2, 2 ; person + object SPRITE_PAPER_SHEET, 4, 3, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP VERMILION_HOUSE_1_WIDTH, $7, $2 - EVENT_DISP VERMILION_HOUSE_1_WIDTH, $7, $3 + warp_to 2, 7, VERMILION_HOUSE_1_WIDTH + warp_to 3, 7, VERMILION_HOUSE_1_WIDTH diff --git a/data/mapObjects/vermilionhouse2.asm b/data/mapObjects/vermilionhouse2.asm index 0108233b..e612b06a 100755 --- a/data/mapObjects/vermilionhouse2.asm +++ b/data/mapObjects/vermilionhouse2.asm @@ -1,15 +1,15 @@ VermilionHouse2Object: db $a ; border block - db $2 ; warps - db $7, $2, $8, $ff - db $7, $3, $8, $ff + db 2 ; warps + warp 2, 7, 8, -1 + warp 3, 7, 8, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_FISHER, $2, $4, STAY, RIGHT, $1 ; person + db 1 ; objects + object SPRITE_FISHER, 2, 4, STAY, RIGHT, 1 ; person ; warp-to - EVENT_DISP VERMILION_HOUSE_2_WIDTH, $7, $2 - EVENT_DISP VERMILION_HOUSE_2_WIDTH, $7, $3 + warp_to 2, 7, VERMILION_HOUSE_2_WIDTH + warp_to 3, 7, VERMILION_HOUSE_2_WIDTH diff --git a/data/mapObjects/vermilionhouse3.asm b/data/mapObjects/vermilionhouse3.asm index 2b8e007b..a6dd42fa 100755 --- a/data/mapObjects/vermilionhouse3.asm +++ b/data/mapObjects/vermilionhouse3.asm @@ -1,15 +1,15 @@ VermilionHouse3Object: db $a ; border block - db $2 ; warps - db $7, $2, $7, $ff - db $7, $3, $7, $ff + db 2 ; warps + warp 2, 7, 7, -1 + warp 3, 7, 7, -1 - db $0 ; signs + db 0 ; signs - db $1 ; objects - object SPRITE_LITTLE_GIRL, $3, $5, STAY, UP, $1 ; person + db 1 ; objects + object SPRITE_LITTLE_GIRL, 3, 5, STAY, UP, 1 ; person ; warp-to - EVENT_DISP VERMILION_HOUSE_3_WIDTH, $7, $2 - EVENT_DISP VERMILION_HOUSE_3_WIDTH, $7, $3 + warp_to 2, 7, VERMILION_HOUSE_3_WIDTH + warp_to 3, 7, VERMILION_HOUSE_3_WIDTH diff --git a/data/mapObjects/vermilionmart.asm b/data/mapObjects/vermilionmart.asm index 01df824e..f5b15c7d 100755 --- a/data/mapObjects/vermilionmart.asm +++ b/data/mapObjects/vermilionmart.asm @@ -1,17 +1,17 @@ VermilionMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $2, $ff - db $7, $4, $2, $ff + db 2 ; warps + warp 3, 7, 2, -1 + warp 4, 7, 2, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_BLACK_HAIR_BOY_1, $5, $6, STAY, NONE, $2 ; person - object SPRITE_LASS, $3, $3, WALK, $2, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_BLACK_HAIR_BOY_1, 5, 6, STAY, NONE, 2 ; person + object SPRITE_LASS, 3, 3, WALK, 2, 3 ; person ; warp-to - EVENT_DISP VERMILION_MART_WIDTH, $7, $3 - EVENT_DISP VERMILION_MART_WIDTH, $7, $4 + warp_to 3, 7, VERMILION_MART_WIDTH + warp_to 4, 7, VERMILION_MART_WIDTH diff --git a/data/mapObjects/vermilionpokecenter.asm b/data/mapObjects/vermilionpokecenter.asm index 727af039..da792d34 100755 --- a/data/mapObjects/vermilionpokecenter.asm +++ b/data/mapObjects/vermilionpokecenter.asm @@ -1,18 +1,18 @@ VermilionPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $0, $ff - db $7, $4, $0, $ff + db 2 ; warps + warp 3, 7, 0, -1 + warp 4, 7, 0, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_FISHER, $a, $5, STAY, NONE, $2 ; person - object SPRITE_SAILOR, $5, $4, STAY, NONE, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_FISHER, 10, 5, STAY, NONE, 2 ; person + object SPRITE_SAILOR, 5, 4, STAY, NONE, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP VERMILION_POKECENTER_WIDTH, $7, $3 - EVENT_DISP VERMILION_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, VERMILION_POKECENTER_WIDTH + warp_to 4, 7, VERMILION_POKECENTER_WIDTH diff --git a/data/mapObjects/victoryroad1.asm b/data/mapObjects/victoryroad1.asm index 05680b9f..62309bbd 100755 --- a/data/mapObjects/victoryroad1.asm +++ b/data/mapObjects/victoryroad1.asm @@ -1,23 +1,23 @@ VictoryRoad1Object: db $7d ; border block - db $3 ; warps - db $11, $8, $2, $ff - db $11, $9, $2, $ff - db $1, $1, $0, VICTORY_ROAD_2 + db 3 ; warps + warp 8, 17, 2, -1 + warp 9, 17, 2, -1 + warp 1, 1, 0, VICTORY_ROAD_2 - db $0 ; signs + db 0 ; signs - db $7 ; objects - object SPRITE_LASS, $7, $5, STAY, RIGHT, $1, OPP_COOLTRAINER_F, $5 - object SPRITE_BLACK_HAIR_BOY_1, $3, $2, STAY, DOWN, $2, OPP_COOLTRAINER_M, $5 - object SPRITE_BALL, $b, $0, STAY, NONE, $3, TM_43 - object SPRITE_BALL, $9, $2, STAY, NONE, $4, RARE_CANDY - object SPRITE_BOULDER, $5, $f, STAY, BOULDER_MOVEMENT_BYTE_2, $5 ; person - object SPRITE_BOULDER, $e, $2, STAY, BOULDER_MOVEMENT_BYTE_2, $6 ; person - object SPRITE_BOULDER, $2, $a, STAY, BOULDER_MOVEMENT_BYTE_2, $7 ; person + db 7 ; objects + object SPRITE_LASS, 7, 5, STAY, RIGHT, 1, OPP_COOLTRAINER_F, 5 + object SPRITE_BLACK_HAIR_BOY_1, 3, 2, STAY, DOWN, 2, OPP_COOLTRAINER_M, 5 + object SPRITE_BALL, 11, 0, STAY, NONE, 3, TM_43 + object SPRITE_BALL, 9, 2, STAY, NONE, 4, RARE_CANDY + object SPRITE_BOULDER, 5, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 5 ; person + object SPRITE_BOULDER, 14, 2, STAY, BOULDER_MOVEMENT_BYTE_2, 6 ; person + object SPRITE_BOULDER, 2, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 7 ; person ; warp-to - EVENT_DISP VICTORY_ROAD_1_WIDTH, $11, $8 - EVENT_DISP VICTORY_ROAD_1_WIDTH, $11, $9 - EVENT_DISP VICTORY_ROAD_1_WIDTH, $1, $1 ; VICTORY_ROAD_2 + warp_to 8, 17, VICTORY_ROAD_1_WIDTH + warp_to 9, 17, VICTORY_ROAD_1_WIDTH + warp_to 1, 1, VICTORY_ROAD_1_WIDTH ; VICTORY_ROAD_2 diff --git a/data/mapObjects/victoryroad2.asm b/data/mapObjects/victoryroad2.asm index 1bada62a..283e74c8 100755 --- a/data/mapObjects/victoryroad2.asm +++ b/data/mapObjects/victoryroad2.asm @@ -1,37 +1,37 @@ VictoryRoad2Object: db $7d ; border block - db $7 ; warps - db $8, $0, $2, VICTORY_ROAD_1 - db $7, $1d, $3, $ff - db $8, $1d, $3, $ff - db $7, $17, $0, VICTORY_ROAD_3 - db $e, $19, $2, VICTORY_ROAD_3 - db $7, $1b, $1, VICTORY_ROAD_3 - db $1, $1, $3, VICTORY_ROAD_3 + db 7 ; warps + warp 0, 8, 2, VICTORY_ROAD_1 + warp 29, 7, 3, -1 + warp 29, 8, 3, -1 + warp 23, 7, 0, VICTORY_ROAD_3 + warp 25, 14, 2, VICTORY_ROAD_3 + warp 27, 7, 1, VICTORY_ROAD_3 + warp 1, 1, 3, VICTORY_ROAD_3 - db $0 ; signs + db 0 ; signs - db $d ; objects - object SPRITE_HIKER, $c, $9, STAY, LEFT, $1, OPP_BLACKBELT, $9 - object SPRITE_BLACK_HAIR_BOY_2, $15, $d, STAY, LEFT, $2, OPP_JUGGLER, $2 - object SPRITE_BLACK_HAIR_BOY_1, $13, $8, STAY, DOWN, $3, OPP_TAMER, $5 - object SPRITE_BLACK_HAIR_BOY_2, $4, $2, STAY, DOWN, $4, OPP_POKEMANIAC, $6 - object SPRITE_BLACK_HAIR_BOY_2, $1a, $3, STAY, LEFT, $5, OPP_JUGGLER, $5 - object SPRITE_BIRD, $b, $5, STAY, UP, $6, MOLTRES, 50 - object SPRITE_BALL, $1b, $5, STAY, NONE, $7, TM_17 - object SPRITE_BALL, $12, $9, STAY, NONE, $8, FULL_HEAL - object SPRITE_BALL, $9, $b, STAY, NONE, $9, TM_05 - object SPRITE_BALL, $b, $0, STAY, NONE, $a, GUARD_SPEC - object SPRITE_BOULDER, $4, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $b ; person - object SPRITE_BOULDER, $5, $5, STAY, BOULDER_MOVEMENT_BYTE_2, $c ; person - object SPRITE_BOULDER, $17, $10, STAY, BOULDER_MOVEMENT_BYTE_2, $d ; person + db 13 ; objects + object SPRITE_HIKER, 12, 9, STAY, LEFT, 1, OPP_BLACKBELT, 9 + object SPRITE_BLACK_HAIR_BOY_2, 21, 13, STAY, LEFT, 2, OPP_JUGGLER, 2 + object SPRITE_BLACK_HAIR_BOY_1, 19, 8, STAY, DOWN, 3, OPP_TAMER, 5 + object SPRITE_BLACK_HAIR_BOY_2, 4, 2, STAY, DOWN, 4, OPP_POKEMANIAC, 6 + object SPRITE_BLACK_HAIR_BOY_2, 26, 3, STAY, LEFT, 5, OPP_JUGGLER, 5 + object SPRITE_BIRD, 11, 5, STAY, UP, 6, MOLTRES, 50 + object SPRITE_BALL, 27, 5, STAY, NONE, 7, TM_17 + object SPRITE_BALL, 18, 9, STAY, NONE, 8, FULL_HEAL + object SPRITE_BALL, 9, 11, STAY, NONE, 9, TM_05 + object SPRITE_BALL, 11, 0, STAY, NONE, 10, GUARD_SPEC + object SPRITE_BOULDER, 4, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 11 ; person + object SPRITE_BOULDER, 5, 5, STAY, BOULDER_MOVEMENT_BYTE_2, 12 ; person + object SPRITE_BOULDER, 23, 16, STAY, BOULDER_MOVEMENT_BYTE_2, 13 ; person ; warp-to - EVENT_DISP VICTORY_ROAD_2_WIDTH, $8, $0 ; VICTORY_ROAD_1 - EVENT_DISP VICTORY_ROAD_2_WIDTH, $7, $1d - EVENT_DISP VICTORY_ROAD_2_WIDTH, $8, $1d - EVENT_DISP VICTORY_ROAD_2_WIDTH, $7, $17 ; VICTORY_ROAD_3 - EVENT_DISP VICTORY_ROAD_2_WIDTH, $e, $19 ; VICTORY_ROAD_3 - EVENT_DISP VICTORY_ROAD_2_WIDTH, $7, $1b ; VICTORY_ROAD_3 - EVENT_DISP VICTORY_ROAD_2_WIDTH, $1, $1 ; VICTORY_ROAD_3 + warp_to 0, 8, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_1 + warp_to 29, 7, VICTORY_ROAD_2_WIDTH + warp_to 29, 8, VICTORY_ROAD_2_WIDTH + warp_to 23, 7, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_3 + warp_to 25, 14, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_3 + warp_to 27, 7, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_3 + warp_to 1, 1, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_3 diff --git a/data/mapObjects/victoryroad3.asm b/data/mapObjects/victoryroad3.asm index 20e43583..ffa2a843 100755 --- a/data/mapObjects/victoryroad3.asm +++ b/data/mapObjects/victoryroad3.asm @@ -1,28 +1,28 @@ VictoryRoad3Object: db $7d ; border block - db $4 ; warps - db $7, $17, $3, VICTORY_ROAD_2 - db $8, $1a, $5, VICTORY_ROAD_2 - db $f, $1b, $4, VICTORY_ROAD_2 - db $0, $2, $6, VICTORY_ROAD_2 + db 4 ; warps + warp 23, 7, 3, VICTORY_ROAD_2 + warp 26, 8, 5, VICTORY_ROAD_2 + warp 27, 15, 4, VICTORY_ROAD_2 + warp 2, 0, 6, VICTORY_ROAD_2 - db $0 ; signs + db 0 ; signs - db $a ; objects - object SPRITE_BLACK_HAIR_BOY_1, $1c, $5, STAY, LEFT, $1, OPP_COOLTRAINER_M, $2 - object SPRITE_LASS, $7, $d, STAY, RIGHT, $2, OPP_COOLTRAINER_F, $2 - object SPRITE_BLACK_HAIR_BOY_1, $6, $e, STAY, LEFT, $3, OPP_COOLTRAINER_M, $3 - object SPRITE_LASS, $d, $3, STAY, RIGHT, $4, OPP_COOLTRAINER_F, $3 - object SPRITE_BALL, $1a, $5, STAY, NONE, $5, MAX_REVIVE - object SPRITE_BALL, $7, $7, STAY, NONE, $6, TM_47 - object SPRITE_BOULDER, $16, $3, STAY, BOULDER_MOVEMENT_BYTE_2, $7 ; person - object SPRITE_BOULDER, $d, $c, STAY, BOULDER_MOVEMENT_BYTE_2, $8 ; person - object SPRITE_BOULDER, $18, $a, STAY, BOULDER_MOVEMENT_BYTE_2, $9 ; person - object SPRITE_BOULDER, $16, $f, STAY, BOULDER_MOVEMENT_BYTE_2, $a ; person + db 10 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 28, 5, STAY, LEFT, 1, OPP_COOLTRAINER_M, 2 + object SPRITE_LASS, 7, 13, STAY, RIGHT, 2, OPP_COOLTRAINER_F, 2 + object SPRITE_BLACK_HAIR_BOY_1, 6, 14, STAY, LEFT, 3, OPP_COOLTRAINER_M, 3 + object SPRITE_LASS, 13, 3, STAY, RIGHT, 4, OPP_COOLTRAINER_F, 3 + object SPRITE_BALL, 26, 5, STAY, NONE, 5, MAX_REVIVE + object SPRITE_BALL, 7, 7, STAY, NONE, 6, TM_47 + object SPRITE_BOULDER, 22, 3, STAY, BOULDER_MOVEMENT_BYTE_2, 7 ; person + object SPRITE_BOULDER, 13, 12, STAY, BOULDER_MOVEMENT_BYTE_2, 8 ; person + object SPRITE_BOULDER, 24, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 9 ; person + object SPRITE_BOULDER, 22, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 10 ; person ; warp-to - EVENT_DISP VICTORY_ROAD_3_WIDTH, $7, $17 ; VICTORY_ROAD_2 - EVENT_DISP VICTORY_ROAD_3_WIDTH, $8, $1a ; VICTORY_ROAD_2 - EVENT_DISP VICTORY_ROAD_3_WIDTH, $f, $1b ; VICTORY_ROAD_2 - EVENT_DISP VICTORY_ROAD_3_WIDTH, $0, $2 ; VICTORY_ROAD_2 + warp_to 23, 7, VICTORY_ROAD_3_WIDTH ; VICTORY_ROAD_2 + warp_to 26, 8, VICTORY_ROAD_3_WIDTH ; VICTORY_ROAD_2 + warp_to 27, 15, VICTORY_ROAD_3_WIDTH ; VICTORY_ROAD_2 + warp_to 2, 0, VICTORY_ROAD_3_WIDTH ; VICTORY_ROAD_2 diff --git a/data/mapObjects/viridiancity.asm b/data/mapObjects/viridiancity.asm index ca40cc4f..b45ba9d5 100755 --- a/data/mapObjects/viridiancity.asm +++ b/data/mapObjects/viridiancity.asm @@ -1,33 +1,33 @@ ViridianCityObject: db $f ; border block - db $5 ; warps - db $19, $17, $0, VIRIDIAN_POKECENTER - db $13, $1d, $0, VIRIDIAN_MART - db $f, $15, $0, VIRIDIAN_SCHOOL - db $9, $15, $0, VIRIDIAN_HOUSE - db $7, $20, $0, VIRIDIAN_GYM + db 5 ; warps + warp 23, 25, 0, VIRIDIAN_POKECENTER + warp 29, 19, 0, VIRIDIAN_MART + warp 21, 15, 0, VIRIDIAN_SCHOOL + warp 21, 9, 0, VIRIDIAN_HOUSE + warp 32, 7, 0, VIRIDIAN_GYM - db $6 ; signs - db $11, $11, $8 ; ViridianCityText8 - db $1, $13, $9 ; ViridianCityText9 - db $1d, $15, $a ; ViridianCityText10 - db $13, $1e, $b ; MartSignText - db $19, $18, $c ; PokeCenterSignText - db $7, $1b, $d ; ViridianCityText13 + db 6 ; signs + sign 17, 17, 8 ; ViridianCityText8 + sign 19, 1, 9 ; ViridianCityText9 + sign 21, 29, 10 ; ViridianCityText10 + sign 30, 19, 11 ; MartSignText + sign 24, 25, 12 ; PokeCenterSignText + sign 27, 7, 13 ; ViridianCityText13 - db $7 ; objects - object SPRITE_BUG_CATCHER, $d, $14, WALK, $0, $1 ; person - object SPRITE_GAMBLER, $1e, $8, STAY, NONE, $2 ; person - object SPRITE_BUG_CATCHER, $1e, $19, WALK, $0, $3 ; person - object SPRITE_GIRL, $11, $9, STAY, RIGHT, $4 ; person - object SPRITE_LYING_OLD_MAN, $12, $9, STAY, NONE, $5 ; person - object SPRITE_FISHER2, $6, $17, STAY, DOWN, $6 ; person - object SPRITE_GAMBLER, $11, $5, WALK, $2, $7 ; person + db 7 ; objects + object SPRITE_BUG_CATCHER, 13, 20, WALK, 0, 1 ; person + object SPRITE_GAMBLER, 30, 8, STAY, NONE, 2 ; person + object SPRITE_BUG_CATCHER, 30, 25, WALK, 0, 3 ; person + object SPRITE_GIRL, 17, 9, STAY, RIGHT, 4 ; person + object SPRITE_LYING_OLD_MAN, 18, 9, STAY, NONE, 5 ; person + object SPRITE_FISHER2, 6, 23, STAY, DOWN, 6 ; person + object SPRITE_GAMBLER, 17, 5, WALK, 2, 7 ; person ; warp-to - EVENT_DISP VIRIDIAN_CITY_WIDTH, $19, $17 ; VIRIDIAN_POKECENTER - EVENT_DISP VIRIDIAN_CITY_WIDTH, $13, $1d ; VIRIDIAN_MART - EVENT_DISP VIRIDIAN_CITY_WIDTH, $f, $15 ; VIRIDIAN_SCHOOL - EVENT_DISP VIRIDIAN_CITY_WIDTH, $9, $15 ; VIRIDIAN_HOUSE - EVENT_DISP VIRIDIAN_CITY_WIDTH, $7, $20 ; VIRIDIAN_GYM + warp_to 23, 25, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_POKECENTER + warp_to 29, 19, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_MART + warp_to 21, 15, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_SCHOOL + warp_to 21, 9, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_HOUSE + warp_to 32, 7, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_GYM diff --git a/data/mapObjects/viridianforest.asm b/data/mapObjects/viridianforest.asm index 0e466a70..601f73e2 100755 --- a/data/mapObjects/viridianforest.asm +++ b/data/mapObjects/viridianforest.asm @@ -1,36 +1,36 @@ ViridianForestObject: db $3 ; border block - db $6 ; warps - db $0, $1, $2, VIRIDIAN_FOREST_EXIT - db $0, $2, $3, VIRIDIAN_FOREST_EXIT - db $2f, $f, $1, VIRIDIAN_FOREST_ENTRANCE - db $2f, $10, $1, VIRIDIAN_FOREST_ENTRANCE - db $2f, $11, $1, VIRIDIAN_FOREST_ENTRANCE - db $2f, $12, $1, VIRIDIAN_FOREST_ENTRANCE + db 6 ; warps + warp 1, 0, 2, VIRIDIAN_FOREST_EXIT + warp 2, 0, 3, VIRIDIAN_FOREST_EXIT + warp 15, 47, 1, VIRIDIAN_FOREST_ENTRANCE + warp 16, 47, 1, VIRIDIAN_FOREST_ENTRANCE + warp 17, 47, 1, VIRIDIAN_FOREST_ENTRANCE + warp 18, 47, 1, VIRIDIAN_FOREST_ENTRANCE - db $6 ; signs - db $28, $18, $9 ; ViridianForestText9 - db $20, $10, $a ; ViridianForestText10 - db $11, $1a, $b ; ViridianForestText11 - db $18, $4, $c ; ViridianForestText12 - db $2d, $12, $d ; ViridianForestText13 - db $1, $2, $e ; ViridianForestText14 + db 6 ; signs + sign 24, 40, 9 ; ViridianForestText9 + sign 16, 32, 10 ; ViridianForestText10 + sign 26, 17, 11 ; ViridianForestText11 + sign 4, 24, 12 ; ViridianForestText12 + sign 18, 45, 13 ; ViridianForestText13 + sign 2, 1, 14 ; ViridianForestText14 - db $8 ; objects - object SPRITE_BUG_CATCHER, $10, $2b, STAY, NONE, $1 ; person - object SPRITE_BUG_CATCHER, $1e, $21, STAY, LEFT, $2, OPP_BUG_CATCHER, $1 - object SPRITE_BUG_CATCHER, $1e, $13, STAY, LEFT, $3, OPP_BUG_CATCHER, $2 - object SPRITE_BUG_CATCHER, $2, $12, STAY, LEFT, $4, OPP_BUG_CATCHER, $3 - object SPRITE_BALL, $19, $b, STAY, NONE, $5, ANTIDOTE - object SPRITE_BALL, $c, $1d, STAY, NONE, $6, POTION - object SPRITE_BALL, $1, $1f, STAY, NONE, $7, POKE_BALL - object SPRITE_BUG_CATCHER, $1b, $28, STAY, NONE, $8 ; person + db 8 ; objects + object SPRITE_BUG_CATCHER, 16, 43, STAY, NONE, 1 ; person + object SPRITE_BUG_CATCHER, 30, 33, STAY, LEFT, 2, OPP_BUG_CATCHER, 1 + object SPRITE_BUG_CATCHER, 30, 19, STAY, LEFT, 3, OPP_BUG_CATCHER, 2 + object SPRITE_BUG_CATCHER, 2, 18, STAY, LEFT, 4, OPP_BUG_CATCHER, 3 + object SPRITE_BALL, 25, 11, STAY, NONE, 5, ANTIDOTE + object SPRITE_BALL, 12, 29, STAY, NONE, 6, POTION + object SPRITE_BALL, 1, 31, STAY, NONE, 7, POKE_BALL + object SPRITE_BUG_CATCHER, 27, 40, STAY, NONE, 8 ; person ; warp-to - EVENT_DISP VIRIDIAN_FOREST_WIDTH, $0, $1 ; VIRIDIAN_FOREST_EXIT - EVENT_DISP VIRIDIAN_FOREST_WIDTH, $0, $2 ; VIRIDIAN_FOREST_EXIT - EVENT_DISP VIRIDIAN_FOREST_WIDTH, $2f, $f ; VIRIDIAN_FOREST_ENTRANCE - EVENT_DISP VIRIDIAN_FOREST_WIDTH, $2f, $10 ; VIRIDIAN_FOREST_ENTRANCE - EVENT_DISP VIRIDIAN_FOREST_WIDTH, $2f, $11 ; VIRIDIAN_FOREST_ENTRANCE - EVENT_DISP VIRIDIAN_FOREST_WIDTH, $2f, $12 ; VIRIDIAN_FOREST_ENTRANCE + warp_to 1, 0, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_EXIT + warp_to 2, 0, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_EXIT + warp_to 15, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_ENTRANCE + warp_to 16, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_ENTRANCE + warp_to 17, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_ENTRANCE + warp_to 18, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_ENTRANCE diff --git a/data/mapObjects/viridianforestentrance.asm b/data/mapObjects/viridianforestentrance.asm index 06faad72..319ba272 100755 --- a/data/mapObjects/viridianforestentrance.asm +++ b/data/mapObjects/viridianforestentrance.asm @@ -1,20 +1,20 @@ ViridianForestEntranceObject: db $a ; border block - db $4 ; warps - db $0, $4, $3, VIRIDIAN_FOREST - db $0, $5, $4, VIRIDIAN_FOREST - db $7, $4, $5, $ff - db $7, $5, $5, $ff + db 4 ; warps + warp 4, 0, 3, VIRIDIAN_FOREST + warp 5, 0, 4, VIRIDIAN_FOREST + warp 4, 7, 5, -1 + warp 5, 7, 5, -1 - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_GIRL, $8, $4, STAY, LEFT, $1 ; person - object SPRITE_LITTLE_GIRL, $2, $4, WALK, $1, $2 ; person + db 2 ; objects + object SPRITE_GIRL, 8, 4, STAY, LEFT, 1 ; person + object SPRITE_LITTLE_GIRL, 2, 4, WALK, 1, 2 ; person ; warp-to - EVENT_DISP VIRIDIAN_FOREST_ENTRANCE_WIDTH, $0, $4 ; VIRIDIAN_FOREST - EVENT_DISP VIRIDIAN_FOREST_ENTRANCE_WIDTH, $0, $5 ; VIRIDIAN_FOREST - EVENT_DISP VIRIDIAN_FOREST_ENTRANCE_WIDTH, $7, $4 - EVENT_DISP VIRIDIAN_FOREST_ENTRANCE_WIDTH, $7, $5 + warp_to 4, 0, VIRIDIAN_FOREST_ENTRANCE_WIDTH ; VIRIDIAN_FOREST + warp_to 5, 0, VIRIDIAN_FOREST_ENTRANCE_WIDTH ; VIRIDIAN_FOREST + warp_to 4, 7, VIRIDIAN_FOREST_ENTRANCE_WIDTH + warp_to 5, 7, VIRIDIAN_FOREST_ENTRANCE_WIDTH diff --git a/data/mapObjects/viridianforestexit.asm b/data/mapObjects/viridianforestexit.asm index 0f48fd1c..521ad818 100755 --- a/data/mapObjects/viridianforestexit.asm +++ b/data/mapObjects/viridianforestexit.asm @@ -1,20 +1,20 @@ ViridianForestExitObject: db $a ; border block - db $4 ; warps - db $0, $4, $1, $ff - db $0, $5, $1, $ff - db $7, $4, $0, VIRIDIAN_FOREST - db $7, $5, $0, VIRIDIAN_FOREST + db 4 ; warps + warp 4, 0, 1, -1 + warp 5, 0, 1, -1 + warp 4, 7, 0, VIRIDIAN_FOREST + warp 5, 7, 0, VIRIDIAN_FOREST - db $0 ; signs + db 0 ; signs - db $2 ; objects - object SPRITE_BLACK_HAIR_BOY_2, $3, $2, STAY, NONE, $1 ; person - object SPRITE_OLD_PERSON, $2, $5, STAY, NONE, $2 ; person + db 2 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 3, 2, STAY, NONE, 1 ; person + object SPRITE_OLD_PERSON, 2, 5, STAY, NONE, 2 ; person ; warp-to - EVENT_DISP VIRIDIAN_FOREST_EXIT_WIDTH, $0, $4 - EVENT_DISP VIRIDIAN_FOREST_EXIT_WIDTH, $0, $5 - EVENT_DISP VIRIDIAN_FOREST_EXIT_WIDTH, $7, $4 ; VIRIDIAN_FOREST - EVENT_DISP VIRIDIAN_FOREST_EXIT_WIDTH, $7, $5 ; VIRIDIAN_FOREST + warp_to 4, 0, VIRIDIAN_FOREST_EXIT_WIDTH + warp_to 5, 0, VIRIDIAN_FOREST_EXIT_WIDTH + warp_to 4, 7, VIRIDIAN_FOREST_EXIT_WIDTH ; VIRIDIAN_FOREST + warp_to 5, 7, VIRIDIAN_FOREST_EXIT_WIDTH ; VIRIDIAN_FOREST diff --git a/data/mapObjects/viridiangym.asm b/data/mapObjects/viridiangym.asm index 8efa5e22..c6ddb1d4 100755 --- a/data/mapObjects/viridiangym.asm +++ b/data/mapObjects/viridiangym.asm @@ -1,25 +1,25 @@ ViridianGymObject: db $3 ; border block - db $2 ; warps - db $11, $10, $4, $ff - db $11, $11, $4, $ff + db 2 ; warps + warp 16, 17, 4, -1 + warp 17, 17, 4, -1 - db $0 ; signs + db 0 ; signs - db $b ; objects - object SPRITE_GIOVANNI, $2, $1, STAY, DOWN, $1, OPP_GIOVANNI, $3 - object SPRITE_BLACK_HAIR_BOY_1, $c, $7, STAY, DOWN, $2, OPP_COOLTRAINER_M, $9 - object SPRITE_HIKER, $b, $b, STAY, UP, $3, OPP_BLACKBELT, $6 - object SPRITE_ROCKER, $a, $7, STAY, DOWN, $4, OPP_TAMER, $3 - object SPRITE_HIKER, $3, $7, STAY, LEFT, $5, OPP_BLACKBELT, $7 - object SPRITE_BLACK_HAIR_BOY_1, $d, $5, STAY, RIGHT, $6, OPP_COOLTRAINER_M, $a - object SPRITE_HIKER, $a, $1, STAY, DOWN, $7, OPP_BLACKBELT, $8 - object SPRITE_ROCKER, $2, $10, STAY, RIGHT, $8, OPP_TAMER, $4 - object SPRITE_BLACK_HAIR_BOY_1, $6, $5, STAY, DOWN, $9, OPP_COOLTRAINER_M, $1 - object SPRITE_GYM_HELPER, $10, $f, STAY, DOWN, $a ; person - object SPRITE_BALL, $10, $9, STAY, NONE, $b, REVIVE + db 11 ; objects + object SPRITE_GIOVANNI, 2, 1, STAY, DOWN, 1, OPP_GIOVANNI, 3 + object SPRITE_BLACK_HAIR_BOY_1, 12, 7, STAY, DOWN, 2, OPP_COOLTRAINER_M, 9 + object SPRITE_HIKER, 11, 11, STAY, UP, 3, OPP_BLACKBELT, 6 + object SPRITE_ROCKER, 10, 7, STAY, DOWN, 4, OPP_TAMER, 3 + object SPRITE_HIKER, 3, 7, STAY, LEFT, 5, OPP_BLACKBELT, 7 + object SPRITE_BLACK_HAIR_BOY_1, 13, 5, STAY, RIGHT, 6, OPP_COOLTRAINER_M, 10 + object SPRITE_HIKER, 10, 1, STAY, DOWN, 7, OPP_BLACKBELT, 8 + object SPRITE_ROCKER, 2, 16, STAY, RIGHT, 8, OPP_TAMER, 4 + object SPRITE_BLACK_HAIR_BOY_1, 6, 5, STAY, DOWN, 9, OPP_COOLTRAINER_M, 1 + object SPRITE_GYM_HELPER, 16, 15, STAY, DOWN, 10 ; person + object SPRITE_BALL, 16, 9, STAY, NONE, 11, REVIVE ; warp-to - EVENT_DISP VIRIDIAN_GYM_WIDTH, $11, $10 - EVENT_DISP VIRIDIAN_GYM_WIDTH, $11, $11 + warp_to 16, 17, VIRIDIAN_GYM_WIDTH + warp_to 17, 17, VIRIDIAN_GYM_WIDTH diff --git a/data/mapObjects/viridianhouse.asm b/data/mapObjects/viridianhouse.asm index c06bb9c8..932542a6 100755 --- a/data/mapObjects/viridianhouse.asm +++ b/data/mapObjects/viridianhouse.asm @@ -1,18 +1,18 @@ ViridianHouseObject: db $a ; border block - db $2 ; warps - db $7, $2, $3, $ff - db $7, $3, $3, $ff + db 2 ; warps + warp 2, 7, 3, -1 + warp 3, 7, 3, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_BALDING_GUY, $5, $3, STAY, NONE, $1 ; person - object SPRITE_LITTLE_GIRL, $1, $4, WALK, $1, $2 ; person - object SPRITE_BIRD, $5, $5, WALK, $2, $3 ; person - object SPRITE_CLIPBOARD, $4, $0, STAY, NONE, $4 ; person + db 4 ; objects + object SPRITE_BALDING_GUY, 5, 3, STAY, NONE, 1 ; person + object SPRITE_LITTLE_GIRL, 1, 4, WALK, 1, 2 ; person + object SPRITE_BIRD, 5, 5, WALK, 2, 3 ; person + object SPRITE_CLIPBOARD, 4, 0, STAY, NONE, 4 ; person ; warp-to - EVENT_DISP VIRIDIAN_HOUSE_WIDTH, $7, $2 - EVENT_DISP VIRIDIAN_HOUSE_WIDTH, $7, $3 + warp_to 2, 7, VIRIDIAN_HOUSE_WIDTH + warp_to 3, 7, VIRIDIAN_HOUSE_WIDTH diff --git a/data/mapObjects/viridianmart.asm b/data/mapObjects/viridianmart.asm index 4b90bee3..e692f810 100755 --- a/data/mapObjects/viridianmart.asm +++ b/data/mapObjects/viridianmart.asm @@ -1,17 +1,17 @@ ViridianMartObject: db $0 ; border block - db $2 ; warps - db $7, $3, $1, $ff - db $7, $4, $1, $ff + db 2 ; warps + warp 3, 7, 1, -1 + warp 4, 7, 1, -1 - db $0 ; signs + db 0 ; signs - db $3 ; objects - object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person - object SPRITE_BUG_CATCHER, $5, $5, WALK, $1, $2 ; person - object SPRITE_BLACK_HAIR_BOY_1, $3, $3, STAY, NONE, $3 ; person + db 3 ; objects + object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person + object SPRITE_BUG_CATCHER, 5, 5, WALK, 1, 2 ; person + object SPRITE_BLACK_HAIR_BOY_1, 3, 3, STAY, NONE, 3 ; person ; warp-to - EVENT_DISP VIRIDIAN_MART_WIDTH, $7, $3 - EVENT_DISP VIRIDIAN_MART_WIDTH, $7, $4 + warp_to 3, 7, VIRIDIAN_MART_WIDTH + warp_to 4, 7, VIRIDIAN_MART_WIDTH diff --git a/data/mapObjects/viridianpokecenter.asm b/data/mapObjects/viridianpokecenter.asm index 2e96ca58..9c8ebbfe 100755 --- a/data/mapObjects/viridianpokecenter.asm +++ b/data/mapObjects/viridianpokecenter.asm @@ -1,18 +1,18 @@ ViridianPokecenterObject: db $0 ; border block - db $2 ; warps - db $7, $3, $0, $ff - db $7, $4, $0, $ff + db 2 ; warps + warp 3, 7, 0, -1 + warp 4, 7, 0, -1 - db $0 ; signs + db 0 ; signs - db $4 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $a, $5, WALK, $1, $2 ; person - object SPRITE_BLACK_HAIR_BOY_1, $4, $3, STAY, NONE, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + db 4 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 10, 5, WALK, 1, 2 ; person + object SPRITE_BLACK_HAIR_BOY_1, 4, 3, STAY, NONE, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person ; warp-to - EVENT_DISP VIRIDIAN_POKECENTER_WIDTH, $7, $3 - EVENT_DISP VIRIDIAN_POKECENTER_WIDTH, $7, $4 + warp_to 3, 7, VIRIDIAN_POKECENTER_WIDTH + warp_to 4, 7, VIRIDIAN_POKECENTER_WIDTH diff --git a/data/trainer_parties.asm b/data/trainer_parties.asm index 0c586dad..da4f80c9 100755 --- a/data/trainer_parties.asm +++ b/data/trainer_parties.asm @@ -391,18 +391,18 @@ JugglerData: db 29,KADABRA,MR_MIME,0 ; Victory Road 2F db 41,DROWZEE,HYPNO,KADABRA,KADABRA,0 -; Fucshia Gym +; Fuchsia Gym db 31,DROWZEE,DROWZEE,KADABRA,DROWZEE,0 db 34,DROWZEE,HYPNO,0 ; Victory Road 2F db 48,MR_MIME,0 ; Unused db 33,HYPNO,0 -; Fucshia Gym +; Fuchsia Gym db 38,HYPNO,0 db 34,DROWZEE,KADABRA,0 TamerData: -; Fucshia Gym +; Fuchsia Gym db 34,SANDSLASH,ARBOK,0 db 33,ARBOK,SANDSLASH,ARBOK,0 ; Viridian Gym diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index c13c58c4..76ae7744 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -47,61 +47,61 @@ FadeInCreditsText: DisplayCreditsMon: xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a call SaveScreenTilesToBuffer1 call FillMiddleOfScreenWithWhite ; display the next monster from CreditsMons - ld hl,wNumCreditsMonsDisplayed - ld c,[hl] ; how many monsters have we displayed so far? + ld hl, wNumCreditsMonsDisplayed + ld c, [hl] ; how many monsters have we displayed so far? inc [hl] - ld b,0 - ld hl,CreditsMons - add hl,bc ; go that far in the list of monsters and get the next one - ld a,[hl] - ld [wcf91],a - ld [wd0b5],a + ld b, 0 + ld hl, CreditsMons + add hl, bc ; go that far in the list of monsters and get the next one + ld a, [hl] + ld [wcf91], a + ld [wd0b5], a coord hl, 8, 6 call GetMonHeader call LoadFrontSpriteByMonIndex - ld hl,vBGMap0 + $c + ld hl, vBGMap0 + $c call CreditsCopyTileMapToVRAM xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a call LoadScreenTilesFromBuffer1 - ld hl,vBGMap0 + ld hl, vBGMap0 call CreditsCopyTileMapToVRAM - ld a,$A7 - ld [rWX],a - ld hl,vBGMap1 + ld a, $A7 + ld [rWX], a + ld hl, vBGMap1 call CreditsCopyTileMapToVRAM call FillMiddleOfScreenWithWhite - ld a,%11111100 ; make the mon a black silhouette - ld [rBGP],a + ld a, %11111100 ; make the mon a black silhouette + ld [rBGP], a ; scroll the mon left by one tile 7 times - ld bc,7 + ld bc, 7 .scrollLoop1 call ScrollCreditsMonLeft dec c - jr nz,.scrollLoop1 + jr nz, .scrollLoop1 ; scroll the mon left by one tile 20 times ; This time, we have to move the window left too in order to hide the text that ; is wrapping around to the right side of the screen. - ld c,20 + ld c, 20 .scrollLoop2 call ScrollCreditsMonLeft - ld a,[rWX] + ld a, [rWX] sub 8 - ld [rWX],a + ld [rWX], a dec c - jr nz,.scrollLoop2 + jr nz, .scrollLoop2 xor a - ld [hWY],a - ld a,%11000000 - ld [rBGP],a + ld [hWY], a + ld a, %11000000 + ld [rBGP], a ret INCLUDE "data/credit_mons.asm" @@ -266,5 +266,5 @@ INCLUDE "data/credits_order.asm" INCLUDE "text/credits_text.asm" TheEndGfx: - INCBIN "gfx/theend.interleave.2bpp" + INCBIN "gfx/theend.2bpp" TheEndGfxEnd: diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index c9ed134a..e01748d0 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1,202 +1,202 @@ ; Draws a "frame block". Frame blocks are blocks of tiles that are put ; together to form frames in battle animations. DrawFrameBlock: - ld l,c - ld h,b - ld a,[hli] - ld [wNumFBTiles],a - ld a,[wFBDestAddr + 1] - ld e,a - ld a,[wFBDestAddr] - ld d,a + ld l, c + ld h, b + ld a, [hli] + ld [wNumFBTiles], a + ld a, [wFBDestAddr + 1] + ld e, a + ld a, [wFBDestAddr] + ld d, a xor a - ld [wFBTileCounter],a ; loop counter + ld [wFBTileCounter], a ; loop counter .loop - ld a,[wFBTileCounter] + ld a, [wFBTileCounter] inc a - ld [wFBTileCounter],a - ld a,[wSubAnimTransform] + ld [wFBTileCounter], a + ld a, [wSubAnimTransform] dec a - jr z,.flipHorizontalAndVertical ; 1 + jr z, .flipHorizontalAndVertical ; 1 dec a - jp z,.flipHorizontalTranslateDown ; 2 + jp z, .flipHorizontalTranslateDown ; 2 dec a - jr z,.flipBaseCoords ; 3 + jr z, .flipBaseCoords ; 3 .noTransformation - ld a,[wBaseCoordY] + ld a, [wBaseCoordY] add [hl] - ld [de],a ; store Y + ld [de], a ; store Y inc hl inc de - ld a,[wBaseCoordX] + ld a, [wBaseCoordX] jr .finishCopying .flipBaseCoords - ld a,[wBaseCoordY] - ld b,a - ld a,136 + ld a, [wBaseCoordY] + ld b, a + ld a, 136 sub b ; flip Y base coordinate add [hl] ; Y offset - ld [de],a ; store Y + ld [de], a ; store Y inc hl inc de - ld a,[wBaseCoordX] - ld b,a - ld a,168 + ld a, [wBaseCoordX] + ld b, a + ld a, 168 sub b ; flip X base coordinate .finishCopying ; finish copying values to OAM (when [wSubAnimTransform] not 1 or 2) add [hl] ; X offset - ld [de],a ; store X + ld [de], a ; store X inc hl inc de - ld a,[hli] - add a,$31 ; base tile ID for battle animations - ld [de],a ; store tile ID + ld a, [hli] + add $31 ; base tile ID for battle animations + ld [de], a ; store tile ID inc de - ld a,[hli] - ld [de],a ; store flags + ld a, [hli] + ld [de], a ; store flags inc de jp .nextTile .flipHorizontalAndVertical - ld a,[wBaseCoordY] + ld a, [wBaseCoordY] add [hl] ; Y offset - ld b,a - ld a,136 + ld b, a + ld a, 136 sub b ; flip Y coordinate - ld [de],a ; store Y + ld [de], a ; store Y inc hl inc de - ld a,[wBaseCoordX] + ld a, [wBaseCoordX] add [hl] ; X offset - ld b,a - ld a,168 + ld b, a + ld a, 168 sub b ; flip X coordinate - ld [de],a ; store X + ld [de], a ; store X inc hl inc de - ld a,[hli] - add a,$31 ; base tile ID for battle animations - ld [de],a ; store tile ID + ld a, [hli] + add $31 ; base tile ID for battle animations + ld [de], a ; store tile ID inc de ; toggle horizontal and vertical flip - ld a,[hli] ; flags + ld a, [hli] ; flags and a - ld b,OAM_VFLIP | OAM_HFLIP - jr z,.storeFlags1 - cp a,OAM_HFLIP - ld b,OAM_VFLIP - jr z,.storeFlags1 - cp a,OAM_VFLIP - ld b,OAM_HFLIP - jr z,.storeFlags1 - ld b,0 + ld b, OAM_VFLIP | OAM_HFLIP + jr z, .storeFlags1 + cp OAM_HFLIP + ld b, OAM_VFLIP + jr z, .storeFlags1 + cp OAM_VFLIP + ld b, OAM_HFLIP + jr z, .storeFlags1 + ld b, 0 .storeFlags1 - ld a,b - ld [de],a + ld a, b + ld [de], a inc de jp .nextTile .flipHorizontalTranslateDown - ld a,[wBaseCoordY] + ld a, [wBaseCoordY] add [hl] - add a,40 ; translate Y coordinate downwards - ld [de],a ; store Y + add 40 ; translate Y coordinate downwards + ld [de], a ; store Y inc hl inc de - ld a,[wBaseCoordX] + ld a, [wBaseCoordX] add [hl] - ld b,a - ld a,168 + ld b, a + ld a, 168 sub b ; flip X coordinate - ld [de],a ; store X + ld [de], a ; store X inc hl inc de - ld a,[hli] - add a,$31 ; base tile ID for battle animations - ld [de],a ; store tile ID + ld a, [hli] + add $31 ; base tile ID for battle animations + ld [de], a ; store tile ID inc de - ld a,[hli] - bit 5,a ; is horizontal flip enabled? - jr nz,.disableHorizontalFlip + ld a, [hli] + bit 5, a ; is horizontal flip enabled? + jr nz, .disableHorizontalFlip .enableHorizontalFlip - set 5,a + set 5, a jr .storeFlags2 .disableHorizontalFlip - res 5,a + res 5, a .storeFlags2 - ld [de],a + ld [de], a inc de .nextTile - ld a,[wFBTileCounter] - ld c,a - ld a,[wNumFBTiles] + ld a, [wFBTileCounter] + ld c, a + ld a, [wNumFBTiles] cp c - jp nz,.loop ; go back up if there are more tiles to draw + jp nz, .loop ; go back up if there are more tiles to draw .afterDrawingTiles - ld a,[wFBMode] - cp a,2 - jr z,.advanceFrameBlockDestAddr; skip delay and don't clean OAM buffer - ld a,[wSubAnimFrameDelay] - ld c,a + ld a, [wFBMode] + cp 2 + jr z, .advanceFrameBlockDestAddr; skip delay and don't clean OAM buffer + ld a, [wSubAnimFrameDelay] + ld c, a call DelayFrames - ld a,[wFBMode] - cp a,3 - jr z,.advanceFrameBlockDestAddr ; skip cleaning OAM buffer - cp a,4 - jr z,.done ; skip cleaning OAM buffer and don't advance the frame block destination address - ld a,[wAnimationID] - cp a,GROWL - jr z,.resetFrameBlockDestAddr + ld a, [wFBMode] + cp 3 + jr z, .advanceFrameBlockDestAddr ; skip cleaning OAM buffer + cp 4 + jr z, .done ; skip cleaning OAM buffer and don't advance the frame block destination address + ld a, [wAnimationID] + cp GROWL + jr z, .resetFrameBlockDestAddr call AnimationCleanOAM .resetFrameBlockDestAddr - ld hl,wOAMBuffer ; OAM buffer - ld a,l - ld [wFBDestAddr + 1],a - ld a,h - ld [wFBDestAddr],a ; set destination address to beginning of OAM buffer + ld hl, wOAMBuffer ; OAM buffer + ld a, l + ld [wFBDestAddr + 1], a + ld a, h + ld [wFBDestAddr], a ; set destination address to beginning of OAM buffer ret .advanceFrameBlockDestAddr - ld a,e - ld [wFBDestAddr + 1],a - ld a,d - ld [wFBDestAddr],a + ld a, e + ld [wFBDestAddr + 1], a + ld a, d + ld [wFBDestAddr], a .done ret PlayAnimation: xor a - ld [$FF8B],a ; it looks like nothing reads this - ld [wSubAnimTransform],a - ld a,[wAnimationID] ; get animation number + ld [$FF8B], a ; it looks like nothing reads this + ld [wSubAnimTransform], a + ld a, [wAnimationID] ; get animation number dec a - ld l,a - ld h,0 - add hl,hl - ld de,AttackAnimationPointers ; animation command stream pointers - add hl,de - ld a,[hli] - ld h,[hl] - ld l,a + ld l, a + ld h, 0 + add hl, hl + ld de, AttackAnimationPointers ; animation command stream pointers + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a .animationLoop - ld a,[hli] - cp a,$FF - jr z,.AnimationOver - cp a,$C0 ; is this subanimation or a special effect? - jr c,.playSubanimation + ld a, [hli] + cp $FF + jr z, .AnimationOver + cp $C0 ; is this subanimation or a special effect? + jr c, .playSubanimation .doSpecialEffect - ld c,a - ld de,SpecialEffectPointers + ld c, a + ld de, SpecialEffectPointers .searchSpecialEffectTableLoop - ld a,[de] + ld a, [de] cp c - jr z,.foundMatch + jr z, .foundMatch inc de inc de inc de jr .searchSpecialEffectTableLoop .foundMatch - ld a,[hli] - cp a,$FF ; is there a sound to play? - jr z,.skipPlayingSound - ld [wAnimSoundID],a ; store sound + ld a, [hli] + cp $FF ; is there a sound to play? + jr z, .skipPlayingSound + ld [wAnimSoundID], a ; store sound push hl push de call GetMoveSound @@ -206,50 +206,50 @@ PlayAnimation: .skipPlayingSound push hl inc de - ld a,[de] - ld l,a + ld a, [de] + ld l, a inc de - ld a,[de] - ld h,a - ld de,.nextAnimationCommand + ld a, [de] + ld h, a + ld de, .nextAnimationCommand push de - jp [hl] ; jump to special effect function + jp hl ; jump to special effect function .playSubanimation - ld c,a - and a,%00111111 - ld [wSubAnimFrameDelay],a + ld c, a + and %00111111 + ld [wSubAnimFrameDelay], a xor a sla c rla sla c rla - ld [wWhichBattleAnimTileset],a - ld a,[hli] ; sound - ld [wAnimSoundID],a ; store sound - ld a,[hli] ; subanimation ID - ld c,l - ld b,h - ld l,a - ld h,0 - add hl,hl - ld de,SubanimationPointers - add hl,de - ld a,l - ld [wSubAnimAddrPtr],a - ld a,h - ld [wSubAnimAddrPtr + 1],a - ld l,c - ld h,b + ld [wWhichBattleAnimTileset], a + ld a, [hli] ; sound + ld [wAnimSoundID], a ; store sound + ld a, [hli] ; subanimation ID + ld c, l + ld b, h + ld l, a + ld h, 0 + add hl, hl + ld de, SubanimationPointers + add hl, de + ld a, l + ld [wSubAnimAddrPtr], a + ld a, h + ld [wSubAnimAddrPtr + 1], a + ld l, c + ld h, b push hl - ld a,[rOBP0] + ld a, [rOBP0] push af - ld a,[wAnimPalette] - ld [rOBP0],a + ld a, [wAnimPalette] + ld [rOBP0], a call LoadAnimationTileset call LoadSubanimation call PlaySubanimation pop af - ld [rOBP0],a + ld [rOBP0], a .nextAnimationCommand pop hl jr .animationLoop @@ -266,22 +266,22 @@ AnimPlaySFX: ret LoadSubanimation: - ld a,[wSubAnimAddrPtr + 1] - ld h,a - ld a,[wSubAnimAddrPtr] - ld l,a - ld a,[hli] - ld e,a - ld a,[hl] - ld d,a ; de = address of subanimation - ld a,[de] - ld b,a - and a,31 - ld [wSubAnimCounter],a ; number of frame blocks - ld a,b - and a,%11100000 - cp a,5 << 5 ; is subanimation type 5? - jr nz,.isNotType5 + ld a, [wSubAnimAddrPtr + 1] + ld h, a + ld a, [wSubAnimAddrPtr] + ld l, a + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a ; de = address of subanimation + ld a, [de] + ld b, a + and 31 + ld [wSubAnimCounter], a ; number of frame blocks + ld a, b + and %11100000 + cp 5 << 5 ; is subanimation type 5? + jr nz, .isNotType5 .isType5 call GetSubanimationTransform2 jr .saveTransformation @@ -291,35 +291,35 @@ LoadSubanimation: ; place the upper 3 bits of a into bits 0-2 of a before storing srl a swap a - ld [wSubAnimTransform],a - cp a,4 ; is the animation reversed? - ld hl,0 - jr nz,.storeSubentryAddr + ld [wSubAnimTransform], a + cp 4 ; is the animation reversed? + ld hl, 0 + jr nz, .storeSubentryAddr ; if the animation is reversed, then place the initial subentry address at the end of the list of subentries - ld a,[wSubAnimCounter] + ld a, [wSubAnimCounter] dec a - ld bc,3 + ld bc, 3 .loop - add hl,bc + add hl, bc dec a - jr nz,.loop + jr nz, .loop .storeSubentryAddr inc de - add hl,de - ld a,l - ld [wSubAnimSubEntryAddr],a - ld a,h - ld [wSubAnimSubEntryAddr + 1],a + add hl, de + ld a, l + ld [wSubAnimSubEntryAddr], a + ld a, h + ld [wSubAnimSubEntryAddr + 1], a ret ; called if the subanimation type is not 5 ; sets the transform to 0 (i.e. no transform) if it's the player's turn ; sets the transform to the subanimation type if it's the enemy's turn GetSubanimationTransform1: - ld b,a - ld a,[H_WHOSETURN] + ld b, a + ld a, [H_WHOSETURN] and a - ld a,b + ld a, b ret nz xor a ret @@ -328,32 +328,32 @@ GetSubanimationTransform1: ; sets the transform to 2 (i.e. horizontal and vertical flip) if it's the player's turn ; sets the transform to 0 (i.e. no transform) if it's the enemy's turn GetSubanimationTransform2: - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] and a - ld a,2 << 5 + ld a, 2 << 5 ret z xor a ret ; loads tile patterns for battle animations LoadAnimationTileset: - ld a,[wWhichBattleAnimTileset] + ld a, [wWhichBattleAnimTileset] add a add a - ld hl,AnimationTilesetPointers - ld e,a - ld d,0 - add hl,de - ld a,[hli] - ld [wTempTilesetNumTiles],a ; number of tiles - ld a,[hli] - ld e,a - ld a,[hl] - ld d,a ; de = address of tileset - ld hl,vSprites + $310 + ld hl, AnimationTilesetPointers + ld e, a + ld d, 0 + add hl, de + ld a, [hli] + ld [wTempTilesetNumTiles], a ; number of tiles + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a ; de = address of tileset + ld hl, vSprites + $310 ld b, BANK(AnimationTileset1) ; ROM bank - ld a,[wTempTilesetNumTiles] - ld c,a ; number of tiles + ld a, [wTempTilesetNumTiles] + ld c, a ; number of tiles jp CopyVideoData ; load tileset AnimationTilesetPointers: @@ -390,12 +390,12 @@ MoveAnimation: push af call WaitForSoundToFinish call SetAnimationPalette - ld a,[wAnimationID] + ld a, [wAnimationID] and a jr z, .animationFinished ; if throwing a Poké Ball, skip the regular animation code - cp a,TOSS_ANIM + cp TOSS_ANIM jr nz, .moveAnimation ld de, .animationFinished push de @@ -403,25 +403,25 @@ MoveAnimation: .moveAnimation ; check if battle animations are disabled in the options - ld a,[wOptions] - bit 7,a + ld a, [wOptions] + bit 7, a jr nz, .animationsDisabled call ShareMoveAnimations call PlayAnimation jr .next4 .animationsDisabled - ld c,30 + ld c, 30 call DelayFrames .next4 call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage) .animationFinished call WaitForSoundToFinish xor a - ld [wSubAnimSubEntryAddr],a - ld [wUnusedD09B],a - ld [wSubAnimTransform],a + ld [wSubAnimSubEntryAddr], a + ld [wUnusedD09B], a + ld [wSubAnimTransform], a dec a - ld [wAnimSoundID],a + ld [wAnimSoundID], a pop af pop bc pop de @@ -430,43 +430,43 @@ MoveAnimation: ShareMoveAnimations: ; some moves just reuse animations from status conditions - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] and a ret z ; opponent’s turn - ld a,[wAnimationID] + ld a, [wAnimationID] - cp a,AMNESIA - ld b,CONF_ANIM + cp AMNESIA + ld b, CONF_ANIM jr z, .replaceAnim - cp a,REST - ld b,SLP_ANIM + cp REST + ld b, SLP_ANIM ret nz .replaceAnim - ld a,b - ld [wAnimationID],a + ld a, b + ld [wAnimationID], a ret PlayApplyingAttackAnimation: ; Generic animation that shows after the move's individual animation ; Different animation depending on whether the move has an additional effect and on whose turn it is - ld a,[wAnimationType] + ld a, [wAnimationType] and a ret z dec a add a - ld c,a - ld b,0 - ld hl,AnimationTypePointerTable - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a - jp [hl] + ld c, a + ld b, 0 + ld hl, AnimationTypePointerTable + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + jp hl AnimationTypePointerTable: dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect @@ -556,69 +556,69 @@ SetAnimationPalette: ret PlaySubanimation: - ld a,[wAnimSoundID] - cp a,$FF - jr z,.skipPlayingSound + ld a, [wAnimSoundID] + cp $FF + jr z, .skipPlayingSound call GetMoveSound call nc, AnimPlaySFX .skipPlayingSound - ld hl,wOAMBuffer ; base address of OAM buffer - ld a,l - ld [wFBDestAddr + 1],a - ld a,h - ld [wFBDestAddr],a - ld a,[wSubAnimSubEntryAddr + 1] - ld h,a - ld a,[wSubAnimSubEntryAddr] - ld l,a + ld hl, wOAMBuffer ; base address of OAM buffer + ld a, l + ld [wFBDestAddr + 1], a + ld a, h + ld [wFBDestAddr], a + ld a, [wSubAnimSubEntryAddr + 1] + ld h, a + ld a, [wSubAnimSubEntryAddr] + ld l, a .loop push hl - ld c,[hl] ; frame block ID - ld b,0 - ld hl,FrameBlockPointers - add hl,bc - add hl,bc - ld a,[hli] - ld c,a - ld a,[hli] - ld b,a + ld c, [hl] ; frame block ID + ld b, 0 + ld hl, FrameBlockPointers + add hl, bc + add hl, bc + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a pop hl inc hl push hl - ld e,[hl] ; base coordinate ID - ld d,0 - ld hl,FrameBlockBaseCoords ; base coordinate table - add hl,de - add hl,de - ld a,[hli] - ld [wBaseCoordY],a - ld a,[hl] - ld [wBaseCoordX],a + ld e, [hl] ; base coordinate ID + ld d, 0 + ld hl, FrameBlockBaseCoords ; base coordinate table + add hl, de + add hl, de + ld a, [hli] + ld [wBaseCoordY], a + ld a, [hl] + ld [wBaseCoordX], a pop hl inc hl - ld a,[hl] ; frame block mode - ld [wFBMode],a + ld a, [hl] ; frame block mode + ld [wFBMode], a call DrawFrameBlock call DoSpecialEffectByAnimationId ; run animation-specific function (if there is one) - ld a,[wSubAnimCounter] + ld a, [wSubAnimCounter] dec a - ld [wSubAnimCounter],a + ld [wSubAnimCounter], a ret z - ld a,[wSubAnimSubEntryAddr + 1] - ld h,a - ld a,[wSubAnimSubEntryAddr] - ld l,a - ld a,[wSubAnimTransform] - cp a,4 ; is the animation reversed? - ld bc,3 - jr nz,.nextSubanimationSubentry - ld bc,-3 + ld a, [wSubAnimSubEntryAddr + 1] + ld h, a + ld a, [wSubAnimSubEntryAddr] + ld l, a + ld a, [wSubAnimTransform] + cp 4 ; is the animation reversed? + ld bc, 3 + jr nz, .nextSubanimationSubentry + ld bc, -3 .nextSubanimationSubentry - add hl,bc - ld a,h - ld [wSubAnimSubEntryAddr + 1],a - ld a,l - ld [wSubAnimSubEntryAddr],a + add hl, bc + ld a, h + ld [wSubAnimSubEntryAddr + 1], a + ld a, l + ld [wSubAnimSubEntryAddr], a jp .loop AnimationCleanOAM: @@ -640,18 +640,18 @@ DoSpecialEffectByAnimationId: push hl push de push bc - ld a,[wAnimationID] - ld hl,AnimationIdSpecialEffects - ld de,3 + ld a, [wAnimationID] + ld hl, AnimationIdSpecialEffects + ld de, 3 call IsInArray - jr nc,.done + jr nc, .done inc hl - ld a,[hli] - ld h,[hl] - ld l,a - ld de,.done + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .done push de - jp [hl] + jp hl .done pop bc pop de @@ -735,38 +735,38 @@ AnimationIdSpecialEffects: db $FF ; terminator DoBallTossSpecialEffects: - ld a,[wcf91] - cp a,3 ; is it a Master Ball or Ultra Ball? - jr nc,.skipFlashingEffect + ld a, [wcf91] + cp 3 ; is it a Master Ball or Ultra Ball? + jr nc, .skipFlashingEffect .flashingEffect ; do a flashing effect if it's Master Ball or Ultra Ball - ld a,[rOBP0] - xor a,%00111100 ; complement colors 1 and 2 - ld [rOBP0],a + ld a, [rOBP0] + xor %00111100 ; complement colors 1 and 2 + ld [rOBP0], a .skipFlashingEffect - ld a,[wSubAnimCounter] - cp a,11 ; is it the beginning of the subanimation? - jr nz,.skipPlayingSound + ld a, [wSubAnimCounter] + cp 11 ; is it the beginning of the subanimation? + jr nz, .skipPlayingSound ; if it is the beginning of the subanimation, play a sound - ld a,SFX_BALL_TOSS + ld a, SFX_BALL_TOSS call PlaySound .skipPlayingSound - ld a,[wIsInBattle] - cp a,02 ; is it a trainer battle? - jr z,.isTrainerBattle - ld a,[wd11e] - cp a,$10 ; is the enemy pokemon the Ghost Marowak? + ld a, [wIsInBattle] + cp 02 ; is it a trainer battle? + jr z, .isTrainerBattle + ld a, [wd11e] + cp $10 ; is the enemy pokemon the Ghost Marowak? ret nz ; if the enemy pokemon is the Ghost Marowak, make it dodge during the last 3 frames - ld a,[wSubAnimCounter] - cp a,3 - jr z,.moveGhostMarowakLeft - cp a,2 - jr z,.moveGhostMarowakLeft - cp a,1 + ld a, [wSubAnimCounter] + cp 3 + jr z, .moveGhostMarowakLeft + cp 2 + jr z, .moveGhostMarowakLeft + cp 1 ret nz .moveGhostMarowakLeft coord hl, 17, 0 - ld de,20 + ld de, 20 lb bc, 7, 7 .loop push hl @@ -774,152 +774,152 @@ DoBallTossSpecialEffects: call AnimCopyRowRight ; move row of tiles left pop bc pop hl - add hl,de + add hl, de dec b - jr nz,.loop - ld a,%00001000 - ld [rNR10],a ; Channel 1 sweep register + jr nz, .loop + ld a, %00001000 + ld [rNR10], a ; Channel 1 sweep register ret .isTrainerBattle ; if it's a trainer battle, shorten the animation by one frame - ld a,[wSubAnimCounter] - cp a,3 + ld a, [wSubAnimCounter] + cp 3 ret nz dec a - ld [wSubAnimCounter],a + ld [wSubAnimCounter], a ret DoBallShakeSpecialEffects: - ld a,[wSubAnimCounter] - cp a,4 ; is it the beginning of a shake? - jr nz,.skipPlayingSound + ld a, [wSubAnimCounter] + cp 4 ; is it the beginning of a shake? + jr nz, .skipPlayingSound ; if it is the beginning of a shake, play a sound and wait 2/3 of a second - ld a,SFX_TINK + ld a, SFX_TINK call PlaySound - ld c,40 + ld c, 40 call DelayFrames .skipPlayingSound - ld a,[wSubAnimCounter] + ld a, [wSubAnimCounter] dec a ret nz ; if it's the end of the ball shaking subanimation, check if more shakes are left and restart the subanimation - ld a,[wNumShakes] ; number of shakes + ld a, [wNumShakes] ; number of shakes dec a ; decrement number of shakes - ld [wNumShakes],a + ld [wNumShakes], a ret z ; if there are shakes left, restart the subanimation - ld a,[wSubAnimSubEntryAddr] - ld l,a - ld a,[wSubAnimSubEntryAddr + 1] - ld h,a - ld de,-(4 * 3) ; 4 subentries and 3 bytes per subentry - add hl,de - ld a,l - ld [wSubAnimSubEntryAddr],a - ld a,h - ld [wSubAnimSubEntryAddr + 1],a - ld a,5 ; number of subentries in the ball shaking subanimation plus one - ld [wSubAnimCounter],a + ld a, [wSubAnimSubEntryAddr] + ld l, a + ld a, [wSubAnimSubEntryAddr + 1] + ld h, a + ld de, -(4 * 3) ; 4 subentries and 3 bytes per subentry + add hl, de + ld a, l + ld [wSubAnimSubEntryAddr], a + ld a, h + ld [wSubAnimSubEntryAddr + 1], a + ld a, 5 ; number of subentries in the ball shaking subanimation plus one + ld [wSubAnimCounter], a ret ; plays a sound after the second frame of the poof animation DoPoofSpecialEffects: - ld a,[wSubAnimCounter] - cp a,5 + ld a, [wSubAnimCounter] + cp 5 ret nz - ld a,SFX_BALL_POOF + ld a, SFX_BALL_POOF jp PlaySound DoRockSlideSpecialEffects: - ld a,[wSubAnimCounter] - cp a,12 + ld a, [wSubAnimCounter] + cp 12 ret nc - cp a,8 - jr nc,.shakeScreen - cp a,1 - jp z,AnimationFlashScreen ; if it's the end of the subanimation, flash the screen + cp 8 + jr nc, .shakeScreen + cp 1 + jp z, AnimationFlashScreen ; if it's the end of the subanimation, flash the screen ret -; if the subaninmation counter is between 8 and 11, shake the screen horizontally and vertically +; if the subanimation counter is between 8 and 11, shake the screen horizontally and vertically .shakeScreen - ld b,1 + ld b, 1 predef PredefShakeScreenHorizontally ; shake horizontally - ld b,1 + ld b, 1 predef_jump PredefShakeScreenVertically ; shake vertically FlashScreenEveryEightFrameBlocks: - ld a,[wSubAnimCounter] - and a,7 ; is the subanimation counter exactly 8? - call z,AnimationFlashScreen ; if so, flash the screen + ld a, [wSubAnimCounter] + and 7 ; is the subanimation counter exactly 8? + call z, AnimationFlashScreen ; if so, flash the screen ret ; flashes the screen if the subanimation counter is divisible by 4 FlashScreenEveryFourFrameBlocks: - ld a,[wSubAnimCounter] - and a,3 - call z,AnimationFlashScreen + ld a, [wSubAnimCounter] + and 3 + call z, AnimationFlashScreen ret ; used for Explosion and Selfdestruct DoExplodeSpecialEffects: - ld a,[wSubAnimCounter] - cp a,1 ; is it the end of the subanimation? - jr nz,FlashScreenEveryFourFrameBlocks + ld a, [wSubAnimCounter] + cp 1 ; is it the end of the subanimation? + jr nz, FlashScreenEveryFourFrameBlocks ; if it's the end of the subanimation, make the attacking pokemon disappear coord hl, 1, 5 jp AnimationHideMonPic ; make pokemon disappear ; flashes the screen when subanimation counter is 1 modulo 4 DoBlizzardSpecialEffects: - ld a,[wSubAnimCounter] - cp a,13 - jp z,AnimationFlashScreen - cp a,9 - jp z,AnimationFlashScreen - cp a,5 - jp z,AnimationFlashScreen - cp a,1 - jp z,AnimationFlashScreen + ld a, [wSubAnimCounter] + cp 13 + jp z, AnimationFlashScreen + cp 9 + jp z, AnimationFlashScreen + cp 5 + jp z, AnimationFlashScreen + cp 1 + jp z, AnimationFlashScreen ret ; flashes the screen at 3 points in the subanimation ; unused FlashScreenUnused: - ld a,[wSubAnimCounter] - cp a,14 - jp z,AnimationFlashScreen - cp a,9 - jp z,AnimationFlashScreen - cp a,2 - jp z,AnimationFlashScreen + ld a, [wSubAnimCounter] + cp 14 + jp z, AnimationFlashScreen + cp 9 + jp z, AnimationFlashScreen + cp 2 + jp z, AnimationFlashScreen ret ; function to make the pokemon disappear at the beginning of the animation TradeHidePokemon: - ld a,[wSubAnimCounter] - cp a,6 + ld a, [wSubAnimCounter] + cp 6 ret nz - ld a,2 * SCREEN_WIDTH + 7 + ld a, 2 * SCREEN_WIDTH + 7 jp ClearMonPicFromTileMap ; make pokemon disappear ; function to make a shaking pokeball jump up at the end of the animation TradeShakePokeball: - ld a,[wSubAnimCounter] - cp a,1 + ld a, [wSubAnimCounter] + cp 1 ret nz ; if it's the end of the animation, make the ball jump up - ld de,BallMoveDistances1 + ld de, BallMoveDistances1 .loop - ld hl,wOAMBuffer ; OAM buffer - ld bc,4 + ld hl, wOAMBuffer ; OAM buffer + ld bc, 4 .innerLoop - ld a,[de] - cp a,$ff - jr z,.done + ld a, [de] + cp $ff + jr z, .done add [hl] ; add to Y value of OAM entry - ld [hl],a - add hl,bc - ld a,l - cp a,4 * 4 ; there are 4 entries, each 4 bytes - jr nz,.innerLoop + ld [hl], a + add hl, bc + ld a, l + cp 4 * 4 ; there are 4 entries, each 4 bytes + jr nz, .innerLoop inc de push bc call Delay3 @@ -927,7 +927,7 @@ TradeShakePokeball: jr .loop .done call AnimationCleanOAM - ld a,SFX_TRADE_MACHINE + ld a, SFX_TRADE_MACHINE jp PlaySound BallMoveDistances1: @@ -936,38 +936,38 @@ BallMoveDistances1: ; function to make the pokeball jump up TradeJumpPokeball: - ld de,BallMoveDistances2 + ld de, BallMoveDistances2 .loop - ld hl,wOAMBuffer ; OAM buffer - ld bc,4 + ld hl, wOAMBuffer ; OAM buffer + ld bc, 4 .innerLoop - ld a,[de] - cp a,$ff - jp z,ClearScreen + ld a, [de] + cp $ff + jp z, ClearScreen add [hl] - ld [hl],a - add hl,bc - ld a,l - cp a,4 * 4 ; there are 4 entries, each 4 bytes - jr nz,.innerLoop + ld [hl], a + add hl, bc + ld a, l + cp 4 * 4 ; there are 4 entries, each 4 bytes + jr nz, .innerLoop inc de push de - ld a,[de] - cp a,12 - jr z,.playSound - cp a,$ff - jr nz,.skipPlayingSound + ld a, [de] + cp 12 + jr z, .playSound + cp $ff + jr nz, .skipPlayingSound .playSound ; play sound if next move distance is 12 or this is the last one - ld a,SFX_BATTLE_18 + ld a, SFX_BATTLE_18 call PlaySound .skipPlayingSound push bc - ld c,5 + ld c, 5 call DelayFrames pop bc - ld a,[hSCX] ; background scroll X - sub a,8 ; scroll to the left - ld [hSCX],a + ld a, [hSCX] ; background scroll X + sub 8 ; scroll to the left + ld [hSCX], a pop de jr .loop @@ -978,20 +978,20 @@ BallMoveDistances2: ; this function copies the current musical note graphic ; so that there are two musical notes flying towards the defending pokemon DoGrowlSpecialEffects: - ld hl,wOAMBuffer ; OAM buffer - ld de,wOAMBuffer + $10 - ld bc,$10 + ld hl, wOAMBuffer ; OAM buffer + ld de, wOAMBuffer + $10 + ld bc, $10 call CopyData ; copy the musical note graphic - ld a,[wSubAnimCounter] + ld a, [wSubAnimCounter] dec a - call z,AnimationCleanOAM ; clean up at the end of the subanimation + call z, AnimationCleanOAM ; clean up at the end of the subanimation ret ; this is associated with Tail Whip, but Tail Whip doesn't use any subanimations TailWhipAnimationUnused: - ld a,1 - ld [wSubAnimCounter],a - ld c,20 + ld a, 1 + ld [wSubAnimCounter], a + ld c, 20 jp DelayFrames ; Format: Special Effect ID (1 byte), Address (2 bytes) @@ -1077,48 +1077,48 @@ SpecialEffectPointers: db $FF AnimationDelay10: - ld c,10 + ld c, 10 jp DelayFrames ; calls a function with the turn flipped from player to enemy or vice versa ; input - hl - address of function to call CallWithTurnFlipped: - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] push af - xor a,1 - ld [H_WHOSETURN],a - ld de,.returnAddress + xor 1 + ld [H_WHOSETURN], a + ld de, .returnAddress push de - jp [hl] + jp hl .returnAddress pop af - ld [H_WHOSETURN],a + ld [H_WHOSETURN], a ret ; flashes the screen for an extended period (48 frames) AnimationFlashScreenLong: - ld a,3 ; cycle through the palettes 3 times - ld [wFlashScreenLongCounter],a - ld a,[wOnSGB] ; running on SGB? + ld a, 3 ; cycle through the palettes 3 times + ld [wFlashScreenLongCounter], a + ld a, [wOnSGB] ; running on SGB? and a - ld hl,FlashScreenLongMonochrome - jr z,.loop - ld hl,FlashScreenLongSGB + ld hl, FlashScreenLongMonochrome + jr z, .loop + ld hl, FlashScreenLongSGB .loop push hl .innerLoop - ld a,[hli] - cp a,$01 ; is it the end of the palettes? - jr z,.endOfPalettes - ld [rBGP],a + ld a, [hli] + cp $01 ; is it the end of the palettes? + jr z, .endOfPalettes + ld [rBGP], a call FlashScreenLongDelay jr .innerLoop .endOfPalettes - ld a,[wFlashScreenLongCounter] + ld a, [wFlashScreenLongCounter] dec a - ld [wFlashScreenLongCounter],a + ld [wFlashScreenLongCounter], a pop hl - jr nz,.loop + jr nz, .loop ret ; BG palettes @@ -1156,31 +1156,31 @@ FlashScreenLongSGB: ; causes a delay of 2 frames for the first cycle ; causes a delay of 1 frame for the second and third cycles FlashScreenLongDelay: - ld a,[wFlashScreenLongCounter] - cp a,4 ; never true since [wFlashScreenLongCounter] starts at 3 - ld c,4 - jr z,.delayFrames - cp a,3 - ld c,2 - jr z,.delayFrames - cp a,2 ; nothing is done with this - ld c,1 + ld a, [wFlashScreenLongCounter] + cp 4 ; never true since [wFlashScreenLongCounter] starts at 3 + ld c, 4 + jr z, .delayFrames + cp 3 + ld c, 2 + jr z, .delayFrames + cp 2 ; nothing is done with this + ld c, 1 .delayFrames jp DelayFrames AnimationFlashScreen: - ld a,[rBGP] + ld a, [rBGP] push af ; save initial palette - ld a,%00011011 ; 0, 1, 2, 3 (inverted colors) - ld [rBGP],a - ld c,2 + ld a, %00011011 ; 0, 1, 2, 3 (inverted colors) + ld [rBGP], a + ld c, 2 call DelayFrames xor a ; white out background - ld [rBGP],a - ld c,2 + ld [rBGP], a + ld c, 2 call DelayFrames pop af - ld [rBGP],a ; restore initial palette + ld [rBGP], a ; restore initial palette ret AnimationDarkScreenPalette: @@ -1525,7 +1525,7 @@ AnimationShowMonPic: jp Delay3 AnimationShowEnemyMonPic: -; Shows the emenmy mon's front sprite. Used in animations like Seismic Toss +; Shows the enemy mon's front sprite. Used in animations like Seismic Toss ; to make the mon's sprite reappear after disappears offscreen. ld hl, AnimationShowMonPic jp CallWithTurnFlipped @@ -2110,7 +2110,7 @@ HideSubstituteShowMonAnim: .next1 push hl ; if the substitute broke, slide it down, else slide it offscreen horizontally - bit HasSubstituteUp, a + bit HAS_SUBSTITUTE_UP, a jr nz, .substituteStillUp call AnimationSlideMonDown jr .next2 @@ -2319,23 +2319,23 @@ GetMoveSoundB: ret GetMoveSound: - ld hl,MoveSoundTable - ld e,a - ld d,0 - add hl,de - add hl,de - add hl,de - ld a,[hli] - ld b,a + ld hl, MoveSoundTable + ld e, a + ld d, 0 + add hl, de + add hl, de + add hl, de + ld a, [hli] + ld b, a call IsCryMove - jr nc,.NotCryMove - ld a,[H_WHOSETURN] + jr nc, .NotCryMove + ld a, [H_WHOSETURN] and a - jr nz,.next - ld a,[wBattleMonSpecies] ; get number of current monster + jr nz, .next + ld a, [wBattleMonSpecies] ; get number of current monster jr .Continue .next - ld a,[wEnemyMonSpecies] + ld a, [wEnemyMonSpecies] .Continue push af ld a, 1 @@ -2349,32 +2349,32 @@ GetMoveSound: ret ;push hl ;call GetCryData - ;ld b,a + ;ld b, a ;pop hl - ;ld a,[wFrequencyModifier] + ;ld a, [wFrequencyModifier] ;add [hl] - ;ld [wFrequencyModifier],a + ;ld [wFrequencyModifier], a ;inc hl - ;ld a,[wTempoModifier] + ;ld a, [wTempoModifier] ;add [hl] - ;ld [wTempoModifier],a + ;ld [wTempoModifier], a ;jr .done .NotCryMove - ld a,[hli] - ld [wFrequencyModifier],a - ld a,[hli] - ld [wTempoModifier],a + ld a, [hli] + ld [wFrequencyModifier], a + ld a, [hli] + ld [wTempoModifier], a .done - ld a,b + ld a, b ret IsCryMove: ; set carry if the move animation involves playing a monster cry - ld a,[wAnimationID] - cp a,GROWL - jr z,.CryMove - cp a,ROAR - jr z,.CryMove + ld a, [wAnimationID] + cp GROWL + jr z, .CryMove + cp ROAR + jr z, .CryMove and a ; clear carry ret .CryMove @@ -2970,46 +2970,46 @@ BattleAnimCopyTileMapToVRAM: jp Delay3 TossBallAnimation: - ld a,[wIsInBattle] - cp a,2 - jr z,.BlockBall ; if in trainer battle, play different animation - ld a,[wPokeBallAnimData] - ld b,a + ld a, [wIsInBattle] + cp 2 + jr z, .BlockBall ; if in trainer battle, play different animation + ld a, [wPokeBallAnimData] + ld b, a ; upper nybble: how many animations (from PokeBallAnimations) to play ; this will be 4 for successful capture, 6 for breakout - and a,$F0 + and $F0 swap a - ld c,a + ld c, a ; lower nybble: number of shakes ; store these for later - ld a,b - and a,$F - ld [wNumShakes],a + ld a, b + and $F + ld [wNumShakes], a - ld hl,.PokeBallAnimations + ld hl, .PokeBallAnimations ; choose which toss animation to use - ld a,[wcf91] - cp a,POKE_BALL - ld b,TOSS_ANIM - jr z,.done - cp a,GREAT_BALL - ld b,GREATTOSS_ANIM - jr z,.done - ld b,ULTRATOSS_ANIM + ld a, [wcf91] + cp POKE_BALL + ld b, TOSS_ANIM + jr z, .done + cp GREAT_BALL + ld b, GREATTOSS_ANIM + jr z, .done + ld b, ULTRATOSS_ANIM .done - ld a,b + ld a, b .PlayNextAnimation - ld [wAnimationID],a + ld [wAnimationID], a push bc push hl call PlayAnimation pop hl - ld a,[hli] + ld a, [hli] pop bc dec c - jr nz,.PlayNextAnimation + jr nz, .PlayNextAnimation ret .PokeBallAnimations: @@ -3017,13 +3017,13 @@ TossBallAnimation: db POOF_ANIM,HIDEPIC_ANIM,SHAKE_ANIM,POOF_ANIM,SHOWPIC_ANIM .BlockBall - ld a,TOSS_ANIM - ld [wAnimationID],a + ld a, TOSS_ANIM + ld [wAnimationID], a call PlayAnimation - ld a,SFX_FAINT_THUD + ld a, SFX_FAINT_THUD call PlaySound - ld a,BLOCKBALL_ANIM - ld [wAnimationID],a + ld a, BLOCKBALL_ANIM + ld [wAnimationID], a jp PlayAnimation PlayApplyingAttackSound: diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index 9e02c56f..985a1eb2 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -62,7 +62,7 @@ BattleTransition: ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; the three GetBattleTransitionID functions set the first ; three bits of c, which determines what transition animation diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 3085ff60..068ef449 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -381,15 +381,15 @@ MainInBattleLoop: xor a ld [wFirstMonsNotOutYet], a ld a, [wPlayerBattleStatus2] - and (1 << NeedsToRecharge) | (1 << UsingRage) ; check if the player is using Rage or needs to recharge + and (1 << NEEDS_TO_RECHARGE) | (1 << USING_RAGE) ; 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, wEnemyBattleStatus1 - res Flinched, [hl] ; reset flinch bit + res FLINCHED, [hl] ; reset flinch bit ld hl, wPlayerBattleStatus1 - res Flinched, [hl] ; reset flinch bit + res FLINCHED, [hl] ; reset flinch bit ld a, [hl] - and (1 << ThrashingAbout) | (1 << ChargingUp) ; check if the player is thrashing about or charging for an attack + and (1 << THRASHING_ABOUT) | (1 << CHARGING_UP) ; 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 @@ -401,12 +401,12 @@ MainInBattleLoop: and (1 << FRZ) | SLP ; is mon frozen or asleep? jr nz, .selectEnemyMove ; if so, jump ld a, [wPlayerBattleStatus1] - and (1 << StoringEnergy) | (1 << UsingTrappingMove) ; check player is using Bide or using a multi-turn attack like wrap + and (1 << STORING_ENERGY) | (1 << USING_TRAPPING_MOVE) ; check player is using Bide or using a multi-turn attack like wrap jr nz, .selectEnemyMove ; if so, jump ld a, [wEnemyBattleStatus1] - bit UsingTrappingMove, a ; check if enemy is using a multi-turn attack like wrap + bit USING_TRAPPING_MOVE, 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 +; enemy is using a multi-turn attack like wrap, so player is trapped and cannot execute a move ld a, $ff ld [wPlayerSelectedMove], a jr .selectEnemyMove @@ -442,7 +442,7 @@ MainInBattleLoop: jr c, .noLinkBattle ; the link battle enemy has switched mons ld a, [wPlayerBattleStatus1] - bit UsingTrappingMove, a ; check if using multi-turn move like Wrap + bit USING_TRAPPING_MOVE, a ; check if using multi-turn move like Wrap jr z, .specialMoveNotUsed ld a, [wPlayerMoveListIndex] ld hl, wBattleMonMoves @@ -579,7 +579,7 @@ HandlePoisonBurnLeechSeed: call PrintText xor a ld [wAnimationType], a - ld a,BURN_PSN_ANIM + ld a, BURN_PSN_ANIM call PlayMoveAnimation ; play burn/poison animation pop hl call HandlePoisonBurnLeechSeed_DecreaseOwnHP @@ -600,7 +600,7 @@ HandlePoisonBurnLeechSeed: ld [H_WHOSETURN], a xor a ld [wAnimationType], a - ld a,ABSORB + ld a, ABSORB call PlayMoveAnimation ; play leech seed animation (from opposing mon) pop af ld [H_WHOSETURN], a @@ -667,7 +667,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ld hl, wEnemyBattleStatus3 ld de, wEnemyToxicCounter .playersTurn - bit BadlyPoisoned, [hl] + bit BADLY_POISONED, [hl] jr z, .noToxic ld a, [de] ; increment toxic counter inc a @@ -704,7 +704,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ret ; adds bc to enemy HP -; bc isn't updated if HP substracted was capped to prevent overkill +; bc isn't updated if HP subtracted was capped to prevent overkill HandlePoisonBurnLeechSeed_IncreaseEnemyHP: push hl ld hl, wEnemyMonMaxHP @@ -776,14 +776,14 @@ CheckNumAttacksLeft: jr nz, .checkEnemy ; player has 0 attacks left ld hl, wPlayerBattleStatus1 - res UsingTrappingMove, [hl] ; player not using multi-turn attack like wrap any more + res USING_TRAPPING_MOVE, [hl] ; player not using multi-turn attack like wrap any more .checkEnemy ld a, [wEnemyNumAttacksLeft] and a ret nz ; enemy has 0 attacks left ld hl, wEnemyBattleStatus1 - res UsingTrappingMove, [hl] ; enemy not using multi-turn attack like wrap any more + res USING_TRAPPING_MOVE, [hl] ; enemy not using multi-turn attack like wrap any more ret HandleEnemyMonFainted: @@ -833,7 +833,7 @@ FaintEnemyPokemon: ld [hl], a .wild ld hl, wPlayerBattleStatus1 - res AttackingMultipleTimes, [hl] + res ATTACKING_MULTIPLE_TIMES, [hl] ; Bug. This only zeroes the high byte of the player's accumulated damage, ; setting the accumulated damage to itself mod 256 instead of 0 as was probably ; intended. That alone is problematic, but this mistake has another more severe @@ -1218,7 +1218,7 @@ ChooseNextMon: ret ; 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) +; prints appropriate lose message, sets carry flag if player blacked out (special case for initial rival fight) HandlePlayerBlackOut: ld a, [wLinkState] cp LINK_STATE_BATTLING @@ -1363,138 +1363,138 @@ SlideTrainerPicOffScreen: ; send out a trainer's mon EnemySendOut: - ld hl,wPartyGainExpFlags + ld hl, wPartyGainExpFlags xor a - ld [hl],a - ld a,[wPlayerMonNumber] - ld c,a - ld b,FLAG_SET + ld [hl], a + ld a, [wPlayerMonNumber] + ld c, a + ld b, FLAG_SET push bc predef FlagActionPredef - ld hl,wPartyFoughtCurrentEnemyFlags + ld hl, wPartyFoughtCurrentEnemyFlags xor a - ld [hl],a + ld [hl], a pop bc predef FlagActionPredef ; don't change wPartyGainExpFlags or wPartyFoughtCurrentEnemyFlags EnemySendOutFirstMon: xor a - ld hl,wEnemyStatsToDouble ; clear enemy statuses - ld [hli],a - ld [hli],a - ld [hli],a - ld [hli],a - ld [hl],a - ld [wEnemyDisabledMove],a - ld [wEnemyDisabledMoveNumber],a - ld [wEnemyMonMinimized],a - ld hl,wPlayerUsedMove - ld [hli],a - ld [hl],a + ld hl, wEnemyStatsToDouble ; clear enemy statuses + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld [wEnemyDisabledMove], a + ld [wEnemyDisabledMoveNumber], a + ld [wEnemyMonMinimized], a + ld hl, wPlayerUsedMove + ld [hli], a + ld [hl], a dec a - ld [wAICount],a - ld hl,wPlayerBattleStatus1 - res 5,[hl] + ld [wAICount], a + ld hl, wPlayerBattleStatus1 + res 5, [hl] coord hl, 18, 0 - ld a,8 + ld a, 8 call SlideTrainerPicOffScreen call PrintEmptyString call SaveScreenTilesToBuffer1 - ld a,[wLinkState] + ld a, [wLinkState] cp LINK_STATE_BATTLING - jr nz,.next - ld a,[wSerialExchangeNybbleReceiveData] + jr nz, .next + ld a, [wSerialExchangeNybbleReceiveData] sub 4 - ld [wWhichPokemon],a + ld [wWhichPokemon], a jr .next3 .next - ld b,$FF + ld b, $FF .next2 inc b - ld a,[wEnemyMonPartyPos] + ld a, [wEnemyMonPartyPos] cp b - jr z,.next2 - ld hl,wEnemyMon1 - ld a,b - ld [wWhichPokemon],a + jr z, .next2 + ld hl, wEnemyMon1 + ld a, b + ld [wWhichPokemon], a push bc - ld bc,wEnemyMon2 - wEnemyMon1 + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes pop bc inc hl - ld a,[hli] - ld c,a - ld a,[hl] + ld a, [hli] + ld c, a + ld a, [hl] or c - jr z,.next2 + jr z, .next2 .next3 - ld a,[wWhichPokemon] - ld hl,wEnemyMon1Level - ld bc,wEnemyMon2 - wEnemyMon1 + ld a, [wWhichPokemon] + ld hl, wEnemyMon1Level + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes - ld a,[hl] - ld [wCurEnemyLVL],a - ld a,[wWhichPokemon] + ld a, [hl] + ld [wCurEnemyLVL], a + ld a, [wWhichPokemon] inc a - ld hl,wEnemyPartyCount - ld c,a - ld b,0 - add hl,bc - ld a,[hl] - ld [wEnemyMonSpecies2],a - ld [wcf91],a + ld hl, wEnemyPartyCount + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wEnemyMonSpecies2], a + ld [wcf91], a call LoadEnemyMonData - ld hl,wEnemyMonHP - ld a,[hli] - ld [wLastSwitchInEnemyMonHP],a - ld a,[hl] - ld [wLastSwitchInEnemyMonHP + 1],a - ld a,1 - ld [wCurrentMenuItem],a - ld a,[wFirstMonsNotOutYet] + ld hl, wEnemyMonHP + ld a, [hli] + ld [wLastSwitchInEnemyMonHP], a + ld a, [hl] + ld [wLastSwitchInEnemyMonHP + 1], a + ld a, 1 + ld [wCurrentMenuItem], a + ld a, [wFirstMonsNotOutYet] dec a - jr z,.next4 - ld a,[wPartyCount] + jr z, .next4 + ld a, [wPartyCount] dec a - jr z,.next4 - ld a,[wLinkState] + jr z, .next4 + ld a, [wLinkState] cp LINK_STATE_BATTLING - jr z,.next4 - ld a,[wOptions] - bit 6,a - jr nz,.next4 + jr z, .next4 + ld a, [wOptions] + bit 6, a + jr nz, .next4 ld hl, TrainerAboutToUseText call PrintText coord hl, 0, 7 lb bc, 8, 1 - ld a,TWO_OPTION_MENU - ld [wTextBoxID],a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - jr nz,.next4 - ld a,BATTLE_PARTY_MENU - ld [wPartyMenuTypeOrMessageID],a + jr nz, .next4 + ld a, BATTLE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call DisplayPartyMenu .next9 - ld a,1 - ld [wCurrentMenuItem],a - jr c,.next7 - ld hl,wPlayerMonNumber - ld a,[wWhichPokemon] + ld a, 1 + ld [wCurrentMenuItem], a + jr c, .next7 + ld hl, wPlayerMonNumber + ld a, [wWhichPokemon] cp [hl] - jr nz,.next6 - ld hl,AlreadyOutText + jr nz, .next6 + ld hl, AlreadyOutText call PrintText .next8 call GoBackToPartyMenu jr .next9 .next6 call HasMonFainted - jr z,.next8 + jr z, .next8 xor a - ld [wCurrentMenuItem],a + ld [wCurrentMenuItem], a .next7 call GBPalWhiteOut call LoadHudTilePatterns @@ -1507,27 +1507,27 @@ EnemySendOutFirstMon: ld b, SET_PAL_BATTLE call RunPaletteCommand call GBPalNormal - ld hl,TrainerSentOutText + ld hl, TrainerSentOutText call PrintText - ld a,[wEnemyMonSpecies2] - ld [wcf91],a - ld [wd0b5],a + ld a, [wEnemyMonSpecies2] + ld [wcf91], a + ld [wd0b5], a call GetMonHeader - ld de,vFrontPic + ld de, vFrontPic call LoadMonFrontSprite - ld a,-$31 - ld [hStartTileID],a + ld a, -$31 + ld [hStartTileID], a coord hl, 15, 6 predef AnimateSendingOutMon - ld a,[wEnemyMonSpecies2] + ld a, [wEnemyMonSpecies2] call PlayCry call DrawEnemyHUDAndHPBar - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a ret nz xor a - ld [wPartyGainExpFlags],a - ld [wPartyFoughtCurrentEnemyFlags],a + ld [wPartyGainExpFlags], a + ld [wPartyFoughtCurrentEnemyFlags], a call SaveScreenTilesToBuffer1 jp SwitchPlayerMon @@ -1842,7 +1842,7 @@ SendOutMon: ld b, SET_PAL_BATTLE call RunPaletteCommand ld hl, wEnemyBattleStatus1 - res UsingTrappingMove, [hl] + res USING_TRAPPING_MOVE, [hl] ld a, $1 ld [H_WHOSETURN], a ld a, POOF_ANIM @@ -2343,13 +2343,13 @@ UseBagItem: jp z, BagWasSelected ; if not, go back to the bag menu ld a, [wPlayerBattleStatus1] - bit UsingTrappingMove, a ; is the player using a multi-turn move like wrap? + bit USING_TRAPPING_MOVE, a ; is the player using a multi-turn move like wrap? jr z, .checkIfMonCaptured ld hl, wPlayerNumAttacksLeft dec [hl] jr nz, .checkIfMonCaptured ld hl, wPlayerBattleStatus1 - res UsingTrappingMove, [hl] ; not using multi-turn move any more + res USING_TRAPPING_MOVE, [hl] ; not using multi-turn move any more .checkIfMonCaptured ld a, [wCapturedMonSpecies] @@ -2456,7 +2456,7 @@ PartyMenuOrRockOrRun: predef StatusScreen2 ; now we need to reload the enemy mon pic ld a, [wEnemyBattleStatus2] - bit HasSubstituteUp, a ; does the enemy mon have a substitute? + bit HAS_SUBSTITUTE_UP, a ; does the enemy mon have a substitute? ld hl, AnimationSubstitute jr nz, .doEnemyMonAnimation ; enemy mon doesn't have substitute @@ -3014,20 +3014,20 @@ SelectEnemyMove: jr .done .noLinkBattle ld a, [wEnemyBattleStatus2] - and (1 << NeedsToRecharge) | (1 << UsingRage) ; need to recharge or using rage + and (1 << NEEDS_TO_RECHARGE) | (1 << USING_RAGE) ; need to recharge or using rage ret nz ld hl, wEnemyBattleStatus1 ld a, [hl] - and (1 << ChargingUp) | (1 << ThrashingAbout) ; using a charging move or thrash/petal dance + and (1 << CHARGING_UP) | (1 << THRASHING_ABOUT) ; using a charging move or thrash/petal dance ret nz ld a, [wEnemyMonStatus] and SLP | 1 << FRZ ; sleeping or frozen ret nz ld a, [wEnemyBattleStatus1] - and (1 << UsingTrappingMove) | (1 << StoringEnergy) ; using a trapping move like wrap or bide + and (1 << USING_TRAPPING_MOVE) | (1 << STORING_ENERGY) ; using a trapping move like wrap or bide ret nz ld a, [wPlayerBattleStatus1] - bit UsingTrappingMove, a ; caught in player's trapping move (e.g. wrap) + bit USING_TRAPPING_MOVE, a ; caught in player's trapping move (e.g. wrap) jr z, .canSelectMove .unableToSelectMove ld a, $ff @@ -3150,11 +3150,11 @@ ExecutePlayerMove: jp z, ExecutePlayerMoveDone call CheckPlayerStatusConditions jr nz, .playerHasNoSpecialCondition - jp [hl] + jp hl .playerHasNoSpecialCondition call GetCurrentMove ld hl, wPlayerBattleStatus1 - bit ChargingUp, [hl] ; charging up for attack + bit CHARGING_UP, [hl] ; charging up for attack jr nz, PlayerCanExecuteChargingMove call CheckForDisobedience jp z, ExecutePlayerMoveDone @@ -3169,160 +3169,160 @@ CheckIfPlayerNeedsToChargeUp: ; in-battle stuff PlayerCanExecuteChargingMove: - ld hl,wPlayerBattleStatus1 - res ChargingUp,[hl] ; reset charging up and invulnerability statuses if mon was charging up for an attack + ld hl, wPlayerBattleStatus1 + res CHARGING_UP, [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] + res INVULNERABLE, [hl] PlayerCanExecuteMove: call PrintMonName1Text - ld hl,DecrementPP - ld de,wPlayerSelectedMove ; pointer to the move just used - ld b,BANK(DecrementPP) + ld hl, DecrementPP + ld de, wPlayerSelectedMove ; pointer to the move just used + ld b, BANK(DecrementPP) call Bankswitch - ld a,[wPlayerMoveEffect] ; effect of the move just used - ld hl,ResidualEffects1 - ld de,1 + ld a, [wPlayerMoveEffect] ; effect of the move just used + ld hl, ResidualEffects1 + ld de, 1 call IsInArray - jp c,JumpMoveEffect ; ResidualEffects1 moves skip damage calculation and accuracy tests + jp c, JumpMoveEffect ; ResidualEffects1 moves skip damage calculation and accuracy tests ; unless executed as part of their exclusive effect functions - ld a,[wPlayerMoveEffect] - ld hl,SpecialEffectsCont - ld de,1 + ld a, [wPlayerMoveEffect] + ld hl, SpecialEffectsCont + ld de, 1 call IsInArray - call c,JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything + call c, JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything PlayerCalcMoveDamage: - ld a,[wPlayerMoveEffect] - ld hl,SetDamageEffects - ld de,1 + ld a, [wPlayerMoveEffect] + ld hl, SetDamageEffects + ld de, 1 call IsInArray - jp c,.moveHitTest ; SetDamageEffects moves (e.g. Seismic Toss and Super Fang) skip damage calculation + jp c, .moveHitTest ; SetDamageEffects moves (e.g. Seismic Toss and Super Fang) skip damage calculation call CriticalHitTest call HandleCounterMove - jr z,handleIfPlayerMoveMissed + jr z, handleIfPlayerMoveMissed call GetDamageVarsForPlayerAttack call CalculateDamage - jp z,playerCheckIfFlyOrChargeEffect ; for moves with 0 BP, skip any further damage calculation and, for now, skip MoveHitTest + jp z, playerCheckIfFlyOrChargeEffect ; 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 RandomizeDamage .moveHitTest call MoveHitTest handleIfPlayerMoveMissed: - ld a,[wMoveMissed] + ld a, [wMoveMissed] and a - jr z,getPlayerAnimationType - ld a,[wPlayerMoveEffect] - sub a,EXPLODE_EFFECT - jr z,playPlayerMoveAnimation ; don't play any animation if the move missed, unless it was EXPLODE_EFFECT + jr z, getPlayerAnimationType + ld a, [wPlayerMoveEffect] + sub EXPLODE_EFFECT + jr z, playPlayerMoveAnimation ; don't play any animation if the move missed, unless it was EXPLODE_EFFECT jr playerCheckIfFlyOrChargeEffect getPlayerAnimationType: - ld a,[wPlayerMoveEffect] + ld a, [wPlayerMoveEffect] and a - ld a,4 ; move has no effect other than dealing damage - jr z,playPlayerMoveAnimation - ld a,5 ; move has effect + ld a, 4 ; move has no effect other than dealing damage + jr z, playPlayerMoveAnimation + ld a, 5 ; move has effect playPlayerMoveAnimation: push af - ld a,[wPlayerBattleStatus2] - bit HasSubstituteUp,a - ld hl,HideSubstituteShowMonAnim - ld b,BANK(HideSubstituteShowMonAnim) - call nz,Bankswitch + ld a, [wPlayerBattleStatus2] + bit HAS_SUBSTITUTE_UP, a + ld hl, HideSubstituteShowMonAnim + ld b, BANK(HideSubstituteShowMonAnim) + call nz, Bankswitch pop af - ld [wAnimationType],a - ld a,[wPlayerMoveNum] + ld [wAnimationType], a + ld a, [wPlayerMoveNum] call PlayMoveAnimation call HandleExplodingAnimation call DrawPlayerHUDAndHPBar - ld a,[wPlayerBattleStatus2] - bit HasSubstituteUp,a - ld hl,ReshowSubstituteAnim - ld b,BANK(ReshowSubstituteAnim) - call nz,Bankswitch + ld a, [wPlayerBattleStatus2] + bit HAS_SUBSTITUTE_UP, a + ld hl, ReshowSubstituteAnim + ld b, BANK(ReshowSubstituteAnim) + call nz, Bankswitch jr MirrorMoveCheck playerCheckIfFlyOrChargeEffect: - ld c,30 + ld c, 30 call DelayFrames - ld a,[wPlayerMoveEffect] - cp a,FLY_EFFECT - jr z,.playAnim - cp a,CHARGE_EFFECT - jr z,.playAnim + ld a, [wPlayerMoveEffect] + cp FLY_EFFECT + jr z, .playAnim + cp CHARGE_EFFECT + jr z, .playAnim jr MirrorMoveCheck .playAnim xor a - ld [wAnimationType],a - ld a,STATUS_AFFECTED_ANIM + ld [wAnimationType], a + ld a, STATUS_AFFECTED_ANIM call PlayMoveAnimation MirrorMoveCheck: - ld a,[wPlayerMoveEffect] - cp a,MIRROR_MOVE_EFFECT - jr nz,.metronomeCheck + ld a, [wPlayerMoveEffect] + cp MIRROR_MOVE_EFFECT + jr nz, .metronomeCheck call MirrorMoveCopyMove - jp z,ExecutePlayerMoveDone + jp z, ExecutePlayerMoveDone xor a - ld [wMonIsDisobedient],a + ld [wMonIsDisobedient], a jp CheckIfPlayerNeedsToChargeUp ; if Mirror Move was successful go back to damage calculation for copied move .metronomeCheck - cp a,METRONOME_EFFECT - jr nz,.next + cp METRONOME_EFFECT + jr nz, .next call MetronomePickMove jp CheckIfPlayerNeedsToChargeUp ; Go back to damage calculation for the move picked by Metronome .next - ld a,[wPlayerMoveEffect] - ld hl,ResidualEffects2 - ld de,1 + ld a, [wPlayerMoveEffect] + ld hl, ResidualEffects2 + ld de, 1 call IsInArray - jp c,JumpMoveEffect ; done here after executing effects of ResidualEffects2 - ld a,[wMoveMissed] + jp c, JumpMoveEffect ; done here after executing effects of ResidualEffects2 + ld a, [wMoveMissed] and a - jr z,.moveDidNotMiss + jr z, .moveDidNotMiss call PrintMoveFailureText - ld a,[wPlayerMoveEffect] - cp a,EXPLODE_EFFECT ; even if Explosion or Selfdestruct missed, its effect still needs to be activated - jr z,.notDone + ld a, [wPlayerMoveEffect] + cp 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 PrintCriticalOHKOText callab DisplayEffectiveness - ld a,1 - ld [wMoveDidntMiss],a + ld a, 1 + ld [wMoveDidntMiss], a .notDone - ld a,[wPlayerMoveEffect] - ld hl,AlwaysHappenSideEffects - ld de,1 + ld a, [wPlayerMoveEffect] + ld hl, AlwaysHappenSideEffects + ld de, 1 call IsInArray - call c,JumpMoveEffect ; not done after executing effects of AlwaysHappenSideEffects - ld hl,wEnemyMonHP - ld a,[hli] - ld b,[hl] + call c, JumpMoveEffect ; not done after executing effects of AlwaysHappenSideEffects + ld hl, wEnemyMonHP + ld a, [hli] + ld b, [hl] or b ret z ; don't do anything else if the enemy fainted call HandleBuildingRage - ld hl,wPlayerBattleStatus1 - bit AttackingMultipleTimes,[hl] - jr z,.executeOtherEffects - ld a,[wPlayerNumAttacksLeft] + ld hl, wPlayerBattleStatus1 + bit ATTACKING_MULTIPLE_TIMES, [hl] + jr z, .executeOtherEffects + ld a, [wPlayerNumAttacksLeft] dec a - ld [wPlayerNumAttacksLeft],a - jp nz,getPlayerAnimationType ; for multi-hit moves, apply attack until PlayerNumAttacksLeft hits 0 or the enemy faints. + ld [wPlayerNumAttacksLeft], a + jp nz, getPlayerAnimationType ; for multi-hit moves, apply attack until PlayerNumAttacksLeft hits 0 or the enemy faints. ; damage calculation and accuracy tests only happen for the first hit - res AttackingMultipleTimes,[hl] ; clear attacking multiple times status when all attacks are over - ld hl,MultiHitText + res ATTACKING_MULTIPLE_TIMES, [hl] ; clear attacking multiple times status when all attacks are over + ld hl, MultiHitText call PrintText xor a - ld [wPlayerNumHits],a + ld [wPlayerNumHits], a .executeOtherEffects - ld a,[wPlayerMoveEffect] + ld a, [wPlayerMoveEffect] and a - jp z,ExecutePlayerMoveDone - ld hl,SpecialEffects - ld de,1 + jp z, ExecutePlayerMoveDone + ld hl, SpecialEffects + ld de, 1 call IsInArray - call nc,JumpMoveEffect ; move effects not included in SpecialEffects or in either of the ResidualEffect arrays, + call nc, JumpMoveEffect ; move effects not included in SpecialEffects or in either of the ResidualEffect arrays, ; which are the effects not covered yet. Rage effect will be executed for a second time (though it's irrelevant). ; Includes side effects that only need to be called if the target didn't faint. ; Responsible for executing Twineedle's second side effect (poison). @@ -3334,26 +3334,26 @@ MultiHitText: ExecutePlayerMoveDone: xor a - ld [wActionResultOrTookBattleTurn],a - ld b,1 + ld [wActionResultOrTookBattleTurn], a + ld b, 1 ret PrintGhostText: ; print the ghost battle messages call IsGhostBattle ret nz - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] and a - jr nz,.Ghost - ld a,[wBattleMonStatus] ; player’s turn - and a,SLP | (1 << FRZ) + jr nz, .Ghost + ld a, [wBattleMonStatus] ; player’s turn + and SLP | (1 << FRZ) ret nz - ld hl,ScaredText + ld hl, ScaredText call PrintText xor a ret .Ghost ; ghost’s turn - ld hl,GetOutText + ld hl, GetOutText call PrintText xor a ret @@ -3367,266 +3367,266 @@ GetOutText: db "@" IsGhostBattle: - ld a,[wIsInBattle] + ld a, [wIsInBattle] dec a ret nz - ld a,[wCurMap] - cp a,POKEMONTOWER_1 - jr c,.next - cp a,LAVENDER_HOUSE_1 - jr nc,.next - ld b,SILPH_SCOPE + ld a, [wCurMap] + cp POKEMONTOWER_1 + jr c, .next + cp LAVENDER_HOUSE_1 + jr nc, .next + ld b, SILPH_SCOPE call IsItemInBag ret z .next - ld a,1 + ld a, 1 and a ret ; checks for various status conditions affecting the player mon ; stores whether the mon cannot use a move this turn in Z flag CheckPlayerStatusConditions: - ld hl,wBattleMonStatus - ld a,[hl] - and a,SLP ; sleep mask - jr z,.FrozenCheck + ld hl, wBattleMonStatus + ld a, [hl] + and SLP ; sleep mask + jr z, .FrozenCheck ; sleeping dec a - ld [wBattleMonStatus],a ; decrement number of turns left + ld [wBattleMonStatus], a ; decrement number of turns left and a - jr z,.WakeUp ; if the number of turns hit 0, wake up + jr z, .WakeUp ; if the number of turns hit 0, wake up ; fast asleep xor a - ld [wAnimationType],a - ld a,SLP_ANIM - 1 + ld [wAnimationType], a + ld a, SLP_ANIM - 1 call PlayMoveAnimation - ld hl,FastAsleepText + ld hl, FastAsleepText call PrintText jr .sleepDone .WakeUp - ld hl,WokeUpText + ld hl, WokeUpText call PrintText .sleepDone xor a - ld [wPlayerUsedMove],a - ld hl,ExecutePlayerMoveDone ; player can't move this turn + ld [wPlayerUsedMove], a + ld hl, ExecutePlayerMoveDone ; player can't move this turn jp .returnToHL .FrozenCheck - bit FRZ,[hl] ; frozen? - jr z,.HeldInPlaceCheck - ld hl,IsFrozenText + bit FRZ, [hl] ; frozen? + jr z, .HeldInPlaceCheck + ld hl, IsFrozenText call PrintText xor a - ld [wPlayerUsedMove],a - ld hl,ExecutePlayerMoveDone ; player can't move this turn + ld [wPlayerUsedMove], a + ld hl, ExecutePlayerMoveDone ; player can't move this turn jp .returnToHL .HeldInPlaceCheck - ld a,[wEnemyBattleStatus1] - bit UsingTrappingMove,a ; is enemy using a mult-turn move like wrap? - jp z,.FlinchedCheck - ld hl,CantMoveText + ld a, [wEnemyBattleStatus1] + bit USING_TRAPPING_MOVE, a ; is enemy using a mult-turn move like wrap? + jp z, .FlinchedCheck + ld hl, CantMoveText call PrintText - ld hl,ExecutePlayerMoveDone ; player can't move this turn + ld hl, ExecutePlayerMoveDone ; player can't move this turn jp .returnToHL .FlinchedCheck - ld hl,wPlayerBattleStatus1 - bit Flinched,[hl] - jp z,.HyperBeamCheck - res Flinched,[hl] ; reset player's flinch status - ld hl,FlinchedText + ld hl, wPlayerBattleStatus1 + bit FLINCHED, [hl] + jp z, .HyperBeamCheck + res FLINCHED, [hl] ; reset player's flinch status + ld hl, FlinchedText call PrintText - ld hl,ExecutePlayerMoveDone ; player can't move this turn + ld hl, ExecutePlayerMoveDone ; player can't move this turn jp .returnToHL .HyperBeamCheck - ld hl,wPlayerBattleStatus2 - bit NeedsToRecharge,[hl] - jr z,.AnyMoveDisabledCheck - res NeedsToRecharge,[hl] ; reset player's recharge status - ld hl,MustRechargeText + ld hl, wPlayerBattleStatus2 + bit NEEDS_TO_RECHARGE, [hl] + jr z, .AnyMoveDisabledCheck + res NEEDS_TO_RECHARGE, [hl] ; reset player's recharge status + ld hl, MustRechargeText call PrintText - ld hl,ExecutePlayerMoveDone ; player can't move this turn + ld hl, ExecutePlayerMoveDone ; player can't move this turn jp .returnToHL .AnyMoveDisabledCheck - ld hl,wPlayerDisabledMove - ld a,[hl] + ld hl, wPlayerDisabledMove + ld a, [hl] and a - jr z,.ConfusedCheck + jr z, .ConfusedCheck dec a - ld [hl],a + ld [hl], a and $f ; did Disable counter hit 0? - jr nz,.ConfusedCheck - ld [hl],a - ld [wPlayerDisabledMoveNumber],a - ld hl,DisabledNoMoreText + jr nz, .ConfusedCheck + ld [hl], a + ld [wPlayerDisabledMoveNumber], a + ld hl, DisabledNoMoreText call PrintText .ConfusedCheck - ld a,[wPlayerBattleStatus1] + ld a, [wPlayerBattleStatus1] add a ; is player confused? - jr nc,.TriedToUseDisabledMoveCheck - ld hl,wPlayerConfusedCounter + jr nc, .TriedToUseDisabledMoveCheck + ld hl, wPlayerConfusedCounter dec [hl] - jr nz,.IsConfused - ld hl,wPlayerBattleStatus1 - res Confused,[hl] ; if confused counter hit 0, reset confusion status - ld hl,ConfusedNoMoreText + jr nz, .IsConfused + ld hl, wPlayerBattleStatus1 + res CONFUSED, [hl] ; if confused counter hit 0, reset confusion status + ld hl, ConfusedNoMoreText call PrintText jr .TriedToUseDisabledMoveCheck .IsConfused - ld hl,IsConfusedText + ld hl, IsConfusedText call PrintText xor a - ld [wAnimationType],a - ld a,CONF_ANIM - 1 + ld [wAnimationType], a + ld a, CONF_ANIM - 1 call PlayMoveAnimation call BattleRandom - cp a,$80 ; 50% chance to hurt itself - jr c,.TriedToUseDisabledMoveCheck - ld hl,wPlayerBattleStatus1 - ld a,[hl] - and a, 1 << Confused ; if mon hurts itself, clear every other status from wPlayerBattleStatus1 - ld [hl],a + cp $80 ; 50% chance to hurt itself + jr c, .TriedToUseDisabledMoveCheck + ld hl, wPlayerBattleStatus1 + ld a, [hl] + and 1 << CONFUSED ; if mon hurts itself, clear every other status from wPlayerBattleStatus1 + ld [hl], a call HandleSelfConfusionDamage jr .MonHurtItselfOrFullyParalysed .TriedToUseDisabledMoveCheck ; prevents a disabled move that was selected before being disabled from being used - ld a,[wPlayerDisabledMoveNumber] + ld a, [wPlayerDisabledMoveNumber] and a - jr z,.ParalysisCheck - ld hl,wPlayerSelectedMove + jr z, .ParalysisCheck + ld hl, wPlayerSelectedMove cp [hl] - jr nz,.ParalysisCheck + jr nz, .ParalysisCheck call PrintMoveIsDisabledText - ld hl,ExecutePlayerMoveDone ; if a disabled move was somehow selected, player can't move this turn + 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,.BideCheck + ld hl, wBattleMonStatus + bit PAR, [hl] + jr z, .BideCheck call BattleRandom - cp a,$3F ; 25% to be fully paralyzed - jr nc,.BideCheck - ld hl,FullyParalyzedText + cp $3F ; 25% to be fully paralyzed + jr nc, .BideCheck + ld hl, FullyParalyzedText call PrintText .MonHurtItselfOrFullyParalysed - ld hl,wPlayerBattleStatus1 - ld a,[hl] + ld hl, wPlayerBattleStatus1 + ld a, [hl] ; clear bide, thrashing, charging up, and trapping moves such as warp (already cleared for confusion damage) - and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove)) - ld [hl],a - ld a,[wPlayerMoveEffect] - cp a,FLY_EFFECT - jr z,.FlyOrChargeEffect - cp a,CHARGE_EFFECT - jr z,.FlyOrChargeEffect + and $ff ^ ((1 << STORING_ENERGY) | (1 << THRASHING_ABOUT) | (1 << CHARGING_UP) | (1 << USING_TRAPPING_MOVE)) + ld [hl], a + ld a, [wPlayerMoveEffect] + cp FLY_EFFECT + jr z, .FlyOrChargeEffect + cp CHARGE_EFFECT + jr z, .FlyOrChargeEffect jr .NotFlyOrChargeEffect .FlyOrChargeEffect xor a - ld [wAnimationType],a - ld a,STATUS_AFFECTED_ANIM + ld [wAnimationType], a + ld a, STATUS_AFFECTED_ANIM call PlayMoveAnimation .NotFlyOrChargeEffect - ld hl,ExecutePlayerMoveDone + ld hl, ExecutePlayerMoveDone jp .returnToHL ; if using a two-turn move, we need to recharge the first turn .BideCheck - ld hl,wPlayerBattleStatus1 - bit StoringEnergy,[hl] ; is mon using bide? - jr z,.ThrashingAboutCheck + ld hl, wPlayerBattleStatus1 + bit STORING_ENERGY, [hl] ; is mon using bide? + jr z, .ThrashingAboutCheck xor a - ld [wPlayerMoveNum],a - ld hl,wDamage - ld a,[hli] - ld b,a - ld c,[hl] - ld hl,wPlayerBideAccumulatedDamage + 1 - ld a,[hl] - add c ; acumulate damage taken - ld [hld],a - ld a,[hl] + ld [wPlayerMoveNum], a + ld hl, wDamage + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wPlayerBideAccumulatedDamage + 1 + ld a, [hl] + add c ; accumulate damage taken + ld [hld], a + ld a, [hl] adc b - ld [hl],a - ld hl,wPlayerNumAttacksLeft + ld [hl], a + ld hl, wPlayerNumAttacksLeft dec [hl] ; did Bide counter hit 0? - jr z,.UnleashEnergy - ld hl,ExecutePlayerMoveDone + jr z, .UnleashEnergy + ld hl, ExecutePlayerMoveDone jp .returnToHL ; unless mon unleashes energy, can't move this turn .UnleashEnergy - ld hl,wPlayerBattleStatus1 - res StoringEnergy,[hl] ; not using bide any more - ld hl,UnleashedEnergyText + ld hl, wPlayerBattleStatus1 + res STORING_ENERGY, [hl] ; not using bide any more + ld hl, UnleashedEnergyText call PrintText - ld a,1 - ld [wPlayerMovePower],a - ld hl,wPlayerBideAccumulatedDamage + 1 - ld a,[hld] + ld a, 1 + ld [wPlayerMovePower], a + ld hl, wPlayerBideAccumulatedDamage + 1 + ld a, [hld] add a - ld b,a - ld [wDamage + 1],a - ld a,[hl] + ld b, a + ld [wDamage + 1], a + ld a, [hl] rl a ; double the damage - ld [wDamage],a + ld [wDamage], a or b - jr nz,.next - ld a,1 - ld [wMoveMissed],a + jr nz, .next + ld a, 1 + ld [wMoveMissed], a .next xor a - ld [hli],a - ld [hl],a - ld a,BIDE - ld [wPlayerMoveNum],a - ld hl,handleIfPlayerMoveMissed ; skip damage calculation, DecrementPP and MoveHitTest + ld [hli], a + ld [hl], a + ld a, BIDE + ld [wPlayerMoveNum], a + ld hl, handleIfPlayerMoveMissed ; 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 [wPlayerMoveNum],a - ld hl,ThrashingAboutText + bit THRASHING_ABOUT, [hl] ; is mon using thrash or petal dance? + jr z, .MultiturnMoveCheck + ld a, THRASH + ld [wPlayerMoveNum], a + ld hl, ThrashingAboutText call PrintText - ld hl,wPlayerNumAttacksLeft + ld hl, wPlayerNumAttacksLeft dec [hl] ; did Thrashing About counter hit 0? - ld hl,PlayerCalcMoveDamage ; skip DecrementPP - jp nz,.returnToHL + ld hl, PlayerCalcMoveDamage ; skip DecrementPP + jp nz, .returnToHL push hl - ld hl,wPlayerBattleStatus1 - res ThrashingAbout,[hl] ; no longer thrashing about - set Confused,[hl] ; confused + ld hl, wPlayerBattleStatus1 + res THRASHING_ABOUT, [hl] ; no longer thrashing about + set CONFUSED, [hl] ; confused call BattleRandom - and a,3 + and 3 inc a inc a ; confused for 2-5 turns - ld [wPlayerConfusedCounter],a + ld [wPlayerConfusedCounter], a pop hl ; skip DecrementPP jp .returnToHL .MultiturnMoveCheck - bit UsingTrappingMove,[hl] ; is mon using multi-turn move? - jp z,.RageCheck - ld hl,AttackContinuesText + bit USING_TRAPPING_MOVE, [hl] ; is mon using multi-turn move? + jp z, .RageCheck + ld hl, AttackContinuesText call PrintText - ld a,[wPlayerNumAttacksLeft] + ld a, [wPlayerNumAttacksLeft] dec a ; did multi-turn move end? - ld [wPlayerNumAttacksLeft],a - ld hl,getPlayerAnimationType ; if it didn't, skip damage calculation (deal damage equal to last hit), + ld [wPlayerNumAttacksLeft], a + ld hl, getPlayerAnimationType ; if it didn't, skip damage calculation (deal damage equal to last hit), ; DecrementPP and MoveHitTest - jp nz,.returnToHL + jp nz, .returnToHL jp .returnToHL .RageCheck ld a, [wPlayerBattleStatus2] - bit UsingRage, a ; is mon using rage? + bit USING_RAGE, 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 @@ -3716,7 +3716,7 @@ PrintMoveIsDisabledText: ld de, wEnemyBattleStatus1 .removeChargingUp ld a, [de] - res ChargingUp, a ; end the pokemon's + res CHARGING_UP, a ; end the pokemon's ld [de], a ld a, [hl] ld [wd11e], a @@ -4250,7 +4250,7 @@ GetDamageVarsForPlayerAttack: ld b, a ld c, [hl] ; bc = enemy defense ld a, [wEnemyBattleStatus3] - bit HasReflectUp, a ; check for Reflect + bit HAS_REFLECT_UP, a ; check for Reflect jr z, .physicalAttackCritCheck ; if the enemy has used Reflect, double the enemy's defense sla c @@ -4280,13 +4280,13 @@ GetDamageVarsForPlayerAttack: ld b, a ld c, [hl] ; bc = enemy special ld a, [wEnemyBattleStatus3] - bit HasLightScreenUp, a ; check for Light Screen + bit HAS_LIGHT_SCREEN_UP, a ; check for Light Screen jr z, .specialAttackCritCheck ; if the enemy has used Light Screen, double the enemy's special sla c rl b ; 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 +; a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen .specialAttackCritCheck ld hl, wBattleMonSpecial ld a, [wCriticalHitOrOHKO] @@ -4363,7 +4363,7 @@ GetDamageVarsForEnemyAttack: ld b, a ld c, [hl] ; bc = player defense ld a, [wPlayerBattleStatus3] - bit HasReflectUp, a ; check for Reflect + bit HAS_REFLECT_UP, a ; check for Reflect jr z, .physicalAttackCritCheck ; if the player has used Reflect, double the player's defense sla c @@ -4393,13 +4393,13 @@ GetDamageVarsForEnemyAttack: ld b, a ld c, [hl] ld a, [wPlayerBattleStatus3] - bit HasLightScreenUp, a ; check for Light Screen + bit HAS_LIGHT_SCREEN_UP, a ; check for Light Screen jr z, .specialAttackCritCheck ; if the player has used Light Screen, double the player's special sla c rl b ; 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 +; a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen .specialAttackCritCheck ld hl, wEnemyMonSpecial ld a, [wCriticalHitOrOHKO] @@ -4515,7 +4515,7 @@ CalculateDamage: .effect ; EXPLODE_EFFECT halves defense. - cp a, EXPLODE_EFFECT + cp EXPLODE_EFFECT jr nz, .ok srl c jr nz, .ok @@ -4523,13 +4523,13 @@ CalculateDamage: .ok ; Multi-hit attacks may or may not have 0 bp. - cp a, TWO_TO_FIVE_ATTACKS_EFFECT + cp TWO_TO_FIVE_ATTACKS_EFFECT jr z, .skipbp - cp a, $1e + cp $1e jr z, .skipbp ; Calculate OHKO damage based on remaining HP. - cp a, OHKO_EFFECT + cp OHKO_EFFECT jp z, JumpToOHKOMoveEffect ; Don't calculate damage for moves that don't do any. @@ -4707,7 +4707,7 @@ CriticalHitTest: dec hl ld c, [hl] ; read move id ld a, [de] - bit GettingPumped, a ; test for focus energy + bit GETTING_PUMPED, a ; test for focus energy jr nz, .focusEnergyUsed ; bug: using focus energy causes a shift to the right instead of left, ; resulting in 1/4 the usual crit chance sla b ; (effective (base speed/2)*2) @@ -4762,297 +4762,297 @@ HandleCounterMove: ; 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 + ld a, [H_WHOSETURN] ; whose turn and a ; player's turn - ld hl,wEnemySelectedMove - ld de,wEnemyMovePower - ld a,[wPlayerSelectedMove] - jr z,.next + ld hl, wEnemySelectedMove + ld de, wEnemyMovePower + ld a, [wPlayerSelectedMove] + jr z, .next ; enemy's turn - ld hl,wPlayerSelectedMove - ld de,wPlayerMovePower - ld a,[wEnemySelectedMove] + ld hl, wPlayerSelectedMove + ld de, wPlayerMovePower + ld a, [wEnemySelectedMove] .next - cp a,COUNTER + cp COUNTER ret nz ; return if not using Counter - ld a,$01 - ld [wMoveMissed],a ; initialize the move missed variable to true (it is set to false below if the move hits) - ld a,[hl] - cp a,COUNTER + ld a, $01 + ld [wMoveMissed], a ; initialize the move missed variable to true (it is set to false below if the move hits) + ld a, [hl] + cp COUNTER ret z ; miss if the opponent's last selected move is Counter. - ld a,[de] + ld a, [de] and a 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] + ld a, [de] and a ; normal type - jr z,.counterableType - cp a,FIGHTING - jr z,.counterableType + jr z, .counterableType + cp FIGHTING + jr z, .counterableType ; if the move wasn't Normal or Fighting type, miss xor a ret .counterableType - ld hl,wDamage - ld a,[hli] + ld hl, wDamage + ld a, [hli] or [hl] ret z ; If we made it here, Counter still misses if the last move used in battle did no damage to its target. ; wDamage is shared by both players, so Counter may strike back damage dealt by the Counter user itself ; if the conditions meet, even though 99% of the times damage will come from the target. ; if it did damage, double it - ld a,[hl] + ld a, [hl] add a - ldd [hl],a - ld a,[hl] + ldd [hl], a + ld a, [hl] adc a - ld [hl],a - jr nc,.noCarry + ld [hl], a + jr nc, .noCarry ; damage is capped at 0xFFFF - ld a,$ff - ld [hli],a - ld [hl],a + ld a, $ff + ld [hli], a + ld [hl], a .noCarry xor a - ld [wMoveMissed],a + ld [wMoveMissed], a call MoveHitTest ; do the normal move hit test in addition to Counter's special rules xor a ret ApplyAttackToEnemyPokemon: - ld a,[wPlayerMoveEffect] - cp a,OHKO_EFFECT - jr z,ApplyDamageToEnemyPokemon - cp a,SUPER_FANG_EFFECT - jr z,.superFangEffect - cp a,SPECIAL_DAMAGE_EFFECT - jr z,.specialDamage - ld a,[wPlayerMovePower] + ld a, [wPlayerMoveEffect] + cp OHKO_EFFECT + jr z, ApplyDamageToEnemyPokemon + cp SUPER_FANG_EFFECT + jr z, .superFangEffect + cp SPECIAL_DAMAGE_EFFECT + jr z, .specialDamage + ld a, [wPlayerMovePower] and a - jp z,ApplyAttackToEnemyPokemonDone ; no attack to apply if base power is 0 + jp z, ApplyAttackToEnemyPokemonDone ; no attack to apply if base power is 0 jr ApplyDamageToEnemyPokemon .superFangEffect ; set the damage to half the target's HP - ld hl,wEnemyMonHP - ld de,wDamage - ld a,[hli] + ld hl, wEnemyMonHP + ld de, wDamage + ld a, [hli] srl a - ld [de],a + ld [de], a inc de - ld b,a - ld a,[hl] + ld b, a + ld a, [hl] rr a - ld [de],a + ld [de], a or b - jr nz,ApplyDamageToEnemyPokemon + jr nz, ApplyDamageToEnemyPokemon ; make sure Super Fang's damage is always at least 1 - ld a,$01 - ld [de],a + ld a, $01 + ld [de], a jr ApplyDamageToEnemyPokemon .specialDamage - ld hl,wBattleMonLevel - ld a,[hl] - ld b,a ; Seismic Toss deals damage equal to the user's level - ld a,[wPlayerMoveNum] - cp a,SEISMIC_TOSS - jr z,.storeDamage - cp a,NIGHT_SHADE - jr z,.storeDamage - ld b,SONICBOOM_DAMAGE ; 20 - cp a,SONICBOOM - jr z,.storeDamage - ld b,DRAGON_RAGE_DAMAGE ; 40 - cp a,DRAGON_RAGE - jr z,.storeDamage + ld hl, wBattleMonLevel + ld a, [hl] + ld b, a ; Seismic Toss deals damage equal to the user's level + ld a, [wPlayerMoveNum] + cp SEISMIC_TOSS + jr z, .storeDamage + cp NIGHT_SHADE + jr z, .storeDamage + ld b, SONICBOOM_DAMAGE ; 20 + cp SONICBOOM + jr z, .storeDamage + ld b, DRAGON_RAGE_DAMAGE ; 40 + cp DRAGON_RAGE + jr z, .storeDamage ; Psywave - ld a,[hl] - ld b,a + ld a, [hl] + ld b, a srl a add b - ld b,a ; b = level * 1.5 + ld b, a ; b = level * 1.5 ; loop until a random number in the range [1, b) is found .loop call BattleRandom and a - jr z,.loop + jr z, .loop cp b - jr nc,.loop - ld b,a + jr nc, .loop + ld b, a .storeDamage ; store damage value at b - ld hl,wDamage + ld hl, wDamage xor a - ld [hli],a - ld a,b - ld [hl],a + ld [hli], a + ld a, b + ld [hl], a ApplyDamageToEnemyPokemon: - ld hl,wDamage - ld a,[hli] - ld b,a - ld a,[hl] + ld hl, wDamage + ld a, [hli] + ld b, a + ld a, [hl] or b - jr z,ApplyAttackToEnemyPokemonDone ; we're done if damage is 0 - ld a,[wEnemyBattleStatus2] - bit HasSubstituteUp,a ; does the enemy have a substitute? - jp nz,AttackSubstitute + jr z, ApplyAttackToEnemyPokemonDone ; we're done if damage is 0 + ld a, [wEnemyBattleStatus2] + bit HAS_SUBSTITUTE_UP, 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 - ld a,[hld] - ld b,a - ld a,[wEnemyMonHP + 1] - ld [wHPBarOldHP],a + ld a, [hld] + ld b, a + ld a, [wEnemyMonHP + 1] + ld [wHPBarOldHP], a sub b - ld [wEnemyMonHP + 1],a - ld a,[hl] - ld b,a - ld a,[wEnemyMonHP] - ld [wHPBarOldHP+1],a + ld [wEnemyMonHP + 1], a + ld a, [hl] + ld b, a + ld a, [wEnemyMonHP] + ld [wHPBarOldHP+1], a sbc b - ld [wEnemyMonHP],a - jr nc,.animateHpBar + ld [wEnemyMonHP], a + jr nc, .animateHpBar ; if more damage was done than the current HP, zero the HP and set the damage (wDamage) ; equal to how much HP the pokemon had before the attack - ld a,[wHPBarOldHP+1] - ld [hli],a - ld a,[wHPBarOldHP] - ld [hl],a + ld a, [wHPBarOldHP+1] + ld [hli], a + ld a, [wHPBarOldHP] + ld [hl], a xor a - ld hl,wEnemyMonHP - ld [hli],a - ld [hl],a + ld hl, wEnemyMonHP + ld [hli], a + ld [hl], a .animateHpBar - ld hl,wEnemyMonMaxHP - ld a,[hli] - ld [wHPBarMaxHP+1],a - ld a,[hl] - ld [wHPBarMaxHP],a - ld hl,wEnemyMonHP - ld a,[hli] - ld [wHPBarNewHP+1],a - ld a,[hl] - ld [wHPBarNewHP],a + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld [wHPBarMaxHP+1], a + ld a, [hl] + ld [wHPBarMaxHP], a + ld hl, wEnemyMonHP + ld a, [hli] + ld [wHPBarNewHP+1], a + ld a, [hl] + ld [wHPBarNewHP], a coord hl, 2, 2 xor a - ld [wHPBarType],a + ld [wHPBarType], a predef UpdateHPBar2 ; animate the HP bar shortening ApplyAttackToEnemyPokemonDone: jp DrawHUDsAndHPBars ApplyAttackToPlayerPokemon: - ld a,[wEnemyMoveEffect] - cp a,OHKO_EFFECT - jr z,ApplyDamageToPlayerPokemon - cp a,SUPER_FANG_EFFECT - jr z,.superFangEffect - cp a,SPECIAL_DAMAGE_EFFECT - jr z,.specialDamage - ld a,[wEnemyMovePower] + ld a, [wEnemyMoveEffect] + cp OHKO_EFFECT + jr z, ApplyDamageToPlayerPokemon + cp SUPER_FANG_EFFECT + jr z, .superFangEffect + cp SPECIAL_DAMAGE_EFFECT + jr z, .specialDamage + ld a, [wEnemyMovePower] and a - jp z,ApplyAttackToPlayerPokemonDone + jp z, ApplyAttackToPlayerPokemonDone jr ApplyDamageToPlayerPokemon .superFangEffect ; set the damage to half the target's HP - ld hl,wBattleMonHP - ld de,wDamage - ld a,[hli] + ld hl, wBattleMonHP + ld de, wDamage + ld a, [hli] srl a - ld [de],a + ld [de], a inc de - ld b,a - ld a,[hl] + ld b, a + ld a, [hl] rr a - ld [de],a + ld [de], a or b - jr nz,ApplyDamageToPlayerPokemon + jr nz, ApplyDamageToPlayerPokemon ; make sure Super Fang's damage is always at least 1 - ld a,$01 - ld [de],a + ld a, $01 + ld [de], a jr ApplyDamageToPlayerPokemon .specialDamage - ld hl,wEnemyMonLevel - ld a,[hl] - ld b,a - ld a,[wEnemyMoveNum] - cp a,SEISMIC_TOSS - jr z,.storeDamage - cp a,NIGHT_SHADE - jr z,.storeDamage - ld b,SONICBOOM_DAMAGE - cp a,SONICBOOM - jr z,.storeDamage - ld b,DRAGON_RAGE_DAMAGE - cp a,DRAGON_RAGE - jr z,.storeDamage + ld hl, wEnemyMonLevel + ld a, [hl] + ld b, a + ld a, [wEnemyMoveNum] + cp SEISMIC_TOSS + jr z, .storeDamage + cp NIGHT_SHADE + jr z, .storeDamage + ld b, SONICBOOM_DAMAGE + cp SONICBOOM + jr z, .storeDamage + ld b, DRAGON_RAGE_DAMAGE + cp DRAGON_RAGE + jr z, .storeDamage ; Psywave - ld a,[hl] - ld b,a + ld a, [hl] + ld b, a srl a add b - ld b,a ; b = attacker's level * 1.5 + ld b, a ; b = attacker's level * 1.5 ; loop until a random number in the range [0, b) is found ; this differs from the range when the player attacks, which is [1, b) ; it's possible for the enemy to do 0 damage with Psywave, but the player always does at least 1 damage .loop call BattleRandom cp b - jr nc,.loop - ld b,a + jr nc, .loop + ld b, a .storeDamage - ld hl,wDamage + ld hl, wDamage xor a - ld [hli],a - ld a,b - ld [hl],a + ld [hli], a + ld a, b + ld [hl], a ApplyDamageToPlayerPokemon: - ld hl,wDamage - ld a,[hli] - ld b,a - ld a,[hl] + ld hl, wDamage + ld a, [hli] + ld b, a + ld a, [hl] or b - jr z,ApplyAttackToPlayerPokemonDone ; we're done if damage is 0 - ld a,[wPlayerBattleStatus2] - bit HasSubstituteUp,a ; does the player have a substitute? - jp nz,AttackSubstitute + jr z, ApplyAttackToPlayerPokemonDone ; we're done if damage is 0 + ld a, [wPlayerBattleStatus2] + bit HAS_SUBSTITUTE_UP, 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 - ld a,[hld] - ld b,a - ld a,[wBattleMonHP + 1] - ld [wHPBarOldHP],a + ld a, [hld] + ld b, a + ld a, [wBattleMonHP + 1] + ld [wHPBarOldHP], a sub b - ld [wBattleMonHP + 1],a - ld [wHPBarNewHP],a - ld b,[hl] - ld a,[wBattleMonHP] - ld [wHPBarOldHP+1],a + ld [wBattleMonHP + 1], a + ld [wHPBarNewHP], a + ld b, [hl] + ld a, [wBattleMonHP] + ld [wHPBarOldHP+1], a sbc b - ld [wBattleMonHP],a - ld [wHPBarNewHP+1],a - jr nc,.animateHpBar + 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 (wDamage) ; equal to how much HP the pokemon had before the attack - ld a,[wHPBarOldHP+1] - ld [hli],a - ld a,[wHPBarOldHP] - ld [hl],a + ld a, [wHPBarOldHP+1] + ld [hli], a + ld a, [wHPBarOldHP] + ld [hl], a xor a - ld hl,wBattleMonHP - ld [hli],a - ld [hl],a - ld hl,wHPBarNewHP - ld [hli],a - ld [hl],a + ld hl, wBattleMonHP + ld [hli], a + ld [hl], a + ld hl, wHPBarNewHP + ld [hli], a + ld [hl], a .animateHpBar - ld hl,wBattleMonMaxHP - ld a,[hli] - ld [wHPBarMaxHP+1],a - ld a,[hl] - ld [wHPBarMaxHP],a + ld hl, wBattleMonMaxHP + ld a, [hli] + ld [wHPBarMaxHP+1], a + ld a, [hl] + ld [wHPBarMaxHP], a coord hl, 10, 9 - ld a,$01 - ld [wHPBarType],a + ld a, $01 + ld [wHPBarType], a predef UpdateHPBar2 ; animate the HP bar shortening ApplyAttackToPlayerPokemonDone: jp DrawHUDsAndHPBars @@ -5065,51 +5065,51 @@ AttackSubstitute: ; 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 + ld hl, SubstituteTookDamageText call PrintText ; values for player turn - ld de,wEnemySubstituteHP - ld bc,wEnemyBattleStatus2 - ld a,[H_WHOSETURN] + ld de, wEnemySubstituteHP + ld bc, wEnemyBattleStatus2 + ld a, [H_WHOSETURN] and a - jr z,.applyDamageToSubstitute + jr z, .applyDamageToSubstitute ; values for enemy turn - ld de,wPlayerSubstituteHP - ld bc,wPlayerBattleStatus2 + ld de, wPlayerSubstituteHP + ld bc, wPlayerBattleStatus2 .applyDamageToSubstitute - ld hl,wDamage - ld a,[hli] + ld hl, wDamage + ld a, [hli] and a - jr nz,.substituteBroke ; damage > 0xFF always breaks substitutes + jr nz, .substituteBroke ; damage > 0xFF always breaks substitutes ; subtract damage from HP of substitute - ld a,[de] + ld a, [de] sub [hl] - ld [de],a + ld [de], a ret nc .substituteBroke ; If the target's Substitute breaks, wDamage isn't updated with the amount of HP ; the Substitute had before being attacked. - ld h,b - ld l,c - res HasSubstituteUp,[hl] ; unset the substitute bit - ld hl,SubstituteBrokeText + ld h, b + ld l, c + res HAS_SUBSTITUTE_UP, [hl] ; unset the substitute bit + ld hl, SubstituteBrokeText call PrintText ; flip whose turn it is for the next function call - ld a,[H_WHOSETURN] - xor a,$01 - ld [H_WHOSETURN],a + ld a, [H_WHOSETURN] + xor $01 + ld [H_WHOSETURN], a callab HideSubstituteShowMonAnim ; animate the substitute breaking ; flip the turn back to the way it was - ld a,[H_WHOSETURN] - xor a,$01 - ld [H_WHOSETURN],a - ld hl,wPlayerMoveEffect ; value for player's turn + ld a, [H_WHOSETURN] + xor $01 + ld [H_WHOSETURN], a + ld hl, wPlayerMoveEffect ; value for player's turn and a - jr z,.nullifyEffect - ld hl,wEnemyMoveEffect ; value for enemy's turn + jr z, .nullifyEffect + ld hl, wEnemyMoveEffect ; value for enemy's turn .nullifyEffect xor a - ld [hl],a ; zero the effect of the attacker's move + ld [hl], a ; zero the effect of the attacker's move jp DrawHUDsAndHPBars SubstituteTookDamageText: @@ -5123,44 +5123,44 @@ SubstituteBrokeText: ; this function raises the attack modifier of a pokemon using Rage when that pokemon is attacked HandleBuildingRage: ; values for the player turn - ld hl,wEnemyBattleStatus2 - ld de,wEnemyMonStatMods - ld bc,wEnemyMoveNum - ld a,[H_WHOSETURN] + ld hl, wEnemyBattleStatus2 + ld de, wEnemyMonStatMods + ld bc, wEnemyMoveNum + ld a, [H_WHOSETURN] and a - jr z,.next + jr z, .next ; values for the enemy turn - ld hl,wPlayerBattleStatus2 - ld de,wPlayerMonStatMods - ld bc,wPlayerMoveNum + ld hl, wPlayerBattleStatus2 + ld de, wPlayerMonStatMods + ld bc, wPlayerMoveNum .next - bit UsingRage,[hl] ; is the pokemon being attacked under the effect of Rage? + bit USING_RAGE, [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 + ld a, [de] + cp $0d ; maximum stat modifier value ret z ; return if attack modifier is already maxed - ld a,[H_WHOSETURN] - xor a,$01 ; flip turn for the stat modifier raising function - ld [H_WHOSETURN],a + ld a, [H_WHOSETURN] + xor $01 ; flip turn for the stat modifier raising function + ld [H_WHOSETURN], a ; 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 - ld [hl],$00 ; null move number + ld h, b + ld l, c + ld [hl], $00 ; null move number inc hl - ld [hl],ATTACK_UP1_EFFECT + ld [hl], ATTACK_UP1_EFFECT push hl - ld hl,BuildingRageText + ld hl, BuildingRageText call PrintText call StatModifierUpEffect ; stat modifier raising function pop hl xor a - ldd [hl],a ; null move effect - ld a,RAGE - ld [hl],a ; restore the target pokemon's move number to Rage - ld a,[H_WHOSETURN] - xor a,$01 ; flip turn back to the way it was - ld [H_WHOSETURN],a + ldd [hl], a ; null move effect + ld a, RAGE + ld [hl], a ; restore the target pokemon's move number to Rage + ld a, [H_WHOSETURN] + xor $01 ; flip turn back to the way it was + ld [H_WHOSETURN], a ret BuildingRageText: @@ -5176,25 +5176,25 @@ MirrorMoveCopyMove: ; 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] + ld a, [H_WHOSETURN] and a ; values for player turn - ld a,[wEnemyUsedMove] - ld hl,wPlayerSelectedMove - ld de,wPlayerMoveNum - jr z,.next + ld a, [wEnemyUsedMove] + ld hl, wPlayerSelectedMove + ld de, wPlayerMoveNum + jr z, .next ; values for enemy turn - ld a,[wPlayerUsedMove] - ld de,wEnemyMoveNum - ld hl,wEnemySelectedMove + ld a, [wPlayerUsedMove] + ld de, wEnemyMoveNum + ld hl, wEnemySelectedMove .next - ld [hl],a - cp a,MIRROR_MOVE ; did the target Pokemon last use Mirror Move, and miss? - jr z,.mirrorMoveFailed + ld [hl], a + cp MIRROR_MOVE ; did the target Pokemon last use Mirror Move, and miss? + jr z, .mirrorMoveFailed and a ; has the target selected any move yet? - jr nz,ReloadMoveData + jr nz, ReloadMoveData .mirrorMoveFailed - ld hl,MirrorMoveFailedText + ld hl, MirrorMoveFailedText call PrintText xor a ret @@ -5205,78 +5205,78 @@ MirrorMoveFailedText: ; function used to reload move data for moves like Mirror Move and Metronome ReloadMoveData: - ld [wd11e],a + ld [wd11e], a dec a - ld hl,Moves - ld bc,MoveEnd - Moves + ld hl, Moves + ld bc, MoveEnd - Moves call AddNTimes - ld a,BANK(Moves) + ld a, BANK(Moves) call FarCopyData ; copy the move's stats call IncrementMovePP ; the follow two function calls are used to reload the move name call GetMoveName call CopyStringToCF4B - ld a,$01 + ld a, $01 and a ret ; function that picks a random move for metronome MetronomePickMove: xor a - ld [wAnimationType],a - ld a,METRONOME + ld [wAnimationType], a + ld a, METRONOME call PlayMoveAnimation ; play Metronome's animation ; values for player turn - ld de,wPlayerMoveNum - ld hl,wPlayerSelectedMove - ld a,[H_WHOSETURN] + ld de, wPlayerMoveNum + ld hl, wPlayerSelectedMove + ld a, [H_WHOSETURN] and a - jr z,.pickMoveLoop + jr z, .pickMoveLoop ; values for enemy turn - ld de,wEnemyMoveNum - ld hl,wEnemySelectedMove + ld de, wEnemyMoveNum + ld hl, wEnemySelectedMove ; loop to pick a random number in the range [1, $a5) to be the move used by Metronome .pickMoveLoop call BattleRandom and a - jr z,.pickMoveLoop - cp a,NUM_ATTACKS + 1 ; max normal move number + 1 (this is Struggle's move number) - jr nc,.pickMoveLoop - cp a,METRONOME - jr z,.pickMoveLoop - ld [hl],a + jr z, .pickMoveLoop + cp NUM_ATTACKS + 1 ; max normal move number + 1 (this is Struggle's move number) + jr nc, .pickMoveLoop + cp METRONOME + jr z, .pickMoveLoop + ld [hl], a jr ReloadMoveData ; this function increments the current move's PP ; it's used to prevent moves that run another move within the same turn ; (like Mirror Move and Metronome) from losing 2 PP IncrementMovePP: - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] and a ; values for player turn - ld hl,wBattleMonPP - ld de,wPartyMon1PP - ld a,[wPlayerMoveListIndex] - jr z,.next + ld hl, wBattleMonPP + ld de, wPartyMon1PP + ld a, [wPlayerMoveListIndex] + jr z, .next ; values for enemy turn - ld hl,wEnemyMonPP - ld de,wEnemyMon1PP - ld a,[wEnemyMoveListIndex] + ld hl, wEnemyMonPP + ld de, wEnemyMon1PP + ld a, [wEnemyMoveListIndex] .next - ld b,$00 - ld c,a - add hl,bc + ld b, $00 + ld c, a + add hl, bc inc [hl] ; increment PP in the currently battling pokemon memory location - ld h,d - ld l,e - add hl,bc - ld a,[H_WHOSETURN] + ld h, d + ld l, e + add hl, bc + ld a, [H_WHOSETURN] and a - ld a,[wPlayerMonNumber] ; value for player turn - jr z,.updatePP - ld a,[wEnemyMonPartyPos] ; value for enemy turn + ld a, [wPlayerMonNumber] ; value for player turn + jr z, .updatePP + ld a, [wEnemyMonPartyPos] ; value for enemy turn .updatePP - ld bc,wEnemyMon2 - wEnemyMon1 + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes inc [hl] ; increment PP in the party memory location ret @@ -5284,107 +5284,107 @@ IncrementMovePP: ; function to adjust the base damage of an attack to account for type effectiveness AdjustDamageForMoveType: ; values for player turn - ld hl,wBattleMonType - ld a,[hli] - ld b,a ; b = type 1 of attacker - ld c,[hl] ; c = type 2 of attacker - ld hl,wEnemyMonType - ld a,[hli] - ld d,a ; d = type 1 of defender - ld e,[hl] ; e = type 2 of defender - ld a,[wPlayerMoveType] - ld [wMoveType],a - ld a,[H_WHOSETURN] + ld hl, wBattleMonType + ld a, [hli] + ld b, a ; b = type 1 of attacker + ld c, [hl] ; c = type 2 of attacker + ld hl, wEnemyMonType + ld a, [hli] + ld d, a ; d = type 1 of defender + ld e, [hl] ; e = type 2 of defender + ld a, [wPlayerMoveType] + ld [wMoveType], a + ld a, [H_WHOSETURN] and a - jr z,.next + jr z, .next ; values for enemy turn - ld hl,wEnemyMonType - ld a,[hli] - ld b,a ; b = type 1 of attacker - ld c,[hl] ; c = type 2 of attacker - ld hl,wBattleMonType - ld a,[hli] - ld d,a ; d = type 1 of defender - ld e,[hl] ; e = type 2 of defender - ld a,[wEnemyMoveType] - ld [wMoveType],a + ld hl, wEnemyMonType + ld a, [hli] + ld b, a ; b = type 1 of attacker + ld c, [hl] ; c = type 2 of attacker + ld hl, wBattleMonType + ld a, [hli] + ld d, a ; d = type 1 of defender + ld e, [hl] ; e = type 2 of defender + ld a, [wEnemyMoveType] + ld [wMoveType], a .next - ld a,[wMoveType] + ld a, [wMoveType] cp b ; does the move type match type 1 of the attacker? - jr z,.sameTypeAttackBonus + jr z, .sameTypeAttackBonus cp c ; does the move type match type 2 of the attacker? - jr z,.sameTypeAttackBonus + jr z, .sameTypeAttackBonus jr .skipSameTypeAttackBonus .sameTypeAttackBonus ; if the move type matches one of the attacker's types - ld hl,wDamage + 1 - ld a,[hld] - ld h,[hl] - ld l,a ; hl = damage - ld b,h - ld c,l ; bc = damage + ld hl, wDamage + 1 + ld a, [hld] + ld h, [hl] + ld l, a ; hl = damage + ld b, h + ld c, l ; bc = damage srl b rr c ; bc = floor(0.5 * damage) - add hl,bc ; hl = floor(1.5 * damage) + add hl, bc ; hl = floor(1.5 * damage) ; store damage - ld a,h - ld [wDamage],a - ld a,l - ld [wDamage + 1],a - ld hl,wDamageMultipliers - set 7,[hl] + ld a, h + ld [wDamage], a + ld a, l + ld [wDamage + 1], a + ld hl, wDamageMultipliers + set 7, [hl] .skipSameTypeAttackBonus - ld a,[wMoveType] - ld b,a - ld hl,TypeEffects + ld a, [wMoveType] + ld b, a + ld hl, TypeEffects .loop - ld a,[hli] ; a = "attacking type" of the current type pair - cp a,$ff - jr z,.done + ld a, [hli] ; a = "attacking type" of the current type pair + cp $ff + jr z, .done cp b ; does move type match "attacking type"? - jr nz,.nextTypePair - ld a,[hl] ; a = "defending type" of the current type pair + jr nz, .nextTypePair + ld a, [hl] ; a = "defending type" of the current type pair cp d ; does type 1 of defender match "defending type"? - jr z,.matchingPairFound + jr z, .matchingPairFound cp e ; does type 2 of defender match "defending type"? - jr z,.matchingPairFound + jr z, .matchingPairFound jr .nextTypePair .matchingPairFound ; if the move type matches the "attacking type" and one of the defender's types matches the "defending type" push hl push bc inc hl - ld a,[wDamageMultipliers] - and a,$80 - ld b,a - ld a,[hl] ; a = damage multiplier - ld [H_MULTIPLIER],a + ld a, [wDamageMultipliers] + and $80 + ld b, a + ld a, [hl] ; a = damage multiplier + ld [H_MULTIPLIER], a add b - ld [wDamageMultipliers],a + ld [wDamageMultipliers], a xor a - ld [H_MULTIPLICAND],a - ld hl,wDamage - ld a,[hli] - ld [H_MULTIPLICAND + 1],a - ld a,[hld] - ld [H_MULTIPLICAND + 2],a + ld [H_MULTIPLICAND], a + ld hl, wDamage + ld a, [hli] + ld [H_MULTIPLICAND + 1], a + ld a, [hld] + ld [H_MULTIPLICAND + 2], a call Multiply - ld a,10 - ld [H_DIVISOR],a - ld b,$04 + ld a, 10 + ld [H_DIVISOR], a + ld b, $04 call Divide - ld a,[H_QUOTIENT + 2] - ld [hli],a - ld b,a - ld a,[H_QUOTIENT + 3] - ld [hl],a + ld a, [H_QUOTIENT + 2] + ld [hli], a + ld b, a + ld a, [H_QUOTIENT + 3] + ld [hl], a or b ; is damage 0? - jr nz,.skipTypeImmunity + 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 [wMoveMissed],a + ld [wMoveMissed], a .skipTypeImmunity pop bc pop hl @@ -5402,26 +5402,26 @@ AdjustDamageForMoveType: ; ($05 is not very effective, $10 is neutral, $14 is super effective) ; as far is can tell, this is only used once in some AI code to help decide which move to use AIGetTypeEffectiveness: - ld a,[wEnemyMoveType] - ld d,a ; d = type of enemy move - ld hl,wBattleMonType - ld b,[hl] ; b = type 1 of player's pokemon + ld a, [wEnemyMoveType] + ld d, a ; d = type of enemy move + ld hl, wBattleMonType + ld b, [hl] ; b = type 1 of player's pokemon inc hl - ld c,[hl] ; c = type 2 of player's pokemon - ld a,$10 - ld [wTypeEffectiveness],a ; initialize to neutral effectiveness - ld hl,TypeEffects + ld c, [hl] ; c = type 2 of player's pokemon + ld a, $10 + ld [wTypeEffectiveness], a ; initialize to neutral effectiveness + ld hl, TypeEffects .loop - ld a,[hli] - cp a,$ff + ld a, [hli] + cp $ff ret z cp d ; match the type of the move - jr nz,.nextTypePair1 - ld a,[hli] + jr nz, .nextTypePair1 + ld a, [hli] cp b ; match with type 1 of pokemon - jr z,.done + jr z, .done cp c ; or match with type 2 of pokemon - jr z,.done + jr z, .done jr .nextTypePair2 .nextTypePair1 inc hl @@ -5429,8 +5429,8 @@ AIGetTypeEffectiveness: inc hl jr .loop .done - ld a,[hl] - ld [wTypeEffectiveness],a ; store damage multiplier + ld a, [hl] + ld [wTypeEffectiveness], a ; store damage multiplier ret INCLUDE "data/type_effects.asm" @@ -5438,52 +5438,52 @@ INCLUDE "data/type_effects.asm" ; some tests that need to pass for a move to hit MoveHitTest: ; player's turn - ld hl,wEnemyBattleStatus1 - ld de,wPlayerMoveEffect - ld bc,wEnemyMonStatus - ld a,[H_WHOSETURN] + ld hl, wEnemyBattleStatus1 + ld de, wPlayerMoveEffect + ld bc, wEnemyMonStatus + ld a, [H_WHOSETURN] and a - jr z,.dreamEaterCheck + jr z, .dreamEaterCheck ; enemy's turn - ld hl,wPlayerBattleStatus1 - ld de,wEnemyMoveEffect - ld bc,wBattleMonStatus + ld hl, wPlayerBattleStatus1 + ld de, wEnemyMoveEffect + ld bc, wBattleMonStatus .dreamEaterCheck - ld a,[de] - cp a,DREAM_EATER_EFFECT - jr nz,.swiftCheck - ld a,[bc] - and a,SLP ; is the target pokemon sleeping? - jp z,.moveMissed + ld a, [de] + cp DREAM_EATER_EFFECT + jr nz, .swiftCheck + ld a, [bc] + and SLP ; is the target pokemon sleeping? + jp z, .moveMissed .swiftCheck - ld a,[de] - cp a,SWIFT_EFFECT + ld a, [de] + cp SWIFT_EFFECT ret z ; Swift never misses (interestingly, Azure Heights lists this is a myth, but it appears to be true) call CheckTargetSubstitute ; substitute check (note that this overwrites a) - jr z,.checkForDigOrFlyStatus + 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 - jp z,.moveMissed - cp a,DREAM_EATER_EFFECT - jp z,.moveMissed + cp DRAIN_HP_EFFECT + jp z, .moveMissed + cp DREAM_EATER_EFFECT + jp z, .moveMissed .checkForDigOrFlyStatus - bit Invulnerable,[hl] - jp nz,.moveMissed - ld a,[H_WHOSETURN] + bit INVULNERABLE, [hl] + jp nz, .moveMissed + ld a, [H_WHOSETURN] and a - jr nz,.enemyTurn + jr nz, .enemyTurn .playerTurn ; this checks if the move effect is disallowed by mist - ld a,[wPlayerMoveEffect] - cp a,ATTACK_DOWN1_EFFECT - jr c,.skipEnemyMistCheck - cp a,HAZE_EFFECT + 1 - jr c,.enemyMistCheck - cp a,ATTACK_DOWN2_EFFECT - jr c,.skipEnemyMistCheck - cp a,REFLECT_EFFECT + 1 - jr c,.enemyMistCheck + ld a, [wPlayerMoveEffect] + cp ATTACK_DOWN1_EFFECT + jr c, .skipEnemyMistCheck + cp HAZE_EFFECT + 1 + jr c, .enemyMistCheck + cp ATTACK_DOWN2_EFFECT + jr c, .skipEnemyMistCheck + cp REFLECT_EFFECT + 1 + jr c, .enemyMistCheck jr .skipEnemyMistCheck .enemyMistCheck ; if move effect is from $12 to $19 inclusive or $3a to $41 inclusive @@ -5492,98 +5492,98 @@ MoveHitTest: ; FLASH, CONVERSION*, HAZE*, SCREECH, LIGHT SCREEN*, REFLECT* ; the moves that are marked with an asterisk are not affected since this ; function is not called when those moves are used - ld a,[wEnemyBattleStatus2] - bit ProtectedByMist,a ; is mon protected by mist? - jp nz,.moveMissed + ld a, [wEnemyBattleStatus2] + bit PROTECTED_BY_MIST, a ; is mon protected by mist? + jp nz, .moveMissed .skipEnemyMistCheck - ld a,[wPlayerBattleStatus2] - bit UsingXAccuracy,a ; is the player using X Accuracy? + ld a, [wPlayerBattleStatus2] + bit USING_X_ACCURACY, a ; is the player using X Accuracy? ret nz ; if so, always hit regardless of accuracy/evasion jr .calcHitChance .enemyTurn - ld a,[wEnemyMoveEffect] - cp a,ATTACK_DOWN1_EFFECT - jr c,.skipPlayerMistCheck - cp a,HAZE_EFFECT + 1 - jr c,.playerMistCheck - cp a,ATTACK_DOWN2_EFFECT - jr c,.skipPlayerMistCheck - cp a,REFLECT_EFFECT + 1 - jr c,.playerMistCheck + ld a, [wEnemyMoveEffect] + cp ATTACK_DOWN1_EFFECT + jr c, .skipPlayerMistCheck + cp HAZE_EFFECT + 1 + jr c, .playerMistCheck + cp ATTACK_DOWN2_EFFECT + jr c, .skipPlayerMistCheck + cp REFLECT_EFFECT + 1 + jr c, .playerMistCheck jr .skipPlayerMistCheck .playerMistCheck ; similar to enemy mist check - ld a,[wPlayerBattleStatus2] - bit ProtectedByMist,a ; is mon protected by mist? - jp nz,.moveMissed + ld a, [wPlayerBattleStatus2] + bit PROTECTED_BY_MIST, a ; is mon protected by mist? + jp nz, .moveMissed .skipPlayerMistCheck - ld a,[wEnemyBattleStatus2] - bit UsingXAccuracy,a ; is the enemy using X Accuracy? + ld a, [wEnemyBattleStatus2] + bit USING_X_ACCURACY, a ; is the enemy using X Accuracy? ret nz ; if so, always hit regardless of accuracy/evasion .calcHitChance call CalcHitChance ; scale the move accuracy according to attacker's accuracy and target's evasion - ld a,[wPlayerMoveAccuracy] - ld b,a - ld a,[H_WHOSETURN] + ld a, [wPlayerMoveAccuracy] + ld b, a + ld a, [H_WHOSETURN] and a - jr z,.doAccuracyCheck - ld a,[wEnemyMoveAccuracy] - ld b,a + jr z, .doAccuracyCheck + ld a, [wEnemyMoveAccuracy] + ld b, a .doAccuracyCheck ; if the random number generated is greater than or equal to the scaled accuracy, the move misses ; note that this means that even the highest accuracy is still just a 255/256 chance, not 100% call BattleRandom cp b - jr nc,.moveMissed + jr nc, .moveMissed ret .moveMissed xor a - ld hl,wDamage ; zero the damage - ld [hli],a - ld [hl],a + ld hl, wDamage ; zero the damage + ld [hli], a + ld [hl], a inc a - ld [wMoveMissed],a - ld a,[H_WHOSETURN] + ld [wMoveMissed], a + ld a, [H_WHOSETURN] and a - jr z,.playerTurn2 + jr z, .playerTurn2 .enemyTurn2 - ld hl,wEnemyBattleStatus1 - res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap + ld hl, wEnemyBattleStatus1 + res USING_TRAPPING_MOVE, [hl] ; end multi-turn attack e.g. wrap ret .playerTurn2 - ld hl,wPlayerBattleStatus1 - res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap + ld hl, wPlayerBattleStatus1 + res USING_TRAPPING_MOVE, [hl] ; end multi-turn attack e.g. wrap ret ; values for player turn CalcHitChance: - ld hl,wPlayerMoveAccuracy - ld a,[H_WHOSETURN] + ld hl, wPlayerMoveAccuracy + ld a, [H_WHOSETURN] and a - ld a,[wPlayerMonAccuracyMod] - ld b,a - ld a,[wEnemyMonEvasionMod] - ld c,a - jr z,.next + ld a, [wPlayerMonAccuracyMod] + ld b, a + ld a, [wEnemyMonEvasionMod] + ld c, a + jr z, .next ; values for enemy turn - ld hl,wEnemyMoveAccuracy - ld a,[wEnemyMonAccuracyMod] - ld b,a - ld a,[wPlayerMonEvasionMod] - ld c,a + ld hl, wEnemyMoveAccuracy + ld a, [wEnemyMonAccuracyMod] + ld b, a + ld a, [wPlayerMonEvasionMod] + ld c, a .next - ld a,$0e + ld a, $0e sub c - ld c,a ; c = 14 - EVASIONMOD (this "reflects" the value over 7, so that an increase in the target's evasion + ld c, a ; c = 14 - EVASIONMOD (this "reflects" the value over 7, so that an increase in the target's evasion ; decreases the hit chance instead of increasing the hit chance) ; zero the high bytes of the multiplicand xor a - ld [H_MULTIPLICAND],a - ld [H_MULTIPLICAND + 1],a - ld a,[hl] - ld [H_MULTIPLICAND + 2],a ; set multiplicand to move accuracy + ld [H_MULTIPLICAND], a + ld [H_MULTIPLICAND + 1], a + ld a, [hl] + ld [H_MULTIPLICAND + 2], a ; set multiplicand to move accuracy push hl - ld d,$02 ; loop has two iterations + ld d, $02 ; loop has two iterations ; loop to do the calculations, the first iteration multiplies by the accuracy ratio and ; the second iteration multiplies by the evasion ratio .loop @@ -5591,40 +5591,40 @@ CalcHitChance: ld hl, StatModifierRatios ; stat modifier ratios dec b sla b - ld c,b - ld b,$00 - add hl,bc ; hl = address of stat modifier ratio + ld c, b + ld b, $00 + add hl, bc ; hl = address of stat modifier ratio pop bc - ld a,[hli] - ld [H_MULTIPLIER],a ; set multiplier to the numerator of the ratio + ld a, [hli] + ld [H_MULTIPLIER], a ; set multiplier to the numerator of the ratio call Multiply - ld a,[hl] - ld [H_DIVISOR],a ; set divisor to the the denominator of the ratio + ld a, [hl] + ld [H_DIVISOR], a ; set divisor to the the denominator of the ratio ; (the dividend is the product of the previous multiplication) - ld b,$04 ; number of bytes in the dividend + ld b, $04 ; number of bytes in the dividend call Divide - ld a,[H_QUOTIENT + 3] - ld b,a - ld a,[H_QUOTIENT + 2] + ld a, [H_QUOTIENT + 3] + ld b, a + ld a, [H_QUOTIENT + 2] or b - jp nz,.nextCalculation + jp nz, .nextCalculation ; make sure the result is always at least one - ld [H_QUOTIENT + 2],a - ld a,$01 - ld [H_QUOTIENT + 3],a + ld [H_QUOTIENT + 2], a + ld a, $01 + ld [H_QUOTIENT + 3], a .nextCalculation - ld b,c + ld b, c dec d - jr nz,.loop - ld a,[H_QUOTIENT + 2] + jr nz, .loop + ld a, [H_QUOTIENT + 2] and a ; is the calculated hit chance over 0xFF? - ld a,[H_QUOTIENT + 3] - jr z,.storeAccuracy + ld a, [H_QUOTIENT + 3] + jr z, .storeAccuracy ; if calculated hit chance over 0xFF - ld a,$ff ; set the hit chance to 0xFF + ld a, $ff ; set the hit chance to 0xFF .storeAccuracy pop hl - ld [hl],a ; store the hit chance in the move accuracy variable + ld [hl], a ; store the hit chance in the move accuracy variable ret ; multiplies damage by a random percentage from ~85% to 100% @@ -5690,10 +5690,10 @@ ExecuteEnemyMove: ld [wDamageMultipliers], a call CheckEnemyStatusConditions jr nz, .enemyHasNoSpecialConditions - jp [hl] + jp hl .enemyHasNoSpecialConditions ld hl, wEnemyBattleStatus1 - bit ChargingUp, [hl] ; is the enemy charging up for attack? + bit CHARGING_UP, [hl] ; is the enemy charging up for attack? jr nz, EnemyCanExecuteChargingMove ; if so, jump call GetCurrentMove @@ -5706,8 +5706,8 @@ CheckIfEnemyNeedsToChargeUp: jr EnemyCanExecuteMove EnemyCanExecuteChargingMove: ld hl, wEnemyBattleStatus1 - res ChargingUp, [hl] ; no longer charging up for attack - res Invulnerable, [hl] ; no longer invulnerable to typical attacks + res CHARGING_UP, [hl] ; no longer charging up for attack + res INVULNERABLE, [hl] ; no longer invulnerable to typical attacks ld a, [wEnemyMoveNum] ld [wd0b5], a ld a, BANK(MoveNames) @@ -5775,7 +5775,7 @@ handleExplosionMiss: playEnemyMoveAnimation: push af ld a, [wEnemyBattleStatus2] - bit HasSubstituteUp, a ; does mon have a substitute? + bit HAS_SUBSTITUTE_UP, a ; does mon have a substitute? ld hl, HideSubstituteShowMonAnim ld b, BANK(HideSubstituteShowMonAnim) call nz, Bankswitch @@ -5786,7 +5786,7 @@ playEnemyMoveAnimation: call HandleExplodingAnimation call DrawEnemyHUDAndHPBar ld a, [wEnemyBattleStatus2] - bit HasSubstituteUp, a ; does mon have a substitute? + bit HAS_SUBSTITUTE_UP, a ; does mon have a substitute? ld hl, ReshowSubstituteAnim ld b, BANK(ReshowSubstituteAnim) call nz, Bankswitch ; slide the substitute's sprite out @@ -5805,7 +5805,7 @@ EnemyCheckIfFlyOrChargeEffect: .playAnim xor a ld [wAnimationType], a - ld a,STATUS_AFFECTED_ANIM + ld a, STATUS_AFFECTED_ANIM call PlayMoveAnimation EnemyCheckIfMirrorMoveEffect: ld a, [wEnemyMoveEffect] @@ -5852,14 +5852,14 @@ EnemyCheckIfMirrorMoveEffect: ret z call HandleBuildingRage ld hl, wEnemyBattleStatus1 - bit AttackingMultipleTimes, [hl] ; is mon hitting multiple times? (example: double kick) + bit ATTACKING_MULTIPLE_TIMES, [hl] ; is mon hitting multiple times? (example: double kick) jr z, .notMultiHitMove push hl ld hl, wEnemyNumAttacksLeft dec [hl] pop hl jp nz, GetEnemyAnimationType - res AttackingMultipleTimes, [hl] ; mon is no longer hitting multiple times + res ATTACKING_MULTIPLE_TIMES, [hl] ; mon is no longer hitting multiple times ld hl, HitXTimesText call PrintText xor a @@ -5897,7 +5897,7 @@ CheckEnemyStatusConditions: call PrintText xor a ld [wAnimationType], a - ld a,SLP_ANIM + ld a, SLP_ANIM call PlayMoveAnimation jr .sleepDone .wokeUp @@ -5919,7 +5919,7 @@ CheckEnemyStatusConditions: jp .enemyReturnToHL .checkIfTrapped ld a, [wPlayerBattleStatus1] - bit UsingTrappingMove, a ; is the player using a multi-turn attack like warp + bit USING_TRAPPING_MOVE, a ; is the player using a multi-turn attack like warp jp z, .checkIfFlinched ld hl, CantMoveText call PrintText @@ -5927,18 +5927,18 @@ CheckEnemyStatusConditions: jp .enemyReturnToHL .checkIfFlinched ld hl, wEnemyBattleStatus1 - bit Flinched, [hl] ; check if enemy mon flinched + bit FLINCHED, [hl] ; check if enemy mon flinched jp z, .checkIfMustRecharge - res Flinched, [hl] + res FLINCHED, [hl] ld hl, FlinchedText call PrintText ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn jp .enemyReturnToHL .checkIfMustRecharge ld hl, wEnemyBattleStatus2 - bit NeedsToRecharge, [hl] ; check if enemy mon has to recharge after using a move + bit NEEDS_TO_RECHARGE, [hl] ; check if enemy mon has to recharge after using a move jr z, .checkIfAnyMoveDisabled - res NeedsToRecharge, [hl] + res NEEDS_TO_RECHARGE, [hl] ld hl, MustRechargeText call PrintText ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn @@ -5964,7 +5964,7 @@ CheckEnemyStatusConditions: dec [hl] jr nz, .isConfused ld hl, wEnemyBattleStatus1 - res Confused, [hl] ; if confused counter hit 0, reset confusion status + res CONFUSED, [hl] ; if confused counter hit 0, reset confusion status ld hl, ConfusedNoMoreText call PrintText jp .checkIfTriedToUseDisabledMove @@ -5973,14 +5973,14 @@ CheckEnemyStatusConditions: call PrintText xor a ld [wAnimationType], a - ld a,CONF_ANIM + ld a, CONF_ANIM call PlayMoveAnimation call BattleRandom cp $80 jr c, .checkIfTriedToUseDisabledMove ld hl, wEnemyBattleStatus1 ld a, [hl] - and 1 << Confused ; if mon hurts itself, clear every other status from wEnemyBattleStatus1 + and 1 << CONFUSED ; if mon hurts itself, clear every other status from wEnemyBattleStatus1 ld [hl], a ld hl, HurtItselfText call PrintText @@ -6047,7 +6047,7 @@ CheckEnemyStatusConditions: ld hl, wEnemyBattleStatus1 ld a, [hl] ; clear bide, thrashing about, charging up, and multi-turn moves such as warp - and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove)) + and $ff ^ ((1 << STORING_ENERGY) | (1 << THRASHING_ABOUT) | (1 << CHARGING_UP) | (1 << USING_TRAPPING_MOVE)) ld [hl], a ld a, [wEnemyMoveEffect] cp FLY_EFFECT @@ -6065,7 +6065,7 @@ CheckEnemyStatusConditions: jp .enemyReturnToHL ; if using a two-turn move, enemy needs to recharge the first turn .checkIfUsingBide ld hl, wEnemyBattleStatus1 - bit StoringEnergy, [hl] ; is mon using bide? + bit STORING_ENERGY, [hl] ; is mon using bide? jr z, .checkIfThrashingAbout xor a ld [wEnemyMoveNum], a @@ -6087,7 +6087,7 @@ CheckEnemyStatusConditions: jp .enemyReturnToHL ; unless mon unleashes energy, can't move this turn .unleashEnergy ld hl, wEnemyBattleStatus1 - res StoringEnergy, [hl] ; not using bide any more + res STORING_ENERGY, [hl] ; not using bide any more ld hl, UnleashedEnergyText call PrintText ld a, $1 @@ -6114,7 +6114,7 @@ CheckEnemyStatusConditions: ld hl, handleIfEnemyMoveMissed ; skip damage calculation, DecrementPP and MoveHitTest jp .enemyReturnToHL .checkIfThrashingAbout - bit ThrashingAbout, [hl] ; is mon using thrash or petal dance? + bit THRASHING_ABOUT, [hl] ; is mon using thrash or petal dance? jr z, .checkIfUsingMultiturnMove ld a, THRASH ld [wEnemyMoveNum], a @@ -6126,8 +6126,8 @@ CheckEnemyStatusConditions: jp nz, .enemyReturnToHL push hl ld hl, wEnemyBattleStatus1 - res ThrashingAbout, [hl] ; mon is no longer using thrash or petal dance - set Confused, [hl] ; mon is now confused + res THRASHING_ABOUT, [hl] ; mon is no longer using thrash or petal dance + set CONFUSED, [hl] ; mon is now confused call BattleRandom and $3 inc a @@ -6136,7 +6136,7 @@ CheckEnemyStatusConditions: pop hl ; skip DecrementPP jp .enemyReturnToHL .checkIfUsingMultiturnMove - bit UsingTrappingMove, [hl] ; is mon using multi-turn move? + bit USING_TRAPPING_MOVE, [hl] ; is mon using multi-turn move? jp z, .checkIfUsingRage ld hl, AttackContinuesText call PrintText @@ -6148,7 +6148,7 @@ CheckEnemyStatusConditions: jp .enemyReturnToHL .checkIfUsingRage ld a, [wEnemyBattleStatus2] - bit UsingRage, a ; is mon using rage? + bit USING_RAGE, a ; is mon using rage? jp z, .checkEnemyStatusConditionsDone ; if we made it this far, mon can move normally this turn ld a, RAGE ld [wd11e], a @@ -6206,7 +6206,7 @@ LoadEnemyMonData: ld [wd0b5], a call GetMonHeader ld a, [wEnemyBattleStatus3] - bit Transformed, a ; is enemy mon transformed? + bit TRANSFORMED, a ; is enemy mon transformed? ld hl, wTransformedEnemyMonOriginalDVs ; original DVs before transforming ld a, [hli] ld b, [hl] @@ -6238,7 +6238,7 @@ LoadEnemyMonData: cp $2 ; is it a trainer battle? jr z, .copyHPAndStatusFromPartyData ld a, [wEnemyBattleStatus3] - bit Transformed, a ; is enemy mon transformed? + 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] @@ -6815,7 +6815,7 @@ HandleExplodingAnimation: ret nz .isExplodingMove ld a, [de] - bit Invulnerable, a ; fly/dig + bit INVULNERABLE, a ; fly/dig ret nz ld a, [hli] cp GHOST @@ -6830,7 +6830,7 @@ HandleExplodingAnimation: ld [wAnimationType], a PlayMoveAnimation: - ld [wAnimationID],a + ld [wAnimationID], a call Delay3 predef_jump MoveAnimation @@ -7139,7 +7139,7 @@ _JumpMoveEffect: ld a, [hli] ld h, [hl] ld l, a - jp [hl] ; jump to special effect handler + jp hl ; jump to special effect handler MoveEffectPointerTable: dw SleepEffect ; unused effect @@ -7240,8 +7240,8 @@ SleepEffect: .sleepEffect ld a, [bc] - bit NeedsToRecharge, a ; does the target need to recharge? (hyper beam) - res NeedsToRecharge, a ; target no longer needs to recharge + bit NEEDS_TO_RECHARGE, a ; does the target need to recharge? (hyper beam) + res NEEDS_TO_RECHARGE, a ; target no longer needs to recharge ld [bc], a 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 @@ -7291,16 +7291,16 @@ PoisonEffect: ld de, wEnemyMoveEffect .poisonEffect call CheckTargetSubstitute - jr nz, .noEffect ; can't posion a substitute target + jr nz, .noEffect ; can't poison a substitute target ld a, [hli] ld b, a and a jr nz, .noEffect ; miss if target is already statused ld a, [hli] - cp POISON ; can't posion a poison-type target + cp POISON ; can't poison a poison-type target jr z, .noEffect ld a, [hld] - cp POISON ; can't posion a poison-type target + cp POISON ; can't poison a poison-type target jr z, .noEffect ld a, [de] cp POISON_SIDE_EFFECT1 @@ -7340,7 +7340,7 @@ PoisonEffect: .ok cp TOXIC jr nz, .normalPoison ; done if move is not Toxic - set BadlyPoisoned, [hl] ; else set Toxic battstatus + set BADLY_POISONED, [hl] ; else set Toxic battstatus xor a ld [de], a ld hl, BadlyPoisonedText @@ -7393,7 +7393,7 @@ ExplodeEffect: inc hl ld [hl], a ; set mon's status to 0 ld a, [de] - res Seeded, a ; clear mon's leech seed status + res SEEDED, a ; clear mon's leech seed status ld [de], a ret @@ -7417,11 +7417,11 @@ FreezeBurnParalyzeEffect: cp b ; do target type 2 and move type match? ret z ; return if they match ld a, [wPlayerMoveEffect] - cp a, PARALYZE_SIDE_EFFECT1 + 1 ; 10% status effects are 04, 05, 06 so 07 will set carry for those + cp PARALYZE_SIDE_EFFECT1 + 1 ; 10% status effects are 04, 05, 06 so 07 will set carry for those ld b, $1a ; 0x1A/0x100 or 26/256 = 10.2%~ chance jr c, .next1 ; branch ahead if this is a 10% chance effect.. ld b, $4d ; else use 0x4D/0x100 or 77/256 = 30.1%~ chance - sub a, $1e ; subtract $1E to map to equivalent 10% chance effects + sub $1e ; subtract $1E to map to equivalent 10% chance effects .next1 push af call BattleRandom ; get random 8bit value for probability test @@ -7429,9 +7429,9 @@ FreezeBurnParalyzeEffect: 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 + cp BURN_SIDE_EFFECT1 jr z, .burn - cp a, FREEZE_SIDE_EFFECT + cp FREEZE_SIDE_EFFECT jr z, .freeze ; .paralyze ld a, 1 << PAR @@ -7469,11 +7469,11 @@ opponentAttacker: cp b ret z ld a, [wEnemyMoveEffect] - cp a, PARALYZE_SIDE_EFFECT1 + 1 + cp PARALYZE_SIDE_EFFECT1 + 1 ld b, $1a jr c, .next1 ld b, $4d - sub a, $1e + sub $1e .next1 push af call BattleRandom @@ -7481,9 +7481,9 @@ opponentAttacker: pop bc ret nc ld a, b - cp a, BURN_SIDE_EFFECT1 + cp BURN_SIDE_EFFECT1 jr z, .burn - cp a, FREEZE_SIDE_EFFECT + cp FREEZE_SIDE_EFFECT jr z, .freeze ld a, 1 << PAR ld [wBattleMonStatus], a @@ -7512,14 +7512,14 @@ FrozenText: CheckDefrost: ; any fire-type move that has a chance inflict burn (all but Fire Spin) will defrost a frozen target - and a, 1 << FRZ ; are they frozen? + and 1 << FRZ ; are they frozen? ret z ; return if so ld a, [H_WHOSETURN] and a jr nz, .opponent ;player [attacker] ld a, [wPlayerMoveType] - sub a, FIRE + sub FIRE ret nz ; return if type of move used isn't fire ld [wEnemyMonStatus], a ; set opponent status to 00 ["defrost" a frozen monster] ld hl, wEnemyMon1Status @@ -7532,7 +7532,7 @@ CheckDefrost: jr .common .opponent ld a, [wEnemyMoveType] ; same as above with addresses swapped - sub a, FIRE + sub FIRE ret nz ld [wBattleMonStatus], a ld hl, wPartyMon1Status @@ -7673,7 +7673,7 @@ UpdateStatDone: jr nz, .asm_3f4f9 ; if a substitute is up, slide off the substitute and show the mon pic before ; playing the minimize animation - bit HasSubstituteUp, [hl] + bit HAS_SUBSTITUTE_UP, [hl] push af push bc ld hl, HideSubstituteShowMonAnim @@ -7776,11 +7776,11 @@ StatModifierDownEffect: and a jp nz, MoveMissed ld a, [bc] - bit Invulnerable, a ; fly/dig + bit INVULNERABLE, a ; fly/dig jp nz, MoveMissed ld a, [de] sub ATTACK_DOWN1_EFFECT - cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers al -1 effects + cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers all -1 effects jr c, .decrementStatMod sub ATTACK_DOWN2_EFFECT - ATTACK_DOWN1_EFFECT ; map -2 effects to corresponding -1 effect .decrementStatMod @@ -7992,7 +7992,7 @@ BideEffect: ld de, wEnemyBideAccumulatedDamage ld bc, wEnemyNumAttacksLeft .bideEffect - set StoringEnergy, [hl] ; mon is now using bide + set STORING_ENERGY, [hl] ; mon is now using bide xor a ld [de], a inc de @@ -8017,7 +8017,7 @@ ThrashPetalDanceEffect: ld hl, wEnemyBattleStatus1 ld de, wEnemyNumAttacksLeft .thrashPetalDanceEffect - set ThrashingAbout, [hl] ; mon is now using thrash/petal dance + set THRASHING_ABOUT, [hl] ; mon is now using thrash/petal dance call BattleRandom and $1 inc a @@ -8153,9 +8153,9 @@ TwoToFiveAttacksEffect: ld de, wEnemyNumAttacksLeft ld bc, wEnemyNumHits .twoToFiveAttacksEffect - bit AttackingMultipleTimes, [hl] ; is mon attacking multiple times? + bit ATTACKING_MULTIPLE_TIMES, [hl] ; is mon attacking multiple times? ret nz - set AttackingMultipleTimes, [hl] ; mon is now attacking multiple times + set ATTACKING_MULTIPLE_TIMES, [hl] ; mon is now attacking multiple times ld hl, wPlayerMoveEffect ld a, [H_WHOSETURN] and a @@ -8208,7 +8208,7 @@ FlinchSideEffect: call BattleRandom cp b ret nc - set Flinched, [hl] ; set mon's status to flinching + set FLINCHED, [hl] ; set mon's status to flinching call ClearHyperBeam ret @@ -8226,18 +8226,18 @@ ChargeEffect: ld de, wEnemyMoveEffect ld b, ANIM_AF .chargeEffect - set ChargingUp, [hl] + set CHARGING_UP, [hl] ld a, [de] dec de ; de contains enemy or player MOVENUM cp FLY_EFFECT jr nz, .notFly - set Invulnerable, [hl] ; mon is now invulnerable to typical attacks (fly/dig) + 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, .notDigOrFly - set Invulnerable, [hl] ; mon is now invulnerable to typical attacks (fly/dig) + set INVULNERABLE, [hl] ; mon is now invulnerable to typical attacks (fly/dig) ld b, ANIM_C0 .notDigOrFly xor a @@ -8306,11 +8306,11 @@ TrappingEffect: ld hl, wEnemyBattleStatus1 ld de, wEnemyNumAttacksLeft .trappingEffect - bit UsingTrappingMove, [hl] + bit USING_TRAPPING_MOVE, [hl] ret nz call ClearHyperBeam ; since this effect is called before testing whether the move will hit, ; the target won't need to recharge even if the trapping move missed - set UsingTrappingMove, [hl] ; mon is now using a trapping move + set USING_TRAPPING_MOVE, [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 @@ -8356,9 +8356,9 @@ ConfusionSideEffectSuccess: ld bc, wPlayerConfusedCounter ld a, [wEnemyMoveEffect] .confuseTarget - bit Confused, [hl] ; is mon confused? + bit CONFUSED, [hl] ; is mon confused? jr nz, ConfusionEffectFailed - set Confused, [hl] ; mon is now confused + set CONFUSED, [hl] ; mon is now confused push af call BattleRandom and $3 @@ -8395,7 +8395,7 @@ HyperBeamEffect: jr z, .hyperBeamEffect ld hl, wEnemyBattleStatus2 .hyperBeamEffect - set NeedsToRecharge, [hl] ; mon now needs to recharge + set NEEDS_TO_RECHARGE, [hl] ; mon now needs to recharge ret ClearHyperBeam: @@ -8406,7 +8406,7 @@ ClearHyperBeam: jr z, .playerTurn ld hl, wPlayerBattleStatus2 .playerTurn - res NeedsToRecharge, [hl] ; mon no longer needs to recharge + res NEEDS_TO_RECHARGE, [hl] ; mon no longer needs to recharge pop hl ret @@ -8417,7 +8417,7 @@ RageEffect: jr z, .player ld hl, wEnemyBattleStatus2 .player - set UsingRage, [hl] ; mon is now in "rage" mode + set USING_RAGE, [hl] ; mon is now in "rage" mode ret MimicEffect: @@ -8438,7 +8438,7 @@ MimicEffect: ld hl, wEnemyMonMoves ld a, [wEnemyBattleStatus1] .enemyTurn - bit Invulnerable, a + bit INVULNERABLE, a jr nz, .mimicMissed .getRandomMove push hl @@ -8462,7 +8462,7 @@ MimicEffect: jr .playerTurn .letPlayerChooseMove ld a, [wEnemyBattleStatus1] - bit Invulnerable, a + bit INVULNERABLE, a jr nz, .mimicMissed ld a, [wCurrentMenuItem] push af @@ -8661,7 +8661,7 @@ CheckTargetSubstitute: jr z, .next1 ld hl, wPlayerBattleStatus2 .next1 - bit HasSubstituteUp, [hl] + bit HAS_SUBSTITUTE_UP, [hl] pop hl ret diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm index e23a85ba..b7c428f7 100644 --- a/engine/battle/decrement_pp.asm +++ b/engine/battle/decrement_pp.asm @@ -1,15 +1,15 @@ DecrementPP: ; after using a move, decrement pp in battle and (if not transformed?) in party ld a, [de] - cp a, STRUGGLE + cp STRUGGLE ret z ; if the pokemon is using "struggle", there's nothing to do ; we don't decrement PP for "struggle" ld hl, wPlayerBattleStatus1 ld a, [hli] ; load the wPlayerBattleStatus1 pokemon status flags and increment hl to load the ; wPlayerBattleStatus2 status flags later - and a, (1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << AttackingMultipleTimes) + and (1 << STORING_ENERGY) | (1 << THRASHING_ABOUT) | (1 << ATTACKING_MULTIPLE_TIMES) ret nz ; if any of these statuses are true, don't decrement PP - bit UsingRage, [hl] + bit USING_RAGE, [hl] ret nz ; don't decrement PP either if Pokemon is using Rage ld hl, wBattleMonPP ; PP of first move (in battle) @@ -18,7 +18,7 @@ DecrementPP: ; decrement PP in the party struct ld a, [wPlayerBattleStatus3] - bit Transformed, a + 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. diff --git a/engine/battle/display_effectiveness.asm b/engine/battle/display_effectiveness.asm index 85f2bc3e..1bf14460 100644 --- a/engine/battle/display_effectiveness.asm +++ b/engine/battle/display_effectiveness.asm @@ -1,7 +1,7 @@ DisplayEffectiveness: ld a, [wDamageMultipliers] - and a, $7F - cp a, $0A + and $7F + cp $0A ret z ld hl, SuperEffectiveText jr nc, .done diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm index f44d64f5..323dd167 100644 --- a/engine/battle/draw_hud_pokeball_gfx.asm +++ b/engine/battle/draw_hud_pokeball_gfx.asm @@ -186,7 +186,7 @@ SetupPlayerAndEnemyPokeballs: ld hl, wOAMBuffer + $18 jp WritePokeballOAMData -; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon) +; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (fainted) and pokeball slot (no mon) PokeballTileGraphics:: INCBIN "gfx/pokeball.2bpp" PokeballTileGraphicsEnd: diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm index 9c347876..f23c3d70 100644 --- a/engine/battle/moveEffects/conversion_effect.asm +++ b/engine/battle/moveEffects/conversion_effect.asm @@ -11,7 +11,7 @@ ConversionEffect_: pop de ld a, [wPlayerBattleStatus1] .conversionEffect - bit Invulnerable, a ; is mon immune to typical attacks (dig/fly) + bit INVULNERABLE, a ; is mon immune to typical attacks (dig/fly) jr nz, PrintButItFailedText ; copy target's types to user ld a, [hli] diff --git a/engine/battle/moveEffects/focus_energy_effect.asm b/engine/battle/moveEffects/focus_energy_effect.asm index 69301d8e..16dad7bb 100644 --- a/engine/battle/moveEffects/focus_energy_effect.asm +++ b/engine/battle/moveEffects/focus_energy_effect.asm @@ -5,9 +5,9 @@ FocusEnergyEffect_: jr z, .notEnemy ld hl, wEnemyBattleStatus2 .notEnemy - bit GettingPumped, [hl] ; is mon already using focus energy? + bit GETTING_PUMPED, [hl] ; is mon already using focus energy? jr nz, .alreadyUsing - set GettingPumped, [hl] ; mon is now using focus energy + set GETTING_PUMPED, [hl] ; mon is now using focus energy callab PlayCurrentMoveAnimation ld hl, GettingPumpedText jp PrintText diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm index 06907bcc..47723ba2 100644 --- a/engine/battle/moveEffects/haze_effect.asm +++ b/engine/battle/moveEffects/haze_effect.asm @@ -47,14 +47,14 @@ HazeEffect_: jp PrintText CureVolatileStatuses: - res Confused, [hl] + res CONFUSED, [hl] inc hl ; BATTSTATUS2 ld a, [hl] - ; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses - and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded)) + ; clear USING_X_ACCURACY, PROTECTED_BY_MIST, GETTING_PUMPED, and SEEDED statuses + and $ff ^((1 << USING_X_ACCURACY) | (1 << PROTECTED_BY_MIST) | (1 << GETTING_PUMPED) | (1 << SEEDED)) ld [hli], a ; BATTSTATUS3 ld a, [hl] - and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses + and %11110000 | (1 << TRANSFORMED) ; clear Bad Poison, Reflect and Light Screen statuses ld [hl], a ret diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm index b7d8283f..2e68acc0 100644 --- a/engine/battle/moveEffects/heal_effect.asm +++ b/engine/battle/moveEffects/heal_effect.asm @@ -76,7 +76,7 @@ HealEffect_: ld a, [de] sbc [hl] jr c, .playAnim -; copy max HP to current HP if an overflow ocurred +; copy max HP to current HP if an overflow occurred ld a, [hli] ld [de], a ld [wHPBarNewHP+1], a diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm index 0f3a2666..f4d3ee9c 100644 --- a/engine/battle/moveEffects/leech_seed_effect.asm +++ b/engine/battle/moveEffects/leech_seed_effect.asm @@ -19,9 +19,9 @@ LeechSeedEffect_: ld a, [de] cp GRASS jr z, .moveMissed - bit Seeded, [hl] + bit SEEDED, [hl] jr nz, .moveMissed - set Seeded, [hl] + set SEEDED, [hl] callab PlayCurrentMoveAnimation ld hl, WasSeededText jp PrintText diff --git a/engine/battle/moveEffects/mist_effect.asm b/engine/battle/moveEffects/mist_effect.asm index b92777de..65070a3e 100644 --- a/engine/battle/moveEffects/mist_effect.asm +++ b/engine/battle/moveEffects/mist_effect.asm @@ -5,9 +5,9 @@ MistEffect_: jr z, .mistEffect ld hl, wEnemyBattleStatus2 .mistEffect - bit ProtectedByMist, [hl] ; is mon protected by mist? + bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist? jr nz, .mistAlreadyInUse - set ProtectedByMist, [hl] ; mon is now protected by mist + set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist callab PlayCurrentMoveAnimation ld hl, ShroudedInMistText jp PrintText diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm index 7fc90c44..0f2f087b 100644 --- a/engine/battle/moveEffects/recoil_effect.asm +++ b/engine/battle/moveEffects/recoil_effect.asm @@ -25,7 +25,7 @@ RecoilEffect_: jr nz, .updateHP inc c ; minimum recoil damage is 1 .updateHP -; substract HP from user due to the recoil damage +; subtract HP from user due to the recoil damage ld a, [hli] ld [wHPBarMaxHP+1], a ld a, [hl] diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm index b45fbe20..2805a969 100644 --- a/engine/battle/moveEffects/reflect_light_screen_effect.asm +++ b/engine/battle/moveEffects/reflect_light_screen_effect.asm @@ -10,15 +10,15 @@ ReflectLightScreenEffect_: ld a, [de] cp LIGHT_SCREEN_EFFECT jr nz, .reflect - bit HasLightScreenUp, [hl] ; is mon already protected by light screen? + bit HAS_LIGHT_SCREEN_UP, [hl] ; is mon already protected by light screen? jr nz, .moveFailed - set HasLightScreenUp, [hl] ; mon is now protected by light screen + set HAS_LIGHT_SCREEN_UP, [hl] ; mon is now protected by light screen ld hl, LightScreenProtectedText jr .playAnim .reflect - bit HasReflectUp, [hl] ; is mon already protected by reflect? + bit HAS_REFLECT_UP, [hl] ; is mon already protected by reflect? jr nz, .moveFailed - set HasReflectUp, [hl] ; mon is now protected by reflect + set HAS_REFLECT_UP, [hl] ; mon is now protected by reflect ld hl, ReflectGainedArmorText .playAnim push hl diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm index 03314ebf..b5d006fc 100644 --- a/engine/battle/moveEffects/substitute_effect.asm +++ b/engine/battle/moveEffects/substitute_effect.asm @@ -12,7 +12,7 @@ SubstituteEffect_: ld bc, wEnemyBattleStatus2 .notEnemy ld a, [bc] - bit HasSubstituteUp, a ; user already has substitute? + bit HAS_SUBSTITUTE_UP, a ; user already has substitute? jr nz, .alreadyHasSubstitute ; quarter health to remove from user ; assumes max HP is 1023 or lower @@ -37,13 +37,13 @@ SubstituteEffect_: sbc 0 pop bc jr c, .notEnoughHP ; underflow means user would be left with negative health - ; bug: since it only brances on carry, it will possibly leave user with 0 HP + ; bug: since it only branches on carry, it will possibly leave user with 0 HP .userHasZeroOrMoreHP - ldi [hl], a ; save resulting HP after substraction into current HP + ldi [hl], a ; save resulting HP after subtraction into current HP ld [hl], d ld h, b ld l, c - set HasSubstituteUp, [hl] + set HAS_SUBSTITUTE_UP, [hl] ld a, [wOptions] bit 7, a ; battle animation is enabled? ld hl, PlayCurrentMoveAnimation diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm index 45f8c910..9a5de9cc 100644 --- a/engine/battle/moveEffects/transform_effect.asm +++ b/engine/battle/moveEffects/transform_effect.asm @@ -12,7 +12,7 @@ TransformEffect_: ld [wPlayerMoveListIndex], a ld a, [wPlayerBattleStatus1] .hitTest - bit Invulnerable, a ; is mon invulnerable to typical attacks? (fly/dig) + bit INVULNERABLE, a ; is mon invulnerable to typical attacks? (fly/dig) jp nz, .failed push hl push de @@ -24,7 +24,7 @@ TransformEffect_: ld hl, wEnemyBattleStatus2 .transformEffect ; animation(s) played are different if target has Substitute up - bit HasSubstituteUp, [hl] + bit HAS_SUBSTITUTE_UP, [hl] push af ld hl, HideSubstituteShowMonAnim ld b, BANK(HideSubstituteShowMonAnim) @@ -44,7 +44,7 @@ TransformEffect_: call nz, Bankswitch pop bc ld a, [bc] - set Transformed, a ; mon is now Transformed + set TRANSFORMED, a ; mon is now transformed ld [bc], a pop de pop hl diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index 3672d8dc..ba00083b 100755 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -1,43 +1,43 @@ ReadTrainer: ; don't change any moves in a link battle - ld a,[wLinkState] + ld a, [wLinkState] and a ret nz ; set [wEnemyPartyCount] to 0, [wEnemyPartyMons] to FF ; XXX first is total enemy pokemon? ; XXX second is species of first pokemon? - ld hl,wEnemyPartyCount + ld hl, wEnemyPartyCount xor a - ld [hli],a + ld [hli], a dec a - ld [hl],a + ld [hl], a ; get the pointer to trainer data for this class - ld a,[wCurOpponent] + ld a, [wCurOpponent] sub $C9 ; convert value from pokemon to trainer - add a,a - ld hl,TrainerDataPointers - ld c,a - ld b,0 - add hl,bc ; hl points to trainer class - ld a,[hli] - ld h,[hl] - ld l,a - ld a,[wTrainerNo] - ld b,a + add a + ld hl, TrainerDataPointers + ld c, a + ld b, 0 + add hl, bc ; hl points to trainer class + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wTrainerNo] + ld b, a ; At this point b contains the trainer number, ; and hl points to the trainer class. ; Our next task is to iterate through the trainers, ; decrementing b each time, until we get to the right one. .outer dec b - jr z,.IterateTrainer + jr z, .IterateTrainer .inner - ld a,[hli] + ld a, [hli] and a - jr nz,.inner + jr nz, .inner jr .outer ; if the first byte of trainer data is FF, @@ -46,17 +46,17 @@ ReadTrainer: ; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move ; else the first byte is the level of every pokemon on the team .IterateTrainer - ld a,[hli] + ld a, [hli] cp $FF ; is the trainer special? - jr z,.SpecialTrainer ; if so, check for special moves - ld [wCurEnemyLVL],a + jr z, .SpecialTrainer ; if so, check for special moves + ld [wCurEnemyLVL], a .LoopTrainerData - ld a,[hli] + ld a, [hli] and a ; have we reached the end of the trainer data? - jr z,.FinishUp - ld [wcf91],a ; write species somewhere (XXX why?) - ld a,ENEMY_PARTY_DATA - ld [wMonDataLocation],a + jr z, .FinishUp + ld [wcf91], a ; write species somewhere (XXX why?) + ld a, ENEMY_PARTY_DATA + ld [wMonDataLocation], a push hl call AddPartyMon pop hl @@ -66,101 +66,101 @@ ReadTrainer: ; - each pokemon has a specific level ; (as opposed to the whole team being of the same level) ; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move - ld a,[hli] + ld a, [hli] and a ; have we reached the end of the trainer data? - jr z,.AddLoneMove - ld [wCurEnemyLVL],a - ld a,[hli] - ld [wcf91],a - ld a,ENEMY_PARTY_DATA - ld [wMonDataLocation],a + jr z, .AddLoneMove + ld [wCurEnemyLVL], a + ld a, [hli] + ld [wcf91], a + ld a, ENEMY_PARTY_DATA + ld [wMonDataLocation], a push hl call AddPartyMon pop hl jr .SpecialTrainer .AddLoneMove ; does the trainer have a single monster with a different move - ld a,[wLoneAttackNo] ; Brock is 01, Misty is 02, Erika is 04, etc + ld a, [wLoneAttackNo] ; Brock is 01, Misty is 02, Erika is 04, etc and a - jr z,.AddTeamMove + jr z, .AddTeamMove dec a - add a,a - ld c,a - ld b,0 - ld hl,LoneMoves - add hl,bc - ld a,[hli] - ld d,[hl] - ld hl,wEnemyMon1Moves + 2 - ld bc,wEnemyMon2 - wEnemyMon1 + add a + ld c, a + ld b, 0 + ld hl, LoneMoves + add hl, bc + ld a, [hli] + ld d, [hl] + ld hl, wEnemyMon1Moves + 2 + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes - ld [hl],d + ld [hl], d jr .FinishUp .AddTeamMove ; check if our trainer's team has special moves ; get trainer class number - ld a,[wCurOpponent] + ld a, [wCurOpponent] sub 200 - ld b,a - ld hl,TeamMoves + ld b, a + ld hl, TeamMoves ; iterate through entries in TeamMoves, checking each for our trainer class .IterateTeamMoves - ld a,[hli] + ld a, [hli] cp b - jr z,.GiveTeamMoves ; is there a match? + jr z, .GiveTeamMoves ; is there a match? inc hl ; if not, go to the next entry inc a - jr nz,.IterateTeamMoves + jr nz, .IterateTeamMoves ; no matches found. is this trainer champion rival? - ld a,b + ld a, b cp SONY3 - jr z,.ChampionRival + jr z, .ChampionRival jr .FinishUp ; nope .GiveTeamMoves - ld a,[hl] - ld [wEnemyMon5Moves + 2],a + ld a, [hl] + ld [wEnemyMon5Moves + 2], a jr .FinishUp .ChampionRival ; give moves to his team ; pidgeot - ld a,SKY_ATTACK - ld [wEnemyMon1Moves + 2],a + ld a, SKY_ATTACK + ld [wEnemyMon1Moves + 2], a ; starter - ld a,[wRivalStarter] + ld a, [wRivalStarter] cp STARTER3 - ld b,MEGA_DRAIN - jr z,.GiveStarterMove + ld b, MEGA_DRAIN + jr z, .GiveStarterMove cp STARTER1 - ld b,FIRE_BLAST - jr z,.GiveStarterMove - ld b,BLIZZARD ; must be squirtle + ld b, FIRE_BLAST + jr z, .GiveStarterMove + ld b, BLIZZARD ; must be squirtle .GiveStarterMove - ld a,b - ld [wEnemyMon6Moves + 2],a + ld a, b + ld [wEnemyMon6Moves + 2], a .FinishUp ; clear wAmountMoneyWon addresses xor a - ld de,wAmountMoneyWon - ld [de],a + ld de, wAmountMoneyWon + ld [de], a inc de - ld [de],a + ld [de], a inc de - ld [de],a - ld a,[wCurEnemyLVL] - ld b,a + ld [de], a + ld a, [wCurEnemyLVL] + ld b, a .LastLoop ; update wAmountMoneyWon addresses (money to win) based on enemy's level - ld hl,wTrainerBaseMoney + 1 - ld c,2 ; wAmountMoneyWon is a 3-byte number + ld hl, wTrainerBaseMoney + 1 + ld c, 2 ; wAmountMoneyWon is a 3-byte number push bc predef AddBCDPredef pop bc inc de inc de dec b - jr nz,.LastLoop ; repeat wCurEnemyLVL times + jr nz, .LastLoop ; repeat wCurEnemyLVL times ret diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm index 7e2c911c..49d0429f 100644 --- a/engine/battle/save_trainer_name.asm +++ b/engine/battle/save_trainer_name.asm @@ -1,21 +1,21 @@ SaveTrainerName: - ld hl,TrainerNamePointers - ld a,[wTrainerClass] + ld hl, TrainerNamePointers + ld a, [wTrainerClass] dec a - ld c,a - ld b,0 - add hl,bc - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a - ld de,wcd6d + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wcd6d .CopyCharacter - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de cp "@" - jr nz,.CopyCharacter + jr nz, .CopyCharacter ret TrainerNamePointers: diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index b175fcaf..6f699b9c 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -51,7 +51,7 @@ AIEnemyTrainerChooseMoves: ld l, a ld de, .nextMoveChoiceModification ; set return address push de - jp [hl] ; execute modification function + jp hl ; execute modification function .loopFindMinimumEntries ; all entries will be decremented sequentially until one of them is zero ld hl, wBuffer ; temp move selection array ld de, wEnemyMonMoves ; enemy moves @@ -114,7 +114,7 @@ AIMoveChoiceModification1: ld a, [wBattleMonStatus] and a ret z ; return if no status ailment on player's mon - ld hl, wBuffer - 1 ; temp move selection array (-1 byte offest) + ld hl, wBuffer - 1 ; temp move selection array (-1 byte offset) ld de, wEnemyMonMoves ; enemy moves ld b, NUM_MOVES + 1 .nextMove @@ -154,7 +154,7 @@ StatusAilmentMoveEffects: ; slightly encourage moves with specific effects. ; in particular, stat-modifying moves and other move effects -; that fall in-bewteen +; that fall in-between AIMoveChoiceModification2: ld a, [wAILayer2Encouragement] cp $1 @@ -212,7 +212,7 @@ AIMoveChoiceModification3: cp $10 jr z, .nextMove jr c, .notEffectiveMove - dec [hl] ; sligthly encourage this move + dec [hl] ; slightly encourage this move jr .nextMove .notEffectiveMove ; discourages non-effective moves if better moves are available push hl @@ -253,7 +253,7 @@ AIMoveChoiceModification3: pop hl and a jr z, .nextMove - inc [hl] ; sligthly discourage this move + inc [hl] ; slightly discourage this move jr .nextMove AIMoveChoiceModification4: ret @@ -263,10 +263,10 @@ ReadMove: push de push bc dec a - ld hl,Moves - ld bc,MoveEnd - Moves + ld hl, Moves + ld bc, MoveEnd - Moves call AddNTimes - ld de,wEnemyMoveNum + ld de, wEnemyMoveNum call CopyData pop bc pop de @@ -338,35 +338,35 @@ INCLUDE "data/trainer_parties.asm" TrainerAI: and a - ld a,[wIsInBattle] + ld a, [wIsInBattle] dec a ret z ; if not a trainer, we're done here - ld a,[wLinkState] + ld a, [wLinkState] cp LINK_STATE_BATTLING ret z - ld a,[wTrainerClass] ; what trainer class is this? + ld a, [wTrainerClass] ; what trainer class is this? dec a - ld c,a - ld b,0 - ld hl,TrainerAIPointers - add hl,bc - add hl,bc - add hl,bc - ld a,[wAICount] + ld c, a + ld b, 0 + ld hl, TrainerAIPointers + add hl, bc + add hl, bc + add hl, bc + ld a, [wAICount] and a ret z ; if no AI uses left, we're done here inc hl inc a - jr nz,.getpointer + jr nz, .getpointer dec hl - ld a,[hli] - ld [wAICount],a + ld a, [hli] + ld [wAICount], a .getpointer - ld a,[hli] - ld h,[hl] - ld l,a + ld a, [hli] + ld h, [hl] + ld l, a call Random - jp [hl] + jp hl TrainerAIPointers: ; one entry per trainer class @@ -442,17 +442,17 @@ CooltrainerMAI: CooltrainerFAI: cp $40 - ld a,$A + ld a, $A call AICheckIfHPBelowFraction - jp c,AIUseHyperPotion - ld a,5 + jp c, AIUseHyperPotion + ld a, 5 call AICheckIfHPBelowFraction ret nc jp AISwitchIfEnoughMons BrockAI: ; if his active monster has a status condition, use a full heal - ld a,[wEnemyMonStatus] + ld a, [wEnemyMonStatus] and a ret z jp AIUseFullHeal @@ -470,7 +470,7 @@ LtSurgeAI: ErikaAI: cp $80 ret nc - ld a,$A + ld a, $A call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion @@ -488,7 +488,7 @@ BlaineAI: SabrinaAI: cp $40 ret nc - ld a,$A + ld a, $A call AICheckIfHPBelowFraction ret nc jp AIUseHyperPotion @@ -496,7 +496,7 @@ SabrinaAI: Sony2AI: cp $20 ret nc - ld a,5 + ld a, 5 call AICheckIfHPBelowFraction ret nc jp AIUsePotion @@ -504,7 +504,7 @@ Sony2AI: Sony3AI: cp $20 ret nc - ld a,5 + ld a, 5 call AICheckIfHPBelowFraction ret nc jp AIUseFullRestore @@ -512,7 +512,7 @@ Sony3AI: LoreleiAI: cp $80 ret nc - ld a,5 + ld a, 5 call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion @@ -524,10 +524,10 @@ BrunoAI: AgathaAI: cp $14 - jp c,AISwitchIfEnoughMons + jp c, AISwitchIfEnoughMons cp $80 ret nc - ld a,4 + ld a, 4 call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion @@ -535,7 +535,7 @@ AgathaAI: LanceAI: cp $80 ret nc - ld a,5 + ld a, 5 call AICheckIfHPBelowFraction ret nc jp AIUseHyperPotion @@ -547,133 +547,133 @@ GenericAI: ; end of individual trainer AI routines DecrementAICount: - ld hl,wAICount + ld hl, wAICount dec [hl] scf ret AIPlayRestoringSFX: - ld a,SFX_HEAL_AILMENT + ld a, SFX_HEAL_AILMENT jp PlaySoundWaitForCurrent AIUseFullRestore: call AICureStatus - ld a,FULL_RESTORE - ld [wAIItem],a - ld de,wHPBarOldHP - ld hl,wEnemyMonHP + 1 - ld a,[hld] - ld [de],a + ld a, FULL_RESTORE + ld [wAIItem], a + ld de, wHPBarOldHP + ld hl, wEnemyMonHP + 1 + ld a, [hld] + ld [de], a inc de - ld a,[hl] - ld [de],a + ld a, [hl] + ld [de], a inc de - ld hl,wEnemyMonMaxHP + 1 - ld a,[hld] - ld [de],a + ld hl, wEnemyMonMaxHP + 1 + ld a, [hld] + ld [de], a inc de - ld [wHPBarMaxHP],a - ld [wEnemyMonHP + 1],a - ld a,[hl] - ld [de],a - ld [wHPBarMaxHP+1],a - ld [wEnemyMonHP],a + ld [wHPBarMaxHP], a + ld [wEnemyMonHP + 1], a + ld a, [hl] + ld [de], a + ld [wHPBarMaxHP+1], a + ld [wEnemyMonHP], a jr AIPrintItemUseAndUpdateHPBar AIUsePotion: ; enemy trainer heals his monster with a potion - ld a,POTION - ld b,20 + ld a, POTION + ld b, 20 jr AIRecoverHP AIUseSuperPotion: ; enemy trainer heals his monster with a super potion - ld a,SUPER_POTION - ld b,50 + ld a, SUPER_POTION + ld b, 50 jr AIRecoverHP AIUseHyperPotion: ; enemy trainer heals his monster with a hyper potion - ld a,HYPER_POTION - ld b,200 + ld a, HYPER_POTION + ld b, 200 ; fallthrough AIRecoverHP: ; heal b HP and print "trainer used $(a) on pokemon!" - ld [wAIItem],a - ld hl,wEnemyMonHP + 1 - ld a,[hl] - ld [wHPBarOldHP],a + ld [wAIItem], a + ld hl, wEnemyMonHP + 1 + ld a, [hl] + ld [wHPBarOldHP], a add b - ld [hld],a - ld [wHPBarNewHP],a - ld a,[hl] - ld [wHPBarOldHP+1],a - ld [wHPBarNewHP+1],a - jr nc,.next + ld [hld], a + ld [wHPBarNewHP], a + ld a, [hl] + ld [wHPBarOldHP+1], a + ld [wHPBarNewHP+1], a + jr nc, .next inc a - ld [hl],a - ld [wHPBarNewHP+1],a + ld [hl], a + ld [wHPBarNewHP+1], a .next inc hl - ld a,[hld] - ld b,a - ld de,wEnemyMonMaxHP + 1 - ld a,[de] + ld a, [hld] + ld b, a + ld de, wEnemyMonMaxHP + 1 + ld a, [de] dec de - ld [wHPBarMaxHP],a + ld [wHPBarMaxHP], a sub b - ld a,[hli] - ld b,a - ld a,[de] - ld [wHPBarMaxHP+1],a + ld a, [hli] + ld b, a + ld a, [de] + ld [wHPBarMaxHP+1], a sbc b - jr nc,AIPrintItemUseAndUpdateHPBar + jr nc, AIPrintItemUseAndUpdateHPBar inc de - ld a,[de] + ld a, [de] dec de - ld [hld],a - ld [wHPBarNewHP],a - ld a,[de] - ld [hl],a - ld [wHPBarNewHP+1],a + ld [hld], a + ld [wHPBarNewHP], a + ld a, [de] + ld [hl], a + ld [wHPBarNewHP+1], a ; fallthrough AIPrintItemUseAndUpdateHPBar: call AIPrintItemUse_ coord hl, 2, 2 xor a - ld [wHPBarType],a + ld [wHPBarType], a predef UpdateHPBar2 jp DecrementAICount AISwitchIfEnoughMons: ; enemy trainer switches if there are 3 or more unfainted mons in party - ld a,[wEnemyPartyCount] - ld c,a - ld hl,wEnemyMon1HP + ld a, [wEnemyPartyCount] + ld c, a + ld hl, wEnemyMon1HP - ld d,0 ; keep count of unfainted monsters + ld d, 0 ; keep count of unfainted monsters ; count how many monsters haven't fainted yet .loop - ld a,[hli] - ld b,a - ld a,[hld] + ld a, [hli] + ld b, a + ld a, [hld] or b - jr z,.Fainted ; has monster fainted? + jr z, .Fainted ; has monster fainted? inc d .Fainted push bc ld bc, wEnemyMon2 - wEnemyMon1 - add hl,bc + add hl, bc pop bc dec c - jr nz,.loop + jr nz, .loop - ld a,d ; how many available monsters are there? + ld a, d ; how many available monsters are there? cp 2 ; don't bother if only 1 or 2 - jp nc,SwitchEnemyMon + jp nc, SwitchEnemyMon and a ret @@ -681,14 +681,14 @@ SwitchEnemyMon: ; prepare to withdraw the active monster: copy hp, number, and status to roster - ld a,[wEnemyMonPartyPos] - ld hl,wEnemyMon1HP - ld bc,wEnemyMon2 - wEnemyMon1 + ld a, [wEnemyMonPartyPos] + ld hl, wEnemyMon1HP + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes - ld d,h - ld e,l - ld hl,wEnemyMonHP - ld bc,4 + ld d, h + ld e, l + ld hl, wEnemyMonHP + ld bc, 4 call CopyData ld hl, AIBattleWithdrawText @@ -696,13 +696,13 @@ SwitchEnemyMon: ; This wFirstMonsNotOutYet variable is abused to prevent the player from ; switching in a new mon in response to this switch. - ld a,1 - ld [wFirstMonsNotOutYet],a + ld a, 1 + ld [wFirstMonsNotOutYet], a callab EnemySendOut xor a - ld [wFirstMonsNotOutYet],a + ld [wFirstMonsNotOutYet], a - ld a,[wLinkState] + ld a, [wLinkState] cp LINK_STATE_BATTLING ret z scf @@ -715,120 +715,120 @@ AIBattleWithdrawText: AIUseFullHeal: call AIPlayRestoringSFX call AICureStatus - ld a,FULL_HEAL + ld a, FULL_HEAL jp AIPrintItemUse AICureStatus: ; cures the status of enemy's active pokemon - ld a,[wEnemyMonPartyPos] - ld hl,wEnemyMon1Status - ld bc,wEnemyMon2 - wEnemyMon1 + ld a, [wEnemyMonPartyPos] + ld hl, wEnemyMon1Status + ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes xor a - ld [hl],a ; clear status in enemy team roster - ld [wEnemyMonStatus],a ; clear status of active enemy - ld hl,wEnemyBattleStatus3 - res 0,[hl] + ld [hl], a ; clear status in enemy team roster + ld [wEnemyMonStatus], a ; clear status of active enemy + ld hl, wEnemyBattleStatus3 + res 0, [hl] ret AIUseXAccuracy: ; unused call AIPlayRestoringSFX - ld hl,wEnemyBattleStatus2 - set 0,[hl] - ld a,X_ACCURACY + ld hl, wEnemyBattleStatus2 + set 0, [hl] + ld a, X_ACCURACY jp AIPrintItemUse AIUseGuardSpec: call AIPlayRestoringSFX - ld hl,wEnemyBattleStatus2 - set 1,[hl] - ld a,GUARD_SPEC + ld hl, wEnemyBattleStatus2 + set 1, [hl] + ld a, GUARD_SPEC jp AIPrintItemUse AIUseDireHit: ; unused call AIPlayRestoringSFX - ld hl,wEnemyBattleStatus2 - set 2,[hl] - ld a,DIRE_HIT + ld hl, wEnemyBattleStatus2 + set 2, [hl] + ld a, DIRE_HIT jp AIPrintItemUse AICheckIfHPBelowFraction: ; 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] - ld [H_DIVIDEND],a - ld a,[hl] - ld [H_DIVIDEND + 1],a - ld b,2 + ld [H_DIVISOR], a + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld [H_DIVIDEND], a + ld a, [hl] + ld [H_DIVIDEND + 1], a + ld b, 2 call Divide - ld a,[H_QUOTIENT + 3] - ld c,a - ld a,[H_QUOTIENT + 2] - ld b,a - ld hl,wEnemyMonHP + 1 - ld a,[hld] - ld e,a - ld a,[hl] - ld d,a - ld a,d + ld a, [H_QUOTIENT + 3] + ld c, a + ld a, [H_QUOTIENT + 2] + ld b, a + ld hl, wEnemyMonHP + 1 + ld a, [hld] + ld e, a + ld a, [hl] + ld d, a + ld a, d sub b ret nz - ld a,e + ld a, e sub c ret AIUseXAttack: - ld b,$A - ld a,X_ATTACK + ld b, $A + ld a, X_ATTACK jr AIIncreaseStat AIUseXDefend: - ld b,$B - ld a,X_DEFEND + ld b, $B + ld a, X_DEFEND jr AIIncreaseStat AIUseXSpeed: - ld b,$C - ld a,X_SPEED + ld b, $C + ld a, X_SPEED jr AIIncreaseStat AIUseXSpecial: - ld b,$D - ld a,X_SPECIAL + ld b, $D + ld a, X_SPECIAL ; fallthrough AIIncreaseStat: - ld [wAIItem],a + ld [wAIItem], a push bc call AIPrintItemUse_ pop bc - ld hl,wEnemyMoveEffect - ld a,[hld] + ld hl, wEnemyMoveEffect + ld a, [hld] push af - ld a,[hl] + ld a, [hl] push af push hl - ld a,ANIM_AF - ld [hli],a - ld [hl],b + ld a, ANIM_AF + ld [hli], a + ld [hl], b callab StatModifierUpEffect pop hl pop af - ld [hli],a + ld [hli], a pop af - ld [hl],a + ld [hl], a jp DecrementAICount AIPrintItemUse: - ld [wAIItem],a + ld [wAIItem], a call AIPrintItemUse_ jp DecrementAICount AIPrintItemUse_: ; print "x used [wAIItem] on z!" - ld a,[wAIItem] - ld [wd11e],a + ld a, [wAIItem] + ld [wd11e], a call GetItemName ld hl, AIBattleUseItemText jp PrintText diff --git a/engine/cable_club.asm b/engine/cable_club.asm index 0f7fff2a..aeee13f3 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -304,7 +304,7 @@ CallCurrentTradeCenterFunction: ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl TradeCenter_SelectMon: call ClearScreen diff --git a/engine/display_text_id_init.asm b/engine/display_text_id_init.asm index 312d6329..59b3a5f8 100644 --- a/engine/display_text_id_init.asm +++ b/engine/display_text_id_init.asm @@ -1,78 +1,78 @@ ; function that performs initialization for DisplayTextID DisplayTextIDInit: xor a - ld [wListMenuID],a - ld a,[wAutoTextBoxDrawingControl] - bit 0,a - jr nz,.skipDrawingTextBoxBorder - ld a,[hSpriteIndexOrTextID] ; text ID (or sprite ID) + ld [wListMenuID], a + ld a, [wAutoTextBoxDrawingControl] + bit 0, a + jr nz, .skipDrawingTextBoxBorder + ld a, [hSpriteIndexOrTextID] ; text ID (or sprite ID) and a - jr nz,.notStartMenu + jr nz, .notStartMenu ; if text ID is 0 (i.e. the start menu) ; Note that the start menu text border is also drawn in the function directly ; below this, so this seems unnecessary. CheckEvent EVENT_GOT_POKEDEX ; start menu with pokedex coord hl, 10, 0 - ld b,$0e - ld c,$08 - jr nz,.drawTextBoxBorder + ld b, $0e + ld c, $08 + jr nz, .drawTextBoxBorder ; start menu without pokedex coord hl, 10, 0 - ld b,$0c - ld c,$08 + ld b, $0c + ld c, $08 jr .drawTextBoxBorder ; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box .notStartMenu coord hl, 0, 12 - ld b,$04 - ld c,$12 + ld b, $04 + ld c, $12 .drawTextBoxBorder call TextBoxBorder .skipDrawingTextBoxBorder - ld hl,wFontLoaded - set 0,[hl] - ld hl,wFlags_0xcd60 - bit 4,[hl] - res 4,[hl] - jr nz,.skipMovingSprites + ld hl, wFontLoaded + set 0, [hl] + ld hl, wFlags_0xcd60 + bit 4, [hl] + res 4, [hl] + jr nz, .skipMovingSprites call UpdateSprites .skipMovingSprites ; loop to copy C1X9 (direction the sprite is facing) to C2X9 for each sprite ; this is done because when you talk to an NPC, they turn to look your way ; the original direction they were facing must be restored after the dialogue is over - ld hl,wSpriteStateData1 + $19 - ld c,$0f - ld de,$0010 + ld hl, wSpriteStateData1 + $19 + ld c, $0f + ld de, $0010 .spriteFacingDirectionCopyLoop - ld a,[hl] + ld a, [hl] inc h - ld [hl],a + ld [hl], a dec h - add hl,de + add hl, de dec c - jr nz,.spriteFacingDirectionCopyLoop + jr nz, .spriteFacingDirectionCopyLoop ; loop to force all the sprites in the middle of animation to stand still ; (so that they don't like they're frozen mid-step during the dialogue) - ld hl,wSpriteStateData1 + 2 - ld de,$0010 - ld c,e + ld hl, wSpriteStateData1 + 2 + ld de, $0010 + ld c, e .spriteStandStillLoop - ld a,[hl] - cp a,$ff ; is the sprite visible? - jr z,.nextSprite + ld a, [hl] + cp $ff ; is the sprite visible? + jr z, .nextSprite ; if it is visible - and a,$fc - ld [hl],a + and $fc + ld [hl], a .nextSprite - add hl,de + add hl, de dec c - jr nz,.spriteStandStillLoop - ld b,$9c ; window background address + jr nz, .spriteStandStillLoop + ld b, $9c ; window background address call CopyScreenTileBufferToVRAM ; transfer background in WRAM to VRAM xor a - ld [hWY],a ; put the window on the screen + 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 + ld a, $01 + ld [H_AUTOBGTRANSFERENABLED], a ; enable continuous WRAM to VRAM transfer each V-blank ret diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 81666e83..614b49ba 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -6,7 +6,7 @@ AnimateHallOfFame: call LoadFontTilePatterns call LoadTextBoxTilePatterns call DisableLCD - ld hl,vBGMap0 + ld hl, vBGMap0 ld bc, $800 ld a, " " call FillMemory diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm index b336f817..e5f3d7a4 100755 --- a/engine/hidden_object_functions17.asm +++ b/engine/hidden_object_functions17.asm @@ -54,7 +54,7 @@ KabutopsFossilText: DisplayMonFrontSpriteInBox: ; Displays a pokemon's front sprite in a pop-up window. -; [wcf91] = pokemon interal id number +; [wcf91] = pokemon internal id number ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index a1fe85bc..c01bc3c3 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -1,85 +1,85 @@ DoInGameTradeDialogue: ; trigger the trade offer/action specified by wWhichTrade call SaveScreenTilesToBuffer2 - ld hl,TradeMons - ld a,[wWhichTrade] - ld b,a + ld hl, TradeMons + ld a, [wWhichTrade] + ld b, a swap a sub b sub b - ld c,a - ld b,0 - add hl,bc - ld a,[hli] - ld [wInGameTradeGiveMonSpecies],a - ld a,[hli] - ld [wInGameTradeReceiveMonSpecies],a - ld a,[hli] + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld [wInGameTradeGiveMonSpecies], a + ld a, [hli] + ld [wInGameTradeReceiveMonSpecies], a + ld a, [hli] push af - ld de,wInGameTradeMonNick + ld de, wInGameTradeMonNick ld bc, NAME_LENGTH call CopyData pop af - ld l,a - ld h,0 - ld de,InGameTradeTextPointers - add hl,hl - add hl,de - ld a,[hli] - ld [wInGameTradeTextPointerTablePointer],a - ld a,[hl] - ld [wInGameTradeTextPointerTablePointer + 1],a - ld a,[wInGameTradeGiveMonSpecies] - ld de,wInGameTradeGiveMonName + ld l, a + ld h, 0 + ld de, InGameTradeTextPointers + add hl, hl + add hl, de + ld a, [hli] + ld [wInGameTradeTextPointerTablePointer], a + ld a, [hl] + ld [wInGameTradeTextPointerTablePointer + 1], a + ld a, [wInGameTradeGiveMonSpecies] + ld de, wInGameTradeGiveMonName call InGameTrade_GetMonName - ld a,[wInGameTradeReceiveMonSpecies] - ld de,wInGameTradeReceiveMonName + ld a, [wInGameTradeReceiveMonSpecies] + ld de, wInGameTradeReceiveMonName call InGameTrade_GetMonName - ld hl,wCompletedInGameTradeFlags - ld a,[wWhichTrade] - ld c,a - ld b,FLAG_TEST + ld hl, wCompletedInGameTradeFlags + ld a, [wWhichTrade] + ld c, a + ld b, FLAG_TEST predef FlagActionPredef - ld a,c + ld a, c and a - ld a,$4 - ld [wInGameTradeTextPointerTableIndex],a - jr nz,.printText + ld a, $4 + ld [wInGameTradeTextPointerTableIndex], a + jr nz, .printText ; if the trade hasn't been done yet xor a - ld [wInGameTradeTextPointerTableIndex],a + ld [wInGameTradeTextPointerTableIndex], a call .printText - ld a,$1 - ld [wInGameTradeTextPointerTableIndex],a + ld a, $1 + ld [wInGameTradeTextPointerTableIndex], a call YesNoChoice - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - jr nz,.printText + jr nz, .printText call InGameTrade_DoTrade - jr c,.printText + jr c, .printText ld hl, TradedForText call PrintText .printText - ld hl,wInGameTradeTextPointerTableIndex - ld a,[hld] ; wInGameTradeTextPointerTableIndex - ld e,a - ld d,0 - ld a,[hld] ; wInGameTradeTextPointerTablePointer + 1 - ld l,[hl] ; wInGameTradeTextPointerTablePointer - ld h,a - add hl,de - add hl,de - ld a,[hli] - ld h,[hl] - ld l,a + ld hl, wInGameTradeTextPointerTableIndex + ld a, [hld] ; wInGameTradeTextPointerTableIndex + ld e, a + ld d, 0 + ld a, [hld] ; wInGameTradeTextPointerTablePointer + 1 + ld l, [hl] ; wInGameTradeTextPointerTablePointer + ld h, a + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a jp PrintText ; copies name of species a to hl InGameTrade_GetMonName: push de - ld [wd11e],a + ld [wd11e], a call GetMonName - ld hl,wcd6d + ld hl, wcd6d pop de ld bc, NAME_LENGTH jp CopyData @@ -88,53 +88,53 @@ INCLUDE "data/trades.asm" InGameTrade_DoTrade: xor a ; NORMAL_PARTY_MENU - ld [wPartyMenuTypeOrMessageID],a + ld [wPartyMenuTypeOrMessageID], a dec a - ld [wUpdateSpritesEnabled],a + ld [wUpdateSpritesEnabled], a call DisplayPartyMenu push af call InGameTrade_RestoreScreen pop af - ld a,$1 - jp c,.tradeFailed ; jump if the player didn't select a pokemon - ld a,[wInGameTradeGiveMonSpecies] - ld b,a - ld a,[wcf91] + ld a, $1 + 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,.tradeFailed ; jump if the selected mon's species is not the required one - ld a,[wWhichPokemon] - ld hl,wPartyMon1Level + ld a, $2 + jr nz, .tradeFailed ; jump if the selected mon's species is not the required one + ld a, [wWhichPokemon] + ld hl, wPartyMon1Level ld bc, wPartyMon2 - wPartyMon1 call AddNTimes - ld a,[hl] - ld [wCurEnemyLVL],a - ld hl,wCompletedInGameTradeFlags - ld a,[wWhichTrade] - ld c,a - ld b,FLAG_SET + ld a, [hl] + ld [wCurEnemyLVL], a + ld hl, wCompletedInGameTradeFlags + ld a, [wWhichTrade] + ld c, a + ld b, FLAG_SET predef FlagActionPredef ld hl, ConnectCableText call PrintText - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] push af - ld a,[wCurEnemyLVL] + ld a, [wCurEnemyLVL] push af call LoadHpBarAndStatusTilePatterns call InGameTrade_PrepareTradeData predef InternalClockTradeAnim pop af - ld [wCurEnemyLVL],a + ld [wCurEnemyLVL], a pop af - ld [wWhichPokemon],a - ld a,[wInGameTradeReceiveMonSpecies] - ld [wcf91],a + ld [wWhichPokemon], a + ld a, [wInGameTradeReceiveMonSpecies] + ld [wcf91], a xor a - ld [wMonDataLocation],a ; not used - ld [wRemoveMonFromBox],a + ld [wMonDataLocation], a ; not used + ld [wRemoveMonFromBox], a call RemovePokemon - ld a,$80 ; prevent the player from naming the mon - ld [wMonDataLocation],a + ld a, $80 ; prevent the player from naming the mon + ld [wMonDataLocation], a call AddPartyMon call InGameTrade_CopyDataToReceivedMon callab EvolveTradeMon @@ -142,12 +142,12 @@ InGameTrade_DoTrade: call InGameTrade_RestoreScreen callba RedrawMapView and a - ld a,$3 + ld a, $3 jr .tradeSucceeded .tradeFailed scf .tradeSucceeded - ld [wInGameTradeTextPointerTableIndex],a + ld [wInGameTradeTextPointerTableIndex], a ret InGameTrade_RestoreScreen: diff --git a/engine/intro.asm b/engine/intro.asm index 20bedd3b..92d4b5c2 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -443,14 +443,14 @@ FightIntroBackMonEnd: FightIntroFrontMon: IF DEF(_RED) - INCBIN "gfx/red/intro_nido_1.6x6.2bpp" - INCBIN "gfx/red/intro_nido_2.6x6.2bpp" - INCBIN "gfx/red/intro_nido_3.6x6.2bpp" + INCBIN "gfx/red/intro_nido_1.2bpp" + INCBIN "gfx/red/intro_nido_2.2bpp" + INCBIN "gfx/red/intro_nido_3.2bpp" ENDC IF DEF(_BLUE) - INCBIN "gfx/blue/intro_purin_1.6x6.2bpp" - INCBIN "gfx/blue/intro_purin_2.6x6.2bpp" - INCBIN "gfx/blue/intro_purin_3.6x6.2bpp" + INCBIN "gfx/blue/intro_purin_1.2bpp" + INCBIN "gfx/blue/intro_purin_2.2bpp" + INCBIN "gfx/blue/intro_purin_3.2bpp" ENDC FightIntroFrontMonEnd: diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm index 1294ed8d..d07f64eb 100644 --- a/engine/items/inventory.asm +++ b/engine/items/inventory.asm @@ -5,81 +5,81 @@ ; [wItemQuantity] = item quantity ; sets carry flag if successful, unsets carry flag if unsuccessful AddItemToInventory_: - ld a,[wItemQuantity] ; a = item quantity + ld a, [wItemQuantity] ; a = item quantity push af push bc push de push hl push hl - ld d,PC_ITEM_CAPACITY ; how many items the PC can hold - ld a,wNumBagItems & $FF + ld d, PC_ITEM_CAPACITY ; how many items the PC can hold + ld a, wNumBagItems & $FF cp l - jr nz,.checkIfInventoryFull - ld a,wNumBagItems >> 8 + jr nz, .checkIfInventoryFull + ld a, wNumBagItems >> 8 cp h - jr nz,.checkIfInventoryFull + jr nz, .checkIfInventoryFull ; if the destination is the bag - ld d,BAG_ITEM_CAPACITY ; how many items the bag can hold + ld d, BAG_ITEM_CAPACITY ; how many items the bag can hold .checkIfInventoryFull - ld a,[hl] + ld a, [hl] sub d - ld d,a - ld a,[hli] + ld d, a + ld a, [hli] and a - jr z,.addNewItem + jr z, .addNewItem .loop - ld a,[hli] - ld b,a ; b = ID of current item in table - ld a,[wcf91] ; a = ID of item being added + ld a, [hli] + ld b, a ; b = ID of current item in table + ld a, [wcf91] ; a = ID of item being added cp b ; does the current item in the table match the item being added? - jp z,.increaseItemQuantity ; if so, increase the item's quantity + jp z, .increaseItemQuantity ; if so, increase the item's quantity inc hl - ld a,[hl] - cp a,$ff ; is it the end of the table? - jr nz,.loop + ld a, [hl] + cp $ff ; is it the end of the table? + jr nz, .loop .addNewItem ; add an item not yet in the inventory pop hl - ld a,d + ld a, d and a ; is there room for a new item slot? - jr z,.done + jr z, .done ; if there is room inc [hl] ; increment the number of items in the inventory - ld a,[hl] ; the number of items will be the index of the new item + ld a, [hl] ; the number of items will be the index of the new item add a dec a - ld c,a - ld b,0 - add hl,bc ; hl = address to store the item - ld a,[wcf91] - ld [hli],a ; store item ID - ld a,[wItemQuantity] - ld [hli],a ; store item quantity - ld [hl],$ff ; store terminator + ld c, a + ld b, 0 + add hl, bc ; hl = address to store the item + ld a, [wcf91] + ld [hli], a ; store item ID + ld a, [wItemQuantity] + ld [hli], a ; store item quantity + ld [hl], $ff ; store terminator jp .success .increaseItemQuantity ; increase the quantity of an item already in the inventory - ld a,[wItemQuantity] - ld b,a ; b = quantity to add - ld a,[hl] ; a = existing item quantity + ld a, [wItemQuantity] + ld b, a ; b = quantity to add + ld a, [hl] ; a = existing item quantity add b ; a = new item quantity - cp a,100 - jp c,.storeNewQuantity ; if the new quantity is less than 100, store it + cp 100 + jp c, .storeNewQuantity ; if the new quantity is less than 100, store it ; if the new quantity is greater than or equal to 100, ; try to max out the current slot and add the rest in a new slot - sub a,99 - ld [wItemQuantity],a ; a = amount left over (to put in the new slot) - ld a,d + sub 99 + ld [wItemQuantity], a ; a = amount left over (to put in the new slot) + ld a, d and a ; is there room for a new item slot? - jr z,.increaseItemQuantityFailed + jr z, .increaseItemQuantityFailed ; if so, store 99 in the current slot and store the rest in a new slot - ld a,99 - ld [hli],a + ld a, 99 + ld [hli], a jp .loop .increaseItemQuantityFailed pop hl and a jr .done .storeNewQuantity - ld [hl],a + ld [hl], a pop hl .success scf @@ -88,8 +88,8 @@ AddItemToInventory_: pop de pop bc pop bc - ld a,b - ld [wItemQuantity],a ; restore the initial value from when the function was called + ld a, b + ld [wItemQuantity], a ; restore the initial value from when the function was called ret ; function to remove an item (in varying quantities) from the player's bag or PC box @@ -100,49 +100,49 @@ AddItemToInventory_: RemoveItemFromInventory_: push hl inc hl - ld a,[wWhichPokemon] ; index (within the inventory) of the item being removed + ld a, [wWhichPokemon] ; index (within the inventory) of the item being removed sla a add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry inc hl - ld a,[wItemQuantity] ; quantity being removed - ld e,a - ld a,[hl] ; a = current quantity + ld a, [wItemQuantity] ; quantity being removed + ld e, a + ld a, [hl] ; a = current quantity sub e - ld [hld],a ; store new quantity - ld [wMaxItemQuantity],a + ld [hld], a ; store new quantity + ld [wMaxItemQuantity], a and a - jr nz,.skipMovingUpSlots + jr nz, .skipMovingUpSlots ; if the remaining quantity is 0, ; remove the emptied item slot and move up all the following item slots .moveSlotsUp - ld e,l - ld d,h + ld e, l + ld d, h inc de inc de ; de = address of the slot following the emptied one .loop ; loop to move up the following slots - ld a,[de] + ld a, [de] inc de - ld [hli],a - cp a,$ff - jr nz,.loop + ld [hli], a + cp $ff + jr nz, .loop ; update menu info xor a - ld [wListScrollOffset],a - ld [wCurrentMenuItem],a - ld [wBagSavedMenuItem],a - ld [wSavedListScrollOffset],a + ld [wListScrollOffset], a + ld [wCurrentMenuItem], a + ld [wBagSavedMenuItem], a + ld [wSavedListScrollOffset], a pop hl - ld a,[hl] ; a = number of items in inventory + ld a, [hl] ; a = number of items in inventory dec a ; decrement the number of items - ld [hl],a ; store new number of items - ld [wListCount],a - cp a,2 - jr c,.done - ld [wMaxMenuItem],a + ld [hl], a ; store new number of items + ld [wListCount], a + cp 2 + jr c, .done + ld [wMaxMenuItem], a jr .done .skipMovingUpSlots pop hl diff --git a/engine/items/items.asm b/engine/items/items.asm index 9f160bf2..3cf1070d 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -1,19 +1,19 @@ UseItem_: - ld a,1 - ld [wActionResultOrTookBattleTurn],a ; initialise to success value - ld a,[wcf91] ;contains item_ID - cp a,HM_01 - jp nc,ItemUseTMHM - ld hl,ItemUsePtrTable + ld a, 1 + ld [wActionResultOrTookBattleTurn], a ; initialise to success value + ld a, [wcf91] ;contains item_ID + cp HM_01 + jp nc, ItemUseTMHM + ld hl, ItemUsePtrTable dec a add a - ld c,a - ld b,0 - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a - jp [hl] + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + jp hl ItemUsePtrTable: dw ItemUseBall ; MASTER_BALL @@ -103,75 +103,75 @@ ItemUsePtrTable: ItemUseBall: ; Balls can't be used out of battle. - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp z,ItemUseNotTime + jp z, ItemUseNotTime ; Balls can't catch trainers' Pokémon. dec a - jp nz,ThrowBallAtTrainerMon + jp nz, ThrowBallAtTrainerMon ; If this is for the old man battle, skip checking if the party & box are full. - ld a,[wBattleType] + ld a, [wBattleType] dec a - jr z,.canUseBall + jr z, .canUseBall - ld a,[wPartyCount] ; is party full? - cp a,PARTY_LENGTH - jr nz,.canUseBall - ld a,[wNumInBox] ; is box full? - cp a,MONS_PER_BOX - jp z,BoxFullCannotThrowBall + ld a, [wPartyCount] ; is party full? + cp PARTY_LENGTH + jr nz, .canUseBall + ld a, [wNumInBox] ; is box full? + cp MONS_PER_BOX + jp z, BoxFullCannotThrowBall .canUseBall xor a - ld [wCapturedMonSpecies],a + ld [wCapturedMonSpecies], a - ld a,[wBattleType] - cp a,BATTLE_TYPE_SAFARI - jr nz,.skipSafariZoneCode + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI + jr nz, .skipSafariZoneCode .safariZone - ld hl,wNumSafariBalls + ld hl, wNumSafariBalls dec [hl] ; remove a Safari Ball .skipSafariZoneCode call RunDefaultPaletteCommand - ld a,$43 ; successful capture value - ld [wPokeBallAnimData],a + ld a, $43 ; successful capture value + ld [wPokeBallAnimData], a call LoadScreenTilesFromBuffer1 - ld hl,ItemUseText00 + ld hl, ItemUseText00 call PrintText ; If the player is fighting an unidentified ghost, set the value that indicates ; the Pokémon can't be caught and skip the capture calculations. callab IsGhostBattle - ld b,$10 ; can't be caught value - jp z,.setAnimData + ld b, $10 ; can't be caught value + jp z, .setAnimData - ld a,[wBattleType] + ld a, [wBattleType] dec a - jr nz,.notOldManBattle + jr nz, .notOldManBattle .oldManBattle - ld hl,wGrassRate - ld de,wPlayerName - ld bc,NAME_LENGTH + ld hl, wGrassRate + ld de, wPlayerName + ld bc, NAME_LENGTH call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno. glitch) jp .captured .notOldManBattle ; If the player is fighting the ghost Marowak, set the value that indicates the ; Pokémon can't be caught and skip the capture calculations. - ld a,[wCurMap] - cp a,POKEMONTOWER_6 - jr nz,.loop - ld a,[wEnemyMonSpecies2] - cp a,MAROWAK - ld b,$10 ; can't be caught value - jp z,.setAnimData + ld a, [wCurMap] + cp POKEMONTOWER_6 + jr nz, .loop + ld a, [wEnemyMonSpecies2] + cp MAROWAK + ld b, $10 ; can't be caught value + jp z, .setAnimData ; Get the first random number. Let it be called Rand1. ; Rand1 must be within a certain range according the kind of ball being thrown. @@ -183,34 +183,34 @@ ItemUseBall: .loop call Random - ld b,a + ld b, a ; Get the item ID. - ld hl,wcf91 - ld a,[hl] + ld hl, wcf91 + ld a, [hl] ; The Master Ball always succeeds. - cp a,MASTER_BALL - jp z,.captured + cp MASTER_BALL + jp z, .captured ; Anything will do for the basic Poké Ball. - cp a,POKE_BALL - jr z,.checkForAilments + cp POKE_BALL + jr z, .checkForAilments ; If it's a Great/Ultra/Safari Ball and Rand1 is greater than 200, try again. - ld a,200 + ld a, 200 cp b - jr c,.loop + jr c, .loop ; Less than or equal to 200 is good enough for a Great Ball. - ld a,[hl] - cp a,GREAT_BALL - jr z,.checkForAilments + ld a, [hl] + cp GREAT_BALL + jr z, .checkForAilments ; If it's an Ultra/Safari Ball and Rand1 is greater than 150, try again. - ld a,150 + ld a, 150 cp b - jr c,.loop + jr c, .loop .checkForAilments ; Pokémon can be caught more easily with a status ailment. @@ -221,174 +221,174 @@ ItemUseBall: ; Burn/Paralysis/Poison: Status = 12 ; Freeze/Sleep: Status = 25 ; If Status is greater than Rand1, the Pokémon will be caught for sure. - ld a,[wEnemyMonStatus] + ld a, [wEnemyMonStatus] and a - jr z,.skipAilmentValueSubtraction ; no ailments - and a, 1 << FRZ | SLP - ld c,12 - jr z,.notFrozenOrAsleep - ld c,25 + jr z, .skipAilmentValueSubtraction ; no ailments + and 1 << FRZ | SLP + ld c, 12 + jr z, .notFrozenOrAsleep + ld c, 25 .notFrozenOrAsleep - ld a,b + ld a, b sub c - jp c,.captured - ld b,a + jp c, .captured + ld b, a .skipAilmentValueSubtraction push bc ; save (Rand1 - Status) ; Calculate MaxHP * 255. xor a - ld [H_MULTIPLICAND],a - ld hl,wEnemyMonMaxHP - ld a,[hli] - ld [H_MULTIPLICAND + 1],a - ld a,[hl] - ld [H_MULTIPLICAND + 2],a - ld a,255 - ld [H_MULTIPLIER],a + ld [H_MULTIPLICAND], a + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld [H_MULTIPLICAND + 1], a + ld a, [hl] + ld [H_MULTIPLICAND + 2], a + ld a, 255 + ld [H_MULTIPLIER], a call Multiply ; Determine BallFactor. It's 8 for Great Balls and 12 for the others. - ld a,[wcf91] - cp a,GREAT_BALL - ld a,12 - jr nz,.skip1 - ld a,8 + ld a, [wcf91] + cp GREAT_BALL + ld a, 12 + jr nz, .skip1 + ld a, 8 .skip1 ; Note that the results of all division operations are floored. ; Calculate (MaxHP * 255) / BallFactor. - ld [H_DIVISOR],a - ld b,4 ; number of bytes in dividend + ld [H_DIVISOR], a + ld b, 4 ; number of bytes in dividend call Divide ; Divide the enemy's current HP by 4. HP is not supposed to exceed 999 so ; the result should fit in a. If the division results in a quotient of 0, ; change it to 1. - ld hl,wEnemyMonHP - ld a,[hli] - ld b,a - ld a,[hl] + ld hl, wEnemyMonHP + ld a, [hli] + ld b, a + ld a, [hl] srl b rr a srl b rr a and a - jr nz,.skip2 + jr nz, .skip2 inc a .skip2 ; Let W = ((MaxHP * 255) / BallFactor) / max(HP / 4, 1). Calculate W. - ld [H_DIVISOR],a - ld b,4 + ld [H_DIVISOR], a + ld b, 4 call Divide ; If W > 255, store 255 in [H_QUOTIENT + 3]. ; Let X = min(W, 255) = [H_QUOTIENT + 3]. - ld a,[H_QUOTIENT + 2] + ld a, [H_QUOTIENT + 2] and a - jr z,.skip3 - ld a,255 - ld [H_QUOTIENT + 3],a + jr z, .skip3 + ld a, 255 + ld [H_QUOTIENT + 3], a .skip3 pop bc ; b = Rand1 - Status ; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon. - ld a,[wEnemyMonCatchRate] + ld a, [wEnemyMonCatchRate] cp b - jr c,.failedToCapture + jr c, .failedToCapture ; If W > 255, the ball captures the Pokémon. - ld a,[H_QUOTIENT + 2] + ld a, [H_QUOTIENT + 2] and a - jr nz,.captured + jr nz, .captured call Random ; Let this random number be called Rand2. ; If Rand2 > X, the ball fails to capture the Pokémon. - ld b,a - ld a,[H_QUOTIENT + 3] + ld b, a + ld a, [H_QUOTIENT + 3] cp b - jr c,.failedToCapture + jr c, .failedToCapture .captured jr .skipShakeCalculations .failedToCapture - ld a,[H_QUOTIENT + 3] - ld [wPokeBallCaptureCalcTemp],a ; Save X. + ld a, [H_QUOTIENT + 3] + ld [wPokeBallCaptureCalcTemp], a ; Save X. ; Calculate CatchRate * 100. xor a - ld [H_MULTIPLICAND],a - ld [H_MULTIPLICAND + 1],a - ld a,[wEnemyMonCatchRate] - ld [H_MULTIPLICAND + 2],a - ld a,100 - ld [H_MULTIPLIER],a + ld [H_MULTIPLICAND], a + ld [H_MULTIPLICAND + 1], a + ld a, [wEnemyMonCatchRate] + ld [H_MULTIPLICAND + 2], a + ld a, 100 + ld [H_MULTIPLIER], a call Multiply ; Determine BallFactor2. ; Poké Ball: BallFactor2 = 255 ; Great Ball: BallFactor2 = 200 ; Ultra/Safari Ball: BallFactor2 = 150 - ld a,[wcf91] - ld b,255 - cp a,POKE_BALL - jr z,.skip4 - ld b,200 - cp a,GREAT_BALL - jr z,.skip4 - ld b,150 - cp a,ULTRA_BALL - jr z,.skip4 + ld a, [wcf91] + ld b, 255 + cp POKE_BALL + jr z, .skip4 + ld b, 200 + cp GREAT_BALL + jr z, .skip4 + ld b, 150 + cp ULTRA_BALL + jr z, .skip4 .skip4 ; Let Y = (CatchRate * 100) / BallFactor2. Calculate Y. - ld a,b - ld [H_DIVISOR],a - ld b,4 + ld a, b + ld [H_DIVISOR], a + ld b, 4 call Divide ; If Y > 255, there are 3 shakes. ; Note that this shouldn't be possible. ; The maximum value of Y is (255 * 100) / 150 = 170. - ld a,[H_QUOTIENT + 2] + ld a, [H_QUOTIENT + 2] and a - ld b,$63 ; 3 shakes - jr nz,.setAnimData + ld b, $63 ; 3 shakes + jr nz, .setAnimData ; Calculate X * Y. - ld a,[wPokeBallCaptureCalcTemp] - ld [H_MULTIPLIER],a + ld a, [wPokeBallCaptureCalcTemp] + ld [H_MULTIPLIER], a call Multiply ; Calculate (X * Y) / 255. - ld a,255 - ld [H_DIVISOR],a - ld b,4 + ld a, 255 + ld [H_DIVISOR], a + ld b, 4 call Divide ; Determine Status2. ; no status ailment: Status2 = 0 ; Burn/Paralysis/Poison: Status2 = 5 ; Freeze/Sleep: Status2 = 10 - ld a,[wEnemyMonStatus] + ld a, [wEnemyMonStatus] and a - jr z,.skip5 - and a, 1 << FRZ | SLP - ld b,5 - jr z,.addAilmentValue - ld b,10 + jr z, .skip5 + and 1 << FRZ | SLP + ld b, 5 + jr z, .addAilmentValue + ld b, 10 .addAilmentValue ; If the Pokémon has a status ailment, add Status2. - ld a,[H_QUOTIENT + 3] + ld a, [H_QUOTIENT + 3] add b - ld [H_QUOTIENT + 3],a + ld [H_QUOTIENT + 3], a .skip5 ; Finally determine the number of shakes. @@ -398,71 +398,71 @@ ItemUseBall: ; 10 ≤ Z < 30: 1 shake ; 30 ≤ Z < 70: 2 shakes ; 70 ≤ Z: 3 shakes - ld a,[H_QUOTIENT + 3] - cp a,10 - ld b,$20 - jr c,.setAnimData - cp a,30 - ld b,$61 - jr c,.setAnimData - cp a,70 - ld b,$62 - jr c,.setAnimData - ld b,$63 + ld a, [H_QUOTIENT + 3] + cp 10 + ld b, $20 + jr c, .setAnimData + cp 30 + ld b, $61 + jr c, .setAnimData + cp 70 + ld b, $62 + jr c, .setAnimData + ld b, $63 .setAnimData - ld a,b - ld [wPokeBallAnimData],a + ld a, b + ld [wPokeBallAnimData], a .skipShakeCalculations - ld c,20 + ld c, 20 call DelayFrames ; Do the animation. - ld a,TOSS_ANIM - ld [wAnimationID],a + ld a, TOSS_ANIM + ld [wAnimationID], a xor a - ld [H_WHOSETURN],a - ld [wAnimationType],a - ld [wDamageMultipliers],a - ld a,[wWhichPokemon] + ld [H_WHOSETURN], a + ld [wAnimationType], a + ld [wDamageMultipliers], a + ld a, [wWhichPokemon] push af - ld a,[wcf91] + ld a, [wcf91] push af predef MoveAnimation pop af - ld [wcf91],a + ld [wcf91], a pop af - ld [wWhichPokemon],a + ld [wWhichPokemon], a ; Determine the message to display from the animation. - ld a,[wPokeBallAnimData] - cp a,$10 - ld hl,ItemUseBallText00 - jp z,.printMessage - cp a,$20 - ld hl,ItemUseBallText01 - jp z,.printMessage - cp a,$61 - ld hl,ItemUseBallText02 - jp z,.printMessage - cp a,$62 - ld hl,ItemUseBallText03 - jp z,.printMessage - cp a,$63 - ld hl,ItemUseBallText04 - jp z,.printMessage + ld a, [wPokeBallAnimData] + cp $10 + ld hl, ItemUseBallText00 + jp z, .printMessage + cp $20 + ld hl, ItemUseBallText01 + jp z, .printMessage + cp $61 + ld hl, ItemUseBallText02 + jp z, .printMessage + cp $62 + ld hl, ItemUseBallText03 + jp z, .printMessage + cp $63 + ld hl, ItemUseBallText04 + jp z, .printMessage ; Save current HP. - ld hl,wEnemyMonHP - ld a,[hli] + ld hl, wEnemyMonHP + ld a, [hli] push af - ld a,[hli] + ld a, [hli] push af ; Save status ailment. inc hl - ld a,[hl] + ld a, [hl] push af push hl @@ -470,86 +470,86 @@ ItemUseBall: ; If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. ; This is a bug because a wild Pokémon could have used Transform via ; Mirror Move even though the only wild Pokémon that knows Transform is Ditto. - ld hl,wEnemyBattleStatus3 - bit Transformed,[hl] - jr z,.notTransformed - ld a,DITTO - ld [wEnemyMonSpecies2],a + ld hl, wEnemyBattleStatus3 + bit TRANSFORMED, [hl] + jr z, .notTransformed + ld a, DITTO + ld [wEnemyMonSpecies2], a jr .skip6 .notTransformed ; If the Pokémon is not transformed, set the transformed bit and copy the ; DVs to wTransformedEnemyMonOriginalDVs so that LoadEnemyMonData won't generate ; new DVs. - set Transformed,[hl] - ld hl,wTransformedEnemyMonOriginalDVs - ld a,[wEnemyMonDVs] - ld [hli],a - ld a,[wEnemyMonDVs + 1] - ld [hl],a + set TRANSFORMED, [hl] + ld hl, wTransformedEnemyMonOriginalDVs + ld a, [wEnemyMonDVs] + ld [hli], a + ld a, [wEnemyMonDVs + 1] + ld [hl], a .skip6 - ld a,[wcf91] + ld a, [wcf91] push af - ld a,[wEnemyMonSpecies2] - ld [wcf91],a - ld a,[wEnemyMonLevel] - ld [wCurEnemyLVL],a + ld a, [wEnemyMonSpecies2] + ld [wcf91], a + ld a, [wEnemyMonLevel] + ld [wCurEnemyLVL], a callab LoadEnemyMonData pop af - ld [wcf91],a + ld [wcf91], a pop hl pop af - ld [hld],a + ld [hld], a dec hl pop af - ld [hld],a + ld [hld], a pop af - ld [hl],a - ld a,[wEnemyMonSpecies] - ld [wCapturedMonSpecies],a - ld [wcf91],a - ld [wd11e],a - ld a,[wBattleType] + ld [hl], a + ld a, [wEnemyMonSpecies] + ld [wCapturedMonSpecies], a + ld [wcf91], a + ld [wd11e], a + ld a, [wBattleType] dec a ; is this the old man battle? - jr z,.oldManCaughtMon ; if so, don't give the player the caught Pokémon + jr z, .oldManCaughtMon ; if so, don't give the player the caught Pokémon - ld hl,ItemUseBallText05 + ld hl, ItemUseBallText05 call PrintText ; Add the caught Pokémon to the Pokédex. predef IndexToPokedex - ld a,[wd11e] + ld a, [wd11e] dec a - ld c,a - ld b,FLAG_TEST - ld hl,wPokedexOwned + ld c, a + ld b, FLAG_TEST + ld hl, wPokedexOwned predef FlagActionPredef - ld a,c + ld a, c push af - ld a,[wd11e] + ld a, [wd11e] dec a - ld c,a - ld b,FLAG_SET + ld c, a + ld b, FLAG_SET predef FlagActionPredef pop af and a ; was the Pokémon already in the Pokédex? - jr nz,.skipShowingPokedexData ; if so, don't show the Pokédex data + jr nz, .skipShowingPokedexData ; if so, don't show the Pokédex data - ld hl,ItemUseBallText06 + ld hl, ItemUseBallText06 call PrintText call ClearSprites - ld a,[wEnemyMonSpecies] - ld [wd11e],a + ld a, [wEnemyMonSpecies] + ld [wd11e], a predef ShowPokedexData .skipShowingPokedexData - ld a,[wPartyCount] - cp a,PARTY_LENGTH ; is party full? - jr z,.sendToBox + ld a, [wPartyCount] + cp PARTY_LENGTH ; is party full? + jr z, .sendToBox xor a ; PLAYER_PARTY_DATA - ld [wMonDataLocation],a + ld [wMonDataLocation], a call ClearSprites call AddPartyMon jr .done @@ -557,30 +557,30 @@ ItemUseBall: .sendToBox call ClearSprites call SendNewMonToBox - ld hl,ItemUseBallText07 + ld hl, ItemUseBallText07 CheckEvent EVENT_MET_BILL - jr nz,.printTransferredToPCText - ld hl,ItemUseBallText08 + jr nz, .printTransferredToPCText + ld hl, ItemUseBallText08 .printTransferredToPCText call PrintText jr .done .oldManCaughtMon - ld hl,ItemUseBallText05 + ld hl, ItemUseBallText05 .printMessage call PrintText call ClearSprites .done - ld a,[wBattleType] + ld a, [wBattleType] and a ; is this the old man battle? ret nz ; if so, don't remove a ball from the bag ; Remove a ball from the bag. - ld hl,wNumBagItems + ld hl, wNumBagItems inc a - ld [wItemQuantity],a + ld [wItemQuantity], a jp RemoveItemFromInventory ItemUseBallText00: @@ -629,119 +629,119 @@ ItemUseBallText06: db "@" ItemUseTownMap: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime + jp nz, ItemUseNotTime jpba DisplayTownMap ItemUseBicycle: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime - ld a,[wWalkBikeSurfState] - ld [wWalkBikeSurfStateCopy],a - cp a,2 ; is the player surfing? - jp z,ItemUseNotTime + jp nz, ItemUseNotTime + ld a, [wWalkBikeSurfState] + ld [wWalkBikeSurfStateCopy], a + cp 2 ; is the player surfing? + jp z, ItemUseNotTime dec a ; is player already bicycling? - jr nz,.tryToGetOnBike + jr nz, .tryToGetOnBike .getOffBike call ItemUseReloadOverworldData xor a - ld [wWalkBikeSurfState],a ; change player state to walking + ld [wWalkBikeSurfState], a ; change player state to walking call PlayDefaultMusic ; play walking music - ld hl,GotOffBicycleText + ld hl, GotOffBicycleText jr .printText .tryToGetOnBike call IsBikeRidingAllowed - jp nc,NoCyclingAllowedHere + jp nc, NoCyclingAllowedHere call ItemUseReloadOverworldData xor a ; no keys pressed - ld [hJoyHeld],a ; current joypad state + ld [hJoyHeld], a ; current joypad state inc a - ld [wWalkBikeSurfState],a ; change player state to bicycling - ld hl,GotOnBicycleText + ld [wWalkBikeSurfState], a ; change player state to bicycling + ld hl, GotOnBicycleText call PlayDefaultMusic ; play bike riding music .printText jp PrintText ; used for Surf out-of-battle effect ItemUseSurfboard: - ld a,[wWalkBikeSurfState] - ld [wWalkBikeSurfStateCopy],a - cp a,2 ; is the player already surfing? - jr z,.tryToStopSurfing + ld a, [wWalkBikeSurfState] + ld [wWalkBikeSurfStateCopy], a + cp 2 ; is the player already surfing? + jr z, .tryToStopSurfing .tryToSurf call IsNextTileShoreOrWater - jp c,SurfingAttemptFailed - ld hl,TilePairCollisionsWater + jp c, SurfingAttemptFailed + ld hl, TilePairCollisionsWater call CheckForTilePairCollisions - jp c,SurfingAttemptFailed + jp c, SurfingAttemptFailed .surf call .makePlayerMoveForward - ld hl,wd730 - set 7,[hl] - ld a,2 - ld [wWalkBikeSurfState],a ; change player state to surfing + ld hl, wd730 + set 7, [hl] + ld a, 2 + ld [wWalkBikeSurfState], a ; change player state to surfing call PlayDefaultMusic ; play surfing music - ld hl,SurfingGotOnText + ld hl, SurfingGotOnText jp PrintText .tryToStopSurfing xor a - ld [hSpriteIndexOrTextID],a - ld d,16 ; talking range in pixels (normal range) + ld [hSpriteIndexOrTextID], a + ld d, 16 ; talking range in pixels (normal range) call IsSpriteInFrontOfPlayer2 - res 7,[hl] - ld a,[hSpriteIndexOrTextID] + res 7, [hl] + ld a, [hSpriteIndexOrTextID] and a ; is there a sprite in the way? - jr nz,.cannotStopSurfing - ld hl,TilePairCollisionsWater + jr nz, .cannotStopSurfing + ld hl, TilePairCollisionsWater call CheckForTilePairCollisions - jr c,.cannotStopSurfing - ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles - ld a,[hli] - ld h,[hl] - ld l,a ; hl now points to passable tiles - ld a,[wTileInFrontOfPlayer] ; tile in front of the player - ld b,a + jr c, .cannotStopSurfing + ld hl, wTilesetCollisionPtr ; pointer to list of passable tiles + ld a, [hli] + ld h, [hl] + ld l, a ; hl now points to passable tiles + ld a, [wTileInFrontOfPlayer] ; tile in front of the player + ld b, a .passableTileLoop - ld a,[hli] + ld a, [hli] cp b - jr z,.stopSurfing - cp a,$ff - jr nz,.passableTileLoop + jr z, .stopSurfing + cp $ff + jr nz, .passableTileLoop .cannotStopSurfing - ld hl,SurfingNoPlaceToGetOffText + ld hl, SurfingNoPlaceToGetOffText jp PrintText .stopSurfing call .makePlayerMoveForward - ld hl,wd730 - set 7,[hl] + ld hl, wd730 + set 7, [hl] xor a - ld [wWalkBikeSurfState],a ; change player state to walking + ld [wWalkBikeSurfState], a ; change player state to walking dec a - ld [wJoyIgnore],a + ld [wJoyIgnore], a call PlayDefaultMusic ; play walking music jp LoadWalkingPlayerSpriteGraphics ; uses a simulated button press to make the player move forward .makePlayerMoveForward - ld a,[wPlayerDirection] ; direction the player is going - bit PLAYER_DIR_BIT_UP,a - ld b,D_UP - jr nz,.storeSimulatedButtonPress - bit PLAYER_DIR_BIT_DOWN,a - ld b,D_DOWN - jr nz,.storeSimulatedButtonPress - bit PLAYER_DIR_BIT_LEFT,a - ld b,D_LEFT - jr nz,.storeSimulatedButtonPress - ld b,D_RIGHT + ld a, [wPlayerDirection] ; direction the player is going + bit PLAYER_DIR_BIT_UP, a + ld b, D_UP + jr nz, .storeSimulatedButtonPress + bit PLAYER_DIR_BIT_DOWN, a + ld b, D_DOWN + jr nz, .storeSimulatedButtonPress + bit PLAYER_DIR_BIT_LEFT, a + ld b, D_LEFT + jr nz, .storeSimulatedButtonPress + ld b, D_RIGHT .storeSimulatedButtonPress - ld a,b - ld [wSimulatedJoypadStatesEnd],a + ld a, b + ld [wSimulatedJoypadStatesEnd], a xor a - ld [wWastedByteCD39],a + ld [wWastedByteCD39], a inc a - ld [wSimulatedJoypadStatesIndex],a + ld [wSimulatedJoypadStatesIndex], a ret SurfingGotOnText: @@ -756,73 +756,73 @@ ItemUsePokedex: predef_jump ShowPokedexMenu ItemUseEvoStone: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime - ld a,[wWhichPokemon] + jp nz, ItemUseNotTime + ld a, [wWhichPokemon] push af - ld a,[wcf91] - ld [wEvoStoneItemID],a + ld a, [wcf91] + ld [wEvoStoneItemID], a push af - ld a,EVO_STONE_PARTY_MENU - ld [wPartyMenuTypeOrMessageID],a - ld a,$ff - ld [wUpdateSpritesEnabled],a + ld a, EVO_STONE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a + ld a, $ff + ld [wUpdateSpritesEnabled], a call DisplayPartyMenu pop bc - jr c,.canceledItemUse - ld a,b - ld [wcf91],a - ld a,$01 - ld [wForceEvolution],a - ld a,SFX_HEAL_AILMENT + jr c, .canceledItemUse + ld a, b + ld [wcf91], a + ld a, $01 + ld [wForceEvolution], a + ld a, SFX_HEAL_AILMENT call PlaySoundWaitForCurrent call WaitForSoundToFinish callab TryEvolvingMon ; try to evolve pokemon - ld a,[wEvolutionOccurred] + ld a, [wEvolutionOccurred] and a - jr z,.noEffect + jr z, .noEffect pop af - ld [wWhichPokemon],a - ld hl,wNumBagItems - ld a,1 ; remove 1 stone - ld [wItemQuantity],a + ld [wWhichPokemon], a + ld hl, wNumBagItems + ld a, 1 ; remove 1 stone + ld [wItemQuantity], a jp RemoveItemFromInventory .noEffect call ItemUseNoEffect .canceledItemUse xor a - ld [wActionResultOrTookBattleTurn],a ; item not used + ld [wActionResultOrTookBattleTurn], a ; item not used pop af ret ItemUseVitamin: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime + jp nz, ItemUseNotTime ItemUseMedicine: - ld a,[wPartyCount] + ld a, [wPartyCount] and a - jp z,.emptyParty - ld a,[wWhichPokemon] + jp z, .emptyParty + ld a, [wWhichPokemon] push af - ld a,[wcf91] + ld a, [wcf91] push af - ld a,USE_ITEM_PARTY_MENU - ld [wPartyMenuTypeOrMessageID],a - ld a,$ff - ld [wUpdateSpritesEnabled],a - ld a,[wPseudoItemID] + ld a, USE_ITEM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a + ld a, $ff + ld [wUpdateSpritesEnabled], a + ld a, [wPseudoItemID] and a ; using Softboiled? - jr z,.notUsingSoftboiled + jr z, .notUsingSoftboiled ; if using softboiled call GoBackToPartyMenu jr .getPartyMonDataAddress .emptyParty - ld hl,.emptyPartyText + ld hl, .emptyPartyText xor a - ld [wActionResultOrTookBattleTurn],a ; item use failed + ld [wActionResultOrTookBattleTurn], a ; item use failed jp PrintText .emptyPartyText text "You don't have" @@ -831,121 +831,121 @@ ItemUseMedicine: .notUsingSoftboiled call DisplayPartyMenu .getPartyMonDataAddress - jp c,.canceledItemUse - ld hl,wPartyMons - ld bc,wPartyMon2 - wPartyMon1 - ld a,[wWhichPokemon] + jp c, .canceledItemUse + ld hl, wPartyMons + ld bc, wPartyMon2 - wPartyMon1 + ld a, [wWhichPokemon] call AddNTimes - ld a,[wWhichPokemon] - ld [wUsedItemOnWhichPokemon],a - ld d,a - ld a,[wcf91] - ld e,a - ld [wd0b5],a + ld a, [wWhichPokemon] + ld [wUsedItemOnWhichPokemon], a + ld d, a + ld a, [wcf91] + ld e, a + ld [wd0b5], a pop af - ld [wcf91],a + ld [wcf91], a pop af - ld [wWhichPokemon],a - ld a,[wPseudoItemID] + ld [wWhichPokemon], a + ld a, [wPseudoItemID] and a ; using Softboiled? - jr z,.checkItemType + jr z, .checkItemType ; if using softboiled - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] cp d ; is the pokemon trying to use softboiled on itself? - jr z,ItemUseMedicine ; if so, force another choice + jr z, ItemUseMedicine ; if so, force another choice .checkItemType - ld a,[wcf91] - cp a,REVIVE - jr nc,.healHP ; if it's a Revive or Max Revive - cp a,FULL_HEAL - jr z,.cureStatusAilment ; if it's a Full Heal - cp a,HP_UP - jp nc,.useVitamin ; if it's a vitamin or Rare Candy - cp a,FULL_RESTORE - jr nc,.healHP ; if it's a Full Restore or one of the potions -; fall through if it's one of the status-specifc healing items + ld a, [wcf91] + cp REVIVE + jr nc, .healHP ; if it's a Revive or Max Revive + cp FULL_HEAL + jr z, .cureStatusAilment ; if it's a Full Heal + cp HP_UP + jp nc, .useVitamin ; if it's a vitamin or Rare Candy + cp FULL_RESTORE + jr nc, .healHP ; if it's a Full Restore or one of the potions +; fall through if it's one of the status-specific healing items .cureStatusAilment - ld bc,wPartyMon1Status - wPartyMon1 - add hl,bc ; hl now points to status - ld a,[wcf91] + ld bc, wPartyMon1Status - wPartyMon1 + add hl, bc ; hl now points to status + ld a, [wcf91] lb bc, ANTIDOTE_MSG, 1 << PSN - cp a,ANTIDOTE - jr z,.checkMonStatus + cp ANTIDOTE + jr z, .checkMonStatus lb bc, BURN_HEAL_MSG, 1 << BRN - cp a,BURN_HEAL - jr z,.checkMonStatus + cp BURN_HEAL + jr z, .checkMonStatus lb bc, ICE_HEAL_MSG, 1 << FRZ - cp a,ICE_HEAL - jr z,.checkMonStatus + cp ICE_HEAL + jr z, .checkMonStatus lb bc, AWAKENING_MSG, SLP - cp a,AWAKENING - jr z,.checkMonStatus + cp AWAKENING + jr z, .checkMonStatus lb bc, PARALYZ_HEAL_MSG, 1 << PAR - cp a,PARLYZ_HEAL - jr z,.checkMonStatus + cp PARLYZ_HEAL + jr z, .checkMonStatus lb bc, FULL_HEAL_MSG, $ff ; Full Heal .checkMonStatus - ld a,[hl] ; pokemon's status + ld a, [hl] ; pokemon's status and c ; does the pokemon have a status ailment the item can cure? - jp z,.healingItemNoEffect + jp z, .healingItemNoEffect ; if the pokemon has a status the item can heal xor a - ld [hl],a ; remove the status ailment in the party data - ld a,b - ld [wPartyMenuTypeOrMessageID],a ; the message to display for the item used - ld a,[wPlayerMonNumber] + ld [hl], a ; remove the status ailment in the party data + ld a, b + ld [wPartyMenuTypeOrMessageID], a ; the message to display for the item used + ld a, [wPlayerMonNumber] cp d ; is pokemon the item was used on active in battle? - jp nz,.doneHealing + jp nz, .doneHealing ; if it is active in battle xor a - ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data + ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data push hl - ld hl,wPlayerBattleStatus3 - res BadlyPoisoned,[hl] ; heal Toxic status + ld hl, wPlayerBattleStatus3 + res BADLY_POISONED, [hl] ; heal Toxic status pop hl - ld bc,wPartyMon1Stats - wPartyMon1Status - add hl,bc ; hl now points to party stats - ld de,wBattleMonStats - ld bc,NUM_STATS * 2 + ld bc, wPartyMon1Stats - wPartyMon1Status + add hl, bc ; hl now points to party stats + ld de, wBattleMonStats + ld bc, NUM_STATS * 2 call CopyData ; copy party stats to in-battle stat data predef DoubleOrHalveSelectedStats jp .doneHealing .healHP inc hl ; hl = address of current HP - ld a,[hli] - ld b,a - ld [wHPBarOldHP+1],a - ld a,[hl] - ld c,a - ld [wHPBarOldHP],a ; current HP stored at wHPBarOldHP (2 bytes, big-endian) + ld a, [hli] + ld b, a + ld [wHPBarOldHP+1], a + ld a, [hl] + ld c, a + ld [wHPBarOldHP], a ; current HP stored at wHPBarOldHP (2 bytes, big-endian) or b - jr nz,.notFainted + jr nz, .notFainted .fainted - ld a,[wcf91] - cp a,REVIVE - jr z,.updateInBattleFaintedData - cp a,MAX_REVIVE - jr z,.updateInBattleFaintedData + ld a, [wcf91] + cp REVIVE + jr z, .updateInBattleFaintedData + cp MAX_REVIVE + jr z, .updateInBattleFaintedData jp .healingItemNoEffect .updateInBattleFaintedData - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jr z,.compareCurrentHPToMaxHP + jr z, .compareCurrentHPToMaxHP push hl push de push bc - ld a,[wUsedItemOnWhichPokemon] - ld c,a - ld hl,wPartyFoughtCurrentEnemyFlags - ld b,FLAG_TEST + ld a, [wUsedItemOnWhichPokemon] + ld c, a + ld hl, wPartyFoughtCurrentEnemyFlags + ld b, FLAG_TEST predef FlagActionPredef - ld a,c + ld a, c and a - jr z,.next - ld a,[wUsedItemOnWhichPokemon] - ld c,a - ld hl,wPartyGainExpFlags - ld b,FLAG_SET + jr z, .next + ld a, [wUsedItemOnWhichPokemon] + ld c, a + ld hl, wPartyGainExpFlags + ld b, FLAG_SET predef FlagActionPredef .next pop bc @@ -953,467 +953,467 @@ ItemUseMedicine: pop hl jr .compareCurrentHPToMaxHP .notFainted - ld a,[wcf91] - cp a,REVIVE - jp z,.healingItemNoEffect - cp a,MAX_REVIVE - jp z,.healingItemNoEffect + ld a, [wcf91] + cp REVIVE + jp z, .healingItemNoEffect + cp MAX_REVIVE + jp z, .healingItemNoEffect .compareCurrentHPToMaxHP push hl push bc - ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1) - add hl,bc ; hl now points to max HP + ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1) + add hl, bc ; hl now points to max HP pop bc - ld a,[hli] + ld a, [hli] cp b - jr nz,.skipComparingLSB ; no need to compare the LSB's if the MSB's don't match - ld a,[hl] + jr nz, .skipComparingLSB ; no need to compare the LSB's if the MSB's don't match + ld a, [hl] cp c .skipComparingLSB pop hl - jr nz,.notFullHP + jr nz, .notFullHP .fullHP ; if the pokemon's current HP equals its max HP - ld a,[wcf91] - cp a,FULL_RESTORE - jp nz,.healingItemNoEffect + ld a, [wcf91] + cp FULL_RESTORE + jp nz, .healingItemNoEffect inc hl inc hl - ld a,[hld] ; status ailment + ld a, [hld] ; status ailment and a ; does the pokemon have a status ailment? - jp z,.healingItemNoEffect - ld a,FULL_HEAL - ld [wcf91],a + jp z, .healingItemNoEffect + ld a, FULL_HEAL + ld [wcf91], a dec hl dec hl dec hl jp .cureStatusAilment .notFullHP ; if the pokemon's current HP doesn't equal its max HP xor a - ld [wDanger],a ;disable low health alarm - ld [wChannelSoundIDs + Ch4],a + ld [wDanger], a ;disable low health alarm + ld [wChannelSoundIDs + Ch4], a push hl push de - ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1) - add hl,bc ; hl now points to max HP - ld a,[hli] - ld [wHPBarMaxHP+1],a - ld a,[hl] - ld [wHPBarMaxHP],a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian) - ld a,[wPseudoItemID] + ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1) + add hl, bc ; hl now points to max HP + ld a, [hli] + ld [wHPBarMaxHP+1], a + ld a, [hl] + ld [wHPBarMaxHP], a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian) + ld a, [wPseudoItemID] and a ; using Softboiled? - jp z,.notUsingSoftboiled2 + jp z, .notUsingSoftboiled2 ; if using softboiled - ld hl,wHPBarMaxHP - ld a,[hli] + ld hl, wHPBarMaxHP + ld a, [hli] push af - ld a,[hli] + ld a, [hli] push af - ld a,[hli] + ld a, [hli] push af - ld a,[hl] + ld a, [hl] push af - ld hl,wPartyMon1MaxHP - ld a,[wWhichPokemon] - ld bc,wPartyMon2 - wPartyMon1 + ld hl, wPartyMon1MaxHP + ld a, [wWhichPokemon] + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes - ld a,[hli] - ld [wHPBarMaxHP + 1],a - ld [H_DIVIDEND],a - ld a,[hl] - ld [wHPBarMaxHP],a - ld [H_DIVIDEND + 1],a - ld a,5 - ld [H_DIVISOR],a - ld b,2 ; number of bytes + ld a, [hli] + ld [wHPBarMaxHP + 1], a + ld [H_DIVIDEND], a + ld a, [hl] + ld [wHPBarMaxHP], a + ld [H_DIVIDEND + 1], a + ld a, 5 + ld [H_DIVISOR], a + ld b, 2 ; number of bytes call Divide ; get 1/5 of max HP of pokemon that used Softboiled - ld bc,(wPartyMon1HP + 1) - (wPartyMon1MaxHP + 1) - add hl,bc ; hl now points to LSB of current HP of pokemon that used Softboiled + ld bc, (wPartyMon1HP + 1) - (wPartyMon1MaxHP + 1) + add hl, bc ; hl now points to LSB of current HP of pokemon that used Softboiled ; subtract 1/5 of max HP from current HP of pokemon that used Softboiled - ld a,[H_QUOTIENT + 3] + ld a, [H_QUOTIENT + 3] push af - ld b,a - ld a,[hl] - ld [wHPBarOldHP],a + ld b, a + ld a, [hl] + ld [wHPBarOldHP], a sub b - ld [hld],a - ld [wHPBarNewHP],a - ld a,[H_QUOTIENT + 2] - ld b,a - ld a,[hl] - ld [wHPBarOldHP+1],a + ld [hld], a + ld [wHPBarNewHP], a + ld a, [H_QUOTIENT + 2] + ld b, a + ld a, [hl] + ld [wHPBarOldHP+1], a sbc b - ld [hl],a - ld [wHPBarNewHP+1],a + ld [hl], a + ld [wHPBarNewHP+1], a coord hl, 4, 1 - ld a,[wWhichPokemon] - ld bc,2 * SCREEN_WIDTH + ld a, [wWhichPokemon] + ld bc, 2 * SCREEN_WIDTH call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled - ld a,SFX_HEAL_HP + ld a, SFX_HEAL_HP call PlaySoundWaitForCurrent - ld a,[hFlags_0xFFF6] - set 0,a - ld [hFlags_0xFFF6],a - ld a,$02 - ld [wHPBarType],a + ld a, [hFlags_0xFFF6] + set 0, a + ld [hFlags_0xFFF6], a + ld a, $02 + ld [wHPBarType], a predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled - ld a,[hFlags_0xFFF6] - res 0,a - ld [hFlags_0xFFF6],a + ld a, [hFlags_0xFFF6] + res 0, a + ld [hFlags_0xFFF6], a pop af - ld b,a ; store heal amount (1/5 of max HP) - ld hl,wHPBarOldHP + 1 + ld b, a ; store heal amount (1/5 of max HP) + ld hl, wHPBarOldHP + 1 pop af - ld [hld],a + ld [hld], a pop af - ld [hld],a + ld [hld], a pop af - ld [hld],a + ld [hld], a pop af - ld [hl],a + ld [hl], a jr .addHealAmount .notUsingSoftboiled2 - ld a,[wcf91] - cp a,SODA_POP - ld b,60 ; Soda Pop heal amount - jr z,.addHealAmount - ld b,80 ; Lemonade heal amount - jr nc,.addHealAmount - cp a,FRESH_WATER - ld b,50 ; Fresh Water heal amount - jr z,.addHealAmount - cp a,SUPER_POTION - ld b,200 ; Hyper Potion heal amount - jr c,.addHealAmount - ld b,50 ; Super Potion heal amount - jr z,.addHealAmount - ld b,20 ; Potion heal amount + ld a, [wcf91] + cp SODA_POP + ld b, 60 ; Soda Pop heal amount + jr z, .addHealAmount + ld b, 80 ; Lemonade heal amount + jr nc, .addHealAmount + cp FRESH_WATER + ld b, 50 ; Fresh Water heal amount + jr z, .addHealAmount + cp SUPER_POTION + ld b, 200 ; Hyper Potion heal amount + jr c, .addHealAmount + ld b, 50 ; Super Potion heal amount + jr z, .addHealAmount + ld b, 20 ; Potion heal amount .addHealAmount pop de pop hl - ld a,[hl] + ld a, [hl] add b - ld [hld],a - ld [wHPBarNewHP],a - ld a,[hl] - ld [wHPBarNewHP+1],a - jr nc,.noCarry + ld [hld], a + ld [wHPBarNewHP], a + ld a, [hl] + ld [wHPBarNewHP+1], a + jr nc, .noCarry inc [hl] - ld a,[hl] - ld [wHPBarNewHP + 1],a + ld a, [hl] + ld [wHPBarNewHP + 1], a .noCarry push de inc hl - ld d,h - ld e,l ; de now points to current HP - ld hl,(wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1) - add hl,de ; hl now points to max HP - ld a,[wcf91] - cp a,REVIVE - jr z,.setCurrentHPToHalfMaxHP - ld a,[hld] - ld b,a - ld a,[de] + ld d, h + ld e, l ; de now points to current HP + ld hl, (wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1) + add hl, de ; hl now points to max HP + ld a, [wcf91] + cp REVIVE + jr z, .setCurrentHPToHalfMaxHP + ld a, [hld] + ld b, a + ld a, [de] sub b dec de - ld b,[hl] - ld a,[de] + ld b, [hl] + ld a, [de] sbc b - jr nc,.setCurrentHPToMaxHp ; if current HP exceeds max HP after healing - ld a,[wcf91] - cp a,HYPER_POTION - jr c,.setCurrentHPToMaxHp ; if using a Full Restore or Max Potion - cp a,MAX_REVIVE - jr z,.setCurrentHPToMaxHp ; if using a Max Revive + jr nc, .setCurrentHPToMaxHp ; if current HP exceeds max HP after healing + ld a, [wcf91] + cp HYPER_POTION + jr c, .setCurrentHPToMaxHp ; if using a Full Restore or Max Potion + cp MAX_REVIVE + jr z, .setCurrentHPToMaxHp ; if using a Max Revive jr .updateInBattleData .setCurrentHPToHalfMaxHP dec hl dec de - ld a,[hli] + ld a, [hli] srl a - ld [de],a - ld [wHPBarNewHP+1],a - ld a,[hl] + ld [de], a + ld [wHPBarNewHP+1], a + ld a, [hl] rr a inc de - ld [de],a - ld [wHPBarNewHP],a + ld [de], a + ld [wHPBarNewHP], a dec de jr .doneHealingPartyHP .setCurrentHPToMaxHp - ld a,[hli] - ld [de],a - ld [wHPBarNewHP+1],a + ld a, [hli] + ld [de], a + ld [wHPBarNewHP+1], a inc de - ld a,[hl] - ld [de],a - ld [wHPBarNewHP],a + ld a, [hl] + ld [de], a + ld [wHPBarNewHP], a dec de .doneHealingPartyHP ; done updating the pokemon's current HP in the party data structure - ld a,[wcf91] - cp a,FULL_RESTORE - jr nz,.updateInBattleData - ld bc,wPartyMon1Status - (wPartyMon1MaxHP + 1) - add hl,bc + ld a, [wcf91] + cp FULL_RESTORE + jr nz, .updateInBattleData + ld bc, wPartyMon1Status - (wPartyMon1MaxHP + 1) + add hl, bc xor a - ld [hl],a ; remove the status ailment in the party data + ld [hl], a ; remove the status ailment in the party data .updateInBattleData - ld h,d - ld l,e + ld h, d + ld l, e pop de - ld a,[wPlayerMonNumber] + ld a, [wPlayerMonNumber] cp d ; is pokemon the item was used on active in battle? - jr nz,.calculateHPBarCoords + jr nz, .calculateHPBarCoords ; copy party HP to in-battle HP - ld a,[hli] - ld [wBattleMonHP],a - ld a,[hld] - ld [wBattleMonHP + 1],a - ld a,[wcf91] - cp a,FULL_RESTORE - jr nz,.calculateHPBarCoords + ld a, [hli] + ld [wBattleMonHP], a + ld a, [hld] + ld [wBattleMonHP + 1], a + ld a, [wcf91] + cp FULL_RESTORE + jr nz, .calculateHPBarCoords xor a - ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data + ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data .calculateHPBarCoords - ld hl,wOAMBuffer + $90 - ld bc,2 * SCREEN_WIDTH + ld hl, wOAMBuffer + $90 + ld bc, 2 * SCREEN_WIDTH inc d .calculateHPBarCoordsLoop - add hl,bc + add hl, bc dec d - jr nz,.calculateHPBarCoordsLoop + jr nz, .calculateHPBarCoordsLoop jr .doneHealing .healingItemNoEffect call ItemUseNoEffect jp .done .doneHealing - ld a,[wPseudoItemID] + ld a, [wPseudoItemID] and a ; using Softboiled? - jr nz,.skipRemovingItem ; no item to remove if using Softboiled + jr nz, .skipRemovingItem ; no item to remove if using Softboiled push hl call RemoveUsedItem pop hl .skipRemovingItem - ld a,[wcf91] - cp a,FULL_RESTORE - jr c,.playStatusAilmentCuringSound - cp a,FULL_HEAL - jr z,.playStatusAilmentCuringSound - ld a,SFX_HEAL_HP + ld a, [wcf91] + cp FULL_RESTORE + jr c, .playStatusAilmentCuringSound + cp FULL_HEAL + jr z, .playStatusAilmentCuringSound + ld a, SFX_HEAL_HP call PlaySoundWaitForCurrent - ld a,[hFlags_0xFFF6] - set 0,a - ld [hFlags_0xFFF6],a - ld a,$02 - ld [wHPBarType],a + ld a, [hFlags_0xFFF6] + set 0, a + ld [hFlags_0xFFF6], a + ld a, $02 + ld [wHPBarType], a predef UpdateHPBar2 ; animate the HP bar lengthening - ld a,[hFlags_0xFFF6] - res 0,a - ld [hFlags_0xFFF6],a - ld a,REVIVE_MSG - ld [wPartyMenuTypeOrMessageID],a - ld a,[wcf91] - cp a,REVIVE - jr z,.showHealingItemMessage - cp a,MAX_REVIVE - jr z,.showHealingItemMessage - ld a,POTION_MSG - ld [wPartyMenuTypeOrMessageID],a + ld a, [hFlags_0xFFF6] + res 0, a + ld [hFlags_0xFFF6], a + ld a, REVIVE_MSG + ld [wPartyMenuTypeOrMessageID], a + ld a, [wcf91] + cp REVIVE + jr z, .showHealingItemMessage + cp MAX_REVIVE + jr z, .showHealingItemMessage + ld a, POTION_MSG + ld [wPartyMenuTypeOrMessageID], a jr .showHealingItemMessage .playStatusAilmentCuringSound - ld a,SFX_HEAL_AILMENT + ld a, SFX_HEAL_AILMENT call PlaySoundWaitForCurrent .showHealingItemMessage xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen dec a - ld [wUpdateSpritesEnabled],a + ld [wUpdateSpritesEnabled], a call RedrawPartyMenu ; redraws the party menu and displays the message - ld a,1 - ld [H_AUTOBGTRANSFERENABLED],a - ld c,50 + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a + ld c, 50 call DelayFrames call WaitForTextScrollButtonPress jr .done .canceledItemUse xor a - ld [wActionResultOrTookBattleTurn],a ; item use failed + ld [wActionResultOrTookBattleTurn], a ; item use failed pop af pop af .done - ld a,[wPseudoItemID] + ld a, [wPseudoItemID] and a ; using Softboiled? ret nz ; if so, return call GBPalWhiteOut - call z,RunDefaultPaletteCommand - ld a,[wIsInBattle] + call z, RunDefaultPaletteCommand + ld a, [wIsInBattle] and a ret nz jp ReloadMapData .useVitamin push hl - ld a,[hl] - ld [wd0b5],a - ld [wd11e],a - ld bc,wPartyMon1Level - wPartyMon1 - add hl,bc ; hl now points to level - ld a,[hl] ; a = level - ld [wCurEnemyLVL],a ; store level + ld a, [hl] + ld [wd0b5], a + ld [wd11e], a + ld bc, wPartyMon1Level - wPartyMon1 + add hl, bc ; hl now points to level + ld a, [hl] ; a = level + ld [wCurEnemyLVL], a ; store level call GetMonHeader push de - ld a,d - ld hl,wPartyMonNicks + ld a, d + ld hl, wPartyMonNicks call GetPartyMonName pop de pop hl - ld a,[wcf91] - cp a,RARE_CANDY - jp z,.useRareCandy + ld a, [wcf91] + cp RARE_CANDY + jp z, .useRareCandy push hl - sub a,HP_UP + sub HP_UP add a - ld bc,wPartyMon1HPExp - wPartyMon1 - add hl,bc + ld bc, wPartyMon1HPExp - wPartyMon1 + add hl, bc add l - ld l,a - jr nc,.noCarry2 + ld l, a + jr nc, .noCarry2 inc h .noCarry2 - ld a,10 - ld b,a - ld a,[hl] ; a = MSB of stat experience of the appropriate stat - cp a,100 ; is there already at least 25600 (256 * 100) stat experience? - jr nc,.vitaminNoEffect ; if so, vitamins can't add any more + ld a, 10 + ld b, a + ld a, [hl] ; a = MSB of stat experience of the appropriate stat + cp 100 ; is there already at least 25600 (256 * 100) stat experience? + jr nc, .vitaminNoEffect ; if so, vitamins can't add any more add b ; add 2560 (256 * 10) stat experience - jr nc,.noCarry3 ; a carry should be impossible here, so this will always jump - ld a,255 + jr nc, .noCarry3 ; a carry should be impossible here, so this will always jump + ld a, 255 .noCarry3 - ld [hl],a + ld [hl], a pop hl call .recalculateStats - ld hl,VitaminText - ld a,[wcf91] - sub a,HP_UP - 1 - ld c,a + ld hl, VitaminText + ld a, [wcf91] + sub HP_UP - 1 + ld c, a .statNameLoop ; loop to get the address of the name of the stat the vitamin increases dec c - jr z,.gotStatName + jr z, .gotStatName .statNameInnerLoop - ld a,[hli] - ld b,a - ld a,$50 + ld a, [hli] + ld b, a + ld a, $50 cp b - jr nz,.statNameInnerLoop + jr nz, .statNameInnerLoop jr .statNameLoop .gotStatName - ld de,wcf4b - ld bc,10 + ld de, wcf4b + ld bc, 10 call CopyData ; copy the stat's name to wcf4b - ld a,SFX_HEAL_AILMENT + ld a, SFX_HEAL_AILMENT call PlaySound - ld hl,VitaminStatRoseText + ld hl, VitaminStatRoseText call PrintText jp RemoveUsedItem .vitaminNoEffect pop hl - ld hl,VitaminNoEffectText + ld hl, VitaminNoEffectText call PrintText jp GBPalWhiteOut .recalculateStats - ld bc,wPartyMon1Stats - wPartyMon1 - add hl,bc - ld d,h - ld e,l ; de now points to stats - ld bc,(wPartyMon1Exp + 2) - wPartyMon1Stats - add hl,bc ; hl now points to LSB of experience - ld b,1 + ld bc, wPartyMon1Stats - wPartyMon1 + add hl, bc + ld d, h + ld e, l ; de now points to stats + ld bc, (wPartyMon1Exp + 2) - wPartyMon1Stats + add hl, bc ; hl now points to LSB of experience + ld b, 1 jp CalcStats ; recalculate stats .useRareCandy push hl - ld bc,wPartyMon1Level - wPartyMon1 - add hl,bc ; hl now points to level - ld a,[hl] ; a = level - cp a, MAX_LEVEL - jr z,.vitaminNoEffect ; can't raise level above 100 + ld bc, wPartyMon1Level - wPartyMon1 + add hl, bc ; hl now points to level + ld a, [hl] ; a = level + cp MAX_LEVEL + jr z, .vitaminNoEffect ; can't raise level above 100 inc a - ld [hl],a ; store incremented level - ld [wCurEnemyLVL],a + ld [hl], a ; store incremented level + ld [wCurEnemyLVL], a push hl push de - ld d,a + ld d, a callab CalcExperience ; calculate experience for next level and store it at $ff96 pop de pop hl - ld bc,wPartyMon1Exp - wPartyMon1Level - add hl,bc ; hl now points to MSB of experience + ld bc, wPartyMon1Exp - wPartyMon1Level + add hl, bc ; hl now points to MSB of experience ; update experience to minimum for new level - ld a,[hExperience] - ld [hli],a - ld a,[hExperience + 1] - ld [hli],a - ld a,[hExperience + 2] - ld [hl],a + ld a, [hExperience] + ld [hli], a + ld a, [hExperience + 1] + ld [hli], a + ld a, [hExperience + 2] + ld [hl], a pop hl - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] push af - ld a,[wcf91] + ld a, [wcf91] push af push de push hl - ld bc,wPartyMon1MaxHP - wPartyMon1 - add hl,bc ; hl now points to MSB of max HP - ld a,[hli] - ld b,a - ld c,[hl] + ld bc, wPartyMon1MaxHP - wPartyMon1 + add hl, bc ; hl now points to MSB of max HP + ld a, [hli] + ld b, a + ld c, [hl] pop hl push bc push hl call .recalculateStats pop hl - ld bc,(wPartyMon1MaxHP + 1) - wPartyMon1 - add hl,bc ; hl now points to LSB of max HP + ld bc, (wPartyMon1MaxHP + 1) - wPartyMon1 + add hl, bc ; hl now points to LSB of max HP pop bc - ld a,[hld] + ld a, [hld] sub c - ld c,a - ld a,[hl] + ld c, a + ld a, [hl] sbc b - ld b,a ; bc = the amount of max HP gained from leveling up + ld b, a ; bc = the amount of max HP gained from leveling up ; add the amount gained to the current HP - ld de,(wPartyMon1HP + 1) - wPartyMon1MaxHP - add hl,de ; hl now points to LSB of current HP - ld a,[hl] + ld de, (wPartyMon1HP + 1) - wPartyMon1MaxHP + add hl, de ; hl now points to LSB of current HP + ld a, [hl] add c - ld [hld],a - ld a,[hl] + ld [hld], a + ld a, [hl] adc b - ld [hl],a - ld a,RARE_CANDY_MSG - ld [wPartyMenuTypeOrMessageID],a + ld [hl], a + ld a, RARE_CANDY_MSG + ld [wPartyMenuTypeOrMessageID], a call RedrawPartyMenu pop de - ld a,d - ld [wWhichPokemon],a - ld a,e - ld [wd11e],a + ld a, d + ld [wWhichPokemon], a + ld a, e + ld [wd11e], a xor a ; PLAYER_PARTY_DATA - ld [wMonDataLocation],a + ld [wMonDataLocation], a call LoadMonData - ld d,$01 + ld d, $01 callab PrintStatsBox ; display new stats text box call WaitForTextScrollButtonPress ; wait for button press xor a ; PLAYER_PARTY_DATA - ld [wMonDataLocation],a + ld [wMonDataLocation], a predef LearnMoveFromLevelUp ; learn level up move, if any xor a - ld [wForceEvolution],a + ld [wForceEvolution], a callab TryEvolvingMon ; evolve pokemon, if appropriate - ld a,$01 - ld [wUpdateSpritesEnabled],a + ld a, $01 + ld [wUpdateSpritesEnabled], a pop af - ld [wcf91],a + ld [wcf91], a pop af - ld [wWhichPokemon],a + ld [wWhichPokemon], a jp RemoveUsedItem VitaminStatRoseText: @@ -1432,50 +1432,50 @@ VitaminText: db "SPECIAL@" ItemUseBait: - ld hl,ThrewBaitText + ld hl, ThrewBaitText call PrintText - ld hl,wEnemyMonCatchRate ; catch rate + ld hl, wEnemyMonCatchRate ; catch rate srl [hl] ; halve catch rate - ld a,BAIT_ANIM - ld hl,wSafariBaitFactor ; bait factor - ld de,wSafariEscapeFactor ; escape factor + ld a, BAIT_ANIM + ld hl, wSafariBaitFactor ; bait factor + ld de, wSafariEscapeFactor ; escape factor jr BaitRockCommon ItemUseRock: - ld hl,ThrewRockText + ld hl, ThrewRockText call PrintText - ld hl,wEnemyMonCatchRate ; catch rate - ld a,[hl] + ld hl, wEnemyMonCatchRate ; catch rate + ld a, [hl] add a ; double catch rate - jr nc,.noCarry - ld a,$ff + jr nc, .noCarry + ld a, $ff .noCarry - ld [hl],a - ld a,ROCK_ANIM - ld hl,wSafariEscapeFactor ; escape factor - ld de,wSafariBaitFactor ; bait factor + ld [hl], a + ld a, ROCK_ANIM + ld hl, wSafariEscapeFactor ; escape factor + ld de, wSafariBaitFactor ; bait factor BaitRockCommon: - ld [wAnimationID],a + ld [wAnimationID], a xor a - ld [wAnimationType],a - ld [H_WHOSETURN],a - ld [de],a ; zero escape factor (for bait), zero bait factor (for rock) + ld [wAnimationType], a + ld [H_WHOSETURN], a + ld [de], a ; zero escape factor (for bait), zero bait factor (for rock) .randomLoop ; loop until a random number less than 5 is generated call Random - and a,7 - cp a,5 - jr nc,.randomLoop + and 7 + cp 5 + jr nc, .randomLoop inc a ; increment the random number, giving a range from 1 to 5 inclusive - ld b,a - ld a,[hl] + ld b, a + ld a, [hl] add b ; increase bait factor (for bait), increase escape factor (for rock) - jr nc,.noCarry - ld a,$ff + jr nc, .noCarry + ld a, $ff .noCarry - ld [hl],a + ld [hl], a predef MoveAnimation ; do animation - ld c,70 + ld c, 70 jp DelayFrames ThrewBaitText: @@ -1488,38 +1488,38 @@ ThrewRockText: ; also used for Dig out-of-battle effect ItemUseEscapeRope: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jr nz,.notUsable - ld a,[wCurMap] - cp a,AGATHAS_ROOM - jr z,.notUsable - ld a,[wCurMapTileset] - ld b,a - ld hl,EscapeRopeTilesets + jr nz, .notUsable + ld a, [wCurMap] + cp AGATHAS_ROOM + jr z, .notUsable + ld a, [wCurMapTileset] + ld b, a + ld hl, EscapeRopeTilesets .loop - ld a,[hli] - cp a,$ff - jr z,.notUsable + ld a, [hli] + cp $ff + jr z, .notUsable cp b - jr nz,.loop - ld hl,wd732 - set 3,[hl] - set 6,[hl] - ld hl,wd72e - res 4,[hl] + jr nz, .loop + ld hl, wd732 + set 3, [hl] + set 6, [hl] + ld hl, wd72e + res 4, [hl] ResetEvent EVENT_IN_SAFARI_ZONE xor a - ld [wNumSafariBalls],a - ld [wSafariZoneEntranceCurScript],a + ld [wNumSafariBalls], a + ld [wSafariZoneEntranceCurScript], a inc a - ld [wEscapedFromBattle],a - ld [wActionResultOrTookBattleTurn],a ; item used - ld a,[wPseudoItemID] + ld [wEscapedFromBattle], a + ld [wActionResultOrTookBattleTurn], a ; item used + ld a, [wPseudoItemID] and a ; using Dig? ret nz ; if so, return call ItemUseReloadOverworldData - ld c,30 + ld c, 30 call DelayFrames jp RemoveUsedItem .notUsable @@ -1530,62 +1530,62 @@ EscapeRopeTilesets: db $ff ; terminator ItemUseRepel: - ld b,100 + ld b, 100 ItemUseRepelCommon: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime - ld a,b - ld [wRepelRemainingSteps],a + jp nz, ItemUseNotTime + ld a, b + ld [wRepelRemainingSteps], a jp PrintItemUseTextAndRemoveItem ; handles X Accuracy item ItemUseXAccuracy: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp z,ItemUseNotTime - ld hl,wPlayerBattleStatus2 - set UsingXAccuracy,[hl] ; X Accuracy bit + jp z, ItemUseNotTime + ld hl, wPlayerBattleStatus2 + set USING_X_ACCURACY, [hl] ; X Accuracy bit jp PrintItemUseTextAndRemoveItem ; This function is bugged and never works. It always jumps to ItemUseNotTime. ; The Card Key is handled in a different way. ItemUseCardKey: xor a - ld [wUnusedD71F],a + ld [wUnusedD71F], a call GetTileAndCoordsInFrontOfPlayer - ld a,[GetTileAndCoordsInFrontOfPlayer] - cp a,$18 - jr nz,.next0 - ld hl,CardKeyTable1 + ld a, [GetTileAndCoordsInFrontOfPlayer] + cp $18 + jr nz, .next0 + ld hl, CardKeyTable1 jr .next1 .next0 - cp a,$24 - jr nz,.next2 - ld hl,CardKeyTable2 + cp $24 + jr nz, .next2 + ld hl, CardKeyTable2 jr .next1 .next2 - cp a,$5e - jp nz,ItemUseNotTime - ld hl,CardKeyTable3 + cp $5e + jp nz, ItemUseNotTime + ld hl, CardKeyTable3 .next1 - ld a,[wCurMap] - ld b,a + ld a, [wCurMap] + ld b, a .loop - ld a,[hli] - cp a,$ff - jp z,ItemUseNotTime + ld a, [hli] + cp $ff + jp z, ItemUseNotTime cp b - jr nz,.nextEntry1 - ld a,[hli] + jr nz, .nextEntry1 + ld a, [hli] cp d - jr nz,.nextEntry2 - ld a,[hli] + jr nz, .nextEntry2 + ld a, [hli] cp e - jr nz,.nextEntry3 - ld a,[hl] - ld [wUnusedD71F],a + jr nz, .nextEntry3 + ld a, [hl] + ld [wUnusedD71F], a jr .done .nextEntry1 inc hl @@ -1595,10 +1595,10 @@ ItemUseCardKey: inc hl jr .loop .done - ld hl,ItemUseText00 + ld hl, ItemUseText00 call PrintText - ld hl,wd728 - set 7,[hl] + ld hl, wd728 + set 7, [hl] ret ; These tables are probably supposed to be door locations in Silph Co., @@ -1643,145 +1643,145 @@ CardKeyTable3: db $ff ItemUsePokedoll: - ld a,[wIsInBattle] + ld a, [wIsInBattle] dec a - jp nz,ItemUseNotTime - ld a,$01 - ld [wEscapedFromBattle],a + jp nz, ItemUseNotTime + ld a, $01 + ld [wEscapedFromBattle], a jp PrintItemUseTextAndRemoveItem ItemUseGuardSpec: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp z,ItemUseNotTime - ld hl,wPlayerBattleStatus2 - set ProtectedByMist,[hl] ; Mist bit + jp z, ItemUseNotTime + ld hl, wPlayerBattleStatus2 + set PROTECTED_BY_MIST, [hl] ; Mist bit jp PrintItemUseTextAndRemoveItem ItemUseSuperRepel: - ld b,200 + ld b, 200 jp ItemUseRepelCommon ItemUseMaxRepel: - ld b,250 + ld b, 250 jp ItemUseRepelCommon ItemUseDireHit: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp z,ItemUseNotTime - ld hl,wPlayerBattleStatus2 - set GettingPumped,[hl] ; Focus Energy bit + jp z, ItemUseNotTime + ld hl, wPlayerBattleStatus2 + set GETTING_PUMPED, [hl] ; Focus Energy bit jp PrintItemUseTextAndRemoveItem ItemUseXStat: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jr nz,.inBattle + jr nz, .inBattle call ItemUseNotTime - ld a,2 - ld [wActionResultOrTookBattleTurn],a ; item not used + ld a, 2 + ld [wActionResultOrTookBattleTurn], a ; item not used ret .inBattle - ld hl,wPlayerMoveNum - ld a,[hli] + ld hl, wPlayerMoveNum + ld a, [hli] push af ; save [wPlayerMoveNum] - ld a,[hl] + ld a, [hl] push af ; save [wPlayerMoveEffect] push hl - ld a,[wcf91] - sub a,X_ATTACK - ATTACK_UP1_EFFECT - ld [hl],a ; store player move effect + ld a, [wcf91] + sub X_ATTACK - ATTACK_UP1_EFFECT + ld [hl], a ; store player move effect call PrintItemUseTextAndRemoveItem - ld a,XSTATITEM_ANIM ; X stat item animation ID - ld [wPlayerMoveNum],a + ld a, XSTATITEM_ANIM ; X stat item animation ID + ld [wPlayerMoveNum], a call LoadScreenTilesFromBuffer1 ; restore saved screen call Delay3 xor a - ld [H_WHOSETURN],a ; set turn to player's turn + ld [H_WHOSETURN], a ; set turn to player's turn callba StatModifierUpEffect ; do stat increase move pop hl pop af - ld [hld],a ; restore [wPlayerMoveEffect] + ld [hld], a ; restore [wPlayerMoveEffect] pop af - ld [hl],a ; restore [wPlayerMoveNum] + ld [hl], a ; restore [wPlayerMoveNum] ret ItemUsePokeflute: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jr nz,.inBattle + jr nz, .inBattle ; if not in battle call ItemUseReloadOverworldData - ld a,[wCurMap] - cp a,ROUTE_12 - jr nz,.notRoute12 + ld a, [wCurMap] + cp ROUTE_12 + jr nz, .notRoute12 CheckEvent EVENT_BEAT_ROUTE12_SNORLAX - jr nz,.noSnorlaxToWakeUp + jr nz, .noSnorlaxToWakeUp ; if the player hasn't beaten Route 12 Snorlax - ld hl,Route12SnorlaxFluteCoords + ld hl, Route12SnorlaxFluteCoords call ArePlayerCoordsInArray - jr nc,.noSnorlaxToWakeUp - ld hl,PlayedFluteHadEffectText + jr nc, .noSnorlaxToWakeUp + ld hl, PlayedFluteHadEffectText call PrintText SetEvent EVENT_FIGHT_ROUTE12_SNORLAX ret .notRoute12 - cp a,ROUTE_16 - jr nz,.noSnorlaxToWakeUp + cp ROUTE_16 + jr nz, .noSnorlaxToWakeUp CheckEvent EVENT_BEAT_ROUTE16_SNORLAX - jr nz,.noSnorlaxToWakeUp + jr nz, .noSnorlaxToWakeUp ; if the player hasn't beaten Route 16 Snorlax - ld hl,Route16SnorlaxFluteCoords + ld hl, Route16SnorlaxFluteCoords call ArePlayerCoordsInArray - jr nc,.noSnorlaxToWakeUp - ld hl,PlayedFluteHadEffectText + jr nc, .noSnorlaxToWakeUp + ld hl, PlayedFluteHadEffectText call PrintText SetEvent EVENT_FIGHT_ROUTE16_SNORLAX ret .noSnorlaxToWakeUp - ld hl,PlayedFluteNoEffectText + ld hl, PlayedFluteNoEffectText jp PrintText .inBattle xor a - ld [wWereAnyMonsAsleep],a - ld b,~SLP & $ff - ld hl,wPartyMon1Status + ld [wWereAnyMonsAsleep], a + ld b, ~SLP & $ff + ld hl, wPartyMon1Status call WakeUpEntireParty - ld a,[wIsInBattle] + ld a, [wIsInBattle] dec a ; is it a trainer battle? - jr z,.skipWakingUpEnemyParty + jr z, .skipWakingUpEnemyParty ; if it's a trainer battle - ld hl,wEnemyMon1Status + ld hl, wEnemyMon1Status call WakeUpEntireParty .skipWakingUpEnemyParty - ld hl,wBattleMonStatus - ld a,[hl] + ld hl, wBattleMonStatus + ld a, [hl] and b ; remove Sleep status - ld [hl],a - ld hl,wEnemyMonStatus - ld a,[hl] + ld [hl], a + ld hl, wEnemyMonStatus + ld a, [hl] and b ; remove Sleep status - ld [hl],a + ld [hl], a call LoadScreenTilesFromBuffer2 ; restore saved screen - ld a,[wWereAnyMonsAsleep] + ld a, [wWereAnyMonsAsleep] and a ; were any pokemon asleep before playing the flute? - ld hl,PlayedFluteNoEffectText - jp z,PrintText ; if no pokemon were asleep + ld hl, PlayedFluteNoEffectText + jp z, PrintText ; if no pokemon were asleep ; if some pokemon were asleep - ld hl,PlayedFluteHadEffectText + ld hl, PlayedFluteHadEffectText call PrintText - ld a,[wDanger] - and a,$80 - jr nz,.skipMusic + ld a, [wDanger] + and $80 + jr nz, .skipMusic call WaitForSoundToFinish ; wait for sound to end ;callba Music_PokeFluteInBattle ; play in-battle pokeflute music ; XXX .musicWaitLoop ; wait for music to finish playing - ld a,[wChannelSoundIDs + Ch6] + ld a, [wChannelSoundIDs + Ch6] and a ; music off? - jr nz,.musicWaitLoop + jr nz, .musicWaitLoop .skipMusic - ld hl,FluteWokeUpText + ld hl, FluteWokeUpText jp PrintText ; wakes up all party pokemon @@ -1792,22 +1792,22 @@ ItemUsePokeflute: ; OUTPUT: ; [wWereAnyMonsAsleep]: set to 1 if any pokemon were asleep WakeUpEntireParty: - ld de,44 - ld c,6 + ld de, 44 + ld c, 6 .loop - ld a,[hl] + ld a, [hl] push af - and a,SLP ; is pokemon asleep? - jr z,.notAsleep - ld a,1 - ld [wWereAnyMonsAsleep],a ; indicate that a pokemon had to be woken up + and SLP ; is pokemon asleep? + jr z, .notAsleep + ld a, 1 + ld [wWereAnyMonsAsleep], a ; indicate that a pokemon had to be woken up .notAsleep pop af and b ; remove Sleep status - ld [hl],a - add hl,de + ld [hl], a + add hl, de dec c - jr nz,.loop + jr nz, .loop ret ; Format: @@ -1840,13 +1840,13 @@ PlayedFluteHadEffectText: TX_FAR _PlayedFluteHadEffectText TX_BLINK TX_ASM - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jr nz,.done + jr nz, .done ; play out-of-battle pokeflute music - ld a,$ff + ld a, $ff call PlaySound ; turn off music - ld a, SFX_POKEFLUE + ld a, SFX_POKEFLUTE ld c, 0 ; BANK(SFX_Pokeflute) call PlaySound call WaitForSoundToFinish @@ -1855,10 +1855,10 @@ PlayedFluteHadEffectText: jp TextScriptEnd ; end text ItemUseCoinCase: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime - ld hl,CoinCaseNumCoinsText + jp nz, ItemUseNotTime + ld hl, CoinCaseNumCoinsText jp PrintText CoinCaseNumCoinsText: @@ -1874,7 +1874,7 @@ ItemUseOldRod: ItemUseGoodRod: call FishingInit - jp c,ItemUseNotTime + jp c, ItemUseNotTime .RandomLoop call Random srl a @@ -1883,17 +1883,17 @@ ItemUseGoodRod: cp 2 jr nc, .RandomLoop ; choose which monster appears - ld hl,GoodRodMons - add a,a - ld c,a - ld b,0 - add hl,bc - ld b,[hl] + ld hl, GoodRodMons + add a + ld c, a + ld b, 0 + add hl, bc + ld b, [hl] inc hl - ld c,[hl] + ld c, [hl] and a .SetBite - ld a,0 + ld a, 0 rla xor 1 jr RodResponse @@ -1933,23 +1933,23 @@ RodResponse: ; checks if fishing is possible and if so, runs initialization code common to all rods ; unsets carry if fishing is possible, sets carry if not FishingInit: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jr z,.notInBattle + jr z, .notInBattle scf ; can't fish during battle ret .notInBattle call IsNextTileShoreOrWater ret c - ld a,[wWalkBikeSurfState] - cp a,2 ; Surfing? - jr z,.surfing + ld a, [wWalkBikeSurfState] + cp 2 ; Surfing? + jr z, .surfing call ItemUseReloadOverworldData - ld hl,ItemUseText00 + ld hl, ItemUseText00 call PrintText - ld a,SFX_HEAL_AILMENT + ld a, SFX_HEAL_AILMENT call PlaySound - ld c,80 + ld c, 80 call DelayFrames and a ret @@ -1961,22 +1961,22 @@ ItemUseOaksParcel: jp ItemUseNotYoursToUse ItemUseItemfinder: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime + jp nz, ItemUseNotTime call ItemUseReloadOverworldData callba HiddenItemNear ; check for hidden items - ld hl,ItemfinderFoundNothingText - jr nc,.printText ; if no hidden items - ld c,4 + ld hl, ItemfinderFoundNothingText + jr nc, .printText ; if no hidden items + ld c, 4 .loop - ld a,SFX_HEALING_MACHINE + ld a, SFX_HEALING_MACHINE call PlaySoundWaitForCurrent - ld a,SFX_PURCHASE + ld a, SFX_PURCHASE call PlaySoundWaitForCurrent dec c - jr nz,.loop - ld hl,ItemfinderFoundItemText + jr nz, .loop + ld hl, ItemfinderFoundItemText .printText jp PrintText @@ -1989,136 +1989,136 @@ ItemfinderFoundNothingText: db "@" ItemUsePPUp: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime + jp nz, ItemUseNotTime ItemUsePPRestore: - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] push af - ld a,[wcf91] - ld [wPPRestoreItem],a + ld a, [wcf91] + ld [wPPRestoreItem], a .chooseMon xor a - ld [wUpdateSpritesEnabled],a - ld a,USE_ITEM_PARTY_MENU - ld [wPartyMenuTypeOrMessageID],a + ld [wUpdateSpritesEnabled], a + ld a, USE_ITEM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call DisplayPartyMenu - jr nc,.chooseMove + jr nc, .chooseMove jp .itemNotUsed .chooseMove - ld a,[wPPRestoreItem] - cp a,ELIXER - jp nc,.useElixir ; if Elixir or Max Elixir - ld a,$02 - ld [wMoveMenuType],a - ld hl,RaisePPWhichTechniqueText - ld a,[wPPRestoreItem] - cp a,ETHER ; is it a PP Up? - jr c,.printWhichTechniqueMessage ; if so, print the raise PP message - ld hl,RestorePPWhichTechniqueText ; otherwise, print the restore PP message + ld a, [wPPRestoreItem] + cp ELIXER + jp nc, .useElixir ; if Elixir or Max Elixir + ld a, $02 + ld [wMoveMenuType], a + ld hl, RaisePPWhichTechniqueText + ld a, [wPPRestoreItem] + cp ETHER ; is it a PP Up? + jr c, .printWhichTechniqueMessage ; if so, print the raise PP message + ld hl, RestorePPWhichTechniqueText ; otherwise, print the restore PP message .printWhichTechniqueMessage call PrintText xor a - ld [wPlayerMoveListIndex],a + ld [wPlayerMoveListIndex], a callab MoveSelectionMenu ; move selection menu - ld a,0 - ld [wPlayerMoveListIndex],a - jr nz,.chooseMon - ld hl,wPartyMon1Moves + ld a, 0 + ld [wPlayerMoveListIndex], a + jr nz, .chooseMon + ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset push hl - ld a,[hl] - ld [wd11e],a + ld a, [hl] + ld [wd11e], a call GetMoveName call CopyStringToCF4B ; copy name to wcf4b pop hl - ld a,[wPPRestoreItem] - cp a,ETHER - jr nc,.useEther ; if Ether or Max Ether + ld a, [wPPRestoreItem] + cp ETHER + jr nc, .useEther ; if Ether or Max Ether .usePPUp - ld bc,wPartyMon1PP - wPartyMon1Moves - add hl,bc - ld a,[hl] ; move PP - cp a,3 << 6 ; have 3 PP Ups already been used? - jr c,.PPNotMaxedOut - ld hl,PPMaxedOutText + ld bc, wPartyMon1PP - wPartyMon1Moves + add hl, bc + ld a, [hl] ; move PP + cp 3 << 6 ; have 3 PP Ups already been used? + jr c, .PPNotMaxedOut + ld hl, PPMaxedOutText call PrintText jr .chooseMove .PPNotMaxedOut - ld a,[hl] - add a,1 << 6 ; increase PP Up count by 1 - ld [hl],a - ld a,1 ; 1 PP Up used - ld [wd11e],a + ld a, [hl] + add 1 << 6 ; increase PP Up count by 1 + ld [hl], a + ld a, 1 ; 1 PP Up used + ld [wd11e], a call RestoreBonusPP ; add the bonus PP to current PP - ld hl,PPIncreasedText + ld hl, PPIncreasedText call PrintText .done pop af - ld [wWhichPokemon],a + ld [wWhichPokemon], a call GBPalWhiteOut call RunDefaultPaletteCommand jp RemoveUsedItem .afterRestoringPP ; after using a (Max) Ether/Elixir - ld a,[wWhichPokemon] - ld b,a - ld a,[wPlayerMonNumber] + ld a, [wWhichPokemon] + ld b, a + ld a, [wPlayerMonNumber] cp b ; is the pokemon whose PP was restored active in battle? - jr nz,.skipUpdatingInBattleData - ld hl,wPartyMon1PP + jr nz, .skipUpdatingInBattleData + ld hl, wPartyMon1PP ld bc, wPartyMon2 - wPartyMon1 call AddNTimes - ld de,wBattleMonPP - ld bc,4 + ld de, wBattleMonPP + ld bc, 4 call CopyData ; copy party data to in-battle data .skipUpdatingInBattleData - ld a,SFX_HEAL_AILMENT + ld a, SFX_HEAL_AILMENT call PlaySound - ld hl,PPRestoredText + ld hl, PPRestoredText call PrintText jr .done .useEther call .restorePP - jr nz,.afterRestoringPP + jr nz, .afterRestoringPP jp .noEffect ; unsets zero flag if PP was restored, sets zero flag if not ; however, this is bugged for Max Ethers and Max Elixirs (see below) .restorePP xor a ; PLAYER_PARTY_DATA - ld [wMonDataLocation],a + ld [wMonDataLocation], a call GetMaxPP - ld hl,wPartyMon1Moves + ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset ld bc, wPartyMon1PP - wPartyMon1Moves - add hl,bc ; hl now points to move's PP - ld a,[wMaxPP] - ld b,a - ld a,[wPPRestoreItem] - cp a,MAX_ETHER - jr z,.fullyRestorePP - ld a,[hl] ; move PP - and a,%00111111 ; lower 6 bit bits store current PP + add hl, bc ; hl now points to move's PP + ld a, [wMaxPP] + ld b, a + ld a, [wPPRestoreItem] + cp MAX_ETHER + jr z, .fullyRestorePP + ld a, [hl] ; move PP + and %00111111 ; lower 6 bit bits store current PP cp b ; does current PP equal max PP? ret z ; if so, return - add a,10 ; increase current PP by 10 + add 10 ; increase current PP by 10 ; b holds the max PP amount and b will hold the new PP amount. ; So, if the new amount meets or exceeds the max amount, ; cap the amount to the max amount by leaving b unchanged. ; Otherwise, store the new amount in b. cp b ; does the new amount meet or exceed the maximum? - jr nc,.storeNewAmount - ld b,a + jr nc, .storeNewAmount + ld b, a .storeNewAmount - ld a,[hl] ; move PP - and a,%11000000 ; PP Up counter bits + ld a, [hl] ; move PP + and %11000000 ; PP Up counter bits add b - ld [hl],a + ld [hl], a ret .fullyRestorePP - ld a,[hl] ; move PP + ld a, [hl] ; move PP ; Note that this code has a bug. It doesn't mask out the upper two bits, which ; are used to count how many PP Ups have been used on the move. So, Max Ethers ; and Max Elixirs will not be detected as having no effect on a move with full @@ -2128,37 +2128,37 @@ ItemUsePPRestore: jr .storeNewAmount .useElixir ; decrement the item ID so that ELIXER becomes ETHER and MAX_ELIXER becomes MAX_ETHER - ld hl,wPPRestoreItem + ld hl, wPPRestoreItem dec [hl] dec [hl] xor a - ld hl,wCurrentMenuItem - ld [hli],a - ld [hl],a ; zero the counter for number of moves that had their PP restored - ld b,4 + ld hl, wCurrentMenuItem + ld [hli], a + ld [hl], a ; zero the counter for number of moves that had their PP restored + ld b, 4 ; loop through each move and restore PP .elixirLoop push bc - ld hl,wPartyMon1Moves + ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset - ld a,[hl] + ld a, [hl] and a ; does the current slot have a move? - jr z,.nextMove + jr z, .nextMove call .restorePP - jr z,.nextMove + jr z, .nextMove ; if some PP was restored - ld hl,wTileBehindCursor ; counter for number of moves that had their PP restored + ld hl, wTileBehindCursor ; counter for number of moves that had their PP restored inc [hl] .nextMove - ld hl,wCurrentMenuItem + ld hl, wCurrentMenuItem inc [hl] pop bc dec b - jr nz,.elixirLoop - ld a,[wTileBehindCursor] + jr nz, .elixirLoop + ld a, [wTileBehindCursor] and a ; did any moves have their PP restored? - jp nz,.afterRestoringPP + jp nz, .afterRestoringPP .noEffect call ItemUseNoEffect .itemNotUsed @@ -2166,7 +2166,7 @@ ItemUsePPRestore: call RunDefaultPaletteCommand pop af xor a - ld [wActionResultOrTookBattleTurn],a ; item use failed + ld [wActionResultOrTookBattleTurn], a ; item use failed ret RaisePPWhichTechniqueText: @@ -2194,63 +2194,63 @@ UnusableItem: jp ItemUseNotTime ItemUseTMHM: - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,ItemUseNotTime - ld a,[wcf91] - sub a,TM_01 + jp nz, ItemUseNotTime + ld a, [wcf91] + sub TM_01 push af - jr nc,.skipAdding - add a,55 ; if item is an HM, add 55 + jr nc, .skipAdding + add 55 ; if item is an HM, add 55 .skipAdding inc a - ld [wd11e],a + ld [wd11e], a predef TMToMove ; get move ID from TM/HM ID - ld a,[wd11e] - ld [wMoveNum],a + ld a, [wd11e] + ld [wMoveNum], a call GetMoveName call CopyStringToCF4B ; copy name to wcf4b pop af - ld hl,BootedUpTMText - jr nc,.printBootedUpMachineText - ld hl,BootedUpHMText + ld hl, BootedUpTMText + jr nc, .printBootedUpMachineText + ld hl, BootedUpHMText .printBootedUpMachineText call PrintText - ld hl,TeachMachineMoveText + ld hl, TeachMachineMoveText call PrintText coord hl, 14, 7 lb bc, 8, 15 - ld a,TWO_OPTION_MENU - ld [wTextBoxID],a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - jr z,.useMachine - ld a,2 - ld [wActionResultOrTookBattleTurn],a ; item not used + jr z, .useMachine + ld a, 2 + ld [wActionResultOrTookBattleTurn], a ; item not used ret .useMachine - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] push af - ld a,[wcf91] + ld a, [wcf91] push af .chooseMon - ld hl,wcf4b - ld de,wTempMoveNameBuffer - ld bc,14 + ld hl, wcf4b + ld de, wTempMoveNameBuffer + ld bc, 14 call CopyData ; save the move name because DisplayPartyMenu will overwrite it - ld a,$ff - ld [wUpdateSpritesEnabled],a - ld a,TMHM_PARTY_MENU - ld [wPartyMenuTypeOrMessageID],a + ld a, $ff + ld [wUpdateSpritesEnabled], a + ld a, TMHM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call DisplayPartyMenu push af - ld hl,wTempMoveNameBuffer - ld de,wcf4b - ld bc,14 + ld hl, wTempMoveNameBuffer + ld de, wcf4b + ld bc, 14 call CopyData pop af - jr nc,.checkIfAbleToLearnMove + jr nc, .checkIfAbleToLearnMove ; if the player canceled teaching the move pop af pop af @@ -2261,31 +2261,31 @@ ItemUseTMHM: .checkIfAbleToLearnMove predef CanLearnTM ; check if the pokemon can learn the move push bc - ld a,[wWhichPokemon] - ld hl,wPartyMonNicks + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName pop bc - ld a,c + ld a, c and a ; can the pokemon learn the move? - jr nz,.checkIfAlreadyLearnedMove + jr nz, .checkIfAlreadyLearnedMove ; if the pokemon can't learn the move - ld a,SFX_DENIED + ld a, SFX_DENIED call PlaySoundWaitForCurrent - ld hl,MonCannotLearnMachineMoveText + ld hl, MonCannotLearnMachineMoveText call PrintText jr .chooseMon .checkIfAlreadyLearnedMove callab CheckIfMoveIsKnown ; check if the pokemon already knows the move - jr c,.chooseMon + jr c, .chooseMon predef LearnMove ; teach move pop af - ld [wcf91],a + ld [wcf91], a pop af - ld [wWhichPokemon],a - ld a,b + ld [wWhichPokemon], a + ld a, b and a ret z - ld a,[wcf91] + ld a, [wcf91] call IsItemHM ret c jp RemoveUsedItem @@ -2307,57 +2307,57 @@ MonCannotLearnMachineMoveText: db "@" PrintItemUseTextAndRemoveItem: - ld hl,ItemUseText00 + ld hl, ItemUseText00 call PrintText - ld a,SFX_HEAL_AILMENT + ld a, SFX_HEAL_AILMENT call PlaySound call WaitForTextScrollButtonPress ; wait for button press RemoveUsedItem: - ld hl,wNumBagItems - ld a,1 ; one item - ld [wItemQuantity],a + ld hl, wNumBagItems + ld a, 1 ; one item + ld [wItemQuantity], a jp RemoveItemFromInventory ItemUseNoEffect: - ld hl,ItemUseNoEffectText + ld hl, ItemUseNoEffectText jr ItemUseFailed ItemUseNotTime: - ld hl,ItemUseNotTimeText + ld hl, ItemUseNotTimeText jr ItemUseFailed ItemUseNotYoursToUse: - ld hl,ItemUseNotYoursToUseText + ld hl, ItemUseNotYoursToUseText jr ItemUseFailed ThrowBallAtTrainerMon: call RunDefaultPaletteCommand call LoadScreenTilesFromBuffer1 ; restore saved screen call Delay3 - ld a,TOSS_ANIM - ld [wAnimationID],a + ld a, TOSS_ANIM + ld [wAnimationID], a predef MoveAnimation ; do animation - ld hl,ThrowBallAtTrainerMonText1 + ld hl, ThrowBallAtTrainerMonText1 call PrintText - ld hl,ThrowBallAtTrainerMonText2 + ld hl, ThrowBallAtTrainerMonText2 call PrintText jr RemoveUsedItem NoCyclingAllowedHere: - ld hl,NoCyclingAllowedHereText + ld hl, NoCyclingAllowedHereText jr ItemUseFailed BoxFullCannotThrowBall: - ld hl,BoxFullCannotThrowBallText + ld hl, BoxFullCannotThrowBallText jr ItemUseFailed SurfingAttemptFailed: - ld hl,NoSurfingHereText + ld hl, NoSurfingHereText ItemUseFailed: xor a - ld [wActionResultOrTookBattleTurn],a ; item use failed + ld [wActionResultOrTookBattleTurn], a ; item use failed jp PrintText ItemUseNotTimeText: @@ -2416,37 +2416,37 @@ GotOffBicycleText: ; [wWhichPokemon] = index of pokemon in party ; [wCurrentMenuItem] = index of move (when using a PP Up) RestoreBonusPP: - ld hl,wPartyMon1Moves + ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] call AddNTimes push hl - ld de,wNormalMaxPPList - 1 + ld de, wNormalMaxPPList - 1 predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wNormalMaxPPList pop hl ld c, wPartyMon1PP - wPartyMon1Moves - ld b,0 - add hl,bc ; hl now points to move 1 PP - ld de,wNormalMaxPPList - ld b,0 ; initialize move counter to zero + ld b, 0 + add hl, bc ; hl now points to move 1 PP + ld de, wNormalMaxPPList + ld b, 0 ; initialize move counter to zero ; loop through the pokemon's moves .loop inc b - ld a,b - cp a,5 ; reached the end of the pokemon's moves? + ld a, b + cp 5 ; reached the end of the pokemon's moves? ret z ; if so, return - ld a,[wUsingPPUp] + ld a, [wUsingPPUp] dec a ; using a PP Up? - jr nz,.skipMenuItemIDCheck + jr nz, .skipMenuItemIDCheck ; if using a PP Up, check if this is the move it's being used on - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] inc a cp b - jr nz,.nextMove + jr nz, .nextMove .skipMenuItemIDCheck - ld a,[hl] - and a,%11000000 ; have any PP Ups been used? - call nz,AddBonusPP ; if so, add bonus PP + ld a, [hl] + and %11000000 ; have any PP Ups been used? + call nz, AddBonusPP ; if so, add bonus PP .nextMove inc hl inc de @@ -2459,38 +2459,38 @@ RestoreBonusPP: ; [hl] = move PP AddBonusPP: push bc - ld a,[de] ; normal max PP of move - ld [H_DIVIDEND + 3],a + ld a, [de] ; normal max PP of move + ld [H_DIVIDEND + 3], a xor a - ld [H_DIVIDEND],a - ld [H_DIVIDEND + 1],a - ld [H_DIVIDEND + 2],a - ld a,5 - ld [H_DIVISOR],a - ld b,4 + ld [H_DIVIDEND], a + ld [H_DIVIDEND + 1], a + ld [H_DIVIDEND + 2], a + ld a, 5 + ld [H_DIVISOR], a + ld b, 4 call Divide - ld a,[hl] ; move PP - ld b,a + ld a, [hl] ; move PP + ld b, a swap a - and a,%00001111 + and %00001111 srl a srl a - ld c,a ; c = number of PP Ups used + ld c, a ; c = number of PP Ups used .loop - ld a,[H_QUOTIENT + 3] - cp a,8 ; is the amount greater than or equal to 8? - jr c,.addAmount - ld a,7 ; cap the amount at 7 + ld a, [H_QUOTIENT + 3] + cp 8 ; is the amount greater than or equal to 8? + jr c, .addAmount + ld a, 7 ; cap the amount at 7 .addAmount add b - ld b,a - ld a,[wUsingPPUp] + ld b, a + ld a, [wUsingPPUp] dec a ; is the player using a PP Up right now? - jr z,.done ; if so, only add the bonus once + jr z, .done ; if so, only add the bonus once dec c - jr nz,.loop + jr nz, .loop .done - ld [hl],b + ld [hl], b pop bc ret @@ -2507,74 +2507,74 @@ AddBonusPP: ; OUTPUT: ; [wMaxPP] = max PP GetMaxPP: - ld a,[wMonDataLocation] + ld a, [wMonDataLocation] and a - ld hl,wPartyMon1Moves - ld bc,wPartyMon2 - wPartyMon1 - jr z,.sourceWithMultipleMon - ld hl,wEnemyMon1Moves + ld hl, wPartyMon1Moves + ld bc, wPartyMon2 - wPartyMon1 + jr z, .sourceWithMultipleMon + ld hl, wEnemyMon1Moves dec a - jr z,.sourceWithMultipleMon - ld hl,wBoxMon1Moves - ld bc,wBoxMon2 - wBoxMon1 + jr z, .sourceWithMultipleMon + ld hl, wBoxMon1Moves + ld bc, wBoxMon2 - wBoxMon1 dec a - jr z,.sourceWithMultipleMon - ld hl,wDayCareMonMoves + jr z, .sourceWithMultipleMon + ld hl, wDayCareMonMoves dec a - jr z,.sourceWithOneMon - ld hl,wBattleMonMoves ; player's in-battle pokemon + jr z, .sourceWithOneMon + ld hl, wBattleMonMoves ; player's in-battle pokemon .sourceWithOneMon call GetSelectedMoveOffset2 jr .next .sourceWithMultipleMon call GetSelectedMoveOffset .next - ld a,[hl] + ld a, [hl] dec a push hl - ld hl,Moves - ld bc,MoveEnd - Moves + ld hl, Moves + ld bc, MoveEnd - Moves call AddNTimes - ld de,wcd6d - ld a,BANK(Moves) + ld de, wcd6d + ld a, BANK(Moves) call FarCopyData - ld de,wcd6d + 5 ; PP is byte 5 of move data - ld a,[de] - ld b,a ; b = normal max PP + ld de, wcd6d + 5 ; PP is byte 5 of move data + ld a, [de] + ld b, a ; b = normal max PP pop hl push bc - ld bc,wPartyMon1PP - wPartyMon1Moves ; PP offset if not player's in-battle pokemon data - ld a,[wMonDataLocation] - cp a,4 ; player's in-battle pokemon? - jr nz,.addPPOffset - ld bc,wBattleMonPP - wBattleMonMoves ; PP offset if player's in-battle pokemon data + ld bc, wPartyMon1PP - wPartyMon1Moves ; PP offset if not player's in-battle pokemon data + ld a, [wMonDataLocation] + cp 4 ; player's in-battle pokemon? + jr nz, .addPPOffset + ld bc, wBattleMonPP - wBattleMonMoves ; PP offset if player's in-battle pokemon data .addPPOffset - add hl,bc - ld a,[hl] ; a = current PP - and a,%11000000 ; get PP Up count + add hl, bc + ld a, [hl] ; a = current PP + and %11000000 ; get PP Up count pop bc or b ; place normal max PP in 6 lower bits of a - ld h,d - ld l,e + ld h, d + ld l, e inc hl ; hl = wcd73 - ld [hl],a + ld [hl], a xor a ; add the bonus for the existing PP Up count - ld [wUsingPPUp],a + ld [wUsingPPUp], a call AddBonusPP ; add bonus PP from PP Ups - ld a,[hl] - and a,%00111111 ; mask out the PP Up count - ld [wMaxPP],a ; store max PP + ld a, [hl] + and %00111111 ; mask out the PP Up count + ld [wMaxPP], a ; store max PP ret GetSelectedMoveOffset: - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] call AddNTimes GetSelectedMoveOffset2: - ld a,[wCurrentMenuItem] - ld c,a - ld b,0 - add hl,bc + ld a, [wCurrentMenuItem] + ld c, a + ld b, 0 + add hl, bc ret ; confirms the item toss and then tosses the item @@ -2587,49 +2587,49 @@ GetSelectedMoveOffset2: ; clears carry flag if the item is tossed, sets carry flag if not TossItem_: push hl - ld a,[wcf91] + ld a, [wcf91] call IsItemHM pop hl - jr c,.tooImportantToToss + jr c, .tooImportantToToss push hl call IsKeyItem_ - ld a,[wIsKeyItem] + ld a, [wIsKeyItem] pop hl and a - jr nz,.tooImportantToToss + jr nz, .tooImportantToToss push hl - ld a,[wcf91] - ld [wd11e],a + ld a, [wcf91] + ld [wd11e], a call GetItemName call CopyStringToCF4B ; copy name to wcf4b - ld hl,IsItOKToTossItemText + ld hl, IsItOKToTossItemText call PrintText coord hl, 14, 7 lb bc, 8, 15 - ld a,TWO_OPTION_MENU - ld [wTextBoxID],a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu - ld a,[wMenuExitMethod] - cp a,CHOSE_SECOND_ITEM + ld a, [wMenuExitMethod] + cp CHOSE_SECOND_ITEM pop hl scf ret z ; return if the player chose No ; if the player chose Yes push hl - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] call RemoveItemFromInventory - ld a,[wcf91] - ld [wd11e],a + ld a, [wcf91] + ld [wd11e], a call GetItemName call CopyStringToCF4B ; copy name to wcf4b - ld hl,ThrewAwayItemText + ld hl, ThrewAwayItemText call PrintText pop hl and a ret .tooImportantToToss push hl - ld hl,TooImportantToTossText + ld hl, TooImportantToTossText call PrintText pop hl scf @@ -2655,32 +2655,32 @@ TooImportantToTossText: ; 00: item is not key item ; 01: item is key item IsKeyItem_: - ld a,$01 - ld [wIsKeyItem],a - ld a,[wcf91] - cp a,HM_01 ; is the item an HM or TM? - jr nc,.checkIfItemIsHM + ld a, $01 + ld [wIsKeyItem], a + ld a, [wcf91] + cp HM_01 ; is the item an HM or TM? + jr nc, .checkIfItemIsHM ; if the item is not an HM or TM push af - ld hl,KeyItemBitfield - ld de,wBuffer - ld bc,15 ; only 11 bytes are actually used + ld hl, KeyItemBitfield + ld de, wBuffer + ld bc, 15 ; only 11 bytes are actually used call CopyData pop af dec a - ld c,a - ld hl,wBuffer - ld b,FLAG_TEST + ld c, a + ld hl, wBuffer + ld b, FLAG_TEST predef FlagActionPredef - ld a,c + ld a, c and a ret nz .checkIfItemIsHM - ld a,[wcf91] + ld a, [wcf91] call IsItemHM ret c xor a - ld [wIsKeyItem],a + ld [wIsKeyItem], a ret INCLUDE "data/key_items.asm" @@ -2857,7 +2857,7 @@ SendNewMonToBox: IsNextTileShoreOrWater: ld a, [wCurMapTileset] ld hl, WaterTilesets - ld de,1 + ld de, 1 call IsInArray jr nc, .notShoreOrWater ld a, [wCurMapTileset] diff --git a/engine/learn_move.asm b/engine/learn_move.asm index ba73d4c0..53c7f87e 100755 --- a/engine/learn_move.asm +++ b/engine/learn_move.asm @@ -185,7 +185,7 @@ TryingToLearn: LearnedMove1Text: TX_FAR _LearnedMove1Text - TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the pary menu (rare candy) and plays SFX_LEVEL_UP in battle + TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the party menu (rare candy) and plays SFX_LEVEL_UP in battle TX_BLINK db "@" diff --git a/engine/load_pokedex_tiles.asm b/engine/load_pokedex_tiles.asm index 637b7a24..70bcf04d 100755 --- a/engine/load_pokedex_tiles.asm +++ b/engine/load_pokedex_tiles.asm @@ -1,11 +1,11 @@ ; Loads tile patterns for tiles used in the pokedex. LoadPokedexTilePatterns: call LoadHpBarAndStatusTilePatterns - ld de,PokedexTileGraphics - ld hl,vChars2 + $600 + ld de, PokedexTileGraphics + ld hl, vChars2 + $600 lb bc, BANK(PokedexTileGraphics), (PokedexTileGraphicsEnd - PokedexTileGraphics) / $10 call CopyVideoData - ld de,PokeballTileGraphics - ld hl,vChars2 + $720 + ld de, PokeballTileGraphics + ld hl, vChars2 + $720 lb bc, BANK(PokeballTileGraphics), $01 jp CopyVideoData ; load pokeball tile for marking caught mons diff --git a/engine/menu/draw_start_menu.asm b/engine/menu/draw_start_menu.asm index 4df9de27..11777dc6 100644 --- a/engine/menu/draw_start_menu.asm +++ b/engine/menu/draw_start_menu.asm @@ -3,60 +3,60 @@ DrawStartMenu: CheckEvent EVENT_GOT_POKEDEX ; menu with pokedex coord hl, 10, 0 - ld b,$0e - ld c,$08 - jr nz,.drawTextBoxBorder + ld b, $0e + ld c, $08 + jr nz, .drawTextBoxBorder ; shorter menu if the player doesn't have the pokedex coord hl, 10, 0 - ld b,$0c - ld c,$08 + ld b, $0c + ld c, $08 .drawTextBoxBorder call TextBoxBorder - ld a,D_DOWN | D_UP | START | B_BUTTON | A_BUTTON - ld [wMenuWatchedKeys],a - ld a,$02 - ld [wTopMenuItemY],a ; Y position of first menu choice - ld a,$0b - ld [wTopMenuItemX],a ; X position of first menu choice - ld a,[wBattleAndStartSavedMenuItem] ; remembered menu selection from last time - ld [wCurrentMenuItem],a - ld [wLastMenuItem],a + ld a, D_DOWN | D_UP | START | B_BUTTON | A_BUTTON + ld [wMenuWatchedKeys], a + ld a, $02 + ld [wTopMenuItemY], a ; Y position of first menu choice + ld a, $0b + ld [wTopMenuItemX], a ; X position of first menu choice + ld a, [wBattleAndStartSavedMenuItem] ; remembered menu selection from last time + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a xor a - ld [wMenuWatchMovingOutOfBounds],a - ld hl,wd730 - set 6,[hl] ; no pauses between printing each letter + ld [wMenuWatchMovingOutOfBounds], a + ld hl, wd730 + set 6, [hl] ; no pauses between printing each letter coord hl, 12, 2 CheckEvent EVENT_GOT_POKEDEX -; case for not having pokdex - ld a,$06 - jr z,.storeMenuItemCount +; case for not having pokedex + ld a, $06 + jr z, .storeMenuItemCount ; case for having pokedex - ld de,StartMenuPokedexText + ld de, StartMenuPokedexText call PrintStartMenuItem - ld a,$07 + ld a, $07 .storeMenuItemCount - ld [wMaxMenuItem],a ; number of menu items - ld de,StartMenuPokemonText + ld [wMaxMenuItem], a ; number of menu items + ld de, StartMenuPokemonText call PrintStartMenuItem - ld de,StartMenuItemText + ld de, StartMenuItemText call PrintStartMenuItem - ld de,wPlayerName ; player's name + ld de, wPlayerName ; player's name call PrintStartMenuItem - ld a,[wd72e] - bit 6,a ; is the player using the link feature? + ld a, [wd72e] + bit 6, a ; is the player using the link feature? ; case for not using link feature - ld de,StartMenuSaveText - jr z,.printSaveOrResetText + ld de, StartMenuSaveText + jr z, .printSaveOrResetText ; case for using link feature - ld de,StartMenuResetText + ld de, StartMenuResetText .printSaveOrResetText call PrintStartMenuItem - ld de,StartMenuOptionText + ld de, StartMenuOptionText call PrintStartMenuItem - ld de,StartMenuExitText + ld de, StartMenuExitText call PlaceString - ld hl,wd730 - res 6,[hl] ; turn pauses between printing letters back on + ld hl, wd730 + res 6, [hl] ; turn pauses between printing letters back on ret StartMenuPokedexText: @@ -84,6 +84,6 @@ PrintStartMenuItem: push hl call PlaceString pop hl - ld de,SCREEN_WIDTH * 2 - add hl,de + ld de, SCREEN_WIDTH * 2 + add hl, de ret diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index cd4198b6..da2e98e4 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -2,133 +2,133 @@ MainMenu: ; Check save file call InitOptions xor a - ld [wOptionsInitialized],a + ld [wOptionsInitialized], a inc a - ld [wSaveFileStatus],a + ld [wSaveFileStatus], a call CheckForPlayerNameInSRAM - jr nc,.mainMenuLoop + jr nc, .mainMenuLoop predef LoadSAV .mainMenuLoop - ld c,20 + ld c, 20 call DelayFrames xor a ; LINK_STATE_NONE - ld [wLinkState],a - ld hl,wPartyAndBillsPCSavedMenuItem - ld [hli],a - ld [hli],a - ld [hli],a - ld [hl],a - ld [wDefaultMap],a - ld hl,wd72e - res 6,[hl] + ld [wLinkState], a + ld hl, wPartyAndBillsPCSavedMenuItem + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld [wDefaultMap], a + ld hl, wd72e + res 6, [hl] call ClearScreen call RunDefaultPaletteCommand call LoadTextBoxTilePatterns call LoadFontTilePatterns - ld hl,wd730 - set 6,[hl] - ld a,[wSaveFileStatus] - cp a,1 - jr z,.noSaveFile + ld hl, wd730 + set 6, [hl] + ld a, [wSaveFileStatus] + cp 1 + jr z, .noSaveFile ; there's a save file coord hl, 0, 0 - ld b,6 - ld c,13 + ld b, 6 + ld c, 13 call TextBoxBorder coord hl, 2, 2 - ld de,ContinueText + ld de, ContinueText call PlaceString jr .next2 .noSaveFile coord hl, 0, 0 - ld b,4 - ld c,13 + ld b, 4 + ld c, 13 call TextBoxBorder coord hl, 2, 2 - ld de,NewGameText + ld de, NewGameText call PlaceString .next2 - ld hl,wd730 - res 6,[hl] + ld hl, wd730 + res 6, [hl] call UpdateSprites xor a - ld [wCurrentMenuItem],a - ld [wLastMenuItem],a - ld [wMenuJoypadPollCount],a + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a + ld [wMenuJoypadPollCount], a inc a - ld [wTopMenuItemX],a + ld [wTopMenuItemX], a inc a - ld [wTopMenuItemY],a - ld a,A_BUTTON | B_BUTTON | START - ld [wMenuWatchedKeys],a - ld a,[wSaveFileStatus] - ld [wMaxMenuItem],a + ld [wTopMenuItemY], a + ld a, A_BUTTON | B_BUTTON | START + ld [wMenuWatchedKeys], a + ld a, [wSaveFileStatus] + ld [wMaxMenuItem], a call HandleMenuInput - bit 1,a ; pressed B? - jp nz,DisplayTitleScreen ; if so, go back to the title screen - ld c,20 + bit 1, a ; pressed B? + jp nz, DisplayTitleScreen ; if so, go back to the title screen + ld c, 20 call DelayFrames - ld a,[wCurrentMenuItem] - ld b,a - ld a,[wSaveFileStatus] - cp a,2 - jp z,.skipInc + ld a, [wCurrentMenuItem] + ld b, a + ld a, [wSaveFileStatus] + cp 2 + jp z, .skipInc ; If there's no save file, increment the current menu item so that the numbers ; are the same whether or not there's a save file. inc b .skipInc - ld a,b + ld a, b and a - jr z,.choseContinue - cp a,1 - jp z,StartNewGame + jr z, .choseContinue + cp 1 + jp z, StartNewGame call DisplayOptionMenu - ld a,1 - ld [wOptionsInitialized],a + ld a, 1 + ld [wOptionsInitialized], a jp .mainMenuLoop .choseContinue call DisplayContinueGameInfo - ld hl,wCurrentMapScriptFlags - set 5,[hl] + ld hl, wCurrentMapScriptFlags + set 5, [hl] .inputLoop xor a - ld [hJoyPressed],a - ld [hJoyReleased],a - ld [hJoyHeld],a + ld [hJoyPressed], a + ld [hJoyReleased], a + ld [hJoyHeld], a call Joypad - ld a,[hJoyHeld] - bit 0,a - jr nz,.pressedA - bit 1,a - jp nz,.mainMenuLoop ; pressed B + ld a, [hJoyHeld] + bit 0, a + jr nz, .pressedA + bit 1, a + jp nz, .mainMenuLoop ; pressed B jr .inputLoop .pressedA call GBPalWhiteOutWithDelay3 call ClearScreen - ld a,PLAYER_DIR_DOWN - ld [wPlayerDirection],a - ld c,10 + ld a, PLAYER_DIR_DOWN + ld [wPlayerDirection], a + ld c, 10 call DelayFrames - ld a,[wNumHoFTeams] + ld a, [wNumHoFTeams] and a - jp z,SpecialEnterMap - ld a,[wCurMap] ; map ID - cp a,HALL_OF_FAME - jp nz,SpecialEnterMap + jp z, SpecialEnterMap + ld a, [wCurMap] ; map ID + cp HALL_OF_FAME + jp nz, SpecialEnterMap xor a - ld [wDestinationMap],a - ld hl,wd732 - set 2,[hl] ; fly warp or dungeon warp + ld [wDestinationMap], a + ld hl, wd732 + set 2, [hl] ; fly warp or dungeon warp call SpecialWarpIn jp SpecialEnterMap InitOptions: - ld a,1 ; no delay - ld [wLetterPrintingDelayFlags],a - ld a,3 ; medium speed - ld [wOptions],a + ld a, 1 ; no delay + ld [wLetterPrintingDelayFlags], a + ld a, 3 ; medium speed + ld [wOptions], a ret LinkMenu: @@ -428,154 +428,154 @@ SaveScreenInfoText: DisplayOptionMenu: coord hl, 0, 0 - ld b,3 - ld c,18 + ld b, 3 + ld c, 18 call TextBoxBorder coord hl, 0, 5 - ld b,3 - ld c,18 + ld b, 3 + ld c, 18 call TextBoxBorder coord hl, 0, 10 - ld b,3 - ld c,18 + ld b, 3 + ld c, 18 call TextBoxBorder coord hl, 1, 1 - ld de,TextSpeedOptionText + ld de, TextSpeedOptionText call PlaceString coord hl, 1, 6 - ld de,BattleAnimationOptionText + ld de, BattleAnimationOptionText call PlaceString coord hl, 1, 11 - ld de,BattleStyleOptionText + ld de, BattleStyleOptionText call PlaceString coord hl, 2, 16 - ld de,OptionMenuCancelText + ld de, OptionMenuCancelText call PlaceString xor a - ld [wCurrentMenuItem],a - ld [wLastMenuItem],a + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a inc a - ld [wLetterPrintingDelayFlags],a - ld [wUnusedCD40],a - ld a,3 ; text speed cursor Y coordinate - ld [wTopMenuItemY],a + ld [wLetterPrintingDelayFlags], a + ld [wUnusedCD40], a + ld a, 3 ; text speed cursor Y coordinate + ld [wTopMenuItemY], a call SetCursorPositionsFromOptions - ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate - ld [wTopMenuItemX],a - ld a,$01 - ld [H_AUTOBGTRANSFERENABLED],a ; enable auto background transfer + ld a, [wOptionsTextSpeedCursorX] ; text speed cursor X coordinate + ld [wTopMenuItemX], a + ld a, $01 + ld [H_AUTOBGTRANSFERENABLED], a ; enable auto background transfer call Delay3 .loop call PlaceMenuCursor call SetOptionsFromCursorPositions .getJoypadStateLoop call JoypadLowSensitivity - ld a,[hJoy5] - ld b,a - and a,A_BUTTON | B_BUTTON | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ; any key besides select pressed? - jr z,.getJoypadStateLoop - bit 1,b ; B button pressed? - jr nz,.exitMenu - bit 3,b ; Start button pressed? - jr nz,.exitMenu - bit 0,b ; A button pressed? - jr z,.checkDirectionKeys - ld a,[wTopMenuItemY] - cp a,16 ; is the cursor on Cancel? - jr nz,.loop + ld a, [hJoy5] + ld b, a + and A_BUTTON | B_BUTTON | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ; any key besides select pressed? + jr z, .getJoypadStateLoop + bit 1, b ; B button pressed? + jr nz, .exitMenu + bit 3, b ; Start button pressed? + jr nz, .exitMenu + bit 0, b ; A button pressed? + jr z, .checkDirectionKeys + ld a, [wTopMenuItemY] + cp 16 ; is the cursor on Cancel? + jr nz, .loop .exitMenu - ld a,SFX_PRESS_AB + ld a, SFX_PRESS_AB call PlaySound ret .eraseOldMenuCursor - ld [wTopMenuItemX],a + ld [wTopMenuItemX], a call EraseMenuCursor jp .loop .checkDirectionKeys - ld a,[wTopMenuItemY] - bit 7,b ; Down pressed? - jr nz,.downPressed - bit 6,b ; Up pressed? - jr nz,.upPressed - cp a,8 ; cursor in Battle Animation section? - jr z,.cursorInBattleAnimation - cp a,13 ; cursor in Battle Style section? - jr z,.cursorInBattleStyle - cp a,16 ; cursor on Cancel? - jr z,.loop + ld a, [wTopMenuItemY] + bit 7, b ; Down pressed? + jr nz, .downPressed + bit 6, b ; Up pressed? + jr nz, .upPressed + cp 8 ; cursor in Battle Animation section? + jr z, .cursorInBattleAnimation + cp 13 ; cursor in Battle Style section? + jr z, .cursorInBattleStyle + cp 16 ; cursor on Cancel? + jr z, .loop .cursorInTextSpeed - bit 5,b ; Left pressed? - jp nz,.pressedLeftInTextSpeed + bit 5, b ; Left pressed? + jp nz, .pressedLeftInTextSpeed jp .pressedRightInTextSpeed .downPressed - cp a,16 - ld b,-13 - ld hl,wOptionsTextSpeedCursorX - jr z,.updateMenuVariables - ld b,5 - cp a,3 + cp 16 + ld b, -13 + ld hl, wOptionsTextSpeedCursorX + jr z, .updateMenuVariables + ld b, 5 + cp 3 inc hl - jr z,.updateMenuVariables - cp a,8 + jr z, .updateMenuVariables + cp 8 inc hl - jr z,.updateMenuVariables - ld b,3 + jr z, .updateMenuVariables + ld b, 3 inc hl jr .updateMenuVariables .upPressed - cp a,8 - ld b,-5 - ld hl,wOptionsTextSpeedCursorX - jr z,.updateMenuVariables - cp a,13 + cp 8 + ld b, -5 + ld hl, wOptionsTextSpeedCursorX + jr z, .updateMenuVariables + cp 13 inc hl - jr z,.updateMenuVariables - cp a,16 - ld b,-3 + jr z, .updateMenuVariables + cp 16 + ld b, -3 inc hl - jr z,.updateMenuVariables - ld b,13 + jr z, .updateMenuVariables + ld b, 13 inc hl .updateMenuVariables add b - ld [wTopMenuItemY],a - ld a,[hl] - ld [wTopMenuItemX],a + ld [wTopMenuItemY], a + ld a, [hl] + ld [wTopMenuItemX], a call PlaceUnfilledArrowMenuCursor jp .loop .cursorInBattleAnimation - ld a,[wOptionsBattleAnimCursorX] ; battle animation cursor X coordinate - xor a,$0b ; toggle between 1 and 10 - ld [wOptionsBattleAnimCursorX],a + ld a, [wOptionsBattleAnimCursorX] ; battle animation cursor X coordinate + xor $0b ; toggle between 1 and 10 + ld [wOptionsBattleAnimCursorX], a jp .eraseOldMenuCursor .cursorInBattleStyle - ld a,[wOptionsBattleStyleCursorX] ; battle style cursor X coordinate - xor a,$0b ; toggle between 1 and 10 - ld [wOptionsBattleStyleCursorX],a + ld a, [wOptionsBattleStyleCursorX] ; battle style cursor X coordinate + xor $0b ; toggle between 1 and 10 + ld [wOptionsBattleStyleCursorX], a jp .eraseOldMenuCursor .pressedLeftInTextSpeed - ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate - cp a,1 - jr z,.updateTextSpeedXCoord - cp a,7 - jr nz,.fromSlowToMedium - sub a,6 + ld a, [wOptionsTextSpeedCursorX] ; text speed cursor X coordinate + cp 1 + jr z, .updateTextSpeedXCoord + cp 7 + jr nz, .fromSlowToMedium + sub 6 jr .updateTextSpeedXCoord .fromSlowToMedium - sub a,7 + sub 7 jr .updateTextSpeedXCoord .pressedRightInTextSpeed - ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate - cp a,14 - jr z,.updateTextSpeedXCoord - cp a,7 - jr nz,.fromFastToMedium - add a,7 + ld a, [wOptionsTextSpeedCursorX] ; text speed cursor X coordinate + cp 14 + jr z, .updateTextSpeedXCoord + cp 7 + jr nz, .fromFastToMedium + add 7 jr .updateTextSpeedXCoord .fromFastToMedium - add a,6 + add 6 .updateTextSpeedXCoord - ld [wOptionsTextSpeedCursorX],a ; text speed cursor X coordinate + ld [wOptionsTextSpeedCursorX], a ; text speed cursor X coordinate jp .eraseOldMenuCursor TextSpeedOptionText: @@ -595,79 +595,79 @@ OptionMenuCancelText: ; sets the options variable according to the current placement of the menu cursors in the options menu SetOptionsFromCursorPositions: - ld hl,TextSpeedOptionData - ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate - ld c,a + ld hl, TextSpeedOptionData + ld a, [wOptionsTextSpeedCursorX] ; text speed cursor X coordinate + ld c, a .loop - ld a,[hli] + ld a, [hli] cp c - jr z,.textSpeedMatchFound + jr z, .textSpeedMatchFound inc hl jr .loop .textSpeedMatchFound - ld a,[hl] - ld d,a - ld a,[wOptionsBattleAnimCursorX] ; battle animation cursor X coordinate + ld a, [hl] + ld d, a + ld a, [wOptionsBattleAnimCursorX] ; battle animation cursor X coordinate dec a - jr z,.battleAnimationOn + jr z, .battleAnimationOn .battleAnimationOff - set 7,d + set 7, d jr .checkBattleStyle .battleAnimationOn - res 7,d + res 7, d .checkBattleStyle - ld a,[wOptionsBattleStyleCursorX] ; battle style cursor X coordinate + ld a, [wOptionsBattleStyleCursorX] ; battle style cursor X coordinate dec a - jr z,.battleStyleShift + jr z, .battleStyleShift .battleStyleSet - set 6,d + set 6, d jr .storeOptions .battleStyleShift - res 6,d + res 6, d .storeOptions - ld a,d - ld [wOptions],a + ld a, d + ld [wOptions], a ret ; reads the options variable and places menu cursors in the correct positions within the options menu SetCursorPositionsFromOptions: - ld hl,TextSpeedOptionData + 1 - ld a,[wOptions] - ld c,a - and a,$3f + ld hl, TextSpeedOptionData + 1 + ld a, [wOptions] + ld c, a + and $3f push bc - ld de,2 + ld de, 2 call IsInArray pop bc dec hl - ld a,[hl] - ld [wOptionsTextSpeedCursorX],a ; text speed cursor X coordinate + ld a, [hl] + ld [wOptionsTextSpeedCursorX], a ; text speed cursor X coordinate coord hl, 0, 3 call .placeUnfilledRightArrow sla c - ld a,1 ; On - jr nc,.storeBattleAnimationCursorX - ld a,10 ; Off + ld a, 1 ; On + jr nc, .storeBattleAnimationCursorX + ld a, 10 ; Off .storeBattleAnimationCursorX - ld [wOptionsBattleAnimCursorX],a ; battle animation cursor X coordinate + ld [wOptionsBattleAnimCursorX], a ; battle animation cursor X coordinate coord hl, 0, 8 call .placeUnfilledRightArrow sla c - ld a,1 - jr nc,.storeBattleStyleCursorX - ld a,10 + ld a, 1 + jr nc, .storeBattleStyleCursorX + ld a, 10 .storeBattleStyleCursorX - ld [wOptionsBattleStyleCursorX],a ; battle style cursor X coordinate + ld [wOptionsBattleStyleCursorX], a ; battle style cursor X coordinate coord hl, 0, 13 call .placeUnfilledRightArrow ; cursor in front of Cancel coord hl, 0, 16 - ld a,1 + ld a, 1 .placeUnfilledRightArrow - ld e,a - ld d,0 - add hl,de - ld [hl],$ec ; unfilled right arrow menu cursor + ld e, a + ld d, 0 + add hl, de + ld [hl], $ec ; unfilled right arrow menu cursor ret ; table that indicates how the 3 text speed options affect frame delays diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 2628da48..64065c4d 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -409,7 +409,7 @@ PrintNicknameAndUnderscores: call EraseMenuCursor ld a, $11 ; "ED" x coord ld [wTopMenuItemX], a - ld a, $5 ; "ED" y corrd + ld a, $5 ; "ED" y coord ld [wCurrentMenuItem], a ld a, [wNamingScreenType] cp NAME_MON_SCREEN diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index a35524ed..5149e5ab 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -19,83 +19,83 @@ ; f8: leveled up DrawPartyMenu_: xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen call UpdateSprites callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics RedrawPartyMenu_: - ld a,[wPartyMenuTypeOrMessageID] - cp a,SWAP_MONS_PARTY_MENU - jp z,.printMessage + ld a, [wPartyMenuTypeOrMessageID] + cp SWAP_MONS_PARTY_MENU + jp z, .printMessage call ErasePartyMenuCursors callba InitPartyMenuBlkPacket coord hl, 3, 0 - ld de,wPartySpecies + ld de, wPartySpecies xor a - ld c,a - ld [hPartyMonIndex],a - ld [wWhichPartyMenuHPBar],a + ld c, a + ld [hPartyMonIndex], a + ld [wWhichPartyMenuHPBar], a .loop - ld a,[de] - cp a,$FF ; reached the terminator? - jp z,.afterDrawingMonEntries + ld a, [de] + cp $FF ; reached the terminator? + jp z, .afterDrawingMonEntries push bc push de push hl - ld a,c + ld a, c push hl - ld hl,wPartyMonNicks + ld hl, wPartyMonNicks call GetPartyMonName pop hl call PlaceString ; print the pokemon's name callba WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon - ld a,[hPartyMonIndex] - ld [wWhichPokemon],a + ld a, [hPartyMonIndex] + ld [wWhichPokemon], a inc a - ld [hPartyMonIndex],a + ld [hPartyMonIndex], a call LoadMonData pop hl push hl - ld a,[wMenuItemToSwap] + ld a, [wMenuItemToSwap] and a ; is the player swapping pokemon positions? - jr z,.skipUnfilledRightArrow + jr z, .skipUnfilledRightArrow ; if the player is swapping pokemon positions dec a - ld b,a - ld a,[wWhichPokemon] + ld b, a + ld a, [wWhichPokemon] cp b ; is the player swapping the current pokemon in the list? - jr nz,.skipUnfilledRightArrow + jr nz, .skipUnfilledRightArrow ; the player is swapping the current pokemon in the list dec hl dec hl dec hl - ld a,"▷" ; unfilled right arrow menu cursor - ld [hli],a ; place the cursor + ld a, "▷" ; unfilled right arrow menu cursor + ld [hli], a ; place the cursor inc hl inc hl .skipUnfilledRightArrow - ld a,[wPartyMenuTypeOrMessageID] ; menu type - cp a,TMHM_PARTY_MENU - jr z,.teachMoveMenu - cp a,EVO_STONE_PARTY_MENU - jr z,.evolutionStoneMenu + ld a, [wPartyMenuTypeOrMessageID] ; menu type + cp TMHM_PARTY_MENU + jr z, .teachMoveMenu + cp EVO_STONE_PARTY_MENU + jr z, .evolutionStoneMenu push hl - ld bc,14 ; 14 columns to the right - add hl,bc - ld de,wLoadedMonStatus + ld bc, 14 ; 14 columns to the right + add hl, bc + ld de, wLoadedMonStatus call PrintStatusCondition pop hl push hl - ld bc,SCREEN_WIDTH + 1 ; down 1 row and right 1 column - ld a,[hFlags_0xFFF6] - set 0,a - ld [hFlags_0xFFF6],a - add hl,bc + ld bc, SCREEN_WIDTH + 1 ; down 1 row and right 1 column + ld a, [hFlags_0xFFF6] + set 0, a + ld [hFlags_0xFFF6], a + add hl, bc predef DrawHP2 ; draw HP bar and prints current / max HP - ld a,[hFlags_0xFFF6] - res 0,a - ld [hFlags_0xFFF6],a + ld a, [hFlags_0xFFF6] + res 0, a + ld [hFlags_0xFFF6], a call SetPartyMenuHPBarColor ; color the HP bar (on SGB) pop hl jr .printLevel @@ -103,26 +103,26 @@ RedrawPartyMenu_: push hl predef CanLearnTM ; check if the pokemon can learn the move pop hl - ld de,.ableToLearnMoveText - ld a,c + ld de, .ableToLearnMoveText + ld a, c and a - jr nz,.placeMoveLearnabilityString - ld de,.notAbleToLearnMoveText + jr nz, .placeMoveLearnabilityString + ld de, .notAbleToLearnMoveText .placeMoveLearnabilityString - ld bc,20 + 9 ; down 1 row and right 9 columns + ld bc, 20 + 9 ; down 1 row and right 9 columns push hl - add hl,bc + add hl, bc call PlaceString pop hl .printLevel - ld bc,10 ; move 10 columns to the right - add hl,bc + ld bc, 10 ; move 10 columns to the right + add hl, bc call PrintLevel pop hl pop de inc de - ld bc,2 * 20 - add hl,bc + ld bc, 2 * 20 + add hl, bc pop bc inc c jp .loop @@ -132,54 +132,54 @@ RedrawPartyMenu_: db "NOT ABLE@" .evolutionStoneMenu push hl - ld hl,EvosMovesPointerTable - ld b,0 - ld a,[wLoadedMonSpecies] + ld hl, EvosMovesPointerTable + ld b, 0 + ld a, [wLoadedMonSpecies] dec a add a rl b - ld c,a - add hl,bc - ld de,wcd6d - ld a,BANK(EvosMovesPointerTable) - ld bc,2 + ld c, a + add hl, bc + ld de, wcd6d + ld a, BANK(EvosMovesPointerTable) + ld bc, 2 call FarCopyData - ld hl,wcd6d - ld a,[hli] - ld h,[hl] - ld l,a - ld de,wcd6d - ld a,BANK(EvosMovesPointerTable) - ld bc,Mon133_EvosEnd - Mon133_EvosMoves + ld hl, wcd6d + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wcd6d + ld a, BANK(EvosMovesPointerTable) + ld bc, Mon133_EvosEnd - Mon133_EvosMoves call FarCopyData - ld hl,wcd6d - ld de,.notAbleToEvolveText + ld hl, wcd6d + ld de, .notAbleToEvolveText ; loop through the pokemon's evolution entries .checkEvolutionsLoop - ld a,[hli] + ld a, [hli] and a ; reached terminator? - jr z,.placeEvolutionStoneString ; if so, place the "NOT ABLE" string + jr z, .placeEvolutionStoneString ; if so, place the "NOT ABLE" string inc hl inc hl - cp a,EV_ITEM - jr nz,.checkEvolutionsLoop + cp EV_ITEM + jr nz, .checkEvolutionsLoop ; if it's a stone evolution entry dec hl dec hl - ld b,[hl] - ld a,[wEvoStoneItemID] ; the stone the player used + ld b, [hl] + ld a, [wEvoStoneItemID] ; the stone the player used inc hl inc hl inc hl cp b ; does the player's stone match this evolution entry's stone? - jr nz,.checkEvolutionsLoop + jr nz, .checkEvolutionsLoop ; if it does match - ld de,.ableToEvolveText + ld de, .ableToEvolveText .placeEvolutionStoneString - ld bc,20 + 9 ; down 1 row and right 9 columns + ld bc, 20 + 9 ; down 1 row and right 9 columns pop hl push hl - add hl,bc + add hl, bc call PlaceString pop hl jr .printLevel @@ -191,44 +191,44 @@ RedrawPartyMenu_: ld b, SET_PAL_PARTY_MENU call RunPaletteCommand .printMessage - ld hl,wd730 - ld a,[hl] + ld hl, wd730 + ld a, [hl] push af push hl - set 6,[hl] ; turn off letter printing delay - ld a,[wPartyMenuTypeOrMessageID] ; message ID - cp a,$F0 - jr nc,.printItemUseMessage + set 6, [hl] ; turn off letter printing delay + ld a, [wPartyMenuTypeOrMessageID] ; message ID + cp $F0 + jr nc, .printItemUseMessage add a - ld hl,PartyMenuMessagePointers - ld b,0 - ld c,a - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a + ld hl, PartyMenuMessagePointers + ld b, 0 + ld c, a + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a call PrintText .done pop hl pop af - ld [hl],a - ld a,1 - ld [H_AUTOBGTRANSFERENABLED],a + ld [hl], a + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 jp GBPalNormal .printItemUseMessage - and a,$0F - ld hl,PartyMenuItemUseMessagePointers + and $0F + ld hl, PartyMenuItemUseMessagePointers add a - ld c,a - ld b,0 - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a push hl - ld a,[wUsedItemOnWhichPokemon] - ld hl,wPartyMonNicks + ld a, [wUsedItemOnWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName pop hl call PrintText diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm index c9e2cf08..5639bd99 100755 --- a/engine/menu/pc.asm +++ b/engine/menu/pc.asm @@ -17,34 +17,34 @@ PCMainMenu: bit 1, a ;if player pressed B jp nz, LogOff ld a, [wMaxMenuItem] - cp a, 2 + cp 2 jr nz, .next ;if not 2 menu items (not counting log off) (2 occurs before you get the pokedex) ld a, [wCurrentMenuItem] and a jp z, BillsPC ;if current menu item id is 0, it's bills pc - cp a, 1 + cp 1 jr z, .playersPC ;if current menu item id is 1, it's players pc jp LogOff ;otherwise, it's 2, and you're logging off .next - cp a, 3 + cp 3 jr nz, .next2 ;if not 3 menu items (not counting log off) (3 occurs after you get the pokedex, before you beat the pokemon league) ld a, [wCurrentMenuItem] and a jp z, BillsPC ;if current menu item id is 0, it's bills pc - cp a, 1 + cp 1 jr z, .playersPC ;if current menu item id is 1, it's players pc - cp a, 2 + cp 2 jp z, OaksPC ;if current menu item id is 2, it's oaks pc jp LogOff ;otherwise, it's 3, and you're logging off .next2 ld a, [wCurrentMenuItem] and a jp z, BillsPC ;if current menu item id is 0, it's bills pc - cp a, 1 + cp 1 jr z, .playersPC ;if current menu item id is 1, it's players pc - cp a, 2 + cp 2 jp z, OaksPC ;if current menu item id is 2, it's oaks pc - cp a, 3 + cp 3 jp z, PKMNLeague ;if current menu item id is 3, it's pkmnleague jp LogOff ;otherwise, it's 4, and you're logging off .playersPC diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 56882eaf..ada59b68 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -2,53 +2,53 @@ ShowPokedexMenu: call GBPalWhiteOut call ClearScreen call UpdateSprites - ld a,[wListScrollOffset] + ld a, [wListScrollOffset] push af xor a - ld [wCurrentMenuItem],a - ld [wListScrollOffset],a - ld [wLastMenuItem],a + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld [wLastMenuItem], a inc a - ld [wd11e],a - ld [hJoy7],a + ld [wd11e], a + ld [hJoy7], a .setUpGraphics ld b, SET_PAL_GENERIC call RunPaletteCommand callab LoadPokedexTilePatterns .doPokemonListMenu - ld hl,wTopMenuItemY - ld a,3 - ld [hli],a ; top menu item Y + ld hl, wTopMenuItemY + ld a, 3 + ld [hli], a ; top menu item Y xor a - ld [hli],a ; top menu item X + ld [hli], a ; top menu item X inc a - ld [wMenuWatchMovingOutOfBounds],a + ld [wMenuWatchMovingOutOfBounds], a inc hl inc hl - ld a,6 - ld [hli],a ; max menu item ID - ld [hl],D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON + ld a, 6 + ld [hli], a ; max menu item ID + ld [hl], D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON call HandlePokedexListMenu - jr c,.goToSideMenu ; if the player chose a pokemon from the list + jr c, .goToSideMenu ; if the player chose a pokemon from the list .exitPokedex xor a - ld [wMenuWatchMovingOutOfBounds],a - ld [wCurrentMenuItem],a - ld [wLastMenuItem],a - ld [hJoy7],a - ld [wWastedByteCD3A],a - ld [wOverrideSimulatedJoypadStatesMask],a + ld [wMenuWatchMovingOutOfBounds], a + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a + ld [hJoy7], a + ld [wWastedByteCD3A], a + ld [wOverrideSimulatedJoypadStatesMask], a pop af - ld [wListScrollOffset],a + ld [wListScrollOffset], a call GBPalWhiteOutWithDelay3 call RunDefaultPaletteCommand jp ReloadMapData .goToSideMenu call HandlePokedexSideMenu dec b - jr z,.exitPokedex ; if the player chose Quit + jr z, .exitPokedex ; if the player chose Quit dec b - jr z,.doPokemonListMenu ; if pokemon not seen or player pressed B button + jr z, .doPokemonListMenu ; if pokemon not seen or player pressed B button jp .setUpGraphics ; if pokemon data or area was shown ; handles the menu on the lower right in the pokedex screen @@ -59,68 +59,68 @@ ShowPokedexMenu: ; 02: the pokemon has not been seen yet or the player pressed the B button HandlePokedexSideMenu: call PlaceUnfilledArrowMenuCursor - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] push af - ld b,a - ld a,[wLastMenuItem] + ld b, a + ld a, [wLastMenuItem] push af - ld a,[wListScrollOffset] + ld a, [wListScrollOffset] push af add b inc a - ld [wd11e],a - ld a,[wd11e] + ld [wd11e], a + ld a, [wd11e] push af - ld a,[wDexMaxSeenMon] + ld a, [wDexMaxSeenMon] push af ; this doesn't need to be preserved - ld hl,wPokedexSeen + ld hl, wPokedexSeen call IsPokemonBitSet - ld b,2 - jr z,.exitSideMenu + ld b, 2 + jr z, .exitSideMenu call PokedexToIndex - ld hl,wTopMenuItemY - ld a,10 - ld [hli],a ; top menu item Y - ld a,15 - ld [hli],a ; top menu item X + ld hl, wTopMenuItemY + ld a, 10 + ld [hli], a ; top menu item Y + ld a, 15 + ld [hli], a ; top menu item X xor a - ld [hli],a ; current menu item ID + ld [hli], a ; current menu item ID inc hl - ld a,3 - ld [hli],a ; max menu item ID + ld a, 3 + ld [hli], a ; max menu item ID ;ld a, A_BUTTON | B_BUTTON - ld [hli],a ; menu watched keys (A button and B button) + ld [hli], a ; menu watched keys (A button and B button) xor a - ld [hli],a ; old menu item ID - ld [wMenuWatchMovingOutOfBounds],a + ld [hli], a ; old menu item ID + ld [wMenuWatchMovingOutOfBounds], a .handleMenuInput call HandleMenuInput - bit 1,a ; was the B button pressed? - ld b,2 - jr nz,.buttonBPressed - ld a,[wCurrentMenuItem] + bit 1, a ; was the B button pressed? + ld b, 2 + jr nz, .buttonBPressed + ld a, [wCurrentMenuItem] and a - jr z,.choseData + jr z, .choseData dec a - jr z,.choseCry + jr z, .choseCry dec a - jr z,.choseArea + jr z, .choseArea .choseQuit - ld b,1 + ld b, 1 .exitSideMenu pop af - ld [wDexMaxSeenMon],a + ld [wDexMaxSeenMon], a pop af - ld [wd11e],a + ld [wd11e], a pop af - ld [wListScrollOffset],a + ld [wListScrollOffset], a pop af - ld [wLastMenuItem],a + ld [wLastMenuItem], a pop af - ld [wCurrentMenuItem],a + ld [wCurrentMenuItem], a push bc coord hl, 0, 3 - ld de,20 + ld de, 20 lb bc, " ", 13 call DrawTileLine ; cover up the menu cursor in the pokemon list pop bc @@ -129,7 +129,7 @@ HandlePokedexSideMenu: .buttonBPressed push bc coord hl, 15, 10 - ld de,20 + ld de, 20 lb bc, " ", 7 call DrawTileLine ; cover up the menu cursor in the side menu pop bc @@ -137,12 +137,12 @@ HandlePokedexSideMenu: .choseData call ShowPokedexDataInternal - ld b,0 + ld b, 0 jr .exitSideMenu ; play pokemon cry .choseCry - ld a,[wd11e] + ld a, [wd11e] push af call PlayCry pop af @@ -151,118 +151,118 @@ HandlePokedexSideMenu: .choseArea predef LoadTownMap_Nest ; display pokemon areas - ld b,0 + ld b, 0 jr .exitSideMenu ; handles the list of pokemon on the left of the pokedex screen ; sets carry flag if player presses A, unsets carry flag if player presses B HandlePokedexListMenu: xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a ; draw the horizontal line separating the seen and owned amounts from the menu coord hl, 15, 8 - ld a,"─" - ld [hli],a - ld [hli],a - ld [hli],a - ld [hli],a - ld [hli],a + ld a, "─" + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a coord hl, 14, 0 - ld [hl],$71 ; vertical line tile + ld [hl], $71 ; vertical line tile coord hl, 14, 1 call DrawPokedexVerticalLine coord hl, 14, 9 call DrawPokedexVerticalLine - ld hl,wPokedexSeen - ld b,wPokedexSeenEnd - wPokedexSeen + ld hl, wPokedexSeen + ld b, wPokedexSeenEnd - wPokedexSeen call CountSetBits ld de, wNumSetBits coord hl, 16, 3 lb bc, 1, 3 call PrintNumber ; print number of seen pokemon - ld hl,wPokedexOwned - ld b,wPokedexOwnedEnd - wPokedexOwned + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits ld de, wNumSetBits coord hl, 16, 6 lb bc, 1, 3 call PrintNumber ; print number of owned pokemon coord hl, 16, 2 - ld de,PokedexSeenText + ld de, PokedexSeenText call PlaceString coord hl, 16, 5 - ld de,PokedexOwnText + ld de, PokedexOwnText call PlaceString coord hl, 1, 1 - ld de,PokedexContentsText + ld de, PokedexContentsText call PlaceString coord hl, 16, 10 - ld de,PokedexMenuItemsText + ld de, PokedexMenuItemsText call PlaceString ; find the highest pokedex number among the pokemon the player has seen - ld hl,wPokedexSeenEnd - 1 - ld b,(wPokedexSeenEnd - wPokedexSeen) * 8 + 1 + ld hl, wPokedexSeenEnd - 1 + ld b, (wPokedexSeenEnd - wPokedexSeen) * 8 + 1 .maxSeenPokemonLoop - ld a,[hld] - ld c,8 + ld a, [hld] + ld c, 8 .maxSeenPokemonInnerLoop dec b sla a - jr c,.storeMaxSeenPokemon + jr c, .storeMaxSeenPokemon dec c - jr nz,.maxSeenPokemonInnerLoop + jr nz, .maxSeenPokemonInnerLoop jr .maxSeenPokemonLoop .storeMaxSeenPokemon - ld a,b - ld [wDexMaxSeenMon],a + ld a, b + ld [wDexMaxSeenMon], a .loop xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a coord hl, 4, 2 lb bc, 14, 10 call ClearScreenArea coord hl, 1, 3 - ld a,[wListScrollOffset] - ld [wd11e],a - ld d,7 - ld a,[wDexMaxSeenMon] - cp a,7 - jr nc,.printPokemonLoop - ld d,a + ld a, [wListScrollOffset] + ld [wd11e], a + ld d, 7 + ld a, [wDexMaxSeenMon] + cp 7 + jr nc, .printPokemonLoop + ld d, a dec a - ld [wMaxMenuItem],a + ld [wMaxMenuItem], a ; loop to print pokemon pokedex numbers and names ; if the player has owned the pokemon, it puts a pokeball beside the name .printPokemonLoop - ld a,[wd11e] + ld a, [wd11e] inc a - ld [wd11e],a + ld [wd11e], a push af push de push hl - ld de,-SCREEN_WIDTH - add hl,de - ld de,wd11e + ld de, -SCREEN_WIDTH + add hl, de + ld de, wd11e lb bc, LEADING_ZEROES | 1, 3 call PrintNumber ; print the pokedex number - ld de,SCREEN_WIDTH - add hl,de + ld de, SCREEN_WIDTH + add hl, de dec hl push hl - ld hl,wPokedexOwned + ld hl, wPokedexOwned call IsPokemonBitSet pop hl - ld a," " - jr z,.writeTile - ld a,$72 ; pokeball tile + ld a, " " + jr z, .writeTile + ld a, $72 ; pokeball tile .writeTile - ld [hl],a ; put a pokeball next to pokemon that the player has owned + ld [hl], a ; put a pokeball next to pokemon that the player has owned push hl - ld hl,wPokedexSeen + ld hl, wPokedexSeen call IsPokemonBitSet - jr nz,.getPokemonName ; if the player has seen the pokemon - ld de,.dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon + jr nz, .getPokemonName ; if the player has seen the pokemon + ld de, .dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon jr .skipGettingName .dashedLine ; for unseen pokemon in the list db "----------@" @@ -274,73 +274,73 @@ HandlePokedexListMenu: inc hl call PlaceString pop hl - ld bc,2 * SCREEN_WIDTH - add hl,bc + ld bc, 2 * SCREEN_WIDTH + add hl, bc pop de pop af - ld [wd11e],a + ld [wd11e], a dec d - jr nz,.printPokemonLoop - ld a,01 - ld [H_AUTOBGTRANSFERENABLED],a + jr nz, .printPokemonLoop + ld a, 01 + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call GBPalNormal call HandleMenuInput - bit 1,a ; was the B button pressed? - jp nz,.buttonBPressed + bit 1, a ; was the B button pressed? + jp nz, .buttonBPressed .checkIfUpPressed - bit 6,a ; was Up pressed? - jr z,.checkIfDownPressed + bit 6, a ; was Up pressed? + jr z, .checkIfDownPressed .upPressed ; scroll up one row - ld a,[wListScrollOffset] + ld a, [wListScrollOffset] and a - jp z,.loop + jp z, .loop dec a - ld [wListScrollOffset],a + ld [wListScrollOffset], a jp .loop .checkIfDownPressed - bit 7,a ; was Down pressed? - jr z,.checkIfRightPressed + bit 7, a ; was Down pressed? + jr z, .checkIfRightPressed .downPressed ; scroll down one row - ld a,[wDexMaxSeenMon] - cp a,7 - jp c,.loop ; can't if the list is shorter than 7 - sub a,7 - ld b,a - ld a,[wListScrollOffset] + ld a, [wDexMaxSeenMon] + cp 7 + jp c, .loop ; can't if the list is shorter than 7 + sub 7 + ld b, a + ld a, [wListScrollOffset] cp b - jp z,.loop + jp z, .loop inc a - ld [wListScrollOffset],a + ld [wListScrollOffset], a jp .loop .checkIfRightPressed - bit 4,a ; was Right pressed? - jr z,.checkIfLeftPressed + bit 4, a ; was Right pressed? + jr z, .checkIfLeftPressed .rightPressed ; scroll down 7 rows - ld a,[wDexMaxSeenMon] - cp a,7 - jp c,.loop ; can't if the list is shorter than 7 - sub a,6 - ld b,a - ld a,[wListScrollOffset] - add a,7 - ld [wListScrollOffset],a + ld a, [wDexMaxSeenMon] + cp 7 + jp c, .loop ; can't if the list is shorter than 7 + sub 6 + ld b, a + ld a, [wListScrollOffset] + add 7 + ld [wListScrollOffset], a cp b - jp c,.loop + jp c, .loop dec b - ld a,b - ld [wListScrollOffset],a + ld a, b + ld [wListScrollOffset], a jp .loop .checkIfLeftPressed ; scroll up 7 rows - bit 5,a ; was Left pressed? - jr z,.buttonAPressed + bit 5, a ; was Left pressed? + jr z, .buttonAPressed .leftPressed - ld a,[wListScrollOffset] - sub a,7 - ld [wListScrollOffset],a - jp nc,.loop + ld a, [wListScrollOffset] + sub 7 + ld [wListScrollOffset], a + jp nc, .loop xor a - ld [wListScrollOffset],a + ld [wListScrollOffset], a jp .loop .buttonAPressed scf @@ -350,15 +350,15 @@ HandlePokedexListMenu: ret DrawPokedexVerticalLine: - ld c,9 ; height of line - ld de,SCREEN_WIDTH - ld a,$71 ; vertical line tile + ld c, 9 ; height of line + ld de, SCREEN_WIDTH + ld a, $71 ; vertical line tile .loop - ld [hl],a - add hl,de - xor a,1 ; toggle between vertical line tile and box tile + ld [hl], a + add hl, de + xor 1 ; toggle between vertical line tile and box tile dec c - jr nz,.loop + jr nz, .loop ret PokedexSeenText: @@ -381,12 +381,12 @@ PokedexMenuItemsText: ; [wd11e] = pokedex number ; hl = address of bit field IsPokemonBitSet: - ld a,[wd11e] + ld a, [wd11e] dec a - ld c,a - ld b,FLAG_TEST + ld c, a + ld b, FLAG_TEST predef FlagActionPredef - ld a,c + ld a, c and a ret @@ -399,26 +399,26 @@ ShowPokedexData: ; function to display pokedex data from inside the pokedex ShowPokedexDataInternal: - ld hl,wd72c - set 1,[hl] - ld a,$33 ; 3/7 volume - ld [rNR50],a + ld hl, wd72c + set 1, [hl] + ld a, $33 ; 3/7 volume + ld [rNR50], a call GBPalWhiteOut ; zero all palettes call ClearScreen - ld a,[wd11e] ; pokemon ID - ld [wcf91],a + ld a, [wd11e] ; pokemon ID + ld [wcf91], a push af ld b, SET_PAL_POKEDEX call RunPaletteCommand pop af - ld [wd11e],a - ld a,[hTilesetType] + ld [wd11e], a + ld a, [hTilesetType] push af xor a - ld [hTilesetType],a + ld [hTilesetType], a coord hl, 0, 0 - ld de,1 + ld de, 1 lb bc, $64, SCREEN_WIDTH call DrawTileLine ; draw top border @@ -427,71 +427,71 @@ ShowPokedexDataInternal: call DrawTileLine ; draw bottom border coord hl, 0, 1 - ld de,20 + ld de, 20 lb bc, $66, $10 call DrawTileLine ; draw left border coord hl, 19, 1 - ld b,$67 + ld b, $67 call DrawTileLine ; draw right border - ld a,$63 ; upper left corner tile + ld a, $63 ; upper left corner tile Coorda 0, 0 - ld a,$65 ; upper right corner tile + ld a, $65 ; upper right corner tile Coorda 19, 0 - ld a,$6c ; lower left corner tile + ld a, $6c ; lower left corner tile Coorda 0, 17 - ld a,$6e ; lower right corner tile + ld a, $6e ; lower right corner tile Coorda 19, 17 coord hl, 0, 9 - ld de,PokedexDataDividerLine + ld de, PokedexDataDividerLine call PlaceString ; draw horizontal divider line coord hl, 9, 6 - ld de,HeightWeightText + ld de, HeightWeightText call PlaceString call GetMonName coord hl, 9, 2 call PlaceString - ld hl,PokedexEntryPointers - ld a,[wd11e] + ld hl, PokedexEntryPointers + ld a, [wd11e] dec a - ld e,a - ld d,0 - add hl,de - add hl,de - ld a,[hli] - ld e,a - ld d,[hl] ; de = address of pokedex entry + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] ; de = address of pokedex entry coord hl, 9, 4 call PlaceString ; print species name - ld h,b - ld l,c + ld h, b + ld l, c push de - ld a,[wd11e] + ld a, [wd11e] push af call IndexToPokedex coord hl, 2, 8 ld a, "№" - ld [hli],a - ld a,"⠄" - ld [hli],a - ld de,wd11e + ld [hli], a + ld a, "⠄" + ld [hli], a + ld de, wd11e lb bc, LEADING_ZEROES | 1, 3 call PrintNumber ; print pokedex number - ld hl,wPokedexOwned + ld hl, wPokedexOwned call IsPokemonBitSet pop af - ld [wd11e],a - ld a,[wcf91] - ld [wd0b5],a + ld [wd11e], a + ld a, [wcf91] + ld [wd0b5], a pop de push af @@ -504,7 +504,7 @@ ShowPokedexDataInternal: call GetMonHeader ; load pokemon picture location coord hl, 1, 1 call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture - ld a,[wcf91] + ld a, [wcf91] call PlayCry ; play pokemon cry pop hl @@ -512,83 +512,83 @@ ShowPokedexDataInternal: pop bc pop af - ld a,c + ld a, c and a - jp z,.waitForButtonPress ; if the pokemon has not been owned, don't print the height, weight, or description + jp z, .waitForButtonPress ; if the pokemon has not been owned, don't print the height, weight, or description inc de ; de = address of feet (height) - ld a,[de] ; reads feet, but a is overwritten without being used + ld a, [de] ; reads feet, but a is overwritten without being used coord hl, 12, 6 lb bc, 1, 2 call PrintNumber ; print feet (height) - ld a,$60 ; feet symbol tile (one tick) - ld [hl],a + ld a, $60 ; feet symbol tile (one tick) + ld [hl], a inc de inc de ; de = address of inches (height) coord hl, 15, 6 lb bc, LEADING_ZEROES | 1, 2 call PrintNumber ; print inches (height) - ld a,$61 ; inches symbol tile (two ticks) - ld [hl],a + ld a, $61 ; inches symbol tile (two ticks) + ld [hl], a ; now print the weight (note that weight is stored in tenths of pounds internally) inc de inc de inc de ; de = address of upper byte of weight push de ; put weight in big-endian order at hDexWeight - ld hl,hDexWeight - ld a,[hl] ; save existing value of [hDexWeight] + ld hl, hDexWeight + ld a, [hl] ; save existing value of [hDexWeight] push af - ld a,[de] ; a = upper byte of weight - ld [hli],a ; store upper byte of weight in [hDexWeight] - ld a,[hl] ; save existing value of [hDexWeight + 1] + ld a, [de] ; a = upper byte of weight + ld [hli], a ; store upper byte of weight in [hDexWeight] + ld a, [hl] ; save existing value of [hDexWeight + 1] push af dec de - ld a,[de] ; a = lower byte of weight - ld [hl],a ; store lower byte of weight in [hDexWeight + 1] - ld de,hDexWeight + ld a, [de] ; a = lower byte of weight + ld [hl], a ; store lower byte of weight in [hDexWeight + 1] + ld de, hDexWeight coord hl, 11, 8 lb bc, 2, 5 ; 2 bytes, 5 digits call PrintNumber ; print weight coord hl, 14, 8 - ld a,[hDexWeight + 1] - sub a,10 - ld a,[hDexWeight] - sbc a,0 - jr nc,.next - ld [hl],"0" ; if the weight is less than 10, put a 0 before the decimal point + ld a, [hDexWeight + 1] + sub 10 + ld a, [hDexWeight] + sbc 0 + jr nc, .next + ld [hl], "0" ; if the weight is less than 10, put a 0 before the decimal point .next inc hl - ld a,[hli] - ld [hld],a ; make space for the decimal point by moving the last digit forward one tile - ld [hl],"⠄" ; decimal point tile + ld a, [hli] + ld [hld], a ; make space for the decimal point by moving the last digit forward one tile + ld [hl], "⠄" ; decimal point tile pop af - ld [hDexWeight + 1],a ; restore original value of [hDexWeight + 1] + ld [hDexWeight + 1], a ; restore original value of [hDexWeight + 1] pop af - ld [hDexWeight],a ; restore original value of [hDexWeight] + ld [hDexWeight], a ; restore original value of [hDexWeight] pop hl inc hl ; hl = address of pokedex description text coord bc, 1, 11 - ld a,2 - ld [$fff4],a + ld a, 2 + ld [$fff4], a call TextCommandProcessor ; print pokedex description text xor a - ld [$fff4],a + ld [$fff4], a .waitForButtonPress call JoypadLowSensitivity - ld a,[hJoy5] - and a,A_BUTTON | B_BUTTON - jr z,.waitForButtonPress + ld a, [hJoy5] + and A_BUTTON | B_BUTTON + jr z, .waitForButtonPress pop af - ld [hTilesetType],a + ld [hTilesetType], a call GBPalWhiteOut call ClearScreen call RunDefaultPaletteCommand call LoadTextBoxTilePatterns call GBPalNormal - ld hl,wd72c - res 1,[hl] - ld a,$77 ; max volume - ld [rNR50],a + ld hl, wd72c + res 1, [hl] + ld a, $77 ; max volume + ld [rNR50], a ret HeightWeightText: @@ -617,10 +617,10 @@ DrawTileLine: push bc push de .loop - ld [hl],b - add hl,de + ld [hl], b + add hl, de dec c - jr nz,.loop + jr nz, .loop pop de pop bc ret @@ -631,35 +631,35 @@ PokedexToIndex: ; converts the Pokédex number at wd11e to an index push bc push hl - ld a,[wd11e] - ld b,a - ld c,0 - ld hl,PokedexOrder + ld a, [wd11e] + ld b, a + ld c, 0 + ld hl, PokedexOrder .loop ; go through the list until we find an entry with a matching dex number inc c - ld a,[hli] + ld a, [hli] cp b - jr nz,.loop + jr nz, .loop - ld a,c - ld [wd11e],a + ld a, c + ld [wd11e], a pop hl pop bc ret IndexToPokedex: - ; converts the indexédex number at wd11e to a Pokédex number + ; converts the index number at wd11e to a Pokédex number push bc push hl - ld a,[wd11e] + ld a, [wd11e] dec a - ld hl,PokedexOrder - ld b,0 - ld c,a - add hl,bc - ld a,[hl] - ld [wd11e],a + ld hl, PokedexOrder + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + ld [wd11e], a pop hl pop bc ret diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm index f6ca013b..bcd0d4ea 100755 --- a/engine/menu/prize_menu.asm +++ b/engine/menu/prize_menu.asm @@ -1,26 +1,26 @@ CeladonPrizeMenu: - ld b,COIN_CASE + ld b, COIN_CASE call IsItemInBag - jr nz,.havingCoinCase - ld hl,RequireCoinCaseTextPtr + jr nz, .havingCoinCase + ld hl, RequireCoinCaseTextPtr jp PrintText .havingCoinCase - ld hl,wd730 - set 6,[hl] ; disable letter-printing delay - ld hl,ExchangeCoinsForPrizesTextPtr + ld hl, wd730 + set 6, [hl] ; disable letter-printing delay + ld hl, ExchangeCoinsForPrizesTextPtr call PrintText ; the following are the menu settings xor a - ld [wCurrentMenuItem],a - ld [wLastMenuItem],a - ld a,A_BUTTON | B_BUTTON - ld [wMenuWatchedKeys],a - ld a,$03 - ld [wMaxMenuItem],a - ld a,$04 - ld [wTopMenuItemY],a - ld a,$01 - ld [wTopMenuItemX],a + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a + ld a, $03 + ld [wMaxMenuItem], a + ld a, $04 + ld [wTopMenuItemY], a + ld a, $01 + ld [wTopMenuItemX], a call PrintPrizePrice coord hl, 0, 2 ld b, 8 @@ -28,18 +28,18 @@ CeladonPrizeMenu: call TextBoxBorder call GetPrizeMenuId call UpdateSprites - ld hl,WhichPrizeTextPtr + ld hl, WhichPrizeTextPtr call PrintText call HandleMenuInput ; menu choice handler - bit 1,a ; keypress = B (Cancel) + bit 1, a ; keypress = B (Cancel) jr nz, .noChoice - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] cp 3 ; "NO,THANKS" choice jr z, .noChoice call HandlePrizeChoice .noChoice - ld hl,wd730 - res 6,[hl] + ld hl, wd730 + res 6, [hl] ret RequireCoinCaseTextPtr: @@ -64,85 +64,85 @@ GetPrizeMenuId: ; display the three prizes' names ; (distinguishing between Pokemon names ; and Items (specifically TMs) names) - ld a,[hSpriteIndexOrTextID] + ld a, [hSpriteIndexOrTextID] sub 3 ; prize-texts' id are 3, 4 and 5 - ld [wWhichPrizeWindow],a ; prize-texts' id (relative, i.e. 0, 1 or 2) + ld [wWhichPrizeWindow], a ; prize-texts' id (relative, i.e. 0, 1 or 2) add a add a - ld d,0 - ld e,a - ld hl,PrizeDifferentMenuPtrs - add hl,de - ld a,[hli] - ld d,[hl] - ld e,a + ld d, 0 + ld e, a + ld hl, PrizeDifferentMenuPtrs + add hl, de + ld a, [hli] + ld d, [hl] + ld e, a inc hl push hl - ld hl,wPrize1 + ld hl, wPrize1 call CopyString pop hl - ld a,[hli] - ld h,[hl] - ld l,a - ld de,wPrize1Price - ld bc,6 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wPrize1Price + ld bc, 6 call CopyData - ld a,[wWhichPrizeWindow] + ld a, [wWhichPrizeWindow] cp 2 ;is TM_menu? - jr nz,.putMonName - ld a,[wPrize1] - ld [wd11e],a + jr nz, .putMonName + ld a, [wPrize1] + ld [wd11e], a call GetItemName coord hl, 2, 4 call PlaceString - ld a,[wPrize2] - ld [wd11e],a + ld a, [wPrize2] + ld [wd11e], a call GetItemName coord hl, 2, 6 call PlaceString - ld a,[wPrize3] - ld [wd11e],a + ld a, [wPrize3] + ld [wd11e], a call GetItemName coord hl, 2, 8 call PlaceString jr .putNoThanksText .putMonName - ld a,[wPrize1] - ld [wd11e],a + ld a, [wPrize1] + ld [wd11e], a call GetMonName coord hl, 2, 4 call PlaceString - ld a,[wPrize2] - ld [wd11e],a + ld a, [wPrize2] + ld [wd11e], a call GetMonName coord hl, 2, 6 call PlaceString - ld a,[wPrize3] - ld [wd11e],a + ld a, [wPrize3] + ld [wd11e], a call GetMonName coord hl, 2, 8 call PlaceString .putNoThanksText coord hl, 2, 10 - ld de,NoThanksText + ld de, NoThanksText call PlaceString ; put prices on the right side of the textbox - ld de,wPrize1Price + ld de, wPrize1Price coord hl, 13, 5 ; reg. c: ; [low nybble] number of bytes ; [bit 765 = %100] space-padding (not zero-padding) - ld c,(1 << 7 | 2) + ld c, (1 << 7 | 2) ; Function $15CD displays BCD value (same routine ; used by text-command $02) call PrintBCDNumber - ld de,wPrize2Price + ld de, wPrize2Price coord hl, 13, 7 - ld c,(1 << 7 | 2) + ld c, (1 << 7 | 2) call PrintBCDNumber - ld de,wPrize3Price + ld de, wPrize3Price coord hl, 13, 9 - ld c,(1 << 7 | 2) + ld c, (1 << 7 | 2) jp PrintBCDNumber INCLUDE "data/prizes.asm" @@ -160,8 +160,8 @@ PrintPrizePrice: ld de, .SixSpacesString call PlaceString coord hl, 13, 1 - ld de,wPlayerCoins - ld c,%10000010 + ld de, wPlayerCoins + ld c, %10000010 call PrintBCDNumber ret @@ -172,30 +172,30 @@ PrintPrizePrice: db " @" LoadCoinsToSubtract: - ld a,[wWhichPrize] + ld a, [wWhichPrize] add a - ld d,0 - ld e,a - ld hl,wPrize1Price - add hl,de ; get selected prize's price + ld d, 0 + ld e, a + ld hl, wPrize1Price + add hl, de ; get selected prize's price xor a - ld [hUnusedCoinsByte],a - ld a,[hli] - ld [hCoins],a - ld a,[hl] - ld [hCoins + 1],a + ld [hUnusedCoinsByte], a + ld a, [hli] + ld [hCoins], a + ld a, [hl] + ld [hCoins + 1], a ret HandlePrizeChoice: - ld a,[wCurrentMenuItem] - ld [wWhichPrize],a - ld d,0 - ld e,a - ld hl,wPrize1 - add hl,de - ld a,[hl] - ld [wd11e],a - ld a,[wWhichPrizeWindow] + ld a, [wCurrentMenuItem] + ld [wWhichPrize], a + ld d, 0 + ld e, a + ld hl, wPrize1 + add hl, de + ld a, [hl] + ld [wd11e], a + ld a, [wWhichPrizeWindow] cp 2 ; is prize a TM? jr nz, .getMonName call GetItemName @@ -203,40 +203,40 @@ HandlePrizeChoice: .getMonName call GetMonName .givePrize - ld hl,SoYouWantPrizeTextPtr + ld hl, SoYouWantPrizeTextPtr call PrintText call YesNoChoice - ld a,[wCurrentMenuItem] ; yes/no answer (Y=0, N=1) + ld a, [wCurrentMenuItem] ; yes/no answer (Y=0, N=1) and a jr nz, .printOhFineThen call LoadCoinsToSubtract call HasEnoughCoins jr c, .notEnoughCoins - ld a,[wWhichPrizeWindow] + ld a, [wWhichPrizeWindow] cp $02 jr nz, .giveMon - ld a,[wd11e] - ld b,a - ld a,1 - ld c,a + ld a, [wd11e] + ld b, a + ld a, 1 + ld c, a call GiveItem jr nc, .bagFull jr .subtractCoins .giveMon - ld a,[wd11e] - ld [wcf91],a + ld a, [wd11e] + ld [wcf91], a push af call GetPrizeMonLevel - ld c,a + ld c, a pop af - ld b,a + ld b, a call GivePokemon ; If either the party or box was full, wait after displaying message. push af - ld a,[wAddedToParty] + ld a, [wAddedToParty] and a - call z,WaitForTextScrollButtonPress + call z, WaitForTextScrollButtonPress pop af ; If the mon couldn't be given to the player (because both the party and box @@ -245,19 +245,19 @@ HandlePrizeChoice: .subtractCoins call LoadCoinsToSubtract - ld hl,hCoins + 1 - ld de,wPlayerCoins + 1 - ld c,$02 ; how many bytes + ld hl, hCoins + 1 + ld de, wPlayerCoins + 1 + ld c, $02 ; how many bytes predef SubBCDPredef jp PrintPrizePrice .bagFull - ld hl,PrizeRoomBagIsFullTextPtr + ld hl, PrizeRoomBagIsFullTextPtr jp PrintText .notEnoughCoins - ld hl,SorryNeedMoreCoinsText + ld hl, SorryNeedMoreCoinsText jp PrintText .printOhFineThen - ld hl,OhFineThenTextPtr + ld hl, OhFineThenTextPtr jp PrintText UnknownPrizeData: @@ -289,18 +289,18 @@ OhFineThenTextPtr: db "@" GetPrizeMonLevel: - ld a,[wcf91] - ld b,a - ld hl,PrizeMonLevelDictionary + ld a, [wcf91] + ld b, a + ld hl, PrizeMonLevelDictionary .loop - ld a,[hli] + ld a, [hli] cp b - jr z,.matchFound + jr z, .matchFound inc hl jr .loop .matchFound - ld a,[hl] - ld [wCurEnemyLVL],a + ld a, [hl] + ld [wCurEnemyLVL], a ret INCLUDE "data/prize_mon_levels.asm" diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm index 029d8c01..eb4b4f2d 100755 --- a/engine/menu/start_menu.asm +++ b/engine/menu/start_menu.asm @@ -1,9 +1,9 @@ DisplayStartMenu:: - ld a,BANK(StartMenu_Pokedex) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a - ld a,[wWalkBikeSurfState] ; walking/biking/surfing - ld [wWalkBikeSurfStateCopy],a + ld a, BANK(StartMenu_Pokedex) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ld a, [wWalkBikeSurfState] ; walking/biking/surfing + ld [wWalkBikeSurfStateCopy], a ld a, SFX_START_MENU call PlaySound @@ -13,73 +13,73 @@ RedisplayStartMenu:: call UpdateSprites .loop call HandleMenuInput - ld b,a + ld b, a .checkIfUpPressed - bit 6,a ; was Up pressed? - jr z,.checkIfDownPressed - ld a,[wCurrentMenuItem] ; menu selection + bit 6, a ; was Up pressed? + jr z, .checkIfDownPressed + ld a, [wCurrentMenuItem] ; menu selection and a - jr nz,.loop - ld a,[wLastMenuItem] + jr nz, .loop + ld a, [wLastMenuItem] and a - jr nz,.loop + jr nz, .loop ; if the player pressed tried to go past the top item, wrap around to the bottom CheckEvent EVENT_GOT_POKEDEX - ld a,6 ; there are 7 menu items with the pokedex, so the max index is 6 - jr nz,.wrapMenuItemId + ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6 + jr nz, .wrapMenuItemId dec a ; there are only 6 menu items without the pokedex .wrapMenuItemId - ld [wCurrentMenuItem],a + ld [wCurrentMenuItem], a call EraseMenuCursor jr .loop .checkIfDownPressed - bit 7,a - jr z,.buttonPressed + bit 7, a + jr z, .buttonPressed ; if the player pressed tried to go past the bottom item, wrap around to the top CheckEvent EVENT_GOT_POKEDEX - ld a,[wCurrentMenuItem] - ld c,7 ; there are 7 menu items with the pokedex - jr nz,.checkIfPastBottom + ld a, [wCurrentMenuItem] + ld c, 7 ; there are 7 menu items with the pokedex + jr nz, .checkIfPastBottom dec c ; there are only 6 menu items without the pokedex .checkIfPastBottom cp c - jr nz,.loop + jr nz, .loop ; the player went past the bottom, so wrap to the top xor a - ld [wCurrentMenuItem],a + ld [wCurrentMenuItem], a call EraseMenuCursor jr .loop .buttonPressed ; A, B, or Start button pressed call PlaceUnfilledArrowMenuCursor - ld a,[wCurrentMenuItem] - ld [wBattleAndStartSavedMenuItem],a ; save current menu selection - ld a,b - and a,%00001010 ; was the Start button or B button pressed? - jp nz,CloseStartMenu + ld a, [wCurrentMenuItem] + ld [wBattleAndStartSavedMenuItem], a ; save current menu selection + ld a, b + and %00001010 ; was the Start button or B button pressed? + jp nz, CloseStartMenu call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2 CheckEvent EVENT_GOT_POKEDEX - ld a,[wCurrentMenuItem] - jr nz,.displayMenuItem + ld a, [wCurrentMenuItem] + jr nz, .displayMenuItem inc a ; adjust position to account for missing pokedex menu item .displayMenuItem - cp a,0 - jp z,StartMenu_Pokedex - cp a,1 - jp z,StartMenu_Pokemon - cp a,2 - jp z,StartMenu_Item - cp a,3 - jp z,StartMenu_TrainerInfo - cp a,4 - jp z,StartMenu_SaveReset - cp a,5 - jp z,StartMenu_Option + cp 0 + jp z, StartMenu_Pokedex + cp 1 + jp z, StartMenu_Pokemon + cp 2 + jp z, StartMenu_Item + cp 3 + jp z, StartMenu_TrainerInfo + cp 4 + jp z, StartMenu_SaveReset + cp 5 + jp z, StartMenu_Option ; EXIT falls through to here CloseStartMenu:: call Joypad - ld a,[hJoyPressed] - bit 0,a ; was A button newly pressed? - jr nz,CloseStartMenu + ld a, [hJoyPressed] + bit 0, a ; was A button newly pressed? + jr nz, CloseStartMenu call LoadTextBoxTilePatterns jp CloseTextDisplay diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 251d7ae4..947837e3 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -7,22 +7,22 @@ StartMenu_Pokedex: jp RedisplayStartMenu StartMenu_Pokemon: - ld a,[wPartyCount] + ld a, [wPartyCount] and a - jp z,RedisplayStartMenu + jp z, RedisplayStartMenu xor a - ld [wMenuItemToSwap],a - ld [wPartyMenuTypeOrMessageID],a - ld [wUpdateSpritesEnabled],a + ld [wMenuItemToSwap], a + ld [wPartyMenuTypeOrMessageID], a + ld [wUpdateSpritesEnabled], a call DisplayPartyMenu jr .checkIfPokemonChosen .loop xor a - ld [wMenuItemToSwap],a - ld [wPartyMenuTypeOrMessageID],a + ld [wMenuItemToSwap], a + ld [wPartyMenuTypeOrMessageID], a call GoBackToPartyMenu .checkIfPokemonChosen - jr nc,.chosePokemon + jr nc, .chosePokemon .exitMenu call GBPalWhiteOutWithDelay3 call RestoreScreenTilesAndReloadTilePatterns @@ -30,95 +30,95 @@ StartMenu_Pokemon: jp RedisplayStartMenu .chosePokemon call SaveScreenTilesToBuffer1 - ld a,FIELD_MOVE_MON_MENU - ld [wTextBoxID],a + ld a, FIELD_MOVE_MON_MENU + ld [wTextBoxID], a call DisplayTextBoxID ; display pokemon menu options - ld hl,wFieldMoves + ld hl, wFieldMoves lb bc, 2, 12 ; max menu item ID, top menu item Y - ld e,5 + ld e, 5 .adjustMenuVariablesLoop dec e - jr z,.storeMenuVariables - ld a,[hli] + jr z, .storeMenuVariables + ld a, [hli] and a ; end of field moves? - jr z,.storeMenuVariables + jr z, .storeMenuVariables inc b dec c dec c jr .adjustMenuVariablesLoop .storeMenuVariables - ld hl,wTopMenuItemY - ld a,c - ld [hli],a ; top menu item Y - ld a,[hFieldMoveMonMenuTopMenuItemX] - ld [hli],a ; top menu item X + ld hl, wTopMenuItemY + ld a, c + ld [hli], a ; top menu item Y + ld a, [hFieldMoveMonMenuTopMenuItemX] + ld [hli], a ; top menu item X xor a - ld [hli],a ; current menu item ID + ld [hli], a ; current menu item ID inc hl - ld a,b - ld [hli],a ; max menu item ID - ld a,A_BUTTON | B_BUTTON - ld [hli],a ; menu watched keys + ld a, b + ld [hli], a ; max menu item ID + ld a, A_BUTTON | B_BUTTON + ld [hli], a ; menu watched keys xor a - ld [hl],a + ld [hl], a call HandleMenuInput push af call LoadScreenTilesFromBuffer1 ; restore saved screen pop af - bit 1,a ; was the B button pressed? - jp nz,.loop + bit 1, a ; was the B button pressed? + jp nz, .loop ; if the B button wasn't pressed - ld a,[wMaxMenuItem] - ld b,a - ld a,[wCurrentMenuItem] ; menu selection + ld a, [wMaxMenuItem] + ld b, a + ld a, [wCurrentMenuItem] ; menu selection cp b - jp z,.exitMenu ; if the player chose Cancel + jp z, .exitMenu ; if the player chose Cancel dec b cp b - jr z,.choseSwitch + jr z, .choseSwitch dec b cp b - jp z,.choseStats - ld c,a - ld b,0 - ld hl,wFieldMoves - add hl,bc + jp z, .choseStats + ld c, a + ld b, 0 + ld hl, wFieldMoves + add hl, bc jp .choseOutOfBattleMove .choseSwitch - ld a,[wPartyCount] - cp a,2 ; is there more than one pokemon in the party? - jp c,StartMenu_Pokemon ; if not, no switching + ld a, [wPartyCount] + cp 2 ; is there more than one pokemon in the party? + jp c, StartMenu_Pokemon ; if not, no switching call SwitchPartyMon_InitVarOrSwapData ; init [wMenuItemToSwap] - ld a,SWAP_MONS_PARTY_MENU - ld [wPartyMenuTypeOrMessageID],a + ld a, SWAP_MONS_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call GoBackToPartyMenu jp .checkIfPokemonChosen .choseStats call ClearSprites xor a ; PLAYER_PARTY_DATA - ld [wMonDataLocation],a + ld [wMonDataLocation], a predef StatusScreen predef StatusScreen2 call ReloadMapData jp StartMenu_Pokemon .choseOutOfBattleMove push hl - ld a,[wWhichPokemon] - ld hl,wPartyMonNicks + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName pop hl - ld a,[hl] + ld a, [hl] dec a add a - ld b,0 - ld c,a - ld hl,.outOfBattleMovePointers - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a - ld a,[wObtainedBadges] ; badges obtained - jp [hl] + ld b, 0 + ld c, a + ld hl, .outOfBattleMovePointers + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wObtainedBadges] ; badges obtained + jp hl .outOfBattleMovePointers dw .cut dw .fly @@ -130,62 +130,62 @@ StartMenu_Pokemon: dw .teleport dw .softboiled .fly - bit 2,a ; does the player have the Thunder Badge? - jp z,.newBadgeRequired + bit 2, a ; does the player have the Thunder Badge? + jp z, .newBadgeRequired call CheckIfInOutsideMap - jr z,.canFly - ld a,[wWhichPokemon] - ld hl,wPartyMonNicks + jr z, .canFly + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName - ld hl,.cannotFlyHereText + ld hl, .cannotFlyHereText call PrintText jp .loop .canFly call ChooseFlyDestination - ld a,[wd732] - bit 3,a ; did the player decide to fly? - jp nz,.goBackToMap + ld a, [wd732] + bit 3, a ; did the player decide to fly? + jp nz, .goBackToMap call LoadFontTilePatterns - ld hl,wd72e - set 1,[hl] + ld hl, wd72e + set 1, [hl] jp StartMenu_Pokemon .cut - bit 1,a ; does the player have the Cascade Badge? - jp z,.newBadgeRequired + bit 1, a ; does the player have the Cascade Badge? + jp z, .newBadgeRequired predef UsedCut - ld a,[wActionResultOrTookBattleTurn] + ld a, [wActionResultOrTookBattleTurn] and a - jp z,.loop + jp z, .loop jp CloseTextDisplay .surf - bit 4,a ; does the player have the Soul Badge? - jp z,.newBadgeRequired + bit 4, a ; does the player have the Soul Badge? + jp z, .newBadgeRequired callba IsSurfingAllowed - ld hl,wd728 - bit 1,[hl] - res 1,[hl] - jp z,.loop - ld a,SURFBOARD - ld [wcf91],a - ld [wPseudoItemID],a + ld hl, wd728 + bit 1, [hl] + res 1, [hl] + jp z, .loop + ld a, SURFBOARD + ld [wcf91], a + ld [wPseudoItemID], a call UseItem - ld a,[wActionResultOrTookBattleTurn] + ld a, [wActionResultOrTookBattleTurn] and a - jp z,.loop + jp z, .loop call GBPalWhiteOutWithDelay3 jp .goBackToMap .strength - bit 3,a ; does the player have the Rainbow Badge? - jp z,.newBadgeRequired + bit 3, a ; does the player have the Rainbow Badge? + jp z, .newBadgeRequired predef PrintStrengthTxt call GBPalWhiteOutWithDelay3 jp .goBackToMap .flash - bit 0,a ; does the player have the Boulder Badge? - jp z,.newBadgeRequired + bit 0, a ; does the player have the Boulder Badge? + jp z, .newBadgeRequired xor a - ld [wMapPalOffset],a - ld hl,.flashLightsAreaText + ld [wMapPalOffset], a + ld hl, .flashLightsAreaText call PrintText call GBPalWhiteOutWithDelay3 jp .goBackToMap @@ -193,34 +193,34 @@ StartMenu_Pokemon: TX_FAR _FlashLightsAreaText db "@" .dig - ld a,ESCAPE_ROPE - ld [wcf91],a - ld [wPseudoItemID],a + ld a, ESCAPE_ROPE + ld [wcf91], a + ld [wPseudoItemID], a call UseItem - ld a,[wActionResultOrTookBattleTurn] + ld a, [wActionResultOrTookBattleTurn] and a - jp z,.loop + jp z, .loop call GBPalWhiteOutWithDelay3 jp .goBackToMap .teleport call CheckIfInOutsideMap - jr z,.canTeleport - ld a,[wWhichPokemon] - ld hl,wPartyMonNicks + jr z, .canTeleport + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName - ld hl,.cannotUseTeleportNowText + ld hl, .cannotUseTeleportNowText call PrintText jp .loop .canTeleport - ld hl,.warpToLastPokemonCenterText + ld hl, .warpToLastPokemonCenterText call PrintText - ld hl,wd732 - set 3,[hl] - set 6,[hl] - ld hl,wd72e - set 1,[hl] - res 4,[hl] - ld c,60 + ld hl, wd732 + set 3, [hl] + set 6, [hl] + ld hl, wd72e + set 1, [hl] + res 4, [hl] + ld c, 60 call DelayFrames call GBPalWhiteOutWithDelay3 jp .goBackToMap @@ -234,39 +234,39 @@ StartMenu_Pokemon: TX_FAR _CannotFlyHereText db "@" .softboiled - ld hl,wPartyMon1MaxHP - ld a,[wWhichPokemon] - ld bc,wPartyMon2 - wPartyMon1 + ld hl, wPartyMon1MaxHP + ld a, [wWhichPokemon] + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes - ld a,[hli] - ld [H_DIVIDEND],a - ld a,[hl] - ld [H_DIVIDEND + 1],a - ld a,5 - ld [H_DIVISOR],a - ld b,2 ; number of bytes + ld a, [hli] + ld [H_DIVIDEND], a + ld a, [hl] + ld [H_DIVIDEND + 1], a + ld a, 5 + ld [H_DIVISOR], a + ld b, 2 ; number of bytes call Divide - ld bc,wPartyMon1HP - wPartyMon1MaxHP - add hl,bc - ld a,[hld] - ld b,a - ld a,[H_QUOTIENT + 3] + ld bc, wPartyMon1HP - wPartyMon1MaxHP + add hl, bc + ld a, [hld] + ld b, a + ld a, [H_QUOTIENT + 3] sub b - ld b,[hl] - ld a,[H_QUOTIENT + 2] + ld b, [hl] + ld a, [H_QUOTIENT + 2] sbc b - jp nc,.notHealthyEnough - ld a,[wPartyAndBillsPCSavedMenuItem] + jp nc, .notHealthyEnough + ld a, [wPartyAndBillsPCSavedMenuItem] push af - ld a,POTION - ld [wcf91],a - ld [wPseudoItemID],a + ld a, POTION + ld [wcf91], a + ld [wPseudoItemID], a call UseItem pop af - ld [wPartyAndBillsPCSavedMenuItem],a + ld [wPartyAndBillsPCSavedMenuItem], a jp .loop .notHealthyEnough ; if current HP is less than 1/5 of max HP - ld hl,.notHealthyEnoughText + ld hl, .notHealthyEnoughText call PrintText jp .loop .notHealthyEnoughText @@ -276,7 +276,7 @@ StartMenu_Pokemon: call RestoreScreenTilesAndReloadTilePatterns jp CloseTextDisplay .newBadgeRequired - ld hl,.newBadgeRequiredText + ld hl, .newBadgeRequiredText call PrintText jp .loop .newBadgeRequiredText @@ -286,13 +286,13 @@ StartMenu_Pokemon: ; writes a blank tile to all possible menu cursor positions on the party menu ErasePartyMenuCursors: coord hl, 0, 1 - ld bc,2 * 20 ; menu cursor positions are 2 rows apart - ld a,6 ; 6 menu cursor positions + ld bc, 2 * 20 ; menu cursor positions are 2 rows apart + ld a, 6 ; 6 menu cursor positions .loop - ld [hl]," " - add hl,bc + ld [hl], " " + add hl, bc dec a - jr nz,.loop + jr nz, .loop ret ItemMenuLoop: @@ -300,28 +300,28 @@ ItemMenuLoop: call RunDefaultPaletteCommand StartMenu_Item: - ld a,[wLinkState] + ld a, [wLinkState] dec a ; is the player in the Colosseum or Trade Centre? - jr nz,.notInCableClubRoom - ld hl,CannotUseItemsHereText + jr nz, .notInCableClubRoom + ld hl, CannotUseItemsHereText call PrintText jr .exitMenu .notInCableClubRoom - ld bc,wNumBagItems - ld hl,wListPointer - ld a,c - ld [hli],a - ld [hl],b ; store item bag pointer in wListPointer (for DisplayListMenuID) + ld bc, wNumBagItems + ld hl, wListPointer + ld a, c + ld [hli], a + ld [hl], b ; store item bag pointer in wListPointer (for DisplayListMenuID) xor a - ld [wPrintItemPrices],a - ld a,ITEMLISTMENU - ld [wListMenuID],a - ld a,[wBagSavedMenuItem] - ld [wCurrentMenuItem],a + ld [wPrintItemPrices], a + ld a, ITEMLISTMENU + ld [wListMenuID], a + ld a, [wBagSavedMenuItem] + ld [wCurrentMenuItem], a call DisplayListMenuID - ld a,[wCurrentMenuItem] - ld [wBagSavedMenuItem],a - jr nc,.choseItem + ld a, [wCurrentMenuItem] + ld [wBagSavedMenuItem], a + jr nc, .choseItem .exitMenu call LoadScreenTilesFromBuffer2 ; restore saved screen call LoadTextBoxTilePatterns @@ -329,111 +329,111 @@ StartMenu_Item: jp RedisplayStartMenu .choseItem ; erase menu cursor (blank each tile in front of an item name) - ld a," " + ld a, " " Coorda 5, 4 Coorda 5, 6 Coorda 5, 8 Coorda 5, 10 call PlaceUnfilledArrowMenuCursor xor a - ld [wMenuItemToSwap],a - ld a,[wcf91] - cp a,BICYCLE - jp z,.useOrTossItem + ld [wMenuItemToSwap], a + ld a, [wcf91] + cp BICYCLE + jp z, .useOrTossItem .notBicycle1 - ld a,USE_TOSS_MENU_TEMPLATE - ld [wTextBoxID],a + ld a, USE_TOSS_MENU_TEMPLATE + ld [wTextBoxID], a call DisplayTextBoxID - ld hl,wTopMenuItemY - ld a,11 - ld [hli],a ; top menu item Y - ld a,14 - ld [hli],a ; top menu item X + ld hl, wTopMenuItemY + ld a, 11 + ld [hli], a ; top menu item Y + ld a, 14 + ld [hli], a ; top menu item X xor a - ld [hli],a ; current menu item ID + ld [hli], a ; current menu item ID inc hl inc a ; a = 1 - ld [hli],a ; max menu item ID - ld a,A_BUTTON | B_BUTTON - ld [hli],a ; menu watched keys + ld [hli], a ; max menu item ID + ld a, A_BUTTON | B_BUTTON + ld [hli], a ; menu watched keys xor a - ld [hl],a ; old menu item id + ld [hl], a ; old menu item id call HandleMenuInput call PlaceUnfilledArrowMenuCursor - bit 1,a ; was the B button pressed? - jr z,.useOrTossItem + bit 1, a ; was the B button pressed? + jr z, .useOrTossItem jp ItemMenuLoop .useOrTossItem ; if the player made the choice to use or toss the item - ld a,[wcf91] - ld [wd11e],a + ld a, [wcf91] + ld [wd11e], a call GetItemName call CopyStringToCF4B ; copy name to wcf4b - ld a,[wcf91] - cp a,BICYCLE - jr nz,.notBicycle2 - ld a,[wd732] - bit 5,a - jr z,.useItem_closeMenu - ld hl,CannotGetOffHereText + ld a, [wcf91] + cp BICYCLE + jr nz, .notBicycle2 + ld a, [wd732] + bit 5, a + jr z, .useItem_closeMenu + ld hl, CannotGetOffHereText call PrintText jp ItemMenuLoop .notBicycle2 - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - jr nz,.tossItem + jr nz, .tossItem ; use item - ld [wPseudoItemID],a ; a must be 0 due to above conditional jump - ld a,[wcf91] - cp a,HM_01 - jr nc,.useItem_partyMenu - ld hl,UsableItems_CloseMenu - ld de,1 + ld [wPseudoItemID], a ; a must be 0 due to above conditional jump + ld a, [wcf91] + cp HM_01 + jr nc, .useItem_partyMenu + ld hl, UsableItems_CloseMenu + ld de, 1 call IsInArray - jr c,.useItem_closeMenu - ld a,[wcf91] - ld hl,UsableItems_PartyMenu - ld de,1 + jr c, .useItem_closeMenu + ld a, [wcf91] + ld hl, UsableItems_PartyMenu + ld de, 1 call IsInArray - jr c,.useItem_partyMenu + jr c, .useItem_partyMenu call UseItem jp ItemMenuLoop .useItem_closeMenu xor a - ld [wPseudoItemID],a + ld [wPseudoItemID], a call UseItem - ld a,[wActionResultOrTookBattleTurn] + ld a, [wActionResultOrTookBattleTurn] and a - jp z,ItemMenuLoop + jp z, ItemMenuLoop jp CloseStartMenu .useItem_partyMenu - ld a,[wUpdateSpritesEnabled] + ld a, [wUpdateSpritesEnabled] push af call UseItem - ld a,[wActionResultOrTookBattleTurn] - cp a,$02 - jp z,.partyMenuNotDisplayed + ld a, [wActionResultOrTookBattleTurn] + cp $02 + jp z, .partyMenuNotDisplayed call GBPalWhiteOutWithDelay3 call RestoreScreenTilesAndReloadTilePatterns pop af - ld [wUpdateSpritesEnabled],a + ld [wUpdateSpritesEnabled], a jp StartMenu_Item .partyMenuNotDisplayed pop af - ld [wUpdateSpritesEnabled],a + ld [wUpdateSpritesEnabled], a jp ItemMenuLoop .tossItem call IsKeyItem - ld a,[wIsKeyItem] + ld a, [wIsKeyItem] and a - jr nz,.skipAskingQuantity - ld a,[wcf91] + jr nz, .skipAskingQuantity + ld a, [wcf91] call IsItemHM - jr c,.skipAskingQuantity + jr c, .skipAskingQuantity call DisplayChooseQuantityMenu inc a - jr z,.tossZeroItems + jr z, .tossZeroItems .skipAskingQuantity - ld hl,wNumBagItems + ld hl, wNumBagItems call TossItem .tossZeroItems jp ItemMenuLoop @@ -500,10 +500,10 @@ StartMenu_TrainerInfo: call GBPalWhiteOut call ClearScreen call UpdateSprites - ld a,[hTilesetType] + ld a, [hTilesetType] push af xor a - ld [hTilesetType],a + ld [hTilesetType], a call DrawTrainerInfo predef DrawBadges ; draw badges ld b, SET_PAL_TRAINER_CARD @@ -517,101 +517,101 @@ StartMenu_TrainerInfo: call ReloadMapData call LoadGBPal pop af - ld [hTilesetType],a + ld [hTilesetType], a jp RedisplayStartMenu ; loads tile patterns and draws everything except for gym leader faces / badges DrawTrainerInfo: - ld de,RedPicFront + ld de, RedPicFront lb bc, BANK(RedPicFront), $01 predef DisplayPicCenteredOrUpperRight call DisableLCD coord hl, 0, 2 - ld a," " + ld a, " " call TrainerInfo_DrawVerticalLine coord hl, 1, 2 call TrainerInfo_DrawVerticalLine - ld hl,vChars2 + $70 - ld de,vChars2 - ld bc,$70 * 4 + ld hl, vChars2 + $70 + ld de, vChars2 + ld bc, $70 * 4 call CopyData - ld hl,TrainerInfoTextBoxTileGraphics ; trainer info text box tile patterns - ld de,vChars2 + $770 - ld bc,$0080 + ld hl, TrainerInfoTextBoxTileGraphics ; trainer info text box tile patterns + ld de, vChars2 + $770 + ld bc, $0080 push bc call TrainerInfo_FarCopyData - ld hl,BlankLeaderNames - ld de,vChars2 + $600 - ld bc,$0170 + ld hl, BlankLeaderNames + ld de, vChars2 + $600 + ld bc, $0170 call TrainerInfo_FarCopyData pop bc - ld hl,BadgeNumbersTileGraphics ; badge number tile patterns - ld de,vChars1 + $580 + ld hl, BadgeNumbersTileGraphics ; badge number tile patterns + ld de, vChars1 + $580 call TrainerInfo_FarCopyData - ld hl,GymLeaderFaceAndBadgeTileGraphics ; gym leader face and badge tile patterns - ld de,vChars2 + $200 - ld bc,$0400 - ld a,$03 + ld hl, GymLeaderFaceAndBadgeTileGraphics ; gym leader face and badge tile patterns + ld de, vChars2 + $200 + ld bc, $0400 + ld a, $03 call FarCopyData2 - ld hl,TextBoxGraphics - ld de,$00d0 - add hl,de ; hl = colon tile pattern - ld de,vChars1 + $560 - ld bc,$0010 - ld a,$04 + ld hl, TextBoxGraphics + ld de, $00d0 + add hl, de ; hl = colon tile pattern + ld de, vChars1 + $560 + ld bc, $0010 + ld a, $04 push bc call FarCopyData2 pop bc - ld hl,TrainerInfoTextBoxTileGraphics + $80 ; background tile pattern - ld de,vChars1 + $570 + ld hl, TrainerInfoTextBoxTileGraphics + $80 ; background tile pattern + ld de, vChars1 + $570 call TrainerInfo_FarCopyData call EnableLCD - ld hl,wTrainerInfoTextBoxWidthPlus1 - ld a,18 + 1 - ld [hli],a + ld hl, wTrainerInfoTextBoxWidthPlus1 + ld a, 18 + 1 + ld [hli], a dec a - ld [hli],a - ld [hl],1 + ld [hli], a + ld [hl], 1 coord hl, 0, 0 call TrainerInfo_DrawTextBox - ld hl,wTrainerInfoTextBoxWidthPlus1 - ld a,16 + 1 - ld [hli],a + ld hl, wTrainerInfoTextBoxWidthPlus1 + ld a, 16 + 1 + ld [hli], a dec a - ld [hli],a - ld [hl],3 + ld [hli], a + ld [hl], 3 coord hl, 1, 10 call TrainerInfo_DrawTextBox coord hl, 0, 10 - ld a,$d7 + ld a, $d7 call TrainerInfo_DrawVerticalLine coord hl, 19, 10 call TrainerInfo_DrawVerticalLine coord hl, 6, 9 - ld de,TrainerInfo_BadgesText + ld de, TrainerInfo_BadgesText call PlaceString coord hl, 2, 2 - ld de,TrainerInfo_NameMoneyTimeText + ld de, TrainerInfo_NameMoneyTimeText call PlaceString coord hl, 7, 2 - ld de,wPlayerName + ld de, wPlayerName call PlaceString coord hl, 8, 4 - ld de,wPlayerMoney - ld c,$e3 + ld de, wPlayerMoney + ld c, $e3 call PrintBCDNumber coord hl, 9, 6 - ld de,wPlayTimeHours ; hours + ld de, wPlayTimeHours ; hours lb bc, LEFT_ALIGN | 1, 3 call PrintNumber - ld [hl],$d6 ; colon tile ID + ld [hl], $d6 ; colon tile ID inc hl - ld de,wPlayTimeMinutes ; minutes + ld de, wPlayTimeMinutes ; minutes lb bc, LEADING_ZEROES | 1, 2 jp PrintNumber TrainerInfo_FarCopyData: - ld a,BANK(TrainerInfoTextBoxTileGraphics) + ld a, BANK(TrainerInfoTextBoxTileGraphics) jp FarCopyData2 TrainerInfo_NameMoneyTimeText: @@ -631,43 +631,43 @@ TrainerInfo_BadgesText: ; [wTrainerInfoTextBoxWidth] = width - 1 ; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next TrainerInfo_DrawTextBox: - ld a,$79 ; upper left corner tile ID + ld a, $79 ; upper left corner tile ID lb de, $7a, $7b ; top edge and upper right corner tile ID's call TrainerInfo_DrawHorizontalEdge ; draw top edge call TrainerInfo_NextTextBoxRow - ld a,[wTrainerInfoTextBoxWidthPlus1] - ld e,a - ld d,0 - ld c,6 ; height of the text box + ld a, [wTrainerInfoTextBoxWidthPlus1] + ld e, a + ld d, 0 + ld c, 6 ; height of the text box .loop - ld [hl],$7c ; left edge tile ID - add hl,de - ld [hl],$78 ; right edge tile ID + ld [hl], $7c ; left edge tile ID + add hl, de + ld [hl], $78 ; right edge tile ID call TrainerInfo_NextTextBoxRow dec c - jr nz,.loop - ld a,$7d ; lower left corner tile ID - lb de,$77, $7e ; bottom edge and lower right corner tile ID's + jr nz, .loop + ld a, $7d ; lower left corner tile ID + lb de, $77, $7e ; bottom edge and lower right corner tile ID's TrainerInfo_DrawHorizontalEdge: - ld [hli],a ; place left corner tile - ld a,[wTrainerInfoTextBoxWidth] - ld c,a - ld a,d + ld [hli], a ; place left corner tile + ld a, [wTrainerInfoTextBoxWidth] + ld c, a + ld a, d .loop - ld [hli],a ; place edge tile + ld [hli], a ; place edge tile dec c - jr nz,.loop - ld a,e - ld [hl],a ; place right corner tile + jr nz, .loop + ld a, e + ld [hl], a ; place right corner tile ret TrainerInfo_NextTextBoxRow: - ld a,[wTrainerInfoTextBoxNextRowOffset] ; distance to the start of the next row + ld a, [wTrainerInfoTextBoxNextRowOffset] ; distance to the start of the next row .loop inc hl dec a - jr nz,.loop + jr nz, .loop ret ; draws a vertical line @@ -675,26 +675,26 @@ TrainerInfo_NextTextBoxRow: ; hl = address of top tile in the line ; a = tile ID TrainerInfo_DrawVerticalLine: - ld de,SCREEN_WIDTH - ld c,8 + ld de, SCREEN_WIDTH + ld c, 8 .loop - ld [hl],a - add hl,de + ld [hl], a + add hl, de dec c - jr nz,.loop + jr nz, .loop ret StartMenu_SaveReset: - ld a,[wd72e] - bit 6,a ; is the player using the link feature? - jp nz,Init + ld a, [wd72e] + bit 6, a ; is the player using the link feature? + jp nz, Init predef SaveSAV ; save the game call LoadScreenTilesFromBuffer2 ; restore saved screen jp HoldTextDisplayOpen StartMenu_Option: xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen call UpdateSprites callab DisplayOptionMenu diff --git a/engine/menu/swap_items.asm b/engine/menu/swap_items.asm index b1fa78be..563fc7d5 100644 --- a/engine/menu/swap_items.asm +++ b/engine/menu/swap_items.asm @@ -1,149 +1,149 @@ HandleItemListSwapping: - ld a,[wListMenuID] - cp a,ITEMLISTMENU - jp nz,DisplayListMenuIDLoop ; only rearrange item list menus + ld a, [wListMenuID] + cp ITEMLISTMENU + jp nz, DisplayListMenuIDLoop ; only rearrange item list menus push hl - ld hl,wListPointer - ld a,[hli] - ld h,[hl] - ld l,a + ld hl, wListPointer + ld a, [hli] + ld h, [hl] + ld l, a inc hl ; hl = beginning of list entries - ld a,[wCurrentMenuItem] - ld b,a - ld a,[wListScrollOffset] + ld a, [wCurrentMenuItem] + ld b, a + ld a, [wListScrollOffset] add b add a - ld c,a - ld b,0 - add hl,bc ; hl = address of currently selected item entry - ld a,[hl] + ld c, a + ld b, 0 + add hl, bc ; hl = address of currently selected item entry + ld a, [hl] pop hl inc a - jp z,DisplayListMenuIDLoop ; ignore attempts to swap the Cancel menu item - ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) + jp z, DisplayListMenuIDLoop ; ignore attempts to swap the Cancel menu item + ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) and a ; has the first item to swap already been chosen? - jr nz,.swapItems + jr nz, .swapItems ; if not, set the currently selected item as the first item - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] inc a - ld b,a - ld a,[wListScrollOffset] ; index of top (visible) menu item within the list + ld b, a + ld a, [wListScrollOffset] ; index of top (visible) menu item within the list add b - ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) - ld c,20 + ld [wMenuItemToSwap], a ; ID of item chosen for swapping (counts from 1) + ld c, 20 call DelayFrames jp DisplayListMenuIDLoop .swapItems - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] inc a - ld b,a - ld a,[wListScrollOffset] + ld b, a + ld a, [wListScrollOffset] add b - ld b,a - ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) + ld b, a + ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) cp b ; is the currently selected item the same as the first item to swap? - jp z,DisplayListMenuIDLoop ; ignore attempts to swap an item with itself + jp z, DisplayListMenuIDLoop ; ignore attempts to swap an item with itself dec a - ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) - ld c,20 + ld [wMenuItemToSwap], a ; ID of item chosen for swapping (counts from 1) + ld c, 20 call DelayFrames push hl push de - ld hl,wListPointer - ld a,[hli] - ld h,[hl] - ld l,a + ld hl, wListPointer + ld a, [hli] + ld h, [hl] + ld l, a inc hl ; hl = beginning of list entries - ld d,h - ld e,l ; de = beginning of list entries - ld a,[wCurrentMenuItem] - ld b,a - ld a,[wListScrollOffset] + ld d, h + ld e, l ; de = beginning of list entries + ld a, [wCurrentMenuItem] + ld b, a + ld a, [wListScrollOffset] add b add a - ld c,a - ld b,0 - add hl,bc ; hl = address of currently selected item entry - ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) + ld c, a + ld b, 0 + add hl, bc ; hl = address of currently selected item entry + ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) add a add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry ; de = address of first item to swap - ld a,[de] - ld b,a - ld a,[hli] + ld a, [de] + ld b, a + ld a, [hli] cp b - jr z,.swapSameItemType + jr z, .swapSameItemType .swapDifferentItems - ld [$ff95],a ; [$ff95] = second item ID - ld a,[hld] - ld [$ff96],a ; [$ff96] = second item quantity - ld a,[de] - ld [hli],a ; put first item ID in second item slot + ld [$ff95], a ; [$ff95] = second item ID + ld a, [hld] + ld [$ff96], a ; [$ff96] = second item quantity + ld a, [de] + ld [hli], a ; put first item ID in second item slot inc de - ld a,[de] - ld [hl],a ; put first item quantity in second item slot - ld a,[$ff96] - ld [de],a ; put second item quantity in first item slot + ld a, [de] + ld [hl], a ; put first item quantity in second item slot + ld a, [$ff96] + ld [de], a ; put second item quantity in first item slot dec de - ld a,[$ff95] - ld [de],a ; put second item ID in first item slot + ld a, [$ff95] + ld [de], a ; put second item ID in first item slot xor a - ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped pop de pop hl jp DisplayListMenuIDLoop .swapSameItemType inc de - ld a,[hl] - ld b,a - ld a,[de] + ld a, [hl] + ld b, a + ld a, [de] add b ; a = sum of both item quantities - cp a,100 ; is the sum too big for one item slot? - jr c,.combineItemSlots + cp 100 ; is the sum too big for one item slot? + jr c, .combineItemSlots ; swap enough items from the first slot to max out the second slot if they can't be combined - sub a,99 - ld [de],a - ld a,99 - ld [hl],a + sub 99 + ld [de], a + ld a, 99 + ld [hl], a jr .done .combineItemSlots - ld [hl],a ; put the sum in the second item slot - ld hl,wListPointer - ld a,[hli] - ld h,[hl] - ld l,a + ld [hl], a ; put the sum in the second item slot + ld hl, wListPointer + ld a, [hli] + ld h, [hl] + ld l, a dec [hl] ; decrease the number of items - ld a,[hl] - ld [wListCount],a ; update number of items variable - cp a,1 - jr nz,.skipSettingMaxMenuItemID - ld [wMaxMenuItem],a ; if the number of items is only one now, update the max menu item ID + ld a, [hl] + ld [wListCount], a ; update number of items variable + cp 1 + jr nz, .skipSettingMaxMenuItemID + ld [wMaxMenuItem], a ; if the number of items is only one now, update the max menu item ID .skipSettingMaxMenuItemID dec de - ld h,d - ld l,e + ld h, d + ld l, e inc hl inc hl ; hl = address of item after first item to swap .moveItemsUpLoop ; erase the first item slot and move up all the following item slots to fill the gap - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de inc a ; reached the $ff terminator? - jr z,.afterMovingItemsUp - ld a,[hli] - ld [de],a + jr z, .afterMovingItemsUp + ld a, [hli] + ld [de], a inc de jr .moveItemsUpLoop .afterMovingItemsUp xor a - ld [wListScrollOffset],a - ld [wCurrentMenuItem],a + ld [wListScrollOffset], a + ld [wCurrentMenuItem], a .done xor a - ld [wMenuItemToSwap],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 diff --git a/engine/menu/text_box.asm b/engine/menu/text_box.asm index 12067dd4..b9a36652 100644 --- a/engine/menu/text_box.asm +++ b/engine/menu/text_box.asm @@ -1,30 +1,30 @@ ; function to draw various text boxes DisplayTextBoxID_: - ld a,[wTextBoxID] - cp a,TWO_OPTION_MENU - jp z,DisplayTwoOptionMenu - ld c,a - ld hl,TextBoxFunctionTable - ld de,3 + ld a, [wTextBoxID] + cp TWO_OPTION_MENU + jp z, DisplayTwoOptionMenu + ld c, a + ld hl, TextBoxFunctionTable + ld de, 3 call SearchTextBoxTable - jr c,.functionTableMatch - ld hl,TextBoxCoordTable - ld de,5 + jr c, .functionTableMatch + ld hl, TextBoxCoordTable + ld de, 5 call SearchTextBoxTable - jr c,.coordTableMatch - ld hl,TextBoxTextAndCoordTable - ld de,9 + jr c, .coordTableMatch + ld hl, TextBoxTextAndCoordTable + ld de, 9 call SearchTextBoxTable - jr c,.textAndCoordTableMatch + jr c, .textAndCoordTableMatch .done ret .functionTableMatch - ld a,[hli] - ld h,[hl] - ld l,a ; hl = address of function - ld de,.done + ld a, [hli] + ld h, [hl] + ld l, a ; hl = address of function + ld de, .done push de - jp [hl] ; jump to the function + jp hl ; jump to the function .coordTableMatch call GetTextBoxIDCoords call GetAddressOfScreenCoords @@ -37,14 +37,14 @@ DisplayTextBoxID_: call TextBoxBorder pop hl call GetTextBoxIDText - ld a,[wd730] + ld a, [wd730] push af - ld a,[wd730] - set 6,a ; no pauses between printing each letter - ld [wd730],a + ld a, [wd730] + set 6, a ; no pauses between printing each letter + ld [wd730], a call PlaceString pop af - ld [wd730],a + ld [wd730], a call UpdateSprites ret @@ -53,12 +53,12 @@ DisplayTextBoxID_: SearchTextBoxTable: dec de .loop - ld a,[hli] - cp a,$ff - jr z,.notFound + ld a, [hli] + cp $ff + jr z, .notFound cp c - jr z,.found - add hl,de + jr z, .found + add hl, de jr .loop .found scf @@ -74,31 +74,31 @@ SearchTextBoxTable: ; d = row of upper left corner ; e = column of upper left corner GetTextBoxIDCoords: - ld a,[hli] ; column of upper left corner - ld e,a - ld a,[hli] ; row of upper left corner - ld d,a - ld a,[hli] ; column of lower right corner + ld a, [hli] ; column of upper left corner + ld e, a + ld a, [hli] ; row of upper left corner + ld d, a + ld a, [hli] ; column of lower right corner sub e dec a - ld c,a ; c = width - ld a,[hli] ; row of lower right corner + ld c, a ; c = width + ld a, [hli] ; row of lower right corner sub d dec a - ld b,a ; b = height + ld b, a ; b = height ret ; function to load a text address and text coordinates from the TextBoxTextAndCoordTable GetTextBoxIDText: - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a ; de = address of text + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a ; de = address of text push de ; save text address - ld a,[hli] - ld e,a ; column of upper left corner of text - ld a,[hl] - ld d,a ; row of upper left corner of text + ld a, [hli] + ld e, a ; column of upper left corner of text + ld a, [hl] + ld d, a ; row of upper left corner of text call GetAddressOfScreenCoords pop de ; restore text address ret @@ -112,17 +112,17 @@ GetTextBoxIDText: GetAddressOfScreenCoords: push bc coord hl, 0, 0 - ld bc,20 + ld bc, 20 .loop ; loop to add d rows to the base address - ld a,d + ld a, d and a - jr z,.addedRows - add hl,bc + jr z, .addedRows + add hl, bc dec d jr .loop .addedRows pop bc - add hl,de + add hl, de ret ; Format: diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 09ef25c9..140749c8 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -32,123 +32,123 @@ SetDefaultNames: jp CopyData OakSpeech: - ld a,$FF + ld a, $FF call PlaySound ; stop music ld a, 0 ; BANK(Music_Routes2) - ld c,a + ld c, a ld a, MUSIC_ROUTES2 call PlayMusic call ClearScreen call LoadTextBoxTilePatterns call SetDefaultNames predef InitPlayerData2 - ld hl,wNumBoxItems - ld a,POTION - ld [wcf91],a - ld a,1 - ld [wItemQuantity],a + ld hl, wNumBoxItems + ld a, POTION + ld [wcf91], a + ld a, 1 + ld [wItemQuantity], a call AddItemToInventory ; give one potion - ld a,[wDefaultMap] - ld [wDestinationMap],a + ld a, [wDefaultMap] + ld [wDestinationMap], a call SpecialWarpIn xor a - ld [hTilesetType],a - ld a,[wd732] - bit 1,a ; possibly a debug mode bit - jp nz,.skipChoosingNames - ld de,ProfOakPic + ld [hTilesetType], a + ld a, [wd732] + bit 1, a ; possibly a debug mode bit + jp nz, .skipChoosingNames + ld de, ProfOakPic lb bc, Bank(ProfOakPic), $00 call IntroDisplayPicCenteredOrUpperRight call FadeInIntroPic - ld hl,OakSpeechText1 + ld hl, OakSpeechText1 call PrintText call GBFadeOutToWhite call ClearScreen - ld a,NIDORINO - ld [wd0b5],a - ld [wcf91],a + ld a, NIDORINO + ld [wd0b5], a + ld [wcf91], a call GetMonHeader coord hl, 6, 4 call LoadFlippedFrontSpriteByMonIndex call MovePicLeft - ld hl,OakSpeechText2 + ld hl, OakSpeechText2 call PrintText call GBFadeOutToWhite call ClearScreen - ld de,RedPicFront + ld de, RedPicFront lb bc, Bank(RedPicFront), $00 call IntroDisplayPicCenteredOrUpperRight call MovePicLeft - ld hl,IntroducePlayerText + ld hl, IntroducePlayerText call PrintText call ChoosePlayerName call GBFadeOutToWhite call ClearScreen - ld de,Rival1Pic + ld de, Rival1Pic lb bc, Bank(Rival1Pic), $00 call IntroDisplayPicCenteredOrUpperRight call FadeInIntroPic - ld hl,IntroduceRivalText + ld hl, IntroduceRivalText call PrintText call ChooseRivalName .skipChoosingNames call GBFadeOutToWhite call ClearScreen - ld de,RedPicFront + ld de, RedPicFront lb bc, Bank(RedPicFront), $00 call IntroDisplayPicCenteredOrUpperRight call GBFadeInFromWhite - ld a,[wd72d] + ld a, [wd72d] and a - jr nz,.next - ld hl,OakSpeechText3 + jr nz, .next + ld hl, OakSpeechText3 call PrintText .next - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,SFX_SHRINK + ld a, SFX_SHRINK call PlaySound pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a - ld c,4 + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ld c, 4 call DelayFrames - ld de,RedSprite - ld hl,vSprites + ld de, RedSprite + ld hl, vSprites lb bc, BANK(RedSprite), $0C call CopyVideoData - ld de,ShrinkPic1 + ld de, ShrinkPic1 lb bc, BANK(ShrinkPic1), $00 call IntroDisplayPicCenteredOrUpperRight - ld c,4 + ld c, 4 call DelayFrames - ld de,ShrinkPic2 + ld de, ShrinkPic2 lb bc, BANK(ShrinkPic2), $00 call IntroDisplayPicCenteredOrUpperRight call ResetPlayerSpriteData - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af ld a, 0 ; BANK(Music_PalletTown) - ld [wAudioROMBank],a - ld [wAudioSavedROMBank],a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, 10 - ld [wAudioFadeOutControl],a - ld a,$FF - ld [wNewSoundID],a + ld [wAudioFadeOutControl], a + ld a, $FF + ld [wNewSoundID], a call PlaySound ; stop music pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a - ld c,20 + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ld c, 20 call DelayFrames coord hl, 6, 5 - ld b,7 - ld c,7 + ld b, 7 + ld c, 7 call ClearScreenArea call LoadTextBoxTilePatterns - ld a,1 - ld [wUpdateSpritesEnabled],a - ld c,50 + ld a, 1 + ld [wUpdateSpritesEnabled], a + ld c, 50 call DelayFrames call GBFadeOutToWhite jp ClearScreen @@ -171,15 +171,15 @@ OakSpeechText3: db "@" FadeInIntroPic: - ld hl,IntroFadePalettes - ld b,6 + ld hl, IntroFadePalettes + ld b, 6 .next - ld a,[hli] - ld [rBGP],a - ld c,10 + ld a, [hli] + ld [rBGP], a + ld c, 10 call DelayFrames dec b - jr nz,.next + jr nz, .next ret IntroFadePalettes: @@ -191,19 +191,19 @@ IntroFadePalettes: db %11100100 MovePicLeft: - ld a,119 - ld [rWX],a + ld a, 119 + ld [rWX], a call DelayFrame - ld a,%11100100 - ld [rBGP],a + ld a, %11100100 + ld [rBGP], a .next call DelayFrame - ld a,[rWX] + ld a, [rWX] sub 8 cp $FF ret z - ld [rWX],a + ld [rWX], a jr .next DisplayPicCenteredOrUpperRight: @@ -213,21 +213,21 @@ IntroDisplayPicCenteredOrUpperRight: ; de = address of compressed pic ; c: 0 = centred, non-zero = upper-right push bc - ld a,b + ld a, b call UncompressSpriteFromDE - ld hl,sSpriteBuffer1 - ld de,sSpriteBuffer0 - ld bc,$310 + ld hl, sSpriteBuffer1 + ld de, sSpriteBuffer0 + ld bc, $310 call CopyData - ld de,vFrontPic + ld de, vFrontPic call InterlaceMergeSpriteBuffers pop bc - ld a,c + ld a, c and a coord hl, 15, 1 - jr nz,.next + jr nz, .next coord hl, 6, 4 .next xor a - ld [hStartTileID],a + ld [hStartTileID], a predef_jump CopyUncompressedPicToTilemap diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 05588321..8a6057a0 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -7,118 +7,118 @@ ; $C1X* and $C2X* are used to denote wSpriteStateData1-wSpriteStateData1 + $ff and wSpriteStateData2 + $00-wSpriteStateData2 + $ff sprite slot ; fields, respectively, within loops. The X is the loop index. ; If there is an inner loop, Y is the inner loop index, i.e. $C1Y* and $C2Y* -; denote fields of the sprite slots interated over in the inner loop. +; denote fields of the sprite slots iterated over in the inner loop. InitMapSprites: call InitOutsideMapSprites ret c ; return if the map is an outside map (already handled by above call) ; if the map is an inside map (i.e. mapID >= $25) - ld hl,wSpriteStateData1 - ld de,wSpriteStateData2 + $0d + ld hl, wSpriteStateData1 + ld de, wSpriteStateData2 + $0d ; Loop to copy picture ID's from $C1X0 to $C2XD for LoadMapSpriteTilePatterns. .copyPictureIDLoop - ld a,[hl] ; $C1X0 (picture ID) - ld [de],a ; $C2XD - ld a,$10 + ld a, [hl] ; $C1X0 (picture ID) + ld [de], a ; $C2XD + ld a, $10 add e - ld e,a - ld a,$10 + ld e, a + ld a, $10 add l - ld l,a - jr nz,.copyPictureIDLoop + ld l, a + jr nz, .copyPictureIDLoop ; This is used for both inside and outside maps, since it is called by ; InitOutsideMapSprites. ; Loads tile pattern data for sprites into VRAM. LoadMapSpriteTilePatterns: - ld a,[wNumSprites] + ld a, [wNumSprites] and a ; are there any sprites? - jr nz,.spritesExist + jr nz, .spritesExist ret .spritesExist - ld c,a ; c = [wNumSprites] - ld b,$10 ; number of sprite slots - ld hl,wSpriteStateData2 + $0d + ld c, a ; c = [wNumSprites] + ld b, $10 ; number of sprite slots + ld hl, wSpriteStateData2 + $0d xor a - ld [hFourTileSpriteCount],a + ld [hFourTileSpriteCount], a .copyPictureIDLoop ; loop to copy picture ID from $C2XD to $C2XE - ld a,[hli] ; $C2XD (sprite picture ID) - ld [hld],a ; $C2XE - ld a,l - add a,$10 - ld l,a + ld a, [hli] ; $C2XD (sprite picture ID) + ld [hld], a ; $C2XE + ld a, l + add $10 + ld l, a dec b - jr nz,.copyPictureIDLoop - ld hl,wSpriteStateData2 + $1e + jr nz, .copyPictureIDLoop + ld hl, wSpriteStateData2 + $1e .loadTilePatternLoop - ld de,wSpriteStateData2 + $1d + ld de, wSpriteStateData2 + $1d ; Check if the current picture ID has already had its tile patterns loaded. ; This done by looping through the previous sprite slots and seeing if any of ; their picture ID's match that of the current sprite slot. .checkIfAlreadyLoadedLoop - ld a,e - and a,$f0 - ld b,a ; b = offset of the wSpriteStateData2 sprite slot being checked against - ld a,l - and a,$f0 ; a = offset of current wSpriteStateData2 sprite slot + ld a, e + and $f0 + ld b, a ; b = offset of the wSpriteStateData2 sprite slot being checked against + ld a, l + and $f0 ; a = offset of current wSpriteStateData2 sprite slot cp b ; done checking all previous sprite slots? - jr z,.notAlreadyLoaded - ld a,[de] ; picture ID of the wSpriteStateData2 sprite slot being checked against + jr z, .notAlreadyLoaded + ld a, [de] ; picture ID of the wSpriteStateData2 sprite slot being checked against cp [hl] ; do the picture ID's match? - jp z,.alreadyLoaded - ld a,e - add a,$10 - ld e,a + jp z, .alreadyLoaded + ld a, e + add $10 + ld e, a jr .checkIfAlreadyLoadedLoop .notAlreadyLoaded - ld de,wSpriteStateData2 + $0e - ld b,$01 + ld de, wSpriteStateData2 + $0e + ld b, $01 ; loop to find the highest tile pattern VRAM slot (among the first 10 slots) used by a previous sprite slot ; this is done in order to find the first free VRAM slot available .findNextVRAMSlotLoop - ld a,e - add a,$10 - ld e,a - ld a,l + ld a, e + add $10 + ld e, a + ld a, l cp e ; reached current slot? - jr z,.foundNextVRAMSlot - ld a,[de] ; $C2YE (VRAM slot) - cp a,11 ; is it one of the first 10 slots? - jr nc,.findNextVRAMSlotLoop + jr z, .foundNextVRAMSlot + ld a, [de] ; $C2YE (VRAM slot) + cp 11 ; is it one of the first 10 slots? + jr nc, .findNextVRAMSlotLoop cp b ; compare the slot being checked to the current max - jr c,.findNextVRAMSlotLoop ; if the slot being checked is less than the current max + jr c, .findNextVRAMSlotLoop ; if the slot being checked is less than the current max ; if the slot being checked is greater than or equal to the current max - ld b,a ; store new max VRAM slot + ld b, a ; store new max VRAM slot jr .findNextVRAMSlotLoop .foundNextVRAMSlot inc b ; increment previous max value to get next VRAM tile pattern slot - ld a,b ; a = next VRAM tile pattern slot + ld a, b ; a = next VRAM tile pattern slot push af - ld a,[hl] ; $C2XE (sprite picture ID) - ld b,a ; b = current sprite picture ID - cp a,SPRITE_BALL ; is it a 4-tile sprite? - jr c,.notFourTileSprite + ld a, [hl] ; $C2XE (sprite picture ID) + ld b, a ; b = current sprite picture ID + cp SPRITE_BALL ; is it a 4-tile sprite? + jr c, .notFourTileSprite pop af - ld a,[hFourTileSpriteCount] - add a,11 + ld a, [hFourTileSpriteCount] + add 11 jr .storeVRAMSlot .notFourTileSprite pop af .storeVRAMSlot - ld [hl],a ; store VRAM slot at $C2XE - ld [hVRAMSlot],a ; used to determine if it's 4-tile sprite later - ld a,b ; a = current sprite picture ID + ld [hl], a ; store VRAM slot at $C2XE + ld [hVRAMSlot], a ; used to determine if it's 4-tile sprite later + ld a, b ; a = current sprite picture ID dec a add a add a push bc push hl - ld hl,SpriteSheetPointerTable - jr nc,.noCarry + ld hl, SpriteSheetPointerTable + jr nc, .noCarry inc h .noCarry add l - ld l,a - jr nc,.noCarry2 + ld l, a + jr nc, .noCarry2 inc h .noCarry2 push hl @@ -126,80 +126,80 @@ LoadMapSpriteTilePatterns: push af push de push bc - ld hl,vNPCSprites ; VRAM base address - ld bc,$c0 ; number of bytes per VRAM slot - ld a,[hVRAMSlot] - cp a,11 ; is it a 4-tile sprite? - jr nc,.fourTileSpriteVRAMAddr - ld d,a + ld hl, vNPCSprites ; VRAM base address + ld bc, $c0 ; number of bytes per VRAM slot + ld a, [hVRAMSlot] + cp 11 ; is it a 4-tile sprite? + jr nc, .fourTileSpriteVRAMAddr + ld d, a dec d ; Equivalent to multiplying $C0 (number of bytes in 12 tiles) times the VRAM ; slot and adding the result to $8000 (the VRAM base address). .calculateVRAMAddrLoop - add hl,bc + add hl, bc dec d - jr nz,.calculateVRAMAddrLoop + jr nz, .calculateVRAMAddrLoop jr .loadStillTilePattern .fourTileSpriteVRAMAddr - ld hl,vSprites + $7c0 ; address for second 4-tile sprite - ld a,[hFourTileSpriteCount] + ld hl, vSprites + $7c0 ; address for second 4-tile sprite + ld a, [hFourTileSpriteCount] and a - jr nz,.loadStillTilePattern + jr nz, .loadStillTilePattern ; if it's the first 4-tile sprite - ld hl,vSprites + $780 ; address for first 4-tile sprite + ld hl, vSprites + $780 ; address for first 4-tile sprite inc a - ld [hFourTileSpriteCount],a + ld [hFourTileSpriteCount], a .loadStillTilePattern pop bc pop de pop af push hl push hl - ld h,d - ld l,e + ld h, d + ld l, e pop de - ld b,a - 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 - ld b,0 + ld b, a + 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 + ld b, 0 call FarCopyData2 ; load tile pattern data for sprite when standing still .skipFirstLoad pop de pop hl - ld a,[hVRAMSlot] - cp a,11 ; is it a 4-tile sprite? - jr nc,.skipSecondLoad ; if so, there is no second block + ld a, [hVRAMSlot] + cp 11 ; is it a 4-tile sprite? + jr nc, .skipSecondLoad ; if so, there is no second block push de call ReadSpriteSheetData push af - ld a,$c0 + ld a, $c0 add e - ld e,a - jr nc,.noCarry3 + ld e, a + jr nc, .noCarry3 inc d .noCarry3 - ld a,[wFontLoaded] - bit 0,a ; reloading upper half of tile patterns after displaying text? - jr nz,.loadWhileLCDOn + ld a, [wFontLoaded] + bit 0, a ; reloading upper half of tile patterns after displaying text? + jr nz, .loadWhileLCDOn pop af pop hl - set 3,h ; add $800 to hl + set 3, h ; add $800 to hl push hl - ld h,d - ld l,e + ld h, d + ld l, e pop de call FarCopyData2 ; load tile pattern data for sprite when walking jr .skipSecondLoad -; When reloading the upper half of tile patterns after diplaying text, the LCD +; When reloading the upper half of tile patterns after displaying text, the LCD ; will be on, so CopyVideoData (which writes to VRAM only during V-blank) must ; be used instead of FarCopyData2. .loadWhileLCDOn pop af pop hl - set 3,h ; add $800 to hl - ld b,a + set 3, h ; add $800 to hl + ld b, a swap c call CopyVideoData ; load tile pattern data for sprite when walking .skipSecondLoad @@ -208,25 +208,25 @@ LoadMapSpriteTilePatterns: jr .nextSpriteSlot .alreadyLoaded ; if the current picture ID has already had its tile patterns loaded inc de - ld a,[de] ; a = VRAM slot for the current picture ID (from $C2YE) - ld [hl],a ; store VRAM slot in current wSpriteStateData2 sprite slot (at $C2XE) + ld a, [de] ; a = VRAM slot for the current picture ID (from $C2YE) + ld [hl], a ; store VRAM slot in current wSpriteStateData2 sprite slot (at $C2XE) .nextSpriteSlot - ld a,l - add a,$10 - ld l,a + ld a, l + add $10 + ld l, a dec c - jp nz,.loadTilePatternLoop - ld hl,wSpriteStateData2 + $0d - ld b,$10 + jp nz, .loadTilePatternLoop + ld hl, wSpriteStateData2 + $0d + ld b, $10 ; the pictures ID's stored at $C2XD are no longer needed, so zero them .zeroStoredPictureIDLoop xor a - ld [hl],a ; $C2XD - ld a,$10 + ld [hl], a ; $C2XD + ld a, $10 add l - ld l,a + ld l, a dec b - jr nz,.zeroStoredPictureIDLoop + jr nz, .zeroStoredPictureIDLoop ret ; reads data from SpriteSheetPointerTable @@ -237,108 +237,108 @@ LoadMapSpriteTilePatterns: ; bc = length in bytes ; a = ROM bank ReadSpriteSheetData: - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] - ld c,a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a xor a - ld b,a - ld a,[hli] + ld b, a + ld a, [hli] ret ; Loads sprite set for outside maps (cities and routes) and sets VRAM slots. ; sets carry if the map is a city or route, unsets carry if not InitOutsideMapSprites: - ld a,[wCurMap] - cp a,REDS_HOUSE_1F ; is the map a city or a route (map ID less than $25)? + ld a, [wCurMap] + cp REDS_HOUSE_1F ; is the map a city or a route (map ID less than $25)? ret nc ; if not, return - ld hl,MapSpriteSets + ld hl, MapSpriteSets add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry - ld a,[hl] ; a = spriteSetID - 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,[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,[wSpriteSetID] + ld a, [hl] ; a = spriteSetID + cp $f0 ; does the map have 2 sprite sets? + call nc, GetSplitMapSpriteSetID ; if so, choose the appropriate one + ld b, a ; b = spriteSetID + 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, [wSpriteSetID] cp b ; has the sprite set ID changed? - jr z,.skipLoadingSpriteSet ; if not, don't load it again + jr z, .skipLoadingSpriteSet ; if not, don't load it again .loadSpriteSet - ld a,b - ld [wSpriteSetID],a + ld a, b + ld [wSpriteSetID], a dec a - ld b,a + ld b, a sla a - ld c,a + ld c, a sla a sla a add c add b ; a = (spriteSetID - 1) * 11 - ld de,SpriteSets + ld de, SpriteSets ; add a to de to get offset of sprite set add e - ld e,a - jr nc,.noCarry2 + ld e, a + jr nc, .noCarry2 inc d .noCarry2 - ld hl,wSpriteStateData2 + $0d - ld a,SPRITE_RED - ld [hl],a - ld bc,wSpriteSet + ld hl, wSpriteStateData2 + $0d + ld a, SPRITE_RED + ld [hl], a + ld bc, wSpriteSet ; Load the sprite set into RAM. ; This loop also fills $C2XD (sprite picture ID) where X is from $0 to $A ; with picture ID's. This is done so that LoadMapSpriteTilePatterns will ; load tile patterns for all sprite pictures in the sprite set. .loadSpriteSetLoop - ld a,$10 + ld a, $10 add l - ld l,a - ld a,[de] ; sprite picture ID from sprite set - ld [hl],a ; $C2XD (sprite picture ID) - ld [bc],a + ld l, a + ld a, [de] ; sprite picture ID from sprite set + ld [hl], a ; $C2XD (sprite picture ID) + ld [bc], a inc de inc bc - ld a,l - cp a,$bd ; reached 11th sprite slot? - jr nz,.loadSpriteSetLoop - ld b,4 ; 4 remaining sprite slots + ld a, l + cp $bd ; reached 11th sprite slot? + jr nz, .loadSpriteSetLoop + ld b, 4 ; 4 remaining sprite slots .zeroRemainingSlotsLoop ; loop to zero the picture ID's of the remaining sprite slots - ld a,$10 + ld a, $10 add l - ld l,a + ld l, a xor a - ld [hl],a ; $C2XD (sprite picture ID) + ld [hl], a ; $C2XD (sprite picture ID) dec b - jr nz,.zeroRemainingSlotsLoop - ld a,[wNumSprites] + jr nz, .zeroRemainingSlotsLoop + ld a, [wNumSprites] push af ; save number of sprites - ld a,11 ; 11 sprites in sprite set - ld [wNumSprites],a + ld a, 11 ; 11 sprites in sprite set + ld [wNumSprites], a call LoadMapSpriteTilePatterns pop af - ld [wNumSprites],a ; restore number of sprites - ld hl,wSpriteStateData2 + $1e - ld b,$0f + ld [wNumSprites], a ; restore number of sprites + ld hl, wSpriteStateData2 + $1e + ld b, $0f ; The VRAM tile pattern slots that LoadMapSpriteTilePatterns set are in the ; order of the map's sprite set, not the order of the actual sprites loaded ; for the current map. So, they are not needed and are zeroed by this loop. .zeroVRAMSlotsLoop xor a - ld [hl],a ; $C2XE (VRAM slot) - ld a,$10 + ld [hl], a ; $C2XE (VRAM slot) + ld a, $10 add l - ld l,a + ld l, a dec b - jr nz,.zeroVRAMSlotsLoop + jr nz, .zeroVRAMSlotsLoop .skipLoadingSpriteSet - ld hl,wSpriteStateData1 + $10 + ld hl, wSpriteStateData1 + $10 ; This loop stores the correct VRAM tile pattern slots according the sprite ; data from the map's header. Since the VRAM tile pattern slots are filled in ; the order of the sprite set, in order to find the VRAM tile pattern slot @@ -347,94 +347,94 @@ InitOutsideMapSprites: ; (since the Red sprite always has the first VRAM tile pattern slot) is the ; VRAM tile pattern slot. .storeVRAMSlotsLoop - ld c,0 - ld a,[hl] ; $C1X0 (picture ID) (zero if sprite slot is not used) + ld c, 0 + ld a, [hl] ; $C1X0 (picture ID) (zero if sprite slot is not used) and a ; is the sprite slot used? - jr z,.skipGettingPictureIndex ; if the sprite slot is not used - ld b,a ; b = picture ID - ld de,wSpriteSet + jr z, .skipGettingPictureIndex ; if the sprite slot is not used + ld b, a ; b = picture ID + ld de, wSpriteSet ; Loop to find the index of the sprite's picture ID within the sprite set. .getPictureIndexLoop inc c - ld a,[de] + ld a, [de] inc de cp b ; does the picture ID match? - jr nz,.getPictureIndexLoop + jr nz, .getPictureIndexLoop inc c .skipGettingPictureIndex push hl inc h - ld a,$0e + ld a, $0e add l - ld l,a - ld a,c ; a = VRAM slot (zero if sprite slot is not used) - ld [hl],a ; $C2XE (VRAM slot) + ld l, a + ld a, c ; a = VRAM slot (zero if sprite slot is not used) + ld [hl], a ; $C2XE (VRAM slot) pop hl - ld a,$10 + ld a, $10 add l - ld l,a + ld l, a and a - jr nz,.storeVRAMSlotsLoop + jr nz, .storeVRAMSlotsLoop scf ret ; Chooses the correct sprite set ID depending on the player's position within ; the map for maps with two sprite sets. GetSplitMapSpriteSetID: - cp a,$f8 - jr z,.route20 - ld hl,SplitMapSpriteSets - and a,$0f + cp $f8 + jr z, .route20 + ld hl, SplitMapSpriteSets + and $0f dec a sla a sla a add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry - ld a,[hli] ; determines whether the map is split East/West or North/South - cp a,$01 - ld a,[hli] ; position of dividing line - ld b,a - jr z,.eastWestDivide + ld a, [hli] ; determines whether the map is split East/West or North/South + cp $01 + ld a, [hli] ; position of dividing line + ld b, a + jr z, .eastWestDivide .northSouthDivide - ld a,[wYCoord] + ld a, [wYCoord] jr .compareCoord .eastWestDivide - ld a,[wXCoord] + ld a, [wXCoord] .compareCoord cp b - jr c,.loadSpriteSetID + jr c, .loadSpriteSetID ; if in the East side or South side inc hl .loadSpriteSetID - ld a,[hl] + ld a, [hl] ret ; Uses sprite set $01 for West side and $0A for East side. ; Route 20 is a special case because the two map sections have a more complex ; shape instead of the map simply being split horizontally or vertically. .route20 - ld hl,wXCoord - ld a,[hl] - cp a,$2b - ld a,$01 + ld hl, wXCoord + ld a, [hl] + cp $2b + ld a, $01 ret c - ld a,[hl] - cp a,$3e - ld a,$0a + ld a, [hl] + cp $3e + ld a, $0a ret nc - ld a,[hl] - cp a,$37 - ld b,$08 - jr nc,.next - ld b,$0d + ld a, [hl] + cp $37 + ld b, $08 + jr nc, .next + ld b, $0d .next - ld a,[wYCoord] + ld a, [wYCoord] cp b - ld a,$0a + ld a, $0a ret c - ld a,$01 + ld a, $01 ret INCLUDE "data/sprite_sets.asm" diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 0c0e46bd..2b61ea05 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -334,9 +334,9 @@ UpdateSpriteInWalkingAnimation: ld a, [H_CURRENTSPRITEOFFSET] ld l, a inc h - ld a, [hl] ; c2x0 (walk animantion counter) + ld a, [hl] ; c2x0 (walk animation counter) dec a - ld [hl], a ; update walk animantion counter + ld [hl], a ; update walk animation counter ret nz ld a, $6 ; walking finished, update state add l @@ -449,7 +449,7 @@ InitializeSpriteStatus: ld [hl], a ; $c2x3: set X displacement to 8 ret -; calculates the spprite's scrren position form its map position and the player position +; calculates the sprite's screen position form its map position and the player position InitializeSpriteScreenPosition: ld h, wSpriteStateData2 / $100 ld a, [H_CURRENTSPRITEOFFSET] @@ -688,7 +688,7 @@ CanWalkOntoTile: scf ; set carry (marking failure to walk) ret -; calculates the tile pointer pointing to the tile the current sprite stancs on +; calculates the tile pointer pointing to the tile the current sprite stands on ; this is always the lower left tile of the 2x2 tile blocks all sprites are snapped to ; hl: output pointer GetTileSpriteStandsOn: diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 14f1f736..6387d90a 100755 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -148,7 +148,7 @@ PalletMovementScript_Done: ld a, [wSimulatedJoypadStatesIndex] and a ret nz - ld a, $0 + ld a, HS_PALLET_TOWN_OAK ld [wMissableObjectIndex], a predef HideObject ld hl, wd730 diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm index 79f755b9..b8d734f2 100644 --- a/engine/overworld/player_state.asm +++ b/engine/overworld/player_state.asm @@ -103,7 +103,7 @@ IsPlayerFacingEdgeOfMap: ld c, a ld de, .asm_c41e push de - jp [hl] + jp hl .asm_c41e pop bc pop de diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm index 823939b1..dc5b29b5 100755 --- a/engine/overworld/pokemart.asm +++ b/engine/overworld/pokemart.asm @@ -1,230 +1,230 @@ DisplayPokemartDialogue_: - ld a,[wListScrollOffset] - ld [wSavedListScrollOffset],a + ld a, [wListScrollOffset] + ld [wSavedListScrollOffset], a call UpdateSprites xor a - ld [wBoughtOrSoldItemInMart],a + ld [wBoughtOrSoldItemInMart], a .loop xor a - ld [wListScrollOffset],a - ld [wCurrentMenuItem],a - ld [wPlayerMonNumber],a + ld [wListScrollOffset], a + ld [wCurrentMenuItem], a + ld [wPlayerMonNumber], a inc a - ld [wPrintItemPrices],a - ld a,MONEY_BOX - ld [wTextBoxID],a + ld [wPrintItemPrices], a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID - ld a,BUY_SELL_QUIT_MENU - ld [wTextBoxID],a + ld a, BUY_SELL_QUIT_MENU + ld [wTextBoxID], a call DisplayTextBoxID ; This code is useless. It copies the address of the pokemart's inventory to hl, ; but the address is never used. - ld hl,wItemListPointer - ld a,[hli] - ld l,[hl] - ld h,a + ld hl, wItemListPointer + ld a, [hli] + ld l, [hl] + ld h, a - ld a,[wMenuExitMethod] - cp a,CANCELLED_MENU - jp z,.done - ld a,[wChosenMenuItem] + ld a, [wMenuExitMethod] + cp CANCELLED_MENU + jp z, .done + ld a, [wChosenMenuItem] and a ; buying? - jp z,.buyMenu + jp z, .buyMenu dec a ; selling? - jp z,.sellMenu + jp z, .sellMenu dec a ; quitting? - jp z,.done + jp z, .done .sellMenu ; the same variables are set again below, so this code has no effect xor a - ld [wPrintItemPrices],a - ld a,INIT_BAG_ITEM_LIST - ld [wInitListType],a + ld [wPrintItemPrices], a + ld a, INIT_BAG_ITEM_LIST + ld [wInitListType], a callab InitList - ld a,[wNumBagItems] + ld a, [wNumBagItems] and a - jp z,.bagEmpty - ld hl,PokemonSellingGreetingText + jp z, .bagEmpty + ld hl, PokemonSellingGreetingText call PrintText call SaveScreenTilesToBuffer1 ; save screen .sellMenuLoop call LoadScreenTilesFromBuffer1 ; restore saved screen - ld a,MONEY_BOX - ld [wTextBoxID],a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID ; draw money text box - ld hl,wNumBagItems - ld a,l - ld [wListPointer],a - ld a,h - ld [wListPointer + 1],a + ld hl, wNumBagItems + ld a, l + ld [wListPointer], a + ld a, h + ld [wListPointer + 1], a xor a - ld [wPrintItemPrices],a - ld [wCurrentMenuItem],a - ld a,ITEMLISTMENU - ld [wListMenuID],a + ld [wPrintItemPrices], a + ld [wCurrentMenuItem], a + ld a, ITEMLISTMENU + ld [wListMenuID], a call DisplayListMenuID - jp c,.returnToMainPokemartMenu ; if the player closed the menu + jp c, .returnToMainPokemartMenu ; if the player closed the menu .confirmItemSale ; if the player is trying to sell a specific item call IsKeyItem - ld a,[wIsKeyItem] + ld a, [wIsKeyItem] and a - jr nz,.unsellableItem - ld a,[wcf91] + jr nz, .unsellableItem + ld a, [wcf91] call IsItemHM - jr c,.unsellableItem - ld a,PRICEDITEMLISTMENU - ld [wListMenuID],a - ld [hHalveItemPrices],a ; halve prices when selling + jr c, .unsellableItem + ld a, PRICEDITEMLISTMENU + ld [wListMenuID], a + ld [hHalveItemPrices], a ; halve prices when selling call DisplayChooseQuantityMenu inc a - jr z,.sellMenuLoop ; if the player closed the choose quantity menu with the B button - ld hl,PokemartTellSellPriceText + jr z, .sellMenuLoop ; if the player closed the choose quantity menu with the B button + ld hl, PokemartTellSellPriceText lb bc, 14, 1 ; location that PrintText always prints to, this is useless call PrintText coord hl, 14, 7 lb bc, 8, 15 - ld a,TWO_OPTION_MENU - ld [wTextBoxID],a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu - ld a,[wMenuExitMethod] - cp a,CHOSE_SECOND_ITEM - jr z,.sellMenuLoop ; if the player chose No or pressed the B button + ld a, [wMenuExitMethod] + cp CHOSE_SECOND_ITEM + jr z, .sellMenuLoop ; if the player chose No or pressed the B button ; The following code is supposed to check if the player chose No, but the above ; check already catches it. - ld a,[wChosenMenuItem] + ld a, [wChosenMenuItem] dec a - jr z,.sellMenuLoop + jr z, .sellMenuLoop .sellItem - ld a,[wBoughtOrSoldItemInMart] + ld a, [wBoughtOrSoldItemInMart] and a - jr nz,.skipSettingFlag1 + jr nz, .skipSettingFlag1 inc a - ld [wBoughtOrSoldItemInMart],a + ld [wBoughtOrSoldItemInMart], a .skipSettingFlag1 call AddAmountSoldToMoney - ld hl,wNumBagItems + ld hl, wNumBagItems call RemoveItemFromInventory jp .sellMenuLoop .unsellableItem - ld hl,PokemartUnsellableItemText + ld hl, PokemartUnsellableItemText call PrintText jp .returnToMainPokemartMenu .bagEmpty - ld hl,PokemartItemBagEmptyText + ld hl, PokemartItemBagEmptyText call PrintText call SaveScreenTilesToBuffer1 jp .returnToMainPokemartMenu .buyMenu ; the same variables are set again below, so this code has no effect - ld a,1 - ld [wPrintItemPrices],a - ld a,INIT_OTHER_ITEM_LIST - ld [wInitListType],a + ld a, 1 + ld [wPrintItemPrices], a + ld a, INIT_OTHER_ITEM_LIST + ld [wInitListType], a callab InitList - ld hl,PokemartBuyingGreetingText + ld hl, PokemartBuyingGreetingText call PrintText call SaveScreenTilesToBuffer1 .buyMenuLoop call LoadScreenTilesFromBuffer1 - ld a,MONEY_BOX - ld [wTextBoxID],a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID - ld hl,wItemList - ld a,l - ld [wListPointer],a - ld a,h - ld [wListPointer + 1],a + ld hl, wItemList + ld a, l + ld [wListPointer], a + ld a, h + ld [wListPointer + 1], a xor a - ld [wCurrentMenuItem],a + ld [wCurrentMenuItem], a inc a - ld [wPrintItemPrices],a + ld [wPrintItemPrices], a inc a ; a = 2 (PRICEDITEMLISTMENU) - ld [wListMenuID],a + ld [wListMenuID], a call DisplayListMenuID - jr c,.returnToMainPokemartMenu ; if the player closed the menu - ld a,99 - ld [wMaxItemQuantity],a + jr c, .returnToMainPokemartMenu ; if the player closed the menu + ld a, 99 + ld [wMaxItemQuantity], a xor a - ld [hHalveItemPrices],a ; don't halve item prices when buying + ld [hHalveItemPrices], a ; don't halve item prices when buying call DisplayChooseQuantityMenu inc a - jr z,.buyMenuLoop ; if the player closed the choose quantity menu with the B button - ld a,[wcf91] ; item ID - ld [wd11e],a ; store item ID for GetItemName + jr z, .buyMenuLoop ; if the player closed the choose quantity menu with the B button + ld a, [wcf91] ; item ID + ld [wd11e], a ; store item ID for GetItemName call GetItemName call CopyStringToCF4B ; copy name to wcf4b - ld hl,PokemartTellBuyPriceText + ld hl, PokemartTellBuyPriceText call PrintText coord hl, 14, 7 lb bc, 8, 15 - ld a,TWO_OPTION_MENU - ld [wTextBoxID],a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu - ld a,[wMenuExitMethod] - cp a,CHOSE_SECOND_ITEM - jp z,.buyMenuLoop ; if the player chose No or pressed the B button + ld a, [wMenuExitMethod] + cp CHOSE_SECOND_ITEM + jp z, .buyMenuLoop ; if the player chose No or pressed the B button ; The following code is supposed to check if the player chose No, but the above ; check already catches it. - ld a,[wChosenMenuItem] + ld a, [wChosenMenuItem] dec a - jr z,.buyMenuLoop + jr z, .buyMenuLoop .buyItem call .isThereEnoughMoney - jr c,.notEnoughMoney - ld hl,wNumBagItems + jr c, .notEnoughMoney + ld hl, wNumBagItems call AddItemToInventory - jr nc,.bagFull + jr nc, .bagFull call SubtractAmountPaidFromMoney - ld a,[wBoughtOrSoldItemInMart] + ld a, [wBoughtOrSoldItemInMart] and a - jr nz,.skipSettingFlag2 - ld a,1 - ld [wBoughtOrSoldItemInMart],a + jr nz, .skipSettingFlag2 + ld a, 1 + ld [wBoughtOrSoldItemInMart], a .skipSettingFlag2 - ld a,SFX_PURCHASE + ld a, SFX_PURCHASE call PlaySoundWaitForCurrent call WaitForSoundToFinish - ld hl,PokemartBoughtItemText + ld hl, PokemartBoughtItemText call PrintText jp .buyMenuLoop .returnToMainPokemartMenu call LoadScreenTilesFromBuffer1 - ld a,MONEY_BOX - ld [wTextBoxID],a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID - ld hl,PokemartAnythingElseText + ld hl, PokemartAnythingElseText call PrintText jp .loop .isThereEnoughMoney - ld de,wPlayerMoney - ld hl,hMoney - ld c,3 ; length of money in bytes + ld de, wPlayerMoney + ld hl, hMoney + ld c, 3 ; length of money in bytes jp StringCmp .notEnoughMoney - ld hl,PokemartNotEnoughMoneyText + ld hl, PokemartNotEnoughMoneyText call PrintText jr .returnToMainPokemartMenu .bagFull - ld hl,PokemartItemBagFullText + ld hl, PokemartItemBagFullText call PrintText jr .returnToMainPokemartMenu .done - ld hl,PokemartThankYouText + ld hl, PokemartThankYouText call PrintText - ld a,1 - ld [wUpdateSpritesEnabled],a + ld a, 1 + ld [wUpdateSpritesEnabled], a call UpdateSprites - ld a,[wSavedListScrollOffset] - ld [wListScrollOffset],a + ld a, [wSavedListScrollOffset] + ld [wListScrollOffset], a ret PokemartBuyingGreetingText: diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm index 712c53ed..ea4747ce 100755 --- a/engine/overworld/ssanne.asm +++ b/engine/overworld/ssanne.asm @@ -16,7 +16,7 @@ AnimateBoulderDust: ld bc, .returnAddress push bc ld c, 4 - jp [hl] + jp hl .returnAddress ld a, [rOBP1] xor %01100100 diff --git a/engine/overworld/wild_mons.asm b/engine/overworld/wild_mons.asm index 6444ab7e..dae57f23 100644 --- a/engine/overworld/wild_mons.asm +++ b/engine/overworld/wild_mons.asm @@ -1,33 +1,33 @@ LoadWildData: - ld hl,WildDataPointers - ld a,[wCurMap] + ld hl, WildDataPointers + ld a, [wCurMap] ; get wild data for current map - ld c,a - ld b,0 - add hl,bc - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a ; hl now points to wild data for current map - ld a,[hli] - ld [wGrassRate],a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a ; hl now points to wild data for current map + ld a, [hli] + ld [wGrassRate], a and a - jr z,.NoGrassData ; if no grass data, skip to surfing data + jr z, .NoGrassData ; if no grass data, skip to surfing data push hl - ld de,wGrassMons ; otherwise, load grass data - ld bc,$0014 + ld de, wGrassMons ; otherwise, load grass data + ld bc, $0014 call CopyData pop hl - ld bc,$0014 - add hl,bc + ld bc, $0014 + add hl, bc .NoGrassData - ld a,[hli] - ld [wWaterRate],a + ld a, [hli] + ld [wWaterRate], a and a ret z ; if no water data, we're done - ld de,wWaterMons ; otherwise, load surfing data - ld bc,$0014 + ld de, wWaterMons ; otherwise, load surfing data + ld bc, $0014 jp CopyData INCLUDE "data/wild_mons.asm" diff --git a/engine/palettes.asm b/engine/palettes.asm index 4785ade2..4808776e 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -17,7 +17,7 @@ _RunPaletteCommand: ld l, a ld de, SendSGBPackets push de - jp [hl] + jp hl SetPal_BattleBlack: ld hl, PalPacket_Black @@ -269,7 +269,7 @@ BadgeBlkDataLengths: db 6 ; Earth Badge DeterminePaletteID: - bit Transformed, a ; a is battle status 3 + bit TRANSFORMED, a ; a is battle status 3 ld a, PAL_GREYMON ; if the mon has used Transform, use Ditto's palette ret nz ld a, [hl] @@ -325,11 +325,11 @@ UpdatePartyMenuBlkPacket: SendSGBPacket: ;check number of packets - ld a,[hl] - and a,$07 + ld a, [hl] + and $07 ret z ; store number of packets in B - ld b,a + ld b, a .loop2 ; save B for later use push bc @@ -338,46 +338,46 @@ SendSGBPacket: ld [hDisableJoypadPolling], a ; send RESET signal (P14=LOW, P15=LOW) xor a - ld [rJOYP],a + ld [rJOYP], a ; set P14=HIGH, P15=HIGH - ld a,$30 - ld [rJOYP],a + ld a, $30 + ld [rJOYP], a ;load length of packets (16 bytes) - ld b,$10 + ld b, $10 .nextByte ;set bit counter (8 bits per byte) - ld e,$08 + ld e, $08 ; get next byte in the packet - ld a,[hli] - ld d,a + ld a, [hli] + ld d, a .nextBit0 - bit 0,d + bit 0, d ; if 0th bit is not zero set P14=HIGH,P15=LOW (send bit 1) - ld a,$10 - jr nz,.next0 + ld a, $10 + jr nz, .next0 ; else (if 0th bit is zero) set P14=LOW,P15=HIGH (send bit 0) - ld a,$20 + ld a, $20 .next0 - ld [rJOYP],a + ld [rJOYP], a ; must set P14=HIGH,P15=HIGH between each "pulse" - ld a,$30 - ld [rJOYP],a + ld a, $30 + ld [rJOYP], a ; rotation will put next bit in 0th position (so we can always use command ; "bit 0,d" to fetch the bit that has to be sent) rr d ; decrease bit counter so we know when we have sent all 8 bits of current byte dec e - jr nz,.nextBit0 + jr nz, .nextBit0 dec b - jr nz,.nextByte + jr nz, .nextByte ; send bit 1 as a "stop bit" (end of parameter data) - ld a,$20 - ld [rJOYP],a + ld a, $20 + ld [rJOYP], a ; set P14=HIGH,P15=HIGH - ld a,$30 - ld [rJOYP],a + ld a, $30 + ld [rJOYP], a xor a - ld [hDisableJoypadPolling],a + ld [hDisableJoypadPolling], a ; wait for about 70000 cycles call Wait7000 ; restore (previously pushed) number of packets diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm index f8e29e5c..aff9769e 100755 --- a/engine/pokedex_rating.asm +++ b/engine/pokedex_rating.asm @@ -42,7 +42,7 @@ DisplayDexRating: inc de .copyRatingTextLoop ld a, [hli] - cp a, "@" + cp "@" jr z, .doneCopying ld [de], a inc de diff --git a/engine/predefs.asm b/engine/predefs.asm index 97cec6f7..e701b4e1 100755 --- a/engine/predefs.asm +++ b/engine/predefs.asm @@ -4,48 +4,48 @@ GetPredefPointer: ; Then put the bank and address of predef ; wPredefID in [wPredefBank] and hl. - ld a,h - ld [wPredefRegisters],a - ld a,l - ld [wPredefRegisters + 1],a + ld a, h + ld [wPredefRegisters], a + ld a, l + ld [wPredefRegisters + 1], a - ld hl,wPredefRegisters + 2 - ld a,d - ld [hli],a - ld a,e - ld [hli],a + ld hl, wPredefRegisters + 2 + ld a, d + ld [hli], a + ld a, e + ld [hli], a - ld a,b - ld [hli],a - ld [hl],c + ld a, b + ld [hli], a + ld [hl], c - ld hl,PredefPointers - ld de,0 + ld hl, PredefPointers + ld de, 0 - ld a,[wPredefID] - ld e,a + ld a, [wPredefID] + ld e, a add a add e - ld e,a + ld e, a jr nc, .nocarry inc d .nocarry - add hl,de - ld d,h - ld e,l + add hl, de + ld d, h + ld e, l ; get bank of predef routine - ld a,[de] - ld [wPredefBank],a + ld a, [de] + ld [wPredefBank], a ; get pointer inc de - ld a,[de] - ld l,a + ld a, [de] + ld l, a inc de - ld a,[de] - ld h,a + ld a, [de] + ld h, a ret diff --git a/engine/save.asm b/engine/save.asm index ef16b637..ed1048e8 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -146,16 +146,16 @@ LoadSAVIgnoreBadCheckSum: SaveSAV: callba PrintSaveScreenText - ld hl,WouldYouLikeToSaveText + ld hl, WouldYouLikeToSaveText call SaveSAVConfirm and a ;|0 = Yes|1 = No| ret nz - ld a,[wSaveFileStatus] + ld a, [wSaveFileStatus] dec a - jr z,.save + jr z, .save call SAVCheckRandomID - jr z,.save - ld hl,OlderFileWillBeErasedText + jr z, .save + ld hl, OlderFileWillBeErasedText call SaveSAVConfirm and a ret nz @@ -165,16 +165,16 @@ SaveSAV: lb bc, 4, 18 call ClearScreenArea coord hl, 1, 14 - ld de,NowSavingString + ld de, NowSavingString call PlaceString - ld c,120 + ld c, 120 call DelayFrames - ld hl,GameSavedText + ld hl, GameSavedText call PrintText ld a, SFX_SAVE call PlaySoundWaitForCurrent call WaitForSoundToFinish - ld c,30 + ld c, 30 jp DelayFrames NowSavingString: @@ -184,10 +184,10 @@ SaveSAVConfirm: call PrintText coord hl, 0, 7 lb bc, 8, 1 - ld a,TWO_OPTION_MENU - ld [wTextBoxID],a + ld a, TWO_OPTION_MENU + ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] ret WouldYouLikeToSaveText: @@ -640,34 +640,34 @@ SAVCheckRandomID: ld a, 1 ld [wHaltAudio], a - ld a,$0a - ld [MBC1SRamEnable],a - ld a,$01 - ld [MBC1SRamBankingMode],a - ld [MBC1SRamBank],a - ld a,[sPlayerName] + ld a, $0a + ld [MBC1SRamEnable], a + ld a, $01 + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a + ld a, [sPlayerName] and a - jr z,.next - ld hl,sPlayerName + jr z, .next + ld hl, sPlayerName ld bc, sMainDataCheckSum - sPlayerName call SAVCheckSum - ld c,a - ld a,[sMainDataCheckSum] + ld c, a + ld a, [sMainDataCheckSum] cp c - jr nz,.next - ld hl,sMainData + 98 ; player ID - ld a,[hli] - ld h,[hl] - ld l,a - ld a,[wPlayerID] + jr nz, .next + ld hl, sMainData + (wPlayerID - wMainDataStart) ; player ID + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wPlayerID] cp l - jr nz,.next - ld a,[wPlayerID + 1] + jr nz, .next + ld a, [wPlayerID + 1] cp h .next - ld a,$00 - ld [MBC1SRamBankingMode],a - ld [MBC1SRamEnable],a + ld a, $00 + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a xor a ld [wHaltAudio], a diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index 2dfcffde..3a46687f 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -451,7 +451,7 @@ SlotMachine_CheckForMatches: pop hl ld de, .flashScreenLoop push de - jp [hl] + jp hl .flashScreenLoop ld a, [rBGP] diff --git a/engine/special_warps.asm b/engine/special_warps.asm index de00a817..3a8b8b86 100644 --- a/engine/special_warps.asm +++ b/engine/special_warps.asm @@ -1,31 +1,31 @@ SpecialWarpIn: call LoadSpecialWarpData predef LoadTilesetHeader - ld hl,wd732 - bit 2,[hl] ; dungeon warp or fly warp? - res 2,[hl] - jr z,.next + ld hl, wd732 + bit 2, [hl] ; dungeon warp or fly warp? + res 2, [hl] + jr z, .next ; if dungeon warp or fly warp - ld a,[wDestinationMap] + ld a, [wDestinationMap] jr .next2 .next - bit 1,[hl] - jr z,.next3 + bit 1, [hl] + jr z, .next3 call EmptyFunc .next3 - ld a,0 + ld a, 0 .next2 - ld b,a - ld a,[wd72d] + ld b, a + ld a, [wd72d] and a - jr nz,.next4 - ld a,b + jr nz, .next4 + ld a, b .next4 - ld hl,wd732 - bit 4,[hl] ; dungeon warp? + ld hl, wd732 + bit 4, [hl] ; dungeon warp? ret nz ; if not dungeon warp - ld [wLastMap],a + ld [wLastMap], a ret ; gets the map ID, tile block map view pointer, tileset, and coordinates diff --git a/engine/subtract_paid_money.asm b/engine/subtract_paid_money.asm index 2888c3fb..a6a6ec2e 100644 --- a/engine/subtract_paid_money.asm +++ b/engine/subtract_paid_money.asm @@ -1,17 +1,17 @@ ; subtracts the amount the player paid from their money ; sets carry flag if there is enough money and unsets carry flag if not SubtractAmountPaidFromMoney_: - ld de,wPlayerMoney - ld hl,hMoney ; total price of items - ld c,3 ; length of money in bytes + ld de, wPlayerMoney + ld hl, hMoney ; total price of items + ld c, 3 ; length of money in bytes call StringCmp ret c - ld de,wPlayerMoney + 2 - ld hl,hMoney + 2 ; total price of items - ld c,3 ; length of money in bytes + ld de, wPlayerMoney + 2 + ld hl, hMoney + 2 ; total price of items + ld c, 3 ; length of money in bytes predef SubBCDPredef ; subtract total price from money - ld a,MONEY_BOX - ld [wTextBoxID],a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID ; redraw money text box and a ret diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index f97b0f39..e27e45a3 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -56,7 +56,7 @@ DisplayTitleScreen: ld a, BANK(PokemonLogoGraphics) call FarCopyData2 ; second chunk ld hl, Version_GFX - ld de,vChars2 + $600 - (Version_GFXEnd - Version_GFX - $50) + ld de, vChars2 + $600 - (Version_GFXEnd - Version_GFX - $50) ld bc, Version_GFXEnd - Version_GFX ld a, BANK(Version_GFX) call FarCopyDataDouble @@ -118,10 +118,10 @@ DisplayTitleScreen: call LoadScreenTilesFromBuffer2 call EnableLCD IF DEF(_RED) - ld a,CHARMANDER ; which Pokemon to show first on the title screen + ld a, CHARMANDER ; which Pokemon to show first on the title screen ENDC IF DEF(_BLUE) - ld a,SQUIRTLE ; which Pokemon to show first on the title screen + ld a, SQUIRTLE ; which Pokemon to show first on the title screen ENDC ld [wTitleMonSpecies], a diff --git a/engine/trade.asm b/engine/trade.asm index c3913a7e..8bc8e3bc 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -46,7 +46,7 @@ TradeAnimCommon: ld l, a ld de, .loop push de - jp [hl] ; call trade func, which will return to the top of the loop + jp hl ; call trade func, which will return to the top of the loop .done pop af ld [hSCX], a diff --git a/engine/trade2.asm b/engine/trade2.asm index 062d5285..2c79e077 100755 --- a/engine/trade2.asm +++ b/engine/trade2.asm @@ -1,44 +1,44 @@ Trade_PrintPlayerMonInfoText: coord hl, 5, 0 - ld de,Trade_MonInfoText + ld de, Trade_MonInfoText call PlaceString - ld a,[wTradedPlayerMonSpecies] - ld [wd11e],a + ld a, [wTradedPlayerMonSpecies] + ld [wd11e], a predef IndexToPokedex coord hl, 9, 0 - ld de,wd11e + ld de, wd11e lb bc, LEADING_ZEROES | 1, 3 call PrintNumber coord hl, 5, 2 - ld de,wcf4b + ld de, wcf4b call PlaceString coord hl, 8, 4 - ld de,wTradedPlayerMonOT + ld de, wTradedPlayerMonOT call PlaceString coord hl, 8, 6 - ld de,wTradedPlayerMonOTID + ld de, wTradedPlayerMonOTID lb bc, LEADING_ZEROES | 2, 5 jp PrintNumber Trade_PrintEnemyMonInfoText: coord hl, 5, 10 - ld de,Trade_MonInfoText + ld de, Trade_MonInfoText call PlaceString - ld a,[wTradedEnemyMonSpecies] - ld [wd11e],a + ld a, [wTradedEnemyMonSpecies] + ld [wd11e], a predef IndexToPokedex coord hl, 9, 10 - ld de,wd11e + ld de, wd11e lb bc, LEADING_ZEROES | 1, 3 call PrintNumber coord hl, 5, 12 - ld de,wcd6d + ld de, wcd6d call PlaceString coord hl, 8, 14 - ld de,wTradedEnemyMonOT + ld de, wTradedEnemyMonOT call PlaceString coord hl, 8, 16 - ld de,wTradedEnemyMonOTID + ld de, wTradedEnemyMonOTID lb bc, LEADING_ZEROES | 2, 5 jp PrintNumber diff --git a/gfx/blue/intro_purin_1.6x6.png b/gfx/blue/intro_purin_1.png similarity index 100% rename from gfx/blue/intro_purin_1.6x6.png rename to gfx/blue/intro_purin_1.png diff --git a/gfx/blue/intro_purin_2.6x6.png b/gfx/blue/intro_purin_2.png similarity index 100% rename from gfx/blue/intro_purin_2.6x6.png rename to gfx/blue/intro_purin_2.png diff --git a/gfx/blue/intro_purin_3.6x6.png b/gfx/blue/intro_purin_3.png similarity index 100% rename from gfx/blue/intro_purin_3.6x6.png rename to gfx/blue/intro_purin_3.png diff --git a/gfx/game_boy.norepeat.png b/gfx/game_boy.png similarity index 100% rename from gfx/game_boy.norepeat.png rename to gfx/game_boy.png diff --git a/gfx/red/intro_nido_1.6x6.png b/gfx/red/intro_nido_1.png similarity index 100% rename from gfx/red/intro_nido_1.6x6.png rename to gfx/red/intro_nido_1.png diff --git a/gfx/red/intro_nido_2.6x6.png b/gfx/red/intro_nido_2.png similarity index 100% rename from gfx/red/intro_nido_2.6x6.png rename to gfx/red/intro_nido_2.png diff --git a/gfx/red/intro_nido_3.6x6.png b/gfx/red/intro_nido_3.png similarity index 100% rename from gfx/red/intro_nido_3.6x6.png rename to gfx/red/intro_nido_3.png diff --git a/gfx/theend.interleave.png b/gfx/theend.png similarity index 100% rename from gfx/theend.interleave.png rename to gfx/theend.png diff --git a/gfx/tilesets/cavern.t14.png b/gfx/tilesets/cavern.png similarity index 100% rename from gfx/tilesets/cavern.t14.png rename to gfx/tilesets/cavern.png diff --git a/gfx/tilesets/cemetery.t4.png b/gfx/tilesets/cemetery.png similarity index 100% rename from gfx/tilesets/cemetery.t4.png rename to gfx/tilesets/cemetery.png diff --git a/gfx/tilesets/club.t5.png b/gfx/tilesets/club.png similarity index 100% rename from gfx/tilesets/club.t5.png rename to gfx/tilesets/club.png diff --git a/gfx/tilesets/gate.t1.png b/gfx/tilesets/gate.png similarity index 100% rename from gfx/tilesets/gate.t1.png rename to gfx/tilesets/gate.png diff --git a/gfx/tilesets/house.t2.png b/gfx/tilesets/house.png similarity index 100% rename from gfx/tilesets/house.t2.png rename to gfx/tilesets/house.png diff --git a/gfx/tilesets/interior.t1.png b/gfx/tilesets/interior.png similarity index 100% rename from gfx/tilesets/interior.t1.png rename to gfx/tilesets/interior.png diff --git a/gfx/tilesets/lab.t4.png b/gfx/tilesets/lab.png similarity index 100% rename from gfx/tilesets/lab.t4.png rename to gfx/tilesets/lab.png diff --git a/gfx/tilesets/lobby.t2.png b/gfx/tilesets/lobby.png similarity index 100% rename from gfx/tilesets/lobby.t2.png rename to gfx/tilesets/lobby.png diff --git a/gfx/tilesets/mansion.t2.png b/gfx/tilesets/mansion.png similarity index 100% rename from gfx/tilesets/mansion.t2.png rename to gfx/tilesets/mansion.png diff --git a/gfx/tilesets/overworld.t2.png b/gfx/tilesets/overworld.png similarity index 100% rename from gfx/tilesets/overworld.t2.png rename to gfx/tilesets/overworld.png diff --git a/gfx/tilesets/plateau.t10.png b/gfx/tilesets/plateau.png similarity index 100% rename from gfx/tilesets/plateau.t10.png rename to gfx/tilesets/plateau.png diff --git a/gfx/tilesets/reds_house.t7.png b/gfx/tilesets/reds_house.png similarity index 100% rename from gfx/tilesets/reds_house.t7.png rename to gfx/tilesets/reds_house.png diff --git a/gfx/tilesets/ship.t6.png b/gfx/tilesets/ship.png similarity index 100% rename from gfx/tilesets/ship.t6.png rename to gfx/tilesets/ship.png diff --git a/gfx/tilesets/ship_port.t2.png b/gfx/tilesets/ship_port.png similarity index 100% rename from gfx/tilesets/ship_port.t2.png rename to gfx/tilesets/ship_port.png diff --git a/gfx/tilesets/underground.t7.png b/gfx/tilesets/underground.png similarity index 100% rename from gfx/tilesets/underground.t7.png rename to gfx/tilesets/underground.png diff --git a/home.asm b/home.asm index 34eb43e5..6547e810 100644 --- a/home.asm +++ b/home.asm @@ -146,24 +146,24 @@ CheckForUserInterruption:: ; INPUT: ; a = ID of destination warp within destination map LoadDestinationWarpPosition:: - ld b,a - ld a,[H_LOADEDROMBANK] + ld b, a + ld a, [H_LOADEDROMBANK] push af - ld a,[wPredefParentBank] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a - ld a,b + ld a, [wPredefParentBank] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ld a, b add a add a - ld c,a - ld b,0 - add hl,bc - ld bc,4 - ld de,wCurrentTileBlockMapViewPointer + ld c, a + ld b, 0 + add hl, bc + ld bc, 4 + ld de, wCurrentTileBlockMapViewPointer call CopyData pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret @@ -187,18 +187,18 @@ DrawHPBar:: ; Middle ld a, $63 ; empty .draw - ld [hli],a + ld [hli], a dec d jr nz, .draw ; Right - ld a,[wHPBarType] + ld a, [wHPBarType] dec a ld a, $6d ; status screen and battle jr z, .ok dec a ; pokemon menu .ok - ld [hl],a + ld [hl], a pop hl @@ -339,10 +339,10 @@ GetCryData:: ret DisplayPartyMenu:: - ld a,[hTilesetType] + ld a, [hTilesetType] push af xor a - ld [hTilesetType],a + ld [hTilesetType], a call GBPalWhiteOutWithDelay3 call ClearSprites call PartyMenuInit @@ -350,10 +350,10 @@ DisplayPartyMenu:: jp HandlePartyMenuInput GoBackToPartyMenu:: - ld a,[hTilesetType] + ld a, [hTilesetType] push af xor a - ld [hTilesetType],a + ld [hTilesetType], a call PartyMenuInit call RedrawPartyMenu jp HandlePartyMenuInput @@ -398,38 +398,38 @@ PartyMenuInit:: ret HandlePartyMenuInput:: - ld a,1 - ld [wMenuWrappingEnabled],a - ld a,$40 - ld [wPartyMenuAnimMonEnabled],a + ld a, 1 + ld [wMenuWrappingEnabled], a + ld a, $40 + ld [wPartyMenuAnimMonEnabled], a call HandleMenuInput_ call PlaceUnfilledArrowMenuCursor - ld b,a + ld b, a xor a - ld [wPartyMenuAnimMonEnabled],a - ld a,[wCurrentMenuItem] - ld [wPartyAndBillsPCSavedMenuItem],a - ld hl,wd730 - res 6,[hl] ; turn on letter printing delay - ld a,[wMenuItemToSwap] + ld [wPartyMenuAnimMonEnabled], a + ld a, [wCurrentMenuItem] + ld [wPartyAndBillsPCSavedMenuItem], a + ld hl, wd730 + res 6, [hl] ; turn on letter printing delay + ld a, [wMenuItemToSwap] and a - jp nz,.swappingPokemon + jp nz, .swappingPokemon pop af - ld [hTilesetType],a - bit 1,b - jr nz,.noPokemonChosen - ld a,[wPartyCount] + ld [hTilesetType], a + bit 1, b + jr nz, .noPokemonChosen + ld a, [wPartyCount] and a - jr z,.noPokemonChosen - ld a,[wCurrentMenuItem] - ld [wWhichPokemon],a - ld hl,wPartySpecies - ld b,0 - ld c,a - add hl,bc - ld a,[hl] - ld [wcf91],a - ld [wBattleMonSpecies2],a + jr z, .noPokemonChosen + ld a, [wCurrentMenuItem] + ld [wWhichPokemon], a + ld hl, wPartySpecies + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + ld [wcf91], a + ld [wBattleMonSpecies2], a call BankswitchBack and a ret @@ -438,18 +438,18 @@ HandlePartyMenuInput:: scf ret .swappingPokemon - bit 1,b ; was the B button pressed? - jr z,.handleSwap ; if not, handle swapping the pokemon + bit 1, b ; was the B button pressed? + jr z, .handleSwap ; if not, handle swapping the pokemon .cancelSwap ; if the B button was pressed callba ErasePartyMenuCursors xor a - ld [wMenuItemToSwap],a - ld [wPartyMenuTypeOrMessageID],a + ld [wMenuItemToSwap], a + ld [wPartyMenuTypeOrMessageID], a call RedrawPartyMenu jr HandlePartyMenuInput .handleSwap - ld a,[wCurrentMenuItem] - ld [wWhichPokemon],a + ld a, [wCurrentMenuItem] + ld [wWhichPokemon], a callba SwitchPartyMon jr HandlePartyMenuInput @@ -472,33 +472,33 @@ PrintStatusCondition:: push de dec de dec de ; de = address of current HP - ld a,[de] - ld b,a + ld a, [de] + ld b, a dec de - ld a,[de] + ld a, [de] or b ; is the pokemon's HP zero? pop de - jr nz,PrintStatusConditionNotFainted + jr nz, PrintStatusConditionNotFainted ; if the pokemon's HP is 0, print "FNT" - ld a,"F" - ld [hli],a - ld a,"N" - ld [hli],a - ld [hl],"T" + ld a, "F" + ld [hli], a + ld a, "N" + ld [hli], a + ld [hl], "T" and a ret PrintStatusConditionNotFainted: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,BANK(PrintStatusAilment) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, BANK(PrintStatusAilment) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call PrintStatusAilment ; print status condition pop bc - ld a,b - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; function to print pokemon level, leaving off the ":L" if the level is at least 100 @@ -506,12 +506,12 @@ PrintStatusConditionNotFainted: ; hl = destination address ; [wLoadedMonLevel] = level PrintLevel:: - ld a,$6e ; ":L" tile ID - ld [hli],a - ld c,2 ; number of digits - ld a,[wLoadedMonLevel] ; level + ld a, $6e ; ":L" tile ID + ld [hli], a + ld c, 2 ; number of digits + ld a, [wLoadedMonLevel] ; level cp 100 - jr c,PrintLevelCommon + jr c, PrintLevelCommon ; if level at least 100, write over the ":L" tile dec hl inc c ; increment number of digits to 3 @@ -522,105 +522,105 @@ PrintLevel:: ; hl = destination address ; [wLoadedMonLevel] = level PrintLevelFull:: - ld a,$6e ; ":L" tile ID - ld [hli],a - ld c,3 ; number of digits - ld a,[wLoadedMonLevel] ; level + ld a, $6e ; ":L" tile ID + ld [hli], a + ld c, 3 ; number of digits + ld a, [wLoadedMonLevel] ; level PrintLevelCommon:: - ld [wd11e],a - ld de,wd11e - ld b,LEFT_ALIGN | 1 ; 1 byte + ld [wd11e], a + ld de, wd11e + ld b, LEFT_ALIGN | 1 ; 1 byte jp PrintNumber GetwMoves:: ; Unused. Returns the move at index a from wMoves in a - ld hl,wMoves - ld c,a - ld b,0 - add hl,bc - ld a,[hl] + ld hl, wMoves + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] ret ; copies the base stat data of a pokemon to wMonHeader ; INPUT: ; [wd0b5] = pokemon ID GetMonHeader:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,BANK(BaseStats) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, BANK(BaseStats) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a push bc push de push hl - ld a,[wd11e] + ld a, [wd11e] push af - ld a,[wd0b5] - ld [wd11e],a - ld de,FossilKabutopsPic - ld b,$66 ; size of Kabutops fossil and Ghost sprites + ld a, [wd0b5] + ld [wd11e], a + ld de, FossilKabutopsPic + ld b, $66 ; size of Kabutops fossil and Ghost sprites cp FOSSIL_KABUTOPS ; Kabutops fossil - jr z,.specialID - ld de,GhostPic + jr z, .specialID + ld de, GhostPic cp MON_GHOST ; Ghost - jr z,.specialID - ld de,FossilAerodactylPic - ld b,$77 ; size of Aerodactyl fossil sprite + jr z, .specialID + ld de, FossilAerodactylPic + ld b, $77 ; size of Aerodactyl fossil sprite cp FOSSIL_AERODACTYL ; Aerodactyl fossil - jr z,.specialID - cp a,MEW - jr z,.mew + jr z, .specialID + cp MEW + jr z, .mew predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number - ld a,[wd11e] + ld a, [wd11e] dec a ld bc, MonBaseStatsEnd - MonBaseStats - ld hl,BaseStats + ld hl, BaseStats call AddNTimes - ld de,wMonHeader + ld de, wMonHeader ld bc, MonBaseStatsEnd - MonBaseStats call CopyData jr .done .specialID - ld hl,wMonHSpriteDim - ld [hl],b ; write sprite dimensions + ld hl, wMonHSpriteDim + ld [hl], b ; write sprite dimensions inc hl - ld [hl],e ; write front sprite pointer + ld [hl], e ; write front sprite pointer inc hl - ld [hl],d + ld [hl], d jr .done .mew - ld hl,MewBaseStats - ld de,wMonHeader - ld bc,MonBaseStatsEnd - MonBaseStats - ld a,BANK(MewBaseStats) + ld hl, MewBaseStats + ld de, wMonHeader + ld bc, MonBaseStatsEnd - MonBaseStats + ld a, BANK(MewBaseStats) call FarCopyData .done - ld a,[wd0b5] - ld [wMonHIndex],a + ld a, [wd0b5] + ld [wMonHIndex], a pop af - ld [wd11e],a + ld [wd11e], a pop hl pop de pop bc pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; copy party pokemon's name to wcd6d GetPartyMonName2:: - ld a,[wWhichPokemon] ; index within party - ld hl,wPartyMonNicks + ld a, [wWhichPokemon] ; index within party + ld hl, wPartyMonNicks ; this is called more often GetPartyMonName:: push hl push bc call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times - ld de,wcd6d + ld de, wcd6d push de - ld bc,NAME_LENGTH + ld bc, NAME_LENGTH call CopyData pop de pop bc @@ -641,38 +641,38 @@ GetPartyMonName:: ; Note that bits 5 and 7 are modified during execution. The above reflects ; their meaning at the beginning of the functions's execution. PrintBCDNumber:: - ld b,c ; save flags in b - res 7,c - res 6,c - res 5,c ; c now holds the length - bit 5,b - jr z,.loop - bit 7,b - jr nz,.loop - ld [hl],"¥" + ld b, c ; save flags in b + res 7, c + res 6, c + res 5, c ; c now holds the length + bit 5, b + jr z, .loop + bit 7, b + jr nz, .loop + ld [hl], "¥" inc hl .loop - ld a,[de] + ld a, [de] swap a call PrintBCDDigit ; print upper digit - ld a,[de] + ld a, [de] call PrintBCDDigit ; print lower digit inc de dec c - jr nz,.loop - bit 7,b ; were any non-zero digits printed? - jr z,.done ; if so, we are done + jr nz, .loop + bit 7, b ; were any non-zero digits printed? + jr z, .done ; if so, we are done .numberEqualsZero ; if every digit of the BCD number is zero - bit 6,b ; left or right alignment? - jr nz,.skipRightAlignmentAdjustment + bit 6, b ; left or right alignment? + jr nz, .skipRightAlignmentAdjustment dec hl ; if the string is right-aligned, it needs to be moved back one space .skipRightAlignmentAdjustment - bit 5,b - jr z,.skipCurrencySymbol - ld [hl],"¥" + bit 5, b + jr z, .skipCurrencySymbol + ld [hl], "¥" inc hl .skipCurrencySymbol - ld [hl],"0" + ld [hl], "0" call PrintLetterDelay inc hl .done @@ -681,26 +681,26 @@ PrintBCDNumber:: PrintBCDDigit:: and $f and a - jr z,.zeroDigit + jr z, .zeroDigit .nonzeroDigit - bit 7,b ; have any non-space characters been printed? - jr z,.outputDigit + bit 7, b ; have any non-space characters been printed? + jr z, .outputDigit ; if bit 7 is set, then no numbers have been printed yet - bit 5,b ; print the currency symbol? - jr z,.skipCurrencySymbol - ld [hl],"¥" + bit 5, b ; print the currency symbol? + jr z, .skipCurrencySymbol + ld [hl], "¥" inc hl - res 5,b + res 5, b .skipCurrencySymbol - res 7,b ; unset 7 to indicate that a nonzero digit has been reached + res 7, b ; unset 7 to indicate that a nonzero digit has been reached .outputDigit add "0" - ld [hli],a + ld [hli], a jp PrintLetterDelay .zeroDigit - bit 7,b ; either printing leading zeroes or already reached a nonzero digit? - jr z,.outputDigit ; if so, print a zero digit - bit 6,b ; left or right alignment? + bit 7, b ; either printing leading zeroes or already reached a nonzero digit? + jr z, .outputDigit ; if so, print a zero digit + bit 6, b ; left or right alignment? ret nz inc hl ; if right-aligned, "print" a space by advancing the pointer ret @@ -709,12 +709,12 @@ PrintBCDDigit:: ; assumes the corresponding mon header is already loaded ; hl contains offset to sprite pointer ($b for front or $d for back) UncompressMonSprite:: - ld bc,wMonHeader - add hl,bc - ld a,[hli] - ld [wSpriteInputPtr],a ; fetch sprite input pointer - ld a,[hl] - ld [wSpriteInputPtr+1],a + ld bc, wMonHeader + add hl, bc + ld a, [hli] + ld [wSpriteInputPtr], a ; fetch sprite input pointer + ld a, [hl] + ld [wSpriteInputPtr+1], a ; define (by index number) the bank that a pokemon's image is in ; index = Mew, bank 1 ; index = Kabutops fossil, bank $B @@ -723,32 +723,32 @@ UncompressMonSprite:: ; $4A ≤ index < $74, bank $B ; $74 ≤ index < $99, bank $C ; $99 ≤ index, bank $D - ld a,[wcf91] ; XXX name for this ram location - ld b,a + ld a, [wcf91] ; XXX name for this ram location + ld b, a cp MEW - ld a,BANK(MewPicFront) - jr z,.GotBank - ld a,b + ld a, BANK(MewPicFront) + jr z, .GotBank + ld a, b cp FOSSIL_KABUTOPS - ld a,BANK(FossilKabutopsPic) - jr z,.GotBank - ld a,b + ld a, BANK(FossilKabutopsPic) + jr z, .GotBank + ld a, b cp TANGELA + 1 - ld a,BANK(TangelaPicFront) - jr c,.GotBank - ld a,b + ld a, BANK(TangelaPicFront) + jr c, .GotBank + ld a, b cp MOLTRES + 1 - ld a,BANK(MoltresPicFront) - jr c,.GotBank - ld a,b + ld a, BANK(MoltresPicFront) + jr c, .GotBank + ld a, b cp BEEDRILL + 2 - ld a,BANK(BeedrillPicFront) - jr c,.GotBank - ld a,b + ld a, BANK(BeedrillPicFront) + jr c, .GotBank + ld a, b cp STARMIE + 1 - ld a,BANK(StarmiePicFront) - jr c,.GotBank - ld a,BANK(VictreebelPicFront) + ld a, BANK(StarmiePicFront) + jr c, .GotBank + ld a, BANK(VictreebelPicFront) .GotBank jp UncompressSpriteData @@ -935,7 +935,7 @@ INCLUDE "data/mart_inventories.asm" TextScriptEndingChar:: db "@" TextScriptEnd:: - ld hl,TextScriptEndingChar + ld hl, TextScriptEndingChar ret ExclamationText:: @@ -1040,41 +1040,41 @@ FadeOutAudio:: ; this function is used to display sign messages, sprite dialog, etc. ; INPUT: [hSpriteIndexOrTextID] = sprite ID or text ID DisplayTextID:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af callba DisplayTextIDInit ; initialization - ld hl,wTextPredefFlag - bit 0,[hl] - res 0,[hl] - jr nz,.skipSwitchToMapBank - ld a,[wCurMap] + ld hl, wTextPredefFlag + bit 0, [hl] + res 0, [hl] + jr nz, .skipSwitchToMapBank + ld a, [wCurMap] call SwitchToMapRomBank .skipSwitchToMapBank - ld a,30 ; half a second - ld [H_FRAMECOUNTER],a ; used as joypad poll timer - ld hl,wMapTextPtr - ld a,[hli] - ld h,[hl] - ld l,a ; hl = map text pointer - ld d,$00 - ld a,[hSpriteIndexOrTextID] ; text ID - ld [wSpriteIndex],a + ld a, 30 ; half a second + ld [H_FRAMECOUNTER], a ; used as joypad poll timer + ld hl, wMapTextPtr + ld a, [hli] + ld h, [hl] + ld l, a ; hl = map text pointer + ld d, $00 + ld a, [hSpriteIndexOrTextID] ; text ID + ld [wSpriteIndex], a and a - jp z,DisplayStartMenu + jp z, DisplayStartMenu cp TEXT_SAFARI_GAME_OVER - jp z,DisplaySafariGameOverText + jp z, DisplaySafariGameOverText cp TEXT_MON_FAINTED - jp z,DisplayPokemonFaintedText + jp z, DisplayPokemonFaintedText cp TEXT_BLACKED_OUT - jp z,DisplayPlayerBlackedOutText + jp z, DisplayPlayerBlackedOutText cp TEXT_REPEL_WORE_OFF - jp z,DisplayRepelWoreOffText - ld a,[wNumSprites] - ld e,a - ld a,[hSpriteIndexOrTextID] ; sprite ID + jp z, DisplayRepelWoreOffText + ld a, [wNumSprites] + ld e, a + ld a, [hSpriteIndexOrTextID] ; sprite ID cp e - jr z,.spriteHandling - jr nc,.skipSpriteHandling + jr z, .spriteHandling + jr nc, .skipSpriteHandling .spriteHandling ; get the text ID of the sprite push hl @@ -1083,123 +1083,123 @@ DisplayTextID:: callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction) pop bc pop de - ld hl,wMapSpriteData ; NPC text entries - ld a,[hSpriteIndexOrTextID] + ld hl, wMapSpriteData ; NPC text entries + ld a, [hSpriteIndexOrTextID] dec a add a add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry inc hl - ld a,[hl] ; a = text ID of the sprite + ld a, [hl] ; a = text ID of the sprite pop hl .skipSpriteHandling ; look up the address of the text in the map's text entries dec a - ld e,a + ld e, a sla e - add hl,de - ld a,[hli] - ld h,[hl] - ld l,a ; hl = address of the text - ld a,[hl] ; a = first byte of text + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a ; hl = address of the text + ld a, [hl] ; a = first byte of text ; check first byte of text for special cases cp $fe ; Pokemart NPC - jp z,DisplayPokemartDialogue + jp z, DisplayPokemartDialogue cp $ff ; Pokemon Center NPC - jp z,DisplayPokemonCenterDialogue + jp z, DisplayPokemonCenterDialogue cp $fc ; Item Storage PC - jp z,FuncTX_ItemStoragePC + jp z, FuncTX_ItemStoragePC cp $fd ; Bill's PC - jp z,FuncTX_BillsPC + jp z, FuncTX_BillsPC cp $f9 ; Pokemon Center PC - jp z,FuncTX_PokemonCenterPC + jp z, FuncTX_PokemonCenterPC cp $f5 ; Vending Machine - jr nz,.notVendingMachine + jr nz, .notVendingMachine callba VendingMachineMenu ; jump banks to vending machine routine jr AfterDisplayingTextID .notVendingMachine cp $f7 ; prize menu jp z, FuncTX_GameCornerPrizeMenu cp $f6 ; cable connection NPC in Pokemon Center - jr nz,.notSpecialCase + jr nz, .notSpecialCase callab CableClubNPC jr AfterDisplayingTextID .notSpecialCase call PrintText_NoCreatingTextBox ; display the text - ld a,[wDoNotWaitForButtonPressAfterDisplayingText] + ld a, [wDoNotWaitForButtonPressAfterDisplayingText] and a - jr nz,HoldTextDisplayOpen + jr nz, HoldTextDisplayOpen AfterDisplayingTextID:: - ld a,[wEnteringCableClub] + ld a, [wEnteringCableClub] and a - jr nz,HoldTextDisplayOpen + jr nz, HoldTextDisplayOpen call WaitForTextScrollButtonPress ; wait for a button press after displaying all the text ; loop to hold the dialogue box open as long as the player keeps holding down the A button HoldTextDisplayOpen:: call Joypad - ld a,[hJoyHeld] - bit 0,a ; is the A button being pressed? - jr nz,HoldTextDisplayOpen + ld a, [hJoyHeld] + bit 0, a ; is the A button being pressed? + jr nz, HoldTextDisplayOpen CloseTextDisplay:: - ld a,[wCurMap] + ld a, [wCurMap] call SwitchToMapRomBank - ld a,$90 - ld [hWY],a ; move the window off the screen + ld a, $90 + ld [hWY], a ; move the window off the screen call DelayFrame call LoadGBPal xor a - ld [H_AUTOBGTRANSFERENABLED],a ; disable continuous WRAM to VRAM transfer each V-blank + ld [H_AUTOBGTRANSFERENABLED], a ; disable continuous WRAM to VRAM transfer each V-blank ; loop to make sprites face the directions they originally faced before the dialogue - ld hl,wSpriteStateData2 + $19 - ld c,$0f - ld de,$0010 + ld hl, wSpriteStateData2 + $19 + ld c, $0f + ld de, $0010 .restoreSpriteFacingDirectionLoop - ld a,[hl] + ld a, [hl] dec h - ld [hl],a + ld [hl], a inc h - add hl,de + add hl, de dec c - jr nz,.restoreSpriteFacingDirectionLoop - ld a,BANK(InitMapSprites) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + jr nz, .restoreSpriteFacingDirectionLoop + ld a, BANK(InitMapSprites) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns) - ld hl,wFontLoaded - res 0,[hl] - ld a,[wd732] - bit 3,a ; used fly warp - call z,LoadPlayerSpriteGraphics + ld hl, wFontLoaded + res 0, [hl] + ld a, [wd732] + bit 3, a ; used fly warp + call z, LoadPlayerSpriteGraphics call LoadCurrentMapView pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a jp UpdateSprites DisplayPokemartDialogue:: push hl - ld hl,PokemartGreetingText + ld hl, PokemartGreetingText call PrintText pop hl inc hl call LoadItemList - ld a,PRICEDITEMLISTMENU - ld [wListMenuID],a - ld a,[H_LOADEDROMBANK] + ld a, PRICEDITEMLISTMENU + ld [wListMenuID], a + ld a, [H_LOADEDROMBANK] push af - ld a,Bank(DisplayPokemartDialogue_) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, Bank(DisplayPokemartDialogue_) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call DisplayPokemartDialogue_ pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a jp AfterDisplayingTextID PokemartGreetingText:: @@ -1207,38 +1207,38 @@ PokemartGreetingText:: db "@" LoadItemList:: - ld a,1 - ld [wUpdateSpritesEnabled],a - ld a,h - ld [wItemListPointer],a - ld a,l - ld [wItemListPointer + 1],a - ld de,wItemList + ld a, 1 + ld [wUpdateSpritesEnabled], a + ld a, h + ld [wItemListPointer], a + ld a, l + ld [wItemListPointer + 1], a + ld de, wItemList .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de cp $ff - jr nz,.loop + jr nz, .loop ret DisplayPokemonCenterDialogue:: ; zeroing these doesn't appear to serve any purpose xor a - ld [$ff8b],a - ld [$ff8c],a - ld [$ff8d],a + ld [$ff8b], a + ld [$ff8c], a + ld [$ff8d], a inc hl - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,Bank(DisplayPokemonCenterDialogue_) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, Bank(DisplayPokemonCenterDialogue_) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call DisplayPokemonCenterDialogue_ pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a jp AfterDisplayingTextID DisplaySafariGameOverText:: @@ -1246,7 +1246,7 @@ DisplaySafariGameOverText:: jp AfterDisplayingTextID DisplayPokemonFaintedText:: - ld hl,PokemonFaintedText + ld hl, PokemonFaintedText call PrintText jp AfterDisplayingTextID @@ -1255,11 +1255,11 @@ PokemonFaintedText:: db "@" DisplayPlayerBlackedOutText:: - ld hl,PlayerBlackedOutText + ld hl, PlayerBlackedOutText call PrintText - ld a,[wd732] - res 5,a ; reset forced to use bike bit - ld [wd732],a + ld a, [wd732] + res 5, a ; reset forced to use bike bit + ld [wd732], a jp HoldTextDisplayOpen PlayerBlackedOutText:: @@ -1267,7 +1267,7 @@ PlayerBlackedOutText:: db "@" DisplayRepelWoreOffText:: - ld hl,RepelWoreOffText + ld hl, RepelWoreOffText call PrintText jp AfterDisplayingTextID @@ -1284,22 +1284,22 @@ INCLUDE "engine/menu/start_menu.asm" ; OUTPUT: ; [wNumSetBits] = number of set bits CountSetBits:: - ld c,0 + ld c, 0 .loop - ld a,[hli] - ld e,a - ld d,8 + ld a, [hli] + ld e, a + ld d, 8 .innerLoop ; count how many bits are set in the current byte srl e - ld a,0 + ld a, 0 adc c - ld c,a + ld c, a dec d - jr nz,.innerLoop + jr nz, .innerLoop dec b - jr nz,.loop - ld a,c - ld [wNumSetBits],a + jr nz, .loop + ld a, c + ld [wNumSetBits], a ret ; subtracts the amount the player paid from their money @@ -1309,12 +1309,12 @@ SubtractAmountPaidFromMoney:: ; adds the amount the player sold to their money AddAmountSoldToMoney:: - ld de,wPlayerMoney + 2 - ld hl,$ffa1 ; total price of items - ld c,3 ; length of money in bytes + ld de, wPlayerMoney + 2 + ld hl, $ffa1 ; total price of items + ld c, 3 ; length of money in bytes predef AddBCDPredef ; add total price to money - ld a,MONEY_BOX - ld [wTextBoxID],a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID ; redraw money text box ld a, SFX_PURCHASE call PlaySoundWaitForCurrent @@ -1326,15 +1326,15 @@ AddAmountSoldToMoney:: ; [wWhichPokemon] = index (within the inventory) of the item to remove ; [wItemQuantity] = quantity to remove RemoveItemFromInventory:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,BANK(RemoveItemFromInventory_) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, BANK(RemoveItemFromInventory_) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call RemoveItemFromInventory_ pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; function to add an item (in varying quantities) to the player's bag or PC box @@ -1345,16 +1345,16 @@ RemoveItemFromInventory:: ; sets carry flag if successful, unsets carry flag if unsuccessful AddItemToInventory:: push bc - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,BANK(AddItemToInventory_) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, BANK(AddItemToInventory_) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call AddItemToInventory_ pop bc - ld a,b - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a pop bc ret @@ -1363,80 +1363,80 @@ AddItemToInventory:: ; [wListPointer] = address of the list (2 bytes) DisplayListMenuID:: xor a - ld [H_AUTOBGTRANSFERENABLED],a ; disable auto-transfer - ld a,1 - ld [hJoy7],a ; joypad state update flag - ld a,[wBattleType] + ld [H_AUTOBGTRANSFERENABLED], a ; disable auto-transfer + ld a, 1 + ld [hJoy7], a ; joypad state update flag + ld a, [wBattleType] and a ; is it the Old Man battle? - jr nz,.specialBattleType - ld a,$01 ; hardcoded bank + jr nz, .specialBattleType + ld a, $01 ; hardcoded bank jr .bankswitch .specialBattleType ; Old Man battle ld a, BANK(DisplayBattleMenu) .bankswitch call BankswitchHome - 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 [wMenuItemToSwap],a ; 0 means no item is currently being swapped - ld [wListCount],a - ld a,[wListPointer] - ld l,a - ld a,[wListPointer + 1] - ld h,a ; hl = address of the list - ld a,[hl] ; the first byte is the number of entries in the list - ld [wListCount],a - ld a,LIST_MENU_BOX - ld [wTextBoxID],a + ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped + ld [wListCount], a + ld a, [wListPointer] + ld l, a + ld a, [wListPointer + 1] + ld h, a ; hl = address of the list + ld a, [hl] ; the first byte is the number of entries in the list + ld [wListCount], a + ld a, LIST_MENU_BOX + ld [wTextBoxID], a call DisplayTextBoxID ; draw the menu text box call UpdateSprites ; disable sprites behind the text box ; the code up to .skipMovingSprites appears to be useless coord hl, 4, 2 ; coordinates of upper left corner of menu text box lb de, 9, 14 ; height and width of menu text box - ld a,[wListMenuID] + ld a, [wListMenuID] and a ; is it a PC pokemon list? - jr nz,.skipMovingSprites + jr nz, .skipMovingSprites call UpdateSprites .skipMovingSprites - ld a,1 ; max menu item ID is 1 if the list has less than 2 entries - ld [wMenuWatchMovingOutOfBounds],a - ld a,[wListCount] + ld a, 1 ; max menu item ID is 1 if the list has less than 2 entries + ld [wMenuWatchMovingOutOfBounds], a + ld a, [wListCount] cp 2 ; does the list have less than 2 entries? - jr c,.setMenuVariables - ld a,2 ; max menu item ID is 2 if the list has at least 2 entries + jr c, .setMenuVariables + ld a, 2 ; max menu item ID is 2 if the list has at least 2 entries .setMenuVariables - ld [wMaxMenuItem],a - ld a,4 - ld [wTopMenuItemY],a - ld a,5 - ld [wTopMenuItemX],a - ld a,A_BUTTON | B_BUTTON | SELECT - ld [wMenuWatchedKeys],a - ld c,10 + ld [wMaxMenuItem], a + ld a, 4 + ld [wTopMenuItemY], a + ld a, 5 + ld [wTopMenuItemX], a + ld a, A_BUTTON | B_BUTTON | SELECT + ld [wMenuWatchedKeys], a + ld c, 10 call DelayFrames DisplayListMenuIDLoop:: xor a - ld [H_AUTOBGTRANSFERENABLED],a ; disable transfer + ld [H_AUTOBGTRANSFERENABLED], a ; disable transfer call PrintListMenuEntries - ld a,1 - ld [H_AUTOBGTRANSFERENABLED],a ; enable transfer + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a ; enable transfer call Delay3 - ld a,[wBattleType] + ld a, [wBattleType] and a ; is it the Old Man battle? - jr z,.notOldManBattle + jr z, .notOldManBattle .oldManBattle - ld a,"▶" + ld a, "▶" Coorda 5, 4 ; place menu cursor in front of first menu entry - ld c,80 + ld c, 80 call DelayFrames xor a - ld [wCurrentMenuItem],a + ld [wCurrentMenuItem], a coord hl, 5, 4 - ld a,l - ld [wMenuCursorLocation],a - ld a,h - ld [wMenuCursorLocation + 1],a + ld a, l + ld [wMenuCursorLocation], a + ld a, h + ld [wMenuCursorLocation + 1], a jr .buttonAPressed .notOldManBattle call LoadGBPal @@ -1444,231 +1444,231 @@ DisplayListMenuIDLoop:: push af call PlaceMenuCursor pop af - bit 0,a ; was the A button pressed? - jp z,.checkOtherKeys + bit 0, a ; was the A button pressed? + jp z, .checkOtherKeys .buttonAPressed - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] call PlaceUnfilledArrowMenuCursor ; pointless because both values are overwritten before they are read - ld a,$01 - ld [wMenuExitMethod],a - ld [wChosenMenuItem],a + ld a, $01 + ld [wMenuExitMethod], a + ld [wChosenMenuItem], a xor a - ld [wMenuWatchMovingOutOfBounds],a - ld a,[wCurrentMenuItem] - ld c,a - ld a,[wListScrollOffset] + ld [wMenuWatchMovingOutOfBounds], a + ld a, [wCurrentMenuItem] + ld c, a + ld a, [wListScrollOffset] add c - ld c,a - ld a,[wListCount] + ld c, a + ld a, [wListCount] and a ; is the list empty? - jp z,ExitListMenu ; if so, exit the menu + jp z, ExitListMenu ; if so, exit the menu dec a cp c ; did the player select Cancel? - jp c,ExitListMenu ; if so, exit the menu - ld a,c - ld [wWhichPokemon],a - ld a,[wListMenuID] + jp c, ExitListMenu ; if so, exit the menu + ld a, c + ld [wWhichPokemon], a + ld a, [wListMenuID] cp ITEMLISTMENU - jr nz,.skipMultiplying + jr nz, .skipMultiplying ; if it's an item menu sla c ; item entries are 2 bytes long, so multiply by 2 .skipMultiplying - ld a,[wListPointer] - ld l,a - ld a,[wListPointer + 1] - ld h,a + ld a, [wListPointer] + ld l, a + ld a, [wListPointer + 1] + ld h, a inc hl ; hl = beginning of list entries - ld b,0 - add hl,bc - ld a,[hl] - ld [wcf91],a - ld a,[wListMenuID] + ld b, 0 + add hl, bc + ld a, [hl] + ld [wcf91], a + ld a, [wListMenuID] and a ; is it a PC pokemon list? - jr z,.pokemonList + jr z, .pokemonList push hl call GetItemPrice pop hl - ld a,[wListMenuID] + ld a, [wListMenuID] cp ITEMLISTMENU - jr nz,.skipGettingQuantity + jr nz, .skipGettingQuantity ; if it's an item menu inc hl - ld a,[hl] ; a = item quantity - ld [wMaxItemQuantity],a + ld a, [hl] ; a = item quantity + ld [wMaxItemQuantity], a .skipGettingQuantity - ld a,[wcf91] - ld [wd0b5],a - ld a,BANK(ItemNames) - ld [wPredefBank],a + ld a, [wcf91] + ld [wd0b5], a + ld a, BANK(ItemNames) + ld [wPredefBank], a call GetName jr .storeChosenEntry .pokemonList - ld hl,wPartyCount - ld a,[wListPointer] + ld hl, wPartyCount + ld a, [wListPointer] cp l ; is it a list of party pokemon or box pokemon? - ld hl,wPartyMonNicks - jr z,.getPokemonName + ld hl, wPartyMonNicks + jr z, .getPokemonName ld hl, wBoxMonNicks ; box pokemon names .getPokemonName - ld a,[wWhichPokemon] + ld a, [wWhichPokemon] call GetPartyMonName .storeChosenEntry ; store the menu entry that the player chose and return - ld de,wcd6d + ld de, wcd6d call CopyStringToCF4B ; copy name to wcf4b - ld a,CHOSE_MENU_ITEM - ld [wMenuExitMethod],a - ld a,[wCurrentMenuItem] - ld [wChosenMenuItem],a + ld a, CHOSE_MENU_ITEM + ld [wMenuExitMethod], a + ld a, [wCurrentMenuItem] + ld [wChosenMenuItem], a xor a - ld [hJoy7],a ; joypad state update flag - ld hl,wd730 - res 6,[hl] ; turn on letter printing delay + ld [hJoy7], a ; joypad state update flag + ld hl, wd730 + res 6, [hl] ; turn on letter printing delay jp BankswitchBack .checkOtherKeys ; check B, SELECT, Up, and Down keys - bit 1,a ; was the B button pressed? - jp nz,ExitListMenu ; if so, exit the menu - bit 2,a ; was the select button pressed? - jp nz,HandleItemListSwapping ; if so, allow the player to swap menu entries - ld b,a - bit 7,b ; was Down pressed? - ld hl,wListScrollOffset - jr z,.upPressed + bit 1, a ; was the B button pressed? + jp nz, ExitListMenu ; if so, exit the menu + bit 2, a ; was the select button pressed? + jp nz, HandleItemListSwapping ; if so, allow the player to swap menu entries + ld b, a + bit 7, b ; was Down pressed? + ld hl, wListScrollOffset + jr z, .upPressed .downPressed - ld a,[hl] + ld a, [hl] add 3 - ld b,a - ld a,[wListCount] + ld b, a + ld a, [wListCount] cp b ; will going down scroll past the Cancel button? - jp c,DisplayListMenuIDLoop + jp c, DisplayListMenuIDLoop inc [hl] ; if not, go down jp DisplayListMenuIDLoop .upPressed - ld a,[hl] + ld a, [hl] and a - jp z,DisplayListMenuIDLoop + jp z, DisplayListMenuIDLoop dec [hl] jp DisplayListMenuIDLoop DisplayChooseQuantityMenu:: ; text box dimensions/coordinates for just quantity coord hl, 15, 9 - ld b,1 ; height - ld c,3 ; width - ld a,[wListMenuID] + ld b, 1 ; height + ld c, 3 ; width + ld a, [wListMenuID] cp PRICEDITEMLISTMENU - jr nz,.drawTextBox + jr nz, .drawTextBox ; text box dimensions/coordinates for quantity and price coord hl, 7, 9 - ld b,1 ; height - ld c,11 ; width + ld b, 1 ; height + ld c, 11 ; width .drawTextBox call TextBoxBorder coord hl, 16, 10 - ld a,[wListMenuID] + ld a, [wListMenuID] cp PRICEDITEMLISTMENU - jr nz,.printInitialQuantity + jr nz, .printInitialQuantity coord hl, 8, 10 .printInitialQuantity - ld de,InitialQuantityText + ld de, InitialQuantityText call PlaceString xor a - ld [wItemQuantity],a ; initialize current quantity to 0 + ld [wItemQuantity], a ; initialize current quantity to 0 jp .incrementQuantity .waitForKeyPressLoop call JoypadLowSensitivity - ld a,[hJoyPressed] ; newly pressed buttons - bit 0,a ; was the A button pressed? - jp nz,.buttonAPressed - bit 1,a ; was the B button pressed? - jp nz,.buttonBPressed - bit 6,a ; was Up pressed? - jr nz,.incrementQuantity - bit 7,a ; was Down pressed? - jr nz,.decrementQuantity + ld a, [hJoyPressed] ; newly pressed buttons + bit 0, a ; was the A button pressed? + jp nz, .buttonAPressed + bit 1, a ; was the B button pressed? + jp nz, .buttonBPressed + bit 6, a ; was Up pressed? + jr nz, .incrementQuantity + bit 7, a ; was Down pressed? + jr nz, .decrementQuantity jr .waitForKeyPressLoop .incrementQuantity - ld a,[wMaxItemQuantity] + ld a, [wMaxItemQuantity] inc a - ld b,a - ld hl,wItemQuantity ; current quantity + ld b, a + ld hl, wItemQuantity ; current quantity inc [hl] - ld a,[hl] + ld a, [hl] cp b - jr nz,.handleNewQuantity + jr nz, .handleNewQuantity ; wrap to 1 if the player goes above the max quantity - ld a,1 - ld [hl],a + ld a, 1 + ld [hl], a jr .handleNewQuantity .decrementQuantity - ld hl,wItemQuantity ; current quantity + ld hl, wItemQuantity ; current quantity dec [hl] - jr nz,.handleNewQuantity + jr nz, .handleNewQuantity ; wrap to the max quantity if the player goes below 1 - ld a,[wMaxItemQuantity] - ld [hl],a + ld a, [wMaxItemQuantity] + ld [hl], a .handleNewQuantity coord hl, 17, 10 - ld a,[wListMenuID] + ld a, [wListMenuID] cp PRICEDITEMLISTMENU - jr nz,.printQuantity + jr nz, .printQuantity .printPrice - ld c,$03 - ld a,[wItemQuantity] - ld b,a - ld hl,hMoney ; total price + ld c, $03 + ld a, [wItemQuantity] + ld b, a + ld hl, hMoney ; total price ; initialize total price to 0 xor a - ld [hli],a - ld [hli],a - ld [hl],a + ld [hli], a + ld [hli], a + ld [hl], a .addLoop ; loop to multiply the individual price by the quantity to get the total price - ld de,hMoney + 2 - ld hl,hItemPrice + 2 + ld de, hMoney + 2 + ld hl, hItemPrice + 2 push bc predef AddBCDPredef ; add the individual price to the current sum pop bc dec b - jr nz,.addLoop - ld a,[hHalveItemPrices] + jr nz, .addLoop + ld a, [hHalveItemPrices] and a ; should the price be halved (for selling items)? - jr z,.skipHalvingPrice + jr z, .skipHalvingPrice xor a - ld [hDivideBCDDivisor],a - ld [hDivideBCDDivisor + 1],a - ld a,$02 - ld [hDivideBCDDivisor + 2],a + ld [hDivideBCDDivisor], a + ld [hDivideBCDDivisor + 1], a + ld a, $02 + ld [hDivideBCDDivisor + 2], a predef DivideBCDPredef3 ; halves the price ; store the halved price - ld a,[hDivideBCDQuotient] - ld [hMoney],a - ld a,[hDivideBCDQuotient + 1] - ld [hMoney + 1],a - ld a,[hDivideBCDQuotient + 2] - ld [hMoney + 2],a + ld a, [hDivideBCDQuotient] + ld [hMoney], a + ld a, [hDivideBCDQuotient + 1] + ld [hMoney + 1], a + ld a, [hDivideBCDQuotient + 2] + ld [hMoney + 2], a .skipHalvingPrice coord hl, 12, 10 - ld de,SpacesBetweenQuantityAndPriceText + ld de, SpacesBetweenQuantityAndPriceText call PlaceString - ld de,hMoney ; total price - ld c,$a3 + ld de, hMoney ; total price + ld c, $a3 call PrintBCDNumber coord hl, 9, 10 .printQuantity - ld de,wItemQuantity ; current quantity + ld de, wItemQuantity ; current quantity lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits call PrintNumber jp .waitForKeyPressLoop .buttonAPressed ; the player chose to make the transaction xor a - ld [wMenuItemToSwap],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 [wMenuItemToSwap],a ; 0 means no item is currently being swapped - ld a,$ff + ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped + ld a, $ff ret InitialQuantityText:: @@ -1678,84 +1678,84 @@ SpacesBetweenQuantityAndPriceText:: db " @" ExitListMenu:: - ld a,[wCurrentMenuItem] - ld [wChosenMenuItem],a - ld a,CANCELLED_MENU - ld [wMenuExitMethod],a - ld [wMenuWatchMovingOutOfBounds],a + ld a, [wCurrentMenuItem] + ld [wChosenMenuItem], a + ld a, CANCELLED_MENU + ld [wMenuExitMethod], a + ld [wMenuWatchMovingOutOfBounds], a xor a - ld [hJoy7],a - ld hl,wd730 - res 6,[hl] + ld [hJoy7], a + ld hl, wd730 + res 6, [hl] call BankswitchBack xor a - ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped + ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped scf ret PrintListMenuEntries:: coord hl, 5, 3 - ld b,9 - ld c,14 + ld b, 9 + ld c, 14 call ClearScreenArea - ld a,[wListPointer] - ld e,a - ld a,[wListPointer + 1] - ld d,a + ld a, [wListPointer] + ld e, a + ld a, [wListPointer + 1] + ld d, a inc de ; de = beginning of list entries - ld a,[wListScrollOffset] - ld c,a - ld a,[wListMenuID] + ld a, [wListScrollOffset] + ld c, a + ld a, [wListMenuID] cp ITEMLISTMENU - ld a,c - jr nz,.skipMultiplying + ld a, c + jr nz, .skipMultiplying ; if it's an item menu ; item entries are 2 bytes long, so multiply by 2 sla a sla c .skipMultiplying add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry coord hl, 6, 4 ; coordinates of first list entry name - ld b,4 ; print 4 names + ld b, 4 ; print 4 names .loop - ld a,b - ld [wWhichPokemon],a - ld a,[de] - ld [wd11e],a + ld a, b + ld [wWhichPokemon], a + ld a, [de] + ld [wd11e], a cp $ff - jp z,.printCancelMenuItem + jp z, .printCancelMenuItem push bc push de push hl push hl push de - ld a,[wListMenuID] + ld a, [wListMenuID] and a - jr z,.pokemonPCMenu + jr z, .pokemonPCMenu cp MOVESLISTMENU - jr z,.movesMenu + jr z, .movesMenu .itemMenu call GetItemName jr .placeNameString .pokemonPCMenu push hl - ld hl,wPartyCount - ld a,[wListPointer] + ld hl, wPartyCount + ld a, [wListPointer] cp l ; is it a list of party pokemon or box pokemon? - ld hl,wPartyMonNicks - jr z,.getPokemonName + ld hl, wPartyMonNicks + jr z, .getPokemonName ld hl, wBoxMonNicks ; box pokemon names .getPokemonName - ld a,[wWhichPokemon] - ld b,a - ld a,4 + ld a, [wWhichPokemon] + ld b, a + ld a, 4 sub b - ld b,a - ld a,[wListScrollOffset] + ld b, a + ld a, [wListScrollOffset] add b call GetPartyMonName pop hl @@ -1766,90 +1766,90 @@ PrintListMenuEntries:: call PlaceString pop de pop hl - ld a,[wPrintItemPrices] + ld a, [wPrintItemPrices] and a ; should prices be printed? - jr z,.skipPrintingItemPrice + jr z, .skipPrintingItemPrice .printItemPrice push hl - ld a,[de] - ld de,ItemPrices - ld [wcf91],a + ld a, [de] + ld de, ItemPrices + ld [wcf91], a call GetItemPrice ; get price pop hl ld bc, SCREEN_WIDTH + 5 ; 1 row down and 5 columns right - add hl,bc - ld c,$a3 ; no leading zeroes, right-aligned, print currency symbol, 3 bytes + add hl, bc + ld c, $a3 ; no leading zeroes, right-aligned, print currency symbol, 3 bytes call PrintBCDNumber .skipPrintingItemPrice - ld a,[wListMenuID] + ld a, [wListMenuID] and a - jr nz,.skipPrintingPokemonLevel + jr nz, .skipPrintingPokemonLevel .printPokemonLevel - ld a,[wd11e] + ld a, [wd11e] push af push hl - ld hl,wPartyCount - ld a,[wListPointer] + ld hl, wPartyCount + ld a, [wListPointer] cp l ; is it a list of party pokemon or box pokemon? - ld a,PLAYER_PARTY_DATA - jr z,.next - ld a,BOX_DATA + ld a, PLAYER_PARTY_DATA + jr z, .next + ld a, BOX_DATA .next - ld [wMonDataLocation],a - ld hl,wWhichPokemon - ld a,[hl] - ld b,a - ld a,$04 + ld [wMonDataLocation], a + ld hl, wWhichPokemon + ld a, [hl] + ld b, a + ld a, $04 sub b - ld b,a - ld a,[wListScrollOffset] + ld b, a + ld a, [wListScrollOffset] add b - ld [hl],a + ld [hl], a call LoadMonData - ld a,[wMonDataLocation] + ld a, [wMonDataLocation] and a ; is it a list of party pokemon or box pokemon? - jr z,.skipCopyingLevel + jr z, .skipCopyingLevel .copyLevel - ld a,[wLoadedMonBoxLevel] - ld [wLoadedMonLevel],a + ld a, [wLoadedMonBoxLevel] + ld [wLoadedMonLevel], a .skipCopyingLevel pop hl - ld bc,$001c - add hl,bc + ld bc, $001c + add hl, bc call PrintLevel pop af - ld [wd11e],a + ld [wd11e], a .skipPrintingPokemonLevel pop hl pop de inc de - ld a,[wListMenuID] + ld a, [wListMenuID] cp ITEMLISTMENU - jr nz,.nextListEntry + jr nz, .nextListEntry .printItemQuantity - ld a,[wd11e] - ld [wcf91],a + ld a, [wd11e] + ld [wcf91], a call IsKeyItem ; check if item is unsellable - ld a,[wIsKeyItem] + ld a, [wIsKeyItem] and a ; is the item unsellable? - jr nz,.skipPrintingItemQuantity ; if so, don't print the quantity + jr nz, .skipPrintingItemQuantity ; if so, don't print the quantity push hl ld bc, SCREEN_WIDTH + 8 ; 1 row down and 8 columns right - add hl,bc - ld a,"×" - ld [hli],a - ld a,[wd11e] + add hl, bc + ld a, "×" + ld [hli], a + ld a, [wd11e] push af - ld a,[de] - ld [wMaxItemQuantity],a + ld a, [de] + ld [wMaxItemQuantity], a push de - ld de,wd11e - ld [de],a + ld de, wd11e + ld [de], a lb bc, 1, 2 call PrintNumber pop de pop af - ld [wd11e],a + ld [wd11e], a pop hl .skipPrintingItemQuantity inc de @@ -1857,29 +1857,29 @@ PrintListMenuEntries:: inc c push bc inc c - ld a,[wMenuItemToSwap] ; 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 + jr z, .nextListEntry sla a cp c ; is it this item? - jr nz,.nextListEntry + jr nz, .nextListEntry dec hl - ld a,$ec ; unfilled right arrow menu cursor to indicate an item being swapped - ld [hli],a + ld a, $ec ; unfilled right arrow menu cursor to indicate an item being swapped + ld [hli], a .nextListEntry - ld bc,2 * SCREEN_WIDTH ; 2 rows - add hl,bc + ld bc, 2 * SCREEN_WIDTH ; 2 rows + add hl, bc pop bc inc c dec b - jp nz,.loop - ld bc,-8 - add hl,bc - ld a,"▼" - ld [hl],a + jp nz, .loop + ld bc, -8 + add hl, bc + ld a, "▼" + ld [hl], a ret .printCancelMenuItem - ld de,ListMenuCancelText + ld de, ListMenuCancelText jp PlaceString ListMenuCancelText:: @@ -1887,27 +1887,27 @@ ListMenuCancelText:: GetMonName:: push hl - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,BANK(MonsterNames) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a - ld a,[wd11e] + ld a, BANK(MonsterNames) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ld a, [wd11e] dec a - ld hl,MonsterNames - ld c,10 - ld b,0 + ld hl, MonsterNames + ld c, 10 + ld b, 0 call AddNTimes - ld de,wcd6d + ld de, wcd6d push de - ld bc,10 + ld bc, 10 call CopyData - ld hl,wcd6d + 10 + ld hl, wcd6d + 10 ld [hl], "@" pop de pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a pop hl ret @@ -1916,22 +1916,22 @@ GetItemName:: ; starting at wcd6d push hl push bc - ld a,[wd11e] + ld a, [wd11e] cp HM_01 ; is this a TM/HM? - jr nc,.Machine + jr nc, .Machine - ld [wd0b5],a - ld a,ITEM_NAME - ld [wNameListType],a - ld a,BANK(ItemNames) - ld [wPredefBank],a + ld [wd0b5], a + ld a, ITEM_NAME + ld [wNameListType], a + ld a, BANK(ItemNames) + ld [wPredefBank], a call GetName jr .Finish .Machine call GetMachineName .Finish - ld de,wcd6d ; pointer to where item name is stored in RAM + ld de, wcd6d ; pointer to where item name is stored in RAM pop bc pop hl ret @@ -1941,48 +1941,48 @@ GetMachineName:: push hl push de push bc - ld a,[wd11e] + ld a, [wd11e] push af cp TM_01 ; is this a TM? [not HM] - jr nc,.WriteTM + jr nc, .WriteTM ; if HM, then write "HM" and add 5 to the item ID, so we can reuse the ; TM printing code add 5 - ld [wd11e],a - ld hl,HiddenPrefix ; points to "HM" - ld bc,2 + ld [wd11e], a + ld hl, HiddenPrefix ; points to "HM" + ld bc, 2 jr .WriteMachinePrefix .WriteTM - ld hl,TechnicalPrefix ; points to "TM" - ld bc,2 + ld hl, TechnicalPrefix ; points to "TM" + ld bc, 2 .WriteMachinePrefix - ld de,wcd6d + ld de, wcd6d call CopyData ; now get the machine number and convert it to text - ld a,[wd11e] + ld a, [wd11e] sub TM_01 - 1 ld b, "0" .FirstDigit sub 10 - jr c,.SecondDigit + jr c, .SecondDigit inc b jr .FirstDigit .SecondDigit add 10 push af - ld a,b - ld [de],a + ld a, b + ld [de], a inc de pop af ld b, "0" add b - ld [de],a + ld [de], a inc de - ld a,"@" - ld [de],a + ld a, "@" + ld [de], a pop af - ld [wd11e],a + ld [wd11e], a pop bc pop de pop hl @@ -1997,7 +1997,7 @@ HiddenPrefix:: ; Input: a = item ID IsItemHM:: cp HM_01 - jr c,.notHM + jr c, .notHM cp TM_01 ret .notHM @@ -2007,8 +2007,8 @@ IsItemHM:: ; sets carry if move is an HM, clears carry if move is not an HM ; Input: a = move ID IsMoveHM:: - ld hl,HMMoves - ld de,1 + ld hl, HMMoves + ld de, 1 jp IsInArray HMMoves:: @@ -2017,22 +2017,22 @@ HMMoves:: GetMoveName:: push hl - ld a,MOVE_NAME - ld [wNameListType],a - ld a,[wd11e] - ld [wd0b5],a - ld a,BANK(MoveNames) - ld [wPredefBank],a + ld a, MOVE_NAME + ld [wNameListType], a + ld a, [wd11e] + ld [wd0b5], a + ld a, BANK(MoveNames) + ld [wPredefBank], a call GetName - ld de,wcd6d ; pointer to where move name is stored in RAM + ld de, wcd6d ; pointer to where move name is stored in RAM pop hl ret ; reloads text box tile patterns, current map view, and tileset tile patterns ReloadMapData:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,[wCurMap] + ld a, [wCurMap] call SwitchToMapRomBank call DisableLCD call LoadTextBoxTilePatterns @@ -2040,34 +2040,34 @@ ReloadMapData:: call LoadTilesetTilePatternData call EnableLCD pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; reloads tileset tile patterns ReloadTilesetTilePatterns:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,[wCurMap] + ld a, [wCurMap] call SwitchToMapRomBank call DisableLCD call LoadTilesetTilePatternData call EnableLCD pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; shows the town map and lets the player choose a destination to fly to ChooseFlyDestination:: - ld hl,wd72e - res 4,[hl] + ld hl, wd72e + res 4, [hl] jpba LoadTownMap_Fly ; causes the text box to close without waiting for a button press after displaying text DisableWaitingAfterTextDisplay:: - ld a,$01 - ld [wDoNotWaitForButtonPressAfterDisplayingText],a + ld a, $01 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret ; uses an item @@ -2076,7 +2076,7 @@ DisableWaitingAfterTextDisplay:: ; [wcf91] = item ID ; OUTPUT: ; [wActionResultOrTookBattleTurn] = success -; 00: unsucessful +; 00: unsuccessful ; 01: successful ; 02: not able to be used right now, no extra menu displayed (only certain items use this) UseItem:: @@ -2091,16 +2091,16 @@ UseItem:: ; OUTPUT: ; clears carry flag if the item is tossed, sets carry flag if not TossItem:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,BANK(TossItem_) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, BANK(TossItem_) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call TossItem_ pop de - ld a,d - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, d + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; checks if an item is a key item @@ -2125,16 +2125,16 @@ IsKeyItem:: ; [wTextBoxID] = text box ID ; b, c = y, x cursor position (TWO_OPTION_MENU only) DisplayTextBoxID:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,BANK(DisplayTextBoxID_) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, BANK(DisplayTextBoxID_) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call DisplayTextBoxID_ pop bc - ld a,b - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; not zero if an NPC movement script is running, the player character is @@ -2672,8 +2672,8 @@ FuncTX_BillsPC:: FuncTX_GameCornerPrizeMenu:: ; XXX find a better name for this function ; special_F7 - ld b,BANK(CeladonPrizeMenu) - ld hl,CeladonPrizeMenu + ld b, BANK(CeladonPrizeMenu) + ld hl, CeladonPrizeMenu bankswitchAndContinue:: call Bankswitch jp HoldTextDisplayOpen ; continue to main text-engine function @@ -2697,7 +2697,7 @@ IsItemInBag:: ; else reset zero flag ; related to Pokémon Tower and ghosts predef GetQuantityOfItemInBag - ld a,b + ld a, b and a ret @@ -2731,32 +2731,32 @@ SetSpriteImageIndexAfterSettingFacingDirection:: ; [wCoordIndex] = if there is match, the matching array index ; sets carry if the coordinates are in the array, clears carry if not ArePlayerCoordsInArray:: - ld a,[wYCoord] - ld b,a - ld a,[wXCoord] - ld c,a + ld a, [wYCoord] + ld b, a + ld a, [wXCoord] + ld c, a ; fallthrough CheckCoords:: xor a - ld [wCoordIndex],a + ld [wCoordIndex], a .loop - ld a,[hli] + ld a, [hli] cp $ff ; reached terminator? - jr z,.notInArray + jr z, .notInArray push hl - ld hl,wCoordIndex + ld hl, wCoordIndex inc [hl] pop hl .compareYCoord cp b - jr z,.compareXCoord + jr z, .compareXCoord inc hl jr .loop .compareXCoord - ld a,[hli] + ld a, [hli] cp c - jr nz,.loop + jr nz, .loop .inArray scf ret @@ -2850,31 +2850,31 @@ SetSpriteMovementBytesToFE:: SetSpriteMovementBytesToFF:: push hl call GetSpriteMovementByte1Pointer - ld [hl],$FF + ld [hl], $FF call GetSpriteMovementByte2Pointer - ld [hl],$FF ; prevent person from walking? + ld [hl], $FF ; prevent person from walking? pop hl ret ; returns the sprite movement byte 1 pointer for sprite [H_SPRITEINDEX] in hl GetSpriteMovementByte1Pointer:: - ld h,$C2 - ld a,[H_SPRITEINDEX] + ld h, $C2 + ld a, [H_SPRITEINDEX] swap a add 6 - ld l,a + ld l, a ret ; returns the sprite movement byte 2 pointer for sprite [H_SPRITEINDEX] in hl GetSpriteMovementByte2Pointer:: push de - ld hl,wMapSpriteData - ld a,[H_SPRITEINDEX] + ld hl, wMapSpriteData + ld a, [H_SPRITEINDEX] dec a add a - ld d,0 - ld e,a - add hl,de + ld d, 0 + ld e, a + add hl, de pop de ret @@ -2934,37 +2934,37 @@ HasEnoughCoins:: BankswitchHome:: ; switches to bank # in a ; Only use this when in the home bank! - ld [wBankswitchHomeTemp],a - ld a,[H_LOADEDROMBANK] - ld [wBankswitchHomeSavedROMBank],a - ld a,[wBankswitchHomeTemp] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [wBankswitchHomeTemp], a + ld a, [H_LOADEDROMBANK] + ld [wBankswitchHomeSavedROMBank], a + ld a, [wBankswitchHomeTemp] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret BankswitchBack:: ; returns from BankswitchHome - ld a,[wBankswitchHomeSavedROMBank] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, [wBankswitchHomeSavedROMBank] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret Bankswitch:: ; self-contained bankswitch, use this when not in the home bank ; switches to the bank in b - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,b - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a - ld bc,.Return + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ld bc, .Return push bc - jp [hl] + jp hl .Return pop bc - ld a,b - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; displays yes/no choice @@ -3026,31 +3026,31 @@ MoveSprite_:: push bc call GetSpriteMovementByte1Pointer xor a - ld [hl],a - ld hl,wNPCMovementDirections - ld c,0 + ld [hl], a + ld hl, wNPCMovementDirections + ld c, 0 .loop - ld a,[de] - ld [hli],a + ld a, [de] + ld [hli], a inc de inc c cp $FF ; have we reached the end of the movement data? - jr nz,.loop + jr nz, .loop - ld a,c - ld [wNPCNumScriptedSteps],a ; number of steps taken + ld a, c + ld [wNPCNumScriptedSteps], a ; number of steps taken pop bc - ld hl,wd730 - set 0,[hl] + ld hl, wd730 + set 0, [hl] pop hl xor a - ld [wOverrideSimulatedJoypadStatesMask],a - ld [wSimulatedJoypadStatesEnd],a + ld [wOverrideSimulatedJoypadStatesMask], a + ld [wSimulatedJoypadStatesEnd], a dec a - ld [wJoyIgnore],a - ld [wWastedByteCD3A],a + ld [wJoyIgnore], a + ld [wWastedByteCD3A], a ret ; divides [hDividend2] by [hDivisor2] and stores the quotient in [hQuotient2] @@ -3191,7 +3191,7 @@ DelayFrames:: ; wait c frames call DelayFrame dec c - jr nz,DelayFrames + jr nz, DelayFrames ret PlaySoundWaitForCurrent:: @@ -3279,82 +3279,82 @@ GetName:: ; [wPredefBank] = bank of list ; ; returns pointer to name in de - ld a,[wd0b5] - ld [wd11e],a + ld a, [wd0b5] + ld [wd11e], a ; TM names are separate from item names. ; BUG: This applies to all names instead of just items. cp HM_01 jp nc, GetMachineName - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af push hl push bc push de - ld a,[wNameListType] ;List3759_entrySelector + ld a, [wNameListType] ;List3759_entrySelector dec a - jr nz,.otherEntries + jr nz, .otherEntries ;1 = MON_NAMES call GetMonName - ld hl,NAME_LENGTH - add hl,de - ld e,l - ld d,h + ld hl, NAME_LENGTH + add hl, de + ld e, l + ld d, h jr .gotPtr .otherEntries ;2-7 = OTHER ENTRIES - ld a,[wPredefBank] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a - ld a,[wNameListType] ;VariousNames' entryID + ld a, [wPredefBank] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ld a, [wNameListType] ;VariousNames' entryID dec a add a - ld d,0 - ld e,a - jr nc,.skip + ld d, 0 + ld e, a + jr nc, .skip inc d .skip - ld hl,NamePointers - add hl,de - ld a,[hli] - ld [$ff96],a - ld a,[hl] - ld [$ff95],a - ld a,[$ff95] - ld h,a - ld a,[$ff96] - ld l,a - ld a,[wd0b5] - ld b,a - ld c,0 + ld hl, NamePointers + add hl, de + ld a, [hli] + ld [$ff96], a + ld a, [hl] + ld [$ff95], a + ld a, [$ff95] + ld h, a + ld a, [$ff96] + ld l, a + ld a, [wd0b5] + ld b, a + ld c, 0 .nextName - ld d,h - ld e,l + ld d, h + ld e, l .nextChar - ld a,[hli] + ld a, [hli] cp "@" - jr nz,.nextChar + jr nz, .nextChar inc c ;entry counter - ld a,b ;wanted entry + ld a, b ;wanted entry cp c - jr nz,.nextName - ld h,d - ld l,e - ld de,wcd6d - ld bc,$0014 + jr nz, .nextName + ld h, d + ld l, e + ld de, wcd6d + ld bc, $0014 call CopyData .gotPtr - ld a,e - ld [wUnusedCF8D],a - ld a,d - ld [wUnusedCF8D + 1],a + ld a, e + ld [wUnusedCF8D], a + ld a, d + ld [wUnusedCF8D + 1], a pop de pop bc pop hl pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret GetItemPrice:: @@ -3419,7 +3419,7 @@ CopyString:: ; this function is used when lower button sensitivity is wanted (e.g. menus) ; 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 +; there are essentially three modes of operation ; 1. Get newly pressed buttons only ; ([hJoy7] == 0, [hJoy6] == any) ; Just copies [hJoyPressed] to [hJoy5]. @@ -3433,41 +3433,41 @@ CopyString:: ; ([hJoy7] == 1, [hJoy6] == 0) JoypadLowSensitivity:: call Joypad - ld a,[hJoy7] ; 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 + ld a, [hJoyPressed] ; newly pressed buttons + jr z, .storeButtonState + ld a, [hJoyHeld] ; all currently pressed buttons .storeButtonState - ld [hJoy5],a - ld a,[hJoyPressed] ; newly pressed buttons + ld [hJoy5], a + ld a, [hJoyPressed] ; newly pressed buttons and a ; have any buttons been newly pressed since last check? - jr z,.noNewlyPressedButtons + jr z, .noNewlyPressedButtons .newlyPressedButtons - ld a,30 ; half a second delay - ld [H_FRAMECOUNTER],a + ld a, 30 ; half a second delay + ld [H_FRAMECOUNTER], a ret .noNewlyPressedButtons - ld a,[H_FRAMECOUNTER] + ld a, [H_FRAMECOUNTER] and a ; is the delay over? - jr z,.delayOver + jr z, .delayOver .delayNotOver xor a - ld [hJoy5],a ; report no buttons as pressed + ld [hJoy5], a ; report no buttons as pressed ret .delayOver ; if [hJoy6] = 0 and A or B is pressed, report no buttons as pressed - ld a,[hJoyHeld] + ld a, [hJoyHeld] and A_BUTTON | B_BUTTON - jr z,.setShortDelay - ld a,[hJoy6] ; flag + jr z, .setShortDelay + ld a, [hJoy6] ; flag and a - jr nz,.setShortDelay + jr nz, .setShortDelay xor a - ld [hJoy5],a + ld [hJoy5], a .setShortDelay - ld a,5 ; 1/12 of a second delay - ld [H_FRAMECOUNTER],a + ld a, 5 ; 1/12 of a second delay + ld [H_FRAMECOUNTER], a ret WaitForTextScrollButtonPress:: @@ -3540,15 +3540,15 @@ Divide:: push hl push de push bc - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,Bank(_Divide) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, Bank(_Divide) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call _Divide pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a pop bc pop de pop hl @@ -3558,42 +3558,42 @@ Divide:: ; screen unless the player presses the A/B button or the delay is turned off ; through the [wd730] or [wLetterPrintingDelayFlags] flags. PrintLetterDelay:: - ld a,[wd730] - bit 6,a + ld a, [wd730] + bit 6, a ret nz - ld a,[wLetterPrintingDelayFlags] - bit 1,a + ld a, [wLetterPrintingDelayFlags] + bit 1, a ret z push hl push de push bc - ld a,[wLetterPrintingDelayFlags] - bit 0,a - jr z,.waitOneFrame - ld a,[wOptions] + ld a, [wLetterPrintingDelayFlags] + bit 0, a + jr z, .waitOneFrame + ld a, [wOptions] and $f - ld [H_FRAMECOUNTER],a + ld [H_FRAMECOUNTER], a jr .checkButtons .waitOneFrame - ld a,1 - ld [H_FRAMECOUNTER],a + ld a, 1 + ld [H_FRAMECOUNTER], a .checkButtons call Joypad - ld a,[hJoyHeld] + ld a, [hJoyHeld] .checkAButton - bit 0,a ; is the A button pressed? - jr z,.checkBButton + bit 0, a ; is the A button pressed? + jr z, .checkBButton jr .endWait .checkBButton - bit 1,a ; is the B button pressed? - jr z,.buttonsNotPressed + bit 1, a ; is the B button pressed? + jr z, .buttonsNotPressed .endWait call DelayFrame jr .done .buttonsNotPressed ; if neither A nor B is pressed - ld a,[H_FRAMECOUNTER] + ld a, [H_FRAMECOUNTER] and a - jr nz,.checkButtons + jr nz, .checkButtons .done pop bc pop de @@ -3604,15 +3604,15 @@ PrintLetterDelay:: ; In other words, the source data is from hl up to but not including bc, ; and the destination is de. CopyDataUntil:: - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de - ld a,h + ld a, h cp b - jr nz,CopyDataUntil - ld a,l + jr nz, CopyDataUntil + ld a, l cp c - jr nz,CopyDataUntil + jr nz, CopyDataUntil ret ; Function to remove a pokemon from the party or the current box. @@ -3767,7 +3767,7 @@ CalcStat:: ld a, b add e jr nc, .noCarry2 - inc d ; da = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4 + inc d ; de = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4 .noCarry2 ld [H_MULTIPLICAND+2], a ld a, d @@ -3875,21 +3875,21 @@ AddNTimes:: and a ret z .loop - add hl,bc + add hl, bc dec a - jr nz,.loop + jr nz, .loop ret ; Compare strings, c bytes in length, at de and hl. ; Often used to compare big endian numbers in battle calculations. StringCmp:: - ld a,[de] + ld a, [de] cp [hl] ret nz inc de inc hl dec c - jr nz,StringCmp + jr nz, StringCmp ret ; INPUT: @@ -3898,228 +3898,228 @@ StringCmp:: ; c = X coordinate of upper left corner of sprite ; de = base address of 4 tile number and attribute pairs WriteOAMBlock:: - ld h,wOAMBuffer / $100 + ld h, wOAMBuffer / $100 swap a ; multiply by 16 - ld l,a + ld l, a call .writeOneEntry ; upper left push bc - ld a,8 + ld a, 8 add c - ld c,a + ld c, a call .writeOneEntry ; upper right pop bc - ld a,8 + ld a, 8 add b - ld b,a + ld b, a call .writeOneEntry ; lower left - ld a,8 + ld a, 8 add c - ld c,a + ld c, a ; lower right .writeOneEntry - ld [hl],b ; Y coordinate + ld [hl], b ; Y coordinate inc hl - ld [hl],c ; X coordinate + ld [hl], c ; X coordinate inc hl - ld a,[de] ; tile number + ld a, [de] ; tile number inc de - ld [hli],a - ld a,[de] ; attribute + ld [hli], a + ld a, [de] ; attribute inc de - ld [hli],a + ld [hli], a ret HandleMenuInput:: xor a - ld [wPartyMenuAnimMonEnabled],a + ld [wPartyMenuAnimMonEnabled], a HandleMenuInput_:: - ld a,[H_DOWNARROWBLINKCNT1] + ld a, [H_DOWNARROWBLINKCNT1] push af - ld a,[H_DOWNARROWBLINKCNT2] + ld a, [H_DOWNARROWBLINKCNT2] push af ; save existing values on stack xor a - ld [H_DOWNARROWBLINKCNT1],a ; blinking down arrow timing value 1 - ld a,6 - ld [H_DOWNARROWBLINKCNT2],a ; blinking down arrow timing value 2 + ld [H_DOWNARROWBLINKCNT1], a ; blinking down arrow timing value 1 + ld a, 6 + ld [H_DOWNARROWBLINKCNT2], a ; blinking down arrow timing value 2 .loop1 xor a - ld [wAnimCounter],a ; counter for pokemon shaking animation + ld [wAnimCounter], a ; counter for pokemon shaking animation call PlaceMenuCursor call Delay3 .loop2 push hl - ld a,[wPartyMenuAnimMonEnabled] + ld a, [wPartyMenuAnimMonEnabled] and a ; is it a pokemon selection menu? - jr z,.getJoypadState + jr z, .getJoypadState callba AnimatePartyMon ; shake mini sprite of selected pokemon .getJoypadState pop hl call JoypadLowSensitivity - ld a,[hJoy5] + ld a, [hJoy5] and a ; was a key pressed? - jr nz,.keyPressed + jr nz, .keyPressed push hl coord hl, 18, 11 ; coordinates of blinking down arrow in some menus call HandleDownArrowBlinkTiming ; blink down arrow (if any) pop hl - ld a,[wMenuJoypadPollCount] + ld a, [wMenuJoypadPollCount] dec a - jr z,.giveUpWaiting + jr z, .giveUpWaiting jr .loop2 .giveUpWaiting ; if a key wasn't pressed within the specified number of checks pop af - ld [H_DOWNARROWBLINKCNT2],a + ld [H_DOWNARROWBLINKCNT2], a pop af - ld [H_DOWNARROWBLINKCNT1],a ; restore previous values + ld [H_DOWNARROWBLINKCNT1], a ; restore previous values xor a - ld [wMenuWrappingEnabled],a ; disable menu wrapping + ld [wMenuWrappingEnabled], a ; disable menu wrapping ret .keyPressed xor a - ld [wCheckFor180DegreeTurn],a - ld a,[hJoy5] - ld b,a - bit 6,a ; pressed Up key? - jr z,.checkIfDownPressed + ld [wCheckFor180DegreeTurn], a + ld a, [hJoy5] + ld b, a + bit 6, a ; pressed Up key? + jr z, .checkIfDownPressed .upPressed - ld a,[wCurrentMenuItem] ; selected menu item + ld a, [wCurrentMenuItem] ; selected menu item and a ; already at the top of the menu? - jr z,.alreadyAtTop + jr z, .alreadyAtTop .notAtTop dec a - ld [wCurrentMenuItem],a ; move selected menu item up one space + ld [wCurrentMenuItem], a ; move selected menu item up one space jr .checkOtherKeys .alreadyAtTop - ld a,[wMenuWrappingEnabled] + ld a, [wMenuWrappingEnabled] and a ; is wrapping around enabled? - jr z,.noWrappingAround - ld a,[wMaxMenuItem] - ld [wCurrentMenuItem],a ; wrap to the bottom of the menu + jr z, .noWrappingAround + ld a, [wMaxMenuItem] + ld [wCurrentMenuItem], a ; wrap to the bottom of the menu jr .checkOtherKeys .checkIfDownPressed - bit 7,a - jr z,.checkOtherKeys + bit 7, a + jr z, .checkOtherKeys .downPressed - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] inc a - ld c,a - ld a,[wMaxMenuItem] + ld c, a + ld a, [wMaxMenuItem] cp c - jr nc,.notAtBottom + jr nc, .notAtBottom .alreadyAtBottom - ld a,[wMenuWrappingEnabled] + ld a, [wMenuWrappingEnabled] and a ; is wrapping around enabled? - jr z,.noWrappingAround - ld c,$00 ; wrap from bottom to top + jr z, .noWrappingAround + ld c, $00 ; wrap from bottom to top .notAtBottom - ld a,c - ld [wCurrentMenuItem],a + ld a, c + ld [wCurrentMenuItem], a .checkOtherKeys - ld a,[wMenuWatchedKeys] + ld a, [wMenuWatchedKeys] and b ; does the menu care about any of the pressed keys? - jp z,.loop1 + jp z, .loop1 .checkIfAButtonOrBButtonPressed - ld a,[hJoy5] + ld a, [hJoy5] and A_BUTTON | B_BUTTON - jr z,.skipPlayingSound + jr z, .skipPlayingSound .AButtonOrBButtonPressed push hl - ld hl,wFlags_0xcd60 - bit 5,[hl] + ld hl, wFlags_0xcd60 + bit 5, [hl] pop hl - jr nz,.skipPlayingSound - ld a,SFX_PRESS_AB + jr nz, .skipPlayingSound + ld a, SFX_PRESS_AB call PlaySound .skipPlayingSound pop af - ld [H_DOWNARROWBLINKCNT2],a + ld [H_DOWNARROWBLINKCNT2], a pop af - ld [H_DOWNARROWBLINKCNT1],a ; restore previous values + ld [H_DOWNARROWBLINKCNT1], a ; restore previous values xor a - ld [wMenuWrappingEnabled],a ; disable menu wrapping - ld a,[hJoy5] + ld [wMenuWrappingEnabled], a ; disable menu wrapping + ld a, [hJoy5] ret .noWrappingAround - ld a,[wMenuWatchMovingOutOfBounds] + ld a, [wMenuWatchMovingOutOfBounds] and a ; should we return if the user tried to go past the top or bottom? - jr z,.checkOtherKeys + jr z, .checkOtherKeys jr .checkIfAButtonOrBButtonPressed PlaceMenuCursor:: - ld a,[wTopMenuItemY] + ld a, [wTopMenuItemY] and a ; is the y coordinate 0? - jr z,.adjustForXCoord + jr z, .adjustForXCoord coord hl, 0, 0 - ld bc,SCREEN_WIDTH + ld bc, SCREEN_WIDTH .topMenuItemLoop - add hl,bc + add hl, bc dec a - jr nz,.topMenuItemLoop + jr nz, .topMenuItemLoop .adjustForXCoord - ld a,[wTopMenuItemX] - ld b,0 - ld c,a - add hl,bc + ld a, [wTopMenuItemX] + ld b, 0 + ld c, a + add hl, bc push hl - ld a,[wLastMenuItem] + ld a, [wLastMenuItem] and a ; was the previous menu id 0? - jr z,.checkForArrow1 + jr z, .checkForArrow1 push af - ld a,[hFlags_0xFFF6] - bit 1,a ; is the menu double spaced? - jr z,.doubleSpaced1 - ld bc,20 + ld a, [hFlags_0xFFF6] + bit 1, a ; is the menu double spaced? + jr z, .doubleSpaced1 + ld bc, 20 jr .getOldMenuItemScreenPosition .doubleSpaced1 - ld bc,40 + ld bc, 40 .getOldMenuItemScreenPosition pop af .oldMenuItemLoop - add hl,bc + add hl, bc dec a - jr nz,.oldMenuItemLoop + jr nz, .oldMenuItemLoop .checkForArrow1 - ld a,[hl] - cp a,"▶" ; was an arrow next to the previously selected menu item? - jr nz,.skipClearingArrow + ld a, [hl] + cp "▶" ; was an arrow next to the previously selected menu item? + jr nz, .skipClearingArrow .clearArrow - ld a,[wTileBehindCursor] - ld [hl],a + ld a, [wTileBehindCursor] + ld [hl], a .skipClearingArrow pop hl - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - jr z,.checkForArrow2 + jr z, .checkForArrow2 push af - ld a,[hFlags_0xFFF6] - bit 1,a ; is the menu double spaced? - jr z,.doubleSpaced2 - ld bc,20 + ld a, [hFlags_0xFFF6] + bit 1, a ; is the menu double spaced? + jr z, .doubleSpaced2 + ld bc, 20 jr .getCurrentMenuItemScreenPosition .doubleSpaced2 - ld bc,40 + ld bc, 40 .getCurrentMenuItemScreenPosition pop af .currentMenuItemLoop - add hl,bc + add hl, bc dec a - jr nz,.currentMenuItemLoop + jr nz, .currentMenuItemLoop .checkForArrow2 - ld a,[hl] + ld a, [hl] cp "▶" ; has the right arrow already been placed? - jr z,.skipSavingTile ; if so, don't lose the saved tile - ld [wTileBehindCursor],a ; save tile before overwriting with right arrow + jr z, .skipSavingTile ; if so, don't lose the saved tile + ld [wTileBehindCursor], a ; save tile before overwriting with right arrow .skipSavingTile - ld a,"▶" ; place right arrow - ld [hl],a - ld a,l - ld [wMenuCursorLocation],a - ld a,h - ld [wMenuCursorLocation + 1],a - ld a,[wCurrentMenuItem] - ld [wLastMenuItem],a + ld a, "▶" ; place right arrow + ld [hl], a + ld a, l + ld [wMenuCursorLocation], a + ld a, h + ld [wMenuCursorLocation + 1], a + ld a, [wCurrentMenuItem] + ld [wLastMenuItem], a ret ; This is used to mark a menu cursor other than the one currently being @@ -4127,22 +4127,22 @@ PlaceMenuCursor:: ; the menu cursor in the parent menu. In the case of swapping items in list, ; this is used to mark the item that was first chosen to be swapped. PlaceUnfilledArrowMenuCursor:: - ld b,a - ld a,[wMenuCursorLocation] - ld l,a - ld a,[wMenuCursorLocation + 1] - ld h,a - ld [hl],$ec ; outline of right arrow - ld a,b + ld b, a + ld a, [wMenuCursorLocation] + ld l, a + ld a, [wMenuCursorLocation + 1] + ld h, a + ld [hl], $ec ; outline of right arrow + ld a, b ret ; Replaces the menu cursor with a blank space. EraseMenuCursor:: - ld a,[wMenuCursorLocation] - ld l,a - ld a,[wMenuCursorLocation + 1] - ld h,a - ld [hl]," " + ld a, [wMenuCursorLocation] + ld l, a + ld a, [wMenuCursorLocation + 1] + ld h, a + ld [hl], " " ret ; This toggles a blinking down arrow at hl on and off after a delay has passed. @@ -4154,44 +4154,44 @@ EraseMenuCursor:: ; That allows this to be called without worrying about if a down arrow should ; be blinking. HandleDownArrowBlinkTiming:: - ld a,[hl] - ld b,a - ld a,"▼" + ld a, [hl] + ld b, a + ld a, "▼" cp b - jr nz,.downArrowOff + jr nz, .downArrowOff .downArrowOn - ld a,[H_DOWNARROWBLINKCNT1] + ld a, [H_DOWNARROWBLINKCNT1] dec a - ld [H_DOWNARROWBLINKCNT1],a + ld [H_DOWNARROWBLINKCNT1], a ret nz - ld a,[H_DOWNARROWBLINKCNT2] + ld a, [H_DOWNARROWBLINKCNT2] dec a - ld [H_DOWNARROWBLINKCNT2],a + ld [H_DOWNARROWBLINKCNT2], a ret nz - ld a," " - ld [hl],a - ld a,$ff - ld [H_DOWNARROWBLINKCNT1],a - ld a,$06 - ld [H_DOWNARROWBLINKCNT2],a + ld a, " " + ld [hl], a + ld a, $ff + ld [H_DOWNARROWBLINKCNT1], a + ld a, $06 + ld [H_DOWNARROWBLINKCNT2], a ret .downArrowOff - ld a,[H_DOWNARROWBLINKCNT1] + ld a, [H_DOWNARROWBLINKCNT1] and a ret z dec a - ld [H_DOWNARROWBLINKCNT1],a + ld [H_DOWNARROWBLINKCNT1], a ret nz dec a - ld [H_DOWNARROWBLINKCNT1],a - ld a,[H_DOWNARROWBLINKCNT2] + ld [H_DOWNARROWBLINKCNT1], a + ld a, [H_DOWNARROWBLINKCNT2] dec a - ld [H_DOWNARROWBLINKCNT2],a + ld [H_DOWNARROWBLINKCNT2], a ret nz - ld a,$06 - ld [H_DOWNARROWBLINKCNT2],a - ld a,"▼" - ld [hl],a + ld a, $06 + ld [H_DOWNARROWBLINKCNT2], a + ld a, "▼" + ld [hl], a ret ; The following code either enables or disables the automatic drawing of @@ -4203,19 +4203,19 @@ EnableAutoTextBoxDrawing:: jr AutoTextBoxDrawingCommon DisableAutoTextBoxDrawing:: - ld a,$01 + ld a, $01 AutoTextBoxDrawingCommon:: - ld [wAutoTextBoxDrawingControl],a + ld [wAutoTextBoxDrawingControl], a xor a - ld [wDoNotWaitForButtonPressAfterDisplayingText],a ; make DisplayTextID wait for button press + ld [wDoNotWaitForButtonPressAfterDisplayingText], a ; make DisplayTextID wait for button press ret PrintText:: ; Print text hl at (1, 14). push hl - ld a,MESSAGE_BOX - ld [wTextBoxID],a + ld a, MESSAGE_BOX + ld [wTextBoxID], a call DisplayTextBoxID call UpdateSprites call Delay3 @@ -4459,7 +4459,7 @@ CallFunctionInTable:: ld l, a ld de, .returnAddress push de - jp [hl] + jp hl .returnAddress pop bc pop de @@ -4525,16 +4525,16 @@ GBPalNormal:: GBPalWhiteOut:: ; White out all palettes. xor a - ld [rBGP],a - ld [rOBP0],a - ld [rOBP1],a + ld [rBGP], a + ld [rOBP0], a + ld [rOBP1], a ret RunDefaultPaletteCommand:: - ld b,$ff + ld b, $ff RunPaletteCommand:: - ld a,[wOnSGB] + ld a, [wOnSGB] and a ret z predef_jump _RunPaletteCommand @@ -4584,7 +4584,7 @@ GiveItem:: ld [wcf91], a ld a, c ld [wItemQuantity], a - ld hl,wNumBagItems + ld hl, wNumBagItems call AddItemToInventory ret nc call GetItemName @@ -4642,7 +4642,7 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ld [H_LOADEDROMBANK], a ld de, .returnAddress push de - jp [hl] + jp hl .returnAddress xor a jr .done diff --git a/home/copy2.asm b/home/copy2.asm index 830440b0..d4f35668 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -1,62 +1,62 @@ FarCopyData2:: ; Identical to FarCopyData, but uses hROMBankTemp ; as temp space instead of wBuffer. - ld [hROMBankTemp],a - ld a,[H_LOADEDROMBANK] + ld [hROMBankTemp], a + ld a, [H_LOADEDROMBANK] push af - ld a,[hROMBankTemp] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, [hROMBankTemp] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a call CopyData pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret FarCopyData3:: ; Copy bc bytes from a:de to hl. - ld [hROMBankTemp],a - ld a,[H_LOADEDROMBANK] + ld [hROMBankTemp], a + ld a, [H_LOADEDROMBANK] push af - ld a,[hROMBankTemp] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, [hROMBankTemp] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a push hl push de push de - ld d,h - ld e,l + ld d, h + ld e, l pop hl call CopyData pop de pop hl pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + 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 [hROMBankTemp],a - ld a,[H_LOADEDROMBANK] + ld [hROMBankTemp], a + ld a, [H_LOADEDROMBANK] push af - ld a,[hROMBankTemp] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, [hROMBankTemp] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de - ld [de],a + ld [de], a inc de dec bc - ld a,c + ld a, c or b - jr nz,.loop + jr nz, .loop pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret CopyVideoData:: diff --git a/home/overworld.asm b/home/overworld.asm index 78683e0a..655a41e6 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -43,152 +43,152 @@ OverworldLoop:: OverworldLoopLessDelay:: call DelayFrame call LoadGBPal - ld a,[wd736] - bit 6,a ; jumping down a ledge? + ld a, [wd736] + bit 6, a ; jumping down a ledge? call nz, HandleMidJump - ld a,[wWalkCounter] + ld a, [wWalkCounter] and a - jp nz,.moveAhead ; if the player sprite has not yet completed the walking animation + 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,[wSafariZoneGameOver] + ld a, [wSafariZoneGameOver] and a - jp nz,WarpFound2 - ld hl,wd72d - bit 3,[hl] - res 3,[hl] - jp nz,WarpFound2 - ld a,[wd732] + jp nz, WarpFound2 + ld hl, wd72d + bit 3, [hl] + res 3, [hl] + jp nz, WarpFound2 + ld a, [wd732] and 1 << 4 | 1 << 3 ; fly warp or dungeon warp - jp nz,HandleFlyWarpOrDungeonWarp - ld a,[wCurOpponent] + jp nz, HandleFlyWarpOrDungeonWarp + ld a, [wCurOpponent] and a - jp nz,.newBattle - ld a,[wd730] - bit 7,a ; are we simulating button presses? - jr z,.notSimulating - ld a,[hJoyHeld] + jp nz, .newBattle + ld a, [wd730] + bit 7, a ; are we simulating button presses? + jr z, .notSimulating + ld a, [hJoyHeld] jr .checkIfStartIsPressed .notSimulating - ld a,[hJoyPressed] + ld a, [hJoyPressed] .checkIfStartIsPressed - bit 3,a ; start button - jr z,.startButtonNotPressed + bit 3, a ; start button + jr z, .startButtonNotPressed ; if START is pressed xor a - ld [hSpriteIndexOrTextID],a ; start menu text ID + ld [hSpriteIndexOrTextID], a ; start menu text ID jp .displayDialogue .startButtonNotPressed - bit 0,a ; A button - jp z,.checkIfDownButtonIsPressed + bit 0, a ; A button + jp z, .checkIfDownButtonIsPressed ; if A is pressed - ld a,[wd730] - bit 2,a - jp nz,.noDirectionButtonsPressed + ld a, [wd730] + bit 2, a + jp nz, .noDirectionButtonsPressed call IsPlayerCharacterBeingControlledByGame - jr nz,.checkForOpponent + jr nz, .checkForOpponent call CheckForHiddenObjectOrBookshelfOrCardKeyDoor - ld a,[$ffeb] + ld a, [$ffeb] and a - jp z,OverworldLoop ; jump if a hidden object or bookshelf was found, but not if a card key door was found + 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] + ld a, [hSpriteIndexOrTextID] and a - jp z,OverworldLoop + jp z, OverworldLoop .displayDialogue predef GetTileAndCoordsInFrontOfPlayer call UpdateSprites - ld a,[wFlags_0xcd60] - bit 2,a - jr nz,.checkForOpponent - bit 0,a - jr nz,.checkForOpponent + ld a, [wFlags_0xcd60] + bit 2, a + jr nz, .checkForOpponent + bit 0, a + jr nz, .checkForOpponent aCoord 8, 9 - ld [wTilePlayerStandingOn],a ; unused? + ld [wTilePlayerStandingOn], a ; unused? call DisplayTextID ; display either the start menu or the NPC/sign text - ld a,[wEnteringCableClub] + ld a, [wEnteringCableClub] and a - jr z,.checkForOpponent + jr z, .checkForOpponent dec a - ld a,0 - ld [wEnteringCableClub],a - jr z,.changeMap + ld a, 0 + ld [wEnteringCableClub], a + jr z, .changeMap ; XXX can this code be reached? predef LoadSAV - ld a,[wCurMap] - ld [wDestinationMap],a + ld a, [wCurMap] + ld [wDestinationMap], a call SpecialWarpIn - ld a,[wCurMap] + ld a, [wCurMap] call SwitchToMapRomBank ; switch to the ROM bank of the current map - ld hl,wCurMapTileset - set 7,[hl] + ld hl, wCurMapTileset + set 7, [hl] .changeMap jp EnterMap .checkForOpponent - ld a,[wCurOpponent] + ld a, [wCurOpponent] and a - jp nz,.newBattle + jp nz, .newBattle jp OverworldLoop .noDirectionButtonsPressed - ld hl,wFlags_0xcd60 - res 2,[hl] + ld hl, wFlags_0xcd60 + res 2, [hl] call UpdateSprites ld a, 1 - ld [wCheckFor180DegreeTurn],a - ld a,[wPlayerMovingDirection] ; the direction that was pressed last time + ld [wCheckFor180DegreeTurn], a + ld a, [wPlayerMovingDirection] ; the direction that was pressed last time and a - jp z,OverworldLoop + jp z, OverworldLoop ; if a direction was pressed last time - ld [wPlayerLastStopDirection],a ; save the last direction + ld [wPlayerLastStopDirection], a ; save the last direction xor a - ld [wPlayerMovingDirection],a ; zero the direction + ld [wPlayerMovingDirection], a ; zero the direction jp OverworldLoop .checkIfDownButtonIsPressed - ld a,[hJoyHeld] ; current joypad state - bit 7,a ; down button - jr z,.checkIfUpButtonIsPressed - ld a,1 - ld [wSpriteStateData1 + 3],a ; delta Y - ld a,PLAYER_DIR_DOWN + ld a, [hJoyHeld] ; current joypad state + bit 7, a ; down button + jr z, .checkIfUpButtonIsPressed + ld a, 1 + ld [wSpriteStateData1 + 3], a ; delta Y + ld a, PLAYER_DIR_DOWN jr .handleDirectionButtonPress .checkIfUpButtonIsPressed - bit 6,a ; up button - jr z,.checkIfLeftButtonIsPressed - ld a,-1 - ld [wSpriteStateData1 + 3],a ; delta Y - ld a,PLAYER_DIR_UP + bit 6, a ; up button + jr z, .checkIfLeftButtonIsPressed + ld a, -1 + ld [wSpriteStateData1 + 3], a ; delta Y + ld a, PLAYER_DIR_UP jr .handleDirectionButtonPress .checkIfLeftButtonIsPressed - bit 5,a ; left button - jr z,.checkIfRightButtonIsPressed - ld a,-1 - ld [wSpriteStateData1 + 5],a ; delta X - ld a,PLAYER_DIR_LEFT + bit 5, a ; left button + jr z, .checkIfRightButtonIsPressed + ld a, -1 + ld [wSpriteStateData1 + 5], a ; delta X + ld a, PLAYER_DIR_LEFT jr .handleDirectionButtonPress .checkIfRightButtonIsPressed - bit 4,a ; right button - jr z,.noDirectionButtonsPressed + bit 4, a ; right button + jr z, .noDirectionButtonsPressed ld a, 1 - ld [wSpriteStateData1 + 5],a ; delta X + ld [wSpriteStateData1 + 5], a ; delta X .handleDirectionButtonPress - ld [wPlayerDirection],a ; new direction - ld a,[wd730] - bit 7,a ; are we simulating button presses? - jr nz,.noDirectionChange ; ignore direction changes if we are - ld a,[wCheckFor180DegreeTurn] + ld [wPlayerDirection], a ; new direction + ld a, [wd730] + bit 7, a ; are we simulating button presses? + jr nz, .noDirectionChange ; ignore direction changes if we are + ld a, [wCheckFor180DegreeTurn] and a - jr z,.noDirectionChange - ld a,[wPlayerDirection] ; new direction - ld b,a - ld a,[wPlayerLastStopDirection] ; old direction + jr z, .noDirectionChange + ld a, [wPlayerDirection] ; new direction + ld b, a + ld a, [wPlayerLastStopDirection] ; old direction cp b - jr z,.noDirectionChange + jr z, .noDirectionChange ; Check whether the player did a 180-degree turn. ; It appears that this code was supposed to show the player rotate by having ; the player's sprite face an intermediate direction before facing the opposite @@ -199,175 +199,175 @@ OverworldLoopLessDelay:: ; direction is set for V-blank to occur while the direction is still set. swap a ; put old direction in upper half or b ; put new direction in lower half - cp a,(PLAYER_DIR_DOWN << 4) | PLAYER_DIR_UP ; change dir from down to up - jr nz,.notDownToUp - ld a,PLAYER_DIR_LEFT - ld [wPlayerMovingDirection],a + cp (PLAYER_DIR_DOWN << 4) | PLAYER_DIR_UP ; change dir from down to up + jr nz, .notDownToUp + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a jr .holdIntermediateDirectionLoop .notDownToUp - cp a,(PLAYER_DIR_UP << 4) | PLAYER_DIR_DOWN ; change dir from up to down - jr nz,.notUpToDown - ld a,PLAYER_DIR_RIGHT - ld [wPlayerMovingDirection],a + cp (PLAYER_DIR_UP << 4) | PLAYER_DIR_DOWN ; change dir from up to down + jr nz, .notUpToDown + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a jr .holdIntermediateDirectionLoop .notUpToDown - cp a,(PLAYER_DIR_RIGHT << 4) | PLAYER_DIR_LEFT ; change dir from right to left - jr nz,.notRightToLeft - ld a,PLAYER_DIR_DOWN - ld [wPlayerMovingDirection],a + cp (PLAYER_DIR_RIGHT << 4) | PLAYER_DIR_LEFT ; change dir from right to left + jr nz, .notRightToLeft + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a jr .holdIntermediateDirectionLoop .notRightToLeft - cp a,(PLAYER_DIR_LEFT << 4) | PLAYER_DIR_RIGHT ; change dir from left to right - jr nz,.holdIntermediateDirectionLoop - ld a,PLAYER_DIR_UP - ld [wPlayerMovingDirection],a + cp (PLAYER_DIR_LEFT << 4) | PLAYER_DIR_RIGHT ; change dir from left to right + jr nz, .holdIntermediateDirectionLoop + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a .holdIntermediateDirectionLoop - ld hl,wFlags_0xcd60 - set 2,[hl] - ld hl,wCheckFor180DegreeTurn + ld hl, wFlags_0xcd60 + set 2, [hl] + ld hl, wCheckFor180DegreeTurn dec [hl] - jr nz,.holdIntermediateDirectionLoop - ld a,[wPlayerDirection] - ld [wPlayerMovingDirection],a + jr nz, .holdIntermediateDirectionLoop + ld a, [wPlayerDirection] + ld [wPlayerMovingDirection], a call NewBattle - jp c,.battleOccurred + jp c, .battleOccurred jp OverworldLoop .noDirectionChange - ld a,[wPlayerDirection] ; current direction - ld [wPlayerMovingDirection],a ; save direction + ld a, [wPlayerDirection] ; current direction + ld [wPlayerMovingDirection], a ; save direction call UpdateSprites - ld a,[wWalkBikeSurfState] + ld a, [wWalkBikeSurfState] cp $02 ; surfing - jr z,.surfing + jr z, .surfing ; not surfing call CollisionCheckOnLand - jr nc,.noCollision + jr nc, .noCollision ; collision occurred push hl - ld hl,wd736 - bit 2,[hl] ; standing on warp flag + ld hl, wd736 + bit 2, [hl] ; standing on warp flag pop hl - jp z,OverworldLoop + 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 - jp c,CheckWarpsCollision + jp c, CheckWarpsCollision jp OverworldLoop .surfing call CollisionCheckOnWater - jp c,OverworldLoop + jp c, OverworldLoop .noCollision - ld a,$08 - ld [wWalkCounter],a + ld a, $08 + ld [wWalkCounter], a jr .moveAhead2 .moveAhead - ld a,[wd736] - bit 7,a - jr z,.noSpinning + ld a, [wd736] + bit 7, a + jr z, .noSpinning callba LoadSpinnerArrowTiles .noSpinning call UpdateSprites .moveAhead2 - ld hl,wFlags_0xcd60 - res 2,[hl] - ld a,[wWalkBikeSurfState] + ld hl, wFlags_0xcd60 + res 2, [hl] + ld a, [wWalkBikeSurfState] dec a ; riding a bike? - jr nz,.normalPlayerSpriteAdvancement - ld a,[wd736] - bit 6,a ; jumping a ledge? - jr nz,.normalPlayerSpriteAdvancement + jr nz, .normalPlayerSpriteAdvancement + ld a, [wd736] + bit 6, a ; jumping a ledge? + jr nz, .normalPlayerSpriteAdvancement call DoBikeSpeedup .normalPlayerSpriteAdvancement call AdvancePlayerSprite - ld a,[wWalkCounter] + ld a, [wWalkCounter] and a - jp nz,CheckMapConnections ; it seems like this check will never succeed (the other place where CheckMapConnections is run works) + jp nz, CheckMapConnections ; it seems like this check will never succeed (the other place where CheckMapConnections is run works) ; walking animation finished - ld a,[wd730] - bit 7,a - jr nz,.doneStepCounting ; if button presses are being simulated, don't count steps + ld a, [wd730] + bit 7, a + jr nz, .doneStepCounting ; if button presses are being simulated, don't count steps ; step counting - ld hl,wStepCounter + ld hl, wStepCounter dec [hl] - ld a,[wd72c] - bit 0,a - jr z,.doneStepCounting - ld hl,wNumberOfNoRandomBattleStepsLeft + ld a, [wd72c] + bit 0, a + jr z, .doneStepCounting + ld hl, wNumberOfNoRandomBattleStepsLeft dec [hl] - jr nz,.doneStepCounting - ld hl,wd72c - res 0,[hl] ; indicate that the player has stepped thrice since the last battle + jr nz, .doneStepCounting + ld hl, wd72c + res 0, [hl] ; indicate that the player has stepped thrice since the last battle .doneStepCounting CheckEvent EVENT_IN_SAFARI_ZONE - jr z,.notSafariZone + jr z, .notSafariZone callba SafariZoneCheckSteps - ld a,[wSafariZoneGameOver] + ld a, [wSafariZoneGameOver] and a - jp nz,WarpFound2 + jp nz, WarpFound2 .notSafariZone - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,CheckWarpsNoCollision + jp nz, CheckWarpsNoCollision predef ApplyOutOfBattlePoisonDamage ; also increment daycare mon exp - ld a,[wOutOfBattleBlackout] + ld a, [wOutOfBattleBlackout] and a - jp nz,HandleBlackOut ; if all pokemon fainted + jp nz, HandleBlackOut ; if all pokemon fainted .newBattle call NewBattle - ld hl,wd736 - res 2,[hl] ; standing on warp flag - jp nc,CheckWarpsNoCollision ; check for warps if there was no battle + ld hl, wd736 + res 2, [hl] ; standing on warp flag + jp nc, CheckWarpsNoCollision ; check for warps if there was no battle .battleOccurred - ld hl,wd72d - res 6,[hl] - ld hl,wFlags_D733 - res 3,[hl] - ld hl,wCurrentMapScriptFlags - set 5,[hl] - set 6,[hl] + ld hl, wd72d + res 6, [hl] + ld hl, wFlags_D733 + res 3, [hl] + ld hl, wCurrentMapScriptFlags + set 5, [hl] + set 6, [hl] xor a - ld [hJoyHeld],a - ld a,[wCurMap] + ld [hJoyHeld], a + ld a, [wCurMap] cp CINNABAR_GYM - jr nz,.notCinnabarGym + jr nz, .notCinnabarGym SetEvent EVENT_2A7 .notCinnabarGym - ld hl,wd72e - set 5,[hl] - ld a,[wCurMap] + ld hl, wd72e + set 5, [hl] + ld a, [wCurMap] cp OAKS_LAB - jp z,.noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab + jp z, .noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab callab AnyPartyAlive - ld a,d + ld a, d and a - jr z,.allPokemonFainted + jr z, .allPokemonFainted .noFaintCheck - ld c,10 + ld c, 10 call DelayFrames jp EnterMap .allPokemonFainted - ld a,$ff - ld [wIsInBattle],a + ld a, $ff + ld [wIsInBattle], a call RunMapScript jp HandleBlackOut ; function to determine if there will be a battle and execute it (either a trainer battle or wild battle) ; sets carry if a battle occurred and unsets carry if not NewBattle:: - ld a,[wd72d] - bit 4,a - jr nz,.noBattle + ld a, [wd72d] + bit 4, a + 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 + jr nz, .noBattle ; no battle if the player character is under the game's control + ld a, [wd72e] + bit 4, a + jr nz, .noBattle jpba InitBattle .noBattle and a @@ -375,13 +375,13 @@ NewBattle:: ; function to make bikes twice as fast as walking DoBikeSpeedup:: - ld a,[wNPCMovementScriptPointerTableNum] + ld a, [wNPCMovementScriptPointerTableNum] and a ret nz - ld a,[wCurMap] + ld a, [wCurMap] cp ROUTE_17 ; Cycling Road - jr nz,.goFaster - ld a,[hJoyHeld] + jr nz, .goFaster + ld a, [hJoyHeld] and D_UP | D_LEFT | D_RIGHT ret nz .goFaster @@ -389,73 +389,73 @@ DoBikeSpeedup:: ; check if the player has stepped onto a warp after having not collided CheckWarpsNoCollision:: - ld a,[wNumberOfWarps] + ld a, [wNumberOfWarps] and a - jp z,CheckMapConnections - ld a,[wNumberOfWarps] - ld b,0 - ld c,a - ld a,[wYCoord] - ld d,a - ld a,[wXCoord] - ld e,a - ld hl,wWarpEntries + jp z, CheckMapConnections + ld a, [wNumberOfWarps] + ld b, 0 + ld c, a + ld a, [wYCoord] + ld d, a + ld a, [wXCoord] + ld e, a + ld hl, wWarpEntries CheckWarpsNoCollisionLoop:: - ld a,[hli] ; check if the warp's Y position matches + ld a, [hli] ; check if the warp's Y position matches cp d - jr nz,CheckWarpsNoCollisionRetry1 - ld a,[hli] ; check if the warp's X position matches + jr nz, CheckWarpsNoCollisionRetry1 + ld a, [hli] ; check if the warp's X position matches cp e - jr nz,CheckWarpsNoCollisionRetry2 + jr nz, CheckWarpsNoCollisionRetry2 ; if a match was found push hl push bc - ld hl,wd736 - set 2,[hl] ; standing on warp flag + ld hl, wd736 + set 2, [hl] ; standing on warp flag callba IsPlayerStandingOnDoorTileOrWarpTile pop bc pop hl - jr c,WarpFound1 ; jump if standing on door or warp + jr c, WarpFound1 ; jump if standing on door or warp push hl push bc call ExtraWarpCheck pop bc pop hl - jr nc,CheckWarpsNoCollisionRetry2 + jr nc, CheckWarpsNoCollisionRetry2 ; if the extra check passed - ld a,[wFlags_D733] - bit 2,a - jr nz,WarpFound1 + ld a, [wFlags_D733] + bit 2, a + jr nz, WarpFound1 push de push bc call Joypad pop bc pop de - ld a,[hJoyHeld] + ld a, [hJoyHeld] and D_DOWN | D_UP | D_LEFT | D_RIGHT - jr z,CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp + jr 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:: - ld a,[wNumberOfWarps] - ld c,a - ld hl,wWarpEntries + ld a, [wNumberOfWarps] + ld c, a + ld hl, wWarpEntries .loop - ld a,[hli] ; Y coordinate of warp - ld b,a - ld a,[wYCoord] + ld a, [hli] ; Y coordinate of warp + ld b, a + ld a, [wYCoord] cp b - jr nz,.retry1 - ld a,[hli] ; X coordinate of warp - ld b,a - ld a,[wXCoord] + jr nz, .retry1 + ld a, [hli] ; X coordinate of warp + ld b, a + ld a, [wXCoord] cp b - jr nz,.retry2 - ld a,[hli] - ld [wDestinationWarpID],a - ld a,[hl] - ld [hWarpDestinationMap],a + jr nz, .retry2 + ld a, [hli] + ld [wDestinationWarpID], a + ld a, [hl] + ld [hWarpDestinationMap], a jr WarpFound2 .retry1 inc hl @@ -463,7 +463,7 @@ CheckWarpsCollision:: inc hl inc hl dec c - jr nz,.loop + jr nz, .loop jp OverworldLoop CheckWarpsNoCollisionRetry1:: @@ -474,30 +474,30 @@ CheckWarpsNoCollisionRetry2:: jp ContinueCheckWarpsNoCollisionLoop WarpFound1:: - ld a,[hli] - ld [wDestinationWarpID],a - ld a,[hli] - ld [hWarpDestinationMap],a + ld a, [hli] + ld [wDestinationWarpID], a + ld a, [hli] + ld [hWarpDestinationMap], a WarpFound2:: - ld a,[wNumberOfWarps] + ld a, [wNumberOfWarps] sub c - ld [wWarpedFromWhichWarp],a ; save ID of used warp - ld a,[wCurMap] - ld [wWarpedFromWhichMap],a + ld [wWarpedFromWhichWarp], a ; save ID of used warp + ld a, [wCurMap] + ld [wWarpedFromWhichMap], a call CheckIfInOutsideMap - jr nz,.indoorMaps + jr nz, .indoorMaps ; this is for handling "outside" maps that can't have the 0xFF destination map - ld a,[wCurMap] - ld [wLastMap],a - ld a,[wCurMapWidth] - ld [wUnusedD366],a ; not read - ld a,[hWarpDestinationMap] - ld [wCurMap],a + ld a, [wCurMap] + ld [wLastMap], a + ld a, [wCurMapWidth] + ld [wUnusedD366], a ; not read + ld a, [hWarpDestinationMap] + ld [wCurMap], a cp ROCK_TUNNEL_1 - jr nz,.notRockTunnel - ld a,$06 - ld [wMapPalOffset],a + jr nz, .notRockTunnel + ld a, $06 + ld [wMapPalOffset], a call GBFadeOutToBlack .notRockTunnel call PlayMapChangeSound @@ -506,172 +506,172 @@ WarpFound2:: ; for maps that can have the 0xFF destination map, which means to return to the outside map ; not all these maps are necessarily indoors, though .indoorMaps - ld a,[hWarpDestinationMap] ; destination map + ld a, [hWarpDestinationMap] ; destination map cp $ff - jr z,.goBackOutside + jr z, .goBackOutside ; if not going back to the previous map - ld [wCurMap],a + ld [wCurMap], a callba IsPlayerStandingOnWarpPadOrHole - ld a,[wStandingOnWarpPadOrHole] + ld a, [wStandingOnWarpPadOrHole] dec a ; is the player on a warp pad? - jr nz,.notWarpPad + jr nz, .notWarpPad ; if the player is on a warp pad - ld hl,wd732 - set 3,[hl] + ld hl, wd732 + set 3, [hl] call LeaveMapAnim jr .skipMapChangeSound .notWarpPad call PlayMapChangeSound .skipMapChangeSound - ld hl,wd736 - res 0,[hl] - res 1,[hl] + ld hl, wd736 + res 0, [hl] + res 1, [hl] jr .done .goBackOutside - ld a,[wLastMap] - ld [wCurMap],a + ld a, [wLastMap] + ld [wCurMap], a call PlayMapChangeSound xor a - ld [wMapPalOffset],a + ld [wMapPalOffset], a .done - ld hl,wd736 - set 0,[hl] ; have the player's sprite step out from the door (if there is one) + ld hl, wd736 + set 0, [hl] ; have the player's sprite step out from the door (if there is one) call IgnoreInputForHalfSecond jp EnterMap ContinueCheckWarpsNoCollisionLoop:: inc b ; increment warp number dec c ; decrement number of warps - jp nz,CheckWarpsNoCollisionLoop + jp nz, CheckWarpsNoCollisionLoop ; if no matching warp was found CheckMapConnections:: .checkWestMap - ld a,[wXCoord] + ld a, [wXCoord] cp $ff - jr nz,.checkEastMap - ld a,[wMapConn3Ptr] - ld [wCurMap],a - ld a,[wWestConnectedMapXAlignment] ; new X coordinate upon entering west map - ld [wXCoord],a - ld a,[wYCoord] - ld c,a - ld a,[wWestConnectedMapYAlignment] ; Y adjustment upon entering west map + jr nz, .checkEastMap + ld a, [wMapConn3Ptr] + ld [wCurMap], a + ld a, [wWestConnectedMapXAlignment] ; new X coordinate upon entering west map + ld [wXCoord], a + ld a, [wYCoord] + ld c, a + ld a, [wWestConnectedMapYAlignment] ; Y adjustment upon entering west map add c - ld c,a - ld [wYCoord],a - ld a,[wWestConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position - ld l,a - ld a,[wWestConnectedMapViewPointer + 1] - ld h,a + ld c, a + ld [wYCoord], a + ld a, [wWestConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position + ld l, a + ld a, [wWestConnectedMapViewPointer + 1] + ld h, a srl c - jr z,.savePointer1 + jr z, .savePointer1 .pointerAdjustmentLoop1 - ld a,[wWestConnectedMapWidth] ; width of connected map + ld a, [wWestConnectedMapWidth] ; width of connected map add MAP_BORDER * 2 - ld e,a - ld d,0 - ld b,0 - add hl,de + ld e, a + ld d, 0 + ld b, 0 + add hl, de dec c - jr nz,.pointerAdjustmentLoop1 + jr nz, .pointerAdjustmentLoop1 .savePointer1 - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a jp .loadNewMap .checkEastMap - ld b,a - ld a,[wCurrentMapWidth2] ; map width + ld b, a + ld a, [wCurrentMapWidth2] ; map width cp b - jr nz,.checkNorthMap - ld a,[wMapConn4Ptr] - ld [wCurMap],a - ld a,[wEastConnectedMapXAlignment] ; new X coordinate upon entering east map - ld [wXCoord],a - ld a,[wYCoord] - ld c,a - ld a,[wEastConnectedMapYAlignment] ; Y adjustment upon entering east map + jr nz, .checkNorthMap + ld a, [wMapConn4Ptr] + ld [wCurMap], a + ld a, [wEastConnectedMapXAlignment] ; new X coordinate upon entering east map + ld [wXCoord], a + ld a, [wYCoord] + ld c, a + ld a, [wEastConnectedMapYAlignment] ; Y adjustment upon entering east map add c - ld c,a - ld [wYCoord],a - ld a,[wEastConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position - ld l,a - ld a,[wEastConnectedMapViewPointer + 1] - ld h,a + ld c, a + ld [wYCoord], a + ld a, [wEastConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position + ld l, a + ld a, [wEastConnectedMapViewPointer + 1] + ld h, a srl c - jr z,.savePointer2 + jr z, .savePointer2 .pointerAdjustmentLoop2 - ld a,[wEastConnectedMapWidth] + ld a, [wEastConnectedMapWidth] add MAP_BORDER * 2 - ld e,a - ld d,0 - ld b,0 - add hl,de + ld e, a + ld d, 0 + ld b, 0 + add hl, de dec c - jr nz,.pointerAdjustmentLoop2 + jr nz, .pointerAdjustmentLoop2 .savePointer2 - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a jp .loadNewMap .checkNorthMap - ld a,[wYCoord] + ld a, [wYCoord] cp $ff - jr nz,.checkSouthMap - ld a,[wMapConn1Ptr] - ld [wCurMap],a - ld a,[wNorthConnectedMapYAlignment] ; new Y coordinate upon entering north map - ld [wYCoord],a - ld a,[wXCoord] - ld c,a - ld a,[wNorthConnectedMapXAlignment] ; X adjustment upon entering north map + jr nz, .checkSouthMap + ld a, [wMapConn1Ptr] + ld [wCurMap], a + ld a, [wNorthConnectedMapYAlignment] ; new Y coordinate upon entering north map + ld [wYCoord], a + ld a, [wXCoord] + ld c, a + ld a, [wNorthConnectedMapXAlignment] ; X adjustment upon entering north map add c - ld c,a - ld [wXCoord],a - ld a,[wNorthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position - ld l,a - ld a,[wNorthConnectedMapViewPointer + 1] - ld h,a - ld b,0 + ld c, a + ld [wXCoord], a + ld a, [wNorthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position + ld l, a + ld a, [wNorthConnectedMapViewPointer + 1] + ld h, a + ld b, 0 srl c - add hl,bc - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + add hl, bc + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a jp .loadNewMap .checkSouthMap - ld b,a - ld a,[wCurrentMapHeight2] + ld b, a + ld a, [wCurrentMapHeight2] cp b - jr nz,.didNotEnterConnectedMap - ld a,[wMapConn2Ptr] - ld [wCurMap],a - ld a,[wSouthConnectedMapYAlignment] ; new Y coordinate upon entering south map - ld [wYCoord],a - ld a,[wXCoord] - ld c,a - ld a,[wSouthConnectedMapXAlignment] ; X adjustment upon entering south map + jr nz, .didNotEnterConnectedMap + ld a, [wMapConn2Ptr] + ld [wCurMap], a + ld a, [wSouthConnectedMapYAlignment] ; new Y coordinate upon entering south map + ld [wYCoord], a + ld a, [wXCoord] + ld c, a + ld a, [wSouthConnectedMapXAlignment] ; X adjustment upon entering south map add c - ld c,a - ld [wXCoord],a - ld a,[wSouthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position - ld l,a - ld a,[wSouthConnectedMapViewPointer + 1] - ld h,a - ld b,0 + ld c, a + ld [wXCoord], a + ld a, [wSouthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position + ld l, a + ld a, [wSouthConnectedMapViewPointer + 1] + ld h, a + ld b, 0 srl c - add hl,bc - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + add hl, bc + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a .loadNewMap ; load the connected map that was entered call LoadMapHeader call PlayDefaultMusicFadeOutCurrent @@ -690,14 +690,14 @@ CheckMapConnections:: PlayMapChangeSound:: aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on cp $0b ; door tile in tileset 0 - jr nz,.didNotGoThroughDoor - ld a,SFX_GO_INSIDE + jr nz, .didNotGoThroughDoor + ld a, SFX_GO_INSIDE jr .playSound .didNotGoThroughDoor - ld a,SFX_GO_OUTSIDE + ld a, SFX_GO_OUTSIDE .playSound call PlaySound - ld a,[wMapPalOffset] + ld a, [wMapPalOffset] and a ret nz jp GBFadeOutToBlack @@ -748,9 +748,9 @@ ExtraWarpCheck:: MapEntryAfterBattle:: callba IsPlayerStandingOnWarp ; for enabling warp testing after collisions - ld a,[wMapPalOffset] + ld a, [wMapPalOffset] and a - jp z,GBFadeInFromWhite + jp z, GBFadeInFromWhite jp LoadGBPal HandleBlackOut:: @@ -884,205 +884,205 @@ INCLUDE "data/bike_riding_tilesets.asm" ; load the tile pattern data of the current tileset into VRAM LoadTilesetTilePatternData:: - ld a,[wTilesetGfxPtr] - ld l,a - ld a,[wTilesetGfxPtr + 1] - ld h,a - ld de,vTileset - ld bc,$600 - ld a,[wTilesetBank] + ld a, [wTilesetGfxPtr] + ld l, a + ld a, [wTilesetGfxPtr + 1] + ld h, a + ld de, vTileset + ld bc, $600 + ld a, [wTilesetBank] jp FarCopyData2 ; this loads the current maps complete tile map (which references blocks, not individual tiles) to C6E8 ; it can also load partial tile maps of connected maps into a border of length 3 around the current map LoadTileBlockMap:: ; fill C6E8-CBFB with the background tile - ld hl,wOverworldMap - ld a,[wMapBackgroundTile] - ld d,a - ld bc,$0514 + ld hl, wOverworldMap + ld a, [wMapBackgroundTile] + ld d, a + ld bc, $0514 .backgroundTileLoop - ld a,d - ld [hli],a + ld a, d + ld [hli], a dec bc - ld a,c + ld a, c or b - jr nz,.backgroundTileLoop + jr nz, .backgroundTileLoop ; load tile map of current map (made of tile block IDs) ; a 3-byte border at the edges of the map is kept so that there is space for map connections - ld hl,wOverworldMap - ld a,[wCurMapWidth] - ld [hMapWidth],a + ld hl, wOverworldMap + ld a, [wCurMapWidth] + ld [hMapWidth], a add MAP_BORDER * 2 ; east and west - ld [hMapStride],a ; map width + border - ld b,0 - ld c,a + ld [hMapStride], a ; map width + border + ld b, 0 + ld c, a ; make space for north border (next 3 lines) - add hl,bc - add hl,bc - add hl,bc - ld c,MAP_BORDER - add hl,bc ; this puts us past the (west) border - ld a,[wMapDataPtr] ; tile map pointer - ld e,a - ld a,[wMapDataPtr + 1] - ld d,a ; de = tile map pointer - ld a,[wCurMapHeight] - ld b,a + add hl, bc + add hl, bc + add hl, bc + ld c, MAP_BORDER + add hl, bc ; this puts us past the (west) border + ld a, [wMapDataPtr] ; tile map pointer + ld e, a + ld a, [wMapDataPtr + 1] + ld d, a ; de = tile map pointer + ld a, [wCurMapHeight] + ld b, a .rowLoop ; copy one row each iteration push hl - ld a,[hMapWidth] ; map width (without border) - ld c,a + ld a, [hMapWidth] ; map width (without border) + ld c, a .rowInnerLoop - ld a,[de] + ld a, [de] inc de - ld [hli],a + ld [hli], a dec c - jr nz,.rowInnerLoop + jr nz, .rowInnerLoop ; add the map width plus the border to the base address of the current row to get the next row's address pop hl - ld a,[hMapStride] ; map width + border + ld a, [hMapStride] ; map width + border add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry dec b - jr nz,.rowLoop + jr nz, .rowLoop .northConnection - ld a,[wMapConn1Ptr] + ld a, [wMapConn1Ptr] cp $ff - jr z,.southConnection + jr z, .southConnection call SwitchToMapRomBank - ld a,[wNorthConnectionStripSrc] - ld l,a - ld a,[wNorthConnectionStripSrc + 1] - ld h,a - ld a,[wNorthConnectionStripDest] - ld e,a - ld a,[wNorthConnectionStripDest + 1] - ld d,a - ld a,[wNorthConnectionStripWidth] - ld [hNorthSouthConnectionStripWidth],a - ld a,[wNorthConnectedMapWidth] - ld [hNorthSouthConnectedMapWidth],a + ld a, [wNorthConnectionStripSrc] + ld l, a + ld a, [wNorthConnectionStripSrc + 1] + ld h, a + ld a, [wNorthConnectionStripDest] + ld e, a + ld a, [wNorthConnectionStripDest + 1] + ld d, a + ld a, [wNorthConnectionStripWidth] + ld [hNorthSouthConnectionStripWidth], a + ld a, [wNorthConnectedMapWidth] + ld [hNorthSouthConnectedMapWidth], a call LoadNorthSouthConnectionsTileMap .southConnection - ld a,[wMapConn2Ptr] + ld a, [wMapConn2Ptr] cp $ff - jr z,.westConnection + jr z, .westConnection call SwitchToMapRomBank - ld a,[wSouthConnectionStripSrc] - ld l,a - ld a,[wSouthConnectionStripSrc + 1] - ld h,a - ld a,[wSouthConnectionStripDest] - ld e,a - ld a,[wSouthConnectionStripDest + 1] - ld d,a - ld a,[wSouthConnectionStripWidth] - ld [hNorthSouthConnectionStripWidth],a - ld a,[wSouthConnectedMapWidth] - ld [hNorthSouthConnectedMapWidth],a + ld a, [wSouthConnectionStripSrc] + ld l, a + ld a, [wSouthConnectionStripSrc + 1] + ld h, a + ld a, [wSouthConnectionStripDest] + ld e, a + ld a, [wSouthConnectionStripDest + 1] + ld d, a + ld a, [wSouthConnectionStripWidth] + ld [hNorthSouthConnectionStripWidth], a + ld a, [wSouthConnectedMapWidth] + ld [hNorthSouthConnectedMapWidth], a call LoadNorthSouthConnectionsTileMap .westConnection - ld a,[wMapConn3Ptr] + ld a, [wMapConn3Ptr] cp $ff - jr z,.eastConnection + jr z, .eastConnection call SwitchToMapRomBank - ld a,[wWestConnectionStripSrc] - ld l,a - ld a,[wWestConnectionStripSrc + 1] - ld h,a - ld a,[wWestConnectionStripDest] - ld e,a - ld a,[wWestConnectionStripDest + 1] - ld d,a - ld a,[wWestConnectionStripHeight] - ld b,a - ld a,[wWestConnectedMapWidth] - ld [hEastWestConnectedMapWidth],a + ld a, [wWestConnectionStripSrc] + ld l, a + ld a, [wWestConnectionStripSrc + 1] + ld h, a + ld a, [wWestConnectionStripDest] + ld e, a + ld a, [wWestConnectionStripDest + 1] + ld d, a + ld a, [wWestConnectionStripHeight] + ld b, a + ld a, [wWestConnectedMapWidth] + ld [hEastWestConnectedMapWidth], a call LoadEastWestConnectionsTileMap .eastConnection - ld a,[wMapConn4Ptr] + ld a, [wMapConn4Ptr] cp $ff - jr z,.done + jr z, .done call SwitchToMapRomBank - ld a,[wEastConnectionStripSrc] - ld l,a - ld a,[wEastConnectionStripSrc + 1] - ld h,a - ld a,[wEastConnectionStripDest] - ld e,a - ld a,[wEastConnectionStripDest + 1] - ld d,a - ld a,[wEastConnectionStripHeight] - ld b,a - ld a,[wEastConnectedMapWidth] - ld [hEastWestConnectedMapWidth],a + ld a, [wEastConnectionStripSrc] + ld l, a + ld a, [wEastConnectionStripSrc + 1] + ld h, a + ld a, [wEastConnectionStripDest] + ld e, a + ld a, [wEastConnectionStripDest + 1] + ld d, a + ld a, [wEastConnectionStripHeight] + ld b, a + ld a, [wEastConnectedMapWidth] + ld [hEastWestConnectedMapWidth], a call LoadEastWestConnectionsTileMap .done ret LoadNorthSouthConnectionsTileMap:: - ld c,MAP_BORDER + ld c, MAP_BORDER .loop push de push hl - ld a,[hNorthSouthConnectionStripWidth] - ld b,a + ld a, [hNorthSouthConnectionStripWidth] + ld b, a .innerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec b - jr nz,.innerLoop + jr nz, .innerLoop pop hl pop de - ld a,[hNorthSouthConnectedMapWidth] + ld a, [hNorthSouthConnectedMapWidth] add l - ld l,a - jr nc,.noCarry1 + ld l, a + jr nc, .noCarry1 inc h .noCarry1 - ld a,[wCurMapWidth] + ld a, [wCurMapWidth] add MAP_BORDER * 2 add e - ld e,a - jr nc,.noCarry2 + ld e, a + jr nc, .noCarry2 inc d .noCarry2 dec c - jr nz,.loop + jr nz, .loop ret LoadEastWestConnectionsTileMap:: push hl push de - ld c,MAP_BORDER + ld c, MAP_BORDER .innerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.innerLoop + jr nz, .innerLoop pop de pop hl - ld a,[hEastWestConnectedMapWidth] + ld a, [hEastWestConnectedMapWidth] add l - ld l,a - jr nc,.noCarry1 + ld l, a + jr nc, .noCarry1 inc h .noCarry1 - ld a,[wCurMapWidth] + ld a, [wCurMapWidth] add MAP_BORDER * 2 add e - ld e,a - jr nc,.noCarry2 + ld e, a + jr nc, .noCarry2 inc d .noCarry2 dec b - jr nz,LoadEastWestConnectionsTileMap + jr nz, LoadEastWestConnectionsTileMap ret ; function to check if there is a sign or sprite in front of the player @@ -1090,174 +1090,174 @@ LoadEastWestConnectionsTileMap:: ; if not, [hSpriteIndexOrTextID] is set to 0 IsSpriteOrSignInFrontOfPlayer:: xor a - ld [hSpriteIndexOrTextID],a - ld a,[wNumSigns] + ld [hSpriteIndexOrTextID], a + ld a, [wNumSigns] and a - jr z,.extendRangeOverCounter + jr z, .extendRangeOverCounter ; if there are signs predef GetTileAndCoordsInFrontOfPlayer ; get the coordinates in front of the player in de - ld hl,wSignCoords - ld a,[wNumSigns] - ld b,a - ld c,0 + ld hl, wSignCoords + ld a, [wNumSigns] + ld b, a + ld c, 0 .signLoop inc c - ld a,[hli] ; sign Y + ld a, [hli] ; sign Y cp d - jr z,.yCoordMatched + jr z, .yCoordMatched inc hl jr .retry .yCoordMatched - ld a,[hli] ; sign X + ld a, [hli] ; sign X cp e - jr nz,.retry + jr nz, .retry .xCoordMatched ; found sign push hl push bc - ld hl,wSignTextIDs - ld b,0 + ld hl, wSignTextIDs + ld b, 0 dec c - add hl,bc - ld a,[hl] - ld [hSpriteIndexOrTextID],a ; store sign text ID + add hl, bc + ld a, [hl] + ld [hSpriteIndexOrTextID], a ; store sign text ID pop bc pop hl ret .retry dec b - jr nz,.signLoop + 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 GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player in c - ld hl,wTilesetTalkingOverTiles ; list of tiles that extend talking range (counter tiles) - ld b,3 - ld d,$20 ; talking range in pixels (long range) + ld hl, wTilesetTalkingOverTiles ; list of tiles that extend talking range (counter tiles) + ld b, 3 + ld d, $20 ; talking range in pixels (long range) .counterTilesLoop - ld a,[hli] + ld a, [hli] cp c - jr z,IsSpriteInFrontOfPlayer2 ; jumps if the tile in front of the player is a counter tile + jr z, IsSpriteInFrontOfPlayer2 ; jumps if the tile in front of the player is a counter tile dec b - jr nz,.counterTilesLoop + jr nz, .counterTilesLoop ; part of the above function, but sometimes its called on its own, when signs are irrelevant ; the caller must zero [hSpriteIndexOrTextID] IsSpriteInFrontOfPlayer:: - ld d,$10 ; talking range in pixels (normal range) + ld d, $10 ; talking range in pixels (normal range) IsSpriteInFrontOfPlayer2:: lb bc, $3c, $40 ; Y and X position of player sprite - ld a,[wSpriteStateData1 + 9] ; direction the player is facing + ld a, [wSpriteStateData1 + 9] ; direction the player is facing .checkIfPlayerFacingUp cp SPRITE_FACING_UP - jr nz,.checkIfPlayerFacingDown + jr nz, .checkIfPlayerFacingDown ; facing up - ld a,b + ld a, b sub d - ld b,a - ld a,PLAYER_DIR_UP + ld b, a + ld a, PLAYER_DIR_UP jr .doneCheckingDirection .checkIfPlayerFacingDown cp SPRITE_FACING_DOWN - jr nz,.checkIfPlayerFacingRight + jr nz, .checkIfPlayerFacingRight ; facing down - ld a,b + ld a, b add d - ld b,a - ld a,PLAYER_DIR_DOWN + ld b, a + ld a, PLAYER_DIR_DOWN jr .doneCheckingDirection .checkIfPlayerFacingRight cp SPRITE_FACING_RIGHT - jr nz,.playerFacingLeft + jr nz, .playerFacingLeft ; facing right - ld a,c + ld a, c add d - ld c,a - ld a,PLAYER_DIR_RIGHT + ld c, a + ld a, PLAYER_DIR_RIGHT jr .doneCheckingDirection .playerFacingLeft ; facing left - ld a,c + ld a, c sub d - ld c,a - ld a,PLAYER_DIR_LEFT + ld c, a + ld a, PLAYER_DIR_LEFT .doneCheckingDirection - ld [wPlayerDirection],a - ld a,[wNumSprites] ; number of sprites + ld [wPlayerDirection], a + ld a, [wNumSprites] ; number of sprites and a ret z ; if there are sprites - ld hl,wSpriteStateData1 + $10 - ld d,a - ld e,$01 + ld hl, wSpriteStateData1 + $10 + ld d, a + ld e, $01 .spriteLoop push hl - ld a,[hli] ; image (0 if no sprite) + ld a, [hli] ; image (0 if no sprite) and a - jr z,.nextSprite + jr z, .nextSprite inc l - ld a,[hli] ; sprite visibility + ld a, [hli] ; sprite visibility inc a - jr z,.nextSprite + jr z, .nextSprite inc l - ld a,[hli] ; Y location + ld a, [hli] ; Y location cp b - jr nz,.nextSprite + jr nz, .nextSprite inc l - ld a,[hl] ; X location + ld a, [hl] ; X location cp c - jr z,.foundSpriteInFrontOfPlayer + jr z, .foundSpriteInFrontOfPlayer .nextSprite pop hl - ld a,l - add a,$10 - ld l,a + ld a, l + add $10 + ld l, a inc e dec d - jr nz,.spriteLoop + jr nz, .spriteLoop ret .foundSpriteInFrontOfPlayer pop hl - ld a,l - and a,$f0 + ld a, l + and $f0 inc a - ld l,a ; hl = $c1x1 - set 7,[hl] ; set flag to make the sprite face the player - ld a,e - ld [hSpriteIndexOrTextID],a + ld l, a ; hl = $c1x1 + set 7, [hl] ; set flag to make the sprite face the player + ld a, e + ld [hSpriteIndexOrTextID], a ret ; function to check if the player will jump down a ledge and check if the tile ahead is passable (when not surfing) ; sets the carry flag if there is a collision, and unsets it if there isn't a collision CollisionCheckOnLand:: - ld a,[wd736] - bit 6,a ; is the player jumping? - jr nz,.noCollision + ld a, [wd736] + bit 6, a ; is the player jumping? + jr nz, .noCollision ; if not jumping a ledge - ld a,[wSimulatedJoypadStatesIndex] + ld a, [wSimulatedJoypadStatesIndex] and a - jr nz,.noCollision ; no collisions when the player's movements are being controlled by the game - ld a,[wPlayerDirection] ; the direction that the player is trying to go in - ld d,a - ld a,[wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) + jr nz, .noCollision ; no collisions when the player's movements are being controlled by the game + ld a, [wPlayerDirection] ; the direction that the player is trying to go in + ld d, a + ld a, [wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) and d ; check if a sprite is in the direction the player is trying to go - jr nz,.collision + jr nz, .collision xor a - ld [hSpriteIndexOrTextID],a + ld [hSpriteIndexOrTextID], a call IsSpriteInFrontOfPlayer ; check for sprite collisions again? when does the above check fail to detect a sprite collision? - ld a,[hSpriteIndexOrTextID] + ld a, [hSpriteIndexOrTextID] and a ; was there a sprite collision? - jr nz,.collision + jr nz, .collision ; if no sprite collision - ld hl,TilePairCollisionsLand + ld hl, TilePairCollisionsLand call CheckForJumpingAndTilePairCollisions - jr c,.collision + jr c, .collision call CheckTilePassable - jr nc,.noCollision + jr nc, .noCollision .collision - ;ld a,[wChannelSoundIDs + Ch4] + ;ld a, [wChannelSoundIDs + Ch4] ;cp SFX_COLLISION ; check if collision sound is already playing ; curSFX is not cleared for some reason. @@ -1265,8 +1265,8 @@ CollisionCheckOnLand:: ld hl, Channel5 + Channel1Flags - Channel1 bit 0, [hl] - jr nz,.setCarry - ld a,SFX_COLLISION + jr nz, .setCarry + ld a, SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry scf @@ -1279,16 +1279,16 @@ CollisionCheckOnLand:: ; clears carry if it is, sets carry if not CheckTilePassable:: predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player - ld a,[wTileInFrontOfPlayer] ; tile in front of player - ld c,a - ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles - ld a,[hli] - ld h,[hl] - ld l,a ; hl now points to passable tiles + ld a, [wTileInFrontOfPlayer] ; tile in front of player + ld c, a + ld hl, wTilesetCollisionPtr ; pointer to list of passable tiles + ld a, [hli] + ld h, [hl] + ld l, a ; hl now points to passable tiles .loop - ld a,[hli] - cp a,$ff - jr z,.tileNotPassable + ld a, [hli] + cp $ff + jr z, .tileNotPassable cp c ret z jr .loop @@ -1310,53 +1310,53 @@ CheckForJumpingAndTilePairCollisions:: pop de pop hl and a - ld a,[wd736] - bit 6,a ; is the player jumping? + ld a, [wd736] + bit 6, a ; is the player jumping? ret nz ; if not jumping CheckForTilePairCollisions2:: aCoord 8, 9 ; tile the player is on - ld [wTilePlayerStandingOn],a + ld [wTilePlayerStandingOn], a CheckForTilePairCollisions:: - ld a,[wTileInFrontOfPlayer] - ld c,a + ld a, [wTileInFrontOfPlayer] + ld c, a .tilePairCollisionLoop - ld a,[wCurMapTileset] ; tileset number - ld b,a - ld a,[hli] + ld a, [wCurMapTileset] ; tileset number + ld b, a + ld a, [hli] cp $ff - jr z,.noMatch + jr z, .noMatch cp b - jr z,.tilesetMatches + jr z, .tilesetMatches inc hl .retry inc hl jr .tilePairCollisionLoop .tilesetMatches - ld a,[wTilePlayerStandingOn] ; tile the player is on - ld b,a - ld a,[hl] + ld a, [wTilePlayerStandingOn] ; tile the player is on + ld b, a + ld a, [hl] cp b - jr z,.currentTileMatchesFirstInPair + jr z, .currentTileMatchesFirstInPair inc hl - ld a,[hl] + ld a, [hl] cp b - jr z,.currentTileMatchesSecondInPair + jr z, .currentTileMatchesSecondInPair jr .retry .currentTileMatchesFirstInPair inc hl - ld a,[hl] + ld a, [hl] cp c - jr z,.foundMatch + jr z, .foundMatch jr .tilePairCollisionLoop .currentTileMatchesSecondInPair dec hl - ld a,[hli] + ld a, [hli] cp c inc hl - jr nz,.tilePairCollisionLoop + jr nz, .tilePairCollisionLoop .foundMatch scf ret @@ -1391,27 +1391,27 @@ TilePairCollisionsWater:: ; this builds a tile map from the tile block map based on the current X/Y coordinates of the player's character LoadCurrentMapView:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,[wTilesetBank] ; tile data ROM bank - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a ; switch to ROM bank that contains tile data - ld a,[wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view - ld e,a - ld a,[wCurrentTileBlockMapViewPointer + 1] - ld d,a - ld hl,wTileMapBackup - ld b,$05 + ld a, [wTilesetBank] ; tile data ROM bank + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ; switch to ROM bank that contains tile data + ld a, [wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view + ld e, a + ld a, [wCurrentTileBlockMapViewPointer + 1] + ld d, a + ld hl, wTileMapBackup + ld b, $05 .rowLoop ; each loop iteration fills in one row of tile blocks push hl push de - ld c,$06 + ld c, $06 .rowInnerLoop ; loop to draw each tile block of the current row push bc push de push hl - ld a,[de] - ld c,a ; tile block number + ld a, [de] + ld c, a ; tile block number call DrawTileBlock pop hl pop de @@ -1422,256 +1422,256 @@ LoadCurrentMapView:: inc hl inc de dec c - jr nz,.rowInnerLoop + jr nz, .rowInnerLoop ; update tile block map pointer to next row's address pop de - ld a,[wCurMapWidth] + ld a, [wCurMapWidth] add MAP_BORDER * 2 add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry ; update tile map pointer to next row's address pop hl - ld a,$60 + ld a, $60 add l - ld l,a - jr nc,.noCarry2 + ld l, a + jr nc, .noCarry2 inc h .noCarry2 dec b - jr nz,.rowLoop - ld hl,wTileMapBackup - ld bc,$0000 + jr nz, .rowLoop + ld hl, wTileMapBackup + ld bc, $0000 .adjustForYCoordWithinTileBlock - ld a,[wYBlockCoord] + ld a, [wYBlockCoord] and a - jr z,.adjustForXCoordWithinTileBlock - ld bc,$0030 - add hl,bc + jr z, .adjustForXCoordWithinTileBlock + ld bc, $0030 + add hl, bc .adjustForXCoordWithinTileBlock - ld a,[wXBlockCoord] + ld a, [wXBlockCoord] and a - jr z,.copyToVisibleAreaBuffer - ld bc,$0002 - add hl,bc + jr z, .copyToVisibleAreaBuffer + ld bc, $0002 + add hl, bc .copyToVisibleAreaBuffer coord de, 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank ld b, SCREEN_HEIGHT .rowLoop2 ld c, SCREEN_WIDTH .rowInnerLoop2 - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.rowInnerLoop2 - ld a,$04 + jr nz, .rowInnerLoop2 + ld a, $04 add l - ld l,a - jr nc,.noCarry3 + ld l, a + jr nc, .noCarry3 inc h .noCarry3 dec b - jr nz,.rowLoop2 + jr nz, .rowLoop2 pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a ; restore previous ROM bank + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ; restore previous ROM bank ret AdvancePlayerSprite:: - ld a,[wSpriteStateData1 + 3] ; delta Y - ld b,a - ld a,[wSpriteStateData1 + 5] ; delta X - ld c,a - ld hl,wWalkCounter ; walking animation counter + ld a, [wSpriteStateData1 + 3] ; delta Y + ld b, a + ld a, [wSpriteStateData1 + 5] ; delta X + ld c, a + ld hl, wWalkCounter ; walking animation counter dec [hl] - jr nz,.afterUpdateMapCoords + jr nz, .afterUpdateMapCoords ; if it's the end of the animation, update the player's map coordinates - ld a,[wYCoord] + ld a, [wYCoord] add b - ld [wYCoord],a - ld a,[wXCoord] + ld [wYCoord], a + ld a, [wXCoord] add c - ld [wXCoord],a + ld [wXCoord], a .afterUpdateMapCoords - ld a,[wWalkCounter] ; walking animation counter - cp a,$07 - jp nz,.scrollBackgroundAndSprites + ld a, [wWalkCounter] ; walking animation counter + cp $07 + jp nz, .scrollBackgroundAndSprites ; if this is the first iteration of the animation - ld a,c - cp a,$01 - jr nz,.checkIfMovingWest + ld a, c + cp $01 + jr nz, .checkIfMovingWest ; moving east - ld a,[wMapViewVRAMPointer] - ld e,a - and a,$e0 - ld d,a - ld a,e - add a,$02 - and a,$1f + ld a, [wMapViewVRAMPointer] + ld e, a + and $e0 + ld d, a + ld a, e + add $02 + and $1f or d - ld [wMapViewVRAMPointer],a + ld [wMapViewVRAMPointer], a jr .adjustXCoordWithinBlock .checkIfMovingWest - cp a,$ff - jr nz,.checkIfMovingSouth + cp $ff + jr nz, .checkIfMovingSouth ; moving west - ld a,[wMapViewVRAMPointer] - ld e,a - and a,$e0 - ld d,a - ld a,e - sub a,$02 - and a,$1f + ld a, [wMapViewVRAMPointer] + ld e, a + and $e0 + ld d, a + ld a, e + sub $02 + and $1f or d - ld [wMapViewVRAMPointer],a + ld [wMapViewVRAMPointer], a jr .adjustXCoordWithinBlock .checkIfMovingSouth - ld a,b - cp a,$01 - jr nz,.checkIfMovingNorth + ld a, b + cp $01 + jr nz, .checkIfMovingNorth ; moving south - ld a,[wMapViewVRAMPointer] - add a,$40 - ld [wMapViewVRAMPointer],a - jr nc,.adjustXCoordWithinBlock - ld a,[wMapViewVRAMPointer + 1] + ld a, [wMapViewVRAMPointer] + add $40 + ld [wMapViewVRAMPointer], a + jr nc, .adjustXCoordWithinBlock + ld a, [wMapViewVRAMPointer + 1] inc a - and a,$03 - or a,$98 - ld [wMapViewVRAMPointer + 1],a + and $03 + or $98 + ld [wMapViewVRAMPointer + 1], a jr .adjustXCoordWithinBlock .checkIfMovingNorth - cp a,$ff - jr nz,.adjustXCoordWithinBlock + cp $ff + jr nz, .adjustXCoordWithinBlock ; moving north - ld a,[wMapViewVRAMPointer] - sub a,$40 - ld [wMapViewVRAMPointer],a - jr nc,.adjustXCoordWithinBlock - ld a,[wMapViewVRAMPointer + 1] + ld a, [wMapViewVRAMPointer] + sub $40 + ld [wMapViewVRAMPointer], a + jr nc, .adjustXCoordWithinBlock + ld a, [wMapViewVRAMPointer + 1] dec a - and a,$03 - or a,$98 - ld [wMapViewVRAMPointer + 1],a + and $03 + or $98 + ld [wMapViewVRAMPointer + 1], a .adjustXCoordWithinBlock - ld a,c + ld a, c and a - jr z,.pointlessJump ; mistake? + jr z, .pointlessJump ; mistake? .pointlessJump - ld hl,wXBlockCoord - ld a,[hl] + ld hl, wXBlockCoord + ld a, [hl] add c - ld [hl],a - cp a,$02 - jr nz,.checkForMoveToWestBlock + ld [hl], a + cp $02 + jr nz, .checkForMoveToWestBlock ; moved into the tile block to the east xor a - ld [hl],a - ld hl,wXOffsetSinceLastSpecialWarp + ld [hl], a + ld hl, wXOffsetSinceLastSpecialWarp inc [hl] - ld de,wCurrentTileBlockMapViewPointer + ld de, wCurrentTileBlockMapViewPointer call MoveTileBlockMapPointerEast jr .updateMapView .checkForMoveToWestBlock - cp a,$ff - jr nz,.adjustYCoordWithinBlock + cp $ff + jr nz, .adjustYCoordWithinBlock ; moved into the tile block to the west - ld a,$01 - ld [hl],a - ld hl,wXOffsetSinceLastSpecialWarp + ld a, $01 + ld [hl], a + ld hl, wXOffsetSinceLastSpecialWarp dec [hl] - ld de,wCurrentTileBlockMapViewPointer + ld de, wCurrentTileBlockMapViewPointer call MoveTileBlockMapPointerWest jr .updateMapView .adjustYCoordWithinBlock - ld hl,wYBlockCoord - ld a,[hl] + ld hl, wYBlockCoord + ld a, [hl] add b - ld [hl],a - cp a,$02 - jr nz,.checkForMoveToNorthBlock + ld [hl], a + cp $02 + jr nz, .checkForMoveToNorthBlock ; moved into the tile block to the south xor a - ld [hl],a - ld hl,wYOffsetSinceLastSpecialWarp + ld [hl], a + ld hl, wYOffsetSinceLastSpecialWarp inc [hl] - ld de,wCurrentTileBlockMapViewPointer - ld a,[wCurMapWidth] + ld de, wCurrentTileBlockMapViewPointer + ld a, [wCurMapWidth] call MoveTileBlockMapPointerSouth jr .updateMapView .checkForMoveToNorthBlock - cp a,$ff - jr nz,.updateMapView + cp $ff + jr nz, .updateMapView ; moved into the tile block to the north - ld a,$01 - ld [hl],a - ld hl,wYOffsetSinceLastSpecialWarp + ld a, $01 + ld [hl], a + ld hl, wYOffsetSinceLastSpecialWarp dec [hl] - ld de,wCurrentTileBlockMapViewPointer - ld a,[wCurMapWidth] + ld de, wCurrentTileBlockMapViewPointer + ld a, [wCurMapWidth] call MoveTileBlockMapPointerNorth .updateMapView call LoadCurrentMapView - ld a,[wSpriteStateData1 + 3] ; delta Y - cp a,$01 - jr nz,.checkIfMovingNorth2 + ld a, [wSpriteStateData1 + 3] ; delta Y + cp $01 + jr nz, .checkIfMovingNorth2 ; if moving south call ScheduleSouthRowRedraw jr .scrollBackgroundAndSprites .checkIfMovingNorth2 - cp a,$ff - jr nz,.checkIfMovingEast2 + cp $ff + jr nz, .checkIfMovingEast2 ; if moving north call ScheduleNorthRowRedraw jr .scrollBackgroundAndSprites .checkIfMovingEast2 - ld a,[wSpriteStateData1 + 5] ; delta X - cp a,$01 - jr nz,.checkIfMovingWest2 + ld a, [wSpriteStateData1 + 5] ; delta X + cp $01 + jr nz, .checkIfMovingWest2 ; if moving east call ScheduleEastColumnRedraw jr .scrollBackgroundAndSprites .checkIfMovingWest2 - cp a,$ff - jr nz,.scrollBackgroundAndSprites + cp $ff + jr nz, .scrollBackgroundAndSprites ; if moving west call ScheduleWestColumnRedraw .scrollBackgroundAndSprites - ld a,[wSpriteStateData1 + 3] ; delta Y - ld b,a - ld a,[wSpriteStateData1 + 5] ; delta X - ld c,a + ld a, [wSpriteStateData1 + 3] ; delta Y + ld b, a + ld a, [wSpriteStateData1 + 5] ; delta X + ld c, a sla b sla c - ld a,[hSCY] + ld a, [hSCY] add b - ld [hSCY],a ; update background scroll Y - ld a,[hSCX] + ld [hSCY], a ; update background scroll Y + ld a, [hSCX] add c - ld [hSCX],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 - ld a,[wNumSprites] ; number of sprites + ld hl, wSpriteStateData1 + $14 + ld a, [wNumSprites] ; number of sprites and a ; are there any sprites? - jr z,.done - ld e,a + jr z, .done + ld e, a .spriteShiftLoop - ld a,[hl] + ld a, [hl] sub b - ld [hli],a + ld [hli], a inc l - ld a,[hl] + ld a, [hl] sub c - ld [hl],a - ld a,$0e + ld [hl], a + ld a, $0e add l - ld l,a + ld l, a dec e - jr nz,.spriteShiftLoop + jr nz, .spriteShiftLoop .done ret @@ -1679,51 +1679,51 @@ AdvancePlayerSprite:: ; corner of the tile block map in the direction of motion MoveTileBlockMapPointerEast:: - ld a,[de] - add a,$01 - ld [de],a + ld a, [de] + add $01 + ld [de], a ret nc inc de - ld a,[de] + ld a, [de] inc a - ld [de],a + ld [de], a ret MoveTileBlockMapPointerWest:: - ld a,[de] - sub a,$01 - ld [de],a + ld a, [de] + sub $01 + ld [de], a ret nc inc de - ld a,[de] + ld a, [de] dec a - ld [de],a + ld [de], a ret MoveTileBlockMapPointerSouth:: - add a,MAP_BORDER * 2 - ld b,a - ld a,[de] + add MAP_BORDER * 2 + ld b, a + ld a, [de] add b - ld [de],a + ld [de], a ret nc inc de - ld a,[de] + ld a, [de] inc a - ld [de],a + ld [de], a ret MoveTileBlockMapPointerNorth:: - add a,MAP_BORDER * 2 - ld b,a - ld a,[de] + add MAP_BORDER * 2 + ld b, a + ld a, [de] sub b - ld [de],a + ld [de], a ret nc inc de - ld a,[de] + ld a, [de] dec a - ld [de],a + ld [de], a ret ; the following 6 functions are used to tell the V-blank handler to redraw @@ -1732,196 +1732,196 @@ MoveTileBlockMapPointerNorth:: ScheduleNorthRowRedraw:: coord hl, 0, 0 call CopyToRedrawRowOrColumnSrcTiles - ld a,[wMapViewVRAMPointer] - ld [hRedrawRowOrColumnDest],a - ld a,[wMapViewVRAMPointer + 1] - ld [hRedrawRowOrColumnDest + 1],a - ld a,REDRAW_ROW - ld [hRedrawRowOrColumnMode],a + ld a, [wMapViewVRAMPointer] + ld [hRedrawRowOrColumnDest], a + ld a, [wMapViewVRAMPointer + 1] + ld [hRedrawRowOrColumnDest + 1], a + ld a, REDRAW_ROW + ld [hRedrawRowOrColumnMode], a ret CopyToRedrawRowOrColumnSrcTiles:: - ld de,wRedrawRowOrColumnSrcTiles - ld c,2 * SCREEN_WIDTH + ld de, wRedrawRowOrColumnSrcTiles + ld c, 2 * SCREEN_WIDTH .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.loop + jr nz, .loop ret ScheduleSouthRowRedraw:: coord hl, 0, 16 call CopyToRedrawRowOrColumnSrcTiles - ld a,[wMapViewVRAMPointer] - ld l,a - ld a,[wMapViewVRAMPointer + 1] - ld h,a - ld bc,$0200 - add hl,bc - ld a,h + ld a, [wMapViewVRAMPointer] + ld l, a + ld a, [wMapViewVRAMPointer + 1] + ld h, a + ld bc, $0200 + add hl, bc + ld a, h and $03 or $98 - ld [hRedrawRowOrColumnDest + 1],a - ld a,l - ld [hRedrawRowOrColumnDest],a - ld a,REDRAW_ROW - ld [hRedrawRowOrColumnMode],a + ld [hRedrawRowOrColumnDest + 1], a + ld a, l + ld [hRedrawRowOrColumnDest], a + ld a, REDRAW_ROW + ld [hRedrawRowOrColumnMode], a ret ScheduleEastColumnRedraw:: coord hl, 18, 0 call ScheduleColumnRedrawHelper - ld a,[wMapViewVRAMPointer] - ld c,a + ld a, [wMapViewVRAMPointer] + ld c, a and $e0 - ld b,a - ld a,c + ld b, a + ld a, c add 18 and $1f or b - ld [hRedrawRowOrColumnDest],a - ld a,[wMapViewVRAMPointer + 1] - ld [hRedrawRowOrColumnDest + 1],a - ld a,REDRAW_COL - ld [hRedrawRowOrColumnMode],a + ld [hRedrawRowOrColumnDest], a + ld a, [wMapViewVRAMPointer + 1] + ld [hRedrawRowOrColumnDest + 1], a + ld a, REDRAW_COL + ld [hRedrawRowOrColumnMode], a ret ScheduleColumnRedrawHelper:: - ld de,wRedrawRowOrColumnSrcTiles - ld c,SCREEN_HEIGHT + ld de, wRedrawRowOrColumnSrcTiles + ld c, SCREEN_HEIGHT .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de - ld a,[hl] - ld [de],a + ld a, [hl] + ld [de], a inc de - ld a,19 + ld a, 19 add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry dec c - jr nz,.loop + jr nz, .loop ret ScheduleWestColumnRedraw:: coord hl, 0, 0 call ScheduleColumnRedrawHelper - ld a,[wMapViewVRAMPointer] - ld [hRedrawRowOrColumnDest],a - ld a,[wMapViewVRAMPointer + 1] - ld [hRedrawRowOrColumnDest + 1],a - ld a,REDRAW_COL - ld [hRedrawRowOrColumnMode],a + ld a, [wMapViewVRAMPointer] + ld [hRedrawRowOrColumnDest], a + ld a, [wMapViewVRAMPointer + 1] + ld [hRedrawRowOrColumnDest + 1], a + ld a, REDRAW_COL + ld [hRedrawRowOrColumnMode], a ret ; function to write the tiles that make up a tile block to memory ; Input: c = tile block ID, hl = destination address DrawTileBlock:: push hl - ld a,[wTilesetBlocksPtr] ; pointer to tiles - ld l,a - ld a,[wTilesetBlocksPtr + 1] - ld h,a - ld a,c + ld a, [wTilesetBlocksPtr] ; pointer to tiles + ld l, a + ld a, [wTilesetBlocksPtr + 1] + ld h, a + ld a, c swap a - ld b,a + ld b, a and $f0 - ld c,a - ld a,b + ld c, a + ld a, b and $0f - ld b,a ; bc = tile block ID * 0x10 - add hl,bc - ld d,h - ld e,l ; de = address of the tile block's tiles + ld b, a ; bc = tile block ID * 0x10 + add hl, bc + ld d, h + ld e, l ; de = address of the tile block's tiles pop hl - ld c,$04 ; 4 loop iterations + ld c, $04 ; 4 loop iterations .loop ; each loop iteration, write 4 tile numbers push bc - ld a,[de] - ld [hli],a + ld a, [de] + ld [hli], a inc de - ld a,[de] - ld [hli],a + ld a, [de] + ld [hli], a inc de - ld a,[de] - ld [hli],a + ld a, [de] + ld [hli], a inc de - ld a,[de] - ld [hl],a + ld a, [de] + ld [hl], a inc de - ld bc,$0015 - add hl,bc + ld bc, $0015 + add hl, bc pop bc dec c - jr nz,.loop + jr nz, .loop ret ; function to update joypad state and simulate button presses JoypadOverworld:: xor a - ld [wSpriteStateData1 + 3],a - ld [wSpriteStateData1 + 5],a + ld [wSpriteStateData1 + 3], a + ld [wSpriteStateData1 + 5], a call RunMapScript call Joypad - ld a,[wFlags_D733] - bit 3,a ; check if a trainer wants a challenge - jr nz,.notForcedDownwards - ld a,[wCurMap] + ld a, [wFlags_D733] + bit 3, a ; check if a trainer wants a challenge + jr nz, .notForcedDownwards + ld a, [wCurMap] cp ROUTE_17 ; Cycling Road - jr nz,.notForcedDownwards - ld a,[hJoyHeld] + jr nz, .notForcedDownwards + ld a, [hJoyHeld] and D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON - jr nz,.notForcedDownwards - ld a,D_DOWN - ld [hJoyHeld],a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press + jr nz, .notForcedDownwards + ld a, D_DOWN + ld [hJoyHeld], a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press .notForcedDownwards - ld a,[wd730] - bit 7,a + ld a, [wd730] + bit 7, a ret z ; if simulating button presses - ld a,[hJoyHeld] - ld b,a - ld a,[wOverrideSimulatedJoypadStatesMask] ; bit mask for button presses that override simulated ones + ld a, [hJoyHeld] + ld b, a + 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,wSimulatedJoypadStatesIndex + 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,wSimulatedJoypadStatesEnd + ld a, [hl] + cp $ff + jr z, .doneSimulating ; if the end of the simulated button presses has been reached + ld hl, wSimulatedJoypadStatesEnd add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry - ld a,[hl] - ld [hJoyHeld],a ; store simulated button press in joypad state + ld a, [hl] + ld [hJoyHeld], a ; store simulated button press in joypad state and a ret nz - ld [hJoyPressed],a - ld [hJoyReleased],a + ld [hJoyPressed], a + ld [hJoyReleased], a ret ; if done simulating button presses .doneSimulating xor a - ld [wWastedByteCD3A],a - ld [wSimulatedJoypadStatesIndex],a - ld [wSimulatedJoypadStatesEnd],a - ld [wJoyIgnore],a - ld [hJoyHeld],a - ld hl,wd736 - ld a,[hl] + ld [wWastedByteCD3A], a + ld [wSimulatedJoypadStatesIndex], a + ld [wSimulatedJoypadStatesEnd], a + ld [wJoyIgnore], a + ld [hJoyHeld], a + ld hl, wd736 + ld a, [hl] and $f8 - ld [hl],a - ld hl,wd730 - res 7,[hl] + ld [hl], a + ld hl, wd730 + res 7, [hl] ret ; function to check the tile ahead to determine if the character should get on land or keep surfing @@ -1934,43 +1934,43 @@ JoypadOverworld:: ; and 2429 always sets c to 0xF0. There is no 0xF0 background tile, so it ; is considered impassable and it is detected as a collision. CollisionCheckOnWater:: - ld a,[wd730] - bit 7,a - jp nz,.noCollision ; return and clear carry if button presses are being simulated - ld a,[wPlayerDirection] ; the direction that the player is trying to go in - ld d,a - ld a,[wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) + ld a, [wd730] + bit 7, a + jp nz, .noCollision ; return and clear carry if button presses are being simulated + ld a, [wPlayerDirection] ; the direction that the player is trying to go in + ld d, a + ld a, [wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) and d ; check if a sprite is in the direction the player is trying to go - jr nz,.checkIfNextTileIsPassable ; bug? - ld hl,TilePairCollisionsWater + jr nz, .checkIfNextTileIsPassable ; bug? + ld hl, TilePairCollisionsWater call CheckForJumpingAndTilePairCollisions - jr c,.collision + jr c, .collision 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) - jr z,.checkIfVermilionDockTileset - cp a,$48 ; tile on right on coast lines in Safari Zone - jr z,.noCollision ; keep surfing + ld a, [wTileInFrontOfPlayer] ; tile in front of player + cp $14 ; water tile + jr z, .noCollision ; keep surfing if it's a water tile + cp $32 ; either the left tile of the S.S. Anne boarding platform or the tile on eastern coastlines (depending on the current tileset) + jr z, .checkIfVermilionDockTileset + cp $48 ; tile on right on coast lines in Safari Zone + jr z, .noCollision ; keep surfing ; check if the [land] tile in front of the player is passable .checkIfNextTileIsPassable - ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles - ld a,[hli] - ld h,[hl] - ld l,a + ld hl, wTilesetCollisionPtr ; pointer to list of passable tiles + ld a, [hli] + ld h, [hl] + ld l, a .loop - ld a,[hli] - cp a,$ff - jr z,.collision + ld a, [hli] + cp $ff + jr z, .collision cp c - jr z,.stopSurfing ; stop surfing if the tile is passable + jr z, .stopSurfing ; stop surfing if the tile is passable jr .loop .collision - ld a,[wChannelSoundIDs + Ch4] + ld a, [wChannelSoundIDs + Ch4] cp SFX_COLLISION ; check if collision sound is already playing - jr z,.setCarry - ld a,SFX_COLLISION + jr z, .setCarry + ld a, SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry scf @@ -1981,7 +1981,7 @@ CollisionCheckOnWater:: ret .stopSurfing xor a - ld [wWalkBikeSurfState],a + ld [wWalkBikeSurfState], a call LoadPlayerSpriteGraphics call PlayDefaultMusic jr .noCollision @@ -1997,40 +1997,40 @@ RunMapScript:: push de push bc callba TryPushingBoulder - ld a,[wFlags_0xcd60] - bit 1,a ; play boulder dust animation - jr z,.afterBoulderEffect + ld a, [wFlags_0xcd60] + bit 1, a ; play boulder dust animation + jr z, .afterBoulderEffect callba DoBoulderDustAnimation .afterBoulderEffect pop bc pop de pop hl call RunNPCMovementScript - ld a,[wCurMap] ; current map number + ld a, [wCurMap] ; current map number call SwitchToMapRomBank ; change to the ROM bank the map's data is in - ld hl,wMapScriptPtr - ld a,[hli] - ld h,[hl] - ld l,a - ld de,.return + ld hl, wMapScriptPtr + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .return push de - jp [hl] ; jump to script + jp hl ; jump to script .return ret LoadWalkingPlayerSpriteGraphics:: - ld de,RedSprite - ld hl,vNPCSprites + ld de, RedSprite + ld hl, vNPCSprites jr LoadPlayerSpriteGraphicsCommon LoadSurfingPlayerSpriteGraphics:: - ld de,SeelSprite - ld hl,vNPCSprites + ld de, SeelSprite + ld hl, vNPCSprites jr LoadPlayerSpriteGraphicsCommon LoadBikePlayerSpriteGraphics:: - ld de,RedCyclingSprite - ld hl,vNPCSprites + ld de, RedCyclingSprite + ld hl, vNPCSprites LoadPlayerSpriteGraphicsCommon:: push de @@ -2039,321 +2039,321 @@ LoadPlayerSpriteGraphicsCommon:: call CopyVideoData pop hl pop de - ld a,$c0 + ld a, $c0 add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry - set 3,h + set 3, h lb bc, BANK(RedSprite), $0c jp CopyVideoData ; function to load data from the map header LoadMapHeader:: callba MarkTownVisitedAndLoadMissableObjects - ld a,[wCurMapTileset] - ld [wUnusedD119],a - ld a,[wCurMap] + ld a, [wCurMapTileset] + ld [wUnusedD119], a + ld a, [wCurMap] call SwitchToMapRomBank - ld a,[wCurMapTileset] - ld b,a - res 7,a - ld [wCurMapTileset],a - ld [hPreviousTileset],a - bit 7,b + ld a, [wCurMapTileset] + ld b, a + res 7, a + ld [wCurMapTileset], a + ld [hPreviousTileset], a + bit 7, b ret nz - ld hl,MapHeaderPointers - ld a,[wCurMap] + ld hl, MapHeaderPointers + ld a, [wCurMap] sla a - jr nc,.noCarry1 + jr nc, .noCarry1 inc h .noCarry1 add l - ld l,a - jr nc,.noCarry2 + ld l, a + jr nc, .noCarry2 inc h .noCarry2 - ld a,[hli] - ld h,[hl] - ld l,a ; hl = base of map header + ld a, [hli] + ld h, [hl] + ld l, a ; hl = base of map header ; copy the first 10 bytes (the fixed area) of the map data to D367-D370 - ld de,wCurMapTileset - ld c,$0a + ld de, wCurMapTileset + ld c, $0a .copyFixedHeaderLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.copyFixedHeaderLoop + jr nz, .copyFixedHeaderLoop ; initialize all the connected maps to disabled at first, before loading the actual values - ld a,$ff - ld [wMapConn1Ptr],a - ld [wMapConn2Ptr],a - ld [wMapConn3Ptr],a - ld [wMapConn4Ptr],a + ld a, $ff + ld [wMapConn1Ptr], a + ld [wMapConn2Ptr], a + ld [wMapConn3Ptr], a + ld [wMapConn4Ptr], a ; copy connection data (if any) to WRAM - ld a,[wMapConnections] - ld b,a + ld a, [wMapConnections] + ld b, a .checkNorth - bit 3,b - jr z,.checkSouth - ld de,wMapConn1Ptr + bit 3, b + jr z, .checkSouth + ld de, wMapConn1Ptr call CopyMapConnectionHeader .checkSouth - bit 2,b - jr z,.checkWest - ld de,wMapConn2Ptr + bit 2, b + jr z, .checkWest + ld de, wMapConn2Ptr call CopyMapConnectionHeader .checkWest - bit 1,b - jr z,.checkEast - ld de,wMapConn3Ptr + bit 1, b + jr z, .checkEast + ld de, wMapConn3Ptr call CopyMapConnectionHeader .checkEast - bit 0,b - jr z,.getObjectDataPointer - ld de,wMapConn4Ptr + bit 0, b + jr z, .getObjectDataPointer + ld de, wMapConn4Ptr call CopyMapConnectionHeader .getObjectDataPointer - ld a,[hli] - ld [wObjectDataPointerTemp],a - ld a,[hli] - ld [wObjectDataPointerTemp + 1],a + ld a, [hli] + ld [wObjectDataPointerTemp], a + ld a, [hli] + ld [wObjectDataPointerTemp + 1], a push hl - ld a,[wObjectDataPointerTemp] - ld l,a - ld a,[wObjectDataPointerTemp + 1] - ld h,a ; hl = base of object data - ld de,wMapBackgroundTile - ld a,[hli] - ld [de],a + ld a, [wObjectDataPointerTemp] + ld l, a + ld a, [wObjectDataPointerTemp + 1] + ld h, a ; hl = base of object data + ld de, wMapBackgroundTile + ld a, [hli] + ld [de], a .loadWarpData - ld a,[hli] - ld [wNumberOfWarps],a + ld a, [hli] + ld [wNumberOfWarps], a and a - jr z,.loadSignData - ld c,a - ld de,wWarpEntries + jr z, .loadSignData + ld c, a + ld de, wWarpEntries .warpLoop ; one warp per loop iteration - ld b,$04 + ld b, $04 .warpInnerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec b - jr nz,.warpInnerLoop + jr nz, .warpInnerLoop dec c - jr nz,.warpLoop + jr nz, .warpLoop .loadSignData - ld a,[hli] ; number of signs - ld [wNumSigns],a + ld a, [hli] ; number of signs + ld [wNumSigns], a and a ; are there any signs? - jr z,.loadSpriteData ; if not, skip this - ld c,a - ld de,wSignTextIDs - ld a,d - ld [hSignCoordPointer],a - ld a,e - ld [hSignCoordPointer + 1],a - ld de,wSignCoords + jr z, .loadSpriteData ; if not, skip this + ld c, a + ld de, wSignTextIDs + ld a, d + ld [hSignCoordPointer], a + ld a, e + ld [hSignCoordPointer + 1], a + ld de, wSignCoords .signLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de push de - ld a,[hSignCoordPointer] - ld d,a - ld a,[hSignCoordPointer + 1] - ld e,a - ld a,[hli] - ld [de],a + ld a, [hSignCoordPointer] + ld d, a + ld a, [hSignCoordPointer + 1] + ld e, a + ld a, [hli] + ld [de], a inc de - ld a,d - ld [hSignCoordPointer],a - ld a,e - ld [hSignCoordPointer + 1],a + ld a, d + ld [hSignCoordPointer], a + ld a, e + ld [hSignCoordPointer + 1], a pop de dec c - jr nz,.signLoop + jr nz, .signLoop .loadSpriteData - ld a,[wd72e] - bit 5,a ; did a battle happen immediately before this? - jp nz,.finishUp ; if so, skip this because battles don't destroy this data - ld a,[hli] - ld [wNumSprites],a ; save the number of sprites + ld a, [wd72e] + bit 5, a ; did a battle happen immediately before this? + jp nz, .finishUp ; if so, skip this because battles don't destroy this data + ld a, [hli] + ld [wNumSprites], a ; save the number of sprites push hl ; zero C110-C1FF and C210-C2FF - ld hl,wSpriteStateData1 + $10 - ld de,wSpriteStateData2 + $10 + ld hl, wSpriteStateData1 + $10 + ld de, wSpriteStateData2 + $10 xor a - ld b,$f0 + ld b, $f0 .zeroSpriteDataLoop - ld [hli],a - ld [de],a + ld [hli], a + ld [de], a inc e dec b - jr nz,.zeroSpriteDataLoop + jr nz, .zeroSpriteDataLoop ; initialize all C100-C1FF sprite entries to disabled (other than player's) - ld hl,wSpriteStateData1 + $12 - ld de,$0010 - ld c,$0f + ld hl, wSpriteStateData1 + $12 + ld de, $0010 + ld c, $0f .disableSpriteEntriesLoop - ld [hl],$ff - add hl,de + ld [hl], $ff + add hl, de dec c - jr nz,.disableSpriteEntriesLoop + jr nz, .disableSpriteEntriesLoop pop hl - ld de,wSpriteStateData1 + $10 - ld a,[wNumSprites] ; number of sprites + ld de, wSpriteStateData1 + $10 + ld a, [wNumSprites] ; number of sprites and a ; are there any sprites? - jp z,.finishUp ; if there are no sprites, skip the rest - ld b,a - ld c,$00 + jp z, .finishUp ; if there are no sprites, skip the rest + ld b, a + ld c, $00 .loadSpriteLoop - ld a,[hli] - ld [de],a ; store picture ID at C1X0 + ld a, [hli] + ld [de], a ; store picture ID at C1X0 inc d - ld a,$04 + ld a, $04 add e - ld e,a - ld a,[hli] - ld [de],a ; store Y position at C2X4 + ld e, a + ld a, [hli] + ld [de], a ; store Y position at C2X4 inc e - ld a,[hli] - ld [de],a ; store X position at C2X5 + ld a, [hli] + ld [de], a ; store X position at C2X5 inc e - ld a,[hli] - ld [de],a ; store movement byte 1 at C2X6 - ld a,[hli] - ld [hLoadSpriteTemp1],a ; save movement byte 2 - ld a,[hli] - ld [hLoadSpriteTemp2],a ; save text ID and flags byte + ld a, [hli] + ld [de], a ; store movement byte 1 at C2X6 + ld a, [hli] + ld [hLoadSpriteTemp1], a ; save movement byte 2 + ld a, [hli] + ld [hLoadSpriteTemp2], a ; save text ID and flags byte push bc push hl - ld b,$00 - ld hl,wMapSpriteData - add hl,bc - ld a,[hLoadSpriteTemp1] - ld [hli],a ; store movement byte 2 in byte 0 of sprite entry - ld a,[hLoadSpriteTemp2] - ld [hl],a ; this appears pointless, since the value is overwritten immediately after - ld a,[hLoadSpriteTemp2] - ld [hLoadSpriteTemp1],a - and a,$3f - ld [hl],a ; store text ID in byte 1 of sprite entry + ld b, $00 + ld hl, wMapSpriteData + add hl, bc + ld a, [hLoadSpriteTemp1] + ld [hli], a ; store movement byte 2 in byte 0 of sprite entry + ld a, [hLoadSpriteTemp2] + ld [hl], a ; this appears pointless, since the value is overwritten immediately after + ld a, [hLoadSpriteTemp2] + ld [hLoadSpriteTemp1], a + and $3f + ld [hl], a ; store text ID in byte 1 of sprite entry pop hl - ld a,[hLoadSpriteTemp1] - bit 6,a - jr nz,.trainerSprite - bit 7,a - jr nz,.itemBallSprite + ld a, [hLoadSpriteTemp1] + bit 6, a + jr nz, .trainerSprite + bit 7, a + jr nz, .itemBallSprite jr .regularSprite .trainerSprite - ld a,[hli] - ld [hLoadSpriteTemp1],a ; save trainer class - ld a,[hli] - ld [hLoadSpriteTemp2],a ; save trainer number (within class) + ld a, [hli] + ld [hLoadSpriteTemp1], a ; save trainer class + ld a, [hli] + ld [hLoadSpriteTemp2], a ; save trainer number (within class) push hl - ld hl,wMapSpriteExtraData - add hl,bc - ld a,[hLoadSpriteTemp1] - ld [hli],a ; store trainer class in byte 0 of the entry - ld a,[hLoadSpriteTemp2] - ld [hl],a ; store trainer number in byte 1 of the entry + ld hl, wMapSpriteExtraData + add hl, bc + ld a, [hLoadSpriteTemp1] + ld [hli], a ; store trainer class in byte 0 of the entry + ld a, [hLoadSpriteTemp2] + ld [hl], a ; store trainer number in byte 1 of the entry pop hl jr .nextSprite .itemBallSprite - ld a,[hli] - ld [hLoadSpriteTemp1],a ; save item number + ld a, [hli] + ld [hLoadSpriteTemp1], a ; save item number push hl - ld hl,wMapSpriteExtraData - add hl,bc - ld a,[hLoadSpriteTemp1] - ld [hli],a ; store item number in byte 0 of the entry + ld hl, wMapSpriteExtraData + add hl, bc + ld a, [hLoadSpriteTemp1] + ld [hli], a ; store item number in byte 0 of the entry xor a - ld [hl],a ; zero byte 1, since it is not used + ld [hl], a ; zero byte 1, since it is not used pop hl jr .nextSprite .regularSprite push hl - ld hl,wMapSpriteExtraData - add hl,bc + ld hl, wMapSpriteExtraData + add hl, bc ; zero both bytes, since regular sprites don't use this extra space xor a - ld [hli],a - ld [hl],a + ld [hli], a + ld [hl], a pop hl .nextSprite pop bc dec d - ld a,$0a + ld a, $0a add e - ld e,a + ld e, a inc c inc c dec b - jp nz,.loadSpriteLoop + jp nz, .loadSpriteLoop .finishUp 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,[wCurMapHeight] ; map height in 4x4 tile blocks + ld a, [wCurMapHeight] ; map height in 4x4 tile blocks add a ; double it - ld [wCurrentMapHeight2],a ; store map height in 2x2 tile blocks - ld a,[wCurMapWidth] ; map width in 4x4 tile blocks + ld [wCurrentMapHeight2], a ; store map height in 2x2 tile blocks + ld a, [wCurMapWidth] ; map width in 4x4 tile blocks add a ; double it - ld [wCurrentMapWidth2],a ; map width in 2x2 tile blocks - ld a,[wCurMap] - ld c,a - ld b,$00 - ld a,[H_LOADEDROMBANK] + ld [wCurrentMapWidth2], a ; map width in 2x2 tile blocks + ld a, [wCurMap] + ld c, a + ld b, $00 + ld a, [H_LOADEDROMBANK] push af ld a, BANK(MapSongBanks) - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ld hl, MapSongBanks - add hl,bc - add hl,bc - ld a,[hli] - ld [wMapMusicSoundID],a ; music 1 - ld a,[hl] - ld [wMapMusicROMBank],a ; music 2 + add hl, bc + add hl, bc + ld a, [hli] + ld [wMapMusicSoundID], a ; music 1 + ld a, [hl] + ld [wMapMusicROMBank], a ; music 2 pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; function to copy map connection data from ROM to WRAM ; Input: hl = source, de = destination CopyMapConnectionHeader:: - ld c,$0b + ld c, $0b .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.loop + jr nz, .loop ret ; function to load map data LoadMapData:: - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af call DisableLCD - ld a,$98 - ld [wMapViewVRAMPointer + 1],a + ld a, $98 + ld [wMapViewVRAMPointer + 1], a xor a - ld [wMapViewVRAMPointer],a - ld [hSCY],a - ld [hSCX],a - ld [wWalkCounter],a - ld [wUnusedD119],a - ld [wWalkBikeSurfStateCopy],a - ld [wSpriteSetID],a + ld [wMapViewVRAMPointer], a + ld [hSCY], a + ld [hSCX], a + ld [wWalkCounter], a + ld [wUnusedD119], a + ld [wWalkBikeSurfStateCopy], a + ld [wSpriteSetID], a call LoadTextBoxTilePatterns call LoadMapHeader callba InitMapSprites ; load tile pattern data for sprites @@ -2362,42 +2362,42 @@ LoadMapData:: call LoadCurrentMapView ; copy current map view to VRAM coord hl, 0, 0 - ld de,vBGMap0 - ld b,18 + ld de, vBGMap0 + ld b, 18 .vramCopyLoop - ld c,20 + ld c, 20 .vramCopyInnerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc e dec c - jr nz,.vramCopyInnerLoop - ld a,32 - 20 + jr nz, .vramCopyInnerLoop + ld a, 32 - 20 add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry dec b - jr nz,.vramCopyLoop - ld a,$01 - ld [wUpdateSpritesEnabled],a + jr nz, .vramCopyLoop + ld a, $01 + ld [wUpdateSpritesEnabled], a call EnableLCD ld b, SET_PAL_OVERWORLD call RunPaletteCommand call LoadPlayerSpriteGraphics - ld a,[wd732] - and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp - jr nz,.restoreRomBank - ld a,[wFlags_D733] - bit 1,a - jr nz,.restoreRomBank + ld a, [wd732] + and 1 << 4 | 1 << 3 ; fly warp or dungeon warp + jr nz, .restoreRomBank + ld a, [wFlags_D733] + bit 1, a + jr nz, .restoreRomBank call UpdateMusic6Times call PlayDefaultMusicFadeOutCurrent .restoreRomBank pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ret ; function to switch to the ROM bank that a map is stored in @@ -2405,18 +2405,18 @@ LoadMapData:: SwitchToMapRomBank:: push hl push bc - ld c,a - ld b,$00 - ld a,Bank(MapHeaderBanks) + ld c, a + ld b, $00 + ld a, Bank(MapHeaderBanks) call BankswitchHome ; switch to ROM bank 3 - ld hl,MapHeaderBanks - add hl,bc - ld a,[hl] - ld [$ffe8],a ; save map ROM bank + ld hl, MapHeaderBanks + add hl, bc + ld a, [hl] + ld [$ffe8], a ; save map ROM bank call BankswitchBack - ld a,[$ffe8] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a ; switch to map ROM bank + ld a, [$ffe8] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a ; switch to map ROM bank pop bc pop hl ret diff --git a/home/predef.asm b/home/predef.asm index 2fac9aca..9bb9be74 100644 --- a/home/predef.asm +++ b/home/predef.asm @@ -24,7 +24,7 @@ Predef:: ld de, .done push de - jp [hl] + jp hl .done pop af diff --git a/home/text.asm b/home/text.asm index b983f609..9db81530 100644 --- a/home/text.asm +++ b/home/text.asm @@ -18,7 +18,7 @@ TextBoxBorder:: .next push hl ld a, "│" - ld [hli],a + ld [hli], a ld a, " " call NPlaceChar ld [hl], "│" @@ -49,12 +49,12 @@ NPlaceChar:: PlaceString:: push hl PlaceNextChar:: - ld a,[de] + ld a, [de] cp "@" jr nz, Char4ETest - ld b,h - ld c,l + ld b, h + ld c, l pop hl ret @@ -62,19 +62,19 @@ Char4ETest:: cp $4E ; next jr nz, .char4FTest ld bc, 2 * SCREEN_WIDTH - ld a,[hFlags_0xFFF6] - bit 2,a - jr z,.ok - ld bc,SCREEN_WIDTH + ld a, [hFlags_0xFFF6] + bit 2, a + jr z, .ok + ld bc, SCREEN_WIDTH .ok pop hl - add hl,bc + add hl, bc push hl jp PlaceNextChar_inc .char4FTest cp $4F ; line - jr nz,.next3 + jr nz, .next3 pop hl coord hl, 1, 16 push hl @@ -111,17 +111,17 @@ endm dict $59, Char59 ; TARGET dict $5A, Char5A ; USER - ld [hli],a + ld [hli], a call PrintLetterDelay PlaceNextChar_inc:: inc de jp PlaceNextChar Char00:: - ld b,h - ld c,l + ld b, h + ld c, l pop hl - ld de,Char00Text + ld de, Char00Text dec de ret @@ -131,47 +131,47 @@ Char00Text:: ; “%d ERROR.” Char52:: ; player’s name push de - ld de,wPlayerName + ld de, wPlayerName jr FinishDTE Char53:: ; rival’s name push de - ld de,wRivalName + ld de, wRivalName jr FinishDTE Char5D:: ; TRAINER push de - ld de,Char5DText + ld de, Char5DText jr FinishDTE Char5C:: ; TM push de - ld de,Char5CText + ld de, Char5CText jr FinishDTE Char5B:: ; PC push de - ld de,Char5BText + ld de, Char5BText jr FinishDTE Char5E:: ; ROCKET push de - ld de,Char5EText + ld de, Char5EText jr FinishDTE Char54:: ; POKé push de - ld de,Char54Text + ld de, Char54Text jr FinishDTE Char56:: ; …… push de - ld de,Char56Text + ld de, Char56Text jr FinishDTE Char4A:: ; PKMN push de - ld de,Char4AText + ld de, Char4AText jr FinishDTE Char59:: @@ -180,7 +180,7 @@ Char59:: ; or ; player active monster’s name ; (like Char5A but flipped) - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] xor 1 jr MonsterNameCharsCommon @@ -189,26 +189,26 @@ Char5A:: ; player active monster’s name ; or ; enemy active monster’s name, prefixed with “Enemy ” - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] MonsterNameCharsCommon:: push de and a - jr nz,.Enemy - ld de,wBattleMonNick ; player active monster name + jr nz, .Enemy + ld de, wBattleMonNick ; player active monster name jr FinishDTE .Enemy ; print “Enemy ” - ld de,Char5AText + ld de, Char5AText call PlaceString - ld h,b - ld l,c - ld de,wEnemyMonNick ; enemy active monster name + ld h, b + ld l, c + ld de, wEnemyMonNick ; enemy active monster name FinishDTE:: call PlaceString - ld h,b - ld l,c + ld h, b + ld l, c pop de inc de jp PlaceNextChar @@ -232,12 +232,12 @@ Char4AText:: Char55:: push de - ld b,h - ld c,l - ld hl,Char55Text + ld b, h + ld c, l + ld hl, Char55Text call TextCommandProcessor - ld h,b - ld l,c + ld h, b + ld l, c pop de inc de jp PlaceNextChar @@ -249,12 +249,12 @@ Char55Text:: Char5F:: ; ends a Pokédex entry - ld [hl],"." + ld [hl], "." pop hl ret Char58:: ; prompt - ld a,[wLinkState] + ld a, [wLinkState] cp LINK_STATE_BATTLING jp z, .ok ld a, "▼" @@ -290,14 +290,14 @@ Char51:: ; para Char49:: push de - ld a,"▼" + ld a, "▼" Coorda 18, 16 call ProtectedDelay3 call ManualTextScroll coord hl, 1, 10 lb bc, 7, 18 call ClearScreenArea - ld c,20 + ld c, 20 call DelayFrames pop de pop hl @@ -306,7 +306,7 @@ Char49:: jp PlaceNextChar_inc Char4B:: - ld a,"▼" + ld a, "▼" Coorda 18, 16 call ProtectedDelay3 push de @@ -332,25 +332,25 @@ ScrollTextUpOneLine:: coord de, 0, 13 ; empty line above text ld b, SCREEN_WIDTH * 3 .copyText - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec b - jr nz,.copyText + jr nz, .copyText coord hl, 1, 16 ld a, " " - ld b,SCREEN_WIDTH - 2 + ld b, SCREEN_WIDTH - 2 .clearText - ld [hli],a + ld [hli], a dec b - jr nz,.clearText + jr nz, .clearText ; wait five frames - ld b,5 + ld b, 5 .WaitFrame call DelayFrame dec b - jr nz,.WaitFrame + jr nz, .WaitFrame ret @@ -361,33 +361,33 @@ ProtectedDelay3:: ret TextCommandProcessor:: - ld a,[wLetterPrintingDelayFlags] + ld a, [wLetterPrintingDelayFlags] push af - set 1,a - ld e,a + set 1, a + ld e, a ld a, [$fff4] xor e - ld [wLetterPrintingDelayFlags],a - ld a,c - ld [wTextDest],a - ld a,b - ld [wTextDest + 1],a + ld [wLetterPrintingDelayFlags], a + ld a, c + ld [wTextDest], a + ld a, b + ld [wTextDest + 1], a NextTextCommand:: - ld a,[hli] - cp a, "@" ; terminator - jr nz,.doTextCommand + ld a, [hli] + cp "@" ; terminator + jr nz, .doTextCommand pop af - ld [wLetterPrintingDelayFlags],a + ld [wLetterPrintingDelayFlags], a ret .doTextCommand push hl - cp a, $17 + cp $17 jp z, TextCommand17 - cp a, $0e - jp nc,TextCommand0B ; if a != 0x17 and a >= 0xE, go to command 0xB + cp $0e + jp nc, TextCommand0B ; if a != 0x17 and a >= 0xE, go to command 0xB ; if a < 0xE, use a jump table - ld hl,TextCommandJumpTable + ld hl, TextCommandJumpTable push bc add a ld b, 0 @@ -406,17 +406,17 @@ NextTextCommand:: ; CC = width TextCommand04:: pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] - ld b,a - ld a,[hli] - ld c,a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a push hl - ld h,d - ld l,e + ld h, d + ld l, e call TextBoxBorder pop hl jr NextTextCommand @@ -425,13 +425,13 @@ TextCommand04:: ; 00{string} TextCommand00:: pop hl - ld d,h - ld e,l - ld h,b - ld l,c + ld d, h + ld e, l + ld h, b + ld l, c call PlaceString - ld h,d - ld l,e + ld h, d + ld l, e inc hl jr NextTextCommand @@ -440,13 +440,13 @@ TextCommand00:: ; AAAA = address of string TextCommand01:: pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a push hl - ld h,b - ld l,c + ld h, b + ld l, c call PlaceString pop hl jr NextTextCommand @@ -459,18 +459,18 @@ TextCommand01:: ; bits 5-7 = unknown flags TextCommand02:: pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] push hl - ld h,b - ld l,c - ld c,a + ld h, b + ld l, c + ld c, a call PrintBCDNumber - ld b,h - ld c,l + ld b, h + ld c, l pop hl jr NextTextCommand @@ -479,12 +479,12 @@ TextCommand02:: ; AAAA = new destination address TextCommand03:: pop hl - ld a,[hli] - ld [wTextDest],a - ld c,a - ld a,[hli] - ld [wTextDest + 1],a - ld b,a + ld a, [hli] + ld [wTextDest], a + ld c, a + ld a, [hli] + ld [wTextDest + 1], a + ld b, a jp NextTextCommand ; repoint destination to second line of dialogue text box @@ -499,15 +499,15 @@ TextCommand05:: ; 06 ; (no arguments) TextCommand06:: - ld a,[wLinkState] - cp a,LINK_STATE_BATTLING - jp z,TextCommand0D - ld a,"▼" + ld a, [wLinkState] + cp LINK_STATE_BATTLING + jp z, TextCommand0D + ld a, "▼" Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box push bc call ManualTextScroll ; blink arrow and wait for A or B to be pressed pop bc - ld a," " + ld a, " " Coorda 18, 16 ; overwrite down arrow with blank space pop hl jp NextTextCommand @@ -528,7 +528,7 @@ TextCommand07:: ; 08{code} TextCommand08:: pop hl - ld de,NextTextCommand + ld de, NextTextCommand push de ; return address jp hl @@ -540,25 +540,25 @@ TextCommand08:: ; bits 4-7 = how long the number is in bytes TextCommand09:: pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] push hl - ld h,b - ld l,c - ld b,a - and a,$0f - ld c,a - ld a,b - and a,$f0 + ld h, b + ld l, c + ld b, a + and $0f + ld c, a + ld a, b + and $f0 swap a set BIT_LEFT_ALIGN,a - ld b,a + ld b, a call PrintNumber - ld b,h - ld c,l + ld b, h + ld c, l pop hl jp NextTextCommand @@ -568,10 +568,10 @@ TextCommand09:: TextCommand0A:: push bc call Joypad - ld a,[hJoyHeld] - and a,A_BUTTON | B_BUTTON - jr nz,.skipDelay - ld c,30 + ld a, [hJoyHeld] + and A_BUTTON | B_BUTTON + jr nz, .skipDelay + ld c, 30 call DelayFrames .skipDelay pop bc @@ -585,24 +585,24 @@ TextCommand0B:: pop hl push bc dec hl - ld a,[hli] - ld b,a ; b = command number that got us here + ld a, [hli] + ld b, a ; b = command number that got us here push hl - ld hl,TextCommandSounds + ld hl, TextCommandSounds .loop - ld a,[hli] + ld a, [hli] cp b - jr z,.matchFound + jr z, .matchFound inc hl jr .loop .matchFound - cp a,$14 - jr z,.pokemonCry - cp a,$15 - jr z,.pokemonCry - cp a,$16 - jr z,.pokemonCry - ld a,[hl] + cp $14 + jr z, .pokemonCry + cp $15 + jr z, .pokemonCry + cp $16 + jr z, .pokemonCry + ld a, [hl] call PlaySound call WaitForSoundToFinish pop hl @@ -610,7 +610,7 @@ TextCommand0B:: jp NextTextCommand .pokemonCry push de - ld a,[hl] + ld a, [hl] call PlayCry pop de pop hl @@ -635,27 +635,27 @@ TextCommandSounds:: ; AA = number of ellipses to draw TextCommand0C:: pop hl - ld a,[hli] - ld d,a + ld a, [hli] + ld d, a push hl - ld h,b - ld l,c + ld h, b + ld l, c .loop - ld a,"…" - ld [hli],a + ld a, "…" + ld [hli], a push de call Joypad pop de - ld a,[hJoyHeld] ; joypad state - and a,A_BUTTON | B_BUTTON - jr nz,.skipDelay ; if so, skip the delay - ld c,10 + ld a, [hJoyHeld] ; joypad state + and A_BUTTON | B_BUTTON + jr nz, .skipDelay ; if so, skip the delay + ld c, 10 call DelayFrames .skipDelay dec d - jr nz,.loop - ld b,h - ld c,l + jr nz, .loop + ld b, h + ld c, l pop hl jp NextTextCommand @@ -675,23 +675,23 @@ TextCommand0D:: ; BB = bank TextCommand17:: pop hl - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a push hl - ld l,e - ld h,d + ld l, e + ld h, d call TextCommandProcessor pop hl pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a jp NextTextCommand TextCommandJumpTable:: diff --git a/home/vcopy.asm b/home/vcopy.asm index 3fe19745..3f49ad3e 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -10,27 +10,27 @@ GetRowColAddressBgMap:: srl h rr a or l - ld l,a - ld a,b + ld l, a + ld a, b or h - ld h,a + ld h, a ret ; clears a VRAM background map with blank space tiles ; INPUT: h - high byte of background tile map address in VRAM ClearBgMap:: - ld a," " + ld a, " " jr .next - ld a,l + ld a, l .next - ld de,$400 ; size of VRAM background map - ld l,e + ld de, $400 ; size of VRAM background map + ld l, e .loop - ld [hli],a + ld [hli], a dec e - jr nz,.loop + jr nz, .loop dec d - jr nz,.loop + jr nz, .loop ret ; This function redraws a BG row of height 2 or a BG column of width 2. @@ -40,76 +40,76 @@ ClearBgMap:: ; However, this function is also called repeatedly to redraw the whole screen ; when necessary. It is also used in trade animation and elevator code. RedrawRowOrColumn:: - ld a,[hRedrawRowOrColumnMode] + ld a, [hRedrawRowOrColumnMode] and a ret z - ld b,a + ld b, a xor a - ld [hRedrawRowOrColumnMode],a + ld [hRedrawRowOrColumnMode], a dec b - jr nz,.redrawRow + jr nz, .redrawRow .redrawColumn - ld hl,wRedrawRowOrColumnSrcTiles - ld a,[hRedrawRowOrColumnDest] - ld e,a - ld a,[hRedrawRowOrColumnDest + 1] - ld d,a - ld c,SCREEN_HEIGHT + ld hl, wRedrawRowOrColumnSrcTiles + ld a, [hRedrawRowOrColumnDest] + ld e, a + ld a, [hRedrawRowOrColumnDest + 1] + ld d, a + ld c, SCREEN_HEIGHT .loop1 - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de - ld a,[hli] - ld [de],a - ld a,BG_MAP_WIDTH - 1 + ld a, [hli] + ld [de], a + ld a, BG_MAP_WIDTH - 1 add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry ; the following 4 lines wrap us from bottom to top if necessary - ld a,d - and a,$03 - or a,$98 - ld d,a + ld a, d + and $03 + or $98 + ld d, a dec c - jr nz,.loop1 + jr nz, .loop1 xor a - ld [hRedrawRowOrColumnMode],a + ld [hRedrawRowOrColumnMode], a ret .redrawRow - ld hl,wRedrawRowOrColumnSrcTiles - ld a,[hRedrawRowOrColumnDest] - ld e,a - ld a,[hRedrawRowOrColumnDest + 1] - ld d,a + ld hl, wRedrawRowOrColumnSrcTiles + ld a, [hRedrawRowOrColumnDest] + ld e, a + ld a, [hRedrawRowOrColumnDest + 1] + ld d, a push de call .DrawHalf ; draw upper half pop de - ld a,BG_MAP_WIDTH ; width of VRAM background map + ld a, BG_MAP_WIDTH ; width of VRAM background map add e - ld e,a + ld e, a ; fall through and draw lower half .DrawHalf - ld c,SCREEN_WIDTH / 2 + ld c, SCREEN_WIDTH / 2 .loop2 - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de - ld a,[hli] - ld [de],a - ld a,e + ld a, [hli] + ld [de], a + ld a, e inc a ; the following 6 lines wrap us from the right edge to the left edge if necessary - and a,$1f - ld b,a - ld a,e - and a,$e0 + and $1f + ld b, a + ld a, e + and $e0 or b - ld e,a + ld e, a dec c - jr nz,.loop2 + jr nz, .loop2 ret ; This function automatically transfers tile number data from the tile map at @@ -120,52 +120,52 @@ RedrawRowOrColumn:: ; the above function, RedrawRowOrColumn, is used when walking to ; improve efficiency. AutoBgMapTransfer:: - ld a,[H_AUTOBGTRANSFERENABLED] + ld a, [H_AUTOBGTRANSFERENABLED] and a ret z - ld hl,[sp + 0] - ld a,h - ld [H_SPTEMP],a - ld a,l - ld [H_SPTEMP + 1],a ; save stack pinter - ld a,[H_AUTOBGTRANSFERPORTION] + ld hl, sp + 0 + ld a, h + ld [H_SPTEMP], a + ld a, l + ld [H_SPTEMP + 1], a ; save stack pinter + ld a, [H_AUTOBGTRANSFERPORTION] and a - jr z,.transferTopThird + jr z, .transferTopThird dec a - jr z,.transferMiddleThird + jr z, .transferMiddleThird .transferBottomThird coord hl, 0, 12 - ld sp,hl - ld a,[H_AUTOBGTRANSFERDEST + 1] - ld h,a - ld a,[H_AUTOBGTRANSFERDEST] - ld l,a - ld de,(12 * 32) - add hl,de + ld sp, hl + ld a, [H_AUTOBGTRANSFERDEST + 1] + ld h, a + ld a, [H_AUTOBGTRANSFERDEST] + ld l, a + ld de, (12 * 32) + add hl, de xor a ; TRANSFERTOP jr .doTransfer .transferTopThird coord hl, 0, 0 - ld sp,hl - ld a,[H_AUTOBGTRANSFERDEST + 1] - ld h,a - ld a,[H_AUTOBGTRANSFERDEST] - ld l,a - ld a,TRANSFERMIDDLE + ld sp, hl + ld a, [H_AUTOBGTRANSFERDEST + 1] + ld h, a + ld a, [H_AUTOBGTRANSFERDEST] + ld l, a + ld a, TRANSFERMIDDLE jr .doTransfer .transferMiddleThird coord hl, 0, 6 - ld sp,hl - ld a,[H_AUTOBGTRANSFERDEST + 1] - ld h,a - ld a,[H_AUTOBGTRANSFERDEST] - ld l,a - ld de,(6 * 32) - add hl,de - ld a,TRANSFERBOTTOM + ld sp, hl + ld a, [H_AUTOBGTRANSFERDEST + 1] + ld h, a + ld a, [H_AUTOBGTRANSFERDEST] + ld l, a + ld de, (6 * 32) + add hl, de + ld a, TRANSFERBOTTOM .doTransfer - ld [H_AUTOBGTRANSFERPORTION],a ; store next portion - ld b,6 + ld [H_AUTOBGTRANSFERPORTION], a ; store next portion + ld b, 6 TransferBgRows:: ; unrolled loop and using pop for speed @@ -202,27 +202,27 @@ TransferBgRows:: ; Copies [H_VBCOPYBGNUMROWS] rows from H_VBCOPYBGSRC to H_VBCOPYBGDEST. ; If H_VBCOPYBGSRC is XX00, the transfer is disabled. VBlankCopyBgMap:: - ld a,[H_VBCOPYBGSRC] ; doubles as enabling byte + ld a, [H_VBCOPYBGSRC] ; doubles as enabling byte and a ret z - ld hl,[sp + 0] - ld a,h - ld [H_SPTEMP],a - ld a,l - ld [H_SPTEMP + 1],a ; save stack pointer - ld a,[H_VBCOPYBGSRC] - ld l,a - ld a,[H_VBCOPYBGSRC + 1] - ld h,a - ld sp,hl - ld a,[H_VBCOPYBGDEST] - ld l,a - ld a,[H_VBCOPYBGDEST + 1] - ld h,a - ld a,[H_VBCOPYBGNUMROWS] - ld b,a + ld hl, sp + 0 + ld a, h + ld [H_SPTEMP], a + ld a, l + ld [H_SPTEMP + 1], a ; save stack pointer + ld a, [H_VBCOPYBGSRC] + ld l, a + ld a, [H_VBCOPYBGSRC + 1] + ld h, a + ld sp, hl + ld a, [H_VBCOPYBGDEST] + ld l, a + ld a, [H_VBCOPYBGDEST + 1] + ld h, a + ld a, [H_VBCOPYBGNUMROWS] + ld b, a xor a - ld [H_VBCOPYBGSRC],a ; disable transfer so it doesn't continue next V-blank + ld [H_VBCOPYBGSRC], a ; disable transfer so it doesn't continue next V-blank jr TransferBgRows @@ -238,7 +238,7 @@ VBlankCopyDouble:: and a ret z - ld hl, [sp + 0] + ld hl, sp + 0 ld a, h ld [H_SPTEMP], a ld a, l @@ -290,7 +290,7 @@ VBlankCopyDouble:: ld a, h ld [H_VBCOPYDOUBLEDEST + 1], a - ld hl, [sp + 0] + ld hl, sp + 0 ld a, l ld [H_VBCOPYDOUBLESRC], a ld a, h @@ -316,7 +316,7 @@ VBlankCopy:: and a ret z - ld hl, [sp + 0] + ld hl, sp + 0 ld a, h ld [H_SPTEMP], a ld a, l @@ -360,7 +360,7 @@ VBlankCopy:: ld a, h ld [H_VBCOPYDEST + 1], a - ld hl, [sp + 0] + ld hl, sp + 0 ld a, l ld [H_VBCOPYSRC], a ld a, h diff --git a/hram.asm b/hram.asm index 9b7db62b..57c75e1c 100644 --- a/hram.asm +++ b/hram.asm @@ -98,7 +98,7 @@ hSwapTemp EQU $FF95 hExperience EQU $FF96 ; 3 bytes, big endian -; Multiplcation and division variables are meant +; Multiplication and division variables are meant ; to overlap for back-to-back usage. Big endian. H_MULTIPLICAND EQU $FF96 ; 3 bytes diff --git a/macros/data_macros.asm b/macros/data_macros.asm index e24ae20e..ee5cb8f0 100755 --- a/macros/data_macros.asm +++ b/macros/data_macros.asm @@ -118,6 +118,28 @@ object: MACRO ENDC ENDM +;\1 x position +;\2 y position +;\3 destination warp id +;\4 destination map (-1 = wLastMap) +warp: MACRO + db \2, \1, \3, \4 +ENDM + +;\1 x position +;\2 y position +;\3 sign id +sign: MACRO + db \2, \1, \3 +ENDM + +;\1 x position +;\2 y position +;\3 map width +warp_to: MACRO + EVENT_DISP \3, \2, \1 +ENDM + ;\1 (byte) = current map id ;\2 (byte) = connected map id ;\3 (byte) = x movement of connection strip @@ -146,7 +168,7 @@ ENDM ;\6 (flag) = add 3 to width of connection strip (why?) SOUTH_MAP_CONNECTION: MACRO db \2 ; map id - dw \5 + \4 ; "Conection Strip" location + dw \5 + \4 ; "Connection Strip" location dw wOverworldMap + 3 + (\1_HEIGHT + 3) * (\1_WIDTH + 6) + \3 ; current map position IF (\1_WIDTH < \2_WIDTH) IF (_NARG > 5) diff --git a/main.asm b/main.asm index d2a0bf72..0415dfdc 100755 --- a/main.asm +++ b/main.asm @@ -895,13 +895,12 @@ INCLUDE "engine/battle/trainer_ai.asm" INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm" TradingAnimationGraphics: - INCBIN "gfx/game_boy.norepeat.2bpp" - INCBIN "gfx/link_cable.2bpp" +INCBIN "gfx/game_boy.2bpp" +INCBIN "gfx/link_cable.2bpp" TradingAnimationGraphicsEnd: -TradingAnimationGraphics2: ; Pokeball traveling through the link cable. - INCBIN "gfx/trade2.2bpp" +TradingAnimationGraphics2: INCBIN "gfx/trade2.2bpp" TradingAnimationGraphics2End: INCLUDE "engine/evos_moves.asm" @@ -1536,38 +1535,32 @@ INCLUDE "scripts/route18.asm" INCLUDE "data/mapHeaders/fanclub.asm" INCLUDE "scripts/fanclub.asm" INCLUDE "data/mapObjects/fanclub.asm" -FanClubBlocks: - INCBIN "maps/fanclub.blk" +FanClubBlocks: INCBIN "maps/fanclub.blk" INCLUDE "data/mapHeaders/silphco2.asm" INCLUDE "scripts/silphco2.asm" INCLUDE "data/mapObjects/silphco2.asm" -SilphCo2Blocks: - INCBIN "maps/silphco2.blk" +SilphCo2Blocks: INCBIN "maps/silphco2.blk" INCLUDE "data/mapHeaders/silphco3.asm" INCLUDE "scripts/silphco3.asm" INCLUDE "data/mapObjects/silphco3.asm" -SilphCo3Blocks: - INCBIN "maps/silphco3.blk" +SilphCo3Blocks: INCBIN "maps/silphco3.blk" INCLUDE "data/mapHeaders/silphco10.asm" INCLUDE "scripts/silphco10.asm" INCLUDE "data/mapObjects/silphco10.asm" -SilphCo10Blocks: - INCBIN "maps/silphco10.blk" +SilphCo10Blocks: INCBIN "maps/silphco10.blk" INCLUDE "data/mapHeaders/lance.asm" INCLUDE "scripts/lance.asm" INCLUDE "data/mapObjects/lance.asm" -LanceBlocks: - INCBIN "maps/lance.blk" +LanceBlocks: INCBIN "maps/lance.blk" INCLUDE "data/mapHeaders/halloffameroom.asm" INCLUDE "scripts/halloffameroom.asm" INCLUDE "data/mapObjects/halloffameroom.asm" -HallofFameRoomBlocks: - INCBIN "maps/halloffameroom.blk" +HallofFameRoomBlocks: INCBIN "maps/halloffameroom.blk" INCLUDE "engine/overworld/saffron_guards.asm" @@ -1853,23 +1846,24 @@ INCLUDE "engine/hidden_object_functions18.asm" SECTION "bank19",ROMX,BANK[$19] -Overworld_GFX: INCBIN "gfx/tilesets/overworld.t2.2bpp" +Overworld_GFX: INCBIN "gfx/tilesets/overworld.2bpp" Overworld_Block: INCBIN "gfx/blocksets/overworld.bst" RedsHouse1_GFX: -RedsHouse2_GFX: INCBIN "gfx/tilesets/reds_house.t7.2bpp" +RedsHouse2_GFX: INCBIN "gfx/tilesets/reds_house.2bpp" + ds 16 RedsHouse1_Block: RedsHouse2_Block: INCBIN "gfx/blocksets/reds_house.bst" -House_GFX: INCBIN "gfx/tilesets/house.t2.2bpp" +House_GFX: INCBIN "gfx/tilesets/house.2bpp" House_Block: INCBIN "gfx/blocksets/house.bst" -Mansion_GFX: INCBIN "gfx/tilesets/mansion.t2.2bpp" +Mansion_GFX: INCBIN "gfx/tilesets/mansion.2bpp" Mansion_Block: INCBIN "gfx/blocksets/mansion.bst" -ShipPort_GFX: INCBIN "gfx/tilesets/ship_port.t2.2bpp" +ShipPort_GFX: INCBIN "gfx/tilesets/ship_port.2bpp" ShipPort_Block: INCBIN "gfx/blocksets/ship_port.bst" -Interior_GFX: INCBIN "gfx/tilesets/interior.t1.2bpp" +Interior_GFX: INCBIN "gfx/tilesets/interior.2bpp" Interior_Block: INCBIN "gfx/blocksets/interior.bst" -Plateau_GFX: INCBIN "gfx/tilesets/plateau.t10.2bpp" +Plateau_GFX: INCBIN "gfx/tilesets/plateau.2bpp" Plateau_Block: INCBIN "gfx/blocksets/plateau.bst" @@ -1898,7 +1892,7 @@ Pokecenter_Block: INCBIN "gfx/blocksets/pokecenter.bst" ForestGate_GFX: Museum_GFX: -Gate_GFX: INCBIN "gfx/tilesets/gate.t1.2bpp" +Gate_GFX: INCBIN "gfx/tilesets/gate.2bpp" ForestGate_Block: Museum_Block: Gate_Block: INCBIN "gfx/blocksets/gate.bst" @@ -1911,19 +1905,19 @@ Facility_Block: INCBIN "gfx/blocksets/facility.bst" SECTION "bank1B",ROMX,BANK[$1B] -Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.t4.2bpp" +Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.2bpp" Cemetery_Block: INCBIN "gfx/blocksets/cemetery.bst" -Cavern_GFX: INCBIN "gfx/tilesets/cavern.t14.2bpp" +Cavern_GFX: INCBIN "gfx/tilesets/cavern.2bpp" Cavern_Block: INCBIN "gfx/blocksets/cavern.bst" -Lobby_GFX: INCBIN "gfx/tilesets/lobby.t2.2bpp" +Lobby_GFX: INCBIN "gfx/tilesets/lobby.2bpp" Lobby_Block: INCBIN "gfx/blocksets/lobby.bst" -Ship_GFX: INCBIN "gfx/tilesets/ship.t6.2bpp" +Ship_GFX: INCBIN "gfx/tilesets/ship.2bpp" Ship_Block: INCBIN "gfx/blocksets/ship.bst" -Lab_GFX: INCBIN "gfx/tilesets/lab.t4.2bpp" +Lab_GFX: INCBIN "gfx/tilesets/lab.2bpp" Lab_Block: INCBIN "gfx/blocksets/lab.bst" -Club_GFX: INCBIN "gfx/tilesets/club.t5.2bpp" +Club_GFX: INCBIN "gfx/tilesets/club.2bpp" Club_Block: INCBIN "gfx/blocksets/club.bst" -Underground_GFX: INCBIN "gfx/tilesets/underground.t7.2bpp" +Underground_GFX: INCBIN "gfx/tilesets/underground.2bpp" Underground_Block: INCBIN "gfx/blocksets/underground.bst" diff --git a/pokered.link b/pokered.link new file mode 100644 index 00000000..5ec0c55a --- /dev/null +++ b/pokered.link @@ -0,0 +1,176 @@ +ROM0 + ORG $61 + "Home" + ORG $150 + "Main" + +ROMX $1 + "bank1" + +ROMX $2 + "Sound Effect Headers 1" ; AUDIO_1 +; "Music Headers 1" + "Sound Effects 1" + "Audio Engine 1" +; "Music 1" + +ROMX $3 + "bank3" + +ROMX $4 + "NPC Sprites 1" ; NPC_SPRITES_1 + "Graphics" ; GFX + "Battle (bank 4)" + +ROMX $5 + "NPC Sprites 2" ; NPC_SPRITES_2 + "Battle (bank 5)" + +ROMX $6 + "bank6" + +ROMX $7 + "bank7" + +ROMX $8 + "Sound Effect Headers 2" ; AUDIO_2 +; "Music Headers 2" + "Sound Effects 2" +; "Audio Engine 2" +; "Music 2" + +ROMX $9 + "Pics 1" ; PICS_1 + "Battle (bank 9)" + +ROMX $A + "Pics 2" ; PICS_2 + "Battle (bank A)" + +ROMX $B + "Pics 3" ; PICS_3 + "Battle (bank B)" + +ROMX $C + "Pics 4" ; PICS_4 + "Battle (bank C)" + +ROMX $D + "Pics 5" ; PICS_5 + "Battle (bank D)" + +ROMX $E + "bankE" + +ROMX $F + "bankF" + +ROMX $10 + "bank10" + +ROMX $11 + "bank11" + +ROMX $12 + "bank12" + +ROMX $13 + "bank13" + +ROMX $14 + "bank14" + +ROMX $15 + "bank15" + +ROMX $16 + "bank16" + +ROMX $17 + "bank17" + +ROMX $18 + "bank18" + +ROMX $19 + "bank19" + +ROMX $1A + "bank1A" + +ROMX $1B + "bank1B" + +ROMX $1C + "bank1C" + +ROMX $1D + "bank1D" + +ROMX $1E + "bank1E" + +ROMX $1F + "Sound Effect Headers 3" ; AUDIO_3 +; "Music Headers 3" + "Sound Effects 3" +; "Audio Engine 3" +; "Music 3" + +ROMX $20 + "Text 1" ; TEXT_1 + +ROMX $21 + "Text 2" ; TEXT_2 + +ROMX $22 + "Text 3" ; TEXT_3 + +ROMX $23 + "Text 4" ; TEXT_4 + +ROMX $24 + "Text 5" ; TEXT_5 + +ROMX $25 + "Text 6" ; TEXT_6 + +ROMX $26 + "Text 7" ; TEXT_7 + +ROMX $27 + "Text 8" ; TEXT_8 + +ROMX $28 + "Text 9" ; TEXT_9 + +ROMX $29 + "Text 10" ; TEXT_10 + +ROMX $2A + "Text 11" ; TEXT_11 + +ROMX $2B + "Pokedex Text" ; POKEDEX_TEXT + +ROMX $2C + "Move Names" ; MOVE_NAMES + +WRAM0 + "WRAM Bank 0" + +WRAMX 1 + "WRAM Bank 1" + +SRAM 0 + "Sprite Buffers" + +SRAM 1 + "Save Data" + +SRAM 2 + "Saved Boxes 1" + +SRAM 3 + "Saved Boxes 2" + diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index 09d2df37..cc81b076 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -144,7 +144,7 @@ CeladonGameCornerText2: ld a, [wCurrentMenuItem] and a jr nz, .asm_48d0f - ld b,COIN_CASE + ld b, COIN_CASE call IsItemInBag jr z, .asm_48d19 call Has9990Coins @@ -362,7 +362,7 @@ CeladonGameCornerText10: jr nz, .asm_48e75 ld hl, CeladonGameCornerText_48e88 call PrintText - ld b,COIN_CASE + ld b, COIN_CASE call IsItemInBag jr z, .asm_48e7f call Has9990Coins diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm index 97960209..3a059c2a 100755 --- a/scripts/ceruleancity.asm +++ b/scripts/ceruleancity.asm @@ -113,10 +113,10 @@ CeruleanCityMovement1: db $FF CeruleanCityScript_1955d: - ld a,1 - ld [H_SPRITEINDEX],a + ld a, 1 + ld [H_SPRITEINDEX], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection],a + ld [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay ; face object CeruleanCityScript1: diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm index fa0cdca2..5c7704f5 100755 --- a/scripts/fightingdojo.asm +++ b/scripts/fightingdojo.asm @@ -302,7 +302,7 @@ FightingDojoText7: jr nz, .done ld a, [wcf91] ld b, a - ld c,30 + ld c, 30 call GivePokemon jr nc, .done SetEvents EVENT_GOT_HITMONCHAN, EVENT_DEFEATED_FIGHTING_DOJO diff --git a/scripts/fuchsiahouse2.asm b/scripts/fuchsiahouse2.asm index f9307c04..6d49fb2f 100755 --- a/scripts/fuchsiahouse2.asm +++ b/scripts/fuchsiahouse2.asm @@ -12,7 +12,7 @@ FuchsiaHouse2Text1: TX_ASM CheckEvent EVENT_GOT_HM04 jr nz, .subtract - ld b,GOLD_TEETH + ld b, GOLD_TEETH call IsItemInBag jr nz, .asm_3f30f CheckEvent EVENT_GAVE_GOLD_TEETH diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index a051edef..6bbe8d06 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -981,7 +981,7 @@ OaksLabText5: predef DisplayDexRating jp .asm_1d2ed .asm_1d279 - ld b,POKE_BALL + ld b, POKE_BALL call IsItemInBag jr nz, .asm_1d2e7 CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 30e06c35..5d65703b 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -1,11 +1,11 @@ PalletTownScript: CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK - jr z,.next + jr z, .next SetEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS .next call EnableAutoTextBoxDrawing - ld hl,PalletTownScriptPointers - ld a,[wPalletTownCurScript] + ld hl, PalletTownScriptPointers + ld a, [wPalletTownCurScript] jp CallFunctionInTable PalletTownScriptPointers: @@ -20,126 +20,126 @@ PalletTownScriptPointers: PalletTownScript0: CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB ret nz - ld a,[wYCoord] + ld a, [wYCoord] cp 1 ; is player near north exit? ret nz xor a - ld [hJoyHeld],a - ld a,PLAYER_DIR_DOWN - ld [wPlayerMovingDirection],a - ld a,$FF + ld [hJoyHeld], a + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a + ld a, $FF call PlaySound ; stop music ld a, 0 ; BANK(Music_MeetProfOak) - ld c,a + ld c, a ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music call PlayMusic - ld a,$FC - ld [wJoyIgnore],a + ld a, $FC + ld [wJoyIgnore], a SetEvent EVENT_OAK_APPEARED_IN_PALLET ; trigger the next script - ld a,1 - ld [wPalletTownCurScript],a + ld a, 1 + ld [wPalletTownCurScript], a ret PalletTownScript1: xor a - ld [wcf0d],a - ld a,1 - ld [hSpriteIndexOrTextID],a + ld [wcf0d], a + ld a, 1 + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld a,$FF - ld [wJoyIgnore],a - ld a,HS_PALLET_TOWN_OAK - ld [wMissableObjectIndex],a + ld a, $FF + ld [wJoyIgnore], a + ld a, HS_PALLET_TOWN_OAK + ld [wMissableObjectIndex], a predef ShowObject ; trigger the next script - ld a,2 - ld [wPalletTownCurScript],a + ld a, 2 + ld [wPalletTownCurScript], a ret PalletTownScript2: - ld a,1 - ld [H_SPRITEINDEX],a - ld a,SPRITE_FACING_UP - ld [hSpriteFacingDirection],a + ld a, 1 + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_UP + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 - ld a,1 - ld [wYCoord],a - ld a,1 - ld [hNPCPlayerRelativePosPerspective],a - ld a,1 + ld a, 1 + ld [wYCoord], a + ld a, 1 + ld [hNPCPlayerRelativePosPerspective], a + ld a, 1 swap a - ld [hNPCSpriteOffset],a + ld [hNPCSpriteOffset], a predef CalcPositionOfPlayerRelativeToNPC - ld hl,hNPCPlayerYDistance + ld hl, hNPCPlayerYDistance dec [hl] predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2 - ld de,wNPCMovementDirections2 - ld a,1 ; oak - ld [H_SPRITEINDEX],a + ld de, wNPCMovementDirections2 + ld a, 1 ; oak + ld [H_SPRITEINDEX], a call MoveSprite - ld a,$FF - ld [wJoyIgnore],a + ld a, $FF + ld [wJoyIgnore], a ; trigger the next script - ld a,3 - ld [wPalletTownCurScript],a + ld a, 3 + ld [wPalletTownCurScript], a ret PalletTownScript3: - ld a,[wd730] - bit 0,a + ld a, [wd730] + bit 0, a ret nz xor a ; ld a, SPRITE_FACING_DOWN - ld [wSpriteStateData1 + 9],a - ld a,1 - ld [wcf0d],a - ld a,$FC - ld [wJoyIgnore],a - ld a,1 - ld [hSpriteIndexOrTextID],a + ld [wSpriteStateData1 + 9], a + ld a, 1 + ld [wcf0d], a + ld a, $FC + ld [wJoyIgnore], a + ld a, 1 + ld [hSpriteIndexOrTextID], a call DisplayTextID ; set up movement script that causes the player to follow Oak to his lab - ld a,$FF - ld [wJoyIgnore],a - ld a,1 - ld [wSpriteIndex],a + ld a, $FF + ld [wJoyIgnore], a + ld a, 1 + ld [wSpriteIndex], a xor a - ld [wNPCMovementScriptFunctionNum],a - ld a,1 - ld [wNPCMovementScriptPointerTableNum],a - ld a,[H_LOADEDROMBANK] - ld [wNPCMovementScriptBank],a + ld [wNPCMovementScriptFunctionNum], a + ld a, 1 + ld [wNPCMovementScriptPointerTableNum], a + ld a, [H_LOADEDROMBANK] + ld [wNPCMovementScriptBank], a ; trigger the next script - ld a,4 - ld [wPalletTownCurScript],a + ld a, 4 + ld [wPalletTownCurScript], a ret PalletTownScript4: - ld a,[wNPCMovementScriptPointerTableNum] + ld a, [wNPCMovementScriptPointerTableNum] and a ; is the movement script over? ret nz ; trigger the next script - ld a,5 - ld [wPalletTownCurScript],a + ld a, 5 + ld [wPalletTownCurScript], a ret PalletTownScript5: CheckEvent EVENT_DAISY_WALKING - jr nz,.next + jr nz, .next CheckBothEventsSet EVENT_GOT_TOWN_MAP, EVENT_ENTERED_BLUES_HOUSE, 1 - jr nz,.next + jr nz, .next SetEvent EVENT_DAISY_WALKING - ld a,HS_DAISY_SITTING - ld [wMissableObjectIndex],a + ld a, HS_DAISY_SITTING + ld [wMissableObjectIndex], a predef HideObject - ld a,HS_DAISY_WALKING - ld [wMissableObjectIndex],a + ld a, HS_DAISY_WALKING + ld [wMissableObjectIndex], a predef_jump ShowObject .next CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK @@ -159,15 +159,15 @@ PalletTownTextPointers: PalletTownText1: TX_ASM - ld a,[wcf0d] + ld a, [wcf0d] and a - jr nz,.next - ld a,1 - ld [wDoNotWaitForButtonPressAfterDisplayingText],a - ld hl,OakAppearsText + jr nz, .next + ld a, 1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, OakAppearsText jr .done .next - ld hl,OakWalksUpText + ld hl, OakWalksUpText .done call PrintText jp TextScriptEnd @@ -175,14 +175,14 @@ PalletTownText1: OakAppearsText: TX_FAR _OakAppearsText TX_ASM - ld c,10 + ld c, 10 call DelayFrames xor a - ld [wEmotionBubbleSpriteIndex],a ; player's sprite - ld [wWhichEmotionBubble],a ; EXCLAMATION_BUBBLE + ld [wEmotionBubbleSpriteIndex], a ; player's sprite + ld [wWhichEmotionBubble], a ; EXCLAMATION_BUBBLE predef EmotionBubble - ld a,PLAYER_DIR_DOWN - ld [wPlayerMovingDirection],a + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a jp TextScriptEnd OakWalksUpText: diff --git a/scripts/redshouse1f.asm b/scripts/redshouse1f.asm index c6bf07eb..b1682c59 100755 --- a/scripts/redshouse1f.asm +++ b/scripts/redshouse1f.asm @@ -48,11 +48,11 @@ MomHealText2: RedsHouse1FText2: ; TV TX_ASM - ld a,[wSpriteStateData1 + 9] + ld a, [wSpriteStateData1 + 9] cp SPRITE_FACING_UP - ld hl,TVWrongSideText - jr nz,.notUp - ld hl,StandByMeText + ld hl, TVWrongSideText + jr nz, .notUp + ld hl, StandByMeText .notUp call PrintText jp TextScriptEnd diff --git a/scripts/redshouse2f.asm b/scripts/redshouse2f.asm index 60c3ea67..0ec59077 100755 --- a/scripts/redshouse2f.asm +++ b/scripts/redshouse2f.asm @@ -1,7 +1,7 @@ RedsHouse2FScript: call EnableAutoTextBoxDrawing - ld hl,RedsHouse2FScriptPointers - ld a,[wRedsHouse2CurScript] + ld hl, RedsHouse2FScriptPointers + ld a, [wRedsHouse2CurScript] jp CallFunctionInTable RedsHouse2FScriptPointers: @@ -10,11 +10,11 @@ RedsHouse2FScriptPointers: RedsHouse2FScript0: xor a - ld [hJoyHeld],a - ld a,PLAYER_DIR_UP - ld [wPlayerMovingDirection],a - ld a,1 - ld [wRedsHouse2CurScript],a + ld [hJoyHeld], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a + ld a, 1 + ld [wRedsHouse2CurScript], a ret RedsHouse2FScript1: diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index 80551e69..5c6002a9 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -117,10 +117,10 @@ SafariZoneEntranceScriptPointers: SafariZoneEntranceAutoWalk: push af - ld b,0 - ld a,c - ld [wSimulatedJoypadStatesIndex],a - ld hl,wSimulatedJoypadStatesEnd + ld b, 0 + ld a, c + ld [wSimulatedJoypadStatesIndex], a + ld hl, wSimulatedJoypadStatesEnd pop af call FillMemory jp StartSimulatingJoypadStates @@ -146,64 +146,64 @@ SafariZoneEntranceTextPointers: TX_FAR SafariZoneEntranceText_9e6e4 TX_ASM ld a, MONEY_BOX - ld [wTextBoxID],a + ld [wTextBoxID], a call DisplayTextBoxID call YesNoChoice - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - jp nz,.PleaseComeAgain + jp nz, .PleaseComeAgain xor a - ld [hMoney],a - ld a,$05 - ld [hMoney + 1],a - ld a,$00 - ld [hMoney + 2],a + ld [hMoney], a + ld a, $05 + ld [hMoney + 1], a + ld a, $00 + ld [hMoney + 2], a call HasEnoughMoney - jr nc,.success - ld hl,.NotEnoughMoneyText + jr nc, .success + ld hl, .NotEnoughMoneyText call PrintText jr .CantPayWalkDown .success xor a - ld [wPriceTemp],a - ld a,$05 - ld [wPriceTemp + 1],a - ld a,$00 - ld [wPriceTemp + 2],a - ld hl,wPriceTemp + 2 - ld de,wPlayerMoney + 2 - ld c,3 + ld [wPriceTemp], a + ld a, $05 + ld [wPriceTemp + 1], a + ld a, $00 + ld [wPriceTemp + 2], a + ld hl, wPriceTemp + 2 + ld de, wPlayerMoney + 2 + ld c, 3 predef SubBCDPredef - ld a,MONEY_BOX - ld [wTextBoxID],a + ld a, MONEY_BOX + ld [wTextBoxID], a call DisplayTextBoxID - ld hl,.MakePaymentText + ld hl, .MakePaymentText call PrintText - ld a,30 - ld [wNumSafariBalls],a - ld a,502 / $100 - ld [wSafariSteps],a + ld a, 30 + ld [wNumSafariBalls], a + ld a, 502 / $100 + ld [wSafariSteps], a ld a, 502 % $100 - ld [wSafariSteps + 1],a - ld a,D_UP - ld c,3 + ld [wSafariSteps + 1], a + ld a, D_UP + ld c, 3 call SafariZoneEntranceAutoWalk SetEvent EVENT_IN_SAFARI_ZONE ResetEventReuseHL EVENT_SAFARI_GAME_OVER - ld a,3 - ld [wSafariZoneEntranceCurScript],a + ld a, 3 + ld [wSafariZoneEntranceCurScript], a jr .done .PleaseComeAgain - ld hl,.PleaseComeAgainText + ld hl, .PleaseComeAgainText call PrintText .CantPayWalkDown - ld a,D_DOWN - ld c,1 + ld a, D_DOWN + ld c, 1 call SafariZoneEntranceAutoWalk - ld a,4 - ld [wSafariZoneEntranceCurScript],a + ld a, 4 + ld [wSafariZoneEntranceCurScript], a .done jp TextScriptEnd @@ -225,7 +225,7 @@ SafariZoneEntranceTextPointers: TX_FAR SafariZoneEntranceText_9e814 TX_ASM call YesNoChoice - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a jr nz, .asm_7539c ld hl, .SafariZoneEntranceText_753bb @@ -268,14 +268,14 @@ SafariZoneEntranceTextPointers: .SafariZoneEntranceText2 TX_ASM - ld hl,.FirstTimeQuestionText + ld hl, .FirstTimeQuestionText call PrintText call YesNoChoice - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - ld hl,.RegularText - jr nz,.Explanation - ld hl,.ExplanationText + ld hl, .RegularText + jr nz, .Explanation + ld hl, .ExplanationText .Explanation call PrintText jp TextScriptEnd diff --git a/text.asm b/text.asm index 866d4a7f..fc075e19 100644 --- a/text.asm +++ b/text.asm @@ -2239,7 +2239,7 @@ _CoinsScatteredText:: prompt _GettingPumpedText:: - text $5a, "'s" + text "'s" line "getting pumped!" prompt diff --git a/text/maps/agatha.asm b/text/maps/agatha.asm index 4957f4d4..9ef5059a 100644 --- a/text/maps/agatha.asm +++ b/text/maps/agatha.asm @@ -17,7 +17,7 @@ _AgathaBeforeBattleText:: cont "wrong! #MON" cont "are for fighting!" - para $52, "! I'll show" + para "! I'll show" line "you how a real" cont "trainer fights!" done diff --git a/text/maps/bills_house.asm b/text/maps/bills_house.asm index 463b13e6..5ece48d7 100644 --- a/text/maps/bills_house.asm +++ b/text/maps/bills_house.asm @@ -54,7 +54,7 @@ _BillThankYouText:: prompt _SSTicketReceivedText:: - text $52, " received" + text " received" line "an @" TX_RAM wcf4b text "!@@" diff --git a/text/maps/blues_house.asm b/text/maps/blues_house.asm index b676ea69..1898636a 100644 --- a/text/maps/blues_house.asm +++ b/text/maps/blues_house.asm @@ -1,6 +1,6 @@ _DaisyInitialText:: - text "Hi ",$52,"!" - line $53," is out at" + text "Hi !" + line " is out at" cont "Grandpa's lab." done @@ -12,7 +12,7 @@ _DaisyOfferMapText:: prompt _GotMapText:: - text $52," got a" + text " got a" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/bruno.asm b/text/maps/bruno.asm index 39898eb5..9c493c4a 100644 --- a/text/maps/bruno.asm +++ b/text/maps/bruno.asm @@ -11,7 +11,7 @@ _BrunoBeforeBattleText:: line "trained with" cont "my #MON!" - para $52, "!" + para "!" para "We will grind you" line "down with our" diff --git a/text/maps/celadon_city.asm b/text/maps/celadon_city.asm index e2470ec1..1dbd5cdf 100644 --- a/text/maps/celadon_city.asm +++ b/text/maps/celadon_city.asm @@ -40,7 +40,7 @@ _TM41PreText:: prompt _ReceivedTM41Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/celadon_dept_store_roof.asm b/text/maps/celadon_dept_store_roof.asm index 4689b023..5d104cf5 100644 --- a/text/maps/celadon_dept_store_roof.asm +++ b/text/maps/celadon_dept_store_roof.asm @@ -14,7 +14,7 @@ _CeladonMartRoofText_484f3:: line "from me!@@" _CeladonMartRoofText_484f9:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" @@ -40,7 +40,7 @@ _CeladonMartRoofText_48504:: line "from me!@@" _CeladonMartRoofText_4850a:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" @@ -66,7 +66,7 @@ _CeladonMartRoofText_48515:: line "from me!@@" _ReceivedTM49Text:: - text $52, " received" + text " received" line "TM49!@@" _CeladonMartRoofText_48520:: diff --git a/text/maps/celadon_diner.asm b/text/maps/celadon_diner.asm index fd31eb20..dc5e9350 100644 --- a/text/maps/celadon_diner.asm +++ b/text/maps/celadon_diner.asm @@ -42,7 +42,7 @@ _CeladonDinerText_491a7:: prompt _ReceivedCoinCaseText:: - text $52, " received" + text " received" line "a @" TX_RAM wcf4b text "!@@" diff --git a/text/maps/celadon_game_corner.asm b/text/maps/celadon_game_corner.asm index 2d263e80..1e59f83e 100644 --- a/text/maps/celadon_game_corner.asm +++ b/text/maps/celadon_game_corner.asm @@ -64,7 +64,7 @@ _CeladonGameCornerText_48d9c:: prompt _Received10CoinsText:: - text $52, " received" + text " received" line "10 coins!@@" _CeladonGameCornerText_48da7:: @@ -121,7 +121,7 @@ _CeladonGameCornerText_48e26:: prompt _Received20CoinsText:: - text $52, " received" + text " received" line "20 coins!@@" _CeladonGameCornerText_48e31:: @@ -143,7 +143,7 @@ _CeladonGameCornerText_48e88:: prompt _CeladonGameCornerText_48e8d:: - text $52, " received" + text " received" line "20 coins!@@" _CeladonGameCornerText_48e93:: diff --git a/text/maps/celadon_gym.asm b/text/maps/celadon_gym.asm index 99833ee1..d8f9394c 100644 --- a/text/maps/celadon_gym.asm +++ b/text/maps/celadon_gym.asm @@ -62,7 +62,7 @@ _CeladonGymText9:: done _ReceivedTM21Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/cerulean_city.asm b/text/maps/cerulean_city.asm index 48d97e05..b5319d04 100644 --- a/text/maps/cerulean_city.asm +++ b/text/maps/cerulean_city.asm @@ -1,6 +1,6 @@ _CeruleanCityText_19668:: - text $53, ": Yo!" - line $52, "!" + text ": Yo!" + line "!" para "You're still" line "struggling along" @@ -13,7 +13,7 @@ _CeruleanCityText_19668:: para "Here, let me see" line "what you caught," - cont $52, "!" + cont "!" done _CeruleanCityText_1966d:: @@ -29,7 +29,7 @@ _CeruleanCityText_19672:: prompt _CeruleanCityText_19677:: - text $53, ": Hey," + text ": Hey," line "guess what?" para "I went to BILL's" @@ -69,7 +69,7 @@ _CeruleanCityText_196d9:: done _ReceivedTM28Text:: - text $52, " recovered" + text " recovered" line "TM28!@@" _ReceivedTM28Text2:: diff --git a/text/maps/cerulean_gym.asm b/text/maps/cerulean_gym.asm index dd6baaff..1d1d6d1c 100644 --- a/text/maps/cerulean_gym.asm +++ b/text/maps/cerulean_gym.asm @@ -46,7 +46,7 @@ _CeruleanGymText_5c7c8:: done _ReceivedTM11Text:: - text $52, " received" + text " received" line "TM11!@@" _CeruleanGymText_5c7d3:: diff --git a/text/maps/champion.asm b/text/maps/champion.asm index 3ca7aadf..61050565 100644 --- a/text/maps/champion.asm +++ b/text/maps/champion.asm @@ -1,9 +1,9 @@ _GaryChampionIntroText:: - text $53, ": Hey!" + text ": Hey!" para "I was looking" line "forward to seeing" - cont "you, ", $52, "!" + cont "you, !" para "My rival should" line "be strong to keep" @@ -24,7 +24,7 @@ _GaryChampionIntroText:: para "I'm the #MON" line "LEAGUE champion!" - para $52, "! Do you" + para "! Do you" line "know what that" cont "means?" @@ -54,11 +54,11 @@ _GaryVictoryText:: line "I won, I won!" para "I'm too good for" - line "you, ", $52, "!" + line "you, !" para "You did well to" line "even reach me," - cont $53, ", the" + cont ", the" cont "#MON genius!" para "Nice try, loser!" @@ -82,7 +82,7 @@ _GaryText_76103:: done _GaryText2:: - text "OAK: ", $52, "!" + text "OAK: !" done _GaryText_76120:: @@ -99,12 +99,12 @@ _GaryText_76120:: TX_RAM wcd6d text "!" - para $52, ", you have" + para ", you have" line "come of age!" done _GaryText_76125:: - text "OAK: ", $53, "! I'm" + text "OAK: ! I'm" line "disappointed!" para "I came when I" @@ -115,7 +115,7 @@ _GaryText_76125:: line "here, you had" cont "already lost!" - para $53, "! Do you" + para "! Do you" line "understand why" cont "you lost?" @@ -130,7 +130,7 @@ _GaryText_76125:: done _GaryText_7612a:: - text "OAK: ", $52, "!" + text "OAK: !" para "You understand" line "that your victory" @@ -141,6 +141,6 @@ _GaryText_7612a:: line "with your #MON" cont "is marvelous!" - para $52, "!" + para "!" line "Come with me!" done diff --git a/text/maps/cinnabar_gym.asm b/text/maps/cinnabar_gym.asm index b14f6f60..173f94d2 100644 --- a/text/maps/cinnabar_gym.asm +++ b/text/maps/cinnabar_gym.asm @@ -42,7 +42,7 @@ _BlaineBadgeText:: done _ReceivedTM38Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" @@ -204,6 +204,6 @@ _CinnabarGymText_75ac2:: done _CinnabarGymText_75ac7:: - text $52, "! You beat" + text "! You beat" line "that fire brand!" done diff --git a/text/maps/cinnabar_lab_fossil_room.asm b/text/maps/cinnabar_lab_fossil_room.asm index 565104b3..3978814e 100644 --- a/text/maps/cinnabar_lab_fossil_room.asm +++ b/text/maps/cinnabar_lab_fossil_room.asm @@ -58,7 +58,7 @@ _Lab4Text_610b3:: text "So! You hurry and" line "give me that!" - para $52, " handed" + para " handed" line "over @" TX_RAM wcd6d text "!" diff --git a/text/maps/cinnabar_lab_metronome_room.asm b/text/maps/cinnabar_lab_metronome_room.asm index e2fbb558..fa04677f 100644 --- a/text/maps/cinnabar_lab_metronome_room.asm +++ b/text/maps/cinnabar_lab_metronome_room.asm @@ -7,7 +7,7 @@ _TM35PreReceiveText:: prompt _ReceivedTM35Text:: - text $52, " received " + text " received " line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/copycats_house_2f.asm b/text/maps/copycats_house_2f.asm index 90833127..44988e58 100644 --- a/text/maps/copycats_house_2f.asm +++ b/text/maps/copycats_house_2f.asm @@ -1,11 +1,11 @@ _CopycatsHouse2FText_5ccd4:: - text $52, ": Hi! Do" + text ": Hi! Do" line "you like #MON?" - para $52, ": Uh no, I" + para ": Uh no, I" line "just asked you." - para $52, ": Huh?" + para ": Huh?" line "You're strange!" para "COPYCAT: Hmm?" @@ -27,7 +27,7 @@ _TM31PreReceiveText:: prompt _ReceivedTM31Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" @@ -41,12 +41,12 @@ _TM31ExplanationText1:: line "#MON!@@" _TM31ExplanationText2:: - text $52, ": Hi!" + text ": Hi!" line "Thanks for TM31!" - para $52, ": Pardon?" + para ": Pardon?" - para $52, ": Is it" + para ": Is it" line "that fun to mimic" cont "my every move?" diff --git a/text/maps/daycare_1.asm b/text/maps/daycare_1.asm index 6e3c5737..f4cec10e 100644 --- a/text/maps/daycare_1.asm +++ b/text/maps/daycare_1.asm @@ -46,7 +46,7 @@ _DayCareOweMoneyText:: done _DayCareGotMonBackText:: - text $52, " got" + text " got" line "@" TX_RAM wDayCareMonName text " back!" diff --git a/text/maps/fuchsia_fishing_house.asm b/text/maps/fuchsia_fishing_house.asm index 195dc8ef..b1b8b2f2 100644 --- a/text/maps/fuchsia_fishing_house.asm +++ b/text/maps/fuchsia_fishing_house.asm @@ -17,7 +17,7 @@ _FuchsiaHouse3Text_561c2:: para "Take this and" line "fish, young one!" - para $52, " received" + para " received" line "a @" TX_RAM wcf4b text "!@@" @@ -29,7 +29,7 @@ _FuchsiaHouse3Text_56212:: _FuchsiaHouse3Text_56217:: text "Hello there," - line $52, "!" + line "!" para "How are the fish" line "biting?" diff --git a/text/maps/fuchsia_gym_2.asm b/text/maps/fuchsia_gym_2.asm index ba1970e6..2913fb8f 100644 --- a/text/maps/fuchsia_gym_2.asm +++ b/text/maps/fuchsia_gym_2.asm @@ -25,7 +25,7 @@ _FuchsiaGymText9:: done _ReceivedTM06Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/fujis_house.asm b/text/maps/fujis_house.asm index 7c61d1ed..86cade68 100644 --- a/text/maps/fujis_house.asm +++ b/text/maps/fujis_house.asm @@ -34,7 +34,7 @@ _LavenderHouse1Text4:: text "NIDORINO: Gaoo!@@" _LavenderHouse1Text_1d94c:: - text "MR.FUJI: ", $52, "." + text "MR.FUJI: ." para "Your #DEX quest" line "may fail without" @@ -46,7 +46,7 @@ _LavenderHouse1Text_1d94c:: prompt _ReceivedFluteText:: - text $52, " received" + text " received" line "a @" TX_RAM wcf4b text "!@@" diff --git a/text/maps/lance.asm b/text/maps/lance.asm index 0313b158..ed3dcada 100644 --- a/text/maps/lance.asm +++ b/text/maps/lance.asm @@ -24,7 +24,7 @@ _LanceBeforeBattleText:: para "Your LEAGUE" line "challenge ends" - cont "with me, ", $52, "!" + cont "with me, !" done _LanceEndBattleText:: @@ -39,7 +39,7 @@ _LanceAfterBattleText:: text "I still can't" line "believe my" cont "dragons lost to" - cont "you, ", $52, "!" + cont "you, !" para "You are now the" line "#MON LEAGUE" @@ -54,7 +54,7 @@ _LanceAfterBattleText:: line "another trainer!" cont "His name is..." - para $53, "!" + para "!" line "He beat the ELITE" cont "FOUR before you!" diff --git a/text/maps/mr_psychics_house.asm b/text/maps/mr_psychics_house.asm index 8c37383d..7be2e11e 100644 --- a/text/maps/mr_psychics_house.asm +++ b/text/maps/mr_psychics_house.asm @@ -6,7 +6,7 @@ _TM29PreReceiveText:: prompt _ReceivedTM29Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/mt_moon_b2f.asm b/text/maps/mt_moon_b2f.asm index 462c9d3c..472649b9 100644 --- a/text/maps/mt_moon_b2f.asm +++ b/text/maps/mt_moon_b2f.asm @@ -9,7 +9,7 @@ _MtMoon3Text_49f64:: done _MtMoon3Text_49f6f:: - text $52, " got the" + text " got the" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/oaks_lab.asm b/text/maps/oaks_lab.asm index 1f02c355..7a6f57b7 100644 --- a/text/maps/oaks_lab.asm +++ b/text/maps/oaks_lab.asm @@ -10,7 +10,7 @@ _OaksLabText40:: cont "greedy like you!" para "Go ahead and" - line "choose, ", $52, "!" + line "choose, !" done _OaksLabText41:: @@ -49,7 +49,7 @@ _OaksLabMonEnergeticText:: prompt _OaksLabReceivedMonText:: - text $52, " received" + text " received" line "a @" TX_RAM wcd6d text "!@@" diff --git a/text/maps/pallet_town.asm b/text/maps/pallet_town.asm index 64b3325b..d5eda74f 100644 --- a/text/maps/pallet_town.asm +++ b/text/maps/pallet_town.asm @@ -47,9 +47,9 @@ _PalletTownText5:: done _PalletTownText6:: - text $52,"'s house " + text "'s house " done _PalletTownText7:: - text $53,"'s house " + text "'s house " done diff --git a/text/maps/pewter_gym_2.asm b/text/maps/pewter_gym_2.asm index ff5f7242..86b97018 100644 --- a/text/maps/pewter_gym_2.asm +++ b/text/maps/pewter_gym_2.asm @@ -18,7 +18,7 @@ _TM34PreReceiveText:: done _ReceivedTM34Text:: - text $52, " received" + text " received" line "TM34!@@" _TM34ExplanationText:: @@ -57,7 +57,7 @@ _PewterGymText_5c4bc:: line "victory, here's" cont "the BOULDERBADGE!" - para $52, " received" + para " received" line "the BOULDERBADGE!@@" _PewterGymText_5c4c1:: diff --git a/text/maps/pokemon_tower_2f.asm b/text/maps/pokemon_tower_2f.asm index ec2281fd..79323001 100644 --- a/text/maps/pokemon_tower_2f.asm +++ b/text/maps/pokemon_tower_2f.asm @@ -1,6 +1,6 @@ _PokemonTower2Text_6062d:: - text $53, ": Hey," - line $52, "! What" + text ": Hey," + line "! What" cont "brings you here?" cont "Your #MON" cont "don't look dead!" @@ -19,7 +19,7 @@ _PokemonTower2Text_60632:: prompt _PokemonTower2Text_60637:: - text $53, ": Well," + text ": Well," line "look at all your" cont "wimpy #MON!" diff --git a/text/maps/pokemon_tower_5f.asm b/text/maps/pokemon_tower_5f.asm index f2cadfcb..b329118d 100644 --- a/text/maps/pokemon_tower_5f.asm +++ b/text/maps/pokemon_tower_5f.asm @@ -66,6 +66,6 @@ _PokemonTower5Text7:: text "Entered purified," line "protected zone!" - para $52, "'s #MON" + para "'s #MON" line "are fully healed!" done diff --git a/text/maps/route_1.asm b/text/maps/route_1.asm index adffd705..73188f09 100644 --- a/text/maps/route_1.asm +++ b/text/maps/route_1.asm @@ -13,7 +13,7 @@ _Route1ViridianMartSampleText:: prompt _Route1Text_1cae8:: - text $52, " got" + text " got" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/route_12_gate_upstairs.asm b/text/maps/route_12_gate_upstairs.asm index 1f2af788..95a89527 100644 --- a/text/maps/route_12_gate_upstairs.asm +++ b/text/maps/route_12_gate_upstairs.asm @@ -9,7 +9,7 @@ _TM39PreReceiveText:: prompt _ReceivedTM39Text:: - text $52, " received" + text " received" line "TM39!@@" _TM39ExplanationText:: diff --git a/text/maps/route_12_house.asm b/text/maps/route_12_house.asm index 4cb4beee..e04ce5fb 100644 --- a/text/maps/route_12_house.asm +++ b/text/maps/route_12_house.asm @@ -16,7 +16,7 @@ _Route12HouseText_564c5:: para "Take this and" line "fish, young one!" - para $52, " received" + para " received" line "a @" TX_RAM wcf4b text "!@@" @@ -39,7 +39,7 @@ _Route12HouseText_564cf:: _Route12HouseText_564d4:: text "Hello there," - line $52, "!" + line "!" para "Use the SUPER ROD" line "in any water!" diff --git a/text/maps/route_16_house.asm b/text/maps/route_16_house.asm index 534cee08..77efde87 100644 --- a/text/maps/route_16_house.asm +++ b/text/maps/route_16_house.asm @@ -9,7 +9,7 @@ _Route16HouseText3:: prompt _ReceivedHM02Text:: - text $52, " received" + text " received" line "HM02!@@" _HM02ExplanationText:: diff --git a/text/maps/route_22.asm b/text/maps/route_22.asm index ac4141eb..3a1d28f0 100644 --- a/text/maps/route_22.asm +++ b/text/maps/route_22.asm @@ -1,6 +1,6 @@ _Route22RivalBeforeBattleText1:: - text $53, ": Hey!" - line $52, "!" + text ": Hey!" + line "!" para "You're going to" line "#MON LEAGUE?" @@ -38,7 +38,7 @@ _Route22RivalDefeatedText1:: prompt _Route22Text_511bc:: - text $53, ": What?" + text ": What?" line "Why do I have 2" cont "#MON?" @@ -47,8 +47,8 @@ _Route22Text_511bc:: prompt _Route22RivalBeforeBattleText2:: - text $53, ": What?" - line $52, "! What a" + text ": What?" + line "! What a" cont "surprise to see" cont "you here!" @@ -72,7 +72,7 @@ _Route22RivalAfterBattleText2:: line "up! I'm ready for" cont "#MON LEAGUE!" - para $52, ", you need" + para ", you need" line "more practice!" para "But hey, you know" diff --git a/text/maps/route_24_1.asm b/text/maps/route_24_1.asm index 25079b2f..ae861eda 100644 --- a/text/maps/route_24_1.asm +++ b/text/maps/route_24_1.asm @@ -10,7 +10,7 @@ _Route24Text_51515:: prompt _Route24Text_5151a:: - text $52, " received" + text " received" line "a @" TX_RAM wcf4b text "!@@" diff --git a/text/maps/safari_zone_entrance.asm b/text/maps/safari_zone_entrance.asm index 8a018b2d..dcc1fd9b 100644 --- a/text/maps/safari_zone_entrance.asm +++ b/text/maps/safari_zone_entrance.asm @@ -20,7 +20,7 @@ SafariZoneEntranceText_9e747:: line "special # BALL" cont "here." - para $52, " received" + para " received" line "30 SAFARI BALLs!@@" _SafariZoneEntranceText_75360:: diff --git a/text/maps/safari_zone_secret_house.asm b/text/maps/safari_zone_secret_house.asm index 1bbe89fd..3df79d90 100644 --- a/text/maps/safari_zone_secret_house.asm +++ b/text/maps/safari_zone_secret_house.asm @@ -15,7 +15,7 @@ _SecretHouseText_4a350:: prompt _ReceivedHM03Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/saffron_gym.asm b/text/maps/saffron_gym.asm index ba57e35d..419b56ac 100644 --- a/text/maps/saffron_gym.asm +++ b/text/maps/saffron_gym.asm @@ -55,7 +55,7 @@ _SaffronGymText_5d173:: done ReceivedTM46Text:: - text $52, " received" + text " received" line "TM46!@@" _TM46ExplanationText:: diff --git a/text/maps/silph_co_11f.asm b/text/maps/silph_co_11f.asm index 8e7a3848..fbaa6086 100644 --- a/text/maps/silph_co_11f.asm +++ b/text/maps/silph_co_11f.asm @@ -20,7 +20,7 @@ _SilphCoPresidentText:: prompt _ReceivedSilphCoMasterBallText:: - text $52, " got a" + text " got a" line "@" TX_RAM wcf4b text "!@@" @@ -87,7 +87,7 @@ _SilphCo10Text_62335:: para "But, TEAM ROCKET" line "will never fall!" - para $52, "! Never" + para "! Never" line "forget that all" cont "#MON exist" cont "for TEAM ROCKET!" diff --git a/text/maps/silph_co_2f.asm b/text/maps/silph_co_2f.asm index a48ebd23..bd87630a 100644 --- a/text/maps/silph_co_2f.asm +++ b/text/maps/silph_co_2f.asm @@ -10,7 +10,7 @@ _SilphCo2Text_59ded:: prompt _ReceivedTM36Text:: - text $52, " got" + text " got" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/silph_co_3f.asm b/text/maps/silph_co_3f.asm index a514d3ef..b6a023f9 100644 --- a/text/maps/silph_co_3f.asm +++ b/text/maps/silph_co_3f.asm @@ -4,7 +4,7 @@ _SilphCo3Text_59ff9:: done _SilphCo3Text_59ffe:: - text $52, "! You and" + text "! You and" line "your #MON" cont "saved us!" done diff --git a/text/maps/silph_co_7f.asm b/text/maps/silph_co_7f.asm index e6ad11c1..1cc2bc30 100644 --- a/text/maps/silph_co_7f.asm +++ b/text/maps/silph_co_7f.asm @@ -145,12 +145,12 @@ _SilphCo7AfterBattleText4:: done _SilphCo7Text_51ebe:: - text $53, ": What" - line "kept you ", $52, "?" + text ": What" + line "kept you ?" done _SilphCo7Text_51ec3:: - text $53, ": Hahaha!" + text ": Hahaha!" line "I thought you'd" cont "turn up if I" cont "waited here!" @@ -173,7 +173,7 @@ _SilphCo7Text_51ec8:: prompt _SilphCo7Text_51ecd:: - text $53, ": How can" + text ": How can" line "I put this?" para "You're not good" @@ -182,7 +182,7 @@ _SilphCo7Text_51ecd:: prompt _SilphCo7Text_51ed2:: - text "Well, ", $52, "!" + text "Well, !" para "I'm moving on up" line "and ahead!" @@ -202,7 +202,7 @@ _SilphCo7Text_51ed2:: line "world's most" cont "powerful trainer!" - para $52, ", well" + para ", well" line "good luck to you!" cont "Don't sweat it!" cont "Smell ya!" diff --git a/text/maps/ss_anne_2.asm b/text/maps/ss_anne_2.asm index ba231ac5..58d804ba 100644 --- a/text/maps/ss_anne_2.asm +++ b/text/maps/ss_anne_2.asm @@ -9,13 +9,13 @@ _SSAnne2Text1:: done _SSAnneRivalBeforeBattleText:: - text $53, ": Bonjour!" - line $52, "!" + text ": Bonjour!" + line "!" para "Imagine seeing" line "you here!" - para $52, ", were you" + para ", were you" line "really invited?" para "So how's your" @@ -40,7 +40,7 @@ _SSAnneRivalDefeatedText:: prompt _SSAnneRivalWonText:: - text $52, "! What are" + text "! What are" line "you, seasick?" para "You should shape" @@ -48,7 +48,7 @@ _SSAnneRivalWonText:: prompt _SSAnneRivalCaptainText:: - text $53, ": I heard" + text ": I heard" line "there was a CUT" cont "master on board." diff --git a/text/maps/ss_anne_7.asm b/text/maps/ss_anne_7.asm index bb8ca042..7bf004da 100644 --- a/text/maps/ss_anne_7.asm +++ b/text/maps/ss_anne_7.asm @@ -3,7 +3,7 @@ _SSAnne7RubText:: line "I feel hideous..." cont "Urrp! Seasick..." - para $52, " rubbed" + para " rubbed" line "the CAPTAIN's" cont "back!" @@ -31,7 +31,7 @@ _ReceivingHM01Text:: prompt _ReceivedHM01Text:: - text $52, " got" + text " got" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/vermilion_fishing_house.asm b/text/maps/vermilion_fishing_house.asm index 0fa28cae..6857bb5b 100644 --- a/text/maps/vermilion_fishing_house.asm +++ b/text/maps/vermilion_fishing_house.asm @@ -16,7 +16,7 @@ _VermilionHouse2Text_560b6:: para "Take this and" line "fish, young one!" - para $52, " received" + para " received" line "an @" TX_RAM wcf4b text "!@@" @@ -39,7 +39,7 @@ _VermilionHouse2Text_560c0:: _VermilionHouse2Text_560c5:: text "Hello there," - line $52, "!" + line "!" para "How are the fish" line "biting?" diff --git a/text/maps/vermilion_gym_2.asm b/text/maps/vermilion_gym_2.asm index 4fd5e159..d0a01932 100644 --- a/text/maps/vermilion_gym_2.asm +++ b/text/maps/vermilion_gym_2.asm @@ -24,7 +24,7 @@ _VermilionGymText_5cb77:: done _ReceivedTM24Text:: - text $52, " received " + text " received " line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/victory_road_2f.asm b/text/maps/victory_road_2f.asm index cdcf6e36..ec9dcf4f 100644 --- a/text/maps/victory_road_2f.asm +++ b/text/maps/victory_road_2f.asm @@ -29,7 +29,7 @@ _VictoryRoad2EndBattleText2:: prompt _VictoryRoad2AfterBattleText2:: - text $53, " also came" + text " also came" line "through here!" done diff --git a/text/maps/viridian_city.asm b/text/maps/viridian_city.asm index 17b2ec91..67ab5c40 100644 --- a/text/maps/viridian_city.asm +++ b/text/maps/viridian_city.asm @@ -83,7 +83,7 @@ _ViridianCityText_191ca:: prompt _ReceivedTM42Text:: - text $52, " received" + text " received" line "TM42!@@" _TM42Explanation:: diff --git a/text/maps/viridian_gym.asm b/text/maps/viridian_gym.asm index df04e6d6..f87d8d58 100644 --- a/text/maps/viridian_gym.asm +++ b/text/maps/viridian_gym.asm @@ -60,7 +60,7 @@ _ViridianGymText12:: done _ReceivedTM27Text:: - text $52, " received" + text " received" line "TM27!@@" _TM27ExplanationText:: diff --git a/text/maps/viridian_mart.asm b/text/maps/viridian_mart.asm index aa199335..61750afe 100644 --- a/text/maps/viridian_mart.asm +++ b/text/maps/viridian_mart.asm @@ -16,7 +16,7 @@ ViridianMartParcelQuestText:: line "Will you take it" cont "to him?" - para $52, " got" + para " got" line "OAK's PARCEL!@@" _ViridianMartText2:: diff --git a/text/maps/wardens_house.asm b/text/maps/wardens_house.asm index d4da3781..9d40cace 100644 --- a/text/maps/wardens_house.asm +++ b/text/maps/wardens_house.asm @@ -18,7 +18,7 @@ _WardenGibberishText3:: done _WardenTeethText1:: - text $52, " gave the" + text " gave the" line "GOLD TEETH to the" cont "WARDEN!@@" @@ -42,7 +42,7 @@ _WardenThankYouText:: prompt _ReceivedHM04Text:: - text $52, " received" + text " received" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/oakspeech.asm b/text/oakspeech.asm index 5911092c..e006d16f 100644 --- a/text/oakspeech.asm +++ b/text/oakspeech.asm @@ -42,7 +42,7 @@ _IntroduceRivalText:: prompt _OakSpeechText3:: - text $52,"!" + text "!" para "Your very own" line "#MON legend is" diff --git a/tools/.gitignore b/tools/.gitignore new file mode 100644 index 00000000..967af106 --- /dev/null +++ b/tools/.gitignore @@ -0,0 +1,3 @@ +scan_includes +gfx +pkmncompress diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 00000000..13bab1fb --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,16 @@ +.PHONY: all clean + +CC := gcc +CFLAGS := -O3 -std=c99 -Wall -Wextra + +tools := scan_includes gfx pkmncompress + +all: $(tools) + @: + +clean: + rm -f $(tools) + +gfx: common.h +%: %.c + $(CC) $(CFLAGS) -o $@ $< diff --git a/tools/common.h b/tools/common.h new file mode 100644 index 00000000..4da0b2ef --- /dev/null +++ b/tools/common.h @@ -0,0 +1,40 @@ +#ifndef GUARD_COMMON_H +#define GUARD_COMMON_H + +int __getopt_long_i__; +#define getopt_long(c, v, s, l) getopt_long(c, v, s, l, &__getopt_long_i__) + +FILE *fopen_verbose(char *filename, char *mode) { + FILE *f = fopen(filename, mode); + if (!f) { + fprintf(stderr, "Could not open file: \"%s\"\n", filename); + } + return f; +} + +uint8_t *read_u8(char *filename, int *size) { + FILE *f = fopen_verbose(filename, "rb"); + if (!f) { + exit(1); + } + fseek(f, 0, SEEK_END); + *size = ftell(f); + rewind(f); + uint8_t *data = malloc(*size); + if (*size != (int)fread(data, 1, *size, f)) { + fprintf(stderr, "Could not read file: \"%s\"\n", filename); + exit(1); + } + fclose(f); + return data; +} + +void write_u8(char *filename, uint8_t *data, int size) { + FILE *f = fopen_verbose(filename, "wb"); + if (f) { + fwrite(data, 1, size, f); + fclose(f); + } +} + +#endif // GUARD_COMMON_H diff --git a/tools/gfx.c b/tools/gfx.c new file mode 100644 index 00000000..8c4066ab --- /dev/null +++ b/tools/gfx.c @@ -0,0 +1,296 @@ +#include +#include +#include +#include +#include +#include + +#include "common.h" + +static void usage(void) { + fprintf(stderr, "Usage: gfx [--trim-whitespace] [--remove-whitespace] [--interleave] [--remove-duplicates [--keep-whitespace]] [--remove-xflip] [--remove-yflip] [--png filename] [-d depth] [-h] [-o outfile] infile\n"); +} + +static void error(char *message) { + fputs(message, stderr); + fputs("\n", stderr); +} + +struct Options { + int trim_whitespace; + int remove_whitespace; + int help; + char *outfile; + int depth; + int interleave; + int remove_duplicates; + int keep_whitespace; + int remove_xflip; + int remove_yflip; + char *png_file; +}; + +struct Options Options = { + .depth = 2, +}; + +void get_args(int argc, char *argv[]) { + struct option long_options[] = { + {"remove-whitespace", no_argument, &Options.remove_whitespace, 1}, + {"trim-whitespace", no_argument, &Options.trim_whitespace, 1}, + {"interleave", no_argument, &Options.interleave, 1}, + {"remove-duplicates", no_argument, &Options.remove_duplicates, 1}, + {"keep-whitespace", no_argument, &Options.keep_whitespace, 1}, + {"remove-xflip", no_argument, &Options.remove_xflip, 1}, + {"remove-yflip", no_argument, &Options.remove_yflip, 1}, + {"png", required_argument, 0, 'p'}, + {"depth", required_argument, 0, 'd'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt = 0; opt != -1;) { + switch (opt = getopt_long(argc, argv, "ho:d:p:", long_options)) { + case 'h': + Options.help = true; + break; + case 'o': + Options.outfile = optarg; + break; + case 'd': + Options.depth = strtoul(optarg, NULL, 0); + break; + case 'p': + Options.png_file = optarg; + break; + case 0: + case -1: + break; + default: + usage(); + exit(1); + break; + } + } +} + +struct Graphic { + int size; + uint8_t *data; +}; + +bool is_whitespace(uint8_t *tile, int tile_size) { + uint8_t WHITESPACE = 0; + for (int i = 0; i < tile_size; i++) { + if (tile[i] != WHITESPACE) { + return false; + } + } + return true; +} + +void trim_whitespace(struct Graphic *graphic) { + int tile_size = Options.depth * 8; + for (int i = graphic->size - tile_size; i > 0; i -= tile_size) { + if (is_whitespace(&graphic->data[i], tile_size)) { + graphic->size = i; + } else { + break; + } + } +} + +void remove_whitespace(struct Graphic *graphic) { + int tile_size = Options.depth * 8; + if (Options.interleave) tile_size *= 2; + int i = 0; + for (int j = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { + while (is_whitespace(&graphic->data[j], tile_size)) { + j += tile_size; + } + if (j >= graphic->size) { + break; + } + if (j > i) { + memcpy(&graphic->data[i], &graphic->data[j], tile_size); + } + } + graphic->size = i; +} + +bool tile_exists(uint8_t *tile, uint8_t *tiles, int tile_size, int num_tiles) { + for (int i = 0; i < num_tiles; i++) { + bool match = true; + for (int j = 0; j < tile_size; j++) { + if (tile[j] != tiles[i * tile_size + j]) { + match = false; + } + } + if (match) { + return true; + } + } + return false; +} + +void remove_duplicates(struct Graphic *graphic) { + int tile_size = Options.depth * 8; + if (Options.interleave) tile_size *= 2; + int num_tiles = 0; + for (int i = 0, j = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { + while (tile_exists(&graphic->data[j], graphic->data, tile_size, num_tiles)) { + if (Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) { + break; + } + j += tile_size; + } + if (j >= graphic->size) { + break; + } + if (j > i) { + memcpy(&graphic->data[i], &graphic->data[j], tile_size); + } + num_tiles++; + } + graphic->size = num_tiles * tile_size; +} + +bool flip_exists(uint8_t *tile, uint8_t *tiles, int tile_size, int num_tiles, bool xflip, bool yflip) { + uint8_t *flip = calloc(tile_size, 1); + int half_size = tile_size / 2; + for (int i = 0; i < tile_size; i++) { + int byte = i; + if (yflip) { + byte = tile_size - 1 - (i ^ 1); + if (Options.interleave && i < half_size) { + byte = half_size - 1 - (i ^ 1); + } + } + if (xflip) { + for (int bit = 0; bit < 8; bit++) { + flip[byte] |= ((tile[i] >> bit) & 1) << (7 - bit); + } + } else { + flip[byte] = tile[i]; + } + } + if (tile_exists(flip, tiles, tile_size, num_tiles)) { + return true; + } + return false; +} + +void remove_flip(struct Graphic *graphic, bool xflip, bool yflip) { + int tile_size = Options.depth * 8; + if (Options.interleave) tile_size *= 2; + int num_tiles = 0; + for (int i = 0, j = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { + while (flip_exists(&graphic->data[j], graphic->data, tile_size, num_tiles, xflip, yflip)) { + if (Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) { + break; + } + j += tile_size; + } + if (j >= graphic->size) { + break; + } + if (j > i) { + memcpy(&graphic->data[i], &graphic->data[j], tile_size); + } + num_tiles++; + } + graphic->size = num_tiles * tile_size; +} + +void interleave(struct Graphic *graphic, int width) { + int tile_size = Options.depth * 8; + int width_tiles = width / 8; + int num_tiles = graphic->size / tile_size; + uint8_t *interleaved = malloc(graphic->size); + for (int i = 0; i < num_tiles; i++) { + int tile = i * 2; + int row = i / width_tiles; + tile -= width_tiles * row; + if (row % 2) { + tile -= width_tiles; + tile += 1; + } + memcpy(&interleaved[tile * tile_size], &graphic->data[i * tile_size], tile_size); + } + graphic->size = num_tiles * tile_size; + memcpy(graphic->data, interleaved, graphic->size); + free(interleaved); +} + +int png_get_width(char *filename) { + FILE *f = fopen_verbose(filename, "rb"); + if (!f) { + exit(1); + } + + const int OFFSET_WIDTH = 16; + uint8_t bytes[4]; + fseek(f, OFFSET_WIDTH, SEEK_SET); + size_t size = 4; + size_t result = fread(bytes, 1, size, f); + fclose(f); + if (result != size) { + fprintf(stderr, "Could not read file at offset 0x%x: \"%s\"\n", OFFSET_WIDTH, filename); + exit(1); + } + + int width = 0; + for (int i = 0; i < 4; i++) { + width |= bytes[i] << (8 * (3 - i)); + } + return width; +} + + +int main(int argc, char *argv[]) { + get_args(argc, argv); + argc -= optind; + argv += optind; + if (Options.help) { + usage(); + return 0; + } + if (argc < 1) { + usage(); + exit(1); + } + char *infile = argv[0]; + struct Graphic graphic; + graphic.data = read_u8(infile, &graphic.size); + if (Options.trim_whitespace) { + trim_whitespace(&graphic); + } + if (Options.interleave) { + if (!Options.png_file) { + error("interleave: need --png to infer dimensions"); + usage(); + exit(1); + } + int width = png_get_width(Options.png_file); + interleave(&graphic, width); + } + if (Options.remove_duplicates) { + remove_duplicates(&graphic); + } + if (Options.remove_xflip) { + remove_flip(&graphic, true, false); + } + if (Options.remove_yflip) { + remove_flip(&graphic, false, true); + } + if (Options.remove_xflip && Options.remove_yflip) { + remove_flip(&graphic, true, true); + } + if (Options.remove_whitespace) { + remove_whitespace(&graphic); + } + if (Options.outfile) { + write_u8(Options.outfile, graphic.data, graphic.size); + } + free(graphic.data); + return 0; +} diff --git a/tools/pkmncompress.c b/tools/pkmncompress.c new file mode 100644 index 00000000..db707653 --- /dev/null +++ b/tools/pkmncompress.c @@ -0,0 +1,451 @@ +/* + * Copyright © 2013 stag019 + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +typedef uint8_t u8; + +u8 *compressed = NULL; +int xrows = 0; +int xwidth = 0; +int curbit = 0; +int curbyte = 0; + +void writebit(int bit) +{ + if (++curbit == 8) + { + curbyte++; + curbit = 0; + } + compressed[curbyte] |= bit << (7 - curbit); +} + +void method_1(u8 *RAM) +{ + int i; + int j; + int nibble_1; + int nibble_2 = 0; + int code_1; + int code_2; + int table; + static int method_1[2][0x10] = { + {0x0, 0x1, 0x3, 0x2, 0x6, 0x7, 0x5, 0x4, 0xC, 0xD, 0xF, 0xE, 0xA, 0xB, 0x9, 0x8}, + {0x8, 0x9, 0xB, 0xA, 0xE, 0xF, 0xD, 0xC, 0x4, 0x5, 0x7, 0x6, 0x2, 0x3, 0x1, 0x0} + }; + + for (i = 0; i < xrows * xwidth * 8; i++) + { + j = i / xrows; + j += i % xrows * xwidth * 8; + if (!(i % xrows)) + { + nibble_2 = 0; + } + nibble_1 = (RAM[j] >> 4) & 0x0F; + table = 0; + if (nibble_2 & 1) + { + table = 1; + } + code_1 = method_1[table][nibble_1]; + nibble_2 = RAM[j] & 0x0F; + table = 0; + if (nibble_1 & 1) + { + table = 1; + } + code_2 = method_1[table][nibble_2]; + RAM[j] = (code_1 << 4) | code_2; + } +} + +// "Get the previous power of 2. Deriving the bitcount from that seems to be faster on average than using the lookup table." +void RLE(int nums) +{ + int v; + int j; + int bitcount; + int number; + + bitcount = -1; + v = ++nums; + v++; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v -= v >> 1; + v--; + + number = nums - v; + while(v) { + v >>= 1; + bitcount++; + } + for(j = 0; j < bitcount; j++) { + writebit(1); + } + writebit(0); + for(j = bitcount; j >= 0; j--) { + writebit((number >> j) & 1); + } +} + +void RLE_old(int nums) +{ + int search; + int i; + int j; + int bitcount; + int number; + static int RLE[0x10] = {0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF}; + + bitcount = -1; + search = ++nums; + while (search > 0) + { + for (i = 0; i < 0xF; i++) + { + if (RLE[i] == search) + { + bitcount = i; + break; + } + } + if (bitcount != -1) + { + break; + } + search--; + } + number = nums - RLE[bitcount]; + for (j = 0; j < bitcount; j++) + { + writebit(1); + } + writebit(0); + for (j = bitcount; j >= 0; j--) + { + writebit((number >> j) & 1); + } +} + +void data_packet(u8 *bitgroups, int bgi) +{ + int i; + for (i = 0; i < bgi; i++) + { + writebit((bitgroups[i] >> 1) & 1); + writebit(bitgroups[i] & 1); + } +} + +int interpret_compress(u8 *RAM_1, u8 *RAM_2, int interpretation, int switchram) +{ + u8 *_1_RAM; + u8 *_2_RAM; + int i; + int ram; + int type; + int nums; + u8 *bitgroups; + int x; + int y; + int byte; + int bit; + int bitgroup; + int bgi = 0; + + int ram_size = xrows * xwidth * 8; + _1_RAM = (u8 *)calloc(ram_size, 1); + _2_RAM = (u8 *)calloc(ram_size, 1); + if (switchram) + { + memcpy(_1_RAM, RAM_2, ram_size); + memcpy(_2_RAM, RAM_1, ram_size); + } + else + { + memcpy(_1_RAM, RAM_1, ram_size); + memcpy(_2_RAM, RAM_2, ram_size); + } + + switch(interpretation) + { + case 1: + method_1(_1_RAM); + method_1(_2_RAM); + break; + case 2: + case 3: + for (i = 0; i < xrows * xwidth * 8; i++) + { + _2_RAM[i] ^= _1_RAM[i]; + } + method_1(_1_RAM); + break; + } + if (interpretation == 3) + { + method_1(_2_RAM); + } + + curbit = 7; + curbyte = 0; + compressed = (u8 *)calloc(0x310, 1); + compressed[0] = (xrows << 4) | xwidth; + writebit(switchram); + + for (ram = 0; ram < 2; ram++) + { + type = 0; + nums = 0; + bitgroups = (u8 *)calloc(0x1000, 1); + + for (x = 0; x < xwidth; x++) + { + for (bit = 0; bit < 8; bit += 2) + { + byte = x * xrows * 8; + for (y=0; y < xrows * 8; y++) + { + if (ram) + { + bitgroup = (_2_RAM[byte] >> (6 - bit)) & 3; + } + else + { + bitgroup = (_1_RAM[byte] >> (6 - bit)) & 3; + } + if (!bitgroup) + { + if (!type) + { + writebit(0); + } + else if (type == 1) + { + nums++; + } + else + { + data_packet(bitgroups, bgi); + writebit(0); + writebit(0); + } + type = 1; + free(bitgroups); + bitgroups = (u8 *)calloc(0x1000, 1); + bgi = 0; + } + else + { + if (!type) + { + writebit(1); + } + else if (type == 1) + { + RLE(nums); + } + type = -1; + bitgroups[bgi++] = bitgroup; + nums = 0; + } + byte++; + } + } + } + if (type == 1) + { + RLE(nums); + } + else + { + data_packet(bitgroups, bgi); + } + if (!ram) + { + if (interpretation < 2) + { + writebit(0); + } + else + { + writebit(1); + writebit(interpretation - 2); + } + } + } + free(bitgroups); + free(_1_RAM); + free(_2_RAM); + return (curbyte + 1) * 8 + curbit; +} + +int compress(u8 *data, int width, int height) +{ + u8 *RAM_1; + u8 *RAM_2; + int i; + int mode; + int order; + int newsize; + int compressedsize; + int size = -1; + u8 *current = NULL; + int ram_size; + + xrows = height; + xwidth = width; + + ram_size = xrows * xwidth * 8; + + RAM_1 = (u8 *)calloc(ram_size, 1); + RAM_2 = (u8 *)calloc(ram_size, 1); + + for (i = 0; i < xrows * xwidth * 8; i++) + { + RAM_1[i] = data[(i << 1)]; + RAM_2[i] = data[(i << 1) | 1]; + } + + for (mode = 1; mode < 4; mode++) + { + for (order = 0; order < 2; order++) + { + if (!(mode == 1 && order == 0)) + { + newsize = interpret_compress(RAM_1, RAM_2, mode, order); + if (size == -1 || newsize < size) + { + if (current != NULL) + { + free(current); + } + current = (u8 *)calloc(0x310, 1); + memcpy(current, compressed, newsize / 8); + free(compressed); + size = newsize; + } + } + } + } + compressed = (u8 *)calloc(0x310, 1); + compressedsize = size / 8; + memcpy(compressed, current, compressedsize); + free(current); + + free(RAM_1); + free(RAM_2); + + return compressedsize; +} + +uint8_t *transpose_tiles(uint8_t *data, int width, int height) +{ + int i; + int j; + int tile_size = 0x10; + + int size = width * height * tile_size; + u8 *transposed = calloc(size, 1); + for (i = 0; i < size; i++) + { + j = (i / 0x10) * width * 0x10; + j = (j % size) + 0x10 * (j / size) + (i % 0x10); + transposed[j] = data[i]; + } + + free(data); + + return transposed; +} + +int main(int argc, char *argv[]) +{ + int width = 0; + int height = 0; + int transpose = 1; + + if (argc != 3) + { + fputs("Usage: pkmncompress infile.2bpp outfile.pic\n", stderr); + return EXIT_FAILURE; + } + + char *infile = argv[1]; + char *outfile = argv[2]; + + FILE *f = fopen(infile, "rb"); + if (!f) { + fprintf(stderr, "failed to open for reading: '%s'\n", infile); + return EXIT_FAILURE; + } + fseek(f, 0, SEEK_END); + int filesize = ftell(f); + + for (int i = 0; i < 32; i++) { + width = i; + height = i; + if (width * height * 16 >= filesize) { + break; + } + } + if (width * height * 16 < filesize) { + fprintf(stderr, "file too big: '%s' (%x)\n", infile, filesize); + return EXIT_FAILURE; + } + if (width * height * 16 > filesize) { + fprintf(stderr, "wrong filesize for '%s' (%x). must be a square image of 16-byte tiles\n", infile, filesize); + return EXIT_FAILURE; + } + + u8 *data = (u8 *)calloc(filesize, 1); + fseek(f, 0, SEEK_SET); + int size = fread(data, 1, filesize, f); + fclose(f); + if (size != filesize) { + fprintf(stderr, "failed to read: '%s'\n", infile); + return EXIT_FAILURE; + } + + if (transpose) { + data = transpose_tiles(data, width, height); + } + + int compressed_size = compress(data, width, height); + + free(data); + + f = fopen(outfile, "wb"); + if (!f) { + fprintf(stderr, "failed to open for writing: '%s'\n", outfile); + return EXIT_FAILURE; + } + fwrite(compressed, 1, compressed_size, f); + fclose(f); + + free(compressed); + + return EXIT_SUCCESS; +} diff --git a/tools/scan_includes.c b/tools/scan_includes.c new file mode 100644 index 00000000..63af3bcf --- /dev/null +++ b/tools/scan_includes.c @@ -0,0 +1,135 @@ +#include +#include +#include +#include +#include + +void usage(void) { + printf("Usage: scan_includes [-h] [-s] filename\n" + "-h, --help\n" + " Print usage and exit\n" + "-s, --strict\n" + " Fail if a file cannot be read\n"); +} + +struct Options { + bool help; + bool strict; +}; + +struct Options Options = {0}; + +void scan_file(char* filename) { + FILE *f = fopen(filename, "rb"); + if (!f) { + if (Options.strict) { + fprintf(stderr, "Could not open file: '%s'\n", filename); + exit(1); + } else { + return; + } + } + + fseek(f, 0, SEEK_END); + long size = ftell(f); + rewind(f); + + char *buffer = malloc(size + 1); + char *orig = buffer; + size = fread(buffer, 1, size, f); + buffer[size] = '\0'; + fclose(f); + + for (; buffer && (buffer - orig < size); buffer++) { + bool is_include = false; + bool is_incbin = false; + switch (*buffer) { + case ';': + buffer = strchr(buffer, '\n'); + if (!buffer) { + fprintf(stderr, "%s: no newline at end of file\n", filename); + break; + } + break; + + case '"': + buffer++; + buffer = strchr(buffer, '"'); + if (!buffer) { + fprintf(stderr, "%s: unterminated string\n", filename); + break; + } + buffer++; + break; + + case 'i': + case 'I': + if ((strncmp(buffer, "INCBIN", 6) == 0) || (strncmp(buffer, "incbin", 6) == 0)) { + is_incbin = true; + } else if ((strncmp(buffer, "INCLUDE", 7) == 0) || (strncmp(buffer, "include", 7) == 0)) { + is_include = true; + } + if (is_incbin || is_include) { + buffer = strchr(buffer, '"'); + if (!buffer) { + break; + } + buffer++; + int length = strcspn(buffer, "\""); + char *include = malloc(length + 1); + strncpy(include, buffer, length); + include[length] = '\0'; + printf("%s ", include); + if (is_include) { + scan_file(include); + } + free(include); + buffer = strchr(buffer, '"'); + } + break; + + } + if (!buffer) { + break; + } + + } + + free(orig); +} + +int main(int argc, char* argv[]) { + int i = 0; + struct option long_options[] = { + {"strict", no_argument, 0, 's'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + int opt = -1; + while ((opt = getopt_long(argc, argv, "sh", long_options, &i)) != -1) { + switch (opt) { + case 's': + Options.strict = true; + break; + case 'h': + Options.help = true; + break; + default: + usage(); + exit(1); + break; + } + } + argc -= optind; + argv += optind; + if (Options.help) { + usage(); + return 0; + } + if (argc < 1) { + usage(); + exit(1); + } + scan_file(argv[0]); + return 0; +} diff --git a/wram.asm b/wram.asm index 8c1b0023..f6cb6502 100755 --- a/wram.asm +++ b/wram.asm @@ -1737,7 +1737,7 @@ wPlayerBattleStatus3:: ; d064 ; bit 0 - toxic ; bit 1 - light screen ; bit 2 - reflect -; bit 3 - tranformed +; bit 3 - transformed ds 1 wEnemyStatsToDouble:: ; d065 @@ -2048,7 +2048,7 @@ wPredefBank:: ; d0b7 wMonHeader:: ; d0b8 wMonHIndex:: ; d0b8 -; In the ROM base stats data stucture, this is the dex number, but it is +; In the ROM base stats data structure, this is the dex number, but it is ; overwritten with the internal index number after the header is copied to WRAM. ds 1 @@ -3059,7 +3059,7 @@ wd732:: ; d732 ; 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]) +; 2. does not have the player start in floor two of the player'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" @@ -3087,7 +3087,7 @@ wd736:: ; d736 ; bit 1: the player is currently stepping down from a door ; bit 2: standing on a warp ; bit 6: jumping down a ledge / fishing animation -; bit 7: player sprite spinning due to spin tiles (Rocket hidehout / Viridian Gym) +; bit 7: player sprite spinning due to spin tiles (Rocket hideout / Viridian Gym) ds 1 wCompletedInGameTradeFlags:: ; d737 @@ -3139,10 +3139,12 @@ wEnemyPartyCount:: ds 1 ; d89c wEnemyPartyMons:: ds PARTY_LENGTH + 1 ; d89d ; Overload enemy party data +UNION + wWaterRate:: db ; d8a4 wWaterMons:: db ; d8a5 - ds wWaterRate - @ +NEXTU wEnemyMons:: ; d8a4 wEnemyMon1:: party_struct wEnemyMon1 @@ -3155,6 +3157,8 @@ wEnemyMon6:: party_struct wEnemyMon6 wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d9ac wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d9ee +ENDU + wTrainerHeaderPtr:: ; da30 ds 2 @@ -3170,7 +3174,7 @@ wUnusedDA38:: ; da38 wCurMapScript:: ; da39 ; index of current map script, mostly used as index for function pointer array -; mostly copied from map-specific map script pointer and wirtten back later +; mostly copied from map-specific map script pointer and written back later ds 1 ds 7