BEGIN { for (t=1; t 0) { pattern[height++] = line; if (length(line)>width) width=length(line); } printf ("Processing %s -> %s (%d x %d x %d)\n", fin, fout, width, height, depth); for (y=0; y fout; NAME=toupper(name); printf ("#define %s_WIDTH %d\n", NAME, width) >> fout; printf ("#define %s_HEIGHT %d\n\n", NAME, height) >> fout; printf ("UWORD %sData[] =\n", name) >> fout; printf ("{\n") >> fout; xmax=int((width+15)/16); pick=0; bit=1; for (d=0; d> fout; for (x=0; x> fout; } printf ("\n") >> fout; } if (d+1!=depth) printf ("\n") >> fout; } printf ("};\n\n") >> fout; printf ("struct Image %sImage =\n{\n", name) >> fout; printf (" 0, 0, /* Left, Top */\n") >> fout; printf (" %s_WIDTH, %s_HEIGHT, /* Width, Height */\n", NAME, NAME) >> fout; printf (" %d, /* Depth */\n", depth) >> fout; printf (" %sData, /* ImageData */\n", name) >> fout; printf (" 0x%02X, /* PlanePick */\n", pick) >> fout; printf (" 0x00, /* PlaneOnOff */\n") >> fout; printf (" NULL /* NextImage */\n") >> fout; printf ("};\n") >> fout; close (fin); close (fout); } }