pokecrystal

Text Commands

Defined in macros/scripts/text.asm and home/text.asm:TextCommands.

$00: text_start

Start writing text until "@". The text can use control characters.

$01: text_ram address

Write text from a RAM address.

$02: text_bcd address, flags

Write BCD from an address, typically RAM.

$03: text_move address

Move to a new tile.

$04: text_box address, height, width

Draw a box.

$05: text_low

Write text at (1, 16).

$06: text_promptbutton

Wait for button press; show arrow.

$07: text_scroll

Pushes text up two lines and sets the bc cursor to the border tile below the first character column of the text box.

$08: text_asm

Start interpreting assembly code.

$09: text_decimal address, bytes, digits

Read bytes bytes from address and print them as a digits-digit number.

$0A: text_pause

Pause for 30 frames unless A or B is pressed.

$0B: sound_dex_fanfare_50_79

Play SFX_DEX_FANFARE_50_79.

$0C: text_dots n

Print n "…"s, pausing for 10 frames after each; interrupt if A or B is pressed.

$0D: text_waitbutton

Wait for button press; don't show arrow.

$0E: sound_dex_fanfare_20_49

Play SFX_DEX_FANFARE_20_49.

$0F: sound_item

Play SFX_ITEM.

$10: sound_caught_mon

Play SFX_CAUGHT_MON.

$11: sound_dex_fanfare_80_109

Play SFX_DEX_FANFARE_80_109.

$12: sound_fanfare

Play SFX_FANFARE.

$13: sound_slot_machine_start

Play SFX_SLOT_MACHINE_START.

$14: text_buffer id

Write text from one of the following addresses (listed in data/text_buffers.asm):

  1. wStringBuffer3
  2. wStringBuffer4
  3. wStringBuffer5
  4. wStringBuffer2
  5. wStringBuffer1
  6. wEnemyMonNickname
  7. wBattleMonNickname

$15: text_today

Print the weekday.

$16: text_far address

Write text from a different bank.

$50: text_end

Stops processing text commands.

Control characters

These get interpreted in the context of printing regular text. Macros exist to conveniently place the control characters.

$00: text text

Start writing text until "@". (Not actually a control character, but shorter than text_start followed by db.)

$4E, "<NEXT>": next text

Move a line down.

$4F, "<LINE>": line text

Start writing at the bottom line.

$50, "@": page text

Start a new Pokédex page.

$51, "<PARA>": para text

Start a new paragraph.

$55, "<CONT>": cont text

Scroll to the next line.

$57, "<DONE>": done

End a text box.

$58, "<PROMPT>": prompt

Prompt the player to end a text box (initiating some other event).