XXIIVV

ICN is a 1-bit graphics format.

The ICN file contains a series of bits equivalent to pixels in a 8x8 tile. The data for each tile is made up of 64 bits, or 8 bytes, in which each bit is a pixel. An ICN is the first half of a chr file. This is the standard format for Varvara ecosystem, to view and edit icn files, try Noodle.

ch1hex
0000000000
001111003c
0100001042
011111107e
0100000040
0100001042
001111003c
0000000000

Example

24x24 ICN Sprite
0003 6331 397b 77f8 c0f0 f7ff fff0 8003
1c7e feff 0f07 078e f860 0c07 0300 301f
071f 7cf8 f007 7fff dcc0 c000 70f8 f8b0
0f07 4143 677f 7f3e ffe3 87cf cfcf 8703
84c4 8406 0efe fcf8 	

Implementation

Uint8 tile[8] = {0x00, 0x3c, 0x42, 0x7e, 0x40, 0x42, 0x3c, 0x00};

void
draw_icn(Uint32 *dst, int x, int y, Uint8 *sprite, int fg, int bg)
{
	int v, h;
	for(v = 0; v < 8; v++)
		for(h = 0; h < 8; h++) {
			int ch1 = (sprite[v] >> (7 - h)) & 0x1;
			put_pixel(dst, x + h, y + v, ch1);
		}
}

Incoming: dexe noodle adelie moogle nmt format ufx format potato