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

Go to the source code of this file.

Functions

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

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_t  x,
uint8_t  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_t posx ( void  )

Returns the current X position of the cursor.

See also
gotoxy()

◆ posy()

uint8_t 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 ( void  )

Clears the screen