]> 4ch.mooo.com Git - 16.git/commitdiff
boink
authorsparky4 <sparky4@cock.li>
Tue, 3 Nov 2015 21:44:20 +0000 (15:44 -0600)
committersparky4 <sparky4@cock.li>
Tue, 3 Nov 2015 21:44:20 +0000 (15:44 -0600)
16.exe
exmmtest.exe
planrpcx.exe
scroll.exe
src/planrpcx.c
test.exe

diff --git a/16.exe b/16.exe
index da6ea057b05d3b2f9365fe33c7840e8dd01e168d..c7555b15f968cc2c4f06cf2e9c9696c692f01c77 100755 (executable)
Binary files a/16.exe and b/16.exe differ
index 0b61405b6d99e15e80313b940ab54187e4f63d22..c27525e7e413a8a384980e4d319e9ead5f8fb74d 100755 (executable)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 5d63517bf9b70628e1d87f2a32d6a41640c5fb9e..179b874f8dc52aafc97c32c6f8b05ee453afe4d0 100755 (executable)
Binary files a/planrpcx.exe and b/planrpcx.exe differ
index 053f420dd138da3fff5a84c63ffe8609c843c905..010d3d4852f801f78f00277079c6f41051ef6e52 100755 (executable)
Binary files a/scroll.exe and b/scroll.exe differ
index eb533f925b724db0556f4d4c7b0410c696824c12..6fe5ad7f57ac0fdc71f0b09987c33e8f1c912758 100755 (executable)
@@ -29,8 +29,8 @@
 \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
@@ -57,10 +57,11 @@ void main(int argc, char *argv[])
 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
@@ -79,8 +80,8 @@ baka = 1;
        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
@@ -88,28 +89,24 @@ baka = 1;
 //     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
@@ -137,13 +134,13 @@ baka = 1;
        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
index f92927c485ccc241864eb2242aa2938872c4ce5e..20197317243e29c4ad100ddf69f6f7d6209953b2 100755 (executable)
Binary files a/test.exe and b/test.exe differ