pokered/scripts/CeruleanCaveB1F.asm
vulcandth d001ced41b
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.
2023-07-13 21:27:56 -04:00

40 lines
1.2 KiB
NASM

CeruleanCaveB1F_Script:
call EnableAutoTextBoxDrawing
ld hl, CeruleanCaveB1FTrainerHeaders
ld de, CeruleanCaveB1F_ScriptPointers
ld a, [wCeruleanCaveB1FCurScript]
call ExecuteCurMapScriptInTable
ld [wCeruleanCaveB1FCurScript], a
ret
CeruleanCaveB1F_ScriptPointers:
def_script_pointers
dw_const CheckFightingMapTrainers, SCRIPT_CERULEANCAVEB1F_DEFAULT
dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_CERULEANCAVEB1F_START_BATTLE
dw_const EndTrainerBattle, SCRIPT_CERULEANCAVEB1F_END_BATTLE
CeruleanCaveB1F_TextPointers:
def_text_pointers
dw_const CeruleanCaveB1FMewtwoText, TEXT_CERULEANCAVEB1F_MEWTWO
dw_const PickUpItemText, TEXT_CERULEANCAVEB1F_ULTRA_BALL
dw_const PickUpItemText, TEXT_CERULEANCAVEB1F_MAX_REVIVE
CeruleanCaveB1FTrainerHeaders:
def_trainers
MewtwoTrainerHeader:
trainer EVENT_BEAT_MEWTWO, 0, MewtwoBattleText, MewtwoBattleText, MewtwoBattleText
db -1 ; end
CeruleanCaveB1FMewtwoText:
text_asm
ld hl, MewtwoTrainerHeader
call TalkToTrainer
jp TextScriptEnd
MewtwoBattleText:
text_far _MewtwoBattleText
text_asm
ld a, MEWTWO
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd