Difference between revisions of "PrintCXY"

From WikiPrizm
Jump to navigationJump to search
m (unsigned char -> const char)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
| signature = void PrintCXY(int x, int y, const 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 = fxcg/display.h
 
| index = 0x0239
 
| index = 0x0239
 
| parameters =  
 
| parameters =  
*'''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
*'''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
*'''cptr''' - The string to display. The first two characters are not ignored, in contrast to [[PrintXY]].
+
* '''cptr''' - The string to display. The first two characters are not ignored, in contrast to [[PrintXY]].
*'''mode_flags''' - Bitmask. See [[PrintXY#Comments|PrintXY's note 2]]
+
* '''mode_flags''' - Bitmask. See [[PrintXY#Comments|PrintXY's note 2]]
*'''P5''' - unknown, set this to -1
+
* '''P5''' - unknown, set this to -1
*'''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
*'''backcolor''' -  The RGB565 color of the background, use the COLOR_* constants from color.h
+
* '''back_color''' -  The RGB565 color of the background, use the COLOR_* constants from color.h
*'''P8''' - unknown, set this to 1
+
* '''P8''' - unknown, set this to 1
*'''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>
  
 
}}
 
}}

Latest revision as of 12:19, 29 July 2014


Synopsis

Header: fxcg/display.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
  • back_color - 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 );