diff options
291 files changed, 9304 insertions, 5646 deletions
diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 5ea53c08..00000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "extras"] - path = extras - url = git://github.com/pret/pokemon-reverse-engineering-tools.git - ignore = dirty @@ -1,57 +1,94 @@ PYTHON := python -MD5 := md5sum -c --quiet +pcm := $(PYTHON) tools/pokemontools/pcm.py pcm -2bpp := $(PYTHON) gfx.py 2bpp -1bpp := $(PYTHON) gfx.py 1bpp -pcm := $(PYTHON) extras/pokemontools/pcm.py pcm -pic := $(PYTHON) extras/pokemontools/pic.py compress -includes := $(PYTHON) extras/pokemontools/scan_includes.py +rom := pokeyellow.gbc + +objs := audio.o main.o text.o wram.o + + +### Build tools -objs := \ - audio.o \ - main.o \ - text.o \ - wram.o +MD5 := md5sum -c -$(foreach obj, $(objs:.o=), \ - $(eval $(obj)_dep := $(shell $(includes) $(obj).asm)) \ -) +RGBDS ?= +RGBASM ?= $(RGBDS)rgbasm +RGBFIX ?= $(RGBDS)rgbfix +RGBGFX ?= $(RGBDS)rgbgfx +RGBLINK ?= $(RGBDS)rgblink + +### Build targets .SUFFIXES: -.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic .wav .pcm .SECONDEXPANSION: -# Suppress annoying intermediate file deletion messages. -.PRECIOUS: %.2bpp -.PHONY: all clean yellow compare - -rom := pokeyellow.gbc +.PRECIOUS: +.SECONDARY: +.PHONY: all clean yellow tidy compare tools all: $(rom) yellow: $(rom) # For contributors to make sure a change didn't affect the contents of the rom. -compare: yellow +compare: $(rom) @$(MD5) roms.md5 clean: rm -f $(rom) $(objs) $(rom:.gbc=.sym) find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -exec rm {} + + $(MAKE) clean -C tools/ + +tidy: + rm -f $(rom) $(objs) $(rom:.gbc=.sym) + $(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: ; -$(objs): %.o: %.asm $$(%_dep) - rgbasm -h -o $@ $*.asm + +%.o: dep = $(shell tools/scan_includes $(@D)/$*.asm) +$(objs): %.o: %.asm $$(dep) + $(RGBASM) -h -o $@ $*.asm opts = -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03 -t "POKEMON YELLOW" $(rom): $(objs) - rgblink -n $*.sym -l pokeyellow.link -o $@ $^ - rgbfix $(opts) $@ - sort $(rom:.gbc=.sym) -o $(rom:.gbc=.sym) + $(RGBLINK) -n pokeyellow.sym -l pokeyellow.link -o $@ $^ + $(RGBFIX) $(opts) $@ + sort $(rom:.gbc=.sym) -o $(rom:.gbc=.sym) + +### Misc file-specific graphics rules + +gfx/game_boy.2bpp: tools/gfx += --remove-duplicates +gfx/theend.2bpp: tools/gfx += --interleave --png=$< +gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace +gfx/pokemon_yellow.2bpp: tools/gfx += --trim-whitespace +gfx/surfing_pikachu_1c.2bpp: tools/gfx += --trim-whitespace +gfx/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace +gfx/surfing_pikachu_1.2bpp: tools/gfx += --trim-whitespace +### Catch-all graphics rules %.png: ; -%.2bpp: %.png ; @$(2bpp) $< -%.1bpp: %.png ; @$(1bpp) $< -%.pic: %.2bpp ; @$(pic) $< + +%.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 $< $@ + %.wav: ; %.pcm: %.wav ; @$(pcm) $< @@ -30,5 +30,5 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md). [pokeruby]: https://github.com/pret/pokeruby [pokefirered]: https://github.com/pret/pokefirered [pokeemerald]: https://github.com/pret/pokeemerald -[Discord]: https://discord.gg/6EuWgX9 +[Discord]: https://discord.gg/d5dubZ3 [irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret @@ -371,16 +371,16 @@ INCLUDE "audio/sfx/triangle3_4.asm" INCLUDE "audio/sfx/muted_snare2_4.asm" INCLUDE "audio/sfx/muted_snare3_4.asm" INCLUDE "audio/sfx/muted_snare4_4.asm" -INCLUDE "audio/sfx/unknown_80250.asm" +INCLUDE "audio/sfx/surfing_add_points.asm" INCLUDE "audio/sfx/unknown_80263.asm" INCLUDE "audio/sfx/unknown_8026a.asm" INCLUDE "audio/sfx/heal_ailment_4.asm" INCLUDE "audio/sfx/tink_4.asm" -INCLUDE "audio/sfx/unknown_8029f.asm" -INCLUDE "audio/sfx/unknown_802b5.asm" +INCLUDE "audio/sfx/surfing_jump.asm" +INCLUDE "audio/sfx/surfing_flip.asm" INCLUDE "audio/sfx/unknown_802cc.asm" -INCLUDE "audio/sfx/unknown_802d7.asm" -INCLUDE "audio/sfx/unknown_802e1.asm" +INCLUDE "audio/sfx/surfing_crash.asm" +INCLUDE "audio/sfx/surfing_land.asm" INCLUDE "audio/sfx/get_item2_4_2.asm" INCLUDE "audio/sfx/unknown_80337.asm" INCLUDE "audio/sfx/unknown_803da.asm" @@ -652,7 +652,7 @@ SECTION "Audio Engine 4", ROMX ; BANK $20 SurfingPikachu1Graphics1:: INCBIN "gfx/surfing_pikachu_1a.2bpp" SurfingPikachu1Graphics2:: INCBIN "gfx/surfing_pikachu_1b.2bpp" -SurfingPikachu1Graphics3:: INCBIN "gfx/surfing_pikachu_1c.t5.2bpp" +SurfingPikachu1Graphics3:: INCBIN "gfx/surfing_pikachu_1c.2bpp" INCLUDE "audio/engine_4.asm" diff --git a/audio/headers/sfxheaders4.asm b/audio/headers/sfxheaders4.asm index 16e69e1f..1fdb69ab 100644 --- a/audio/headers/sfxheaders4.asm +++ b/audio/headers/sfxheaders4.asm @@ -270,23 +270,23 @@ SFX_Start_Menu_4:: SFX_PressAB_4:: dbw CH7, SFX_80263_4_Ch7 -SFX_801b0_4:: - dbw CH4, SFX_80250_4_Ch4 +SFX_Surfing_Add_Points:: + dbw CH4, SFX_Surfing_Add_Points_Ch4 -SFX_801b3_4:: - dbw CH7, SFX_8029f_4_Ch7 +SFX_Surfing_Jump:: + dbw CH7, SFX_Surfing_Jump_Ch7 -SFX_801b6_4:: - dbw CH4, SFX_802b5_4_Ch4 +SFX_Surfing_Flip:: + dbw CH4, SFX_Surfing_Flip_Ch4 -SFX_801b9_4:: - dbw CH7, SFX_802e1_4_Ch7 +SFX_Surfing_Land:: + dbw CH7, SFX_Surfing_Land_Ch7 SFX_801bc_4:: dbw CH4, SFX_802cc_4_Ch4 -SFX_801bf_4:: - dbw CH7, SFX_802d7_4_Ch7 +SFX_Surfing_Crash:: + dbw CH7, SFX_Surfing_Crash_Ch7 SFX_Get_Item2_4_2:: dbw ( $80 | CH4 ), SFX_Get_Item2_4_2_Ch1 diff --git a/audio/sfx/unknown_80250.asm b/audio/sfx/surfing_add_points.asm index 4f65a6a0..ea95edf8 100644 --- a/audio/sfx/unknown_80250.asm +++ b/audio/sfx/surfing_add_points.asm @@ -1,4 +1,4 @@ -SFX_80250_4_Ch4: +SFX_Surfing_Add_Points_Ch4: duty 2 unknownsfx0x20 0, 145, 192, 7 unknownsfx0x20 0, 129, 208, 7 diff --git a/audio/sfx/unknown_802d7.asm b/audio/sfx/surfing_crash.asm index 4a1f1ab4..88055c35 100755..100644 --- a/audio/sfx/unknown_802d7.asm +++ b/audio/sfx/surfing_crash.asm @@ -1,4 +1,4 @@ -SFX_802d7_4_Ch7: +SFX_Surfing_Crash_Ch7: unknownnoise0x20 2, 241, 50 unknownnoise0x20 2, 0, 0 unknownnoise0x20 4, 230, 33 diff --git a/audio/sfx/unknown_802b5.asm b/audio/sfx/surfing_flip.asm index 364443cf..5a135d02 100644 --- a/audio/sfx/unknown_802b5.asm +++ b/audio/sfx/surfing_flip.asm @@ -1,4 +1,4 @@ -SFX_802b5_4_Ch4: +SFX_Surfing_Flip_Ch4: duty 2 unknownsfx0x20 3, 196, 96, 7 unknownsfx0x20 0, 164, 64, 7 diff --git a/audio/sfx/unknown_8029f.asm b/audio/sfx/surfing_jump.asm index 475c2813..13fffb64 100755..100644 --- a/audio/sfx/unknown_8029f.asm +++ b/audio/sfx/surfing_jump.asm @@ -1,4 +1,4 @@ -SFX_8029f_4_Ch7: +SFX_Surfing_Jump_Ch7: unknownnoise0x20 6, 241, 17 unknownnoise0x20 7, 242, 34 unknownnoise0x20 8, 243, 51 diff --git a/audio/sfx/unknown_802e1.asm b/audio/sfx/surfing_land.asm index e1963b23..028ef16a 100644 --- a/audio/sfx/unknown_802e1.asm +++ b/audio/sfx/surfing_land.asm @@ -1,4 +1,4 @@ -SFX_802e1_4_Ch7: +SFX_Surfing_Land_Ch7: unknownnoise0x20 3, 243, 102 unknownnoise0x20 3, 51, 83 unknownnoise0x20 7, 245, 81 diff --git a/constants/music_constants.asm b/constants/music_constants.asm index 955a3899..2fc4a0dc 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -276,10 +276,10 @@ ENDM music_const SFX_SHOOTING_STAR, SFX_Shooting_Star ; AUDIO_4 - music_const SFX_UNKNOWN_801B0_4, SFX_801b0_4 - music_const SFX_UNKNOWN_801B3_4, SFX_801b3_4 - music_const SFX_UNKNOWN_801B6_4, SFX_801b6_4 - music_const SFX_UNKNOWN_801B9_4, SFX_801b9_4 + music_const SFX_SURFING_ADD_POINTS, SFX_Surfing_Add_Points + music_const SFX_SURFING_JUMP, SFX_Surfing_Jump + music_const SFX_SURFING_FLIP, SFX_Surfing_Flip + music_const SFX_SURFING_LAND, SFX_Surfing_Land music_const SFX_UNKNOWN_801BC_4, SFX_801bc_4 - music_const SFX_UNKNOWN_801BF_4, SFX_801bf_4 - music_const SFX_GET_ITEM2_4_2, SFX_Get_Item2_4_2 + music_const SFX_SURFING_CRASH, SFX_Surfing_Crash + music_const SFX_GET_ITEM2_4_2, SFX_Get_Item2_4_2
\ No newline at end of file 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/beach_house.asm b/data/mapObjects/beach_house.asm index 71b4b7df..cbca9f28 100644 --- a/data/mapObjects/beach_house.asm +++ b/data/mapObjects/beach_house.asm @@ -2,19 +2,19 @@ BeachHouseObjects: db $a ; border block db 2 ; warps - db 7,2,0,$ff - db 7,3,0,$ff + warp 2,7,0,-1 + warp 3,7,0,-1 db 4 ; signs - db 0,3,3 - db 0,7,4 - db 0,$b,5 - db 1,$d,6 + sign 3,0,3 + sign 7,0,4 + sign 11,0,5 + sign 13,1,6 db 2 ; objects object SPRITE_FISHER, 2, 3, STAY, DOWN, 1 ; surfin' dude object $3d, 5, 3, WALK, $01, 2 ; pikachu ; warp-to - EVENT_DISP BEACH_HOUSE_WIDTH,7,2 - EVENT_DISP BEACH_HOUSE_WIDTH,7,3 + warp_to 2,7, BEACH_HOUSE_WIDTH + warp_to 3,7, BEACH_HOUSE_WIDTH 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 08b11853..65523b26 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, $81, $0 ; Daisy, sitting by map - object SPRITE_DAISY, $6, $4, WALK, $1, $82, $0 ; Daisy, walking around - object SPRITE_BOOK_MAP_DEX, $3, $3, STAY, NONE, $83, $0 ; map on table + db 3 ; objects + object SPRITE_DAISY, 2, 3, STAY, RIGHT, 1, 0 ; 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..c7135904 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_1F + warp_to 10, 13, CELADON_CITY_WIDTH ; CELADON_MART_1F + warp_to 24, 9, CELADON_CITY_WIDTH ; CELADON_MANSION_1F + warp_to 24, 3, CELADON_CITY_WIDTH ; CELADON_MANSION_1F + warp_to 25, 3, CELADON_CITY_WIDTH ; CELADON_MANSION_1F + 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_5F + warp_to 33, 19, CELADON_CITY_WIDTH ; GAME_CORNER_PRIZE_ROOM + warp_to 31, 27, CELADON_CITY_WIDTH ; CELADON_DINER + warp_to 35, 27, CELADON_CITY_WIDTH ; CELADON_CHIEF_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 af59d2b1..be5a3c71 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_FAT_BALD_GUY, $e, $b, STAY, LEFT, $9 ; person - object SPRITE_FISHER, $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_FAT_BALD_GUY, 14, 11, STAY, LEFT, 9 ; person + object SPRITE_FISHER, 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_B1F 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..129a7148 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_2F + warp_to 7, 1, CELADON_MANSION_3_WIDTH ; CELADON_MANSION_ROOF + warp_to 2, 1, CELADON_MANSION_3_WIDTH ; CELADON_MANSION_ROOF + warp_to 4, 1, CELADON_MANSION_3_WIDTH ; CELADON_MANSION_2F diff --git a/data/mapObjects/celadonmansion4.asm b/data/mapObjects/celadonmansion4.asm index c4f667fa..49ec71cf 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_3F + warp_to 2, 1, CELADON_MANSION_4_WIDTH ; CELADON_MANSION_3F + warp_to 2, 7, CELADON_MANSION_4_WIDTH ; CELADON_MANSION_ROOF_HOUSE diff --git a/data/mapObjects/celadonmansion5.asm b/data/mapObjects/celadonmansion5.asm index 243e345b..3c5c04e3 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_ROOF + warp_to 3, 7, CELADON_MANSION_5_WIDTH ; CELADON_MANSION_ROOF diff --git a/data/mapObjects/celadonmart1.asm b/data/mapObjects/celadonmart1.asm index af647cf2..b2a8fdcd 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_2F + 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..db095add 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_1F + warp_to 16, 1, CELADON_MART_2_WIDTH ; CELADON_MART_3F + warp_to 1, 1, CELADON_MART_2_WIDTH ; CELADON_MART_ELEVATOR diff --git a/data/mapObjects/celadonmart3.asm b/data/mapObjects/celadonmart3.asm index 45f12b2c..c412ed5b 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, $b, $6, STAY, RIGHT, $2 ; person - object SPRITE_GAMEBOY_KID, $7, $2, STAY, DOWN, $3 ; person - object SPRITE_GAMEBOY_KID, $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, 11, 6, STAY, RIGHT, 2 ; person + object SPRITE_GAMEBOY_KID, 7, 2, STAY, DOWN, 3 ; person + object SPRITE_GAMEBOY_KID, 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_4F + warp_to 16, 1, CELADON_MART_3_WIDTH ; CELADON_MART_2F + 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..eeb75d7f 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_3F + warp_to 16, 1, CELADON_MART_4_WIDTH ; CELADON_MART_5F + 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..ff4f3955 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_4F + 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..14fca2bf 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_1F + warp_to 2, 3, CELADON_MART_ELEVATOR_WIDTH ; CELADON_MART_1F diff --git a/data/mapObjects/celadonmartroof.asm b/data/mapObjects/celadonmartroof.asm index 63a1b4d7..744a636d 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_5F diff --git a/data/mapObjects/celadonpokecenter.asm b/data/mapObjects/celadonpokecenter.asm index 6691eaaa..d4d40baa 100755 --- a/data/mapObjects/celadonpokecenter.asm +++ b/data/mapObjects/celadonpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $7, $3, STAY, DOWN, $2 ; person - object SPRITE_FOULARD_WOMAN, $a, $5, WALK, $0, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 7, 3, STAY, DOWN, 2 ; person + object SPRITE_FOULARD_WOMAN, 10, 5, WALK, 0, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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 318f03b9..864717fc 100755 --- a/data/mapObjects/ceruleancity.asm +++ b/data/mapObjects/ceruleancity.asm @@ -2,46 +2,46 @@ CeruleanCityObject: db $a ; 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 + 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_OFFICER_JENNY, $1c, $c, STAY, DOWN, $6 ; person - object SPRITE_LASS, $1d, $1a, STAY, LEFT, $7 ; person - object SPRITE_BALL, $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_OFFICER_JENNY, $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_OFFICER_JENNY, 28, 12, STAY, DOWN, 6 ; person + object SPRITE_LASS, 29, 26, STAY, LEFT, 7 ; person + object SPRITE_BALL, 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_OFFICER_JENNY, 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 ; CERULEAN_TRASHED_HOUSE + warp_to 13, 15, CERULEAN_CITY_WIDTH ; CERULEAN_TRADE_HOUSE + 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 ; CERULEAN_CAVE_1F + warp_to 27, 9, CERULEAN_CITY_WIDTH ; CERULEAN_TRASHED_HOUSE + warp_to 9, 11, CERULEAN_CITY_WIDTH ; CERULEAN_BADGE_HOUSE + warp_to 9, 9, CERULEAN_CITY_WIDTH ; CERULEAN_BADGE_HOUSE 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 97e5b52d..efbbebd6 100755 --- a/data/mapObjects/ceruleanhouse1.asm +++ b/data/mapObjects/ceruleanhouse1.asm @@ -1,18 +1,18 @@ 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 $4 ; objects - object SPRITE_GIRL, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_BULBASAUR, $4, $1, STAY, DOWN, $2 ; person - object SPRITE_ODDISH, $1, $4, STAY, NONE, $3 ; person - object SPRITE_SANDSHREW, $5, $3, STAY, LEFT, $4 ; person + db 4 ; objects + object SPRITE_GIRL, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_BULBASAUR, 4, 1, STAY, DOWN, 2 ; person + object SPRITE_ODDISH, 1, 4, STAY, NONE, 3 ; person + object SPRITE_SANDSHREW, 5, 3, STAY, LEFT, 4 ; 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 a8ad26d4..1297e6f4 100755 --- a/data/mapObjects/ceruleanpokecenter.asm +++ b/data/mapObjects/ceruleanpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; 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, UP, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; 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, UP, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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 28960150..5de7f989 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_MR_MASTERBALL, $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_MR_MASTERBALL, 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..264a59f8 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 ; POKEMON_MANSION_1F + warp_to 18, 3, CINNABAR_ISLAND_WIDTH ; CINNABAR_GYM + warp_to 6, 9, CINNABAR_ISLAND_WIDTH ; CINNABAR_LAB + 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 b9779eb5..99fb3169 100755 --- a/data/mapObjects/cinnabarpokecenter.asm +++ b/data/mapObjects/cinnabarpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; 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 - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; 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 + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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 100644 --- 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 c6702cfa..4a8c2641 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_CHANSEY, $1, $4, STAY, NONE, $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_CHANSEY, 1, 4, STAY, NONE, 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..844bc832 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_ROUTE_2 + warp_to 37, 31, DIGLETTS_CAVE_WIDTH ; DIGLETTS_CAVE_ROUTE_11 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 1dbb2dca..9ddc6e3a 100755 --- a/data/mapObjects/fanclub.asm +++ b/data/mapObjects/fanclub.asm @@ -1,20 +1,20 @@ 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 $0 ; signs + db 0 ; signs - db $6 ; objects - object SPRITE_FISHER2, $6, $3, STAY, LEFT, $1 ; person - object SPRITE_GIRL, $1, $3, STAY, RIGHT, $2 ; person - object SPRITE_CLEFAIRY_2, $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_2, 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 f4bb842b..35f9365d 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_CHANSEY, $1f, $5, STAY, DOWN, $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_CHANSEY, 31, 5, STAY, DOWN, 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_BILLS_GRANDPAS_HOUSE + warp_to 19, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_POKECENTER + warp_to 27, 27, FUCHSIA_CITY_WIDTH ; WARDENS_HOUSE + warp_to 18, 3, FUCHSIA_CITY_WIDTH ; SAFARI_ZONE_GATE + 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_GOOD_ROD_HOUSE + warp_to 31, 24, FUCHSIA_CITY_WIDTH ; FUCHSIA_GOOD_ROD_HOUSE diff --git a/data/mapObjects/fuchsiagym.asm b/data/mapObjects/fuchsiagym.asm index 86f62d21..48dcc1d7 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_LAPRAS_GIVER, $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_LAPRAS_GIVER, 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 bf9abe99..bed81891 100755 --- a/data/mapObjects/fuchsiapokecenter.asm +++ b/data/mapObjects/fuchsiapokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_ROCKER, $4, $3, STAY, UP, $2 ; person - object SPRITE_LASS, $6, $5, WALK, $2, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_ROCKER, 4, 3, STAY, UP, 2 ; person + object SPRITE_LASS, 6, 5, WALK, 2, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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 dbeaa85b..bb5895ac 100755 --- a/data/mapObjects/indigoplateaulobby.asm +++ b/data/mapObjects/indigoplateaulobby.asm @@ -1,22 +1,22 @@ 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 $6 ; 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 - object SPRITE_CHANSEY, $8, $5, STAY, DOWN, $6 ; person + db 6 ; 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 + object SPRITE_CHANSEY, 8, 5, STAY, DOWN, 6 ; 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 f98cede4..38b5a00e 100755 --- a/data/mapObjects/lavenderpokecenter.asm +++ b/data/mapObjects/lavenderpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $5, $3, STAY, NONE, $2 ; person - object SPRITE_LITTLE_GIRL, $a, $5, WALK, $2, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 5, 3, STAY, NONE, 2 ; person + object SPRITE_LITTLE_GIRL, 10, 5, WALK, 2, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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..c694d763 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 ; POKEMON_TOWER_1F + warp_to 7, 9, LAVENDER_TOWN_WIDTH ; MR_FUJIS_HOUSE + warp_to 15, 13, LAVENDER_TOWN_WIDTH ; LAVENDER_MART + warp_to 3, 13, LAVENDER_TOWN_WIDTH ; LAVENDER_CUBONE_HOUSE + 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..1b97c898 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 ; POKEMON_MANSION_2F + warp_to 21, 23, MANSION_1_WIDTH ; POKEMON_MANSION_B1F + 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..6fd86b97 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 ; POKEMON_MANSION_1F + warp_to 7, 10, MANSION_2_WIDTH ; POKEMON_MANSION_3F + warp_to 25, 14, MANSION_2_WIDTH ; POKEMON_MANSION_3F + warp_to 6, 1, MANSION_2_WIDTH ; POKEMON_MANSION_3F diff --git a/data/mapObjects/mansion3.asm b/data/mapObjects/mansion3.asm index 72431402..54fbfa75 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 ; POKEMON_MANSION_2F + warp_to 6, 1, MANSION_3_WIDTH ; POKEMON_MANSION_2F + warp_to 25, 14, MANSION_3_WIDTH ; POKEMON_MANSION_2F diff --git a/data/mapObjects/mansion4.asm b/data/mapObjects/mansion4.asm index 94a6f612..bcd85206 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 ; POKEMON_MANSION_1F diff --git a/data/mapObjects/mtmoon1.asm b/data/mapObjects/mtmoon1.asm index 42c45016..0215d821 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_B1F + warp_to 17, 11, MT_MOON_1_WIDTH ; MT_MOON_B1F + warp_to 25, 15, MT_MOON_1_WIDTH ; MT_MOON_B1F diff --git a/data/mapObjects/mtmoon2.asm b/data/mapObjects/mtmoon2.asm index f39cd4a5..ee56e471 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_1F + warp_to 17, 11, MT_MOON_2_WIDTH ; MT_MOON_B2F + warp_to 25, 9, MT_MOON_2_WIDTH ; MT_MOON_1F + warp_to 25, 15, MT_MOON_2_WIDTH ; MT_MOON_1F + warp_to 21, 17, MT_MOON_2_WIDTH ; MT_MOON_B2F + warp_to 13, 27, MT_MOON_2_WIDTH ; MT_MOON_B2F + warp_to 23, 3, MT_MOON_2_WIDTH ; MT_MOON_B2F + warp_to 27, 3, MT_MOON_2_WIDTH diff --git a/data/mapObjects/mtmoon3.asm b/data/mapObjects/mtmoon3.asm index 43891ec3..f76a3e26 100755 --- a/data/mapObjects/mtmoon3.asm +++ b/data/mapObjects/mtmoon3.asm @@ -1,28 +1,28 @@ 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 $a ; objects - object SPRITE_BLACK_HAIR_BOY_2, $c, $8, STAY, RIGHT, $1, OPP_SUPER_NERD, $2 - object SPRITE_JESSIE, $9, $3, STAY, LEFT, $2 - 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, $1 - object SPRITE_JAMES, $9, $4, STAY, LEFT, $6 - object SPRITE_OMANYTE, $c, $6, STAY, NONE, $7 ; person - object SPRITE_OMANYTE, $d, $6, STAY, NONE, $8 ; person - object SPRITE_BALL, $19, $15, STAY, NONE, $9, HP_UP - object SPRITE_BALL, $1d, $5, STAY, NONE, $a, TM_01 + db 10 ; objects + object SPRITE_BLACK_HAIR_BOY_2, 12, 8, STAY, RIGHT, 1, OPP_SUPER_NERD, 2 + object SPRITE_JESSIE, 9, 3, STAY, LEFT, 2 + 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, 1 + object SPRITE_JAMES, 9, 4, STAY, LEFT, 6 + object SPRITE_OMANYTE, 12, 6, STAY, NONE, 7 ; person + object SPRITE_OMANYTE, 13, 6, STAY, NONE, 8 ; person + object SPRITE_BALL, 25, 21, STAY, NONE, 9, HP_UP + object SPRITE_BALL, 29, 5, STAY, NONE, 10, 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 d1ac34fb..7469efa8 100755 --- a/data/mapObjects/mtmoonpokecenter.asm +++ b/data/mapObjects/mtmoonpokecenter.asm @@ -1,21 +1,21 @@ 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 $7 ; 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 - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $7 ; person + db 7 ; 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 + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 7 ; 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 1efb1e72..8595d81c 100755 --- a/data/mapObjects/oakslab.asm +++ b/data/mapObjects/oakslab.asm @@ -1,23 +1,23 @@ 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 $9 ; objects - object SPRITE_BLUE, $4, $3, STAY, NONE, $1, OPP_SONY1, $1 - object SPRITE_BALL, $7, $3, STAY, NONE, $2 ; person - object SPRITE_OAK, $5, $2, STAY, DOWN, $3 ; person - object SPRITE_BOOK_MAP_DEX, $2, $1, STAY, NONE, $4 ; person - object SPRITE_BOOK_MAP_DEX, $3, $1, STAY, NONE, $5 ; person - object SPRITE_OAK, $5, $a, STAY, UP, $6 ; person - object SPRITE_GIRL, $1, $9, WALK, $1, $7 ; person - object SPRITE_OAK_AIDE, $2, $a, STAY, NONE, $8 ; person - object SPRITE_OAK_AIDE, $8, $a, STAY, NONE, $9 ; person + db 9 ; objects + object SPRITE_BLUE, 4, 3, STAY, NONE, 1, OPP_SONY1, 1 + object SPRITE_BALL, 7, 3, STAY, NONE, 2 ; person + object SPRITE_OAK, 5, 2, STAY, DOWN, 3 ; person + object SPRITE_BOOK_MAP_DEX, 2, 1, STAY, NONE, 4 ; person + object SPRITE_BOOK_MAP_DEX, 3, 1, STAY, NONE, 5 ; person + object SPRITE_OAK, 5, 10, STAY, UP, 6 ; person + object SPRITE_GIRL, 1, 9, WALK, 1, 7 ; person + object SPRITE_OAK_AIDE, 2, 10, STAY, NONE, 8 ; person + object SPRITE_OAK_AIDE, 8, 10, STAY, NONE, 9 ; 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 e22f79a6..ce6c80da 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, $a, $4, 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, 10, 4, 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..8ad183dc 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_NIDORAN_HOUSE + warp_to 23, 17, PEWTER_CITY_WIDTH ; PEWTER_MART + warp_to 7, 29, PEWTER_CITY_WIDTH ; PEWTER_SPEECH_HOUSE + 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 4c7444bb..9370cc16 100755 --- a/data/mapObjects/pewterpokecenter.asm +++ b/data/mapObjects/pewterpokecenter.asm @@ -1,20 +1,20 @@ 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 $6 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $b, $7, STAY, LEFT, $2 ; person - object SPRITE_JIGGLYPUFF, $1, $3, STAY, DOWN, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person - object SPRITE_LASS, $4, $3, STAY, UP, $5 ; person - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $6 ; person + db 6 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 11, 7, STAY, LEFT, 2 ; person + object SPRITE_JIGGLYPUFF, 1, 3, STAY, DOWN, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person + object SPRITE_LASS, 4, 3, STAY, UP, 5 ; person + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 6 ; 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..e29867ac 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 ; POKEMON_TOWER_2F diff --git a/data/mapObjects/pokemontower2.asm b/data/mapObjects/pokemontower2.asm index 33bc048d..96223a26 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 ; POKEMON_TOWER_3F + warp_to 18, 9, POKEMONTOWER_2_WIDTH ; POKEMON_TOWER_1F diff --git a/data/mapObjects/pokemontower3.asm b/data/mapObjects/pokemontower3.asm index 9899276a..f8151f00 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 ; POKEMON_TOWER_2F + warp_to 18, 9, POKEMONTOWER_3_WIDTH ; POKEMON_TOWER_4F diff --git a/data/mapObjects/pokemontower4.asm b/data/mapObjects/pokemontower4.asm index 19f4f4e3..a6723d5f 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 ; POKEMON_TOWER_5F + warp_to 18, 9, POKEMONTOWER_4_WIDTH ; POKEMON_TOWER_3F diff --git a/data/mapObjects/pokemontower5.asm b/data/mapObjects/pokemontower5.asm index 5a73825c..da550fe2 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 ; POKEMON_TOWER_4F + warp_to 18, 9, POKEMONTOWER_5_WIDTH ; POKEMON_TOWER_6F diff --git a/data/mapObjects/pokemontower6.asm b/data/mapObjects/pokemontower6.asm index d0035faa..1d2ecdd3 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 ; POKEMON_TOWER_5F + warp_to 9, 16, POKEMONTOWER_6_WIDTH ; POKEMON_TOWER_7F diff --git a/data/mapObjects/pokemontower7.asm b/data/mapObjects/pokemontower7.asm index 76435c04..67adcd69 100755 --- a/data/mapObjects/pokemontower7.asm +++ b/data/mapObjects/pokemontower7.asm @@ -1,15 +1,15 @@ 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 $3 ; objects - object SPRITE_JESSIE, $a, $8, STAY, DOWN, $1 - object SPRITE_JAMES, $b, $8, STAY, DOWN, $2 - object SPRITE_MR_FUJI, $a, $3, STAY, DOWN, $3 + db 3 ; objects + object SPRITE_JESSIE, 10, 8, STAY, DOWN, 1 + object SPRITE_JAMES, 11, 8, STAY, DOWN, 2 + object SPRITE_MR_FUJI, 10, 3, STAY, DOWN, 3 ; 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..c70ee1f6 100755 --- a/data/mapObjects/redshouse1f.asm +++ b/data/mapObjects/redshouse1f.asm @@ -1,18 +1,18 @@ RedsHouse1FObject: db $0A ; 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..ec13e99c 100755 --- a/data/mapObjects/redshouse2f.asm +++ b/data/mapObjects/redshouse2f.asm @@ -1,12 +1,12 @@ RedsHouse2FObject: db $0A ; 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..14bed205 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_B2F + 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_B2F + 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..3c3d4277 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_B1F + warp_to 21, 8, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_B3F + warp_to 24, 19, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_ELEVATOR + warp_to 21, 22, ROCKET_HIDEOUT_2_WIDTH ; ROCKET_HIDEOUT_B1F + 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..690724b0 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_B2F + warp_to 19, 18, ROCKET_HIDEOUT_3_WIDTH ; ROCKET_HIDEOUT_B4F diff --git a/data/mapObjects/rockethideout4.asm b/data/mapObjects/rockethideout4.asm index 42e58b23..60998c61 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_JAMES, $19, $a, STAY, DOWN, $2 - object SPRITE_JESSIE, $18, $a, STAY, DOWN, $3 - 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_JAMES, 25, 10, STAY, DOWN, 2 + object SPRITE_JESSIE, 24, 10, STAY, DOWN, 3 + 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..3c17e7e4 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_B1F + warp_to 3, 1, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; ROCKET_HIDEOUT_B1F diff --git a/data/mapObjects/rocktunnel1.asm b/data/mapObjects/rocktunnel1.asm index 932efb87..310c4792 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_B1F + warp_to 5, 3, ROCK_TUNNEL_1_WIDTH ; ROCK_TUNNEL_B1F + warp_to 17, 11, ROCK_TUNNEL_1_WIDTH ; ROCK_TUNNEL_B1F + warp_to 37, 17, ROCK_TUNNEL_1_WIDTH ; ROCK_TUNNEL_B1F diff --git a/data/mapObjects/rocktunnel2.asm b/data/mapObjects/rocktunnel2.asm index 3589ec60..1a3201a4 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_1F + warp_to 27, 3, ROCK_TUNNEL_2_WIDTH ; ROCK_TUNNEL_1F + warp_to 23, 11, ROCK_TUNNEL_2_WIDTH ; ROCK_TUNNEL_1F + warp_to 3, 3, ROCK_TUNNEL_2_WIDTH ; ROCK_TUNNEL_1F diff --git a/data/mapObjects/rocktunnelpokecenter.asm b/data/mapObjects/rocktunnelpokecenter.asm index 06a2e39d..f2d429b7 100755 --- a/data/mapObjects/rocktunnelpokecenter.asm +++ b/data/mapObjects/rocktunnelpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; objects - object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $7, $3, STAY, DOWN, $2 ; person - object SPRITE_FISHER2, $2, $5, STAY, NONE, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; objects + object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person + object SPRITE_GENTLEMAN, 7, 3, STAY, DOWN, 2 ; person + object SPRITE_FISHER2, 2, 5, STAY, NONE, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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..40d5c93a 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_1F + warp_to 8, 53, ROUTE_10_WIDTH ; ROCK_TUNNEL_1F + warp_to 6, 39, ROUTE_10_WIDTH ; POWER_PLANT diff --git a/data/mapObjects/route11.asm b/data/mapObjects/route11.asm index 8b6b5d3f..f2bbb01b 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, $0, ROUTE_11_GATE_1F - db $8, $3a, $2, ROUTE_11_GATE_1F - db $9, $3a, $2, 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, 0, ROUTE_11_GATE_1F + warp 58, 8, 2, ROUTE_11_GATE_1F + warp 58, 9, 2, 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_ROUTE_11 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 2dc7f9e7..394bae3d 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, $0, 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, 0, 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_SUPER_ROD_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 30fc39c4..244e4f41 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, $0, ROUTE_15_GATE_1F - db $8, $e, $2, ROUTE_15_GATE_1F - db $9, $e, $2, ROUTE_15_GATE_1F + db 4 ; warps + warp 7, 8, 0, ROUTE_15_GATE_1F + warp 7, 9, 0, ROUTE_15_GATE_1F + warp 14, 8, 2, ROUTE_15_GATE_1F + warp 14, 9, 2, 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 b7da1dbb..0b84caa7 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, $0, ROUTE_16_GATE_1F - db $a, $18, $2, ROUTE_16_GATE_1F - db $b, $18, $2, ROUTE_16_GATE_1F - db $4, $11, $4, ROUTE_16_GATE_1F - db $5, $11, $4, ROUTE_16_GATE_1F - db $4, $18, $6, ROUTE_16_GATE_1F - db $5, $18, $6, 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, 0, ROUTE_16_GATE_1F + warp 24, 10, 2, ROUTE_16_GATE_1F + warp 24, 11, 2, ROUTE_16_GATE_1F + warp 17, 4, 4, ROUTE_16_GATE_1F + warp 17, 5, 4, ROUTE_16_GATE_1F + warp 24, 4, 6, ROUTE_16_GATE_1F + warp 24, 5, 6, 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_FLY_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 41b971b0..9c12faf6 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, $0, ROUTE_18_GATE_1F - db $8, $28, $2, ROUTE_18_GATE_1F - db $9, $28, $2, ROUTE_18_GATE_1F + db 4 ; warps + warp 33, 8, 0, ROUTE_18_GATE_1F + warp 33, 9, 0, ROUTE_18_GATE_1F + warp 40, 8, 2, ROUTE_18_GATE_1F + warp 40, 9, 2, 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 1ad911e8..4110089e 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_COOK, $4, $2, WALK, $2, $1 ; person + db 1 ; objects + object SPRITE_COOK, 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 0f963cfd..fafcd20f 100755 --- a/data/mapObjects/route19.asm +++ b/data/mapObjects/route19.asm @@ -1,24 +1,23 @@ Route19Object: db $43 ; border block - db $1 ; warps - db $9, $5, $0, BEACH_HOUSE + db 1 ; warps + warp 5, 9, 0, BEACH_HOUSE - db $1 ; signs - db $b,$b,$b + db 1 ; signs + sign 11, 11, 11 - db $a ; objects - - object SPRITE_BLACK_HAIR_BOY_1, $09, $07, STAY, RIGHT, $1, OPP_SWIMMER, $2 - object SPRITE_BLACK_HAIR_BOY_1, $0c, $09, STAY, LEFT, $2, OPP_SWIMMER, $3 - object SPRITE_SWIMMER, $0d, $19, STAY, LEFT, $3, OPP_SWIMMER, $4 - object SPRITE_SWIMMER, $04, $1b, STAY, RIGHT, $4, OPP_SWIMMER, $5 - object SPRITE_SWIMMER, $10, $1f, STAY, UP, $5, OPP_SWIMMER, $6 - object SPRITE_SWIMMER, $09, $0d, STAY, DOWN, $6, OPP_SWIMMER, $7 - object SPRITE_SWIMMER, $08, $2b, STAY, LEFT, $7, OPP_BEAUTY, $c - object SPRITE_SWIMMER, $0b, $2b, STAY, RIGHT, $8, OPP_BEAUTY, $d - object SPRITE_SWIMMER, $09, $2a, STAY, UP, $9, OPP_SWIMMER, $8 - object SPRITE_SWIMMER, $0a, $2c, STAY, DOWN, $a, OPP_BEAUTY, $e + db 10 ; objects + object SPRITE_BLACK_HAIR_BOY_1, 9, 7, STAY, RIGHT, 1, OPP_SWIMMER, 2 + object SPRITE_BLACK_HAIR_BOY_1, 12, 9, 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, 13, 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 - EVENT_DISP ROUTE_19_WIDTH, $9, $5 ; BEACH_HOUSE + warp_to 5, 9, ROUTE_19_WIDTH ; BEACH_HOUSE diff --git a/data/mapObjects/route2.asm b/data/mapObjects/route2.asm index a8b0a7a5..b9f7ae19 100755 --- a/data/mapObjects/route2.asm +++ b/data/mapObjects/route2.asm @@ -1,36 +1,36 @@ Route2Object: db $f ; border block - db $7 ; 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 $23, $11, $1, ROUTE_2_GATE + db 7 ; 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 + warp 17, 35, 1, ROUTE_2_GATE - 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 - EVENT_DISP ROUTE_2_WIDTH, $23, $11 ; ROUTE_2_GATE + warp_to 12, 9, ROUTE_2_WIDTH ; DIGLETTS_CAVE_ROUTE_2 + warp_to 3, 11, ROUTE_2_WIDTH ; VIRIDIAN_FOREST_NORTH_GATE + warp_to 15, 19, ROUTE_2_WIDTH ; ROUTE_2_TRADE_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_SOUTH_GATE + warp_to 17, 35, ROUTE_2_WIDTH ; ROUTE_2_GATE ; unused - EVENT_DISP $4, $7, $2 + warp_to 2, 7, 4 dw $c712 db $9, $7 - EVENT_DISP $4, $7, $2 - EVENT_DISP $4, $7, $2 - EVENT_DISP $4, $7, $2 + 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..bfd87d8f 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_1F + warp_to 58, 9, ROUTE_20_WIDTH ; SEAFOAM_ISLANDS_1F 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 e75c4d50..bd7764da 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, $0, $ff + db 4 ; warps + warp 4, 7, 0, -1 + warp 5, 7, 0, -1 + warp 4, 0, 0, -1 + warp 5, 0, 0, -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..eafb0def 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_1F + warp_to 14, 31, ROUTE_23_WIDTH ; VICTORY_ROAD_2F diff --git a/data/mapObjects/route24.asm b/data/mapObjects/route24.asm index 78a4d573..e4e44f18 100755 --- a/data/mapObjects/route24.asm +++ b/data/mapObjects/route24.asm @@ -1,17 +1,17 @@ Route24Object: db $2c ; border block - db $0 ; warps + db 0 ; warps - db $0 ; signs + db 0 ; signs - db $9 ; 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 - object SPRITE_BLACK_HAIR_BOY_1, $6, $5, STAY, DOWN, $9 + db 9 ; 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 + object SPRITE_BLACK_HAIR_BOY_1, 6, 5, STAY, DOWN, 9 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 7d1d224d..1f655e15 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, $4, $1, STAY, DOWN, $2 ; person + db 2 ; objects + object SPRITE_OAK_AIDE, 2, 4, STAY, RIGHT, 1 ; person + object SPRITE_GAMEBOY_KID, 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..2cb56c59 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_1F + warp_to 24, 5, ROUTE_4_WIDTH ; MT_MOON_B1F diff --git a/data/mapObjects/route5.asm b/data/mapObjects/route5.asm index eefcaa92..08d6d9f9 100755 --- a/data/mapObjects/route5.asm +++ b/data/mapObjects/route5.asm @@ -2,20 +2,20 @@ Route5Object: db $a ; border block db $5 ; warps - db $1d, $a, $2, 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 + warp 10, 29, 2, 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 ; UNDERGROUND_PATH_ROUTE_5 + warp_to 10, 21, ROUTE_5_WIDTH ; DAYCARE 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 6ab90621..a024d777 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, $a - object SPRITE_LASS, $b, $15, STAY, LEFT, $2, OPP_JR_TRAINER_F, $19 - 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, 10 + object SPRITE_LASS, 11, 21, STAY, LEFT, 2, OPP_JR_TRAINER_F, 25 + 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 ; UNDERGROUND_PATH_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 3f753830..2207bfd4 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, $2, ROUTE_7_GATE - db $9, $b, $0, ROUTE_7_GATE - db $a, $b, $0, ROUTE_7_GATE - db $d, $5, $0, PATH_ENTRANCE_ROUTE_7 + db 5 ; warps + warp 18, 9, 2, ROUTE_7_GATE + warp 18, 10, 2, ROUTE_7_GATE + warp 11, 9, 0, ROUTE_7_GATE + warp 11, 10, 0, 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 ; UNDERGROUND_PATH_ROUTE_7 diff --git a/data/mapObjects/route7gate.asm b/data/mapObjects/route7gate.asm index 8f65891b..5b894657 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, $1, $ff - db $4, $5, $1, $ff + db 4 ; warps + warp 0, 3, 3, -1 + warp 0, 4, 3, -1 + warp 5, 3, 1, -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 8f336e03..5d2b73cb 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, $0, ROUTE_8_GATE - db $9, $8, $2, ROUTE_8_GATE - db $a, $8, $2, ROUTE_8_GATE - db $3, $d, $0, PATH_ENTRANCE_ROUTE_8 + db 5 ; warps + warp 1, 9, 0, ROUTE_8_GATE + warp 1, 10, 0, ROUTE_8_GATE + warp 8, 9, 2, ROUTE_8_GATE + warp 8, 10, 2, 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 ; UNDERGROUND_PATH_ROUTE_8 diff --git a/data/mapObjects/route8gate.asm b/data/mapObjects/route8gate.asm index a3e21618..23fa54d6 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, $1, $ff - db $4, $0, $1, $ff - db $3, $5, $3, $ff - db $4, $5, $3, $ff + db 4 ; warps + warp 0, 3, 1, -1 + warp 0, 4, 1, -1 + warp 5, 3, 3, -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 cdfd801c..9013ce54 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_YOUNGSTER, $e - 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_YOUNGSTER, 14 + 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..9e0d5751 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_GATE + warp_to 15, 25, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_GATE + 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_CENTER_REST_HOUSE diff --git a/data/mapObjects/safarizoneeast.asm b/data/mapObjects/safarizoneeast.asm index 6c2f8138..4426159d 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_EAST_REST_HOUSE 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..b768a077 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_NORTH_REST_HOUSE 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..3b3acd50 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_WEST_REST_HOUSE diff --git a/data/mapObjects/saffroncity.asm b/data/mapObjects/saffroncity.asm index 730d8be5..6ff8ea93 100755 --- a/data/mapObjects/saffroncity.asm +++ b/data/mapObjects/saffroncity.asm @@ -1,50 +1,50 @@ 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 $e ; 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 + db 14 ; 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 ; 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_PIDGEY_HOUSE + 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 ; MR_PSYCHICS_HOUSE diff --git a/data/mapObjects/saffrongym.asm b/data/mapObjects/saffrongym.asm index 629ab760..43065f22 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_LASS, $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_LASS, 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 b82be083..19e939a6 100755 --- a/data/mapObjects/saffronpokecenter.asm +++ b/data/mapObjects/saffronpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; 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 - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; 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 + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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 3fe629da..590ae732 100755 --- a/data/mapObjects/school.asm +++ b/data/mapObjects/school.asm @@ -1,17 +1,17 @@ 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 $3 ; objects - object SPRITE_BRUNETTE_GIRL, $3, $5, STAY, UP, $1 ; person - object SPRITE_LASS, $4, $1, STAY, DOWN, $2 ; person - object SPRITE_LITTLE_GIRL, $4, $5, STAY, UP, $3 ; person + db 3 ; objects + object SPRITE_BRUNETTE_GIRL, 3, 5, STAY, UP, 1 ; person + object SPRITE_LASS, 4, 1, STAY, DOWN, 2 ; person + object SPRITE_LITTLE_GIRL, 4, 5, STAY, UP, 3 ; 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 eaa9036e..6dd877e2 100755 --- a/data/mapObjects/seafoamislands1.asm +++ b/data/mapObjects/seafoamislands1.asm @@ -1,26 +1,26 @@ 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 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..50bc43e5 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_B1F + warp_to 5, 13, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_B3F + warp_to 13, 7, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_B1F + warp_to 19, 15, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_B1F + warp_to 25, 3, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_B3F + warp_to 25, 11, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_B1F + warp_to 25, 14, SEAFOAM_ISLANDS_3_WIDTH ; SEAFOAM_ISLANDS_B3F diff --git a/data/mapObjects/seafoamislands4.asm b/data/mapObjects/seafoamislands4.asm index c7043a93..262fb9b0 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_B2F + warp_to 8, 6, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_B4F + warp_to 25, 4, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_B4F + warp_to 25, 3, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_B2F + warp_to 25, 14, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_B2F + warp_to 20, 17, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_B4F + warp_to 21, 17, SEAFOAM_ISLANDS_4_WIDTH ; SEAFOAM_ISLANDS_B4F diff --git a/data/mapObjects/seafoamislands5.asm b/data/mapObjects/seafoamislands5.asm index a05c00cc..9f6a70f0 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_B3F + warp_to 21, 17, SEAFOAM_ISLANDS_5_WIDTH ; SEAFOAM_ISLANDS_B3F + warp_to 11, 7, SEAFOAM_ISLANDS_5_WIDTH ; SEAFOAM_ISLANDS_B3F + warp_to 25, 4, SEAFOAM_ISLANDS_5_WIDTH ; SEAFOAM_ISLANDS_B3F 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 a1bb5d81..e3cdd1a7 100755 --- a/data/mapObjects/silphco11.asm +++ b/data/mapObjects/silphco11.asm @@ -1,24 +1,24 @@ 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 $6 ; 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_JAMES, $2, $8, STAY, UP, $4 - object SPRITE_ROCKET, $f, $9, STAY, UP, $5, OPP_ROCKET, $28 - object SPRITE_JESSIE, $3, $8, STAY, UP, $6 + db 6 ; 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_JAMES, 2, 8, STAY, UP, 4 + object SPRITE_ROCKET, 15, 9, STAY, UP, 5, OPP_ROCKET, 40 + object SPRITE_JESSIE, 3, 8, STAY, UP, 6 ; 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..92a12616 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_1F_ROOMS + warp_to 23, 8, SS_ANNE_1_WIDTH ; SS_ANNE_1F_ROOMS + warp_to 19, 8, SS_ANNE_1_WIDTH ; SS_ANNE_1F_ROOMS + warp_to 15, 8, SS_ANNE_1_WIDTH ; SS_ANNE_1F_ROOMS + warp_to 11, 8, SS_ANNE_1_WIDTH ; SS_ANNE_1F_ROOMS + warp_to 7, 8, SS_ANNE_1_WIDTH ; SS_ANNE_1F_ROOMS + warp_to 2, 6, SS_ANNE_1_WIDTH ; SS_ANNE_2F + warp_to 37, 15, SS_ANNE_1_WIDTH ; SS_ANNE_B1F + warp_to 3, 16, SS_ANNE_1_WIDTH ; SS_ANNE_KITCHEN diff --git a/data/mapObjects/ssanne10.asm b/data/mapObjects/ssanne10.asm index a8f49cf7..0f92eee1 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_B1F + warp_to 3, 5, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 12, 5, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 13, 5, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 22, 5, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 23, 5, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 2, 15, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 3, 15, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 12, 15, SS_ANNE_10_WIDTH ; SS_ANNE_B1F + warp_to 13, 15, SS_ANNE_10_WIDTH ; SS_ANNE_B1F diff --git a/data/mapObjects/ssanne2.asm b/data/mapObjects/ssanne2.asm index eb761685..2ab7947c 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_2F_ROOMS + warp_to 13, 11, SS_ANNE_2_WIDTH ; SS_ANNE_2F_ROOMS + warp_to 17, 11, SS_ANNE_2_WIDTH ; SS_ANNE_2F_ROOMS + warp_to 21, 11, SS_ANNE_2_WIDTH ; SS_ANNE_2F_ROOMS + warp_to 25, 11, SS_ANNE_2_WIDTH ; SS_ANNE_2F_ROOMS + warp_to 29, 11, SS_ANNE_2_WIDTH ; SS_ANNE_2F_ROOMS + warp_to 2, 4, SS_ANNE_2_WIDTH ; SS_ANNE_1F + warp_to 2, 12, SS_ANNE_2_WIDTH ; SS_ANNE_3F + warp_to 36, 4, SS_ANNE_2_WIDTH ; SS_ANNE_CAPTAINS_ROOM diff --git a/data/mapObjects/ssanne3.asm b/data/mapObjects/ssanne3.asm index 567f0363..fea7c143 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_BOW + warp_to 19, 3, SS_ANNE_3_WIDTH ; SS_ANNE_2F diff --git a/data/mapObjects/ssanne4.asm b/data/mapObjects/ssanne4.asm index fbd1df5b..f4a0d720 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_B1F_ROOMS + warp_to 19, 3, SS_ANNE_4_WIDTH ; SS_ANNE_B1F_ROOMS + warp_to 15, 3, SS_ANNE_4_WIDTH ; SS_ANNE_B1F_ROOMS + warp_to 11, 3, SS_ANNE_4_WIDTH ; SS_ANNE_B1F_ROOMS + warp_to 7, 3, SS_ANNE_4_WIDTH ; SS_ANNE_B1F_ROOMS + warp_to 27, 5, SS_ANNE_4_WIDTH ; SS_ANNE_1F 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 0d1ea2f3..b5ad60fd 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_JIGGLYPUFF, $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_JIGGLYPUFF, 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 100644 --- 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..dd6746a7 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_NORTH_SOUTH diff --git a/data/mapObjects/undergroundpathentranceroute6.asm b/data/mapObjects/undergroundpathentranceroute6.asm index 7bce8774..bb2fed89 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_NORTH_SOUTH diff --git a/data/mapObjects/undergroundpathentranceroute7.asm b/data/mapObjects/undergroundpathentranceroute7.asm index 51b4bcda..be4a10d4 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_WEST_EAST 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..4ae05e89 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_WEST_EAST diff --git a/data/mapObjects/undergroundpathns.asm b/data/mapObjects/undergroundpathns.asm index d0188a76..69fc1857 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 ; UNDERGROUND_PATH_ROUTE_5 + warp_to 2, 41, UNDERGROUND_PATH_NS_WIDTH ; UNDERGROUND_PATH_ROUTE_6 diff --git a/data/mapObjects/undergroundpathwe.asm b/data/mapObjects/undergroundpathwe.asm index 42bbb9bf..dab6e292 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 ; UNDERGROUND_PATH_ROUTE_7 + warp_to 47, 2, UNDERGROUND_PATH_WE_WIDTH ; UNDERGROUND_PATH_ROUTE_8 diff --git a/data/mapObjects/unknowndungeon1.asm b/data/mapObjects/unknowndungeon1.asm index 5348dab8..1287f752 100755 --- a/data/mapObjects/unknowndungeon1.asm +++ b/data/mapObjects/unknowndungeon1.asm @@ -1,32 +1,32 @@ 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 $4 ; objects + db 4 ; objects object SPRITE_BALL, $1d, $10, STAY, NONE, $1, RARE_CANDY object SPRITE_BALL, $7, $b, STAY, NONE, $2, MAX_ELIXER object SPRITE_BALL, $1d, $9, STAY, NONE, $3, MAX_REVIVE object SPRITE_BALL, $12, $3, STAY, NONE, $4, ULTRA_BALL ; 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 8e696462..9d53c2bf 100755 --- a/data/mapObjects/unknowndungeon2.asm +++ b/data/mapObjects/unknowndungeon2.asm @@ -1,26 +1,26 @@ 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 $4 ; objects - object SPRITE_BALL, $0, $b, STAY, NONE, $1, RARE_CANDY - object SPRITE_BALL, $10, $7, STAY, NONE, $2, ULTRA_BALL - object SPRITE_BALL, $13, $b, STAY, NONE, $3, MAX_REVIVE - object SPRITE_BALL, $1b, $9, STAY, NONE, $4, FULL_RESTORE + db 4 ; objects + object SPRITE_BALL, 0, 11, STAY, NONE, 1, RARE_CANDY + object SPRITE_BALL, 16, 7, STAY, NONE, 2, ULTRA_BALL + object SPRITE_BALL, 19, 11, STAY, NONE, 3, MAX_REVIVE + object SPRITE_BALL, 27, 9, STAY, NONE, 4, 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 ; CERULEAN_CAVE_1F + warp_to 22, 6, UNKNOWN_DUNGEON_2_WIDTH ; CERULEAN_CAVE_1F + warp_to 19, 7, UNKNOWN_DUNGEON_2_WIDTH ; CERULEAN_CAVE_1F + warp_to 9, 1, UNKNOWN_DUNGEON_2_WIDTH ; CERULEAN_CAVE_1F + warp_to 1, 3, UNKNOWN_DUNGEON_2_WIDTH ; CERULEAN_CAVE_1F + warp_to 3, 11, UNKNOWN_DUNGEON_2_WIDTH ; CERULEAN_CAVE_1F diff --git a/data/mapObjects/unknowndungeon3.asm b/data/mapObjects/unknowndungeon3.asm index 18439368..b658d9f3 100755 --- a/data/mapObjects/unknowndungeon3.asm +++ b/data/mapObjects/unknowndungeon3.asm @@ -1,17 +1,17 @@ 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 $5 ; objects - object SPRITE_SLOWBRO, $1b, $d, STAY, DOWN, $1, MEWTWO, 70 - object SPRITE_BALL, $1a, $1, STAY, NONE, $2, ULTRA_BALL - object SPRITE_BALL, $2, $d, STAY, NONE, $3, ULTRA_BALL - object SPRITE_BALL, $3, $d, STAY, NONE, $4, MAX_REVIVE - object SPRITE_BALL, $f, $3, STAY, NONE, $5, MAX_ELIXER + db 5 ; objects + object SPRITE_SLOWBRO, 27, 13, STAY, DOWN, 1, MEWTWO, 70 + object SPRITE_BALL, 26, 1, STAY, NONE, 2, ULTRA_BALL + object SPRITE_BALL, 2, 13, STAY, NONE, 3, ULTRA_BALL + object SPRITE_BALL, 3, 13, STAY, NONE, 4, MAX_REVIVE + object SPRITE_BALL, 15, 3, STAY, NONE, 5, MAX_ELIXER ; 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 8342a2a6..f4e5f1ce 100755 --- a/data/mapObjects/vermilioncity.asm +++ b/data/mapObjects/vermilioncity.asm @@ -1,42 +1,42 @@ 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, $8 ; VermilionCityText7 - db $d, $25, $9 ; VermilionCityText8 - db $d, $18, $a ; MartSignText - db $3, $c, $b ; PokeCenterSignText - db $d, $7, $c ; VermilionCityText11 - db $13, $7, $d ; VermilionCityText12 - db $f, $1d, $e ; VermilionCityText13 + db 7 ; signs + sign 27, 3, 8 ; VermilionCityText7 + sign 37, 13, 9 ; VermilionCityText8 + sign 24, 13, 10 ; MartSignText + sign 12, 3, 11 ; PokeCenterSignText + sign 7, 13, 12 ; VermilionCityText11 + sign 7, 19, 13 ; VermilionCityText12 + sign 29, 15, 14 ; VermilionCityText13 - db $7 ; objects - object SPRITE_LASS, $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 - object SPRITE_OFFICER_JENNY, $13, $f, STAY, NONE, $7 ; person + db 7 ; objects + object SPRITE_LASS, 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 + object SPRITE_OFFICER_JENNY, 19, 15, STAY, NONE, 7 ; 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_PIDGEY_HOUSE + 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_TRADE_HOUSE + warp_to 7, 3, VERMILION_CITY_WIDTH ; VERMILION_OLD_ROD_HOUSE 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 3d269364..bc5ec829 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_GENTLEMAN, $3, $5, STAY, UP, $1 ; person + db 1 ; objects + object SPRITE_GENTLEMAN, 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 1440531f..b18a34c1 100755 --- a/data/mapObjects/vermilionpokecenter.asm +++ b/data/mapObjects/vermilionpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; 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 - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; 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 + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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..325a9715 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_2F diff --git a/data/mapObjects/victoryroad2.asm b/data/mapObjects/victoryroad2.asm index 1bada62a..bc55e2da 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_1F + 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_3F + warp_to 25, 14, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_3F + warp_to 27, 7, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_3F + warp_to 1, 1, VICTORY_ROAD_2_WIDTH ; VICTORY_ROAD_3F diff --git a/data/mapObjects/victoryroad3.asm b/data/mapObjects/victoryroad3.asm index 20e43583..a71cd172 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_2F + warp_to 26, 8, VICTORY_ROAD_3_WIDTH ; VICTORY_ROAD_2F + warp_to 27, 15, VICTORY_ROAD_3_WIDTH ; VICTORY_ROAD_2F + warp_to 2, 0, VICTORY_ROAD_3_WIDTH ; VICTORY_ROAD_2F diff --git a/data/mapObjects/viridiancity.asm b/data/mapObjects/viridiancity.asm index 465d53bc..8a571da9 100755 --- a/data/mapObjects/viridiancity.asm +++ b/data/mapObjects/viridiancity.asm @@ -1,34 +1,34 @@ 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, $9 ; ViridianCityText8 - db $1, $13, $a ; ViridianCityText9 - db $1d, $15, $b ; ViridianCityText10 - db $13, $1e, $c ; MartSignText - db $19, $18, $d ; PokeCenterSignText - db $7, $1b, $e ; ViridianCityText13 + db 6 ; signs + sign 17, 17, 9 ; ViridianCityText8 + sign 19, 1, 10 ; ViridianCityText9 + sign 21, 29, 11 ; ViridianCityText10 + sign 30, 19, 12 ; MartSignText + sign 24, 25, 13 ; PokeCenterSignText + sign 27, 7, 14 ; ViridianCityText13 - db $8 ; 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 - object SPRITE_GAMBLER, $12, $9, STAY, NONE, $8 + db 8 ; 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 + object SPRITE_GAMBLER, 18, 9, STAY, NONE, 8 ; 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_HOUSE + warp_to 21, 9, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_NICKNAME_HOUSE + warp_to 32, 7, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_GYM diff --git a/data/mapObjects/viridianforest.asm b/data/mapObjects/viridianforest.asm index 0bb67f82..9502ed7d 100755 --- a/data/mapObjects/viridianforest.asm +++ b/data/mapObjects/viridianforest.asm @@ -1,38 +1,38 @@ ViridianForestObject: db $3 ; border block - db $6 ; warps - db $0, $1, $2, VIRIDIAN_FOREST_EXIT - db $0, $2, $2, 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, 2, 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, $b ; ViridianForestText9 - db $20, $10, $c ; ViridianForestText10 - db $11, $1a, $d ; ViridianForestText11 - db $18, $4, $e ; ViridianForestText12 - db $2d, $12, $f ; ViridianForestText13 - db $1, $2, $10 ; ViridianForestText14 + db 6 ; signs + sign 24, 40, 11 ; ViridianForestText9 + sign 16, 32, 12 ; ViridianForestText10 + sign 26, 17, 13 ; ViridianForestText11 + sign 4, 24, 14 ; ViridianForestText12 + sign 18, 45, 15 ; ViridianForestText13 + sign 2, 1, 16 ; ViridianForestText14 - db $a ; 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_LASS, $2, $29, STAY, NONE, $5, OPP_LASS, $13 - object SPRITE_BUG_CATCHER, $d, $11, STAY, RIGHT, $6, OPP_BUG_CATCHER, $f - object SPRITE_BALL, $19, $b, STAY, NONE, $7, POTION - object SPRITE_BALL, $c, $1d, STAY, NONE, $8, POTION - object SPRITE_BALL, $1, $1f, STAY, NONE, $9, POKE_BALL - object SPRITE_BUG_CATCHER, $1b, $28, STAY, NONE, $a ; person + db 10 ; 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_LASS, 2, 41, STAY, NONE, 5, OPP_LASS, 19 + object SPRITE_BUG_CATCHER, 13, 17, STAY, RIGHT, 6, OPP_BUG_CATCHER, 15 + object SPRITE_BALL, 25, 11, STAY, NONE, 7, POTION + object SPRITE_BALL, 12, 29, STAY, NONE, 8, POTION + object SPRITE_BALL, 1, 31, STAY, NONE, 9, POKE_BALL + object SPRITE_BUG_CATCHER, 27, 40, STAY, NONE, 10 ; 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_NORTH_GATE + warp_to 2, 0, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_NORTH_GATE + warp_to 15, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE + warp_to 16, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE + warp_to 17, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE + warp_to 18, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE diff --git a/data/mapObjects/viridianforestentrance.asm b/data/mapObjects/viridianforestentrance.asm index 8fe934ae..d84e5df5 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, $3, VIRIDIAN_FOREST - db $7, $4, $5, $ff - db $7, $5, $5, $ff + db 4 ; warps + warp 4, 0, 3, VIRIDIAN_FOREST + warp 5, 0, 3, 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 39432c17..55efe10a 100755 --- a/data/mapObjects/viridianpokecenter.asm +++ b/data/mapObjects/viridianpokecenter.asm @@ -1,19 +1,19 @@ 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 $5 ; 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, UP, $3 ; person - object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person - object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person + db 5 ; 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, UP, 3 ; person + object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person + object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; 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/sgb_border.asm b/data/sgb_border.asm index 0080b4d2..cc592487 100755 --- a/data/sgb_border.asm +++ b/data/sgb_border.asm @@ -84,4 +84,4 @@ BorderPalettes: RGB 31, 31, 25 SGBBorderGraphics: - INCBIN "gfx/pokemon_yellow.t6.2bpp" + INCBIN "gfx/pokemon_yellow.2bpp" diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index 9c1c0fd2..c070e8c8 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -319,5 +319,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/bank3c.asm b/engine/bank3c.asm index a9bfea8d..10f7ffdd 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -104,6 +104,7 @@ SetMapSpecificScriptFlagsOnMapReload: BeachHouse_GFX: INCBIN "gfx/tilesets/beachhouse.2bpp" + ds 384 BeachHouse_Block: INCBIN "gfx/blocksets/beachhouse.bst" diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index f4e50562..ddaf1350 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -430,28 +430,28 @@ TrainerAIPointers: dbw 1,LanceAI ; lance JugglerAI: - cp $40 + cp 25 percent + 1 ret nc jp AISwitchIfEnoughMons BlackbeltAI: - cp $20 + cp 13 percent - 1 ret nc jp AIUseXAttack GiovanniAI: - cp $40 + cp 25 percent + 1 ret nc jp AIUseGuardSpec CooltrainerMAI: - cp $40 + cp 25 percent + 1 ret nc jp AIUseXAttack CooltrainerFAI: - cp $40 - ld a,$A + cp 25 percent + 1 + ld a,10 call AICheckIfHPBelowFraction jp c,AIUseHyperPotion ld a,5 @@ -467,43 +467,43 @@ BrockAI: jp AIUseFullHeal MistyAI: - cp $40 + cp 25 percent + 1 ret nc jp AIUseXDefend LtSurgeAI: - cp $40 + cp 25 percent + 1 ret nc jp AIUseXSpeed ErikaAI: - cp $80 + cp 50 percent + 1 ret nc - ld a,$A + ld a,10 call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion KogaAI: - cp $20 + cp 13 percent - 1 ret nc jp AIUseXAttack BlaineAI: - cp $40 + cp 25 percent + 1 ret nc - ld a,$A + ld a,10 call AICheckIfHPBelowFraction ret nc jp AIUseSuperPotion SabrinaAI: - cp $40 + cp 25 percent + 1 ret nc jp AIUseXDefend Sony2AI: - cp $20 + cp 13 percent - 1 ret nc ld a,5 call AICheckIfHPBelowFraction @@ -511,7 +511,7 @@ Sony2AI: jp AIUsePotion Sony3AI: - cp $20 + cp 13 percent - 1 ret nc ld a,5 call AICheckIfHPBelowFraction @@ -519,7 +519,7 @@ Sony3AI: jp AIUseFullRestore LoreleiAI: - cp $80 + cp 50 percent + 1 ret nc ld a,5 call AICheckIfHPBelowFraction @@ -527,14 +527,14 @@ LoreleiAI: jp AIUseSuperPotion BrunoAI: - cp $40 + cp 25 percent + 1 ret nc jp AIUseXDefend AgathaAI: - cp $14 + cp 8 percent jp c,AISwitchIfEnoughMons - cp $80 + cp 50 percent + 1 ret nc ld a,4 call AICheckIfHPBelowFraction @@ -542,7 +542,7 @@ AgathaAI: jp AIUseSuperPotion LanceAI: - cp $80 + cp 50 percent + 1 ret nc ld a,5 call AICheckIfHPBelowFraction diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index cc4a818f..6fb388fd 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -670,7 +670,7 @@ GetTileSpriteStandsOn: ld c, a ld b, $0 inc l - ld a, [hl] ; c1x6: screen Y position + ld a, [hl] ; c1x6: screen X position srl a srl a srl a ; screen X tile diff --git a/engine/surfing_minigame.asm b/engine/surfing_minigame.asm index 380093f1..6bfcfb7c 100755 --- a/engine/surfing_minigame.asm +++ b/engine/surfing_minigame.asm @@ -716,7 +716,7 @@ Func_f848d: ld [wSurfingMinigameTrickFlags], a xor a ld [wChannelSoundIDs + CH7], a - ld a, SFX_UNKNOWN_801B3_4 + ld a, SFX_SURFING_JUMP call PlaySound ret @@ -752,7 +752,7 @@ SurfingMinigame_ScoreCurrentWave: call SetCurrentAnimatedObjectCallbackAndResetFrameStateRegisters xor a ld [wChannelSoundIDs + CH7], a - ld a, SFX_UNKNOWN_801B9_4 + ld a, SFX_SURFING_LAND call PlaySound ret @@ -914,7 +914,7 @@ SurfingMinigame_DPadAction: ld hl, ANIM_OBJ_FIELD_E add hl, bc ld [hl], a - ld a, SFX_UNKNOWN_801B6_4 + ld a, SFX_SURFING_FLIP call PlaySound ret @@ -1011,7 +1011,7 @@ SurfingMinigame_TileInteraction: .action_3 xor a ld [wChannelSoundIDs + CH7], a - ld a, SFX_UNKNOWN_801BF_4 + ld a, SFX_SURFING_CRASH call PlaySound and a ret @@ -1559,7 +1559,7 @@ SurfingMinigame_AddRemainingHPToTotal: pop bc dec c jr nz, .loop - ld a, SFX_UNKNOWN_801B0_4 + ld a, SFX_SURFING_ADD_POINTS call PlaySound and a ret @@ -1621,7 +1621,7 @@ SurfingMinigame_AddRadnessToTotal: pop bc dec c jr nz, .loop - ld a, SFX_UNKNOWN_801B0_4 + ld a, SFX_SURFING_ADD_POINTS call PlaySound and a ret diff --git a/extras b/extras deleted file mode 160000 -Subproject 0e1798937a4bf723813574281d0dc12c471c919 diff --git a/gfx.py b/gfx.py deleted file mode 100644 index e2788648..00000000 --- a/gfx.py +++ /dev/null @@ -1,1931 +0,0 @@ -# -*- coding: utf-8 -*- - -import os -import sys -sys.path.insert(0,(os.path.abspath(os.path.dirname(__file__) + 'extras/pokemontools'))) # correct module path to pokemontools -import png -from math import sqrt, floor, ceil -import argparse - -import configuration -config = configuration.Config() - -import pokemon_constants -import trainers -import romstr - - -def load_rom(): - rom = romstr.RomStr.load(filename=config.rom_path) - return rom - - -def split(list_, interval): - """ - Split a list by length. - """ - for i in xrange(0, len(list_), interval): - j = min(i + interval, len(list_)) - yield list_[i:j] - - -def hex_dump(data, length=0x10): - """ - just use hexdump -C - """ - margin = len('%x' % len(data)) - output = [] - address = 0 - for line in split(data, length): - output += [ - hex(address)[2:].zfill(margin) + - ' | ' + - ' '.join('%.2x' % byte for byte in line) - ] - address += length - return '\n'.join(output) - - -def get_tiles(image): - """ - Split a 2bpp image into 8x8 tiles. - """ - return list(split(image, 0x10)) - -def connect(tiles): - """ - Combine 8x8 tiles into a 2bpp image. - """ - return [byte for tile in tiles for byte in tile] - -def transpose(tiles, width=None): - """ - Transpose a tile arrangement along line y=-x. - - 00 01 02 03 04 05 00 06 0c 12 18 1e - 06 07 08 09 0a 0b 01 07 0d 13 19 1f - 0c 0d 0e 0f 10 11 <-> 02 08 0e 14 1a 20 - 12 13 14 15 16 17 03 09 0f 15 1b 21 - 18 19 1a 1b 1c 1d 04 0a 10 16 1c 22 - 1e 1f 20 21 22 23 05 0b 11 17 1d 23 - """ - if width == None: - width = int(sqrt(len(tiles))) # assume square image - tiles = sorted(enumerate(tiles), key= lambda (i, tile): i % width) - return [tile for i, tile in tiles] - -def transpose_tiles(image, width=None): - return connect(transpose(get_tiles(image), width)) - -def interleave(tiles, width): - """ - 00 01 02 03 04 05 00 02 04 06 08 0a - 06 07 08 09 0a 0b 01 03 05 07 09 0b - 0c 0d 0e 0f 10 11 --> 0c 0e 10 12 14 16 - 12 13 14 15 16 17 0d 0f 11 13 15 17 - 18 19 1a 1b 1c 1d 18 1a 1c 1e 20 22 - 1e 1f 20 21 22 23 19 1b 1d 1f 21 23 - """ - interleaved = [] - left, right = split(tiles[::2], width), split(tiles[1::2], width) - for l, r in zip(left, right): - interleaved += l + r - return interleaved - -def deinterleave(tiles, width): - """ - 00 02 04 06 08 0a 00 01 02 03 04 05 - 01 03 05 07 09 0b 06 07 08 09 0a 0b - 0c 0e 10 12 14 16 --> 0c 0d 0e 0f 10 11 - 0d 0f 11 13 15 17 12 13 14 15 16 17 - 18 1a 1c 1e 20 22 18 19 1a 1b 1c 1d - 19 1b 1d 1f 21 23 1e 1f 20 21 22 23 - """ - deinterleaved = [] - rows = list(split(tiles, width)) - for left, right in zip(rows[::2], rows[1::2]): - for l, r in zip(left, right): - deinterleaved += [l, r] - return deinterleaved - -def interleave_tiles(image, width): - return connect(interleave(get_tiles(image), width)) - -def deinterleave_tiles(image, width): - return connect(deinterleave(get_tiles(image), width)) - - -def condense_tiles_to_map(image): - tiles = get_tiles(image) - new_tiles = [] - tilemap = [] - for tile in tiles: - if tile not in new_tiles: - new_tiles += [tile] - tilemap += [new_tiles.index(tile)] - new_image = connect(new_tiles) - return new_image, tilemap - - -def to_file(filename, data): - file = open(filename, 'wb') - for byte in data: - file.write('%c' % byte) - file.close() - - - -""" -A rundown of Pokemon Crystal's compression scheme: - -Control commands occupy bits 5-7. -Bits 0-4 serve as the first parameter <n> for each command. -""" -lz_commands = { - 'literal': 0, # n values for n bytes - 'iterate': 1, # one value for n bytes - 'alternate': 2, # alternate two values for n bytes - 'blank': 3, # zero for n bytes -} - -""" -Repeater commands repeat any data that was just decompressed. -They take an additional signed parameter <s> to mark a relative starting point. -These wrap around (positive from the start, negative from the current position). -""" -lz_commands.update({ - 'repeat': 4, # n bytes starting from s - 'flip': 5, # n bytes in reverse bit order starting from s - 'reverse': 6, # n bytes backwards starting from s -}) - -""" -The long command is used when 5 bits aren't enough. Bits 2-4 contain a new control code. -Bits 0-1 are appended to a new byte as 8-9, allowing a 10-bit parameter. -""" -lz_commands.update({ - 'long': 7, # n is now 10 bits for a new control code -}) -max_length = 1 << 10 # can't go higher than 10 bits -lowmax = 1 << 5 # standard 5-bit param - -""" -If 0xff is encountered instead of a command, decompression ends. -""" -lz_end = 0xff - - -class Compressed: - - """ - Compress arbitrary data, usually 2bpp. - """ - - def __init__(self, image=None, mode='horiz', size=None): - assert image, 'need something to compress!' - image = list(image) - self.image = image - self.pic = [] - self.animtiles = [] - - # only transpose pic (animtiles were never transposed in decompression) - if size != None: - for byte in range((size*size)*16): - self.pic += image[byte] - for byte in range(((size*size)*16),len(image)): - self.animtiles += image[byte] - else: - self.pic = image - - if mode == 'vert': - self.tiles = get_tiles(self.pic) - self.tiles = transpose(self.tiles) - self.pic = connect(self.tiles) - - self.image = self.pic + self.animtiles - - self.end = len(self.image) - - self.byte = None - self.address = 0 - - self.stream = [] - - self.zeros = [] - self.alts = [] - self.iters = [] - self.repeats = [] - self.flips = [] - self.reverses = [] - self.literals = [] - - self.output = [] - - self.compress() - - - def compress(self): - """ - Incomplete, but outputs working compressed data. - """ - - self.address = 0 - - # todo - #self.scanRepeats() - - while ( self.address < self.end ): - - #if (self.repeats): - # self.doRepeats() - - #if (self.flips): - # self.doFlips() - - #if (self.reverses): - # self.doReverses - - if (self.checkWhitespace()): - self.doLiterals() - self.doWhitespace() - - elif (self.checkIter()): - self.doLiterals() - self.doIter() - - elif (self.checkAlts()): - self.doLiterals() - self.doAlts() - - else: # doesn't fit any pattern -> literal - self.addLiteral() - self.next() - - self.doStream() - - # add any literals we've been sitting on - self.doLiterals() - - # done - self.output.append(lz_end) - - - def getCurByte(self): - if self.address < self.end: - self.byte = ord(self.image[self.address]) - else: self.byte = None - - def next(self): - self.address += 1 - self.getCurByte() - - def addLiteral(self): - self.getCurByte() - self.literals.append(self.byte) - if len(self.literals) > max_length: - raise Exception, "literals exceeded max length and the compressor didn't catch it" - elif len(self.literals) == max_length: - self.doLiterals() - - def doLiterals(self): - if len(self.literals) > lowmax: - self.output.append( (lz_commands['long'] << 5) | (lz_commands['literal'] << 2) | ((len(self.literals) - 1) >> 8) ) - self.output.append( (len(self.literals) - 1) & 0xff ) - elif len(self.literals) > 0: - self.output.append( (lz_commands['literal'] << 5) | (len(self.literals) - 1) ) - for byte in self.literals: - self.output.append(byte) - self.literals = [] - - def doStream(self): - for byte in self.stream: - self.output.append(byte) - self.stream = [] - - - def scanRepeats(self): - """ - Works, but doesn't do flipped/reversed streams yet. - - This takes up most of the compress time and only saves a few bytes. - It might be more effective to exclude it entirely. - """ - - self.repeats = [] - self.flips = [] - self.reverses = [] - - # make a 5-letter word list of the sequence - letters = 5 # how many bytes it costs to use a repeat over a literal - # any shorter and it's not worth the trouble - num_words = len(self.image) - letters - words = [] - for i in range(self.address,num_words): - word = [] - for j in range(letters): - word.append( ord(self.image[i+j]) ) - words.append((word, i)) - - zeros = [] - for zero in range(letters): - zeros.append( 0 ) - - # check for matches - def get_matches(): - # TODO: - # append to 3 different match lists instead of yielding to one - # - #flipped = [] - #for byte in enumerate(this[0]): - # flipped.append( sum(1<<(7-i) for i in range(8) if (this[0][byte])>>i&1) ) - #reversed = this[0][::-1] - # - for whereabout, this in enumerate(words): - for that in range(whereabout+1,len(words)): - if words[that][0] == this[0]: - if words[that][1] - this[1] >= letters: - # remove zeros - if this[0] != zeros: - yield [this[0], this[1], words[that][1]] - - matches = list(get_matches()) - - # remove more zeros - buffer = [] - for match in matches: - # count consecutive zeros in a word - num_zeros = 0 - highest = 0 - for j in range(letters): - if match[0][j] == 0: - num_zeros += 1 - else: - if highest < num_zeros: highest = num_zeros - num_zeros = 0 - if highest < 4: - # any more than 3 zeros in a row isn't worth it - # (and likely to already be accounted for) - buffer.append(match) - matches = buffer - - # combine overlapping matches - buffer = [] - for this, match in enumerate(matches): - if this < len(matches) - 1: # special case for the last match - if matches[this+1][1] <= (match[1] + len(match[0])): # check overlap - if match[1] + len(match[0]) < match[2]: - # next match now contains this match's bytes too - # this only appends the last byte (assumes overlaps are +1 - match[0].append(matches[this+1][0][-1]) - matches[this+1] = match - elif match[1] + len(match[0]) == match[2]: - # we've run into the thing we matched - buffer.append(match) - # else we've gone past it and we can ignore it - else: # no more overlaps - buffer.append(match) - else: # last match, so there's nothing to check - buffer.append(match) - matches = buffer - - # remove alternating sequences - buffer = [] - for match in matches: - for i in range(6 if letters > 6 else letters): - if match[0][i] != match[0][i&1]: - buffer.append(match) - break - matches = buffer - - self.repeats = matches - - - def doRepeats(self): - """doesn't output the right values yet""" - - unusedrepeats = [] - for repeat in self.repeats: - if self.address >= repeat[2]: - - # how far in we are - length = (len(repeat[0]) - (self.address - repeat[2])) - - # decide which side we're copying from - if (self.address - repeat[1]) <= 0x80: - self.doLiterals() - self.stream.append( (lz_commands['repeat'] << 5) | length - 1 ) - - # wrong? - self.stream.append( (((self.address - repeat[1])^0xff)+1)&0xff ) - - else: - self.doLiterals() - self.stream.append( (lz_commands['repeat'] << 5) | length - 1 ) - - # wrong? - self.stream.append(repeat[1]>>8) - self.stream.append(repeat[1]&0xff) - - #print hex(self.address) + ': ' + hex(len(self.output)) + ' ' + hex(length) - self.address += length - - else: unusedrepeats.append(repeat) - - self.repeats = unusedrepeats - - - def checkWhitespace(self): - self.zeros = [] - self.getCurByte() - original_address = self.address - - if ( self.byte == 0 ): - while ( self.byte == 0 ) & ( len(self.zeros) <= max_length ): - self.zeros.append(self.byte) - self.next() - if len(self.zeros) > 1: - return True - self.address = original_address - return False - - def doWhitespace(self): - if (len(self.zeros) + 1) >= lowmax: - self.stream.append( (lz_commands['long'] << 5) | (lz_commands['blank'] << 2) | ((len(self.zeros) - 1) >> 8) ) - self.stream.append( (len(self.zeros) - 1) & 0xff ) - elif len(self.zeros) > 1: - self.stream.append( lz_commands['blank'] << 5 | (len(self.zeros) - 1) ) - else: - raise Exception, "checkWhitespace() should prevent this from happening" - - - def checkAlts(self): - self.alts = [] - self.getCurByte() - original_address = self.address - num_alts = 0 - - # make sure we don't check for alts at the end of the file - if self.address+3 >= self.end: return False - - self.alts.append(self.byte) - self.alts.append(ord(self.image[self.address+1])) - - # are we onto smething? - if ( ord(self.image[self.address+2]) == self.alts[0] ): - cur_alt = 0 - while (ord(self.image[(self.address)+1]) == self.alts[num_alts&1]) & (num_alts <= max_length): - num_alts += 1 - self.next() - # include the last alternated byte - num_alts += 1 - self.address = original_address - if num_alts > lowmax: - return True - elif num_alts > 2: - return True - return False - - def doAlts(self): - original_address = self.address - self.getCurByte() - - #self.alts = [] - #num_alts = 0 - - #self.alts.append(self.byte) - #self.alts.append(ord(self.image[self.address+1])) - - #i = 0 - #while (ord(self.image[self.address+1]) == self.alts[i^1]) & (num_alts <= max_length): - # num_alts += 1 - # i ^=1 - # self.next() - ## include the last alternated byte - #num_alts += 1 - - num_alts = len(self.iters) + 1 - - if num_alts > lowmax: - self.stream.append( (lz_commands['long'] << 5) | (lz_commands['alternate'] << 2) | ((num_alts - 1) >> 8) ) - self.stream.append( num_alts & 0xff ) - self.stream.append( self.alts[0] ) - self.stream.append( self.alts[1] ) - elif num_alts > 2: - self.stream.append( (lz_commands['alternate'] << 5) | (num_alts - 1) ) - self.stream.append( self.alts[0] ) - self.stream.append( self.alts[1] ) - else: - raise Exception, "checkAlts() should prevent this from happening" - - self.address = original_address - self.address += num_alts - - - def checkIter(self): - self.iters = [] - self.getCurByte() - iter = self.byte - original_address = self.address - while (self.byte == iter) & (len(self.iters) < max_length): - self.iters.append(self.byte) - self.next() - self.address = original_address - if len(self.iters) > 3: - # 3 or fewer isn't worth the trouble and actually longer - # if part of a larger literal set - return True - - return False - - def doIter(self): - self.getCurByte() - iter = self.byte - original_address = self.address - - self.iters = [] - while (self.byte == iter) & (len(self.iters) < max_length): - self.iters.append(self.byte) - self.next() - - if (len(self.iters) - 1) >= lowmax: - self.stream.append( (lz_commands['long'] << 5) | (lz_commands['iterate'] << 2) | ((len(self.iters)-1) >> 8) ) - self.stream.append( (len(self.iters) - 1) & 0xff ) - self.stream.append( iter ) - elif len(self.iters) > 3: - # 3 or fewer isn't worth the trouble and actually longer - # if part of a larger literal set - self.stream.append( (lz_commands['iterate'] << 5) | (len(self.iters) - 1) ) - self.stream.append( iter ) - else: - self.address = original_address - raise Exception, "checkIter() should prevent this from happening" - - -class Decompressed: - """ - Parse compressed data, usually 2bpp. - - parameters: - [compressed data] - [tile arrangement] default: 'vert' - [size of pic] default: None - [start] (optional) - - splits output into pic [size] and animation tiles if applicable - data can be fed in from rom if [start] is specified - """ - - def __init__(self, lz=None, mode=None, size=None, start=0): - # todo: play nice with Compressed - - assert lz, 'need something to compress!' - self.lz = lz - - self.byte = None - self.address = 0 - self.start = start - - self.output = [] - - self.decompress() - - debug = False - # print tuple containing start and end address - if debug: print '(' + hex(self.start) + ', ' + hex(self.start + self.address+1) + '),' - - # only transpose pic - self.pic = [] - self.animtiles = [] - - if size != None: - self.tiles = get_tiles(self.output) - self.pic = connect(self.tiles[:(size*size)]) - self.animtiles = connect(self.tiles[(size*size):]) - else: self.pic = self.output - - if mode == 'vert': - self.tiles = get_tiles(self.pic) - self.tiles = transpose(self.tiles) - self.pic = connect(self.tiles) - - self.output = self.pic + self.animtiles - - - def decompress(self): - """ - Replica of crystal's decompression. - """ - - self.output = [] - - while True: - self.getCurByte() - - if (self.byte == lz_end): - break - - self.cmd = (self.byte & 0b11100000) >> 5 - - if self.cmd == lz_commands['long']: # 10-bit param - self.cmd = (self.byte & 0b00011100) >> 2 - self.length = (self.byte & 0b00000011) << 8 - self.next() - self.length += self.byte + 1 - else: # 5-bit param - self.length = (self.byte & 0b00011111) + 1 - - # literals - if self.cmd == lz_commands['literal']: - self.doLiteral() - elif self.cmd == lz_commands['iterate']: - self.doIter() - elif self.cmd == lz_commands['alternate']: - self.doAlt() - elif self.cmd == lz_commands['blank']: - self.doZeros() - - else: # repeaters - self.next() - if self.byte > 0x7f: # negative - self.displacement = self.byte & 0x7f - self.displacement = len(self.output) - self.displacement - 1 - else: # positive - self.displacement = self.byte * 0x100 - self.next() - self.displacement += self.byte - - if self.cmd == lz_commands['flip']: - self.doFlip() - elif self.cmd == lz_commands['reverse']: - self.doReverse() - else: # lz_commands['repeat'] - self.doRepeat() - - self.address += 1 - #self.next() # somewhat of a hack - - - def getCurByte(self): - self.byte = ord(self.lz[self.start+self.address]) - - def next(self): - self.address += 1 - self.getCurByte() - - def doLiteral(self): - """ - Copy data directly. - """ - for byte in range(self.length): - self.next() - self.output.append(self.byte) - - def doIter(self): - """ - Write one byte repeatedly. - """ - self.next() - for byte in range(self.length): - self.output.append(self.byte) - - def doAlt(self): - """ - Write alternating bytes. - """ - self.alts = [] - self.next() - self.alts.append(self.byte) - self.next() - self.alts.append(self.byte) - - for byte in range(self.length): - self.output.append(self.alts[byte&1]) - - def doZeros(self): - """ - Write zeros. - """ - for byte in range(self.length): - self.output.append(0x00) - - def doFlip(self): - """ - Repeat flipped bytes from output. - - eg 11100100 -> 00100111 - quat 3 2 1 0 -> 0 2 1 3 - """ - for byte in range(self.length): - flipped = sum(1<<(7-i) for i in range(8) if self.output[self.displacement+byte]>>i&1) - self.output.append(flipped) - - def doReverse(self): - """ - Repeat reversed bytes from output. - """ - for byte in range(self.length): - self.output.append(self.output[self.displacement-byte]) - - def doRepeat(self): - """ - Repeat bytes from output. - """ - for byte in range(self.length): - self.output.append(self.output[self.displacement+byte]) - - - -sizes = [ - 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 5, 7, 5, 5, 7, 5, - 6, 7, 5, 6, 5, 7, 5, 7, 5, 7, 5, 6, 5, 6, 7, 5, - 6, 7, 5, 6, 6, 7, 5, 6, 5, 7, 5, 6, 7, 5, 7, 5, - 7, 5, 7, 5, 7, 5, 7, 5, 7, 5, 7, 5, 6, 7, 5, 6, - 7, 5, 7, 7, 5, 6, 7, 5, 6, 5, 6, 6, 6, 7, 5, 7, - 5, 6, 6, 5, 7, 6, 7, 5, 7, 5, 7, 7, 6, 6, 7, 6, - 7, 5, 7, 5, 5, 7, 7, 5, 6, 7, 6, 7, 6, 7, 7, 7, - 6, 6, 7, 5, 6, 6, 7, 6, 6, 6, 7, 6, 6, 6, 7, 7, - 6, 7, 7, 5, 5, 6, 6, 6, 6, 5, 6, 5, 6, 7, 7, 7, - 7, 7, 5, 6, 7, 7, 5, 5, 6, 7, 5, 6, 7, 5, 6, 7, - 6, 6, 5, 7, 6, 6, 5, 7, 7, 6, 6, 5, 5, 5, 5, 7, - 5, 6, 5, 6, 7, 7, 5, 7, 6, 7, 5, 6, 7, 5, 5, 6, - 6, 5, 6, 6, 6, 6, 7, 6, 5, 6, 7, 5, 7, 6, 6, 7, - 6, 6, 5, 7, 5, 6, 6, 5, 7, 5, 6, 5, 6, 6, 5, 6, - 6, 7, 7, 6, 7, 7, 5, 7, 6, 7, 7, 5, 7, 5, 6, 6, - 6, 7, 7, 7, 7, 5, 6, 7, 7, 7, 5, -] - -def make_sizes(): - """ - Front pics have specified sizes. - """ - rom = load_rom() - top = 251 - base_stats = 0x51424 - # print monster sizes - address = base_stats + 0x11 - - output = '' - - for id in range(top): - size = (ord(rom[address])) & 0x0f - if id % 16 == 0: output += '\n\t' - output += str(size) + ', ' - address += 0x20 - - print output - - - -def decompress_fx_by_id(id, fxs=0xcfcf6): - rom = load_rom() - address = fxs + id*4 # len_fxptr - # get size - num_tiles = ord(rom[address]) # # tiles - # get pointer - bank = ord(rom[address+1]) - address = (ord(rom[address+3]) << 8) + ord(rom[address+2]) - address = (bank * 0x4000) + (address & 0x3fff) - # decompress - fx = Decompressed(rom, 'horiz', num_tiles, address) - return fx - -def decompress_fx(num_fx=40): - for id in range(num_fx): - fx = decompress_fx_by_id(id) - filename = './gfx/fx/' + str(id).zfill(3) + '.2bpp' # ./gfx/fx/039.2bpp - to_file(filename, fx.pic) - - -num_pics = 2 -front = 0 -back = 1 - -monsters = 0x120000 -num_monsters = 251 - -unowns = 0x124000 -num_unowns = 26 -unown_dex = 201 - -def decompress_monster_by_id(id=0, type=front): - rom = load_rom() - # no unowns here - if id + 1 == unown_dex: return None - # get size - if type == front: - size = sizes[id] - else: size = None - # get pointer - address = monsters + (id*2 + type)*3 # bank, address - bank = ord(rom[address]) + 0x36 # crystal - address = (ord(rom[address+2]) << 8) + ord(rom[address+1]) - address = (bank * 0x4000) + (address & 0x3fff) - # decompress - monster = Decompressed(rom, 'vert', size, address) - return monster - -def decompress_monsters(type=front): - for id in range(num_monsters): - # decompress - monster = decompress_monster_by_id(id, type) - if monster != None: # no unowns here - if not type: # front - filename = 'front.2bpp' - folder = './gfx/pics/' + str(id+1).zfill(3) + '/' - to_file(folder+filename, monster.pic) - filename = 'tiles.2bpp' - folder = './gfx/pics/' + str(id+1).zfill(3) + '/' - to_file(folder+filename, monster.animtiles) - else: # back - filename = 'back.2bpp' - folder = './gfx/pics/' + str(id+1).zfill(3) + '/' - to_file(folder+filename, monster.pic) - - -def decompress_unown_by_id(letter, type=front): - rom = load_rom() - # get size - if type == front: - size = sizes[unown_dex-1] - else: size = None - # get pointer - address = unowns + (letter*2 + type)*3 # bank, address - bank = ord(rom[address]) + 0x36 # crystal - address = (ord(rom[address+2]) << 8) + ord(rom[address+1]) - address = (bank * 0x4000) + (address & 0x3fff) - # decompress - unown = Decompressed(rom, 'vert', size, address) - return unown - -def decompress_unowns(type=front): - for letter in range(num_unowns): - # decompress - unown = decompress_unown_by_id(letter, type) - - if not type: # front - filename = 'front.2bpp' - folder = './gfx/pics/' + str(unown_dex).zfill(3) + chr(ord('a') + letter) + '/' - to_file(folder+filename, unown.pic) - filename = 'tiles.2bpp' - folder = './gfx/anim/' - to_file(folder+filename, unown.animtiles) - else: # back - filename = 'back.2bpp' - folder = './gfx/pics/' + str(unown_dex).zfill(3) + chr(ord('a') + letter) + '/' - to_file(folder+filename, unown.pic) - - -trainers = 0x128000 -num_trainers = 67 - -def decompress_trainer_by_id(id): - rom = load_rom() - # get pointer - address = trainers + id*3 # bank, address - bank = ord(rom[address]) + 0x36 # crystal - address = (ord(rom[address+2]) << 8) + ord(rom[address+1]) - address = (bank * 0x4000) + (address & 0x3fff) - # decompress - trainer = Decompressed(rom, 'vert', None, address) - return trainer - -def decompress_trainers(): - for id in range(num_trainers): - # decompress - trainer = decompress_trainer_by_id(id) - filename = './gfx/trainers/' + str(id).zfill(3) + '.2bpp' # ./gfx/trainers/066.2bpp - to_file(filename, trainer.pic) - - -# in order of use (sans repeats) -intro_gfx = [ - ('logo', 0x109407), - ('001', 0xE641D), # tilemap - ('unowns', 0xE5F5D), - ('pulse', 0xE634D), - ('002', 0xE63DD), # tilemap - ('003', 0xE5ECD), # tilemap - ('background', 0xE5C7D), - ('004', 0xE5E6D), # tilemap - ('005', 0xE647D), # tilemap - ('006', 0xE642D), # tilemap - ('pichu_wooper', 0xE592D), - ('suicune_run', 0xE555D), - ('007', 0xE655D), # tilemap - ('008', 0xE649D), # tilemap - ('009', 0xE76AD), # tilemap - ('suicune_jump', 0xE6DED), - ('unown_back', 0xE785D), - ('010', 0xE764D), # tilemap - ('011', 0xE6D0D), # tilemap - ('suicune_close', 0xE681D), - ('012', 0xE6C3D), # tilemap - ('013', 0xE778D), # tilemap - ('suicune_back', 0xE72AD), - ('014', 0xE76BD), # tilemap - ('015', 0xE676D), # tilemap - ('crystal_unowns', 0xE662D), - ('017', 0xE672D), # tilemap -] - -def decompress_intro(): - rom = load_rom() - for name, address in intro_gfx: - filename = './gfx/intro/' + name + '.2bpp' - gfx = Decompressed( rom, 'horiz', None, address ) - to_file(filename, gfx.output) - - -title_gfx = [ - ('suicune', 0x10EF46), - ('logo', 0x10F326), - ('crystal', 0x10FCEE), -] - -def decompress_title(): - rom = load_rom() - for name, address in title_gfx: - filename = './gfx/title/' + name + '.2bpp' - gfx = Decompressed( rom, 'horiz', None, address ) - to_file(filename, gfx.output) - -def decompress_tilesets(): - rom = load_rom() - tileset_headers = 0x4d596 - len_tileset = 15 - num_tilesets = 0x25 - for tileset in range(num_tilesets): - ptr = tileset*len_tileset + tileset_headers - address = (ord(rom[ptr])*0x4000) + (((ord(rom[ptr+1]))+ord(rom[ptr+2])*0x100)&0x3fff) - tiles = Decompressed( rom, 'horiz', None, address ) - filename = './gfx/tilesets/'+str(tileset).zfill(2)+'.2bpp' - to_file( filename, tiles.output ) - #print '(' + hex(address) + ', '+ hex(address+tiles.address+1) + '),' - -misc = [ - ('player', 0x2BA1A, 'vert'), - ('dude', 0x2BBAA, 'vert'), - ('town_map', 0xF8BA0, 'horiz'), - ('pokegear', 0x1DE2E4, 'horiz'), - ('pokegear_sprites', 0x914DD, 'horiz'), -] -def decompress_misc(): - rom = load_rom() - for name, address, mode in misc: - filename = './gfx/misc/' + name + '.2bpp' - gfx = Decompressed( rom, mode, None, address ) - to_file(filename, gfx.output) - -def decompress_all(debug=False): - """ - Decompress all known compressed data in baserom. - """ - - if debug: print 'fronts' - decompress_monsters(front) - if debug: print 'backs' - decompress_monsters(back) - if debug: print 'unown fronts' - decompress_unowns(front) - if debug: print 'unown backs' - decompress_unowns(back) - - if debug: print 'trainers' - decompress_trainers() - - if debug: print 'fx' - decompress_fx() - - if debug: print 'intro' - decompress_intro() - - if debug: print 'title' - decompress_title() - - if debug: print 'tilesets' - decompress_tilesets() - - if debug: print 'misc' - decompress_misc() - - return - - -def decompress_from_address(address, mode='horiz', filename='de.2bpp', size=None): - """ - Write decompressed data from an address to a 2bpp file. - """ - rom = load_rom() - image = Decompressed(rom, mode, size, address) - to_file(filename, image.pic) - - -def decompress_file(filein, fileout, mode='horiz', size=None): - f = open(filein, 'rb') - image = f.read() - f.close() - - de = Decompressed(image, mode, size) - - to_file(fileout, de.pic) - - -def compress_file(filein, fileout, mode='horiz'): - f = open(filein, 'rb') - image = f.read() - f.close() - - lz = Compressed(image, mode) - - to_file(fileout, lz.output) - - - - -def compress_monster_frontpic(id, fileout): - mode = 'vert' - - fpic = './gfx/pics/' + str(id).zfill(3) + '/front.2bpp' - fanim = './gfx/pics/' + str(id).zfill(3) + '/tiles.2bpp' - - pic = open(fpic, 'rb').read() - anim = open(fanim, 'rb').read() - image = pic + anim - - lz = Compressed(image, mode, sizes[id-1]) - - out = './gfx/pics/' + str(id).zfill(3) + '/front.lz' - - to_file(out, lz.output) - - - -def get_uncompressed_gfx(start, num_tiles, filename): - """ - Grab tiles directly from rom and write to file. - """ - rom = load_rom() - bytes_per_tile = 0x10 - length = num_tiles*bytes_per_tile - end = start + length - image = [] - for address in range(start,end): - image.append(ord(rom[address])) - to_file(filename, image) - - - -def bin_to_rgb(word): - red = word & 0b11111 - word >>= 5 - green = word & 0b11111 - word >>= 5 - blue = word & 0b11111 - return (red, green, blue) - -def rgb_from_rom(address, length=0x80): - rom = load_rom() - return convert_binary_pal_to_text(rom[address:address+length]) - -def convert_binary_pal_to_text_by_filename(filename): - with open(filename) as f: - pal = bytearray(f.read()) - return convert_binary_pal_to_text(pal) - -def convert_binary_pal_to_text(pal): - output = '' - words = [hi * 0x100 + lo for lo, hi in zip(pal[::2], pal[1::2])] - for word in words: - red, green, blue = ['%.2d' % c for c in bin_to_rgb(word)] - output += '\tRGB ' + ', '.join((red, green, blue)) - output += '\n' - return output - -def read_rgb_macros(lines): - colors = [] - for line in lines: - macro = line.split(" ")[0].strip() - if macro == 'RGB': - params = ' '.join(line.split(" ")[1:]).split(',') - red, green, blue = [int(v) for v in params] - colors += [[red, green, blue]] - return colors - - -def rewrite_binary_pals_to_text(filenames): - for filename in filenames: - pal_text = convert_binary_pal_to_text_by_filename(filename) - with open(filename, 'w') as out: - out.write(pal_text) - - -def dump_monster_pals(): - rom = load_rom() - - pals = 0xa8d6 - pal_length = 0x4 - for mon in range(251): - - name = pokemon_constants.pokemon_constants[mon+1].title().replace('_','') - num = str(mon+1).zfill(3) - dir = 'gfx/pics/'+num+'/' - - address = pals + mon*pal_length*2 - - - pal_data = [] - for byte in range(pal_length): - pal_data.append(ord(rom[address])) - address += 1 - - filename = 'normal.pal' - to_file('../'+dir+filename, pal_data) - - spacing = ' ' * (15 - len(name)) - #print name+'Palette:'+spacing+' INCBIN "'+dir+filename+'"' - - - pal_data = [] - for byte in range(pal_length): - pal_data.append(ord(rom[address])) - address += 1 - - filename = 'shiny.pal' - to_file('../'+dir+filename, pal_data) - - spacing = ' ' * (10 - len(name)) - #print name+'ShinyPalette:'+spacing+' INCBIN "'+dir+filename+'"' - - -def dump_trainer_pals(): - rom = load_rom() - - pals = 0xb0d2 - pal_length = 0x4 - for trainer in range(67): - - name = trainers.trainer_group_names[trainer+1]['constant'].title().replace('_','') - num = str(trainer).zfill(3) - dir = 'gfx/trainers/' - - address = pals + trainer*pal_length - - pal_data = [] - for byte in range(pal_length): - pal_data.append(ord(rom[address])) - address += 1 - - filename = num+'.pal' - to_file('../'+dir+filename, pal_data) - - spacing = ' ' * (12 - len(name)) - print name+'Palette:'+spacing+' INCBIN"'+dir+filename+'"' - - - -def flatten(planar): - """ - Flatten planar 2bpp image data into a quaternary pixel map. - """ - strips = [] - for bottom, top in split(planar, 2): - bottom = ord(bottom) - top = ord(top) - strip = [] - for i in xrange(7,-1,-1): - color = ( - (bottom >> i & 1) + - (top *2 >> i & 2) - ) - strip += [color] - strips += strip - return strips - - -def to_lines(image, width): - """ - Convert a tiled quaternary pixel map to lines of quaternary pixels. - """ - tile_width = 8 - tile_height = 8 - num_columns = width / tile_width - height = len(image) / width - - lines = [] - for cur_line in xrange(height): - tile_row = cur_line / tile_height - line = [] - for column in xrange(num_columns): - anchor = ( - num_columns * tile_row * tile_width * tile_height + - column * tile_width * tile_height + - cur_line % tile_height * tile_width - ) - line += image[anchor : anchor + tile_width] - lines += [line] - return lines - - -def dmg2rgb(word): - """ - For PNGs. - """ - def shift(value): - while True: - yield value & (2**5 - 1) - value >>= 5 - word = shift(word) - # distribution is less even w/ << 3 - red, green, blue = [int(color * 8.25) for color in [word.next() for _ in xrange(3)]] - alpha = 255 - return (red, green, blue, alpha) - - -def rgb_to_dmg(color): - """ - For PNGs. - """ - word = (color['r'] / 8) - word += (color['g'] / 8) << 5 - word += (color['b'] / 8) << 10 - return word - - -def pal_to_png(filename): - """ - Interpret a .pal file as a png palette. - """ - with open(filename) as rgbs: - colors = read_rgb_macros(rgbs.readlines()) - a = 255 - palette = [] - for color in colors: - # even distribution over 000-255 - r, g, b = [int(hue * 8.25) for hue in color] - palette += [(r, g, b, a)] - white = (255,255,255,255) - black = (000,000,000,255) - if white not in palette and len(palette) < 4: - palette = [white] + palette - if black not in palette and len(palette) < 4: - palette = palette + [black] - return palette - - -def png_to_rgb(palette): - """ - Convert a png palette to rgb macros. - """ - output = '' - for color in palette: - r, g, b = [color[c] / 8 for c in 'rgb'] - output += '\tRGB ' + ', '.join(['%.2d' % hue for hue in (r, g, b)]) - output += '\n' - return output - - -def read_filename_arguments(filename): - int_args = { - 'w': 'width', - 'h': 'height', - 't': 'tile_padding', - } - parsed_arguments = {} - arguments = os.path.splitext(filename)[0].split('.')[1:] - for argument in arguments: - arg = argument[0] - param = argument[1:] - if param.isdigit(): - arg = int_args.get(arg, False) - if arg: - parsed_arguments[arg] = int(param) - elif len(argument) == 3: - w, x, h = argument[:3] - if w.isdigit() and h.isdigit() and x == 'x': - parsed_arguments['pic_dimensions'] = (int(w), int(h)) - elif argument == 'interleave': - parsed_arguments['interleave'] = True - elif argument == 'norepeat': - parsed_arguments['norepeat'] = True - elif argument == 'arrange': - parsed_arguments['norepeat'] = True - parsed_arguments['tilemap'] = True - return parsed_arguments - - -def export_2bpp_to_png(filein, fileout=None, pal_file=None, height=0, width=0, tile_padding=0, pic_dimensions=None): - - if fileout == None: - fileout = os.path.splitext(filein)[0] + '.png' - - image = open(filein, 'rb').read() - - arguments = { - 'width': width, - 'height': height, - 'pal_file': pal_file, - 'tile_padding': tile_padding, - 'pic_dimensions': pic_dimensions, - } - arguments.update(read_filename_arguments(filein)) - - if pal_file == None: - if os.path.exists(os.path.splitext(fileout)[0]+'.pal'): - arguments['pal_file'] = os.path.splitext(fileout)[0]+'.pal' - - result = convert_2bpp_to_png(image, **arguments) - width, height, palette, greyscale, bitdepth, px_map = result - - w = png.Writer( - width, - height, - palette=palette, - compression=9, - greyscale=greyscale, - bitdepth=bitdepth - ) - with open(fileout, 'wb') as f: - w.write(f, px_map) - - -def convert_2bpp_to_png(image, **kwargs): - """ - Convert a planar 2bpp graphic to png. - """ - - width = kwargs.get('width', 0) - height = kwargs.get('height', 0) - tile_padding = kwargs.get('tile_padding', 0) - pic_dimensions = kwargs.get('pic_dimensions', None) - pal_file = kwargs.get('pal_file', None) - interleave = kwargs.get('interleave', False) - - # Width must be specified to interleave. - if interleave and width: - image = ''.join(interleave_tiles(image, width / 8)) - - # Pad the image by a given number of tiles if asked. - image += chr(0) * 0x10 * tile_padding - - # Some images are transposed in blocks. - if pic_dimensions: - w, h = pic_dimensions - if not width: width = w * 8 - - pic_length = w * h * 0x10 - - trailing = len(image) % pic_length - - pic = [] - for i in xrange(0, len(image) - trailing, pic_length): - pic += transpose_tiles(image[i:i+pic_length], w) - image = ''.join(pic) + image[len(image) - trailing:] - - # Pad out trailing lines. - image += chr(0) * 0x10 * ((w - (len(image) / 0x10) % h) % w) - - def px_length(img): - return len(img) * 4 - def tile_length(img): - return len(img) * 4 / (8*8) - - if width and height: - tile_width = width / 8 - more_tile_padding = (tile_width - (tile_length(image) % tile_width or tile_width)) - image += chr(0) * 0x10 * more_tile_padding - - elif width and not height: - tile_width = width / 8 - more_tile_padding = (tile_width - (tile_length(image) % tile_width or tile_width)) - image += chr(0) * 0x10 * more_tile_padding - height = px_length(image) / width - - elif height and not width: - tile_height = height / 8 - more_tile_padding = (tile_height - (tile_length(image) % tile_height or tile_height)) - image += chr(0) * 0x10 * more_tile_padding - width = px_length(image) / height - - # at least one dimension should be given - if width * height != px_length(image): - # look for possible combos of width/height that would form a rectangle - matches = [] - # Height need not be divisible by 8, but width must. - # See pokered gfx/minimize_pic.1bpp. - for w in range(8, px_length(image) / 2 + 1, 8): - h = px_length(image) / w - if w * h == px_length(image): - matches += [(w, h)] - # go for the most square image - if len(matches): - width, height = sorted(matches, key= lambda (w, h): (h % 8 != 0, w + h))[0] # favor height - else: - raise Exception, 'Image can\'t be divided into tiles (%d px)!' % (px_length(image)) - - # convert tiles to lines - lines = to_lines(flatten(image), width) - - if pal_file == None: - palette = None - greyscale = True - bitdepth = 2 - px_map = [[3 - pixel for pixel in line] for line in lines] - - else: # gbc color - palette = pal_to_png(pal_file) - greyscale = False - bitdepth = 8 - px_map = [[pixel for pixel in line] for line in lines] - - return width, height, palette, greyscale, bitdepth, px_map - - -def export_png_to_2bpp(filein, fileout=None, palout=None, tile_padding=0, pic_dimensions=None): - - arguments = { - 'tile_padding': tile_padding, - 'pic_dimensions': pic_dimensions, - } - arguments.update(read_filename_arguments(filein)) - - image, palette, tmap = png_to_2bpp(filein, **arguments) - - if fileout == None: - fileout = os.path.splitext(filein)[0] + '.2bpp' - to_file(fileout, image) - - if tmap != None: - mapout = os.path.splitext(fileout)[0] + '.tilemap' - to_file(mapout, tmap) - - if palout == None: - palout = os.path.splitext(fileout)[0] + '.pal' - export_palette(palette, palout) - - -def get_image_padding(width, height, wstep=8, hstep=8): - - padding = { - 'left': 0, - 'right': 0, - 'top': 0, - 'bottom': 0, - } - - if width % wstep and width >= wstep: - pad = float(width % wstep) / 2 - padding['left'] = int(ceil(pad)) - padding['right'] = int(floor(pad)) - - if height % hstep and height >= hstep: - pad = float(height % hstep) / 2 - padding['top'] = int(ceil(pad)) - padding['bottom'] = int(floor(pad)) - - return padding - - -def png_to_2bpp(filein, **kwargs): - """ - Convert a png image to planar 2bpp. - """ - - tile_padding = kwargs.get('tile_padding', 0) - pic_dimensions = kwargs.get('pic_dimensions', None) - interleave = kwargs.get('interleave', False) - norepeat = kwargs.get('norepeat', False) - tilemap = kwargs.get('tilemap', False) - - with open(filein, 'rb') as data: - width, height, rgba, info = png.Reader(data).asRGBA8() - rgba = list(rgba) - greyscale = info['greyscale'] - - # png.Reader returns flat pixel data. Nested is easier to work with - len_px = 4 # rgba - image = [] - palette = [] - for line in rgba: - newline = [] - for px in xrange(0, len(line), len_px): - color = { 'r': line[px ], - 'g': line[px+1], - 'b': line[px+2], - 'a': line[px+3], } - newline += [color] - if color not in palette: - palette += [color] - image += [newline] - - assert len(palette) <= 4, 'Palette should be 4 colors, is really %d' % len(palette) - - # Pad out smaller palettes with greyscale colors - hues = { - 'white': { 'r': 0xff, 'g': 0xff, 'b': 0xff, 'a': 0xff }, - 'black': { 'r': 0x00, 'g': 0x00, 'b': 0x00, 'a': 0xff }, - 'grey': { 'r': 0x55, 'g': 0x55, 'b': 0x55, 'a': 0xff }, - 'gray': { 'r': 0xaa, 'g': 0xaa, 'b': 0xaa, 'a': 0xff }, - } - for hue in hues.values(): - if len(palette) >= 4: - break - if hue not in palette: - palette += [hue] - - # Sort palettes by luminance - def luminance(color): - rough = { 'r': 4.7, - 'g': 1.4, - 'b': 13.8, } - return sum(color[key] * rough[key] for key in rough.keys()) - palette.sort(key=luminance) - - # Game Boy palette order - palette.reverse() - - # Map pixels to quaternary color ids - padding = get_image_padding(width, height) - width += padding['left'] + padding['right'] - height += padding['top'] + padding['bottom'] - pad = [0] - - qmap = [] - qmap += pad * width * padding['top'] - for line in image: - qmap += pad * padding['left'] - for color in line: - qmap += [palette.index(color)] - qmap += pad * padding['right'] - qmap += pad * width * padding['bottom'] - - # Graphics are stored in tiles instead of lines - tile_width = 8 - tile_height = 8 - num_columns = max(width, tile_width) / tile_width - num_rows = max(height, tile_height) / tile_height - image = [] - - for row in xrange(num_rows): - for column in xrange(num_columns): - - # Split it up into strips to convert to planar data - for strip in xrange(min(tile_height, height)): - anchor = ( - row * num_columns * tile_width * tile_height + - column * tile_width + - strip * width - ) - line = qmap[anchor : anchor + tile_width] - bottom, top = 0, 0 - for bit, quad in enumerate(line): - bottom += (quad & 1) << (7 - bit) - top += (quad /2 & 1) << (7 - bit) - image += [bottom, top] - - if pic_dimensions: - w, h = pic_dimensions - - tiles = get_tiles(image) - pic_length = w * h - tile_width = width / 8 - trailing = len(tiles) % pic_length - new_image = [] - for block in xrange(len(tiles) / pic_length): - offset = (h * tile_width) * ((block * w) / tile_width) + ((block * w) % tile_width) - pic = [] - for row in xrange(h): - index = offset + (row * tile_width) - pic += tiles[index:index + w] - new_image += transpose(pic, w) - new_image += tiles[len(tiles) - trailing:] - image = connect(new_image) - - # Remove any tile padding used to make the png rectangular. - image = image[:len(image) - tile_padding * 0x10] - - if interleave: - image = deinterleave_tiles(image, num_columns) - - if norepeat: - image, tmap = condense_tiles_to_map(image) - if not tilemap: - tmap = None - - return image, palette, tmap - - -def export_palette(palette, filename): - """ - Export a palette from png to rgb macros in a .pal file. - """ - - if os.path.exists(filename): - - # Pic palettes are 2 colors (black/white are added later). - with open(filename) as rgbs: - colors = read_rgb_macros(rgbs.readlines()) - - if len(colors) == 2: - palette = palette[1:3] - - text = png_to_rgb(palette) - with open(filename, 'w') as out: - out.write(text) - - -def png_to_lz(filein): - - name = os.path.splitext(filein)[0] - - export_png_to_2bpp(filein) - image = open(name+'.2bpp', 'rb').read() - to_file(name+'.2bpp'+'.lz', Compressed(image).output) - - - -def convert_2bpp_to_1bpp(data): - """ - Convert planar 2bpp image data to 1bpp. Assume images are two colors. - """ - return data[::2] - -def convert_1bpp_to_2bpp(data): - """ - Convert 1bpp image data to planar 2bpp (black/white). - """ - output = [] - for i in data: - output += [i, i] - return output - - -def export_2bpp_to_1bpp(filename): - name, extension = os.path.splitext(filename) - image = open(filename, 'rb').read() - image = convert_2bpp_to_1bpp(image) - to_file(name + '.1bpp', image) - -def export_1bpp_to_2bpp(filename): - name, extension = os.path.splitext(filename) - image = open(filename, 'rb').read() - image = convert_1bpp_to_2bpp(image) - to_file(name + '.2bpp', image) - - -def export_1bpp_to_png(filename, fileout=None): - - if fileout == None: - fileout = os.path.splitext(filename)[0] + '.png' - - arguments = read_filename_arguments(filename) - - image = open(filename, 'rb').read() - image = convert_1bpp_to_2bpp(image) - - result = convert_2bpp_to_png(image, **arguments) - width, height, palette, greyscale, bitdepth, px_map = result - - w = png.Writer(width, height, palette=palette, compression=9, greyscale=greyscale, bitdepth=bitdepth) - with open(fileout, 'wb') as f: - w.write(f, px_map) - - -def export_png_to_1bpp(filename, fileout=None): - - if fileout == None: - fileout = os.path.splitext(filename)[0] + '.1bpp' - - arguments = read_filename_arguments(filename) - image = png_to_1bpp(filename, **arguments) - - to_file(fileout, image) - -def png_to_1bpp(filename, **kwargs): - image, palette, tmap = png_to_2bpp(filename, **kwargs) - return convert_2bpp_to_1bpp(image) - - -def mass_to_png(debug=False): - # greyscale - for root, dirs, files in os.walk('./gfx/'): - for name in files: - if debug: print os.path.splitext(name), os.path.join(root, name) - if os.path.splitext(name)[1] == '.2bpp': - export_2bpp_to_png(os.path.join(root, name)) - -def mass_to_colored_png(debug=False): - # greyscale, unless a palette is detected - for root, dirs, files in os.walk('./gfx/'): - if 'pics' not in root and 'trainers' not in root: - for name in files: - if debug: print os.path.splitext(name), os.path.join(root, name) - if os.path.splitext(name)[1] == '.2bpp': - export_2bpp_to_png(os.path.join(root, name)) - os.utime(os.path.join(root, name), None) - elif os.path.splitext(name)[1] == '.1bpp': - export_1bpp_to_png(os.path.join(root, name)) - os.utime(os.path.join(root, name), None) - - # only monster and trainer pics for now - for root, dirs, files in os.walk('./gfx/pics/'): - for name in files: - if debug: print os.path.splitext(name), os.path.join(root, name) - if os.path.splitext(name)[1] == '.2bpp': - if 'normal.pal' in files: - export_2bpp_to_png(os.path.join(root, name), None, os.path.join(root, 'normal.pal')) - else: - export_2bpp_to_png(os.path.join(root, name)) - os.utime(os.path.join(root, name), None) - - for root, dirs, files in os.walk('./gfx/trainers/'): - for name in files: - if debug: print os.path.splitext(name), os.path.join(root, name) - if os.path.splitext(name)[1] == '.2bpp': - export_2bpp_to_png(os.path.join(root, name)) - os.utime(os.path.join(root, name), None) - - -def mass_decompress(debug=False): - for root, dirs, files in os.walk('./gfx/'): - for name in files: - if 'lz' in name: - if '/pics' in root: - if 'front' in name: - id = root.split('pics/')[1][:3] - if id != 'egg': - with open(os.path.join(root, name), 'rb') as lz: de = Decompressed(lz.read(), 'vert', sizes[int(id)-1]) - else: - with open(os.path.join(root, name), 'rb') as lz: de = Decompressed(lz.read(), 'vert', 4) - to_file(os.path.join(root, 'front.2bpp'), de.pic) - to_file(os.path.join(root, 'tiles.2bpp'), de.animtiles) - elif 'back' in name: - with open(os.path.join(root, name), 'rb') as lz: de = Decompressed(lz.read(), 'vert') - to_file(os.path.join(root, 'back.2bpp'), de.output) - elif '/trainers' in root or '/fx' in root: - with open(os.path.join(root, name), 'rb') as lz: de = Decompressed(lz.read(), 'vert') - to_file(os.path.join(root, os.path.splitext(name)[0]+'.2bpp'), de.output) - else: - with open(os.path.join(root, name), 'rb') as lz: de = Decompressed(lz.read()) - to_file(os.path.join(root, os.path.splitext(name)[0]+'.2bpp'), de.output) - os.utime(os.path.join(root, name), None) - -def append_terminator_to_lzs(directory): - # fix lzs that were extracted with a missing terminator - for root, dirs, files in os.walk(directory): - for file in files: - if '.lz' in file: - data = open(root+file,'rb').read() - if data[-1] != chr(0xff): - data += chr(0xff) - new = open(root+file,'wb') - new.write(data) - new.close() - -def export_lz_to_png(filename): - """ - Convert a lz file to png. Dump a 2bpp file too. - """ - assert filename[-3:] == ".lz" - lz_data = open(filename, "rb").read() - - bpp = Decompressed(lz_data).output - bpp_filename = os.path.splitext(filename)[0] - to_file(bpp_filename, bpp) - - export_2bpp_to_png(bpp_filename) - - # touch the lz file so it doesn't get remade - os.utime(filename, None) - -def dump_tileset_pngs(): - """ - Convert .lz format tilesets into .png format tilesets. - - Also, leaves a bunch of wonderful .2bpp files everywhere for your amusement. - """ - for tileset_id in range(37): - tileset_filename = "./gfx/tilesets/" + str(tileset_id).zfill(2) + ".lz" - export_lz_to_png(tileset_filename) - -def decompress_frontpic(lz_file): - """ - Convert the pic portion of front.lz to front.2bpp - """ - lz = open(lz_file, 'rb').read() - to_file(Decompressed(lz).pic, os.path.splitext(filein)[0] + '.2bpp') - -def decompress_frontpic_anim(lz_file): - """ - Convert the animation tile portion of front.lz to tiles.2bpp - """ - lz = open(lz_file, 'rb').read() - to_file(Decompressed(lz).animtiles, 'tiles.2bpp') - -def expand_pic_palettes(): - """ - Add white and black to palette files with fewer than 4 colors. - - Pokemon Crystal only defines two colors for a pic palette to - save space, filling in black/white at runtime. - Instead of managing palette files of varying length, black - and white are added to pic palettes and excluded from incbins. - """ - for root, dirs, files in os.walk('./gfx/'): - if 'gfx/pics' in root or 'gfx/trainers' in root: - for name in files: - if os.path.splitext(name)[1] == '.pal': - filename = os.path.join(root, name) - palette = bytearray(open(filename, 'rb').read()) - w = bytearray([0xff, 0x7f]) - b = bytearray([0x00, 0x00]) - if len(palette) == 4: - with open(filename, 'wb') as out: - out.write(w + palette + b) - - -def convert_to_2bpp(filenames=[]): - for filename in filenames: - filename, name, extension = try_decompress(filename) - if extension == '.1bpp': - export_1bpp_to_2bpp(filename) - elif extension == '.2bpp': - pass - elif extension == '.png': - export_png_to_2bpp(filename) - else: - raise Exception, "Don't know how to convert {} to 2bpp!".format(filename) - -def convert_to_1bpp(filenames=[]): - for filename in filenames: - filename, name, extension = try_decompress(filename) - if extension == '.1bpp': - pass - elif extension == '.2bpp': - export_2bpp_to_1bpp(filename) - elif extension == '.png': - export_png_to_1bpp(filename) - else: - raise Exception, "Don't know how to convert {} to 1bpp!".format(filename) - -def convert_to_png(filenames=[]): - for filename in filenames: - filename, name, extension = try_decompress(filename) - if extension == '.1bpp': - export_1bpp_to_png(filename) - elif extension == '.2bpp': - export_2bpp_to_png(filename) - elif extension == '.png': - pass - else: - raise Exception, "Don't know how to convert {} to png!".format(filename) - -def compress(filenames=[]): - for filename in filenames: - data = open(filename, 'rb').read() - lz_data = Compressed(data).output - to_file(filename + '.lz', lz_data) - -def decompress(filenames=[]): - for filename in filenames: - name, extension = os.path.splitext(filename) - lz_data = open(filename, 'rb').read() - data = Decompressed(lz_data).output - to_file(name, data) - -def try_decompress(filename): - """ - Try to decompress a graphic when determining the filetype. - This skips the manual unlz step when attempting - to convert lz-compressed graphics to png. - """ - name, extension = os.path.splitext(filename) - if extension == '.lz': - decompress([filename]) - filename = name - name, extension = os.path.splitext(filename) - return filename, name, extension - - -def main(): - ap = argparse.ArgumentParser() - ap.add_argument('mode') - ap.add_argument('filenames', nargs='*') - args = ap.parse_args() - - method = { - '2bpp': convert_to_2bpp, - '1bpp': convert_to_1bpp, - 'png': convert_to_png, - 'lz': compress, - 'unlz': decompress, - }.get(args.mode, None) - - if method == None: - raise Exception, "Unknown conversion method!" - - method(args.filenames) - - -if __name__ == "__main__": - main() - diff --git a/gfx/game_boy.norepeat.png b/gfx/game_boy.png Binary files differindex 62144956..62144956 100644 --- a/gfx/game_boy.norepeat.png +++ b/gfx/game_boy.png diff --git a/gfx/pikachu/unknown_e41d2.png b/gfx/pikachu/unknown_e41d2.png Binary files differindex df027a11..e2ed42b7 100644 --- a/gfx/pikachu/unknown_e41d2.png +++ b/gfx/pikachu/unknown_e41d2.png diff --git a/gfx/pikachu/unknown_e444b.png b/gfx/pikachu/unknown_e444b.png Binary files differindex 26128b23..61d4c51b 100644 --- a/gfx/pikachu/unknown_e444b.png +++ b/gfx/pikachu/unknown_e444b.png diff --git a/gfx/pikachu/unknown_e4a99.png b/gfx/pikachu/unknown_e4a99.png Binary files differindex 202cbd2f..1cb2b252 100644 --- a/gfx/pikachu/unknown_e4a99.png +++ b/gfx/pikachu/unknown_e4a99.png diff --git a/gfx/pokemon_yellow.t6.png b/gfx/pokemon_yellow.png Binary files differindex 7c86a1ec..7c86a1ec 100644 --- a/gfx/pokemon_yellow.t6.png +++ b/gfx/pokemon_yellow.png diff --git a/gfx/surfing_pikachu_1.t4.png b/gfx/surfing_pikachu_1.png Binary files differindex abaf4ba4..abaf4ba4 100644 --- a/gfx/surfing_pikachu_1.t4.png +++ b/gfx/surfing_pikachu_1.png diff --git a/gfx/surfing_pikachu_1c.t5.png b/gfx/surfing_pikachu_1c.png Binary files differindex eeedb243..eeedb243 100644 --- a/gfx/surfing_pikachu_1c.t5.png +++ b/gfx/surfing_pikachu_1c.png diff --git a/gfx/surfing_pikachu_3.t1.png b/gfx/surfing_pikachu_3.png Binary files differindex 91d4a607..91d4a607 100644 --- a/gfx/surfing_pikachu_3.t1.png +++ b/gfx/surfing_pikachu_3.png diff --git a/gfx/theend.interleave.png b/gfx/theend.png Binary files differindex 025ebb61..025ebb61 100644 --- a/gfx/theend.interleave.png +++ b/gfx/theend.png diff --git a/gfx/tilesets/cavern.t14.png b/gfx/tilesets/cavern.png Binary files differindex 5397fd65..5397fd65 100644 --- a/gfx/tilesets/cavern.t14.png +++ b/gfx/tilesets/cavern.png diff --git a/gfx/tilesets/cemetery.t4.png b/gfx/tilesets/cemetery.png Binary files differindex b1df015a..b1df015a 100644 --- a/gfx/tilesets/cemetery.t4.png +++ b/gfx/tilesets/cemetery.png diff --git a/gfx/tilesets/club.t5.png b/gfx/tilesets/club.png Binary files differindex 05a55879..05a55879 100644 --- a/gfx/tilesets/club.t5.png +++ b/gfx/tilesets/club.png diff --git a/gfx/tilesets/house.t2.png b/gfx/tilesets/house.png Binary files differindex b5d67c95..b5d67c95 100644 --- a/gfx/tilesets/house.t2.png +++ b/gfx/tilesets/house.png diff --git a/gfx/tilesets/interior.t1.png b/gfx/tilesets/interior.png Binary files differindex 3123d81c..3123d81c 100644 --- a/gfx/tilesets/interior.t1.png +++ b/gfx/tilesets/interior.png diff --git a/gfx/tilesets/lab.t4.png b/gfx/tilesets/lab.png Binary files differindex 4a114337..4a114337 100644 --- a/gfx/tilesets/lab.t4.png +++ b/gfx/tilesets/lab.png diff --git a/gfx/tilesets/lobby.t2.png b/gfx/tilesets/lobby.png Binary files differindex f2a1c180..f2a1c180 100644 --- a/gfx/tilesets/lobby.t2.png +++ b/gfx/tilesets/lobby.png diff --git a/gfx/tilesets/mansion.t2.png b/gfx/tilesets/mansion.png Binary files differindex 557c23b4..557c23b4 100644 --- a/gfx/tilesets/mansion.t2.png +++ b/gfx/tilesets/mansion.png diff --git a/gfx/tilesets/museum.t1.png b/gfx/tilesets/museum.png Binary files differindex 372e6751..372e6751 100644 --- a/gfx/tilesets/museum.t1.png +++ b/gfx/tilesets/museum.png diff --git a/gfx/tilesets/plateau.t10.png b/gfx/tilesets/plateau.png Binary files differindex b87162d8..b87162d8 100644 --- a/gfx/tilesets/plateau.t10.png +++ b/gfx/tilesets/plateau.png diff --git a/gfx/tilesets/redshouse2.t7.png b/gfx/tilesets/redshouse2.png Binary files differindex 5f210d04..5f210d04 100644 --- a/gfx/tilesets/redshouse2.t7.png +++ b/gfx/tilesets/redshouse2.png diff --git a/gfx/tilesets/ship.t6.png b/gfx/tilesets/ship.png Binary files differindex cf5b6b95..cf5b6b95 100644 --- a/gfx/tilesets/ship.t6.png +++ b/gfx/tilesets/ship.png diff --git a/gfx/tilesets/shipport.t2.png b/gfx/tilesets/shipport.png Binary files differindex fa5bbb27..fa5bbb27 100644 --- a/gfx/tilesets/shipport.t2.png +++ b/gfx/tilesets/shipport.png diff --git a/gfx/tilesets/underground.t7.png b/gfx/tilesets/underground.png Binary files differindex baa86c17..baa86c17 100644 --- a/gfx/tilesets/underground.t7.png +++ b/gfx/tilesets/underground.png @@ -715,6 +715,27 @@ endchannel: MACRO db $FF ENDM +;\1 x position +;\2 y position +;\3 destination warp id +;\4 destination map ($ff = 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 @@ -825,7 +825,7 @@ INCLUDE "data/cries.asm" INCLUDE "engine/battle/trainer_ai.asm" INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm" -TradingAnimationGraphics: INCBIN "gfx/game_boy.norepeat.2bpp" +TradingAnimationGraphics: INCBIN "gfx/game_boy.2bpp" INCBIN "gfx/link_cable.2bpp" TradingAnimationGraphicsEnd: @@ -1758,20 +1758,22 @@ INCLUDE "engine/hidden_object_functions18.asm" SECTION "bank19", ROMX Overworld_GFX: INCBIN "gfx/tilesets/overworld.2bpp" +ds 32 Overworld_Block: INCBIN "gfx/blocksets/overworld.bst" RedsHouse1_GFX: -RedsHouse2_GFX: INCBIN "gfx/tilesets/redshouse2.t7.2bpp" +RedsHouse2_GFX: INCBIN "gfx/tilesets/redshouse2.2bpp" +ds 16 RedsHouse1_Block: RedsHouse2_Block: INCBIN "gfx/blocksets/redshouse2.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/shipport.t2.2bpp" +ShipPort_GFX: INCBIN "gfx/tilesets/shipport.2bpp" ShipPort_Block: INCBIN "gfx/blocksets/shipport.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" @@ -1789,7 +1791,7 @@ Mart_Block: Pokecenter_Block: INCBIN "gfx/blocksets/pokecenter.bst" ForestGate_GFX: Gate_GFX: -Museum_GFX: INCBIN "gfx/tilesets/museum.t1.2bpp" +Museum_GFX: INCBIN "gfx/tilesets/museum.2bpp" ForestGate_Block: Gate_Block: Museum_Block: INCBIN "gfx/blocksets/museum.bst" @@ -1801,19 +1803,19 @@ Facility_Block: INCBIN "gfx/blocksets/facility.bst" SECTION "bank1B", ROMX -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" @@ -2112,7 +2114,7 @@ INCLUDE "engine/overworld/is_player_just_outside_map.asm" INCLUDE "engine/printer.asm" INCLUDE "engine/diploma_3a.asm" -SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu_3.t1.2bpp" +SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu_3.2bpp" SurfingPikachu3GraphicsEnd: INCLUDE "engine/unknown_ea3ea.asm" diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm index 903ef508..762806f2 100755 --- a/scripts/celadongym.asm +++ b/scripts/celadongym.asm @@ -54,12 +54,12 @@ CeladonGymText_48963: ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM21 - jr .asm_4898c + jr .gymVictory .BagFull ld a, $b ld [hSpriteIndexOrTextID], a call DisplayTextID -.asm_4898c +.gymVictory ld hl, wObtainedBadges set 3, [hl] ld hl, wBeatGymFlags @@ -152,17 +152,17 @@ CeladonGymTrainerHeader7: CeladonGymText1: TX_ASM CheckEvent EVENT_BEAT_ERIKA - jr z, .asm_48a2d + jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM21 - jr nz, .asm_48a25 + jr nz, .afterVictory call z, CeladonGymText_48963 call DisableWaitingAfterTextDisplay - jr .asm_48a5b -.asm_48a25 + jr .done +.afterVictory ld hl, CeladonGymText_48a68 call PrintText - jr .asm_48a5b -.asm_48a2d + jr .done +.beginBattle ld hl, CeladonGymText_48a5e call PrintText ld hl, wd72d @@ -180,7 +180,7 @@ CeladonGymText1: ld a, $3 ld [wCeladonGymCurScript], a ld [wCurMapScript], a -.asm_48a5b +.done jp TextScriptEnd CeladonGymText_48a5e: diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm index 448ce744..78ed1fed 100755 --- a/scripts/ceruleangym.asm +++ b/scripts/ceruleangym.asm @@ -54,13 +54,13 @@ CeruleanGymScript_5c70d: ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM11 - jr .asm_5c736 + jr .gymVictory .BagFull ld a, $7 ld [hSpriteIndexOrTextID], a call DisplayTextID -.asm_5c736 +.gymVictory ld hl, wObtainedBadges set 1, [hl] ld hl, wBeatGymFlags @@ -104,17 +104,17 @@ CeruleanGymTrainerHeader1: CeruleanGymText1: TX_ASM CheckEvent EVENT_BEAT_MISTY - jr z, .asm_5c78d + jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM11 - jr nz, .asm_5c785 + jr nz, .afterVictory call z, CeruleanGymScript_5c70d call DisableWaitingAfterTextDisplay - jr .asm_5c7bb -.asm_5c785 + jr .done +.afterVictory ld hl, CeruleanGymText_5c7c3 call PrintText - jr .asm_5c7bb -.asm_5c78d + jr .done +.beginBattle ld hl, CeruleanGymText_5c7be call PrintText ld hl, wd72d @@ -133,7 +133,7 @@ CeruleanGymText1: ld [hJoyHeld], a ld a, $3 ld [wCeruleanGymCurScript], a -.asm_5c7bb +.done jp TextScriptEnd CeruleanGymText_5c7be: diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 1ebf943a..e2de3f6d 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -211,12 +211,12 @@ CinnabarGymScript3_75857: ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM38 - jr .asm_75880 + jr .gymVictory .BagFull ld a, $c ld [hSpriteIndexOrTextID], a call DisplayTextID -.asm_75880 +.gymVictory ld hl, wObtainedBadges set 6, [hl] ld hl, wBeatGymFlags @@ -267,17 +267,17 @@ CinnabarGymScript_750c3: CinnabarGymText1: TX_ASM CheckEvent EVENT_BEAT_BLAINE - jr z, .asm_d9332 + jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM38 - jr nz, .asm_3012f + jr nz, .afterVictory call z, CinnabarGymScript3_75857 call DisableWaitingAfterTextDisplay jp TextScriptEnd -.asm_3012f +.afterVictory ld hl, BlaineFireBlastText call PrintText jp TextScriptEnd -.asm_d9332 +.beginBattle ld hl, BlaineBattleText call PrintText ld hl, BlaineEndBattleText diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm index 8268930d..364fca37 100755 --- a/scripts/fuchsiagym.asm +++ b/scripts/fuchsiagym.asm @@ -54,12 +54,12 @@ FuchsiaGymScript3_75497: ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM06 - jr .asm_754c0 + jr .gymVictory .BagFull ld a, $b ld [hSpriteIndexOrTextID], a call DisplayTextID -.asm_754c0 +.gymVictory ld hl, wObtainedBadges set 4, [hl] ld hl, wBeatGymFlags @@ -143,17 +143,17 @@ FuchsiaGymTrainerHeader6: FuchsiaGymText1: TX_ASM CheckEvent EVENT_BEAT_KOGA - jr z, .asm_181b6 + jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM06 - jr nz, .asm_adc3b + jr nz, .afterVictory call z, FuchsiaGymScript3_75497 call DisableWaitingAfterTextDisplay - jr .asm_e84c6 -.asm_adc3b + jr .done +.afterVictory ld hl, KogaExplainToxicText call PrintText - jr .asm_e84c6 -.asm_181b6 + jr .done +.beginBattle ld hl, KogaBeforeBattleText call PrintText ld hl, wd72d @@ -172,7 +172,7 @@ FuchsiaGymText1: ld [hJoyHeld], a ld a, $3 ld [wFuchsiaGymCurScript], a -.asm_e84c6 +.done jp TextScriptEnd KogaBeforeBattleText: diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 4bc8198c..ad9572e7 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -434,7 +434,7 @@ OaksLabScript15: OaksLabScript16: ld a, [wd730] bit 0, a - jr nz, .asm_1c6ed + jr nz, .checkRivalPosition ld a, $ff ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a ld a, HS_OAKS_LAB_RIVAL @@ -445,25 +445,25 @@ OaksLabScript16: ld [wOaksLabCurScript], a ret -.asm_1c6ed +.checkRivalPosition ld a, [wNPCNumScriptedSteps] cp 5 - jr nz, .asm_1c703 + jr nz, .turnPlayerDown ld a, [wXCoord] cp 4 - jr nz, .asm_1c6ff + jr nz, .turnPlayerLeft ld a, SPRITE_FACING_RIGHT - jr .asm_1c707 + jr .done -.asm_1c6ff +.turnPlayerLeft ld a, SPRITE_FACING_LEFT - jr .asm_1c707 + jr .done -.asm_1c703 +.turnPlayerDown cp 4 ret nz xor a -.asm_1c707 +.done ld [wSpritePlayerStateData1FacingDirection], a ret @@ -631,20 +631,20 @@ OaksLabScript21: OaksLabScript22: ret -OaksLabScript_1c897: +OaksLabScript_RemoveParcel: ld hl, wBagItems ld bc, 0 -.asm_1c89d +.loop ld a, [hli] cp $ff ret z cp OAKS_PARCEL - jr z, .asm_1c8a9 + jr z, .foundParcel inc hl inc c - jr .asm_1c89d + jr .loop -.asm_1c8a9 +.foundParcel ld hl, wNumBagItems ld a, c ld [wWhichPokemon], a @@ -748,33 +748,33 @@ OaksLabTextPointers2: OaksLabText1: TX_ASM CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 - jr nz, .asm_1c968 - ld hl, OaksLabText_1c97d + jr nz, .beforeChooseMon + ld hl, OaksLabGaryText1 call PrintText jr .asm_1c97a -.asm_1c968 +.beforeChooseMon CheckEventReuseA EVENT_GOT_STARTER - jr nz, .asm_1c974 - ld hl, OaksLabText_1c982 + jr nz, .afterChooseMon + ld hl, OaksLabText40 call PrintText jr .asm_1c97a -.asm_1c974 - ld hl, OaksLabText_1c987 +.afterChooseMon + ld hl, OaksLabText41 call PrintText .asm_1c97a jp TextScriptEnd -OaksLabText_1c97d: +OaksLabGaryText1: TX_FAR _OaksLabGaryText1 db "@" -OaksLabText_1c982: +OaksLabText40: TX_FAR _OaksLabText40 db "@" -OaksLabText_1c987: +OaksLabText41: TX_FAR _OaksLabText41 db "@" @@ -786,11 +786,11 @@ OaksLabText2: jr nz, OaksLabScript_1c9ac ld a, $0 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, OaksLabText_1c9a7 + ld hl, OaksLabText39 call PrintText jp TextScriptEnd -OaksLabText_1c9a7: +OaksLabText39: TX_FAR _OaksLabText39 db "@" @@ -859,15 +859,15 @@ OaksLabText3: jr .asm_1ca6f .asm_1ca3a - ld hl, OaksLabText_1ca81 + ld hl, OaksLabDeliverParcelText call PrintText - call OaksLabScript_1c897 + call OaksLabScript_RemoveParcel ld a, $13 ld [wOaksLabCurScript], a jr .asm_1ca6f .asm_1ca4a - ld hl, OaksLabText_1ca8b + ld hl, OaksLabAroundWorldText call PrintText jr .asm_1ca6f @@ -876,12 +876,12 @@ OaksLabText3: jr nz, .asm_1ca69 lb bc, POKE_BALL, 5 call GiveItem - ld hl, OaksLabText_1ca90 + ld hl, OaksLabGivePokeballsText call PrintText jr .asm_1ca6f .asm_1ca69 - ld hl, OaksLabText_1ca9a + ld hl, OaksLabPleaseVisitText call PrintText .asm_1ca6f jp TextScriptEnd @@ -898,23 +898,23 @@ OaksLabText_1ca7c: TX_FAR _OaksLabText_1d2fa db "@" -OaksLabText_1ca81: +OaksLabDeliverParcelText: TX_FAR _OaksLabDeliverParcelText1 TX_SFX_KEY_ITEM TX_FAR _OaksLabDeliverParcelText2 db "@" -OaksLabText_1ca8b: +OaksLabAroundWorldText: TX_FAR _OaksLabAroundWorldText db "@" -OaksLabText_1ca90: +OaksLabGivePokeballsText: TX_FAR _OaksLabGivePokeballsText1 TX_SFX_KEY_ITEM TX_FAR _OaksLabGivePokeballsText2 db "@" -OaksLabText_1ca9a: +OaksLabPleaseVisitText: TX_FAR _OaksLabPleaseVisitText db "@" @@ -949,76 +949,76 @@ OaksLabText_1cac2: OaksLabText13: TX_ASM - ld hl, OaksLabText_1cad1 + ld hl, OaksLabRivalWaitingText call PrintText jp TextScriptEnd -OaksLabText_1cad1: +OaksLabRivalWaitingText: TX_FAR _OaksLabRivalWaitingText db "@" OaksLabText14: TX_ASM - ld hl, OaksLabText_1cae0 + ld hl, OaksLabChooseMonText call PrintText jp TextScriptEnd -OaksLabText_1cae0: +OaksLabChooseMonText: TX_FAR _OaksLabChooseMonText db "@" OaksLabText15: TX_ASM - ld hl, OaksLabText_1caef + ld hl, OaksLabRivalInterjectionText call PrintText jp TextScriptEnd -OaksLabText_1caef: +OaksLabRivalInterjectionText: TX_FAR _OaksLabRivalInterjectionText db "@" OaksLabText16: TX_ASM - ld hl, OaksLabText_1cafe + ld hl, OaksLabBePatientText call PrintText jp TextScriptEnd -OaksLabText_1cafe: +OaksLabBePatientText: TX_FAR _OaksLabBePatientText db "@" OaksLabText17: TX_ASM - ld hl, OaksLabText_1cb25 + ld hl, OaksLabRivalTakesText1 call PrintText - ld hl, OaksLabText_1cb2a + ld hl, OaksLabRivalTakesText2 call PrintText - ld hl, OaksLabText_1cb30 + ld hl, OaksLabRivalTakesText3 call PrintText - ld hl, OaksLabText_1cb35 + ld hl, OaksLabRivalTakesText4 call PrintText - ld hl, OaksLabText_1cb3a + ld hl, OaksLabRivalTakesText5 call PrintText jp TextScriptEnd -OaksLabText_1cb25: +OaksLabRivalTakesText1: TX_FAR _OaksLabRivalTakesText1 db "@" -OaksLabText_1cb2a: +OaksLabRivalTakesText2: TX_FAR _OaksLabRivalTakesText2 TX_SFX_KEY_ITEM db "@" -OaksLabText_1cb30: +OaksLabRivalTakesText3: TX_FAR _OaksLabRivalTakesText3 db "@" -OaksLabText_1cb35: +OaksLabRivalTakesText4: TX_FAR _OaksLabRivalTakesText4 db "@" -OaksLabText_1cb3a: +OaksLabRivalTakesText5: TX_FAR _OaksLabRivalTakesText5 db "@" @@ -1030,9 +1030,9 @@ OaksLabText18: call GetMonName ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, OaksLabText_1cb85 + ld hl, OaksLabOakGivesText call PrintText - ld hl, OaksLabText_1cb8a + ld hl, OaksLabRecievedText call PrintText xor a ld [wMonDataLocation], a @@ -1050,32 +1050,32 @@ OaksLabText18: set 3, [hl] jp TextScriptEnd -OaksLabText_1cb85: +OaksLabOakGivesText: TX_FAR _OaksLabOakGivesText db "@" -OaksLabText_1cb8a: +OaksLabRecievedText: TX_FAR _OaksLabReceivedText TX_SFX_KEY_ITEM db "@" OaksLabText10: TX_ASM - ld hl, OaksLabText_1cb9a + ld hl, OaksLabLeavingText call PrintText jp TextScriptEnd -OaksLabText_1cb9a: +OaksLabLeavingText: TX_FAR _OaksLabLeavingText db "@" OaksLabText11: TX_ASM - ld hl, OaksLabText_1cba9 + ld hl, OaksLabRivalChallengeText call PrintText jp TextScriptEnd -OaksLabText_1cba9: +OaksLabRivalChallengeText: TX_FAR _OaksLabRivalChallengeText db "@" @@ -1089,11 +1089,11 @@ OaksLabRivalBeatYouText: OaksLabText12: TX_ASM - ld hl, OaksLabText_1cbc2 + ld hl, OaksLabRivalToughenUpText call PrintText jp TextScriptEnd -OaksLabText_1cbc2: +OaksLabRivalToughenUpText: TX_FAR _OaksLabRivalToughenUpText db "@" @@ -1101,21 +1101,21 @@ OaksLabText26: TX_ASM ldpikacry e, PikachuCry2 callab PlayPikachuSoundClip - ld hl, OaksLabText_1cbdb + ld hl, OaksLabPikachuDislikesPokeballsText1 call PrintText jp TextScriptEnd -OaksLabText_1cbdb: +OaksLabPikachuDislikesPokeballsText1: TX_FAR _OaksLabPikachuDislikesPokeballsText1 db "@" OaksLabText27: TX_ASM - ld hl, OaksLabText_1cbea + ld hl, OaksLabPikachuDislikesPokeballsText2 call PrintText jp TextScriptEnd -OaksLabText_1cbea: +OaksLabPikachuDislikesPokeballsText2: TX_FAR _OaksLabPikachuDislikesPokeballsText2 db "@" diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm index b7271b05..0456bb86 100755 --- a/scripts/pewtercity.asm +++ b/scripts/pewtercity.asm @@ -207,11 +207,11 @@ PewterCityText3: call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_193c9 + jr nz, .playerDidNotGoIntoMuseum ld hl, PewterCityText_193f6 call PrintText - jr .asm_193ee -.asm_193c9 + jr .done +.playerDidNotGoIntoMuseum ld hl, PewterCityText_193fb call PrintText xor a @@ -227,7 +227,7 @@ PewterCityText3: call GetSpritePosition2 ld a, $1 ld [wPewterCityCurScript], a -.asm_193ee +.done jp TextScriptEnd PewterCityText_193f1: @@ -253,14 +253,14 @@ PewterCityText4: call YesNoChoice ld a, [wCurrentMenuItem] cp $0 - jr nz, .asm_1941e + jr nz, .playerDoesNotKnow ld hl, PewterCityText_1942c call PrintText - jr .asm_19424 -.asm_1941e + jr .done +.playerDoesNotKnow ld hl, PewterCityText_19431 call PrintText -.asm_19424 +.done jp TextScriptEnd PewterCityText_19427: diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm index 6014cf33..f9fc4ed2 100755 --- a/scripts/pewtergym.asm +++ b/scripts/pewtergym.asm @@ -54,13 +54,13 @@ PewterGymScript_5c3df: ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM34 - jr .asm_5c408 + jr .gymVictory .BagFull ld a, $6 ld [hSpriteIndexOrTextID], a call DisplayTextID -.asm_5c408 +.gymVictory ld hl, wObtainedBadges set 0, [hl] ld hl, wBeatGymFlags @@ -103,17 +103,17 @@ PewterGymTrainerHeader0: PewterGymText1: TX_ASM CheckEvent EVENT_BEAT_BROCK - jr z, .asm_5c46a + jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM34 - jr nz, .asm_5c462 + jr nz, .afterVictory call z, PewterGymScript_5c3df call DisableWaitingAfterTextDisplay - jr .asm_5c49b -.asm_5c462 + jr .done +.afterVictory ld hl, PewterGymText_5c4a3 call PrintText - jr .asm_5c49b -.asm_5c46a + jr .done +.beginBattle ld hl, PewterGymText_5c49e call PrintText ld hl, wd72d @@ -133,7 +133,7 @@ PewterGymText1: ld a, $3 ld [wPewterGymCurScript], a ld [wCurMapScript], a -.asm_5c49b +.done jp TextScriptEnd PewterGymText_5c49e: diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm index 146d31f9..f82b5ccd 100755 --- a/scripts/saffrongym.asm +++ b/scripts/saffrongym.asm @@ -54,12 +54,12 @@ SaffronGymText_5d068: ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM46 - jr .asm_5d091 + jr .gymVictory .BagFull ld a, $c ld [hSpriteIndexOrTextID], a call DisplayTextID -.asm_5d091 +.gymVictory ld hl, wObtainedBadges set 5, [hl] ld hl, wBeatGymFlags @@ -153,17 +153,17 @@ SaffronGymTrainerHeader6: SaffronGymText1: TX_ASM CheckEvent EVENT_BEAT_SABRINA - jr z, .asm_5d134 + jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM46 - jr nz, .asm_5d12c + jr nz, .afterVictory call z, SaffronGymText_5d068 call DisableWaitingAfterTextDisplay - jr .asm_5d15f -.asm_5d12c + jr .done +.afterVictory ld hl, SaffronGymText_5d16e call PrintText - jr .asm_5d15f -.asm_5d134 + jr .done +.beginBattle ld hl, SaffronGymText_5d162 call PrintText ld hl, wd72d @@ -180,7 +180,7 @@ SaffronGymText1: ld [wGymLeaderNo], a ld a, $3 ld [wSaffronGymCurScript], a -.asm_5d15f +.done jp TextScriptEnd SaffronGymText_5d162: diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index 6f0f4cc2..7127f814 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -6,11 +6,11 @@ VermilionCityScript: bit 6, [hl] res 6, [hl] push hl - call nz, VermilionCityScript_197cb + call nz, InitCityScript pop hl bit 5, [hl] res 5, [hl] - call nz, VermilionCityScript_197c0 + call nz, SetFirstLockTrashCanIndex ld hl, VermilionCityScriptPointers ld a, [wVermilionCityCurScript] call JumpTable @@ -25,7 +25,7 @@ VermilionCityScript_19869: SetEventReuseHL EVENT_152 ret -VermilionCityScript_197c0: +SetFirstLockTrashCanIndex: call Random ld a, [hRandomAdd] ld b, a @@ -35,7 +35,7 @@ VermilionCityScript_197c0: ld [wFirstLockTrashCanIndex], a ret -VermilionCityScript_197cb: +InitCityScript: CheckEventHL EVENT_SS_ANNE_LEFT ret z CheckEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT @@ -55,10 +55,10 @@ VermilionCityScriptPointers: VermilionCityScript0: ld a, [wSpritePlayerStateData1FacingDirection] and a ; cp SPRITE_FACING_DOWN - jr nz, .asm_198de - ld hl, CoordsData_19823 + jr nz, .return + ld hl, SSAnneTicketCheckCoords call ArePlayerCoordsInArray - jr nc, .asm_198de + jr nc, .return xor a ld [hJoyHeld], a ld [wcf0d], a @@ -66,13 +66,13 @@ VermilionCityScript0: ld [hSpriteIndexOrTextID], a call DisplayTextID CheckEvent EVENT_SS_ANNE_LEFT - jr nz, .asm_19810 + jr nz, .shipHasDeparted ld b, S_S_TICKET predef GetQuantityOfItemInBag ld a, b and a ret nz -.asm_19810 +.shipHasDeparted ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 @@ -82,15 +82,15 @@ VermilionCityScript0: ld [wVermilionCityCurScript], a ret -.asm_198de +.return ret -CoordsData_19823: - db $1e,$12 +SSAnneTicketCheckCoords: + db $1e,$12 ; y, x db $ff VermilionCityScript4: - ld hl, CoordsData_19823 + ld hl, SSAnneTicketCheckCoords call ArePlayerCoordsInArray ret c ld a, $0 @@ -154,64 +154,64 @@ VermilionCityText1: VermilionCityText2: TX_ASM CheckEvent EVENT_SS_ANNE_LEFT - jr nz, .asm_1989e - ld hl, VermilionCityText_198a7 + jr nz, .shipHasDeparted + ld hl, VermilionCityTextDidYouSee call PrintText - jr .asm_198a4 -.asm_1989e - ld hl, VermilionCityText_198ac + jr .end +.shipHasDeparted + ld hl, VermilionCityTextSSAnneDeparted call PrintText -.asm_198a4 +.end jp TextScriptEnd -VermilionCityText_198a7: - TX_FAR _VermilionCityText_198a7 +VermilionCityTextDidYouSee: + TX_FAR _VermilionCityTextDidYouSee db "@" -VermilionCityText_198ac: - TX_FAR _VermilionCityText_198ac +VermilionCityTextSSAnneDeparted: + TX_FAR _VermilionCityTextSSAnneDeparted db "@" VermilionCityText3: TX_ASM CheckEvent EVENT_SS_ANNE_LEFT - jr nz, .asm_198f6 + jr nz, .shipHasDeparted ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_RIGHT - jr z, .asm_198c8 - ld hl, VermilionCityCoords1 + jr z, .greetPlayer + ld hl, .inFrontOfOrBehindGuardCoords call ArePlayerCoordsInArray - jr nc, .asm_198d0 -.asm_198c8 + jr nc, .greetPlayerAndCheckTicket +.greetPlayer ld hl, SSAnneWelcomeText4 call PrintText - jr .asm_198fc -.asm_198d0 + jr .end +.greetPlayerAndCheckTicket ld hl, SSAnneWelcomeText9 call PrintText ld b, S_S_TICKET predef GetQuantityOfItemInBag ld a, b and a - jr nz, .asm_198e9 + jr nz, .playerHasTicket ld hl, SSAnneNoTicketText call PrintText - jr .asm_198fc -.asm_198e9 + jr .end +.playerHasTicket ld hl, SSAnneFlashedTicketText call PrintText ld a, $4 ld [wVermilionCityCurScript], a - jr .asm_198fc -.asm_198f6 + jr .end +.shipHasDeparted ld hl, SSAnneNotHereText call PrintText -.asm_198fc +.end jp TextScriptEnd -VermilionCityCoords1: - db $1d,$13 - db $1f,$13 +.inFrontOfOrBehindGuardCoords: + db $1d,$13 ; y, x of tile in front of guard + db $1f,$13 ; y, x of tile behind guard db $ff SSAnneWelcomeText4: diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm index 1557f68a..75814e49 100755 --- a/scripts/viridiangym.asm +++ b/scripts/viridiangym.asm @@ -148,12 +148,12 @@ ViridianGymScript3_74995: ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM27 - jr .asm_749be + jr .gymVictory .BagFull ld a, $e ld [hSpriteIndexOrTextID], a call DisplayTextID -.asm_749be +.gymVictory ld hl, wObtainedBadges set 7, [hl] ld hl, wBeatGymFlags @@ -262,13 +262,13 @@ ViridianGymTrainerHeader7: ViridianGymText1: TX_ASM CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI - jr z, .asm_6de66 + jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM27 - jr nz, .asm_9fc95 + jr nz, .afterVictory call z, ViridianGymScript3_74995 call DisableWaitingAfterTextDisplay - jr .asm_6dff7 -.asm_9fc95 + jr .done +.afterVictory ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, ViridianGymText_74ad9 @@ -280,8 +280,8 @@ ViridianGymText1: call UpdateSprites call Delay3 call GBFadeInFromBlack - jr .asm_6dff7 -.asm_6de66 + jr .done +.beginBattle ld hl, ViridianGymText_74ace call PrintText ld hl, wd72d @@ -298,7 +298,7 @@ ViridianGymText1: ld [wGymLeaderNo], a ld a, $3 ld [wViridianGymCurScript], a -.asm_6dff7 +.done jp TextScriptEnd ViridianGymText_74ace: diff --git a/text/maps/vermilion_city.asm b/text/maps/vermilion_city.asm index 2b2d125f..742d0c5d 100644 --- a/text/maps/vermilion_city.asm +++ b/text/maps/vermilion_city.asm @@ -7,13 +7,13 @@ _VermilionCityText1:: cont "toxic sludge!" done -_VermilionCityText_198a7:: +_VermilionCityTextDidYouSee:: text "Did you see S.S." line "ANNE moored in" cont "the harbor?" done -_VermilionCityText_198ac:: +_VermilionCityTextSSAnneDeparted:: text "So, S.S.ANNE has" line "departed!" 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 <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <getopt.h> +#include <string.h> +#include <stdint.h> + +#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/gfx.py b/tools/gfx.py new file mode 100644 index 00000000..a3d95562 --- /dev/null +++ b/tools/gfx.py @@ -0,0 +1,267 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- + +"""Supplementary scripts for graphics conversion.""" + +import os +import argparse + +from pokemontools import gfx, lz + + +# Graphics with inverted tilemaps that aren't covered by filepath_rules. +pics = [ + 'gfx/shrink1', + 'gfx/shrink2', +] + +def recursive_read(filename): + def recurse(filename_): + lines = [] + for line in open(filename_): + if 'include "' in line.lower(): + lines += recurse(line.split('"')[1]) + else: + lines += [line] + return lines + lines = recurse(filename) + return ''.join(lines) + +base_stats = None +def get_base_stats(): + global base_stats + if not base_stats: + base_stats = recursive_read('data/base_stats.asm') + return base_stats + +def get_pokemon_dimensions(path): + try: + byte = bytearray(open(path, 'rb').read())[0] + width = byte & 0xf + height = (byte >> 8) & 0xf + return width, height + except: + return None + + +def get_animation_frames(path=None, w=7, h=7, bitmask_path=None, frame_path=None): + """Retrieve animation frame tilemaps from generated frame/bitmask data.""" + if not path: + path = bitmask_path + if not path: + path = frame_path + if not path: + raise Exception("need at least one of path, bitmask_path or frame_path") + + if not bitmask_path: + bitmask_path = os.path.join(os.path.split(path)[0], 'bitmask.asm') + if not frame_path: + frame_path = os.path.join(os.path.split(path)[0], 'frames.asm') + bitmask_lines = open(bitmask_path).readlines() + frame_lines = open(frame_path).readlines() + + bitmask_length = w * h + + bitmasks = [] + bitmask = [] + for line in bitmask_lines: + if '\tdb ' in line: + value = line.split('\tdb ')[1].strip().replace('%', '0b') + value = int(value, 0) + #print line.strip(), value, len(bitmasks), len(bitmask) + for bit in xrange(8): + bitmask += [(value >> bit) & 1] + if len(bitmask) >= bitmask_length: + bitmasks += [bitmask] + bitmask = [] + break + if bitmask: + bitmasks += [bitmask] + + frames = [] + frame_labels = [] + i = 0 + for line in frame_lines: + if '\tdw ' in line: + frame_labels += [line.split('\tdw ')[1].strip()] + else: + for part in line.split(): + part = part.strip() + if part in frame_labels: + frames += [(part, i)] + i += 1 + + results = [] + + for label, i in frames: + result = [] + + # get the bitmask and tile ids for each frame + # don't care if we read past bounds, so just read the rest of the file + values = [] + for line in frame_lines[i:]: + if '\tdb ' in line: + values += line.split('\tdb ')[1].split(';')[0].split(',') + + #print bitmasks + #print values[0] + #print int(values[0].replace('$', '0x'), 0) + bitmask = bitmasks[int(values[0].replace('$', '0x'), 0)] + tiles = values[1:] + k = 0 + j = 0 + for bit in bitmask: + if bit: + result += [int(tiles[k].replace('$', '0x'), 0)] + k += 1 + else: + result += [j] + j += 1 + + results += [result] + + return results + +def get_animated_graphics(path, w=7, h=7, bitmask_path=None, frame_path=None): + frames = get_animation_frames(path, w, h, bitmask_path, frame_path) + new_path = path.replace('.animated.2bpp', '.2bpp') + tiles = gfx.get_tiles(bytearray(open(path, 'rb').read())) + new_tiles = tiles[:w * h] + for frame in frames: + for tile in frame: + new_tiles += [tiles[tile]] + new_graphic = gfx.connect(new_tiles) + print new_path, list(new_graphic) + open(new_path, 'wb').write(bytearray(new_graphic)) + return new_path + +def filepath_rules(filepath): + """Infer attributes of certain graphics by their location in the filesystem.""" + args = {} + + filedir, filename = os.path.split(filepath) + if filedir.startswith('./'): + filedir = filedir[2:] + + name, ext = os.path.splitext(filename) + if ext == '.lz': + name, ext = os.path.splitext(name) + + pokemon_name = '' + + if 'gfx/pokemon/' in filedir: + pokemon_name = filedir.split('/')[-1] + if pokemon_name.startswith('unown_'): + index = filedir.find(pokemon_name) + if index != -1: + filedir = filedir[:index + len('unown')] + filedir[index + len('unown_a'):] + if name == 'front' or name == 'front.animated': + args['pal_file'] = os.path.join(filedir, 'normal.pal') + args['pic'] = True + args['animate'] = True + elif name == 'back': + args['pal_file'] = os.path.join(filedir, 'normal.pal') + args['pic'] = True + + elif 'gfx/trainers' in filedir: + args['pic'] = True + + elif os.path.join(filedir, name) in pics: + args['pic'] = True + + elif filedir == 'gfx/tilesets': + args['tileset'] = True + + if args.get('pal_file'): + if os.path.exists(args['pal_file']): + args['palout'] = args['pal_file'] + else: + del args['pal_file'] + + if args.get('pic'): + if ext == '.png': + w, h = gfx.png.Reader(filepath).asRGBA8()[:2] + w = min(w/8, h/8) + args['pic_dimensions'] = w, w + elif ext == '.2bpp': + if pokemon_name and name == 'front' or name == 'front.animated': + w, h = get_pokemon_dimensions(filepath.replace(ext, '.dimensions')) or (7, 7) + args['pic_dimensions'] = w, w + elif pokemon_name and name == 'back': + args['pic_dimensions'] = 6, 6 + else: + args['pic_dimensions'] = 7, 7 + + if args.get('tileset'): + args['width'] = 128 + return args + + +def to_1bpp(filename, **kwargs): + name, ext = os.path.splitext(filename) + if ext == '.1bpp': pass + elif ext == '.2bpp': gfx.export_2bpp_to_1bpp(filename, **kwargs) + elif ext == '.png': gfx.export_png_to_1bpp(filename, **kwargs) + elif ext == '.lz': + decompress(filename, **kwargs) + to_1bpp(name, **kwargs) + +def to_2bpp(filename, **kwargs): + name, ext = os.path.splitext(filename) + if ext == '.1bpp': gfx.export_1bpp_to_2bpp(filename, **kwargs) + elif ext == '.2bpp': pass + elif ext == '.png': gfx.export_png_to_2bpp(filename, **kwargs) + elif ext == '.lz': + decompress(filename, **kwargs) + to_2bpp(name, **kwargs) + +def to_png(filename, **kwargs): + name, ext = os.path.splitext(filename) + if ext == '.1bpp': gfx.export_1bpp_to_png(filename, **kwargs) + elif ext == '.2bpp' and name.endswith('.animated'): + w, h = kwargs.get('pic_dimensions') or (7, 7) + new_path = get_animated_graphics(filename, w=w, h=h) + return to_png(new_path, **kwargs) + elif ext == '.2bpp': gfx.export_2bpp_to_png(filename, **kwargs) + elif ext == '.png': pass + elif ext == '.lz': + decompress(filename, **kwargs) + to_png(name, **kwargs) + +def compress(filename, **kwargs): + data = open(filename, 'rb').read() + lz_data = lz.Compressed(data).output + open(filename + '.lz', 'wb').write(bytearray(lz_data)) + +def decompress(filename, **kwargs): + lz_data = open(filename, 'rb').read() + data = lz.Decompressed(lz_data).output + name, ext = os.path.splitext(filename) + open(name, 'wb').write(bytearray(data)) + + +methods = { + '2bpp': to_2bpp, + '1bpp': to_1bpp, + 'png': to_png, + 'lz': compress, + 'unlz': decompress, +} + +def main(method_name, filenames=None): + if filenames is None: filenames = [] + for filename in filenames: + args = filepath_rules(filename) + method = methods.get(method_name) + if method: + method(filename, **args) + +def get_args(): + ap = argparse.ArgumentParser() + ap.add_argument('method_name') + ap.add_argument('filenames', nargs='*') + args = ap.parse_args() + return args + +if __name__ == '__main__': + main(**get_args().__dict__) 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 <stag019@gmail.com> + * + * 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 <stdlib.h> +#include <stdio.h> +#include <stdint.h> +#include <string.h> + +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/pokemontools/__init__.py b/tools/pokemontools/__init__.py new file mode 100644 index 00000000..a3e75900 --- /dev/null +++ b/tools/pokemontools/__init__.py @@ -0,0 +1 @@ +# A subset of https://github.com/pret/pokemon-reverse-engineering-tools diff --git a/tools/pokemontools/gfx.py b/tools/pokemontools/gfx.py new file mode 100644 index 00000000..2979b5a7 --- /dev/null +++ b/tools/pokemontools/gfx.py @@ -0,0 +1,938 @@ +# -*- coding: utf-8 -*- + +import os +import sys +import png +from math import sqrt, floor, ceil +import argparse +import operator + +from lz import Compressed, Decompressed + + +def split(list_, interval): + """ + Split a list by length. + """ + for i in xrange(0, len(list_), interval): + j = min(i + interval, len(list_)) + yield list_[i:j] + + +def hex_dump(data, length=0x10): + """ + just use hexdump -C + """ + margin = len('%x' % len(data)) + output = [] + address = 0 + for line in split(data, length): + output += [ + hex(address)[2:].zfill(margin) + + ' | ' + + ' '.join('%.2x' % byte for byte in line) + ] + address += length + return '\n'.join(output) + + +def get_tiles(image): + """ + Split a 2bpp image into 8x8 tiles. + """ + return list(split(image, 0x10)) + +def connect(tiles): + """ + Combine 8x8 tiles into a 2bpp image. + """ + return [byte for tile in tiles for byte in tile] + +def transpose(tiles, width=None): + """ + Transpose a tile arrangement along line y=-x. + + 00 01 02 03 04 05 00 06 0c 12 18 1e + 06 07 08 09 0a 0b 01 07 0d 13 19 1f + 0c 0d 0e 0f 10 11 <-> 02 08 0e 14 1a 20 + 12 13 14 15 16 17 03 09 0f 15 1b 21 + 18 19 1a 1b 1c 1d 04 0a 10 16 1c 22 + 1e 1f 20 21 22 23 05 0b 11 17 1d 23 + + 00 01 02 03 00 04 08 + 04 05 06 07 <-> 01 05 09 + 08 09 0a 0b 02 06 0a + 03 07 0b + """ + if width == None: + width = int(sqrt(len(tiles))) # assume square image + tiles = sorted(enumerate(tiles), key= lambda (i, tile): i % width) + return [tile for i, tile in tiles] + +def transpose_tiles(image, width=None): + return connect(transpose(get_tiles(image), width)) + +def interleave(tiles, width): + """ + 00 01 02 03 04 05 00 02 04 06 08 0a + 06 07 08 09 0a 0b 01 03 05 07 09 0b + 0c 0d 0e 0f 10 11 --> 0c 0e 10 12 14 16 + 12 13 14 15 16 17 0d 0f 11 13 15 17 + 18 19 1a 1b 1c 1d 18 1a 1c 1e 20 22 + 1e 1f 20 21 22 23 19 1b 1d 1f 21 23 + """ + interleaved = [] + left, right = split(tiles[::2], width), split(tiles[1::2], width) + for l, r in zip(left, right): + interleaved += l + r + return interleaved + +def deinterleave(tiles, width): + """ + 00 02 04 06 08 0a 00 01 02 03 04 05 + 01 03 05 07 09 0b 06 07 08 09 0a 0b + 0c 0e 10 12 14 16 --> 0c 0d 0e 0f 10 11 + 0d 0f 11 13 15 17 12 13 14 15 16 17 + 18 1a 1c 1e 20 22 18 19 1a 1b 1c 1d + 19 1b 1d 1f 21 23 1e 1f 20 21 22 23 + """ + deinterleaved = [] + rows = list(split(tiles, width)) + for left, right in zip(rows[::2], rows[1::2]): + for l, r in zip(left, right): + deinterleaved += [l, r] + return deinterleaved + +def interleave_tiles(image, width): + return connect(interleave(get_tiles(image), width)) + +def deinterleave_tiles(image, width): + return connect(deinterleave(get_tiles(image), width)) + + +def condense_image_to_map(image, pic=0): + """ + Reduce an image of adjacent frames to an image containing a base frame and any unrepeated tiles. + Returns the new image and the corresponding tilemap used to reconstruct the input image. + + If <pic> is 0, ignore the concept of frames. This behavior might be better off as another function. + """ + tiles = get_tiles(image) + new_tiles, tilemap = condense_tiles_to_map(tiles, pic) + new_image = connect(new_tiles) + return new_image, tilemap + +def condense_tiles_to_map(tiles, pic=0): + """ + Reduce a sequence of tiles representing adjacent frames to a base frame and any unrepeated tiles. + Returns the new tiles and the corresponding tilemap used to reconstruct the input tile sequence. + + If <pic> is 0, ignore the concept of frames. This behavior might be better off as another function. + """ + + # Leave the first frame intact for pics. + new_tiles = tiles[:pic] + tilemap = range(pic) + + for i, tile in enumerate(tiles[pic:]): + if tile not in new_tiles: + new_tiles.append(tile) + + if pic: + # Match the first frame exactly where possible. + # This reduces the space needed to replace tiles in pic animations. + # For example, if a tile is repeated twice in the first frame, + # but at the same relative index as the second tile, use the second index. + # When creating a bitmask later, the second index would not require a replacement, but the first index would have. + pic_i = i % pic + if tile == new_tiles[pic_i]: + tilemap.append(pic_i) + else: + tilemap.append(new_tiles.index(tile)) + else: + tilemap.append(new_tiles.index(tile)) + return new_tiles, tilemap + +def test_condense_tiles_to_map(): + test = condense_tiles_to_map(list('abcadbae')) + if test != (list('abcde'), [0, 1, 2, 0, 3, 1, 0, 4]): + raise Exception(test) + test = condense_tiles_to_map(list('abcadbae'), 2) + if test != (list('abcde'), [0, 1, 2, 0, 3, 1, 0, 4]): + raise Exception(test) + test = condense_tiles_to_map(list('abcadbae'), 4) + if test != (list('abcade'), [0, 1, 2, 3, 4, 1, 0, 5]): + raise Exception(test) + test = condense_tiles_to_map(list('abcadbea'), 4) + if test != (list('abcade'), [0, 1, 2, 3, 4, 1, 5, 3]): + raise Exception(test) + + +def to_file(filename, data): + """ + Apparently open(filename, 'wb').write(bytearray(data)) won't work. + """ + file = open(filename, 'wb') + for byte in data: + file.write('%c' % byte) + file.close() + + +def decompress_file(filein, fileout=None): + image = bytearray(open(filein).read()) + de = Decompressed(image) + + if fileout == None: + fileout = os.path.splitext(filein)[0] + to_file(fileout, de.output) + + +def compress_file(filein, fileout=None): + image = bytearray(open(filein).read()) + lz = Compressed(image) + + if fileout == None: + fileout = filein + '.lz' + to_file(fileout, lz.output) + + +def bin_to_rgb(word): + red = word & 0b11111 + word >>= 5 + green = word & 0b11111 + word >>= 5 + blue = word & 0b11111 + return (red, green, blue) + +def convert_binary_pal_to_text_by_filename(filename): + pal = bytearray(open(filename).read()) + return convert_binary_pal_to_text(pal) + +def convert_binary_pal_to_text(pal): + output = '' + words = [hi * 0x100 + lo for lo, hi in zip(pal[::2], pal[1::2])] + for word in words: + red, green, blue = ['%.2d' % c for c in bin_to_rgb(word)] + output += '\tRGB ' + ', '.join((red, green, blue)) + output += '\n' + return output + +def read_rgb_macros(lines): + colors = [] + for line in lines: + macro = line.split(" ")[0].strip() + if macro == 'RGB': + params = ' '.join(line.split(" ")[1:]).split(',') + red, green, blue = [int(v) for v in params] + colors += [[red, green, blue]] + return colors + + +def rewrite_binary_pals_to_text(filenames): + for filename in filenames: + pal_text = convert_binary_pal_to_text_by_filename(filename) + with open(filename, 'w') as out: + out.write(pal_text) + + +def flatten(planar): + """ + Flatten planar 2bpp image data into a quaternary pixel map. + """ + strips = [] + for bottom, top in split(planar, 2): + bottom = bottom + top = top + strip = [] + for i in xrange(7,-1,-1): + color = ( + (bottom >> i & 1) + + (top *2 >> i & 2) + ) + strip += [color] + strips += strip + return strips + +def to_lines(image, width): + """ + Convert a tiled quaternary pixel map to lines of quaternary pixels. + """ + tile_width = 8 + tile_height = 8 + num_columns = width / tile_width + height = len(image) / width + + lines = [] + for cur_line in xrange(height): + tile_row = cur_line / tile_height + line = [] + for column in xrange(num_columns): + anchor = ( + num_columns * tile_row * tile_width * tile_height + + column * tile_width * tile_height + + cur_line % tile_height * tile_width + ) + line += image[anchor : anchor + tile_width] + lines += [line] + return lines + + +def dmg2rgb(word): + """ + For PNGs. + """ + def shift(value): + while True: + yield value & (2**5 - 1) + value >>= 5 + word = shift(word) + # distribution is less even w/ << 3 + red, green, blue = [int(color * 8.25) for color in [word.next() for _ in xrange(3)]] + alpha = 255 + return (red, green, blue, alpha) + + +def rgb_to_dmg(color): + """ + For PNGs. + """ + word = (color['r'] / 8) + word += (color['g'] / 8) << 5 + word += (color['b'] / 8) << 10 + return word + + +def pal_to_png(filename): + """ + Interpret a .pal file as a png palette. + """ + with open(filename) as rgbs: + colors = read_rgb_macros(rgbs.readlines()) + a = 255 + palette = [] + for color in colors: + # even distribution over 000-255 + r, g, b = [int(hue * 8.25) for hue in color] + palette += [(r, g, b, a)] + white = (255,255,255,255) + black = (000,000,000,255) + if white not in palette and len(palette) < 4: + palette = [white] + palette + if black not in palette and len(palette) < 4: + palette = palette + [black] + return palette + + +def png_to_rgb(palette): + """ + Convert a png palette to rgb macros. + """ + output = '' + for color in palette: + r, g, b = [color[c] / 8 for c in 'rgb'] + output += '\tRGB ' + ', '.join(['%.2d' % hue for hue in (r, g, b)]) + output += '\n' + return output + + +def read_filename_arguments(filename): + """ + Infer graphics conversion arguments given a filename. + + Arguments are separated with '.'. + """ + parsed_arguments = {} + + int_arguments = { + 'w': 'width', + 'h': 'height', + 't': 'tile_padding', + } + arguments = os.path.splitext(filename)[0].lstrip('.').split('.')[1:] + for argument in arguments: + + # Check for integer arguments first (i.e. "w128"). + arg = argument[0] + param = argument[1:] + if param.isdigit(): + arg = int_arguments.get(arg, False) + if arg: + parsed_arguments[arg] = int(param) + + elif argument == 'arrange': + parsed_arguments['norepeat'] = True + parsed_arguments['tilemap'] = True + + # Pic dimensions (i.e. "6x6"). + elif 'x' in argument and any(map(str.isdigit, argument)): + w, h = argument.split('x') + if w.isdigit() and h.isdigit(): + parsed_arguments['pic_dimensions'] = (int(w), int(h)) + + else: + parsed_arguments[argument] = True + + return parsed_arguments + + +def export_2bpp_to_png(filein, fileout=None, pal_file=None, height=0, width=0, tile_padding=0, pic_dimensions=None, **kwargs): + + if fileout == None: + fileout = os.path.splitext(filein)[0] + '.png' + + image = open(filein, 'rb').read() + + arguments = { + 'width': width, + 'height': height, + 'pal_file': pal_file, + 'tile_padding': tile_padding, + 'pic_dimensions': pic_dimensions, + } + arguments.update(read_filename_arguments(filein)) + + if pal_file == None: + if os.path.exists(os.path.splitext(fileout)[0]+'.pal'): + arguments['pal_file'] = os.path.splitext(fileout)[0]+'.pal' + + result = convert_2bpp_to_png(image, **arguments) + width, height, palette, greyscale, bitdepth, px_map = result + + w = png.Writer( + width, + height, + palette=palette, + compression=9, + greyscale=greyscale, + bitdepth=bitdepth + ) + with open(fileout, 'wb') as f: + w.write(f, px_map) + + +def convert_2bpp_to_png(image, **kwargs): + """ + Convert a planar 2bpp graphic to png. + """ + + image = bytearray(image) + + pad_color = bytearray([0]) + + width = kwargs.get('width', 0) + height = kwargs.get('height', 0) + tile_padding = kwargs.get('tile_padding', 0) + pic_dimensions = kwargs.get('pic_dimensions', None) + pal_file = kwargs.get('pal_file', None) + interleave = kwargs.get('interleave', False) + + # Width must be specified to interleave. + if interleave and width: + image = interleave_tiles(image, width / 8) + + # Pad the image by a given number of tiles if asked. + image += pad_color * 0x10 * tile_padding + + # Some images are transposed in blocks. + if pic_dimensions: + w, h = pic_dimensions + if not width: width = w * 8 + + pic_length = w * h * 0x10 + + trailing = len(image) % pic_length + + pic = [] + for i in xrange(0, len(image) - trailing, pic_length): + pic += transpose_tiles(image[i:i+pic_length], h) + image = bytearray(pic) + image[len(image) - trailing:] + + # Pad out trailing lines. + image += pad_color * 0x10 * ((w - (len(image) / 0x10) % h) % w) + + def px_length(img): + return len(img) * 4 + def tile_length(img): + return len(img) * 4 / (8*8) + + if width and height: + tile_width = width / 8 + more_tile_padding = (tile_width - (tile_length(image) % tile_width or tile_width)) + image += pad_color * 0x10 * more_tile_padding + + elif width and not height: + tile_width = width / 8 + more_tile_padding = (tile_width - (tile_length(image) % tile_width or tile_width)) + image += pad_color * 0x10 * more_tile_padding + height = px_length(image) / width + + elif height and not width: + tile_height = height / 8 + more_tile_padding = (tile_height - (tile_length(image) % tile_height or tile_height)) + image += pad_color * 0x10 * more_tile_padding + width = px_length(image) / height + + # at least one dimension should be given + if width * height != px_length(image): + # look for possible combos of width/height that would form a rectangle + matches = [] + # Height need not be divisible by 8, but width must. + # See pokered gfx/minimize_pic.1bpp. + for w in range(8, px_length(image) / 2 + 1, 8): + h = px_length(image) / w + if w * h == px_length(image): + matches += [(w, h)] + # go for the most square image + if len(matches): + width, height = sorted(matches, key= lambda (w, h): (h % 8 != 0, w + h))[0] # favor height + else: + raise Exception, 'Image can\'t be divided into tiles (%d px)!' % (px_length(image)) + + # convert tiles to lines + lines = to_lines(flatten(image), width) + + if pal_file == None: + palette = None + greyscale = True + bitdepth = 2 + px_map = [[3 - pixel for pixel in line] for line in lines] + + else: # gbc color + palette = pal_to_png(pal_file) + greyscale = False + bitdepth = 8 + px_map = [[pixel for pixel in line] for line in lines] + + return width, height, palette, greyscale, bitdepth, px_map + + +def get_pic_animation(tmap, w, h): + """ + Generate pic animation data from a combined tilemap of each frame. + """ + frame_text = '' + bitmask_text = '' + + frames = list(split(tmap, w * h)) + base = frames.pop(0) + bitmasks = [] + + for i in xrange(len(frames)): + frame_text += '\tdw .frame{}\n'.format(i + 1) + + for i, frame in enumerate(frames): + bitmask = map(operator.ne, frame, base) + if bitmask not in bitmasks: + bitmasks.append(bitmask) + which_bitmask = bitmasks.index(bitmask) + + mask = iter(bitmask) + masked_frame = filter(lambda _: mask.next(), frame) + + frame_text += '.frame{}\n'.format(i + 1) + frame_text += '\tdb ${:02x} ; bitmask\n'.format(which_bitmask) + if masked_frame: + frame_text += '\tdb {}\n'.format(', '.join( + map('${:02x}'.format, masked_frame) + )) + + for i, bitmask in enumerate(bitmasks): + bitmask_text += '; {}\n'.format(i) + for byte in split(bitmask, 8): + byte = int(''.join(map(int.__repr__, reversed(byte))), 2) + bitmask_text += '\tdb %{:08b}\n'.format(byte) + + return frame_text, bitmask_text + + +def export_png_to_2bpp(filein, fileout=None, palout=None, **kwargs): + + arguments = { + 'tile_padding': 0, + 'pic_dimensions': None, + 'animate': False, + 'stupid_bitmask_hack': [], + } + arguments.update(kwargs) + arguments.update(read_filename_arguments(filein)) + + image, arguments = png_to_2bpp(filein, **arguments) + + if fileout == None: + fileout = os.path.splitext(filein)[0] + '.2bpp' + to_file(fileout, image) + + tmap = arguments.get('tmap') + + if tmap != None and arguments['animate'] and arguments['pic_dimensions']: + # Generate pic animation data. + frame_text, bitmask_text = get_pic_animation(tmap, *arguments['pic_dimensions']) + + frames_path = os.path.join(os.path.split(fileout)[0], 'frames.asm') + with open(frames_path, 'w') as out: + out.write(frame_text) + + bitmask_path = os.path.join(os.path.split(fileout)[0], 'bitmask.asm') + + # The following Pokemon have a bitmask dummied out. + for exception in arguments['stupid_bitmask_hack']: + if exception in bitmask_path: + bitmasks = bitmask_text.split(';') + bitmasks[-1] = bitmasks[-1].replace('1', '0') + bitmask_text = ';'.join(bitmasks) + + with open(bitmask_path, 'w') as out: + out.write(bitmask_text) + + elif tmap != None and arguments.get('tilemap', False): + tilemap_path = os.path.splitext(fileout)[0] + '.tilemap' + to_file(tilemap_path, tmap) + + palette = arguments.get('palette') + if palout == None: + palout = os.path.splitext(fileout)[0] + '.pal' + export_palette(palette, palout) + + +def get_image_padding(width, height, wstep=8, hstep=8): + + padding = { + 'left': 0, + 'right': 0, + 'top': 0, + 'bottom': 0, + } + + if width % wstep and width >= wstep: + pad = float(width % wstep) / 2 + padding['left'] = int(ceil(pad)) + padding['right'] = int(floor(pad)) + + if height % hstep and height >= hstep: + pad = float(height % hstep) / 2 + padding['top'] = int(ceil(pad)) + padding['bottom'] = int(floor(pad)) + + return padding + + +def png_to_2bpp(filein, **kwargs): + """ + Convert a png image to planar 2bpp. + """ + + arguments = { + 'tile_padding': 0, + 'pic_dimensions': False, + 'interleave': False, + 'norepeat': False, + 'tilemap': False, + } + arguments.update(kwargs) + + if type(filein) is str: + filein = open(filein) + + assert type(filein) is file + + width, height, rgba, info = png.Reader(filein).asRGBA8() + + # png.Reader returns flat pixel data. Nested is easier to work with + len_px = len('rgba') + image = [] + palette = [] + for line in rgba: + newline = [] + for px in xrange(0, len(line), len_px): + color = dict(zip('rgba', line[px:px+len_px])) + if color not in palette: + if len(palette) < 4: + palette += [color] + else: + # TODO Find the nearest match + print 'WARNING: %s: Color %s truncated to' % (filein, color), + color = sorted(palette, key=lambda x: sum(x.values()))[0] + print color + newline += [color] + image += [newline] + + assert len(palette) <= 4, '%s: palette should be 4 colors, is really %d (%s)' % (filein, len(palette), palette) + + # Pad out smaller palettes with greyscale colors + greyscale = { + 'black': { 'r': 0x00, 'g': 0x00, 'b': 0x00, 'a': 0xff }, + 'grey': { 'r': 0x55, 'g': 0x55, 'b': 0x55, 'a': 0xff }, + 'gray': { 'r': 0xaa, 'g': 0xaa, 'b': 0xaa, 'a': 0xff }, + 'white': { 'r': 0xff, 'g': 0xff, 'b': 0xff, 'a': 0xff }, + } + preference = 'white', 'black', 'grey', 'gray' + for hue in map(greyscale.get, preference): + if len(palette) >= 4: + break + if hue not in palette: + palette += [hue] + + palette.sort(key=lambda x: sum(x.values())) + + # Game Boy palette order + palette.reverse() + + # Map pixels to quaternary color ids + padding = get_image_padding(width, height) + width += padding['left'] + padding['right'] + height += padding['top'] + padding['bottom'] + pad = bytearray([0]) + + qmap = [] + qmap += pad * width * padding['top'] + for line in image: + qmap += pad * padding['left'] + for color in line: + qmap += [palette.index(color)] + qmap += pad * padding['right'] + qmap += pad * width * padding['bottom'] + + # Graphics are stored in tiles instead of lines + tile_width = 8 + tile_height = 8 + num_columns = max(width, tile_width) / tile_width + num_rows = max(height, tile_height) / tile_height + image = [] + + for row in xrange(num_rows): + for column in xrange(num_columns): + + # Split it up into strips to convert to planar data + for strip in xrange(min(tile_height, height)): + anchor = ( + row * num_columns * tile_width * tile_height + + column * tile_width + + strip * width + ) + line = qmap[anchor : anchor + tile_width] + bottom, top = 0, 0 + for bit, quad in enumerate(line): + bottom += (quad & 1) << (7 - bit) + top += (quad /2 & 1) << (7 - bit) + image += [bottom, top] + + dim = arguments['pic_dimensions'] + if dim: + if type(dim) in (tuple, list): + w, h = dim + else: + # infer dimensions based on width. + w = width / tile_width + h = height / tile_height + if h % w == 0: + h = w + + tiles = get_tiles(image) + pic_length = w * h + tile_width = width / 8 + trailing = len(tiles) % pic_length + new_image = [] + for block in xrange(len(tiles) / pic_length): + offset = (h * tile_width) * ((block * w) / tile_width) + ((block * w) % tile_width) + pic = [] + for row in xrange(h): + index = offset + (row * tile_width) + pic += tiles[index:index + w] + new_image += transpose(pic, w) + new_image += tiles[len(tiles) - trailing:] + image = connect(new_image) + + # Remove any tile padding used to make the png rectangular. + image = image[:len(image) - arguments['tile_padding'] * 0x10] + + tmap = None + + if arguments['interleave']: + image = deinterleave_tiles(image, num_columns) + + if arguments['pic_dimensions']: + image, tmap = condense_image_to_map(image, w * h) + elif arguments['norepeat']: + image, tmap = condense_image_to_map(image) + if not arguments['tilemap']: + tmap = None + + arguments.update({ 'palette': palette, 'tmap': tmap, }) + + return image, arguments + + +def export_palette(palette, filename): + """ + Export a palette from png to rgb macros in a .pal file. + """ + + if os.path.exists(filename): + + # Pic palettes are 2 colors (black/white are added later). + with open(filename) as rgbs: + colors = read_rgb_macros(rgbs.readlines()) + + if len(colors) == 2: + palette = palette[1:3] + + text = png_to_rgb(palette) + with open(filename, 'w') as out: + out.write(text) + + +def png_to_lz(filein): + + name = os.path.splitext(filein)[0] + + export_png_to_2bpp(filein) + image = open(name+'.2bpp', 'rb').read() + to_file(name+'.2bpp'+'.lz', Compressed(image).output) + + +def convert_2bpp_to_1bpp(data): + """ + Convert planar 2bpp image data to 1bpp. Assume images are two colors. + """ + return data[::2] + +def convert_1bpp_to_2bpp(data): + """ + Convert 1bpp image data to planar 2bpp (black/white). + """ + output = [] + for i in data: + output += [i, i] + return output + + +def export_2bpp_to_1bpp(filename): + name, extension = os.path.splitext(filename) + image = open(filename, 'rb').read() + image = convert_2bpp_to_1bpp(image) + to_file(name + '.1bpp', image) + +def export_1bpp_to_2bpp(filename): + name, extension = os.path.splitext(filename) + image = open(filename, 'rb').read() + image = convert_1bpp_to_2bpp(image) + to_file(name + '.2bpp', image) + + +def export_1bpp_to_png(filename, fileout=None): + + if fileout == None: + fileout = os.path.splitext(filename)[0] + '.png' + + arguments = read_filename_arguments(filename) + + image = open(filename, 'rb').read() + image = convert_1bpp_to_2bpp(image) + + result = convert_2bpp_to_png(image, **arguments) + width, height, palette, greyscale, bitdepth, px_map = result + + w = png.Writer(width, height, palette=palette, compression=9, greyscale=greyscale, bitdepth=bitdepth) + with open(fileout, 'wb') as f: + w.write(f, px_map) + + +def export_png_to_1bpp(filename, fileout=None): + + if fileout == None: + fileout = os.path.splitext(filename)[0] + '.1bpp' + + arguments = read_filename_arguments(filename) + image = png_to_1bpp(filename, **arguments) + + to_file(fileout, image) + +def png_to_1bpp(filename, **kwargs): + image, kwargs = png_to_2bpp(filename, **kwargs) + return convert_2bpp_to_1bpp(image) + + +def convert_to_2bpp(filenames=[]): + for filename in filenames: + filename, name, extension = try_decompress(filename) + if extension == '.1bpp': + export_1bpp_to_2bpp(filename) + elif extension == '.2bpp': + pass + elif extension == '.png': + export_png_to_2bpp(filename) + else: + raise Exception, "Don't know how to convert {} to 2bpp!".format(filename) + +def convert_to_1bpp(filenames=[]): + for filename in filenames: + filename, name, extension = try_decompress(filename) + if extension == '.1bpp': + pass + elif extension == '.2bpp': + export_2bpp_to_1bpp(filename) + elif extension == '.png': + export_png_to_1bpp(filename) + else: + raise Exception, "Don't know how to convert {} to 1bpp!".format(filename) + +def convert_to_png(filenames=[]): + for filename in filenames: + filename, name, extension = try_decompress(filename) + if extension == '.1bpp': + export_1bpp_to_png(filename) + elif extension == '.2bpp': + export_2bpp_to_png(filename) + elif extension == '.png': + pass + else: + raise Exception, "Don't know how to convert {} to png!".format(filename) + +def compress(filenames=[]): + for filename in filenames: + data = open(filename, 'rb').read() + lz_data = Compressed(data).output + to_file(filename + '.lz', lz_data) + +def decompress(filenames=[]): + for filename in filenames: + name, extension = os.path.splitext(filename) + lz_data = open(filename, 'rb').read() + data = Decompressed(lz_data).output + to_file(name, data) + +def try_decompress(filename): + """ + Try to decompress a graphic when determining the filetype. + This skips the manual unlz step when attempting + to convert lz-compressed graphics to png. + """ + name, extension = os.path.splitext(filename) + if extension == '.lz': + decompress([filename]) + filename = name + name, extension = os.path.splitext(filename) + return filename, name, extension + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument('mode') + ap.add_argument('filenames', nargs='*') + args = ap.parse_args() + + method = { + '2bpp': convert_to_2bpp, + '1bpp': convert_to_1bpp, + 'png': convert_to_png, + 'lz': compress, + 'unlz': decompress, + }.get(args.mode, None) + + if method == None: + raise Exception, "Unknown conversion method!" + + method(args.filenames) + +if __name__ == "__main__": + main() diff --git a/tools/pokemontools/lz.py b/tools/pokemontools/lz.py new file mode 100644 index 00000000..aef5c641 --- /dev/null +++ b/tools/pokemontools/lz.py @@ -0,0 +1,580 @@ +# -*- coding: utf-8 -*- +""" +Pokemon Crystal data de/compression. +""" + +""" +A rundown of Pokemon Crystal's compression scheme: + +Control commands occupy bits 5-7. +Bits 0-4 serve as the first parameter <n> for each command. +""" +lz_commands = { + 'literal': 0, # n values for n bytes + 'iterate': 1, # one value for n bytes + 'alternate': 2, # alternate two values for n bytes + 'blank': 3, # zero for n bytes +} + +""" +Repeater commands repeat any data that was just decompressed. +They take an additional signed parameter <s> to mark a relative starting point. +These wrap around (positive from the start, negative from the current position). +""" +lz_commands.update({ + 'repeat': 4, # n bytes starting from s + 'flip': 5, # n bytes in reverse bit order starting from s + 'reverse': 6, # n bytes backwards starting from s +}) + +""" +The long command is used when 5 bits aren't enough. Bits 2-4 contain a new control code. +Bits 0-1 are appended to a new byte as 8-9, allowing a 10-bit parameter. +""" +lz_commands.update({ + 'long': 7, # n is now 10 bits for a new control code +}) +max_length = 1 << 10 # can't go higher than 10 bits +lowmax = 1 << 5 # standard 5-bit param + +""" +If 0xff is encountered instead of a command, decompression ends. +""" +lz_end = 0xff + + +bit_flipped = [ + sum(((byte >> i) & 1) << (7 - i) for i in xrange(8)) + for byte in xrange(0x100) +] + + +class Compressed: + + """ + Usage: + lz = Compressed(data).output + or + lz = Compressed().compress(data) + or + c = Compressed() + c.data = data + lz = c.compress() + + There are some issues with reproducing the target compressor. + Some notes are listed here: + - the criteria for detecting a lookback is inconsistent + - sometimes lookbacks that are mostly 0s are pruned, sometimes not + - target appears to skip ahead if it can use a lookback soon, stopping the current command short or in some cases truncating it with literals. + - this has been implemented, but the specifics are unknown + - self.min_scores: It's unknown if blank's minimum score should be 1 or 2. Most likely it's 1, with some other hack to account for edge cases. + - may be related to the above + - target does not appear to compress backwards + """ + + def __init__(self, *args, **kwargs): + + self.min_scores = { + 'blank': 1, + 'iterate': 2, + 'alternate': 3, + 'repeat': 3, + 'reverse': 3, + 'flip': 3, + } + + self.preference = [ + 'repeat', + 'blank', + 'flip', + 'reverse', + 'iterate', + 'alternate', + #'literal', + ] + + self.lookback_methods = 'repeat', 'reverse', 'flip' + + self.__dict__.update({ + 'data': None, + 'commands': lz_commands, + 'debug': False, + 'literal_only': False, + }) + + self.arg_names = 'data', 'commands', 'debug', 'literal_only' + + self.__dict__.update(kwargs) + self.__dict__.update(dict(zip(self.arg_names, args))) + + if self.data is not None: + self.compress() + + def compress(self, data=None): + if data is not None: + self.data = data + + self.data = list(bytearray(self.data)) + + self.indexes = {} + self.lookbacks = {} + for method in self.lookback_methods: + self.lookbacks[method] = {} + + self.address = 0 + self.end = len(self.data) + self.output = [] + self.literal = None + + while self.address < self.end: + + if self.score(): + self.do_literal() + self.do_winner() + + else: + if self.literal == None: + self.literal = self.address + self.address += 1 + + self.do_literal() + + self.output += [lz_end] + return self.output + + def reset_scores(self): + self.scores = {} + self.offsets = {} + self.helpers = {} + for method in self.min_scores.iterkeys(): + self.scores[method] = 0 + + def bit_flip(self, byte): + return bit_flipped[byte] + + def do_literal(self): + if self.literal != None: + length = abs(self.address - self.literal) + start = min(self.literal, self.address + 1) + self.helpers['literal'] = self.data[start:start+length] + self.do_cmd('literal', length) + self.literal = None + + def score(self): + self.reset_scores() + + map(self.score_literal, ['iterate', 'alternate', 'blank']) + + for method in self.lookback_methods: + self.scores[method], self.offsets[method] = self.find_lookback(method, self.address) + + self.stop_short() + + return any( + score + > self.min_scores[method] + int(score > lowmax) + for method, score in self.scores.iteritems() + ) + + def stop_short(self): + """ + If a lookback is close, reduce the scores of other commands. + """ + best_method, best_score = max( + self.scores.items(), + key = lambda x: ( + x[1], + -self.preference.index(x[0]) + ) + ) + for method in self.lookback_methods: + min_score = self.min_scores[method] + for address in xrange(self.address+1, self.address+best_score): + length, index = self.find_lookback(method, address) + if length > max(min_score, best_score): + # BUG: lookbacks can reduce themselves. This appears to be a bug in the target also. + for m, score in self.scores.items(): + self.scores[m] = min(score, address - self.address) + + + def read(self, address=None): + if address is None: + address = self.address + if 0 <= address < len(self.data): + return self.data[address] + return None + + def find_all_lookbacks(self): + for method in self.lookback_methods: + for address, byte in enumerate(self.data): + self.find_lookback(method, address) + + def find_lookback(self, method, address=None): + """Temporarily stubbed, because the real function doesn't run in polynomial time.""" + return 0, None + + def broken_find_lookback(self, method, address=None): + if address is None: + address = self.address + + existing = self.lookbacks.get(method, {}).get(address) + if existing != None: + return existing + + lookback = 0, None + + # Better to not carelessly optimize at the moment. + """ + if address < 2: + return lookback + """ + + byte = self.read(address) + if byte is None: + return lookback + + direction, mutate = { + 'repeat': ( 1, int), + 'reverse': (-1, int), + 'flip': ( 1, self.bit_flip), + }[method] + + # Doesn't seem to help + """ + if mutate == self.bit_flip: + if byte == 0: + self.lookbacks[method][address] = lookback + return lookback + """ + + data_len = len(self.data) + is_two_byte_index = lambda index: int(index < address - 0x7f) + + for index in self.get_indexes(mutate(byte)): + + if index >= address: + break + + old_length, old_index = lookback + if direction == 1: + if old_length > data_len - index: break + else: + if old_length > index: continue + + if self.read(index) in [None]: continue + + length = 1 # we know there's at least one match, or we wouldn't be checking this index + while 1: + this_byte = self.read(address + length) + that_byte = self.read(index + length * direction) + if that_byte == None or this_byte != mutate(that_byte): + break + length += 1 + + score = length - is_two_byte_index(index) + old_score = old_length - is_two_byte_index(old_index) + if score >= old_score or (score == old_score and length > old_length): + # XXX maybe avoid two-byte indexes when possible + if score >= lookback[0] - is_two_byte_index(lookback[1]): + lookback = length, index + + self.lookbacks[method][address] = lookback + return lookback + + def get_indexes(self, byte): + if not self.indexes.has_key(byte): + self.indexes[byte] = [] + index = -1 + while 1: + try: + index = self.data.index(byte, index + 1) + except ValueError: + break + self.indexes[byte].append(index) + return self.indexes[byte] + + def score_literal(self, method): + address = self.address + + compare = { + 'blank': [0], + 'iterate': [self.read(address)], + 'alternate': [self.read(address), self.read(address + 1)], + }[method] + + # XXX may or may not be correct + if method == 'alternate' and compare[0] == 0: + return + + length = 0 + while self.read(address + length) == compare[length % len(compare)]: + length += 1 + + self.scores[method] = length + self.helpers[method] = compare + + def do_winner(self): + winners = filter( + lambda (method, score): + score + > self.min_scores[method] + int(score > lowmax), + self.scores.iteritems() + ) + winners.sort( + key = lambda (method, score): ( + -(score - self.min_scores[method] - int(score > lowmax)), + self.preference.index(method) + ) + ) + winner, score = winners[0] + + length = min(score, max_length) + self.do_cmd(winner, length) + self.address += length + + def do_cmd(self, cmd, length): + start_address = self.address + + cmd_length = length - 1 + + output = [] + + if length > lowmax: + output.append( + (self.commands['long'] << 5) + + (self.commands[cmd] << 2) + + (cmd_length >> 8) + ) + output.append( + cmd_length & 0xff + ) + else: + output.append( + (self.commands[cmd] << 5) + + cmd_length + ) + + self.helpers['blank'] = [] # quick hack + output += self.helpers.get(cmd, []) + + if cmd in self.lookback_methods: + offset = self.offsets[cmd] + # Negative offsets are one byte. + # Positive offsets are two. + if 0 < start_address - offset - 1 <= 0x7f: + offset = (start_address - offset - 1) | 0x80 + output += [offset] + else: + output += [offset / 0x100, offset % 0x100] # big endian + + if self.debug: + print ' '.join(map(str, [ + cmd, length, '\t', + ' '.join(map('{:02x}'.format, output)), + self.data[start_address:start_address+length] if cmd in self.lookback_methods else '', + ])) + + self.output += output + + + +class Decompressed: + """ + Interpret and decompress lz-compressed data, usually 2bpp. + """ + + """ + Usage: + data = Decompressed(lz).output + or + data = Decompressed().decompress(lz) + or + d = Decompressed() + d.lz = lz + data = d.decompress() + + To decompress from offset 0x80000 in a rom: + data = Decompressed(rom, start=0x80000).output + """ + + lz = None + start = 0 + commands = lz_commands + debug = False + + arg_names = 'lz', 'start', 'commands', 'debug' + + def __init__(self, *args, **kwargs): + self.__dict__.update(dict(zip(self.arg_names, args))) + self.__dict__.update(kwargs) + + self.command_names = dict(map(reversed, self.commands.items())) + self.address = self.start + + if self.lz is not None: + self.decompress() + + if self.debug: print self.command_list() + + + def command_list(self): + """ + Print a list of commands that were used. Useful for debugging. + """ + + text = '' + + output_address = 0 + for name, attrs in self.used_commands: + length = attrs['length'] + address = attrs['address'] + offset = attrs['offset'] + direction = attrs['direction'] + + text += '{2:03x} {0}: {1}'.format(name, length, output_address) + text += '\t' + ' '.join( + '{:02x}'.format(int(byte)) + for byte in self.lz[ address : address + attrs['cmd_length'] ] + ) + + if offset is not None: + repeated_data = self.output[ offset : offset + length * direction : direction ] + if name == 'flip': + repeated_data = map(bit_flipped.__getitem__, repeated_data) + text += ' [' + ' '.join(map('{:02x}'.format, repeated_data)) + ']' + + text += '\n' + output_address += length + + return text + + + def decompress(self, lz=None): + + if lz is not None: + self.lz = lz + + self.lz = bytearray(self.lz) + + self.used_commands = [] + self.output = [] + + while 1: + + cmd_address = self.address + self.offset = None + self.direction = None + + if (self.byte == lz_end): + self.next() + break + + self.cmd = (self.byte & 0b11100000) >> 5 + + if self.cmd_name == 'long': + # 10-bit length + self.cmd = (self.byte & 0b00011100) >> 2 + self.length = (self.next() & 0b00000011) * 0x100 + self.length += self.next() + 1 + else: + # 5-bit length + self.length = (self.next() & 0b00011111) + 1 + + self.__class__.__dict__[self.cmd_name](self) + + self.used_commands += [( + self.cmd_name, + { + 'length': self.length, + 'address': cmd_address, + 'offset': self.offset, + 'cmd_length': self.address - cmd_address, + 'direction': self.direction, + } + )] + + # Keep track of the data we just decompressed. + self.compressed_data = self.lz[self.start : self.address] + + + @property + def byte(self): + return self.lz[ self.address ] + + def next(self): + byte = self.byte + self.address += 1 + return byte + + @property + def cmd_name(self): + return self.command_names.get(self.cmd) + + + def get_offset(self): + + if self.byte >= 0x80: # negative + # negative + offset = self.next() & 0x7f + offset = len(self.output) - offset - 1 + else: + # positive + offset = self.next() * 0x100 + offset += self.next() + + self.offset = offset + + + def literal(self): + """ + Copy data directly. + """ + self.output += self.lz[ self.address : self.address + self.length ] + self.address += self.length + + def iterate(self): + """ + Write one byte repeatedly. + """ + self.output += [self.next()] * self.length + + def alternate(self): + """ + Write alternating bytes. + """ + alts = [self.next(), self.next()] + self.output += [ alts[x & 1] for x in xrange(self.length) ] + + def blank(self): + """ + Write zeros. + """ + self.output += [0] * self.length + + def flip(self): + """ + Repeat flipped bytes from output. + + Example: 11100100 -> 00100111 + """ + self._repeat(table=bit_flipped) + + def reverse(self): + """ + Repeat reversed bytes from output. + """ + self._repeat(direction=-1) + + def repeat(self): + """ + Repeat bytes from output. + """ + self._repeat() + + def _repeat(self, direction=1, table=None): + self.get_offset() + self.direction = direction + # Note: appends must be one at a time (this way, repeats can draw from themselves if required) + for i in xrange(self.length): + byte = self.output[ self.offset + i * direction ] + self.output.append( table[byte] if table else byte ) diff --git a/tools/pokemontools/pcm.py b/tools/pokemontools/pcm.py new file mode 100644 index 00000000..428d5730 --- /dev/null +++ b/tools/pokemontools/pcm.py @@ -0,0 +1,156 @@ +# pcm.py +# Converts between .wav files and 1-bit pcm data. (pcm = pulse-code modulation) + +import argparse +import os +import struct +import wave + + +BASE_SAMPLE_RATE = 22050 + +def convert_to_wav(filenames=[]): + """ + Converts a file containing 1-bit pcm data into a .wav file. + """ + for filename in filenames: + with open(filename, 'rb') as pcm_file: + # Generate array of on/off pcm values. + samples = [] + byte = pcm_file.read(1) + while byte != "": + byte = struct.unpack('B', byte)[0] + for i in range(8): + bit_index = 7 - i + value = (byte >> bit_index) & 1 + samples.append(value) + byte = pcm_file.read(1) + + # Write a .wav file using the pcm data. + name, extension = os.path.splitext(filename) + wav_filename = name + '.wav' + wave_file = wave.open(wav_filename, 'w') + wave_file.setframerate(BASE_SAMPLE_RATE) + wave_file.setnchannels(1) + wave_file.setsampwidth(1) + + for value in samples: + if value > 0: + value = 0xff + + packed_value = struct.pack('B', value) + wave_file.writeframesraw(packed_value) + + wave_file.close() + + +def convert_to_pcm(filenames=[]): + """ + Converts a .wav file into 1-bit pcm data. + Samples in the .wav file are simply clamped to on/off. + + This currently works correctly on .wav files with the following attributes: + 1. Sample Width = 1 or 2 bytes (Some wave files use 3 bytes per sample...) + 2. Arbitrary sample sample_rate + 3. Mono or Stereo (1 or 2 channels) + """ + for filename in filenames: + samples, average_sample = get_wav_samples(filename) + + # Generate a list of clamped samples + clamped_samples = [] + for sample in samples: + # Clamp the raw sample to on/off + if sample < average_sample: + clamped_samples.append(0) + else: + clamped_samples.append(1) + + # The pcm data must be a multiple of 8, so pad the clamped samples with 0. + while len(clamped_samples) % 8 != 0: + clamped_samples.append(0) + + # Pack the 1-bit samples together. + packed_samples = bytearray() + for i in range(0, len(clamped_samples), 8): + # Read 8 pcm values to pack one byte. + packed_value = 0 + for j in range(8): + packed_value <<= 1 + packed_value += clamped_samples[i + j] + packed_samples.append(packed_value) + + # Open the output .pcm file, and write all 1-bit samples. + name, extension = os.path.splitext(filename) + pcm_filename = name + '.pcm' + with open(pcm_filename, 'wb') as out_file: + out_file.write(packed_samples) + + +def get_wav_samples(filename): + """ + Reads the given .wav file and returns a list of its samples after re-sampling + to BASE_SAMPLE_RATE. + Also returns the average sample amplitude. + """ + wav_file = wave.open(filename, 'r') + sample_width = wav_file.getsampwidth() + sample_count = wav_file.getnframes() + sample_rate = wav_file.getframerate() + num_channels = wav_file.getnchannels() + + samples = bytearray(wav_file.readframes(sample_count)) + + # Unpack the values based on the sample byte width. + unpacked_samples = [] + for i in range(0, len(samples), sample_width): + if sample_width == 1: + fmt = 'B' + elif sample_width == 2: + fmt = 'h' + else: + # todo: support 3-byte sample width + raise (Exception, "Unsupported sample width: " + str(sample_width)) + + value = struct.unpack(fmt, samples[i:i + sample_width])[0] + unpacked_samples.append(value) + + # Only keep the samples from the first audio channel. + unpacked_samples = unpacked_samples[::num_channels] + + # Approximate the BASE_SAMPLE_RATE. + # Also find the average amplitude of the samples. + resampled_samples = [] + total_value = 0 + interval = float(sample_rate) / BASE_SAMPLE_RATE + index = 0 + while index < sample_count: + sample = unpacked_samples[int(index)] + total_value += sample + + resampled_samples.append(sample) + index += interval + + average_sample = float(total_value) / len(resampled_samples) + + return resampled_samples, average_sample + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument('mode') + ap.add_argument('filenames', nargs='*') + args = ap.parse_args() + + method = { + 'wav': convert_to_wav, + 'pcm': convert_to_pcm, + }.get(args.mode, None) + + if method == None: + raise (Exception, "Unknown conversion method!") + + method(args.filenames) + +if __name__ == "__main__": + main() diff --git a/tools/pokemontools/png.py b/tools/pokemontools/png.py new file mode 100644 index 00000000..db6da128 --- /dev/null +++ b/tools/pokemontools/png.py @@ -0,0 +1,2650 @@ +#!/usr/bin/env python + +from __future__ import print_function + +# png.py - PNG encoder/decoder in pure Python +# +# Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org> +# Portions Copyright (C) 2009 David Jones <drj@pobox.com> +# And probably portions Copyright (C) 2006 Nicko van Someren <nicko@nicko.org> +# +# Original concept by Johann C. Rocholl. +# +# LICENCE (MIT) +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" +Pure Python PNG Reader/Writer + +This Python module implements support for PNG images (see PNG +specification at http://www.w3.org/TR/2003/REC-PNG-20031110/ ). It reads +and writes PNG files with all allowable bit depths +(1/2/4/8/16/24/32/48/64 bits per pixel) and colour combinations: +greyscale (1/2/4/8/16 bit); RGB, RGBA, LA (greyscale with alpha) with +8/16 bits per channel; colour mapped images (1/2/4/8 bit). +Adam7 interlacing is supported for reading and +writing. A number of optional chunks can be specified (when writing) +and understood (when reading): ``tRNS``, ``bKGD``, ``gAMA``. + +For help, type ``import png; help(png)`` in your python interpreter. + +A good place to start is the :class:`Reader` and :class:`Writer` +classes. + +Requires Python 2.3. Limited support is available for Python 2.2, but +not everything works. Best with Python 2.4 and higher. Installation is +trivial, but see the ``README.txt`` file (with the source distribution) +for details. + +This file can also be used as a command-line utility to convert +`Netpbm <http://netpbm.sourceforge.net/>`_ PNM files to PNG, and the +reverse conversion from PNG to PNM. The interface is similar to that +of the ``pnmtopng`` program from Netpbm. Type ``python png.py --help`` +at the shell prompt for usage and a list of options. + +A note on spelling and terminology +---------------------------------- + +Generally British English spelling is used in the documentation. So +that's "greyscale" and "colour". This not only matches the author's +native language, it's also used by the PNG specification. + +The major colour models supported by PNG (and hence by PyPNG) are: +greyscale, RGB, greyscale--alpha, RGB--alpha. These are sometimes +referred to using the abbreviations: L, RGB, LA, RGBA. In this case +each letter abbreviates a single channel: *L* is for Luminance or Luma +or Lightness which is the channel used in greyscale images; *R*, *G*, +*B* stand for Red, Green, Blue, the components of a colour image; *A* +stands for Alpha, the opacity channel (used for transparency effects, +but higher values are more opaque, so it makes sense to call it +opacity). + +A note on formats +----------------- + +When getting pixel data out of this module (reading) and presenting +data to this module (writing) there are a number of ways the data could +be represented as a Python value. Generally this module uses one of +three formats called "flat row flat pixel", "boxed row flat pixel", and +"boxed row boxed pixel". Basically the concern is whether each pixel +and each row comes in its own little tuple (box), or not. + +Consider an image that is 3 pixels wide by 2 pixels high, and each pixel +has RGB components: + +Boxed row flat pixel:: + + list([R,G,B, R,G,B, R,G,B], + [R,G,B, R,G,B, R,G,B]) + +Each row appears as its own list, but the pixels are flattened so +that three values for one pixel simply follow the three values for +the previous pixel. This is the most common format used, because it +provides a good compromise between space and convenience. PyPNG regards +itself as at liberty to replace any sequence type with any sufficiently +compatible other sequence type; in practice each row is an array (from +the array module), and the outer list is sometimes an iterator rather +than an explicit list (so that streaming is possible). + +Flat row flat pixel:: + + [R,G,B, R,G,B, R,G,B, + R,G,B, R,G,B, R,G,B] + +The entire image is one single giant sequence of colour values. +Generally an array will be used (to save space), not a list. + +Boxed row boxed pixel:: + + list([ (R,G,B), (R,G,B), (R,G,B) ], + [ (R,G,B), (R,G,B), (R,G,B) ]) + +Each row appears in its own list, but each pixel also appears in its own +tuple. A serious memory burn in Python. + +In all cases the top row comes first, and for each row the pixels are +ordered from left-to-right. Within a pixel the values appear in the +order, R-G-B-A (or L-A for greyscale--alpha). + +There is a fourth format, mentioned because it is used internally, +is close to what lies inside a PNG file itself, and has some support +from the public API. This format is called packed. When packed, +each row is a sequence of bytes (integers from 0 to 255), just as +it is before PNG scanline filtering is applied. When the bit depth +is 8 this is essentially the same as boxed row flat pixel; when the +bit depth is less than 8, several pixels are packed into each byte; +when the bit depth is 16 (the only value more than 8 that is supported +by the PNG image format) each pixel value is decomposed into 2 bytes +(and `packed` is a misnomer). This format is used by the +:meth:`Writer.write_packed` method. It isn't usually a convenient +format, but may be just right if the source data for the PNG image +comes from something that uses a similar format (for example, 1-bit +BMPs, or another PNG file). + +And now, my famous members +-------------------------- +""" + +__version__ = "0.0.18" + +import itertools +import math +# http://www.python.org/doc/2.4.4/lib/module-operator.html +import operator +import struct +import sys +# http://www.python.org/doc/2.4.4/lib/module-warnings.html +import warnings +import zlib + +from array import array +from functools import reduce + +try: + # `cpngfilters` is a Cython module: it must be compiled by + # Cython for this import to work. + # If this import does work, then it overrides pure-python + # filtering functions defined later in this file (see `class + # pngfilters`). + import cpngfilters as pngfilters +except ImportError: + pass + + +__all__ = ['Image', 'Reader', 'Writer', 'write_chunks', 'from_array'] + + +# The PNG signature. +# http://www.w3.org/TR/PNG/#5PNG-file-signature +_signature = struct.pack('8B', 137, 80, 78, 71, 13, 10, 26, 10) + +_adam7 = ((0, 0, 8, 8), + (4, 0, 8, 8), + (0, 4, 4, 8), + (2, 0, 4, 4), + (0, 2, 2, 4), + (1, 0, 2, 2), + (0, 1, 1, 2)) + +def group(s, n): + # See http://www.python.org/doc/2.6/library/functions.html#zip + return list(zip(*[iter(s)]*n)) + +def isarray(x): + return isinstance(x, array) + +def tostring(row): + return row.tostring() + +def interleave_planes(ipixels, apixels, ipsize, apsize): + """ + Interleave (colour) planes, e.g. RGB + A = RGBA. + + Return an array of pixels consisting of the `ipsize` elements of + data from each pixel in `ipixels` followed by the `apsize` elements + of data from each pixel in `apixels`. Conventionally `ipixels` + and `apixels` are byte arrays so the sizes are bytes, but it + actually works with any arrays of the same type. The returned + array is the same type as the input arrays which should be the + same type as each other. + """ + + itotal = len(ipixels) + atotal = len(apixels) + newtotal = itotal + atotal + newpsize = ipsize + apsize + # Set up the output buffer + # See http://www.python.org/doc/2.4.4/lib/module-array.html#l2h-1356 + out = array(ipixels.typecode) + # It's annoying that there is no cheap way to set the array size :-( + out.extend(ipixels) + out.extend(apixels) + # Interleave in the pixel data + for i in range(ipsize): + out[i:newtotal:newpsize] = ipixels[i:itotal:ipsize] + for i in range(apsize): + out[i+ipsize:newtotal:newpsize] = apixels[i:atotal:apsize] + return out + +def check_palette(palette): + """Check a palette argument (to the :class:`Writer` class) + for validity. Returns the palette as a list if okay; raises an + exception otherwise. + """ + + # None is the default and is allowed. + if palette is None: + return None + + p = list(palette) + if not (0 < len(p) <= 256): + raise ValueError("a palette must have between 1 and 256 entries") + seen_triple = False + for i,t in enumerate(p): + if len(t) not in (3,4): + raise ValueError( + "palette entry %d: entries must be 3- or 4-tuples." % i) + if len(t) == 3: + seen_triple = True + if seen_triple and len(t) == 4: + raise ValueError( + "palette entry %d: all 4-tuples must precede all 3-tuples" % i) + for x in t: + if int(x) != x or not(0 <= x <= 255): + raise ValueError( + "palette entry %d: values must be integer: 0 <= x <= 255" % i) + return p + +def check_sizes(size, width, height): + """Check that these arguments, in supplied, are consistent. + Return a (width, height) pair. + """ + + if not size: + return width, height + + if len(size) != 2: + raise ValueError( + "size argument should be a pair (width, height)") + if width is not None and width != size[0]: + raise ValueError( + "size[0] (%r) and width (%r) should match when both are used." + % (size[0], width)) + if height is not None and height != size[1]: + raise ValueError( + "size[1] (%r) and height (%r) should match when both are used." + % (size[1], height)) + return size + +def check_color(c, greyscale, which): + """Checks that a colour argument for transparent or + background options is the right form. Returns the colour + (which, if it's a bar integer, is "corrected" to a 1-tuple). + """ + + if c is None: + return c + if greyscale: + try: + len(c) + except TypeError: + c = (c,) + if len(c) != 1: + raise ValueError("%s for greyscale must be 1-tuple" % + which) + if not isinteger(c[0]): + raise ValueError( + "%s colour for greyscale must be integer" % which) + else: + if not (len(c) == 3 and + isinteger(c[0]) and + isinteger(c[1]) and + isinteger(c[2])): + raise ValueError( + "%s colour must be a triple of integers" % which) + return c + +class Error(Exception): + def __str__(self): + return self.__class__.__name__ + ': ' + ' '.join(self.args) + +class FormatError(Error): + """Problem with input file format. In other words, PNG file does + not conform to the specification in some way and is invalid. + """ + +class ChunkError(FormatError): + pass + + +class Writer: + """ + PNG encoder in pure Python. + """ + + def __init__(self, width=None, height=None, + size=None, + greyscale=False, + alpha=False, + bitdepth=8, + palette=None, + transparent=None, + background=None, + gamma=None, + compression=None, + interlace=False, + bytes_per_sample=None, # deprecated + planes=None, + colormap=None, + maxval=None, + chunk_limit=2**20, + x_pixels_per_unit = None, + y_pixels_per_unit = None, + unit_is_meter = False): + """ + Create a PNG encoder object. + + Arguments: + + width, height + Image size in pixels, as two separate arguments. + size + Image size (w,h) in pixels, as single argument. + greyscale + Input data is greyscale, not RGB. + alpha + Input data has alpha channel (RGBA or LA). + bitdepth + Bit depth: from 1 to 16. + palette + Create a palette for a colour mapped image (colour type 3). + transparent + Specify a transparent colour (create a ``tRNS`` chunk). + background + Specify a default background colour (create a ``bKGD`` chunk). + gamma + Specify a gamma value (create a ``gAMA`` chunk). + compression + zlib compression level: 0 (none) to 9 (more compressed); + default: -1 or None. + interlace + Create an interlaced image. + chunk_limit + Write multiple ``IDAT`` chunks to save memory. + x_pixels_per_unit + Number of pixels a unit along the x axis (write a + `pHYs` chunk). + y_pixels_per_unit + Number of pixels a unit along the y axis (write a + `pHYs` chunk). Along with `x_pixel_unit`, this gives + the pixel size ratio. + unit_is_meter + `True` to indicate that the unit (for the `pHYs` + chunk) is metre. + + The image size (in pixels) can be specified either by using the + `width` and `height` arguments, or with the single `size` + argument. If `size` is used it should be a pair (*width*, + *height*). + + `greyscale` and `alpha` are booleans that specify whether + an image is greyscale (or colour), and whether it has an + alpha channel (or not). + + `bitdepth` specifies the bit depth of the source pixel values. + Each source pixel value must be an integer between 0 and + ``2**bitdepth-1``. For example, 8-bit images have values + between 0 and 255. PNG only stores images with bit depths of + 1,2,4,8, or 16. When `bitdepth` is not one of these values, + the next highest valid bit depth is selected, and an ``sBIT`` + (significant bits) chunk is generated that specifies the + original precision of the source image. In this case the + supplied pixel values will be rescaled to fit the range of + the selected bit depth. + + The details of which bit depth / colour model combinations the + PNG file format supports directly, are somewhat arcane + (refer to the PNG specification for full details). Briefly: + "small" bit depths (1,2,4) are only allowed with greyscale and + colour mapped images; colour mapped images cannot have bit depth + 16. + + For colour mapped images (in other words, when the `palette` + argument is specified) the `bitdepth` argument must match one of + the valid PNG bit depths: 1, 2, 4, or 8. (It is valid to have a + PNG image with a palette and an ``sBIT`` chunk, but the meaning + is slightly different; it would be awkward to press the + `bitdepth` argument into service for this.) + + The `palette` option, when specified, causes a colour + mapped image to be created: the PNG colour type is set to 3; + `greyscale` must not be set; `alpha` must not be set; + `transparent` must not be set; the bit depth must be 1,2,4, + or 8. When a colour mapped image is created, the pixel values + are palette indexes and the `bitdepth` argument specifies the + size of these indexes (not the size of the colour values in + the palette). + + The palette argument value should be a sequence of 3- or + 4-tuples. 3-tuples specify RGB palette entries; 4-tuples + specify RGBA palette entries. If both 4-tuples and 3-tuples + appear in the sequence then all the 4-tuples must come + before all the 3-tuples. A ``PLTE`` chunk is created; if there + are 4-tuples then a ``tRNS`` chunk is created as well. The + ``PLTE`` chunk will contain all the RGB triples in the same + sequence; the ``tRNS`` chunk will contain the alpha channel for + all the 4-tuples, in the same sequence. Palette entries + are always 8-bit. + + If specified, the `transparent` and `background` parameters must + be a tuple with three integer values for red, green, blue, or + a simple integer (or singleton tuple) for a greyscale image. + + If specified, the `gamma` parameter must be a positive number + (generally, a `float`). A ``gAMA`` chunk will be created. + Note that this will not change the values of the pixels as + they appear in the PNG file, they are assumed to have already + been converted appropriately for the gamma specified. + + The `compression` argument specifies the compression level to + be used by the ``zlib`` module. Values from 1 to 9 specify + compression, with 9 being "more compressed" (usually smaller + and slower, but it doesn't always work out that way). 0 means + no compression. -1 and ``None`` both mean that the default + level of compession will be picked by the ``zlib`` module + (which is generally acceptable). + + If `interlace` is true then an interlaced image is created + (using PNG's so far only interace method, *Adam7*). This does + not affect how the pixels should be presented to the encoder, + rather it changes how they are arranged into the PNG file. + On slow connexions interlaced images can be partially decoded + by the browser to give a rough view of the image that is + successively refined as more image data appears. + + .. note :: + + Enabling the `interlace` option requires the entire image + to be processed in working memory. + + `chunk_limit` is used to limit the amount of memory used whilst + compressing the image. In order to avoid using large amounts of + memory, multiple ``IDAT`` chunks may be created. + """ + + # At the moment the `planes` argument is ignored; + # its purpose is to act as a dummy so that + # ``Writer(x, y, **info)`` works, where `info` is a dictionary + # returned by Reader.read and friends. + # Ditto for `colormap`. + + width, height = check_sizes(size, width, height) + del size + + if width <= 0 or height <= 0: + raise ValueError("width and height must be greater than zero") + if not isinteger(width) or not isinteger(height): + raise ValueError("width and height must be integers") + # http://www.w3.org/TR/PNG/#7Integers-and-byte-order + if width > 2**32-1 or height > 2**32-1: + raise ValueError("width and height cannot exceed 2**32-1") + + if alpha and transparent is not None: + raise ValueError( + "transparent colour not allowed with alpha channel") + + if bytes_per_sample is not None: + warnings.warn('please use bitdepth instead of bytes_per_sample', + DeprecationWarning) + if bytes_per_sample not in (0.125, 0.25, 0.5, 1, 2): + raise ValueError( + "bytes per sample must be .125, .25, .5, 1, or 2") + bitdepth = int(8*bytes_per_sample) + del bytes_per_sample + if not isinteger(bitdepth) or bitdepth < 1 or 16 < bitdepth: + raise ValueError("bitdepth (%r) must be a positive integer <= 16" % + bitdepth) + + self.rescale = None + palette = check_palette(palette) + if palette: + if bitdepth not in (1,2,4,8): + raise ValueError("with palette, bitdepth must be 1, 2, 4, or 8") + if transparent is not None: + raise ValueError("transparent and palette not compatible") + if alpha: + raise ValueError("alpha and palette not compatible") + if greyscale: + raise ValueError("greyscale and palette not compatible") + else: + # No palette, check for sBIT chunk generation. + if alpha or not greyscale: + if bitdepth not in (8,16): + targetbitdepth = (8,16)[bitdepth > 8] + self.rescale = (bitdepth, targetbitdepth) + bitdepth = targetbitdepth + del targetbitdepth + else: + assert greyscale + assert not alpha + if bitdepth not in (1,2,4,8,16): + if bitdepth > 8: + targetbitdepth = 16 + elif bitdepth == 3: + targetbitdepth = 4 + else: + assert bitdepth in (5,6,7) + targetbitdepth = 8 + self.rescale = (bitdepth, targetbitdepth) + bitdepth = targetbitdepth + del targetbitdepth + + if bitdepth < 8 and (alpha or not greyscale and not palette): + raise ValueError( + "bitdepth < 8 only permitted with greyscale or palette") + if bitdepth > 8 and palette: + raise ValueError( + "bit depth must be 8 or less for images with palette") + + transparent = check_color(transparent, greyscale, 'transparent') + background = check_color(background, greyscale, 'background') + + # It's important that the true boolean values (greyscale, alpha, + # colormap, interlace) are converted to bool because Iverson's + # convention is relied upon later on. + self.width = width + self.height = height + self.transparent = transparent + self.background = background + self.gamma = gamma + self.greyscale = bool(greyscale) + self.alpha = bool(alpha) + self.colormap = bool(palette) + self.bitdepth = int(bitdepth) + self.compression = compression + self.chunk_limit = chunk_limit + self.interlace = bool(interlace) + self.palette = palette + self.x_pixels_per_unit = x_pixels_per_unit + self.y_pixels_per_unit = y_pixels_per_unit + self.unit_is_meter = bool(unit_is_meter) + + self.color_type = 4*self.alpha + 2*(not greyscale) + 1*self.colormap + assert self.color_type in (0,2,3,4,6) + + self.color_planes = (3,1)[self.greyscale or self.colormap] + self.planes = self.color_planes + self.alpha + # :todo: fix for bitdepth < 8 + self.psize = (self.bitdepth/8) * self.planes + + def make_palette(self): + """Create the byte sequences for a ``PLTE`` and if necessary a + ``tRNS`` chunk. Returned as a pair (*p*, *t*). *t* will be + ``None`` if no ``tRNS`` chunk is necessary. + """ + + p = array('B') + t = array('B') + + for x in self.palette: + p.extend(x[0:3]) + if len(x) > 3: + t.append(x[3]) + p = tostring(p) + t = tostring(t) + if t: + return p,t + return p,None + + def write(self, outfile, rows): + """Write a PNG image to the output file. `rows` should be + an iterable that yields each row in boxed row flat pixel + format. The rows should be the rows of the original image, + so there should be ``self.height`` rows of ``self.width * + self.planes`` values. If `interlace` is specified (when + creating the instance), then an interlaced PNG file will + be written. Supply the rows in the normal image order; + the interlacing is carried out internally. + + .. note :: + + Interlacing will require the entire image to be in working + memory. + """ + + if self.interlace: + fmt = 'BH'[self.bitdepth > 8] + a = array(fmt, itertools.chain(*rows)) + return self.write_array(outfile, a) + + nrows = self.write_passes(outfile, rows) + if nrows != self.height: + raise ValueError( + "rows supplied (%d) does not match height (%d)" % + (nrows, self.height)) + + def write_passes(self, outfile, rows, packed=False): + """ + Write a PNG image to the output file. + + Most users are expected to find the :meth:`write` or + :meth:`write_array` method more convenient. + + The rows should be given to this method in the order that + they appear in the output file. For straightlaced images, + this is the usual top to bottom ordering, but for interlaced + images the rows should have already been interlaced before + passing them to this function. + + `rows` should be an iterable that yields each row. When + `packed` is ``False`` the rows should be in boxed row flat pixel + format; when `packed` is ``True`` each row should be a packed + sequence of bytes. + """ + + # http://www.w3.org/TR/PNG/#5PNG-file-signature + outfile.write(_signature) + + # http://www.w3.org/TR/PNG/#11IHDR + write_chunk(outfile, b'IHDR', + struct.pack("!2I5B", self.width, self.height, + self.bitdepth, self.color_type, + 0, 0, self.interlace)) + + # See :chunk:order + # http://www.w3.org/TR/PNG/#11gAMA + if self.gamma is not None: + write_chunk(outfile, b'gAMA', + struct.pack("!L", int(round(self.gamma*1e5)))) + + # See :chunk:order + # http://www.w3.org/TR/PNG/#11sBIT + if self.rescale: + write_chunk(outfile, b'sBIT', + struct.pack('%dB' % self.planes, + *[self.rescale[0]]*self.planes)) + + # :chunk:order: Without a palette (PLTE chunk), ordering is + # relatively relaxed. With one, gAMA chunk must precede PLTE + # chunk which must precede tRNS and bKGD. + # See http://www.w3.org/TR/PNG/#5ChunkOrdering + if self.palette: + p,t = self.make_palette() + write_chunk(outfile, b'PLTE', p) + if t: + # tRNS chunk is optional. Only needed if palette entries + # have alpha. + write_chunk(outfile, b'tRNS', t) + + # http://www.w3.org/TR/PNG/#11tRNS + if self.transparent is not None: + if self.greyscale: + write_chunk(outfile, b'tRNS', + struct.pack("!1H", *self.transparent)) + else: + write_chunk(outfile, b'tRNS', + struct.pack("!3H", *self.transparent)) + + # http://www.w3.org/TR/PNG/#11bKGD + if self.background is not None: + if self.greyscale: + write_chunk(outfile, b'bKGD', + struct.pack("!1H", *self.background)) + else: + write_chunk(outfile, b'bKGD', + struct.pack("!3H", *self.background)) + + # http://www.w3.org/TR/PNG/#11pHYs + if self.x_pixels_per_unit is not None and self.y_pixels_per_unit is not None: + tup = (self.x_pixels_per_unit, self.y_pixels_per_unit, int(self.unit_is_meter)) + write_chunk(outfile, b'pHYs', struct.pack("!LLB",*tup)) + + # http://www.w3.org/TR/PNG/#11IDAT + if self.compression is not None: + compressor = zlib.compressobj(self.compression) + else: + compressor = zlib.compressobj() + + # Choose an extend function based on the bitdepth. The extend + # function packs/decomposes the pixel values into bytes and + # stuffs them onto the data array. + data = array('B') + if self.bitdepth == 8 or packed: + extend = data.extend + elif self.bitdepth == 16: + # Decompose into bytes + def extend(sl): + fmt = '!%dH' % len(sl) + data.extend(array('B', struct.pack(fmt, *sl))) + else: + # Pack into bytes + assert self.bitdepth < 8 + # samples per byte + spb = int(8/self.bitdepth) + def extend(sl): + a = array('B', sl) + # Adding padding bytes so we can group into a whole + # number of spb-tuples. + l = float(len(a)) + extra = math.ceil(l / float(spb))*spb - l + a.extend([0]*int(extra)) + # Pack into bytes + l = group(a, spb) + l = [reduce(lambda x,y: + (x << self.bitdepth) + y, e) for e in l] + data.extend(l) + if self.rescale: + oldextend = extend + factor = \ + float(2**self.rescale[1]-1) / float(2**self.rescale[0]-1) + def extend(sl): + oldextend([int(round(factor*x)) for x in sl]) + + # Build the first row, testing mostly to see if we need to + # changed the extend function to cope with NumPy integer types + # (they cause our ordinary definition of extend to fail, so we + # wrap it). See + # http://code.google.com/p/pypng/issues/detail?id=44 + enumrows = enumerate(rows) + del rows + + # First row's filter type. + data.append(0) + # :todo: Certain exceptions in the call to ``.next()`` or the + # following try would indicate no row data supplied. + # Should catch. + i,row = next(enumrows) + try: + # If this fails... + extend(row) + except: + # ... try a version that converts the values to int first. + # Not only does this work for the (slightly broken) NumPy + # types, there are probably lots of other, unknown, "nearly" + # int types it works for. + def wrapmapint(f): + return lambda sl: f([int(x) for x in sl]) + extend = wrapmapint(extend) + del wrapmapint + extend(row) + + for i,row in enumrows: + # Add "None" filter type. Currently, it's essential that + # this filter type be used for every scanline as we do not + # mark the first row of a reduced pass image; that means we + # could accidentally compute the wrong filtered scanline if + # we used "up", "average", or "paeth" on such a line. + data.append(0) + extend(row) + if len(data) > self.chunk_limit: + compressed = compressor.compress(tostring(data)) + if len(compressed): + write_chunk(outfile, b'IDAT', compressed) + # Because of our very witty definition of ``extend``, + # above, we must re-use the same ``data`` object. Hence + # we use ``del`` to empty this one, rather than create a + # fresh one (which would be my natural FP instinct). + del data[:] + if len(data): + compressed = compressor.compress(tostring(data)) + else: + compressed = b'' + flushed = compressor.flush() + if len(compressed) or len(flushed): + write_chunk(outfile, b'IDAT', compressed + flushed) + # http://www.w3.org/TR/PNG/#11IEND + write_chunk(outfile, b'IEND') + return i+1 + + def write_array(self, outfile, pixels): + """ + Write an array in flat row flat pixel format as a PNG file on + the output file. See also :meth:`write` method. + """ + + if self.interlace: + self.write_passes(outfile, self.array_scanlines_interlace(pixels)) + else: + self.write_passes(outfile, self.array_scanlines(pixels)) + + def write_packed(self, outfile, rows): + """ + Write PNG file to `outfile`. The pixel data comes from `rows` + which should be in boxed row packed format. Each row should be + a sequence of packed bytes. + + Technically, this method does work for interlaced images but it + is best avoided. For interlaced images, the rows should be + presented in the order that they appear in the file. + + This method should not be used when the source image bit depth + is not one naturally supported by PNG; the bit depth should be + 1, 2, 4, 8, or 16. + """ + + if self.rescale: + raise Error("write_packed method not suitable for bit depth %d" % + self.rescale[0]) + return self.write_passes(outfile, rows, packed=True) + + def convert_pnm(self, infile, outfile): + """ + Convert a PNM file containing raw pixel data into a PNG file + with the parameters set in the writer object. Works for + (binary) PGM, PPM, and PAM formats. + """ + + if self.interlace: + pixels = array('B') + pixels.fromfile(infile, + (self.bitdepth/8) * self.color_planes * + self.width * self.height) + self.write_passes(outfile, self.array_scanlines_interlace(pixels)) + else: + self.write_passes(outfile, self.file_scanlines(infile)) + + def convert_ppm_and_pgm(self, ppmfile, pgmfile, outfile): + """ + Convert a PPM and PGM file containing raw pixel data into a + PNG outfile with the parameters set in the writer object. + """ + pixels = array('B') + pixels.fromfile(ppmfile, + (self.bitdepth/8) * self.color_planes * + self.width * self.height) + apixels = array('B') + apixels.fromfile(pgmfile, + (self.bitdepth/8) * + self.width * self.height) + pixels = interleave_planes(pixels, apixels, + (self.bitdepth/8) * self.color_planes, + (self.bitdepth/8)) + if self.interlace: + self.write_passes(outfile, self.array_scanlines_interlace(pixels)) + else: + self.write_passes(outfile, self.array_scanlines(pixels)) + + def file_scanlines(self, infile): + """ + Generates boxed rows in flat pixel format, from the input file + `infile`. It assumes that the input file is in a "Netpbm-like" + binary format, and is positioned at the beginning of the first + pixel. The number of pixels to read is taken from the image + dimensions (`width`, `height`, `planes`) and the number of bytes + per value is implied by the image `bitdepth`. + """ + + # Values per row + vpr = self.width * self.planes + row_bytes = vpr + if self.bitdepth > 8: + assert self.bitdepth == 16 + row_bytes *= 2 + fmt = '>%dH' % vpr + def line(): + return array('H', struct.unpack(fmt, infile.read(row_bytes))) + else: + def line(): + scanline = array('B', infile.read(row_bytes)) + return scanline + for y in range(self.height): + yield line() + + def array_scanlines(self, pixels): + """ + Generates boxed rows (flat pixels) from flat rows (flat pixels) + in an array. + """ + + # Values per row + vpr = self.width * self.planes + stop = 0 + for y in range(self.height): + start = stop + stop = start + vpr + yield pixels[start:stop] + + def array_scanlines_interlace(self, pixels): + """ + Generator for interlaced scanlines from an array. `pixels` is + the full source image in flat row flat pixel format. The + generator yields each scanline of the reduced passes in turn, in + boxed row flat pixel format. + """ + + # http://www.w3.org/TR/PNG/#8InterlaceMethods + # Array type. + fmt = 'BH'[self.bitdepth > 8] + # Value per row + vpr = self.width * self.planes + for xstart, ystart, xstep, ystep in _adam7: + if xstart >= self.width: + continue + # Pixels per row (of reduced image) + ppr = int(math.ceil((self.width-xstart)/float(xstep))) + # number of values in reduced image row. + row_len = ppr*self.planes + for y in range(ystart, self.height, ystep): + if xstep == 1: + offset = y * vpr + yield pixels[offset:offset+vpr] + else: + row = array(fmt) + # There's no easier way to set the length of an array + row.extend(pixels[0:row_len]) + offset = y * vpr + xstart * self.planes + end_offset = (y+1) * vpr + skip = self.planes * xstep + for i in range(self.planes): + row[i::self.planes] = \ + pixels[offset+i:end_offset:skip] + yield row + +def write_chunk(outfile, tag, data=b''): + """ + Write a PNG chunk to the output file, including length and + checksum. + """ + + # http://www.w3.org/TR/PNG/#5Chunk-layout + outfile.write(struct.pack("!I", len(data))) + outfile.write(tag) + outfile.write(data) + checksum = zlib.crc32(tag) + checksum = zlib.crc32(data, checksum) + checksum &= 2**32-1 + outfile.write(struct.pack("!I", checksum)) + +def write_chunks(out, chunks): + """Create a PNG file by writing out the chunks.""" + + out.write(_signature) + for chunk in chunks: + write_chunk(out, *chunk) + +def filter_scanline(type, line, fo, prev=None): + """Apply a scanline filter to a scanline. `type` specifies the + filter type (0 to 4); `line` specifies the current (unfiltered) + scanline as a sequence of bytes; `prev` specifies the previous + (unfiltered) scanline as a sequence of bytes. `fo` specifies the + filter offset; normally this is size of a pixel in bytes (the number + of bytes per sample times the number of channels), but when this is + < 1 (for bit depths < 8) then the filter offset is 1. + """ + + assert 0 <= type < 5 + + # The output array. Which, pathetically, we extend one-byte at a + # time (fortunately this is linear). + out = array('B', [type]) + + def sub(): + ai = -fo + for x in line: + if ai >= 0: + x = (x - line[ai]) & 0xff + out.append(x) + ai += 1 + def up(): + for i,x in enumerate(line): + x = (x - prev[i]) & 0xff + out.append(x) + def average(): + ai = -fo + for i,x in enumerate(line): + if ai >= 0: + x = (x - ((line[ai] + prev[i]) >> 1)) & 0xff + else: + x = (x - (prev[i] >> 1)) & 0xff + out.append(x) + ai += 1 + def paeth(): + # http://www.w3.org/TR/PNG/#9Filter-type-4-Paeth + ai = -fo # also used for ci + for i,x in enumerate(line): + a = 0 + b = prev[i] + c = 0 + + if ai >= 0: + a = line[ai] + c = prev[ai] + p = a + b - c + pa = abs(p - a) + pb = abs(p - b) + pc = abs(p - c) + if pa <= pb and pa <= pc: + Pr = a + elif pb <= pc: + Pr = b + else: + Pr = c + + x = (x - Pr) & 0xff + out.append(x) + ai += 1 + + if not prev: + # We're on the first line. Some of the filters can be reduced + # to simpler cases which makes handling the line "off the top" + # of the image simpler. "up" becomes "none"; "paeth" becomes + # "left" (non-trivial, but true). "average" needs to be handled + # specially. + if type == 2: # "up" + type = 0 + elif type == 3: + prev = [0]*len(line) + elif type == 4: # "paeth" + type = 1 + if type == 0: + out.extend(line) + elif type == 1: + sub() + elif type == 2: + up() + elif type == 3: + average() + else: # type == 4 + paeth() + return out + + +def from_array(a, mode=None, info={}): + """Create a PNG :class:`Image` object from a 2- or 3-dimensional + array. One application of this function is easy PIL-style saving: + ``png.from_array(pixels, 'L').save('foo.png')``. + + Unless they are specified using the *info* parameter, the PNG's + height and width are taken from the array size. For a 3 dimensional + array the first axis is the height; the second axis is the width; + and the third axis is the channel number. Thus an RGB image that is + 16 pixels high and 8 wide will use an array that is 16x8x3. For 2 + dimensional arrays the first axis is the height, but the second axis + is ``width*channels``, so an RGB image that is 16 pixels high and 8 + wide will use a 2-dimensional array that is 16x24 (each row will be + 8*3 = 24 sample values). + + *mode* is a string that specifies the image colour format in a + PIL-style mode. It can be: + + ``'L'`` + greyscale (1 channel) + ``'LA'`` + greyscale with alpha (2 channel) + ``'RGB'`` + colour image (3 channel) + ``'RGBA'`` + colour image with alpha (4 channel) + + The mode string can also specify the bit depth (overriding how this + function normally derives the bit depth, see below). Appending + ``';16'`` to the mode will cause the PNG to be 16 bits per channel; + any decimal from 1 to 16 can be used to specify the bit depth. + + When a 2-dimensional array is used *mode* determines how many + channels the image has, and so allows the width to be derived from + the second array dimension. + + The array is expected to be a ``numpy`` array, but it can be any + suitable Python sequence. For example, a list of lists can be used: + ``png.from_array([[0, 255, 0], [255, 0, 255]], 'L')``. The exact + rules are: ``len(a)`` gives the first dimension, height; + ``len(a[0])`` gives the second dimension; ``len(a[0][0])`` gives the + third dimension, unless an exception is raised in which case a + 2-dimensional array is assumed. It's slightly more complicated than + that because an iterator of rows can be used, and it all still + works. Using an iterator allows data to be streamed efficiently. + + The bit depth of the PNG is normally taken from the array element's + datatype (but if *mode* specifies a bitdepth then that is used + instead). The array element's datatype is determined in a way which + is supposed to work both for ``numpy`` arrays and for Python + ``array.array`` objects. A 1 byte datatype will give a bit depth of + 8, a 2 byte datatype will give a bit depth of 16. If the datatype + does not have an implicit size, for example it is a plain Python + list of lists, as above, then a default of 8 is used. + + The *info* parameter is a dictionary that can be used to specify + metadata (in the same style as the arguments to the + :class:`png.Writer` class). For this function the keys that are + useful are: + + height + overrides the height derived from the array dimensions and allows + *a* to be an iterable. + width + overrides the width derived from the array dimensions. + bitdepth + overrides the bit depth derived from the element datatype (but + must match *mode* if that also specifies a bit depth). + + Generally anything specified in the + *info* dictionary will override any implicit choices that this + function would otherwise make, but must match any explicit ones. + For example, if the *info* dictionary has a ``greyscale`` key then + this must be true when mode is ``'L'`` or ``'LA'`` and false when + mode is ``'RGB'`` or ``'RGBA'``. + """ + + # We abuse the *info* parameter by modifying it. Take a copy here. + # (Also typechecks *info* to some extent). + info = dict(info) + + # Syntax check mode string. + bitdepth = None + try: + # Assign the 'L' or 'RGBA' part to `gotmode`. + if mode.startswith('L'): + gotmode = 'L' + mode = mode[1:] + elif mode.startswith('RGB'): + gotmode = 'RGB' + mode = mode[3:] + else: + raise Error() + if mode.startswith('A'): + gotmode += 'A' + mode = mode[1:] + + # Skip any optional ';' + while mode.startswith(';'): + mode = mode[1:] + + # Parse optional bitdepth + if mode: + try: + bitdepth = int(mode) + except (TypeError, ValueError): + raise Error() + except Error: + raise Error("mode string should be 'RGB' or 'L;16' or similar.") + mode = gotmode + + # Get bitdepth from *mode* if possible. + if bitdepth: + if info.get('bitdepth') and bitdepth != info['bitdepth']: + raise Error("mode bitdepth (%d) should match info bitdepth (%d)." % + (bitdepth, info['bitdepth'])) + info['bitdepth'] = bitdepth + + # Fill in and/or check entries in *info*. + # Dimensions. + if 'size' in info: + # Check width, height, size all match where used. + for dimension,axis in [('width', 0), ('height', 1)]: + if dimension in info: + if info[dimension] != info['size'][axis]: + raise Error( + "info[%r] should match info['size'][%r]." % + (dimension, axis)) + info['width'],info['height'] = info['size'] + if 'height' not in info: + try: + l = len(a) + except TypeError: + raise Error( + "len(a) does not work, supply info['height'] instead.") + info['height'] = l + # Colour format. + if 'greyscale' in info: + if bool(info['greyscale']) != ('L' in mode): + raise Error("info['greyscale'] should match mode.") + info['greyscale'] = 'L' in mode + if 'alpha' in info: + if bool(info['alpha']) != ('A' in mode): + raise Error("info['alpha'] should match mode.") + info['alpha'] = 'A' in mode + + planes = len(mode) + if 'planes' in info: + if info['planes'] != planes: + raise Error("info['planes'] should match mode.") + + # In order to work out whether we the array is 2D or 3D we need its + # first row, which requires that we take a copy of its iterator. + # We may also need the first row to derive width and bitdepth. + a,t = itertools.tee(a) + row = next(t) + del t + try: + row[0][0] + threed = True + testelement = row[0] + except (IndexError, TypeError): + threed = False + testelement = row + if 'width' not in info: + if threed: + width = len(row) + else: + width = len(row) // planes + info['width'] = width + + if threed: + # Flatten the threed rows + a = (itertools.chain.from_iterable(x) for x in a) + + if 'bitdepth' not in info: + try: + dtype = testelement.dtype + # goto the "else:" clause. Sorry. + except AttributeError: + try: + # Try a Python array.array. + bitdepth = 8 * testelement.itemsize + except AttributeError: + # We can't determine it from the array element's + # datatype, use a default of 8. + bitdepth = 8 + else: + # If we got here without exception, we now assume that + # the array is a numpy array. + if dtype.kind == 'b': + bitdepth = 1 + else: + bitdepth = 8 * dtype.itemsize + info['bitdepth'] = bitdepth + + for thing in 'width height bitdepth greyscale alpha'.split(): + assert thing in info + return Image(a, info) + +# So that refugee's from PIL feel more at home. Not documented. +fromarray = from_array + +class Image: + """A PNG image. You can create an :class:`Image` object from + an array of pixels by calling :meth:`png.from_array`. It can be + saved to disk with the :meth:`save` method. + """ + + def __init__(self, rows, info): + """ + .. note :: + + The constructor is not public. Please do not call it. + """ + + self.rows = rows + self.info = info + + def save(self, file): + """Save the image to *file*. If *file* looks like an open file + descriptor then it is used, otherwise it is treated as a + filename and a fresh file is opened. + + In general, you can only call this method once; after it has + been called the first time and the PNG image has been saved, the + source data will have been streamed, and cannot be streamed + again. + """ + + w = Writer(**self.info) + + try: + file.write + def close(): pass + except AttributeError: + file = open(file, 'wb') + def close(): file.close() + + try: + w.write(file, self.rows) + finally: + close() + +class _readable: + """ + A simple file-like interface for strings and arrays. + """ + + def __init__(self, buf): + self.buf = buf + self.offset = 0 + + def read(self, n): + r = self.buf[self.offset:self.offset+n] + if isarray(r): + r = r.tostring() + self.offset += n + return r + +try: + str(b'dummy', 'ascii') +except TypeError: + as_str = str +else: + def as_str(x): + return str(x, 'ascii') + +class Reader: + """ + PNG decoder in pure Python. + """ + + def __init__(self, _guess=None, **kw): + """ + Create a PNG decoder object. + + The constructor expects exactly one keyword argument. If you + supply a positional argument instead, it will guess the input + type. You can choose among the following keyword arguments: + + filename + Name of input file (a PNG file). + file + A file-like object (object with a read() method). + bytes + ``array`` or ``string`` with PNG data. + + """ + if ((_guess is not None and len(kw) != 0) or + (_guess is None and len(kw) != 1)): + raise TypeError("Reader() takes exactly 1 argument") + + # Will be the first 8 bytes, later on. See validate_signature. + self.signature = None + self.transparent = None + # A pair of (len,type) if a chunk has been read but its data and + # checksum have not (in other words the file position is just + # past the 4 bytes that specify the chunk type). See preamble + # method for how this is used. + self.atchunk = None + + if _guess is not None: + if isarray(_guess): + kw["bytes"] = _guess + elif isinstance(_guess, str): + kw["filename"] = _guess + elif hasattr(_guess, 'read'): + kw["file"] = _guess + + if "filename" in kw: + self.file = open(kw["filename"], "rb") + elif "file" in kw: + self.file = kw["file"] + elif "bytes" in kw: + self.file = _readable(kw["bytes"]) + else: + raise TypeError("expecting filename, file or bytes array") + + + def chunk(self, seek=None, lenient=False): + """ + Read the next PNG chunk from the input file; returns a + (*type*, *data*) tuple. *type* is the chunk's type as a + byte string (all PNG chunk types are 4 bytes long). + *data* is the chunk's data content, as a byte string. + + If the optional `seek` argument is + specified then it will keep reading chunks until it either runs + out of file or finds the type specified by the argument. Note + that in general the order of chunks in PNGs is unspecified, so + using `seek` can cause you to miss chunks. + + If the optional `lenient` argument evaluates to `True`, + checksum failures will raise warnings rather than exceptions. + """ + + self.validate_signature() + + while True: + # http://www.w3.org/TR/PNG/#5Chunk-layout + if not self.atchunk: + self.atchunk = self.chunklentype() + length, type = self.atchunk + self.atchunk = None + data = self.file.read(length) + if len(data) != length: + raise ChunkError('Chunk %s too short for required %i octets.' + % (type, length)) + checksum = self.file.read(4) + if len(checksum) != 4: + raise ChunkError('Chunk %s too short for checksum.' % type) + if seek and type != seek: + continue + verify = zlib.crc32(type) + verify = zlib.crc32(data, verify) + # Whether the output from zlib.crc32 is signed or not varies + # according to hideous implementation details, see + # http://bugs.python.org/issue1202 . + # We coerce it to be positive here (in a way which works on + # Python 2.3 and older). + verify &= 2**32 - 1 + verify = struct.pack('!I', verify) + if checksum != verify: + (a, ) = struct.unpack('!I', checksum) + (b, ) = struct.unpack('!I', verify) + message = "Checksum error in %s chunk: 0x%08X != 0x%08X." % (type, a, b) + if lenient: + warnings.warn(message, RuntimeWarning) + else: + raise ChunkError(message) + return type, data + + def chunks(self): + """Return an iterator that will yield each chunk as a + (*chunktype*, *content*) pair. + """ + + while True: + t,v = self.chunk() + yield t,v + if t == b'IEND': + break + + def undo_filter(self, filter_type, scanline, previous): + """Undo the filter for a scanline. `scanline` is a sequence of + bytes that does not include the initial filter type byte. + `previous` is decoded previous scanline (for straightlaced + images this is the previous pixel row, but for interlaced + images, it is the previous scanline in the reduced image, which + in general is not the previous pixel row in the final image). + When there is no previous scanline (the first row of a + straightlaced image, or the first row in one of the passes in an + interlaced image), then this argument should be ``None``. + + The scanline will have the effects of filtering removed, and the + result will be returned as a fresh sequence of bytes. + """ + + # :todo: Would it be better to update scanline in place? + # Yes, with the Cython extension making the undo_filter fast, + # updating scanline inplace makes the code 3 times faster + # (reading 50 images of 800x800 went from 40s to 16s) + result = scanline + + if filter_type == 0: + return result + + if filter_type not in (1,2,3,4): + raise FormatError('Invalid PNG Filter Type.' + ' See http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters .') + + # Filter unit. The stride from one pixel to the corresponding + # byte from the previous pixel. Normally this is the pixel + # size in bytes, but when this is smaller than 1, the previous + # byte is used instead. + fu = max(1, self.psize) + + # For the first line of a pass, synthesize a dummy previous + # line. An alternative approach would be to observe that on the + # first line 'up' is the same as 'null', 'paeth' is the same + # as 'sub', with only 'average' requiring any special case. + if not previous: + previous = array('B', [0]*len(scanline)) + + def sub(): + """Undo sub filter.""" + + ai = 0 + # Loop starts at index fu. Observe that the initial part + # of the result is already filled in correctly with + # scanline. + for i in range(fu, len(result)): + x = scanline[i] + a = result[ai] + result[i] = (x + a) & 0xff + ai += 1 + + def up(): + """Undo up filter.""" + + for i in range(len(result)): + x = scanline[i] + b = previous[i] + result[i] = (x + b) & 0xff + + def average(): + """Undo average filter.""" + + ai = -fu + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = 0 + else: + a = result[ai] + b = previous[i] + result[i] = (x + ((a + b) >> 1)) & 0xff + ai += 1 + + def paeth(): + """Undo Paeth filter.""" + + # Also used for ci. + ai = -fu + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = c = 0 + else: + a = result[ai] + c = previous[ai] + b = previous[i] + p = a + b - c + pa = abs(p - a) + pb = abs(p - b) + pc = abs(p - c) + if pa <= pb and pa <= pc: + pr = a + elif pb <= pc: + pr = b + else: + pr = c + result[i] = (x + pr) & 0xff + ai += 1 + + # Call appropriate filter algorithm. Note that 0 has already + # been dealt with. + (None, + pngfilters.undo_filter_sub, + pngfilters.undo_filter_up, + pngfilters.undo_filter_average, + pngfilters.undo_filter_paeth)[filter_type](fu, scanline, previous, result) + return result + + def deinterlace(self, raw): + """ + Read raw pixel data, undo filters, deinterlace, and flatten. + Return in flat row flat pixel format. + """ + + # Values per row (of the target image) + vpr = self.width * self.planes + + # Make a result array, and make it big enough. Interleaving + # writes to the output array randomly (well, not quite), so the + # entire output array must be in memory. + fmt = 'BH'[self.bitdepth > 8] + a = array(fmt, [0]*vpr*self.height) + source_offset = 0 + + for xstart, ystart, xstep, ystep in _adam7: + if xstart >= self.width: + continue + # The previous (reconstructed) scanline. None at the + # beginning of a pass to indicate that there is no previous + # line. + recon = None + # Pixels per row (reduced pass image) + ppr = int(math.ceil((self.width-xstart)/float(xstep))) + # Row size in bytes for this pass. + row_size = int(math.ceil(self.psize * ppr)) + for y in range(ystart, self.height, ystep): + filter_type = raw[source_offset] + source_offset += 1 + scanline = raw[source_offset:source_offset+row_size] + source_offset += row_size + recon = self.undo_filter(filter_type, scanline, recon) + # Convert so that there is one element per pixel value + flat = self.serialtoflat(recon, ppr) + if xstep == 1: + assert xstart == 0 + offset = y * vpr + a[offset:offset+vpr] = flat + else: + offset = y * vpr + xstart * self.planes + end_offset = (y+1) * vpr + skip = self.planes * xstep + for i in range(self.planes): + a[offset+i:end_offset:skip] = \ + flat[i::self.planes] + return a + + def iterboxed(self, rows): + """Iterator that yields each scanline in boxed row flat pixel + format. `rows` should be an iterator that yields the bytes of + each row in turn. + """ + + def asvalues(raw): + """Convert a row of raw bytes into a flat row. Result will + be a freshly allocated object, not shared with + argument. + """ + + if self.bitdepth == 8: + return array('B', raw) + if self.bitdepth == 16: + raw = tostring(raw) + return array('H', struct.unpack('!%dH' % (len(raw)//2), raw)) + assert self.bitdepth < 8 + width = self.width + # Samples per byte + spb = 8//self.bitdepth + out = array('B') + mask = 2**self.bitdepth - 1 + shifts = [self.bitdepth * i + for i in reversed(list(range(spb)))] + for o in raw: + out.extend([mask&(o>>i) for i in shifts]) + return out[:width] + + return map(asvalues, rows) + + def serialtoflat(self, bytes, width=None): + """Convert serial format (byte stream) pixel data to flat row + flat pixel. + """ + + if self.bitdepth == 8: + return bytes + if self.bitdepth == 16: + bytes = tostring(bytes) + return array('H', + struct.unpack('!%dH' % (len(bytes)//2), bytes)) + assert self.bitdepth < 8 + if width is None: + width = self.width + # Samples per byte + spb = 8//self.bitdepth + out = array('B') + mask = 2**self.bitdepth - 1 + shifts = list(map(self.bitdepth.__mul__, reversed(list(range(spb))))) + l = width + for o in bytes: + out.extend([(mask&(o>>s)) for s in shifts][:l]) + l -= spb + if l <= 0: + l = width + return out + + def iterstraight(self, raw): + """Iterator that undoes the effect of filtering, and yields + each row in serialised format (as a sequence of bytes). + Assumes input is straightlaced. `raw` should be an iterable + that yields the raw bytes in chunks of arbitrary size. + """ + + # length of row, in bytes + rb = self.row_bytes + a = array('B') + # The previous (reconstructed) scanline. None indicates first + # line of image. + recon = None + for some in raw: + a.extend(some) + while len(a) >= rb + 1: + filter_type = a[0] + scanline = a[1:rb+1] + del a[:rb+1] + recon = self.undo_filter(filter_type, scanline, recon) + yield recon + if len(a) != 0: + # :file:format We get here with a file format error: + # when the available bytes (after decompressing) do not + # pack into exact rows. + raise FormatError( + 'Wrong size for decompressed IDAT chunk.') + assert len(a) == 0 + + def validate_signature(self): + """If signature (header) has not been read then read and + validate it; otherwise do nothing. + """ + + if self.signature: + return + self.signature = self.file.read(8) + if self.signature != _signature: + raise FormatError("PNG file has invalid signature.") + + def preamble(self, lenient=False): + """ + Extract the image metadata by reading the initial part of + the PNG file up to the start of the ``IDAT`` chunk. All the + chunks that precede the ``IDAT`` chunk are read and either + processed for metadata or discarded. + + If the optional `lenient` argument evaluates to `True`, checksum + failures will raise warnings rather than exceptions. + """ + + self.validate_signature() + + while True: + if not self.atchunk: + self.atchunk = self.chunklentype() + if self.atchunk is None: + raise FormatError( + 'This PNG file has no IDAT chunks.') + if self.atchunk[1] == b'IDAT': + return + self.process_chunk(lenient=lenient) + + def chunklentype(self): + """Reads just enough of the input to determine the next + chunk's length and type, returned as a (*length*, *type*) pair + where *type* is a string. If there are no more chunks, ``None`` + is returned. + """ + + x = self.file.read(8) + if not x: + return None + if len(x) != 8: + raise FormatError( + 'End of file whilst reading chunk length and type.') + length,type = struct.unpack('!I4s', x) + if length > 2**31-1: + raise FormatError('Chunk %s is too large: %d.' % (type,length)) + return length,type + + def process_chunk(self, lenient=False): + """Process the next chunk and its data. This only processes the + following chunk types, all others are ignored: ``IHDR``, + ``PLTE``, ``bKGD``, ``tRNS``, ``gAMA``, ``sBIT``, ``pHYs``. + + If the optional `lenient` argument evaluates to `True`, + checksum failures will raise warnings rather than exceptions. + """ + + type, data = self.chunk(lenient=lenient) + method = '_process_' + as_str(type) + m = getattr(self, method, None) + if m: + m(data) + + def _process_IHDR(self, data): + # http://www.w3.org/TR/PNG/#11IHDR + if len(data) != 13: + raise FormatError('IHDR chunk has incorrect length.') + (self.width, self.height, self.bitdepth, self.color_type, + self.compression, self.filter, + self.interlace) = struct.unpack("!2I5B", data) + + check_bitdepth_colortype(self.bitdepth, self.color_type) + + if self.compression != 0: + raise Error("unknown compression method %d" % self.compression) + if self.filter != 0: + raise FormatError("Unknown filter method %d," + " see http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters ." + % self.filter) + if self.interlace not in (0,1): + raise FormatError("Unknown interlace method %d," + " see http://www.w3.org/TR/2003/REC-PNG-20031110/#8InterlaceMethods ." + % self.interlace) + + # Derived values + # http://www.w3.org/TR/PNG/#6Colour-values + colormap = bool(self.color_type & 1) + greyscale = not (self.color_type & 2) + alpha = bool(self.color_type & 4) + color_planes = (3,1)[greyscale or colormap] + planes = color_planes + alpha + + self.colormap = colormap + self.greyscale = greyscale + self.alpha = alpha + self.color_planes = color_planes + self.planes = planes + self.psize = float(self.bitdepth)/float(8) * planes + if int(self.psize) == self.psize: + self.psize = int(self.psize) + self.row_bytes = int(math.ceil(self.width * self.psize)) + # Stores PLTE chunk if present, and is used to check + # chunk ordering constraints. + self.plte = None + # Stores tRNS chunk if present, and is used to check chunk + # ordering constraints. + self.trns = None + # Stores sbit chunk if present. + self.sbit = None + + def _process_PLTE(self, data): + # http://www.w3.org/TR/PNG/#11PLTE + if self.plte: + warnings.warn("Multiple PLTE chunks present.") + self.plte = data + if len(data) % 3 != 0: + raise FormatError( + "PLTE chunk's length should be a multiple of 3.") + if len(data) > (2**self.bitdepth)*3: + raise FormatError("PLTE chunk is too long.") + if len(data) == 0: + raise FormatError("Empty PLTE is not allowed.") + + def _process_bKGD(self, data): + try: + if self.colormap: + if not self.plte: + warnings.warn( + "PLTE chunk is required before bKGD chunk.") + self.background = struct.unpack('B', data) + else: + self.background = struct.unpack("!%dH" % self.color_planes, + data) + except struct.error: + raise FormatError("bKGD chunk has incorrect length.") + + def _process_tRNS(self, data): + # http://www.w3.org/TR/PNG/#11tRNS + self.trns = data + if self.colormap: + if not self.plte: + warnings.warn("PLTE chunk is required before tRNS chunk.") + else: + if len(data) > len(self.plte)/3: + # Was warning, but promoted to Error as it + # would otherwise cause pain later on. + raise FormatError("tRNS chunk is too long.") + else: + if self.alpha: + raise FormatError( + "tRNS chunk is not valid with colour type %d." % + self.color_type) + try: + self.transparent = \ + struct.unpack("!%dH" % self.color_planes, data) + except struct.error: + raise FormatError("tRNS chunk has incorrect length.") + + def _process_gAMA(self, data): + try: + self.gamma = struct.unpack("!L", data)[0] / 100000.0 + except struct.error: + raise FormatError("gAMA chunk has incorrect length.") + + def _process_sBIT(self, data): + self.sbit = data + if (self.colormap and len(data) != 3 or + not self.colormap and len(data) != self.planes): + raise FormatError("sBIT chunk has incorrect length.") + + def _process_pHYs(self, data): + # http://www.w3.org/TR/PNG/#11pHYs + self.phys = data + fmt = "!LLB" + if len(data) != struct.calcsize(fmt): + raise FormatError("pHYs chunk has incorrect length.") + self.x_pixels_per_unit, self.y_pixels_per_unit, unit = struct.unpack(fmt,data) + self.unit_is_meter = bool(unit) + + def read(self, lenient=False): + """ + Read the PNG file and decode it. Returns (`width`, `height`, + `pixels`, `metadata`). + + May use excessive memory. + + `pixels` are returned in boxed row flat pixel format. + + If the optional `lenient` argument evaluates to True, + checksum failures will raise warnings rather than exceptions. + """ + + def iteridat(): + """Iterator that yields all the ``IDAT`` chunks as strings.""" + while True: + try: + type, data = self.chunk(lenient=lenient) + except ValueError as e: + raise ChunkError(e.args[0]) + if type == b'IEND': + # http://www.w3.org/TR/PNG/#11IEND + break + if type != b'IDAT': + continue + # type == b'IDAT' + # http://www.w3.org/TR/PNG/#11IDAT + if self.colormap and not self.plte: + warnings.warn("PLTE chunk is required before IDAT chunk") + yield data + + def iterdecomp(idat): + """Iterator that yields decompressed strings. `idat` should + be an iterator that yields the ``IDAT`` chunk data. + """ + + # Currently, with no max_length parameter to decompress, + # this routine will do one yield per IDAT chunk: Not very + # incremental. + d = zlib.decompressobj() + # Each IDAT chunk is passed to the decompressor, then any + # remaining state is decompressed out. + for data in idat: + # :todo: add a max_length argument here to limit output + # size. + yield array('B', d.decompress(data)) + yield array('B', d.flush()) + + self.preamble(lenient=lenient) + raw = iterdecomp(iteridat()) + + if self.interlace: + raw = array('B', itertools.chain(*raw)) + arraycode = 'BH'[self.bitdepth>8] + # Like :meth:`group` but producing an array.array object for + # each row. + pixels = map(lambda *row: array(arraycode, row), + *[iter(self.deinterlace(raw))]*self.width*self.planes) + else: + pixels = self.iterboxed(self.iterstraight(raw)) + meta = dict() + for attr in 'greyscale alpha planes bitdepth interlace'.split(): + meta[attr] = getattr(self, attr) + meta['size'] = (self.width, self.height) + for attr in 'gamma transparent background'.split(): + a = getattr(self, attr, None) + if a is not None: + meta[attr] = a + if self.plte: + meta['palette'] = self.palette() + return self.width, self.height, pixels, meta + + + def read_flat(self): + """ + Read a PNG file and decode it into flat row flat pixel format. + Returns (*width*, *height*, *pixels*, *metadata*). + + May use excessive memory. + + `pixels` are returned in flat row flat pixel format. + + See also the :meth:`read` method which returns pixels in the + more stream-friendly boxed row flat pixel format. + """ + + x, y, pixel, meta = self.read() + arraycode = 'BH'[meta['bitdepth']>8] + pixel = array(arraycode, itertools.chain(*pixel)) + return x, y, pixel, meta + + def palette(self, alpha='natural'): + """Returns a palette that is a sequence of 3-tuples or 4-tuples, + synthesizing it from the ``PLTE`` and ``tRNS`` chunks. These + chunks should have already been processed (for example, by + calling the :meth:`preamble` method). All the tuples are the + same size: 3-tuples if there is no ``tRNS`` chunk, 4-tuples when + there is a ``tRNS`` chunk. Assumes that the image is colour type + 3 and therefore a ``PLTE`` chunk is required. + + If the `alpha` argument is ``'force'`` then an alpha channel is + always added, forcing the result to be a sequence of 4-tuples. + """ + + if not self.plte: + raise FormatError( + "Required PLTE chunk is missing in colour type 3 image.") + plte = group(array('B', self.plte), 3) + if self.trns or alpha == 'force': + trns = array('B', self.trns or '') + trns.extend([255]*(len(plte)-len(trns))) + plte = list(map(operator.add, plte, group(trns, 1))) + return plte + + def asDirect(self): + """Returns the image data as a direct representation of an + ``x * y * planes`` array. This method is intended to remove the + need for callers to deal with palettes and transparency + themselves. Images with a palette (colour type 3) + are converted to RGB or RGBA; images with transparency (a + ``tRNS`` chunk) are converted to LA or RGBA as appropriate. + When returned in this format the pixel values represent the + colour value directly without needing to refer to palettes or + transparency information. + + Like the :meth:`read` method this method returns a 4-tuple: + + (*width*, *height*, *pixels*, *meta*) + + This method normally returns pixel values with the bit depth + they have in the source image, but when the source PNG has an + ``sBIT`` chunk it is inspected and can reduce the bit depth of + the result pixels; pixel values will be reduced according to + the bit depth specified in the ``sBIT`` chunk (PNG nerds should + note a single result bit depth is used for all channels; the + maximum of the ones specified in the ``sBIT`` chunk. An RGB565 + image will be rescaled to 6-bit RGB666). + + The *meta* dictionary that is returned reflects the `direct` + format and not the original source image. For example, an RGB + source image with a ``tRNS`` chunk to represent a transparent + colour, will have ``planes=3`` and ``alpha=False`` for the + source image, but the *meta* dictionary returned by this method + will have ``planes=4`` and ``alpha=True`` because an alpha + channel is synthesized and added. + + *pixels* is the pixel data in boxed row flat pixel format (just + like the :meth:`read` method). + + All the other aspects of the image data are not changed. + """ + + self.preamble() + + # Simple case, no conversion necessary. + if not self.colormap and not self.trns and not self.sbit: + return self.read() + + x,y,pixels,meta = self.read() + + if self.colormap: + meta['colormap'] = False + meta['alpha'] = bool(self.trns) + meta['bitdepth'] = 8 + meta['planes'] = 3 + bool(self.trns) + plte = self.palette() + def iterpal(pixels): + for row in pixels: + row = [plte[x] for x in row] + yield array('B', itertools.chain(*row)) + pixels = iterpal(pixels) + elif self.trns: + # It would be nice if there was some reasonable way + # of doing this without generating a whole load of + # intermediate tuples. But tuples does seem like the + # easiest way, with no other way clearly much simpler or + # much faster. (Actually, the L to LA conversion could + # perhaps go faster (all those 1-tuples!), but I still + # wonder whether the code proliferation is worth it) + it = self.transparent + maxval = 2**meta['bitdepth']-1 + planes = meta['planes'] + meta['alpha'] = True + meta['planes'] += 1 + typecode = 'BH'[meta['bitdepth']>8] + def itertrns(pixels): + for row in pixels: + # For each row we group it into pixels, then form a + # characterisation vector that says whether each + # pixel is opaque or not. Then we convert + # True/False to 0/maxval (by multiplication), + # and add it as the extra channel. + row = group(row, planes) + opa = map(it.__ne__, row) + opa = map(maxval.__mul__, opa) + opa = list(zip(opa)) # convert to 1-tuples + yield array(typecode, + itertools.chain(*map(operator.add, row, opa))) + pixels = itertrns(pixels) + targetbitdepth = None + if self.sbit: + sbit = struct.unpack('%dB' % len(self.sbit), self.sbit) + targetbitdepth = max(sbit) + if targetbitdepth > meta['bitdepth']: + raise Error('sBIT chunk %r exceeds bitdepth %d' % + (sbit,self.bitdepth)) + if min(sbit) <= 0: + raise Error('sBIT chunk %r has a 0-entry' % sbit) + if targetbitdepth == meta['bitdepth']: + targetbitdepth = None + if targetbitdepth: + shift = meta['bitdepth'] - targetbitdepth + meta['bitdepth'] = targetbitdepth + def itershift(pixels): + for row in pixels: + yield [p >> shift for p in row] + pixels = itershift(pixels) + return x,y,pixels,meta + + def asFloat(self, maxval=1.0): + """Return image pixels as per :meth:`asDirect` method, but scale + all pixel values to be floating point values between 0.0 and + *maxval*. + """ + + x,y,pixels,info = self.asDirect() + sourcemaxval = 2**info['bitdepth']-1 + del info['bitdepth'] + info['maxval'] = float(maxval) + factor = float(maxval)/float(sourcemaxval) + def iterfloat(): + for row in pixels: + yield [factor * p for p in row] + return x,y,iterfloat(),info + + def _as_rescale(self, get, targetbitdepth): + """Helper used by :meth:`asRGB8` and :meth:`asRGBA8`.""" + + width,height,pixels,meta = get() + maxval = 2**meta['bitdepth'] - 1 + targetmaxval = 2**targetbitdepth - 1 + factor = float(targetmaxval) / float(maxval) + meta['bitdepth'] = targetbitdepth + def iterscale(): + for row in pixels: + yield [int(round(x*factor)) for x in row] + if maxval == targetmaxval: + return width, height, pixels, meta + else: + return width, height, iterscale(), meta + + def asRGB8(self): + """Return the image data as an RGB pixels with 8-bits per + sample. This is like the :meth:`asRGB` method except that + this method additionally rescales the values so that they + are all between 0 and 255 (8-bit). In the case where the + source image has a bit depth < 8 the transformation preserves + all the information; where the source image has bit depth + > 8, then rescaling to 8-bit values loses precision. No + dithering is performed. Like :meth:`asRGB`, an alpha channel + in the source image will raise an exception. + + This function returns a 4-tuple: + (*width*, *height*, *pixels*, *metadata*). + *width*, *height*, *metadata* are as per the + :meth:`read` method. + + *pixels* is the pixel data in boxed row flat pixel format. + """ + + return self._as_rescale(self.asRGB, 8) + + def asRGBA8(self): + """Return the image data as RGBA pixels with 8-bits per + sample. This method is similar to :meth:`asRGB8` and + :meth:`asRGBA`: The result pixels have an alpha channel, *and* + values are rescaled to the range 0 to 255. The alpha channel is + synthesized if necessary (with a small speed penalty). + """ + + return self._as_rescale(self.asRGBA, 8) + + def asRGB(self): + """Return image as RGB pixels. RGB colour images are passed + through unchanged; greyscales are expanded into RGB + triplets (there is a small speed overhead for doing this). + + An alpha channel in the source image will raise an + exception. + + The return values are as for the :meth:`read` method + except that the *metadata* reflect the returned pixels, not the + source image. In particular, for this method + ``metadata['greyscale']`` will be ``False``. + """ + + width,height,pixels,meta = self.asDirect() + if meta['alpha']: + raise Error("will not convert image with alpha channel to RGB") + if not meta['greyscale']: + return width,height,pixels,meta + meta['greyscale'] = False + typecode = 'BH'[meta['bitdepth'] > 8] + def iterrgb(): + for row in pixels: + a = array(typecode, [0]) * 3 * width + for i in range(3): + a[i::3] = row + yield a + return width,height,iterrgb(),meta + + def asRGBA(self): + """Return image as RGBA pixels. Greyscales are expanded into + RGB triplets; an alpha channel is synthesized if necessary. + The return values are as for the :meth:`read` method + except that the *metadata* reflect the returned pixels, not the + source image. In particular, for this method + ``metadata['greyscale']`` will be ``False``, and + ``metadata['alpha']`` will be ``True``. + """ + + width,height,pixels,meta = self.asDirect() + if meta['alpha'] and not meta['greyscale']: + return width,height,pixels,meta + typecode = 'BH'[meta['bitdepth'] > 8] + maxval = 2**meta['bitdepth'] - 1 + maxbuffer = struct.pack('=' + typecode, maxval) * 4 * width + def newarray(): + return array(typecode, maxbuffer) + + if meta['alpha'] and meta['greyscale']: + # LA to RGBA + def convert(): + for row in pixels: + # Create a fresh target row, then copy L channel + # into first three target channels, and A channel + # into fourth channel. + a = newarray() + pngfilters.convert_la_to_rgba(row, a) + yield a + elif meta['greyscale']: + # L to RGBA + def convert(): + for row in pixels: + a = newarray() + pngfilters.convert_l_to_rgba(row, a) + yield a + else: + assert not meta['alpha'] and not meta['greyscale'] + # RGB to RGBA + def convert(): + for row in pixels: + a = newarray() + pngfilters.convert_rgb_to_rgba(row, a) + yield a + meta['alpha'] = True + meta['greyscale'] = False + return width,height,convert(),meta + +def check_bitdepth_colortype(bitdepth, colortype): + """Check that `bitdepth` and `colortype` are both valid, + and specified in a valid combination. Returns if valid, + raise an Exception if not valid. + """ + + if bitdepth not in (1,2,4,8,16): + raise FormatError("invalid bit depth %d" % bitdepth) + if colortype not in (0,2,3,4,6): + raise FormatError("invalid colour type %d" % colortype) + # Check indexed (palettized) images have 8 or fewer bits + # per pixel; check only indexed or greyscale images have + # fewer than 8 bits per pixel. + if colortype & 1 and bitdepth > 8: + raise FormatError( + "Indexed images (colour type %d) cannot" + " have bitdepth > 8 (bit depth %d)." + " See http://www.w3.org/TR/2003/REC-PNG-20031110/#table111 ." + % (bitdepth, colortype)) + if bitdepth < 8 and colortype not in (0,3): + raise FormatError("Illegal combination of bit depth (%d)" + " and colour type (%d)." + " See http://www.w3.org/TR/2003/REC-PNG-20031110/#table111 ." + % (bitdepth, colortype)) + +def isinteger(x): + try: + return int(x) == x + except (TypeError, ValueError): + return False + + +# === Support for users without Cython === + +try: + pngfilters +except NameError: + class pngfilters(object): + def undo_filter_sub(filter_unit, scanline, previous, result): + """Undo sub filter.""" + + ai = 0 + # Loops starts at index fu. Observe that the initial part + # of the result is already filled in correctly with + # scanline. + for i in range(filter_unit, len(result)): + x = scanline[i] + a = result[ai] + result[i] = (x + a) & 0xff + ai += 1 + undo_filter_sub = staticmethod(undo_filter_sub) + + def undo_filter_up(filter_unit, scanline, previous, result): + """Undo up filter.""" + + for i in range(len(result)): + x = scanline[i] + b = previous[i] + result[i] = (x + b) & 0xff + undo_filter_up = staticmethod(undo_filter_up) + + def undo_filter_average(filter_unit, scanline, previous, result): + """Undo up filter.""" + + ai = -filter_unit + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = 0 + else: + a = result[ai] + b = previous[i] + result[i] = (x + ((a + b) >> 1)) & 0xff + ai += 1 + undo_filter_average = staticmethod(undo_filter_average) + + def undo_filter_paeth(filter_unit, scanline, previous, result): + """Undo Paeth filter.""" + + # Also used for ci. + ai = -filter_unit + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = c = 0 + else: + a = result[ai] + c = previous[ai] + b = previous[i] + p = a + b - c + pa = abs(p - a) + pb = abs(p - b) + pc = abs(p - c) + if pa <= pb and pa <= pc: + pr = a + elif pb <= pc: + pr = b + else: + pr = c + result[i] = (x + pr) & 0xff + ai += 1 + undo_filter_paeth = staticmethod(undo_filter_paeth) + + def convert_la_to_rgba(row, result): + for i in range(3): + result[i::4] = row[0::2] + result[3::4] = row[1::2] + convert_la_to_rgba = staticmethod(convert_la_to_rgba) + + def convert_l_to_rgba(row, result): + """Convert a grayscale image to RGBA. This method assumes + the alpha channel in result is already correctly + initialized. + """ + for i in range(3): + result[i::4] = row + convert_l_to_rgba = staticmethod(convert_l_to_rgba) + + def convert_rgb_to_rgba(row, result): + """Convert an RGB image to RGBA. This method assumes the + alpha channel in result is already correctly initialized. + """ + for i in range(3): + result[i::4] = row[i::3] + convert_rgb_to_rgba = staticmethod(convert_rgb_to_rgba) + + +# === Command Line Support === + +def read_pam_header(infile): + """ + Read (the rest of a) PAM header. `infile` should be positioned + immediately after the initial 'P7' line (at the beginning of the + second line). Returns are as for `read_pnm_header`. + """ + + # Unlike PBM, PGM, and PPM, we can read the header a line at a time. + header = dict() + while True: + l = infile.readline().strip() + if l == b'ENDHDR': + break + if not l: + raise EOFError('PAM ended prematurely') + if l[0] == b'#': + continue + l = l.split(None, 1) + if l[0] not in header: + header[l[0]] = l[1] + else: + header[l[0]] += b' ' + l[1] + + required = [b'WIDTH', b'HEIGHT', b'DEPTH', b'MAXVAL'] + WIDTH,HEIGHT,DEPTH,MAXVAL = required + present = [x for x in required if x in header] + if len(present) != len(required): + raise Error('PAM file must specify WIDTH, HEIGHT, DEPTH, and MAXVAL') + width = int(header[WIDTH]) + height = int(header[HEIGHT]) + depth = int(header[DEPTH]) + maxval = int(header[MAXVAL]) + if (width <= 0 or + height <= 0 or + depth <= 0 or + maxval <= 0): + raise Error( + 'WIDTH, HEIGHT, DEPTH, MAXVAL must all be positive integers') + return 'P7', width, height, depth, maxval + +def read_pnm_header(infile, supported=(b'P5', b'P6')): + """ + Read a PNM header, returning (format,width,height,depth,maxval). + `width` and `height` are in pixels. `depth` is the number of + channels in the image; for PBM and PGM it is synthesized as 1, for + PPM as 3; for PAM images it is read from the header. `maxval` is + synthesized (as 1) for PBM images. + """ + + # Generally, see http://netpbm.sourceforge.net/doc/ppm.html + # and http://netpbm.sourceforge.net/doc/pam.html + + # Technically 'P7' must be followed by a newline, so by using + # rstrip() we are being liberal in what we accept. I think this + # is acceptable. + type = infile.read(3).rstrip() + if type not in supported: + raise NotImplementedError('file format %s not supported' % type) + if type == b'P7': + # PAM header parsing is completely different. + return read_pam_header(infile) + # Expected number of tokens in header (3 for P4, 4 for P6) + expected = 4 + pbm = (b'P1', b'P4') + if type in pbm: + expected = 3 + header = [type] + + # We have to read the rest of the header byte by byte because the + # final whitespace character (immediately following the MAXVAL in + # the case of P6) may not be a newline. Of course all PNM files in + # the wild use a newline at this point, so it's tempting to use + # readline; but it would be wrong. + def getc(): + c = infile.read(1) + if not c: + raise Error('premature EOF reading PNM header') + return c + + c = getc() + while True: + # Skip whitespace that precedes a token. + while c.isspace(): + c = getc() + # Skip comments. + while c == '#': + while c not in b'\n\r': + c = getc() + if not c.isdigit(): + raise Error('unexpected character %s found in header' % c) + # According to the specification it is legal to have comments + # that appear in the middle of a token. + # This is bonkers; I've never seen it; and it's a bit awkward to + # code good lexers in Python (no goto). So we break on such + # cases. + token = b'' + while c.isdigit(): + token += c + c = getc() + # Slight hack. All "tokens" are decimal integers, so convert + # them here. + header.append(int(token)) + if len(header) == expected: + break + # Skip comments (again) + while c == '#': + while c not in '\n\r': + c = getc() + if not c.isspace(): + raise Error('expected header to end with whitespace, not %s' % c) + + if type in pbm: + # synthesize a MAXVAL + header.append(1) + depth = (1,3)[type == b'P6'] + return header[0], header[1], header[2], depth, header[3] + +def write_pnm(file, width, height, pixels, meta): + """Write a Netpbm PNM/PAM file. + """ + + bitdepth = meta['bitdepth'] + maxval = 2**bitdepth - 1 + # Rudely, the number of image planes can be used to determine + # whether we are L (PGM), LA (PAM), RGB (PPM), or RGBA (PAM). + planes = meta['planes'] + # Can be an assert as long as we assume that pixels and meta came + # from a PNG file. + assert planes in (1,2,3,4) + if planes in (1,3): + if 1 == planes: + # PGM + # Could generate PBM if maxval is 1, but we don't (for one + # thing, we'd have to convert the data, not just blat it + # out). + fmt = 'P5' + else: + # PPM + fmt = 'P6' + header = '%s %d %d %d\n' % (fmt, width, height, maxval) + if planes in (2,4): + # PAM + # See http://netpbm.sourceforge.net/doc/pam.html + if 2 == planes: + tupltype = 'GRAYSCALE_ALPHA' + else: + tupltype = 'RGB_ALPHA' + header = ('P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\n' + 'TUPLTYPE %s\nENDHDR\n' % + (width, height, planes, maxval, tupltype)) + file.write(header.encode('ascii')) + # Values per row + vpr = planes * width + # struct format + fmt = '>%d' % vpr + if maxval > 0xff: + fmt = fmt + 'H' + else: + fmt = fmt + 'B' + for row in pixels: + file.write(struct.pack(fmt, *row)) + file.flush() + +def color_triple(color): + """ + Convert a command line colour value to a RGB triple of integers. + FIXME: Somewhere we need support for greyscale backgrounds etc. + """ + if color.startswith('#') and len(color) == 4: + return (int(color[1], 16), + int(color[2], 16), + int(color[3], 16)) + if color.startswith('#') and len(color) == 7: + return (int(color[1:3], 16), + int(color[3:5], 16), + int(color[5:7], 16)) + elif color.startswith('#') and len(color) == 13: + return (int(color[1:5], 16), + int(color[5:9], 16), + int(color[9:13], 16)) + +def _add_common_options(parser): + """Call *parser.add_option* for each of the options that are + common between this PNG--PNM conversion tool and the gen + tool. + """ + parser.add_option("-i", "--interlace", + default=False, action="store_true", + help="create an interlaced PNG file (Adam7)") + parser.add_option("-t", "--transparent", + action="store", type="string", metavar="#RRGGBB", + help="mark the specified colour as transparent") + parser.add_option("-b", "--background", + action="store", type="string", metavar="#RRGGBB", + help="save the specified background colour") + parser.add_option("-g", "--gamma", + action="store", type="float", metavar="value", + help="save the specified gamma value") + parser.add_option("-c", "--compression", + action="store", type="int", metavar="level", + help="zlib compression level (0-9)") + return parser + +def _main(argv): + """ + Run the PNG encoder with options from the command line. + """ + + # Parse command line arguments + from optparse import OptionParser + version = '%prog ' + __version__ + parser = OptionParser(version=version) + parser.set_usage("%prog [options] [imagefile]") + parser.add_option('-r', '--read-png', default=False, + action='store_true', + help='Read PNG, write PNM') + parser.add_option("-a", "--alpha", + action="store", type="string", metavar="pgmfile", + help="alpha channel transparency (RGBA)") + _add_common_options(parser) + + (options, args) = parser.parse_args(args=argv[1:]) + + # Convert options + if options.transparent is not None: + options.transparent = color_triple(options.transparent) + if options.background is not None: + options.background = color_triple(options.background) + + # Prepare input and output files + if len(args) == 0: + infilename = '-' + infile = sys.stdin + elif len(args) == 1: + infilename = args[0] + infile = open(infilename, 'rb') + else: + parser.error("more than one input file") + outfile = sys.stdout + if sys.platform == "win32": + import msvcrt, os + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) + + if options.read_png: + # Encode PNG to PPM + png = Reader(file=infile) + width,height,pixels,meta = png.asDirect() + write_pnm(outfile, width, height, pixels, meta) + else: + # Encode PNM to PNG + format, width, height, depth, maxval = \ + read_pnm_header(infile, (b'P5',b'P6',b'P7')) + # When it comes to the variety of input formats, we do something + # rather rude. Observe that L, LA, RGB, RGBA are the 4 colour + # types supported by PNG and that they correspond to 1, 2, 3, 4 + # channels respectively. So we use the number of channels in + # the source image to determine which one we have. We do not + # care about TUPLTYPE. + greyscale = depth <= 2 + pamalpha = depth in (2,4) + supported = [2**x-1 for x in range(1,17)] + try: + mi = supported.index(maxval) + except ValueError: + raise NotImplementedError( + 'your maxval (%s) not in supported list %s' % + (maxval, str(supported))) + bitdepth = mi+1 + writer = Writer(width, height, + greyscale=greyscale, + bitdepth=bitdepth, + interlace=options.interlace, + transparent=options.transparent, + background=options.background, + alpha=bool(pamalpha or options.alpha), + gamma=options.gamma, + compression=options.compression) + if options.alpha: + pgmfile = open(options.alpha, 'rb') + format, awidth, aheight, adepth, amaxval = \ + read_pnm_header(pgmfile, 'P5') + if amaxval != '255': + raise NotImplementedError( + 'maxval %s not supported for alpha channel' % amaxval) + if (awidth, aheight) != (width, height): + raise ValueError("alpha channel image size mismatch" + " (%s has %sx%s but %s has %sx%s)" + % (infilename, width, height, + options.alpha, awidth, aheight)) + writer.convert_ppm_and_pgm(infile, pgmfile, outfile) + else: + writer.convert_pnm(infile, outfile) + + +if __name__ == '__main__': + try: + _main(sys.argv) + except Error as e: + print(e, file=sys.stderr) 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 <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdbool.h> +#include <getopt.h> + +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; +} |