OldSchool Library
Debug console

Debugging features. More...

Macros

#define oslPrintf(format...)
 Prints formatted text to the current position of the cursor.
 
#define oslPrintf_xy(x, y, str, format...)
 Prints formatted text at a specific position on the screen.
 
#define oslCls()
 Clears the screen (to black) and resets the cursor to the top-left corner of the screen.
 
#define oslMoveTo(x, y)
 Moves the cursor to a place on the screen.
 

Detailed Description

Debugging features.

This section includes functions and macros for debugging, such as printing formatted text to the screen and controlling the debug console.

Macro Definition Documentation

◆ oslPrintf

#define oslPrintf ( format...)
Value:
({ char __str[1000]; sprintf(__str, ##format); oslConsolePrint(__str); })
void oslConsolePrint(const char *str)
Outputs a text to the console at the current cursor position.

Prints formatted text to the current position of the cursor.

This macro uses a format string similar to printf.

Parameters
formatFormatted text.

◆ oslPrintf_xy

#define oslPrintf_xy ( x,
y,
str,
format... )
Value:
({ osl_consolePosX = x; osl_consolePosY = y; oslPrintf(str, ##format); })
#define oslPrintf(format...)
Prints formatted text to the current position of the cursor.
Definition oslib.h:652
int osl_consolePosY
int osl_consolePosX

Prints formatted text at a specific position on the screen.

This macro prints formatted text at the specified screen coordinates.

Parameters
xX-coordinate (in characters).
yY-coordinate (in characters).
strFormatted string.
formatAdditional formatted text.

◆ oslCls

#define oslCls ( )
Value:
void oslClearScreen(int backColor)
#define oslMoveTo(x, y)
Moves the cursor to a place on the screen.
Definition oslib.h:682

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.

◆ oslMoveTo

#define oslMoveTo ( x,
y )
Value:
OSL_FONT * osl_sceFont
System OSLib font.
int charHeight
Height of characters (constant).
Definition text.h:36
unsigned char * charWidths
Table containing the width of each character (256 entries).
Definition text.h:32

Moves the cursor to a place on the screen.

This macro moves the cursor to the specified screen coordinates, using character units.

Parameters
xX-coordinate (in characters).
yY-coordinate (in characters).