\r
global_game_variables_t gvar;\r
bitmap_t bmp, ptmpbt;\r
-planar_buf_t *p, *ptmp;\r
-planar_buf_t pnp;\r
+//planar_buf_t *p, *ptmp;\r
+planar_buf_t pnp, ptmpnp;\r
\r
void main(int argc, char *argv[])\r
{\r
baka = 1;\r
\r
bmp = bitmapLoadPcx(bakapeee);\r
- p = planar_buf_from_bitmap(&bmp);\r
+ //p = planar_buf_from_bitmap(&bmp);\r
pnp = planar_buf_from_bitmap0(&bmp);\r
ptmpbt = bitmapLoadPcx("data/ptmp.pcx");\r
- ptmp = planar_buf_from_bitmap(&ptmpbt);\r
+ //ptmp = planar_buf_from_bitmap(&ptmpbt);\r
+ ptmpnp = planar_buf_from_bitmap0(&ptmpbt);\r
VGAmodeX(baka, &gvar);\r
gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
\r
start = *clockw;\r
// oldDrawBmp(VGA, 20, 20, &bmp, 0);\r
for(i=0; i<100 ;i++) {\r
- modexDrawBmpPBufRegion (&gvar.video.page[0], 32, 32, 0, 0, pnp.width, pnp.height, &pnp);\r
-// modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, p);\r
+// modexDrawBmpPBufRegion (&gvar.video.page[0], 32, 32, 0, 0, pnp.width, pnp.height, &pnp);\r
+ modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, &pnp);\r
}\r
t1 = (*clockw-start) /18.2;\r
// start = *clockw;\r
// t2 = (*clockw-start)/18.2;\r
start = *clockw;\r
for(i=0; i<100 ;i++) {\r
- modexDrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
+ modexDrawPBuf(&gvar.video.page[0], 0, 0, &pnp, 0);\r
}\r
t2 = (*clockw-start) /18.2;\r
- /*getch();\r
+ getch();\r
modexPalUpdate1(ptmpbt.palette);\r
- modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, ptmp);*/\r
+ modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, &ptmpnp);\r
while(!kbhit())\r
{\r
}\r
VGAmodeX(0, &gvar);\r
- /*printf("\nmain=%Fp\n\n", &i);\r
- printf("bmp.data=%Fp\n", bmp.data);\r
- printf("*bmp.data=%Fp\n", *(bmp.data));\r
- printf("&bmp.data=%Fp\n", &(bmp.data));*/\r
\r
/* print out the contents of each plane */\r
for(plane=0; plane < 4; plane++) {\r
i=0;\r
printf("Plane %d\n", plane);\r
- for(py=0; py < ptmp->height; py++) {\r
- for(px=0; px < ptmp->pwidth; px++) {\r
- printf("%02X ", (int) ptmp->plane[plane][i++]);\r
+ for(py=0; py < ptmpnp.height; py++) {\r
+ for(px=0; px < ptmpnp.pwidth; px++) {\r
+ printf("%02X ", (int) ptmpnp.plane[plane][i++]);\r
}\r
printf("\n");\r
}\r
chw += xp;\r
fprintf(stderr,"Project 16 planrpcx.exe. This is just a test file!\n");\r
fprintf(stderr,"version %s\n", VERSION);\r
- fprintf(stderr,"%d\n", sizeof(p->plane));\r
- fprintf(stderr,"pw=%d\n", p->width);\r
- fprintf(stderr,"ph=%d\n", p->height);\r
- fprintf(stderr,"ppw=%d\n", p->pwidth);\r
+ fprintf(stderr,"%d\n", sizeof(pnp.plane));\r
+ fprintf(stderr,"pw=%d\n", pnp.width);\r
+ fprintf(stderr,"ph=%d\n", pnp.height);\r
+ fprintf(stderr,"ppw=%d\n", pnp.pwidth);\r
fprintf(stderr,"%d\n", sizeof(bmp));\r
- fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(p->width), gvar.video.page[0].sh-(p->height));\r
- planar_buf_free(p);\r
+ fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(pnp.width), gvar.video.page[0].sh-(pnp.height));\r
+ //planar_buf_free(p);\r
free(bakapeee);\r
fprintf(stderr, "modexDrawBmpPBuf: %f\n", t1);\r
fprintf(stderr, "modexDrawPBuf: %f\n", t2);\r