git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/include/gbdk/console.h

      1 /** @file gbdk/console.h
      2     Console functions that work like Turbo C's.
      3 
      4     The font is 8x8, making the screen 20x18 characters.
      5 */
      6 #ifndef _CONSOLE_H
      7 #define _CONSOLE_H
      8 
      9 #include <types.h>
     10 #include <stdint.h>
     11 
     12 /** Move the cursor to an absolute position at __x, y__.
     13 
     14     __x__ and __y__ have units of tiles (8 pixels per unit)
     15     @see setchar()
     16  */
     17 void gotoxy(uint8_t x, uint8_t y) OLDCALL;
     18 
     19 /** Returns the current X position of the cursor.
     20 
     21     @see gotoxy()
     22  */
     23 uint8_t posx(void) OLDCALL;
     24 
     25 /** Returns the current Y position of the cursor.
     26 
     27     @see gotoxy()
     28  */
     29 uint8_t posy(void) OLDCALL;
     30 
     31 /** Writes out a single character at the current cursor
     32     position.
     33 
     34     Does not update the cursor or interpret the character.
     35 
     36     @see gotoxy()
     37 */
     38 void setchar(char c) OLDCALL;
     39 
     40 /** Clears the screen
     41 */
     42 void cls(void);
     43 
     44 
     45 #endif /* _CONSOLE_H */

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.