diff options
Diffstat (limited to 'scripts')
156 files changed, 2895 insertions, 2889 deletions
| diff --git a/scripts/agatha.asm b/scripts/agatha.asm index a8f9e137..cc209553 100755 --- a/scripts/agatha.asm +++ b/scripts/agatha.asm @@ -40,7 +40,8 @@ AgathaScriptPointers: ; 76469 (1d:6469)  AgathaScript4: ; 76473 (1d:6473)  	ret -asm_76474: ; 76474 (1d:6474) + +AgathaScript_76474: ; 76474 (1d:6474)  	ld hl, wSimulatedJoypadStatesEnd  	ld a, D_UP  	ld [hli], a @@ -66,16 +67,16 @@ AgathaScript0: ; 76490 (1d:6490)  	ld [hJoyHeld], a  	ld [wSimulatedJoypadStatesEnd], a  	ld [wSimulatedJoypadStatesIndex], a -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	cp $3  	jr c, .asm_764b4  	ld hl, wd865  	bit 6, [hl]  	set 6, [hl] -	jr z, asm_76474 +	jr z, AgathaScript_76474  .asm_764b4  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, D_UP  	ld [wSimulatedJoypadStatesEnd], a @@ -107,11 +108,11 @@ AgathaScript3: ; 764da (1d:64da)  AgathaScript2: ; 764ed (1d:64ed)  	call EndTrainerBattle -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, AgathaScript_76464  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, $1  	ld [W_GARYCURSCRIPT], a @@ -119,22 +120,22 @@ AgathaScript2: ; 764ed (1d:64ed)  AgathaTextPointers: ; 76505 (1d:6505)  	dw AgathaText1 -	dw AgathaText2 +	dw AgathaDontRunAwayText  AgathaTrainerHeaders: ; 76509 (1d:6509)  AgathaTrainerHeader0: ; 76509 (1d:6509)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd865 ; flag's byte -	dw AgathaBeforeBattleText ; 0x6520 TextBeforeBattle -	dw AgathaAfterBattleText ; 0x652a TextAfterBattle -	dw AgathaEndBattleText ; 0x6525 TextEndBattle -	dw AgathaEndBattleText ; 0x6525 TextEndBattle +	dw AgathaBeforeBattleText ; TextBeforeBattle +	dw AgathaAfterBattleText ; TextAfterBattle +	dw AgathaEndBattleText ; TextEndBattle +	dw AgathaEndBattleText ; TextEndBattle  	db $ff  AgathaText1: ; 76516 (1d:6516) -	db $08 ; asm +	TX_ASM  	ld hl, AgathaTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -151,6 +152,6 @@ AgathaAfterBattleText: ; 7652a (1d:652a)  	TX_FAR _AgathaAfterBattleText  	db "@" -AgathaText2: ; 7652f (1d:652f) -	TX_FAR _AgathaText2 +AgathaDontRunAwayText: ; 7652f (1d:652f) +	TX_FAR _AgathaDontRunAwayText  	db "@" diff --git a/scripts/battlecenterm.asm b/scripts/battlecenterm.asm index 5ab697a1..997be7c1 100755 --- a/scripts/battlecenterm.asm +++ b/scripts/battlecenterm.asm @@ -3,7 +3,7 @@ BattleCenterMScript: ; 4fd10 (13:7d10)  	ld a, [$ffaa]  	cp $2  	ld a, $8 -	jr z, .asm_4fd1d ; 0x4fd19 $2 +	jr z, .asm_4fd1d  	ld a, $c  .asm_4fd1d  	ld [$ff8d], a diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index 4bd26a7e..4a8183ec 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -7,24 +7,24 @@ BikeShopTextPointers: ; 1d73f (7:573f)  	dw BikeShopText3  BikeShopText1: ; 1d745 (7:5745) -	db $08 ; asm +	TX_ASM  	ld a, [wd75f]  	bit 0, a -	jr z, .asm_260d4 ; 0x1d74b +	jr z, .asm_260d4  	ld hl, BikeShopText_1d82f  	call PrintText  	jp .Done -.asm_260d4 ; 0x1d756 +.asm_260d4  	ld b, BIKE_VOUCHER  	call IsItemInBag -	jr z, .asm_41190 ; 0x1d75b +	jr z, .asm_41190  	ld hl, BikeShopText_1d81f  	call PrintText  	ld bc, (BICYCLE << 8) | 1  	call GiveItem  	jr nc, .BagFull  	ld a, BIKE_VOUCHER -	ldh [$db], a +	ld [$ffdb], a  	callba RemoveItemByID  	ld hl, wd75f  	set 0, [hl] @@ -35,7 +35,7 @@ BikeShopText1: ; 1d745 (7:5745)  	ld hl, BikeShopText_1d834  	call PrintText  	jr .Done -.asm_41190 ; 0x1d78c +.asm_41190  	ld hl, BikeShopText_1d810  	call PrintText  	xor a @@ -66,15 +66,15 @@ BikeShopText1: ; 1d745 (7:5745)  	call PrintText  	call HandleMenuInput  	bit 1, a -	jr nz, .asm_b7579 ; 0x1d7dc +	jr nz, .asm_b7579  	ld hl, wd730  	res 6, [hl]  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_b7579 ; 0x1d7e7 +	jr nz, .asm_b7579  	ld hl, BikeShopText_1d81a  	call PrintText -.asm_b7579 ; 0x1d7ef +.asm_b7579  	ld hl, BikeShopText_1d82a  	call PrintText  .Done @@ -104,7 +104,7 @@ BikeShopText_1d81f: ; 1d81f (7:581f)  	db "@"  BikeShopText_1d824: ; 1d824 (7:5824) -	TX_FAR _BikeShopText_1d824 ; 0x98eb2 +	TX_FAR _BikeShopText_1d824  	db $11, "@"  BikeShopText_1d82a: ; 1d82a (7:582a) @@ -120,7 +120,7 @@ BikeShopText_1d834: ; 1d834 (7:5834)  	db "@"  BikeShopText2: ; 1d839 (7:5839) -	db $08 ; asm +	TX_ASM  	ld hl, BikeShopText_1d843  	call PrintText  	jp TextScriptEnd @@ -130,13 +130,13 @@ BikeShopText_1d843: ; 1d843 (7:5843)  	db "@"  BikeShopText3: ; 1d848 (7:5848) -	db $08 ; asm +	TX_ASM  	ld a, [wd75f]  	bit 0, a  	ld hl, BikeShopText_1d861 -	jr nz, .asm_34d2d ; 0x1d851 +	jr nz, .asm_34d2d  	ld hl, BikeShopText_1d85c -.asm_34d2d ; 0x1d856 +.asm_34d2d  	call PrintText  	jp TextScriptEnd diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index 61a575b9..df608de3 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -19,7 +19,7 @@ BillsHouseScript1: ; 1e783 (7:6783)  	ld a, [wSpriteStateData1 + 9]  	and a  	ld de, MovementData_1e79c -	jr nz, .asm_1e78f ; 0x1e78a $3 +	jr nz, .asm_1e78f  	ld de, MovementData_1e7a0  .asm_1e78f  	ld a, $1 @@ -70,7 +70,7 @@ BillsHouseScript3: ; 1e7c5 (7:67c5)  	ld a, HS_BILL_1  	ld [wcc4d], a  	predef ShowObject -	ld c, $8 +	ld c, 8  	call DelayFrames  	ld a, $2  	ld [$ff8c], a @@ -115,43 +115,43 @@ BillsHouseText4: ; 1e83c (7:683c)  	db $fd  BillsHouseText1: ; 1e83d (7:683d) -	db $8 +	TX_ASM  	ld hl, BillsHouseText_1e865  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, asm_6b196 ; 0x1e84b $d -asm_4d03c: ; 1e84d (7:684d) +	jr nz, .asm_1e85a +.asm_1e84d  	ld hl, BillsHouseText_1e86a  	call PrintText  	ld a, $1  	ld [W_BILLSHOUSECURSCRIPT], a -	jr asm_fd4e2 ; 0x1e858 $8 -asm_6b196: ; 1e85a (7:685a) +	jr .asm_1e862 +.asm_1e85a  	ld hl, BillsHouseText_1e86f  	call PrintText -	jr asm_4d03c ; 0x1e860 $eb -asm_fd4e2 ; 0x1e862 +	jr .asm_1e84d +.asm_1e862  	jp TextScriptEnd  BillsHouseText_1e865: ; 1e865 (7:6865) -	TX_FAR _BillsHouseText_1e865 ; 0x8d267 +	TX_FAR _BillsHouseText_1e865  	db "@"  BillsHouseText_1e86a: ; 1e86a (7:686a) -	TX_FAR _BillsHouseText_1e86a ; 0x8d345 +	TX_FAR _BillsHouseText_1e86a  	db "@"  BillsHouseText_1e86f: ; 1e86f (7:686f) -	TX_FAR _BillsHouseText_1e86f ; 0x8d391 +	TX_FAR _BillsHouseText_1e86f  	db "@"  BillsHouseText2: ; 1e874 (7:6874) -	db $08 ; asm +	TX_ASM  	ld a, [wd7f2]  	bit 4, a -	jr nz, .asm_5491f ; 0x1e87a +	jr nz, .asm_1e8a9  	ld hl, BillThankYouText  	call PrintText  	ld bc, (S_S__TICKET << 8) | 1 @@ -167,14 +167,14 @@ BillsHouseText2: ; 1e874 (7:6874)  	ld a, HS_CERULEAN_GUARD_2  	ld [wcc4d], a  	predef HideObject -.asm_5491f ; 0x1e8a9 +.asm_1e8a9  	ld hl, BillsHouseText_1e8cb  	call PrintText -	jr .asm_bd408 ; 0x1e8af +	jr .asm_1e8b7  .BagFull  	ld hl, SSTicketNoRoomText  	call PrintText -.asm_bd408 ; 0x1e8b7 +.asm_1e8b7  	jp TextScriptEnd  BillThankYouText: ; 1e8ba (7:68ba) @@ -194,7 +194,7 @@ BillsHouseText_1e8cb: ; 1e8cb (7:68cb)  	db "@"  BillsHouseText3: ; 1e8d0 (7:68d0) -	db $08 ; asm +	TX_ASM  	ld hl, BillsHouseText_1e8da  	call PrintText  	jp TextScriptEnd diff --git a/scripts/bruno.asm b/scripts/bruno.asm index ffe05bce..257a830b 100755 --- a/scripts/bruno.asm +++ b/scripts/bruno.asm @@ -40,7 +40,8 @@ BrunoScriptPointers: ; 76312 (1d:6312)  BrunoScript4: ; 7631c (1d:631c)  	ret -asm_7631d: ; 7631d (1d:631d) + +BrunoScript_7631d: ; 7631d (1d:631d)  	ld hl, wSimulatedJoypadStatesEnd  	ld a, D_UP  	ld [hli], a @@ -66,16 +67,16 @@ BrunoScript0: ; 76339 (1d:6339)  	ld [hJoyHeld], a  	ld [wSimulatedJoypadStatesEnd], a  	ld [wSimulatedJoypadStatesIndex], a -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	cp $3  	jr c, .asm_7635d  	ld hl, wd864  	bit 6, [hl]  	set 6, [hl] -	jr z, asm_7631d +	jr z, BrunoScript_7631d  .asm_7635d  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, D_UP  	ld [wSimulatedJoypadStatesEnd], a @@ -107,31 +108,31 @@ BrunoScript3: ; 76383 (1d:6383)  BrunoScript2: ; 76396 (1d:6396)  	call EndTrainerBattle -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, BrunoScript_7630d  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp DisplayTextID  BrunoTextPointers: ; 763a8 (1d:63a8)  	dw BrunoText1 -	dw BrunoText2 +	dw BrunoDontRunAwayText  BrunoTrainerHeaders: ; 763ac (1d:63ac)  BrunoTrainerHeader0: ; 763ac (1d:63ac)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd864 ; flag's byte -	dw BrunoBeforeBattleText ; 0x63c3 TextBeforeBattle -	dw BrunoAfterBattleText ; 0x63cd TextAfterBattle -	dw BrunoEndBattleText ; 0x63c8 TextEndBattle -	dw BrunoEndBattleText ; 0x63c8 TextEndBattle +	dw BrunoBeforeBattleText ; TextBeforeBattle +	dw BrunoAfterBattleText ; TextAfterBattle +	dw BrunoEndBattleText ; TextEndBattle +	dw BrunoEndBattleText ; TextEndBattle  	db $ff  BrunoText1: ; 763b9 (1d:63b9) -	db $08 ; asm +	TX_ASM  	ld hl, BrunoTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -148,6 +149,6 @@ BrunoAfterBattleText: ; 763cd (1d:63cd)  	TX_FAR _BrunoAfterBattleText  	db "@" -BrunoText2: ; 763d2 (1d:63d2) -	TX_FAR _UnnamedText_763d2 +BrunoDontRunAwayText: ; 763d2 (1d:63d2) +	TX_FAR _BrunoDontRunAwayText  	db "@" diff --git a/scripts/celadoncity.asm b/scripts/celadoncity.asm index 004d8773..9107d254 100755 --- a/scripts/celadoncity.asm +++ b/scripts/celadoncity.asm @@ -44,10 +44,10 @@ CeladonCityText4: ; 19999 (6:5999)  	db "@"  CeladonCityText5: ; 1999e (6:599e) -	db $08 ; asm +	TX_ASM  	ld a, [wd777]  	bit 0, a -	jr nz, .asm_7053f ; 0x199a4 +	jr nz, .asm_7053f  	ld hl, TM41PreText  	call PrintText  	ld bc, (TM_41 << 8) | 1 @@ -62,7 +62,7 @@ CeladonCityText5: ; 1999e (6:599e)  	ld hl, wd777  	set 0, [hl]  	jr .Done -.asm_7053f ; 0x199c9 +.asm_7053f  	ld hl, TM41ExplanationText  	call PrintText  .Done @@ -90,7 +90,7 @@ CeladonCityText6: ; 199e7 (6:59e7)  CeladonCityText7: ; 199ec (6:59ec)  	TX_FAR _CeladonCityText7 -	db $08 ; asm +	TX_ASM  	ld a, POLIWRATH  	call PlayCry  	jp TextScriptEnd diff --git a/scripts/celadondiner.asm b/scripts/celadondiner.asm index 5ae89022..f6db1606 100755 --- a/scripts/celadondiner.asm +++ b/scripts/celadondiner.asm @@ -26,10 +26,10 @@ CeladonDinerText4: ; 4916e (12:516e)  	db "@"  CeladonDinerText5: ; 49173 (12:5173) -	db $08 ; asm +	TX_ASM  	ld a, [wd783]  	bit 0, a -	jr nz, .asm_eb14d ; 0x49179 +	jr nz, .asm_eb14d  	ld hl, CeladonDinerText_491a7  	call PrintText  	ld bc, (COIN_CASE << 8) | 1 @@ -39,15 +39,15 @@ CeladonDinerText5: ; 49173 (12:5173)  	set 0, [hl]  	ld hl, ReceivedCoinCaseText  	call PrintText -	jr .asm_68b61 ; 0x49194 +	jr .asm_68b61  .BagFull  	ld hl, CoinCaseNoRoomText  	call PrintText -	jr .asm_68b61 ; 0x4919c -.asm_eb14d ; 0x4919e +	jr .asm_68b61 +.asm_eb14d  	ld hl, CeladonDinerText_491b7  	call PrintText -.asm_68b61 ; 0x491a4 +.asm_68b61  	jp TextScriptEnd  CeladonDinerText_491a7: ; 491a7 (12:51a7) diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index 91d6742d..6887c9c4 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -124,59 +124,59 @@ CeladonGameCornerText1: ; 48ca4 (12:4ca4)  	db "@"  CeladonGameCornerText2: ; 48ca9 (12:4ca9) -	db $08 ; asm +	TX_ASM  	call CeladonGameCornerScript_48f1e  	ld hl, CeladonGameCornerText_48d22  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_c650b ; 0x48cba +	jr nz, .asm_48d0f  	ld b,COIN_CASE  	call IsItemInBag -	jr z, .asm_ed086 ; 0x48cc1 +	jr z, .asm_48d19  	call Has9990Coins -	jr nc, .asm_31338 ; 0x48cc6 +	jr nc, .asm_48d14  	xor a -	ldh [$9f], a -	ldh [$a1], a +	ld [$ff9f], a +	ld [$ffa1], a  	ld a, $10 -	ldh [$a0], a +	ld [$ffa0], a  	call HasEnoughMoney -	jr nc, .asm_b6ef0 ; 0x48cd4 -	ld hl, CeladonGameCornerText_48d31 ; $4d31 -	jr .asm_e2afd ; 0x48cd9 -.asm_b6ef0 ; 0x48cdb +	jr nc, .asm_48cdb +	ld hl, CeladonGameCornerText_48d31 +	jr .asm_48d1c +.asm_48cdb  	xor a -	ldh [$9f], a -	ldh [$a1], a +	ld [$ff9f], a +	ld [$ffa1], a  	ld a, $10 -	ldh [$a0], a +	ld [$ffa0], a  	ld hl, $ffa1  	ld de, wPlayerMoney + 2  	ld c, $3  	predef SubBCDPredef  	xor a -	ldh [$9f], a -	ldh [$a0], a +	ld [$ff9f], a +	ld [$ffa0], a  	ld a, $50 -	ldh [$a1], a +	ld [$ffa1], a  	ld de, wPlayerCoins + 1  	ld hl, $ffa1  	ld c, $2  	predef AddBCDPredef  	call CeladonGameCornerScript_48f1e  	ld hl, CeladonGameCornerText_48d27 -	jr .asm_e2afd ; 0x48d0d -.asm_c650b ; 0x48d0f +	jr .asm_48d1c +.asm_48d0f  	ld hl, CeladonGameCornerText_48d2c -	jr .asm_e2afd ; 0x48d12 -.asm_31338 ; 0x48d14 +	jr .asm_48d1c +.asm_48d14  	ld hl, CeladonGameCornerText_48d36 -	jr .asm_e2afd ; 0x48d17 -.asm_ed086 ; 0x48d19 +	jr .asm_48d1c +.asm_48d19  	ld hl, CeladonGameCornerText_48d3b -.asm_e2afd ; 0x48d1c +.asm_48d1c  	call PrintText  	jp TextScriptEnd @@ -213,22 +213,22 @@ CeladonGameCornerText4: ; 48d45 (12:4d45)  	db "@"  CeladonGameCornerText5: ; 48d4a (12:4d4a) -	db $08 ; asm +	TX_ASM  	ld a, [wd77e]  	bit 2, a -	jr nz, .asm_d0957 ; 0x48d50 +	jr nz, .asm_48d89  	ld hl, CeladonGameCornerText_48d9c  	call PrintText  	ld b, COIN_CASE  	call IsItemInBag -	jr z, .asm_5aef9 ; 0x48d5d +	jr z, .asm_48d93  	call Has9990Coins -	jr nc, .asm_98546 ; 0x48d62 +	jr nc, .asm_48d8e  	xor a -	ldh [$9f], a -	ldh [$a0], a +	ld [$ff9f], a +	ld [$ffa0], a  	ld a, $10 -	ldh [$a1], a +	ld [$ffa1], a  	ld de, wPlayerCoins + 1  	ld hl, $ffa1  	ld c, $2 @@ -238,16 +238,16 @@ CeladonGameCornerText5: ; 48d4a (12:4d4a)  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, Received10CoinsText -	jr .asm_c7d1a ; 0x48d87 -.asm_d0957 ; 0x48d89 +	jr .asm_48d96 +.asm_48d89  	ld hl, CeladonGameCornerText_48dac -	jr .asm_c7d1a ; 0x48d8c -.asm_98546 ; 0x48d8e +	jr .asm_48d96 +.asm_48d8e  	ld hl, CeladonGameCornerText_48da7 -	jr .asm_c7d1a ; 0x48d91 -.asm_5aef9 ; 0x48d93 +	jr .asm_48d96 +.asm_48d93  	ld hl, CeladonGameCornerText_48f19 -.asm_c7d1a ; 0x48d96 +.asm_48d96  	call PrintText  	jp TextScriptEnd @@ -272,13 +272,13 @@ CeladonGameCornerText6: ; 48db1 (12:4db1)  	db "@"  CeladonGameCornerText7: ; 48db6 (12:4db6) -	db $08 ; asm +	TX_ASM  	ld a, [wd77c]  	bit 1, a -	ld hl, CeladonGameCornerText_48dca ; $4dca -	jr z, .asm_be3fd ; 0x48dbf -	ld hl, CeladonGameCornerText_48dcf ; $4dcf -.asm_be3fd ; 0x48dc4 +	ld hl, CeladonGameCornerText_48dca +	jr z, .asm_48dc4 +	ld hl, CeladonGameCornerText_48dcf +.asm_48dc4  	call PrintText  	jp TextScriptEnd @@ -295,22 +295,22 @@ CeladonGameCornerText8: ; 48dd4 (12:4dd4)  	db "@"  CeladonGameCornerText9: ; 48dd9 (12:4dd9) -	db $08 ; asm +	TX_ASM  	ld a, [wd77e]  	bit 4, a -	jr nz, .asm_ed8bc ; 0x48ddf +	jr nz, .asm_48e13  	ld hl, CeladonGameCornerText_48e26  	call PrintText  	ld b, COIN_CASE  	call IsItemInBag -	jr z, .asm_df794 ; 0x48dec +	jr z, .asm_48e1d  	call Has9990Coins -	jr nc, .asm_f17c3 ; 0x48df1 +	jr nc, .asm_48e18  	xor a -	ldh [$9f], a -	ldh [$a0], a +	ld [$ff9f], a +	ld [$ffa0], a  	ld a, $20 -	ldh [$a1], a +	ld [$ffa1], a  	ld de, wPlayerCoins + 1  	ld hl, $ffa1  	ld c, $2 @@ -318,16 +318,16 @@ CeladonGameCornerText9: ; 48dd9 (12:4dd9)  	ld hl, wd77e  	set 4, [hl]  	ld hl, Received20CoinsText -	jr .asm_0ddc2 ; 0x48e11 -.asm_ed8bc ; 0x48e13 +	jr .asm_48e20 +.asm_48e13  	ld hl, CeladonGameCornerText_48e36 -	jr .asm_0ddc2 ; 0x48e16 -.asm_f17c3 ; 0x48e18 +	jr .asm_48e20 +.asm_48e18  	ld hl, CeladonGameCornerText_48e31 -	jr .asm_0ddc2 ; 0x48e1b -.asm_df794 ; 0x48e1d +	jr .asm_48e20 +.asm_48e1d  	ld hl, CeladonGameCornerText_48f19 -.asm_0ddc2 ; 0x48e20 +.asm_48e20  	call PrintText  	jp TextScriptEnd @@ -348,22 +348,22 @@ CeladonGameCornerText_48e36: ; 48e36 (12:4e36)  	db "@"  CeladonGameCornerText10: ; 48e3b (12:4e3b) -	db $08 ; asm +	TX_ASM  	ld a, [wd77e]  	bit 3, a -	jr nz, .asm_ff080 ; 0x48e41 -	ld hl, CeladonGameCornerText_48e88 ; $4e88 +	jr nz, .asm_48e75 +	ld hl, CeladonGameCornerText_48e88  	call PrintText  	ld b,COIN_CASE  	call IsItemInBag -	jr z, .asm_4fb0c ; 0x48e4e +	jr z, .asm_48e7f  	call Has9990Coins -	jr z, .asm_9505a ; 0x48e53 +	jr z, .asm_48e7a  	xor a -	ldh [$9f], a -	ldh [$a0], a +	ld [$ff9f], a +	ld [$ffa0], a  	ld a, $20 -	ldh [$a1], a +	ld [$ffa1], a  	ld de, wPlayerCoins + 1  	ld hl, $ffa1  	ld c, $2 @@ -371,16 +371,16 @@ CeladonGameCornerText10: ; 48e3b (12:4e3b)  	ld hl, wd77e  	set 3, [hl]  	ld hl, CeladonGameCornerText_48e8d -	jr .asm_78d65 ; 0x48e73 -.asm_ff080 ; 0x48e75 +	jr .asm_48e82 +.asm_48e75  	ld hl, CeladonGameCornerText_48e98 -	jr .asm_78d65 ; 0x48e78 -.asm_9505a ; 0x48e7a +	jr .asm_48e82 +.asm_48e7a  	ld hl, CeladonGameCornerText_48e93 -	jr .asm_78d65 ; 0x48e7d -.asm_4fb0c ; 0x48e7f +	jr .asm_48e82 +.asm_48e7f  	ld hl, CeladonGameCornerText_48f19 -.asm_78d65 ; 0x48e82 +.asm_48e82  	call PrintText  	jp TextScriptEnd @@ -389,7 +389,7 @@ CeladonGameCornerText_48e88: ; 48e88 (12:4e88)  	db "@"  CeladonGameCornerText_48e8d: ; 48e8d (12:4e8d) -	TX_FAR _CeladonGameCornerText_48e8d ; 0x9dceb +	TX_FAR _CeladonGameCornerText_48e8d  	db $0B, "@"  CeladonGameCornerText_48e93: ; 48e93 (12:4e93) @@ -401,7 +401,7 @@ CeladonGameCornerText_48e98: ; 48e98 (12:4e98)  	db "@"  CeladonGameCornerText11: ; 48e9d (12:4e9d) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGameCornerText_48ece  	call PrintText  	ld hl, wd72d @@ -410,14 +410,14 @@ CeladonGameCornerText11: ; 48e9d (12:4e9d)  	ld hl, CeladonGameCornerText_48ed3  	ld de, CeladonGameCornerText_48ed3  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	xor a -	ldh [$b4], a -	ldh [$b3], a -	ldh [$b2], a +	ld [hJoyHeld], a +	ld [hJoyPressed], a +	ld [hJoyReleased], a  	ld a, $1  	ld [W_CELADONGAMECORNERCURSCRIPT], a  	jp TextScriptEnd @@ -435,7 +435,7 @@ CeladonGameCornerText13: ; 48ed8 (12:4ed8)  	db "@"  CeladonGameCornerText12: ; 48edd (12:4edd) -	db $08 ; asm +	TX_ASM  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, CeladonGameCornerText_48f09 @@ -453,8 +453,8 @@ CeladonGameCornerText12: ; 48edd (12:4edd)  	jp TextScriptEnd  CeladonGameCornerText_48f09: ; 48f09 (12:4f09) -	TX_FAR _CeladonGameCornerText_48f09 ; 0x9ddb0 -	db $8 +	TX_FAR _CeladonGameCornerText_48f09 +	TX_ASM  	ld a, (SFX_02_49 - SFX_Headers_02) / 3  	call PlaySound  	call WaitForSoundToFinish diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm index b1b1060c..4793bf14 100755 --- a/scripts/celadongym.asm +++ b/scripts/celadongym.asm @@ -12,8 +12,8 @@ CeladonGymScript: ; 4890a (12:490a)  	ret  CeladonGymScript_48927: ; 48927 (12:4927) -	ld hl, Gym4CityName ; $4930 -	ld de, Gym4LeaderName ; $493d +	ld hl, Gym4CityName +	ld de, Gym4LeaderName  	jp LoadGymLeaderAndCityName  Gym4CityName: ; 48930 (12:4930) @@ -36,7 +36,7 @@ CeladonGymScriptPointers: ; 4894e (12:494e)  	dw CeladonGymScript3  CeladonGymScript3: ; 48956 (12:4956) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, CeladonGymText_48943  	ld a, $f0 @@ -44,7 +44,7 @@ CeladonGymScript3: ; 48956 (12:4956)  CeladonGymText_48963: ; 48963 (12:4963)  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd77c  	set 1, [hl] @@ -52,14 +52,14 @@ CeladonGymText_48963: ; 48963 (12:4963)  	call GiveItem  	jr nc, .BagFull  	ld a, $a -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd77c  	set 0, [hl]  	jr .asm_4898c  .BagFull  	ld a, $b -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_4898c  	ld hl, W_OBTAINEDBADGES @@ -94,82 +94,82 @@ CeladonGymTrainerHeader0: ; 489bc (12:49bc)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd77c ; flag's byte -	dw CeladonGymBattleText2 ; 0x4a8b TextBeforeBattle -	dw CeladonGymAfterBattleText2 ; 0x4a95 TextAfterBattle -	dw CeladonGymEndBattleText2 ; 0x4a90 TextEndBattle -	dw CeladonGymEndBattleText2 ; 0x4a90 TextEndBattle +	dw CeladonGymBattleText2 ; TextBeforeBattle +	dw CeladonGymAfterBattleText2 ; TextAfterBattle +	dw CeladonGymEndBattleText2 ; TextEndBattle +	dw CeladonGymEndBattleText2 ; TextEndBattle  CeladonGymTrainerHeader2: ; 489c8 (12:49c8)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd77c ; flag's byte -	dw CeladonGymBattleText3 ; 0x4aa4 TextBeforeBattle -	dw CeladonGymAfterBattleText3 ; 0x4aae TextAfterBattle -	dw CeladonGymEndBattleText3 ; 0x4aa9 TextEndBattle -	dw CeladonGymEndBattleText3 ; 0x4aa9 TextEndBattle +	dw CeladonGymBattleText3 ; TextBeforeBattle +	dw CeladonGymAfterBattleText3 ; TextAfterBattle +	dw CeladonGymEndBattleText3 ; TextEndBattle +	dw CeladonGymEndBattleText3 ; TextEndBattle  CeladonGymTrainerHeader3: ; 489d4 (12:49d4)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd77c ; flag's byte -	dw CeladonGymBattleText4 ; 0x4abd TextBeforeBattle -	dw CeladonGymAfterBattleText4 ; 0x4ac7 TextAfterBattle -	dw CeladonGymEndBattleText4 ; 0x4ac2 TextEndBattle -	dw CeladonGymEndBattleText4 ; 0x4ac2 TextEndBattle +	dw CeladonGymBattleText4 ; TextBeforeBattle +	dw CeladonGymAfterBattleText4 ; TextAfterBattle +	dw CeladonGymEndBattleText4 ; TextEndBattle +	dw CeladonGymEndBattleText4 ; TextEndBattle  CeladonGymTrainerHeader4: ; 489e0 (12:49e0)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd77c ; flag's byte -	dw CeladonGymBattleText5 ; 0x4ad6 TextBeforeBattle -	dw CeladonGymAfterBattleText5 ; 0x4ae0 TextAfterBattle -	dw CeladonGymEndBattleText5 ; 0x4adb TextEndBattle -	dw CeladonGymEndBattleText5 ; 0x4adb TextEndBattle +	dw CeladonGymBattleText5 ; TextBeforeBattle +	dw CeladonGymAfterBattleText5 ; TextAfterBattle +	dw CeladonGymEndBattleText5 ; TextEndBattle +	dw CeladonGymEndBattleText5 ; TextEndBattle  CeladonGymTrainerHeader5: ; 489ec (12:49ec)  	db $6 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd77c ; flag's byte -	dw CeladonGymBattleText6 ; 0x4aef TextBeforeBattle -	dw CeladonGymAfterBattleText6 ; 0x4af9 TextAfterBattle -	dw CeladonGymEndBattleText6 ; 0x4af4 TextEndBattle -	dw CeladonGymEndBattleText6 ; 0x4af4 TextEndBattle +	dw CeladonGymBattleText6 ; TextBeforeBattle +	dw CeladonGymAfterBattleText6 ; TextAfterBattle +	dw CeladonGymEndBattleText6 ; TextEndBattle +	dw CeladonGymEndBattleText6 ; TextEndBattle  CeladonGymTrainerHeader6: ; 489f8 (12:49f8)  	db $7 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd77c ; flag's byte -	dw CeladonGymBattleText7 ; 0x4b08 TextBeforeBattle -	dw CeladonGymAfterBattleText7 ; 0x4b12 TextAfterBattle -	dw CeladonGymEndBattleText7 ; 0x4b0d TextEndBattle -	dw CeladonGymEndBattleText7 ; 0x4b0d TextEndBattle +	dw CeladonGymBattleText7 ; TextBeforeBattle +	dw CeladonGymAfterBattleText7 ; TextAfterBattle +	dw CeladonGymEndBattleText7 ; TextEndBattle +	dw CeladonGymEndBattleText7 ; TextEndBattle  CeladonGymTrainerHeader7: ; 48a04 (12:4a04)  	db $8 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd77c ; flag's byte -	dw CeladonGymBattleText8 ; 0x4b21 TextBeforeBattle -	dw CeladonGymAfterBattleText8 ; 0x4b2b TextAfterBattle -	dw CeladonGymEndBattleText8 ; 0x4b26 TextEndBattle -	dw CeladonGymEndBattleText8 ; 0x4b26 TextEndBattle +	dw CeladonGymBattleText8 ; TextBeforeBattle +	dw CeladonGymAfterBattleText8 ; TextAfterBattle +	dw CeladonGymEndBattleText8 ; TextEndBattle +	dw CeladonGymEndBattleText8 ; TextEndBattle  	db $ff  CeladonGymText1: ; 48a11 (12:4a11) -	db $08 ; asm +	TX_ASM  	ld a, [wd77c]  	bit 1, a -	jr z, .asm_16064 ; 0x48a17 +	jr z, .asm_48a2d  	bit 0, a -	jr nz, .asm_3b22c ; 0x48a1b +	jr nz, .asm_48a25  	call z, CeladonGymText_48963  	call DisableWaitingAfterTextDisplay -	jr .asm_96252 ; 0x48a23 -.asm_3b22c ; 0x48a25 +	jr .asm_48a5b +.asm_48a25  	ld hl, CeladonGymText_48a68  	call PrintText -	jr .asm_96252 ; 0x48a2b -.asm_16064 ; 0x48a2d +	jr .asm_48a5b +.asm_48a2d  	ld hl, CeladonGymText_48a5e  	call PrintText  	ld hl, wd72d @@ -178,7 +178,7 @@ CeladonGymText1: ; 48a11 (12:4a11)  	ld hl, CeladonGymText_48a63  	ld de, CeladonGymText_48a63  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters @@ -187,7 +187,7 @@ CeladonGymText1: ; 48a11 (12:4a11)  	ld a, $3  	ld [W_CELADONGYMCURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -.asm_96252 ; 0x48a5b +.asm_48a5b  	jp TextScriptEnd  CeladonGymText_48a5e: ; 48a5e (12:4a5e) @@ -217,7 +217,7 @@ TM21NoRoomText: ; 48a7c (12:4a7c)  	db "@"  CeladonGymText2: ; 48a81 (12:4a81) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGymTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -235,7 +235,7 @@ CeladonGymAfterBattleText2: ; 48a95 (12:4a95)  	db "@"  CeladonGymText3: ; 48a9a (12:4a9a) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGymTrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -253,7 +253,7 @@ CeladonGymAfterBattleText3: ; 48aae (12:4aae)  	db "@"  CeladonGymText4: ; 48ab3 (12:4ab3) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGymTrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -271,7 +271,7 @@ CeladonGymAfterBattleText4: ; 48ac7 (12:4ac7)  	db "@"  CeladonGymText5: ; 48acc (12:4acc) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGymTrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -289,7 +289,7 @@ CeladonGymAfterBattleText5: ; 48ae0 (12:4ae0)  	db "@"  CeladonGymText6: ; 48ae5 (12:4ae5) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGymTrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -307,7 +307,7 @@ CeladonGymAfterBattleText6: ; 48af9 (12:4af9)  	db "@"  CeladonGymText7: ; 48afe (12:4afe) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGymTrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -325,7 +325,7 @@ CeladonGymAfterBattleText7: ; 48b12 (12:4b12)  	db "@"  CeladonGymText8: ; 48b17 (12:4b17) -	db $08 ; asm +	TX_ASM  	ld hl, CeladonGymTrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/celadonmansion1.asm b/scripts/celadonmansion1.asm index 14832dbe..857c2e42 100755 --- a/scripts/celadonmansion1.asm +++ b/scripts/celadonmansion1.asm @@ -14,7 +14,7 @@ CeladonMansion1_486a1: ; 486a1 (12:46a1)  CeladonMansion1Text1: ; 486a7 (12:46a7)  	TX_FAR _CeladonMansion1Text1 -	db $08 ; asm +	TX_ASM  	ld a, MEOWTH  	jp CeladonMansion1_486a1 @@ -24,13 +24,13 @@ CeladonMansion1Text2: ; 486b1 (12:46b1)  CeladonMansion1Text3: ; 486b6 (12:46b6)  	TX_FAR _CeladonMansion1Text3 -	db $8 +	TX_ASM  	ld a, CLEFAIRY  	jp CeladonMansion1_486a1  CeladonMansion1Text4: ; 486c0 (12:46c0)  	TX_FAR _CeladonMansion1Text4 -	db $8 +	TX_ASM  	ld a, NIDORAN_F  	jp CeladonMansion1_486a1 diff --git a/scripts/celadonmansion3.asm b/scripts/celadonmansion3.asm index 47190c92..0dadd20a 100755 --- a/scripts/celadonmansion3.asm +++ b/scripts/celadonmansion3.asm @@ -24,7 +24,7 @@ WriterText: ; 487ad (12:47ad)  	db "@"  DirectorText: ; 487b2 (12:47b2) -	db $08 ; asm +	TX_ASM  	; check pokédex  	ld hl, wPokedexOwned @@ -48,7 +48,7 @@ DirectorText: ; 487b2 (12:47b2)  .CompletedDexText  	TX_FAR _CompletedDexText  	db $6 -	db $8 ; asm +	TX_ASM  	callab DisplayDiploma  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a diff --git a/scripts/celadonmansion5.asm b/scripts/celadonmansion5.asm index c18e36c6..f847759b 100755 --- a/scripts/celadonmansion5.asm +++ b/scripts/celadonmansion5.asm @@ -10,12 +10,12 @@ CeladonMansion5Text1: ; 1dd41 (7:5d41)  	db "@"  CeladonMansion5Text2: ; 1dd46 (7:5d46) -	db $08 ; asm +	TX_ASM  	ld bc,(EEVEE << 8) | 25  	call GivePokemon -	jr nc, .asm_24365 ; 0x1dd4d +	jr nc, .asm_24365  	ld a, HS_CELADON_MANSION_5_GIFT  	ld [wcc4d], a  	predef HideObject -.asm_24365 ; 0x1dd59 +.asm_24365  	jp TextScriptEnd diff --git a/scripts/celadonmart3.asm b/scripts/celadonmart3.asm index 8874a743..46e58d8c 100755 --- a/scripts/celadonmart3.asm +++ b/scripts/celadonmart3.asm @@ -21,10 +21,10 @@ CeladonMart3TextPointers: ; 48228 (12:4228)  	dw CeladonMart3Text17  CeladonMart3Text1: ; 4824a (12:424a) -	db $08 ; asm +	TX_ASM  	ld a, [wd778]  	bit 7, a -	jr nz, .asm_a5463 ; 0x48250 +	jr nz, .asm_a5463  	ld hl, TM18PreReceiveText  	call PrintText  	ld bc, (TM_18 << 8) | 1 @@ -33,13 +33,13 @@ CeladonMart3Text1: ; 4824a (12:424a)  	ld hl, wd778  	set 7, [hl]  	ld hl, ReceivedTM18Text -	jr .asm_81359 ; 0x48268 +	jr .asm_81359  .BagFull  	ld hl, TM18NoRoomText -	jr .asm_81359 ; 0x4826d -.asm_a5463 ; 0x4826f +	jr .asm_81359 +.asm_a5463  	ld hl, TM18ExplanationText -.asm_81359 ; 0x48272 +.asm_81359  	call PrintText  	jp TextScriptEnd diff --git a/scripts/celadonmartelevator.asm b/scripts/celadonmartelevator.asm index ff835765..a0aa576d 100755 --- a/scripts/celadonmartelevator.asm +++ b/scripts/celadonmartelevator.asm @@ -32,9 +32,9 @@ CeladonMartElevatorScript_4862a: ; 4862a (12:462a)  	ret  CeladonMartElevatorScript_48631: ; 48631 (12:4631) -	ld hl, CeladonMartElavatorFloors ; $4643 +	ld hl, CeladonMartElavatorFloors  	call LoadItemList -	ld hl, CeldaonMartElevatorWarpMaps ; $464a +	ld hl, CeldaonMartElevatorWarpMaps  	ld de, wcc5b  	ld bc, $000a  	jp CopyData @@ -63,8 +63,8 @@ CeladonMartElevatorTextPointers: ; 4865c (12:465c)  	dw CeladonMartElevatorText1  CeladonMartElevatorText1: ; 4865e (12:465e) -	db $08 ; asm +	TX_ASM  	call CeladonMartElevatorScript_48631 -	ld hl, CeldaonMartElevatorWarpMaps ; $464a +	ld hl, CeldaonMartElevatorWarpMaps  	predef Func_1c9c6  	jp TextScriptEnd diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm index d4bb4319..07b26788 100755 --- a/scripts/celadonmartroof.asm +++ b/scripts/celadonmartroof.asm @@ -5,7 +5,7 @@ CeladonMartRoofScript_483d8: ; 483d8 (12:43d8)  	xor a  	ld [wcd37], a  	ld de, wcc5b -	ld hl, CeladonMartRoofDrinkList ; $4408 +	ld hl, CeladonMartRoofDrinkList  .asm_483e2  	ld a, [hli]  	and a @@ -42,19 +42,19 @@ CeladonMartRoofDrinkList: ; 48408 (12:4408)  CeladonMartRoofScript_4840c: ; 4840c (12:440c)  	ld hl, wd730  	set 6, [hl] -	ld hl, CeladonMartRoofText_484ee ; $44ee +	ld hl, CeladonMartRoofText_484ee  	call PrintText  	xor a -	ld [wCurrentMenuItem], a ; wCurrentMenuItem +	ld [wCurrentMenuItem], a  	ld a, $3 -	ld [wMenuWatchedKeys], a ; wMenuWatchedKeys +	ld [wMenuWatchedKeys], a  	ld a, [wcd37]  	dec a -	ld [wMaxMenuItem], a ; wMaxMenuItem +	ld [wMaxMenuItem], a  	ld a, $2 -	ld [wTopMenuItemY], a ; wTopMenuItemY +	ld [wTopMenuItemY], a  	ld a, $1 -	ld [wTopMenuItemX], a ; wTopMenuItemX +	ld [wTopMenuItemX], a  	ld a, [wcd37]  	dec a  	ld bc, $2 @@ -73,7 +73,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)  	bit 1, a  	ret nz  	ld hl, wcc5b -	ld a, [wCurrentMenuItem] ; wCurrentMenuItem +	ld a, [wCurrentMenuItem]  	ld d, $0  	ld e, a  	add hl, de @@ -86,7 +86,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)  	ld a, [wd778]  	bit 6, a  	jr nz, .asm_484e0 -	ld hl, CeladonMartRoofText_48515 ; $4515 +	ld hl, CeladonMartRoofText_48515  	call PrintText  	call RemoveItemByIDBank12  	ld bc, (TM_49 << 8) | 1 @@ -101,13 +101,13 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)  	ld a, [wd778]  	bit 5, a  	jr nz, .asm_484e0 -	ld hl, CeladonMartRoofText_48504 ; $4504 +	ld hl, CeladonMartRoofText_48504  	call PrintText  	call RemoveItemByIDBank12  	ld bc, (TM_48 << 8) | 1  	call GiveItem  	jr nc, .BagFull -	ld hl, CeladonMartRoofText_4850a ; $450a +	ld hl, CeladonMartRoofText_4850a  	call PrintText  	ld hl, wd778  	set 5, [hl] @@ -116,22 +116,22 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)  	ld a, [wd778]  	bit 4, a  	jr nz, .asm_484e0 -	ld hl, CeladonMartRoofText_484f3 ; $44f3 +	ld hl, CeladonMartRoofText_484f3  	call PrintText  	call RemoveItemByIDBank12  	ld bc, (TM_13 << 8) | 1  	call GiveItem  	jr nc, .BagFull -	ld hl, CeladonMartRoofText_484f9 ; $44f9 +	ld hl, CeladonMartRoofText_484f9  	call PrintText  	ld hl, wd778  	set 4, [hl]  	ret  .BagFull -	ld hl, CeladonMartRoofText_48526 ; $4526 +	ld hl, CeladonMartRoofText_48526  	jp PrintText  .asm_484e0 -	ld hl, CeladonMartRoofText_4852c ; $452c +	ld hl, CeladonMartRoofText_4852c  	jp PrintText  RemoveItemByIDBank12: ; 484e6 (12:44e6) @@ -224,11 +224,11 @@ CeladonMartRoofText1: ; 48567 (12:4567)  	db "@"  CeladonMartRoofText2: ; 4856c (12:456c) -	db $08 ; asm +	TX_ASM  	call CeladonMartRoofScript_483d8  	ld a, [wcd37]  	and a -	jr z, .asm_914b9 ; 0x48574 +	jr z, .asm_4858f  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, CeladonMartRoofText4 @@ -236,13 +236,13 @@ CeladonMartRoofText2: ; 4856c (12:456c)  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_05aa4 ; 0x48588 +	jr nz, .asm_48595  	call CeladonMartRoofScript_4840c -	jr .asm_05aa4 ; 0x4858d -.asm_914b9 ; 0x4858f +	jr .asm_48595 +.asm_4858f  	ld hl, CeladonMartRoofText3  	call PrintText -.asm_05aa4 ; 0x48595 +.asm_48595  	jp TextScriptEnd  CeladonMartRoofText3: ; 48598 (12:4598) diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm index bbddad79..d5a2166a 100755 --- a/scripts/ceruleancity.asm +++ b/scripts/ceruleancity.asm @@ -38,15 +38,15 @@ CeruleanCityScript4: ; 194a7 (6:54a7)  CeruleanCityScript0: ; 194c8 (6:54c8)  	ld a, [wd75b]  	bit 7, a -	jr nz, .asm_194f7 ; 0x194cd $28 +	jr nz, .asm_194f7  	ld hl, CeruleanCityCoords1  	call ArePlayerCoordsInArray -	jr nc, .asm_194f7 ; 0x194d5 $20 +	jr nc, .asm_194f7  	ld a, [wWhichTrade]  	cp $1  	ld a, $8  	ld b, $0 -	jr nz, .asm_194e6 ; 0x194e0 $4 +	jr nz, .asm_194e6  	ld a, $4  	ld b, $4  .asm_194e6 @@ -66,7 +66,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)  	ret nc  	ld a, [wWalkBikeSurfState]  	and a -	jr z, .asm_19512 ; 0x19508 $8 +	jr z, .asm_19512  	ld a, $ff  	ld [wc0ee], a  	call PlaySound @@ -80,7 +80,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)  	ld [wJoyIgnore], a  	ld a, [W_XCOORD]  	cp $14 -	jr z, .asm_19535 ; 0x19526 $d +	jr z, .asm_19535  	ld a, $1  	ld [$ff8c], a  	ld a, $5 @@ -140,12 +140,12 @@ CeruleanCityScript1: ; 19567 (6:5567)  	; select which team to use during the encounter  	ld a, [W_RIVALSTARTER]  	cp STARTER2 -	jr nz, .NotSquirtle ; 0x19592 $4 +	jr nz, .NotSquirtle  	ld a, $7  	jr .done  .NotSquirtle  	cp STARTER3 -	jr nz, .Charmander ; 0x1959a $4 +	jr nz, .Charmander  	ld a, $8  	jr .done  .Charmander @@ -181,9 +181,9 @@ CeruleanCityScript2: ; 195b1 (6:55b1)  	call SetSpriteMovementBytesToFF  	ld a, [W_XCOORD]  	cp $14 -	jr nz, .asm_195f0 ; 0x195e9 $5 +	jr nz, .asm_195f0  	ld de, CeruleanCityMovement4 -	jr .asm_195f3 ; 0x195ee $3 +	jr .asm_195f3  .asm_195f0  	ld de, CeruleanCityMovement3  .asm_195f3 @@ -234,7 +234,7 @@ CeruleanCityTextPointers: ; 1962d (6:562d)  	dw CeruleanCityText17  CeruleanCityText1: ; 1964f (6:564f) -	db $08 ; asm +	TX_ASM  	ld a, [wd75a] ; rival battle flag  	bit 0, a  	; do pre-battle text @@ -242,11 +242,11 @@ CeruleanCityText1: ; 1964f (6:564f)  	; or talk about bill  	ld hl, CeruleanCityText_19677  	call PrintText -	jr .end ; 0x1965d -.PreBattleText ; 0x1965f +	jr .end +.PreBattleText  	ld hl, CeruleanCityText_19668  	call PrintText -.end ; 0x19665 +.end  	jp TextScriptEnd  CeruleanCityText_19668: ; 19668 (6:5668) @@ -266,10 +266,10 @@ CeruleanCityText_19677: ; 19677 (6:5677)  	db "@"  CeruleanCityText2: ; 1967c (6:567c) -	db $8 +	TX_ASM  	ld a, [wd75b]  	bit 7, a -	jr nz, .asm_4ca20 ; 0x19682 $29 +	jr nz, .asm_4ca20  	ld hl, CeruleanCityText_196d9  	call PrintText  	ld hl, wd72d @@ -285,7 +285,7 @@ CeruleanCityText2: ; 1967c (6:567c)  	ld a, $4  	ld [W_CERULEANCITYCURSCRIPT], a  	jp TextScriptEnd -.asm_4ca20 ; 0x196ad +.asm_4ca20  	ld hl, CeruleanCityText_196f3  	call PrintText  	ld bc, (TM_28 << 8) + 1 @@ -299,7 +299,7 @@ CeruleanCityText2: ; 1967c (6:567c)  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, ReceivedTM28Text  	call PrintText -	callba Func_74872 +	callba CeruleanHideRocket  .Done  	jp TextScriptEnd @@ -343,23 +343,23 @@ CeruleanCityText6: ; 19707 (6:5707)  	db "@"  CeruleanCityText7: ; 1970c (6:570c) -	db $08 ; asm -	ldh a, [$d3] +	TX_ASM +	ld a, [hRandomAdd]  	cp $b4 -	jr c, .asm_e9fc9 ; 0x19711 +	jr c, .asm_e9fc9  	ld hl, CeruleanCityText_19730  	call PrintText -	jr .asm_d486e ; 0x19719 -.asm_e9fc9 ; 0x1971b +	jr .asm_d486e +.asm_e9fc9  	cp $64 -	jr c, .asm_df99b ; 0x1971d +	jr c, .asm_df99b  	ld hl, CeruleanCityText_19735  	call PrintText -	jr .asm_d486e ; 0x19725 -.asm_df99b ; 0x19727 +	jr .asm_d486e +.asm_df99b  	ld hl, CeruleanCityText_1973a  	call PrintText -.asm_d486e ; 0x1972d +.asm_d486e  	jp TextScriptEnd  CeruleanCityText_19730: ; 19730 (6:5730) @@ -375,29 +375,29 @@ CeruleanCityText_1973a: ; 1973a (6:573a)  	db "@"  CeruleanCityText8: ; 1973f (6:573f) -	db $08 ; asm -	ldh a, [$d3] +	TX_ASM +	ld a, [hRandomAdd]  	cp $b4 -	jr c, .asm_e28da ; 0x19744 +	jr c, .asm_e28da  	ld hl, CeruleanCityText_1976f  	call PrintText -	jr .asm_f2f38 ; 0x1974c -.asm_e28da ; 0x1974e +	jr .asm_f2f38 +.asm_e28da  	cp $78 -	jr c, .asm_15d08 ; 0x19750 +	jr c, .asm_15d08  	ld hl, CeruleanCityText_19774  	call PrintText -	jr .asm_f2f38 ; 0x19758 -.asm_15d08 ; 0x1975a +	jr .asm_f2f38 +.asm_15d08  	cp $3c -	jr c, .asm_d7fea ; 0x1975c +	jr c, .asm_d7fea  	ld hl, CeruleanCityText_19779  	call PrintText -	jr .asm_f2f38 ; 0x19764 -.asm_d7fea ; 0x19766 +	jr .asm_f2f38 +.asm_d7fea  	ld hl, CeruleanCityText_1977e  	call PrintText -.asm_f2f38 ; 0x1976c +.asm_f2f38  	jp TextScriptEnd  CeruleanCityText_1976f: ; 1976f (6:576f) diff --git a/scripts/ceruleancity2.asm b/scripts/ceruleancity2.asm index 72ee4a86..2232b0f4 100755 --- a/scripts/ceruleancity2.asm +++ b/scripts/ceruleancity2.asm @@ -1,4 +1,4 @@ -Func_74872: ; 74872 (1d:4872) +CeruleanHideRocket: ; 74872 (1d:4872)  ; code similar to this appears in a lot of banks; this particular  ; one is called after you beat the Rocket that gives you TM28 DIG.  ; the screen then fades out, he disappears, and fades back in diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm index 079844f3..a6cb4c64 100755 --- a/scripts/ceruleangym.asm +++ b/scripts/ceruleangym.asm @@ -12,8 +12,8 @@ CeruleanGymScript: ; 5c6b3 (17:46b3)  	ret  CeruleanGymScript_5c6d0: ; 5c6d0 (17:46d0) -	ld hl, Gym2CityName ; $46d9 -	ld de, Gym2LeaderName ; $46e7 +	ld hl, Gym2CityName +	ld de, Gym2LeaderName  	jp LoadGymLeaderAndCityName  Gym2CityName: ; 5c6d9 (17:46d9) @@ -36,7 +36,7 @@ CeruleanGymScriptPointers: ; 5c6f8 (17:46f8)  	dw CeruleanGymScript3  CeruleanGymScript3: ; 5c700 (17:4700) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, CeruleanGymScript_5c6ed  	ld a, $f0 @@ -44,7 +44,7 @@ CeruleanGymScript3: ; 5c700 (17:4700)  CeruleanGymScript_5c70d: ; 5c70d (17:470d)  	ld a, $5 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd75e  	set 7, [hl] @@ -52,14 +52,14 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)  	call GiveItem  	jr nc, .BagFull  	ld a, $6 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd75e  	set 6, [hl]  	jr .asm_5c736  .BagFull  	ld a, $7 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_5c736  	ld hl, W_OBTAINEDBADGES @@ -88,37 +88,37 @@ CeruleanGymTrainerHeader0: ; 5c758 (17:4758)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd75e ; flag's byte -	dw CeruleanGymBattleText1 ; 0x47e9 TextBeforeBattle -	dw CeruleanGymAfterBattleText1 ; 0x47f3 TextAfterBattle -	dw CeruleanGymEndBattleText1 ; 0x47ee TextEndBattle -	dw CeruleanGymEndBattleText1 ; 0x47ee TextEndBattle +	dw CeruleanGymBattleText1 ; TextBeforeBattle +	dw CeruleanGymAfterBattleText1 ; TextAfterBattle +	dw CeruleanGymEndBattleText1 ; TextEndBattle +	dw CeruleanGymEndBattleText1 ; TextEndBattle  CeruleanGymTrainerHeader1: ; 5c764 (17:4764)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd75e ; flag's byte -	dw CeruleanGymBattleText2 ; 0x4802 TextBeforeBattle -	dw CeruleanGymAfterBattleText2 ; 0x480c TextAfterBattle -	dw CeruleanGymEndBattleText2 ; 0x4807 TextEndBattle -	dw CeruleanGymEndBattleText2 ; 0x4807 TextEndBattle +	dw CeruleanGymBattleText2 ; TextBeforeBattle +	dw CeruleanGymAfterBattleText2 ; TextAfterBattle +	dw CeruleanGymEndBattleText2 ; TextEndBattle +	dw CeruleanGymEndBattleText2 ; TextEndBattle  	db $ff  CeruleanGymText1: ; 5c771 (17:4771) -	db $08 ; asm +	TX_ASM  	ld a, [wd75e]  	bit 7, a -	jr z, .asm_10854 ; 0x5c777 +	jr z, .asm_5c78d  	bit 6, a -	jr nz, .asm_37a1b ; 0x5c77b +	jr nz, .asm_5c785  	call z, CeruleanGymScript_5c70d  	call DisableWaitingAfterTextDisplay -	jr .asm_95b04 ; 0x5c783 -.asm_37a1b ; 0x5c785 +	jr .asm_5c7bb +.asm_5c785  	ld hl, CeruleanGymText_5c7c3  	call PrintText -	jr .asm_95b04 ; 0x5c78b -.asm_10854 ; 0x5c78d +	jr .asm_5c7bb +.asm_5c78d  	ld hl, CeruleanGymText_5c7be  	call PrintText  	ld hl, wd72d @@ -127,17 +127,17 @@ CeruleanGymText1: ; 5c771 (17:4771)  	ld hl, CeruleanGymText_5c7d8  	ld de, CeruleanGymText_5c7d8  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	ld a, $2  	ld [W_GYMLEADERNO], a  	xor a -	ldh [$b4], a +	ld [hJoyHeld], a  	ld a, $3  	ld [W_CERULEANGYMCURSCRIPT], a -.asm_95b04 ; 0x5c7bb +.asm_5c7bb  	jp TextScriptEnd  CeruleanGymText_5c7be: ; 5c7be (17:47be) @@ -166,7 +166,7 @@ CeruleanGymText_5c7d8: ; 5c7d8 (17:47d8)  	db $11, $6, "@"  CeruleanGymText2: ; 5c7df (17:47df) -	db $08 ; asm +	TX_ASM  	ld hl, CeruleanGymTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -184,7 +184,7 @@ CeruleanGymAfterBattleText1: ; 5c7f3 (17:47f3)  	db "@"  CeruleanGymText3: ; 5c7f8 (17:47f8) -	db $08 ; asm +	TX_ASM  	ld hl, CeruleanGymTrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -202,17 +202,17 @@ CeruleanGymAfterBattleText2: ; 5c80c (17:480c)  	db "@"  CeruleanGymText4: ; 5c811 (17:4811) -	db $08 ; asm +	TX_ASM  	ld a, [wd75e]  	bit 7, a -	jr nz, .asm_f80ce ; 0x5c817 +	jr nz, .asm_5c821  	ld hl, CeruleanGymText_5c82a  	call PrintText -	jr .asm_18a31 ; 0x5c81f -.asm_f80ce ; 0x5c821 +	jr .asm_5c827 +.asm_5c821  	ld hl, CeruleanGymText_5c82f  	call PrintText -.asm_18a31 ; 0x5c827 +.asm_5c827  	jp TextScriptEnd  CeruleanGymText_5c82a: ; 5c82a (17:482a) diff --git a/scripts/ceruleanhouse1.asm b/scripts/ceruleanhouse1.asm index 4b6a240a..e703d830 100755 --- a/scripts/ceruleanhouse1.asm +++ b/scripts/ceruleanhouse1.asm @@ -10,7 +10,7 @@ CeruleanHouse1Text1: ; 1d6fd (7:56fd)  	db "@"  CeruleanHouse1Text2: ; 1d702 (7:5702) -	db $08 ; asm +	TX_ASM  	ld a, $6  	ld [wWhichTrade], a  	predef DoInGameTradeDialogue diff --git a/scripts/ceruleanhouse2.asm b/scripts/ceruleanhouse2.asm index a40d9224..423c0209 100755 --- a/scripts/ceruleanhouse2.asm +++ b/scripts/ceruleanhouse2.asm @@ -9,7 +9,7 @@ CeruleanHouse2TextPointers: ; 74e13 (1d:4e13)  	dw CeruleanHouse2Text1  CeruleanHouse2Text1: ; 74e15 (1d:4e15) -	db $8 +	TX_ASM  	ld hl, CeruleanHouse2Text_74e77  	call PrintText  	xor a @@ -31,7 +31,7 @@ CeruleanHouse2Text1: ; 74e15 (1d:4e15)  	ld a, SPECIALLISTMENU  	ld [wListMenuID], a  	call DisplayListMenuID -	jr c, .asm_74e60 ; 0x74e49 $15 +	jr c, .asm_74e60  	ld hl, TextPointers_74e86  	ld a, [wcf91]  	sub $15 @@ -43,7 +43,7 @@ CeruleanHouse2Text1: ; 74e15 (1d:4e15)  	ld h, [hl]  	ld l, a  	call PrintText -	jr .asm_74e23 ; 0x74e5e $c3 +	jr .asm_74e23  .asm_74e60  	xor a  	ld [wListScrollOffset], a diff --git a/scripts/ceruleanhousetrashed.asm b/scripts/ceruleanhousetrashed.asm index ee60cda7..e0a194fe 100755 --- a/scripts/ceruleanhousetrashed.asm +++ b/scripts/ceruleanhousetrashed.asm @@ -8,18 +8,18 @@ CeruleanHouseTrashedTextPointers: ; 1d689 (7:5689)  	dw CeruleanHouseTrashedText3  CeruleanHouseTrashedText1: ; 1d68f (7:568f) -	db $08 ; asm +	TX_ASM  	ld b, $e4  	predef IsItemInBag_  	and b -	jr z, .asm_f8734 ; 0x1d698 +	jr z, .asm_f8734  	ld hl, CeruleanHouseTrashedText_1d6b0  	call PrintText -	jr .asm_8dfe9 ; 0x1d6a0 -.asm_f8734 ; 0x1d6a2 +	jr .asm_8dfe9 +.asm_f8734  	ld hl, CeruleanHouseTrashedText_1d6ab  	call PrintText -.asm_8dfe9 ; 0x1d6a8 +.asm_8dfe9  	jp TextScriptEnd  CeruleanHouseTrashedText_1d6ab: ; 1d6ab (7:56ab) diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 48133c52..32043121 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -37,7 +37,7 @@ CinnabarGymScript_75792: ; 75792 (1d:5792)  	ret  CinnabarGymScript_757a0: ; 757a0 (1d:57a0) -	ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c +	ld a, [H_DOWNARROWBLINKCNT2]  	ld [wTrainerHeaderFlagBit], a  	ret @@ -53,11 +53,11 @@ CinnabarGymScript0: ; 757ae (1d:57ae)  	ret z  	ld [$ff8c], a  	cp $4 -	jr nz, .asm_757c3 ; 0x757b7 $a +	jr nz, .asm_757c3  	ld a, $4  	ld [wd528], a  	ld de, MovementData_757d7 -	jr .asm_757cb ; 0x757c1 $8 +	jr .asm_757cb  .asm_757c3  	ld de, MovementData_757da  	ld a, $1 @@ -101,7 +101,7 @@ CinnabarGymScript2: ; 757f6 (1d:57f6)  	call CinnabarGymScript_757f1  	ld a, c  	and a -	jr nz, .asm_7581b ; 0x7580e $b +	jr nz, .asm_7581b  	call WaitForSoundToFinish  	ld a, (SFX_02_57 - SFX_Headers_02) / 3  	call PlaySound @@ -148,7 +148,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)  	call DisplayTextID  	ld hl, wd79a  	set 0, [hl] -	jr .asm_75880 ; 0x75877 $7 +	jr .asm_75880  .BagFull  	ld a, $c  	ld [$ff8c], a @@ -186,7 +186,7 @@ CinnabarGymTextPointers: ; 7589f (1d:589f)  	dw TM38NoRoomText  CinnabarGymScript_758b7: ; 758b7 (1d:58b7) -	ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c +	ld a, [H_DOWNARROWBLINKCNT2]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters @@ -206,20 +206,20 @@ CinnabarGymScript_758b7: ; 758b7 (1d:58b7)  	jp TextScriptEnd  CinnabarGymText1: ; 758df (1d:58df) -	db $8 +	TX_ASM  	ld a, [wd79a]  	bit 1, a -	jr z, .asm_d9332 ; 0x758e5 $16 +	jr z, .asm_d9332  	bit 0, a -	jr nz, .asm_3012f ; 0x758e9 $9 +	jr nz, .asm_3012f  	call z, CinnabarGymScript3_75857  	call DisableWaitingAfterTextDisplay  	jp TextScriptEnd -.asm_3012f ; 0x758f4 +.asm_3012f  	ld hl, BlaineFireBlastText  	call PrintText  	jp TextScriptEnd -.asm_d9332 ; 0x758fd +.asm_d9332  	ld hl, BlaineBattleText  	call PrintText  	ld hl, BlaineEndBattleText @@ -258,18 +258,18 @@ TM38NoRoomText: ; 75934 (1d:5934)  	db "@"  CinnabarGymText2: ; 75939 (1d:5939) -	db $08 ; asm +	TX_ASM  	call CinnabarGymScript_757a0  	ld a, [wd79a]  	bit 2, a -	jr nz, .asm_46bb4 ; 0x75942 +	jr nz, .asm_46bb4  	ld hl, CinnabarGymText_7595f  	call PrintText  	ld hl, CinnabarGymText_75964 -	ld de, CinnabarGymText_75964 ; $5964 XXX +	ld de, CinnabarGymText_75964  	call SaveEndBattleTextPointers  	jp CinnabarGymScript_758b7 -.asm_46bb4 ; 0x75956 +.asm_46bb4  	ld hl, CinnabarGymText_75969  	call PrintText  	jp TextScriptEnd @@ -287,18 +287,18 @@ CinnabarGymText_75969: ; 75969 (1d:5969)  	db "@"  CinnabarGymText3: ; 7596e (1d:596e) -	db $08 ; asm +	TX_ASM  	call CinnabarGymScript_757a0  	ld a, [wd79a]  	bit 3, a -	jr nz, .asm_4b406 ; 0x75977 +	jr nz, .asm_4b406  	ld hl, CinnabarGymText_75994  	call PrintText  	ld hl, CinnabarGymText_75999 -	ld de, CinnabarGymText_75999 ; $5999 XXX +	ld de, CinnabarGymText_75999  	call SaveEndBattleTextPointers  	jp CinnabarGymScript_758b7 -.asm_4b406 ; 0x7598b +.asm_4b406  	ld hl, CinnabarGymText_7599e  	call PrintText  	jp TextScriptEnd @@ -316,18 +316,18 @@ CinnabarGymText_7599e: ; 7599e (1d:599e)  	db "@"  CinnabarGymText4: ; 759a3 (1d:59a3) -	db $08 ; asm +	TX_ASM  	call CinnabarGymScript_757a0  	ld a, [wd79a]  	bit 4, a -	jr nz, .asm_c0673 ; 0x759ac +	jr nz, .asm_c0673  	ld hl, CinnabarGymText_759c9  	call PrintText  	ld hl, CinnabarGymText_759ce -	ld de, CinnabarGymText_759ce ; $59ce XXX +	ld de, CinnabarGymText_759ce  	call SaveEndBattleTextPointers  	jp CinnabarGymScript_758b7 -.asm_c0673 ; 0x759c0 +.asm_c0673  	ld hl, CinnabarGymText_759d3  	call PrintText  	jp TextScriptEnd @@ -345,18 +345,18 @@ CinnabarGymText_759d3: ; 759d3 (1d:59d3)  	db "@"  CinnabarGymText5: ; 759d8 (1d:59d8) -	db $08 ; asm +	TX_ASM  	call CinnabarGymScript_757a0  	ld a, [wd79a]  	bit 5, a -	jr nz, .asm_5cfd7 ; 0x759e1 +	jr nz, .asm_5cfd7  	ld hl, CinnabarGymText_759fe  	call PrintText  	ld hl, CinnabarGymText_75a03 -	ld de, CinnabarGymText_75a03 ; $5a03 XXX +	ld de, CinnabarGymText_75a03  	call SaveEndBattleTextPointers  	jp CinnabarGymScript_758b7 -.asm_5cfd7 ; 0x759f5 +.asm_5cfd7  	ld hl, CinnabarGymText_75a08  	call PrintText  	jp TextScriptEnd @@ -374,18 +374,18 @@ CinnabarGymText_75a08: ; 75a08 (1d:5a08)  	db "@"  CinnabarGymText6: ; 75a0d (1d:5a0d) -	db $08 ; asm +	TX_ASM  	call CinnabarGymScript_757a0  	ld a, [wd79a]  	bit 6, a -	jr nz, .asm_776b4 ; 0x75a16 +	jr nz, .asm_776b4  	ld hl, CinnabarGymText_75a33  	call PrintText  	ld hl, CinnabarGymText_75a38  	ld de, CinnabarGymText_75a38  	call SaveEndBattleTextPointers  	jp CinnabarGymScript_758b7 -.asm_776b4 ; 0x75a2a +.asm_776b4  	ld hl, CinnabarGymText_75a3d  	call PrintText  	jp TextScriptEnd @@ -403,18 +403,18 @@ CinnabarGymText_75a3d: ; 75a3d (1d:5a3d)  	db "@"  CinnabarGymText7: ; 75a42 (1d:5a42) -	db $08 ; asm +	TX_ASM  	call CinnabarGymScript_757a0  	ld a, [wd79a]  	bit 7, a -	jr nz, .asm_2f755 ; 0x75a4b +	jr nz, .asm_2f755  	ld hl, CinnabarGymText_75a68  	call PrintText  	ld hl, CinnabarGymText_75a6d  	ld de, CinnabarGymText_75a6d  	call SaveEndBattleTextPointers  	jp CinnabarGymScript_758b7 -.asm_2f755 ; 0x75a5f +.asm_2f755  	ld hl, CinnabarGymText_75a72  	call PrintText  	jp TextScriptEnd @@ -432,18 +432,18 @@ CinnabarGymText_75a72: ; 75a72 (1d:5a72)  	db "@"  CinnabarGymText8: ; 75a77 (1d:5a77) -	db $08 ; asm +	TX_ASM  	call CinnabarGymScript_757a0  	ld a, [wd79b]  	bit 0, a -	jr nz, .asm_d87be ; 0x75a80 +	jr nz, .asm_d87be  	ld hl, CinnabarGymText_75a9d  	call PrintText  	ld hl, CinnabarGymText_75aa2 -	ld de, CinnabarGymText_75aa2 ; $5aa2 XXX +	ld de, CinnabarGymText_75aa2  	call SaveEndBattleTextPointers  	jp CinnabarGymScript_758b7 -.asm_d87be ; 0x75a94 +.asm_d87be  	ld hl, CinnabarGymText_75aa7  	call PrintText  	jp TextScriptEnd @@ -461,15 +461,15 @@ CinnabarGymText_75aa7: ; 75aa7 (1d:5aa7)  	db "@"  CinnabarGymText9: ; 75aac (1d:5aac) -	db $08 ; asm +	TX_ASM  	ld a, [wd79a]  	bit 1, a -	jr nz, .asm_627d9 ; 0x75ab2 +	jr nz, .asm_627d9  	ld hl, CinnabarGymText_75ac2 -	jr .asm_0b11d ; 0x75ab7 -.asm_627d9 ; 0x75ab9 +	jr .asm_0b11d +.asm_627d9  	ld hl, CinnabarGymText_75ac7 -.asm_0b11d ; 0x75abc +.asm_0b11d  	call PrintText  	jp TextScriptEnd diff --git a/scripts/copycatshouse1f.asm b/scripts/copycatshouse1f.asm index 230a3ca3..bc76da1a 100755 --- a/scripts/copycatshouse1f.asm +++ b/scripts/copycatshouse1f.asm @@ -16,7 +16,7 @@ CopycatsHouse1FText2: ; 75ed1 (1d:5ed1)  CopycatsHouse1FText3: ; 75ed6 (1d:5ed6)  	TX_FAR _CopycatsHouse1FText3 -	db $8 +	TX_ASM  	ld a, CHANSEY  	call PlayCry  	jp TextScriptEnd diff --git a/scripts/copycatshouse2f.asm b/scripts/copycatshouse2f.asm index b7a1255c..6a9c2236 100755 --- a/scripts/copycatshouse2f.asm +++ b/scripts/copycatshouse2f.asm @@ -11,17 +11,17 @@ CopycatsHouse2FTextPointers: ; 5cc74 (17:4c74)  	dw CopycatsHouse2FText7  CopycatsHouse2FText1: ; 5cc82 (17:4c82) -	db $08 ; asm +	TX_ASM  	ld a, [wd7af]  	bit 0, a -	jr nz, .asm_7ccf3 ; 0x5cc88 +	jr nz, .asm_7ccf3  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, CopycatsHouse2FText_5ccd4  	call PrintText  	ld b, POKE_DOLL  	call IsItemInBag -	jr z, .asm_62ecd ; 0x5cc9a +	jr z, .asm_62ecd  	ld hl, TM31PreReceiveText  	call PrintText  	ld bc, (TM_31 << 8) | 1 @@ -30,19 +30,19 @@ CopycatsHouse2FText1: ; 5cc82 (17:4c82)  	ld hl, ReceivedTM31Text  	call PrintText  	ld a, POKE_DOLL -	ldh [$db], a +	ld [$ffdb], a  	callba RemoveItemByID  	ld hl, wd7af  	set 0, [hl] -	jr .asm_62ecd ; 0x5ccc1 +	jr .asm_62ecd  .BagFull  	ld hl, TM31NoRoomText  	call PrintText -	jr .asm_62ecd ; 0x5ccc9 -.asm_7ccf3 ; 0x5cccb +	jr .asm_62ecd +.asm_7ccf3  	ld hl, TM31ExplanationText2  	call PrintText -.asm_62ecd ; 0x5ccd1 +.asm_62ecd  	jp TextScriptEnd  CopycatsHouse2FText_5ccd4: ; 5ccd4 (17:4cd4) @@ -83,13 +83,13 @@ CopycatsHouse2FText6: ; 5ccfe (17:4cfe)  	db "@"  CopycatsHouse2FText7: ; 5cd03 (17:4d03) -	db $08 ; asm +	TX_ASM  	ld a, [wSpriteStateData1 + 9]  	cp $4  	ld hl, CopycatsHouse2FText_5cd1c -	jr nz, .asm_399a4 ; 0x5cd0c +	jr nz, .asm_399a4  	ld hl, CopycatsHouse2FText_5cd17 -.asm_399a4 ; 0x5cd11 +.asm_399a4  	call PrintText  	jp TextScriptEnd diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index 1830d2c0..3fa2d3b9 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -5,7 +5,7 @@ DayCareMTextPointers: ; 56252 (15:6252)  	dw DayCareMText1  DayCareMText1: ; 56254 (15:6254) -	db $8 +	TX_ASM  	call SaveScreenTilesToBuffer2  	ld a, [W_DAYCARE_IN_USE]  	and a @@ -239,9 +239,9 @@ DayCareMText_56432: ; 56432 (15:6432)  	db "@"  DayCareMText_56437: ; 56437 (15:6437) -	TX_FAR _DayCareMText_56437 ; 0x8c000 +	TX_FAR _DayCareMText_56437  DayCareMText_5643b: ; 5643b (15:643b) -	TX_FAR _DayCareMText_5643b ; 0x8c013 +	TX_FAR _DayCareMText_5643b  	db "@"  DayCareMText_56440: ; 56440 (15:6440) diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index f9a839fa..79621fce 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -24,7 +24,7 @@ FanClubTextPointers: ; 59b84 (16:5b84)  FanClubText1:  ; pikachu fan -	db $08 ; asm +	TX_ASM  	ld a, [wd771]  	bit 7, a  	jr nz, .mineisbetter @@ -51,7 +51,7 @@ FanClubText1:  FanClubText2:  ; seel fan -	db $08 ; asm +	TX_ASM  	ld a, [wd771]  	bit 6, a  	jr nz, .mineisbetter @@ -78,7 +78,7 @@ FanClubText2:  FanClubText3:  ; pikachu -	db $8 +	TX_ASM  	ld hl, .text  	call PrintText  	ld a, PIKACHU @@ -92,7 +92,7 @@ FanClubText3:  FanClubText4:  ; seel -	db $08 ; asm +	TX_ASM  	ld hl, .text  	call PrintText  	ld a, SEEL @@ -106,7 +106,7 @@ FanClubText4:  FanClubText5:  ; chair -	db $08 ; asm +	TX_ASM  	call FanClubBikeInBag  	jr nz, .nothingleft diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm index e26da1b1..b5332fed 100755 --- a/scripts/fightingdojo.asm +++ b/scripts/fightingdojo.asm @@ -99,42 +99,42 @@ FightingDojoTrainerHeader0: ; 5ce13 (17:4e13)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7b1 ; flag's byte -	dw FightingDojoBattleText1 ; 0x4eac TextBeforeBattle -	dw FightingDojoAfterBattleText1 ; 0x4eb6 TextAfterBattle -	dw FightingDojoEndBattleText1 ; 0x4eb1 TextEndBattle -	dw FightingDojoEndBattleText1 ; 0x4eb1 TextEndBattle +	dw FightingDojoBattleText1 ; TextBeforeBattle +	dw FightingDojoAfterBattleText1 ; TextAfterBattle +	dw FightingDojoEndBattleText1 ; TextEndBattle +	dw FightingDojoEndBattleText1 ; TextEndBattle  FightingDojoTrainerHeader1: ; 5ce1f (17:4e1f)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7b1 ; flag's byte -	dw FightingDojoBattleText2 ; 0x4ec5 TextBeforeBattle -	dw FightingDojoAfterBattleText2 ; 0x4ecf TextAfterBattle -	dw FightingDojoEndBattleText2 ; 0x4eca TextEndBattle -	dw FightingDojoEndBattleText2 ; 0x4eca TextEndBattle +	dw FightingDojoBattleText2 ; TextBeforeBattle +	dw FightingDojoAfterBattleText2 ; TextAfterBattle +	dw FightingDojoEndBattleText2 ; TextEndBattle +	dw FightingDojoEndBattleText2 ; TextEndBattle  FightingDojoTrainerHeader2: ; 5ce2b (17:4e2b)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b1 ; flag's byte -	dw FightingDojoBattleText3 ; 0x4ede TextBeforeBattle -	dw FightingDojoAfterBattleText3 ; 0x4ee8 TextAfterBattle -	dw FightingDojoEndBattleText3 ; 0x4ee3 TextEndBattle -	dw FightingDojoEndBattleText3 ; 0x4ee3 TextEndBattle +	dw FightingDojoBattleText3 ; TextBeforeBattle +	dw FightingDojoAfterBattleText3 ; TextAfterBattle +	dw FightingDojoEndBattleText3 ; TextEndBattle +	dw FightingDojoEndBattleText3 ; TextEndBattle  FightingDojoTrainerHeader3: ; 5ce37 (17:4e37)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b1 ; flag's byte -	dw FightingDojoBattleText4 ; 0x4ef7 TextBeforeBattle -	dw FightingDojoAfterBattleText4 ; 0x4f01 TextAfterBattle -	dw FightingDojoEndBattleText4 ; 0x4efc TextEndBattle -	dw FightingDojoEndBattleText4 ; 0x4efc TextEndBattle +	dw FightingDojoBattleText4 ; TextBeforeBattle +	dw FightingDojoAfterBattleText4 ; TextAfterBattle +	dw FightingDojoEndBattleText4 ; TextEndBattle +	dw FightingDojoEndBattleText4 ; TextEndBattle  	db $ff  FightingDojoText1: ; 5ce44 (17:4e44) -	db $08 ; asm +	TX_ASM  	ld a, [wd7b1]  	bit 0, a  	jp nz, .continue1 @@ -148,22 +148,22 @@ FightingDojoText1: ; 5ce44 (17:4e44)  	ld hl, FightingDojoText_5ce93  	ld de, FightingDojoText_5ce93  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	ld a, $3  	ld [W_FIGHTINGDOJOCURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -	jr .asm_9dba4 ; 0x5ce7b -.continue1 ; 0x5ce7d +	jr .asm_9dba4 +.continue1  	ld hl, FightingDojoText_5ce9d  	call PrintText -	jr .asm_9dba4 ; 0x5ce83 -.continue2 ; 0x5ce85f +	jr .asm_9dba4 +.continue2  	ld hl, FightingDojoText8  	call PrintText -.asm_9dba4 ; 0x5ce8b +.asm_9dba4  	jp TextScriptEnd  FightingDojoText_5ce8e: ; 5ce8e (17:4e8e) @@ -183,7 +183,7 @@ FightingDojoText_5ce9d: ; 5ce9d (17:4e9d)  	db "@"  FightingDojoText2: ; 5cea2 (17:4ea2) -	db $08 ; asm +	TX_ASM  	ld hl, FightingDojoTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -201,7 +201,7 @@ FightingDojoAfterBattleText1: ; 5ceb6 (17:4eb6)  	db "@"  FightingDojoText3: ; 5cebb (17:4ebb) -	db $08 ; asm +	TX_ASM  	ld hl, FightingDojoTrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -219,7 +219,7 @@ FightingDojoAfterBattleText2: ; 5cecf (17:4ecf)  	db "@"  FightingDojoText4: ; 5ced4 (17:4ed4) -	db $08 ; asm +	TX_ASM  	ld hl, FightingDojoTrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -237,7 +237,7 @@ FightingDojoAfterBattleText3: ; 5cee8 (17:4ee8)  	db "@"  FightingDojoText5: ; 5ceed (17:4eed) -	db $08 ; asm +	TX_ASM  	ld hl, FightingDojoTrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -256,7 +256,7 @@ FightingDojoAfterBattleText4: ; 5cf01 (17:4f01)  FightingDojoText6: ; 5cf06 (17:4f06)  ; Hitmonlee Poké Ball -	db $08 ; asm +	TX_ASM  	ld a, [wd7b1]  	and %11000000  	jr z, .GetMon @@ -294,7 +294,7 @@ WantHitmonleeText: ; 5cf49 (17:4f49)  FightingDojoText7: ; 5cf4e (17:4f4e)  ; Hitmonchan Poké Ball -	db $08 ; asm +	TX_ASM  	ld a, [wd7b1]  	and %11000000  	jr z, .GetMon diff --git a/scripts/fuchsiacity.asm b/scripts/fuchsiacity.asm index 6b7e067b..462e6084 100755 --- a/scripts/fuchsiacity.asm +++ b/scripts/fuchsiacity.asm @@ -74,7 +74,7 @@ FuchsiaCityText18: ; 19a8b (6:5a8b)  	db "@"  FuchsiaCityText19: ; 19a90 (6:5a90) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaCityChanseyText  	call PrintText  	ld a, CHANSEY @@ -86,7 +86,7 @@ FuchsiaCityChanseyText: ; 19a9f (6:5a9f)  	db "@"  FuchsiaCityText20: ; 19aa4 (6:5aa4) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaCityVoltorbText  	call PrintText  	ld a, VOLTORB @@ -98,7 +98,7 @@ FuchsiaCityVoltorbText: ; 19ab3 (6:5ab3)  	db "@"  FuchsiaCityText21: ; 19ab8 (6:5ab8) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaCityKangaskhanText  	call PrintText  	ld a, KANGASKHAN @@ -110,7 +110,7 @@ FuchsiaCityKangaskhanText: ; 19ac7 (6:5ac7)  	db "@"  FuchsiaCityText22: ; 19acc (6:5acc) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaCitySlowpokeText  	call PrintText  	ld a, SLOWPOKE @@ -122,7 +122,7 @@ FuchsiaCitySlowpokeText: ; 19adb (6:5adb)  	db "@"  FuchsiaCityText23: ; 19ae0 (6:5ae0) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaCityLaprasText  	call PrintText  	ld a, LAPRAS @@ -134,27 +134,27 @@ FuchsiaCityLaprasText: ; 19aef (6:5aef)  	db "@"  FuchsiaCityText24: ; 19af4 (6:5af4) -	db $08 ; asm +	TX_ASM  	ld a, [wd7f6]  	bit 6, a -	jr nz, .asm_3b4e8 ; 0x19afa +	jr nz, .asm_3b4e8  	bit 7, a -	jr nz, .asm_667d5 ; 0x19afe +	jr nz, .asm_667d5  	ld hl, FuchsiaCityText_19b2a  	call PrintText -	jr .asm_4343f ; 0x19b06 -.asm_3b4e8 ; 0x19b08 +	jr .asm_4343f +.asm_3b4e8  	ld hl, FuchsiaCityOmanyteText  	call PrintText  	ld a, OMANYTE -	jr .asm_81556 ; 0x19b10 -.asm_667d5 ; 0x19b12 +	jr .asm_81556 +.asm_667d5  	ld hl, FuchsiaCityKabutoText  	call PrintText  	ld a, KABUTO -.asm_81556 ; 0x19b1a +.asm_81556  	call DisplayPokedex -.asm_4343f ; 0x19b1d +.asm_4343f  	jp TextScriptEnd  FuchsiaCityOmanyteText: ; 19b20 (6:5b20) diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm index 43d977d7..f88f0055 100755 --- a/scripts/fuchsiagym.asm +++ b/scripts/fuchsiagym.asm @@ -37,14 +37,14 @@ FuchsiaGymScriptPointers: ; 75482 (1d:5482)  	dw FuchsiaGymScript3  FuchsiaGymScript3: ; 7548a (1d:548a) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, FuchsiaGymScript_75477  	ld a, $f0  	ld [wJoyIgnore], a  FuchsiaGymScript3_75497: ; 75497 (1d:5497)  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd792  	set 1, [hl] @@ -52,14 +52,14 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)  	call GiveItem  	jr nc, .BagFull  	ld a, $a -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd792  	set 0, [hl]  	jr .asm_754c0  .BagFull  	ld a, $b -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_754c0  	ld hl, W_OBTAINEDBADGES @@ -92,108 +92,108 @@ FuchsiaGymTrainerHeader0: ; 754eb (1d:54eb)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd792 ; flag's byte -	dw FuchsiaGymBattleText1 ; 0x55ae TextBeforeBattle -	dw FuchsiaGymAfterBattleText1 ; 0x55b8 TextAfterBattle -	dw FuchsiaGymEndBattleText1 ; 0x55b3 TextEndBattle -	dw FuchsiaGymEndBattleText1 ; 0x55b3 TextEndBattle +	dw FuchsiaGymBattleText1 ; TextBeforeBattle +	dw FuchsiaGymAfterBattleText1 ; TextAfterBattle +	dw FuchsiaGymEndBattleText1 ; TextEndBattle +	dw FuchsiaGymEndBattleText1 ; TextEndBattle  FuchsiaGymTrainerHeader2: ; 754f7 (1d:54f7)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd792 ; flag's byte -	dw FuchsiaGymBattleText2 ; 0x55c7 TextBeforeBattle -	dw FuchsiaGymAfterBattleText2 ; 0x55d1 TextAfterBattle -	dw FuchsiaGymEndBattleText2 ; 0x55cc TextEndBattle -	dw FuchsiaGymEndBattleText2 ; 0x55cc TextEndBattle +	dw FuchsiaGymBattleText2 ; TextBeforeBattle +	dw FuchsiaGymAfterBattleText2 ; TextAfterBattle +	dw FuchsiaGymEndBattleText2 ; TextEndBattle +	dw FuchsiaGymEndBattleText2 ; TextEndBattle  FuchsiaGymTrainerHeader3: ; 75503 (1d:5503)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd792 ; flag's byte -	dw FuchsiaGymBattleText3 ; 0x55e0 TextBeforeBattle -	dw FuchsiaGymAfterBattleText3 ; 0x55ea TextAfterBattle -	dw FuchsiaGymEndBattleText3 ; 0x55e5 TextEndBattle -	dw FuchsiaGymEndBattleText3 ; 0x55e5 TextEndBattle +	dw FuchsiaGymBattleText3 ; TextBeforeBattle +	dw FuchsiaGymAfterBattleText3 ; TextAfterBattle +	dw FuchsiaGymEndBattleText3 ; TextEndBattle +	dw FuchsiaGymEndBattleText3 ; TextEndBattle  FuchsiaGymTrainerHeader4: ; 7550f (1d:550f)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd792 ; flag's byte -	dw FuchsiaGymBattleText4 ; 0x55f9 TextBeforeBattle -	dw FuchsiaGymAfterBattleText4 ; 0x5603 TextAfterBattle -	dw FuchsiaGymEndBattleText4 ; 0x55fe TextEndBattle -	dw FuchsiaGymEndBattleText4 ; 0x55fe TextEndBattle +	dw FuchsiaGymBattleText4 ; TextBeforeBattle +	dw FuchsiaGymAfterBattleText4 ; TextAfterBattle +	dw FuchsiaGymEndBattleText4 ; TextEndBattle +	dw FuchsiaGymEndBattleText4 ; TextEndBattle  FuchsiaGymTrainerHeader5: ; 7551b (1d:551b)  	db $6 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd792 ; flag's byte -	dw FuchsiaGymBattleText5 ; 0x5612 TextBeforeBattle -	dw FuchsiaGymAfterBattleText5 ; 0x561c TextAfterBattle -	dw FuchsiaGymEndBattleText5 ; 0x5617 TextEndBattle -	dw FuchsiaGymEndBattleText5 ; 0x5617 TextEndBattle +	dw FuchsiaGymBattleText5 ; TextBeforeBattle +	dw FuchsiaGymAfterBattleText5 ; TextAfterBattle +	dw FuchsiaGymEndBattleText5 ; TextEndBattle +	dw FuchsiaGymEndBattleText5 ; TextEndBattle  FuchsiaGymTrainerHeader6: ; 75527 (1d:5527)  	db $7 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd792 ; flag's byte -	dw FuchsiaGymBattleText6 ; 0x562b TextBeforeBattle -	dw FuchsiaGymAfterBattleText6 ; 0x5635 TextAfterBattle -	dw FuchsiaGymEndBattleText6 ; 0x5630 TextEndBattle -	dw FuchsiaGymEndBattleText6 ; 0x5630 TextEndBattle +	dw FuchsiaGymBattleText6 ; TextBeforeBattle +	dw FuchsiaGymAfterBattleText6 ; TextAfterBattle +	dw FuchsiaGymEndBattleText6 ; TextEndBattle +	dw FuchsiaGymEndBattleText6 ; TextEndBattle  	db $ff  FuchsiaGymText1: ; 75534 (1d:5534) -	db $08 ; asm +	TX_ASM  	ld a, [wd792]  	bit 1, a -	jr z, .asm_181b6 ; 0x7553a +	jr z, .asm_181b6  	bit 0, a -	jr nz, .asm_adc3b ; 0x7553e +	jr nz, .asm_adc3b  	call z, FuchsiaGymScript3_75497  	call DisableWaitingAfterTextDisplay -	jr .asm_e84c6 ; 0x75546 -.asm_adc3b ; 0x75548 -	ld hl, UnnamedText_7558b +	jr .asm_e84c6 +.asm_adc3b +	ld hl, KogaExplainToxicText  	call PrintText -	jr .asm_e84c6 ; 0x7554e -.asm_181b6 ; 0x75550 -	ld hl, UnnamedText_75581 +	jr .asm_e84c6 +.asm_181b6 +	ld hl, KogaBeforeBattleText  	call PrintText  	ld hl, wd72d  	set 6, [hl]  	set 7, [hl] -	ld hl, UnnamedText_75586 -	ld de, UnnamedText_75586 +	ld hl, KogaAfterBattleText +	ld de, KogaAfterBattleText  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	ld a, $5  	ld [W_GYMLEADERNO], a  	xor a -	ldh [$b4], a +	ld [hJoyHeld], a  	ld a, $3  	ld [W_FUCHSIAGYMCURSCRIPT], a -.asm_e84c6 ; 0x7557e +.asm_e84c6  	jp TextScriptEnd -UnnamedText_75581: ; 75581 (1d:5581) -	TX_FAR _UnnamedText_75581 +KogaBeforeBattleText: ; 75581 (1d:5581) +	TX_FAR _KogaBeforeBattleText  	db "@" -UnnamedText_75586: ; 75586 (1d:5586) -	TX_FAR _UnnamedText_75586 +KogaAfterBattleText: ; 75586 (1d:5586) +	TX_FAR _KogaAfterBattleText  	db "@" -UnnamedText_7558b: ; 7558b (1d:558b) -	TX_FAR _UnnamedText_7558b +KogaExplainToxicText: ; 7558b (1d:558b) +	TX_FAR _KogaExplainToxicText  	db "@"  FuchsiaGymText9: ; 75590 (1d:5590) -	TX_FAR _UnnamedText_75590 +	TX_FAR _FuchsiaGymText9  	db "@"  FuchsiaGymText10: ; 75595 (1d:5595) @@ -209,7 +209,7 @@ FuchsiaGymText11: ; 7559f (1d:559f)  	db "@"  FuchsiaGymText2: ; 755a4 (1d:55a4) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaGymTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -227,7 +227,7 @@ FuchsiaGymAfterBattleText1: ; 755b8 (1d:55b8)  	db "@"  FuchsiaGymText3: ; 755bd (1d:55bd) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaGymTrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -245,7 +245,7 @@ FuchsiaGymAfterBattleText2: ; 755d1 (1d:55d1)  	db "@"  FuchsiaGymText4: ; 755d6 (1d:55d6) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaGymTrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -263,7 +263,7 @@ FuchsiaGymAfterBattleText3: ; 755ea (1d:55ea)  	db "@"  FuchsiaGymText5: ; 755ef (1d:55ef) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaGymTrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -281,7 +281,7 @@ FuchsiaGymAfterBattleText4: ; 75603 (1d:5603)  	db "@"  FuchsiaGymText6: ; 75608 (1d:5608) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaGymTrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -299,7 +299,7 @@ FuchsiaGymAfterBattleText5: ; 7561c (1d:561c)  	db "@"  FuchsiaGymText7: ; 75621 (1d:5621) -	db $08 ; asm +	TX_ASM  	ld hl, FuchsiaGymTrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -317,20 +317,20 @@ FuchsiaGymAfterBattleText6: ; 75635 (1d:5635)  	db "@"  FuchsiaGymText8: ; 7563a (1d:563a) -	db $08 ; asm +	TX_ASM  	ld a, [wd792]  	bit 1, a -	ld hl, UnnamedText_75653 -	jr nz, .asm_50671 ; 0x75643 -	ld hl, UnnamedText_7564e -.asm_50671 ; 0x75648 +	ld hl, FuchsiaGymText_75653 +	jr nz, .asm_50671 +	ld hl, FuchsiaGymText_7564e +.asm_50671  	call PrintText  	jp TextScriptEnd -UnnamedText_7564e: ; 7564e (1d:564e) -	TX_FAR _UnnamedText_7564e +FuchsiaGymText_7564e: ; 7564e (1d:564e) +	TX_FAR _FuchsiaGymText_7564e  	db "@" -UnnamedText_75653: ; 75653 (1d:5653) -	TX_FAR _UnnamedText_75653 +FuchsiaGymText_75653: ; 75653 (1d:5653) +	TX_FAR _FuchsiaGymText_75653  	db "@" diff --git a/scripts/fuchsiahouse2.asm b/scripts/fuchsiahouse2.asm index 33bae7e4..12b49297 100755 --- a/scripts/fuchsiahouse2.asm +++ b/scripts/fuchsiahouse2.asm @@ -9,36 +9,36 @@ FuchsiaHouse2TextPointers: ; 750b8 (1d:50b8)  	dw FuchsiaHouse2Text5  FuchsiaHouse2Text1: ; 750c2 (1d:50c2) -	db $08 ; asm +	TX_ASM  	ld a, [wd78e]  	bit 0, a -	jr nz, .subtract ; 0x750c8 +	jr nz, .subtract  	ld b,GOLD_TEETH  	call IsItemInBag -	jr nz, .asm_3f30f ; 0x750cf +	jr nz, .asm_3f30f  	ld a, [wd78e]  	bit 1, a -	jr nz, .asm_60cba ; 0x750d6 +	jr nz, .asm_60cba  	ld hl, WardenGibberishText1  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a  	ld hl, WardenGibberishText3 -	jr nz, .asm_61238 ; 0x750e8 +	jr nz, .asm_61238  	ld hl, WardenGibberishText2 -.asm_61238 ; 0x750ed +.asm_61238  	call PrintText -	jr .asm_52039 ; 0x750f0 -.asm_3f30f ; 0x750f2 +	jr .asm_52039 +.asm_3f30f  	ld hl, WardenTeethText1  	call PrintText  	ld a, GOLD_TEETH -	ldh [$db], a +	ld [$ffdb], a  	callba RemoveItemByID  	ld hl, wd78e  	set 1, [hl] -.asm_60cba ; 0x75109 +.asm_60cba  	ld hl, WardenThankYouText  	call PrintText  	ld bc,(HM_04 << 8) | 1 @@ -48,15 +48,15 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2)  	call PrintText  	ld hl, wd78e  	set 0, [hl] -	jr .asm_52039 ; 0x75122 -.subtract ; 0x75124 +	jr .asm_52039 +.subtract  	ld hl, HM04ExplanationText  	call PrintText -	jr .asm_52039 ; 0x7512a +	jr .asm_52039  .BagFull  	ld hl, HM04NoRoomText  	call PrintText -.asm_52039 ; 0x75132 +.asm_52039  	jp TextScriptEnd  WardenGibberishText1: ; 75135 (1d:5135) @@ -97,13 +97,13 @@ HM04NoRoomText: ; 7515e (1d:515e)  FuchsiaHouse2Text5: ; 75163 (1d:5163)  FuchsiaHouse2Text4: ; 75163 (1d:5163) -	db $08 ; asm -	ldh a, [$8c] +	TX_ASM +	ld a, [H_SPRITEINDEX]  	cp $4  	ld hl, FuchsiaHouse2Text_7517b -	jr nz, .asm_4c9a2 ; 0x7516b +	jr nz, .asm_4c9a2  	ld hl, FuchsiaHouse2Text_75176 -.asm_4c9a2 ; 0x75170 +.asm_4c9a2  	call PrintText  	jp TextScriptEnd diff --git a/scripts/fuchsiahouse3.asm b/scripts/fuchsiahouse3.asm index 372df6a6..8c83b779 100755 --- a/scripts/fuchsiahouse3.asm +++ b/scripts/fuchsiahouse3.asm @@ -5,7 +5,7 @@ FuchsiaHouse3TextPointers: ; 5617f (15:617f)  	dw FuchsiaHouse3Text1  FuchsiaHouse3Text1: ; 56181 (15:6181) -	db $08 ; asm +	TX_ASM  	ld a, [wd728]  	bit 4, a  	jr nz, .after @@ -48,11 +48,11 @@ FuchsiaHouse3Text_561bd: ; 561bd (15:61bd)  	db "@"  FuchsiaHouse3Text_561c2: ; 561c2 (15:61c2) -	TX_FAR _FuchsiaHouse3Text_561c2 ; 0xa06e8 +	TX_FAR _FuchsiaHouse3Text_561c2  	db $0B  	db "@" -UnnamedText_561c8: ; 561c8 +UnusedText_561c8: ; 561c8  	para "つり こそ"  	line "おとこの ロマン だ!" diff --git a/scripts/gary.asm b/scripts/gary.asm index c0785cab..c7766d5d 100755 --- a/scripts/gary.asm +++ b/scripts/gary.asm @@ -70,12 +70,12 @@ GaryScript2: ; 75f6a (1d:5f6a)  	; select which team to use during the encounter  	ld a, [W_RIVALSTARTER]  	cp STARTER2 -	jr nz, .NotSquirtle ; 0x75f9f $4 +	jr nz, .NotSquirtle  	ld a, $1  	jr .done  .NotSquirtle  	cp STARTER3 -	jr nz, .Charmander ; 0x75fa7 $4 +	jr nz, .Charmander  	ld a, $2  	jr .done  .Charmander @@ -93,7 +93,7 @@ GaryScript3: ; 75fbb (1d:5fbb)  	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, GaryScript_75f29 -	call UpdateSprites ; move sprites +	call UpdateSprites  	ld hl, wd867  	set 1, [hl]  	ld a, $f0 @@ -210,7 +210,7 @@ GaryScript9: ; 76099 (1d:6099)  	ld [W_GARYCURSCRIPT], a  	ret -RLEMovement760b4 ; 760b4 (1d:60b4) +RLEMovement760b4: ; 760b4 (1d:60b4)  	db $40,4  	db $20,1  	db $ff @@ -225,7 +225,7 @@ GaryScript10: ; 760b9 (1d:60b9)  	ld [W_GARYCURSCRIPT], a  	ret -GaryScript_760c8 ; 760c8 (1d:60c8) +GaryScript_760c8: ; 760c8 (1d:60c8)  	ld a, $f0  	ld [wJoyIgnore], a  	call DisplayTextID @@ -241,13 +241,13 @@ GaryTextPointers: ; 760d6 (1d:60d6)  	dw GaryText5  GaryText1: ; 760e0 (1d:60e0) -	db $08 ; asm +	TX_ASM  	ld a, [wd867]  	bit 1, a  	ld hl, GaryText_760f4 -	jr z, .asm_17e9f ; 0x760e9 +	jr z, .asm_17e9f  	ld hl, GaryText_76103 -.asm_17e9f ; 0x760ee +.asm_17e9f  	call PrintText  	jp TextScriptEnd @@ -272,7 +272,7 @@ GaryText2: ; 76108 (1d:6108)  	db "@"  GaryText3: ; 7610d (1d:610d) -	db $8 +	TX_ASM  	ld a, [W_PLAYERSTARTER]  	ld [wd11e], a  	call GetMonName diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm index c44622c7..1d522e60 100755 --- a/scripts/halloffameroom.asm +++ b/scripts/halloffameroom.asm @@ -55,7 +55,7 @@ HallofFameRoomScript2: ; 5a4bb (16:64bb)  	ld c, 600 / 5  	call DelayFrames  	dec b -	jr nz, .asm_5a4ff ; 0x5a505 $f8 +	jr nz, .asm_5a4ff  	call WaitForTextScrollButtonPress  	jp Init diff --git a/scripts/lab2.asm b/scripts/lab2.asm index 9839a563..4c3ab344 100755 --- a/scripts/lab2.asm +++ b/scripts/lab2.asm @@ -11,15 +11,15 @@ Lab2Text1: ; 75c2a (1d:5c2a)  	db "@"  Lab2Text2: ; 75c2f (1d:5c2f) -	db $8 +	TX_ASM  	ld a, $7  	ld [wWhichTrade], a -	jr asm_78552 ; 0x75c35 $6 +	jr Lab2DoTrade  Lab2Text3: ; 75c37 (1d:5c37) -	db $8 +	TX_ASM  	ld a, $8  	ld [wWhichTrade], a -asm_78552: ; 75c3d (1d:5c3d) +Lab2DoTrade: ; 75c3d (1d:5c3d)  	predef DoInGameTradeDialogue  	jp TextScriptEnd diff --git a/scripts/lab3.asm b/scripts/lab3.asm index 66839b17..e91d36f3 100755 --- a/scripts/lab3.asm +++ b/scripts/lab3.asm @@ -9,10 +9,10 @@ Lab3TextPointers: ; 75c8a (1d:5c8a)  	dw Lab3Text5  Lab3Text1: ; 75c94 (1d:5c94) -	db $08 ; asm +	TX_ASM  	ld a, [wd7a1]  	bit 7, a -	jr nz, .asm_e551a ; 0x75c9a +	jr nz, .asm_e551a  	ld hl, TM35PreReceiveText  	call PrintText  	ld bc, (TM_35 << 8) | 1 @@ -22,15 +22,15 @@ Lab3Text1: ; 75c94 (1d:5c94)  	call PrintText  	ld hl, wd7a1  	set 7, [hl] -	jr .asm_eb896 ; 0x75cb5 +	jr .asm_eb896  .BagFull  	ld hl, TM35NoRoomText  	call PrintText -	jr .asm_eb896 ; 0x75cbd -.asm_e551a ; 0x75cbf +	jr .asm_eb896 +.asm_e551a  	ld hl, TM35ExplanationText  	call PrintText -.asm_eb896 ; 0x75cc5 +.asm_eb896  	jp TextScriptEnd  TM35PreReceiveText: ; 75cc8 (1d:5cc8) diff --git a/scripts/lab4.asm b/scripts/lab4.asm index 1e818676..6d4bd923 100755 --- a/scripts/lab4.asm +++ b/scripts/lab4.asm @@ -48,18 +48,18 @@ FossilsList: ; 75d68 (1d:5d68)  	db $00  Lab4Text1: ; 75d6c (1d:5d6c) -	db $8 +	TX_ASM  	ld a, [wd7a3]  	bit 0, a -	jr nz, .asm_75d96 ; 0x75d72 $22 +	jr nz, .asm_75d96  	ld hl, Lab4Text_75dc6  	call PrintText  	call Lab4Script_75d38  	ld a, [wcd37]  	and a -	jr z, .asm_75d8d ; 0x75d81 $a +	jr z, .asm_75d8d  	callba GiveFossilToCinnabarLab -	jr .asm_75d93 ; 0x75d8b $6 +	jr .asm_75d93  .asm_75d8d  	ld hl, Lab4Text_75dcb  	call PrintText @@ -67,10 +67,10 @@ Lab4Text1: ; 75d6c (1d:5d6c)  	jp TextScriptEnd  .asm_75d96  	bit 1, a -	jr z, .asm_75da2 ; 0x75d98 $8 +	jr z, .asm_75da2  	ld hl, Lab4Text_75dd0  	call PrintText -	jr .asm_75d93 ; 0x75da0 $f1 +	jr .asm_75d93  .asm_75da2  	call LoadFossilItemAndMonNameBank1D  	ld hl, Lab4Text_75dd5 @@ -81,12 +81,12 @@ Lab4Text1: ; 75d6c (1d:5d6c)  	ld b, a  	ld c, 30  	call GivePokemon -	jr nc, .asm_75d93 ; 0x75db9 $d8 +	jr nc, .asm_75d93  	ld hl, wd7a3  	res 0, [hl]  	res 1, [hl]  	res 2, [hl] -	jr .asm_75d93 ; 0x75dc4 $cd +	jr .asm_75d93  Lab4Text_75dc6: ; 75dc6 (1d:5dc6)  	TX_FAR _Lab4Text_75dc6 @@ -105,7 +105,7 @@ Lab4Text_75dd5: ; 75dd5 (1d:5dd5)  	db "@"  Lab4Text2: ; 75dda (1d:5dda) -	db $08 ; asm +	TX_ASM  	ld a, $3  	ld [wWhichTrade], a  	predef DoInGameTradeDialogue diff --git a/scripts/lance.asm b/scripts/lance.asm index f2523098..8d1c790d 100755 --- a/scripts/lance.asm +++ b/scripts/lance.asm @@ -60,11 +60,11 @@ LanceScript0: ; 5a305 (16:6305)  	jp nc, CheckFightingMapTrainers  	xor a  	ld [hJoyHeld], a -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	cp $3  	jr nc, .asm_5a325  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp DisplayTextID  .asm_5a325  	cp $5 @@ -89,11 +89,11 @@ CoordsData_5a33e: ; 5a33e (16:633e)  LanceScript2: ; 5a349 (16:6349)  	call EndTrainerBattle -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, LanceScript_5a2f5  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp DisplayTextID  LanceScript_5a35b: ; 5a35b (16:635b) @@ -136,15 +136,15 @@ LanceTrainerHeader0: ; 5a397 (16:6397)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd866 ; flag's byte -	dw LanceBeforeBattleText ; 0x63ae TextBeforeBattle -	dw LanceAfterBattleText ; 0x63b8 TextAfterBattle -	dw LanceEndBattleText ; 0x63b3 TextEndBattle -	dw LanceEndBattleText ; 0x63b3 TextEndBattle +	dw LanceBeforeBattleText ; TextBeforeBattle +	dw LanceAfterBattleText ; TextAfterBattle +	dw LanceEndBattleText ; TextEndBattle +	dw LanceEndBattleText ; TextEndBattle  	db $ff  LanceText1: ; 5a3a4 (16:63a4) -	db $08 ; asm +	TX_ASM  	ld hl, LanceTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -159,7 +159,7 @@ LanceEndBattleText: ; 5a3b3 (16:63b3)  LanceAfterBattleText: ; 5a3b8 (16:63b8)  	TX_FAR _LanceAfterBattleText -	db $8 +	TX_ASM  	ld hl, wd866  	set 6, [hl]  	jp TextScriptEnd diff --git a/scripts/lavenderhouse1.asm b/scripts/lavenderhouse1.asm index 5fd1dd34..9c812c71 100755 --- a/scripts/lavenderhouse1.asm +++ b/scripts/lavenderhouse1.asm @@ -11,17 +11,17 @@ LavenderHouse1TextPointers: ; 1d8ac (7:58ac)  	dw LavenderHouse1Text6  LavenderHouse1Text1: ; 1d8b8 (7:58b8) -	db $08 ; asm +	TX_ASM  	ld a, [wd7e0]  	bit 7, a -	jr nz, .asm_72e5d ; 0x1d8be +	jr nz, .asm_72e5d  	ld hl, LavenderHouse1Text_1d8d1  	call PrintText -	jr .asm_6957f ; 0x1d8c6 -.asm_72e5d ; 0x1d8c8 +	jr .asm_6957f +.asm_72e5d  	ld hl, LavenderHouse1Text_1d8d6  	call PrintText -.asm_6957f ; 0x1d8ce +.asm_6957f  	jp TextScriptEnd  LavenderHouse1Text_1d8d1: ; 1d8d1 (7:58d1) @@ -33,17 +33,17 @@ LavenderHouse1Text_1d8d6: ; 1d8d6 (7:58d6)  	db "@"  LavenderHouse1Text2: ; 1d8db (7:58db) -	db $08 ; asm +	TX_ASM  	ld a, [wd7e0]  	bit 7, a -	jr nz, .asm_06470 ; 0x1d8e1 +	jr nz, .asm_06470  	ld hl, LavenderHouse1Text_1d8f4  	call PrintText -	jr .asm_3d208 ; 0x1d8e9 -.asm_06470 ; 0x1d8eb +	jr .asm_3d208 +.asm_06470  	ld hl, LavenderHouse1Text_1d8f9  	call PrintText -.asm_3d208 ; 0x1d8f1 +.asm_3d208  	jp TextScriptEnd  LavenderHouse1Text_1d8f4: ; 1d8f4 (7:58f4) @@ -56,23 +56,23 @@ LavenderHouse1Text_1d8f9: ; 1d8f9 (7:58f9)  LavenderHouse1Text3: ; 1d8fe (7:58fe)  	TX_FAR _LavenderHouse1Text3 -	db $8 +	TX_ASM  	ld a, PSYDUCK  	call PlayCry  	jp TextScriptEnd  LavenderHouse1Text4: ; 1d90b (7:590b)  	TX_FAR _LavenderHouse1Text4 -	db $8 +	TX_ASM  	ld a, NIDORINO  	call PlayCry  	jp TextScriptEnd  LavenderHouse1Text5: ; 1d918 (7:5918) -	db $08 ; asm +	TX_ASM  	ld a, [wd76c]  	bit 0, a -	jr nz, .asm_15ac2 ; 0x1d91e +	jr nz, .asm_15ac2  	ld hl, LavenderHouse1Text_1d94c  	call PrintText  	ld bc, (POKE_FLUTE << 8) | 1 @@ -82,15 +82,15 @@ LavenderHouse1Text5: ; 1d918 (7:5918)  	call PrintText  	ld hl, wd76c  	set 0, [hl] -	jr .asm_da749 ; 0x1d939 +	jr .asm_da749  .BagFull  	ld hl, FluteNoRoomText  	call PrintText -	jr .asm_da749 ; 0x1d941 -.asm_15ac2 ; 0x1d943 +	jr .asm_da749 +.asm_15ac2  	ld hl, MrFujiAfterFluteText  	call PrintText -.asm_da749 ; 0x1d949 +.asm_da749  	jp TextScriptEnd  LavenderHouse1Text_1d94c: ; 1d94c (7:594c) diff --git a/scripts/lavenderhouse2.asm b/scripts/lavenderhouse2.asm index c2120058..4dc5c7b7 100755 --- a/scripts/lavenderhouse2.asm +++ b/scripts/lavenderhouse2.asm @@ -8,23 +8,23 @@ LavenderHouse2TextPointers: ; 1d9b2 (7:59b2)  LavenderHouse2Text1: ; 1d9b6 (7:59b6)  	TX_FAR _LavenderHouse2Text1 -	db $8 +	TX_ASM  	ld a, CUBONE  	call PlayCry  	jp TextScriptEnd  LavenderHouse2Text2: ; 1d9c3 (7:59c3) -	db $08 ; asm +	TX_ASM  	ld a, [wd7e0]  	bit 7, a -	jr nz, .asm_65711 ; 0x1d9c9 +	jr nz, .asm_65711  	ld hl, LavenderHouse2Text_1d9dc  	call PrintText -	jr .asm_64be1 ; 0x1d9d1 -.asm_65711 ; 0x1d9d3 +	jr .asm_64be1 +.asm_65711  	ld hl, LavenderHouse2Text_1d9e1  	call PrintText -.asm_64be1 ; 0x1d9d9 +.asm_64be1  	jp TextScriptEnd  LavenderHouse2Text_1d9dc: ; 1d9dc (7:59dc) diff --git a/scripts/lavendermart.asm b/scripts/lavendermart.asm index 3852a235..53967cf2 100755 --- a/scripts/lavendermart.asm +++ b/scripts/lavendermart.asm @@ -11,17 +11,17 @@ LavenderMartText2: ; 5c935 (17:4935)  	db "@"  LavenderMartText3: ; 5c93a (17:493a) -	db $08 ; asm +	TX_ASM  	ld a, [wd7e0]  	bit 7, a -	jr nz, .asm_c88d4 ; 0x5c940 +	jr nz, .asm_c88d4  	ld hl, LavenderMart_5c953  	call PrintText -	jr .asm_6d225 ; 0x5c948 -.asm_c88d4 ; 0x5c94a +	jr .asm_6d225 +.asm_c88d4  	ld hl, LavenderMart_5c958  	call PrintText -.asm_6d225 ; 0x5c950 +.asm_6d225  	jp TextScriptEnd  LavenderMart_5c953: ; 5c953 (17:4953) diff --git a/scripts/lavendertown.asm b/scripts/lavendertown.asm index a4f1f200..30c6d4e5 100755 --- a/scripts/lavendertown.asm +++ b/scripts/lavendertown.asm @@ -13,16 +13,16 @@ LavenderTownTextPointers: ; 4410e (11:410e)  	dw LavenderTownText9  LavenderTownText1: ; 44120 (11:4120) -	db $08 ; asm +	TX_ASM  	ld hl, LavenderTownText_4413c  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a  	ld hl, LavenderTownText_44146 -	jr nz, .asm_40831 ; 0x44131 +	jr nz, .asm_40831  	ld hl, LavenderTownText_44141 -.asm_40831 ; 0x44136 +.asm_40831  	call PrintText  	jp TextScriptEnd diff --git a/scripts/lorelei.asm b/scripts/lorelei.asm index ab769d94..7e800467 100755 --- a/scripts/lorelei.asm +++ b/scripts/lorelei.asm @@ -41,7 +41,8 @@ LoreleiScriptPointers: ; 761bb (1d:61bb)  LoreleiScript4: ; 761c5 (1d:61c5)  	ret -asm_761c6: ; 761c6 (1d:61c6) + +LoreleiScript_761c6: ; 761c6 (1d:61c6)  	ld hl, wSimulatedJoypadStatesEnd  	ld a, D_UP  	ld [hli], a @@ -57,6 +58,7 @@ asm_761c6: ; 761c6 (1d:61c6)  	ld [W_LORELEICURSCRIPT], a  	ld [W_CURMAPSCRIPT], a  	ret +  LoreleiScript0: ; 761e2 (1d:61e2)  	ld hl, CoordsData_76223  	call ArePlayerCoordsInArray @@ -66,16 +68,16 @@ LoreleiScript0: ; 761e2 (1d:61e2)  	ld [hJoyHeld], a  	ld [wSimulatedJoypadStatesEnd], a  	ld [wSimulatedJoypadStatesIndex], a -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	cp $3  	jr c, .asm_76206  	ld hl, wd863  	bit 6, [hl]  	set 6, [hl] -	jr z, asm_761c6 +	jr z, LoreleiScript_761c6  .asm_76206  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, D_UP  	ld [wSimulatedJoypadStatesEnd], a @@ -106,31 +108,31 @@ LoreleiScript3: ; 7622c (1d:622c)  	ret  LoreleiScript2: ; 7623f (1d:623f)  	call EndTrainerBattle -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, LoreleiScript_761b6  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp DisplayTextID  LoreleiTextPointers: ; 76251 (1d:6251)  	dw LoreleiText1 -	dw LoreleiText2 +	dw LoreleiDontRunAwayText  LoreleiTrainerHeaders: ; 76255 (1d:6255)  LoreleiTrainerHeader0: ; 76255 (1d:6255)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd863 ; flag's byte -	dw LoreleiBeforeBattleText ; 0x626c TextBeforeBattle -	dw LoreleiAfterBattleText ; 0x6276 TextAfterBattle -	dw LoreleiEndBattleText ; 0x6271 TextEndBattle -	dw LoreleiEndBattleText ; 0x6271 TextEndBattle +	dw LoreleiBeforeBattleText ; TextBeforeBattle +	dw LoreleiAfterBattleText ; TextAfterBattle +	dw LoreleiEndBattleText ; TextEndBattle +	dw LoreleiEndBattleText ; TextEndBattle  	db $ff  LoreleiText1: ; 76262 (1d:6262) -	db $08 ; asm +	TX_ASM  	ld hl, LoreleiTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -147,6 +149,6 @@ LoreleiAfterBattleText: ; 76276 (1d:6276)  	TX_FAR _LoreleiAfterBattleText  	db "@" -LoreleiText2: ; 7627b (1d:627b) -	TX_FAR _LoreleiText2 +LoreleiDontRunAwayText: ; 7627b (1d:627b) +	TX_FAR _LoreleiDontRunAwayText  	db "@" diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm index 3e067a98..e5c7eb0a 100755 --- a/scripts/mansion1.asm +++ b/scripts/mansion1.asm @@ -15,7 +15,7 @@ Mansion1Subscript1: ; 442c5 (11:42c5)  	ret z  	ld a, [wd796]  	bit 0, a -	jr nz, .asm_442ec ; 0x442d2 $18 +	jr nz, .asm_442ec  	ld bc, $060c  	call Mansion1Script_4430b  	ld bc, $0308 @@ -37,12 +37,12 @@ Mansion1Subscript1: ; 442c5 (11:42c5)  Mansion1Script_44304: ; 44304 (11:4304)  	ld a, $2d  	ld [wd09f], a -	jr asm_44310 +	jr Mansion1ReplaceBlock  Mansion1Script_4430b: ; 4430b (11:430b)  	ld a, $e  	ld [wd09f], a -asm_44310: ; 44310 (11:4310) +Mansion1ReplaceBlock: ; 44310 (11:4310)  	predef ReplaceTileBlock  	ret @@ -72,15 +72,15 @@ Mansion1TrainerHeader0: ; 44334 (11:4334)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd798 ; flag's byte -	dw Mansion1BattleText2 ; 0x434b TextBeforeBattle -	dw Mansion1AfterBattleText2 ; 0x4355 TextAfterBattle -	dw Mansion1EndBattleText2 ; 0x4350 TextEndBattle -	dw Mansion1EndBattleText2 ; 0x4350 TextEndBattle +	dw Mansion1BattleText2 ; TextBeforeBattle +	dw Mansion1AfterBattleText2 ; TextAfterBattle +	dw Mansion1EndBattleText2 ; TextEndBattle +	dw Mansion1EndBattleText2 ; TextEndBattle  	db $ff  Mansion1Text1: ; 44341 (11:4341) -	db $08 ; asm +	TX_ASM  	ld hl, Mansion1TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -98,13 +98,13 @@ Mansion1AfterBattleText2: ; 44355 (11:4355)  	db "@"  Mansion1Text4: ; 4435a (11:435a) -	db $8 +	TX_ASM  	ld hl, MansionSwitchText  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_4438c ; 0x44368 $22 +	jr nz, .asm_4438c  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, wd126 @@ -116,9 +116,9 @@ Mansion1Text4: ; 4435a (11:435a)  	ld hl, wd796  	bit 0, [hl]  	set 0, [hl] -	jr z, .asm_44392 ; 0x44386 $a +	jr z, .asm_44392  	res 0, [hl] -	jr .asm_44392 ; 0x4438a $6 +	jr .asm_44392  .asm_4438c  	ld hl, MansionSwitchNotPressedText  	call PrintText diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm index c643d229..334753df 100755 --- a/scripts/mansion2.asm +++ b/scripts/mansion2.asm @@ -69,15 +69,15 @@ Mansion2TrainerHeader0: ; 52057 (14:6057)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd847 ; flag's byte -	dw Mansion2BattleText1 ; 0x606e TextBeforeBattle -	dw Mansion2AfterBattleText1 ; 0x6078 TextAfterBattle -	dw Mansion2EndBattleText1 ; 0x6073 TextEndBattle -	dw Mansion2EndBattleText1 ; 0x6073 TextEndBattle +	dw Mansion2BattleText1 ; TextBeforeBattle +	dw Mansion2AfterBattleText1 ; TextAfterBattle +	dw Mansion2EndBattleText1 ; TextEndBattle +	dw Mansion2EndBattleText1 ; TextEndBattle  	db $ff  Mansion2Text1: ; 52064 (14:6064) -	db $08 ; asm +	TX_ASM  	ld hl, Mansion2TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -104,13 +104,13 @@ Mansion2Text4: ; 52082 (14:6082)  Mansion3Text6: ; 52087 (14:6087)  Mansion2Text5: ; 52087 (14:6087) -	db $8 +	TX_ASM  	ld hl, Mansion2Text_520c2  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_520b9 ; 0x52095 $22 +	jr nz, .asm_520b9  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, wd126 @@ -122,9 +122,9 @@ Mansion2Text5: ; 52087 (14:6087)  	ld hl, wd796  	bit 0, [hl]  	set 0, [hl] -	jr z, .asm_520bf ; 0x520b3 $a +	jr z, .asm_520bf  	res 0, [hl] -	jr .asm_520bf ; 0x520b7 $6 +	jr .asm_520bf  .asm_520b9  	ld hl, Mansion2Text_520cc  	call PrintText diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm index 6ad02dd9..d7c0d6ef 100755 --- a/scripts/mansion3.asm +++ b/scripts/mansion3.asm @@ -65,7 +65,7 @@ Mansion3Script_5225b: ; 5225b (14:625b)  	ret nz  	call ArePlayerCoordsInArray  	ret nc -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	ld [wWhichDungeonWarp], a  	ld hl, wd72d  	set 4, [hl] @@ -80,7 +80,7 @@ Mansion3Script_Switches: ; 5227a (14:627a)  	xor a  	ld [hJoyHeld], a  	ld a, $6 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp DisplayTextID  Mansion3TextPointers: ; 5228a (14:628a) @@ -96,30 +96,30 @@ Mansion3TrainerHeader0: ; 52296 (14:6296)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd849 ; flag's byte -	dw Mansion3BattleText1 ; 0x62c3 TextBeforeBattle -	dw Mansion3AfterBattleText1 ; 0x62cd TextAfterBattle -	dw Mansion3EndBattleText1 ; 0x62c8 TextEndBattle -	dw Mansion3EndBattleText1 ; 0x62c8 TextEndBattle +	dw Mansion3BattleText1 ; TextBeforeBattle +	dw Mansion3AfterBattleText1 ; TextAfterBattle +	dw Mansion3EndBattleText1 ; TextEndBattle +	dw Mansion3EndBattleText1 ; TextEndBattle  Mansion3TrainerHeader2: ; 522a2 (14:62a2)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd849 ; flag's byte -	dw Mansion3BattleText2 ; 0x62d2 TextBeforeBattle -	dw Mansion3AfterBattleText2 ; 0x62dc TextAfterBattle -	dw Mansion3EndBattleText2 ; 0x62d7 TextEndBattle -	dw Mansion3EndBattleText2 ; 0x62d7 TextEndBattle +	dw Mansion3BattleText2 ; TextBeforeBattle +	dw Mansion3AfterBattleText2 ; TextAfterBattle +	dw Mansion3EndBattleText2 ; TextEndBattle +	dw Mansion3EndBattleText2 ; TextEndBattle  	db $ff  Mansion3Text1: ; 522af (14:62af) -	db $08 ; asm +	TX_ASM  	ld hl, Mansion3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  Mansion3Text2: ; 522b9 (14:62b9) -	db $08 ; asm +	TX_ASM  	ld hl, Mansion3TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm index b89af5f2..4f1bd742 100755 --- a/scripts/mansion4.asm +++ b/scripts/mansion4.asm @@ -51,7 +51,7 @@ Mansion4Script_Switches: ; 52420 (14:6420)  	xor a  	ld [hJoyHeld], a  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp DisplayTextID  Mansion4ScriptPointers: ; 52430 (14:6430) @@ -75,30 +75,30 @@ Mansion4TrainerHeader0: ; 52448 (14:6448)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd84b ; flag's byte -	dw Mansion4BattleText1 ; 0x6475 TextBeforeBattle -	dw Mansion4AfterBattleText1 ; 0x647f TextAfterBattle -	dw Mansion4EndBattleText1 ; 0x647a TextEndBattle -	dw Mansion4EndBattleText1 ; 0x647a TextEndBattle +	dw Mansion4BattleText1 ; TextBeforeBattle +	dw Mansion4AfterBattleText1 ; TextAfterBattle +	dw Mansion4EndBattleText1 ; TextEndBattle +	dw Mansion4EndBattleText1 ; TextEndBattle  Mansion4TrainerHeader2: ; 52454 (14:6454)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd84b ; flag's byte -	dw Mansion4BattleText2 ; 0x6484 TextBeforeBattle -	dw Mansion4AfterBattleText2 ; 0x648e TextAfterBattle -	dw Mansion4EndBattleText2 ; 0x6489 TextEndBattle -	dw Mansion4EndBattleText2 ; 0x6489 TextEndBattle +	dw Mansion4BattleText2 ; TextBeforeBattle +	dw Mansion4AfterBattleText2 ; TextAfterBattle +	dw Mansion4EndBattleText2 ; TextEndBattle +	dw Mansion4EndBattleText2 ; TextEndBattle  	db $ff  Mansion4Text1: ; 52461 (14:6461) -	db $08 ; asm +	TX_ASM  	ld hl, Mansion4TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  Mansion4Text2: ; 5246b (14:646b) -	db $08 ; asm +	TX_ASM  	ld hl, Mansion4TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/mtmoon1.asm b/scripts/mtmoon1.asm index def597ba..6c9fcd88 100755 --- a/scripts/mtmoon1.asm +++ b/scripts/mtmoon1.asm @@ -33,105 +33,105 @@ MtMoon1TrainerHeader0: ; 499fd (12:59fd)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7f5 ; flag's byte -	dw MtMoon1BattleText2 ; 0x5a98 TextBeforeBattle -	dw MtMoon1AfterBattleText2 ; 0x5aa2 TextAfterBattle -	dw MtMoon1EndBattleText2 ; 0x5a9d TextEndBattle -	dw MtMoon1EndBattleText2 ; 0x5a9d TextEndBattle +	dw MtMoon1BattleText2 ; TextBeforeBattle +	dw MtMoon1AfterBattleText2 ; TextAfterBattle +	dw MtMoon1EndBattleText2 ; TextEndBattle +	dw MtMoon1EndBattleText2 ; TextEndBattle  MtMoon1TrainerHeader2: ; 49a09 (12:5a09)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f5 ; flag's byte -	dw MtMoon1BattleText3 ; 0x5aa7 TextBeforeBattle -	dw MtMoon1AfterBattleText3 ; 0x5ab1 TextAfterBattle -	dw MtMoon1EndBattleText3 ; 0x5aac TextEndBattle -	dw MtMoon1EndBattleText3 ; 0x5aac TextEndBattle +	dw MtMoon1BattleText3 ; TextBeforeBattle +	dw MtMoon1AfterBattleText3 ; TextAfterBattle +	dw MtMoon1EndBattleText3 ; TextEndBattle +	dw MtMoon1EndBattleText3 ; TextEndBattle  MtMoon1TrainerHeader3: ; 49a15 (12:5a15)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f5 ; flag's byte -	dw MtMoon1BattleText4 ; 0x5ab6 TextBeforeBattle -	dw MtMoon1AfterBattleText4 ; 0x5ac0 TextAfterBattle -	dw MtMoon1EndBattleText4 ; 0x5abb TextEndBattle -	dw MtMoon1EndBattleText4 ; 0x5abb TextEndBattle +	dw MtMoon1BattleText4 ; TextBeforeBattle +	dw MtMoon1AfterBattleText4 ; TextAfterBattle +	dw MtMoon1EndBattleText4 ; TextEndBattle +	dw MtMoon1EndBattleText4 ; TextEndBattle  MtMoon1TrainerHeader4: ; 49a21 (12:5a21)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f5 ; flag's byte -	dw MtMoon1BattleText5 ; 0x5ac5 TextBeforeBattle -	dw MtMoon1AfterBattleText5 ; 0x5acf TextAfterBattle -	dw MtMoon1EndBattleText5 ; 0x5aca TextEndBattle -	dw MtMoon1EndBattleText5 ; 0x5aca TextEndBattle +	dw MtMoon1BattleText5 ; TextBeforeBattle +	dw MtMoon1AfterBattleText5 ; TextAfterBattle +	dw MtMoon1EndBattleText5 ; TextEndBattle +	dw MtMoon1EndBattleText5 ; TextEndBattle  MtMoon1TrainerHeader5: ; 49a2d (12:5a2d)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f5 ; flag's byte -	dw MtMoon1BattleText6 ; 0x5ad4 TextBeforeBattle -	dw MtMoon1AfterBattleText6 ; 0x5ade TextAfterBattle -	dw MtMoon1EndBattleText6 ; 0x5ad9 TextEndBattle -	dw MtMoon1EndBattleText6 ; 0x5ad9 TextEndBattle +	dw MtMoon1BattleText6 ; TextBeforeBattle +	dw MtMoon1AfterBattleText6 ; TextAfterBattle +	dw MtMoon1EndBattleText6 ; TextEndBattle +	dw MtMoon1EndBattleText6 ; TextEndBattle  MtMoon1TrainerHeader6: ; 49a39 (12:5a39)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f5 ; flag's byte -	dw MtMoon1BattleText7 ; 0x5ae3 TextBeforeBattle -	dw MtMoon1AfterBattleText7 ; 0x5aed TextAfterBattle -	dw MtMoon1EndBattleText7 ; 0x5ae8 TextEndBattle -	dw MtMoon1EndBattleText7 ; 0x5ae8 TextEndBattle +	dw MtMoon1BattleText7 ; TextBeforeBattle +	dw MtMoon1AfterBattleText7 ; TextAfterBattle +	dw MtMoon1EndBattleText7 ; TextEndBattle +	dw MtMoon1EndBattleText7 ; TextEndBattle  MtMoon1TrainerHeader7: ; 49a45 (12:5a45)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f5 ; flag's byte -	dw MtMoon1BattleText8 ; 0x5af2 TextBeforeBattle -	dw MtMoon1AfterBattleText8 ; 0x5afc TextAfterBattle -	dw MtMoon1EndBattleText8 ; 0x5af7 TextEndBattle -	dw MtMoon1EndBattleText8 ; 0x5af7 TextEndBattle +	dw MtMoon1BattleText8 ; TextBeforeBattle +	dw MtMoon1AfterBattleText8 ; TextAfterBattle +	dw MtMoon1EndBattleText8 ; TextEndBattle +	dw MtMoon1EndBattleText8 ; TextEndBattle  	db $ff  MtMoon1Text1: ; 49a52 (12:5a52) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon1TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  MtMoon1Text2: ; 49a5c (12:5a5c) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon1TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  MtMoon1Text3: ; 49a66 (12:5a66) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon1TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  MtMoon1Text4: ; 49a70 (12:5a70) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon1TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  MtMoon1Text5: ; 49a7a (12:5a7a) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon1TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  MtMoon1Text6: ; 49a84 (12:5a84) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon1TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  MtMoon1Text7: ; 49a8e (12:5a8e) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon1TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm index eb0fc301..8f2be402 100755 --- a/scripts/mtmoon3.asm +++ b/scripts/mtmoon3.asm @@ -1,6 +1,6 @@  MtMoon3Script: ; 49d0b (12:5d0b)  	call EnableAutoTextBoxDrawing -	ld hl, MtMoon3TrainerHeader0 ; $5e48 +	ld hl, MtMoon3TrainerHeader0  	ld de, MtMoon3ScriptPointers  	ld a, [W_MTMOON3CURSCRIPT]  	call ExecuteCurMapScriptInTable @@ -10,7 +10,7 @@ MtMoon3Script: ; 49d0b (12:5d0b)  	ret z  	ld hl, CoordsData_49d37  	call ArePlayerCoordsInArray -	jr nc, .asm_49d31 ; 0x49d29 $6 +	jr nc, .asm_49d31  	ld hl, wd72e  	set 4, [hl]  	ret @@ -57,16 +57,16 @@ MtMoon3Script0: ; 49d6f (12:5d6f)  	ld a, [wd7f6]  	bit 1, a  	jp nz, MtMoon3Script_49d91 -	ld a, [W_YCOORD] ; wd361 +	ld a, [W_YCOORD]  	cp $8  	jp nz, MtMoon3Script_49d91 -	ld a, [W_XCOORD] ; wd362 +	ld a, [W_XCOORD]  	cp $d  	jp nz, MtMoon3Script_49d91  	xor a  	ld [hJoyHeld], a  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp DisplayTextID  MtMoon3Script_49d91: ; 49d91 (12:5d91) @@ -76,7 +76,7 @@ MtMoon3Script_49d91: ; 49d91 (12:5d91)  	ret  MtMoon3Script3: ; 49d9a (12:5d9a) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, MtMoon3Script_49d58  	call UpdateSprites @@ -92,7 +92,7 @@ MtMoon3Script3: ; 49d9a (12:5d9a)  MtMoon3Script4: ; 49dba (12:5dba)  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call SetSpriteMovementBytesToFF  	ld hl, CoordsData_49dea  	call ArePlayerCoordsInArray @@ -106,7 +106,7 @@ MtMoon3Script4: ; 49dba (12:5dba)  	ld de, MovementData_49df8  .asm_49dda  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call MoveSprite  	ld a, $5  	ld [W_MTMOON3CURSCRIPT], a @@ -140,7 +140,7 @@ MtMoon3Script5: ; 49dfb (12:5dfb)  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld a, $a -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, [wd7f6]  	bit 6, a @@ -176,51 +176,51 @@ MtMoon3TrainerHeader0: ; 49e48 (12:5e48)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f6 ; flag's byte -	dw MtMoon3BattleText2 ; 0x5f9f TextBeforeBattle -	dw MtMoon3AfterBattleText2 ; 0x5fa9 TextAfterBattle -	dw MtMoon3EndBattleText2 ; 0x5fa4 TextEndBattle -	dw MtMoon3EndBattleText2 ; 0x5fa4 TextEndBattle +	dw MtMoon3BattleText2 ; TextBeforeBattle +	dw MtMoon3AfterBattleText2 ; TextAfterBattle +	dw MtMoon3EndBattleText2 ; TextEndBattle +	dw MtMoon3EndBattleText2 ; TextEndBattle  MtMoon3TrainerHeader2: ; 49e54 (12:5e54)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f6 ; flag's byte -	dw MtMoon3BattleText3 ; 0x5fae TextBeforeBattle -	dw MtMoon3AfterBattleText3 ; 0x5fb8 TextAfterBattle -	dw MtMoon3EndBattleText3 ; 0x5fb3 TextEndBattle -	dw MtMoon3EndBattleText3 ; 0x5fb3 TextEndBattle +	dw MtMoon3BattleText3 ; TextBeforeBattle +	dw MtMoon3AfterBattleText3 ; TextAfterBattle +	dw MtMoon3EndBattleText3 ; TextEndBattle +	dw MtMoon3EndBattleText3 ; TextEndBattle  MtMoon3TrainerHeader3: ; 49e60 (12:5e60)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f6 ; flag's byte -	dw MtMoon3BattleText4 ; 0x5fbd TextBeforeBattle -	dw MtMoon3AfterBattleText4 ; 0x5fc7 TextAfterBattle -	dw MtMoon3EndBattleText4 ; 0x5fc2 TextEndBattle -	dw MtMoon3EndBattleText4 ; 0x5fc2 TextEndBattle +	dw MtMoon3BattleText4 ; TextBeforeBattle +	dw MtMoon3AfterBattleText4 ; TextAfterBattle +	dw MtMoon3EndBattleText4 ; TextEndBattle +	dw MtMoon3EndBattleText4 ; TextEndBattle  MtMoon3TrainerHeader4: ; 49e6c (12:5e6c)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f6 ; flag's byte -	dw MtMoon3BattleText5 ; 0x5fcc TextBeforeBattle -	dw MtMoon3AfterBattleText5 ; 0x5fd6 TextAfterBattle -	dw MtMoon3EndBattleText5 ; 0x5fd1 TextEndBattle -	dw MtMoon3EndBattleText5 ; 0x5fd1 TextEndBattle +	dw MtMoon3BattleText5 ; TextBeforeBattle +	dw MtMoon3AfterBattleText5 ; TextAfterBattle +	dw MtMoon3EndBattleText5 ; TextEndBattle +	dw MtMoon3EndBattleText5 ; TextEndBattle  	db $ff  MtMoon3Text1: ; 49e79 (12:5e79) -	db $08 ; asm +	TX_ASM  	ld a, [wd7f6]  	bit 1, a -	jr z, .asm_be1e0 ; 0x49e7f +	jr z, .asm_49e8d  	and $c0 -	jr nz, .asm_f8cd4 ; 0x49e83 +	jr nz, .asm_49eb8  	ld hl, MtMoon3Text_49f8f  	call PrintText -	jr .asm_f1fba ; 0x49e8b -.asm_be1e0 ; 0x49e8d +	jr .asm_49ebe +.asm_49e8d  	ld hl, MtMoon3Text_49f85  	call PrintText  	ld hl, wd72d @@ -229,46 +229,46 @@ MtMoon3Text1: ; 49e79 (12:5e79)  	ld hl, MtMoon3Text_49f8a  	ld de, MtMoon3Text_49f8a  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	ld a, $3  	ld [W_MTMOON3CURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -	jr .asm_f1fba ; 0x49eb6 -.asm_f8cd4 ; 0x49eb8 +	jr .asm_49ebe +.asm_49eb8  	ld hl, MtMoon3Text_49f94  	call PrintText -.asm_f1fba ; 0x49ebe +.asm_49ebe  	jp TextScriptEnd  MtMoon3Text2: ; 49ec1 (12:5ec1) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  MtMoon3Text3: ; 49ecb (12:5ecb) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon3TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  MtMoon3Text4: ; 49ed5 (12:5ed5) -	db $08 ; asm +	TX_ASM  	ld hl, MtMoon3TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  MtMoon3Text5: ; 49edf (12:5edf) -	db $08 ; asm -	ld hl, MtMoon3TrainerHeader4 ; $5e6c +	TX_ASM +	ld hl, MtMoon3TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  MtMoon3Text6: ; 49ee9 (12:5ee9) -	db $08 ; asm +	TX_ASM  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, MtMoon3Text_49f24 @@ -276,7 +276,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9)  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_1fa5e ; 0x49efc +	jr nz, .asm_49f21  	ld bc,(DOME_FOSSIL << 8) | 1  	call GiveItem  	jp nc, MtMoon3Script_49f76 @@ -289,7 +289,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9)  	ld a, $4  	ld [W_MTMOON3CURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -.asm_1fa5e ; 0x49f21 +.asm_49f21  	jp TextScriptEnd  MtMoon3Text_49f24: ; 49f24 (12:5f24) @@ -297,7 +297,7 @@ MtMoon3Text_49f24: ; 49f24 (12:5f24)  	db "@"  MtMoon3Text7: ; 49f29 (12:5f29) -	db $08 ; asm +	TX_ASM  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, MtMoon3Text_49f64 @@ -305,7 +305,7 @@ MtMoon3Text7: ; 49f29 (12:5f29)  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_8e988 ; 0x49f3c +	jr nz, .asm_49f61  	ld bc, (HELIX_FOSSIL << 8) | 1  	call GiveItem  	jp nc, MtMoon3Script_49f76 @@ -318,7 +318,7 @@ MtMoon3Text7: ; 49f29 (12:5f29)  	ld a, $4  	ld [W_MTMOON3CURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -.asm_8e988 ; 0x49f61 +.asm_49f61  	jp TextScriptEnd  MtMoon3Text_49f64: ; 49f64 (12:5f64) @@ -330,7 +330,7 @@ MtMoon3Script_49f69: ; 49f69 (12:5f69)  	jp PrintText  MtMoon3Text_49f6f: ; 49f6f (12:5f6f) -	TX_FAR _MtMoon3Text_49f6f ; 0x80995 +	TX_FAR _MtMoon3Text_49f6f  	db $11, $d, "@"  MtMoon3Script_49f76: ; 49f76 (12:5f76) @@ -339,7 +339,7 @@ MtMoon3Script_49f76: ; 49f76 (12:5f76)  	jp TextScriptEnd  MtMoon3Text_49f7f: ; 49f7f (12:5f7f) -	TX_FAR _MtMoon3Text_49f7f ; 0x809a8 +	TX_FAR _MtMoon3Text_49f7f  	db $d, "@"  MtMoon3Text_49f85: ; 49f85 (12:5f85) diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm index bfe9add8..b06c4df0 100755 --- a/scripts/mtmoonpokecenter.asm +++ b/scripts/mtmoonpokecenter.asm @@ -22,7 +22,7 @@ MtMoonPokecenterText3: ; 492e7 (12:52e7)  	db "@"  MtMoonPokecenterText4: ; 492ec (12:52ec) -	db $08 ; asm +	TX_ASM  	ld a, [wd7c6]  	add a  	jp c, .asm_49353 @@ -35,18 +35,18 @@ MtMoonPokecenterText4: ; 492ec (12:52ec)  	ld a, [wCurrentMenuItem]  	and a  	jp nz, .asm_4934e -	ldh [$9f], a -	ldh [$a1], a +	ld [$ff9f], a +	ld [$ffa1], a  	ld a, $5 -	ldh [$a0], a +	ld [$ffa0], a  	call HasEnoughMoney -	jr nc, .asm_faa09 ; 0x49317 +	jr nc, .asm_faa09  	ld hl, MtMoonPokecenterText_49366 -	jr .asm_49356 ; 0x4931c -.asm_faa09 ; 0x4931e +	jr .asm_49356 +.asm_faa09  	ld bc,(MAGIKARP << 8) | 5  	call GivePokemon -	jr nc, .asm_49359 ; 0x49324 +	jr nc, .asm_49359  	xor a  	ld [wWhichTrade], a  	ld [wTrainerFacingDirection], a @@ -61,15 +61,15 @@ MtMoonPokecenterText4: ; 492ec (12:52ec)  	call DisplayTextBoxID  	ld hl, wd7c6  	set 7, [hl] -	jr .asm_49359 ; 0x4934c -.asm_4934e ; 0x4934e +	jr .asm_49359 +.asm_4934e  	ld hl, MtMoonPokecenterText_49361 -	jr .asm_49356 ; 0x49351 -.asm_49353 ; 0x49353 +	jr .asm_49356 +.asm_49353  	ld hl, MtMoonPokecenterText_4936b -.asm_49356 ; 0x49356 +.asm_49356  	call PrintText -.asm_49359 ; 0x49359 +.asm_49359  	jp TextScriptEnd  MtMoonPokecenterText_4935c: ; 4935c (12:535c) diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index cd2b3c29..2e5835d0 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -17,7 +17,7 @@ Museum1FScript0: ; 5c10d (17:410d)  	ret nz  	ld a, [W_XCOORD]  	cp $9 -	jr z, .asm_5c120 ; 0x5c118 $6 +	jr z, .asm_5c120  	ld a, [W_XCOORD]  	cp $a  	ret nz @@ -39,7 +39,7 @@ Museum1FTextPointers: ; 5c12b (17:412b)  	dw Museum1FText5  Museum1FText1: ; 5c135 (17:4135) -	db $8 +	TX_ASM  	ld a, [W_YCOORD]  	cp $4  	jr nz, .asm_8774b @@ -59,7 +59,7 @@ Museum1FText1: ; 5c135 (17:4135)  	jr nz, .asm_31a16  	ld hl, Museum1FText_5c23d  	call PrintText -	jp asm_d1145 +	jp Museum1FScriptEnd  .asm_b8709  	ld a, [wd754]  	bit 0, a @@ -67,7 +67,7 @@ Museum1FText1: ; 5c135 (17:4135)  .asm_31a16  	ld hl, Museum1FText_5c242  	call PrintText -	jp asm_d1145 +	jp Museum1FScriptEnd  .asm_3ded4  	ld a, $13  	ld [wTextBoxID], a @@ -112,7 +112,7 @@ Museum1FText1: ; 5c135 (17:4135)  	call WaitForSoundToFinish  	jr .asm_0b094  .asm_de133 -	ld hl, Museum1FText_5c21a ; $421a +	ld hl, Museum1FText_5c21a  	call PrintText  	ld a, $1  	ld [wSimulatedJoypadStatesIndex], a @@ -120,11 +120,11 @@ Museum1FText1: ; 5c135 (17:4135)  	ld [wSimulatedJoypadStatesEnd], a  	call StartSimulatingJoypadStates  	call UpdateSprites -	jr asm_d1145 +	jr Museum1FScriptEnd  .asm_0b094  	ld a, $1  	ld [W_MUSEUM1FCURSCRIPT], a -	jr asm_d1145 +	jr Museum1FScriptEnd  Museum1FScript_5c1f9: ; 5c1f9 (17:41f9)  	ld hl, Museum1FText_5c22e @@ -135,11 +135,11 @@ Museum1FScript_5c1f9: ; 5c1f9 (17:41f9)  	jr nz, .asm_d1144  	ld hl, Museum1FText_5c233  	call PrintText -	jr asm_d1145 +	jr Museum1FScriptEnd  .asm_d1144  	ld hl, Museum1FText_5c238  	call PrintText -asm_d1145: ; 5c217 (17:4217) +Museum1FScriptEnd: ; 5c217 (17:4217)  	jp TextScriptEnd  Museum1FText_5c21a: ; 5c21a (17:421a) @@ -179,7 +179,7 @@ Museum1FText_5c242: ; 5c242 (17:4242)  	db "@"  Museum1FText2: ; 5c247 (17:4247) -	db $08 ; asm +	TX_ASM  	ld hl, Museum1FText_5c251  	call PrintText  	jp TextScriptEnd @@ -189,10 +189,10 @@ Museum1FText_5c251: ; 5c251 (17:4251)  	db "@"  Museum1FText3: ; 5c256 (17:4256) -	db $08 ; asm +	TX_ASM  	ld a, [wd754]  	bit 1, a -	jr nz, .asm_16599 ; 0x5c25c +	jr nz, .asm_5c285  	ld hl, Museum1FText_5c28e  	call PrintText  	ld bc, (OLD_AMBER << 8) | 1 @@ -204,13 +204,13 @@ Museum1FText3: ; 5c256 (17:4256)  	ld [wcc4d], a  	predef HideObject  	ld hl, ReceivedOldAmberText -	jr .asm_52e0f ; 0x5c27e +	jr .asm_5c288  .BagFull  	ld hl, Museum1FText_5c29e -	jr .asm_52e0f ; 0x5c283 -.asm_16599 ; 0x5c285 +	jr .asm_5c288 +.asm_5c285  	ld hl, Museum1FText_5c299 -.asm_52e0f ; 0x5c288 +.asm_5c288  	call PrintText  	jp TextScriptEnd @@ -231,7 +231,7 @@ Museum1FText_5c29e: ; 5c29e (17:429e)  	db "@"  Museum1FText4: ; 5c2a3 (17:42a3) -	db $08 ; asm +	TX_ASM  	ld hl, Museum1FText_5c2ad  	call PrintText  	jp TextScriptEnd @@ -241,7 +241,7 @@ Museum1FText_5c2ad: ; 5c2ad (17:42ad)  	db "@"  Museum1FText5: ; 5c2b2 (17:42b2) -	db $08 ; asm +	TX_ASM  	ld hl, Museum1FText_5c2bc  	call PrintText  	jp TextScriptEnd diff --git a/scripts/namerater.asm b/scripts/namerater.asm index c9e3bfb4..010dc0cd 100755 --- a/scripts/namerater.asm +++ b/scripts/namerater.asm @@ -16,7 +16,7 @@ NameRaterScript_1da20: ; 1da20 (7:5a20)  	ld de, wPlayerName  	ld c, $b  	call .asm_1da47 -	jr c, .asm_1da52 ; 0x1da34 $1c +	jr c, .asm_1da52  	ld hl, wPartyMon1OTID  	ld bc, $002c  	ld a, [wWhichPokemon] @@ -26,11 +26,11 @@ NameRaterScript_1da20: ; 1da20 (7:5a20)  .asm_1da47  	ld a, [de]  	cp [hl] -	jr nz, .asm_1da52 ; 0x1da49 $7 +	jr nz, .asm_1da52  	inc hl  	inc de  	dec c -	jr nz, .asm_1da47 ; 0x1da4e $f7 +	jr nz, .asm_1da47  	and a  	ret  .asm_1da52 @@ -41,11 +41,11 @@ NameRaterTextPointers: ; 1da54 (7:5a54)  	dw NameRaterText1  NameRaterText1: ; 1da56 (7:5a56) -	db $8 +	TX_ASM  	call SaveScreenTilesToBuffer2  	ld hl, NameRaterText_1dab3  	call NameRaterScript_1da15 -	jr nz, .asm_1daae ; 0x1da60 $4c +	jr nz, .asm_1daae  	ld hl, NameRaterText_1dab8  	call PrintText  	xor a @@ -58,25 +58,25 @@ NameRaterText1: ; 1da56 (7:5a56)  	call RestoreScreenTilesAndReloadTilePatterns  	call LoadGBPal  	pop af -	jr c, .asm_1daae ; 0x1da80 $2c +	jr c, .asm_1daae  	call GetPartyMonName2  	call NameRaterScript_1da20  	ld hl, NameRaterText_1dad1 -	jr c, .asm_1daa8 ; 0x1da8b $1b +	jr c, .asm_1daa8  	ld hl, NameRaterText_1dabd  	call NameRaterScript_1da15 -	jr nz, .asm_1daae ; 0x1da93 $19 +	jr nz, .asm_1daae  	ld hl, NameRaterText_1dac2  	call PrintText  	callba Func_655c -	jr c, .asm_1daae ; 0x1daa3 $9 +	jr c, .asm_1daae  	ld hl, NameRaterText_1dac7  .asm_1daa8  	call PrintText  	jp TextScriptEnd  .asm_1daae  	ld hl, NameRaterText_1dacc -	jr .asm_1daa8 ; 0x1dab1 $f5 +	jr .asm_1daa8  NameRaterText_1dab3: ; 1dab3 (7:5ab3)  	TX_FAR _NameRaterText_1dab3 diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 8f23cd3e..ceb8a761 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -194,17 +194,17 @@ OaksLabScript7: ; 1cc72 (7:4c72)  OaksLabScript8: ; 1cc80 (7:4c80)  	ld a, [W_PLAYERSTARTER]  	cp STARTER1 -	jr z, .Charmander ; 0x1cc85 $6 +	jr z, .Charmander  	cp STARTER2 -	jr z, .Squirtle ; 0x1cc89 $1d -	jr .Bulbasaur ; 0x1cc8b $38 +	jr z, .Squirtle +	jr .Bulbasaur  .Charmander  	ld de, .MiddleBallMovement1  	ld a, [W_YCOORD]  	cp $4 ; is the player standing below the table? -	jr z, .asm_1ccf3 ; 0x1cc95 $5c +	jr z, .asm_1ccf3  	ld de, .MiddleBallMovement2 -	jr .asm_1ccf3 ; 0x1cc9a $57 +	jr .asm_1ccf3  .MiddleBallMovement1  	db 0,0,$C0,$C0,$C0,$40,$FF @@ -215,9 +215,9 @@ OaksLabScript8: ; 1cc80 (7:4c80)  	ld de, .RightBallMovement1  	ld a, [W_YCOORD]  	cp $4 ; is the player standing below the table? -	jr z, .asm_1ccf3 ; 0x1ccb0 $41 +	jr z, .asm_1ccf3  	ld de, .RightBallMovement2 -	jr .asm_1ccf3 ; 0x1ccb5 $3c +	jr .asm_1ccf3  .RightBallMovement1  	db 0,0,$C0,$C0,$C0,$C0,$40,$FF @@ -228,7 +228,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)  	ld de, .LeftBallMovement1  	ld a, [W_XCOORD]  	cp $9 ; is the player standing to the right of the table? -	jr nz, .asm_1ccf3 ; 0x1cccd $24 +	jr nz, .asm_1ccf3  	push hl  	ld a, $1  	ld [H_SPRITEINDEX], a @@ -247,7 +247,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)  	ld [hl], $9  	ld de, .LeftBallMovement2 ; the rival is not currently onscreen, so account for that  	pop hl -	jr .asm_1ccf3 ; 0x1cced $4 +	jr .asm_1ccf3  .LeftBallMovement1  	db $00,$C0 ; not yet terminated! @@ -279,14 +279,14 @@ OaksLabScript9: ; 1cd00 (7:4d00)  	call DisplayTextID  	ld a, [wTrainerEngageDistance]  	cp $2 -	jr nz, .asm_1cd28 ; 0x1cd22 $4 +	jr nz, .asm_1cd28  	ld a, HS_STARTER_BALL_1 -	jr .asm_1cd32 ; 0x1cd26 $a +	jr .asm_1cd32  .asm_1cd28  	cp $3 -	jr nz, .asm_1cd30 ; 0x1cd2a $4 +	jr nz, .asm_1cd30  	ld a, HS_STARTER_BALL_2 -	jr .asm_1cd32 ; 0x1cd2e $2 +	jr .asm_1cd32  .asm_1cd30  	ld a, HS_STARTER_BALL_3  .asm_1cd32 @@ -328,7 +328,7 @@ OaksLabScript10: ; 1cd6d (7:4d6d)  	ld [wd528], a  	ld c, BANK(Music_MeetRival)  	ld a, MUSIC_MEET_RIVAL -	call PlayMusic ; play music +	call PlayMusic  	ld a, $f  	ld [$ff8c], a  	call DisplayTextID @@ -361,14 +361,14 @@ OaksLabScript11: ; 1cdb9 (7:4db9)  	ld [W_CUROPPONENT], a  	ld a, [W_RIVALSTARTER]  	cp STARTER2 -	jr nz, .NotSquirtle ; 0x1cdc9 $4 +	jr nz, .NotSquirtle  	ld a, $1 -	jr .done ; 0x1cdcd $a +	jr .done  .NotSquirtle  	cp STARTER3 -	jr nz, .Charmander ; 0x1cdd1 $4 +	jr nz, .Charmander  	ld a, $2 -	jr .done ; 0x1cdd5 $2 +	jr .done  .Charmander  	ld a, $3  .done @@ -413,7 +413,7 @@ OaksLabScript12: ; 1ce03 (7:4e03)  	ret  OaksLabScript13: ; 1ce32 (7:4e32) -	ld c, $14 +	ld c, 20  	call DelayFrames  	ld a, $10  	ld [$ff8c], a @@ -426,9 +426,9 @@ OaksLabScript13: ; 1ce32 (7:4e32)  	ld a, [W_XCOORD]  	cp $4  	; move left or right depending on where the player is standing -	jr nz, .asm_1ce5b ; 0x1ce55 $4 +	jr nz, .asm_1ce5b  	ld a, $c0 -	jr .asm_1ce5d ; 0x1ce59 $2 +	jr .asm_1ce5d  .asm_1ce5b  	ld a, $80  .asm_1ce5d @@ -444,7 +444,7 @@ OaksLabScript13: ; 1ce32 (7:4e32)  OaksLabScript14: ; 1ce6d (7:4e6d)  	ld a, [wd730]  	bit 0, a -	jr nz, .asm_1ce8c ; 0x1ce72 $18 +	jr nz, .asm_1ce8c  	ld a, HS_OAKS_LAB_RIVAL  	ld [wcc4d], a  	predef HideObject @@ -453,21 +453,21 @@ OaksLabScript14: ; 1ce6d (7:4e6d)  	call PlayDefaultMusic ; reset to map music  	ld a, $12  	ld [W_OAKSLABCURSCRIPT], a -	jr .done ; 0x1ce8a $23 +	jr .done  .asm_1ce8c  	ld a, [wcf0f]  	cp $5 -	jr nz, .asm_1cea8 ; 0x1ce91 $15 +	jr nz, .asm_1cea8  	ld a, [W_XCOORD]  	cp $4 -	jr nz, .asm_1cea1 ; 0x1ce98 $7 +	jr nz, .asm_1cea1  	ld a, $c  	ld [wSpriteStateData1 + 9], a -	jr .done ; 0x1ce9f $e +	jr .done  .asm_1cea1  	ld a, $8  	ld [wSpriteStateData1 + 9], a -	jr .done ; 0x1cea6 $7 +	jr .done  .asm_1cea8  	cp $4  	ret nz @@ -508,7 +508,7 @@ OaksLabScript15: ; 1ceb0 (7:4eb0)  	ld [W_OAKSLABCURSCRIPT], a  	ret -OaksLabScript_1cefd ; 1cefd (7:4efd) +OaksLabScript_1cefd: ; 1cefd (7:4efd)  	ld a, $1  	ld [H_SPRITEINDEX], a  	ld a, $4 @@ -631,10 +631,10 @@ OaksLabScript_1d00a: ; 1d00a (7:500a)  	cp $ff  	ret z  	cp OAKS_PARCEL -	jr z, .GotParcel ; 0x1d016 $4 +	jr z, .GotParcel  	inc hl  	inc c -	jr .asm_1d010 ; 0x1d01a $f4 +	jr .asm_1d010  .GotParcel  	ld hl, wNumBagItems  	ld a, c @@ -650,29 +650,29 @@ OaksLabScript_1d02b: ; 1d02b (7:502b)  	ld [$ffee], a  	ld a, [W_YCOORD]  	cp $3 -	jr nz, .asm_1d045 ; 0x1d038 $b +	jr nz, .asm_1d045  	ld a, $4  	ld [wNPCMovementDirections2Index], a  	ld a, $30  	ld b, $b -	jr .asm_1d068 ; 0x1d043 $23 +	jr .asm_1d068  .asm_1d045  	cp $1 -	jr nz, .asm_1d054 ; 0x1d047 $b +	jr nz, .asm_1d054  	ld a, $2  	ld [wNPCMovementDirections2Index], a  	ld a, $30  	ld b, $9 -	jr .asm_1d068 ; 0x1d052 $14 +	jr .asm_1d068  .asm_1d054  	ld a, $3  	ld [wNPCMovementDirections2Index], a  	ld b, $a  	ld a, [W_XCOORD]  	cp $4 -	jr nz, .asm_1d066 ; 0x1d060 $4 +	jr nz, .asm_1d066  	ld a, $40 -	jr .asm_1d068 ; 0x1d064 $2 +	jr .asm_1d068  .asm_1d066  	ld a, $20  .asm_1d068 @@ -685,7 +685,7 @@ OaksLabScript_1d02b: ; 1d02b (7:502b)  	ret  OaksLabScript_1d076: ; 1d076 (7:5076) -	ld hl, OaksLabTextPointers + $36 ; $50b8 ; starts at OaksLabText28 +	ld hl, OaksLabTextPointers + $36 ; starts at OaksLabText28  	ld a, l  	ld [W_MAPTEXTPTR], a  	ld a, h @@ -734,23 +734,23 @@ OaksLabTextPointers: ; 1d082 (7:5082)  OaksLabText28: ; 1d0ce (7:50ce)  OaksLabText1: ; 1d0ce (7:50ce) -	db $08 ; asm +	TX_ASM  	ld a, [wd74b]  	bit 0, a -	jr nz, .asm_1d0de ; 0x1d0d4 +	jr nz, .asm_1d0de  	ld hl, OaksLabGaryText1  	call PrintText -	jr .asm_1d0f0 ; 0x1d0dc -.asm_1d0de ; 0x1d0de +	jr .asm_1d0f0 +.asm_1d0de  	bit 2, a -	jr nz, .asm_1d0ea ; 0x1d0e0 +	jr nz, .asm_1d0ea  	ld hl, OaksLabText40  	call PrintText -	jr .asm_1d0f0 ; 0x1d0e8 -.asm_1d0ea ; 0x1d0ea +	jr .asm_1d0f0 +.asm_1d0ea  	ld hl, OaksLabText41  	call PrintText -.asm_1d0f0 ; 0x1d0f0 +.asm_1d0f0  	jp TextScriptEnd  OaksLabGaryText1: ; 1d0f3 (7:50f3) @@ -767,29 +767,29 @@ OaksLabText41: ; 1d0fd (7:50fd)  OaksLabText29: ; 1d102 (7:5102)  OaksLabText2: ; 1d102 (7:5102) -	db $8 +	TX_ASM  	ld a, STARTER2  	ld [wWhichTrade], a  	ld a, $3  	ld [wTrainerEngageDistance], a  	ld a, STARTER1  	ld b, $2 -	jr OaksLabScript_1d133 ; 0x1d111 $20 +	jr OaksLabScript_1d133  OaksLabText30: ; 1d113 (7:5113)  OaksLabText3: ; 1d113 (7:5113) -	db $8 +	TX_ASM  	ld a, STARTER3  	ld [wWhichTrade], a  	ld a, $4  	ld [wTrainerEngageDistance], a  	ld a, STARTER2  	ld b, $3 -	jr OaksLabScript_1d133 ; 0x1d122 $f +	jr OaksLabScript_1d133  OaksLabText31: ; 1d124 (7:5124)  OaksLabText4: ; 1d124 (7:5124) -	db $8 +	TX_ASM  	ld a, STARTER1  	ld [wWhichTrade], a  	ld a, $2 @@ -806,7 +806,7 @@ OaksLabScript_1d133: ; 1d133 (7:5133)  	bit 2, a  	jp nz, OaksLabScript_1d22d  	bit 1, a -	jr nz, OaksLabScript_1d157 ; 0x1d147 $e +	jr nz, OaksLabScript_1d157  	ld hl, OaksLabText39  	call PrintText  	jp TextScriptEnd @@ -822,7 +822,6 @@ OaksLabScript_1d157: ; 1d157 (7:5157)  	ld [$ff8b], a  	call GetPointerWithinSpriteStateData1  	ld [hl], $0 -	; manually fixed some disassembler issues around here  	ld a, $1  	ld [H_SPRITEINDEX], a  	ld a, $9 @@ -835,7 +834,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157)  	ld hl, wd730  	res 6, [hl]  	call ReloadMapData -	ld c, $a +	ld c, 10  	call DelayFrames  	ld a, [wSpriteIndex]  	cp $2 @@ -844,7 +843,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157)  	jr z, OaksLabLookAtSquirtle  	jr OaksLabLookAtBulbasaur -OaksLabLookAtCharmander ; 0x1d195 +OaksLabLookAtCharmander: ; 1d195 (7:5195)  	ld hl, OaksLabCharmanderText  	jr OaksLabMonChoiceMenu  OaksLabCharmanderText: ; 1d19a (7:519a) @@ -879,17 +878,17 @@ OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3)  	call GetMonName  	ld a, [wSpriteIndex]  	cp $2 -	jr nz, asm_1d1db ; 0x1d1d5 $4 +	jr nz, .asm_1d1db  	ld a, HS_STARTER_BALL_1 -	jr asm_1d1e5 ; 0x1d1d9 $a -asm_1d1db: ; 1d1db (7:51db) +	jr .asm_1d1e5 +.asm_1d1db  	cp $3 -	jr nz, asm_1d1e3 ; 0x1d1dd $4 +	jr nz, .asm_1d1e3  	ld a, HS_STARTER_BALL_2 -	jr asm_1d1e5 ; 0x1d1e1 $2 -asm_1d1e3: ; 1d1e3 (7:51e3) +	jr .asm_1d1e5 +.asm_1d1e3  	ld a, HS_STARTER_BALL_3 -asm_1d1e5: ; 1d1e5 (7:51e5) +.asm_1d1e5  	ld [wcc4d], a  	predef HideObject  	ld a, $1 @@ -939,80 +938,80 @@ OaksLabLastMonText: ; 1d243 (7:5243)  OaksLabText32: ; 1d248 (7:5248)  OaksLabText5: ; 1d248 (7:5248) -	db $08 ; asm +	TX_ASM  	ld a, [wd747]  	bit 6, a -	jr nz, .asm_50e81 ; 0x1d24e +	jr nz, .asm_1d266  	ld hl, wPokedexOwned  	ld b, wPokedexOwnedEnd - wPokedexOwned  	call CountSetBits  	ld a, [wd11e]  	cp $2 -	jr c, .asm_b28b0 ; 0x1d25d +	jr c, .asm_1d279  	ld a, [wd74b]  	bit 5, a -	jr z, .asm_b28b0 ; 0x1d264 -.asm_50e81 ; 0x1d266 +	jr z, .asm_1d279 +.asm_1d266  	ld hl, OaksLabText_1d31d  	call PrintText  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	predef DisplayDexRating -	jp .asm_0f042 -.asm_b28b0 ; 0x1d279 +	jp .asm_1d2ed +.asm_1d279  	ld b,POKE_BALL  	call IsItemInBag -	jr nz, .asm_17c30 ; 0x1d27e +	jr nz, .asm_1d2e7  	ld a, [wd7eb]  	bit 5, a -	jr nz, .asm_f1adc ; 0x1d285 +	jr nz, .asm_1d2d0  	ld a, [wd74b]  	bit 5, a -	jr nz, .asm_333a2 ; 0x1d28c +	jr nz, .asm_1d2c8  	bit 3, a -	jr nz, .asm_76269 ; 0x1d290 +	jr nz, .asm_1d2a9  	ld a, [wd72e]  	bit 3, a -	jr nz, .asm_4a5e0 ; 0x1d297 +	jr nz, .asm_1d2a1  	ld hl, OaksLabText_1d2f0  	call PrintText -	jr .asm_0f042 ; 0x1d29f -.asm_4a5e0 ; 0x1d2a1 +	jr .asm_1d2ed +.asm_1d2a1  	ld hl, OaksLabText_1d2f5  	call PrintText -	jr .asm_0f042 ; 0x1d2a7 -.asm_76269 ; 0x1d2a9 +	jr .asm_1d2ed +.asm_1d2a9  	ld b, OAKS_PARCEL  	call IsItemInBag -	jr nz, .asm_a8fcf ; 0x1d2ae +	jr nz, .asm_1d2b8  	ld hl, OaksLabText_1d2fa  	call PrintText -	jr .asm_0f042 ; 0x1d2b6 -.asm_a8fcf ; 0x1d2b8 +	jr .asm_1d2ed +.asm_1d2b8  	ld hl, OaksLabDeliverParcelText  	call PrintText  	call OaksLabScript_1d00a  	ld a, $f  	ld [W_OAKSLABCURSCRIPT], a -	jr .asm_0f042 ; 0x1d2c6 -.asm_333a2 ; 0x1d2c8 +	jr .asm_1d2ed +.asm_1d2c8  	ld hl, OaksLabAroundWorldText  	call PrintText -	jr .asm_0f042 ; 0x1d2ce -.asm_f1adc ; 0x1d2d0 +	jr .asm_1d2ed +.asm_1d2d0  	ld hl, wd74b  	bit 4, [hl]  	set 4, [hl] -	jr nz, .asm_17c30 ; 0x1d2d7 +	jr nz, .asm_1d2e7  	ld bc, (POKE_BALL << 8) | 5  	call GiveItem  	ld hl, OaksLabGivePokeballsText  	call PrintText -	jr .asm_0f042 ; 0x1d2e5 -.asm_17c30 ; 0x1d2e7 +	jr .asm_1d2ed +.asm_1d2e7  	ld hl, OaksLabPleaseVisitText  	call PrintText -.asm_0f042 ; 0x1d2ed +.asm_1d2ed  	jp TextScriptEnd  OaksLabText_1d2f0: ; 1d2f0 (7:52f0) @@ -1055,7 +1054,7 @@ OaksLabText34: ; 1d322 (7:5322)  OaksLabText33: ; 1d322 (7:5322)  OaksLabText7: ; 1d322 (7:5322)  OaksLabText6: ; 1d322 (7:5322) -	db $08 ; asm +	TX_ASM  	ld hl, OaksLabText_1d32c  	call PrintText  	jp TextScriptEnd @@ -1071,7 +1070,7 @@ OaksLabText8: ; 1d331 (7:5331)  OaksLabText36: ; 1d336 (7:5336)  OaksLabText9: ; 1d336 (7:5336) -	db $08 ; asm +	TX_ASM  	ld hl, OaksLabText_1d340  	call PrintText  	jp TextScriptEnd @@ -1081,7 +1080,7 @@ OaksLabText_1d340: ; 1d340 (7:5340)  	db "@"  OaksLabText17: ; 1d345 (7:5345) -	db $8 +	TX_ASM  	ld hl, OaksLabRivalWaitingText  	call PrintText  	jp TextScriptEnd @@ -1091,7 +1090,7 @@ OaksLabRivalWaitingText: ; 1d34f (7:534f)  	db "@"  OaksLabText18: ; 1d354 (7:5354) -	db $8 +	TX_ASM  	ld hl, OaksLabChooseMonText  	call PrintText  	jp TextScriptEnd @@ -1101,7 +1100,7 @@ OaksLabChooseMonText: ; 1d35e (7:535e)  	db "@"  OaksLabText19: ; 1d363 (7:5363) -	db $8 +	TX_ASM  	ld hl, OaksLabRivalInterjectionText  	call PrintText  	jp TextScriptEnd @@ -1111,7 +1110,7 @@ OaksLabRivalInterjectionText: ; 1d36d (7:536d)  	db "@"  OaksLabText20: ; 1d372 (7:5372) -	db $8 +	TX_ASM  	ld hl, OaksLabBePatientText  	call PrintText  	jp TextScriptEnd @@ -1121,7 +1120,7 @@ OaksLabBePatientText: ; 1d37c (7:537c)  	db "@"  OaksLabText12: ; 1d381 (7:5381) -	db $8 +	TX_ASM  	ld hl, OaksLabLeavingText  	call PrintText  	jp TextScriptEnd @@ -1131,7 +1130,7 @@ OaksLabLeavingText: ; 1d38b (7:538b)  	db "@"  OaksLabText13: ; 1d390 (7:5390) -	db $8 +	TX_ASM  	ld hl, OaksLabRivalPickingMonText  	call PrintText  	jp TextScriptEnd @@ -1141,7 +1140,7 @@ OaksLabRivalPickingMonText: ; 1d39a (7:539a)  	db "@"  OaksLabText14: ; 1d39f (7:539f) -	db $8 +	TX_ASM  	ld hl, OaksLabRivalReceivedMonText  	call PrintText  	jp TextScriptEnd @@ -1151,7 +1150,7 @@ OaksLabRivalReceivedMonText: ; 1d3a9 (7:53a9)  	db $11, "@"  OaksLabText15: ; 1d3af (7:53af) -	db $8 +	TX_ASM  	ld hl, OaksLabRivalChallengeText  	call PrintText  	jp TextScriptEnd @@ -1169,7 +1168,7 @@ OaksLabText_1d3c3: ; 1d3c3 (7:53c3)  	db "@"  OaksLabText16: ; 1d3c8 (7:53c8) -	db $8 +	TX_ASM  	ld hl, OaksLabRivalToughenUpText  	call PrintText  	jp TextScriptEnd @@ -1210,7 +1209,7 @@ OaksLabText38: ; 1d3fb (7:53fb)  OaksLabText37: ; 1d3fb (7:53fb)  OaksLabText11: ; 1d3fb (7:53fb)  OaksLabText10: ; 1d3fb (7:53fb) -	db $08 ; asm +	TX_ASM  	ld hl, OaksLabText_1d405  	call PrintText  	jp TextScriptEnd diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index c43b9682..c615107c 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -35,7 +35,7 @@ PalletTownScript0: ; 18e81 (6:4e81)  	ld a, BANK(Music_MeetProfOak)  	ld c,a ; song bank  	ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music -	call PlayMusic ; plays music +	call PlayMusic  	ld a,$FC  	ld [wJoyIgnore],a  	ld hl,wd74b diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm index 55369df9..469cdfe7 100755 --- a/scripts/pewtercity.asm +++ b/scripts/pewtercity.asm @@ -72,7 +72,7 @@ PewterCityScript1: ; 19280 (6:5280)  	call SetSpritePosition1  	ld a, $3  	ld [$ff8c], a -	ld de, MovementData_PewterMuseumGuyExit ; $52ce +	ld de, MovementData_PewterMuseumGuyExit  	call MoveSprite  	ld a, $2  	ld [W_PEWTERCITYCURSCRIPT], a @@ -194,33 +194,33 @@ PewterCityText2: ; 193ac (6:53ac)  	db "@"  PewterCityText3: ; 193b1 (6:53b1) -	db $08 ; asm +	TX_ASM  	ld hl, PewterCityText_193f1  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_f46a9 ; 0x193bf +	jr nz, .asm_193c9  	ld hl, PewterCityText_193f6  	call PrintText -	jr .asm_ac429 ; 0x193c7 -.asm_f46a9 ; 0x193c9 +	jr .asm_193ee +.asm_193c9  	ld hl, PewterCityText_193fb  	call PrintText  	xor a -	ldh [$b3], a -	ldh [$b4], a +	ld [hJoyPressed], a +	ld [hJoyHeld], a  	ld [wNPCMovementScriptFunctionNum], a  	ld a, $2  	ld [wNPCMovementScriptPointerTableNum], a -	ldh a, [$b8] +	ld a, [H_LOADEDROMBANK]  	ld [wNPCMovementScriptBank], a  	ld a, $3  	ld [wSpriteIndex], a  	call GetSpritePosition2  	ld a, $1  	ld [W_PEWTERCITYCURSCRIPT], a -.asm_ac429 ; 0x193ee +.asm_193ee  	jp TextScriptEnd  PewterCityText_193f1: ; 193f1 (6:53f1) @@ -240,20 +240,20 @@ PewterCityText13: ; 19400 (6:5400)  	db "@"  PewterCityText4: ; 19405 (6:5405) -	db $8 +	TX_ASM  	ld hl, PewterCityText_19427  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	cp $0 -	jr nz, .asm_e4603 +	jr nz, .asm_1941e  	ld hl, PewterCityText_1942c  	call PrintText -	jr .asm_e4604 ; 0x1941c $6 -.asm_e4603 +	jr .asm_19424 +.asm_1941e  	ld hl, PewterCityText_19431  	call PrintText -.asm_e4604 ; 0x19424 +.asm_19424  	jp TextScriptEnd  PewterCityText_19427: ; 19427 (6:5427) @@ -269,15 +269,15 @@ PewterCityText_19431: ; 19431 (6:5431)  	db "@"  PewterCityText5: ; 19436 (6:5436) -	db $08 ; asm +	TX_ASM  	ld hl, PewterCityText_1945d  	call PrintText  	xor a -	ldh [$b4], a +	ld [hJoyHeld], a  	ld [wNPCMovementScriptFunctionNum], a  	ld a, $3  	ld [wNPCMovementScriptPointerTableNum], a -	ldh a, [$b8] +	ld a, [H_LOADEDROMBANK]  	ld [wNPCMovementScriptBank], a  	ld a, $5  	ld [wSpriteIndex], a diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm index 9f9c7c3b..f4b2ad28 100755 --- a/scripts/pewtergym.asm +++ b/scripts/pewtergym.asm @@ -12,8 +12,8 @@ PewterGymScript: ; 5c387 (17:4387)  	ret  PewterGymScript_5c3a4: ; 5c3a4 (17:43a4) -	ld hl, Gym1CityName ; $43ad -	ld de, Gym1LeaderName ; $43b9 +	ld hl, Gym1CityName +	ld de, Gym1LeaderName  	jp LoadGymLeaderAndCityName  Gym1CityName: ; 5c3ad (17:43ad) @@ -36,7 +36,7 @@ PewterGymScriptPointers: ; 5c3ca (17:43ca)  	dw PewterGymScript3  PewterGymScript3: ; 5c3d2 (17:43d2) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, PewterGymScript_5c3bf  	ld a, $f0 @@ -44,7 +44,7 @@ PewterGymScript3: ; 5c3d2 (17:43d2)  PewterGymScript_5c3df: ; 5c3df (17:43df)  	ld a, $4 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd755  	set 7, [hl] @@ -52,14 +52,14 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)  	call GiveItem  	jr nc, .BagFull  	ld a, $5 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd755  	set 6, [hl]  	jr .asm_5c408  .BagFull  	ld a, $6 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_5c408  	ld hl, W_OBTAINEDBADGES @@ -97,28 +97,28 @@ PewterGymTrainerHeader0: ; 5c441 (17:4441)  	db $2 ; flag's bit  	db ($5 << 4) ; trainer's view range  	dw wd755 ; flag's byte -	dw PewterGymBattleText1 ; 0x44d0 TextBeforeBattle -	dw PewterGymAfterBattleText1 ; 0x44da TextAfterBattle -	dw PewterGymEndBattleText1 ; 0x44d5 TextEndBattle -	dw PewterGymEndBattleText1 ; 0x44d5 TextEndBattle +	dw PewterGymBattleText1 ; TextBeforeBattle +	dw PewterGymAfterBattleText1 ; TextAfterBattle +	dw PewterGymEndBattleText1 ; TextEndBattle +	dw PewterGymEndBattleText1 ; TextEndBattle  	db $ff  PewterGymText1: ; 5c44e (17:444e) -	db $08 ; asm +	TX_ASM  	ld a, [wd755]  	bit 7, a -	jr z, .asm_4a735 ; 0x5c454 +	jr z, .asm_5c46a  	bit 6, a -	jr nz, .asm_ff7d0 ; 0x5c458 +	jr nz, .asm_5c462  	call z, PewterGymScript_5c3df  	call DisableWaitingAfterTextDisplay -	jr .asm_e0ffb ; 0x5c460 -.asm_ff7d0 ; 0x5c462 +	jr .asm_5c49b +.asm_5c462  	ld hl, PewterGymText_5c4a3  	call PrintText -	jr .asm_e0ffb ; 0x5c468 -.asm_4a735 ; 0x5c46a +	jr .asm_5c49b +.asm_5c46a  	ld hl, PewterGymText_5c49e  	call PrintText  	ld hl, wd72d @@ -127,18 +127,18 @@ PewterGymText1: ; 5c44e (17:444e)  	ld hl, PewterGymText_5c4bc  	ld de, PewterGymText_5c4bc  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	ld a, $1  	ld [W_GYMLEADERNO], a  	xor a -	ldh [$b4], a +	ld [hJoyHeld], a  	ld a, $3  	ld [W_PEWTERGYMCURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -.asm_e0ffb ; 0x5c49b +.asm_5c49b  	jp TextScriptEnd  PewterGymText_5c49e: ; 5c49e (17:449e) @@ -170,7 +170,7 @@ PewterGymText_5c4bc: ; 5c4bc (17:44bc)  	db "@"  PewterGymText2: ; 5c4c6 (17:44c6) -	db $08 ; asm +	TX_ASM  	ld hl, PewterGymTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -188,30 +188,30 @@ PewterGymAfterBattleText1: ; 5c4da (17:44da)  	db "@"  PewterGymText3: ; 5c4df (17:44df) -	db $08 ; asm +	TX_ASM  	ld a, [wd72a]  	bit 0, a -	jr nz, .asm_71369 ; 0x5c4e5 +	jr nz, .asm_5c50c  	ld hl, PewterGymText_5c515  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_6123a ; 0x5c4f4 +	jr nz, .asm_5c4fe  	ld hl, PewterGymText_5c51a  	call PrintText -	jr .asm_d1578 ; 0x5c4fc -.asm_6123a ; 0x5c4fe +	jr .asm_5c504 +.asm_5c4fe  	ld hl, PewterGymText_5c524  	call PrintText -.asm_d1578 ; 0x5c504 +.asm_5c504  	ld hl, PewterGymText_5c51f  	call PrintText -	jr .asm_07013 ; 0x5c50a -.asm_71369 ; 0x5c50c +	jr .asm_5c512 +.asm_5c50c  	ld hl, PewterGymText_5c529  	call PrintText -.asm_07013 ; 0x5c512 +.asm_5c512  	jp TextScriptEnd  PewterGymText_5c515: ; 5c515 (17:4515) diff --git a/scripts/pewterhouse1.asm b/scripts/pewterhouse1.asm index 05d27a14..a670f23c 100755 --- a/scripts/pewterhouse1.asm +++ b/scripts/pewterhouse1.asm @@ -8,7 +8,7 @@ PewterHouse1TextPointers: ; 1d5f6 (7:55f6)  PewterHouse1Text1: ; 1d5fc (7:55fc)  	TX_FAR _PewterHouse1Text1 -	db $08 ; asm +	TX_ASM  	ld a, NIDORAN_M  	call PlayCry  	call WaitForSoundToFinish diff --git a/scripts/pewtermart.asm b/scripts/pewtermart.asm index 8fe99d94..62831d1b 100755 --- a/scripts/pewtermart.asm +++ b/scripts/pewtermart.asm @@ -10,7 +10,7 @@ PewterMartTextPointers: ; 74cb6 (1d:4cb6)  	dw PewterMartText3  PewterMartText2: ; 74cbc (1d:4cbc) -	db $08 ; asm +	TX_ASM  	ld hl, PewterMartText_74cc6  	call PrintText  	jp TextScriptEnd @@ -20,7 +20,7 @@ PewterMartText_74cc6: ; 74cc6 (1d:4cc6)  	db "@"  PewterMartText3: ; 74ccb (1d:4ccb) -	db $08 ; asm +	TX_ASM  	ld hl, PewterMartText_74cd5  	call PrintText  	jp TextScriptEnd diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm index 1f3cabe0..42bc3086 100755 --- a/scripts/pewterpokecenter.asm +++ b/scripts/pewterpokecenter.asm @@ -16,16 +16,16 @@ PewterPokecenterText2: ; 5c596 (17:4596)  	db "@"  PewterPokecenterText3: ; 5c59b (17:459b) -	db $8 +	TX_ASM  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, PewterPokecenterText5  	call PrintText  	ld a, $ff  	call PlaySound -	ld c, $20 +	ld c, 32  	call DelayFrames -	ld hl, Unknown_5c608 ; $4608 +	ld hl, JigglypuffFacingDirections  	ld de, wTrainerFacingDirection  	ld bc, $0004  	call CopyData @@ -34,7 +34,7 @@ PewterPokecenterText3: ; 5c59b (17:459b)  .asm_5c5c3  	cp [hl]  	inc hl -	jr nz, .asm_5c5c3 ; 0x5c5c5 $fc +	jr nz, .asm_5c5c3  	dec hl  	push hl  	ld c, BANK(Music_JigglypuffSong) @@ -52,14 +52,14 @@ PewterPokecenterText3: ; 5c59b (17:459b)  	ld a, [wTrainerEngageDistance]  	ld [wcd42], a  	pop hl -	ld c, $18 +	ld c, 24  	call DelayFrames  	ld a, [wc026]  	ld b, a  	ld a, [wc027]  	or b -	jr nz, .asm_5c5d1 ; 0x5c5f6 $d9 -	ld c, $30 +	jr nz, .asm_5c5d1 +	ld c, 48  	call DelayFrames  	call PlayDefaultMusic  	jp TextScriptEnd @@ -68,8 +68,11 @@ PewterPokecenterText5: ; 5c603 (17:4603)  	TX_FAR _PewterPokecenterText5  	db "@" -Unknown_5c608: ; 5c608 (17:4608) -	db $30, $38, $34, $3c +JigglypuffFacingDirections: ; 5c608 (17:4608) +	db $30 | SPRITE_FACING_DOWN +	db $30 | SPRITE_FACING_LEFT +	db $30 | SPRITE_FACING_UP +	db $30 | SPRITE_FACING_RIGHT  PewterPokecenterText4: ; 5c60c (17:460c)  	db $f6 diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm index dc9275f2..cd86a494 100755 --- a/scripts/pokemontower2.asm +++ b/scripts/pokemontower2.asm @@ -20,7 +20,7 @@ PokemonTower2Script0: ; 6050f (18:450f)  	ld a, [wd764]  	bit 7, a  	ret nz -	ld hl, CoordsData_6055e ; $455e +	ld hl, CoordsData_6055e  	call ArePlayerCoordsInArray  	ret nc  	ld a, $ff @@ -35,7 +35,7 @@ PokemonTower2Script0: ; 6050f (18:450f)  	cp $1  	ld a, $8  	ld b, $0 -	jr nz, .asm_60544 ; 0x60539 $9 +	jr nz, .asm_60544  	ld hl, wd764  	set 6, [hl]  	ld a, $2 @@ -74,7 +74,7 @@ PokemonTower2Script1: ; 60563 (18:4563)  	ld de, MovementData_605b2  	ld a, [wd764]  	bit 6, a -	jr nz, .asm_60589 ; 0x60584 $3 +	jr nz, .asm_60589  	ld de, MovementData_605a9  .asm_60589  	ld a, $1 @@ -115,21 +115,21 @@ PokemonTower2TextPointers: ; 605db (18:45db)  	dw PokemonTower2Text2  PokemonTower2Text1: ; 605df (18:45df) -	db $08 ; asm +	TX_ASM  	ld a, [wd764]  	bit 7, a -	jr z, .asm_16f24 ; 0x605e5 +	jr z, .asm_16f24  	ld hl, PokemonTower2Text_6063c  	call PrintText -	jr .asm_41852 ; 0x605ed -.asm_16f24 ; 0x605ef +	jr .asm_41852 +.asm_16f24  	ld hl, PokemonTower2Text_6062d  	call PrintText  	ld hl, wd72d  	set 6, [hl]  	set 7, [hl]  	ld hl, PokemonTower2Text_60632 -	ld de, PokemonTower2Text_60637 ; XXX $4637 +	ld de, PokemonTower2Text_60637  	call SaveEndBattleTextPointers  	ld a, SONY2 + $c8  	ld [W_CUROPPONENT], a @@ -137,15 +137,15 @@ PokemonTower2Text1: ; 605df (18:45df)  	; select which team to use during the encounter  	ld a, [W_RIVALSTARTER]  	cp STARTER2 -	jr nz, .NotSquirtle ; 0x6060f +	jr nz, .NotSquirtle  	ld a, $4  	jr .done -.NotSquirtle ; 0x60615 +.NotSquirtle  	cp STARTER3 -	jr nz, .Charmander ; 0x60617 +	jr nz, .Charmander  	ld a, $5  	jr .done -.Charmander ; 0x6061d +.Charmander  	ld a, $6  .done  	ld [W_TRAINERNO], a @@ -153,7 +153,7 @@ PokemonTower2Text1: ; 605df (18:45df)  	ld a, $1  	ld [W_POKEMONTOWER2CURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -.asm_41852 ; 0x6062a +.asm_41852  	jp TextScriptEnd  PokemonTower2Text_6062d: ; 6062d (18:462d) diff --git a/scripts/pokemontower3.asm b/scripts/pokemontower3.asm index 8df5bfc5..2cf58381 100755 --- a/scripts/pokemontower3.asm +++ b/scripts/pokemontower3.asm @@ -23,44 +23,44 @@ PokemonTower3TrainerHeader0: ; 606ed (18:46ed)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd765 ; flag's byte -	dw PokemonTower3BattleText1 ; 0x4730 TextBeforeBattle -	dw PokemonTower3AfterBattleText1 ; 0x473a TextAfterBattle -	dw PokemonTower3EndBattleText1 ; 0x4735 TextEndBattle -	dw PokemonTower3EndBattleText1 ; 0x4735 TextEndBattle +	dw PokemonTower3BattleText1 ; TextBeforeBattle +	dw PokemonTower3AfterBattleText1 ; TextAfterBattle +	dw PokemonTower3EndBattleText1 ; TextEndBattle +	dw PokemonTower3EndBattleText1 ; TextEndBattle  PokemonTower3TrainerHeader1: ; 606f9 (18:46f9)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd765 ; flag's byte -	dw PokemonTower3BattleText2 ; 0x473f TextBeforeBattle -	dw PokemonTower3AfterBattleText2 ; 0x4749 TextAfterBattle -	dw PokemonTower3EndBattleText2 ; 0x4744 TextEndBattle -	dw PokemonTower3EndBattleText2 ; 0x4744 TextEndBattle +	dw PokemonTower3BattleText2 ; TextBeforeBattle +	dw PokemonTower3AfterBattleText2 ; TextAfterBattle +	dw PokemonTower3EndBattleText2 ; TextEndBattle +	dw PokemonTower3EndBattleText2 ; TextEndBattle  PokemonTower3TrainerHeader2: ; 60705 (18:4705)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd765 ; flag's byte -	dw PokemonTower3BattleText3 ; 0x474e TextBeforeBattle -	dw PokemonTower3AfterBattleText3 ; 0x4758 TextAfterBattle -	dw PokemonTower3EndBattleText3 ; 0x4753 TextEndBattle -	dw PokemonTower3EndBattleText3 ; 0x4753 TextEndBattle +	dw PokemonTower3BattleText3 ; TextBeforeBattle +	dw PokemonTower3AfterBattleText3 ; TextAfterBattle +	dw PokemonTower3EndBattleText3 ; TextEndBattle +	dw PokemonTower3EndBattleText3 ; TextEndBattle  	db $ff  PokemonTower3Text1: ; 60712 (18:4712) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower3Text2: ; 6071c (18:471c) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower3TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower3Text3: ; 60726 (18:4726) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower3TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/pokemontower4.asm b/scripts/pokemontower4.asm index 760bb604..4f375657 100755 --- a/scripts/pokemontower4.asm +++ b/scripts/pokemontower4.asm @@ -25,45 +25,45 @@ PokemonTower4TrainerHeader0: ; 6081b (18:481b)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd766 ; flag's byte -	dw PokemonTower4BattleText1 ; 0x485e TextBeforeBattle -	dw PokemonTower4AfterBattleText1 ; 0x4868 TextAfterBattle -	dw PokemonTower4EndBattleText1 ; 0x4863 TextEndBattle -	dw PokemonTower4EndBattleText1 ; 0x4863 TextEndBattle +	dw PokemonTower4BattleText1 ; TextBeforeBattle +	dw PokemonTower4AfterBattleText1 ; TextAfterBattle +	dw PokemonTower4EndBattleText1 ; TextEndBattle +	dw PokemonTower4EndBattleText1 ; TextEndBattle  PokemonTower4TrainerHeader1: ; 60827 (18:4827)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd766 ; flag's byte -	dw PokemonTower4BattleText2 ; 0x486d TextBeforeBattle -	dw PokemonTower4AfterBattleText2 ; 0x4877 TextAfterBattle -	dw PokemonTower4EndBattleText2 ; 0x4872 TextEndBattle -	dw PokemonTower4EndBattleText2 ; 0x4872 TextEndBattle +	dw PokemonTower4BattleText2 ; TextBeforeBattle +	dw PokemonTower4AfterBattleText2 ; TextAfterBattle +	dw PokemonTower4EndBattleText2 ; TextEndBattle +	dw PokemonTower4EndBattleText2 ; TextEndBattle  PokemonTower4TrainerHeader2: ; 60833 (18:4833)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd766 ; flag's byte -	dw PokemonTower4BattleText3 ; 0x487c TextBeforeBattle -	dw PokemonTower4AfterBattleText3 ; 0x4886 TextAfterBattle -	dw PokemonTower4EndBattleText3 ; 0x4881 TextEndBattle -	dw PokemonTower4EndBattleText3 ; 0x4881 TextEndBattle +	dw PokemonTower4BattleText3 ; TextBeforeBattle +	dw PokemonTower4AfterBattleText3 ; TextAfterBattle +	dw PokemonTower4EndBattleText3 ; TextEndBattle +	dw PokemonTower4EndBattleText3 ; TextEndBattle  	db $ff  PokemonTower4Text1: ; 60840 (18:4840) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower4TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower4Text2: ; 6084a (18:484a) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower4TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower4Text3: ; 60854 (18:4854) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower4TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/pokemontower5.asm b/scripts/pokemontower5.asm index b70f9e28..34dd3204 100755 --- a/scripts/pokemontower5.asm +++ b/scripts/pokemontower5.asm @@ -13,7 +13,7 @@ PokemonTower5ScriptPointers: ; 60945 (18:4945)  	dw EndTrainerBattle  PokemonTower5Script0: ; 6094b (18:494b) -	ld hl, CoordsData_60992 ; $4992 +	ld hl, CoordsData_60992  	call ArePlayerCoordsInArray  	jr c, .asm_60960  	ld hl, wd72e @@ -38,7 +38,7 @@ PokemonTower5Script0: ; 6094b (18:494b)  	call Delay3  	call GBFadeInFromWhite  	ld a, $7 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	xor a  	ld [wJoyIgnore], a @@ -65,37 +65,37 @@ PokemonTower5TrainerHeader0: ; 609a9 (18:49a9)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd767 ; flag's byte -	dw PokemonTower5BattleText1 ; 0x49e9 TextBeforeBattle -	dw PokemonTower5AfterBattleText1 ; 0x49f3 TextAfterBattle -	dw PokemonTower5EndBattleText1 ; 0x49ee TextEndBattle -	dw PokemonTower5EndBattleText1 ; 0x49ee TextEndBattle +	dw PokemonTower5BattleText1 ; TextBeforeBattle +	dw PokemonTower5AfterBattleText1 ; TextAfterBattle +	dw PokemonTower5EndBattleText1 ; TextEndBattle +	dw PokemonTower5EndBattleText1 ; TextEndBattle  PokemonTower5TrainerHeader1: ; 609b5 (18:49b5)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd767 ; flag's byte -	dw PokemonTower5BattleText2 ; 0x4a02 TextBeforeBattle -	dw PokemonTower5AfterBattleText2 ; 0x4a0c TextAfterBattle -	dw PokemonTower5EndBattleText2 ; 0x4a07 TextEndBattle -	dw PokemonTower5EndBattleText2 ; 0x4a07 TextEndBattle +	dw PokemonTower5BattleText2 ; TextBeforeBattle +	dw PokemonTower5AfterBattleText2 ; TextAfterBattle +	dw PokemonTower5EndBattleText2 ; TextEndBattle +	dw PokemonTower5EndBattleText2 ; TextEndBattle  PokemonTower5TrainerHeader2: ; 609c1 (18:49c1)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd767 ; flag's byte -	dw PokemonTower5BattleText3 ; 0x4a1b TextBeforeBattle -	dw PokemonTower5AfterBattleText3 ; 0x4a25 TextAfterBattle -	dw PokemonTower5EndBattleText3 ; 0x4a20 TextEndBattle -	dw PokemonTower5EndBattleText3 ; 0x4a20 TextEndBattle +	dw PokemonTower5BattleText3 ; TextBeforeBattle +	dw PokemonTower5AfterBattleText3 ; TextAfterBattle +	dw PokemonTower5EndBattleText3 ; TextEndBattle +	dw PokemonTower5EndBattleText3 ; TextEndBattle  PokemonTower5TrainerHeader3: ; 609cd (18:49cd)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd767 ; flag's byte -	dw PokemonTower5BattleText4 ; 0x4a34 TextBeforeBattle -	dw PokemonTower5AfterBattleText4 ; 0x4a3e TextAfterBattle -	dw PokemonTower5EndBattleText4 ; 0x4a39 TextEndBattle -	dw PokemonTower5EndBattleText4 ; 0x4a39 TextEndBattle +	dw PokemonTower5BattleText4 ; TextBeforeBattle +	dw PokemonTower5AfterBattleText4 ; TextAfterBattle +	dw PokemonTower5EndBattleText4 ; TextEndBattle +	dw PokemonTower5EndBattleText4 ; TextEndBattle  	db $ff @@ -104,7 +104,7 @@ PokemonTower5Text1: ; 609da (18:49da)  	db "@"  PokemonTower5Text2: ; 609df (18:49df) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower5TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -122,7 +122,7 @@ PokemonTower5AfterBattleText1: ; 609f3 (18:49f3)  	db "@"  PokemonTower5Text3: ; 609f8 (18:49f8) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower5TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -140,7 +140,7 @@ PokemonTower5AfterBattleText2: ; 60a0c (18:4a0c)  	db "@"  PokemonTower5Text4: ; 60a11 (18:4a11) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower5TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -158,8 +158,8 @@ PokemonTower5AfterBattleText3: ; 60a25 (18:4a25)  	db "@"  PokemonTower5Text5: ; 60a2a (18:4a2a) -	db $08 ; asm -	ld hl, PokemonTower5TrainerHeader3 ; $49cd +	TX_ASM +	ld hl, PokemonTower5TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/pokemontower6.asm b/scripts/pokemontower6.asm index 58968d17..e0e75cb1 100755 --- a/scripts/pokemontower6.asm +++ b/scripts/pokemontower6.asm @@ -25,18 +25,18 @@ PokemonTower6Script0: ; 60b17 (18:4b17)  	ld a, [wd768]  	bit 7, a  	jp nz, CheckFightingMapTrainers -	ld hl, CoordsData_60b45 ; $4b45 +	ld hl, CoordsData_60b45  	call ArePlayerCoordsInArray  	jp nc, CheckFightingMapTrainers  	xor a  	ld [hJoyHeld], a  	ld a, $6 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, MAROWAK -	ld [W_CUROPPONENT], a ; wd059 +	ld [W_CUROPPONENT], a  	ld a, 30 -	ld [W_CURENEMYLVL], a ; W_CURENEMYLVL +	ld [W_CURENEMYLVL], a  	ld a, $4  	ld [W_POKEMONTOWER6CURSCRIPT], a  	ld [W_CURMAPSCRIPT], a @@ -46,7 +46,7 @@ CoordsData_60b45: ; 60b45 (18:4b45)  	db $10,$0A,$FF  PokemonTower6Script4: ; 60b48 (18:4b48) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, PokemonTower6Script_60b02  	ld a, $ff @@ -63,7 +63,7 @@ PokemonTower6Script4: ; 60b48 (18:4b48)  	ld hl, wd768  	set 7, [hl]  	ld a, $7 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	xor a  	ld [wJoyIgnore], a @@ -110,57 +110,57 @@ PokemonTower6TrainerHeader0: ; 60bbf (18:4bbf)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd768 ; flag's byte -	dw PokemonTower6BattleText1 ; 0x4c29 TextBeforeBattle -	dw PokemonTower6AfterBattleText1 ; 0x4c33 TextAfterBattle -	dw PokemonTower6EndBattleText1 ; 0x4c2e TextEndBattle -	dw PokemonTower6EndBattleText1 ; 0x4c2e TextEndBattle +	dw PokemonTower6BattleText1 ; TextBeforeBattle +	dw PokemonTower6AfterBattleText1 ; TextAfterBattle +	dw PokemonTower6EndBattleText1 ; TextEndBattle +	dw PokemonTower6EndBattleText1 ; TextEndBattle  PokemonTower6TrainerHeader1: ; 60bcb (18:4bcb)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd768 ; flag's byte -	dw PokemonTower6BattleText2 ; 0x4c38 TextBeforeBattle -	dw PokemonTower6AfterBattleText2 ; 0x4c42 TextAfterBattle -	dw PokemonTower6EndBattleText2 ; 0x4c3d TextEndBattle -	dw PokemonTower6EndBattleText2 ; 0x4c3d TextEndBattle +	dw PokemonTower6BattleText2 ; TextBeforeBattle +	dw PokemonTower6AfterBattleText2 ; TextAfterBattle +	dw PokemonTower6EndBattleText2 ; TextEndBattle +	dw PokemonTower6EndBattleText2 ; TextEndBattle  PokemonTower6TrainerHeader2: ; 60bd7 (18:4bd7)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd768 ; flag's byte -	dw PokemonTower6BattleText3 ; 0x4c47 TextBeforeBattle -	dw PokemonTower6AfterBattleText3 ; 0x4c51 TextAfterBattle -	dw PokemonTower6EndBattleText3 ; 0x4c4c TextEndBattle -	dw PokemonTower6EndBattleText3 ; 0x4c4c TextEndBattle +	dw PokemonTower6BattleText3 ; TextBeforeBattle +	dw PokemonTower6AfterBattleText3 ; TextAfterBattle +	dw PokemonTower6EndBattleText3 ; TextEndBattle +	dw PokemonTower6EndBattleText3 ; TextEndBattle  	db $ff  PokemonTower6Text1: ; 60be4 (18:4be4) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower6TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower6Text2: ; 60bee (18:4bee) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower6TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower6Text3: ; 60bf8 (18:4bf8) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower6TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower6Text7: ; 60c02 (18:4c02) -	db $8 +	TX_ASM  	ld hl, PokemonTower2Text_60c1f  	call PrintText  	ld a, MAROWAK  	call PlayCry  	call WaitForSoundToFinish -	ld c, $1e +	ld c, 30  	call DelayFrames  	ld hl, PokemonTower2Text_60c24  	call PrintText diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm index ab42121d..a5d10ca8 100755 --- a/scripts/pokemontower7.asm +++ b/scripts/pokemontower7.asm @@ -24,14 +24,14 @@ PokemonTower7ScriptPointers:  PokemonTower7Script2: ; 60d23 (18:4d23)  	ld hl, wFlags_0xcd60  	res 0, [hl] -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, PokemonTower7Script_60d18  	call EndTrainerBattle  	ld a, $f0  	ld [wJoyIgnore], a  	ld a, [wSpriteIndex] -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	call PokemonTower7Script_60db6  	ld a, $3 @@ -72,7 +72,7 @@ PokemonTower7Script4: ; 60d86 (18:4d86)  	ld a, $4  	ld [wSpriteStateData1 + 9], a  	ld a, LAVENDER_HOUSE_1 -	ld [H_DOWNARROWBLINKCNT1], a ; $ff8b +	ld [H_DOWNARROWBLINKCNT1], a  	ld a, $1  	ld [wDestinationWarpID], a  	ld a, LAVENDER_TOWN @@ -85,16 +85,16 @@ PokemonTower7Script4: ; 60d86 (18:4d86)  	ret  PokemonTower7Script_60db6: ; 60db6 (18:4db6) -	ld hl, CoordsData_60de3 ; $4de3 +	ld hl, CoordsData_60de3  	ld a, [wSpriteIndex]  	dec a  	swap a  	ld d, $0  	ld e, a  	add hl, de -	ld a, [W_YCOORD] ; wd361 +	ld a, [W_YCOORD]  	ld b, a -	ld a, [W_XCOORD] ; wd362 +	ld a, [W_XCOORD]  	ld c, a  .asm_60dcb  	ld a, [hli] @@ -107,7 +107,7 @@ PokemonTower7Script_60db6: ; 60db6 (18:4db6)  	ld d, [hl]  	ld e, a  	ld a, [wSpriteIndex] -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp MoveSprite  .asm_60dde  	inc hl @@ -171,45 +171,45 @@ PokemonTower7TrainerHeader0: ; 60e47 (18:4e47)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd769 ; flag's byte -	dw PokemonTower7BattleText1 ; 0x4ec9 TextBeforeBattle -	dw PokemonTower7AfterBattleText1 ; 0x4ed3 TextAfterBattle -	dw PokemonTower7EndBattleText1 ; 0x4ece TextEndBattle -	dw PokemonTower7EndBattleText1 ; 0x4ece TextEndBattle +	dw PokemonTower7BattleText1 ; TextBeforeBattle +	dw PokemonTower7AfterBattleText1 ; TextAfterBattle +	dw PokemonTower7EndBattleText1 ; TextEndBattle +	dw PokemonTower7EndBattleText1 ; TextEndBattle  PokemonTower7TrainerHeader1: ; 60e53 (18:4e53)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd769 ; flag's byte -	dw PokemonTower7BattleText2 ; 0x4ed8 TextBeforeBattle -	dw PokemonTower7AfterBattleText2 ; 0x4ee2 TextAfterBattle -	dw PokemonTower7EndBattleText2 ; 0x4edd TextEndBattle -	dw PokemonTower7EndBattleText2 ; 0x4edd TextEndBattle +	dw PokemonTower7BattleText2 ; TextBeforeBattle +	dw PokemonTower7AfterBattleText2 ; TextAfterBattle +	dw PokemonTower7EndBattleText2 ; TextEndBattle +	dw PokemonTower7EndBattleText2 ; TextEndBattle  PokemonTower7TrainerHeader2: ; 60e5f (18:4e5f)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd769 ; flag's byte -	dw PokemonTower7BattleText3 ; 0x4ee7 TextBeforeBattle -	dw PokemonTower7AfterBattleText3 ; 0x4ef1 TextAfterBattle -	dw PokemonTower7EndBattleText3 ; 0x4eec TextEndBattle -	dw PokemonTower7EndBattleText3 ; 0x4eec TextEndBattle +	dw PokemonTower7BattleText3 ; TextBeforeBattle +	dw PokemonTower7AfterBattleText3 ; TextAfterBattle +	dw PokemonTower7EndBattleText3 ; TextEndBattle +	dw PokemonTower7EndBattleText3 ; TextEndBattle  	db $ff  PokemonTower7Text1: ; 60e6c (18:4e6c) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower7TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower7Text2: ; 60e76 (18:4e76) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower7TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  PokemonTower7Text3: ; 60e80 (18:4e80) -	db $08 ; asm +	TX_ASM  	ld hl, PokemonTower7TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/powerplant.asm b/scripts/powerplant.asm index ec4f89b3..25597654 100755 --- a/scripts/powerplant.asm +++ b/scripts/powerplant.asm @@ -112,56 +112,56 @@ PowerPlantTrainerHeader8: ; 1e35b (7:635b)  	db $ff -asm_234cc: ; 1e368 (7:6368) +InitVoltorbBattle: ; 1e368 (7:6368)  	call TalkToTrainer  	ld a, [W_CURMAPSCRIPT]  	ld [W_POWERPLANTCURSCRIPT], a  	jp TextScriptEnd  PowerPlantText1: ; 1e374 (7:6374) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader0 ; $62fb -	jr asm_234cc ; 0x1e378 $ee +	TX_ASM +	ld hl, PowerPlantTrainerHeader0 +	jr InitVoltorbBattle  PowerPlantText2: ; 1e37a (7:637a) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader1 ; $6307 -	jr asm_234cc ; 0x1e37e $e8 +	TX_ASM +	ld hl, PowerPlantTrainerHeader1 +	jr InitVoltorbBattle  PowerPlantText3: ; 1e380 (7:6380) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader2 ; $6313 -	jr asm_234cc ; 0x1e384 $e2 +	TX_ASM +	ld hl, PowerPlantTrainerHeader2 +	jr InitVoltorbBattle  PowerPlantText4: ; 1e386 (7:6386) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader3 ; $631f -	jr asm_234cc ; 0x1e38a $dc +	TX_ASM +	ld hl, PowerPlantTrainerHeader3 +	jr InitVoltorbBattle  PowerPlantText5: ; 1e38c (7:638c) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader4 ; $632b -	jr asm_234cc ; 0x1e390 $d6 +	TX_ASM +	ld hl, PowerPlantTrainerHeader4 +	jr InitVoltorbBattle  PowerPlantText6: ; 1e392 (7:6392) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader5 ; $6337 -	jr asm_234cc ; 0x1e396 $d0 +	TX_ASM +	ld hl, PowerPlantTrainerHeader5 +	jr InitVoltorbBattle  PowerPlantText7: ; 1e398 (7:6398) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader6 ; $6343 -	jr asm_234cc ; 0x1e39c $ca +	TX_ASM +	ld hl, PowerPlantTrainerHeader6 +	jr InitVoltorbBattle  PowerPlantText8: ; 1e39e (7:639e) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader7 ; $634f -	jr asm_234cc ; 0x1e3a2 $c4 +	TX_ASM +	ld hl, PowerPlantTrainerHeader7 +	jr InitVoltorbBattle  PowerPlantText9: ; 1e3a4 (7:63a4) -	db $8 ; asm -	ld hl, PowerPlantTrainerHeader8 ; $635b -	jr asm_234cc ; 0x1e3a8 $be +	TX_ASM +	ld hl, PowerPlantTrainerHeader8 +	jr InitVoltorbBattle  VoltorbBattleText: ; 1e3aa (7:63aa)  	TX_FAR _VoltorbBattleText @@ -169,7 +169,7 @@ VoltorbBattleText: ; 1e3aa (7:63aa)  ZapdosBattleText: ; 1e3af (7:63af)  	TX_FAR _ZapdosBattleText -	db $8 +	TX_ASM  	ld a, ZAPDOS  	call PlayCry  	call WaitForSoundToFinish diff --git a/scripts/redshouse1f.asm b/scripts/redshouse1f.asm index 7b3f1f87..d00ee9de 100755 --- a/scripts/redshouse1f.asm +++ b/scripts/redshouse1f.asm @@ -30,7 +30,7 @@ MomHealPokemon: ; 4818a (12:418a)  	predef HealParty  	ld a, MUSIC_PKMN_HEALED  	ld [wc0ee], a -	call PlaySound ; play sound? +	call PlaySound  .next  	ld a, [wc026]  	cp MUSIC_PKMN_HEALED diff --git a/scripts/rockethideout1.asm b/scripts/rockethideout1.asm index 499f77ef..fe5a47e6 100755 --- a/scripts/rockethideout1.asm +++ b/scripts/rockethideout1.asm @@ -51,82 +51,82 @@ RocketHideout1TrainerHeader0: ; 44c22 (11:4c22)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd815 ; flag's byte -	dw RocketHideout1BattleText2 ; 0x4ca1 TextBeforeBattle -	dw RocketHideout1AfterBattleTxt2 ; 0x4cab TextAfterBattle -	dw RocketHideout1EndBattleText2 ; 0x4ca6 TextEndBattle -	dw RocketHideout1EndBattleText2 ; 0x4ca6 TextEndBattle +	dw RocketHideout1BattleText2 ; TextBeforeBattle +	dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle +	dw RocketHideout1EndBattleText2 ; TextEndBattle +	dw RocketHideout1EndBattleText2 ; TextEndBattle  RocketHideout1TrainerHeader2: ; 44c2e (11:4c2e)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd815 ; flag's byte -	dw RocketHideout1BattleText3 ; 0x4cb0 TextBeforeBattle -	dw RocketHideout1AfterBattleTxt3 ; 0x4cba TextAfterBattle -	dw RocketHideout1EndBattleText3 ; 0x4cb5 TextEndBattle -	dw RocketHideout1EndBattleText3 ; 0x4cb5 TextEndBattle +	dw RocketHideout1BattleText3 ; TextBeforeBattle +	dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle +	dw RocketHideout1EndBattleText3 ; TextEndBattle +	dw RocketHideout1EndBattleText3 ; TextEndBattle  RocketHideout1TrainerHeader3: ; 44c3a (11:4c3a)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd815 ; flag's byte -	dw RocketHideout1BattleText4 ; 0x4cbf TextBeforeBattle -	dw RocketHideout1AfterBattleTxt4 ; 0x4cc9 TextAfterBattle -	dw RocketHideout1EndBattleText4 ; 0x4cc4 TextEndBattle -	dw RocketHideout1EndBattleText4 ; 0x4cc4 TextEndBattle +	dw RocketHideout1BattleText4 ; TextBeforeBattle +	dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle +	dw RocketHideout1EndBattleText4 ; TextEndBattle +	dw RocketHideout1EndBattleText4 ; TextEndBattle  RocketHideout1TrainerHeader4: ; 44c46 (11:4c46)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd815 ; flag's byte -	dw RocketHideout1BattleText5 ; 0x4cce TextBeforeBattle -	dw RocketHideout1AfterBattleTxt5 ; 0x4cd8 TextAfterBattle -	dw RocketHideout1EndBattleText5 ; 0x4cd3 TextEndBattle -	dw RocketHideout1EndBattleText5 ; 0x4cd3 TextEndBattle +	dw RocketHideout1BattleText5 ; TextBeforeBattle +	dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle +	dw RocketHideout1EndBattleText5 ; TextEndBattle +	dw RocketHideout1EndBattleText5 ; TextEndBattle  RocketHideout1TrainerHeader5: ; 44c52 (11:4c52)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd815 ; flag's byte -	dw RocketHideout1BattleText6 ; 0x4cdd TextBeforeBattle -	dw RocketHideout1AfterBattleTxt6 ; 0x4ce2 TextAfterBattle -	dw RocketHideout1EndBattleText6 ; 0x4c91 TextEndBattle -	dw RocketHideout1EndBattleText6 ; 0x4c91 TextEndBattle +	dw RocketHideout1BattleText6 ; TextBeforeBattle +	dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle +	dw RocketHideout1EndBattleText6 ; TextEndBattle +	dw RocketHideout1EndBattleText6 ; TextEndBattle  	db $ff  RocketHideout1Text1: ; 44c5f (11:4c5f) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout1TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  RocketHideout1Text2: ; 44c69 (11:4c69) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout1TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  RocketHideout1Text3: ; 44c73 (11:4c73) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout1TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  RocketHideout1Text4: ; 44c7d (11:4c7d) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout1TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  RocketHideout1Text5: ; 44c87 (11:4c87) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout1TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  RocketHideout1EndBattleText6: ; 44c91 (11:4c91)  	TX_FAR _RocketHideout1EndBattleText6 -	db $8 +	TX_ASM  	ld hl, wd815  	set 5, [hl]  	ld hl, RocketHideout1Text_44c9f diff --git a/scripts/rockethideout2.asm b/scripts/rockethideout2.asm index 99754658..04e2c5d3 100755 --- a/scripts/rockethideout2.asm +++ b/scripts/rockethideout2.asm @@ -321,17 +321,17 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7)  	ld a, [wSpriteStateData1 + 2]  	srl a  	srl a -	ld hl, SpinnerPlayerFacingDirections ; $5083 +	ld hl, SpinnerPlayerFacingDirections  	ld c, a  	ld b, $0  	add hl, bc  	ld a, [hl]  	ld [wSpriteStateData1 + 2], a -	ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET +	ld a, [W_CURMAPTILESET]  	cp FACILITY -	ld hl, FacilitySpinnerArrows ; $5023 +	ld hl, FacilitySpinnerArrows  	jr z, .asm_44ff6 -	ld hl, GymSpinnerArrows ; $5053 +	ld hl, GymSpinnerArrows  .asm_44ff6  	ld a, [wSimulatedJoypadStatesIndex]  	bit 0, a @@ -429,15 +429,15 @@ RocketHideout2TrainerHeader0: ; 450d1 (11:50d1)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd817 ; flag's byte -	dw RocketHideout2BattleText2 ; 0x50e8 TextBeforeBattle -	dw RocketHideout2AfterBattleTxt2 ; 0x50f2 TextAfterBattle -	dw RocketHideout2EndBattleText2 ; 0x50ed TextEndBattle -	dw RocketHideout2EndBattleText2 ; 0x50ed TextEndBattle +	dw RocketHideout2BattleText2 ; TextBeforeBattle +	dw RocketHideout2AfterBattleTxt2 ; TextAfterBattle +	dw RocketHideout2EndBattleText2 ; TextEndBattle +	dw RocketHideout2EndBattleText2 ; TextEndBattle  	db $ff  RocketHideout2Text1: ; 450de (11:50de) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout2TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/rockethideout3.asm b/scripts/rockethideout3.asm index 6dc467ab..e7a7b63b 100755 --- a/scripts/rockethideout3.asm +++ b/scripts/rockethideout3.asm @@ -135,7 +135,7 @@ RocketHideout3ArrowMovement12: ; 452e1 (11:52e1)  	db $40,$01  	db $FF -RocketHideout3Script3 ; 452e4 (11:452e4) +RocketHideout3Script3: ; 452e4 (11:452e4)  	ld a, [wSimulatedJoypadStatesIndex]  	and a  	jp nz, LoadSpinnerArrowTiles @@ -158,24 +158,24 @@ RocketHideout3TrainerHeader0: ; 45302 (11:5302)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd819 ; flag's byte -	dw RocketHideout3BattleText2 ; 0x5325 TextBeforeBattle -	dw RocketHideout3AfterBattleTxt2 ; 0x532f TextAfterBattle -	dw RocketHideout3EndBattleText2 ; 0x532a TextEndBattle -	dw RocketHideout3EndBattleText2 ; 0x532a TextEndBattle +	dw RocketHideout3BattleText2 ; TextBeforeBattle +	dw RocketHideout3AfterBattleTxt2 ; TextAfterBattle +	dw RocketHideout3EndBattleText2 ; TextEndBattle +	dw RocketHideout3EndBattleText2 ; TextEndBattle  RocketHideout3TrainerHeader2: ; 4530e (11:530e)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd819 ; flag's byte -	dw RocketHideout3BattleTxt ; 0x533e TextBeforeBattle -	dw RocketHideout3AfterBattleText3 ; 0x5348 TextAfterBattle -	dw RocketHideout3EndBattleText3 ; 0x5343 TextEndBattle -	dw RocketHideout3EndBattleText3 ; 0x5343 TextEndBattle +	dw RocketHideout3BattleTxt ; TextBeforeBattle +	dw RocketHideout3AfterBattleText3 ; TextAfterBattle +	dw RocketHideout3EndBattleText3 ; TextEndBattle +	dw RocketHideout3EndBattleText3 ; TextEndBattle  	db $ff  RocketHideout3Text1: ; 4531b (11:531b) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -193,7 +193,7 @@ RocketHideout3AfterBattleTxt2: ; 4532f (11:532f)  	db "@"  RocketHideout3Text2: ; 45334 (11:5334) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout3TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm index f1b46653..613e2476 100755 --- a/scripts/rockethideout4.asm +++ b/scripts/rockethideout4.asm @@ -93,33 +93,33 @@ RocketHideout4TrainerHeader0: ; 45515 (11:5515)  	db $2 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd81b ; flag's byte -	dw RocketHideout4BattleText2 ; 0x5593 TextBeforeBattle -	dw RocketHideout4AfterBattleText2 ; 0x559d TextAfterBattle -	dw RocketHideout4EndBattleText2 ; 0x5598 TextEndBattle -	dw RocketHideout4EndBattleText2 ; 0x5598 TextEndBattle +	dw RocketHideout4BattleText2 ; TextBeforeBattle +	dw RocketHideout4AfterBattleText2 ; TextAfterBattle +	dw RocketHideout4EndBattleText2 ; TextEndBattle +	dw RocketHideout4EndBattleText2 ; TextEndBattle  RocketHideout4TrainerHeader2: ; 45521 (11:5521)  	db $3 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd81b ; flag's byte -	dw RocketHideout4BattleText3 ; 0x55ac TextBeforeBattle -	dw RocketHideout4AfterBattleText3 ; 0x55b6 TextAfterBattle -	dw RocketHideout4EndBattleText3 ; 0x55b1 TextEndBattle -	dw RocketHideout4EndBattleText3 ; 0x55b1 TextEndBattle +	dw RocketHideout4BattleText3 ; TextBeforeBattle +	dw RocketHideout4AfterBattleText3 ; TextAfterBattle +	dw RocketHideout4EndBattleText3 ; TextEndBattle +	dw RocketHideout4EndBattleText3 ; TextEndBattle  RocketHideout4TrainerHeader3: ; 4552d (11:552d)  	db $4 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd81b ; flag's byte -	dw RocketHideout4BattleText4 ; 0x55c5 TextBeforeBattle -	dw RocketHideout4AfterBattleText4 ; 0x55cf TextAfterBattle -	dw RocketHideout4EndBattleText4 ; 0x55ca TextEndBattle -	dw RocketHideout4EndBattleText4 ; 0x55ca TextEndBattle +	dw RocketHideout4BattleText4 ; TextBeforeBattle +	dw RocketHideout4AfterBattleText4 ; TextAfterBattle +	dw RocketHideout4EndBattleText4 ; TextEndBattle +	dw RocketHideout4EndBattleText4 ; TextEndBattle  	db $ff  RocketHideout4Text1: ; 4553a (11:553a) -	db $08 ; asm +	TX_ASM  	ld a, [wd81b]  	bit 7, a  	jp nz, .asm_545571 @@ -131,20 +131,20 @@ RocketHideout4Text1: ; 4553a (11:553a)  	ld hl, RocketHideout4Text_4557f  	ld de, RocketHideout4Text_4557f  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	xor a -	ldh [$b4], a +	ld [hJoyHeld], a  	ld a, $3  	ld [W_ROCKETHIDEOUT4CURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -	jr .asm_209f0 ; 0x4556f +	jr .asm_209f0  .asm_545571  	ld hl, RocketHideout4Text10  	call PrintText -.asm_209f0 ; 0x45577 +.asm_209f0  	jp TextScriptEnd  RocketHideout4Text_4557a: ; 4557a (11:557a) @@ -160,7 +160,7 @@ RocketHideout4Text10: ; 45584 (11:5584)  	db "@"  RocketHideout4Text2: ; 45589 (11:5589) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout4TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -178,7 +178,7 @@ RocketHideout4AfterBattleText2: ; 4559d (11:559d)  	db "@"  RocketHideout4Text3: ; 455a2 (11:55a2) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout4TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -196,7 +196,7 @@ RocketHideout4AfterBattleText3: ; 455b6 (11:55b6)  	db "@"  RocketHideout4Text4: ; 455bb (11:55bb) -	db $08 ; asm +	TX_ASM  	ld hl, RocketHideout4TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -210,13 +210,13 @@ RocketHideout4EndBattleText4: ; 455ca (11:55ca)  	db "@"  RocketHideout4AfterBattleText4: ; 455cf (11:55cf) -	db $8 -	ld hl, RocketHideout4Text_455ec ; $55ec +	TX_ASM +	ld hl, RocketHideout4Text_455ec  	call PrintText  	ld hl, wd81b  	bit 6, [hl]  	set 6, [hl] -	jr nz, .asm_455e9 ; 0x455dd $a +	jr nz, .asm_455e9  	ld a, HS_ROCKET_HIDEOUT_4_ITEM_5  	ld [wcc4d], a  	predef ShowObject diff --git a/scripts/rockethideoutelevator.asm b/scripts/rockethideoutelevator.asm index e7bc24f3..169b536b 100755 --- a/scripts/rockethideoutelevator.asm +++ b/scripts/rockethideoutelevator.asm @@ -32,9 +32,9 @@ RocketHideoutElevatorScript_4573a: ; 4573a (11:573a)  	ret  RocketHideoutElevatorScript_45741: ; 45741 (11:5741) -	ld hl, RocketHideoutElavatorFloors ; $5754 +	ld hl, RocketHideoutElavatorFloors  	call LoadItemList -	ld hl, RocketHideoutElevatorWarpMaps ; $5759 +	ld hl, RocketHideoutElevatorWarpMaps  	ld de, wcc5b  	ld bc, $0006  	call CopyData @@ -62,20 +62,20 @@ RocketHideoutElevatorTextPointers: ; 4576b (11:576b)  	dw RocketHideoutElevatorText1  RocketHideoutElevatorText1: ; 4576d (11:576d) -	db $08 ; asm +	TX_ASM  	ld b, LIFT_KEY  	call IsItemInBag -	jr z, .asm_8d8f0 ; 0x45773 +	jr z, .asm_45782  	call RocketHideoutElevatorScript_45741 -	ld hl, RocketHideoutElevatorWarpMaps ; $5759 +	ld hl, RocketHideoutElevatorWarpMaps  	predef Func_1c9c6 -	jr .asm_46c43 ; 0x45780 -.asm_8d8f0 ; 0x45782 +	jr .asm_45788 +.asm_45782  	ld hl, RocketHideoutElevatorText_4578b  	call PrintText -.asm_46c43 ; 0x45788 +.asm_45788  	jp TextScriptEnd  RocketHideoutElevatorText_4578b: ; 4578b (11:578b) -	TX_FAR _RocketElevatorText_4578b ; 0x82438 +	TX_FAR _RocketElevatorText_4578b  	db $d, "@" diff --git a/scripts/rocktunnel1.asm b/scripts/rocktunnel1.asm index 1d514a05..72881e65 100755 --- a/scripts/rocktunnel1.asm +++ b/scripts/rocktunnel1.asm @@ -27,101 +27,101 @@ RockTunnel1TrainerHeader1: ; 44505 (11:4505)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d2 ; flag's byte -	dw RockTunnel1BattleText1 ; 0x4588 TextBeforeBattle -	dw RockTunnel1AfterBattleText1 ; 0x4592 TextAfterBattle -	dw RockTunnel1EndBattleText1 ; 0x458d TextEndBattle -	dw RockTunnel1EndBattleText1 ; 0x458d TextEndBattle +	dw RockTunnel1BattleText1 ; TextBeforeBattle +	dw RockTunnel1AfterBattleText1 ; TextAfterBattle +	dw RockTunnel1EndBattleText1 ; TextEndBattle +	dw RockTunnel1EndBattleText1 ; TextEndBattle  RockTunnel1TrainerHeader2: ; 44511 (11:4511)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d2 ; flag's byte -	dw RockTunnel1BattleText2 ; 0x4597 TextBeforeBattle -	dw RockTunnel1AfterBattleText2 ; 0x45a1 TextAfterBattle -	dw RockTunnel1EndBattleText2 ; 0x459c TextEndBattle -	dw RockTunnel1EndBattleText2 ; 0x459c TextEndBattle +	dw RockTunnel1BattleText2 ; TextBeforeBattle +	dw RockTunnel1AfterBattleText2 ; TextAfterBattle +	dw RockTunnel1EndBattleText2 ; TextEndBattle +	dw RockTunnel1EndBattleText2 ; TextEndBattle  RockTunnel1TrainerHeader3: ; 4451d (11:451d)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d2 ; flag's byte -	dw RockTunnel1BattleText3 ; 0x45a6 TextBeforeBattle -	dw RockTunnel1AfterBattleText3 ; 0x45b0 TextAfterBattle -	dw RockTunnel1EndBattleText3 ; 0x45ab TextEndBattle -	dw RockTunnel1EndBattleText3 ; 0x45ab TextEndBattle +	dw RockTunnel1BattleText3 ; TextBeforeBattle +	dw RockTunnel1AfterBattleText3 ; TextAfterBattle +	dw RockTunnel1EndBattleText3 ; TextEndBattle +	dw RockTunnel1EndBattleText3 ; TextEndBattle  RockTunnel1TrainerHeader4: ; 44529 (11:4529)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d2 ; flag's byte -	dw RockTunnel1BattleText4 ; 0x45b5 TextBeforeBattle -	dw RockTunnel1AfterBattleText4 ; 0x45bf TextAfterBattle -	dw RockTunnel1EndBattleText4 ; 0x45ba TextEndBattle -	dw RockTunnel1EndBattleText4 ; 0x45ba TextEndBattle +	dw RockTunnel1BattleText4 ; TextBeforeBattle +	dw RockTunnel1AfterBattleText4 ; TextAfterBattle +	dw RockTunnel1EndBattleText4 ; TextEndBattle +	dw RockTunnel1EndBattleText4 ; TextEndBattle  RockTunnel1TrainerHeader5: ; 44535 (11:4535)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d2 ; flag's byte -	dw RockTunnel1BattleText5 ; 0x45c4 TextBeforeBattle -	dw RockTunnel1AfterBattleText5 ; 0x45ce TextAfterBattle -	dw RockTunnel1EndBattleText5 ; 0x45c9 TextEndBattle -	dw RockTunnel1EndBattleText5 ; 0x45c9 TextEndBattle +	dw RockTunnel1BattleText5 ; TextBeforeBattle +	dw RockTunnel1AfterBattleText5 ; TextAfterBattle +	dw RockTunnel1EndBattleText5 ; TextEndBattle +	dw RockTunnel1EndBattleText5 ; TextEndBattle  RockTunnel1TrainerHeader6: ; 44541 (11:4541)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d2 ; flag's byte -	dw RockTunnel1BattleText6 ; 0x45d3 TextBeforeBattle -	dw RockTunnel1AfterBattleText6 ; 0x45dd TextAfterBattle -	dw RockTunnel1EndBattleText6 ; 0x45d8 TextEndBattle -	dw RockTunnel1EndBattleText6 ; 0x45d8 TextEndBattle +	dw RockTunnel1BattleText6 ; TextBeforeBattle +	dw RockTunnel1AfterBattleText6 ; TextAfterBattle +	dw RockTunnel1EndBattleText6 ; TextEndBattle +	dw RockTunnel1EndBattleText6 ; TextEndBattle  RockTunnel1TrainerHeader7: ; 4454d (11:454d)  	db $7 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d2 ; flag's byte -	dw RockTunnel1BattleText7 ; 0x45e2 TextBeforeBattle -	dw RockTunnel1AfterBattleText7 ; 0x45ec TextAfterBattle -	dw RockTunnel1EndBattleText7 ; 0x45e7 TextEndBattle -	dw RockTunnel1EndBattleText7 ; 0x45e7 TextEndBattle +	dw RockTunnel1BattleText7 ; TextBeforeBattle +	dw RockTunnel1AfterBattleText7 ; TextAfterBattle +	dw RockTunnel1EndBattleText7 ; TextEndBattle +	dw RockTunnel1EndBattleText7 ; TextEndBattle  	db $ff  RockTunnel1Text1: ; 4455a (11:455a) -	db $8 -	ld hl, RockTunnel1TrainerHeader1 ; $4505 -	jr asm_0c916 ; 0x4455e $22 +	TX_ASM +	ld hl, RockTunnel1TrainerHeader1 +	jr RockTunnel1TalkToTrainer  RockTunnel1Text2: ; 44560 (11:4560) -	db $8 -	ld hl, RockTunnel1TrainerHeader2 ; $4511 -	jr asm_0c916 ; 0x44564 $1c +	TX_ASM +	ld hl, RockTunnel1TrainerHeader2 +	jr RockTunnel1TalkToTrainer  RockTunnel1Text3: ; 44566 (11:4566) -	db $8 -	ld hl, RockTunnel1TrainerHeader3 ; $451d -	jr asm_0c916 ; 0x4456a $16 +	TX_ASM +	ld hl, RockTunnel1TrainerHeader3 +	jr RockTunnel1TalkToTrainer  RockTunnel1Text4: ; 4456c (11:456c) -	db $8 -	ld hl, RockTunnel1TrainerHeader4 ; $4529 -	jr asm_0c916 ; 0x44570 $10 +	TX_ASM +	ld hl, RockTunnel1TrainerHeader4 +	jr RockTunnel1TalkToTrainer  RockTunnel1Text5: ; 44572 (11:4572) -	db $8 -	ld hl, RockTunnel1TrainerHeader5 ; $4535 -	jr asm_0c916 ; 0x44576 $a +	TX_ASM +	ld hl, RockTunnel1TrainerHeader5 +	jr RockTunnel1TalkToTrainer  RockTunnel1Text6: ; 44578 (11:4578) -	db $8 -	ld hl, RockTunnel1TrainerHeader6 ; $4541 -	jr asm_0c916 ; 0x4457c $4 +	TX_ASM +	ld hl, RockTunnel1TrainerHeader6 +	jr RockTunnel1TalkToTrainer  RockTunnel1Text7: ; 4457e (11:457e) -	db $8 -	ld hl, RockTunnel1TrainerHeader7 ; $454d -asm_0c916: ; 44582 (11:4582) +	TX_ASM +	ld hl, RockTunnel1TrainerHeader7 +RockTunnel1TalkToTrainer: ; 44582 (11:4582)  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/rocktunnel2.asm b/scripts/rocktunnel2.asm index 98b804a7..832a244f 100755 --- a/scripts/rocktunnel2.asm +++ b/scripts/rocktunnel2.asm @@ -27,120 +27,120 @@ RockTunnel2TrainerHeader0: ; 46014 (11:6014)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText2 ; 0x60c5 TextBeforeBattle -	dw RockTunnel2AfterBattleText2 ; 0x60cf TextAfterBattle -	dw RockTunnel2EndBattleText2 ; 0x60ca TextEndBattle -	dw RockTunnel2EndBattleText2 ; 0x60ca TextEndBattle +	dw RockTunnel2BattleText2 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText2 ; TextAfterBattle +	dw RockTunnel2EndBattleText2 ; TextEndBattle +	dw RockTunnel2EndBattleText2 ; TextEndBattle  RockTunnel2TrainerHeader2: ; 46020 (11:6020)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText3 ; 0x60d4 TextBeforeBattle -	dw RockTunnel2AfterBattleText3 ; 0x60de TextAfterBattle -	dw RockTunnel2EndBattleText3 ; 0x60d9 TextEndBattle -	dw RockTunnel2EndBattleText3 ; 0x60d9 TextEndBattle +	dw RockTunnel2BattleText3 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText3 ; TextAfterBattle +	dw RockTunnel2EndBattleText3 ; TextEndBattle +	dw RockTunnel2EndBattleText3 ; TextEndBattle  RockTunnel2TrainerHeader3: ; 4602c (11:602c)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText4 ; 0x60e3 TextBeforeBattle -	dw RockTunnel2AfterBattleText4 ; 0x60ed TextAfterBattle -	dw RockTunnel2EndBattleText4 ; 0x60e8 TextEndBattle -	dw RockTunnel2EndBattleText4 ; 0x60e8 TextEndBattle +	dw RockTunnel2BattleText4 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText4 ; TextAfterBattle +	dw RockTunnel2EndBattleText4 ; TextEndBattle +	dw RockTunnel2EndBattleText4 ; TextEndBattle  RockTunnel2TrainerHeader4: ; 46038 (11:6038)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText5 ; 0x60f2 TextBeforeBattle -	dw RockTunnel2AfterBattleText5 ; 0x60fc TextAfterBattle -	dw RockTunnel2EndBattleText5 ; 0x60f7 TextEndBattle -	dw RockTunnel2EndBattleText5 ; 0x60f7 TextEndBattle +	dw RockTunnel2BattleText5 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText5 ; TextAfterBattle +	dw RockTunnel2EndBattleText5 ; TextEndBattle +	dw RockTunnel2EndBattleText5 ; TextEndBattle  RockTunnel2TrainerHeader5: ; 46044 (11:6044)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText6 ; 0x6101 TextBeforeBattle -	dw RockTunnel2AfterBattleText6 ; 0x610b TextAfterBattle -	dw RockTunnel2EndBattleText6 ; 0x6106 TextEndBattle -	dw RockTunnel2EndBattleText6 ; 0x6106 TextEndBattle +	dw RockTunnel2BattleText6 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText6 ; TextAfterBattle +	dw RockTunnel2EndBattleText6 ; TextEndBattle +	dw RockTunnel2EndBattleText6 ; TextEndBattle  RockTunnel2TrainerHeader6: ; 46050 (11:6050)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText7 ; 0x6110 TextBeforeBattle -	dw RockTunnel2AfterBattleText7 ; 0x611a TextAfterBattle -	dw RockTunnel2EndBattleText7 ; 0x6115 TextEndBattle -	dw RockTunnel2EndBattleText7 ; 0x6115 TextEndBattle +	dw RockTunnel2BattleText7 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText7 ; TextAfterBattle +	dw RockTunnel2EndBattleText7 ; TextEndBattle +	dw RockTunnel2EndBattleText7 ; TextEndBattle  RockTunnel2TrainerHeader7: ; 4605c (11:605c)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText8 ; 0x611f TextBeforeBattle -	dw RockTunnel2AfterBattleText8 ; 0x6129 TextAfterBattle -	dw RockTunnel2EndBattleText8 ; 0x6124 TextEndBattle -	dw RockTunnel2EndBattleText8 ; 0x6124 TextEndBattle +	dw RockTunnel2BattleText8 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText8 ; TextAfterBattle +	dw RockTunnel2EndBattleText8 ; TextEndBattle +	dw RockTunnel2EndBattleText8 ; TextEndBattle  RockTunnel2TrainerHeader8: ; 46068 (11:6068)  	db $8 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd87d ; flag's byte -	dw RockTunnel2BattleText9 ; 0x612e TextBeforeBattle -	dw RockTunnel2AfterBattleText9 ; 0x6138 TextAfterBattle -	dw RockTunnel2EndBattleText9 ; 0x6133 TextEndBattle -	dw RockTunnel2EndBattleText9 ; 0x6133 TextEndBattle +	dw RockTunnel2BattleText9 ; TextBeforeBattle +	dw RockTunnel2AfterBattleText9 ; TextAfterBattle +	dw RockTunnel2EndBattleText9 ; TextEndBattle +	dw RockTunnel2EndBattleText9 ; TextEndBattle  	db $ff  RockTunnel2Text1: ; 46075 (11:6075) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  RockTunnel2Text2: ; 4607f (11:607f) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  RockTunnel2Text3: ; 46089 (11:6089) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  RockTunnel2Text4: ; 46093 (11:6093) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  RockTunnel2Text5: ; 4609d (11:609d) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  RockTunnel2Text6: ; 460a7 (11:60a7) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  RockTunnel2Text7: ; 460b1 (11:60b1) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd  RockTunnel2Text8: ; 460bb (11:60bb) -	db $08 ; asm +	TX_ASM  	ld hl, RockTunnel2TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route1.asm b/scripts/route1.asm index 189b987b..74ac9605 100755 --- a/scripts/route1.asm +++ b/scripts/route1.asm @@ -7,24 +7,24 @@ Route1TextPointers: ; 1cab2 (7:4ab2)  	dw Route1Text3  Route1Text1: ; 1cab8 (7:4ab8) -	db $08 ; asm +	TX_ASM  	ld hl, wd7bf  	bit 0, [hl]  	set 0, [hl] -	jr nz, .asm_02840 ; 0x1cac0 +	jr nz, .asm_1cada  	ld hl, Route1ViridianMartSampleText  	call PrintText  	ld bc, (POTION << 8) | 1  	call GiveItem  	jr nc, .BagFull -	ld hl, Route1Text_1cae8 ; $4ae8 -	jr .asm_46d43 ; 0x1cad3 +	ld hl, Route1Text_1cae8 +	jr .asm_1cadd  .BagFull -	ld hl, Route1Text_1caf3 ; $4af3 -	jr .asm_46d43 ; 0x1cad8 -.asm_02840 ; 0x1cada -	ld hl, Route1Text_1caee ; $4aee -.asm_46d43 ; 0x1cadd +	ld hl, Route1Text_1caf3 +	jr .asm_1cadd +.asm_1cada +	ld hl, Route1Text_1caee +.asm_1cadd  	call PrintText  	jp TextScriptEnd diff --git a/scripts/route10.asm b/scripts/route10.asm index c587b1df..fbc3b01a 100755 --- a/scripts/route10.asm +++ b/scripts/route10.asm @@ -29,60 +29,60 @@ Route10TrainerHeader0: ; 59363 (16:5363)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d1 ; flag's byte -	dw Route10BattleText1 ; 0x53b6 TextBeforeBattle -	dw Route10AfterBattleText1 ; 0x53c0 TextAfterBattle -	dw Route10EndBattleText1 ; 0x53bb TextEndBattle -	dw Route10EndBattleText1 ; 0x53bb TextEndBattle +	dw Route10BattleText1 ; TextBeforeBattle +	dw Route10AfterBattleText1 ; TextAfterBattle +	dw Route10EndBattleText1 ; TextEndBattle +	dw Route10EndBattleText1 ; TextEndBattle  Route10TrainerHeader1: ; 5936f (16:536f)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d1 ; flag's byte -	dw Route10BattleText2 ; 0x53cf TextBeforeBattle -	dw Route10AfterBattleText2 ; 0x53d9 TextAfterBattle -	dw Route10EndBattleText2 ; 0x53d4 TextEndBattle -	dw Route10EndBattleText2 ; 0x53d4 TextEndBattle +	dw Route10BattleText2 ; TextBeforeBattle +	dw Route10AfterBattleText2 ; TextAfterBattle +	dw Route10EndBattleText2 ; TextEndBattle +	dw Route10EndBattleText2 ; TextEndBattle  Route10TrainerHeader2: ; 5937b (16:537b)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d1 ; flag's byte -	dw Route10BattleText3 ; 0x53e8 TextBeforeBattle -	dw Route10AfterBattleText3 ; 0x53f2 TextAfterBattle -	dw Route10EndBattleText3 ; 0x53ed TextEndBattle -	dw Route10EndBattleText3 ; 0x53ed TextEndBattle +	dw Route10BattleText3 ; TextBeforeBattle +	dw Route10AfterBattleText3 ; TextAfterBattle +	dw Route10EndBattleText3 ; TextEndBattle +	dw Route10EndBattleText3 ; TextEndBattle  Route10TrainerHeader3: ; 59387 (16:5387)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d1 ; flag's byte -	dw Route10BattleText4 ; 0x5401 TextBeforeBattle -	dw Route10AfterBattleText4 ; 0x540b TextAfterBattle -	dw Route10EndBattleText4 ; 0x5406 TextEndBattle -	dw Route10EndBattleText4 ; 0x5406 TextEndBattle +	dw Route10BattleText4 ; TextBeforeBattle +	dw Route10AfterBattleText4 ; TextAfterBattle +	dw Route10EndBattleText4 ; TextEndBattle +	dw Route10EndBattleText4 ; TextEndBattle  Route10TrainerHeader4: ; 59393 (16:5393)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d1 ; flag's byte -	dw Route10BattleText5 ; 0x541a TextBeforeBattle -	dw Route10AfterBattleText5 ; 0x5424 TextAfterBattle -	dw Route10EndBattleText5 ; 0x541f TextEndBattle -	dw Route10EndBattleText5 ; 0x541f TextEndBattle +	dw Route10BattleText5 ; TextBeforeBattle +	dw Route10AfterBattleText5 ; TextAfterBattle +	dw Route10EndBattleText5 ; TextEndBattle +	dw Route10EndBattleText5 ; TextEndBattle  Route10TrainerHeader5: ; 5939f (16:539f)  	db $6 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d1 ; flag's byte -	dw Route10BattleText6 ; 0x5433 TextBeforeBattle -	dw Route10AfterBattleText6 ; 0x543d TextAfterBattle -	dw Route10EndBattleText6 ; 0x5438 TextEndBattle -	dw Route10EndBattleText6 ; 0x5438 TextEndBattle +	dw Route10BattleText6 ; TextBeforeBattle +	dw Route10AfterBattleText6 ; TextAfterBattle +	dw Route10EndBattleText6 ; TextEndBattle +	dw Route10EndBattleText6 ; TextEndBattle  	db $ff  Route10Text1: ; 593ac (16:53ac) -	db $08 ; asm +	TX_ASM  	ld hl, Route10TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -100,7 +100,7 @@ Route10AfterBattleText1: ; 593c0 (16:53c0)  	db "@"  Route10Text2: ; 593c5 (16:53c5) -	db $08 ; asm +	TX_ASM  	ld hl, Route10TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -118,7 +118,7 @@ Route10AfterBattleText2: ; 593d9 (16:53d9)  	db "@"  Route10Text3: ; 593de (16:53de) -	db $08 ; asm +	TX_ASM  	ld hl, Route10TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -136,7 +136,7 @@ Route10AfterBattleText3: ; 593f2 (16:53f2)  	db "@"  Route10Text4: ; 593f7 (16:53f7) -	db $08 ; asm +	TX_ASM  	ld hl, Route10TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -154,7 +154,7 @@ Route10AfterBattleText4: ; 5940b (16:540b)  	db "@"  Route10Text5: ; 59410 (16:5410) -	db $08 ; asm +	TX_ASM  	ld hl, Route10TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -172,7 +172,7 @@ Route10AfterBattleText5: ; 59424 (16:5424)  	db "@"  Route10Text6: ; 59429 (16:5429) -	db $08 ; asm +	TX_ASM  	ld hl, Route10TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route11.asm b/scripts/route11.asm index 629a6efd..7a31232b 100755 --- a/scripts/route11.asm +++ b/scripts/route11.asm @@ -30,96 +30,96 @@ Route11TrainerHeader0: ; 5947b (16:547b)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText1 ; 0x54fe TextBeforeBattle -	dw Route11AfterBattleText1 ; 0x5508 TextAfterBattle -	dw Route11EndBattleText1 ; 0x5503 TextEndBattle -	dw Route11EndBattleText1 ; 0x5503 TextEndBattle +	dw Route11BattleText1 ; TextBeforeBattle +	dw Route11AfterBattleText1 ; TextAfterBattle +	dw Route11EndBattleText1 ; TextEndBattle +	dw Route11EndBattleText1 ; TextEndBattle  Route11TrainerHeader1: ; 59487 (16:5487)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText2 ; 0x5517 TextBeforeBattle -	dw Route11AfterBattleText2 ; 0x5521 TextAfterBattle -	dw Route11EndBattleText2 ; 0x551c TextEndBattle -	dw Route11EndBattleText2 ; 0x551c TextEndBattle +	dw Route11BattleText2 ; TextBeforeBattle +	dw Route11AfterBattleText2 ; TextAfterBattle +	dw Route11EndBattleText2 ; TextEndBattle +	dw Route11EndBattleText2 ; TextEndBattle  Route11TrainerHeader2: ; 59493 (16:5493)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText3 ; 0x5530 TextBeforeBattle -	dw Route11AfterBattleText3 ; 0x553a TextAfterBattle -	dw Route11EndBattleText3 ; 0x5535 TextEndBattle -	dw Route11EndBattleText3 ; 0x5535 TextEndBattle +	dw Route11BattleText3 ; TextBeforeBattle +	dw Route11AfterBattleText3 ; TextAfterBattle +	dw Route11EndBattleText3 ; TextEndBattle +	dw Route11EndBattleText3 ; TextEndBattle  Route11TrainerHeader3: ; 5949f (16:549f)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText4 ; 0x5549 TextBeforeBattle -	dw Route11AfterBattleText4 ; 0x5553 TextAfterBattle -	dw Route11EndBattleText4 ; 0x554e TextEndBattle -	dw Route11EndBattleText4 ; 0x554e TextEndBattle +	dw Route11BattleText4 ; TextBeforeBattle +	dw Route11AfterBattleText4 ; TextAfterBattle +	dw Route11EndBattleText4 ; TextEndBattle +	dw Route11EndBattleText4 ; TextEndBattle  Route11TrainerHeader4: ; 594ab (16:54ab)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText5 ; 0x5562 TextBeforeBattle -	dw Route11AfterBattleText5 ; 0x556c TextAfterBattle -	dw Route11EndBattleText5 ; 0x5567 TextEndBattle -	dw Route11EndBattleText5 ; 0x5567 TextEndBattle +	dw Route11BattleText5 ; TextBeforeBattle +	dw Route11AfterBattleText5 ; TextAfterBattle +	dw Route11EndBattleText5 ; TextEndBattle +	dw Route11EndBattleText5 ; TextEndBattle  Route11TrainerHeader5: ; 594b7 (16:54b7)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText6 ; 0x557b TextBeforeBattle -	dw Route11AfterBattleText6 ; 0x5585 TextAfterBattle -	dw Route11EndBattleText6 ; 0x5580 TextEndBattle -	dw Route11EndBattleText6 ; 0x5580 TextEndBattle +	dw Route11BattleText6 ; TextBeforeBattle +	dw Route11AfterBattleText6 ; TextAfterBattle +	dw Route11EndBattleText6 ; TextEndBattle +	dw Route11EndBattleText6 ; TextEndBattle  Route11TrainerHeader6: ; 594c3 (16:54c3)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText7 ; 0x5594 TextBeforeBattle -	dw Route11AfterBattleText7 ; 0x559e TextAfterBattle -	dw Route11EndBattleText7 ; 0x5599 TextEndBattle -	dw Route11EndBattleText7 ; 0x5599 TextEndBattle +	dw Route11BattleText7 ; TextBeforeBattle +	dw Route11AfterBattleText7 ; TextAfterBattle +	dw Route11EndBattleText7 ; TextEndBattle +	dw Route11EndBattleText7 ; TextEndBattle  Route11TrainerHeader7: ; 594cf (16:54cf)  	db $8 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText8 ; 0x55ad TextBeforeBattle -	dw Route11AfterBattleText8 ; 0x55b7 TextAfterBattle -	dw Route11EndBattleText8 ; 0x55b2 TextEndBattle -	dw Route11EndBattleText8 ; 0x55b2 TextEndBattle +	dw Route11BattleText8 ; TextBeforeBattle +	dw Route11AfterBattleText8 ; TextAfterBattle +	dw Route11EndBattleText8 ; TextEndBattle +	dw Route11EndBattleText8 ; TextEndBattle  Route11TrainerHeader8: ; 594db (16:54db)  	db $9 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText9 ; 0x55c6 TextBeforeBattle -	dw Route11AfterBattleText9 ; 0x55d0 TextAfterBattle -	dw Route11EndBattleText9 ; 0x55cb TextEndBattle -	dw Route11EndBattleText9 ; 0x55cb TextEndBattle +	dw Route11BattleText9 ; TextBeforeBattle +	dw Route11AfterBattleText9 ; TextAfterBattle +	dw Route11EndBattleText9 ; TextEndBattle +	dw Route11EndBattleText9 ; TextEndBattle  Route11TrainerHeader9: ; 594e7 (16:54e7)  	db $a ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d5 ; flag's byte -	dw Route11BattleText10 ; 0x55df TextBeforeBattle -	dw Route11AfterBattleText10 ; 0x55e9 TextAfterBattle -	dw Route11EndBattleText10 ; 0x55e4 TextEndBattle -	dw Route11EndBattleText10 ; 0x55e4 TextEndBattle +	dw Route11BattleText10 ; TextBeforeBattle +	dw Route11AfterBattleText10 ; TextAfterBattle +	dw Route11EndBattleText10 ; TextEndBattle +	dw Route11EndBattleText10 ; TextEndBattle  	db $ff  Route11Text1: ; 594f4 (16:54f4) -	db $8 +	TX_ASM  	ld hl, Route11TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -137,7 +137,7 @@ Route11AfterBattleText1: ; 59508 (16:5508)  	db "@"  Route11Text2: ; 5950d (16:550d) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -155,7 +155,7 @@ Route11AfterBattleText2: ; 59521 (16:5521)  	db "@"  Route11Text3: ; 59526 (16:5526) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -173,7 +173,7 @@ Route11AfterBattleText3: ; 5953a (16:553a)  	db "@"  Route11Text4: ; 5953f (16:553f) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -191,7 +191,7 @@ Route11AfterBattleText4: ; 59553 (16:5553)  	db "@"  Route11Text5: ; 59558 (16:5558) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -209,7 +209,7 @@ Route11AfterBattleText5: ; 5956c (16:556c)  	db "@"  Route11Text6: ; 59571 (16:5571) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -227,7 +227,7 @@ Route11AfterBattleText6: ; 59585 (16:5585)  	db "@"  Route11Text7: ; 5958a (16:558a) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -245,7 +245,7 @@ Route11AfterBattleText7: ; 5959e (16:559e)  	db "@"  Route11Text8: ; 595a3 (16:55a3) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd @@ -263,7 +263,7 @@ Route11AfterBattleText8: ; 595b7 (16:55b7)  	db "@"  Route11Text9: ; 595bc (16:55bc) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd @@ -281,7 +281,7 @@ Route11AfterBattleText9: ; 595d0 (16:55d0)  	db "@"  Route11Text10: ; 595d5 (16:55d5) -	db $08 ; asm +	TX_ASM  	ld hl, Route11TrainerHeader9  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm index d8740986..abea062c 100755 --- a/scripts/route11gateupstairs.asm +++ b/scripts/route11gateupstairs.asm @@ -8,18 +8,18 @@ Route11GateUpstairsTextPointers: ; 49457 (12:5457)  	dw Route11GateUpstairsText4  Route11GateUpstairsText1: ; 4945f (12:545f) -	db $08 ; asm +	TX_ASM  	xor a  	ld [wWhichTrade], a  	predef DoInGameTradeDialogue -asm_49469: ; 49469 (12:5469) +Route11GateUpstairsScriptEnd: ; 49469 (12:5469)  	jp TextScriptEnd  Route11GateUpstairsText2: ; 4946c (12:546c) -	db $8 +	TX_ASM  	ld a, [wd7d6]  	add a -	jr c, .asm_4949b ; 0x49471 $28 +	jr c, .asm_4949b  	ld a, 30 ; pokemon needed  	ld [$ffdb], a  	ld a, ITEMFINDER ; oak's aide reward @@ -34,21 +34,21 @@ Route11GateUpstairsText2: ; 4946c (12:546c)  	predef OaksAideScript ; call oak's aide script  	ld a, [$ffdb]  	dec a -	jr nz, .asm_494a1 ; 0x49494 $b +	jr nz, .asm_494a1  	ld hl, wd7d6  	set 7, [hl]  .asm_4949b  	ld hl, Route11GateUpstairsText_494a3  	call PrintText  .asm_494a1 -	jr asm_49469 ; 0x494a1 $c6 +	jr Route11GateUpstairsScriptEnd  Route11GateUpstairsText_494a3: ; 494a3 (12:54a3)  	TX_FAR _Route11GateUpstairsText_494a3  	db "@"  Route11GateUpstairsText3: ; 494a8 (12:54a8) -	db $08 ; asm +	TX_ASM  	ld a, [wSpriteStateData1 + 9]  	cp $4  	jp nz, Route12GateUpstairsScript_495c9 @@ -70,8 +70,8 @@ BinocularsNoSnorlaxText:  	db "@"  Route11GateUpstairsText4: ; 494ce (12:54ce) -	db $8 -	ld hl, Route11GateUpstairsText_494d5 ; $54d5 +	TX_ASM +	ld hl, Route11GateUpstairsText_494d5  	jp Route12GateUpstairsScript_495c9  Route11GateUpstairsText_494d5: ; 494d5 (12:54d5) diff --git a/scripts/route12.asm b/scripts/route12.asm index fdaf2a85..eed676b3 100755 --- a/scripts/route12.asm +++ b/scripts/route12.asm @@ -28,12 +28,12 @@ Route12Script0: ; 59619 (16:5619)  	res 6, [hl]  	jp z, CheckFightingMapTrainers  	ld a, $d -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, SNORLAX -	ld [W_CUROPPONENT], a ; wd059 +	ld [W_CUROPPONENT], a  	ld a, 30 -	ld [W_CURENEMYLVL], a ; W_CURENEMYLVL +	ld [W_CURENEMYLVL], a  	ld a, HS_ROUTE_12_SNORLAX  	ld [wcc4d], a  	predef HideObject @@ -43,7 +43,7 @@ Route12Script0: ; 59619 (16:5619)  	ret  Route12Script3: ; 5964c (16:564c) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jr z, Route12Script_59606  	call UpdateSprites @@ -51,7 +51,7 @@ Route12Script3: ; 5964c (16:564c)  	cp $2  	jr z, .asm_59664  	ld a, $e -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_59664  	ld hl, wd7d8 @@ -83,64 +83,64 @@ Route12TrainerHeader0: ; 59691 (16:5691)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d7 ; flag's byte -	dw Route12BattleText1 ; 0x56ff TextBeforeBattle -	dw Route12AfterBattleText1 ; 0x5709 TextAfterBattle -	dw Route12EndBattleText1 ; 0x5704 TextEndBattle -	dw Route12EndBattleText1 ; 0x5704 TextEndBattle +	dw Route12BattleText1 ; TextBeforeBattle +	dw Route12AfterBattleText1 ; TextAfterBattle +	dw Route12EndBattleText1 ; TextEndBattle +	dw Route12EndBattleText1 ; TextEndBattle  Route12TrainerHeader1: ; 5969d (16:569d)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d7 ; flag's byte -	dw Route12BattleText2 ; 0x5718 TextBeforeBattle -	dw Route12AfterBattleText2 ; 0x5722 TextAfterBattle -	dw Route12EndBattleText2 ; 0x571d TextEndBattle -	dw Route12EndBattleText2 ; 0x571d TextEndBattle +	dw Route12BattleText2 ; TextBeforeBattle +	dw Route12AfterBattleText2 ; TextAfterBattle +	dw Route12EndBattleText2 ; TextEndBattle +	dw Route12EndBattleText2 ; TextEndBattle  Route12TrainerHeader2: ; 596a9 (16:56a9)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d7 ; flag's byte -	dw Route12BattleText3 ; 0x5731 TextBeforeBattle -	dw Route12AfterBattleText3 ; 0x573b TextAfterBattle -	dw Route12EndBattleText3 ; 0x5736 TextEndBattle -	dw Route12EndBattleText3 ; 0x5736 TextEndBattle +	dw Route12BattleText3 ; TextBeforeBattle +	dw Route12AfterBattleText3 ; TextAfterBattle +	dw Route12EndBattleText3 ; TextEndBattle +	dw Route12EndBattleText3 ; TextEndBattle  Route12TrainerHeader3: ; 596b5 (16:56b5)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d7 ; flag's byte -	dw Route12BattleText4 ; 0x574a TextBeforeBattle -	dw Route12AfterBattleText4 ; 0x5754 TextAfterBattle -	dw Route12EndBattleText4 ; 0x574f TextEndBattle -	dw Route12EndBattleText4 ; 0x574f TextEndBattle +	dw Route12BattleText4 ; TextBeforeBattle +	dw Route12AfterBattleText4 ; TextAfterBattle +	dw Route12EndBattleText4 ; TextEndBattle +	dw Route12EndBattleText4 ; TextEndBattle  Route12TrainerHeader4: ; 596c1 (16:56c1)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d7 ; flag's byte -	dw Route12BattleText5 ; 0x5763 TextBeforeBattle -	dw Route12AfterBattleText5 ; 0x576d TextAfterBattle -	dw Route12EndBattleText5 ; 0x5768 TextEndBattle -	dw Route12EndBattleText5 ; 0x5768 TextEndBattle +	dw Route12BattleText5 ; TextBeforeBattle +	dw Route12AfterBattleText5 ; TextAfterBattle +	dw Route12EndBattleText5 ; TextEndBattle +	dw Route12EndBattleText5 ; TextEndBattle  Route12TrainerHeader5: ; 596cd (16:56cd)  	db $7 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d7 ; flag's byte -	dw Route12BattleText6 ; 0x577c TextBeforeBattle -	dw Route12AfterBattleText6 ; 0x5786 TextAfterBattle -	dw Route12EndBattleText6 ; 0x5781 TextEndBattle -	dw Route12EndBattleText6 ; 0x5781 TextEndBattle +	dw Route12BattleText6 ; TextBeforeBattle +	dw Route12AfterBattleText6 ; TextAfterBattle +	dw Route12EndBattleText6 ; TextEndBattle +	dw Route12EndBattleText6 ; TextEndBattle  Route12TrainerHeader6: ; 596d9 (16:56d9)  	db $8 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7d7 ; flag's byte -	dw Route12BattleText7 ; 0x5795 TextBeforeBattle -	dw Route12AfterBattleText7 ; 0x579f TextAfterBattle -	dw Route12EndBattleText7 ; 0x579a TextEndBattle -	dw Route12EndBattleText7 ; 0x579a TextEndBattle +	dw Route12BattleText7 ; TextBeforeBattle +	dw Route12AfterBattleText7 ; TextAfterBattle +	dw Route12EndBattleText7 ; TextEndBattle +	dw Route12EndBattleText7 ; TextEndBattle  	db $ff @@ -157,7 +157,7 @@ Route12Text14: ; 596f0 (16:56f0)  	db "@"  Route12Text2: ; 596f5 (16:56f5) -	db $08 ; asm +	TX_ASM  	ld hl, Route12TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -175,7 +175,7 @@ Route12AfterBattleText1: ; 59709 (16:5709)  	db "@"  Route12Text3: ; 5970e (16:570e) -	db $08 ; asm +	TX_ASM  	ld hl, Route12TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -193,7 +193,7 @@ Route12AfterBattleText2: ; 59722 (16:5722)  	db "@"  Route12Text4: ; 59727 (16:5727) -	db $08 ; asm +	TX_ASM  	ld hl, Route12TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -211,7 +211,7 @@ Route12AfterBattleText3: ; 5973b (16:573b)  	db "@"  Route12Text5: ; 59740 (16:5740) -	db $08 ; asm +	TX_ASM  	ld hl, Route12TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -229,7 +229,7 @@ Route12AfterBattleText4: ; 59754 (16:5754)  	db "@"  Route12Text6: ; 59759 (16:5759) -	db $08 ; asm +	TX_ASM  	ld hl, Route12TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -247,7 +247,7 @@ Route12AfterBattleText5: ; 5976d (16:576d)  	db "@"  Route12Text7: ; 59772 (16:5772) -	db $08 ; asm +	TX_ASM  	ld hl, Route12TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -265,7 +265,7 @@ Route12AfterBattleText6: ; 59786 (16:5786)  	db "@"  Route12Text8: ; 5978b (16:578b) -	db $08 ; asm +	TX_ASM  	ld hl, Route12TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm index c4c05cd6..6ec8cfe3 100755 --- a/scripts/route12gateupstairs.asm +++ b/scripts/route12gateupstairs.asm @@ -7,10 +7,10 @@ Route12GateUpstairsTextPointers: ; 49563 (12:5563)  	dw Route12GateUpstairsText3  Route12GateUpstairsText1: ; 49569 (12:5569) -	db $08 ; asm +	TX_ASM  	ld a, [wd7d7]  	rrca -	jr c, .asm_0ad3c ; 0x4956e +	jr c, .asm_0ad3c  	ld hl, TM39PreReceiveText  	call PrintText  	ld bc, (TM_39 << 8) | 1 @@ -20,15 +20,15 @@ Route12GateUpstairsText1: ; 49569 (12:5569)  	call PrintText  	ld hl, wd7d7  	set 0, [hl] -	jr .asm_4ba56 ; 0x49589 +	jr .asm_4ba56  .BagFull  	ld hl, TM39NoRoomText  	call PrintText -	jr .asm_4ba56 ; 0x49591 -.asm_0ad3c ; 0x49593 +	jr .asm_4ba56 +.asm_0ad3c  	ld hl, TM39ExplanationText  	call PrintText -.asm_4ba56 ; 0x49599 +.asm_4ba56  	jp TextScriptEnd  TM39PreReceiveText: ; 4959c (12:559c) @@ -48,7 +48,7 @@ TM39NoRoomText: ; 495ac (12:55ac)  	db "@"  Route12GateUpstairsText2: ; 495b1 (12:55b1) -	db $08 ; asm +	TX_ASM  	ld hl, Route12GateUpstairsText_495b8  	jp Route12GateUpstairsScript_495c9 @@ -57,7 +57,7 @@ Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)  	db "@"  Route12GateUpstairsText3: ; 495bd (12:55bd) -	db $8 +	TX_ASM  	ld hl, Route12GateUpstairsText_495c4  	jp Route12GateUpstairsScript_495c9 @@ -68,9 +68,9 @@ Route12GateUpstairsText_495c4: ; 495c4 (12:55c4)  Route12GateUpstairsScript_495c9: ; 495c9 (12:55c9)  	ld a, [wSpriteStateData1 + 9]  	cp $4 -	jr z, .asm_495d4 ; 0x495ce $4 +	jr z, .asm_495d4  	ld a, $1 -	jr .asm_495d8 ; 0x495d2 $4 +	jr .asm_495d8  .asm_495d4  	call PrintText  	xor a diff --git a/scripts/route12house.asm b/scripts/route12house.asm index 44667b24..6b3e17fc 100755 --- a/scripts/route12house.asm +++ b/scripts/route12house.asm @@ -5,7 +5,7 @@ Route12HouseTextPointers: ; 56482 (15:6482)  	dw Route12HouseText1  Route12HouseText1: ; 56484 (15:6484) -	db $08 ; asm +	TX_ASM  	ld a, [wd728]  	bit 5, a  	jr nz, .asm_b4cad @@ -27,7 +27,7 @@ Route12HouseText1: ; 56484 (15:6484)  	jr .asm_df984  .asm_a2d76  	ld hl, Route12HouseText_564cf -	jr .asm_df984 ; 0x564b5 +	jr .asm_df984  .asm_b4cad  	ld hl, Route12HouseText_564d4  .asm_df984 @@ -39,9 +39,9 @@ Route12HouseText_564c0: ; 564c0 (15:64c0)  	db "@"  Route12HouseText_564c5: ; 564c5 (15:64c5) -	TX_FAR _Route12HouseText_564c5 ; 0x8ca00 +	TX_FAR _Route12HouseText_564c5  	db $0B -	TX_FAR _Route12HouseText_564ca ; 0x8ca4f +	TX_FAR _Route12HouseText_564ca  	db "@"  Route12HouseText_564cf: ; 564cf (15:64cf) diff --git a/scripts/route13.asm b/scripts/route13.asm index 21862dfc..aed4745c 100755 --- a/scripts/route13.asm +++ b/scripts/route13.asm @@ -32,96 +32,96 @@ Route13TrainerHeader0: ; 55851 (15:5851)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText2 ; 0x58d4 TextBeforeBattle -	dw Route13AfterBattleText2 ; 0x58de TextAfterBattle -	dw Route13EndBattleText2 ; 0x58d9 TextEndBattle -	dw Route13EndBattleText2 ; 0x58d9 TextEndBattle +	dw Route13BattleText2 ; TextBeforeBattle +	dw Route13AfterBattleText2 ; TextAfterBattle +	dw Route13EndBattleText2 ; TextEndBattle +	dw Route13EndBattleText2 ; TextEndBattle  Route13TrainerHeader2: ; 5585d (15:585d)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText3 ; 0x58ed TextBeforeBattle -	dw Route13AfterBattleText3 ; 0x58f7 TextAfterBattle -	dw Route13EndBattleText3 ; 0x58f2 TextEndBattle -	dw Route13EndBattleText3 ; 0x58f2 TextEndBattle +	dw Route13BattleText3 ; TextBeforeBattle +	dw Route13AfterBattleText3 ; TextAfterBattle +	dw Route13EndBattleText3 ; TextEndBattle +	dw Route13EndBattleText3 ; TextEndBattle  Route13TrainerHeader3: ; 55869 (15:5869)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText4 ; 0x5906 TextBeforeBattle -	dw Route13AfterBattleText4 ; 0x5910 TextAfterBattle -	dw Route13EndBattleText4 ; 0x590b TextEndBattle -	dw Route13EndBattleText4 ; 0x590b TextEndBattle +	dw Route13BattleText4 ; TextBeforeBattle +	dw Route13AfterBattleText4 ; TextAfterBattle +	dw Route13EndBattleText4 ; TextEndBattle +	dw Route13EndBattleText4 ; TextEndBattle  Route13TrainerHeader4: ; 55875 (15:5875)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText5 ; 0x591f TextBeforeBattle -	dw Route13AfterBattleText5 ; 0x5929 TextAfterBattle -	dw Route13EndBattleText5 ; 0x5924 TextEndBattle -	dw Route13EndBattleText5 ; 0x5924 TextEndBattle +	dw Route13BattleText5 ; TextBeforeBattle +	dw Route13AfterBattleText5 ; TextAfterBattle +	dw Route13EndBattleText5 ; TextEndBattle +	dw Route13EndBattleText5 ; TextEndBattle  Route13TrainerHeader5: ; 55881 (15:5881)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText6 ; 0x5938 TextBeforeBattle -	dw Route13AfterBattleText6 ; 0x5942 TextAfterBattle -	dw Route13EndBattleText6 ; 0x593d TextEndBattle -	dw Route13EndBattleText6 ; 0x593d TextEndBattle +	dw Route13BattleText6 ; TextBeforeBattle +	dw Route13AfterBattleText6 ; TextAfterBattle +	dw Route13EndBattleText6 ; TextEndBattle +	dw Route13EndBattleText6 ; TextEndBattle  Route13TrainerHeader6: ; 5588d (15:588d)  	db $6 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText7 ; 0x5951 TextBeforeBattle -	dw Route13AfterBattleText7 ; 0x595b TextAfterBattle -	dw Route13EndBattleText7 ; 0x5956 TextEndBattle -	dw Route13EndBattleText7 ; 0x5956 TextEndBattle +	dw Route13BattleText7 ; TextBeforeBattle +	dw Route13AfterBattleText7 ; TextAfterBattle +	dw Route13EndBattleText7 ; TextEndBattle +	dw Route13EndBattleText7 ; TextEndBattle  Route13TrainerHeader7: ; 55899 (15:5899)  	db $7 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText8 ; 0x596a TextBeforeBattle -	dw Route13AfterBattleText8 ; 0x5974 TextAfterBattle -	dw Route13EndBattleText8 ; 0x596f TextEndBattle -	dw Route13EndBattleText8 ; 0x596f TextEndBattle +	dw Route13BattleText8 ; TextBeforeBattle +	dw Route13AfterBattleText8 ; TextAfterBattle +	dw Route13EndBattleText8 ; TextEndBattle +	dw Route13EndBattleText8 ; TextEndBattle  Route13TrainerHeader8: ; 558a5 (15:58a5)  	db $8 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText9 ; 0x5983 TextBeforeBattle -	dw Route13AfterBattleText9 ; 0x598d TextAfterBattle -	dw Route13EndBattleText9 ; 0x5988 TextEndBattle -	dw Route13EndBattleText9 ; 0x5988 TextEndBattle +	dw Route13BattleText9 ; TextBeforeBattle +	dw Route13AfterBattleText9 ; TextAfterBattle +	dw Route13EndBattleText9 ; TextEndBattle +	dw Route13EndBattleText9 ; TextEndBattle  Route13TrainerHeader9: ; 558b1 (15:58b1)  	db $9 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText10 ; 0x599c TextBeforeBattle -	dw Route13AfterBattleText10 ; 0x59a6 TextAfterBattle -	dw Route13EndBattleText10 ; 0x59a1 TextEndBattle -	dw Route13EndBattleText10 ; 0x59a1 TextEndBattle +	dw Route13BattleText10 ; TextBeforeBattle +	dw Route13AfterBattleText10 ; TextAfterBattle +	dw Route13EndBattleText10 ; TextEndBattle +	dw Route13EndBattleText10 ; TextEndBattle  Route13TrainerHeader10: ; 558bd (15:58bd)  	db $a ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7d9 ; flag's byte -	dw Route13BattleText11 ; 0x59b5 TextBeforeBattle -	dw Route13AfterBattleText11 ; 0x59bf TextAfterBattle -	dw Route13EndBattleText11 ; 0x59ba TextEndBattle -	dw Route13EndBattleText11 ; 0x59ba TextEndBattle +	dw Route13BattleText11 ; TextBeforeBattle +	dw Route13AfterBattleText11 ; TextAfterBattle +	dw Route13EndBattleText11 ; TextEndBattle +	dw Route13EndBattleText11 ; TextEndBattle  	db $ff  Route13Text1: ; 558ca (15:58ca) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -139,7 +139,7 @@ Route13AfterBattleText2: ; 558de (15:58de)  	db "@"  Route13Text2: ; 558e3 (15:58e3) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -157,7 +157,7 @@ Route13AfterBattleText3: ; 558f7 (15:58f7)  	db "@"  Route13Text3: ; 558fc (15:58fc) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -175,7 +175,7 @@ Route13AfterBattleText4: ; 55910 (15:5910)  	db "@"  Route13Text4: ; 55915 (15:5915) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -193,7 +193,7 @@ Route13AfterBattleText5: ; 55929 (15:5929)  	db "@"  Route13Text5: ; 5592e (15:592e) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -211,7 +211,7 @@ Route13AfterBattleText6: ; 55942 (15:5942)  	db "@"  Route13Text6: ; 55947 (15:5947) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -229,7 +229,7 @@ Route13AfterBattleText7: ; 5595b (15:595b)  	db "@"  Route13Text7: ; 55960 (15:5960) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd @@ -247,7 +247,7 @@ Route13AfterBattleText8: ; 55974 (15:5974)  	db "@"  Route13Text8: ; 55979 (15:5979) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd @@ -265,7 +265,7 @@ Route13AfterBattleText9: ; 5598d (15:598d)  	db "@"  Route13Text9: ; 55992 (15:5992) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader9  	call TalkToTrainer  	jp TextScriptEnd @@ -283,7 +283,7 @@ Route13AfterBattleText10: ; 559a6 (15:59a6)  	db "@"  Route13Text10: ; 559ab (15:59ab) -	db $08 ; asm +	TX_ASM  	ld hl, Route13TrainerHeader10  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route14.asm b/scripts/route14.asm index d430f858..25a2cd85 100755 --- a/scripts/route14.asm +++ b/scripts/route14.asm @@ -30,96 +30,96 @@ Route14TrainerHeader0: ; 55a02 (15:5a02)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText1 ; 0x5a85 TextBeforeBattle -	dw Route14AfterBattleText1 ; 0x5a8f TextAfterBattle -	dw Route14EndBattleText1 ; 0x5a8a TextEndBattle -	dw Route14EndBattleText1 ; 0x5a8a TextEndBattle +	dw Route14BattleText1 ; TextBeforeBattle +	dw Route14AfterBattleText1 ; TextAfterBattle +	dw Route14EndBattleText1 ; TextEndBattle +	dw Route14EndBattleText1 ; TextEndBattle  Route14TrainerHeader1: ; 55a0e (15:5a0e)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText2 ; 0x5a9e TextBeforeBattle -	dw Route14AfterBattleText2 ; 0x5aa8 TextAfterBattle -	dw Route14EndBattleText2 ; 0x5aa3 TextEndBattle -	dw Route14EndBattleText2 ; 0x5aa3 TextEndBattle +	dw Route14BattleText2 ; TextBeforeBattle +	dw Route14AfterBattleText2 ; TextAfterBattle +	dw Route14EndBattleText2 ; TextEndBattle +	dw Route14EndBattleText2 ; TextEndBattle  Route14TrainerHeader2: ; 55a1a (15:5a1a)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText3 ; 0x5ab7 TextBeforeBattle -	dw Route14AfterBattleText3 ; 0x5ac1 TextAfterBattle -	dw Route14EndBattleText3 ; 0x5abc TextEndBattle -	dw Route14EndBattleText3 ; 0x5abc TextEndBattle +	dw Route14BattleText3 ; TextBeforeBattle +	dw Route14AfterBattleText3 ; TextAfterBattle +	dw Route14EndBattleText3 ; TextEndBattle +	dw Route14EndBattleText3 ; TextEndBattle  Route14TrainerHeader3: ; 55a26 (15:5a26)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText4 ; 0x5ad0 TextBeforeBattle -	dw Route14AfterBattleText4 ; 0x5ada TextAfterBattle -	dw Route14EndBattleText4 ; 0x5ad5 TextEndBattle -	dw Route14EndBattleText4 ; 0x5ad5 TextEndBattle +	dw Route14BattleText4 ; TextBeforeBattle +	dw Route14AfterBattleText4 ; TextAfterBattle +	dw Route14EndBattleText4 ; TextEndBattle +	dw Route14EndBattleText4 ; TextEndBattle  Route14TrainerHeader4: ; 55a32 (15:5a32)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText5 ; 0x5ae9 TextBeforeBattle -	dw Route14AfterBattleText5 ; 0x5af3 TextAfterBattle -	dw Route14EndBattleText5 ; 0x5aee TextEndBattle -	dw Route14EndBattleText5 ; 0x5aee TextEndBattle +	dw Route14BattleText5 ; TextBeforeBattle +	dw Route14AfterBattleText5 ; TextAfterBattle +	dw Route14EndBattleText5 ; TextEndBattle +	dw Route14EndBattleText5 ; TextEndBattle  Route14TrainerHeader5: ; 55a3e (15:5a3e)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText6 ; 0x5b02 TextBeforeBattle -	dw Route14AfterBattleText6 ; 0x5b0c TextAfterBattle -	dw Route14EndBattleText6 ; 0x5b07 TextEndBattle -	dw Route14EndBattleText6 ; 0x5b07 TextEndBattle +	dw Route14BattleText6 ; TextBeforeBattle +	dw Route14AfterBattleText6 ; TextAfterBattle +	dw Route14EndBattleText6 ; TextEndBattle +	dw Route14EndBattleText6 ; TextEndBattle  Route14TrainerHeader6: ; 55a4a (15:5a4a)  	db $7 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText7 ; 0x5b1b TextBeforeBattle -	dw Route14AfterBattleText7 ; 0x5b25 TextAfterBattle -	dw Route14EndBattleText7 ; 0x5b20 TextEndBattle -	dw Route14EndBattleText7 ; 0x5b20 TextEndBattle +	dw Route14BattleText7 ; TextBeforeBattle +	dw Route14AfterBattleText7 ; TextAfterBattle +	dw Route14EndBattleText7 ; TextEndBattle +	dw Route14EndBattleText7 ; TextEndBattle  Route14TrainerHeader7: ; 55a56 (15:5a56)  	db $8 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText8 ; 0x5b34 TextBeforeBattle -	dw Route14AfterBattleText8 ; 0x5b3e TextAfterBattle -	dw Route14EndBattleText8 ; 0x5b39 TextEndBattle -	dw Route14EndBattleText8 ; 0x5b39 TextEndBattle +	dw Route14BattleText8 ; TextBeforeBattle +	dw Route14AfterBattleText8 ; TextAfterBattle +	dw Route14EndBattleText8 ; TextEndBattle +	dw Route14EndBattleText8 ; TextEndBattle  Route14TrainerHeader8: ; 55a62 (15:5a62)  	db $9 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText9 ; 0x5b4d TextBeforeBattle -	dw Route14AfterBattleText9 ; 0x5b57 TextAfterBattle -	dw Route14EndBattleText9 ; 0x5b52 TextEndBattle -	dw Route14EndBattleText9 ; 0x5b52 TextEndBattle +	dw Route14BattleText9 ; TextBeforeBattle +	dw Route14AfterBattleText9 ; TextAfterBattle +	dw Route14EndBattleText9 ; TextEndBattle +	dw Route14EndBattleText9 ; TextEndBattle  Route14TrainerHeader9: ; 55a6e (15:5a6e)  	db $a ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7db ; flag's byte -	dw Route14BattleText10 ; 0x5b66 TextBeforeBattle -	dw Route14AfterBattleText10 ; 0x5b70 TextAfterBattle -	dw Route14EndBattleText10 ; 0x5b6b TextEndBattle -	dw Route14EndBattleText10 ; 0x5b6b TextEndBattle +	dw Route14BattleText10 ; TextBeforeBattle +	dw Route14AfterBattleText10 ; TextAfterBattle +	dw Route14EndBattleText10 ; TextEndBattle +	dw Route14EndBattleText10 ; TextEndBattle  	db $ff  Route14Text1: ; 55a7b (15:5a7b) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -137,7 +137,7 @@ Route14AfterBattleText1: ; 55a8f (15:5a8f)  	db "@"  Route14Text2: ; 55a94 (15:5a94) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -155,7 +155,7 @@ Route14AfterBattleText2: ; 55aa8 (15:5aa8)  	db "@"  Route14Text3: ; 55aad (15:5aad) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -173,7 +173,7 @@ Route14AfterBattleText3: ; 55ac1 (15:5ac1)  	db "@"  Route14Text4: ; 55ac6 (15:5ac6) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -191,7 +191,7 @@ Route14AfterBattleText4: ; 55ada (15:5ada)  	db "@"  Route14Text5: ; 55adf (15:5adf) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -209,7 +209,7 @@ Route14AfterBattleText5: ; 55af3 (15:5af3)  	db "@"  Route14Text6: ; 55af8 (15:5af8) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -227,7 +227,7 @@ Route14AfterBattleText6: ; 55b0c (15:5b0c)  	db "@"  Route14Text7: ; 55b11 (15:5b11) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -245,7 +245,7 @@ Route14AfterBattleText7: ; 55b25 (15:5b25)  	db "@"  Route14Text8: ; 55b2a (15:5b2a) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd @@ -263,7 +263,7 @@ Route14AfterBattleText8: ; 55b3e (15:5b3e)  	db "@"  Route14Text9: ; 55b43 (15:5b43) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd @@ -281,7 +281,7 @@ Route14AfterBattleText9: ; 55b57 (15:5b57)  	db "@"  Route14Text10: ; 55b5c (15:5b5c) -	db $08 ; asm +	TX_ASM  	ld hl, Route14TrainerHeader9  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route15.asm b/scripts/route15.asm index 733d4a1c..3aa23bbb 100755 --- a/scripts/route15.asm +++ b/scripts/route15.asm @@ -31,143 +31,143 @@ Route15TrainerHeader0: ; 597df (16:57df)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText1 ; 0x5898 TextBeforeBattle -	dw Route15AfterBattleText1 ; 0x58a2 TextAfterBattle -	dw Route15EndBattleText1 ; 0x589d TextEndBattle -	dw Route15EndBattleText1 ; 0x589d TextEndBattle +	dw Route15BattleText1 ; TextBeforeBattle +	dw Route15AfterBattleText1 ; TextAfterBattle +	dw Route15EndBattleText1 ; TextEndBattle +	dw Route15EndBattleText1 ; TextEndBattle  Route15TrainerHeader1: ; 597eb (16:57eb)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText2 ; 0x58a7 TextBeforeBattle -	dw Route15AfterBattleText2 ; 0x58b1 TextAfterBattle -	dw Route15EndBattleText2 ; 0x58ac TextEndBattle -	dw Route15EndBattleText2 ; 0x58ac TextEndBattle +	dw Route15BattleText2 ; TextBeforeBattle +	dw Route15AfterBattleText2 ; TextAfterBattle +	dw Route15EndBattleText2 ; TextEndBattle +	dw Route15EndBattleText2 ; TextEndBattle  Route15TrainerHeader2: ; 597f7 (16:57f7)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText3 ; 0x58b6 TextBeforeBattle -	dw Route15AfterBattleText3 ; 0x58c0 TextAfterBattle -	dw Route15EndBattleText3 ; 0x58bb TextEndBattle -	dw Route15EndBattleText3 ; 0x58bb TextEndBattle +	dw Route15BattleText3 ; TextBeforeBattle +	dw Route15AfterBattleText3 ; TextAfterBattle +	dw Route15EndBattleText3 ; TextEndBattle +	dw Route15EndBattleText3 ; TextEndBattle  Route15TrainerHeader3: ; 59803 (16:5803)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText4 ; 0x58c5 TextBeforeBattle -	dw Route15AfterBattleText4 ; 0x58cf TextAfterBattle -	dw Route15EndBattleText4 ; 0x58ca TextEndBattle -	dw Route15EndBattleText4 ; 0x58ca TextEndBattle +	dw Route15BattleText4 ; TextBeforeBattle +	dw Route15AfterBattleText4 ; TextAfterBattle +	dw Route15EndBattleText4 ; TextEndBattle +	dw Route15EndBattleText4 ; TextEndBattle  Route15TrainerHeader4: ; 5980f (16:580f)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText5 ; 0x58d4 TextBeforeBattle -	dw Route15AfterBattleText5 ; 0x58de TextAfterBattle -	dw Route15EndBattleText5 ; 0x58d9 TextEndBattle -	dw Route15EndBattleText5 ; 0x58d9 TextEndBattle +	dw Route15BattleText5 ; TextBeforeBattle +	dw Route15AfterBattleText5 ; TextAfterBattle +	dw Route15EndBattleText5 ; TextEndBattle +	dw Route15EndBattleText5 ; TextEndBattle  Route15TrainerHeader5: ; 5981b (16:581b)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText6 ; 0x58e3 TextBeforeBattle -	dw Route15AfterBattleText6 ; 0x58ed TextAfterBattle -	dw Route15EndBattleText6 ; 0x58e8 TextEndBattle -	dw Route15EndBattleText6 ; 0x58e8 TextEndBattle +	dw Route15BattleText6 ; TextBeforeBattle +	dw Route15AfterBattleText6 ; TextAfterBattle +	dw Route15EndBattleText6 ; TextEndBattle +	dw Route15EndBattleText6 ; TextEndBattle  Route15TrainerHeader6: ; 59827 (16:5827)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText7 ; 0x58f2 TextBeforeBattle -	dw Route15AfterBattleText7 ; 0x58fc TextAfterBattle -	dw Route15EndBattleText7 ; 0x58f7 TextEndBattle -	dw Route15EndBattleText7 ; 0x58f7 TextEndBattle +	dw Route15BattleText7 ; TextBeforeBattle +	dw Route15AfterBattleText7 ; TextAfterBattle +	dw Route15EndBattleText7 ; TextEndBattle +	dw Route15EndBattleText7 ; TextEndBattle  Route15TrainerHeader7: ; 59833 (16:5833)  	db $8 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText8 ; 0x5901 TextBeforeBattle -	dw Route15AfterBattleText8 ; 0x590b TextAfterBattle -	dw Route15EndBattleText8 ; 0x5906 TextEndBattle -	dw Route15EndBattleText8 ; 0x5906 TextEndBattle +	dw Route15BattleText8 ; TextBeforeBattle +	dw Route15AfterBattleText8 ; TextAfterBattle +	dw Route15EndBattleText8 ; TextEndBattle +	dw Route15EndBattleText8 ; TextEndBattle  Route15TrainerHeader8: ; 5983f (16:583f)  	db $9 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText9 ; 0x5910 TextBeforeBattle -	dw Route15AfterBattleText9 ; 0x591a TextAfterBattle -	dw Route15EndBattleText9 ; 0x5915 TextEndBattle -	dw Route15EndBattleText9 ; 0x5915 TextEndBattle +	dw Route15BattleText9 ; TextBeforeBattle +	dw Route15AfterBattleText9 ; TextAfterBattle +	dw Route15EndBattleText9 ; TextEndBattle +	dw Route15EndBattleText9 ; TextEndBattle  Route15TrainerHeader9: ; 5984b (16:584b)  	db $a ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7dd ; flag's byte -	dw Route15BattleText10 ; 0x591f TextBeforeBattle -	dw Route15AfterBattleText10 ; 0x5929 TextAfterBattle -	dw Route15EndBattleText10 ; 0x5924 TextEndBattle -	dw Route15EndBattleText10 ; 0x5924 TextEndBattle +	dw Route15BattleText10 ; TextBeforeBattle +	dw Route15AfterBattleText10 ; TextAfterBattle +	dw Route15EndBattleText10 ; TextEndBattle +	dw Route15EndBattleText10 ; TextEndBattle  	db $ff  Route15Text1: ; 59858 (16:5858) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader0 -	jr asm_33cb7 ; 0x5985c $34 +	jr Route15TalkToTrainer  Route15Text2: ; 5985e (16:585e) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader1 -	jr asm_33cb7 ; 0x59862 $2e +	jr Route15TalkToTrainer  Route15Text3: ; 59864 (16:5864) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader2 -	jr asm_33cb7 ; 0x59868 $28 +	jr Route15TalkToTrainer  Route15Text4: ; 5986a (16:586a) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader3 -	jr asm_33cb7 ; 0x5986e $22 +	jr Route15TalkToTrainer  Route15Text5: ; 59870 (16:5870) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader4 -	jr asm_33cb7 ; 0x59874 $1c +	jr Route15TalkToTrainer  Route15Text6: ; 59876 (16:5876) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader5 -	jr asm_33cb7 ; 0x5987a $16 +	jr Route15TalkToTrainer  Route15Text7: ; 5987c (16:587c) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader6 -	jr asm_33cb7 ; 0x59880 $10 +	jr Route15TalkToTrainer  Route15Text8: ; 59882 (16:5882) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader7 -	jr asm_33cb7 ; 0x59886 $a +	jr Route15TalkToTrainer  Route15Text9: ; 59888 (16:5888) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader8 -	jr asm_33cb7 ; 0x5988c $4 +	jr Route15TalkToTrainer  Route15Text10: ; 5988e (16:588e) -	db $8 ; asm +	TX_ASM  	ld hl, Route15TrainerHeader9 -asm_33cb7: ; 59892 (16:5892) +Route15TalkToTrainer: ; 59892 (16:5892)  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route15gateupstairs.asm b/scripts/route15gateupstairs.asm index 2d328122..05bcbeea 100755 --- a/scripts/route15gateupstairs.asm +++ b/scripts/route15gateupstairs.asm @@ -6,10 +6,10 @@ Route15GateUpstairsTextPointers: ; 4964d (12:564d)  	dw Route15GateUpstairsText2  Route15GateUpstairsText1: ; 49651 (12:5651) -	db $8 +	TX_ASM  	ld a, [wd7dd]  	bit 0, a -	jr nz, .asm_49683 ; 0x49657 $2a +	jr nz, .asm_49683  	ld a, 50 ; pokemon needed  	ld [$ffdb], a  	ld a, EXP__ALL ; oak's aide reward @@ -23,7 +23,7 @@ Route15GateUpstairsText1: ; 49651 (12:5651)  	predef OaksAideScript ; call oak's aide script  	ld a, [$ffdb]  	cp $1 -	jr nz, .asm_49689 ; 0x4967c $b +	jr nz, .asm_49689  	ld hl, wd7dd  	set 0, [hl]  .asm_49683 @@ -37,7 +37,7 @@ Route15GateUpstairsText_4968c: ; 4968c (12:568c)  	db "@"  Route15GateUpstairsText2: ; 49691 (12:5691) -	db $8 +	TX_ASM  	ld hl, Route15GateUpstairsText_49698  	jp Route12GateUpstairsScript_495c9 diff --git a/scripts/route16.asm b/scripts/route16.asm index ef5b5859..b6c49a96 100755 --- a/scripts/route16.asm +++ b/scripts/route16.asm @@ -28,12 +28,12 @@ Route16Script0: ; 59959 (16:5959)  	res 0, [hl]  	jp z, CheckFightingMapTrainers  	ld a, $a -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, SNORLAX -	ld [W_CUROPPONENT], a ; wd059 +	ld [W_CUROPPONENT], a  	ld a, 30 -	ld [W_CURENEMYLVL], a ; W_CURENEMYLVL +	ld [W_CURENEMYLVL], a  	ld a, HS_ROUTE_16_SNORLAX  	ld [wcc4d], a  	predef HideObject @@ -44,7 +44,7 @@ Route16Script0: ; 59959 (16:5959)  	ret  Route16Script3: ; 5998f (16:598f) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, Route16Script_59946  	call UpdateSprites @@ -52,7 +52,7 @@ Route16Script3: ; 5998f (16:598f)  	cp $2  	jr z, .asm_599a8  	ld a, $b -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_599a8  	ld hl, wd7e0 @@ -81,60 +81,60 @@ Route16TrainerHeader0: ; 599cf (16:59cf)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7df ; flag's byte -	dw Route16BattleText1 ; 0x5a22 TextBeforeBattle -	dw Route16AfterBattleText1 ; 0x5a2c TextAfterBattle -	dw Route16EndBattleText1 ; 0x5a27 TextEndBattle -	dw Route16EndBattleText1 ; 0x5a27 TextEndBattle +	dw Route16BattleText1 ; TextBeforeBattle +	dw Route16AfterBattleText1 ; TextAfterBattle +	dw Route16EndBattleText1 ; TextEndBattle +	dw Route16EndBattleText1 ; TextEndBattle  Route16TrainerHeader1: ; 599db (16:59db)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7df ; flag's byte -	dw Route16BattleText2 ; 0x5a3b TextBeforeBattle -	dw Route16AfterBattleText2 ; 0x5a45 TextAfterBattle -	dw Route16EndBattleText2 ; 0x5a40 TextEndBattle -	dw Route16EndBattleText2 ; 0x5a40 TextEndBattle +	dw Route16BattleText2 ; TextBeforeBattle +	dw Route16AfterBattleText2 ; TextAfterBattle +	dw Route16EndBattleText2 ; TextEndBattle +	dw Route16EndBattleText2 ; TextEndBattle  Route16TrainerHeader2: ; 599e7 (16:59e7)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7df ; flag's byte -	dw Route16BattleText3 ; 0x5a54 TextBeforeBattle -	dw Route16AfterBattleText3 ; 0x5a5e TextAfterBattle -	dw Route16EndBattleText3 ; 0x5a59 TextEndBattle -	dw Route16EndBattleText3 ; 0x5a59 TextEndBattle +	dw Route16BattleText3 ; TextBeforeBattle +	dw Route16AfterBattleText3 ; TextAfterBattle +	dw Route16EndBattleText3 ; TextEndBattle +	dw Route16EndBattleText3 ; TextEndBattle  Route16TrainerHeader3: ; 599f3 (16:59f3)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7df ; flag's byte -	dw Route16BattleText4 ; 0x5a6d TextBeforeBattle -	dw Route16AfterBattleText4 ; 0x5a77 TextAfterBattle -	dw Route16EndBattleText4 ; 0x5a72 TextEndBattle -	dw Route16EndBattleText4 ; 0x5a72 TextEndBattle +	dw Route16BattleText4 ; TextBeforeBattle +	dw Route16AfterBattleText4 ; TextAfterBattle +	dw Route16EndBattleText4 ; TextEndBattle +	dw Route16EndBattleText4 ; TextEndBattle  Route16TrainerHeader4: ; 599ff (16:59ff)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7df ; flag's byte -	dw Route16BattleText5 ; 0x5a86 TextBeforeBattle -	dw Route16AfterBattleText5 ; 0x5a90 TextAfterBattle -	dw Route16EndBattleText5 ; 0x5a8b TextEndBattle -	dw Route16EndBattleText5 ; 0x5a8b TextEndBattle +	dw Route16BattleText5 ; TextBeforeBattle +	dw Route16AfterBattleText5 ; TextAfterBattle +	dw Route16EndBattleText5 ; TextEndBattle +	dw Route16EndBattleText5 ; TextEndBattle  Route16TrainerHeader5: ; 59a0b (16:5a0b)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7df ; flag's byte -	dw Route16BattleText6 ; 0x5a9f TextBeforeBattle -	dw Route16AfterBattleText6 ; 0x5aa9 TextAfterBattle -	dw Route16EndBattleText6 ; 0x5aa4 TextEndBattle -	dw Route16EndBattleText6 ; 0x5aa4 TextEndBattle +	dw Route16BattleText6 ; TextBeforeBattle +	dw Route16AfterBattleText6 ; TextAfterBattle +	dw Route16EndBattleText6 ; TextEndBattle +	dw Route16EndBattleText6 ; TextEndBattle  	db $ff  Route16Text1: ; 59a18 (16:5a18) -	db $08 ; asm +	TX_ASM  	ld hl, Route16TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -152,7 +152,7 @@ Route16AfterBattleText1: ; 59a2c (16:5a2c)  	db "@"  Route16Text2: ; 59a31 (16:5a31) -	db $08 ; asm +	TX_ASM  	ld hl, Route16TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -170,7 +170,7 @@ Route16AfterBattleText2: ; 59a45 (16:5a45)  	db "@"  Route16Text3: ; 59a4a (16:5a4a) -	db $08 ; asm +	TX_ASM  	ld hl, Route16TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -188,7 +188,7 @@ Route16AfterBattleText3: ; 59a5e (16:5a5e)  	db "@"  Route16Text4: ; 59a63 (16:5a63) -	db $08 ; asm +	TX_ASM  	ld hl, Route16TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -206,7 +206,7 @@ Route16AfterBattleText4: ; 59a77 (16:5a77)  	db "@"  Route16Text5: ; 59a7c (16:5a7c) -	db $08 ; asm +	TX_ASM  	ld hl, Route16TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -224,7 +224,7 @@ Route16AfterBattleText5: ; 59a90 (16:5a90)  	db "@"  Route16Text6: ; 59a95 (16:5a95) -	db $08 ; asm +	TX_ASM  	ld hl, Route16TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm index 54bca413..d245e249 100755 --- a/scripts/route16gate.asm +++ b/scripts/route16gate.asm @@ -25,7 +25,7 @@ Route16GateScript0: ; 496d7 (12:56d7)  	ld [hJoyHeld], a  	ld a, [wWhichTrade]  	cp $1 -	jr z, .asm_4970e ; 0x496f1 $1b +	jr z, .asm_4970e  	ld a, [wWhichTrade]  	dec a  	ld [wSimulatedJoypadStatesIndex], a @@ -92,16 +92,16 @@ Route16GateTextPointers: ; 4975a (12:575a)  	dw Route16GateText3  Route16GateText1: ; 49760 (12:5760) -	db $08 ; asm +	TX_ASM  	call Route16GateScript_49755 -	jr z, .asm_0bdf3 ; 0x49764 +	jr z, .asm_0bdf3  	ld hl, Route16GateText_4977c  	call PrintText -	jr .asm_56c9d ; 0x4976c -.asm_0bdf3 ; 0x4976e +	jr .asm_56c9d +.asm_0bdf3  	ld hl, Route16GateText_49777  	call PrintText -.asm_56c9d ; 0x49774 +.asm_56c9d  	jp TextScriptEnd  Route16GateText_49777: ; 49777 (12:5777) diff --git a/scripts/route16gateupstairs.asm b/scripts/route16gateupstairs.asm index c9996dcd..6027d57b 100755 --- a/scripts/route16gateupstairs.asm +++ b/scripts/route16gateupstairs.asm @@ -8,7 +8,7 @@ Route16GateUpstairsTextPointers: ; 4980e (12:580e)  	dw Route16GateUpstairsText4  Route16GateUpstairsText1: ; 49816 (12:5816) -	db $08 ; asm +	TX_ASM  	ld hl, Route16GateUpstairsText_49820  	call PrintText  	jp TextScriptEnd @@ -18,7 +18,7 @@ Route16GateUpstairsText_49820: ; 49820 (12:5820)  	db "@"  Route16GateUpstairsText2: ; 49825 (12:5825) -	db $08 ; asm +	TX_ASM  	ld hl, Route16GateUpstairsText_4982f  	call PrintText  	jp TextScriptEnd @@ -28,7 +28,7 @@ Route16GateUpstairsText_4982f: ; 4982f (12:582f)  	db "@"  Route16GateUpstairsText3: ; 49834 (12:5834) -	db $8 +	TX_ASM  	ld hl, Route16GateUpstairsText_4983b  	jp Route12GateUpstairsScript_495c9 @@ -37,8 +37,8 @@ Route16GateUpstairsText_4983b: ; 4983b (12:583b)  	db "@"  Route16GateUpstairsText4: ; 49840 (12:5840) -	db $8 -	ld hl, Route16GateUpstairsText_49847 ; $5847 +	TX_ASM +	ld hl, Route16GateUpstairsText_49847  	jp Route12GateUpstairsScript_495c9  Route16GateUpstairsText_49847: ; 49847 (12:5847) diff --git a/scripts/route16house.asm b/scripts/route16house.asm index 9a189757..5035b190 100755 --- a/scripts/route16house.asm +++ b/scripts/route16house.asm @@ -6,11 +6,11 @@ Route16HouseTextPointers: ; 1e5fb (7:65fb)  	dw Route16HouseText2  Route16HouseText1: ; 1e5ff (7:65ff) -	db $08 ; asm +	TX_ASM  	ld a, [wd7e0]  	bit 6, a  	ld hl, HM02ExplanationText -	jr nz, .asm_13616 ; 0x1e608 +	jr nz, .asm_13616  	ld hl, Route16HouseText3  	call PrintText  	ld bc, (HM_02 << 8) | 1 @@ -19,10 +19,10 @@ Route16HouseText1: ; 1e5ff (7:65ff)  	ld hl, wd7e0  	set 6, [hl]  	ld hl, ReceivedHM02Text -	jr .asm_13616 ; 0x1e620 +	jr .asm_13616  .BagFull  	ld hl, HM02NoRoomText -.asm_13616 ; 0x1e625 +.asm_13616  	call PrintText  	jp TextScriptEnd @@ -43,7 +43,7 @@ HM02NoRoomText: ; 1e63b (7:663b)  	db "@"  Route16HouseText2: ; 1e640 (7:6640) -	db $08 ; asm +	TX_ASM  	ld hl, Route16HouseText_1e652  	call PrintText  	ld a, FEAROW diff --git a/scripts/route17.asm b/scripts/route17.asm index ffd00634..8de70c3b 100755 --- a/scripts/route17.asm +++ b/scripts/route17.asm @@ -35,96 +35,96 @@ Route17TrainerHeader0: ; 55bb3 (15:5bb3)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText1 ; 0x5c36 TextBeforeBattle -	dw Route17AfterBattleText1 ; 0x5c40 TextAfterBattle -	dw Route17EndBattleText1 ; 0x5c3b TextEndBattle -	dw Route17EndBattleText1 ; 0x5c3b TextEndBattle +	dw Route17BattleText1 ; TextBeforeBattle +	dw Route17AfterBattleText1 ; TextAfterBattle +	dw Route17EndBattleText1 ; TextEndBattle +	dw Route17EndBattleText1 ; TextEndBattle  Route17TrainerHeader1: ; 55bbf (15:5bbf)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText2 ; 0x5c4f TextBeforeBattle -	dw Route17AfterBattleText2 ; 0x5c59 TextAfterBattle -	dw Route17EndBattleText2 ; 0x5c54 TextEndBattle -	dw Route17EndBattleText2 ; 0x5c54 TextEndBattle +	dw Route17BattleText2 ; TextBeforeBattle +	dw Route17AfterBattleText2 ; TextAfterBattle +	dw Route17EndBattleText2 ; TextEndBattle +	dw Route17EndBattleText2 ; TextEndBattle  Route17TrainerHeader2: ; 55bcb (15:5bcb)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText3 ; 0x5c68 TextBeforeBattle -	dw Route17AfterBattleText3 ; 0x5c72 TextAfterBattle -	dw Route17EndBattleText3 ; 0x5c6d TextEndBattle -	dw Route17EndBattleText3 ; 0x5c6d TextEndBattle +	dw Route17BattleText3 ; TextBeforeBattle +	dw Route17AfterBattleText3 ; TextAfterBattle +	dw Route17EndBattleText3 ; TextEndBattle +	dw Route17EndBattleText3 ; TextEndBattle  Route17TrainerHeader3: ; 55bd7 (15:5bd7)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText4 ; 0x5c81 TextBeforeBattle -	dw Route17AfterBattleText4 ; 0x5c8b TextAfterBattle -	dw Route17EndBattleText4 ; 0x5c86 TextEndBattle -	dw Route17EndBattleText4 ; 0x5c86 TextEndBattle +	dw Route17BattleText4 ; TextBeforeBattle +	dw Route17AfterBattleText4 ; TextAfterBattle +	dw Route17EndBattleText4 ; TextEndBattle +	dw Route17EndBattleText4 ; TextEndBattle  Route17TrainerHeader4: ; 55be3 (15:5be3)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText5 ; 0x5c9a TextBeforeBattle -	dw Route17AfterBattleText5 ; 0x5ca4 TextAfterBattle -	dw Route17EndBattleText5 ; 0x5c9f TextEndBattle -	dw Route17EndBattleText5 ; 0x5c9f TextEndBattle +	dw Route17BattleText5 ; TextBeforeBattle +	dw Route17AfterBattleText5 ; TextAfterBattle +	dw Route17EndBattleText5 ; TextEndBattle +	dw Route17EndBattleText5 ; TextEndBattle  Route17TrainerHeader5: ; 55bef (15:5bef)  	db $6 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText6 ; 0x5cb3 TextBeforeBattle -	dw Route17AfterBattleText6 ; 0x5cbd TextAfterBattle -	dw Route17EndBattleText6 ; 0x5cb8 TextEndBattle -	dw Route17EndBattleText6 ; 0x5cb8 TextEndBattle +	dw Route17BattleText6 ; TextBeforeBattle +	dw Route17AfterBattleText6 ; TextAfterBattle +	dw Route17EndBattleText6 ; TextEndBattle +	dw Route17EndBattleText6 ; TextEndBattle  Route17TrainerHeader6: ; 55bfb (15:5bfb)  	db $7 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText7 ; 0x5ccc TextBeforeBattle -	dw Route17AfterBattleText7 ; 0x5cd6 TextAfterBattle -	dw Route17EndBattleText7 ; 0x5cd1 TextEndBattle -	dw Route17EndBattleText7 ; 0x5cd1 TextEndBattle +	dw Route17BattleText7 ; TextBeforeBattle +	dw Route17AfterBattleText7 ; TextAfterBattle +	dw Route17EndBattleText7 ; TextEndBattle +	dw Route17EndBattleText7 ; TextEndBattle  Route17TrainerHeader7: ; 55c07 (15:5c07)  	db $8 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText8 ; 0x5ce5 TextBeforeBattle -	dw Route17AfterBattleText8 ; 0x5cef TextAfterBattle -	dw Route17EndBattleText8 ; 0x5cea TextEndBattle -	dw Route17EndBattleText8 ; 0x5cea TextEndBattle +	dw Route17BattleText8 ; TextBeforeBattle +	dw Route17AfterBattleText8 ; TextAfterBattle +	dw Route17EndBattleText8 ; TextEndBattle +	dw Route17EndBattleText8 ; TextEndBattle  Route17TrainerHeader8: ; 55c13 (15:5c13)  	db $9 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText9 ; 0x5cfe TextBeforeBattle -	dw Route17AfterBattleText9 ; 0x5d08 TextAfterBattle -	dw Route17EndBattleText9 ; 0x5d03 TextEndBattle -	dw Route17EndBattleText9 ; 0x5d03 TextEndBattle +	dw Route17BattleText9 ; TextBeforeBattle +	dw Route17AfterBattleText9 ; TextAfterBattle +	dw Route17EndBattleText9 ; TextEndBattle +	dw Route17EndBattleText9 ; TextEndBattle  Route17TrainerHeader9: ; 55c1f (15:5c1f)  	db $a ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e1 ; flag's byte -	dw Route17BattleText10 ; 0x5d17 TextBeforeBattle -	dw Route17AfterBattleText10 ; 0x5d21 TextAfterBattle -	dw Route17EndBattleText10 ; 0x5d1c TextEndBattle -	dw Route17EndBattleText10 ; 0x5d1c TextEndBattle +	dw Route17BattleText10 ; TextBeforeBattle +	dw Route17AfterBattleText10 ; TextAfterBattle +	dw Route17EndBattleText10 ; TextEndBattle +	dw Route17EndBattleText10 ; TextEndBattle  	db $ff  Route17Text1: ; 55c2c (15:5c2c) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -142,7 +142,7 @@ Route17AfterBattleText1: ; 55c40 (15:5c40)  	db "@"  Route17Text2: ; 55c45 (15:5c45) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -160,7 +160,7 @@ Route17AfterBattleText2: ; 55c59 (15:5c59)  	db "@"  Route17Text3: ; 55c5e (15:5c5e) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -178,7 +178,7 @@ Route17AfterBattleText3: ; 55c72 (15:5c72)  	db "@"  Route17Text4: ; 55c77 (15:5c77) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -196,7 +196,7 @@ Route17AfterBattleText4: ; 55c8b (15:5c8b)  	db "@"  Route17Text5: ; 55c90 (15:5c90) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -214,7 +214,7 @@ Route17AfterBattleText5: ; 55ca4 (15:5ca4)  	db "@"  Route17Text6: ; 55ca9 (15:5ca9) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -232,7 +232,7 @@ Route17AfterBattleText6: ; 55cbd (15:5cbd)  	db "@"  Route17Text7: ; 55cc2 (15:5cc2) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -250,7 +250,7 @@ Route17AfterBattleText7: ; 55cd6 (15:5cd6)  	db "@"  Route17Text8: ; 55cdb (15:5cdb) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd @@ -268,7 +268,7 @@ Route17AfterBattleText8: ; 55cef (15:5cef)  	db "@"  Route17Text9: ; 55cf4 (15:5cf4) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd @@ -286,7 +286,7 @@ Route17AfterBattleText9: ; 55d08 (15:5d08)  	db "@"  Route17Text10: ; 55d0d (15:5d0d) -	db $08 ; asm +	TX_ASM  	ld hl, Route17TrainerHeader9  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route18.asm b/scripts/route18.asm index de2fe19a..80242169 100755 --- a/scripts/route18.asm +++ b/scripts/route18.asm @@ -24,33 +24,33 @@ Route18TrainerHeader0: ; 59aea (16:5aea)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e3 ; flag's byte -	dw Route18BattleText1 ; 0x5b19 TextBeforeBattle -	dw Route18AfterBattleText1 ; 0x5b23 TextAfterBattle -	dw Route18EndBattleText1 ; 0x5b1e TextEndBattle -	dw Route18EndBattleText1 ; 0x5b1e TextEndBattle +	dw Route18BattleText1 ; TextBeforeBattle +	dw Route18AfterBattleText1 ; TextAfterBattle +	dw Route18EndBattleText1 ; TextEndBattle +	dw Route18EndBattleText1 ; TextEndBattle  Route18TrainerHeader1: ; 59af6 (16:5af6)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e3 ; flag's byte -	dw Route18BattleText2 ; 0x5b32 TextBeforeBattle -	dw Route18AfterBattleText2 ; 0x5b3c TextAfterBattle -	dw Route18EndBattleText2 ; 0x5b37 TextEndBattle -	dw Route18EndBattleText2 ; 0x5b37 TextEndBattle +	dw Route18BattleText2 ; TextBeforeBattle +	dw Route18AfterBattleText2 ; TextAfterBattle +	dw Route18EndBattleText2 ; TextEndBattle +	dw Route18EndBattleText2 ; TextEndBattle  Route18TrainerHeader2: ; 59b02 (16:5b02)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e3 ; flag's byte -	dw Route18BattleText3 ; 0x5b4b TextBeforeBattle -	dw Route18AfterBattleText3 ; 0x5b55 TextAfterBattle -	dw Route18EndBattleText3 ; 0x5b50 TextEndBattle -	dw Route18EndBattleText3 ; 0x5b50 TextEndBattle +	dw Route18BattleText3 ; TextBeforeBattle +	dw Route18AfterBattleText3 ; TextAfterBattle +	dw Route18EndBattleText3 ; TextEndBattle +	dw Route18EndBattleText3 ; TextEndBattle  	db $ff  Route18Text1: ; 59b0f (16:5b0f) -	db $08 ; asm +	TX_ASM  	ld hl, Route18TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -68,7 +68,7 @@ Route18AfterBattleText1: ; 59b23 (16:5b23)  	db "@"  Route18Text2: ; 59b28 (16:5b28) -	db $08 ; asm +	TX_ASM  	ld hl, Route18TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -86,7 +86,7 @@ Route18AfterBattleText2: ; 59b3c (16:5b3c)  	db "@"  Route18Text3: ; 59b41 (16:5b41) -	db $08 ; asm +	TX_ASM  	ld hl, Route18TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm index 1500f578..02f7b68c 100755 --- a/scripts/route18gate.asm +++ b/scripts/route18gate.asm @@ -25,7 +25,7 @@ Route18GateScript0: ; 4988f (12:588f)  	ld [hJoyHeld], a  	ld a, [wWhichTrade]  	cp $1 -	jr z, .asm_498c6 ; 0x498a9 $1b +	jr z, .asm_498c6  	ld a, [wWhichTrade]  	dec a  	ld [wSimulatedJoypadStatesIndex], a @@ -87,16 +87,16 @@ Route18GateTextPointers: ; 4990d (12:590d)  	dw Route18GateText2  Route18GateText1: ; 49911 (12:5911) -	db $08 ; asm +	TX_ASM  	call Route16GateScript_49755 -	jr z, .asm_3c84d ; 0x49915 +	jr z, .asm_3c84d  	ld hl, Route18GateText_4992d  	call PrintText -	jr .asm_a8410 ; 0x4991d -.asm_3c84d ; 0x4991f +	jr .asm_a8410 +.asm_3c84d  	ld hl, Route18GateText_49928  	call PrintText -.asm_a8410 ; 0x49925 +.asm_a8410  	jp TextScriptEnd  Route18GateText_49928: ; 49928 (12:5928) diff --git a/scripts/route18gateupstairs.asm b/scripts/route18gateupstairs.asm index aaa1b34e..7fc76eda 100755 --- a/scripts/route18gateupstairs.asm +++ b/scripts/route18gateupstairs.asm @@ -7,15 +7,15 @@ Route18GateUpstairsTextPointers: ; 49978 (12:5978)  	dw Route18GateUpstairsText3  Route18GateUpstairsText1: ; 4997e (12:597e) -	db $08 ; asm +	TX_ASM  	ld a, $5  	ld [wWhichTrade], a  	predef DoInGameTradeDialogue  	jp TextScriptEnd  Route18GateUpstairsText2: ; 4998c (12:598c) -	db $8 -	ld hl, Route18GateUpstairsText_49993 ; $5993 +	TX_ASM +	ld hl, Route18GateUpstairsText_49993  	jp Route12GateUpstairsScript_495c9  Route18GateUpstairsText_49993: ; 49993 (12:5993) @@ -23,8 +23,8 @@ Route18GateUpstairsText_49993: ; 49993 (12:5993)  	db "@"  Route18GateUpstairsText3: ; 49998 (12:5998) -	db $8 -	ld hl, Route18GateUpstairsText_4999f ; $599f +	TX_ASM +	ld hl, Route18GateUpstairsText_4999f  	jp Route12GateUpstairsScript_495c9  Route18GateUpstairsText_4999f: ; 4999f (12:599f) diff --git a/scripts/route19.asm b/scripts/route19.asm index 40c7aeb3..0265d2a3 100755 --- a/scripts/route19.asm +++ b/scripts/route19.asm @@ -30,150 +30,150 @@ Route19TrainerHeader0: ; 55d73 (15:5d73)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText1 ; 0x5e50 TextBeforeBattle -	dw Route19AfterBattleText1 ; 0x5e5a TextAfterBattle -	dw Route19EndBattleText1 ; 0x5e55 TextEndBattle -	dw Route19EndBattleText1 ; 0x5e55 TextEndBattle +	dw Route19BattleText1 ; TextBeforeBattle +	dw Route19AfterBattleText1 ; TextAfterBattle +	dw Route19EndBattleText1 ; TextEndBattle +	dw Route19EndBattleText1 ; TextEndBattle  Route19TrainerHeader1: ; 55d7f (15:5d7f)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText2 ; 0x5e5f TextBeforeBattle -	dw Route19AfterBattleText2 ; 0x5e69 TextAfterBattle -	dw Route19EndBattleText2 ; 0x5e64 TextEndBattle -	dw Route19EndBattleText2 ; 0x5e64 TextEndBattle +	dw Route19BattleText2 ; TextBeforeBattle +	dw Route19AfterBattleText2 ; TextAfterBattle +	dw Route19EndBattleText2 ; TextEndBattle +	dw Route19EndBattleText2 ; TextEndBattle  Route19TrainerHeader2: ; 55d8b (15:5d8b)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText3 ; 0x5e6e TextBeforeBattle -	dw Route19AfterBattleText3 ; 0x5e78 TextAfterBattle -	dw Route19EndBattleText3 ; 0x5e73 TextEndBattle -	dw Route19EndBattleText3 ; 0x5e73 TextEndBattle +	dw Route19BattleText3 ; TextBeforeBattle +	dw Route19AfterBattleText3 ; TextAfterBattle +	dw Route19EndBattleText3 ; TextEndBattle +	dw Route19EndBattleText3 ; TextEndBattle  Route19TrainerHeader3: ; 55d97 (15:5d97)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText4 ; 0x5e7d TextBeforeBattle -	dw Route19AfterBattleText4 ; 0x5e87 TextAfterBattle -	dw Route19EndBattleText4 ; 0x5e82 TextEndBattle -	dw Route19EndBattleText4 ; 0x5e82 TextEndBattle +	dw Route19BattleText4 ; TextBeforeBattle +	dw Route19AfterBattleText4 ; TextAfterBattle +	dw Route19EndBattleText4 ; TextEndBattle +	dw Route19EndBattleText4 ; TextEndBattle  Route19TrainerHeader4: ; 55da3 (15:5da3)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText5 ; 0x5e8c TextBeforeBattle -	dw Route19AfterBattleText5 ; 0x5e96 TextAfterBattle -	dw Route19EndBattleText5 ; 0x5e91 TextEndBattle -	dw Route19EndBattleText5 ; 0x5e91 TextEndBattle +	dw Route19BattleText5 ; TextBeforeBattle +	dw Route19AfterBattleText5 ; TextAfterBattle +	dw Route19EndBattleText5 ; TextEndBattle +	dw Route19EndBattleText5 ; TextEndBattle  Route19TrainerHeader5: ; 55daf (15:5daf)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText6 ; 0x5e9b TextBeforeBattle -	dw Route19AfterBattleText6 ; 0x5ea5 TextAfterBattle -	dw Route19EndBattleText6 ; 0x5ea0 TextEndBattle -	dw Route19EndBattleText6 ; 0x5ea0 TextEndBattle +	dw Route19BattleText6 ; TextBeforeBattle +	dw Route19AfterBattleText6 ; TextAfterBattle +	dw Route19EndBattleText6 ; TextEndBattle +	dw Route19EndBattleText6 ; TextEndBattle  Route19TrainerHeader6: ; 55dbb (15:5dbb)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText7 ; 0x5eaa TextBeforeBattle -	dw Route19AfterBattleText7 ; 0x5eb4 TextAfterBattle -	dw Route19EndBattleText7 ; 0x5eaf TextEndBattle -	dw Route19EndBattleText7 ; 0x5eaf TextEndBattle +	dw Route19BattleText7 ; TextBeforeBattle +	dw Route19AfterBattleText7 ; TextAfterBattle +	dw Route19EndBattleText7 ; TextEndBattle +	dw Route19EndBattleText7 ; TextEndBattle  Route19TrainerHeader7: ; 55dc7 (15:5dc7)  	db $8 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText8 ; 0x5eb9 TextBeforeBattle -	dw Route19AfterBattleText8 ; 0x5ec3 TextAfterBattle -	dw Route19EndBattleText8 ; 0x5ebe TextEndBattle -	dw Route19EndBattleText8 ; 0x5ebe TextEndBattle +	dw Route19BattleText8 ; TextBeforeBattle +	dw Route19AfterBattleText8 ; TextAfterBattle +	dw Route19EndBattleText8 ; TextEndBattle +	dw Route19EndBattleText8 ; TextEndBattle  Route19TrainerHeader8: ; 55dd3 (15:5dd3)  	db $9 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText9 ; 0x5ec8 TextBeforeBattle -	dw Route19AfterBattleText9 ; 0x5ed2 TextAfterBattle -	dw Route19EndBattleText9 ; 0x5ecd TextEndBattle -	dw Route19EndBattleText9 ; 0x5ecd TextEndBattle +	dw Route19BattleText9 ; TextBeforeBattle +	dw Route19AfterBattleText9 ; TextAfterBattle +	dw Route19EndBattleText9 ; TextEndBattle +	dw Route19EndBattleText9 ; TextEndBattle  Route19TrainerHeader9: ; 55ddf (15:5ddf)  	db $a ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e5 ; flag's byte -	dw Route19BattleText10 ; 0x5ed7 TextBeforeBattle -	dw Route19AfterBattleText10 ; 0x5ee1 TextAfterBattle -	dw Route19EndBattleText10 ; 0x5edc TextEndBattle -	dw Route19EndBattleText10 ; 0x5edc TextEndBattle +	dw Route19BattleText10 ; TextBeforeBattle +	dw Route19AfterBattleText10 ; TextAfterBattle +	dw Route19EndBattleText10 ; TextEndBattle +	dw Route19EndBattleText10 ; TextEndBattle  	db $ff  Route19Text1: ; 55dec (15:5dec) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  Route19Text2: ; 55df6 (15:5df6) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  Route19Text3: ; 55e00 (15:5e00) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  Route19Text4: ; 55e0a (15:5e0a) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  Route19Text5: ; 55e14 (15:5e14) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  Route19Text6: ; 55e1e (15:5e1e) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  Route19Text7: ; 55e28 (15:5e28) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  Route19Text8: ; 55e32 (15:5e32) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd  Route19Text9: ; 55e3c (15:5e3c) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd  Route19Text10: ; 55e46 (15:5e46) -	db $08 ; asm +	TX_ASM  	ld hl, Route19TrainerHeader9  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route20.asm b/scripts/route20.asm index 4ef57e23..085a6c18 100755 --- a/scripts/route20.asm +++ b/scripts/route20.asm @@ -4,7 +4,7 @@ Route20Script: ; 50ca9 (14:4ca9)  	res 0, [hl]  	call nz, Route20Script_50cc6  	call EnableAutoTextBoxDrawing -	ld hl, Route20TrainerHeader0 ; $4d3a +	ld hl, Route20TrainerHeader0  	ld de, Route20ScriptPointers  	ld a, [W_ROUTE20CURSCRIPT]  	call ExecuteCurMapScriptInTable @@ -16,11 +16,11 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6)  	and $3  	cp $3  	jr z, .asm_50cef -	ld a, $d7 +	ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1  	call Route20Script_50d0c -	ld a, $d8 +	ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2  	call Route20Script_50d0c -	ld hl, .MissableObjectIDs ; $4ce8 +	ld hl, .MissableObjectIDs  .asm_50cdc  	ld a, [hli]  	cp $ff @@ -86,150 +86,150 @@ Route20TrainerHeader0: ; 50d3a (14:4d3a)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText1 ; 0x4e17 TextBeforeBattle -	dw Route20AfterBattleText1 ; 0x4e21 TextAfterBattle -	dw Route20EndBattleText1 ; 0x4e1c TextEndBattle -	dw Route20EndBattleText1 ; 0x4e1c TextEndBattle +	dw Route20BattleText1 ; TextBeforeBattle +	dw Route20AfterBattleText1 ; TextAfterBattle +	dw Route20EndBattleText1 ; TextEndBattle +	dw Route20EndBattleText1 ; TextEndBattle  Route20TrainerHeader2: ; 50d46 (14:4d46)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText2 ; 0x4e26 TextBeforeBattle -	dw Route20AfterBattleText2 ; 0x4e30 TextAfterBattle -	dw Route20EndBattleText2 ; 0x4e2b TextEndBattle -	dw Route20EndBattleText2 ; 0x4e2b TextEndBattle +	dw Route20BattleText2 ; TextBeforeBattle +	dw Route20AfterBattleText2 ; TextAfterBattle +	dw Route20EndBattleText2 ; TextEndBattle +	dw Route20EndBattleText2 ; TextEndBattle  Route20TrainerHeader3: ; 50d52 (14:4d52)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText3 ; 0x4e35 TextBeforeBattle -	dw Route20AfterBattleText3 ; 0x4e3f TextAfterBattle -	dw Route20EndBattleText3 ; 0x4e3a TextEndBattle -	dw Route20EndBattleText3 ; 0x4e3a TextEndBattle +	dw Route20BattleText3 ; TextBeforeBattle +	dw Route20AfterBattleText3 ; TextAfterBattle +	dw Route20EndBattleText3 ; TextEndBattle +	dw Route20EndBattleText3 ; TextEndBattle  Route20TrainerHeader4: ; 50d5e (14:4d5e)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText4 ; 0x4e44 TextBeforeBattle -	dw Route20AfterBattleText4 ; 0x4e4e TextAfterBattle -	dw Route20EndBattleText4 ; 0x4e49 TextEndBattle -	dw Route20EndBattleText4 ; 0x4e49 TextEndBattle +	dw Route20BattleText4 ; TextBeforeBattle +	dw Route20AfterBattleText4 ; TextAfterBattle +	dw Route20EndBattleText4 ; TextEndBattle +	dw Route20EndBattleText4 ; TextEndBattle  Route20TrainerHeader5: ; 50d6a (14:4d6a)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText5 ; 0x4e53 TextBeforeBattle -	dw Route20AfterBattleText5 ; 0x4e5d TextAfterBattle -	dw Route20EndBattleText5 ; 0x4e58 TextEndBattle -	dw Route20EndBattleText5 ; 0x4e58 TextEndBattle +	dw Route20BattleText5 ; TextBeforeBattle +	dw Route20AfterBattleText5 ; TextAfterBattle +	dw Route20EndBattleText5 ; TextEndBattle +	dw Route20EndBattleText5 ; TextEndBattle  Route20TrainerHeader6: ; 50d76 (14:4d76)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText6 ; 0x4e62 TextBeforeBattle -	dw Route20AfterBattleText6 ; 0x4e6c TextAfterBattle -	dw Route20EndBattleText6 ; 0x4e67 TextEndBattle -	dw Route20EndBattleText6 ; 0x4e67 TextEndBattle +	dw Route20BattleText6 ; TextBeforeBattle +	dw Route20AfterBattleText6 ; TextAfterBattle +	dw Route20EndBattleText6 ; TextEndBattle +	dw Route20EndBattleText6 ; TextEndBattle  Route20TrainerHeader7: ; 50d82 (14:4d82)  	db $7 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText7 ; 0x4e71 TextBeforeBattle -	dw Route20AfterBattleText7 ; 0x4e7b TextAfterBattle -	dw Route20EndBattleText7 ; 0x4e76 TextEndBattle -	dw Route20EndBattleText7 ; 0x4e76 TextEndBattle +	dw Route20BattleText7 ; TextBeforeBattle +	dw Route20AfterBattleText7 ; TextAfterBattle +	dw Route20EndBattleText7 ; TextEndBattle +	dw Route20EndBattleText7 ; TextEndBattle  Route20TrainerHeader8: ; 50d8e (14:4d8e)  	db $8 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText8 ; 0x4e80 TextBeforeBattle -	dw Route20AfterBattleText8 ; 0x4e8a TextAfterBattle -	dw Route20EndBattleText8 ; 0x4e85 TextEndBattle -	dw Route20EndBattleText8 ; 0x4e85 TextEndBattle +	dw Route20BattleText8 ; TextBeforeBattle +	dw Route20AfterBattleText8 ; TextAfterBattle +	dw Route20EndBattleText8 ; TextEndBattle +	dw Route20EndBattleText8 ; TextEndBattle  Route20TrainerHeader9: ; 50d9a (14:4d9a)  	db $9 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText9 ; 0x4e8f TextBeforeBattle -	dw Route20AfterBattleText9 ; 0x4e99 TextAfterBattle -	dw Route20EndBattleText9 ; 0x4e94 TextEndBattle -	dw Route20EndBattleText9 ; 0x4e94 TextEndBattle +	dw Route20BattleText9 ; TextBeforeBattle +	dw Route20AfterBattleText9 ; TextAfterBattle +	dw Route20EndBattleText9 ; TextEndBattle +	dw Route20EndBattleText9 ; TextEndBattle  Route20TrainerHeader10: ; 50da6 (14:4da6)  	db $a ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e7 ; flag's byte -	dw Route20BattleText10 ; 0x4e9e TextBeforeBattle -	dw Route20AfterBattleText10 ; 0x4ea8 TextAfterBattle -	dw Route20EndBattleText10 ; 0x4ea3 TextEndBattle -	dw Route20EndBattleText10 ; 0x4ea3 TextEndBattle +	dw Route20BattleText10 ; TextBeforeBattle +	dw Route20AfterBattleText10 ; TextAfterBattle +	dw Route20EndBattleText10 ; TextEndBattle +	dw Route20EndBattleText10 ; TextEndBattle  	db $ff  Route20Text1: ; 50db3 (14:4db3) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  Route20Text2: ; 50dbd (14:4dbd) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  Route20Text3: ; 50dc7 (14:4dc7) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  Route20Text4: ; 50dd1 (14:4dd1) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  Route20Text5: ; 50ddb (14:4ddb) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  Route20Text6: ; 50de5 (14:4de5) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  Route20Text7: ; 50def (14:4def) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd  Route20Text8: ; 50df9 (14:4df9) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd  Route20Text9: ; 50e03 (14:4e03) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader9  	call TalkToTrainer  	jp TextScriptEnd  Route20Text10: ; 50e0d (14:4e0d) -	db $08 ; asm +	TX_ASM  	ld hl, Route20TrainerHeader10  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route21.asm b/scripts/route21.asm index de2046dc..cbb5ea7b 100755 --- a/scripts/route21.asm +++ b/scripts/route21.asm @@ -28,135 +28,135 @@ Route21TrainerHeader0: ; 55f16 (15:5f16)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText1 ; 0x5fdd TextBeforeBattle -	dw Route21AfterBattleText1 ; 0x5fe7 TextAfterBattle -	dw Route21EndBattleText1 ; 0x5fe2 TextEndBattle -	dw Route21EndBattleText1 ; 0x5fe2 TextEndBattle +	dw Route21BattleText1 ; TextBeforeBattle +	dw Route21AfterBattleText1 ; TextAfterBattle +	dw Route21EndBattleText1 ; TextEndBattle +	dw Route21EndBattleText1 ; TextEndBattle  Route21TrainerHeader1: ; 55f22 (15:5f22)  	db $2 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText2 ; 0x5fec TextBeforeBattle -	dw Route21AfterBattleText2 ; 0x5ff6 TextAfterBattle -	dw Route21EndBattleText2 ; 0x5ff1 TextEndBattle -	dw Route21EndBattleText2 ; 0x5ff1 TextEndBattle +	dw Route21BattleText2 ; TextBeforeBattle +	dw Route21AfterBattleText2 ; TextAfterBattle +	dw Route21EndBattleText2 ; TextEndBattle +	dw Route21EndBattleText2 ; TextEndBattle  Route21TrainerHeader2: ; 55f2e (15:5f2e)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText3 ; 0x5ffb TextBeforeBattle -	dw Route21AfterBattleText3 ; 0x6005 TextAfterBattle -	dw Route21EndBattleText3 ; 0x6000 TextEndBattle -	dw Route21EndBattleText3 ; 0x6000 TextEndBattle +	dw Route21BattleText3 ; TextBeforeBattle +	dw Route21AfterBattleText3 ; TextAfterBattle +	dw Route21EndBattleText3 ; TextEndBattle +	dw Route21EndBattleText3 ; TextEndBattle  Route21TrainerHeader3: ; 55f3a (15:5f3a)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText4 ; 0x600a TextBeforeBattle -	dw Route21AfterBattleText4 ; 0x6014 TextAfterBattle -	dw Route21EndBattleText4 ; 0x600f TextEndBattle -	dw Route21EndBattleText4 ; 0x600f TextEndBattle +	dw Route21BattleText4 ; TextBeforeBattle +	dw Route21AfterBattleText4 ; TextAfterBattle +	dw Route21EndBattleText4 ; TextEndBattle +	dw Route21EndBattleText4 ; TextEndBattle  Route21TrainerHeader4: ; 55f46 (15:5f46)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText5 ; 0x6019 TextBeforeBattle -	dw Route21AfterBattleText5 ; 0x6023 TextAfterBattle -	dw Route21EndBattleText5 ; 0x601e TextEndBattle -	dw Route21EndBattleText5 ; 0x601e TextEndBattle +	dw Route21BattleText5 ; TextBeforeBattle +	dw Route21AfterBattleText5 ; TextAfterBattle +	dw Route21EndBattleText5 ; TextEndBattle +	dw Route21EndBattleText5 ; TextEndBattle  Route21TrainerHeader5: ; 55f52 (15:5f52)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText6 ; 0x6028 TextBeforeBattle -	dw Route21AfterBattleText6 ; 0x6032 TextAfterBattle -	dw Route21EndBattleText6 ; 0x602d TextEndBattle -	dw Route21EndBattleText6 ; 0x602d TextEndBattle +	dw Route21BattleText6 ; TextBeforeBattle +	dw Route21AfterBattleText6 ; TextAfterBattle +	dw Route21EndBattleText6 ; TextEndBattle +	dw Route21EndBattleText6 ; TextEndBattle  Route21TrainerHeader6: ; 55f5e (15:5f5e)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText7 ; 0x6037 TextBeforeBattle -	dw Route21AfterBattleText7 ; 0x6041 TextAfterBattle -	dw Route21EndBattleText7 ; 0x603c TextEndBattle -	dw Route21EndBattleText7 ; 0x603c TextEndBattle +	dw Route21BattleText7 ; TextBeforeBattle +	dw Route21AfterBattleText7 ; TextAfterBattle +	dw Route21EndBattleText7 ; TextEndBattle +	dw Route21EndBattleText7 ; TextEndBattle  Route21TrainerHeader7: ; 55f6a (15:5f6a)  	db $8 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText8 ; 0x6046 TextBeforeBattle -	dw Route21AfterBattleText8 ; 0x6050 TextAfterBattle -	dw Route21EndBattleText8 ; 0x604b TextEndBattle -	dw Route21EndBattleText8 ; 0x604b TextEndBattle +	dw Route21BattleText8 ; TextBeforeBattle +	dw Route21AfterBattleText8 ; TextAfterBattle +	dw Route21EndBattleText8 ; TextEndBattle +	dw Route21EndBattleText8 ; TextEndBattle  Route21TrainerHeader8: ; 55f76 (15:5f76)  	db $9 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd7e9 ; flag's byte -	dw Route21BattleText9 ; 0x6055 TextBeforeBattle -	dw Route21AfterBattleText9 ; 0x605f TextAfterBattle -	dw Route21EndBattleText9 ; 0x605a TextEndBattle -	dw Route21EndBattleText9 ; 0x605a TextEndBattle +	dw Route21BattleText9 ; TextBeforeBattle +	dw Route21AfterBattleText9 ; TextAfterBattle +	dw Route21EndBattleText9 ; TextEndBattle +	dw Route21EndBattleText9 ; TextEndBattle  	db $ff  Route21Text1: ; 55f83 (15:5f83) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  Route21Text2: ; 55f8d (15:5f8d) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  Route21Text3: ; 55f97 (15:5f97) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  Route21Text4: ; 55fa1 (15:5fa1) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  Route21Text5: ; 55fab (15:5fab) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  Route21Text6: ; 55fb5 (15:5fb5) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  Route21Text7: ; 55fbf (15:5fbf) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  Route21Text8: ; 55fc9 (15:5fc9) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd  Route21Text9: ; 55fd3 (15:5fd3) -	db $08 ; asm +	TX_ASM  	ld hl, Route21TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route22.asm b/scripts/route22.asm index 9181380a..88f69bea 100755 --- a/scripts/route22.asm +++ b/scripts/route22.asm @@ -22,7 +22,7 @@ Route22Script7: ; 50ed5 (14:4ed5)  	ret  Route22Script_50ed6: ; 50ed6 (14:4ed6) -	ld a, [W_RIVALSTARTER] ; wd715 +	ld a, [W_RIVALSTARTER]  	ld b, a  .asm_50eda  	ld a, [hli] @@ -32,11 +32,11 @@ Route22Script_50ed6: ; 50ed6 (14:4ed6)  	jr .asm_50eda  .asm_50ee1  	ld a, [hl] -	ld [W_TRAINERNO], a ; wd05d +	ld [W_TRAINERNO], a  	ret  Route22MoveRivalSprite: ; 50ee6 (14:4ee6) -	ld de, Route22RivalMovementData ; $4efb +	ld de, Route22RivalMovementData  	ld a, [wcf0d]  	cp $1  	jr z, .asm_50ef1 @@ -54,7 +54,7 @@ Route22Script0: ; 50f00 (14:4f00)  	ld a, [wd7eb]  	bit 7, a  	ret z -	ld hl, .Route22RivalBattleCoords  ; $4f2d +	ld hl, .Route22RivalBattleCoords  	call ArePlayerCoordsInArray  	ret nc  	ld a, [wWhichTrade] @@ -67,7 +67,7 @@ Route22Script0: ; 50f00 (14:4f00)  	ld [wd528], a  	ld a, [wd7eb]  	bit 0, a ; is this the rival battle at the beginning of the game? -	jr nz, .firstRivalBattle ; 0x50f25 $b +	jr nz, .firstRivalBattle  	bit 1, a ; is this the rival at the end of the game?  	jp nz, Route22Script_5104e  	ret @@ -85,7 +85,7 @@ Route22Script0: ; 50f00 (14:4f00)  	predef EmotionBubble  	ld a, [wWalkBikeSurfState]  	and a -	jr z, .asm_50f4e ; 0x50f44 $8 +	jr z, .asm_50f4e  	ld a, $ff  	ld [wc0ee], a  	call PlaySound @@ -106,11 +106,11 @@ Route22Script1: ; 50f62 (14:4f62)  	ret nz  	ld a, [wcf0d]  	cp $1 -	jr nz, .asm_50f78 ; 0x50f6d $9 +	jr nz, .asm_50f78  	ld a, $4  	ld [wd528], a  	ld a, $4 -	jr .asm_50f7a ; 0x50f76 $2 +	jr .asm_50f7a  .asm_50f78  	ld a, $c  .asm_50f7a @@ -131,7 +131,7 @@ Route22Script1: ; 50f62 (14:4f62)  	call SaveEndBattleTextPointers  	ld a, SONY1 + $c8  	ld [W_CUROPPONENT], a -	ld hl, StarterMons_50faf ; $4faf +	ld hl, StarterMons_50faf  	call Route22Script_50ed6  	ld a, $2  	ld [W_ROUTE22CURSCRIPT], a @@ -149,9 +149,9 @@ Route22Script2: ; 50fb5 (14:4fb5)  	jp z, Route22Script_50ece  	ld a, [wSpriteStateData1 + 9]  	and a -	jr nz, .asm_50fc7 ; 0x50fc1 $4 +	jr nz, .asm_50fc7  	ld a, $4 -	jr .asm_50fc9 ; 0x50fc5 $2 +	jr .asm_50fc9  .asm_50fc7  	ld a, $c  .asm_50fc9 @@ -172,9 +172,9 @@ Route22Script2: ; 50fb5 (14:4fb5)  	callba Music_RivalAlternateStart  	ld a, [wcf0d]  	cp $1 -	jr nz, .asm_50fff ; 0x50ff8 $5 +	jr nz, .asm_50fff  	call Route22Script_51008 -	jr .asm_51002 ; 0x50ffd $3 +	jr .asm_51002  .asm_50fff  	call Route22Script_5100d  .asm_51002 @@ -183,12 +183,12 @@ Route22Script2: ; 50fb5 (14:4fb5)  	ret  Route22Script_51008: ; 51008 (14:5008) -	ld de, Route22RivalExitMovementData1 ; $5017 -	jr asm_51010 +	ld de, Route22RivalExitMovementData1 +	jr Route22MoveRival1  Route22Script_5100d: ; 5100d (14:500d) -	ld de, Route22RivalExitMovementData2 ; $501f -asm_51010 +	ld de, Route22RivalExitMovementData2 +Route22MoveRival1: ; 51010 (14:5010)  	ld a, $1  	ld [H_SPRITEHEIGHT], a  	jp MoveSprite @@ -234,7 +234,7 @@ Route22Script_5104e: ; 5104e (14:504e)  	call PlaySound  	callba Music_RivalAlternateTempo  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call Route22MoveRivalSprite  	ld a, $4  	ld [W_ROUTE22CURSCRIPT], a @@ -245,7 +245,7 @@ Route22Script4: ; 51087 (14:5087)  	bit 0, a  	ret nz  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	ld a, [wcf0d]  	cp $1  	jr nz, .asm_510a1 @@ -263,17 +263,17 @@ Route22Script4: ; 51087 (14:5087)  	xor a  	ld [wJoyIgnore], a  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd72d  	set 6, [hl]  	set 7, [hl] -	ld hl, Route22RivalDefeatedText2 ; $51cb -	ld de, Route22Text_511d0 ; $51d0 +	ld hl, Route22RivalDefeatedText2 +	ld de, Route22Text_511d0  	call SaveEndBattleTextPointers  	ld a, SONY2 + $c8 -	ld [W_CUROPPONENT], a ; wd059 -	ld hl, StarterMons_510d9 ; $50d9 +	ld [W_CUROPPONENT], a +	ld hl, StarterMons_510d9  	call Route22Script_50ed6  	ld a, $5  	ld [W_ROUTE22CURSCRIPT], a @@ -285,11 +285,11 @@ StarterMons_510d9: ; 510d9 (14:50d9)  	db STARTER1,$0c  Route22Script5: ; 510df (14:50df) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, Route22Script_50ece  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	ld a, [wcf0d]  	cp $1  	jr nz, .asm_510fb @@ -309,7 +309,7 @@ Route22Script5: ; 510df (14:50df)  	ld hl, wd7eb  	set 6, [hl]  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, $ff  	ld [wc0ee], a @@ -328,14 +328,14 @@ Route22Script5: ; 510df (14:50df)  	ret  Route22Script_5113d: ; 5113d (14:513d) -	ld de, MovementData_5114c ; $514c -	jr asm_51145 +	ld de, MovementData_5114c +	jr Route22MoveRival2  Route22Script_51142: ; 51142 (14:5142) -	ld de, MovementData_5114d ; $514d -asm_51145: ; 51145 (14:5145) +	ld de, MovementData_5114d +Route22MoveRival2: ; 51145 (14:5145)  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp MoveSprite  MovementData_5114c: ; 5114c (14:514c) @@ -367,31 +367,31 @@ Route22TextPointers: ; 51175 (14:5175)  	dw Route22FrontGateText  Route22Text1: ; 5117b (14:517b) -	db $08 ; asm +	TX_ASM  	ld a, [wd7eb]  	bit 5, a -	jr z, .asm_a88cf ; 0x51181 +	jr z, .asm_5118b  	ld hl, Route22RivalAfterBattleText1  	call PrintText -	jr .asm_48088 ; 0x51189 -.asm_a88cf ; 0x5118b +	jr .asm_51191 +.asm_5118b  	ld hl, Route22RivalBeforeBattleText1  	call PrintText -.asm_48088 ; 0x51191 +.asm_51191  	jp TextScriptEnd  Route22Text2: ; 51194 (14:5194) -	db $08 ; asm +	TX_ASM  	ld a, [wd7eb]  	bit 6, a -	jr z, .asm_58c0a ; 0x5119a +	jr z, .asm_511a4  	ld hl, Route22RivalAfterBattleText2  	call PrintText -	jr .asm_673ee ; 0x511a2 -.asm_58c0a ; 0x511a4 +	jr .asm_511aa +.asm_511a4  	ld hl, Route22RivalBeforeBattleText2  	call PrintText -.asm_673ee ; 0x511aa +.asm_511aa  	jp TextScriptEnd  Route22RivalBeforeBattleText1: ; 511ad (14:51ad) diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm index 6618d6a2..4b099bb2 100755 --- a/scripts/route22gate.asm +++ b/scripts/route22gate.asm @@ -6,7 +6,7 @@ Route22GateScript: ; 1e683 (7:6683)  	ld a, [W_YCOORD]  	cp $4  	ld a, ROUTE_23 -	jr c, .asm_1e69a ; 0x1e696 $2 +	jr c, .asm_1e69a  	ld a, ROUTE_22  .asm_1e69a  	ld [wLastMap], a @@ -57,30 +57,30 @@ Route22GateTextPointers: ; 1e6df (7:66df)  	dw Route22GateText1  Route22GateText1: ; 1e6e1 (7:66e1) -	db $8 +	TX_ASM  	ld a, [W_OBTAINEDBADGES]  	bit 0, a -	jr nz, .asm_8a809 ; 0x1e6e7 $d +	jr nz, .asm_1e6f6  	ld hl, Route22GateText_1e704  	call PrintText  	call Route22GateScript_1e6ba  	ld a, $1 -	jr .asm_20f7e ; 0x1e6f4 $8 -.asm_8a809 ; 0x1e6f6 +	jr .asm_1e6fe +.asm_1e6f6  	ld hl, Route22GateText_1e71a  	call PrintText  	ld a, $2 -.asm_20f7e ; 0x1e6fe +.asm_1e6fe  	ld [W_ROUTE22GATECURSCRIPT], a  	jp TextScriptEnd  Route22GateText_1e704: ; 1e704 (7:6704) -	TX_FAR _Route22GateText_1e704 ; 0x8cfbb -	db $8 +	TX_FAR _Route22GateText_1e704 +	TX_ASM  	ld a, (SFX_02_51 - SFX_Headers_02) / 3  	call PlaySoundWaitForCurrent  	call WaitForSoundToFinish -	ld hl, Route22GateText_1e715 ; $6715 +	ld hl, Route22GateText_1e715  	ret  Route22GateText_1e715: ; 1e715 (7:6715) @@ -88,5 +88,5 @@ Route22GateText_1e715: ; 1e715 (7:6715)  	db "@"  Route22GateText_1e71a: ; 1e71a (7:671a) -	TX_FAR _Route22GateText_1e71a ; 0x8d03e +	TX_FAR _Route22GateText_1e71a  	db $0B, "@" diff --git a/scripts/route23.asm b/scripts/route23.asm index 6d3849f4..aaa85822 100755 --- a/scripts/route23.asm +++ b/scripts/route23.asm @@ -29,7 +29,7 @@ Route23ScriptPointers: ; 51213 (14:5213)  	dw Route23Script2  Route23Script0: ; 51219 (14:5219) -	ld hl, YCoordsData_51255 ; $5255 +	ld hl, YCoordsData_51255  	ld a, [W_YCOORD]  	ld b, a  	ld e, $0 @@ -41,9 +41,9 @@ Route23Script0: ; 51219 (14:5219)  	inc e  	dec c  	cp b -	jr nz, .asm_51224 ; 0x5122b $f7 +	jr nz, .asm_51224  	cp $23 -	jr nz, .asm_51237 ; 0x5122f $6 +	jr nz, .asm_51237  	ld a, [W_XCOORD]  	cp $e  	ret nc @@ -68,8 +68,8 @@ YCoordsData_51255: ; 51255 (14:5255)  	db $23,$38,$55,$60,$69,$77,$88,$FF  Route23Script_5125d: ; 5125d (14:525d) -	ld hl, BadgeTextPointers ; $5276 -	ld a, [wWhichTrade] ; wWhichTrade +	ld hl, BadgeTextPointers +	ld a, [wWhichTrade]  	ld c, a  	ld b, $0  	add hl, bc @@ -146,51 +146,51 @@ Route23TextPointers: ; 512f7 (14:52f7)  	dw Route23Text8  Route23Text1: ; 51307 (14:5307) -	db $08 ; asm +	TX_ASM  	ld a, $6  	call Route23Script_51346  	jp TextScriptEnd  Route23Text2: ; 51310 (14:5310) -	db $08 ; asm +	TX_ASM  	ld a, $5  	call Route23Script_51346  	jp TextScriptEnd  Route23Text3: ; 51319 (14:5319) -	db $08 ; asm +	TX_ASM  	ld a, $4  	call Route23Script_51346  	jp TextScriptEnd  Route23Text4: ; 51322 (14:5322) -	db $08 ; asm +	TX_ASM  	ld a, $3  	call Route23Script_51346  	jp TextScriptEnd  Route23Text5: ; 5132b (14:532b) -	db $08 ; asm +	TX_ASM  	ld a, $2  	call Route23Script_51346  	jp TextScriptEnd  Route23Text6: ; 51334 (14:5334) -	db $08 ; asm +	TX_ASM  	ld a, $1  	call Route23Script_51346  	jp TextScriptEnd  Route23Text7: ; 5133d (14:533d) -	db $8 +	TX_ASM  	ld a, $0  	call Route23Script_51346  	jp TextScriptEnd  Route23Script_51346: ; 51346 (14:5346) -	ld [wWhichTrade], a ; wWhichTrade +	ld [wWhichTrade], a  	call Route23Script_5125d -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	inc a  	ld c, a  	ld b, $2 @@ -208,7 +208,7 @@ Route23Script_51346: ; 51346 (14:5346)  .asm_5136e  	ld hl, VictoryRoadGuardText2  	call PrintText -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	ld c, a  	ld b, $1  	ld hl, wd7ed @@ -223,7 +223,7 @@ Route23Script_51388: ; 51388 (14:5388)  VictoryRoadGuardText1: ; 5138e (14:538e)  	TX_FAR _VictoryRoadGuardText1 -	db $08 ; asm +	TX_ASM  	ld a, (SFX_02_51 - SFX_Headers_02) / 3  	call PlaySoundWaitForCurrent  	call WaitForSoundToFinish diff --git a/scripts/route24.asm b/scripts/route24.asm index 6916cbe7..24866ed7 100755 --- a/scripts/route24.asm +++ b/scripts/route24.asm @@ -25,13 +25,13 @@ Route24Script0: ; 513d5 (14:53d5)  	ld a, [wd7ef]  	bit 0, a  	jp nz, CheckFightingMapTrainers -	ld hl, CoordsData_5140e ; $540e +	ld hl, CoordsData_5140e  	call ArePlayerCoordsInArray  	jp nc, CheckFightingMapTrainers  	xor a  	ld [hJoyHeld], a  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd7f0  	bit 1, [hl] @@ -61,7 +61,7 @@ Route24Script4: ; 51411 (14:5411)  	ret  Route24Script3: ; 51422 (14:5422) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, Route24Script_513c0  	call UpdateSprites @@ -70,7 +70,7 @@ Route24Script3: ; 51422 (14:5422)  	ld hl, wd7ef  	set 1, [hl]  	ld a, $1 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	xor a  	ld [wJoyIgnore], a @@ -94,65 +94,65 @@ Route24TrainerHeader0: ; 5145b (14:545b)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7ef ; flag's byte -	dw Route24BattleText1 ; 0x5571 TextBeforeBattle -	dw Route24AfterBattleText1 ; 0x557b TextAfterBattle -	dw Route24EndBattleText1 ; 0x5576 TextEndBattle -	dw Route24EndBattleText1 ; 0x5576 TextEndBattle +	dw Route24BattleText1 ; TextBeforeBattle +	dw Route24AfterBattleText1 ; TextAfterBattle +	dw Route24EndBattleText1 ; TextEndBattle +	dw Route24EndBattleText1 ; TextEndBattle  Route24TrainerHeader2: ; 51467 (14:5467)  	db $3 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7ef ; flag's byte -	dw Route24BattleText2 ; 0x5580 TextBeforeBattle -	dw Route24AfterBattleText2 ; 0x558a TextAfterBattle -	dw Route24EndBattleText2 ; 0x5585 TextEndBattle -	dw Route24EndBattleText2 ; 0x5585 TextEndBattle +	dw Route24BattleText2 ; TextBeforeBattle +	dw Route24AfterBattleText2 ; TextAfterBattle +	dw Route24EndBattleText2 ; TextEndBattle +	dw Route24EndBattleText2 ; TextEndBattle  Route24TrainerHeader3: ; 51473 (14:5473)  	db $4 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7ef ; flag's byte -	dw Route24BattleText3 ; 0x558f TextBeforeBattle -	dw Route24AfterBattleText3 ; 0x5599 TextAfterBattle -	dw Route24EndBattleText3 ; 0x5594 TextEndBattle -	dw Route24EndBattleText3 ; 0x5594 TextEndBattle +	dw Route24BattleText3 ; TextBeforeBattle +	dw Route24AfterBattleText3 ; TextAfterBattle +	dw Route24EndBattleText3 ; TextEndBattle +	dw Route24EndBattleText3 ; TextEndBattle  Route24TrainerHeader4: ; 5147f (14:547f)  	db $5 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7ef ; flag's byte -	dw Route24BattleText4 ; 0x559e TextBeforeBattle -	dw Route24AfterBattleText4 ; 0x55a8 TextAfterBattle -	dw Route24EndBattleText4 ; 0x55a3 TextEndBattle -	dw Route24EndBattleText4 ; 0x55a3 TextEndBattle +	dw Route24BattleText4 ; TextBeforeBattle +	dw Route24AfterBattleText4 ; TextAfterBattle +	dw Route24EndBattleText4 ; TextEndBattle +	dw Route24EndBattleText4 ; TextEndBattle  Route24TrainerHeader5: ; 5148b (14:548b)  	db $6 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7ef ; flag's byte -	dw Route24BattleText5 ; 0x55ad TextBeforeBattle -	dw Route24AfterBattleText5 ; 0x55b7 TextAfterBattle -	dw Route24EndBattleText5 ; 0x55b2 TextEndBattle -	dw Route24EndBattleText5 ; 0x55b2 TextEndBattle +	dw Route24BattleText5 ; TextBeforeBattle +	dw Route24AfterBattleText5 ; TextAfterBattle +	dw Route24EndBattleText5 ; TextEndBattle +	dw Route24EndBattleText5 ; TextEndBattle  Route24TrainerHeader6: ; 51497 (14:5497)  	db $7 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7ef ; flag's byte -	dw Route24BattleText6 ; 0x55bc TextBeforeBattle -	dw Route24AfterBattleText6 ; 0x55c6 TextAfterBattle -	dw Route24EndBattleText6 ; 0x55c1 TextEndBattle -	dw Route24EndBattleText6 ; 0x55c1 TextEndBattle +	dw Route24BattleText6 ; TextBeforeBattle +	dw Route24AfterBattleText6 ; TextAfterBattle +	dw Route24EndBattleText6 ; TextEndBattle +	dw Route24EndBattleText6 ; TextEndBattle  	db $ff  Route24Text1: ; 514a4 (14:54a4) -	db $8 +	TX_ASM  	ld hl, wd7f0  	res 1, [hl]  	ld a, [wd7ef]  	bit 0, a -	jr nz, .asm_a03f5 ; 0x514af $48 +	jr nz, .asm_514f9  	ld hl, Route24Text_51510  	call PrintText  	ld bc, (NUGGET << 8) | 1 @@ -180,7 +180,7 @@ Route24Text1: ; 514a4 (14:54a4)  	ld [W_ROUTE24CURSCRIPT], a  	ld [W_CURMAPSCRIPT], a  	jp TextScriptEnd -.asm_a03f5 ; 0x514f9 +.asm_514f9  	ld hl, Route24Text_51530  	call PrintText  	jp TextScriptEnd @@ -192,13 +192,13 @@ Route24Text1: ; 514a4 (14:54a4)  	jp TextScriptEnd  Route24Text_51510: ; 51510 (14:5510) -	TX_FAR _Route24Text_51510 ; 0x92721 +	TX_FAR _Route24Text_51510  	db $0B -	TX_FAR _Route24Text_51515 ; 0x92755 +	TX_FAR _Route24Text_51515  	db "@"  Route24Text_5151a: ; 5151a (14:551a) -	TX_FAR _Route24Text_5151a ; 0x92779 +	TX_FAR _Route24Text_5151a  	db $0B, $6, "@"  Route24Text_51521: ; 51521 (14:5521) @@ -218,37 +218,37 @@ Route24Text_51530: ; 51530 (14:5530)  	db "@"  Route24Text2: ; 51535 (14:5535) -	db $08 ; asm +	TX_ASM  	ld hl, Route24TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  Route24Text3: ; 5153f (14:553f) -	db $08 ; asm +	TX_ASM  	ld hl, Route24TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  Route24Text4: ; 51549 (14:5549) -	db $08 ; asm +	TX_ASM  	ld hl, Route24TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  Route24Text5: ; 51553 (14:5553) -	db $08 ; asm +	TX_ASM  	ld hl, Route24TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  Route24Text6: ; 5155d (14:555d) -	db $08 ; asm +	TX_ASM  	ld hl, Route24TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  Route24Text7: ; 51567 (14:5567) -	db $08 ; asm +	TX_ASM  	ld hl, Route24TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route25.asm b/scripts/route25.asm index b915bdee..383652c8 100755 --- a/scripts/route25.asm +++ b/scripts/route25.asm @@ -59,135 +59,135 @@ Route25TrainerHeader0: ; 5163e (14:563e)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText1 ; 0x5705 TextBeforeBattle -	dw Route25AfterBattleText1 ; 0x570f TextAfterBattle -	dw Route25EndBattleText1 ; 0x570a TextEndBattle -	dw Route25EndBattleText1 ; 0x570a TextEndBattle +	dw Route25BattleText1 ; TextBeforeBattle +	dw Route25AfterBattleText1 ; TextAfterBattle +	dw Route25EndBattleText1 ; TextEndBattle +	dw Route25EndBattleText1 ; TextEndBattle  Route25TrainerHeader2: ; 5164a (14:564a)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText2 ; 0x5714 TextBeforeBattle -	dw Route25AfterBattleText2 ; 0x571e TextAfterBattle -	dw Route25EndBattleText2 ; 0x5719 TextEndBattle -	dw Route25EndBattleText2 ; 0x5719 TextEndBattle +	dw Route25BattleText2 ; TextBeforeBattle +	dw Route25AfterBattleText2 ; TextAfterBattle +	dw Route25EndBattleText2 ; TextEndBattle +	dw Route25EndBattleText2 ; TextEndBattle  Route25TrainerHeader3: ; 51656 (14:5656)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText3 ; 0x5723 TextBeforeBattle -	dw Route25AfterBattleText3 ; 0x572d TextAfterBattle -	dw Route25EndBattleText3 ; 0x5728 TextEndBattle -	dw Route25EndBattleText3 ; 0x5728 TextEndBattle +	dw Route25BattleText3 ; TextBeforeBattle +	dw Route25AfterBattleText3 ; TextAfterBattle +	dw Route25EndBattleText3 ; TextEndBattle +	dw Route25EndBattleText3 ; TextEndBattle  Route25TrainerHeader4: ; 51662 (14:5662)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText4 ; 0x5732 TextBeforeBattle -	dw Route25AfterBattleText4 ; 0x573c TextAfterBattle -	dw Route25EndBattleText4 ; 0x5737 TextEndBattle -	dw Route25EndBattleText4 ; 0x5737 TextEndBattle +	dw Route25BattleText4 ; TextBeforeBattle +	dw Route25AfterBattleText4 ; TextAfterBattle +	dw Route25EndBattleText4 ; TextEndBattle +	dw Route25EndBattleText4 ; TextEndBattle  Route25TrainerHeader5: ; 5166e (14:566e)  	db $5 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText5 ; 0x5741 TextBeforeBattle -	dw Route25AfterBattleText5 ; 0x574b TextAfterBattle -	dw Route25EndBattleText5 ; 0x5746 TextEndBattle -	dw Route25EndBattleText5 ; 0x5746 TextEndBattle +	dw Route25BattleText5 ; TextBeforeBattle +	dw Route25AfterBattleText5 ; TextAfterBattle +	dw Route25EndBattleText5 ; TextEndBattle +	dw Route25EndBattleText5 ; TextEndBattle  Route25TrainerHeader6: ; 5167a (14:567a)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText6 ; 0x5750 TextBeforeBattle -	dw Route25AfterBattleText6 ; 0x575a TextAfterBattle -	dw Route25EndBattleText6 ; 0x5755 TextEndBattle -	dw Route25EndBattleText6 ; 0x5755 TextEndBattle +	dw Route25BattleText6 ; TextBeforeBattle +	dw Route25AfterBattleText6 ; TextAfterBattle +	dw Route25EndBattleText6 ; TextEndBattle +	dw Route25EndBattleText6 ; TextEndBattle  Route25TrainerHeader7: ; 51686 (14:5686)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText7 ; 0x575f TextBeforeBattle -	dw Route25AfterBattleText7 ; 0x5769 TextAfterBattle -	dw Route25EndBattleText7 ; 0x5764 TextEndBattle -	dw Route25EndBattleText7 ; 0x5764 TextEndBattle +	dw Route25BattleText7 ; TextBeforeBattle +	dw Route25AfterBattleText7 ; TextAfterBattle +	dw Route25EndBattleText7 ; TextEndBattle +	dw Route25EndBattleText7 ; TextEndBattle  Route25TrainerHeader8: ; 51692 (14:5692)  	db $8 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText8 ; 0x576e TextBeforeBattle -	dw Route25AfterBattleText8 ; 0x5778 TextAfterBattle -	dw Route25EndBattleText8 ; 0x5773 TextEndBattle -	dw Route25EndBattleText8 ; 0x5773 TextEndBattle +	dw Route25BattleText8 ; TextBeforeBattle +	dw Route25AfterBattleText8 ; TextAfterBattle +	dw Route25EndBattleText8 ; TextEndBattle +	dw Route25EndBattleText8 ; TextEndBattle  Route25TrainerHeader9: ; 5169e (14:569e)  	db $9 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7f1 ; flag's byte -	dw Route25BattleText9 ; 0x577d TextBeforeBattle -	dw Route25AfterBattleText9 ; 0x5787 TextAfterBattle -	dw Route25EndBattleText9 ; 0x5782 TextEndBattle -	dw Route25EndBattleText9 ; 0x5782 TextEndBattle +	dw Route25BattleText9 ; TextBeforeBattle +	dw Route25AfterBattleText9 ; TextAfterBattle +	dw Route25EndBattleText9 ; TextEndBattle +	dw Route25EndBattleText9 ; TextEndBattle  	db $ff  Route25Text1: ; 516ab (14:56ab) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  Route25Text2: ; 516b5 (14:56b5) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  Route25Text3: ; 516bf (14:56bf) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  Route25Text4: ; 516c9 (14:56c9) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  Route25Text5: ; 516d3 (14:56d3) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  Route25Text6: ; 516dd (14:56dd) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  Route25Text7: ; 516e7 (14:56e7) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd  Route25Text8: ; 516f1 (14:56f1) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd  Route25Text9: ; 516fb (14:56fb) -	db $08 ; asm +	TX_ASM  	ld hl, Route25TrainerHeader9  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route2gate.asm b/scripts/route2gate.asm index 8ee087c8..e8d02321 100755 --- a/scripts/route2gate.asm +++ b/scripts/route2gate.asm @@ -6,30 +6,30 @@ Route2GateTextPointers: ; 5d5d7 (17:55d7)  	dw Route2GateText2  Route2GateText1: ; 5d5db (17:55db) -	db $08 ; asm +	TX_ASM  	ld a, [wd7c2]  	bit 0, a -	jr nz, .asm_6592c ; 0x5d5e1 +	jr nz, .asm_5d60d  	ld a, 10 ; pokemon needed -	ldh [$db], a +	ld [$ffdb], a  	ld a, HM_05 ; oak's aide reward -	ldh [$dc], a +	ld [$ffdc], a  	ld [wd11e], a -	call GetItemName ; $2fcf +	call GetItemName  	ld hl, wcd6d  	ld de, wcc5b  	ld bc, $000d  	call CopyData  	predef OaksAideScript ; call oak's aide script -	ldh a, [$db] +	ld a, [$ffdb]  	cp $1 -	jr nz, .asm_ad646 ; 0x5d606 +	jr nz, .asm_5d613  	ld hl, wd7c2  	set 0, [hl] -.asm_6592c ; 0x5d60d +.asm_5d60d  	ld hl, Route2GateText_5d616  	call PrintText -.asm_ad646 ; 0x5d613 +.asm_5d613  	jp TextScriptEnd  Route2GateText_5d616: ; 5d616 (17:5616) diff --git a/scripts/route2house.asm b/scripts/route2house.asm index ba13605b..d1312c91 100755 --- a/scripts/route2house.asm +++ b/scripts/route2house.asm @@ -10,7 +10,7 @@ Route2HouseText1: ; 1def4 (7:5ef4)  	db "@"  Route2HouseText2: ; 1def9 (7:5ef9) -	db $08 ; asm +	TX_ASM  	ld a, $1  	ld [wWhichTrade], a  	predef DoInGameTradeDialogue diff --git a/scripts/route3.asm b/scripts/route3.asm index acb2afce..c39a5435 100755 --- a/scripts/route3.asm +++ b/scripts/route3.asm @@ -29,73 +29,73 @@ Route3TrainerHeader0: ; 55525 (15:5525)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText1 ; 0x5595 TextBeforeBattle -	dw Route3AfterBattleText1 ; 0x559f TextAfterBattle -	dw Route3EndBattleText1 ; 0x559a TextEndBattle -	dw Route3EndBattleText1 ; 0x559a TextEndBattle +	dw Route3BattleText1 ; TextBeforeBattle +	dw Route3AfterBattleText1 ; TextAfterBattle +	dw Route3EndBattleText1 ; TextEndBattle +	dw Route3EndBattleText1 ; TextEndBattle  Route3TrainerHeader2: ; 55531 (15:5531)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText2 ; 0x55ae TextBeforeBattle -	dw Route3AfterBattleText2 ; 0x55b8 TextAfterBattle -	dw Route3EndBattleText2 ; 0x55b3 TextEndBattle -	dw Route3EndBattleText2 ; 0x55b3 TextEndBattle +	dw Route3BattleText2 ; TextBeforeBattle +	dw Route3AfterBattleText2 ; TextAfterBattle +	dw Route3EndBattleText2 ; TextEndBattle +	dw Route3EndBattleText2 ; TextEndBattle  Route3TrainerHeader3: ; 5553d (15:553d)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText3 ; 0x55c7 TextBeforeBattle -	dw Route3AfterBattleText3 ; 0x55d1 TextAfterBattle -	dw Route3EndBattleText3 ; 0x55cc TextEndBattle -	dw Route3EndBattleText3 ; 0x55cc TextEndBattle +	dw Route3BattleText3 ; TextBeforeBattle +	dw Route3AfterBattleText3 ; TextAfterBattle +	dw Route3EndBattleText3 ; TextEndBattle +	dw Route3EndBattleText3 ; TextEndBattle  Route3TrainerHeader4: ; 55549 (15:5549)  	db $5 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText4 ; 0x55e0 TextBeforeBattle -	dw Route3AfterBattleText4 ; 0x55ea TextAfterBattle -	dw Route3EndBattleText4 ; 0x55e5 TextEndBattle -	dw Route3EndBattleText4 ; 0x55e5 TextEndBattle +	dw Route3BattleText4 ; TextBeforeBattle +	dw Route3AfterBattleText4 ; TextAfterBattle +	dw Route3EndBattleText4 ; TextEndBattle +	dw Route3EndBattleText4 ; TextEndBattle  Route3TrainerHeader5: ; 55555 (15:5555)  	db $6 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText5 ; 0x55f9 TextBeforeBattle -	dw Route3AfterBattleText5 ; 0x5603 TextAfterBattle -	dw Route3EndBattleText5 ; 0x55fe TextEndBattle -	dw Route3EndBattleText5 ; 0x55fe TextEndBattle +	dw Route3BattleText5 ; TextBeforeBattle +	dw Route3AfterBattleText5 ; TextAfterBattle +	dw Route3EndBattleText5 ; TextEndBattle +	dw Route3EndBattleText5 ; TextEndBattle  Route3TrainerHeader6: ; 55561 (15:5561)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText6 ; 0x5612 TextBeforeBattle -	dw Route3AfterBattleText6 ; 0x561c TextAfterBattle -	dw Route3EndBattleText6 ; 0x5617 TextEndBattle -	dw Route3EndBattleText6 ; 0x5617 TextEndBattle +	dw Route3BattleText6 ; TextBeforeBattle +	dw Route3AfterBattleText6 ; TextAfterBattle +	dw Route3EndBattleText6 ; TextEndBattle +	dw Route3EndBattleText6 ; TextEndBattle  Route3TrainerHeader7: ; 5556d (15:556d)  	db $8 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText7 ; 0x562b TextBeforeBattle -	dw Route3AfterBattleText7 ; 0x5635 TextAfterBattle -	dw Route3EndBattleText7 ; 0x5630 TextEndBattle -	dw Route3EndBattleText7 ; 0x5630 TextEndBattle +	dw Route3BattleText7 ; TextBeforeBattle +	dw Route3AfterBattleText7 ; TextAfterBattle +	dw Route3EndBattleText7 ; TextEndBattle +	dw Route3EndBattleText7 ; TextEndBattle  Route3TrainerHeader8: ; 55579 (15:5579)  	db $9 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7c3 ; flag's byte -	dw Route3BattleText8 ; 0x5644 TextBeforeBattle -	dw Route3AfterBattleText8 ; 0x564e TextAfterBattle -	dw Route3EndBattleText8 ; 0x5649 TextEndBattle -	dw Route3EndBattleText8 ; 0x5649 TextEndBattle +	dw Route3BattleText8 ; TextBeforeBattle +	dw Route3AfterBattleText8 ; TextAfterBattle +	dw Route3EndBattleText8 ; TextEndBattle +	dw Route3EndBattleText8 ; TextEndBattle  	db $ff @@ -104,7 +104,7 @@ Route3Text1: ; 55586 (15:5586)  	db "@"  Route3Text2: ; 5558b (15:558b) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -122,7 +122,7 @@ Route3AfterBattleText1: ; 5559f (15:559f)  	db "@"  Route3Text3: ; 555a4 (15:55a4) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -140,7 +140,7 @@ Route3AfterBattleText2: ; 555b8 (15:55b8)  	db "@"  Route3Text4: ; 555bd (15:55bd) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -158,7 +158,7 @@ Route3AfterBattleText3: ; 555d1 (15:55d1)  	db "@"  Route3Text5: ; 555d6 (15:55d6) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -176,7 +176,7 @@ Route3AfterBattleText4: ; 555ea (15:55ea)  	db "@"  Route3Text6: ; 555ef (15:55ef) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -194,7 +194,7 @@ Route3AfterBattleText5: ; 55603 (15:5603)  	db "@"  Route3Text7: ; 55608 (15:5608) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -212,7 +212,7 @@ Route3AfterBattleText6: ; 5561c (15:561c)  	db "@"  Route3Text8: ; 55621 (15:5621) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd @@ -230,7 +230,7 @@ Route3AfterBattleText7: ; 55635 (15:5635)  	db "@"  Route3Text9: ; 5563a (15:563a) -	db $08 ; asm +	TX_ASM  	ld hl, Route3TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route4.asm b/scripts/route4.asm index 5eafb4f7..c4a1e956 100755 --- a/scripts/route4.asm +++ b/scripts/route4.asm @@ -25,10 +25,10 @@ Route4TrainerHeader0: ; 5567d (15:567d)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7c5 ; flag's byte -	dw Route4BattleText1 ; 0x5699 TextBeforeBattle -	dw Route4AfterBattleText1 ; 0x56a3 TextAfterBattle -	dw Route4EndBattleText1 ; 0x569e TextEndBattle -	dw Route4EndBattleText1 ; 0x569e TextEndBattle +	dw Route4BattleText1 ; TextBeforeBattle +	dw Route4AfterBattleText1 ; TextAfterBattle +	dw Route4EndBattleText1 ; TextEndBattle +	dw Route4EndBattleText1 ; TextEndBattle  	db $ff @@ -37,7 +37,7 @@ Route4Text1: ; 5568a (15:568a)  	db "@"  Route4Text2: ; 5568f (15:568f) -	db $08 ; asm +	TX_ASM  	ld hl, Route4TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm index bee70e77..72f226e7 100755 --- a/scripts/route5gate.asm +++ b/scripts/route5gate.asm @@ -29,7 +29,7 @@ Route5GateScript0: ; 1df50 (7:5f50)  	callba RemoveGuardDrink  	ld a, [$ffdb]  	and a -	jr nz, .asm_1df82 ; 0x1df70 $10 +	jr nz, .asm_1df82  	ld a, $2  	ld [$ff8c], a  	call DisplayTextID @@ -69,27 +69,27 @@ Route8GateText1: ; 1dfaa (7:5faa)  Route7GateText1: ; 1dfaa (7:5faa)  Route6GateText1: ; 1dfaa (7:5faa)  Route5GateText1: ; 1dfaa (7:5faa) -	db $8 +	TX_ASM  	ld a, [wd728]  	bit 6, a -	jr nz, .asm_88856 ; 0x1dfb0 $2c +	jr nz, .asm_88856  	callba RemoveGuardDrink  	ld a, [$ffdb]  	and a -	jr nz, .asm_768a2 ; 0x1dfbd $11 +	jr nz, .asm_768a2  	ld hl, Route5GateText2  	call PrintText  	call Route5GateScript_1df43  	ld a, $1  	ld [W_ROUTE5GATECURSCRIPT], a  	jp TextScriptEnd -.asm_768a2 ; 0x1dfd0 +.asm_768a2  	ld hl, Route5GateText3  	call PrintText  	ld hl, wd728  	set 6, [hl]  	jp TextScriptEnd -.asm_88856 ; 0x1dfde +.asm_88856  	ld hl, SaffronGateText_1dff6  	call PrintText  	jp TextScriptEnd @@ -105,9 +105,9 @@ Route8GateText3: ; 1dfec (7:5fec)  Route7GateText3: ; 1dfec (7:5fec)  Route6GateText3: ; 1dfec (7:5fec)  Route5GateText3: ; 1dfec (7:5fec) -	TX_FAR _SaffronGateText_8aaa9 ; 0x8aaa9 +	TX_FAR _SaffronGateText_8aaa9  	db $11 -	TX_FAR _SaffronGateText_1dff1 ; 0x8aaef +	TX_FAR _SaffronGateText_1dff1  	db "@"  SaffronGateText_1dff6: ; 1dff6 (7:5ff6) diff --git a/scripts/route6.asm b/scripts/route6.asm index ee6258cd..51116390 100755 --- a/scripts/route6.asm +++ b/scripts/route6.asm @@ -26,60 +26,60 @@ Route6TrainerHeader0: ; 590d7 (16:50d7)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd7c9 ; flag's byte -	dw Route6BattleText1 ; 0x512a TextBeforeBattle -	dw Route6AfterBattleText1 ; 0x5134 TextAfterBattle -	dw Route6EndBattleText1 ; 0x512f TextEndBattle -	dw Route6EndBattleText1 ; 0x512f TextEndBattle +	dw Route6BattleText1 ; TextBeforeBattle +	dw Route6AfterBattleText1 ; TextAfterBattle +	dw Route6EndBattleText1 ; TextEndBattle +	dw Route6EndBattleText1 ; TextEndBattle  Route6TrainerHeader1: ; 590e3 (16:50e3)  	db $2 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd7c9 ; flag's byte -	dw Route6BattleText2 ; 0x5143 TextBeforeBattle -	dw Route6AfterBattleText1 ; 0x5134 TextAfterBattle -	dw Route6EndBattleText2 ; 0x5148 TextEndBattle -	dw Route6EndBattleText2 ; 0x5148 TextEndBattle +	dw Route6BattleText2 ; TextBeforeBattle +	dw Route6AfterBattleText1 ; TextAfterBattle +	dw Route6EndBattleText2 ; TextEndBattle +	dw Route6EndBattleText2 ; TextEndBattle  Route6TrainerHeader2: ; 590ef (16:50ef)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7c9 ; flag's byte -	dw Route6BattleText3 ; 0x5157 TextBeforeBattle -	dw Route6AfterBattleText3 ; 0x5161 TextAfterBattle -	dw Route6EndBattleText3 ; 0x515c TextEndBattle -	dw Route6EndBattleText3 ; 0x515c TextEndBattle +	dw Route6BattleText3 ; TextBeforeBattle +	dw Route6AfterBattleText3 ; TextAfterBattle +	dw Route6EndBattleText3 ; TextEndBattle +	dw Route6EndBattleText3 ; TextEndBattle  Route6TrainerHeader3: ; 590fb (16:50fb)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7c9 ; flag's byte -	dw Route6BattleText4 ; 0x5170 TextBeforeBattle -	dw Route6AfterBattleText4 ; 0x517a TextAfterBattle -	dw Route6EndBattleText4 ; 0x5175 TextEndBattle -	dw Route6EndBattleText4 ; 0x5175 TextEndBattle +	dw Route6BattleText4 ; TextBeforeBattle +	dw Route6AfterBattleText4 ; TextAfterBattle +	dw Route6EndBattleText4 ; TextEndBattle +	dw Route6EndBattleText4 ; TextEndBattle  Route6TrainerHeader4: ; 59107 (16:5107)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7c9 ; flag's byte -	dw Route6BattleText5 ; 0x5189 TextBeforeBattle -	dw Route6AfterBattleText5 ; 0x5193 TextAfterBattle -	dw Route6EndBattleText5 ; 0x518e TextEndBattle -	dw Route6EndBattleText5 ; 0x518e TextEndBattle +	dw Route6BattleText5 ; TextBeforeBattle +	dw Route6AfterBattleText5 ; TextAfterBattle +	dw Route6EndBattleText5 ; TextEndBattle +	dw Route6EndBattleText5 ; TextEndBattle  Route6TrainerHeader5: ; 59113 (16:5113)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7c9 ; flag's byte -	dw Route6BattleText6 ; 0x51a2 TextBeforeBattle -	dw Route6AfterBattleText6 ; 0x51ac TextAfterBattle -	dw Route6EndBattleText6 ; 0x51a7 TextEndBattle -	dw Route6EndBattleText6 ; 0x51a7 TextEndBattle +	dw Route6BattleText6 ; TextBeforeBattle +	dw Route6AfterBattleText6 ; TextAfterBattle +	dw Route6EndBattleText6 ; TextEndBattle +	dw Route6EndBattleText6 ; TextEndBattle  	db $ff  Route6Text1: ; 59120 (16:5120) -	db $8 +	TX_ASM  	ld hl, Route6TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -97,7 +97,7 @@ Route6AfterBattleText1: ; 59134 (16:5134)  	db "@"  Route6Text2: ; 59139 (16:5139) -	db $08 ; asm +	TX_ASM  	ld hl, Route6TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -111,7 +111,7 @@ Route6EndBattleText2: ; 59148 (16:5148)  	db "@"  Route6Text3: ; 5914d (16:514d) -	db $08 ; asm +	TX_ASM  	ld hl, Route6TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -129,7 +129,7 @@ Route6AfterBattleText3: ; 59161 (16:5161)  	db "@"  Route6Text4: ; 59166 (16:5166) -	db $08 ; asm +	TX_ASM  	ld hl, Route6TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -147,7 +147,7 @@ Route6AfterBattleText4: ; 5917a (16:517a)  	db "@"  Route6Text5: ; 5917f (16:517f) -	db $08 ; asm +	TX_ASM  	ld hl, Route6TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -165,7 +165,7 @@ Route6AfterBattleText5: ; 59193 (16:5193)  	db "@"  Route6Text6: ; 59198 (16:5198) -	db $08 ; asm +	TX_ASM  	ld hl, Route6TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route6gate.asm b/scripts/route6gate.asm index 44d03a75..82e2414a 100755 --- a/scripts/route6gate.asm +++ b/scripts/route6gate.asm @@ -23,7 +23,7 @@ Route6GateScript0: ; 1e04e (7:604e)  	callba RemoveGuardDrink  	ld a, [$ffdb]  	and a -	jr nz, .asm_1e080 ; 0x1e06e $10 +	jr nz, .asm_1e080  	ld a, $2  	ld [$ff8c], a  	call DisplayTextID diff --git a/scripts/route7gate.asm b/scripts/route7gate.asm index beab96bf..4a05acc3 100755 --- a/scripts/route7gate.asm +++ b/scripts/route7gate.asm @@ -35,7 +35,7 @@ Route7GateScript0: ; 1e128 (7:6128)  	callba RemoveGuardDrink  	ld a, [$ffdb]  	and a -	jr nz, .asm_1e15a ; 0x1e148 $10 +	jr nz, .asm_1e15a  	ld a, $2  	ld [$ff8c], a  	call DisplayTextID diff --git a/scripts/route8.asm b/scripts/route8.asm index eed57c7b..8d589c90 100755 --- a/scripts/route8.asm +++ b/scripts/route8.asm @@ -29,87 +29,87 @@ Route8TrainerHeader0: ; 591e3 (16:51e3)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText1 ; 0x525a TextBeforeBattle -	dw Route8AfterBattleText1 ; 0x5264 TextAfterBattle -	dw Route8EndBattleText1 ; 0x525f TextEndBattle -	dw Route8EndBattleText1 ; 0x525f TextEndBattle +	dw Route8BattleText1 ; TextBeforeBattle +	dw Route8AfterBattleText1 ; TextAfterBattle +	dw Route8EndBattleText1 ; TextEndBattle +	dw Route8EndBattleText1 ; TextEndBattle  Route8TrainerHeader1: ; 591ef (16:51ef)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText2 ; 0x5273 TextBeforeBattle -	dw Route8AfterBattleText2 ; 0x527d TextAfterBattle -	dw Route8EndBattleText2 ; 0x5278 TextEndBattle -	dw Route8EndBattleText2 ; 0x5278 TextEndBattle +	dw Route8BattleText2 ; TextBeforeBattle +	dw Route8AfterBattleText2 ; TextAfterBattle +	dw Route8EndBattleText2 ; TextEndBattle +	dw Route8EndBattleText2 ; TextEndBattle  Route8TrainerHeader2: ; 591fb (16:51fb)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText3 ; 0x528c TextBeforeBattle -	dw Route8AfterBattleText3 ; 0x5296 TextAfterBattle -	dw Route8EndBattleText3 ; 0x5291 TextEndBattle -	dw Route8EndBattleText3 ; 0x5291 TextEndBattle +	dw Route8BattleText3 ; TextBeforeBattle +	dw Route8AfterBattleText3 ; TextAfterBattle +	dw Route8EndBattleText3 ; TextEndBattle +	dw Route8EndBattleText3 ; TextEndBattle  Route8TrainerHeader3: ; 59207 (16:5207)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText4 ; 0x52a5 TextBeforeBattle -	dw Route8AfterBattleText4 ; 0x52af TextAfterBattle -	dw Route8EndBattleText4 ; 0x52aa TextEndBattle -	dw Route8EndBattleText4 ; 0x52aa TextEndBattle +	dw Route8BattleText4 ; TextBeforeBattle +	dw Route8AfterBattleText4 ; TextAfterBattle +	dw Route8EndBattleText4 ; TextEndBattle +	dw Route8EndBattleText4 ; TextEndBattle  Route8TrainerHeader4: ; 59213 (16:5213)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText5 ; 0x52be TextBeforeBattle -	dw Route8AfterBattleText5 ; 0x52c8 TextAfterBattle -	dw Route8EndBattleText5 ; 0x52c3 TextEndBattle -	dw Route8EndBattleText5 ; 0x52c3 TextEndBattle +	dw Route8BattleText5 ; TextBeforeBattle +	dw Route8AfterBattleText5 ; TextAfterBattle +	dw Route8EndBattleText5 ; TextEndBattle +	dw Route8EndBattleText5 ; TextEndBattle  Route8TrainerHeader5: ; 5921f (16:521f)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText6 ; 0x52d7 TextBeforeBattle -	dw Route8AfterBattleText6 ; 0x52e1 TextAfterBattle -	dw Route8EndBattleText6 ; 0x52dc TextEndBattle -	dw Route8EndBattleText6 ; 0x52dc TextEndBattle +	dw Route8BattleText6 ; TextBeforeBattle +	dw Route8AfterBattleText6 ; TextAfterBattle +	dw Route8EndBattleText6 ; TextEndBattle +	dw Route8EndBattleText6 ; TextEndBattle  Route8TrainerHeader6: ; 5922b (16:522b)  	db $7 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText7 ; 0x52f0 TextBeforeBattle -	dw Route8AfterBattleText7 ; 0x52fa TextAfterBattle -	dw Route8EndBattleText7 ; 0x52f5 TextEndBattle -	dw Route8EndBattleText7 ; 0x52f5 TextEndBattle +	dw Route8BattleText7 ; TextBeforeBattle +	dw Route8AfterBattleText7 ; TextAfterBattle +	dw Route8EndBattleText7 ; TextEndBattle +	dw Route8EndBattleText7 ; TextEndBattle  Route8TrainerHeader7: ; 59237 (16:5237)  	db $8 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText8 ; 0x5309 TextBeforeBattle -	dw Route8AfterBattleText8 ; 0x5313 TextAfterBattle -	dw Route8EndBattleText8 ; 0x530e TextEndBattle -	dw Route8EndBattleText8 ; 0x530e TextEndBattle +	dw Route8BattleText8 ; TextBeforeBattle +	dw Route8AfterBattleText8 ; TextAfterBattle +	dw Route8EndBattleText8 ; TextEndBattle +	dw Route8EndBattleText8 ; TextEndBattle  Route8TrainerHeader8: ; 59243 (16:5243)  	db $9 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7cd ; flag's byte -	dw Route8BattleText9 ; 0x5322 TextBeforeBattle -	dw Route8AfterBattleText9 ; 0x532c TextAfterBattle -	dw Route8EndBattleText9 ; 0x5327 TextEndBattle -	dw Route8EndBattleText9 ; 0x5327 TextEndBattle +	dw Route8BattleText9 ; TextBeforeBattle +	dw Route8AfterBattleText9 ; TextAfterBattle +	dw Route8EndBattleText9 ; TextEndBattle +	dw Route8EndBattleText9 ; TextEndBattle  	db $ff  Route8Text1: ; 59250 (16:5250) -	db $8 +	TX_ASM  	ld hl, Route8TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -127,7 +127,7 @@ Route8AfterBattleText1: ; 59264 (16:5264)  	db "@"  Route8Text2: ; 59269 (16:5269) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -145,7 +145,7 @@ Route8AfterBattleText2: ; 5927d (16:527d)  	db "@"  Route8Text3: ; 59282 (16:5282) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -163,7 +163,7 @@ Route8AfterBattleText3: ; 59296 (16:5296)  	db "@"  Route8Text4: ; 5929b (16:529b) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -181,7 +181,7 @@ Route8AfterBattleText4: ; 592af (16:52af)  	db "@"  Route8Text5: ; 592b4 (16:52b4) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -199,7 +199,7 @@ Route8AfterBattleText5: ; 592c8 (16:52c8)  	db "@"  Route8Text6: ; 592cd (16:52cd) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -217,7 +217,7 @@ Route8AfterBattleText6: ; 592e1 (16:52e1)  	db "@"  Route8Text7: ; 592e6 (16:52e6) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -235,7 +235,7 @@ Route8AfterBattleText7: ; 592fa (16:52fa)  	db "@"  Route8Text8: ; 592ff (16:52ff) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd @@ -253,7 +253,7 @@ Route8AfterBattleText8: ; 59313 (16:5313)  	db "@"  Route8Text9: ; 59318 (16:5318) -	db $08 ; asm +	TX_ASM  	ld hl, Route8TrainerHeader8  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/route8gate.asm b/scripts/route8gate.asm index 8ea12f04..de0a856f 100755 --- a/scripts/route8gate.asm +++ b/scripts/route8gate.asm @@ -34,7 +34,7 @@ Route8GateScript0: ; 1e1ee (7:61ee)  	callba RemoveGuardDrink  	ld a, [$ffdb]  	and a -	jr nz, .asm_1e220 ; 0x1e20e $10 +	jr nz, .asm_1e220  	ld a, $2  	ld [$ff8c], a  	call DisplayTextID diff --git a/scripts/route9.asm b/scripts/route9.asm index 77b216c6..539e1a3f 100755 --- a/scripts/route9.asm +++ b/scripts/route9.asm @@ -30,129 +30,129 @@ Route9TrainerHeader0: ; 556eb (15:56eb)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText1 ; 0x5792 TextBeforeBattle -	dw Route9AfterBattleText1 ; 0x579c TextAfterBattle -	dw Route9EndBattleText1 ; 0x5797 TextEndBattle -	dw Route9EndBattleText1 ; 0x5797 TextEndBattle +	dw Route9BattleText1 ; TextBeforeBattle +	dw Route9AfterBattleText1 ; TextAfterBattle +	dw Route9EndBattleText1 ; TextEndBattle +	dw Route9EndBattleText1 ; TextEndBattle  Route9TrainerHeader2: ; 556f7 (15:56f7)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText2 ; 0x57a1 TextBeforeBattle -	dw Route9AfterBattleText2 ; 0x57ab TextAfterBattle -	dw Route9EndBattleText2 ; 0x57a6 TextEndBattle -	dw Route9EndBattleText2 ; 0x57a6 TextEndBattle +	dw Route9BattleText2 ; TextBeforeBattle +	dw Route9AfterBattleText2 ; TextAfterBattle +	dw Route9EndBattleText2 ; TextEndBattle +	dw Route9EndBattleText2 ; TextEndBattle  Route9TrainerHeader3: ; 55703 (15:5703)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText3 ; 0x57b0 TextBeforeBattle -	dw Route9AfterBattleText3 ; 0x57ba TextAfterBattle -	dw Route9EndBattleText3 ; 0x57b5 TextEndBattle -	dw Route9EndBattleText3 ; 0x57b5 TextEndBattle +	dw Route9BattleText3 ; TextBeforeBattle +	dw Route9AfterBattleText3 ; TextAfterBattle +	dw Route9EndBattleText3 ; TextEndBattle +	dw Route9EndBattleText3 ; TextEndBattle  Route9TrainerHeader4: ; 5570f (15:570f)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText4 ; 0x57bf TextBeforeBattle -	dw Route9AfterBattleText4 ; 0x57c9 TextAfterBattle -	dw Route9EndBattleText4 ; 0x57c4 TextEndBattle -	dw Route9EndBattleText4 ; 0x57c4 TextEndBattle +	dw Route9BattleText4 ; TextBeforeBattle +	dw Route9AfterBattleText4 ; TextAfterBattle +	dw Route9EndBattleText4 ; TextEndBattle +	dw Route9EndBattleText4 ; TextEndBattle  Route9TrainerHeader5: ; 5571b (15:571b)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText5 ; 0x57ce TextBeforeBattle -	dw Route9AfterBattleText5 ; 0x57d8 TextAfterBattle -	dw Route9EndBattleText5 ; 0x57d3 TextEndBattle -	dw Route9EndBattleText5 ; 0x57d3 TextEndBattle +	dw Route9BattleText5 ; TextBeforeBattle +	dw Route9AfterBattleText5 ; TextAfterBattle +	dw Route9EndBattleText5 ; TextEndBattle +	dw Route9EndBattleText5 ; TextEndBattle  Route9TrainerHeader6: ; 55727 (15:5727)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText6 ; 0x57dd TextBeforeBattle -	dw Route9AfterBattleText6 ; 0x57e7 TextAfterBattle -	dw Route9EndBattleText6 ; 0x57e2 TextEndBattle -	dw Route9EndBattleText6 ; 0x57e2 TextEndBattle +	dw Route9BattleText6 ; TextBeforeBattle +	dw Route9AfterBattleText6 ; TextAfterBattle +	dw Route9EndBattleText6 ; TextEndBattle +	dw Route9EndBattleText6 ; TextEndBattle  Route9TrainerHeader7: ; 55733 (15:5733)  	db $7 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText7 ; 0x57ec TextBeforeBattle -	dw Route9AfterBattleText7 ; 0x57f6 TextAfterBattle -	dw Route9EndBattleText7 ; 0x57f1 TextEndBattle -	dw Route9EndBattleText7 ; 0x57f1 TextEndBattle +	dw Route9BattleText7 ; TextBeforeBattle +	dw Route9AfterBattleText7 ; TextAfterBattle +	dw Route9EndBattleText7 ; TextEndBattle +	dw Route9EndBattleText7 ; TextEndBattle  Route9TrainerHeader8: ; 5573f (15:573f)  	db $8 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText8 ; 0x57fb TextBeforeBattle -	dw Route9AfterBattleText8 ; 0x5805 TextAfterBattle -	dw Route9EndBattleText8 ; 0x5800 TextEndBattle -	dw Route9EndBattleText8 ; 0x5800 TextEndBattle +	dw Route9BattleText8 ; TextBeforeBattle +	dw Route9AfterBattleText8 ; TextAfterBattle +	dw Route9EndBattleText8 ; TextEndBattle +	dw Route9EndBattleText8 ; TextEndBattle  Route9TrainerHeader9: ; 5574b (15:574b)  	db $9 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd7cf ; flag's byte -	dw Route9BattleText9 ; 0x580a TextBeforeBattle -	dw Route9AfterBattleText9 ; 0x5814 TextAfterBattle -	dw Route9EndBattleText9 ; 0x580f TextEndBattle -	dw Route9EndBattleText9 ; 0x580f TextEndBattle +	dw Route9BattleText9 ; TextBeforeBattle +	dw Route9AfterBattleText9 ; TextAfterBattle +	dw Route9EndBattleText9 ; TextEndBattle +	dw Route9EndBattleText9 ; TextEndBattle  	db $ff  Route9Text1: ; 55758 (15:5758) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader0 -	jr asm_8be3d ; 0x5575c $2e +	jr Route9TalkToTrainer  Route9Text2: ; 5575e (15:575e) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader2 -	jr asm_8be3d ; 0x55762 $28 +	jr Route9TalkToTrainer  Route9Text3: ; 55764 (15:5764) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader3 -	jr asm_8be3d ; 0x55768 $22 +	jr Route9TalkToTrainer  Route9Text4: ; 5576a (15:576a) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader4 -	jr asm_8be3d ; 0x5576e $1c +	jr Route9TalkToTrainer  Route9Text5: ; 55770 (15:5770) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader5 -	jr asm_8be3d ; 0x55774 $16 +	jr Route9TalkToTrainer  Route9Text6: ; 55776 (15:5776) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader6 -	jr asm_8be3d ; 0x5577a $10 +	jr Route9TalkToTrainer  Route9Text7: ; 5577c (15:577c) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader7 -	jr asm_8be3d ; 0x55780 $a +	jr Route9TalkToTrainer  Route9Text8: ; 55782 (15:5782) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader8 -	jr asm_8be3d ; 0x55786 $4 +	jr Route9TalkToTrainer  Route9Text9: ; 55788 (15:5788) -	db $8 ; asm +	TX_ASM  	ld hl, Route9TrainerHeader9 -asm_8be3d: ; 5578c (15:578c) +Route9TalkToTrainer: ; 5578c (15:578c)  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index 294dcf58..6b9029f6 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -28,7 +28,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)  	ld [wSpriteStateData1 + 9], a  	ld a, [wWhichTrade]  	cp $1 -	jr z, .asm_7520f ; 0x75207 $6 +	jr z, .asm_7520f  	ld a, $2  	ld [W_SAFARIZONEENTRANCECURSCRIPT], a  	ret @@ -77,7 +77,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)  	ld hl, wd790  	bit 6, [hl]  	res 6, [hl] -	jr z, .asm_7527f ; 0x7525a $23 +	jr z, .asm_7527f  	res 7, [hl]  	call UpdateSprites  	ld a, $f0 @@ -92,7 +92,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)  	call SafariZoneEntranceAutoWalk  	ld a, $4  	ld [W_SAFARIZONEENTRANCECURSCRIPT], a -	jr .asm_75286 ; 0x7527d $7 +	jr .asm_75286  .asm_7527f  	ld a, $5  	ld [$ff8c], a @@ -145,8 +145,8 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)  	db "@"  .SafariZoneEntranceText4 -	TX_FAR SafariZoneEntranceText_9e6e4 ; 0x9e6e4 -	db $8 +	TX_FAR SafariZoneEntranceText_9e6e4 +	TX_ASM  	ld a, $13  	ld [wTextBoxID],a  	call DisplayTextBoxID @@ -225,12 +225,12 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)  	db "@"  .SafariZoneEntranceText5 -	TX_FAR SafariZoneEntranceText_9e814 ; 0x9e814 -	db $8 +	TX_FAR SafariZoneEntranceText_9e814 +	TX_ASM  	call YesNoChoice  	ld a,[wCurrentMenuItem]  	and a -	jr nz, .asm_7539c ; 0x7537b $1f +	jr nz, .asm_7539c  	ld hl, .SafariZoneEntranceText_753bb  	call PrintText  	xor a @@ -243,7 +243,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)  	res 7, [hl]  	ld a, $0  	ld [wcf0d], a -	jr .asm_753b3 ; 0x7539a $17 +	jr .asm_753b3  .asm_7539c  	ld hl, .SafariZoneEntranceText_753c0  	call PrintText @@ -272,7 +272,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)  	db "@"  .SafariZoneEntranceText2 -	db $08 ; asm +	TX_ASM  	ld hl,.FirstTimeQuestionText  	call PrintText  	call YesNoChoice diff --git a/scripts/safarizonesecrethouse.asm b/scripts/safarizonesecrethouse.asm index 28aae7c4..b1dd95d3 100755 --- a/scripts/safarizonesecrethouse.asm +++ b/scripts/safarizonesecrethouse.asm @@ -5,10 +5,10 @@ SafariZoneSecretHouseTextPointers: ; 4a31a (12:631a)  	dw SafariZoneSecretHouseText1  SafariZoneSecretHouseText1: ; 4a31c (12:631c) -	db $08 ; asm +	TX_ASM  	ld a, [wd857]  	bit 0, a -	jr nz, .asm_20a9b ; 0x4a322 +	jr nz, .asm_20a9b  	ld hl, SafariZoneSecretHouseText_4a350  	call PrintText  	ld bc, (HM_03 << 8) | 1 @@ -18,15 +18,15 @@ SafariZoneSecretHouseText1: ; 4a31c (12:631c)  	call PrintText  	ld hl, wd857  	set 0, [hl] -	jr .asm_8f1fc ; 0x4a33d +	jr .asm_8f1fc  .BagFull  	ld hl, HM03NoRoomText  	call PrintText -	jr .asm_8f1fc ; 0x4a345 -.asm_20a9b ; 0x4a347 +	jr .asm_8f1fc +.asm_20a9b  	ld hl, HM03ExplanationText  	call PrintText -.asm_8f1fc ; 0x4a34d +.asm_8f1fc  	jp TextScriptEnd  SafariZoneSecretHouseText_4a350: ; 4a350 (12:6350) diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm index 7c2eb559..7e4f4447 100755 --- a/scripts/saffrongym.asm +++ b/scripts/saffrongym.asm @@ -12,8 +12,8 @@ SaffronGymScript: ; 5d00d (17:500d)  	ret  .extra -	ld hl, Gym6CityName ; $5033 -	ld de, Gym6LeaderName ; $5040 +	ld hl, Gym6CityName +	ld de, Gym6LeaderName  	jp LoadGymLeaderAndCityName  Gym6CityName: ; 5d033 (17:5033) @@ -36,7 +36,7 @@ SaffronGymScriptPointers: ; 5d053 (17:5053)  	dw SaffronGymScript3  SaffronGymScript3: ; 5d05b (17:505b) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, SaffronGymText_5d048  	ld a, $f0 @@ -44,7 +44,7 @@ SaffronGymScript3: ; 5d05b (17:505b)  SaffronGymText_5d068: ; 5d068 (17:5068)  	ld a, $a -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd7b3  	set 1, [hl] @@ -52,14 +52,14 @@ SaffronGymText_5d068: ; 5d068 (17:5068)  	call GiveItem  	jr nc, .BagFull  	ld a, $b -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd7b3  	set 0, [hl]  	jr .asm_5d091  .BagFull  	ld a, $c -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_5d091  	ld hl, W_OBTAINEDBADGES @@ -95,82 +95,82 @@ SaffronGymTrainerHeader0: ; 5d0c3 (17:50c3)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b3 ; flag's byte -	dw SaffronGymBattleText1 ; 0x51f0 TextBeforeBattle -	dw SaffronGymAfterBattleText1 ; 0x51fa TextAfterBattle -	dw SaffronGymEndBattleText1 ; 0x51f5 TextEndBattle -	dw SaffronGymEndBattleText1 ; 0x51f5 TextEndBattle +	dw SaffronGymBattleText1 ; TextBeforeBattle +	dw SaffronGymAfterBattleText1 ; TextAfterBattle +	dw SaffronGymEndBattleText1 ; TextEndBattle +	dw SaffronGymEndBattleText1 ; TextEndBattle  SaffronGymTrainerHeader1: ; 5d0cf (17:50cf)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b3 ; flag's byte -	dw SaffronGymBattleText2 ; 0x51ff TextBeforeBattle -	dw SaffronGymAfterBattleText2 ; 0x5209 TextAfterBattle -	dw SaffronGymEndBattleText2 ; 0x5204 TextEndBattle -	dw SaffronGymEndBattleText2 ; 0x5204 TextEndBattle +	dw SaffronGymBattleText2 ; TextBeforeBattle +	dw SaffronGymAfterBattleText2 ; TextAfterBattle +	dw SaffronGymEndBattleText2 ; TextEndBattle +	dw SaffronGymEndBattleText2 ; TextEndBattle  SaffronGymTrainerHeader2: ; 5d0db (17:50db)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b3 ; flag's byte -	dw SaffronGymBattleText3 ; 0x520e TextBeforeBattle -	dw SaffronGymAfterBattleText3 ; 0x5218 TextAfterBattle -	dw SaffronGymEndBattleText3 ; 0x5213 TextEndBattle -	dw SaffronGymEndBattleText3 ; 0x5213 TextEndBattle +	dw SaffronGymBattleText3 ; TextBeforeBattle +	dw SaffronGymAfterBattleText3 ; TextAfterBattle +	dw SaffronGymEndBattleText3 ; TextEndBattle +	dw SaffronGymEndBattleText3 ; TextEndBattle  SaffronGymTrainerHeader3: ; 5d0e7 (17:50e7)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b3 ; flag's byte -	dw SaffronGymBattleText4 ; 0x521d TextBeforeBattle -	dw SaffronGymAfterBattleText4 ; 0x5227 TextAfterBattle -	dw SaffronGymEndBattleText4 ; 0x5222 TextEndBattle -	dw SaffronGymEndBattleText4 ; 0x5222 TextEndBattle +	dw SaffronGymBattleText4 ; TextBeforeBattle +	dw SaffronGymAfterBattleText4 ; TextAfterBattle +	dw SaffronGymEndBattleText4 ; TextEndBattle +	dw SaffronGymEndBattleText4 ; TextEndBattle  SaffronGymTrainerHeader4: ; 5d0f3 (17:50f3)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b3 ; flag's byte -	dw SaffronGymBattleText5 ; 0x522c TextBeforeBattle -	dw SaffronGymAfterBattleText5 ; 0x5236 TextAfterBattle -	dw SaffronGymEndBattleText5 ; 0x5231 TextEndBattle -	dw SaffronGymEndBattleText5 ; 0x5231 TextEndBattle +	dw SaffronGymBattleText5 ; TextBeforeBattle +	dw SaffronGymAfterBattleText5 ; TextAfterBattle +	dw SaffronGymEndBattleText5 ; TextEndBattle +	dw SaffronGymEndBattleText5 ; TextEndBattle  SaffronGymTrainerHeader5: ; 5d0ff (17:50ff)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b3 ; flag's byte -	dw SaffronGymBattleText6 ; 0x523b TextBeforeBattle -	dw SaffronGymAfterBattleText6 ; 0x5245 TextAfterBattle -	dw SaffronGymEndBattleText6 ; 0x5240 TextEndBattle -	dw SaffronGymEndBattleText6 ; 0x5240 TextEndBattle +	dw SaffronGymBattleText6 ; TextBeforeBattle +	dw SaffronGymAfterBattleText6 ; TextAfterBattle +	dw SaffronGymEndBattleText6 ; TextEndBattle +	dw SaffronGymEndBattleText6 ; TextEndBattle  SaffronGymTrainerHeader6: ; 5d10b (17:510b)  	db $8 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7b3 ; flag's byte -	dw SaffronGymBattleText7 ; 0x524a TextBeforeBattle -	dw SaffronGymAfterBattleText7 ; 0x5254 TextAfterBattle -	dw SaffronGymEndBattleText7 ; 0x524f TextEndBattle -	dw SaffronGymEndBattleText7 ; 0x524f TextEndBattle +	dw SaffronGymBattleText7 ; TextBeforeBattle +	dw SaffronGymAfterBattleText7 ; TextAfterBattle +	dw SaffronGymEndBattleText7 ; TextEndBattle +	dw SaffronGymEndBattleText7 ; TextEndBattle  	db $ff  SaffronGymText1: ; 5d118 (17:5118) -	db $08 ; asm +	TX_ASM  	ld a, [wd7b3]  	bit 1, a -	jr z, .asm_e3544 ; 0x5d11e +	jr z, .asm_5d134  	bit 0, a -	jr nz, .asm_8d2f6 ; 0x5d122 +	jr nz, .asm_5d12c  	call z, SaffronGymText_5d068  	call DisableWaitingAfterTextDisplay -	jr .asm_34c2c ; 0x5d12a -.asm_8d2f6 ; 0x5d12c +	jr .asm_5d15f +.asm_5d12c  	ld hl, SaffronGymText_5d16e  	call PrintText -	jr .asm_34c2c ; 0x5d132 -.asm_e3544 ; 0x5d134 +	jr .asm_5d15f +.asm_5d134  	ld hl, SaffronGymText_5d162  	call PrintText  	ld hl, wd72d @@ -179,7 +179,7 @@ SaffronGymText1: ; 5d118 (17:5118)  	ld hl, SaffronGymText_5d167  	ld de, SaffronGymText_5d167  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters @@ -187,7 +187,7 @@ SaffronGymText1: ; 5d118 (17:5118)  	ld [W_GYMLEADERNO], a  	ld a, $3  	ld [W_SAFFRONGYMCURSCRIPT], a -.asm_34c2c ; 0x5d15f +.asm_5d15f  	jp TextScriptEnd  SaffronGymText_5d162: ; 5d162 (17:5162) @@ -195,7 +195,7 @@ SaffronGymText_5d162: ; 5d162 (17:5162)  	db "@"  SaffronGymText_5d167: ; 5d167 (17:5167) -	TX_FAR _SaffronGymText_5d167 ; 0xa1c73 +	TX_FAR _SaffronGymText_5d167  	db $11 ; play same sound as red giving oak parcel  	db $6 ; wait for keypress  	db "@" @@ -219,59 +219,59 @@ SaffronGymText12: ; 5d182 (17:5182)  	db "@"  SaffronGymText2: ; 5d187 (17:5187) -	db $08 ; asm +	TX_ASM  	ld hl, SaffronGymTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SaffronGymText3: ; 5d191 (17:5191) -	db $08 ; asm +	TX_ASM  	ld hl, SaffronGymTrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SaffronGymText4: ; 5d19b (17:519b) -	db $08 ; asm +	TX_ASM  	ld hl, SaffronGymTrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  SaffronGymText5: ; 5d1a5 (17:51a5) -	db $08 ; asm +	TX_ASM  	ld hl, SaffronGymTrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  SaffronGymText6: ; 5d1af (17:51af) -	db $08 ; asm +	TX_ASM  	ld hl, SaffronGymTrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  SaffronGymText7: ; 5d1b9 (17:51b9) -	db $08 ; asm +	TX_ASM  	ld hl, SaffronGymTrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  SaffronGymText8: ; 5d1c3 (17:51c3) -	db $08 ; asm +	TX_ASM  	ld hl, SaffronGymTrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  SaffronGymText9: ; 5d1cd (17:51cd) -	db $08 ; asm +	TX_ASM  	ld a, [wd7b3]  	bit 1, a -	jr nz, .asm_13f3c ; 0x5d1d3 +	jr nz, .asm_5d1dd  	ld hl, SaffronGymText_5d1e6  	call PrintText -	jr .asm_e9907 ; 0x5d1db -.asm_13f3c ; 0x5d1dd +	jr .asm_5d1e3 +.asm_5d1dd  	ld hl, SaffronGymText_5d1eb  	call PrintText -.asm_e9907 ; 0x5d1e3 +.asm_5d1e3  	jp TextScriptEnd  SaffronGymText_5d1e6: ; 5d1e6 (17:51e6) diff --git a/scripts/saffronhouse1.asm b/scripts/saffronhouse1.asm index 39a70ebf..3aced3c5 100755 --- a/scripts/saffronhouse1.asm +++ b/scripts/saffronhouse1.asm @@ -13,7 +13,7 @@ SaffronHouse1Text1: ; 1dde8 (7:5de8)  SaffronHouse1Text2: ; 1dded (7:5ded)  	TX_FAR _SaffronHouse1Text2 -	db $8 +	TX_ASM  	ld a, PIDGEY  	call PlayCry  	jp TextScriptEnd diff --git a/scripts/saffronhouse2.asm b/scripts/saffronhouse2.asm index 727fd981..b7d8ed26 100755 --- a/scripts/saffronhouse2.asm +++ b/scripts/saffronhouse2.asm @@ -5,10 +5,10 @@ SaffronHouse2TextPointers: ; 1de3f (7:5e3f)  	dw SaffronHouse2Text1  SaffronHouse2Text1: ; 1de41 (7:5e41) -	db $08 ; asm +	TX_ASM  	ld a, [wd7bd]  	bit 0, a -	jr nz, .asm_9e72b ; 0x1de47 +	jr nz, .asm_9e72b  	ld hl, TM29PreReceiveText  	call PrintText  	ld bc,(TM_29 << 8) | 1 @@ -18,15 +18,15 @@ SaffronHouse2Text1: ; 1de41 (7:5e41)  	call PrintText  	ld hl, wd7bd  	set 0, [hl] -	jr .asm_fe4e1 ; 0x1de62 +	jr .asm_fe4e1  .BagFull  	ld hl, TM29NoRoomText  	call PrintText -	jr .asm_fe4e1 ; 0x1de6a -.asm_9e72b ; 0x1de6c +	jr .asm_fe4e1 +.asm_9e72b  	ld hl, TM29ExplanationText  	call PrintText -.asm_fe4e1 ; 0x1de72 +.asm_fe4e1  	jp TextScriptEnd  TM29PreReceiveText: ; 1de75 (7:5e75) diff --git a/scripts/seafoamislands1.asm b/scripts/seafoamislands1.asm index 2e64c9d7..6a8b23ea 100755 --- a/scripts/seafoamislands1.asm +++ b/scripts/seafoamislands1.asm @@ -5,20 +5,20 @@ SeafoamIslands1Script: ; 447e9 (11:47e9)  	ld hl, wFlags_0xcd60  	bit 7, [hl]  	res 7, [hl] -	jr z, .asm_4483b ; 0x447f8 $41 +	jr z, .asm_4483b  	ld hl, Seafoam1HolesCoords  	call CheckBoulderCoords  	ret nc  	ld hl, wd7e8  	ld a, [wWhichTrade]  	cp $1 -	jr nz, .asm_44819 ; 0x44809 $e +	jr nz, .asm_44819  	set 6, [hl]  	ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1  	ld [wd079], a  	ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1  	ld [wd07a], a -	jr .asm_44825 ; 0x44817 $c +	jr .asm_44825  .asm_44819  	set 7, [hl]  	ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2 diff --git a/scripts/seafoamislands2.asm b/scripts/seafoamislands2.asm index 66fe9297..44e92bd0 100755 --- a/scripts/seafoamislands2.asm +++ b/scripts/seafoamislands2.asm @@ -3,20 +3,20 @@ SeafoamIslands2Script: ; 46315 (11:6315)  	ld hl, wFlags_0xcd60  	bit 7, [hl]  	res 7, [hl] -	jr z, .asm_46362 ; 0x4631f $41 +	jr z, .asm_46362  	ld hl, Seafoam2HolesCoords  	call CheckBoulderCoords  	ret nc  	ld hl, wd87f  	ld a, [wWhichTrade]  	cp $1 -	jr nz, .asm_46340 ; 0x46330 $e +	jr nz, .asm_46340  	set 0, [hl]  	ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1  	ld [wd079], a  	ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1  	ld [wd07a], a -	jr .asm_4634c ; 0x4633e $c +	jr .asm_4634c  .asm_46340  	set 1, [hl]  	ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 diff --git a/scripts/seafoamislands3.asm b/scripts/seafoamislands3.asm index fb7d05ba..882553ab 100755 --- a/scripts/seafoamislands3.asm +++ b/scripts/seafoamislands3.asm @@ -3,20 +3,20 @@ SeafoamIslands3Script: ; 46451 (11:6451)  	ld hl, wFlags_0xcd60  	bit 7, [hl]  	res 7, [hl] -	jr z, .asm_4649e ; 0x4645b $41 +	jr z, .asm_4649e  	ld hl, Seafoam3HolesCoords  	call CheckBoulderCoords  	ret nc  	ld hl, wd880  	ld a, [wWhichTrade]  	cp $1 -	jr nz, .asm_4647c ; 0x4646c $e +	jr nz, .asm_4647c  	set 0, [hl]  	ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1  	ld [wd079], a  	ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_3  	ld [wd07a], a -	jr .asm_46488 ; 0x4647a $c +	jr .asm_46488  .asm_4647c  	set 1, [hl]  	ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm index 7e519f86..1eda0436 100755 --- a/scripts/seafoamislands4.asm +++ b/scripts/seafoamislands4.asm @@ -3,20 +3,20 @@ SeafoamIslands4Script: ; 4658d (11:658d)  	ld hl, wFlags_0xcd60  	bit 7, [hl]  	res 7, [hl] -	jr z, .asm_465dc ; 0x46597 $43 +	jr z, .asm_465dc  	ld hl, Seafoam4HolesCoords  	call CheckBoulderCoords  	ret nc  	ld hl, wd881  	ld a, [wWhichTrade]  	cp $1 -	jr nz, .asm_465b8 ; 0x465a8 $e +	jr nz, .asm_465b8  	set 0, [hl]  	ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1  	ld [wd079], a  	ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1  	ld [wd07a], a -	jr .asm_465c4 ; 0x465b6 $c +	jr .asm_465c4  .asm_465b8  	set 1, [hl]  	ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2 @@ -30,7 +30,7 @@ SeafoamIslands4Script: ; 4658d (11:658d)  	ld a, [wd07a]  	ld [wcc4d], a  	predef ShowObject -	jr .asm_465ed ; 0x465da $11 +	jr .asm_465ed  .asm_465dc  	ld a, $a2  	ld [wDungeonWarpDestinationMap], a diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm index b554034b..cbed0276 100755 --- a/scripts/seafoamislands5.asm +++ b/scripts/seafoamislands5.asm @@ -146,15 +146,15 @@ SeafoamIslands5TrainerHeader0: ; 46886 (11:6886)  	db $2 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd882 ; flag's byte -	dw SeafoamIslands5BattleText2 ; 0x68a2 TextBeforeBattle -	dw SeafoamIslands5BattleText2 ; 0x68a2 TextAfterBattle -	dw SeafoamIslands5BattleText2 ; 0x68a2 TextEndBattle -	dw SeafoamIslands5BattleText2 ; 0x68a2 TextEndBattle +	dw SeafoamIslands5BattleText2 ; TextBeforeBattle +	dw SeafoamIslands5BattleText2 ; TextAfterBattle +	dw SeafoamIslands5BattleText2 ; TextEndBattle +	dw SeafoamIslands5BattleText2 ; TextEndBattle  	db $ff  SeafoamIslands5Text3: ; 46893 (11:6893) -	db $08 ; asm +	TX_ASM  	ld hl, SeafoamIslands5TrainerHeader0  	call TalkToTrainer  	ld a, $4 @@ -163,7 +163,7 @@ SeafoamIslands5Text3: ; 46893 (11:6893)  SeafoamIslands5BattleText2: ; 468a2 (11:68a2)  	TX_FAR _SeafoamIslands5BattleText2 -	db $8 +	TX_ASM  	ld a, ARTICUNO  	call PlayCry  	call WaitForSoundToFinish diff --git a/scripts/silphco10.asm b/scripts/silphco10.asm index 7d044aca..46630014 100755 --- a/scripts/silphco10.asm +++ b/scripts/silphco10.asm @@ -13,7 +13,7 @@ SilphCo10Script_5a14f: ; 5a14f (16:614f)  	bit 5, [hl]  	res 5, [hl]  	ret z -	ld hl, DataTable_5a173 ; $6173 +	ld hl, DataTable_5a173  	call SilphCo2Script_59d43  	call SilphCo10Text_5a176  	ld a, [wd836] @@ -53,36 +53,36 @@ SilphCo10TrainerHeader0: ; 5a192 (16:6192)  	db $1 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd835 ; flag's byte -	dw SilphCo10BattleText1 ; 0x61dd TextBeforeBattle -	dw SilphCo10AfterBattleText1 ; 0x61e7 TextAfterBattle -	dw SilphCo10EndBattleText1 ; 0x61e2 TextEndBattle -	dw SilphCo10EndBattleText1 ; 0x61e2 TextEndBattle +	dw SilphCo10BattleText1 ; TextBeforeBattle +	dw SilphCo10AfterBattleText1 ; TextAfterBattle +	dw SilphCo10EndBattleText1 ; TextEndBattle +	dw SilphCo10EndBattleText1 ; TextEndBattle  SilphCo10TrainerHeader1: ; 5a19e (16:619e)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd835 ; flag's byte -	dw SilphCo10BattleText2 ; 0x61ec TextBeforeBattle -	dw SilphCo10AfterBattleText2 ; 0x61f6 TextAfterBattle -	dw SilphCo10EndBattleText2 ; 0x61f1 TextEndBattle -	dw SilphCo10EndBattleText2 ; 0x61f1 TextEndBattle +	dw SilphCo10BattleText2 ; TextBeforeBattle +	dw SilphCo10AfterBattleText2 ; TextAfterBattle +	dw SilphCo10EndBattleText2 ; TextEndBattle +	dw SilphCo10EndBattleText2 ; TextEndBattle  	db $ff  SilphCo10Text1: ; 5a1ab (16:61ab) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo10TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SilphCo10Text2: ; 5a1b5 (16:61b5) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo10TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SilphCo10Text3: ; 5a1bf (16:61bf) -	db $08 ; asm +	TX_ASM  	ld a, [wd838]  	bit 7, a  	ld hl, SilphCo10Text_5a1d8 diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm index 7bb6e448..a0d85483 100755 --- a/scripts/silphco11.asm +++ b/scripts/silphco11.asm @@ -13,7 +13,7 @@ SilphCo11Script_62110: ; 62110 (18:6110)  	bit 5, [hl]  	res 5, [hl]  	ret z -	ld hl, DataTable_62134 ; $6134 +	ld hl, DataTable_62134  	call SilphCo11Script_62137  	call SilphCo11Script_62163  	ld a, [wd838] @@ -72,7 +72,7 @@ SilphCo11Script_62163: ; 62163 (18:6163)  	ret  SilphCo11Script_6216d: ; 6216d (18:616d) -	ld hl, MissableObjectIDs_6219b ; $619b +	ld hl, MissableObjectIDs_6219b  .asm_62170  	ld a, [hli]  	cp $ff @@ -83,7 +83,7 @@ SilphCo11Script_6216d: ; 6216d (18:616d)  	pop hl  	jr .asm_62170  .asm_62181 -	ld hl, MissableObjectIDs_62194 ; $6194 +	ld hl, MissableObjectIDs_62194  .asm_62184  	ld a, [hli]  	cp $ff @@ -167,20 +167,20 @@ SilphCo11Script0: ; 621db (18:61db)  	ld a, [wd838]  	bit 7, a  	ret nz -	ld hl, CoordsData_62211 ; $6211 +	ld hl, CoordsData_62211  	call ArePlayerCoordsInArray  	jp nc, CheckFightingMapTrainers -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	ld [wcf0d], a  	xor a  	ld [hJoyHeld], a  	ld a, $f0  	ld [wJoyIgnore], a  	ld a, $3 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, $3 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call SetSpriteMovementBytesToFF  	ld de, MovementData_62216  	call MoveSprite @@ -198,13 +198,13 @@ MovementData_62216: ; 62216 (18:6216)  SilphCo11Script_6221a: ; 6221a (18:621a)  	ld [wd528], a  	ld a, $3 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	ld a, b  	ld [$ff8d], a  	jp SetSpriteFacingDirectionAndDelay  SilphCo11Script5: ; 62227 (18:6227) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, SilphCo11Script_621c4  	ld a, [wcf0d] @@ -221,7 +221,7 @@ SilphCo11Script5: ; 62227 (18:6227)  	ld a, $f0  	ld [wJoyIgnore], a  	ld a, $6 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	call GBFadeOutToBlack  	call SilphCo11Script_6216d @@ -239,7 +239,7 @@ SilphCo11Script3: ; 6226a (18:626a)  	bit 0, a  	ret nz  	ld a, $3 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call SetSpriteMovementBytesToFF  	ld a, [wcf0d]  	cp $1 @@ -260,10 +260,10 @@ SilphCo11Script4: ; 62293 (18:6293)  	ld hl, wd72d  	set 6, [hl]  	set 7, [hl] -	ld hl, SilphCo10Text_62330 ; $6330 -	ld de, SilphCo10Text_62330 ; $6330 +	ld hl, SilphCo10Text_62330 +	ld de, SilphCo10Text_62330  	call SaveEndBattleTextPointers -	ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c +	ld a, [H_DOWNARROWBLINKCNT2]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters @@ -285,24 +285,24 @@ SilphCo11TrainerHeader0: ; 622c3 (18:62c3)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd837 ; flag's byte -	dw SilphCo11BattleText1 ; 0x6344 TextBeforeBattle -	dw SilphCo11AfterBattleText1 ; 0x634e TextAfterBattle -	dw SilphCo11EndBattleText1 ; 0x6349 TextEndBattle -	dw SilphCo11EndBattleText1 ; 0x6349 TextEndBattle +	dw SilphCo11BattleText1 ; TextBeforeBattle +	dw SilphCo11AfterBattleText1 ; TextAfterBattle +	dw SilphCo11EndBattleText1 ; TextEndBattle +	dw SilphCo11EndBattleText1 ; TextEndBattle  SilphCo11TrainerHeader1: ; 622cf (18:62cf)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd837 ; flag's byte -	dw SilphCo11BattleText2 ; 0x635d TextBeforeBattle -	dw SilphCo11AfterBattleText2 ; 0x6367 TextAfterBattle -	dw SilphCo11EndBattleText2 ; 0x6362 TextEndBattle -	dw SilphCo11EndBattleText2 ; 0x6362 TextEndBattle +	dw SilphCo11BattleText2 ; TextBeforeBattle +	dw SilphCo11AfterBattleText2 ; TextAfterBattle +	dw SilphCo11EndBattleText2 ; TextEndBattle +	dw SilphCo11EndBattleText2 ; TextEndBattle  	db $ff  SilphCo11Text1: ; 622dc (18:62dc) -	db $08 ; asm +	TX_ASM  	ld a, [wd838]  	bit 5, a  	jp nz, .asm_62308 @@ -315,15 +315,15 @@ SilphCo11Text1: ; 622dc (18:62dc)  	call PrintText  	ld hl, wd838  	set 5, [hl] -	jr .asm_fd405 ; 0x622fe +	jr .asm_6230e  .BagFull  	ld hl, SilphCoMasterBallNoRoomText  	call PrintText -	jr .asm_fd405 ; 0x62306 -.asm_62308 ; 0x62308 +	jr .asm_6230e +.asm_62308  	ld hl, SilphCo10Text_6231c  	call PrintText -.asm_fd405 ; 0x6230e +.asm_6230e  	jp TextScriptEnd  SilphCoPresidentText: ; 62311 (18:6311) @@ -359,7 +359,7 @@ SilphCo11Text6: ; 62335 (18:6335)  	db "@"  SilphCo11Text4: ; 6233a (18:633a) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo11TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -377,7 +377,7 @@ SilphCo11AfterBattleText1: ; 6234e (18:634e)  	db "@"  SilphCo11Text5: ; 62353 (18:6353) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo11TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -395,7 +395,7 @@ SilphCo11AfterBattleText2: ; 62367 (18:6367)  	db "@"  SilphCo10Text_6236c: ; 6236c (18:636c) -	db $8 +	TX_ASM  	ld hl, SilphCo10Text_6237b  	call PrintText  	ld a, PORYGON diff --git a/scripts/silphco2.asm b/scripts/silphco2.asm index 63803acd..ee0bd150 100755 --- a/scripts/silphco2.asm +++ b/scripts/silphco2.asm @@ -102,58 +102,58 @@ SilphCo2TrainerHeader0: ; 59d90 (16:5d90)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd825 ; flag's byte -	dw SilphCo2BattleText1 ; 0x5e2a TextBeforeBattle -	dw SilphCo2AfterBattleText1 ; 0x5e34 TextAfterBattle -	dw SilphCo2EndBattleText1 ; 0x5e2f TextEndBattle -	dw SilphCo2EndBattleText1 ; 0x5e2f TextEndBattle +	dw SilphCo2BattleText1 ; TextBeforeBattle +	dw SilphCo2AfterBattleText1 ; TextAfterBattle +	dw SilphCo2EndBattleText1 ; TextEndBattle +	dw SilphCo2EndBattleText1 ; TextEndBattle  SilphCo2TrainerHeader1: ; 59d9c (16:5d9c)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd825 ; flag's byte -	dw SilphCo2BattleText2 ; 0x5e39 TextBeforeBattle -	dw SilphCo2AfterBattleText2 ; 0x5e43 TextAfterBattle -	dw SilphCo2EndBattleText2 ; 0x5e3e TextEndBattle -	dw SilphCo2EndBattleText2 ; 0x5e3e TextEndBattle +	dw SilphCo2BattleText2 ; TextBeforeBattle +	dw SilphCo2AfterBattleText2 ; TextAfterBattle +	dw SilphCo2EndBattleText2 ; TextEndBattle +	dw SilphCo2EndBattleText2 ; TextEndBattle  SilphCo2TrainerHeader2: ; 59da8 (16:5da8)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd825 ; flag's byte -	dw SilphCo2BattleText3 ; 0x5e48 TextBeforeBattle -	dw SilphCo2AfterBattleText3 ; 0x5e52 TextAfterBattle -	dw SilphCo2EndBattleText3 ; 0x5e4d TextEndBattle -	dw SilphCo2EndBattleText3 ; 0x5e4d TextEndBattle +	dw SilphCo2BattleText3 ; TextBeforeBattle +	dw SilphCo2AfterBattleText3 ; TextAfterBattle +	dw SilphCo2EndBattleText3 ; TextEndBattle +	dw SilphCo2EndBattleText3 ; TextEndBattle  SilphCo2TrainerHeader3: ; 59db4 (16:5db4)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd825 ; flag's byte -	dw SilphCo2BattleText4 ; 0x5e57 TextBeforeBattle -	dw SilphCo2AfterBattleText4 ; 0x5e61 TextAfterBattle -	dw SilphCo2EndBattleText4 ; 0x5e5c TextEndBattle -	dw SilphCo2EndBattleText4 ; 0x5e5c TextEndBattle +	dw SilphCo2BattleText4 ; TextBeforeBattle +	dw SilphCo2AfterBattleText4 ; TextAfterBattle +	dw SilphCo2EndBattleText4 ; TextEndBattle +	dw SilphCo2EndBattleText4 ; TextEndBattle  	db $ff  SilphCo2Text1: ; 59dc1 (16:5dc1) -	db $08 ; asm +	TX_ASM  	ld a, [wd826]  	bit 7, a -	jr nz, asm_b8a0d ; 0x59dc7 +	jr nz, .asm_59de4  	ld hl, SilphCo2Text_59ded  	call PrintText  	ld bc, (TM_36 << 8) | 1  	call GiveItem  	ld hl, TM36NoRoomText -	jr nc, asm_2c1e0 ; 0x59dd8 +	jr nc, .asm_59de7  	ld hl, wd826  	set 7, [hl]  	ld hl, ReceivedTM36Text -	jr asm_2c1e0 ; 0x59de2 -asm_b8a0d ; 0x59de4 +	jr .asm_59de7 +.asm_59de4  	ld hl, TM36ExplanationText -asm_2c1e0 ; 0x59de7 +.asm_59de7  	call PrintText  	jp TextScriptEnd @@ -174,25 +174,25 @@ TM36NoRoomText: ; 59dfd (16:5dfd)  	db "@"  SilphCo2Text2: ; 59e02 (16:5e02) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo2TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SilphCo2Text3: ; 59e0c (16:5e0c) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo2TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SilphCo2Text4: ; 59e16 (16:5e16) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo2TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  SilphCo2Text5: ; 59e20 (16:5e20) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo2TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 7b0c67c1..bc36ed39 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -13,7 +13,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71)  	bit 5, [hl]  	res 5, [hl]  	ret z -	ld hl, DataTable_59fa8 ; $5fa8 +	ld hl, DataTable_59fa8  	call SilphCo2Script_59d43  	call SilphCo3Script_59fad  	ld a, [wd828] @@ -65,30 +65,30 @@ SilphCo3TrainerHeader0: ; 59fcc (16:5fcc)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd827 ; flag's byte -	dw SilphCo3BattleText1 ; 0x600d TextBeforeBattle -	dw SilphCo3AfterBattleText1 ; 0x6017 TextAfterBattle -	dw SilphCo3EndBattleText1 ; 0x6012 TextEndBattle -	dw SilphCo3EndBattleText1 ; 0x6012 TextEndBattle +	dw SilphCo3BattleText1 ; TextBeforeBattle +	dw SilphCo3AfterBattleText1 ; TextAfterBattle +	dw SilphCo3EndBattleText1 ; TextEndBattle +	dw SilphCo3EndBattleText1 ; TextEndBattle  SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd827 ; flag's byte -	dw SilphCo3BattleText2 ; 0x6026 TextBeforeBattle -	dw SilphCo3AfterBattleText2 ; 0x6030 TextAfterBattle -	dw SilphCo3EndBattleText2 ; 0x602b TextEndBattle -	dw SilphCo3EndBattleText2 ; 0x602b TextEndBattle +	dw SilphCo3BattleText2 ; TextBeforeBattle +	dw SilphCo3AfterBattleText2 ; TextAfterBattle +	dw SilphCo3EndBattleText2 ; TextEndBattle +	dw SilphCo3EndBattleText2 ; TextEndBattle  	db $ff  SilphCo3Text1: ; 59fe5 (16:5fe5) -	db $08 ; asm +	TX_ASM  	ld a, [wd838]  	bit 7, a  	ld hl, SilphCo3Text_59ffe -	jr nz, asm_8c56f ; 0x59fee +	jr nz, .asm_59fee  	ld hl, SilphCo3Text_59ff9 -asm_8c56f ; 0x59ff3 +.asm_59fee  	call PrintText  	jp TextScriptEnd @@ -101,7 +101,7 @@ SilphCo3Text_59ffe: ; 59ffe (16:5ffe)  	db "@"  SilphCo3Text2: ; 5a003 (16:6003) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -119,7 +119,7 @@ SilphCo3AfterBattleText1: ; 5a017 (16:6017)  	db "@"  SilphCo3Text3: ; 5a01c (16:601c) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo3TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 15a46dd3..866afd54 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -49,19 +49,19 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d)  .asm_19d69  	ld a, [hli]  	cp $ff -	jr z, .asm_19d85 ; 0x19d6c $17 +	jr z, .asm_19d85  	push hl  	ld hl, $ffe0  	inc [hl]  	pop hl  	cp b -	jr z, .asm_19d7a ; 0x19d75 $3 +	jr z, .asm_19d7a  	inc hl -	jr .asm_19d69 ; 0x19d78 $ef +	jr .asm_19d69  .asm_19d7a  	ld a, [hli]  	cp c -	jr nz, .asm_19d69 ; 0x19d7c $eb +	jr nz, .asm_19d69  	ld hl, wCardKeyDoorY  	xor a  	ld [hli], a @@ -78,7 +78,7 @@ SilphCo4Script_19d89: ; 19d89 (6:5d89)  	and a  	ret z  	cp $1 -	jr nz, .asm_19d97 ; 0x19d92 $3 +	jr nz, .asm_19d97  	set 0, [hl]  	ret  .asm_19d97 @@ -104,33 +104,33 @@ SilphCo4TrainerHeader0: ; 19dae (6:5dae)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd829 ; flag's byte -	dw SilphCo4BattleText2 ; 0x5df4 TextBeforeBattle -	dw SilphCo4AfterBattleText2 ; 0x5dfe TextAfterBattle -	dw SilphCo4EndBattleText2 ; 0x5df9 TextEndBattle -	dw SilphCo4EndBattleText2 ; 0x5df9 TextEndBattle +	dw SilphCo4BattleText2 ; TextBeforeBattle +	dw SilphCo4AfterBattleText2 ; TextAfterBattle +	dw SilphCo4EndBattleText2 ; TextEndBattle +	dw SilphCo4EndBattleText2 ; TextEndBattle  SilphCo4TrainerHeader2: ; 19dba (6:5dba)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd829 ; flag's byte -	dw SilphCo4BattleText3 ; 0x5e0d TextBeforeBattle -	dw SilphCo4AfterBattleText3 ; 0x5e17 TextAfterBattle -	dw SilphCo4EndBattleText3 ; 0x5e12 TextEndBattle -	dw SilphCo4EndBattleText3 ; 0x5e12 TextEndBattle +	dw SilphCo4BattleText3 ; TextBeforeBattle +	dw SilphCo4AfterBattleText3 ; TextAfterBattle +	dw SilphCo4EndBattleText3 ; TextEndBattle +	dw SilphCo4EndBattleText3 ; TextEndBattle  SilphCo4TrainerHeader3: ; 19dc6 (6:5dc6)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd829 ; flag's byte -	dw SilphCo4BattleText4 ; 0x5e26 TextBeforeBattle -	dw SilphCo4AfterBattleText4 ; 0x5e30 TextAfterBattle -	dw SilphCo4EndBattleText4 ; 0x5e2b TextEndBattle -	dw SilphCo4EndBattleText4 ; 0x5e2b TextEndBattle +	dw SilphCo4BattleText4 ; TextBeforeBattle +	dw SilphCo4AfterBattleText4 ; TextAfterBattle +	dw SilphCo4EndBattleText4 ; TextEndBattle +	dw SilphCo4EndBattleText4 ; TextEndBattle  	db $ff  SilphCo4Text1: ; 19dd3 (6:5dd3) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo4Text_19de0  	ld de, SilphCo4Text_19de5  	call SilphCo6Script_1a22f @@ -145,7 +145,7 @@ SilphCo4Text_19de5: ; 19de5 (6:5de5)  	db "@"  SilphCo4Text2: ; 19dea (6:5dea) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo4TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -163,7 +163,7 @@ SilphCo4AfterBattleText2: ; 19dfe (6:5dfe)  	db "@"  SilphCo4Text3: ; 19e03 (6:5e03) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo4TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -181,7 +181,7 @@ SilphCo4AfterBattleText3: ; 19e17 (6:5e17)  	db "@"  SilphCo4Text4: ; 19e1c (6:5e1c) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo4TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index 0b63708b..750072ab 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -18,7 +18,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)  	call SilphCo5Script_19f9e  	ld a, [wd82c]  	bit 0, a -	jr nz, .asm_19f74 ; 0x19f63 $f +	jr nz, .asm_19f74  	push af  	ld a, $5f  	ld [wd09f], a @@ -27,7 +27,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)  	pop af  .asm_19f74  	bit 1, a -	jr nz, .asm_19f87 ; 0x19f76 $f +	jr nz, .asm_19f87  	push af  	ld a, $5f  	ld [wd09f], a @@ -42,7 +42,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)  	ld bc, $0507  	predef_jump ReplaceTileBlock -SilphCo5Coords: ; 19f97 (6:5f97) ; coords? +SilphCo5Coords: ; 19f97 (6:5f97)  	db $02, $03, $06, $03, $05, $07, $ff  SilphCo5Script_19f9e: ; 19f9e (6:5f9e) @@ -51,12 +51,12 @@ SilphCo5Script_19f9e: ; 19f9e (6:5f9e)  	and a  	ret z  	cp $1 -	jr nz, .asm_19fac ; 0x19fa7 $3 +	jr nz, .asm_19fac  	set 0, [hl]  	ret  .asm_19fac  	cp $2 -	jr nz, .asm_19fb3 ; 0x19fae $3 +	jr nz, .asm_19fb3  	set 1, [hl]  	ret  .asm_19fb3 @@ -86,42 +86,42 @@ Silphco5TrainerHeader0: ; 19fd2 (6:5fd2)  	db $2 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd82b ; flag's byte -	dw SilphCo5BattleText2 ; 0x6024 TextBeforeBattle -	dw SilphCo5AfterBattleText2 ; 0x602e TextAfterBattle -	dw SilphCo5EndBattleText2 ; 0x6029 TextEndBattle -	dw SilphCo5EndBattleText2 ; 0x6029 TextEndBattle +	dw SilphCo5BattleText2 ; TextBeforeBattle +	dw SilphCo5AfterBattleText2 ; TextAfterBattle +	dw SilphCo5EndBattleText2 ; TextEndBattle +	dw SilphCo5EndBattleText2 ; TextEndBattle  Silphco5TrainerHeader2: ; 19fde (6:5fde)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd82b ; flag's byte -	dw SilphCo5BattleText3 ; 0x603d TextBeforeBattle -	dw SilphCo5AfterBattleText3 ; 0x6047 TextAfterBattle -	dw SilphCo5EndBattleText3 ; 0x6042 TextEndBattle -	dw SilphCo5EndBattleText3 ; 0x6042 TextEndBattle +	dw SilphCo5BattleText3 ; TextBeforeBattle +	dw SilphCo5AfterBattleText3 ; TextAfterBattle +	dw SilphCo5EndBattleText3 ; TextEndBattle +	dw SilphCo5EndBattleText3 ; TextEndBattle  Silphco5TrainerHeader3: ; 19fea (6:5fea)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd82b ; flag's byte -	dw SilphCo5BattleText4 ; 0x6056 TextBeforeBattle -	dw SilphCo5AfterBattleText4 ; 0x6060 TextAfterBattle -	dw SilphCo5EndBattleText4 ; 0x605b TextEndBattle -	dw SilphCo5EndBattleText4 ; 0x605b TextEndBattle +	dw SilphCo5BattleText4 ; TextBeforeBattle +	dw SilphCo5AfterBattleText4 ; TextAfterBattle +	dw SilphCo5EndBattleText4 ; TextEndBattle +	dw SilphCo5EndBattleText4 ; TextEndBattle  Silphco5TrainerHeader4: ; 19ff6 (6:5ff6)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd82b ; flag's byte -	dw SilphCo5BattleText5 ; 0x606f TextBeforeBattle -	dw SilphCo5AfterBattleText5 ; 0x6079 TextAfterBattle -	dw SilphCo5EndBattleText5 ; 0x6074 TextEndBattle -	dw SilphCo5EndBattleText5 ; 0x6074 TextEndBattle +	dw SilphCo5BattleText5 ; TextBeforeBattle +	dw SilphCo5AfterBattleText5 ; TextAfterBattle +	dw SilphCo5EndBattleText5 ; TextEndBattle +	dw SilphCo5EndBattleText5 ; TextEndBattle  	db $ff  SilphCo5Text1: ; 1a003 (6:6003) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo5Text_1a010  	ld de, SilphCo5Text_1a015  	call SilphCo6Script_1a22f @@ -136,7 +136,7 @@ SilphCo5Text_1a015: ; 1a015 (6:6015)  	db "@"  SilphCo5Text2: ; 1a01a (6:601a) -	db $08 ; asm +	TX_ASM  	ld hl, Silphco5TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -154,7 +154,7 @@ SilphCo5AfterBattleText2: ; 1a02e (6:602e)  	db "@"  SilphCo5Text3: ; 1a033 (6:6033) -	db $08 ; asm +	TX_ASM  	ld hl, Silphco5TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -172,7 +172,7 @@ SilphCo5AfterBattleText3: ; 1a047 (6:6047)  	db "@"  SilphCo5Text4: ; 1a04c (6:604c) -	db $08 ; asm +	TX_ASM  	ld hl, Silphco5TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -190,7 +190,7 @@ SilphCo5AfterBattleText4: ; 1a060 (6:6060)  	db "@"  SilphCo5Text5: ; 1a065 (6:6065) -	db $08 ; asm +	TX_ASM  	ld hl, Silphco5TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/silphco6.asm b/scripts/silphco6.asm index 137e31be..0ff5ee50 100755 --- a/scripts/silphco6.asm +++ b/scripts/silphco6.asm @@ -58,36 +58,36 @@ SilphCo6TrainerHeader0: ; 1a20a (6:620a)  	db $6 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd82d ; flag's byte -	dw SilphCo6BattleText2 ; 0x62ba TextBeforeBattle -	dw SilphCo6AfterBattleText2 ; 0x62c4 TextAfterBattle -	dw SilphCo6EndBattleText2 ; 0x62bf TextEndBattle -	dw SilphCo6EndBattleText2 ; 0x62bf TextEndBattle +	dw SilphCo6BattleText2 ; TextBeforeBattle +	dw SilphCo6AfterBattleText2 ; TextAfterBattle +	dw SilphCo6EndBattleText2 ; TextEndBattle +	dw SilphCo6EndBattleText2 ; TextEndBattle  SilphCo6TrainerHeader2: ; 1a216 (6:6216)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd82d ; flag's byte -	dw SilphCo6BattleText3 ; 0x62d3 TextBeforeBattle -	dw SilphCo6AfterBattleText3 ; 0x62dd TextAfterBattle -	dw SilphCo6EndBattleText3 ; 0x62d8 TextEndBattle -	dw SilphCo6EndBattleText3 ; 0x62d8 TextEndBattle +	dw SilphCo6BattleText3 ; TextBeforeBattle +	dw SilphCo6AfterBattleText3 ; TextAfterBattle +	dw SilphCo6EndBattleText3 ; TextEndBattle +	dw SilphCo6EndBattleText3 ; TextEndBattle  SilphCo6TrainerHeader3: ; 1a222 (6:6222)  	db $8 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd82d ; flag's byte -	dw SilphCo6BattleText4 ; 0x62ec TextBeforeBattle -	dw SilphCo6AfterBattleText4 ; 0x62f6 TextAfterBattle -	dw SilphCo6EndBattleText4 ; 0x62f1 TextEndBattle -	dw SilphCo6EndBattleText4 ; 0x62f1 TextEndBattle +	dw SilphCo6BattleText4 ; TextBeforeBattle +	dw SilphCo6AfterBattleText4 ; TextAfterBattle +	dw SilphCo6EndBattleText4 ; TextEndBattle +	dw SilphCo6EndBattleText4 ; TextEndBattle  	db $ff  SilphCo6Script_1a22f: ; 1a22f (6:622f)  	ld a, [wd838]  	bit 7, a -	jr nz, .asm_1a238 ; 0x1a234 $2 -	jr .asm_1a23a ; 0x1a236 $2 +	jr nz, .asm_1a238 +	jr .asm_1a23a  .asm_1a238  	ld h, d  	ld l, e @@ -95,7 +95,7 @@ SilphCo6Script_1a22f: ; 1a22f (6:622f)  	jp PrintText  SilphCo6Text1: ; 1a23d (6:623d) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6Text_1a24a  	ld de, SilphCo6Text_1a24f  	call SilphCo6Script_1a22f @@ -110,7 +110,7 @@ SilphCo6Text_1a24f: ; 1a24f (6:624f)  	db "@"  SilphCo6Text2: ; 1a254 (6:6254) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6Text_1a261  	ld de, SilphCo6Text_1a266  	call SilphCo6Script_1a22f @@ -125,7 +125,7 @@ SilphCo6Text_1a266: ; 1a266 (6:6266)  	db "@"  SilphCo6Text3: ; 1a26b (6:626b) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6Text_1a278  	ld de, SilphCo6Text_1a27d  	call SilphCo6Script_1a22f @@ -140,7 +140,7 @@ SilphCo6Text_1a27d: ; 1a27d (6:627d)  	db "@"  SilphCo6Text4: ; 1a282 (6:6282) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6Text_1a28f  	ld de, SilphCo6Text_1a294  	call SilphCo6Script_1a22f @@ -155,7 +155,7 @@ SilphCo6Text_1a294: ; 1a294 (6:6294)  	db "@"  SilphCo6Text5: ; 1a299 (6:6299) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6Text_1a2a6  	ld de, SilphCo6Text_1a2ab  	call SilphCo6Script_1a22f @@ -170,7 +170,7 @@ SilphCo6Text_1a2ab: ; 1a2ab (6:62ab)  	db "@"  SilphCo6Text6: ; 1a2b0 (6:62b0) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -188,7 +188,7 @@ SilphCo6AfterBattleText2: ; 1a2c4 (6:62c4)  	db "@"  SilphCo6Text7: ; 1a2c9 (6:62c9) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -206,7 +206,7 @@ SilphCo6AfterBattleText3: ; 1a2dd (6:62dd)  	db "@"  SilphCo6Text8: ; 1a2e2 (6:62e2) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo6TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/silphco7.asm b/scripts/silphco7.asm index 23eb795c..1bb07824 100755 --- a/scripts/silphco7.asm +++ b/scripts/silphco7.asm @@ -13,7 +13,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)  	bit 5, [hl]  	res 5, [hl]  	ret z -	ld hl, DataTable_51bc1 ; $5bc1 +	ld hl, DataTable_51bc1  	call SilphCo7Text_51bc8  	call SilphCo7Text_51bf4  	ld a, [wd830] @@ -136,20 +136,20 @@ SilphCo7Script0: ; 51c23 (14:5c23)  	ld a, MUSIC_MEET_RIVAL  	call PlayMusic  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call SetSpriteMovementBytesToFF  	ld de, MovementData_51c7d -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	ld [wcf0d], a  	cp $1  	jr z, .asm_51c6c  	inc de  .asm_51c6c  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call MoveSprite  	ld a, $3  	jp SilphCo7Text_51c10 @@ -169,18 +169,18 @@ SilphCo7Script3: ; 51c82 (14:5c82)  	xor a  	ld [wJoyIgnore], a  	ld a, $d -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	call Delay3  	ld hl, wd72d  	set 6, [hl]  	set 7, [hl] -	ld hl, SilphCo7Text14 ; $5ec8 -	ld de, SilphCo7Text_51ecd ; $5ecd +	ld hl, SilphCo7Text14 +	ld de, SilphCo7Text_51ecd  	call SaveEndBattleTextPointers  	ld a, SONY2 + $c8 -	ld [W_CUROPPONENT], a ; wd059 -	ld a, [W_RIVALSTARTER] ; wd715 +	ld [W_CUROPPONENT], a +	ld a, [W_RIVALSTARTER]  	cp STARTER2  	jr nz, .asm_51cb6  	ld a, $7 @@ -193,12 +193,12 @@ SilphCo7Script3: ; 51c82 (14:5c82)  .asm_51cbe  	ld a, $9  .asm_51cc0 -	ld [W_TRAINERNO], a ; wd05d +	ld [W_TRAINERNO], a  	ld a, $4  	jp SilphCo7Text_51c10  SilphCo7Script4: ; 51cc8 (14:5cc8) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, SilphCo7Text_51c0c  	ld a, $f0 @@ -208,12 +208,12 @@ SilphCo7Script4: ; 51cc8 (14:5cc8)  	ld a, $4  	ld [wd528], a  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	ld a, $4  	ld [$ff8d], a  	call SetSpriteFacingDirectionAndDelay  	ld a, $f -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld a, $ff  	ld [wc0ee], a @@ -226,7 +226,7 @@ SilphCo7Script4: ; 51cc8 (14:5cc8)  	ld de, MovementData_51d1a  .asm_51d0e  	ld a, $9 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call MoveSprite  	ld a, $5  	jp SilphCo7Text_51c10 @@ -271,43 +271,43 @@ SilphCo7TrainerHeader0: ; 51d5d (14:5d5d)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd82f ; flag's byte -	dw SilphCo7BattleText1 ; 0x5e5a TextBeforeBattle -	dw SilphCo7AfterBattleText1 ; 0x5e64 TextAfterBattle -	dw SilphCo7EndBattleText1 ; 0x5e5f TextEndBattle -	dw SilphCo7EndBattleText1 ; 0x5e5f TextEndBattle +	dw SilphCo7BattleText1 ; TextBeforeBattle +	dw SilphCo7AfterBattleText1 ; TextAfterBattle +	dw SilphCo7EndBattleText1 ; TextEndBattle +	dw SilphCo7EndBattleText1 ; TextEndBattle  SilphCo7TrainerHeader2: ; 51d69 (14:5d69)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd82f ; flag's byte -	dw SilphCo7BattleText2 ; 0x5e73 TextBeforeBattle -	dw SilphCo7AfterBattleText2 ; 0x5e7d TextAfterBattle -	dw SilphCo7EndBattleText2 ; 0x5e78 TextEndBattle -	dw SilphCo7EndBattleText2 ; 0x5e78 TextEndBattle +	dw SilphCo7BattleText2 ; TextBeforeBattle +	dw SilphCo7AfterBattleText2 ; TextAfterBattle +	dw SilphCo7EndBattleText2 ; TextEndBattle +	dw SilphCo7EndBattleText2 ; TextEndBattle  SilphCo7TrainerHeader3: ; 51d75 (14:5d75)  	db $7 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd82f ; flag's byte -	dw SilphCo7BattleText3 ; 0x5e8c TextBeforeBattle -	dw SilphCo7AfterBattleText3 ; 0x5e96 TextAfterBattle -	dw SilphCo7EndBattleText3 ; 0x5e91 TextEndBattle -	dw SilphCo7EndBattleText3 ; 0x5e91 TextEndBattle +	dw SilphCo7BattleText3 ; TextBeforeBattle +	dw SilphCo7AfterBattleText3 ; TextAfterBattle +	dw SilphCo7EndBattleText3 ; TextEndBattle +	dw SilphCo7EndBattleText3 ; TextEndBattle  SilphCo7TrainerHeader4: ; 51d81 (14:5d81)  	db $8 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd82f ; flag's byte -	dw SilphCo7BattleText4 ; 0x5ea5 TextBeforeBattle -	dw SilphCo7AfterBattleText4 ; 0x5eaf TextAfterBattle -	dw SilphCo7EndBattleText4 ; 0x5eaa TextEndBattle -	dw SilphCo7EndBattleText4 ; 0x5eaa TextEndBattle +	dw SilphCo7BattleText4 ; TextBeforeBattle +	dw SilphCo7AfterBattleText4 ; TextAfterBattle +	dw SilphCo7EndBattleText4 ; TextEndBattle +	dw SilphCo7EndBattleText4 ; TextEndBattle  	db $ff  SilphCo7Text1:  ; lapras guy -	db $08 ; asm +	TX_ASM  	ld a, [wd72e]  	bit 0, a ; got lapras?  	jr z, .givelapras @@ -355,7 +355,7 @@ SilphCo7Text1:  	db "@"  SilphCo7Text2: -	db $8 +	TX_ASM  	ld a, [wd838]  	bit 7, a ; saved silph?  	jr nz, .savedsilph @@ -377,7 +377,7 @@ SilphCo7Text2:  	db "@"  SilphCo7Text3: -	db $08 ; asm +	TX_ASM  	ld a, [wd838]  	bit 7, a ; saved silph?  	jr nz, .savedsilph @@ -399,7 +399,7 @@ SilphCo7Text3:  	db "@"  SilphCo7Text4: -	db $08 ; asm +	TX_ASM  	ld a, [wd838]  	bit 7, a ; saved silph?  	jr nz, .savedsilph @@ -421,7 +421,7 @@ SilphCo7Text4:  	db "@"  SilphCo7Text5: ; 51e50 (14:5e50) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo7TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -439,7 +439,7 @@ SilphCo7AfterBattleText1: ; 51e64 (14:5e64)  	db "@"  SilphCo7Text6: ; 51e69 (14:5e69) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo7TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -457,7 +457,7 @@ SilphCo7AfterBattleText2: ; 51e7d (14:5e7d)  	db "@"  SilphCo7Text7: ; 51e82 (14:5e82) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo7TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -475,7 +475,7 @@ SilphCo7AfterBattleText3: ; 51e96 (14:5e96)  	db "@"  SilphCo7Text8: ; 51e9b (14:5e9b) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo7TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -493,7 +493,7 @@ SilphCo7AfterBattleText4: ; 51eaf (14:5eaf)  	db "@"  SilphCo7Text9: ; 51eb4 (14:5eb4) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo7Text_51ebe  	call PrintText  	jp TextScriptEnd diff --git a/scripts/silphco8.asm b/scripts/silphco8.asm index ebca9b95..95a1096d 100755 --- a/scripts/silphco8.asm +++ b/scripts/silphco8.asm @@ -13,7 +13,7 @@ SilphCo8Script_5651a: ; 5651a (15:651a)  	bit 5, [hl]  	res 5, [hl]  	ret z -	ld hl, DataTable_5653e ; $653e +	ld hl, DataTable_5653e  	call SilphCo8Script_56541  	call SilphCo8Script_5656d  	ld a, [wd832] @@ -87,39 +87,39 @@ SilphCo8TrainerHeader0: ; 56585 (15:6585)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd831 ; flag's byte -	dw SilphCo8BattleText1 ; 0x65e6 TextBeforeBattle -	dw SilphCo8AfterBattleText1 ; 0x65f0 TextAfterBattle -	dw SilphCo8EndBattleText1 ; 0x65eb TextEndBattle -	dw SilphCo8EndBattleText1 ; 0x65eb TextEndBattle +	dw SilphCo8BattleText1 ; TextBeforeBattle +	dw SilphCo8AfterBattleText1 ; TextAfterBattle +	dw SilphCo8EndBattleText1 ; TextEndBattle +	dw SilphCo8EndBattleText1 ; TextEndBattle  SilphCo8TrainerHeader1: ; 56591 (15:6591)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd831 ; flag's byte -	dw SilphCo8BattleText2 ; 0x65f5 TextBeforeBattle -	dw SilphCo8AfterBattleText2 ; 0x65ff TextAfterBattle -	dw SilphCo8EndBattleText2 ; 0x65fa TextEndBattle -	dw SilphCo8EndBattleText2 ; 0x65fa TextEndBattle +	dw SilphCo8BattleText2 ; TextBeforeBattle +	dw SilphCo8AfterBattleText2 ; TextAfterBattle +	dw SilphCo8EndBattleText2 ; TextEndBattle +	dw SilphCo8EndBattleText2 ; TextEndBattle  SilphCo8TrainerHeader2: ; 5659d (15:659d)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd831 ; flag's byte -	dw SilphCo8BattleText3 ; 0x6604 TextBeforeBattle -	dw SilphCo8AfterBattleText3 ; 0x660e TextAfterBattle -	dw SilphCo8EndBattleText3 ; 0x6609 TextEndBattle -	dw SilphCo8EndBattleText3 ; 0x6609 TextEndBattle +	dw SilphCo8BattleText3 ; TextBeforeBattle +	dw SilphCo8AfterBattleText3 ; TextAfterBattle +	dw SilphCo8EndBattleText3 ; TextEndBattle +	dw SilphCo8EndBattleText3 ; TextEndBattle  	db $ff  SilphCo8Text1: ; 565aa (15:65aa) -	db $08 ; asm +	TX_ASM  	ld a, [wd838]  	bit 7, a  	ld hl, SilphCo8Text_565c3 -	jr nz, asm_a468f ; 0x565b3 +	jr nz, .asm_565b8  	ld hl, SilphCo8Text_565be -asm_a468f ; 0x565b8 +.asm_565b8  	call PrintText  	jp TextScriptEnd @@ -132,19 +132,19 @@ SilphCo8Text_565c3: ; 565c3 (15:65c3)  	db "@"  SilphCo8Text2: ; 565c8 (15:65c8) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo8TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SilphCo8Text3: ; 565d2 (15:65d2) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo8TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SilphCo8Text4: ; 565dc (15:65dc) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo8TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm index e8b16927..b19dbde4 100755 --- a/scripts/silphco9.asm +++ b/scripts/silphco9.asm @@ -13,7 +13,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)  	bit 5, [hl]  	res 5, [hl]  	ret z -	ld hl, DataTable_5d82e ; $582e +	ld hl, DataTable_5d82e  	call SilphCo9Script_5d837  	call SilphCo9Script_5d863  	ld a, [wd834] @@ -131,36 +131,36 @@ SilphCo9TrainerHeader0: ; 5d893 (17:5893)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd833 ; flag's byte -	dw SilphCo9BattleText1 ; 0x5912 TextBeforeBattle -	dw SilphCo9AfterBattleText1 ; 0x591c TextAfterBattle -	dw SilphCo9EndBattleText1 ; 0x5917 TextEndBattle -	dw SilphCo9EndBattleText1 ; 0x5917 TextEndBattle +	dw SilphCo9BattleText1 ; TextBeforeBattle +	dw SilphCo9AfterBattleText1 ; TextAfterBattle +	dw SilphCo9EndBattleText1 ; TextEndBattle +	dw SilphCo9EndBattleText1 ; TextEndBattle  SilphCo9TrainerHeader1: ; 5d89f (17:589f)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd833 ; flag's byte -	dw SilphCo9BattleText2 ; 0x5921 TextBeforeBattle -	dw SilphCo9AfterBattleText2 ; 0x592b TextAfterBattle -	dw SilphCo9EndBattleText2 ; 0x5926 TextEndBattle -	dw SilphCo9EndBattleText2 ; 0x5926 TextEndBattle +	dw SilphCo9BattleText2 ; TextBeforeBattle +	dw SilphCo9AfterBattleText2 ; TextAfterBattle +	dw SilphCo9EndBattleText2 ; TextEndBattle +	dw SilphCo9EndBattleText2 ; TextEndBattle  SilphCo9TrainerHeader2: ; 5d8ab (17:58ab)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd833 ; flag's byte -	dw SilphCo9BattleText3 ; 0x5930 TextBeforeBattle -	dw SilphCo9AfterBattleText3 ; 0x593a TextAfterBattle -	dw SilphCo9EndBattleText3 ; 0x5935 TextEndBattle -	dw SilphCo9EndBattleText3 ; 0x5935 TextEndBattle +	dw SilphCo9BattleText3 ; TextBeforeBattle +	dw SilphCo9AfterBattleText3 ; TextAfterBattle +	dw SilphCo9EndBattleText3 ; TextEndBattle +	dw SilphCo9EndBattleText3 ; TextEndBattle  	db $ff  SilphCo9Text1: ; 5d8b8 (17:58b8) -	db $08 ; asm +	TX_ASM  	ld a, [wd838]  	bit 7, a -	jr nz, .asm_a14c3 ; 0x5d8be +	jr nz, .asm_5d8dc  	ld hl, SilphCo9Text_5d8e5  	call PrintText  	predef HealParty @@ -169,11 +169,11 @@ SilphCo9Text1: ; 5d8b8 (17:58b8)  	call GBFadeInFromWhite  	ld hl, SilphCo9Text_5d8ea  	call PrintText -	jr .asm_b6e28 ; 0x5d8da -.asm_a14c3 ; 0x5d8dc +	jr .asm_5d8e2 +.asm_5d8dc  	ld hl, SilphCo9Text_5d8ef  	call PrintText -.asm_b6e28 ; 0x5d8e2 +.asm_5d8e2  	jp TextScriptEnd  SilphCo9Text_5d8e5: ; 5d8e5 (17:58e5) @@ -189,19 +189,19 @@ SilphCo9Text_5d8ef: ; 5d8ef (17:58ef)  	db "@"  SilphCo9Text2: ; 5d8f4 (17:58f4) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo9TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SilphCo9Text3: ; 5d8fe (17:58fe) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo9TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SilphCo9Text4: ; 5d908 (17:5908) -	db $08 ; asm +	TX_ASM  	ld hl, SilphCo9TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/silphcoelevator.asm b/scripts/silphcoelevator.asm index 48d406cc..161b5ece 100755 --- a/scripts/silphcoelevator.asm +++ b/scripts/silphcoelevator.asm @@ -32,9 +32,9 @@ SilphCoElevatorScript_457ea: ; 457ea (11:57ea)  	ret  SilphCoElevatorScript_457f1: ; 457f1 (11:57f1) -	ld hl, SilphCoElavatorFloors ; $5804 +	ld hl, SilphCoElavatorFloors  	call LoadItemList -	ld hl, SilphCoElevatorWarpMaps ; $5811 +	ld hl, SilphCoElevatorWarpMaps  	ld de, wcc5b  	ld bc, $16  	call CopyData @@ -70,8 +70,8 @@ SilphCoElevatorTextPointers: ; 45833 (11:5833)  	dw SilphCoElevatorText1  SilphCoElevatorText1: ; 45835 (11:5835) -	db $08 ; asm +	TX_ASM  	call SilphCoElevatorScript_457f1 -	ld hl, SilphCoElevatorWarpMaps ; $5811 +	ld hl, SilphCoElevatorWarpMaps  	predef Func_1c9c6  	jp TextScriptEnd diff --git a/scripts/ssanne10.asm b/scripts/ssanne10.asm index 8f3ff9a4..4dee3bb7 100755 --- a/scripts/ssanne10.asm +++ b/scripts/ssanne10.asm @@ -30,97 +30,97 @@ SSAnne10TrainerHeader0: ; 61d84 (18:5d84)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd809 ; flag's byte -	dw SSAnne10BattleText1 ; 0x5e16 TextBeforeBattle -	dw SSAnne10AfterBattleText1 ; 0x5e20 TextAfterBattle -	dw SSAnne10EndBattleText1 ; 0x5e1b TextEndBattle -	dw SSAnne10EndBattleText1 ; 0x5e1b TextEndBattle +	dw SSAnne10BattleText1 ; TextBeforeBattle +	dw SSAnne10AfterBattleText1 ; TextAfterBattle +	dw SSAnne10EndBattleText1 ; TextEndBattle +	dw SSAnne10EndBattleText1 ; TextEndBattle  SSAnne10TrainerHeader1: ; 61d90 (18:5d90)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd809 ; flag's byte -	dw SSAnne10BattleText2 ; 0x5e25 TextBeforeBattle -	dw SSAnne10AfterBattleText2 ; 0x5e2f TextAfterBattle -	dw SSAnne10EndBattleText2 ; 0x5e2a TextEndBattle -	dw SSAnne10EndBattleText2 ; 0x5e2a TextEndBattle +	dw SSAnne10BattleText2 ; TextBeforeBattle +	dw SSAnne10AfterBattleText2 ; TextAfterBattle +	dw SSAnne10EndBattleText2 ; TextEndBattle +	dw SSAnne10EndBattleText2 ; TextEndBattle  SSAnne10TrainerHeader2: ; 61d9c (18:5d9c)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd809 ; flag's byte -	dw SSAnne10BattleText3 ; 0x5e34 TextBeforeBattle -	dw SSAnne10AfterBattleText3 ; 0x5e3e TextAfterBattle -	dw SSAnne10EndBattleText3 ; 0x5e39 TextEndBattle -	dw SSAnne10EndBattleText3 ; 0x5e39 TextEndBattle +	dw SSAnne10BattleText3 ; TextBeforeBattle +	dw SSAnne10AfterBattleText3 ; TextAfterBattle +	dw SSAnne10EndBattleText3 ; TextEndBattle +	dw SSAnne10EndBattleText3 ; TextEndBattle  SSAnne10TrainerHeader3: ; 61da8 (18:5da8)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd809 ; flag's byte -	dw SSAnne10BattleText4 ; 0x5e43 TextBeforeBattle -	dw SSAnne10AfterBattleText4 ; 0x5e4d TextAfterBattle -	dw SSAnne10EndBattleText4 ; 0x5e48 TextEndBattle -	dw SSAnne10EndBattleText4 ; 0x5e48 TextEndBattle +	dw SSAnne10BattleText4 ; TextBeforeBattle +	dw SSAnne10AfterBattleText4 ; TextAfterBattle +	dw SSAnne10EndBattleText4 ; TextEndBattle +	dw SSAnne10EndBattleText4 ; TextEndBattle  SSAnne10TrainerHeader4: ; 61db4 (18:5db4)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd809 ; flag's byte -	dw SSAnne10BattleText5 ; 0x5e52 TextBeforeBattle -	dw SSAnne10AfterBattleText5 ; 0x5e5c TextAfterBattle -	dw SSAnne10EndBattleText5 ; 0x5e57 TextEndBattle -	dw SSAnne10EndBattleText5 ; 0x5e57 TextEndBattle +	dw SSAnne10BattleText5 ; TextBeforeBattle +	dw SSAnne10AfterBattleText5 ; TextAfterBattle +	dw SSAnne10EndBattleText5 ; TextEndBattle +	dw SSAnne10EndBattleText5 ; TextEndBattle  SSAnne10TrainerHeader5: ; 61dc0 (18:5dc0)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd809 ; flag's byte -	dw SSAnne10BattleText6 ; 0x5e61 TextBeforeBattle -	dw SSAnne10AfterBattleText6 ; 0x5e6b TextAfterBattle -	dw SSAnne10EndBattleText6 ; 0x5e66 TextEndBattle -	dw SSAnne10EndBattleText6 ; 0x5e66 TextEndBattle +	dw SSAnne10BattleText6 ; TextBeforeBattle +	dw SSAnne10AfterBattleText6 ; TextAfterBattle +	dw SSAnne10EndBattleText6 ; TextEndBattle +	dw SSAnne10EndBattleText6 ; TextEndBattle  	db $ff  SSAnne10Text1: ; 61dcd (18:5dcd) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne10TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SSAnne10Text2: ; 61dd7 (18:5dd7) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne10TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SSAnne10Text3: ; 61de1 (18:5de1) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne10TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  SSAnne10Text4: ; 61deb (18:5deb) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne10TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  SSAnne10Text5: ; 61df5 (18:5df5) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne10TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  SSAnne10Text6: ; 61dff (18:5dff) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne10TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  SSAnne10Text8: ; 61e09 (18:5e09)  	TX_FAR _SSAnne10Text8 -	db $8 ; 0x61e0d +	TX_ASM  	ld a, MACHOKE  	call PlayCry  	jp TextScriptEnd diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm index 474aaa60..d540f41b 100755 --- a/scripts/ssanne2.asm +++ b/scripts/ssanne2.asm @@ -21,7 +21,7 @@ SSAnne2Script4: ; 613bd (18:53bd)  	ret  SSAnne2Script0: ; 613be (18:53be) -	ld hl, CoordsData_61411 ; $5411 +	ld hl, CoordsData_61411  	call ArePlayerCoordsInArray  	ret nc  	ld a, $ff @@ -45,9 +45,9 @@ SSAnne2Script0: ; 613be (18:53be)  	ld [wJoyIgnore], a  	ld a, [$ffdb]  	cp $2 -	jr nz, .asm_61400 ; 0x613f9 $5 +	jr nz, .asm_61400  	ld de, MovementData_6140c -	jr .asm_61403 ; 0x613fe $3 +	jr .asm_61403  .asm_61400  	ld de, MovementData_6140d  .asm_61403 @@ -66,7 +66,7 @@ CoordsData_61411: ; 61411 (18:5411)  	db $08,$24,$08,$25,$FF  SSAnne2Script_61416: ; 61416 (18:5416) -	ld a, [W_XCOORD] ; wd362 +	ld a, [W_XCOORD]  	cp $25  	jr nz, .asm_61426  	ld a, $2 @@ -78,7 +78,7 @@ SSAnne2Script_61416: ; 61416 (18:5416)  .asm_61427  	ld [$ff8d], a  	ld a, $2 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	jp SetSpriteFacingDirectionAndDelay  SSAnne2Script1: ; 61430 (18:5430) @@ -98,12 +98,12 @@ SSAnne2Script1: ; 61430 (18:5430)  	; select which team to use during the encounter  	ld a, [W_RIVALSTARTER]  	cp STARTER2 -	jr nz, .NotSquirtle ; 0x61451 $4 +	jr nz, .NotSquirtle  	ld a, $1  	jr .done  .NotSquirtle  	cp STARTER3 -	jr nz, .Charmander ; 0x61459 $4 +	jr nz, .Charmander  	ld a, $2  	jr .done  .Charmander @@ -131,9 +131,9 @@ SSAnne2Script2: ; 6146d (18:546d)  	call SetSpriteMovementBytesToFF  	ld a, [W_XCOORD]  	cp $25 -	jr nz, .asm_61497 ; 0x61490 $5 +	jr nz, .asm_61497  	ld de, MovementData_614b9 -	jr .asm_6149a ; 0x61495 $3 +	jr .asm_6149a  .asm_61497  	ld de, MovementData_614b7  .asm_6149a @@ -178,7 +178,7 @@ SSAnne2Text1: ; 614e1 (18:54e1)  	db "@"  SSAnne2Text2: ; 614e6 (18:54e6) -	db $8 +	TX_ASM  	ld hl, SSAnneRivalBeforeBattleText  	call PrintText  	ld hl, wd72d diff --git a/scripts/ssanne5.asm b/scripts/ssanne5.asm index 96b94c52..063ccbb8 100755 --- a/scripts/ssanne5.asm +++ b/scripts/ssanne5.asm @@ -1,6 +1,6 @@  SSAnne5Script: ; 616ae (18:56ae)  	call EnableAutoTextBoxDrawing -	ld hl, SSAnne5TrainerHeader0 ; $56d1 +	ld hl, SSAnne5TrainerHeader0  	ld de, SSAnne5ScriptPointers  	ld a, [W_SSANNE5CURSCRIPT]  	call ExecuteCurMapScriptInTable @@ -24,19 +24,19 @@ SSAnne5TrainerHeader0: ; 616d1 (18:56d1)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7ff ; flag's byte -	dw SSAnne5BattleText1 ; 0x5703 TextBeforeBattle -	dw SSAnne5AfterBattleText1 ; 0x570d TextAfterBattle -	dw SSAnne5EndBattleText1 ; 0x5708 TextEndBattle -	dw SSAnne5EndBattleText1 ; 0x5708 TextEndBattle +	dw SSAnne5BattleText1 ; TextBeforeBattle +	dw SSAnne5AfterBattleText1 ; TextAfterBattle +	dw SSAnne5EndBattleText1 ; TextEndBattle +	dw SSAnne5EndBattleText1 ; TextEndBattle  SSAnne5TrainerHeader1: ; 616dd (18:56dd)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7ff ; flag's byte -	dw SSAnne5BattleText2 ; 0x571c TextBeforeBattle -	dw SSAnne5AfterBattleText2 ; 0x5726 TextAfterBattle -	dw SSAnne5EndBattleText2 ; 0x5721 TextEndBattle -	dw SSAnne5EndBattleText2 ; 0x5721 TextEndBattle +	dw SSAnne5BattleText2 ; TextBeforeBattle +	dw SSAnne5AfterBattleText2 ; TextAfterBattle +	dw SSAnne5EndBattleText2 ; TextEndBattle +	dw SSAnne5EndBattleText2 ; TextEndBattle  	db $ff @@ -53,7 +53,7 @@ SSAnne5Text3: ; 616f4 (18:56f4)  	db "@"  SSAnne5Text4: ; 616f9 (18:56f9) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne5TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -71,7 +71,7 @@ SSAnne5AfterBattleText1: ; 6170d (18:570d)  	db "@"  SSAnne5Text5: ; 61712 (18:5712) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne5TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/ssanne6.asm b/scripts/ssanne6.asm index d3ec191f..fbe8176d 100755 --- a/scripts/ssanne6.asm +++ b/scripts/ssanne6.asm @@ -36,22 +36,22 @@ SSAnne6Text6: ; 617de (18:57de)  	db "@"  SSAnne6Text7: ; 617e3 (18:57e3) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne6Text_61807  	call PrintText -	ldh a, [$d3] +	ld a, [hRandomAdd]  	bit 7, a -	jr z, .asm_93eb1 ; 0x617ee +	jr z, .asm_93eb1  	ld hl, SSAnne6Text_6180c -	jr .asm_63292 ; 0x617f3 -.asm_93eb1 ; 0x617f5 +	jr .asm_63292 +.asm_93eb1  	bit 4, a -	jr z, .asm_7436c ; 0x617f7 +	jr z, .asm_7436c  	ld hl, SSAnne6Text_61811 -	jr .asm_63292 ; 0x617fc -.asm_7436c ; 0x617fe +	jr .asm_63292 +.asm_7436c  	ld hl, SSAnne6Text_61816 -.asm_63292 ; 0x61801 +.asm_63292  	call PrintText  	jp TextScriptEnd diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm index 1ca97ce2..a1fd791a 100755 --- a/scripts/ssanne7.asm +++ b/scripts/ssanne7.asm @@ -16,10 +16,10 @@ SSAnne7TextPointers: ; 618a7 (18:58a7)  	dw SSAnne7Text3  SSAnne7Text1: ; 618ad (18:58ad) -	db $08 ; asm +	TX_ASM  	ld a, [wd803]  	bit 0, a -	jr nz, .asm_797c4 ; 0x618b3 +	jr nz, .asm_797c4  	ld hl, SSAnne7RubText  	call PrintText  	ld hl, ReceivingHM01Text @@ -31,30 +31,30 @@ SSAnne7Text1: ; 618ad (18:58ad)  	call PrintText  	ld hl, wd803  	set 0, [hl] -	jr .asm_0faf5 ; 0x618d4 +	jr .asm_0faf5  .BagFull  	ld hl, HM01NoRoomText  	call PrintText  	ld hl, wd72d  	set 5, [hl] -	jr .asm_0faf5 ; 0x618e1 -.asm_797c4 ; 0x618e3 +	jr .asm_0faf5 +.asm_797c4  	ld hl, SSAnne7Text_61932  	call PrintText -.asm_0faf5 ; 0x618e9 +.asm_0faf5  	jp TextScriptEnd  SSAnne7RubText: ; 618ec (18:58ec)  	TX_FAR _SSAnne7RubText -	db $8 +	TX_ASM  	ld a, [wc0ef] -	cp $1f +	cp BANK(Music1f_UpdateMusic)  	ld [wc0f0], a -	jr nz, .asm_61908 ; 0x618f9 $d +	jr nz, .asm_61908  	ld a, $ff  	ld [wc0ee], a  	call PlaySound -	ld a, Bank(Func_9876) +	ld a, Bank(Music_PkmnHealed)  	ld [wc0ef], a  .asm_61908  	ld a, MUSIC_PKMN_HEALED @@ -63,7 +63,7 @@ SSAnne7RubText: ; 618ec (18:58ec)  .asm_61910  	ld a, [wc026]  	cp MUSIC_PKMN_HEALED -	jr z, .asm_61910 ; 0x61915 $f9 +	jr z, .asm_61910  	call PlayDefaultMusic  	ld hl, wd803  	set 1, [hl] diff --git a/scripts/ssanne8.asm b/scripts/ssanne8.asm index ff7fc57b..27c76a2f 100755 --- a/scripts/ssanne8.asm +++ b/scripts/ssanne8.asm @@ -30,67 +30,67 @@ SSAnne8TrainerHeader0: ; 619a5 (18:59a5)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd805 ; flag's byte -	dw SSAnne8BattleText1 ; 0x5a0b TextBeforeBattle -	dw SSAnne8AfterBattleText1 ; 0x5a15 TextAfterBattle -	dw SSAnne8EndBattleText1 ; 0x5a10 TextEndBattle -	dw SSAnne8EndBattleText1 ; 0x5a10 TextEndBattle +	dw SSAnne8BattleText1 ; TextBeforeBattle +	dw SSAnne8AfterBattleText1 ; TextAfterBattle +	dw SSAnne8EndBattleText1 ; TextEndBattle +	dw SSAnne8EndBattleText1 ; TextEndBattle  SSAnne8TrainerHeader1: ; 619b1 (18:59b1)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd805 ; flag's byte -	dw SSAnne8BattleText2 ; 0x5a1a TextBeforeBattle -	dw SSAnne8AfterBattleText2 ; 0x5a24 TextAfterBattle -	dw SSAnne8EndBattleText2 ; 0x5a1f TextEndBattle -	dw SSAnne8EndBattleText2 ; 0x5a1f TextEndBattle +	dw SSAnne8BattleText2 ; TextBeforeBattle +	dw SSAnne8AfterBattleText2 ; TextAfterBattle +	dw SSAnne8EndBattleText2 ; TextEndBattle +	dw SSAnne8EndBattleText2 ; TextEndBattle  SSAnne8TrainerHeader2: ; 619bd (18:59bd)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd805 ; flag's byte -	dw SSAnne8BattleText3 ; 0x5a29 TextBeforeBattle -	dw SSAnne8AfterBattleText3 ; 0x5a33 TextAfterBattle -	dw SSAnne8EndBattleText3 ; 0x5a2e TextEndBattle -	dw SSAnne8EndBattleText3 ; 0x5a2e TextEndBattle +	dw SSAnne8BattleText3 ; TextBeforeBattle +	dw SSAnne8AfterBattleText3 ; TextAfterBattle +	dw SSAnne8EndBattleText3 ; TextEndBattle +	dw SSAnne8EndBattleText3 ; TextEndBattle  SSAnne8TrainerHeader3: ; 619c9 (18:59c9)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd805 ; flag's byte -	dw SSAnne8BattleText4 ; 0x5a38 TextBeforeBattle -	dw SSAnne8AfterBattleText4 ; 0x5a42 TextAfterBattle -	dw SSAnne8EndBattleText4 ; 0x5a3d TextEndBattle -	dw SSAnne8EndBattleText4 ; 0x5a3d TextEndBattle +	dw SSAnne8BattleText4 ; TextBeforeBattle +	dw SSAnne8AfterBattleText4 ; TextAfterBattle +	dw SSAnne8EndBattleText4 ; TextEndBattle +	dw SSAnne8EndBattleText4 ; TextEndBattle  	db $ff  SSAnne8Text1: ; 619d6 (18:59d6) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne8TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SSAnne8Text2: ; 619e0 (18:59e0) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne8TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SSAnne8Text3: ; 619ea (18:59ea) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne8TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  SSAnne8Text4: ; 619f4 (18:59f4) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne8TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  SSAnne8Text8: ; 619fe (18:59fe)  	TX_FAR _SSAnne8Text8 -	db $08 ; asm +	TX_ASM  	ld a, WIGGLYTUFF  	call PlayCry  	jp TextScriptEnd diff --git a/scripts/ssanne9.asm b/scripts/ssanne9.asm index db34fcf2..6e8b86c6 100755 --- a/scripts/ssanne9.asm +++ b/scripts/ssanne9.asm @@ -35,66 +35,66 @@ SSAnne9TrainerHeader0: ; 61b84 (18:5b84)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd807 ; flag's byte -	dw SSAnne9BattleText1 ; 0x5c51 TextBeforeBattle -	dw SSAnne9AfterBattleText1 ; 0x5c5b TextAfterBattle -	dw SSAnne9EndBattleText1 ; 0x5c56 TextEndBattle -	dw SSAnne9EndBattleText1 ; 0x5c56 TextEndBattle +	dw SSAnne9BattleText1 ; TextBeforeBattle +	dw SSAnne9AfterBattleText1 ; TextAfterBattle +	dw SSAnne9EndBattleText1 ; TextEndBattle +	dw SSAnne9EndBattleText1 ; TextEndBattle  SSAnne9TrainerHeader1: ; 61b90 (18:5b90)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd807 ; flag's byte -	dw SSAnne9BattleText2 ; 0x5c60 TextBeforeBattle -	dw SSAnne9AfterBattleText2 ; 0x5c6a TextAfterBattle -	dw SSAnne9EndBattleText2 ; 0x5c65 TextEndBattle -	dw SSAnne9EndBattleText2 ; 0x5c65 TextEndBattle +	dw SSAnne9BattleText2 ; TextBeforeBattle +	dw SSAnne9AfterBattleText2 ; TextAfterBattle +	dw SSAnne9EndBattleText2 ; TextEndBattle +	dw SSAnne9EndBattleText2 ; TextEndBattle  SSAnne9TrainerHeader2: ; 61b9c (18:5b9c)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd807 ; flag's byte -	dw SSAnne9BattleText3 ; 0x5c6f TextBeforeBattle -	dw SSAnne9AfterBattleText3 ; 0x5c79 TextAfterBattle -	dw SSAnne9EndBattleText3 ; 0x5c74 TextEndBattle -	dw SSAnne9EndBattleText3 ; 0x5c74 TextEndBattle +	dw SSAnne9BattleText3 ; TextBeforeBattle +	dw SSAnne9AfterBattleText3 ; TextAfterBattle +	dw SSAnne9EndBattleText3 ; TextEndBattle +	dw SSAnne9EndBattleText3 ; TextEndBattle  SSAnne9TrainerHeader3: ; 61ba8 (18:5ba8)  	db $4 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd807 ; flag's byte -	dw SSAnne9BattleText4 ; 0x5c7e TextBeforeBattle -	dw SSAnne9AfterBattleText4 ; 0x5c88 TextAfterBattle -	dw SSAnne9EndBattleText4 ; 0x5c83 TextEndBattle -	dw SSAnne9EndBattleText4 ; 0x5c83 TextEndBattle +	dw SSAnne9BattleText4 ; TextBeforeBattle +	dw SSAnne9AfterBattleText4 ; TextAfterBattle +	dw SSAnne9EndBattleText4 ; TextEndBattle +	dw SSAnne9EndBattleText4 ; TextEndBattle  	db $ff  SSAnne9Text1: ; 61bb5 (18:5bb5) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  SSAnne9Text2: ; 61bbf (18:5bbf) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  SSAnne9Text3: ; 61bc9 (18:5bc9) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  SSAnne9Text4: ; 61bd3 (18:5bd3) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  SSAnne9Text5: ; 61bdd (18:5bdd) -	db $08 ; asm +	TX_ASM  	call SaveScreenTilesToBuffer1  	ld hl, SSAnne9Text_61bf2  	call PrintText @@ -108,7 +108,7 @@ SSAnne9Text_61bf2: ; 61bf2 (18:5bf2)  	db "@"  SSAnne9Text7: ; 61bf7 (18:5bf7) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9Text_61c01  	call PrintText  	jp TextScriptEnd @@ -118,7 +118,7 @@ SSAnne9Text_61c01: ; 61c01 (18:5c01)  	db "@"  SSAnne9Text8: ; 61c06 (18:5c06) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9Text_61c10  	call PrintText  	jp TextScriptEnd @@ -128,7 +128,7 @@ SSAnne9Text_61c10: ; 61c10 (18:5c10)  	db "@"  SSAnne9Text10: ; 61c15 (18:5c15) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9Text_61c1f  	call PrintText  	jp TextScriptEnd @@ -138,7 +138,7 @@ SSAnne9Text_61c1f: ; 61c1f (18:5c1f)  	db "@"  SSAnne9Text11: ; 61c24 (18:5c24) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9Text_61c2e  	call PrintText  	jp TextScriptEnd @@ -148,7 +148,7 @@ SSAnne9Text_61c2e: ; 61c2e (18:5c2e)  	db "@"  SSAnne9Text12: ; 61c33 (18:5c33) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9Text_61c3d  	call PrintText  	jp TextScriptEnd @@ -158,7 +158,7 @@ SSAnne9Text_61c3d: ; 61c3d (18:5c3d)  	db "@"  SSAnne9Text13: ; 61c42 (18:5c42) -	db $08 ; asm +	TX_ASM  	ld hl, SSAnne9Text_61c4c  	call PrintText  	jp TextScriptEnd diff --git a/scripts/undergroundpathentranceroute5.asm b/scripts/undergroundpathentranceroute5.asm index 03f1c35d..c93ab7b5 100755 --- a/scripts/undergroundpathentranceroute5.asm +++ b/scripts/undergroundpathentranceroute5.asm @@ -10,7 +10,7 @@ UndergroundPathEntranceRoute5TextPointers: ; 5d6b0 (17:56b0)  	dw UndergroundPathEntranceRoute5Text1  UndergroundPathEntranceRoute5Text1: ; 5d6b2 (17:56b2) -	db $08 ; asm +	TX_ASM  	ld a, $9  	ld [wWhichTrade], a  	predef DoInGameTradeDialogue diff --git a/scripts/undergroundpathentranceroute7copy.asm b/scripts/undergroundpathentranceroute7copy.asm index 2462a254..d94c9f37 100755 --- a/scripts/undergroundpathentranceroute7copy.asm +++ b/scripts/undergroundpathentranceroute7copy.asm @@ -4,21 +4,21 @@ UndergroundPathEntranceRoute7CopyScript: ; 5d769 (17:5769)  	ret  UndergroundPathEntranceRoute7CopyTextPointers: ; 5d76f (17:576f) -	dw UnnamedText_5d773 -	dw UnnamedText_5d77d +	dw UGPathRoute7EntranceUnusedText_5d773 +	dw UGPathRoute7EntranceUnusedText_5d77d -UnnamedText_5d773: ; 5d773 (17:5773) -	TX_FAR _UnnamedText_5d773 +UGPathRoute7EntranceUnusedText_5d773: ; 5d773 (17:5773) +	TX_FAR _UGPathRoute7EntranceUnusedText_5d773  	db "@" -UnnamedText_5d778: ; 5d778 (17:5778) -	TX_FAR _UnnamedText_5d778 +UGPathRoute7EntranceUnusedText_5d778: ; 5d778 (17:5778) +	TX_FAR _UGPathRoute7EntranceUnusedText_5d778  	db "@" -UnnamedText_5d77d: ; 5d77d (17:577d) -	TX_FAR _UnnamedText_5d77d +UGPathRoute7EntranceUnusedText_5d77d: ; 5d77d (17:577d) +	TX_FAR _UGPathRoute7EntranceUnusedText_5d77d  	db "@" -UnnamedText_5d782: ; 5d782 (17:5782) -	TX_FAR _UnnamedText_5d782 +UGPathRoute7EntranceUnusedText_5d782: ; 5d782 (17:5782) +	TX_FAR _UGPathRoute7EntranceUnusedText_5d782  	db "@" diff --git a/scripts/unknowndungeon3.asm b/scripts/unknowndungeon3.asm index d2078916..055c9d0f 100755 --- a/scripts/unknowndungeon3.asm +++ b/scripts/unknowndungeon3.asm @@ -22,22 +22,22 @@ UnknownDungeon3TrainerHeader0: ; 45f0f (11:5f0f)  	db $1 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd85f ; flag's byte -	dw UnknownDungeon3MewtwoText ; 0x5f26 TextBeforeBattle -	dw UnknownDungeon3MewtwoText ; 0x5f26 TextAfterBattle -	dw UnknownDungeon3MewtwoText ; 0x5f26 TextEndBattle -	dw UnknownDungeon3MewtwoText ; 0x5f26 TextEndBattle +	dw UnknownDungeon3MewtwoText ; TextBeforeBattle +	dw UnknownDungeon3MewtwoText ; TextAfterBattle +	dw UnknownDungeon3MewtwoText ; TextEndBattle +	dw UnknownDungeon3MewtwoText ; TextEndBattle  	db $ff  UnknownDungeon3Text1: ; 45f1c (11:5f1c) -	db $08 ; asm +	TX_ASM  	ld hl, UnknownDungeon3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  UnknownDungeon3MewtwoText: ; 45f26 (11:5f26)  	TX_FAR _UnknownDungeon3MewtwoText -	db $8 +	TX_ASM  	ld a, MEWTWO  	call PlayCry  	call WaitForSoundToFinish diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index 1214b27c..9fd05776 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -53,7 +53,7 @@ VermilionCityScript0: ; 197e6 (6:57e6)  	call DisplayTextID  	ld a, [wd803]  	bit 2, a -	jr nz, .asm_19810 ; 0x19804 $a +	jr nz, .asm_19810  	ld b, $3f  	predef IsItemInBag_  	ld a, b @@ -109,7 +109,7 @@ VermilionCityScript1: ; 1985f (6:585f)  	ld a, [wSimulatedJoypadStatesIndex]  	and a  	ret nz -	ld c, $a +	ld c, 10  	call DelayFrames  	ld a, $0  	ld [W_VERMILIONCITYCURSCRIPT], a @@ -135,17 +135,17 @@ VermilionCityText1: ; 19889 (6:5889)  	db "@"  VermilionCityText2: ; 1988e (6:588e) -	db $08 ; asm +	TX_ASM  	ld a, [wd803]  	bit 2, a -	jr nz, .asm_359bd ; 0x19894 +	jr nz, .asm_1989e  	ld hl, VermilionCityText_198a7  	call PrintText -	jr .asm_735d9 ; 0x1989c -.asm_359bd ; 0x1989e +	jr .asm_198a4 +.asm_1989e  	ld hl, VermilionCityText_198ac  	call PrintText -.asm_735d9 ; 0x198a4 +.asm_198a4  	jp TextScriptEnd  VermilionCityText_198a7: ; 198a7 (6:58a7) @@ -157,41 +157,41 @@ VermilionCityText_198ac: ; 198ac (6:58ac)  	db "@"  VermilionCityText3: ; 198b1 (6:58b1) -	db $08 ; asm +	TX_ASM  	ld a, [wd803]  	bit 2, a -	jr nz, .asm_3e0e9 ; 0x198b7 +	jr nz, .asm_198f6  	ld a, [wSpriteStateData1 + 9]  	cp $c -	jr z, .asm_07af3 ; 0x198be +	jr z, .asm_198c8  	ld hl, VermilionCityCoords1  	call ArePlayerCoordsInArray -	jr nc, .asm_57b73 ; 0x198c6 -.asm_07af3 ; 0x198c8 +	jr nc, .asm_198d0 +.asm_198c8  	ld hl, SSAnneWelcomeText4  	call PrintText -	jr .asm_79bd1 ; 0x198ce -.asm_57b73 ; 0x198d0 +	jr .asm_198fc +.asm_198d0  	ld hl, SSAnneWelcomeText9  	call PrintText  	ld b, S_S__TICKET  	predef IsItemInBag_  	ld a, b  	and a -	jr nz, .asm_0419b ; 0x198df +	jr nz, .asm_198e9  	ld hl, SSAnneNoTicketText  	call PrintText -	jr .asm_79bd1 ; 0x198e7 -.asm_0419b ; 0x198e9 +	jr .asm_198fc +.asm_198e9  	ld hl, SSAnneFlashedTicketText  	call PrintText  	ld a, $4  	ld [W_VERMILIONCITYCURSCRIPT], a -	jr .asm_79bd1 ; 0x198f4 -.asm_3e0e9 ; 0x198f6 +	jr .asm_198fc +.asm_198f6  	ld hl, SSAnneNotHereText  	call PrintText -.asm_79bd1 ; 0x198fc +.asm_198fc  	jp TextScriptEnd  VermilionCityCoords1: ; 198ff (6:58ff) @@ -225,11 +225,11 @@ VermilionCityText4: ; 1991d (6:591d)  VermilionCityText5: ; 19922 (6:5922)  	TX_FAR _VermilionCityText5 -	db $08 ; asm +	TX_ASM  	ld a, MACHOP  	call PlayCry  	call WaitForSoundToFinish -	ld hl, VermilionCityText14 ; $5933 +	ld hl, VermilionCityText14  	ret  VermilionCityText14: ; 19933 (6:5933) diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm index 7b23c41e..f070d377 100755 --- a/scripts/vermiliondock.asm +++ b/scripts/vermiliondock.asm @@ -2,7 +2,7 @@ VermilionDockScript: ; 1db52 (7:5b52)  	call EnableAutoTextBoxDrawing  	ld hl, wd803  	bit 4, [hl] -	jr nz, .asm_1db8d ; 0x1db5a $31 +	jr nz, .asm_1db8d  	bit 0, [hl]  	ret z  	ld a, [wDestinationWarpID] @@ -49,7 +49,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)  	callba LoadSmokeTileFourTimes  	xor a  	ld [wSpriteStateData1 + 2], a -	ld c, $78 +	ld c, 120  	call DelayFrames  	ld b, $9c  	call CopyScreenTileBufferToVRAM @@ -97,13 +97,13 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)  .asm_1dc16  	call VermilionDock_1dc7c  	dec c -	jr nz, .asm_1dc16 ; 0x1dc1a $fa +	jr nz, .asm_1dc16  	inc d  	dec b -	jr nz, .asm_1dc11 ; 0x1dc1e $f1 +	jr nz, .asm_1dc11  	pop bc  	dec e -	jr nz, .asm_1dbfa ; 0x1dc22 $d6 +	jr nz, .asm_1dbfa  	xor a  	ld [$ff4a], a  	ld [hWY], a @@ -135,7 +135,7 @@ VermilionDock_1dc42: ; 1dc42 (7:5c42)  	inc [hl]  	add hl, de  	dec c -	jr nz, .asm_1dc50 ; 0x1dc54 $fa +	jr nz, .asm_1dc50  	pop de  	pop bc  	ret @@ -169,13 +169,13 @@ VermilionDock_1dc7c: ; 1dc7c (7:5c7c)  .asm_1dc86  	ld a, [$ff44]  	cp l -	jr nz, .asm_1dc86 ; 0x1dc89 $fb +	jr nz, .asm_1dc86  	ld a, h  	ld [$ff43], a  .asm_1dc8e  	ld a, [$ff44]  	cp h -	jr z, .asm_1dc8e ; 0x1dc91 $fb +	jr z, .asm_1dc8e  	ret  VermilionDock_1dc94: ; 1dc94 (7:5c94) @@ -195,7 +195,7 @@ VermilionDock_1dc94: ; 1dc94 (7:5c94)  	ld [hl], a  	ld a, (SFX_02_54 - SFX_Headers_02) / 3  	call PlaySound -	ld c, $78 +	ld c, 120  	call DelayFrames  	ret diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm index 6178dafb..3515c29c 100755 --- a/scripts/vermiliongym.asm +++ b/scripts/vermiliongym.asm @@ -17,8 +17,8 @@ VermilionGymScript: ; 5ca26 (17:4a26)  	ret  VermilionGymScript_5ca4c: ; 5ca4c (17:4a4c) -	ld hl, Gym3CityName ; $4a55 -	ld de, Gym3LeaderName ; $4a64 +	ld hl, Gym3CityName +	ld de, Gym3LeaderName  	jp LoadGymLeaderAndCityName  Gym3CityName: ; 5ca55 (17:4a55) @@ -56,7 +56,7 @@ VermilionGymScriptPointers: ; 5ca95 (17:4a95)  	dw VermilionGymScript3  VermilionGymScript3: ; 5ca9d (17:4a9d) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, VermilionGymScript_5ca8a  	ld a, $f0 @@ -64,7 +64,7 @@ VermilionGymScript3: ; 5ca9d (17:4a9d)  VermilionGymScript_5caaa: ; 5caaa (17:4aaa)  	ld a, $6 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd773  	set 7, [hl] @@ -72,14 +72,14 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa)  	call GiveItem  	jr nc, .BagFull  	ld a, $7 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd773  	set 6, [hl]  	jr .asm_5cad3  .BagFull  	ld a, $8 -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_5cad3  	ld hl, W_OBTAINEDBADGES @@ -109,46 +109,46 @@ VermilionGymTrainerHeader0: ; 5caf8 (17:4af8)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd773 ; flag's byte -	dw VermilionGymBattleText1 ; 0x4b9a TextBeforeBattle -	dw VermilionGymAfterBattleText1 ; 0x4ba4 TextAfterBattle -	dw VermilionGymEndBattleText1 ; 0x4b9f TextEndBattle -	dw VermilionGymEndBattleText1 ; 0x4b9f TextEndBattle +	dw VermilionGymBattleText1 ; TextBeforeBattle +	dw VermilionGymAfterBattleText1 ; TextAfterBattle +	dw VermilionGymEndBattleText1 ; TextEndBattle +	dw VermilionGymEndBattleText1 ; TextEndBattle  VermilionGymTrainerHeader1: ; 5cb04 (17:4b04)  	db $3 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd773 ; flag's byte -	dw VermilionGymBattleText2 ; 0x4bb3 TextBeforeBattle -	dw VermilionGymAfterBattleText2 ; 0x4bbd TextAfterBattle -	dw VermilionGymEndBattleText2 ; 0x4bb8 TextEndBattle -	dw VermilionGymEndBattleText2 ; 0x4bb8 TextEndBattle +	dw VermilionGymBattleText2 ; TextBeforeBattle +	dw VermilionGymAfterBattleText2 ; TextAfterBattle +	dw VermilionGymEndBattleText2 ; TextEndBattle +	dw VermilionGymEndBattleText2 ; TextEndBattle  VermilionGymTrainerHeader2: ; 5cb10 (17:4b10)  	db $4 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd773 ; flag's byte -	dw VermilionGymBattleText3 ; 0x4bcc TextBeforeBattle -	dw VermilionGymAfterBattleText3 ; 0x4bd6 TextAfterBattle -	dw VermilionGymEndBattleText3 ; 0x4bd1 TextEndBattle -	dw VermilionGymEndBattleText3 ; 0x4bd1 TextEndBattle +	dw VermilionGymBattleText3 ; TextBeforeBattle +	dw VermilionGymAfterBattleText3 ; TextAfterBattle +	dw VermilionGymEndBattleText3 ; TextEndBattle +	dw VermilionGymEndBattleText3 ; TextEndBattle  	db $ff  VermilionGymText1: ; 5cb1d (17:4b1d) -	db $08 ; asm +	TX_ASM  	ld a, [wd773]  	bit 7, a -	jr z, .asm_7cc29 ; 0x5cb23 +	jr z, .asm_5cb39  	bit 6, a -	jr nz, .asm_41203 ; 0x5cb27 +	jr nz, .asm_5cb31  	call z, VermilionGymScript_5caaa  	call DisableWaitingAfterTextDisplay -	jr .asm_23621 ; 0x5cb2f -.asm_41203 ; 0x5cb31 +	jr .asm_5cb6a +.asm_5cb31  	ld hl, VermilionGymText_5cb72  	call PrintText -	jr .asm_23621 ; 0x5cb37 -.asm_7cc29 ; 0x5cb39 +	jr .asm_5cb6a +.asm_5cb39  	ld hl, VermilionGymText_5cb6d  	call PrintText  	ld hl, wd72d @@ -157,18 +157,18 @@ VermilionGymText1: ; 5cb1d (17:4b1d)  	ld hl, ReceivedThunderbadgeText  	ld de, ReceivedThunderbadgeText  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters  	ld a, $3  	ld [W_GYMLEADERNO], a  	xor a -	ldh [$b4], a +	ld [hJoyHeld], a  	ld a, $3  	ld [W_VERMILIONGYMCURSCRIPT], a  	ld [W_CURMAPSCRIPT], a -.asm_23621 ; 0x5cb6a +.asm_5cb6a  	jp TextScriptEnd  VermilionGymText_5cb6d: ; 5cb6d (17:4b6d) @@ -198,7 +198,7 @@ ReceivedThunderbadgeText: ; 5cb8b (17:4b8b)  	db "@"  VermilionGymText2: ; 5cb90 (17:4b90) -	db $08 ; asm +	TX_ASM  	ld hl, VermilionGymTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -216,7 +216,7 @@ VermilionGymAfterBattleText1: ; 5cba4 (17:4ba4)  	db "@"  VermilionGymText3: ; 5cba9 (17:4ba9) -	db $08 ; asm +	TX_ASM  	ld hl, VermilionGymTrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -234,7 +234,7 @@ VermilionGymAfterBattleText2: ; 5cbbd (17:4bbd)  	db "@"  VermilionGymText4: ; 5cbc2 (17:4bc2) -	db $08 ; asm +	TX_ASM  	ld hl, VermilionGymTrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -252,17 +252,17 @@ VermilionGymAfterBattleText3: ; 5cbd6 (17:4bd6)  	db "@"  VermilionGymText5: ; 5cbdb (17:4bdb) -	db $08 ; asm +	TX_ASM  	ld a, [wd72a]  	bit 2, a -	jr nz, .asm_13b67 ; 0x5cbe1 +	jr nz, .asm_5cbeb  	ld hl, VermilionGymText_5cbf4  	call PrintText -	jr .asm_c2b38 ; 0x5cbe9 -.asm_13b67 ; 0x5cbeb +	jr .asm_5cbf1 +.asm_5cbeb  	ld hl, VermilionGymText_5cbf9  	call PrintText -.asm_c2b38 ; 0x5cbf1 +.asm_5cbf1  	jp TextScriptEnd  VermilionGymText_5cbf4: ; 5cbf4 (17:4bf4) diff --git a/scripts/vermilionhouse1.asm b/scripts/vermilionhouse1.asm index 4ead1af7..bfb3da5f 100755 --- a/scripts/vermilionhouse1.asm +++ b/scripts/vermilionhouse1.asm @@ -13,7 +13,7 @@ VermilionHouse1Text1: ; 1db06 (7:5b06)  VermilionHouse1Text2: ; 1db0b (7:5b0b)  	TX_FAR _VermilionHouse1Text2 -	db $08 ; asm +	TX_ASM  	ld a, PIDGEY  	call PlayCry  	call WaitForSoundToFinish diff --git a/scripts/vermilionhouse2.asm b/scripts/vermilionhouse2.asm index 7c06c6e9..775c32bb 100755 --- a/scripts/vermilionhouse2.asm +++ b/scripts/vermilionhouse2.asm @@ -5,7 +5,7 @@ VermilionHouse2TextPointers: ; 56073 (15:6073)  	dw VermilionHouse2Text1  VermilionHouse2Text1: ; 56075 (15:6075) -	db $08 ; asm +	TX_ASM  	ld a, [wd728]  	bit 3, a  	jr nz, .asm_03ef5 @@ -39,9 +39,9 @@ VermilionHouse2Text_560b1: ; 560b1 (15:60b1)  	db "@"  VermilionHouse2Text_560b6: ; 560b6 (15:60b6) -	TX_FAR _VermilionHouse2Text_560b6 ; 0x9c554 +	TX_FAR _VermilionHouse2Text_560b6  	db $0B -	TX_FAR _VermilionHouse2Text_560bb ; 0x9c5a4 +	TX_FAR _VermilionHouse2Text_560bb  	db "@"  VermilionHouse2Text_560c0: ; 560c0 (15:60c0) diff --git a/scripts/vermilionhouse3.asm b/scripts/vermilionhouse3.asm index 08e2e395..478979da 100755 --- a/scripts/vermilionhouse3.asm +++ b/scripts/vermilionhouse3.asm @@ -5,7 +5,7 @@ VermilionHouse3TextPointers: ; 19c15 (6:5c15)  	dw VermilionHouse3Text1  VermilionHouse3Text1: ; 19c17 (6:5c17) -	db $08 ; asm +	TX_ASM  	ld a, $4  	ld [wWhichTrade], a  	predef DoInGameTradeDialogue diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm index b6d2bf3e..68a3502f 100755 --- a/scripts/victoryroad1.asm +++ b/scripts/victoryroad1.asm @@ -28,7 +28,7 @@ VictoryRoad1Script0: ; 5da40 (17:5a40)  	ld a, [wd869]  	bit 7, a  	jp nz, CheckFightingMapTrainers -	ld hl, CoordsData_5da5c ; $5a5c +	ld hl, CoordsData_5da5c  	call CheckBoulderCoords  	jp nc, CheckFightingMapTrainers  	ld hl, wd126 @@ -54,30 +54,30 @@ VictoryRoad1TrainerHeader0: ; 5da6d (17:5a6d)  	db $1 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd869 ; flag's byte -	dw VictoryRoad1BattleText1 ; 0x5a9a TextBeforeBattle -	dw VictoryRoad1AfterBattleText1 ; 0x5aa4 TextAfterBattle -	dw VictoryRoad1EndBattleText1 ; 0x5a9f TextEndBattle -	dw VictoryRoad1EndBattleText1 ; 0x5a9f TextEndBattle +	dw VictoryRoad1BattleText1 ; TextBeforeBattle +	dw VictoryRoad1AfterBattleText1 ; TextAfterBattle +	dw VictoryRoad1EndBattleText1 ; TextEndBattle +	dw VictoryRoad1EndBattleText1 ; TextEndBattle  VictoryRoad1TrainerHeader1: ; 5da79 (17:5a79)  	db $2 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd869 ; flag's byte -	dw VictoryRoad1BattleText2 ; 0x5aa9 TextBeforeBattle -	dw VictoryRoad1AfterBattleText2 ; 0x5ab3 TextAfterBattle -	dw VictoryRoad1EndBattleText2 ; 0x5aae TextEndBattle -	dw VictoryRoad1EndBattleText2 ; 0x5aae TextEndBattle +	dw VictoryRoad1BattleText2 ; TextBeforeBattle +	dw VictoryRoad1AfterBattleText2 ; TextAfterBattle +	dw VictoryRoad1EndBattleText2 ; TextEndBattle +	dw VictoryRoad1EndBattleText2 ; TextEndBattle  	db $ff  VictoryRoad1Text1: ; 5da86 (17:5a86) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad1TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad1Text2: ; 5da90 (17:5a90) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad1TrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm index 4aab61ca..1fc2af7e 100755 --- a/scripts/victoryroad2.asm +++ b/scripts/victoryroad2.asm @@ -45,11 +45,11 @@ VictoryRoad2ScriptPointers: ; 517eb (14:57eb)  	dw EndTrainerBattle  VictoryRoad2Script0: ; 517f1 (14:57f1) -	ld hl, CoordsData_51816 ; $5816 +	ld hl, CoordsData_51816  	call CheckBoulderCoords  	jp nc, CheckFightingMapTrainers  	ld hl, wd7ee -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	cp $2  	jr z, .asm_5180b  	bit 0, [hl] @@ -90,97 +90,97 @@ VictoryRoad2TrainerHeader0: ; 51835 (14:5835)  	db $1 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7ee ; flag's byte -	dw VictoryRoad2BattleText1 ; 0x58ca TextBeforeBattle -	dw VictoryRoad2AfterBattleText1 ; 0x58d4 TextAfterBattle -	dw VictoryRoad2EndBattleText1 ; 0x58cf TextEndBattle -	dw VictoryRoad2EndBattleText1 ; 0x58cf TextEndBattle +	dw VictoryRoad2BattleText1 ; TextBeforeBattle +	dw VictoryRoad2AfterBattleText1 ; TextAfterBattle +	dw VictoryRoad2EndBattleText1 ; TextEndBattle +	dw VictoryRoad2EndBattleText1 ; TextEndBattle  VictoryRoad2TrainerHeader2: ; 51841 (14:5841)  	db $2 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7ee ; flag's byte -	dw VictoryRoad2BattleText2 ; 0x58d9 TextBeforeBattle -	dw VictoryRoad2AfterBattleText2 ; 0x58e3 TextAfterBattle -	dw VictoryRoad2EndBattleText2 ; 0x58de TextEndBattle -	dw VictoryRoad2EndBattleText2 ; 0x58de TextEndBattle +	dw VictoryRoad2BattleText2 ; TextBeforeBattle +	dw VictoryRoad2AfterBattleText2 ; TextAfterBattle +	dw VictoryRoad2EndBattleText2 ; TextEndBattle +	dw VictoryRoad2EndBattleText2 ; TextEndBattle  VictoryRoad2TrainerHeader3: ; 5184d (14:584d)  	db $3 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7ee ; flag's byte -	dw VictoryRoad2BattleText3 ; 0x58e8 TextBeforeBattle -	dw VictoryRoad2AfterBattleText3 ; 0x58f2 TextAfterBattle -	dw VictoryRoad2EndBattleText3 ; 0x58ed TextEndBattle -	dw VictoryRoad2EndBattleText3 ; 0x58ed TextEndBattle +	dw VictoryRoad2BattleText3 ; TextBeforeBattle +	dw VictoryRoad2AfterBattleText3 ; TextAfterBattle +	dw VictoryRoad2EndBattleText3 ; TextEndBattle +	dw VictoryRoad2EndBattleText3 ; TextEndBattle  VictoryRoad2TrainerHeader4: ; 51859 (14:5859)  	db $4 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7ee ; flag's byte -	dw VictoryRoad2BattleText4 ; 0x58f7 TextBeforeBattle -	dw VictoryRoad2AfterBattleText4 ; 0x5901 TextAfterBattle -	dw VictoryRoad2EndBattleText4 ; 0x58fc TextEndBattle -	dw VictoryRoad2EndBattleText4 ; 0x58fc TextEndBattle +	dw VictoryRoad2BattleText4 ; TextBeforeBattle +	dw VictoryRoad2AfterBattleText4 ; TextAfterBattle +	dw VictoryRoad2EndBattleText4 ; TextEndBattle +	dw VictoryRoad2EndBattleText4 ; TextEndBattle  VictoryRoad2TrainerHeader5: ; 51865 (14:5865)  	db $5 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd7ee ; flag's byte -	dw VictoryRoad2BattleText5 ; 0x5906 TextBeforeBattle -	dw VictoryRoad2AfterBattleText5 ; 0x5910 TextAfterBattle -	dw VictoryRoad2EndBattleText5 ; 0x590b TextEndBattle -	dw VictoryRoad2EndBattleText5 ; 0x590b TextEndBattle +	dw VictoryRoad2BattleText5 ; TextBeforeBattle +	dw VictoryRoad2AfterBattleText5 ; TextAfterBattle +	dw VictoryRoad2EndBattleText5 ; TextEndBattle +	dw VictoryRoad2EndBattleText5 ; TextEndBattle  VictoryRoad2TrainerHeader6: ; 51871 (14:5871)  	db $6 ; flag's bit  	db ($0 << 4) ; trainer's view range  	dw wd7ee ; flag's byte -	dw VictoryRoad2BattleText6 ; 0x58ba TextBeforeBattle -	dw VictoryRoad2BattleText6 ; 0x58ba TextAfterBattle -	dw VictoryRoad2BattleText6 ; 0x58ba TextEndBattle -	dw VictoryRoad2BattleText6 ; 0x58ba TextEndBattle +	dw VictoryRoad2BattleText6 ; TextBeforeBattle +	dw VictoryRoad2BattleText6 ; TextAfterBattle +	dw VictoryRoad2BattleText6 ; TextEndBattle +	dw VictoryRoad2BattleText6 ; TextEndBattle  	db $ff  VictoryRoad2Text1: ; 5187e (14:587e) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad2TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad2Text2: ; 51888 (14:5888) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad2TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad2Text3: ; 51892 (14:5892) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad2TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad2Text4: ; 5189c (14:589c) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad2TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad2Text5: ; 518a6 (14:58a6) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad2TrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad2Text6: ; 518b0 (14:58b0) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad2TrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad2BattleText6: ; 518ba (14:58ba)  	TX_FAR _VictoryRoad2BattleText6 -	db $8 +	TX_ASM  	ld a, MOLTRES  	call PlayCry  	call WaitForSoundToFinish diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm index 01269a3f..20b3df85 100755 --- a/scripts/victoryroad3.asm +++ b/scripts/victoryroad3.asm @@ -31,10 +31,10 @@ VictoryRoad3Script0: ; 449b7 (11:49b7)  	bit 7, [hl]  	res 7, [hl]  	jp z, .asm_449fe -	ld hl, .coordsData_449f9 ; $49f9 +	ld hl, .coordsData_449f9  	call CheckBoulderCoords  	jp nc, .asm_449fe -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	cp $1  	jr nz, .asm_449dc  	ld hl, wd126 @@ -62,9 +62,9 @@ VictoryRoad3Script0: ; 449b7 (11:49b7)  .asm_449fe  	ld a, $c2  	ld [wDungeonWarpDestinationMap], a -	ld hl, .coordsData_449f9 ; $49f9 +	ld hl, .coordsData_449f9  	call Func_46981 -	ld a, [wWhichTrade] ; wWhichTrade +	ld a, [wWhichTrade]  	cp $1  	jr nz, .asm_44a1b  	ld hl, wd72d @@ -95,60 +95,60 @@ VictoryRoad3TrainerHeader0: ; 44a38 (11:4a38)  	db $1 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd813 ; flag's byte -	dw VictoryRoad3BattleText2 ; 0x4a91 TextBeforeBattle -	dw VictoryRoad3AfterBattleText2 ; 0x4a9b TextAfterBattle -	dw VictoryRoad3EndBattleText2 ; 0x4a96 TextEndBattle -	dw VictoryRoad3EndBattleText2 ; 0x4a96 TextEndBattle +	dw VictoryRoad3BattleText2 ; TextBeforeBattle +	dw VictoryRoad3AfterBattleText2 ; TextAfterBattle +	dw VictoryRoad3EndBattleText2 ; TextEndBattle +	dw VictoryRoad3EndBattleText2 ; TextEndBattle  VictoryRoad3TrainerHeader2: ; 44a44 (11:4a44)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd813 ; flag's byte -	dw VictoryRoad3BattleText3 ; 0x4aa0 TextBeforeBattle -	dw VictoryRoad3AfterBattleText3 ; 0x4aaa TextAfterBattle -	dw VictoryRoad3EndBattleText3 ; 0x4aa5 TextEndBattle -	dw VictoryRoad3EndBattleText3 ; 0x4aa5 TextEndBattle +	dw VictoryRoad3BattleText3 ; TextBeforeBattle +	dw VictoryRoad3AfterBattleText3 ; TextAfterBattle +	dw VictoryRoad3EndBattleText3 ; TextEndBattle +	dw VictoryRoad3EndBattleText3 ; TextEndBattle  VictoryRoad3TrainerHeader3: ; 44a50 (11:4a50)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd813 ; flag's byte -	dw VictoryRoad3BattleText4 ; 0x4aaf TextBeforeBattle -	dw VictoryRoad3AfterBattleText4 ; 0x4ab9 TextAfterBattle -	dw VictoryRoad3EndBattleText4 ; 0x4ab4 TextEndBattle -	dw VictoryRoad3EndBattleText4 ; 0x4ab4 TextEndBattle +	dw VictoryRoad3BattleText4 ; TextBeforeBattle +	dw VictoryRoad3AfterBattleText4 ; TextAfterBattle +	dw VictoryRoad3EndBattleText4 ; TextEndBattle +	dw VictoryRoad3EndBattleText4 ; TextEndBattle  VictoryRoad3TrainerHeader4: ; 44a5c (11:4a5c)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd813 ; flag's byte -	dw VictoryRoad3BattleText5 ; 0x4abe TextBeforeBattle -	dw VictoryRoad3AfterBattleText5 ; 0x4ac8 TextAfterBattle -	dw VictoryRoad3EndBattleText5 ; 0x4ac3 TextEndBattle -	dw VictoryRoad3EndBattleText5 ; 0x4ac3 TextEndBattle +	dw VictoryRoad3BattleText5 ; TextBeforeBattle +	dw VictoryRoad3AfterBattleText5 ; TextAfterBattle +	dw VictoryRoad3EndBattleText5 ; TextEndBattle +	dw VictoryRoad3EndBattleText5 ; TextEndBattle  	db $ff  VictoryRoad3Text1: ; 44a69 (11:4a69) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad3TrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad3Text2: ; 44a73 (11:4a73) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad3TrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad3Text3: ; 44a7d (11:4a7d) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad3TrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd  VictoryRoad3Text4: ; 44a87 (11:4a87) -	db $08 ; asm +	TX_ASM  	ld hl, VictoryRoad3TrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm index d0b2b4ae..ac7afb7c 100755 --- a/scripts/viridiancity.asm +++ b/scripts/viridiancity.asm @@ -20,7 +20,7 @@ ViridianCityScript_1900b: ; 1900b (6:500b)  	ret nz  	ld a, [W_OBTAINEDBADGES]  	cp %01111111 -	jr nz, .asm_1901e ; 0x19016 $6 +	jr nz, .asm_1901e  	ld hl, wd74c  	set 0, [hl]  	ret @@ -149,16 +149,16 @@ ViridianCityText1: ; 19102 (6:5102)  	db "@"  ViridianCityText2: ; 19107 (6:5107) -	db $08 ; asm +	TX_ASM  	ld a, [W_OBTAINEDBADGES]  	cp %01111111  	ld hl, ViridianCityText_19127 -	jr z, .asm_ae9fe ; 0x19110 +	jr z, .asm_ae9fe  	ld a, [wd751]  	bit 1, a -	jr nz, .asm_ae9fe ; 0x19117 +	jr nz, .asm_ae9fe  	ld hl, ViridianCityText_19122 -.asm_ae9fe ; 0x1911c +.asm_ae9fe  	call PrintText  	jp TextScriptEnd @@ -171,20 +171,20 @@ ViridianCityText_19127: ; 19127 (6:5127)  	db "@"  ViridianCityText3: ; 1912c (6:512c) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianCityText_1914d  	call PrintText  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr nz, .asm_6dfea ; 0x1913a +	jr nz, .asm_6dfea  	ld hl, ViridianCityText_19157  	call PrintText -	jr .asm_d611f ; 0x19142 -.asm_6dfea ; 0x19144 +	jr .asm_d611f +.asm_6dfea  	ld hl, ViridianCityText_19152  	call PrintText -.asm_d611f ; 0x1914a +.asm_d611f  	jp TextScriptEnd  ViridianCityText_1914d: ; 1914d (6:514d) @@ -200,17 +200,17 @@ ViridianCityText_19157: ; 19157 (6:5157)  	db "@"  ViridianCityText4: ; 1915c (6:515c) -	db $08 ; asm +	TX_ASM  	ld a, [wd74b]  	bit 5, a -	jr nz, .asm_83894 ; 0x19162 +	jr nz, .asm_83894  	ld hl, ViridianCityText_19175  	call PrintText -	jr .asm_700a6 ; 0x1916a -.asm_83894 ; 0x1916c +	jr .asm_700a6 +.asm_83894  	ld hl, ViridianCityText_1917a  	call PrintText -.asm_700a6 ; 0x19172 +.asm_700a6  	jp TextScriptEnd  ViridianCityText_19175: ; 19175 (6:5175) @@ -222,7 +222,7 @@ ViridianCityText_1917a: ; 1917a (6:517a)  	db "@"  ViridianCityText5: ; 1917f (6:517f) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianCityText_19191  	call PrintText  	call ViridianCityScript_190cf @@ -235,10 +235,10 @@ ViridianCityText_19191: ; 19191 (6:5191)  	db "@"  ViridianCityText6: ; 19196 (6:5196) -	db $08 ; asm +	TX_ASM  	ld a, [wd74c]  	bit 1, a -	jr nz, .asm_4e5a0 ; 0x1919c +	jr nz, .asm_4e5a0  	ld hl, ViridianCityText_191ca  	call PrintText  	ld bc, (TM_42 << 8) | 1 @@ -248,15 +248,15 @@ ViridianCityText6: ; 19196 (6:5196)  	call PrintText  	ld hl, wd74c  	set 1, [hl] -	jr .asm_3c73c ; 0x191b7 +	jr .asm_3c73c  .BagFull  	ld hl, TM42NoRoomText  	call PrintText -	jr .asm_3c73c ; 0x191bf -.asm_4e5a0 ; 0x191c1 +	jr .asm_3c73c +.asm_4e5a0  	ld hl, TM42Explanation  	call PrintText -.asm_3c73c ; 0x191c7 +.asm_3c73c  	jp TextScriptEnd  ViridianCityText_191ca: ; 191ca (6:51ca) @@ -276,24 +276,24 @@ TM42NoRoomText: ; 191da (6:51da)  	db "@"  ViridianCityText7: ; 191df (6:51df) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianCityText_1920a  	call PrintText -	ld c, $2 +	ld c, 2  	call DelayFrames  	call YesNoChoice  	ld a, [wCurrentMenuItem]  	and a -	jr z, .asm_42f68 ; 0x191f2 +	jr z, .asm_42f68  	ld hl, ViridianCityText_1920f  	call PrintText  	ld a, $1  	ld [W_VIRIDIANCITYCURSCRIPT], a -	jr .asm_2413a ; 0x191ff -.asm_42f68 ; 0x19201 +	jr .asm_2413a +.asm_42f68  	ld hl, ViridianCityText_19214  	call PrintText -.asm_2413a ; 0x19207 +.asm_2413a  	jp TextScriptEnd  ViridianCityText_1920a: ; 1920a (6:520a) diff --git a/scripts/viridianforest.asm b/scripts/viridianforest.asm index 4ec1c0aa..124d3184 100755 --- a/scripts/viridianforest.asm +++ b/scripts/viridianforest.asm @@ -33,28 +33,28 @@ ViridianForestTrainerHeader0: ; 61142 (18:5142)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f3 ; flag's byte -	dw ViridianForestBattleText1 ; 0x518a TextBeforeBattle -	dw ViridianForestAfterBattleText1 ; 0x5194 TextAfterBattle -	dw ViridianForestEndBattleText1 ; 0x518f TextEndBattle -	dw ViridianForestEndBattleText1 ; 0x518f TextEndBattle +	dw ViridianForestBattleText1 ; TextBeforeBattle +	dw ViridianForestAfterBattleText1 ; TextAfterBattle +	dw ViridianForestEndBattleText1 ; TextEndBattle +	dw ViridianForestEndBattleText1 ; TextEndBattle  ViridianForestTrainerHeader1: ; 6114e (18:514e)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd7f3 ; flag's byte -	dw ViridianForestBattleText2 ; 0x5199 TextBeforeBattle -	dw ViridianForestAfterBattleText2 ; 0x51a3 TextAfterBattle -	dw ViridianForestEndBattleText2 ; 0x519e TextEndBattle -	dw ViridianForestEndBattleText2 ; 0x519e TextEndBattle +	dw ViridianForestBattleText2 ; TextBeforeBattle +	dw ViridianForestAfterBattleText2 ; TextAfterBattle +	dw ViridianForestEndBattleText2 ; TextEndBattle +	dw ViridianForestEndBattleText2 ; TextEndBattle  ViridianForestTrainerHeader2: ; 6115a (18:515a)  	db $4 ; flag's bit  	db ($1 << 4) ; trainer's view range  	dw wd7f3 ; flag's byte -	dw ViridianForestBattleText3 ; 0x51a8 TextBeforeBattle -	dw ViridianForestAfterBattleText3 ; 0x51b2 TextAfterBattle -	dw ViridianForestEndBattleText3 ; 0x51ad TextEndBattle -	dw ViridianForestEndBattleText3 ; 0x51ad TextEndBattle +	dw ViridianForestBattleText3 ; TextBeforeBattle +	dw ViridianForestAfterBattleText3 ; TextAfterBattle +	dw ViridianForestEndBattleText3 ; TextEndBattle +	dw ViridianForestEndBattleText3 ; TextEndBattle  	db $ff @@ -63,19 +63,19 @@ ViridianForestText1: ; 61167 (18:5167)  	db "@"  ViridianForestText2: ; 6116c (18:516c) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianForestTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd  ViridianForestText3: ; 61176 (18:5176) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianForestTrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd  ViridianForestText4: ; 61180 (18:5180) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianForestTrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm index 6ced7d82..eb2ab7f5 100755 --- a/scripts/viridiangym.asm +++ b/scripts/viridiangym.asm @@ -30,9 +30,9 @@ ViridianGymScriptPointers: ; 748e1 (1d:48e1)  	dw ViridianGymScript4  ViridianGymScript0: ; 748eb (1d:48eb) -	ld a, [W_YCOORD] ; wd361 +	ld a, [W_YCOORD]  	ld b, a -	ld a, [W_XCOORD] ; wd362 +	ld a, [W_XCOORD]  	ld c, a  	ld hl, ViridianGymArrowTilePlayerMovement  	call DecodeArrowMovementRLE @@ -137,14 +137,14 @@ ViridianGymScript4: ; 7496b (1d:496b)  	jp Bankswitch  ViridianGymScript3: ; 74988 (1d:4988) -	ld a, [W_ISINBATTLE] ; W_ISINBATTLE +	ld a, [W_ISINBATTLE]  	cp $ff  	jp z, ViridianGymScript_748d6  	ld a, $f0  	ld [wJoyIgnore], a  ViridianGymScript3_74995: ; 74995 (1d:4995)  	ld a, $c -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd751  	set 1, [hl] @@ -152,14 +152,14 @@ ViridianGymScript3_74995: ; 74995 (1d:4995)  	call GiveItem  	jr nc, .BagFull  	ld a, $d -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  	ld hl, wd751  	set 0, [hl]  	jr .asm_749be  .BagFull  	ld a, $e -	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +	ld [H_DOWNARROWBLINKCNT2], a  	call DisplayTextID  .asm_749be  	ld hl, W_OBTAINEDBADGES @@ -204,87 +204,87 @@ ViridianGymTrainerHeader0: ; 74a08 (1d:4a08)  	db $2 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText1 ; 0x4afd TextBeforeBattle -	dw ViridianGymAfterBattleText1 ; 0x4b07 TextAfterBattle -	dw ViridianGymEndBattleText1 ; 0x4b02 TextEndBattle -	dw ViridianGymEndBattleText1 ; 0x4b02 TextEndBattle +	dw ViridianGymBattleText1 ; TextBeforeBattle +	dw ViridianGymAfterBattleText1 ; TextAfterBattle +	dw ViridianGymEndBattleText1 ; TextEndBattle +	dw ViridianGymEndBattleText1 ; TextEndBattle  ViridianGymTrainerHeader1: ; 74a14 (1d:4a14)  	db $3 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText2 ; 0x4b16 TextBeforeBattle -	dw ViridianGymAfterBattleText2 ; 0x4b20 TextAfterBattle -	dw ViridianGymEndBattleText2 ; 0x4b1b TextEndBattle -	dw ViridianGymEndBattleText2 ; 0x4b1b TextEndBattle +	dw ViridianGymBattleText2 ; TextBeforeBattle +	dw ViridianGymAfterBattleText2 ; TextAfterBattle +	dw ViridianGymEndBattleText2 ; TextEndBattle +	dw ViridianGymEndBattleText2 ; TextEndBattle  ViridianGymTrainerHeader2: ; 74a20 (1d:4a20)  	db $4 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText3 ; 0x4b2f TextBeforeBattle -	dw ViridianGymAfterBattleText3 ; 0x4b39 TextAfterBattle -	dw ViridianGymEndBattleText3 ; 0x4b34 TextEndBattle -	dw ViridianGymEndBattleText3 ; 0x4b34 TextEndBattle +	dw ViridianGymBattleText3 ; TextBeforeBattle +	dw ViridianGymAfterBattleText3 ; TextAfterBattle +	dw ViridianGymEndBattleText3 ; TextEndBattle +	dw ViridianGymEndBattleText3 ; TextEndBattle  ViridianGymTrainerHeader3: ; 74a2c (1d:4a2c)  	db $5 ; flag's bit  	db ($2 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText4 ; 0x4b48 TextBeforeBattle -	dw ViridianGymAfterBattleText4 ; 0x4b52 TextAfterBattle -	dw ViridianGymEndBattleText4 ; 0x4b4d TextEndBattle -	dw ViridianGymEndBattleText4 ; 0x4b4d TextEndBattle +	dw ViridianGymBattleText4 ; TextBeforeBattle +	dw ViridianGymAfterBattleText4 ; TextAfterBattle +	dw ViridianGymEndBattleText4 ; TextEndBattle +	dw ViridianGymEndBattleText4 ; TextEndBattle  ViridianGymTrainerHeader4: ; 74a38 (1d:4a38)  	db $6 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText5 ; 0x4b61 TextBeforeBattle -	dw ViridianGymAfterBattleText5 ; 0x4b6b TextAfterBattle -	dw ViridianGymEndBattleText5 ; 0x4b66 TextEndBattle -	dw ViridianGymEndBattleText5 ; 0x4b66 TextEndBattle +	dw ViridianGymBattleText5 ; TextBeforeBattle +	dw ViridianGymAfterBattleText5 ; TextAfterBattle +	dw ViridianGymEndBattleText5 ; TextEndBattle +	dw ViridianGymEndBattleText5 ; TextEndBattle  ViridianGymTrainerHeader5: ; 74a44 (1d:4a44)  	db $7 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText6 ; 0x4b7a TextBeforeBattle -	dw ViridianGymAfterBattleText6 ; 0x4b84 TextAfterBattle -	dw ViridianGymEndBattleText6 ; 0x4b7f TextEndBattle -	dw ViridianGymEndBattleText6 ; 0x4b7f TextEndBattle +	dw ViridianGymBattleText6 ; TextBeforeBattle +	dw ViridianGymAfterBattleText6 ; TextAfterBattle +	dw ViridianGymEndBattleText6 ; TextEndBattle +	dw ViridianGymEndBattleText6 ; TextEndBattle  ViridianGymTrainerHeader6: ; 74a50 (1d:4a50)  	db $8 ; flag's bit  	db ($3 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText7 ; 0x4b93 TextBeforeBattle -	dw ViridianGymAfterBattleText7 ; 0x4b9d TextAfterBattle -	dw ViridianGymEndBattleText7 ; 0x4b98 TextEndBattle -	dw ViridianGymEndBattleText7 ; 0x4b98 TextEndBattle +	dw ViridianGymBattleText7 ; TextBeforeBattle +	dw ViridianGymAfterBattleText7 ; TextAfterBattle +	dw ViridianGymEndBattleText7 ; TextEndBattle +	dw ViridianGymEndBattleText7 ; TextEndBattle  ViridianGymTrainerHeader7: ; 74a5c (1d:4a5c)  	db $9 ; flag's bit  	db ($4 << 4) ; trainer's view range  	dw wd751 ; flag's byte -	dw ViridianGymBattleText8 ; 0x4bac TextBeforeBattle -	dw ViridianGymAfterBattleText8 ; 0x4bb6 TextAfterBattle -	dw ViridianGymEndBattleText8 ; 0x4bb1 TextEndBattle -	dw ViridianGymEndBattleText8 ; 0x4bb1 TextEndBattle +	dw ViridianGymBattleText8 ; TextBeforeBattle +	dw ViridianGymAfterBattleText8 ; TextAfterBattle +	dw ViridianGymEndBattleText8 ; TextEndBattle +	dw ViridianGymEndBattleText8 ; TextEndBattle  	db $ff  ViridianGymText1: ; 74a69 (1d:4a69) -	db $08 ; asm +	TX_ASM  	ld a, [wd751]  	bit 1, a -	jr z, .asm_6de66 ; 0x74a6f +	jr z, .asm_6de66  	bit 0, a -	jr nz, .asm_9fc95 ; 0x74a73 +	jr nz, .asm_9fc95  	call z, ViridianGymScript3_74995  	call DisableWaitingAfterTextDisplay -	jr .asm_6dff7 ; 0x74a7b -.asm_9fc95 ; 0x74a7d +	jr .asm_6dff7 +.asm_9fc95  	ld a, $1  	ld [wDoNotWaitForButtonPressAfterDisplayingText], a  	ld hl, ViridianGymText_74ad9 @@ -296,8 +296,8 @@ ViridianGymText1: ; 74a69 (1d:4a69)  	call UpdateSprites  	call Delay3  	call GBFadeInFromBlack -	jr .asm_6dff7 ; 0x74a9e -.asm_6de66 ; 0x74aa0 +	jr .asm_6dff7 +.asm_6de66  	ld hl, ViridianGymText_74ace  	call PrintText  	ld hl, wd72d @@ -306,7 +306,7 @@ ViridianGymText1: ; 74a69 (1d:4a69)  	ld hl, ViridianGymText_74ad3  	ld de, ViridianGymText_74ad3  	call SaveEndBattleTextPointers -	ldh a, [$8c] +	ld a, [H_SPRITEINDEX]  	ld [wSpriteIndex], a  	call EngageMapTrainer  	call InitBattleEnemyParameters @@ -314,7 +314,7 @@ ViridianGymText1: ; 74a69 (1d:4a69)  	ld [W_GYMLEADERNO], a  	ld a, $3  	ld [W_VIRIDIANGYMCURSCRIPT], a -.asm_6dff7 ; 0x74acb +.asm_6dff7  	jp TextScriptEnd  ViridianGymText_74ace: ; 74ace (1d:4ace) @@ -346,7 +346,7 @@ ViridianGymText14: ; 74aee (1d:4aee)  	db "@"  ViridianGymText2: ; 74af3 (1d:4af3) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader0  	call TalkToTrainer  	jp TextScriptEnd @@ -364,7 +364,7 @@ ViridianGymAfterBattleText1: ; 74b07 (1d:4b07)  	db "@"  ViridianGymText3: ; 74b0c (1d:4b0c) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader1  	call TalkToTrainer  	jp TextScriptEnd @@ -382,7 +382,7 @@ ViridianGymAfterBattleText2: ; 74b20 (1d:4b20)  	db "@"  ViridianGymText4: ; 74b25 (1d:4b25) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader2  	call TalkToTrainer  	jp TextScriptEnd @@ -400,7 +400,7 @@ ViridianGymAfterBattleText3: ; 74b39 (1d:4b39)  	db "@"  ViridianGymText5: ; 74b3e (1d:4b3e) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader3  	call TalkToTrainer  	jp TextScriptEnd @@ -418,7 +418,7 @@ ViridianGymAfterBattleText4: ; 74b52 (1d:4b52)  	db "@"  ViridianGymText6: ; 74b57 (1d:4b57) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader4  	call TalkToTrainer  	jp TextScriptEnd @@ -436,7 +436,7 @@ ViridianGymAfterBattleText5: ; 74b6b (1d:4b6b)  	db "@"  ViridianGymText7: ; 74b70 (1d:4b70) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader5  	call TalkToTrainer  	jp TextScriptEnd @@ -454,7 +454,7 @@ ViridianGymAfterBattleText6: ; 74b84 (1d:4b84)  	db "@"  ViridianGymText8: ; 74b89 (1d:4b89) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader6  	call TalkToTrainer  	jp TextScriptEnd @@ -472,7 +472,7 @@ ViridianGymAfterBattleText7: ; 74b9d (1d:4b9d)  	db "@"  ViridianGymText9: ; 74ba2 (1d:4ba2) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianGymTrainerHeader7  	call TalkToTrainer  	jp TextScriptEnd @@ -490,17 +490,17 @@ ViridianGymAfterBattleText8: ; 74bb6 (1d:4bb6)  	db "@"  ViridianGymText10: ; 74bbb (1d:4bbb) -	db $08 ; asm +	TX_ASM  	ld a, [wd751]  	bit 1, a -	jr nz, .asm_1abd1 ; 0x74bc1 +	jr nz, .asm_1abd1  	ld hl, ViridianGymText_74bd4  	call PrintText -	jr .asm_6064d ; 0x74bc9 -.asm_1abd1 ; 0x74bcb +	jr .asm_6064d +.asm_1abd1  	ld hl, ViridianGymText_74bd9  	call PrintText -.asm_6064d ; 0x74bd1 +.asm_6064d  	jp TextScriptEnd  ViridianGymText_74bd4: ; 74bd4 (1d:4bd4) diff --git a/scripts/viridianhouse.asm b/scripts/viridianhouse.asm index ab8b6786..61920489 100755 --- a/scripts/viridianhouse.asm +++ b/scripts/viridianhouse.asm @@ -16,7 +16,7 @@ ViridianHouseText2: ; 1d59a (7:559a)  	db "@"  ViridianHouseText3: ; 1d59f (7:559f) -	db $08 ; asm +	TX_ASM  	ld hl, ViridianHouseText_1d5b1  	call PrintText  	ld a, SPEAROW diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index d33dfe81..e6e120fe 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -8,11 +8,11 @@ ViridianMartScript: ; 1d46e (7:546e)  ViridianMartScript_1d47d: ; 1d47d (7:547d)  	ld a, [wd74e]  	bit 0, a -	jr nz, .asm_1d489 ; 0x1d482 $5 -	ld hl, ViridianMartTextPointers ; $54e0 -	jr .asm_1d48c ; 0x1d487 $3 +	jr nz, .asm_1d489 +	ld hl, ViridianMartTextPointers +	jr .asm_1d48c  .asm_1d489 -	ld hl, ViridianMartTextPointers + $a ; $54ea ; starts at ViridianMartText6 +	ld hl, ViridianMartTextPointers + $a ; starts at ViridianMartText6  .asm_1d48c  	ld a, l  	ld [W_MAPTEXTPTR], a | 
