From d001ced41b53271373753de835a9c3b3413dc318 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Thu, 13 Jul 2023 20:27:56 -0500 Subject: Add macros, constants, and labels for map scripts and text (#367) This introduces `def_script_pointers`, `def_text_pointers`, and `object_const_def` macros, and applies them to all maps. Most other map labels have also been identified. --- scripts/BikeShop.asm | 79 ++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 39 deletions(-) (limited to 'scripts/BikeShop.asm') diff --git a/scripts/BikeShop.asm b/scripts/BikeShop.asm index f5f0539e..3321a23e 100644 --- a/scripts/BikeShop.asm +++ b/scripts/BikeShop.asm @@ -2,22 +2,23 @@ BikeShop_Script: jp EnableAutoTextBoxDrawing BikeShop_TextPointers: - dw BikeShopText1 - dw BikeShopText2 - dw BikeShopText3 + def_text_pointers + dw_const BikeShopClerkText, TEXT_BIKESHOP_CLERK + dw_const BikeShopMiddleAgedWomanText, TEXT_BIKESHOP_MIDDLE_AGED_WOMAN + dw_const BikeShopYoungsterText, TEXT_BIKESHOP_YOUNGSTER -BikeShopText1: +BikeShopClerkText: text_asm CheckEvent EVENT_GOT_BICYCLE - jr z, .asm_260d4 - ld hl, BikeShopText_1d82f + jr z, .dontHaveBike + ld hl, BikeShopClerkHowDoYouLikeYourBicycleText call PrintText jp .Done -.asm_260d4 +.dontHaveBike ld b, BIKE_VOUCHER call IsItemInBag - jr z, .asm_41190 - ld hl, BikeShopText_1d81f + jr z, .dontHaveVoucher + ld hl, BikeShopClerkOhThatsAVoucherText call PrintText lb bc, BICYCLE, 1 call GiveItem @@ -26,15 +27,15 @@ BikeShopText1: ldh [hItemToRemoveID], a farcall RemoveItemByID SetEvent EVENT_GOT_BICYCLE - ld hl, BikeShopText_1d824 + ld hl, BikeShopExchangedVoucherText call PrintText jr .Done .BagFull - ld hl, BikeShopText_1d834 + ld hl, BikeShopBagFullText call PrintText jr .Done -.asm_41190 - ld hl, BikeShopText_1d810 +.dontHaveVoucher + ld hl, BikeShopClerkWelcomeText call PrintText xor a ld [wCurrentMenuItem], a @@ -60,7 +61,7 @@ BikeShopText1: hlcoord 8, 3 ld de, BikeShopMenuPrice call PlaceString - ld hl, BikeShopText_1d815 + ld hl, BikeShopClerkDoYouLikeItText call PrintText call HandleMenuInput bit BIT_B_BUTTON, a @@ -85,24 +86,24 @@ BikeShopMenuText: BikeShopMenuPrice: db "¥1000000@" -BikeShopText_1d810: - text_far _BikeShopText_1d810 +BikeShopClerkWelcomeText: + text_far _BikeShopClerkWelcomeText text_end -BikeShopText_1d815: - text_far _BikeShopText_1d815 +BikeShopClerkDoYouLikeItText: + text_far _BikeShopClerkDoYouLikeItText text_end BikeShopCantAffordText: text_far _BikeShopCantAffordText text_end -BikeShopText_1d81f: - text_far _BikeShopText_1d81f +BikeShopClerkOhThatsAVoucherText: + text_far _BikeShopClerkOhThatsAVoucherText text_end -BikeShopText_1d824: - text_far _BikeShopText_1d824 +BikeShopExchangedVoucherText: + text_far _BikeShopExchangedVoucherText sound_get_key_item text_end @@ -110,38 +111,38 @@ BikeShopComeAgainText: text_far _BikeShopComeAgainText text_end -BikeShopText_1d82f: - text_far _BikeShopText_1d82f +BikeShopClerkHowDoYouLikeYourBicycleText: + text_far _BikeShopClerkHowDoYouLikeYourBicycleText text_end -BikeShopText_1d834: - text_far _BikeShopText_1d834 +BikeShopBagFullText: + text_far _BikeShopBagFullText text_end -BikeShopText2: +BikeShopMiddleAgedWomanText: text_asm - ld hl, BikeShopText_1d843 + ld hl, .Text call PrintText jp TextScriptEnd -BikeShopText_1d843: - text_far _BikeShopText_1d843 +.Text: + text_far _BikeShopMiddleAgedWomanText text_end -BikeShopText3: +BikeShopYoungsterText: text_asm CheckEvent EVENT_GOT_BICYCLE - ld hl, BikeShopText_1d861 - jr nz, .asm_34d2d - ld hl, BikeShopText_1d85c -.asm_34d2d + ld hl, .CoolBikeText + jr nz, .gotBike + ld hl, .TheseBikesAreExpensiveText +.gotBike call PrintText jp TextScriptEnd -BikeShopText_1d85c: - text_far _BikeShopText_1d85c +.TheseBikesAreExpensiveText: + text_far _BikeShopYoungsterTheseBikesAreExpensiveText text_end -BikeShopText_1d861: - text_far _BikeShopText_1d861 +.CoolBikeText: + text_far _BikeShopYoungsterCoolBikeText text_end -- cgit v1.3.1-sl0p