From: sparky4 Date: Tue, 3 Nov 2015 21:44:20 +0000 (-0600) Subject: boink X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=acd620ca492b03e6118fd56752456187bd59f5fc;p=16.git boink --- diff --git a/16.exe b/16.exe index da6ea057..c7555b15 100755 Binary files a/16.exe and b/16.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index 0b61405b..c27525e7 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index 5d63517b..179b874f 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index 053f420d..010d3d48 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/planrpcx.c b/src/planrpcx.c index eb533f92..6fe5ad7f 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -29,8 +29,8 @@ global_game_variables_t gvar; bitmap_t bmp, ptmpbt; -planar_buf_t *p, *ptmp; -planar_buf_t pnp; +//planar_buf_t *p, *ptmp; +planar_buf_t pnp, ptmpnp; void main(int argc, char *argv[]) { @@ -57,10 +57,11 @@ void main(int argc, char *argv[]) baka = 1; bmp = bitmapLoadPcx(bakapeee); - p = planar_buf_from_bitmap(&bmp); + //p = planar_buf_from_bitmap(&bmp); pnp = planar_buf_from_bitmap0(&bmp); ptmpbt = bitmapLoadPcx("data/ptmp.pcx"); - ptmp = planar_buf_from_bitmap(&ptmpbt); + //ptmp = planar_buf_from_bitmap(&ptmpbt); + ptmpnp = planar_buf_from_bitmap0(&ptmpbt); VGAmodeX(baka, &gvar); gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); @@ -79,8 +80,8 @@ baka = 1; start = *clockw; // oldDrawBmp(VGA, 20, 20, &bmp, 0); for(i=0; i<100 ;i++) { - modexDrawBmpPBufRegion (&gvar.video.page[0], 32, 32, 0, 0, pnp.width, pnp.height, &pnp); -// modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, p); +// modexDrawBmpPBufRegion (&gvar.video.page[0], 32, 32, 0, 0, pnp.width, pnp.height, &pnp); + modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, &pnp); } t1 = (*clockw-start) /18.2; // start = *clockw; @@ -88,28 +89,24 @@ baka = 1; // t2 = (*clockw-start)/18.2; start = *clockw; for(i=0; i<100 ;i++) { - modexDrawPBuf(&gvar.video.page[0], 0, 0, p, 0); + modexDrawPBuf(&gvar.video.page[0], 0, 0, &pnp, 0); } t2 = (*clockw-start) /18.2; - /*getch(); + getch(); modexPalUpdate1(ptmpbt.palette); - modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, ptmp);*/ + modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, &ptmpnp); while(!kbhit()) { } VGAmodeX(0, &gvar); - /*printf("\nmain=%Fp\n\n", &i); - printf("bmp.data=%Fp\n", bmp.data); - printf("*bmp.data=%Fp\n", *(bmp.data)); - printf("&bmp.data=%Fp\n", &(bmp.data));*/ /* print out the contents of each plane */ for(plane=0; plane < 4; plane++) { i=0; printf("Plane %d\n", plane); - for(py=0; py < ptmp->height; py++) { - for(px=0; px < ptmp->pwidth; px++) { - printf("%02X ", (int) ptmp->plane[plane][i++]); + for(py=0; py < ptmpnp.height; py++) { + for(px=0; px < ptmpnp.pwidth; px++) { + printf("%02X ", (int) ptmpnp.plane[plane][i++]); } printf("\n"); } @@ -137,13 +134,13 @@ baka = 1; chw += xp; fprintf(stderr,"Project 16 planrpcx.exe. This is just a test file!\n"); fprintf(stderr,"version %s\n", VERSION); - fprintf(stderr,"%d\n", sizeof(p->plane)); - fprintf(stderr,"pw=%d\n", p->width); - fprintf(stderr,"ph=%d\n", p->height); - fprintf(stderr,"ppw=%d\n", p->pwidth); + fprintf(stderr,"%d\n", sizeof(pnp.plane)); + fprintf(stderr,"pw=%d\n", pnp.width); + fprintf(stderr,"ph=%d\n", pnp.height); + fprintf(stderr,"ppw=%d\n", pnp.pwidth); fprintf(stderr,"%d\n", sizeof(bmp)); - fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(p->width), gvar.video.page[0].sh-(p->height)); - planar_buf_free(p); + fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(pnp.width), gvar.video.page[0].sh-(pnp.height)); + //planar_buf_free(p); free(bakapeee); fprintf(stderr, "modexDrawBmpPBuf: %f\n", t1); fprintf(stderr, "modexDrawPBuf: %f\n", t2); diff --git a/test.exe b/test.exe index f92927c4..20197317 100755 Binary files a/test.exe and b/test.exe differ