2 #include "src\lib\modex16.h"
\r
3 #include "src\lib\planar.h"
\r
4 #include "src\lib\bitmap.h"
\r
6 word far* clock= (word far*) 0x046C; /* 18.2hz clock */
\r
17 /* get the size we want */
\r
19 scanf("%d", &bmp.width);
\r
21 scanf("%d", &bmp.height);
\r
23 scanf("%x", &color);
\r
25 /* allocate the bmp and fill it with 42 */
\r
26 size = bmp.width * bmp.height;
\r
27 bmp.data = malloc(size);
\r
28 for(i=0; i<size; i++) {
\r
29 bmp.data[i] = color;
\r
32 /* create the planar buffer */
\r
33 p = planar_buf_from_bitmap(&bmp);
\r
35 /* print out the contents of each plane */
\r
36 for(plane=0; plane < 4; plane++) {
\r
38 printf("Plane %d\n", plane);
\r
39 for(y=0; y < p->height; y++) {
\r
40 for(x=0; x < p->pwidth; x++) {
\r
41 printf("%02X ", (int) p->plane[plane][i++]);
\r