diff options
| author | vulcandth <vulcandth@gmail.com> | 2023-07-13 20:27:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-13 21:27:56 -0400 |
| commit | d001ced41b53271373753de835a9c3b3413dc318 (patch) | |
| tree | ff2db7f403bddfcdeb12e50def8411cafedcdd5e /scripts/CinnabarLabFossilRoom.asm | |
| parent | Make wCurrentBoxNum a byte instead of word (#414) (diff) | |
| download | pokeyellow-d001ced41b53271373753de835a9c3b3413dc318.tar.gz pokeyellow-d001ced41b53271373753de835a9c3b3413dc318.tar.xz pokeyellow-d001ced41b53271373753de835a9c3b3413dc318.zip | |
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.
Diffstat (limited to 'scripts/CinnabarLabFossilRoom.asm')
| -rw-r--r-- | scripts/CinnabarLabFossilRoom.asm | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/scripts/CinnabarLabFossilRoom.asm b/scripts/CinnabarLabFossilRoom.asm index 2c388119..4a2ff51f 100644 --- a/scripts/CinnabarLabFossilRoom.asm +++ b/scripts/CinnabarLabFossilRoom.asm @@ -2,8 +2,9 @@ CinnabarLabFossilRoom_Script: jp EnableAutoTextBoxDrawing CinnabarLabFossilRoom_TextPointers: - dw Lab4Text1 - dw Lab4Text2 + def_text_pointers + dw_const CinnabarLabFossilRoomScientist1Text, TEXT_CINNABARLABFOSSILROOM_SCIENTIST1 + dw_const CinnabarLabFossilRoomScientist2Text, TEXT_CINNABARLABFOSSILROOM_SCIENTIST2 Lab4Script_GetFossilsInBag: ; construct a list of all fossils in the player's bag @@ -46,59 +47,59 @@ FossilsList: db OLD_AMBER db 0 ; end -Lab4Text1: +CinnabarLabFossilRoomScientist1Text: text_asm CheckEvent EVENT_GAVE_FOSSIL_TO_LAB - jr nz, .asm_75d96 - ld hl, Lab4Text_75dc6 + jr nz, .check_done_reviving + ld hl, .Text call PrintText call Lab4Script_GetFossilsInBag ld a, [wFilteredBagItemsCount] and a - jr z, .asm_75d8d + jr z, .no_fossils farcall GiveFossilToCinnabarLab - jr .asm_75d93 -.asm_75d8d - ld hl, Lab4Text_75dcb + jr .done +.no_fossils + ld hl, .NoFossilsText call PrintText -.asm_75d93 +.done jp TextScriptEnd -.asm_75d96 +.check_done_reviving CheckEventAfterBranchReuseA EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_GAVE_FOSSIL_TO_LAB - jr z, .asm_75da2 - ld hl, Lab4Text_75dd0 + jr z, .done_reviving + ld hl, .GoForAWalkText call PrintText - jr .asm_75d93 -.asm_75da2 + jr .done +.done_reviving call LoadFossilItemAndMonNameBank1D - ld hl, Lab4Text_75dd5 + ld hl, .FossilIsBackToLifeText call PrintText SetEvent EVENT_LAB_HANDING_OVER_FOSSIL_MON ld a, [wFossilMon] ld b, a ld c, 30 call GivePokemon - jr nc, .asm_75d93 + jr nc, .done ResetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_LAB_HANDING_OVER_FOSSIL_MON - jr .asm_75d93 + jr .done -Lab4Text_75dc6: - text_far _Lab4Text_75dc6 +.Text: + text_far _CinnabarLabFossilRoomScientist1Text text_end -Lab4Text_75dcb: - text_far _Lab4Text_75dcb +.NoFossilsText: + text_far _CinnabarLabFossilRoomScientist1NoFossilsText text_end -Lab4Text_75dd0: - text_far _Lab4Text_75dd0 +.GoForAWalkText: + text_far _CinnabarLabFossilRoomScientist1GoForAWalkText text_end -Lab4Text_75dd5: - text_far _Lab4Text_75dd5 +.FossilIsBackToLifeText: + text_far _CinnabarLabFossilRoomScientist1FossilIsBackToLifeText text_end -Lab4Text2: +CinnabarLabFossilRoomScientist2Text: text_asm ld a, TRADE_FOR_SAILOR ld [wWhichTrade], a |
