2014-10-31 22:20:21 -07:00
|
|
|
#pragma once
|
2014-10-26 18:47:14 -07:00
|
|
|
|
2014-11-24 18:57:59 -05:00
|
|
|
struct Glyph {
|
|
|
|
// Glyph representation
|
2014-11-22 00:58:29 -08:00
|
|
|
char c;
|
2014-11-24 18:57:59 -05:00
|
|
|
|
|
|
|
// x and y origin of the character.
|
|
|
|
int x, y;
|
|
|
|
|
|
|
|
// width and height in pixels.
|
|
|
|
int w, h;
|
|
|
|
|
|
|
|
// x and y offset
|
|
|
|
int xo, yo;
|
|
|
|
|
|
|
|
// Pixels after this character to begin
|
|
|
|
// drawing the next one.
|
|
|
|
int xa;
|
|
|
|
|
|
|
|
// Glyph data.
|
2014-11-22 00:58:29 -08:00
|
|
|
u8* data;
|
2014-11-22 00:48:18 -08:00
|
|
|
};
|
2014-10-29 23:30:33 -07:00
|
|
|
|
2014-11-22 00:48:18 -08:00
|
|
|
struct font_s {
|
2014-11-22 00:58:29 -08:00
|
|
|
u8* data;
|
2014-11-24 18:57:59 -05:00
|
|
|
Glyph* desc;
|
2014-11-22 00:58:29 -08:00
|
|
|
u8 height;
|
|
|
|
u8 color[3];
|
2014-11-22 00:48:18 -08:00
|
|
|
};
|
2014-10-26 18:47:14 -07:00
|
|
|
|
|
|
|
extern u8 font1Data[];
|
2014-11-24 18:57:59 -05:00
|
|
|
extern Glyph font1Desc[];
|
2014-10-26 18:47:14 -07:00
|
|
|
|
|
|
|
extern font_s fontDefault;
|