GBDK 2020 Docs
API Documentation for GBDK 2020
console.h File Reference
#include <types.h>

Go to the source code of this file.

Functions

void gotoxy (UINT8 x, UINT8 y)
 
UINT8 posx (void)
 
UINT8 posy (void)
 
void setchar (char c)
 
void cls ()
 

Detailed Description

Console functions that work like Turbo C's.

The font is 8x8, making the screen 20x18 characters.

Function Documentation

◆ gotoxy()

void gotoxy ( UINT8  x,
UINT8  y 
)

Move the cursor to an absolute position at x, y.

x and y have units of tiles (8 pixels per unit)

See also
setchar()

◆ posx()

UINT8 posx ( void  )

Returns the current X position of the cursor.

See also
gotoxy()

◆ posy()

UINT8 posy ( void  )

Returns the current Y position of the cursor.

See also
gotoxy()

◆ setchar()

void setchar ( char  c)

Writes out a single character at the current cursor position.

Does not update the cursor or interpret the character.

See also
gotoxy()

◆ cls()

void cls ( )

Clears the screen