PrintXY

From WikiPrizm
Revision as of 12:11, 23 March 2012 by KermMartian (talk | contribs) (Created page with '== Synopsis == '''Syscall:''' PrintXY(int x, int y, char* string, int display_mode, int text_color) Displays a line of homescreen-style text on the screen. === Inputs === * ''i…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Synopsis

Syscall: PrintXY(int x, int y, char* string, int display_mode, int text_color)

Displays a line of homescreen-style text on the screen.

Inputs

  • int x - The "homescreen" column of the first character of the string, 0 to 20
  • int y - The "homescreen" row, 0 to 7
  • char* string - The string to display (see note 1 below)
  • int display_mode - Bitmask (note 2 below)
  • int text_color - The color of the characters (see note 3 below)

Outputs

Text displayed to the screen

Comments

Note 1: The string must start with two junk letters such as XX that will not be displayed. For example, "XXHello, World" would display 'Hello, World', but the string "Hello, World" would only display 'llo, World'.

Note 2: Display mode 0 is normal, overwrite mode. The rectangle containing each character is cleared. Setting bit 5 (0x20) makes the background not be erased. Setting bit 0 (0x01) makes the text be written in inverse mode. If you want both, bitwise or the modes together.

Note 3: Colors:

  • 0: black
  • 1: blue
  • 2: green
  • 3: cyan
  • 4: red
  • 5: magenta
  • 6: yellow
  • 7: white