text_macros.asm 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ; text macros
  2. text EQUS "db $00," ; Start writing text.
  3. next EQUS "db $4e," ; Move a line down.
  4. line EQUS "db $4f," ; Start writing at the bottom line.
  5. para EQUS "db $51," ; Start a new paragraph.
  6. cont EQUS "db $55," ; Scroll to the next line.
  7. done EQUS "db $57" ; End a text box.
  8. prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event).
  9. page EQUS "db $49," ; Start a new Pokedex page.
  10. dex EQUS "db $5f, $50" ; End a Pokedex entry.
  11. TX_RAM: MACRO
  12. ; prints text to screen
  13. ; \1: RAM address to read from
  14. db $1
  15. dw \1
  16. ENDM
  17. TX_BCD: MACRO
  18. ; \1: RAM address to read from
  19. ; \2: number of bytes + print flags
  20. db $2
  21. dw \1
  22. db \2
  23. ENDM
  24. TX_LINE EQUS "db $05"
  25. TX_BLINK EQUS "db $06"
  26. ;TX_SCROLL EQUS "db $07"
  27. TX_ASM EQUS "db $08"
  28. TX_NUM: MACRO
  29. ; print a big-endian decimal number.
  30. ; \1: address to read from
  31. ; \2: number of bytes to read
  32. ; \3: number of digits to display
  33. db $09
  34. dw \1
  35. db \2 << 4 | \3
  36. ENDM
  37. TX_DELAY EQUS "db $0a"
  38. TX_SFX_ITEM_1 EQUS "db $0b"
  39. TX_SFX_LEVEL_UP EQUS "db $0b"
  40. ;TX_ELLIPSES EQUS "db $0c"
  41. TX_WAIT EQUS "db $0d"
  42. ;TX_SFX_DEX_RATING EQUS "db $0e"
  43. TX_SFX_ITEM_2 EQUS "db $10"
  44. TX_SFX_KEY_ITEM EQUS "db $11"
  45. TX_SFX_CAUGHT_MON EQUS "db $12"
  46. TX_SFX_DEX_PAGE_ADDED EQUS "db $13"
  47. TX_CRY_NIDORINA EQUS "db $14"
  48. TX_CRY_PIDGEOT EQUS "db $15"
  49. ;TX_CRY_DEWGONG EQUS "db $16"
  50. TX_FAR: MACRO
  51. db $17
  52. dw \1
  53. db BANK(\1)
  54. ENDM
  55. TX_VENDING_MACHINE EQUS "db $f5"
  56. TX_CABLE_CLUB_RECEPTIONIST EQUS "db $f6"
  57. TX_PRIZE_VENDOR EQUS "db $f7"
  58. TX_POKECENTER_PC EQUS "db $f9"
  59. TX_PLAYERS_PC EQUS "db $fc"
  60. TX_BILLS_PC EQUS "db $fd"
  61. TX_MART: MACRO
  62. db $FE, _NARG
  63. REPT _NARG
  64. db \1
  65. SHIFT
  66. ENDR
  67. db $FF
  68. ENDM
  69. TX_POKECENTER_NURSE EQUS "db $ff"