OldSchool Library
|
Debugging features. More...
Macros | |
#define | oslPrintf(format ...) ({ char __str[1000]; sprintf(__str, ## format); oslConsolePrint(__str); }) |
Prints formatted text to the current position of the cursor. | |
#define | oslPrintf_xy(x, y, str, format ...) ({ osl_consolePosX = x; osl_consolePosY = y; oslPrintf(str, ## format); }) |
Prints formatted text at a specific position on the screen. | |
#define | oslCls() (oslClearScreen(0), oslMoveTo(0, 0)) |
Clears the screen (to black) and resets the cursor to the top-left corner of the screen. | |
#define | oslMoveTo(x, y) (osl_consolePosX = x * osl_sceFont->charWidths['0'], osl_consolePosY = y * osl_sceFont->charHeight) |
Moves the cursor to a place on the screen. | |
Debugging features.
This section includes functions and macros for debugging, such as printing formatted text to the screen and controlling the debug console.
#define oslPrintf | ( | format ... | ) | ({ char __str[1000]; sprintf(__str, ## format); oslConsolePrint(__str); }) |
Prints formatted text to the current position of the cursor.
This macro uses a format string similar to printf.
format | Formatted text. |
#define oslPrintf_xy | ( | x, | |
y, | |||
str, | |||
format ... | |||
) | ({ osl_consolePosX = x; osl_consolePosY = y; oslPrintf(str, ## format); }) |
Prints formatted text at a specific position on the screen.
This macro prints formatted text at the specified screen coordinates.
x | X-coordinate (in characters). |
y | Y-coordinate (in characters). |
str | Formatted string. |
format | Additional formatted text. |
#define oslCls | ( | ) | (oslClearScreen(0), oslMoveTo(0, 0)) |
Clears the screen (to black) and resets the cursor to the top-left corner of the screen.
This macro clears the screen and moves the cursor to the origin.
#define oslMoveTo | ( | x, | |
y | |||
) | (osl_consolePosX = x * osl_sceFont->charWidths['0'], osl_consolePosY = y * osl_sceFont->charHeight) |
Moves the cursor to a place on the screen.
This macro moves the cursor to the specified screen coordinates, using character units.
x | X-coordinate (in characters). |
y | Y-coordinate (in characters). |