X-Git-Url: http://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/2783f61d754fe6cc827f25097f5ce9815c899a10..f80406559852f60c406f655c6138d1b7bcbee2e2:/sprites/fontdata.c diff --git a/sprites/fontdata.c b/sprites/fontdata.c index 3d9f044..365beb4 100644 --- a/sprites/fontdata.c +++ b/sprites/fontdata.c @@ -229,12 +229,13 @@ unsigned char const font5x8[] = { }; int main(void) { - FILE *fd = fopen("font.dat", "wb"); - size_t i; + size_t i, j; - for(i = 0; i < sizeof(font5x8); ++i) { - fputc(font5x8[i] >> 1, fd); + for(i = 0; i < sizeof(font5x8) / 5; ++i) { + printf(" { "); + for(j = 0; j < 4; ++j) { + printf("0x%02x, ", font5x8[i * 5 + j] >> 1); + } + printf("0x%02x },\n", font5x8[i * 5 + 4] >> 1); } - - fclose(fd); }