From ce639816996d908de0a197b62c08d3a63846a512 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Thu, 26 May 2016 18:24:54 -0400 Subject: Final phase 3 of Viridian City script disassembly --- text/maps/viridian_city.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'text/maps') diff --git a/text/maps/viridian_city.asm b/text/maps/viridian_city.asm index 4459acb8..a9a2184e 100644 --- a/text/maps/viridian_city.asm +++ b/text/maps/viridian_city.asm @@ -1,4 +1,4 @@ -_ViridianCityText_19219:: +_ViridianCityText_19219:: ; 2d:4478 text "First, you need" line "to weaken the" cont "target #MON." -- cgit v1.3.1-sl0p From 40f0dba6c17116c61ce4935663bf1a79485edee9 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Fri, 27 May 2016 09:22:38 -0400 Subject: Route 24 scripts --- constants/event_constants.asm | 2 +- data/mapObjects/route24.asm | 3 +- home/text.asm | 440 +++++++++++++++++++++--------------------- macros.asm | 4 + main.asm | 19 +- scripts/route24.asm | 64 +++++- text/maps/route_24.asm | 28 +++ text/maps/route_25.asm | 28 --- 8 files changed, 333 insertions(+), 255 deletions(-) (limited to 'text/maps') diff --git a/constants/event_constants.asm b/constants/event_constants.asm index 491f8664..b0c67e4b 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -5,7 +5,7 @@ const_value = 0 const EVENT_002 ; 002, (D747, bit 2) const EVENT_HALL_OF_FAME_DEX_RATING ; 003, (D747, bit 3) const EVENT_004 ; 004, (D747, bit 4) - const EVENT_PLAYER_AT_RIGHT_EXIT_TO_PALLET_TOWN ; 005, (D747, bit 5) + const EVENT_PLAYER_AT_RIGHT_EXIT_TO_PALLET_TOWN ; 005, (D747, bit 5) const EVENT_PALLET_AFTER_GETTING_POKEBALLS ; 006, (D747, bit 6) const EVENT_007 ; 007, (D747, bit 7) const EVENT_008 ; 008, (D748, bit 0) diff --git a/data/mapObjects/route24.asm b/data/mapObjects/route24.asm index f8173c9d..115f08d3 100755 --- a/data/mapObjects/route24.asm +++ b/data/mapObjects/route24.asm @@ -5,7 +5,7 @@ Route24Object: ; 0x506a4 (size=67) db $0 ; signs - db $8 ; objects + 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 @@ -14,3 +14,4 @@ Route24Object: ; 0x506a4 (size=67) 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 diff --git a/home/text.asm b/home/text.asm index da20a833..437a5c79 100644 --- a/home/text.asm +++ b/home/text.asm @@ -18,7 +18,7 @@ TextBoxBorder:: ; 16f0 (0:16f0) .next push hl ld a, "│" - ld [hli],a + ld [hli], a ld a, " " call NPlaceChar ld [hl], "│" @@ -49,32 +49,32 @@ NPlaceChar:: ; 171d (0:171d) PlaceString:: ; 1723 (0:1723) push hl PlaceNextChar:: ; 1724 (0:1724) - ld a,[de] + ld a, [de] cp "@" - jr nz,Char4ETest - ld b,h - ld c,l + jr nz, Char4ETest + ld b, h + ld c, l pop hl ret Char4ETest:: ; 172d (0:172d) cp $4E - jr nz,.next - ld bc,$0028 - ld a,[hFlags_0xFFFA] - bit 2,a - jr z,.next2 - ld bc,SCREEN_WIDTH + jr nz, .next + ld bc, $0028 + ld a, [hFlags_0xFFFA] + bit 2, a + jr z, .next2 + ld bc, SCREEN_WIDTH .next2 pop hl - add hl,bc + add hl, bc push hl jp PlaceNextChar_inc ; 17b6 .next cp $4F - jr nz,.next3 + jr nz, .next3 pop hl coord hl, 1, 16 push hl @@ -82,56 +82,56 @@ Char4ETest:: ; 172d (0:172d) .next3 ; Check against a dictionary and a - jp z,Char00 + jp z, Char00 cp $4C - jp z,Char4C + jp z, Char4C cp $4B - jp z,Char4B + jp z, Char4B cp $51 - jp z,Char51 + jp z, Char51 cp $49 - jp z,Char49 + jp z, Char49 cp $52 - jp z,Char52 + jp z, Char52 cp $53 - jp z,Char53 + jp z, Char53 cp $54 - jp z,Char54 + jp z, Char54 cp $5B - jp z,Char5B + jp z, Char5B cp $5E - jp z,Char5E + jp z, Char5E cp $5C - jp z,Char5C + jp z, Char5C cp $5D - jp z,Char5D + jp z, Char5D cp $55 - jp z,Char55 + jp z, Char55 cp $56 - jp z,Char56 + jp z, Char56 cp $57 - jp z,Char57 + jp z, Char57 cp $58 - jp z,Char58 + jp z, Char58 cp $4A - jp z,Char4A + jp z, Char4A cp $5F - jp z,Char5F + jp z, Char5F cp $59 - jp z,Char59 + jp z, Char59 cp $5A - jp z,Char5A - ld [hli],a + jp z, Char5A + ld [hli], a call PrintLetterDelay PlaceNextChar_inc:: ; 17b6 (0:17b6) inc de jp PlaceNextChar Char00:: ; 17ba (0:17ba) - ld b,h - ld c,l + ld b, h + ld c, l pop hl - ld de,Char00Text + ld de, Char00Text dec de ret @@ -141,47 +141,47 @@ Char00Text:: ; 17c2 (0:17c2) ; “%d ERROR.” Char52:: ; 17c7 (0:17c7) ; player’s name push de - ld de,wPlayerName + ld de, wPlayerName jr FinishDTE Char53:: ; 17cd (0:17cd) ; rival’s name push de - ld de,wRivalName + ld de, wRivalName jr FinishDTE Char5D:: ; 17d3 (0:17d3) ; TRAINER push de - ld de,Char5DText + ld de, Char5DText jr FinishDTE Char5C:: ; 17d9 (0:17d9) ; TM push de - ld de,Char5CText + ld de, Char5CText jr FinishDTE Char5B:: ; 17df (0:17df) ; PC push de - ld de,Char5BText + ld de, Char5BText jr FinishDTE Char5E:: ; 17e5 (0:17e5) ; ROCKET push de - ld de,Char5EText + ld de, Char5EText jr FinishDTE Char54:: ; 17eb (0:17eb) ; POKé push de - ld de,Char54Text + ld de, Char54Text jr FinishDTE Char56:: ; 17f1 (0:17f1) ; …… push de - ld de,Char56Text + ld de, Char56Text jr FinishDTE Char4A:: ; 17f7 (0:17f7) ; PKMN push de - ld de,Char4AText + ld de, Char4AText jr FinishDTE Char59:: ; 17fb (0:17fb) @@ -190,7 +190,7 @@ Char59:: ; 17fb (0:17fb) ; or ; player active monster’s name ; (like Char5A but flipped) - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] xor 1 jr MonsterNameCharsCommon @@ -199,26 +199,26 @@ Char5A:: ; 1803 (0:1803) ; player active monster’s name ; or ; enemy active monster’s name, prefixed with “Enemy ” - ld a,[H_WHOSETURN] + ld a, [H_WHOSETURN] MonsterNameCharsCommon:: ; 1a37 (0:1a37) push de and a - jr nz,.Enemy - ld de,wBattleMonNick ; player active monster name + jr nz, .Enemy + ld de, wBattleMonNick ; player active monster name jr FinishDTE .Enemy ; print “Enemy ” - ld de,Char5AText + ld de, Char5AText call PlaceString - ld h,b - ld l,c - ld de,wEnemyMonNick ; enemy active monster name + ld h, b + ld l, c + ld de, wEnemyMonNick ; enemy active monster name FinishDTE:: ; 1819 (0:1819) call PlaceString - ld h,b - ld l,c + ld h, b + ld l, c pop de inc de jp PlaceNextChar @@ -238,16 +238,16 @@ Char56Text:: ; 183d (0:183d) Char5AText:: ; 1840 (0:1840) db "Enemy @" Char4AText:: ; 1847 (0:1847) - db $E1,$E2,"@" ; PKMN + db $E1, $E2, "@" ; PKMN Char55:: ; 184a (0:184a) push de - ld b,h - ld c,l - ld hl,Char55Text + ld b, h + ld c, l + ld hl, Char55Text call TextCommandProcessor ; 1919 - ld h,b - ld l,c + ld h, b + ld l, c pop de inc de jp PlaceNextChar @@ -259,15 +259,15 @@ Char55Text:: ; 185a (0:185a) Char5F:: ; 185f (0:185f) ; ends a Pokédex entry - ld [hl],"." + ld [hl], "." pop hl ret Char58:: ; 1863 (0:1863) - ld a,[wLinkState] + ld a, [wLinkState] cp LINK_STATE_BATTLING - jp z,Next1870 - ld a,$EE + jp z, Next1870 + ld a, $EE Coorda 18, 16 Next1870:: ; 1870 (0:1870) call ProtectedDelay3 ; 1913 @@ -276,7 +276,7 @@ Next1870:: ; 1870 (0:1870) Coorda 18, 16 Char57:: ; 1aad (0:1aad) pop hl - ld de,Char58Text + ld de, Char58Text dec de ret @@ -285,36 +285,36 @@ Char58Text:: ; 1881 (0:1881) Char51:: ; 1882 (0:1882) push de - ld a,$EE + ld a, $EE Coorda 18, 16 call ProtectedDelay3 call ManualTextScroll coord hl, 1, 13 lb bc, 4, 18 call ClearScreenArea - ld c,20 + ld c, 20 call DelayFrames pop de coord hl, 1, 14 jp PlaceNextChar_inc Char49:: ; 18a3 (0:18a3) - ld a,[hFlags_0xFFFA] - bit 3,a - jr z,.Char49 - ld a,$4e + ld a, [hFlags_0xFFFA] + bit 3, a + jr z, .Char49 + ld a, $4e jp Char4ETest .Char49 push de - ld a,$EE + ld a, $EE Coorda 18, 16 call ProtectedDelay3 call ManualTextScroll coord hl, 1, 10 lb bc, 7, 18 call ClearScreenArea - ld c,20 + ld c, 20 call DelayFrames pop de pop hl @@ -323,7 +323,7 @@ Char49:: ; 18a3 (0:18a3) jp PlaceNextChar_inc Char4B:: ; 18d1 (0:18d1) - ld a,$EE + ld a, $EE Coorda 18, 16 call ProtectedDelay3 push de @@ -345,25 +345,25 @@ Next18F1:: ; 18f1 (0:18f1) coord de, 0, 13 ld b, 60 .next - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec b - jr nz,.next + jr nz, .next coord hl, 1, 16 ld a, " " - ld b,SCREEN_WIDTH - 2 + ld b, SCREEN_WIDTH - 2 .next2 - ld [hli],a + ld [hli], a dec b - jr nz,.next2 + jr nz, .next2 ; wait five frames - ld b,5 + ld b, 5 .WaitFrame call DelayFrame dec b - jr nz,.WaitFrame + jr nz, .WaitFrame ret @@ -374,42 +374,42 @@ ProtectedDelay3:: ; 1913 (0:1913) ret TextCommandProcessor:: ; 1919 (0:1919) - ld a,[wLetterPrintingDelayFlags] + ld a, [wLetterPrintingDelayFlags] push af - set 1,a - ld e,a - ld a,[$fff9] + set 1, a + ld e, a + ld a, [$fff9] xor e - ld [wLetterPrintingDelayFlags],a - ld a,c - ld [wUnusedCC3A],a - ld a,b - ld [wUnusedCC3B],a + ld [wLetterPrintingDelayFlags], a + ld a, c + ld [wUnusedCC3A], a + ld a, b + ld [wUnusedCC3B], a NextTextCommand:: ; 192e (0:192e) - ld a,[hli] + ld a, [hli] cp a, "@" ; terminator - jr nz,.doTextCommand + jr nz, .doTextCommand pop af - ld [wLetterPrintingDelayFlags],a + ld [wLetterPrintingDelayFlags], a ret .doTextCommand push hl - cp a,$17 - jp z,TextCommand17 - cp a,$0e - jp nc,TextCommand0B ; if a != 0x17 and a >= 0xE, go to command 0xB + cp a, $17 + jp z, TextCommand17 + cp a, $0e + jp nc, TextCommand0B ; if a != 0x17 and a >= 0xE, go to command 0xB ; if a < 0xE, use a jump table - ld hl,TextCommandJumpTable + ld hl, TextCommandJumpTable push bc add a - ld b,$00 - ld c,a - add hl,bc + ld b, $00 + ld c, a + add hl, bc pop bc - ld a,[hli] - ld h,[hl] - ld l,a + ld a, [hli] + ld h, [hl] + ld l, a jp [hl] ; draw box @@ -419,17 +419,17 @@ NextTextCommand:: ; 192e (0:192e) ; CC = width TextCommand04:: ; 1951 (0:1951) pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] - ld b,a - ld a,[hli] - ld c,a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a push hl - ld h,d - ld l,e + ld h, d + ld l, e call TextBoxBorder pop hl jr NextTextCommand @@ -438,13 +438,13 @@ TextCommand04:: ; 1951 (0:1951) ; 00{string} TextCommand00:: ; 1963 (0:1963) pop hl - ld d,h - ld e,l - ld h,b - ld l,c + ld d, h + ld e, l + ld h, b + ld l, c call PlaceString - ld h,d - ld l,e + ld h, d + ld l, e inc hl jr NextTextCommand @@ -453,13 +453,13 @@ TextCommand00:: ; 1963 (0:1963) ; AAAA = address of string TextCommand01:: ; 1970 (0:1970) pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a push hl - ld h,b - ld l,c + ld h, b + ld l, c call PlaceString pop hl jr NextTextCommand @@ -472,18 +472,18 @@ TextCommand01:: ; 1970 (0:1970) ; bits 5-7 = unknown flags TextCommand02:: ; 197e (0:197e) pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] push hl - ld h,b - ld l,c - ld c,a + ld h, b + ld l, c + ld c, a call PrintBCDNumber - ld b,h - ld c,l + ld b, h + ld c, l pop hl jr NextTextCommand @@ -492,12 +492,12 @@ TextCommand02:: ; 197e (0:197e) ; AAAA = new destination address TextCommand03:: ; 1990 (0:1990) pop hl - ld a,[hli] - ld [wUnusedCC3A],a - ld c,a - ld a,[hli] - ld [wUnusedCC3B],a - ld b,a + ld a, [hli] + ld [wUnusedCC3A], a + ld c, a + ld a, [hli] + ld [wUnusedCC3B], a + ld b, a jp NextTextCommand ; repoint destination to second line of dialogue text box @@ -512,15 +512,15 @@ TextCommand05:: ; 199e (0:199e) ; 06 ; (no arguments) TextCommand06:: ; 19a5 (0:19a5) - ld a,[wLinkState] - cp a,LINK_STATE_BATTLING - jp z,TextCommand0D - ld a,$ee ; down arrow + ld a, [wLinkState] + cp a, LINK_STATE_BATTLING + jp z, TextCommand0D + ld a, $ee ; down arrow Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box push bc call ManualTextScroll ; blink arrow and wait for A or B to be pressed pop bc - ld a," " + ld a, " " Coorda 18, 16 ; overwrite down arrow with blank space pop hl jp NextTextCommand @@ -529,7 +529,7 @@ TextCommand06:: ; 19a5 (0:19a5) ; 07 ; (no arguments) TextCommand07:: ; 19c0 (0:19c0) - ld a," " + ld a, " " Coorda 18, 16 ; place blank space in lower right corner of dialogue text box call Next18F1 ; scroll up text call Next18F1 @@ -541,7 +541,7 @@ TextCommand07:: ; 19c0 (0:19c0) ; 08{code} TextCommand08:: ; 19d2 (0:19d2) pop hl - ld de,NextTextCommand + ld de, NextTextCommand push de ; return address jp [hl] @@ -553,25 +553,25 @@ TextCommand08:: ; 19d2 (0:19d2) ; bits 4-7 = how long the number is in bytes TextCommand09:: ; 19d8 (0:19d8) pop hl - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] push hl - ld h,b - ld l,c - ld b,a - and a,$0f - ld c,a - ld a,b - and a,$f0 + ld h, b + ld l, c + ld b, a + and a, $0f + ld c, a + ld a, b + and a, $f0 swap a - set BIT_LEFT_ALIGN,a - ld b,a + set BIT_LEFT_ALIGN, a + ld b, a call PrintNumber - ld b,h - ld c,l + ld b, h + ld c, l pop hl jp NextTextCommand @@ -581,10 +581,10 @@ TextCommand09:: ; 19d8 (0:19d8) TextCommand0A:: ; 19f6 (0:19f6) push bc call Joypad - ld a,[hJoyHeld] - and a,A_BUTTON | B_BUTTON - jr nz,.skipDelay - ld c,30 + ld a, [hJoyHeld] + and a, A_BUTTON | B_BUTTON + jr nz, .skipDelay + ld c, 30 call DelayFrames .skipDelay pop bc @@ -598,24 +598,24 @@ TextCommand0B:: ; 1a0a (0:1a0a) pop hl push bc dec hl - ld a,[hli] - ld b,a ; b = command number that got us here + ld a, [hli] + ld b, a ; b = command number that got us here push hl - ld hl,TextCommandSounds + ld hl, TextCommandSounds .loop - ld a,[hli] + ld a, [hli] cp b - jr z,.matchFound + jr z, .matchFound inc hl jr .loop .matchFound - cp a,$14 - jr z,.pokemonCry - cp a,$15 - jr z,.pokemonCry - cp a,$16 - jr z,.pokemonCry - ld a,[hl] + cp a, $14 + jr z, .pokemonCry + cp a, $15 + jr z, .pokemonCry + cp a, $16 + jr z, .pokemonCry + ld a, [hl] call PlaySound call WaitForSoundToFinish pop hl @@ -623,7 +623,7 @@ TextCommand0B:: ; 1a0a (0:1a0a) jp NextTextCommand .pokemonCry push de - ld a,[hl] + ld a, [hl] call PlayCry pop de pop hl @@ -632,43 +632,43 @@ TextCommand0B:: ; 1a0a (0:1a0a) ; format: text command ID, sound ID or cry ID TextCommandSounds:: ; 1a3d (0:1a3d) - db $0B,$86 ; (SFX_02_3a - SFX_Headers_02) / 3 - db $12,$9A ; (SFX_08_46 - SFX_Headers_08) / 3 - db $0E,$91 ; (SFX_02_41 - SFX_Headers_02) / 3 - db $0F,$86 ; (SFX_02_3a - SFX_Headers_02) / 3 - db $10,$89 ; (SFX_02_3b - SFX_Headers_02) / 3 - db $11,$94 ; (SFX_02_42 - SFX_Headers_02) / 3 - db $13,$98 ; (SFX_08_45 - SFX_Headers_08) / 3 - db $14,PIKACHU ; used in OakSpeech - db $15,PIDGEOT ; used in SaffronCityText12 - db $16,DEWGONG ; unused? + db $0B, SFX_GET_ITEM_1 + db $12, SFX_TURN_OFF_PC + db $0E, SFX_POKEDEX_RATING + db $0F, SFX_GET_ITEM_1 + db $10, SFX_GET_ITEM_2 + db $11, SFX_GET_KEY_ITEM + db $13, SFX_TRADE_MACHINE + db $14, PIKACHU ; used in OakSpeech + db $15, PIDGEOT ; used in SaffronCityText12 + db $16, DEWGONG ; unused? ; draw ellipses ; 0CAA ; AA = number of ellipses to draw TextCommand0C:: ; 1a51 (0:1a51) pop hl - ld a,[hli] - ld d,a + ld a, [hli] + ld d, a push hl - ld h,b - ld l,c + ld h, b + ld l, c .loop - ld a,$75 ; ellipsis - ld [hli],a + ld a, $75 ; ellipsis + ld [hli], a push de call Joypad pop de - ld a,[hJoyHeld] ; joypad state - and a,A_BUTTON | B_BUTTON - jr nz,.skipDelay ; if so, skip the delay - ld c,10 + ld a, [hJoyHeld] ; joypad state + and a, A_BUTTON | B_BUTTON + jr nz, .skipDelay ; if so, skip the delay + ld c, 10 call DelayFrames .skipDelay dec d - jr nz,.loop - ld b,h - ld c,l + jr nz, .loop + ld b, h + ld c, l pop hl jp NextTextCommand @@ -688,23 +688,23 @@ TextCommand0D:: ; 1a73 (0:1a73) ; BB = bank TextCommand17:: ; 1a7c (0:1a7c) pop hl - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a - ld a,[hli] - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a push hl - ld l,e - ld h,d + ld l, e + ld h, d call TextCommandProcessor pop hl pop af - ld [H_LOADEDROMBANK],a - ld [MBC1RomBank],a + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a jp NextTextCommand TextCommandJumpTable:: ; 1a9a (0:1a9a) diff --git a/macros.asm b/macros.asm index ed59b848..8d7a37c8 100644 --- a/macros.asm +++ b/macros.asm @@ -311,6 +311,10 @@ TX_ASM: MACRO db $08 ENDM +TX_BUTTON_SOUND: MACRO + db $06 + ENDM + TX_SFX_ITEM EQUS "db $0b" TX_SFX_CONGRATS EQUS "db $10" TX_SFX_KEY_ITEM EQUS "db $11" diff --git a/main.asm b/main.asm index 4503d4d7..a7e4908e 100755 --- a/main.asm +++ b/main.asm @@ -781,10 +781,21 @@ SECTION "bank14",ROMX,BANK[$14] dr $50000,$5003d Route22Blocks: INCBIN "maps/route22.blk" - dr $500f1,$506ed + dr $500f1,$50682 + +INCLUDE "data/mapHeaders/route24.asm" +INCLUDE "data/mapObjects/route24.asm" Route24Blocks: ; 506ed (14:46ed) INCBIN "maps/route24.blk" - dr $507a1,$509aa + +; INCLUDE "data/mapHeaders/route25.asm" +; INCLUDE "data/mapObjects/route25.asm" + dr $507a1,$50816 +Route25Blocks: ; 50816 (14:4816) +INCBIN "maps/route25.blk" + + + dr $50924,$509aa INCLUDE "data/mapHeaders/saffroncity.asm" INCLUDE "data/mapObjects/saffroncity.asm" @@ -792,7 +803,9 @@ SaffronCityBlocks: ; 50a98 (14:4a98) INCBIN "maps/saffroncity.blk" INCLUDE "scripts/saffroncity.asm" - dr $50ca9,$517cc + dr $50ca9,$51366 +INCLUDE "scripts/route24.asm" + dr $515f3,$517cc ; victoryroad2 dr $517cc,$52060 diff --git a/scripts/route24.asm b/scripts/route24.asm index 61df4377..15fe78b8 100755 --- a/scripts/route24.asm +++ b/scripts/route24.asm @@ -1,4 +1,4 @@ -Route24Script: ; 513ad (14:53ad) +Route24Script: ; 51366 (14:5366) call EnableAutoTextBoxDrawing ld hl, Route24TrainerHeaders ld de, Route24ScriptPointers @@ -84,6 +84,7 @@ Route24TextPointers: ; 5144b (14:544b) dw Route24Text6 dw Route24Text7 dw PickUpItemText + dw Route24Text8 Route24TrainerHeaders: ; 5145b (14:545b) Route24TrainerHeader0: ; 5145b (14:545b) @@ -191,7 +192,9 @@ Route24Text_51510: ; 51510 (14:5510) Route24Text_5151a: ; 5151a (14:551a) TX_FAR _Route24Text_5151a - db $0B, $6, "@" + TX_SFX_KEY_ITEM + TX_BUTTON_SOUND + db "@" Route24Text_51521: ; 51521 (14:5521) TX_FAR _Route24Text_51521 @@ -316,3 +319,60 @@ Route24EndBattleText6: ; 515c1 (14:55c1) Route24AfterBattleText6: ; 515c6 (14:55c6) TX_FAR _Route24AfterBattleText6 db "@" + +Route24Text8: + TX_ASM + CheckEvent EVENT_54F + jr nz, .asm_515d5 + ld hl, Route24Text_515de + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jr nz, .asm_515d0 + ld a, CHARMANDER + ld [wd11e], a + ld [wcf91], a + call GetMonName + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + lb bc, CHARMANDER, 10 + call GivePokemon + jp nc, TextScriptEnd + ld a, [wAddedToParty] + and a + call z, WaitForTextScrollButtonPress + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, Route24Text_515e3 + call PrintText + SetEvent EVENT_54F + jp TextScriptEnd + +.asm_515d0 + ld hl, Route24Text_515e9 + jr .asm_515d8 + +.asm_515d5 + ld hl, Route24Text_515ee +.asm_515d8 + call PrintText + jp TextScriptEnd + +Route24Text_515de: + TX_FAR _Route24DamianText1 + db "@" + +Route24Text_515e3: + TX_FAR _Route24DamianText2 + db $d + db "@" + +Route24Text_515e9: + TX_FAR _Route24DamianText3 + db "@" + +Route24Text_515ee: + TX_FAR _Route24DamianText4 + db "@" + diff --git a/text/maps/route_24.asm b/text/maps/route_24.asm index 7a073916..26cb4044 100644 --- a/text/maps/route_24.asm +++ b/text/maps/route_24.asm @@ -154,3 +154,31 @@ _Route24AfterBattleText6:: line "have no regrets!" done +_Route24DamianText1:: + text "I'm not good at" + line "raising #MON." + + para "I should release" + line "my CHARMANDER" + cont "because I haven't" + cont "raised it well..." + + para "If you promise me" + line "you'll care for" + cont "it, it's yours." + done + +_Route24DamianText2:: + text "Take good care of" + line "my CHARMANDER!@@" + +_Route24DamianText3:: + text "Oh... I'd better" + line "release it then." + done + +_Route24DamianText4:: + text "How's CHARMANDER" + line "doing?" + done + diff --git a/text/maps/route_25.asm b/text/maps/route_25.asm index 0d0d8b5b..f9f0c8ff 100644 --- a/text/maps/route_25.asm +++ b/text/maps/route_25.asm @@ -1,31 +1,3 @@ -_Route25DamianText1:: - text "I'm not good at" - line "raising #MON." - - para "I should release" - line "my CHARMANDER" - cont "because I haven't" - cont "raised it well..." - - para "If you promise me" - line "you'll care for" - cont "it, it's yours." - done - -_Route25DamianText2:: - text "Take good care of" - line "my CHARMANDER!@@" - -_Route25DamianText3:: - text "Oh... I'd better" - line "release it then." - done - -_Route25DamianText4:: - text "How's CHARMANDER" - line "doing?" - done - _Route25BattleText1:: text "Local trainers" line "come here to" -- cgit v1.3.1-sl0p From 4878c118567df8a97e2a796c1c755f2311d955a7 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Fri, 27 May 2016 09:38:27 -0400 Subject: Route 25 scripts --- charmap.asm | 1 + constants/hide_show_constants.asm | 264 +++++++++++++++++++------------------- data/map_header_banks.asm | 4 +- data/map_header_pointers.asm | 4 +- main.asm | 9 +- scripts/route25.asm | 23 +++- text/maps/route_24.asm | 5 +- 7 files changed, 161 insertions(+), 149 deletions(-) (limited to 'text/maps') diff --git a/charmap.asm b/charmap.asm index c794549f..1932b39e 100644 --- a/charmap.asm +++ b/charmap.asm @@ -149,6 +149,7 @@ charmap "ー", $E3 charmap "", $4a ; PkMn charmap "@", $50 +charmap "", $52 charmap "#", $54 ;charmap "POKé", $54 charmap "′", $71 diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 9d009f5e..9877fba7 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -104,134 +104,136 @@ const_value = 0 const HS_VICTORY_ROAD_2_ITEM_3 ; 5F X const HS_VICTORY_ROAD_2_ITEM_4 ; 60 const HS_VICTORY_ROAD_2_BOULDER ; 61 - const HS_BILL_POKEMON ; 62 - const HS_BILL_1 ; 63 - const HS_BILL_2 ; 64 X - const HS_VIRIDIAN_FOREST_ITEM_1 ; 65 X - const HS_VIRIDIAN_FOREST_ITEM_2 ; 66 X - const HS_VIRIDIAN_FOREST_ITEM_3 ; 67 X - const HS_MT_MOON_1_ITEM_1 ; 68 X - const HS_MT_MOON_1_ITEM_2 ; 69 X - const HS_MT_MOON_1_ITEM_3 ; 6A X - const HS_MT_MOON_1_ITEM_4 ; 6B X - const HS_MT_MOON_1_ITEM_5 ; 6C X - const HS_MT_MOON_1_ITEM_6 ; 6D - const HS_MT_MOON_3_FOSSIL_1 ; 6E - const HS_MT_MOON_3_FOSSIL_2 ; 6F X - const HS_MT_MOON_3_ITEM_1 ; 70 X - const HS_MT_MOON_3_ITEM_2 ; 71 - const HS_SS_ANNE_2_RIVAL ; 72 X - const HS_SS_ANNE_8_ITEM ; 73 X - const HS_SS_ANNE_9_ITEM_1 ; 74 X - const HS_SS_ANNE_9_ITEM_2 ; 75 X - const HS_SS_ANNE_10_ITEM_1 ; 76 X - const HS_SS_ANNE_10_ITEM_2 ; 77 X - const HS_SS_ANNE_10_ITEM_3 ; 78 X - const HS_VICTORY_ROAD_3_ITEM_1 ; 79 X - const HS_VICTORY_ROAD_3_ITEM_2 ; 7A - const HS_VICTORY_ROAD_3_BOULDER ; 7B X - const HS_ROCKET_HIDEOUT_1_ITEM_1 ; 7C X - const HS_ROCKET_HIDEOUT_1_ITEM_2 ; 7D X - const HS_ROCKET_HIDEOUT_2_ITEM_1 ; 7E X - const HS_ROCKET_HIDEOUT_2_ITEM_2 ; 7F X - const HS_ROCKET_HIDEOUT_2_ITEM_3 ; 80 X - const HS_ROCKET_HIDEOUT_2_ITEM_4 ; 81 X - const HS_ROCKET_HIDEOUT_3_ITEM_1 ; 82 X - const HS_ROCKET_HIDEOUT_3_ITEM_2 ; 83 - const HS_ROCKET_HIDEOUT_4_GIOVANNI ; 84 X - const HS_ROCKET_HIDEOUT_4_ITEM_1 ; 85 X - const HS_ROCKET_HIDEOUT_4_ITEM_2 ; 86 X - const HS_ROCKET_HIDEOUT_4_ITEM_3 ; 87 - const HS_ROCKET_HIDEOUT_4_ITEM_4 ; 88 - const HS_ROCKET_HIDEOUT_4_ITEM_5 ; 89 XXX never (de)activated? - const HS_SILPH_CO_2F_1 ; 8A - const HS_SILPH_CO_2F_2 ; 8B - const HS_SILPH_CO_2F_3 ; 8C - const HS_SILPH_CO_2F_4 ; 8D - const HS_SILPH_CO_2F_5 ; 8E - const HS_SILPH_CO_3F_1 ; 8F - const HS_SILPH_CO_3F_2 ; 90 X - const HS_SILPH_CO_3F_ITEM ; 91 - const HS_SILPH_CO_4F_1 ; 92 - const HS_SILPH_CO_4F_2 ; 93 - const HS_SILPH_CO_4F_3 ; 94 X - const HS_SILPH_CO_4F_ITEM_1 ; 95 X - const HS_SILPH_CO_4F_ITEM_2 ; 96 X - const HS_SILPH_CO_4F_ITEM_3 ; 97 - const HS_SILPH_CO_5F_1 ; 98 - const HS_SILPH_CO_5F_2 ; 99 - const HS_SILPH_CO_5F_3 ; 9A - const HS_SILPH_CO_5F_4 ; 9B X - const HS_SILPH_CO_5F_ITEM_1 ; 9C X - const HS_SILPH_CO_5F_ITEM_2 ; 9D X - const HS_SILPH_CO_5F_ITEM_3 ; 9E - const HS_SILPH_CO_6F_1 ; 9F - const HS_SILPH_CO_6F_2 ; A0 - const HS_SILPH_CO_6F_3 ; A1 X - const HS_SILPH_CO_6F_ITEM_1 ; A2 X - const HS_SILPH_CO_6F_ITEM_2 ; A3 - const HS_SILPH_CO_7F_1 ; A4 - const HS_SILPH_CO_7F_2 ; A5 - const HS_SILPH_CO_7F_3 ; A6 - const HS_SILPH_CO_7F_4 ; A7 - const HS_SILPH_CO_7F_RIVAL ; A8 X - const HS_SILPH_CO_7F_ITEM_1 ; A9 X - const HS_SILPH_CO_7F_ITEM_2 ; AA XXX sprite doesn't exist - const HS_SILPH_CO_7F_8 ; AB - const HS_SILPH_CO_8F_1 ; AC - const HS_SILPH_CO_8F_2 ; AD - const HS_SILPH_CO_8F_3 ; AE - const HS_SILPH_CO_9F_1 ; AF - const HS_SILPH_CO_9F_2 ; B0 - const HS_SILPH_CO_9F_3 ; B1 - const HS_SILPH_CO_10F_1 ; B2 - const HS_SILPH_CO_10F_2 ; B3 XXX never (de)activated? - const HS_SILPH_CO_10F_3 ; B4 X - const HS_SILPH_CO_10F_ITEM_1 ; B5 X - const HS_SILPH_CO_10F_ITEM_2 ; B6 X - const HS_SILPH_CO_10F_ITEM_3 ; B7 - const HS_SILPH_CO_11F_1 ; B8 - const HS_SILPH_CO_11F_2 ; B9 - const HS_SILPH_CO_11F_3 ; BA XXX sprite doesn't exist - const HS_MAP_F4_1 ; BB X - const HS_MANSION_2_ITEM ; BC X - const HS_MANSION_3_ITEM_1 ; BD X - const HS_MANSION_3_ITEM_2 ; BE X - const HS_MANSION_4_ITEM_1 ; BF X - const HS_MANSION_4_ITEM_2 ; C0 X - const HS_MANSION_4_ITEM_3 ; C1 X - const HS_MANSION_4_ITEM_4 ; C2 X - const HS_MANSION_4_ITEM_5 ; C3 X - const HS_SAFARI_ZONE_EAST_ITEM_1 ; C4 X - const HS_SAFARI_ZONE_EAST_ITEM_2 ; C5 X - const HS_SAFARI_ZONE_EAST_ITEM_3 ; C6 X - const HS_SAFARI_ZONE_EAST_ITEM_4 ; C7 X - const HS_SAFARI_ZONE_NORTH_ITEM_1 ; C8 X - const HS_SAFARI_ZONE_NORTH_ITEM_2 ; C9 X - const HS_SAFARI_ZONE_WEST_ITEM_1 ; CA X - const HS_SAFARI_ZONE_WEST_ITEM_2 ; CB X - const HS_SAFARI_ZONE_WEST_ITEM_3 ; CC X - const HS_SAFARI_ZONE_WEST_ITEM_4 ; CD X - const HS_SAFARI_ZONE_CENTER_ITEM ; CE X - const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; CF X - const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; D0 X - const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D1 X - const HS_MEWTWO ; D2 X - const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D3 X - const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D4 X - const HS_VICTORY_ROAD_1_ITEM_1 ; D5 X - const HS_VICTORY_ROAD_1_ITEM_2 ; D6 - const HS_CHAMPIONS_ROOM_OAK ; D7 - const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; D8 - const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; D9 - const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; DA - const HS_SEAFOAM_ISLANDS_2_BOULDER_2 ; DB - const HS_SEAFOAM_ISLANDS_3_BOULDER_1 ; DC - const HS_SEAFOAM_ISLANDS_3_BOULDER_2 ; DD - const HS_SEAFOAM_ISLANDS_4_BOULDER_1 ; DE - const HS_SEAFOAM_ISLANDS_4_BOULDER_2 ; DF - const HS_SEAFOAM_ISLANDS_4_BOULDER_3 ; E0 - const HS_SEAFOAM_ISLANDS_4_BOULDER_4 ; E1 - const HS_SEAFOAM_ISLANDS_5_BOULDER_1 ; E2 - const HS_SEAFOAM_ISLANDS_5_BOULDER_2 ; E3 X - const HS_ARTICUNO ; EF + +const_value SET $61 ; something above was deleted, idk what yet + const HS_BILL_POKEMON ; 61 + const HS_BILL_1 ; 62 + const HS_BILL_2 ; 63 + const HS_VIRIDIAN_FOREST_ITEM_1 ; 64 X + const HS_VIRIDIAN_FOREST_ITEM_2 ; 65 X + const HS_VIRIDIAN_FOREST_ITEM_3 ; 66 X + const HS_MT_MOON_1_ITEM_1 ; 67 X + const HS_MT_MOON_1_ITEM_2 ; 68 X + const HS_MT_MOON_1_ITEM_3 ; 69 X + const HS_MT_MOON_1_ITEM_4 ; 6A X + const HS_MT_MOON_1_ITEM_5 ; 6B X + const HS_MT_MOON_1_ITEM_6 ; 6C X + const HS_MT_MOON_3_FOSSIL_1 ; 6D + const HS_MT_MOON_3_FOSSIL_2 ; 6E + const HS_MT_MOON_3_ITEM_1 ; 6F X + const HS_MT_MOON_3_ITEM_2 ; 70 X + const HS_SS_ANNE_2_RIVAL ; 71 + const HS_SS_ANNE_8_ITEM ; 72 X + const HS_SS_ANNE_9_ITEM_1 ; 73 X + const HS_SS_ANNE_9_ITEM_2 ; 74 X + const HS_SS_ANNE_10_ITEM_1 ; 75 X + const HS_SS_ANNE_10_ITEM_2 ; 76 X + const HS_SS_ANNE_10_ITEM_3 ; 77 X + const HS_VICTORY_ROAD_3_ITEM_1 ; 78 X + const HS_VICTORY_ROAD_3_ITEM_2 ; 79 X + const HS_VICTORY_ROAD_3_BOULDER ; 7A + const HS_ROCKET_HIDEOUT_1_ITEM_1 ; 7B X + const HS_ROCKET_HIDEOUT_1_ITEM_2 ; 7C X + const HS_ROCKET_HIDEOUT_2_ITEM_1 ; 7D X + const HS_ROCKET_HIDEOUT_2_ITEM_2 ; 7E X + const HS_ROCKET_HIDEOUT_2_ITEM_3 ; 7F X + const HS_ROCKET_HIDEOUT_2_ITEM_4 ; 80 X + const HS_ROCKET_HIDEOUT_3_ITEM_1 ; 81 X + const HS_ROCKET_HIDEOUT_3_ITEM_2 ; 82 X + const HS_ROCKET_HIDEOUT_4_GIOVANNI ; 83 + const HS_ROCKET_HIDEOUT_4_ITEM_1 ; 84 X + const HS_ROCKET_HIDEOUT_4_ITEM_2 ; 85 X + const HS_ROCKET_HIDEOUT_4_ITEM_3 ; 86 X + const HS_ROCKET_HIDEOUT_4_ITEM_4 ; 87 + const HS_ROCKET_HIDEOUT_4_ITEM_5 ; 88 + const HS_SILPH_CO_2F_1 ; 89 XXX never (de)activated? + const HS_SILPH_CO_2F_2 ; 8A + const HS_SILPH_CO_2F_3 ; 8B + const HS_SILPH_CO_2F_4 ; 8C + const HS_SILPH_CO_2F_5 ; 8D + const HS_SILPH_CO_3F_1 ; 8E + const HS_SILPH_CO_3F_2 ; 8F + const HS_SILPH_CO_3F_ITEM ; 90 X + const HS_SILPH_CO_4F_1 ; 91 + const HS_SILPH_CO_4F_2 ; 92 + const HS_SILPH_CO_4F_3 ; 93 + const HS_SILPH_CO_4F_ITEM_1 ; 94 X + const HS_SILPH_CO_4F_ITEM_2 ; 95 X + const HS_SILPH_CO_4F_ITEM_3 ; 96 X + const HS_SILPH_CO_5F_1 ; 97 + const HS_SILPH_CO_5F_2 ; 98 + const HS_SILPH_CO_5F_3 ; 99 + const HS_SILPH_CO_5F_4 ; 9A + const HS_SILPH_CO_5F_ITEM_1 ; 9B X + const HS_SILPH_CO_5F_ITEM_2 ; 9C X + const HS_SILPH_CO_5F_ITEM_3 ; 9D X + const HS_SILPH_CO_6F_1 ; 9E + const HS_SILPH_CO_6F_2 ; 9F + const HS_SILPH_CO_6F_3 ; A0 + const HS_SILPH_CO_6F_ITEM_1 ; A1 X + const HS_SILPH_CO_6F_ITEM_2 ; A2 X + const HS_SILPH_CO_7F_1 ; A3 + const HS_SILPH_CO_7F_2 ; A4 + const HS_SILPH_CO_7F_3 ; A5 + const HS_SILPH_CO_7F_4 ; A6 + const HS_SILPH_CO_7F_RIVAL ; A7 + const HS_SILPH_CO_7F_ITEM_1 ; A8 X + const HS_SILPH_CO_7F_ITEM_2 ; A9 X + const HS_SILPH_CO_7F_8 ; AA XXX sprite doesn't exist + const HS_SILPH_CO_8F_1 ; AB + const HS_SILPH_CO_8F_2 ; AC + const HS_SILPH_CO_8F_3 ; AD + const HS_SILPH_CO_9F_1 ; AE + const HS_SILPH_CO_9F_2 ; AF + const HS_SILPH_CO_9F_3 ; B0 + const HS_SILPH_CO_10F_1 ; B1 + const HS_SILPH_CO_10F_2 ; B2 + const HS_SILPH_CO_10F_3 ; B3 XXX never (de)activated? + const HS_SILPH_CO_10F_ITEM_1 ; B4 X + const HS_SILPH_CO_10F_ITEM_2 ; B5 X + const HS_SILPH_CO_10F_ITEM_3 ; B6 X + const HS_SILPH_CO_11F_1 ; B7 + const HS_SILPH_CO_11F_2 ; B8 + const HS_SILPH_CO_11F_3 ; B9 + const HS_MAP_F4_1 ; BA XXX sprite doesn't exist + const HS_MANSION_2_ITEM ; BB X + const HS_MANSION_3_ITEM_1 ; BC X + const HS_MANSION_3_ITEM_2 ; BD X + const HS_MANSION_4_ITEM_1 ; BE X + const HS_MANSION_4_ITEM_2 ; BF X + const HS_MANSION_4_ITEM_3 ; C0 X + const HS_MANSION_4_ITEM_4 ; C1 X + const HS_MANSION_4_ITEM_5 ; C2 X + const HS_SAFARI_ZONE_EAST_ITEM_1 ; C3 X + const HS_SAFARI_ZONE_EAST_ITEM_2 ; C4 X + const HS_SAFARI_ZONE_EAST_ITEM_3 ; C5 X + const HS_SAFARI_ZONE_EAST_ITEM_4 ; C6 X + const HS_SAFARI_ZONE_NORTH_ITEM_1 ; C7 X + const HS_SAFARI_ZONE_NORTH_ITEM_2 ; C8 X + const HS_SAFARI_ZONE_WEST_ITEM_1 ; C9 X + const HS_SAFARI_ZONE_WEST_ITEM_2 ; CA X + const HS_SAFARI_ZONE_WEST_ITEM_3 ; CB X + const HS_SAFARI_ZONE_WEST_ITEM_4 ; CC X + const HS_SAFARI_ZONE_CENTER_ITEM ; CD X + const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; CE X + const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; CF X + const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D0 X + const HS_MEWTWO ; D1 X + const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D2 X + const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D3 X + const HS_VICTORY_ROAD_1_ITEM_1 ; D4 X + const HS_VICTORY_ROAD_1_ITEM_2 ; D5 X + const HS_CHAMPIONS_ROOM_OAK ; D6 + const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; D7 + const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; D8 + const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; D9 + const HS_SEAFOAM_ISLANDS_2_BOULDER_2 ; DA + const HS_SEAFOAM_ISLANDS_3_BOULDER_1 ; DB + const HS_SEAFOAM_ISLANDS_3_BOULDER_2 ; DC + const HS_SEAFOAM_ISLANDS_4_BOULDER_1 ; DD + const HS_SEAFOAM_ISLANDS_4_BOULDER_2 ; DE + const HS_SEAFOAM_ISLANDS_4_BOULDER_3 ; DF + const HS_SEAFOAM_ISLANDS_4_BOULDER_4 ; E0 + const HS_SEAFOAM_ISLANDS_5_BOULDER_1 ; E1 + const HS_SEAFOAM_ISLANDS_5_BOULDER_2 ; E2 + const HS_ARTICUNO ; E3 X diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index 7e730780..2fff5f22 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -35,8 +35,8 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db $15 ; db BANK(Route21_h) ; ROUTE_21 db $14 ; db BANK(Route22_h) ; ROUTE_22 db $14 ; db BANK(Route23_h) ; ROUTE_23 - db $14 ; db BANK(Route24_h) ; ROUTE_24 - db $14 ; db BANK(Route25_h) ; ROUTE_25 + db BANK(Route24_h) ; ROUTE_24 + db BANK(Route25_h) ; ROUTE_25 db $12 ; db BANK(RedsHouse1F_h) db $17 ; db BANK(RedsHouse2F_h) db $06 ; db BANK(BluesHouse_h) diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index adbe374b..6721a8a5 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -35,8 +35,8 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw $500f ; dw Route21_h dw $4000 ; dw Route22_h dw $433f ; dw Route23_h - dw $4682 ; dw Route24_h - dw $47a1 ; dw Route25_h + dw Route24_h + dw Route25_h dw $40f6 ; dw RedsHouse1F_h dw $40a4 ; dw RedsHouse2F_h dw $5c2f ; dw BluesHouse_h diff --git a/main.asm b/main.asm index a7e4908e..cfcfa6c0 100755 --- a/main.asm +++ b/main.asm @@ -788,13 +788,12 @@ INCLUDE "data/mapObjects/route24.asm" Route24Blocks: ; 506ed (14:46ed) INCBIN "maps/route24.blk" -; INCLUDE "data/mapHeaders/route25.asm" -; INCLUDE "data/mapObjects/route25.asm" - dr $507a1,$50816 +INCLUDE "data/mapHeaders/route25.asm" +INCLUDE "data/mapObjects/route25.asm" Route25Blocks: ; 50816 (14:4816) INCBIN "maps/route25.blk" - +; victoryroad2 dr $50924,$509aa INCLUDE "data/mapHeaders/saffroncity.asm" @@ -805,7 +804,7 @@ INCLUDE "scripts/saffroncity.asm" dr $50ca9,$51366 INCLUDE "scripts/route24.asm" - dr $515f3,$517cc +INCLUDE "scripts/route25.asm" ; victoryroad2 dr $517cc,$52060 diff --git a/scripts/route25.asm b/scripts/route25.asm index 49580ba6..20dcc890 100755 --- a/scripts/route25.asm +++ b/scripts/route25.asm @@ -1,14 +1,21 @@ Route25Script: ; 515cb (14:55cb) - call Route25Script_515e1 call EnableAutoTextBoxDrawing ld hl, Route25TrainerHeaders ld de, Route25ScriptPointers ld a, [W_ROUTE25CURSCRIPT] call ExecuteCurMapScriptInTable ld [W_ROUTE25CURSCRIPT], a + call Route25Script_515e1 ret Route25Script_515e1: ; 515e1 (14:55e1) + ld hl, wPreventBlackout + res 2, [hl] + res 3, [hl] + res 4, [hl] + res 7, [hl] + xor a + ld [W_BILLSHOUSECURSCRIPT], a ld hl, wd126 bit 6, [hl] res 6, [hl] @@ -16,14 +23,16 @@ Route25Script_515e1: ; 515e1 (14:55e1) CheckEventHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ret nz CheckEventReuseHL EVENT_MET_BILL_2 - jr nz, .asm_515ff + jr nz, .asm_51638 ResetEventReuseHL EVENT_BILL_SAID_USE_CELL_SEPARATOR ld a, HS_BILL_POKEMON ld [wMissableObjectIndex], a - predef_jump ShowObject -.asm_515ff + predef ShowObject + jr .asm_5165c + +.asm_51638 CheckEventAfterBranchReuseHL EVENT_GOT_SS_TICKET, EVENT_MET_BILL_2 - ret z + jr z, .asm_5165c SetEventReuseHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ld a, HS_NUGGET_BRIDGE_GUY ld [wMissableObjectIndex], a @@ -33,7 +42,9 @@ Route25Script_515e1: ; 515e1 (14:55e1) predef HideObject ld a, HS_BILL_2 ld [wMissableObjectIndex], a - predef_jump ShowObject + predef ShowObject +.asm_5165c + ret Route25ScriptPointers: ; 51622 (14:5622) dw CheckFightingMapTrainers diff --git a/text/maps/route_24.asm b/text/maps/route_24.asm index 26cb4044..475a2602 100644 --- a/text/maps/route_24.asm +++ b/text/maps/route_24.asm @@ -4,13 +4,13 @@ _Route24Text_51510:: cont "contest trainers!@@" _Route24Text_51515:: - db $0 + text "" para "You just earned a" line "fabulous prize!" prompt _Route24Text_5151a:: - text $52, " received" + text " received" line "a @" TX_RAM wcf4b text "!@@" @@ -181,4 +181,3 @@ _Route24DamianText4:: text "How's CHARMANDER" line "doing?" done - -- cgit v1.3.1-sl0p From 2b96f4165f01fb41cb8c302a8da9d9a3131ab92e Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Fri, 27 May 2016 12:32:34 -0400 Subject: Vermilion City scripts --- data/mapObjects/vermilioncity.asm | 19 +++++----- data/map_header_banks.asm | 2 +- data/map_header_pointers.asm | 2 +- home.asm | 7 ++-- main.asm | 17 ++++----- scripts/billshouse.asm | 2 +- scripts/blueshouse.asm | 2 +- scripts/celadongamecorner.asm | 2 +- scripts/cinnabargym.asm | 2 +- scripts/cinnabarisland.asm | 2 +- scripts/gary.asm | 2 +- scripts/halloffameroom.asm | 2 +- scripts/museum1f.asm | 2 +- scripts/oakslab.asm | 2 +- scripts/pallettown.asm | 2 +- scripts/pokemontower2.asm | 2 +- scripts/redshouse2f.asm | 2 +- scripts/route16gate.asm | 2 +- scripts/route18gate.asm | 2 +- scripts/route22.asm | 2 +- scripts/route22gate.asm | 2 +- scripts/route5gate.asm | 2 +- scripts/route6gate.asm | 2 +- scripts/route7gate.asm | 2 +- scripts/route8gate.asm | 2 +- scripts/safarizoneentrance.asm | 2 +- scripts/seafoamislands4.asm | 2 +- scripts/seafoamislands5.asm | 2 +- scripts/ssanne2.asm | 2 +- scripts/vermilioncity.asm | 75 +++++++++++++++++++++++++++------------ scripts/vermilioncity2.asm | 45 ++++++++++++++++++++++- scripts/viridianmart.asm | 2 +- text/maps/vermilion_city.asm | 18 +++++----- 33 files changed, 154 insertions(+), 81 deletions(-) (limited to 'text/maps') diff --git a/data/mapObjects/vermilioncity.asm b/data/mapObjects/vermilioncity.asm index c5602be1..3bfbc947 100755 --- a/data/mapObjects/vermilioncity.asm +++ b/data/mapObjects/vermilioncity.asm @@ -13,21 +13,22 @@ VermilionCityObject: ; 0x189ba (size=133) db $3, $7, $0, VERMILION_HOUSE_2 db $7 ; signs - db $3, $1b, $7 ; VermilionCityText7 - db $d, $25, $8 ; VermilionCityText8 - db $d, $18, $9 ; MartSignText - db $3, $c, $a ; PokeCenterSignText - db $d, $7, $b ; VermilionCityText11 - db $13, $7, $c ; VermilionCityText12 - db $f, $1d, $d ; VermilionCityText13 + db $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 $6 ; objects - object SPRITE_FOULARD_WOMAN, $13, $7, WALK, $2, $1 ; person + 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 ; warp-to EVENT_DISP VERMILION_CITY_WIDTH, $3, $b ; VERMILION_POKECENTER diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index a8e9e179..2ad544fb 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -5,7 +5,7 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db BANK(PewterCity_h) ; PEWTER_CITY db BANK(CeruleanCity_h) ; CERULEAN_CITY db $11 ; db BANK(LavenderTown_h) ; LAVENDER_TOWN - db $06 ; db BANK(VermilionCity_h) ; VERMILION_CITY + db BANK(VermilionCity_h) ; VERMILION_CITY db BANK(CeladonCity_h) ; CELADON_CITY db $06 ; db BANK(FuchsiaCity_h) ; FUCHSIA_CITY db $07 ; db BANK(CinnabarIsland_h) ; CINNABAR_ISLAND diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index 0658d880..bd644214 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -5,7 +5,7 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw PewterCity_h dw CeruleanCity_h dw $4000 ; dw LavenderTown_h - dw $499e ; dw VermilionCity_h + dw VermilionCity_h dw CeladonCity_h dw $4bb3 ; dw FuchsiaCity_h dw $4000 ; dw CinnabarIsland_h diff --git a/home.asm b/home.asm index 55f474b7..fd2e1b26 100644 --- a/home.asm +++ b/home.asm @@ -2441,7 +2441,7 @@ RunNPCMovementScript:: ; 30ae (0:30ae) ld a, [wNPCMovementScriptBank] call BankswitchCommon ld a, [wNPCMovementScriptFunctionNum] - call CallFunctionInTable + call JumpTable pop af call BankswitchCommon ret @@ -2484,7 +2484,7 @@ ExecuteCurMapScriptInTable:: ; 30fc (0:30fc) .useProvidedIndex pop hl ld [W_CURMAPSCRIPT], a - call CallFunctionInTable + call JumpTable ld a, [W_CURMAPSCRIPT] ret @@ -4690,8 +4690,7 @@ endm ret -CallFunctionInTable:: ; 3d93 (0:3d93) -JumpTable:: +JumpTable:: ; 3d93 (0:3d93) ; Call function a in jumptable hl. ; de is not preserved. push hl diff --git a/main.asm b/main.asm index 824f91d9..e04d9103 100755 --- a/main.asm +++ b/main.asm @@ -251,12 +251,12 @@ PewterCityBlocks: INCBIN "maps/pewtercity.blk" INCLUDE "data/mapHeaders/ceruleancity.asm" INCLUDE "data/mapObjects/ceruleancity.asm" CeruleanCityBlocks: INCBIN "maps/ceruleancity.blk" ; 18836 - dr $1899e,$18dfa ; headers, objects, blocks -; INCLUDE "data/mapHeaders/vermilioncity.asm" -; INCLUDE "data/mapObjects/vermilioncity.asm" -; VermilionCityBlocks: INCBIN "maps/vermilioncity.blk" +INCLUDE "data/mapHeaders/vermilioncity.asm" +INCLUDE "data/mapObjects/vermilioncity.asm" +VermilionCityBlocks: INCBIN "maps/vermilioncity.blk" + dr $18bb3,$18dfa ; headers, objects, blocks ; INCLUDE "data/mapHeaders/fuchsiacity.asm" ; INCLUDE "data/mapObjects/fuchsiacity.asm" ; FuchsiaCityBlocks: INCBIN "maps/fuchsiacity.blk" @@ -266,9 +266,7 @@ INCLUDE "scripts/pallettown.asm" INCLUDE "scripts/viridiancity.asm" INCLUDE "scripts/pewtercity.asm" INCLUDE "scripts/ceruleancity.asm" - - dr $19841,$19a43 ; vermilion scripts -; INCLUDE "scripts/vermilioncity.asm" +INCLUDE "scripts/vermilioncity.asm" INCLUDE "scripts/celadoncity.asm" dr $19b2b,$1a4ea @@ -881,7 +879,10 @@ INCBIN "maps/route6.blk" dr $5812d,$581c6 Route8Blocks: ; 581c6 INCBIN "maps/route8.blk" - dr $582d4,$58b84 + dr $582d4,$5855f +Route11Blocks: ; 5854f +INCBIN "maps/route11.blk" + dr $5866d,$58b84 Route16Blocks: ; 58b84 INCBIN "maps/route16.blk" dr $58c38,$58d99 diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index 56f2204f..4f01021e 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -2,7 +2,7 @@ BillsHouseScript: ; 1e76a (7:676a) call EnableAutoTextBoxDrawing ld a, [W_BILLSHOUSECURSCRIPT] ld hl, BillsHouseScriptPointers - jp CallFunctionInTable + jp JumpTable BillsHouseScriptPointers: ; 1e776 (7:6776) dw BillsHouseScript0 diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm index 6aa2eaec..4a23df9e 100755 --- a/scripts/blueshouse.asm +++ b/scripts/blueshouse.asm @@ -2,7 +2,7 @@ BluesHouseScript: ; 19b3b (6:5b3b) call EnableAutoTextBoxDrawing ld hl,BluesHouseScriptPointers ld a,[W_BLUESHOUSECURSCRIPT] - jp CallFunctionInTable + jp JumpTable BluesHouseScriptPointers: ; 19b47 (6:5b47) dw BluesHouseScript0 diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index c3872bab..5fc9cf97 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -4,7 +4,7 @@ CeladonGameCornerScript: ; 48bbd (12:4bbd) call EnableAutoTextBoxDrawing ld hl, CeladonGameCornerScriptPointers ld a, [W_CELADONGAMECORNERCURSCRIPT] - jp CallFunctionInTable + jp JumpTable CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf) ld hl, wd126 diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 649609b3..c5d462b3 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -3,7 +3,7 @@ CinnabarGymScript: ; 7574a (1d:574a) call EnableAutoTextBoxDrawing ld hl, CinnabarGymScriptPointers ld a, [W_CINNABARGYMCURSCRIPT] - jp CallFunctionInTable + jp JumpTable CinnabarGymScript_75759: ; 75759 (1d:5759) ld hl, wd126 diff --git a/scripts/cinnabarisland.asm b/scripts/cinnabarisland.asm index 48ded740..3a2e9a2b 100755 --- a/scripts/cinnabarisland.asm +++ b/scripts/cinnabarisland.asm @@ -6,7 +6,7 @@ CinnabarIslandScript: ; 1ca19 (7:4a19) ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL ld hl, CinnabarIslandScriptPointers ld a, [W_CINNABARISLANDCURSCRIPT] - jp CallFunctionInTable + jp JumpTable CinnabarIslandScriptPointers: ; 1ca34 (7:4a34) dw CinnabarIslandScript0 diff --git a/scripts/gary.asm b/scripts/gary.asm index 685e18fe..64734c58 100755 --- a/scripts/gary.asm +++ b/scripts/gary.asm @@ -2,7 +2,7 @@ GaryScript: ; 75f1d (1d:5f1d) call EnableAutoTextBoxDrawing ld hl, GaryScriptPointers ld a, [W_GARYCURSCRIPT] - jp CallFunctionInTable + jp JumpTable GaryScript_75f29: ; 75f29 (1d:5f29) xor a diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm index 466ce77d..0f975673 100755 --- a/scripts/halloffameroom.asm +++ b/scripts/halloffameroom.asm @@ -2,7 +2,7 @@ HallofFameRoomScript: ; 5a49e (16:649e) call EnableAutoTextBoxDrawing ld hl, HallofFameRoomScriptPointers ld a, [W_HALLOFFAMEROOMCURSCRIPT] - jp CallFunctionInTable + jp JumpTable HallofFameRoomScript_5a4aa: ; 5a4aa (16:64aa) xor a diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index 75dc1ce8..ae5a2b42 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -5,7 +5,7 @@ Museum1FScript: ; 5c0f7 (17:40f7) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, Museum1FScriptPointers ld a, [W_MUSEUM1FCURSCRIPT] - jp CallFunctionInTable + jp JumpTable Museum1FScriptPointers: ; 5c109 (17:4109) dw Museum1FScript0 diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index aff39cbc..2970fa2a 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -7,7 +7,7 @@ OaksLabScript: ; 1cb0e (7:4b0e) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, OaksLabScriptPointers ld a, [W_OAKSLABCURSCRIPT] - jp CallFunctionInTable + jp JumpTable OaksLabScriptPointers: ; 1cb28 (7:4b28) dw OaksLabScript0 diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 147cbdb6..73f50e3e 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -6,7 +6,7 @@ PalletTownScript: ; 18e5b (6:4e5b) call EnableAutoTextBoxDrawing ld hl, PalletTownScriptPointers ld a, [W_PALLETTOWNCURSCRIPT] - jp CallFunctionInTable + jp JumpTable PalletTownScriptPointers: ; 18e73 (6:4e73) dw PalletTownScript0 diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm index d498f88e..7aebf81b 100755 --- a/scripts/pokemontower2.asm +++ b/scripts/pokemontower2.asm @@ -2,7 +2,7 @@ PokemonTower2Script: ; 604f2 (18:44f2) call EnableAutoTextBoxDrawing ld hl, PokemonTower2ScriptPointers ld a, [W_POKEMONTOWER2CURSCRIPT] - jp CallFunctionInTable + jp JumpTable PokemonTower2Script_604fe: ; 604fe (18:44fe) xor a diff --git a/scripts/redshouse2f.asm b/scripts/redshouse2f.asm index 2335e6d1..565d09e3 100755 --- a/scripts/redshouse2f.asm +++ b/scripts/redshouse2f.asm @@ -2,7 +2,7 @@ RedsHouse2FScript: ; 5c0b0 (17:40b0) call EnableAutoTextBoxDrawing ld hl,RedsHouse2FScriptPointers ld a,[W_REDSHOUSE2CURSCRIPT] - jp CallFunctionInTable + jp JumpTable RedsHouse2FScriptPointers: ; 5c0bc (17:40bc) dw RedsHouse2FScript0 diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm index 801e577e..197b12b2 100755 --- a/scripts/route16gate.asm +++ b/scripts/route16gate.asm @@ -4,7 +4,7 @@ Route16GateScript: ; 496be (12:56be) call EnableAutoTextBoxDrawing ld a, [W_ROUTE16GATECURSCRIPT] ld hl, Route16GateScriptPointers - jp CallFunctionInTable + jp JumpTable Route16GateScriptPointers: ; 496cf (12:56cf) dw Route16GateScript0 diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm index 060a6bbf..33f67e97 100755 --- a/scripts/route18gate.asm +++ b/scripts/route18gate.asm @@ -4,7 +4,7 @@ Route18GateScript: ; 49876 (12:5876) call EnableAutoTextBoxDrawing ld a, [W_ROUTE18GATECURSCRIPT] ld hl, Route18GateScriptPointers - jp CallFunctionInTable + jp JumpTable Route18GateScriptPointers: ; 49887 (12:5887) dw Route18GateScript0 diff --git a/scripts/route22.asm b/scripts/route22.asm index a7c61903..5ea8178f 100755 --- a/scripts/route22.asm +++ b/scripts/route22.asm @@ -2,7 +2,7 @@ Route22Script: ; 50eb2 (14:4eb2) call EnableAutoTextBoxDrawing ld hl, Route22ScriptPointers ld a, [W_ROUTE22CURSCRIPT] - jp CallFunctionInTable + jp JumpTable Route22ScriptPointers: ; 50ebe (14:4ebe) dw Route22Script0 diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm index f0b5b92d..5fdd70c8 100755 --- a/scripts/route22gate.asm +++ b/scripts/route22gate.asm @@ -2,7 +2,7 @@ Route22GateScript: ; 1e683 (7:6683) call EnableAutoTextBoxDrawing ld hl, Route22GateScriptPointers ld a, [W_ROUTE22GATECURSCRIPT] - call CallFunctionInTable + call JumpTable ld a, [wYCoord] cp $4 ld a, ROUTE_23 diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm index 35f3a020..6442fd83 100755 --- a/scripts/route5gate.asm +++ b/scripts/route5gate.asm @@ -2,7 +2,7 @@ Route5GateScript: ; 1df33 (7:5f33) call EnableAutoTextBoxDrawing ld a, [W_ROUTE5GATECURSCRIPT] ld hl, Route5GateScriptPointers - jp CallFunctionInTable + jp JumpTable Route5GateScriptPointers: ; 1df3f (7:5f3f) dw Route5GateScript0 diff --git a/scripts/route6gate.asm b/scripts/route6gate.asm index a4b6149c..dd179e28 100755 --- a/scripts/route6gate.asm +++ b/scripts/route6gate.asm @@ -2,7 +2,7 @@ Route6GateScript: ; 1e03d (7:603d) call EnableAutoTextBoxDrawing ld hl, Route6GateScriptPointers ld a, [W_ROUTE6GATECURSCRIPT] - call CallFunctionInTable + call JumpTable ret Route6GateScriptPointers: ; 1e04a (7:604a) diff --git a/scripts/route7gate.asm b/scripts/route7gate.asm index b55f813c..7f87b78c 100755 --- a/scripts/route7gate.asm +++ b/scripts/route7gate.asm @@ -2,7 +2,7 @@ Route7GateScript: ; 1e100 (7:6100) call EnableAutoTextBoxDrawing ld a, [W_ROUTE7GATECURSCRIPT] ld hl, Route7GateScriptPointers - call CallFunctionInTable + call JumpTable ret Route7GateScriptPointers: ; 1e10d (7:610d) diff --git a/scripts/route8gate.asm b/scripts/route8gate.asm index 96bfa875..fe2e3c3c 100755 --- a/scripts/route8gate.asm +++ b/scripts/route8gate.asm @@ -2,7 +2,7 @@ Route8GateScript: ; 1e1c7 (7:61c7) call EnableAutoTextBoxDrawing ld hl, Route8GateScriptPointers ld a, [W_ROUTE8GATECURSCRIPT] - jp CallFunctionInTable + jp JumpTable Route8GateScriptPointers: ; 1e1d3 (7:61d3) dw Route8GateScript0 diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index 2f8ff34b..a0a0ffda 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -2,7 +2,7 @@ SafariZoneEntranceScript: ; 751cd (1d:51cd) call EnableAutoTextBoxDrawing ld hl, SafariZoneEntranceScriptPointers ld a, [wSafariZoneEntranceCurScript] - jp CallFunctionInTable + jp JumpTable SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) dw .SafariZoneEntranceScript0 diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm index e3234b0a..56ccd2e3 100755 --- a/scripts/seafoamislands4.asm +++ b/scripts/seafoamislands4.asm @@ -42,7 +42,7 @@ SeafoamIslands4Script: ; 4658d (11:658d) .asm_465ed ld hl, SeafoamIslands4ScriptPointers ld a, [wSeafoamIslands4CurScript] - jp CallFunctionInTable + jp JumpTable Seafoam4HolesCoords: ; 465f6 (11:65f6) db $10,$03 diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm index 98c27666..f8b7aed7 100755 --- a/scripts/seafoamislands5.asm +++ b/scripts/seafoamislands5.asm @@ -2,7 +2,7 @@ SeafoamIslands5Script: ; 46799 (11:6799) call EnableAutoTextBoxDrawing ld a, [wSeafoamIslands5CurScript] ld hl, SeafoamIslands5ScriptPointers - jp CallFunctionInTable + jp JumpTable SeafoamIslands5Script_467a5: ; 467a5 (11:67a5) xor a diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm index eea27ec9..7bdafe2c 100755 --- a/scripts/ssanne2.asm +++ b/scripts/ssanne2.asm @@ -2,7 +2,7 @@ SSAnne2Script: ; 6139f (18:539f) call EnableAutoTextBoxDrawing ld hl, SSAnne2ScriptPointers ld a, [W_SSANNE2CURSCRIPT] - jp CallFunctionInTable + jp JumpTable SSAnne2Script_613ab: ; 613ab (18:53ab) xor a diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index 67e3cddd..a8fc8ce7 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -1,5 +1,7 @@ VermilionCityScript: ; 197a1 (6:57a1) call EnableAutoTextBoxDrawing + ld hl, wPreventBlackout + res 7, [hl] ld hl, wd126 bit 6, [hl] res 6, [hl] @@ -11,11 +13,24 @@ VermilionCityScript: ; 197a1 (6:57a1) call nz, VermilionCityScript_197c0 ld hl, VermilionCityScriptPointers ld a, [W_VERMILIONCITYCURSCRIPT] - jp CallFunctionInTable + call JumpTable + call VermilionCityScript_19869 + ret + +VermilionCityScript_19869: + CheckEventHL EVENT_152 + ret nz + CheckEventReuseHL EVENT_GOT_BIKE_VOUCHER + ret z + SetEventReuseHL EVENT_152 + ret VermilionCityScript_197c0: ; 197c0 (6:57c0) call Random - ld a, [$ffd4] + ld a, [hRandomAdd] + ld b, a + ld a, [hRandomSub] + adc b and $e ld [wFirstLockTrashCanIndex], a ret @@ -40,10 +55,10 @@ VermilionCityScriptPointers: ; 197dc (6:57dc) VermilionCityScript0: ; 197e6 (6:57e6) ld a, [wSpriteStateData1 + 9] and a ; cp SPRITE_FACING_DOWN - ret nz + jr nz, .asm_198de ld hl, CoordsData_19823 call ArePlayerCoordsInArray - ret nc + jr nc, .asm_198de xor a ld [hJoyHeld], a ld [wcf0d], a @@ -67,6 +82,9 @@ VermilionCityScript0: ; 197e6 (6:57e6) ld [W_VERMILIONCITYCURSCRIPT], a ret +.asm_198de + ret + CoordsData_19823: ; 19823 (6:5823) db $1e,$12 db $ff @@ -122,11 +140,12 @@ VermilionCityTextPointers: ; 1986f (6:586f) dw VermilionCityText6 dw VermilionCityText7 dw VermilionCityText8 + dw VermilionCityText9 dw MartSignText dw PokeCenterSignText - dw VermilionCityText11 dw VermilionCityText12 dw VermilionCityText13 + dw VermilionCityText14 VermilionCityText1: ; 19889 (6:5889) TX_FAR _VermilionCityText1 @@ -225,33 +244,43 @@ VermilionCityText5: ; 19922 (6:5922) ld a, MACHOP call PlayCry call WaitForSoundToFinish - ld hl, VermilionCityText14 + ld hl, VermilionCityText15 ret -VermilionCityText14: ; 19933 (6:5933) - TX_FAR _VermilionCityText14 +VermilionCityText15: ; 19933 (6:5933) + TX_FAR _VermilionCityText15 db "@" VermilionCityText6: ; 19938 (6:5938) TX_FAR _VermilionCityText6 db "@" -VermilionCityText7: ; 1993d (6:593d) - TX_FAR _VermilionCityText7 - db "@" +VermilionCityText8: ; 1993d (6:593d) + TX_ASM + callba Func_f1a8a + jp TextScriptEnd -VermilionCityText8: ; 19942 (6:5942) - TX_FAR _VermilionCityText8 - db "@" +VermilionCityText9: ; 19942 (6:5942) + TX_ASM + callba Func_f1a96 + jp TextScriptEnd -VermilionCityText11: ; 19947 (6:5947) - TX_FAR _VermilionCityText11 - db "@" +VermilionCityText12: + TX_ASM + callba Func_f1aa2 + jp TextScriptEnd -VermilionCityText12: ; 1994c (6:594c) - TX_FAR _VermilionCityText12 - db "@" +VermilionCityText13: ; 19947 (6:5947) + TX_ASM + callba Func_f1aae + jp TextScriptEnd -VermilionCityText13: ; 19951 (6:5951) - TX_FAR _VermilionCityText13 - db "@" +VermilionCityText14: ; 1994c (6:594c) + TX_ASM + callba Func_f1aba + jp TextScriptEnd + +VermilionCityText7: ; 19951 (6:5951) + TX_ASM + callba Func_f1a0f + jp TextScriptEnd diff --git a/scripts/vermilioncity2.asm b/scripts/vermilioncity2.asm index 4be44db0..eb7ea37a 100755 --- a/scripts/vermilioncity2.asm +++ b/scripts/vermilioncity2.asm @@ -65,4 +65,47 @@ OfficerJennyText5: TX_FAR _OfficerJennyText5 db "@" - dr $f1a8a,$f1ac6 +Func_f1a8a: + ld hl, VermilionCityText_f1a91 + call PrintText + ret + +VermilionCityText_f1a91: + TX_FAR _VermilionCityText8 + db "@" + +Func_f1a96: + ld hl, VermilionCityText_f1a9d + call PrintText + ret + +VermilionCityText_f1a9d: + TX_FAR _VermilionCityText9 + db "@" + +Func_f1aa2: + ld hl, VermilionCityText_f1aa9 + call PrintText + ret + +VermilionCityText_f1aa9: + TX_FAR _VermilionCityText12 + db "@" + +Func_f1aae: + ld hl, VermilionCityText_f1ab5 + call PrintText + ret + +VermilionCityText_f1ab5: + TX_FAR _VermilionCityText13 + db "@" + +Func_f1aba: + ld hl, VermilionCityText_f1ac1 + call PrintText + ret + +VermilionCityText_f1ac1: + TX_FAR _VermilionCityText14 + db "@" diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index 4f4b2875..8d974abc 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -3,7 +3,7 @@ ViridianMartScript: ; 1d46e (7:546e) call EnableAutoTextBoxDrawing ld hl, ViridianMartScriptPointers ld a, [W_VIRIDIANMARKETCURSCRIPT] - jp CallFunctionInTable + jp JumpTable ViridianMartScript_1d47d: ; 1d47d (7:547d) CheckEvent EVENT_OAK_GOT_PARCEL diff --git a/text/maps/vermilion_city.asm b/text/maps/vermilion_city.asm index 603b218a..f5e0adba 100644 --- a/text/maps/vermilion_city.asm +++ b/text/maps/vermilion_city.asm @@ -35,7 +35,7 @@ _SSAnneWelcomeText9:: prompt _SSAnneFlashedTicketText:: - text $52, " flashed" + text " flashed" line "the S.S.TICKET!" para "Great! Welcome to" @@ -43,7 +43,7 @@ _SSAnneFlashedTicketText:: done _SSAnneNoTicketText:: - text $52, " doesn't" + text " doesn't" line "have the needed" cont "S.S.TICKET." @@ -70,8 +70,8 @@ _VermilionCityText5:: text "MACHOP: Guoh!" line "Gogogoh!@@" -_VermilionCityText14:: - db $0 +_VermilionCityText15:: + text "" para "A MACHOP is" line "stomping the land" cont "flat." @@ -127,13 +127,13 @@ _OfficerJennyText5:: line "doing?" done -_VermilionCityText7:: +_VermilionCityText8:: text "VERMILION CITY" line "The Port of" cont "Exquisite Sunsets" done -_VermilionCityText8:: +_VermilionCityText9:: text "NOTICE!" para "ROUTE 12 may be" @@ -147,13 +147,13 @@ _VermilionCityText8:: para "VERMILION POLICE" done -_VermilionCityText11:: +_VermilionCityText12:: text "#MON FAN CLUB" line "All #MON fans" cont "welcome!" done -_VermilionCityText12:: +_VermilionCityText13:: text "VERMILION CITY" line "#MON GYM" cont "LEADER: LT.SURGE" @@ -162,7 +162,7 @@ _VermilionCityText12:: line "American!" done -_VermilionCityText13:: +_VermilionCityText14:: text "VERMILION HARBOR" done -- cgit v1.3.1-sl0p From e698f02b768bea5d18a33e4a94330c2dd458e9f1 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 15:56:04 -0400 Subject: Oaks Lab rewrite part 4 --- charmap.asm | 1 + scripts/oakslab.asm | 387 ++++++++++++++++++++++++++++++++++++++++++++++++- text/maps/oaks_lab.asm | 80 +++++----- 3 files changed, 422 insertions(+), 46 deletions(-) (limited to 'text/maps') diff --git a/charmap.asm b/charmap.asm index 1932b39e..e4368d40 100644 --- a/charmap.asm +++ b/charmap.asm @@ -150,6 +150,7 @@ charmap "ー", $E3 charmap "", $4a ; PkMn charmap "@", $50 charmap "", $52 +charmap "", $53 charmap "#", $54 ;charmap "POKé", $54 charmap "′", $71 diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 95ee4f25..f441605c 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -288,7 +288,6 @@ OaksLabRLE_PlayerWalksToOak: db D_LEFT, 1 db $FF - OaksLabScript11: ld a, [wSimulatedJoypadStatesIndex] and a @@ -701,7 +700,7 @@ OaksLabScript_1c8b9: ret OaksLabScript_1d076: - ld hl, OaksLabText_1c946 + ld hl, OaksLabTextPointers2 ld a, l ld [wMapTextPtr], a ld a, h @@ -709,13 +708,389 @@ OaksLabScript_1d076: ret OaksLabTextPointers: ; 1d082 (7:5082) - dr $1c910,$1c946 + dw OaksLabText1 + dw OaksLabText2 + dw OaksLabText3 + dw OaksLabText4 + dw OaksLabText5 + dw OaksLabText6 + dw OaksLabText7 + dw OaksLabText8 + dw OaksLabText9 + dw OaksLabText10 + dw OaksLabText11 + dw OaksLabText12 + dw OaksLabText13 + dw OaksLabText14 + dw OaksLabText15 + dw OaksLabText16 + dw OaksLabText17 + dw OaksLabText18 + dw OaksLabText19 + dw OaksLabText20 + dw OaksLabText21 + dw OaksLabText22 + dw OaksLabText23 + dw OaksLabText24 + dw OaksLabText25 + dw OaksLabText26 + dw OaksLabText27 + +OaksLabTextPointers2: + dw OaksLabText1 + dw OaksLabText2 + dw OaksLabText3 + dw OaksLabText4 + dw OaksLabText5 + dw OaksLabText6 + dw OaksLabText7 + dw OaksLabText8 + dw OaksLabText9 + +OaksLabText1: + TX_ASM + CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 + jr nz, .asm_1c968 + ld hl, OaksLabText_1c97d + call PrintText + jr .asm_1c97a + +.asm_1c968 + CheckEventReuseA EVENT_GOT_STARTER + jr nz, .asm_1c974 + ld hl, OaksLabText_1c982 + call PrintText + jr .asm_1c97a + +.asm_1c974 + ld hl, OaksLabText_1c987 + call PrintText +.asm_1c97a + jp TextScriptEnd + +OaksLabText_1c97d: + TX_FAR _OaksLabGaryText1 + db "@" + +OaksLabText_1c982: + TX_FAR _OaksLabText40 + db "@" + +OaksLabText_1c987: + TX_FAR _OaksLabText41 + db "@" + +OaksLabText2: + TX_ASM + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + CheckEvent EVENT_OAK_ASKED_TO_CHOOSE_MON + jr nz, OaksLabScript_1c9ac + ld a, $0 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, OaksLabText_1c9a7 + call PrintText + jp TextScriptEnd + +OaksLabText_1c9a7: + TX_FAR _OaksLabText39 + db "@" + +OaksLabScript_1c9ac: + ld a, $1 + ld [wSavedPlayerScreenY], a + xor a + ld [wWhichEmotionBubble], a + predef EmotionBubble + ld a, $8 + ld [W_OAKSLABCURSCRIPT], a + jp TextScriptEnd + +OaksLabText3: + TX_ASM + CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS + jr nz, .asm_1c9d9 + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned + call CountSetBits + ld a, [wNumSetBits] + cp 2 + jr c, .asm_1c9ec +.asm_1c9d9 + ld hl, OaksLabText_1ca9f + call PrintText + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + predef DisplayDexRating + jp .asm_1ca6f + +.asm_1c9ec + ld b, POKE_BALL + call IsItemInBag + jr nz, .asm_1ca69 + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned + call CountSetBits + ld a, [wNumSetBits] + cp 2 + jr nc, .asm_1ca69 + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE + jr nz, .asm_1ca52 + CheckEvent EVENT_GOT_POKEDEX + jr nz, .asm_1ca4a + CheckEventReuseA EVENT_BATTLED_RIVAL_IN_OAKS_LAB + jr nz, .asm_1ca2b + ld a, [wd72e] + bit 3, a + jr nz, .asm_1ca23 + ld hl, OaksLabText_1ca72 + call PrintText + jr .asm_1ca6f + +.asm_1ca23 + ld hl, OaksLabText_1ca77 + call PrintText + jr .asm_1ca6f + +.asm_1ca2b + ld b, OAKS_PARCEL + call IsItemInBag + jr nz, .asm_1ca3a + ld hl, OaksLabText_1ca7c + call PrintText + jr .asm_1ca6f + +.asm_1ca3a + ld hl, OaksLabText_1ca81 + call PrintText + call OaksLabScript_1c897 + ld a, $13 + ld [W_OAKSLABCURSCRIPT], a + jr .asm_1ca6f + +.asm_1ca4a + ld hl, OaksLabText_1ca8b + call PrintText + jr .asm_1ca6f + +.asm_1ca52 + CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK + jr nz, .asm_1ca69 + lb bc, POKE_BALL, 5 + call GiveItem + ld hl, OaksLabText_1ca90 + call PrintText + jr .asm_1ca6f + +.asm_1ca69 + ld hl, OaksLabText_1ca9a + call PrintText +.asm_1ca6f + jp TextScriptEnd + +OaksLabText_1ca72: + TX_FAR _OaksLabPikachuText + db "@" + +OaksLabText_1ca77: + TX_FAR _OaksLabText_1d2f5 + db "@" + +OaksLabText_1ca7c: + TX_FAR _OaksLabText_1d2fa + db "@" + +OaksLabText_1ca81: + TX_FAR _OaksLabDeliverParcelText1 + TX_SFX_KEY_ITEM + TX_FAR _OaksLabDeliverParcelText2 + db "@" + +OaksLabText_1ca8b: + TX_FAR _OaksLabAroundWorldText + db "@" + +OaksLabText_1ca90: + TX_FAR _OaksLabGivePokeballsText1 + TX_SFX_KEY_ITEM + TX_FAR _OaksLabGivePokeballsText2 + db "@" + +OaksLabText_1ca9a: + TX_FAR _OaksLabPleaseVisitText + db "@" + +OaksLabText_1ca9f: + TX_FAR _OaksLabText_1d31d + db "@" + +OaksLabText4: +OaksLabText5: + TX_ASM + ld hl, OaksLabText_1caae + call PrintText + jp TextScriptEnd + +OaksLabText_1caae: + TX_FAR _OaksLabText_1d32c + db "@" + +OaksLabText6: + TX_FAR _OaksLabText8 + db "@" + +OaksLabText7: + TX_ASM + ld hl, OaksLabText_1cac2 + call PrintText + jp TextScriptEnd + +OaksLabText_1cac2: + TX_FAR _OaksLabText_1d340 + db "@" + +OaksLabText13: + TX_ASM + ld hl, OaksLabText_1cad1 + call PrintText + jp TextScriptEnd + +OaksLabText_1cad1: + TX_FAR _OaksLabRivalWaitingText + db "@" + +OaksLabText14: + TX_ASM + ld hl, OaksLabText_1cae0 + call PrintText + jp TextScriptEnd + +OaksLabText_1cae0: + TX_FAR _OaksLabChooseMonText + db "@" + +OaksLabText15: + TX_ASM + ld hl, OaksLabText_1caef + call PrintText + jp TextScriptEnd + +OaksLabText_1caef: + TX_FAR _OaksLabRivalInterjectionText + db "@" + +OaksLabText16: + TX_ASM + ld hl, OaksLabText_1cafe + call PrintText + jp TextScriptEnd + +OaksLabText_1cafe: + TX_FAR _OaksLabBePatientText + db "@" + +OaksLabText17: + TX_ASM + ld hl, OaksLabText_1cb25 + call PrintText + ld hl, OaksLabText_1cb2a + call PrintText + ld hl, OaksLabText_1cb30 + call PrintText + ld hl, OaksLabText_1cb35 + call PrintText + ld hl, OaksLabText_1cb3a + call PrintText + jp TextScriptEnd + +OaksLabText_1cb25: + TX_FAR _OaksLabRivalTakesText1 + db "@" + +OaksLabText_1cb2a: + TX_FAR _OaksLabRivalTakesText2 + TX_SFX_KEY_ITEM + db "@" + +OaksLabText_1cb30: + TX_FAR _OaksLabRivalTakesText3 + db "@" + +OaksLabText_1cb35: + TX_FAR _OaksLabRivalTakesText4 + db "@" + +OaksLabText_1cb3a: + TX_FAR _OaksLabRivalTakesText5 + db "@" + +OaksLabText18: + TX_ASM + ld a, PIKACHU + ld [W_PLAYERSTARTER], a + ld [wd11e], a + call GetMonName + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, OaksLabText_1cb85 + call PrintText + ld hl, OaksLabText_1cb8a + call PrintText + xor a + ld [wMonDataLocation], a + ld a, 5 + ld [wCurEnemyLVL], a + ld a, PIKACHU + ld [wd11e], a + ld [wcf91], a + call AddPartyMon + ld a, 163 + ld [wPartyMon1CatchRate], a + call Func_152d + SetEvent EVENT_GOT_STARTER + ld hl, wd72e + set 3, [hl] + jp TextScriptEnd + +OaksLabText_1cb85: + TX_FAR _OaksLabOakGivesText + db "@" + +OaksLabText_1cb8a: + TX_FAR _OaksLabReceivedText + TX_SFX_KEY_ITEM + db "@" -OaksLabText_1c946: - dr $1c946,$1cbae +OaksLabText10: + dr $1cb90,$1cb9f +OaksLabText11: + dr $1cb9f,$1cbae OaksLabRivalDefeatedText: dr $1cbae,$1cbb3 OaksLabRivalBeatYouText: - dr $1cbb3,$1cc22 + dr $1cbb3,$1cbb8 +OaksLabText12: + dr $1cbb8,$1cbc7 +OaksLabText26: + dr $1cbc7,$1cbe0 +OaksLabText27: + dr $1cbe0,$1cbef +OaksLabText19: + dr $1cbef,$1cbf4 +OaksLabText20: + dr $1cbf4,$1cbf9 +OaksLabText21: + dr $1cbf9,$1cbfe +OaksLabText22: + dr $1cbfe,$1cc03 +OaksLabText23: + dr $1cc03,$1cc09 +OaksLabText24: + dr $1cc09,$1cc0e +OaksLabText25: + dr $1cc0e,$1cc13 +OaksLabText8: +OaksLabText9: + dr $1cc13,$1cc22 diff --git a/text/maps/oaks_lab.asm b/text/maps/oaks_lab.asm index 5b12e1b8..097fa931 100644 --- a/text/maps/oaks_lab.asm +++ b/text/maps/oaks_lab.asm @@ -1,6 +1,6 @@ _OaksLabGaryText1:: - text $53,": Yo" - line $52,"! Gramps" + text ": Yo" + line "! Gramps" cont "isn't around!" para "I ran here 'cos" @@ -9,13 +9,13 @@ _OaksLabGaryText1:: done _OaksLabText40:: - text $53,": Humph!" + text ": Humph!" line "I'll get a better" cont "#MON than you!" done _OaksLabText41:: - text $53,": Heh, my" + text ": Heh, my" line "#MON looks a" cont "lot stronger." done @@ -48,7 +48,7 @@ _OaksLabText_1d2fa:: done _OaksLabDeliverParcelText1:: - text "OAK: Oh, ", $52, "!" + text "OAK: Oh, !" para "How is my old" line "#MON?" @@ -63,15 +63,15 @@ _OaksLabDeliverParcelText1:: para "What? You have" line "something for me?" - para $52, " delivered" + para " delivered" line "OAK's PARCEL.@@" _OaksLabDeliverParcelText2:: - db $0 + text "" para "Ah! This is the" line "custom # BALL" cont "I ordered!" - cont "Thanks, ",$52,"!" + cont "Thanks, !" para "By the way, I must" line "ask you to do" @@ -81,7 +81,7 @@ _OaksLabDeliverParcelText2:: _OaksLabAroundWorldText:: text "#MON around the" line "world wait for" - cont "you, ", $52, "!" + cont "you, !" done _OaksLabGivePokeballsText1:: @@ -95,11 +95,11 @@ _OaksLabGivePokeballsText1:: cont "to capture wild" cont "#MON." - para $52, " got 5" + para " got 5" line "# BALLs!@@" _OaksLabGivePokeballsText2:: - db $0 + text "" para "When a wild" line "#MON appears," cont "it's fair game." @@ -155,13 +155,13 @@ _OaksLabText_1d340:: done _OaksLabRivalWaitingText:: - text $53, ": Gramps!" + text ": Gramps!" line "I'm fed up with" cont "waiting!" done _OaksLabChooseMonText:: - text "OAK: Hmm? ",$53,"?" + text "OAK: Hmm? ?" line "Why are you here" cont "already?" @@ -171,7 +171,7 @@ _OaksLabChooseMonText:: para "Ah, whatever!" line "Just wait there." - para "Look, ",$52,"! Do" + para "Look, ! Do" line "you see that ball" cont "on the table?" @@ -184,34 +184,34 @@ _OaksLabChooseMonText:: done _OaksLabRivalInterjectionText:: - text $53, ": Hey!" + text ": Hey!" line "Gramps! What" cont "about me?" done _OaksLabBePatientText:: text "OAK: Be patient," - line $53,", I'll give" + line ", I'll give" cont "you one later." done _OaksLabRivalTakesText1:: - text $53,": No way!" - line $52,", I want" + text ": No way!" + line ", I want" cont "this #MON!" prompt _OaksLabRivalTakesText2:: - text $53," snatched" + text " snatched" line "the #MON!@@" _OaksLabRivalTakesText3:: - text "OAK: ",$53,"! What" + text "OAK: ! What" line "are you doing?" prompt _OaksLabRivalTakesText4:: - text $53,": Gramps, I" + text ": Gramps, I" line "want this one!" prompt @@ -225,12 +225,12 @@ _OaksLabRivalTakesText5:: line "give you one" cont "anyway..." - para $52,", come over" + para ", come over" line "here." done _OaksLabOakGivesText:: - text "OAK: ",$52,", this" + text "OAK: , this" line "is the #MON I" cont "caught earlier." @@ -241,9 +241,9 @@ _OaksLabOakGivesText:: prompt _OaksLabReceivedText:: - text $52," received" + text " received" line "a @" - TX_RAM $CD6D + TX_RAM wcd6d text "!@@" _OaksLabLeavingText:: @@ -252,8 +252,8 @@ _OaksLabLeavingText:: done _OaksLabRivalChallengeText:: - text $53, ": Wait" - line $52, "!" + text ": Wait" + line "!" cont "Let's check out" cont "our #MON!" @@ -269,17 +269,17 @@ _OaksLabText_1d3be:: prompt _OaksLabText_1d3c3:: - text $53, ": Yeah! Am" + text ": Yeah! Am" line "I great or what?" prompt _OaksLabRivalToughenUpText:: - text $53, ": Okay!" + text ": Okay!" line "I'll make my" cont "#MON fight to" cont "toughen it up!" - para $52, "! Gramps!" + para "! Gramps!" line "Smell you later!" done @@ -308,18 +308,18 @@ _OaksLabPikachuDislikesPokeballsText2:: done _OaksLabText21:: - text $53, ": Gramps!" + text ": Gramps!" done _OaksLabText22:: - text $53,": Gramps," + text ": Gramps," line "my #MON has" cont "grown stronger!" cont "Check it out!" done _OaksLabText23:: - text "OAK: Ah, ",$53,"," + text "OAK: Ah, ," line "good timing!" para "I needed to ask" @@ -342,11 +342,11 @@ _OaksLabText24:: done _OaksLabText25:: - text "OAK: ", $52, " and" - line $53, "! Take" + text "OAK: and" + line "! Take" cont "these with you!" - para $52, " got" + para " got" line "#DEX from OAK!@@" _OaksLabText26:: @@ -373,11 +373,11 @@ _OaksLabText26:: done _OaksLabText27:: - text $53, ": Alright" + text ": Alright" line "Gramps! Leave it" cont "all to me!" - para $52, ", I hate to" + para ", I hate to" line "say it, but I" cont "don't need you!" @@ -387,10 +387,10 @@ _OaksLabText27:: para "I'll tell her not" line "to lend you one," - cont $52, "! Hahaha!" + cont "! Hahaha!" done _OaksLabText_1d405:: text "I study #MON as" line "PROF.OAK's AIDE." - done \ No newline at end of file + done -- cgit v1.3.1-sl0p From 287fc9855f4a569eaa5ea3914d7f8ed951e18318 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sun, 29 May 2016 14:08:51 -0400 Subject: Museum 1F far text scripts --- engine/bank3c.asm | 3 +- scripts/museum1f2.asm | 211 ++++++++++++++++++++++++++++++++++++++++++++++++ text/maps/museum_1f.asm | 2 +- 3 files changed, 214 insertions(+), 2 deletions(-) create mode 100755 scripts/museum1f2.asm (limited to 'text/maps') diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 01c3486b..097dfd3e 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -351,7 +351,8 @@ INCLUDE "scripts/route22_2.asm" INCLUDE "scripts/redshouse1f2.asm" INCLUDE "scripts/oakslab2.asm" INCLUDE "scripts/school2.asm" - dr $f1c1b, $f220e +INCLUDE "scripts/museum1f2.asm" + dr $f1d98, $f220e INCLUDE "data/mapHeaders/beach_house.asm" INCLUDE "scripts/beach_house.asm" diff --git a/scripts/museum1f2.asm b/scripts/museum1f2.asm new file mode 100755 index 00000000..f6dfa509 --- /dev/null +++ b/scripts/museum1f2.asm @@ -0,0 +1,211 @@ +Func_f1c1b: + ld a, [wYCoord] + cp $4 + jr nz, .asm_f1c2c + ld a, [wXCoord] + cp $d + jp z, .asm_f1cde + jr .asm_f1c48 + +.asm_f1c2c + cp $3 + jr nz, .asm_f1c38 + ld a, [wXCoord] + cp a, $c + jp z, .asm_f1cde +.asm_f1c38 + CheckEvent EVENT_BOUGHT_MUSEUM_TICKET + jr nz, .asm_f1c4f + ld hl, Museum1FText_f1d20 + call PrintText + jp .asm_f1cfc + +.asm_f1c48 + CheckEvent EVENT_BOUGHT_MUSEUM_TICKET + jr z, .asm_f1c58 +.asm_f1c4f + ld hl, Museum1FText_f1d25 + call PrintText + jp .asm_f1cfc + +.asm_f1c58 + ld a, $13 + ld [wTextBoxID], a + call DisplayTextBoxID + xor a + ld [hJoyHeld], a + ld hl, Museum1FText_f1d02 + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jr nz, .asm_f1cbf + xor a + ld [hMoney], a + ld [hMoney + 1], a + ld a, $50 + ld [hMoney + 2], a + call HasEnoughMoney + jr nc, .asm_f1c89 + ld hl, Museum1FText_f1d0c + call PrintText + jp .asm_f1cbf + +.asm_f1c89 + ld hl, Museum1FText_f1d07 + call PrintText + SetEvent EVENT_BOUGHT_MUSEUM_TICKET + xor a + ld [wPriceTemp], a + ld [wPriceTemp + 1], a + ld a, $50 + ld [wPriceTemp + 2], a + ld hl, wPriceTemp + 2 + ld de, wPlayerMoney + 2 + ld c, 3 + predef SubBCDPredef + ld a, $13 + ld [wTextBoxID], a + call DisplayTextBoxID + ld a, SFX_PURCHASE + call PlaySoundWaitForCurrent + call WaitForSoundToFinish + jr .asm_f1cd7 + +.asm_f1cbf + ld hl, Museum1FText_f1cfd + call PrintText + ld a, $1 + ld [wSimulatedJoypadStatesIndex], a + ld a, D_DOWN + ld [wSimulatedJoypadStatesEnd], a + call StartSimulatingJoypadStates + call UpdateSprites + jr .asm_f1cfc + +.asm_f1cd7 + ld a, $1 + ld [W_MUSEUM1FCURSCRIPT], a + jr .asm_f1cfc + +.asm_f1cde + ld hl, Museum1FText_f1d11 + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + cp 0 + jr nz, .asm_f1cf6 + ld hl, Museum1FText_f1d16 + call PrintText + jr .asm_f1cfc + +.asm_f1cf6 + ld hl, Museum1FText_f1d1b + call PrintText +.asm_f1cfc + ret + +Museum1FText_f1cfd: + TX_FAR _Museum1FText_5c21a + db "@" + +Museum1FText_f1d02: + TX_FAR _Museum1FText_5c21f + db "@" + +Museum1FText_f1d07: + TX_FAR _Museum1FText_5c224 + db "@" + +Museum1FText_f1d0c: + TX_FAR _Museum1FText_5c229 + db "@" + +Museum1FText_f1d11: + TX_FAR _Museum1FText_5c22e + db "@" + +Museum1FText_f1d16: + TX_FAR _Museum1FText_5c233 + db "@" + +Museum1FText_f1d1b: + TX_FAR _Museum1FText_5c238 + db "@" + +Museum1FText_f1d20: + TX_FAR _Museum1FText_5c23d + db "@" + +Museum1FText_f1d25: + TX_FAR _Museum1FText_5c242 + db "@" + +Func_f1d2a: + ld hl, Museum1FText_f1d31 + call PrintText + ret + +Museum1FText_f1d31: + TX_FAR _Museum1FText_5c251 + db "@" + +Func_f1d36: + CheckEvent EVENT_GOT_OLD_AMBER + jr nz, .asm_f1d64 + ld hl, Museum1FText_f1d6b + call PrintText + lb bc, OLD_AMBER, 1 + call GiveItem + jr nc, .asm_f1d5f + SetEvent EVENT_GOT_OLD_AMBER + ld a, HS_OLD_AMBER + ld [wMissableObjectIndex], a + predef HideObject + ld hl, Museum1FText_f1d70 + jr .asm_f1d67 + +.asm_f1d5f + ld hl, Museum1FText_f1d7b + jr .asm_f1d67 + +.asm_f1d64 + ld hl, Museum1FText_f1d76 +.asm_f1d67 + call PrintText + ret + +Museum1FText_f1d6b: + TX_FAR _Museum1FText_5c28e + db "@" + +Museum1FText_f1d70: + TX_FAR _ReceivedOldAmberText + TX_SFX_ITEM + db "@" + +Museum1FText_f1d76: + TX_FAR _Museum1FText_5c299 + db "@" + +Museum1FText_f1d7b: + TX_FAR _Museum1FText_5c29e + db "@" + +Func_f1d80: + ld hl, Museum1FText_f1d87 + call PrintText + ret + +Museum1FText_f1d87: + TX_FAR _Museum1FText_5c2ad + db "@" + +Func_f1d8c: + ld hl, Museum1FText_f1d93 + call PrintText + ret + +Museum1FText_f1d93: + TX_FAR _Museum1FText_5c2bc + db "@" diff --git a/text/maps/museum_1f.asm b/text/maps/museum_1f.asm index f5f7f042..71aeee3c 100644 --- a/text/maps/museum_1f.asm +++ b/text/maps/museum_1f.asm @@ -81,7 +81,7 @@ _Museum1FText_5c28e:: prompt _ReceivedOldAmberText:: - text $52, " received" + text " received" line "OLD AMBER!@@" _Museum1FText_5c299:: -- cgit v1.3.1-sl0p From ae723a065537be412cd152e81c72e53ebe3aaac3 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Mon, 30 May 2016 10:04:13 -0400 Subject: Cerulean Bike Shop --- data/map_header_banks.asm | 2 +- data/map_header_pointers.asm | 2 +- main.asm | 8 +++++++- scripts/bikeshop.asm | 23 ++++++++++++++--------- text/maps/bike_shop.asm | 2 +- 5 files changed, 24 insertions(+), 13 deletions(-) (limited to 'text/maps') 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 diff --git a/main.asm b/main.asm index 277b867f..e5100d0e 100755 --- a/main.asm +++ b/main.asm @@ -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 " exchanged" line "the BIKE VOUCHER" cont "for a BICYCLE.@@" -- cgit v1.3.1-sl0p