mirror of
https://github.com/deater/tb1.git
synced 2025-01-05 12:29:31 +00:00
dbaf404ec3
I kept typing it wrong anyway, and hey, git makes rename easy
25 lines
518 B
C
25 lines
518 B
C
/* converts a VGA type font (well the top half of one) */
|
|
/* into a 2bpp SNES tilemap. */
|
|
/* mainly for use converting my TB1 font */
|
|
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
int i,j;
|
|
unsigned char temp;
|
|
|
|
for(i=0;i<128;i++) {
|
|
for(j=0;j<16;j++) {
|
|
if (fread(&temp,1,1,stdin)<1) return -1;
|
|
if (j<8) {
|
|
fwrite(&temp,1,1,stdout); /* plane 1 */
|
|
fwrite(&temp,1,1,stdout); /* plane 2 */
|
|
}
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|