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/CeladonDiner.asm | 53 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'scripts/CeladonDiner.asm') diff --git a/scripts/CeladonDiner.asm b/scripts/CeladonDiner.asm index e95035f0..ca54af4f 100644 --- a/scripts/CeladonDiner.asm +++ b/scripts/CeladonDiner.asm @@ -3,64 +3,65 @@ CeladonDiner_Script: ret CeladonDiner_TextPointers: - dw CeladonDinerText1 - dw CeladonDinerText2 - dw CeladonDinerText3 - dw CeladonDinerText4 - dw CeladonDinerText5 + def_text_pointers + dw_const CeladonDinerCookText, TEXT_CELADONDINER_COOK + dw_const CeladonDinerMiddleAgedWomanText, TEXT_CELADONDINER_MIDDLE_AGED_WOMAN + dw_const CeladonDinerMiddleAgedManText, TEXT_CELADONDINER_MIDDLE_AGED_MAN + dw_const CeladonDinerFisherText, TEXT_CELADONDINER_FISHER + dw_const CeladonDinerGymGuideText, TEXT_CELADONDINER_GYM_GUIDE -CeladonDinerText1: - text_far _CeladonDinerText1 +CeladonDinerCookText: + text_far _CeladonDinerCookText text_end -CeladonDinerText2: - text_far _CeladonDinerText2 +CeladonDinerMiddleAgedWomanText: + text_far _CeladonDinerMiddleAgedWomanText text_end -CeladonDinerText3: - text_far _CeladonDinerText3 +CeladonDinerMiddleAgedManText: + text_far _CeladonDinerMiddleAgedManText text_end -CeladonDinerText4: - text_far _CeladonDinerText4 +CeladonDinerFisherText: + text_far _CeladonDinerFisherText text_end -CeladonDinerText5: +CeladonDinerGymGuideText: text_asm CheckEvent EVENT_GOT_COIN_CASE jr nz, .got_item - ld hl, CeladonDinerText_491a7 + ld hl, .ImFlatOutBustedText call PrintText lb bc, COIN_CASE, 1 call GiveItem jr nc, .bag_full SetEvent EVENT_GOT_COIN_CASE - ld hl, ReceivedCoinCaseText + ld hl, .ReceivedCoinCaseText call PrintText jr .done .bag_full - ld hl, CoinCaseNoRoomText + ld hl, .CoinCaseNoRoomText call PrintText jr .done .got_item - ld hl, CeladonDinerText_491b7 + ld hl, .WinItBackText call PrintText .done jp TextScriptEnd -CeladonDinerText_491a7: - text_far _CeladonDinerText_491a7 +.ImFlatOutBustedText: + text_far _CeladonDinerGymGuideImFlatOutBustedText text_end -ReceivedCoinCaseText: - text_far _ReceivedCoinCaseText +.ReceivedCoinCaseText: + text_far _CeladonDinerGymGuideReceivedCoinCaseText sound_get_key_item text_end -CoinCaseNoRoomText: - text_far _CoinCaseNoRoomText +.CoinCaseNoRoomText: + text_far _CeladonDinerGymGuideCoinCaseNoRoomText text_end -CeladonDinerText_491b7: - text_far _CeladonDinerText_491b7 +.WinItBackText: + text_far _CeladonDinerGymGuideWinItBackText text_end -- cgit v1.3.1-sl0p