From 8abddd138c6aac54b3e1eb5c16d24fe6ce4b9c29 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Thu, 26 May 2016 11:51:19 -0400 Subject: Include Cerulean City --- maps/route4.blk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'maps') diff --git a/maps/route4.blk b/maps/route4.blk index cb6a6a74..11fefc62 100644 --- a/maps/route4.blk +++ b/maps/route4.blk @@ -61,4 +61,4 @@ N -,,)>??,,,,,,,,,,,?????????????????????;tt \ No newline at end of file +,,)>??,,,,,,,,,,,?????????????????????;tt \ No newline at end of file -- cgit v1.3.1-sl0p From d9e7b91cb3a77891901974f65104dca2fc286ab7 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Fri, 27 May 2016 18:13:32 -0400 Subject: Route 20 scripts and route 19 blocks --- constants/hide_show_constants.asm | 2 ++ data/map_header_banks.asm | 2 +- data/map_header_pointers.asm | 2 +- main.asm | 12 ++++++------ maps/route19.blk | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) (limited to 'maps') diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index db37b9d9..fc8ab90f 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -226,6 +226,8 @@ const_value SET $7c ; idk anymore lol const HS_VICTORY_ROAD_1_ITEM_1 ; D6 const HS_VICTORY_ROAD_1_ITEM_2 ; D7 const HS_CHAMPIONS_ROOM_OAK ; D8 + +const_value SET $df const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; D9 const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; DA const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; DB diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index e75d32b5..a9de3dff 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -31,7 +31,7 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db $15 ; db BANK(Route17_h) ; ROUTE_17 db $16 ; db BANK(Route18_h) ; ROUTE_18 db $15 ; db BANK(Route19_h) ; ROUTE_19 - db $14 ; db BANK(Route20_h) ; ROUTE_20 + db BANK(Route20_h) ; ROUTE_20 db BANK(Route21_h) ; ROUTE_21 db BANK(Route22_h) ; ROUTE_22 db BANK(Route23_h) ; ROUTE_23 diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index 0de20020..d6672bbe 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -31,7 +31,7 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw $4b28 ; dw Route17_h dw $4c38 ; dw Route18_h dw $4e80 ; dw Route19_h - dw $40f1 ; dw Route20_h + dw Route20_h dw Route21_h dw Route22_h dw Route23_h diff --git a/main.asm b/main.asm index 5c85df92..b988997b 100755 --- a/main.asm +++ b/main.asm @@ -780,9 +780,8 @@ INCLUDE "data/mapHeaders/route22.asm" INCLUDE "data/mapObjects/route22.asm" Route22Blocks: INCBIN "maps/route22.blk" -; INCLUDE "data/mapHeaders/route20.asm" -; INCLUDE "data/mapObjects/route20.asm" - dr $500f1,$5017d +INCLUDE "data/mapHeaders/route20.asm" +INCLUDE "data/mapObjects/route20.asm" Route20Blocks: INCBIN "maps/route20.blk" @@ -813,8 +812,7 @@ INCLUDE "data/mapObjects/saffroncity.asm" SaffronCityBlocks: ; 50a98 (14:4a98) INCBIN "maps/saffroncity.blk" INCLUDE "scripts/saffroncity.asm" -; INCLUDE "scripts/route20.asm" - dr $50ca9,$50eb2 +INCLUDE "scripts/route20.asm" INCLUDE "scripts/route22.asm" INCLUDE "scripts/route23.asm" INCLUDE "scripts/route24.asm" @@ -858,7 +856,9 @@ INCBIN "maps/route5.blk" dr $5468e,$54706 Route9Blocks: ; 54706 INCBIN "maps/route9.blk" - dr $54814,$5500f + dr $54814,$54f01 +Route19Blocks: +INCBIN "maps/route19.blk" INCLUDE "data/mapHeaders/route21.asm" INCLUDE "data/mapObjects/route21.asm" Route21Blocks: ; 5507d diff --git a/maps/route19.blk b/maps/route19.blk index 0bd469e7..3fc58494 100644 --- a/maps/route19.blk +++ b/maps/route19.blk @@ -1 +1 @@ -(,)(,)(,)$W%$W%CCC11111CCk1111kkCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCkkkkkkkkk \ No newline at end of file +(,)(,)(,)$W%$W%CCC11111CCC111CCk1111kkCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCkkkkkkkkk \ No newline at end of file -- cgit v1.3.1-sl0p From 40fce3a7d2959eaa2eaf38b3b9ff2bfc583c6e8d Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 17:16:06 -0400 Subject: Viridian pokecenter --- data/mapObjects/viridianpokecenter.asm | 5 +++-- data/map_header_banks.asm | 4 ++-- data/map_header_pointers.asm | 4 ++-- main.asm | 20 +++++++++++++++++--- maps/celadonpokecenter.blk | 2 +- maps/ceruleanpokecenter.blk | 2 +- maps/cinnabarpokecenter.blk | 2 +- maps/fuchsiapokecenter.blk | 2 +- maps/lavenderpokecenter.blk | 2 +- maps/mtmoonpokecenter.blk | 2 +- maps/pewterpokecenter.blk | 2 +- maps/rocktunnelpokecenter.blk | 2 +- maps/saffronpokecenter.blk | 2 +- maps/vermilionpokecenter.blk | 2 +- maps/viridianpokecenter.blk | 2 +- scripts/viridianpokecenter.asm | 6 ++++++ 16 files changed, 41 insertions(+), 20 deletions(-) (limited to 'maps') diff --git a/data/mapObjects/viridianpokecenter.asm b/data/mapObjects/viridianpokecenter.asm index 652efb97..74c27d46 100755 --- a/data/mapObjects/viridianpokecenter.asm +++ b/data/mapObjects/viridianpokecenter.asm @@ -7,11 +7,12 @@ ViridianPokecenterObject: ; 0x44277 (size=44) db $0 ; signs - db $4 ; objects + 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, NONE, $3 ; 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 ; warp-to EVENT_DISP VIRIDIAN_POKECENTER_WIDTH, $7, $3 diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index 94393e3e..2b901ed5 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -40,8 +40,8 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db BANK(RedsHouse1F_h) db BANK(RedsHouse2F_h) db BANK(BluesHouse_h) - db $07 ; db BANK(OaksLab_h) - db $11 ; db BANK(ViridianPokecenter_h) + db BANK(OaksLab_h) + db BANK(ViridianPokecenter_h) db $07 ; db BANK(ViridianMart_h) db $07 ; db BANK(School_h) db $07 ; db BANK(ViridianHouse_h) diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index eed956bf..9d358b2d 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -40,8 +40,8 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw RedsHouse1F_h dw RedsHouse2F_h dw BluesHouse_h - dw $4386 ; dw OaksLab_h ;id=40 - dw $4251 ; dw ViridianPokecenter_h + dw OaksLab_h ;id=40 + dw ViridianPokecenter_h dw $4c6e ; dw ViridianMart_h dw $4d6d ; dw School_h dw $4dc6 ; dw ViridianHouse_h diff --git a/main.asm b/main.asm index d80a7939..926e8984 100755 --- a/main.asm +++ b/main.asm @@ -696,14 +696,28 @@ INCLUDE "data/mapHeaders/lavendertown.asm" INCLUDE "data/mapObjects/lavendertown.asm" LavenderTownBlocks: INCBIN "maps/lavendertown.blk" - dr $440df,$4410b +ViridianPokecenterBlocks: +PewterPokecenterBlocks: +CeruleanPokecenterBlocks: +VermilionPokecenterBlocks: +SaffronPokecenterBlocks: +LavenderPokecenterBlocks: +CeladonPokecenterBlocks: +FuchsiaPokecenterBlocks: +CinnabarPokecenterBlocks: +MtMoonPokecenterBlocks: +RockTunnelPokecenterBlocks: +INCBIN "maps/viridianpokecenter.blk" + dr $440fb,$4410b INCLUDE "scripts/lavendertown.asm" - ; dr $440df,$44169 INCLUDE "engine/pokedex_rating.asm" - dr $44251,$443b7 +INCLUDE "data/mapHeaders/viridianpokecenter.asm" +INCLUDE "scripts/viridianpokecenter.asm" +INCLUDE "data/mapObjects/viridianpokecenter.asm" + dr $442b7,$443b7 Mansion1Script_Switches: dr $443b7,$45077 LoadSpinnerArrowTiles: ; 45077 (11:5077) diff --git a/maps/celadonpokecenter.blk b/maps/celadonpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/celadonpokecenter.blk +++ b/maps/celadonpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/ceruleanpokecenter.blk b/maps/ceruleanpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/ceruleanpokecenter.blk +++ b/maps/ceruleanpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/cinnabarpokecenter.blk b/maps/cinnabarpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/cinnabarpokecenter.blk +++ b/maps/cinnabarpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/fuchsiapokecenter.blk b/maps/fuchsiapokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/fuchsiapokecenter.blk +++ b/maps/fuchsiapokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/lavenderpokecenter.blk b/maps/lavenderpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/lavenderpokecenter.blk +++ b/maps/lavenderpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/mtmoonpokecenter.blk b/maps/mtmoonpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/mtmoonpokecenter.blk +++ b/maps/mtmoonpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/pewterpokecenter.blk b/maps/pewterpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/pewterpokecenter.blk +++ b/maps/pewterpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/rocktunnelpokecenter.blk b/maps/rocktunnelpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/rocktunnelpokecenter.blk +++ b/maps/rocktunnelpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/saffronpokecenter.blk b/maps/saffronpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/saffronpokecenter.blk +++ b/maps/saffronpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/vermilionpokecenter.blk b/maps/vermilionpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/vermilionpokecenter.blk +++ b/maps/vermilionpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/maps/viridianpokecenter.blk b/maps/viridianpokecenter.blk index 9641efe4..dd54efd9 100644 --- a/maps/viridianpokecenter.blk +++ b/maps/viridianpokecenter.blk @@ -1,2 +1,2 @@ -  !"# +  '"#  \ No newline at end of file diff --git a/scripts/viridianpokecenter.asm b/scripts/viridianpokecenter.asm index ae5e32c8..f8aed602 100755 --- a/scripts/viridianpokecenter.asm +++ b/scripts/viridianpokecenter.asm @@ -7,6 +7,7 @@ ViridianPokecenterTextPointers: ; 44263 (11:4263) dw ViridianPokeCenterText2 dw ViridianPokeCenterText3 dw ViridianPokeCenterText4 + dw ViridianPokeCenterText5 ViridianPokeCenterText1: ; 4426b (11:426b) db $ff @@ -21,3 +22,8 @@ ViridianPokeCenterText3: ; 44271 (11:4271) ViridianPokeCenterText4: ; 44276 (11:4276) db $f6 + +ViridianPokeCenterText5: + TX_ASM + callab Func_f0f12 + jp TextScriptEnd -- cgit v1.3.1-sl0p From c93574436f30106fd2211abea452fe3a96948211 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 17:43:51 -0400 Subject: Viridian Mart --- constants/event_macros.asm | 21 +++++++++++++++++++++ constants/hide_show_constants.asm | 2 +- data/map_header_banks.asm | 2 +- data/map_header_pointers.asm | 2 +- main.asm | 15 ++++++++++++++- maps/ceruleanmart.blk | 2 +- maps/cinnabarmart.blk | 2 +- maps/fuchsiamart.blk | 2 +- maps/lavendermart.blk | 2 +- maps/pewtermart.blk | 2 +- maps/saffronmart.blk | 2 +- maps/vermilionmart.blk | 2 +- maps/viridianmart.blk | 2 +- scripts/viridianmart.asm | 16 ++++++++++++++-- 14 files changed, 60 insertions(+), 14 deletions(-) (limited to 'maps') diff --git a/constants/event_macros.asm b/constants/event_macros.asm index 9f24ace7..5eb73147 100644 --- a/constants/event_macros.asm +++ b/constants/event_macros.asm @@ -125,6 +125,27 @@ CheckAndResetEventA: MACRO ld [wEventFlags + ((\1) / 8)], a ENDM +CheckAndSetEventReuseHL: MACRO + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + bit (\1) % 8, [hl] + set (\1) % 8, [hl] + ENDM + +CheckAndResetEventReuseHL: MACRO + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + bit (\1) % 8, [hl] + res (\1) % 8, [hl] + ENDM + + ;\1 = event index SetEvent: MACRO event_byte = ((\1) / 8) diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 5a6347d5..9481466e 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -8,7 +8,7 @@ const_value = 0 const HS_PALLET_TOWN_OAK ; 00 const HS_LYING_OLD_MAN ; 01 - const HS_PERSON_02 ; 02 + const HS_OLD_MAN_1 ; 02 const HS_OLD_MAN ; 03 const HS_MUSEUM_GUY ; 04 const HS_GYM_GUY ; 05 diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index 2b901ed5..dbe4d15f 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -42,7 +42,7 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db BANK(BluesHouse_h) db BANK(OaksLab_h) db BANK(ViridianPokecenter_h) - db $07 ; db BANK(ViridianMart_h) + db BANK(ViridianMart_h) db $07 ; db BANK(School_h) db $07 ; db BANK(ViridianHouse_h) db $1d ; db BANK(ViridianGym_h) diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index 9d358b2d..e3edc139 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -42,7 +42,7 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw BluesHouse_h dw OaksLab_h ;id=40 dw ViridianPokecenter_h - dw $4c6e ; dw ViridianMart_h + dw ViridianMart_h dw $4d6d ; dw School_h dw $4dc6 ; dw ViridianHouse_h dw $40d4 ; dw ViridianGym_h diff --git a/main.asm b/main.asm index 926e8984..325bcdbe 100755 --- a/main.asm +++ b/main.asm @@ -304,7 +304,20 @@ INCLUDE "data/mapHeaders/oakslab.asm" INCLUDE "scripts/oakslab.asm" INCLUDE "data/mapObjects/oakslab.asm" - dr $1cc6e,$1e2ae ; map scripts +INCLUDE "data/mapHeaders/viridianmart.asm" +INCLUDE "scripts/viridianmart.asm" +INCLUDE "data/mapObjects/viridianmart.asm" +ViridianMartBlocks: +PewterMartBlocks: +CeruleanMartBlocks: +VermilionMartBlocks: +LavenderMartBlocks: +CeladonMartBlocks: +SaffronMartBlocks: +FuchsiaMartBlocks: +CinnabarMartBlocks: +INCBIN "maps/viridianmart.blk" + dr $1cd6d,$1e2ae ; map scripts INCLUDE "engine/menu/oaks_pc.asm" diff --git a/maps/ceruleanmart.blk b/maps/ceruleanmart.blk index 1da8fffc..62385406 100644 --- a/maps/ceruleanmart.blk +++ b/maps/ceruleanmart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/maps/cinnabarmart.blk b/maps/cinnabarmart.blk index 1da8fffc..62385406 100644 --- a/maps/cinnabarmart.blk +++ b/maps/cinnabarmart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/maps/fuchsiamart.blk b/maps/fuchsiamart.blk index 1da8fffc..62385406 100644 --- a/maps/fuchsiamart.blk +++ b/maps/fuchsiamart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/maps/lavendermart.blk b/maps/lavendermart.blk index 1da8fffc..62385406 100644 --- a/maps/lavendermart.blk +++ b/maps/lavendermart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/maps/pewtermart.blk b/maps/pewtermart.blk index 1da8fffc..62385406 100644 --- a/maps/pewtermart.blk +++ b/maps/pewtermart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/maps/saffronmart.blk b/maps/saffronmart.blk index 1da8fffc..62385406 100644 --- a/maps/saffronmart.blk +++ b/maps/saffronmart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/maps/vermilionmart.blk b/maps/vermilionmart.blk index 1da8fffc..62385406 100644 --- a/maps/vermilionmart.blk +++ b/maps/vermilionmart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/maps/viridianmart.blk b/maps/viridianmart.blk index 1da8fffc..62385406 100644 --- a/maps/viridianmart.blk +++ b/maps/viridianmart.blk @@ -1 +1 @@ -   \ No newline at end of file + %  \ No newline at end of file diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index 8d974abc..05e566fb 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -3,7 +3,8 @@ ViridianMartScript: ; 1d46e (7:546e) call EnableAutoTextBoxDrawing ld hl, ViridianMartScriptPointers ld a, [W_VIRIDIANMARKETCURSCRIPT] - jp JumpTable + call JumpTable + ret ViridianMartScript_1d47d: ; 1d47d (7:547d) CheckEvent EVENT_OAK_GOT_PARCEL @@ -57,8 +58,19 @@ ViridianMartScript1: ; 1d4c0 (7:54c0) SetEvent EVENT_GOT_OAKS_PARCEL ld a, $2 ld [W_VIRIDIANMARKETCURSCRIPT], a - ; fallthrough + ret + ViridianMartScript2: ; 1d4df (7:54df) + CheckEventHL EVENT_02D + ret z + CheckAndSetEventReuseHL EVENT_02C + ret nz + ld a, HS_OLD_MAN + ld [wMissableObjectIndex], a + predef HideObject + ld a, HS_OLD_MAN_1 + ld [wMissableObjectIndex], a + predef ShowObject ret ViridianMartTextPointers: ; 1d4e0 (7:54e0) -- cgit v1.3.1-sl0p