diff --git a/utils/chili2chr.c b/utils/chili2chr.c index 2b3c7f3..be4f776 100644 --- a/utils/chili2chr.c +++ b/utils/chili2chr.c @@ -32,13 +32,19 @@ int main(int argc, char** argv) { // depth = 2; // 4->2 - pixperbyte = 1; - mask_shift = 0; - mask = 0xff; - depth = 8; + pixperbyte = 2; + mask_shift = 4; + mask = 0x0f; + depth = 4; +// 4->4? + +// pixperbyte = 1; +// mask_shift = 0; +// mask = 0xff; +// depth = 8; // 8->8 - dsize = fsize / pixperbyte; + dsize = fsize * depth / (8/pixperbyte); uint16_t *obuf; if((obuf=malloc(dsize))==NULL) { diff --git a/utils/gentilemap.c b/utils/gentilemap.c index 8151ddf..391c482 100644 --- a/utils/gentilemap.c +++ b/utils/gentilemap.c @@ -2,20 +2,20 @@ #include int main(void) { -uint16_t tile=64; -uint16_t pad=0xa+64; +uint16_t tile=256; +uint16_t pad=0xa+256; int i,j; FILE *out; if((out=fopen("tilemap", "wb"))==NULL) { perror("Could not open output file 'tilemap'"); return 1; } - for(i=0; i<12; i++) { - for(j=0; j<25; j++) { + for(i=0; i<10; i++) { + for(j=0; j<21; j++) { fwrite(&tile, 2, 1, out); tile++; } - for(j=25; j<32; j++) { + for(j=21; j<32; j++) { fwrite(&pad, 2, 1, out); } } diff --git a/utils/palremap.c b/utils/palremap.c index fad7297..a4825c6 100644 --- a/utils/palremap.c +++ b/utils/palremap.c @@ -18,8 +18,8 @@ int main(int argc, char **argv) { while(1) { uint8_t c=fgetc(in); if(feof(in))break; - if(c>=1 && c<=43) { - c+=212; + if(c>=1 && c<=48) { + c+=207; } fputc(c, out); }