From f7ec78851ca170a91e6f00ff48cf97f27ec14bea Mon Sep 17 00:00:00 2001 From: Pokeglitch Date: Mon, 18 Jun 2018 08:45:05 -0400 Subject: Forgot to add changes to previous commit. --- macros/queue.asm | 17 +++++++++++++++++ macros/scripts.asm | 14 ++++++++++++++ macros/text.asm | 10 +--------- 3 files changed, 32 insertions(+), 9 deletions(-) create mode 100755 macros/queue.asm create mode 100755 macros/scripts.asm (limited to 'macros') diff --git a/macros/queue.asm b/macros/queue.asm new file mode 100755 index 0000000..ac862e6 --- /dev/null +++ b/macros/queue.asm @@ -0,0 +1,17 @@ +queue_ab: MACRO + ld hl, \1 + ldh a, [hROMBank] + call QueueScript +ENDM + +queue_ba: MACRO + ldh a, [hROMBank] + ld hl, \1 + call QueueScript +ENDM + +far_queue: MACRO + ld hl, \1 + ld a, BANK(\1) + call QueueScript +ENDM \ No newline at end of file diff --git a/macros/scripts.asm b/macros/scripts.asm new file mode 100755 index 0000000..2a2e303 --- /dev/null +++ b/macros/scripts.asm @@ -0,0 +1,14 @@ +init_script_table: MACRO +script_id = 0 +ENDM + +add_script: MACRO + dw \1 +\1ScriptID = script_id +script_id = script_id + 1 +ENDM + +set_script: MACRO + ld a, \1ScriptID + ld [wFieldMoveScriptID], a +ENDM \ No newline at end of file diff --git a/macros/text.asm b/macros/text.asm index fd88918..f95c300 100644 --- a/macros/text.asm +++ b/macros/text.asm @@ -1,21 +1,13 @@ text EQUS "db $00," ; Start writing text. next EQUS "db \"\"," ; Move a line down. line EQUS "db \"\"," ; Start writing at the bottom line. +para EQUS "db \"\"," ; Start a new paragraph. cont EQUS "db \"\"," ; Scroll to the next line. done EQUS "db \"\"" ; End a text box. prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). text_end EQUS "db $50" ; End control code for text processor ; different from @ -; Start a new paragraph -para: MACRO - if _NARG == 0 - db "" - else - db "", \1 ; Rest of text - endc -ENDM - ; TODO: determine if these are in ; Pokedex text commands are only used with pokered. ; They are included for compatibility. -- cgit v1.2.3