r/o
1
#ifndef SFONT_H
2
#define SFONT_H
3
4
#include <SDL2/SDL.h>
5
#include <SDL2/SDL_render.h>
6
7
/* FONT_WIDTH is relatively more involved to change as `rawchar' is defined in
8
* terms of `unsigned char'. */
9
#define FONT_WIDTH 8
10
#define FONT_HEIGHT 16
11
12
typedef struct {
13
SDL_Texture *charset[256];
14
} sdlfont_t;
15
16
extern int cga_colors[16];
17
18
sdlfont_t *read_raw_sdlfont(const char *filename);
19
void render_sfont(sdlfont_t *sfont, unsigned short pair, int x, int y);
20
void free_sdlfont(sdlfont_t *sfont);
21
22
#endif
23
24
/* vim: set sw=4 et: */
25