summaryrefslogtreecommitdiff
path: root/macros/scripts/text.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-04 16:19:15 -0400
committerGitHub <noreply@github.com>2020-07-04 16:19:15 -0400
commit2718c36065e7eb201a149938bcdd51987c4e56b6 (patch)
tree4a1c0294193a497e15ec8e6be59390eb1f84b5d3 /macros/scripts/text.asm
parentc85050497c1bd062e9cd40bf5b32fa3beca366cc (diff)
parent36f8cd1477b8ebe0537e99abd3ba53471a2e16c4 (diff)
Merge pull request #257 from Rangi42/master
More reorganization
Diffstat (limited to 'macros/scripts/text.asm')
-rwxr-xr-xmacros/scripts/text.asm78
1 files changed, 78 insertions, 0 deletions
diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm
new file mode 100755
index 00000000..732a22d4
--- /dev/null
+++ b/macros/scripts/text.asm
@@ -0,0 +1,78 @@
+text EQUS "db $00," ; Start writing text.
+next EQUS "db $4e," ; Move a line down.
+line EQUS "db $4f," ; Start writing at the bottom line.
+para EQUS "db $51," ; Start a new paragraph.
+cont EQUS "db $55," ; Scroll to the next line.
+done EQUS "db $57" ; End a text box.
+prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event).
+
+page EQUS "db $49," ; Start a new Pokedex page.
+dex EQUS "db $5f, $50" ; End a Pokedex entry.
+
+TX_RAM: MACRO
+; prints text to screen
+; \1: RAM address to read from
+ db $1
+ dw \1
+ENDM
+
+TX_BCD: MACRO
+; \1: RAM address to read from
+; \2: number of bytes + print flags
+ db $2
+ dw \1
+ db \2
+ENDM
+
+TX_LINE EQUS "db $05"
+TX_BLINK EQUS "db $06"
+;TX_SCROLL EQUS "db $07"
+TX_ASM EQUS "db $08"
+
+TX_NUM: MACRO
+; print a big-endian decimal number.
+; \1: address to read from
+; \2: number of bytes to read
+; \3: number of digits to display
+ db $09
+ dw \1
+ db \2 << 4 | \3
+ENDM
+
+TX_DELAY EQUS "db $0a"
+TX_SFX_ITEM_1 EQUS "db $0b"
+TX_SFX_LEVEL_UP EQUS "db $0b"
+;TX_ELLIPSES EQUS "db $0c"
+TX_WAIT EQUS "db $0d"
+;TX_SFX_DEX_RATING EQUS "db $0e"
+TX_SFX_ITEM_2 EQUS "db $10"
+TX_SFX_KEY_ITEM EQUS "db $11"
+TX_SFX_CAUGHT_MON EQUS "db $12"
+TX_SFX_DEX_PAGE_ADDED EQUS "db $13"
+TX_CRY_NIDORINA EQUS "db $14"
+TX_CRY_PIDGEOT EQUS "db $15"
+;TX_CRY_DEWGONG EQUS "db $16"
+
+TX_FAR: MACRO
+ db $17
+ dw \1
+ db BANK(\1)
+ENDM
+
+TX_VENDING_MACHINE EQUS "db $f5"
+TX_CABLE_CLUB_RECEPTIONIST EQUS "db $f6"
+TX_PRIZE_VENDOR EQUS "db $f7"
+TX_POKECENTER_PC EQUS "db $f9"
+TX_PLAYERS_PC EQUS "db $fc"
+TX_BILLS_PC EQUS "db $fd"
+
+TX_MART: MACRO
+ db $FE, _NARG
+ REPT _NARG
+ db \1
+ SHIFT
+ ENDR
+ db $FF
+ENDM
+
+TX_POKECENTER_NURSE EQUS "db $ff"