Difference between revisions of "PrintCXY"

From WikiPrizm
Jump to navigationJump to search
m (unsigned char -> const char)
Line 1: Line 1:
 
{{syscall
 
{{syscall
 
| name = PrintCXY
 
| name = PrintCXY
| signature = ''void'' '''PrintCXY'''(''int'' '''x''', ''int'' '''y''', ''unsigned char*'' '''cptr''', ''int'' '''mode_flags''', ''int'' '''P5''', ''int'' '''color''', ''int'' '''back_color''', ''int'' '''P8''', ''int'' '''P9''' )
+
| signature = void PrintCXY(int x, int y, const char *cptr, int mode_flags, int P5, int color, int back_color, int P8, int P9)
 
| synopsis = Similar to [[PrintXY]], displays a line of text at the given position in pixels.
 
| synopsis = Similar to [[PrintXY]], displays a line of text at the given position in pixels.
 
| header = display_syscalls.h
 
| header = display_syscalls.h
 
| index = 0x0239
 
| index = 0x0239
 
| parameters =  
 
| parameters =  
*''int'' '''x''' - The x coordinate (in pixels) of the upper left corner of the first character
+
*'''x''' - The x coordinate (in pixels) of the upper left corner of the first character
*''int'' '''y''' - The y coordinate (in pixels) of the upper left corner of the first character
+
*'''y''' - The y coordinate (in pixels) of the upper left corner of the first character
*''unsigned char*'' '''cptr''' - The string to display. Every character is displayed, the first 2 bytes long spacer is not needed!
+
*'''cptr''' - The string to display. The first two characters are not ignored, in contrast to [[PrintXY]].
*''int'' '''mode_flags''' - Bitmask. See [[PrintXY#Comments|PrintXY's note 2]]
+
*'''mode_flags''' - Bitmask. See [[PrintXY#Comments|PrintXY's note 2]]
*''int'' '''P5''' - unknown, set this to -1
+
*'''P5''' - unknown, set this to -1
*''int'' '''color''' -  The RGB565 color of the characters, use the COLOR_* constants from color.h
+
*'''color''' -  The RGB565 color of the characters, use the COLOR_* constants from color.h
*''int'' '''backcolor''' -  The RGB565 color of the background, use the COLOR_* constants from color.h
+
*'''backcolor''' -  The RGB565 color of the background, use the COLOR_* constants from color.h
*''int'' '''P8''' - unknown, set this to 1
+
*'''P8''' - unknown, set this to 1
*''int'' '''P9''' - unknown, set this to 0
+
*'''P9''' - unknown, set this to 0
 
| example =
 
| example =
 
<pre>PrintCXY(44, 56, "Hello world!!!", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_YELLOW, 1, 0 );</pre>
 
<pre>PrintCXY(44, 56, "Hello world!!!", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_YELLOW, 1, 0 );</pre>
  
 
}}
 
}}

Revision as of 13:57, 15 May 2014


Synopsis

Header: display_syscalls.h
Syscall index: 0x0239
Function signature: void PrintCXY(int x, int y, const char *cptr, int mode_flags, int P5, int color, int back_color, int P8, int P9)

Similar to PrintXY, displays a line of text at the given position in pixels.

Parameters

  • x - The x coordinate (in pixels) of the upper left corner of the first character
  • y - The y coordinate (in pixels) of the upper left corner of the first character
  • cptr - The string to display. The first two characters are not ignored, in contrast to PrintXY.
  • mode_flags - Bitmask. See PrintXY's note 2
  • P5 - unknown, set this to -1
  • color - The RGB565 color of the characters, use the COLOR_* constants from color.h
  • backcolor - The RGB565 color of the background, use the COLOR_* constants from color.h
  • P8 - unknown, set this to 1
  • P9 - unknown, set this to 0

Example

PrintCXY(44, 56, "Hello world!!!", TEXT_MODE_NORMAL, -1, COLOR_BLACK, COLOR_YELLOW, 1, 0 );