Rename charDesc_s to Glyph

This commit is contained in:
Lioncash 2014-11-24 18:57:59 -05:00
parent fcc7d6be10
commit a74da7ecac
3 changed files with 277 additions and 262 deletions

View File

@ -1,19 +1,34 @@
#pragma once
struct charDesc_s {
struct Glyph {
// Glyph representation
char c;
int x, y, w, h, xo, yo, xa;
// 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.
u8* data;
};
struct font_s {
u8* data;
charDesc_s* desc;
Glyph* desc;
u8 height;
u8 color[3];
};
extern u8 font1Data[];
extern charDesc_s font1Desc[];
extern Glyph font1Desc[];
extern font_s fontDefault;

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@
//this code is not meant to be readable
int drawCharacter(u8* fb, font_s* font, char c, s16 x, s16 y, u16 w, u16 h)
{
charDesc_s* cd = &font->desc[(int)c];
Glyph* cd = &font->desc[(int)c];
if (!cd->data)
return 0;