Debug console

Macros

#define oslPrintf(format...)   ({ char __str[1000]; sprintf(__str , ##format); oslConsolePrint(__str); })
 
#define oslPrintf_xy(x, y, str, format...)
 
#define oslCls()   (oslClearScreen(0), oslMoveTo(0,0))
 
#define oslMoveTo(x, y)   (osl_consolePosX=x*osl_sceFont->charWidths['0'], osl_consolePosY=y*osl_sceFont->charHeight)
 

Detailed Description

Debugging features.

Macro Definition Documentation

#define oslPrintf (   format...)    ({ char __str[1000]; sprintf(__str , ##format); oslConsolePrint(__str); })

Prints formatted text to the current position of the cursor. The format system is the same as printf (you can find the description in every good C tutorial or documentation).

#define oslPrintf_xy (   x,
  y,
  str,
  format... 
)
Value:
oslPrintf(str,##format); })
int osl_consolePosY
int osl_consolePosX
#define oslPrintf(format...)
Definition: oslib.h:450

Prints formatted text at a specific position on the screen.

//Display the value of a variable on the top-left screen corner
oslPrintf_xy(0, 0, "Frame: %i", frameNumber);
#define oslCls ( )    (oslClearScreen(0), oslMoveTo(0,0))

Clears the screen (to black) and resets the cursor to the top-left corner of the screen.

oslPrintf("Welcome...\n");
#define oslMoveTo (   x,
 
)    (osl_consolePosX=x*osl_sceFont->charWidths['0'], osl_consolePosY=y*osl_sceFont->charHeight)

Moves the cursor to a place on the screen. The x, y coordinates are indicated in terms of characters (by default 8x8 pixels, but depends on the current font).