From b460637b812f9829b69203f32e9a4f42a43070b6 Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:07:17 -0500 Subject: Avoid using `EQUS` when `EQU` or `MACRO` will do (#496) --- macros/scripts/maps.asm | 12 +++++++++--- macros/scripts/text.asm | 45 +++++++++++++++++++++++++++++++++++---------- 2 files changed, 44 insertions(+), 13 deletions(-) (limited to 'macros/scripts') diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index b5799e64..2837d0c0 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -225,8 +225,14 @@ MACRO connection dw wOverworldMap + _win ENDM -DEF def_script_pointers EQUS "const_def" +MACRO def_script_pointers + const_def +ENDM -DEF def_text_pointers EQUS "const_def 1" +MACRO def_text_pointers + const_def 1 +ENDM -DEF object_const_def EQUS "const_def 1" +MACRO object_const_def + const_def 1 +ENDM diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm index 418e839c..a848f587 100644 --- a/macros/scripts/text.asm +++ b/macros/scripts/text.asm @@ -1,13 +1,38 @@ -DEF text EQUS "db TX_START," ; Start writing text. -DEF next EQUS "db \"\"," ; Move a line down. -DEF line EQUS "db \"\"," ; Start writing at the bottom line. -DEF para EQUS "db \"\"," ; Start a new paragraph. -DEF cont EQUS "db \"\"," ; Scroll to the next line. -DEF done EQUS "db \"\"" ; End a text box. -DEF prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). - -DEF page EQUS "db \"\"," ; Start a new Pokédex page. -DEF dex EQUS "db \"\", \"@\"" ; End a Pokédex entry. +MACRO text + db TX_START, \# ; Start writing text +ENDM + +MACRO next + db "", \# ; Move a line down +ENDM + +MACRO line + db "", \# ; Start writing at the bottom line +ENDM + +MACRO para + db "", \# ; Start a new paragraph +ENDM + +MACRO cont + db "", \# ; Scroll to the next line +ENDM + +MACRO done + db "" ; End a text box +ENDM + +MACRO prompt + db "" ; Prompt the player to end a text box (initiating some other event) +ENDM + +MACRO page + db "", \# ; Start a new Pokédex page +ENDM + +MACRO dex + db "@" ; End a Pokédex entry +ENDM ; TextCommandJumpTable indexes (see home/text.asm) -- cgit v1.3.1-sl0p