diff options
author | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-30 10:04:13 -0400 |
---|---|---|
committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-30 10:04:13 -0400 |
commit | ae723a065537be412cd152e81c72e53ebe3aaac3 (patch) | |
tree | c2da2491dd0beb9d16f8f73dbfcaaf03782a9dab | |
parent | 0cf9f485b14d7431ff2a976e7fac491b2369c726 (diff) |
Cerulean Bike Shop
-rw-r--r-- | data/map_header_banks.asm | 2 | ||||
-rw-r--r-- | data/map_header_pointers.asm | 2 | ||||
-rwxr-xr-x | main.asm | 8 | ||||
-rwxr-xr-x | scripts/bikeshop.asm | 23 | ||||
-rw-r--r-- | text/maps/bike_shop.asm | 2 |
5 files changed, 24 insertions, 13 deletions
diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index 9e0e0e20..70558042 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -66,7 +66,7 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db BANK(CeruleanHouse1_h) db BANK(CeruleanPokecenter_h) db BANK(CeruleanGym_h) - db $07 ; db BANK(BikeShop_h) + db BANK(BikeShop_h) db $17 ; db BANK(CeruleanMart_h) db $12 ; db BANK(MtMoonPokecenter_h) db BANK(CeruleanHouseTrashed_h) diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index 599fecb2..362f9fa2 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -66,7 +66,7 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw CeruleanHouse1_h dw CeruleanPokecenter_h dw CeruleanGym_h - dw $5038 ; dw BikeShop_h + dw BikeShop_h dw $4757 ; dw CeruleanMart_h dw $52a9 ; dw MtMoonPokecenter_h dw CeruleanHouseTrashed_h ; copy @@ -352,7 +352,13 @@ INCLUDE "data/mapObjects/ceruleanhousetrashed.asm" INCLUDE "data/mapHeaders/ceruleanhouse1.asm" INCLUDE "scripts/ceruleanhouse1.asm" INCLUDE "data/mapObjects/ceruleanhouse1.asm" - dr $1d038,$1d7ae ; map scripts + +INCLUDE "data/mapHeaders/bikeshop.asm" +INCLUDE "scripts/bikeshop.asm" +INCLUDE "data/mapObjects/bikeshop.asm" +BikeShopBlocks: +INCBIN "maps/bikeshop.blk" + dr $1d1a4,$1d7ae ; map scripts INCLUDE "data/mapHeaders/diglettscaveroute2.asm" INCLUDE "scripts/diglettscaveroute2.asm" diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index e639caf9..5723849d 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -1,5 +1,6 @@ BikeShopScript: ; 1d73c (7:573c) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret BikeShopTextPointers: ; 1d73f (7:573f) dw BikeShopText1 @@ -13,6 +14,7 @@ BikeShopText1: ; 1d745 (7:5745) ld hl, BikeShopText_1d82f call PrintText jp .Done + .asm_260d4 ld b, BIKE_VOUCHER call IsItemInBag @@ -29,10 +31,12 @@ BikeShopText1: ; 1d745 (7:5745) ld hl, BikeShopText_1d824 call PrintText jr .Done + .BagFull ld hl, BikeShopText_1d834 call PrintText jr .Done + .asm_41190 ld hl, BikeShopText_1d810 call PrintText @@ -50,8 +54,7 @@ BikeShopText1: ; 1d745 (7:5745) ld hl, wd730 set 6, [hl] coord hl, 0, 0 - ld b, $4 - ld c, $f + lb bc, 4, 15 call TextBoxBorder call UpdateSprites coord hl, 2, 2 @@ -62,11 +65,12 @@ BikeShopText1: ; 1d745 (7:5745) call PlaceString ld hl, BikeShopText_1d815 call PrintText - call HandleMenuInput - bit 1, a - jr nz, .cancel + ; This fixes the bike shop instatext glitch ld hl, wd730 res 6, [hl] + call HandleMenuInput + bit BIT_B_BUTTON, a + jr nz, .cancel ld a, [wCurrentMenuItem] and a jr nz, .cancel @@ -94,7 +98,7 @@ BikeShopText_1d815: ; 1d815 (7:5815) db "@" BikeShopCantAffordText: ; 1d81a (7:581a) - TX_FAR _BikeShopCantAffordText + TX_FAR _BikeShopText_1d81a db "@" BikeShopText_1d81f: ; 1d81f (7:581f) @@ -103,10 +107,11 @@ BikeShopText_1d81f: ; 1d81f (7:581f) BikeShopText_1d824: ; 1d824 (7:5824) TX_FAR _BikeShopText_1d824 - db $11, "@" + TX_SFX_KEY_ITEM + db "@" BikeShopComeAgainText: ; 1d82a (7:582a) - TX_FAR _BikeShopComeAgainText + TX_FAR _BikeShopText_1d82a db "@" BikeShopText_1d82f: ; 1d82f (7:582f) diff --git a/text/maps/bike_shop.asm b/text/maps/bike_shop.asm index 252dffdc..723021a1 100644 --- a/text/maps/bike_shop.asm +++ b/text/maps/bike_shop.asm @@ -25,7 +25,7 @@ _BikeShopText_1d81f:: prompt _BikeShopText_1d824:: - text $52, " exchanged" + text "<PLAYER> exchanged" line "the BIKE VOUCHER" cont "for a BICYCLE.@@" |