3 #include "src\lib\modex16.h"
\r
4 #include "src\lib\planar.h"
\r
5 #include "src\lib\bitmap.h"
\r
7 word far* clock= (word far*) 0x046C; /* 18.2hz clock */
\r
19 /* get the size we want */
\r
20 /*printf("Width: ");
\r
21 scanf("%d", &bmp.width);
\r
23 scanf("%d", &bmp.height);
\r
25 scanf("%x", &color);*/
\r
27 /* allocate the bmp and fill it with 42 */
\r
28 /*size = bmp.width * bmp.height;
\r
29 bmp.data = malloc(size);
\r
30 for(i=0; i<size; i++) {
\r
31 bmp.data[i] = color;
\r
34 bmp = bitmapLoadPcx("data/koishi^^.pcx");
36 /* create the planar buffer */
\r
37 p = planar_buf_from_bitmap(&bmp);
\r
39 /* print out the contents of each plane */
\r
40 for(plane=0; plane < 4; plane++) {
\r
42 printf("Plane %d\n", plane);
\r
43 for(y=0; y < p->height; y++) {
\r
44 for(x=0; x < p->pwidth; x++) {
\r
45 printf("%02X ", (int) p->plane[plane][i++]);
\r
56 // file = fopen("ptmp0.pcx", "wb");
58 /* write the data to the file */
\r
59 //fwrite(p, 1, p->width*p->height, file);
\r