libc8
CHIP-8 utility library
|
#include "font.h"
#include "chip8.h"
#include "private/exception.h"
#include <stdint.h>
#include <string.h>
Macros | |
#define | SMALLFONT_OCTO 0 |
#define | SMALLFONT_VIP 1 |
#define | SMALLFONT_DREAM6800 2 |
#define | SMALLFONT_ETI660 3 |
#define | SMALLFONT_FISH 4 |
#define | BIGFONT_OCTO 0 |
#define | BIGFONT_SCHIP 1 |
#define | BIGFONT_FISH 2 |
#define | OCTO_S "octo" |
#define | VIP_S "vip" |
#define | DREAM6800_S "dream6800" |
#define | ETI660_S "eti660" |
#define | FISH_S "fish" |
#define | SCHIP_S "schip" |
Functions | |
void | c8_set_fonts (c8_t *c8, int small, int big) |
Loads small and/or big fonts in c8 More... | |
int | c8_set_fonts_s (c8_t *c8, char *s) |
Set fonts from string. More... | |
int | c8_set_small_font (c8_t *c8, const char *s) |
Set small font from s (fontNames name) More... | |
int | c8_set_big_font (c8_t *c8, const char *s) |
Set big font from s (fontNames name) More... | |
void | print_fonts (c8_t *c8) |
Print fonts (for debug) More... | |
Variables | |
const char * | c8_fontNames [2][5] |
const uint8_t | smallFonts [5][80] |
const uint8_t | bigFonts [3][160] |
Stuff related to loading fonts.
#define BIGFONT_FISH 2 |
#define BIGFONT_OCTO 0 |
#define BIGFONT_SCHIP 1 |
#define DREAM6800_S "dream6800" |
#define ETI660_S "eti660" |
#define FISH_S "fish" |
#define OCTO_S "octo" |
#define SCHIP_S "schip" |
#define SMALLFONT_DREAM6800 2 |
#define SMALLFONT_ETI660 3 |
#define SMALLFONT_FISH 4 |
#define SMALLFONT_OCTO 0 |
#define SMALLFONT_VIP 1 |
#define VIP_S "vip" |
int c8_set_big_font | ( | c8_t * | c8, |
const char * | s | ||
) |
Set big font from s
(fontNames
name)
c8 | c8_t to set font from |
s | string to get font from |
void c8_set_fonts | ( | c8_t * | c8, |
int | small, | ||
int | big | ||
) |
Loads small and/or big fonts in c8
c8 | c8_t to set fonts |
small | small font identifier (-1 to not set) |
big | big font identifier (-1 to not set) |
int c8_set_fonts_s | ( | c8_t * | c8, |
char * | s | ||
) |
Set fonts from string.
c8 | c8_t to set fonts |
s | string to get fonts from (comma-separated fontNames names) |
int c8_set_small_font | ( | c8_t * | c8, |
const char * | s | ||
) |
Set small font from s
(fontNames
name)
c8 | c8_t to set font from |
s | string to get font from |
const uint8_t bigFonts[3][160] |
Big fonts.
From Octo (https://github.com/JohnEarnest/Octo).
const char* c8_fontNames[2][5] |
const uint8_t smallFonts[5][80] |
Small fonts.
From Octo (https://github.com/JohnEarnest/Octo).