]> 4ch.mooo.com Git - 16.git/commitdiff
eeeeeeeeeeeeee hmmm i do not know why it is fack! ww
authorsparky4 <sparky4@cock.li>
Thu, 29 Oct 2015 18:24:31 +0000 (13:24 -0500)
committersparky4 <sparky4@cock.li>
Thu, 29 Oct 2015 18:24:31 +0000 (13:24 -0500)
16 files changed:
16.exe
bakapi.exe
exmmtest.exe
fontgfx.exe
maptest.exe
palettec.exe
palettel.exe
pcxtest.exe
pcxtest2.exe
planrpcx.exe
scroll.exe
src/lib/modex16.c
src/lib/scroll16.c
src/planrpcx.c
test.exe
test2.exe

diff --git a/16.exe b/16.exe
index e9b826c7c90b695cf78bd6f10df826c81d559d06..0eac45e61c4a36bc7b226cb28986f13aecac2e38 100755 (executable)
Binary files a/16.exe and b/16.exe differ
index c1dc4e1d3d789b03f7e8bb76549bde5873cbdb90..4bc4733b6f409cae830d737d81ab5e0e5a55e4db 100755 (executable)
Binary files a/bakapi.exe and b/bakapi.exe differ
index 3fb55e35beca04d7cd2bc79b6dba396224fa2199..0645e31eac07673a2e1a217a0f5a44796d5af713 100755 (executable)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 78118a324702b81b5d1146c78798b57f8f169619..13953f93820f7dc6ebb18159c088750cc0145408 100755 (executable)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
index de0a26ee2a7e69ea21e0833a8068ba727d57e38a..0ebfa9faacf17a5f314de580c3083474c9eabe3b 100755 (executable)
Binary files a/maptest.exe and b/maptest.exe differ
index 21f15bbfbce8c0b903d9858e1b2a22af1d51bffc..38431222bcc0af01084f9a93ed0ff497181803f2 100755 (executable)
Binary files a/palettec.exe and b/palettec.exe differ
index f0f993b79bd4de9084535a0d8c4e52ab5903fa83..de042c2fdea470f825c2f58cc8deb7fddc2f4796 100755 (executable)
Binary files a/palettel.exe and b/palettel.exe differ
index 597fad83edd3fec7638230cfb626a972390aaafd..a5070a2f792e7aee31ef6381a24c270714aa1a77 100755 (executable)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 7f3ebbd247fd9f7c2c17207f753a8c5f98e45e5b..0e215b4cbe06e6bd1619b309c0699096058edde1 100755 (executable)
Binary files a/pcxtest2.exe and b/pcxtest2.exe differ
index af2dd6a42d3a7324eab31d0257cc460625bcf1f8..390b37837e72c288c6354e6eff8e20c7e9eb066f 100755 (executable)
Binary files a/planrpcx.exe and b/planrpcx.exe differ
index 2ff8350aca663250519f25f74b0f740808e12e7c..c93f9c1873c17edce379bed8e040ac5a18e88b0f 100755 (executable)
Binary files a/scroll.exe and b/scroll.exe differ
index 63231108b1968d7f7d3b4606ac29bdf863714ab4..19ab89c711592f593524195ef7957539fe1c3d0d 100755 (executable)
@@ -400,22 +400,33 @@ modexClearRegion(page_t *page, int x, int y, int w, int h, byte  color) {
 //modexDrawBmpRegion   (page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp)\r
 void modexDrawPBufRegion       (page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite)\r
 {\r
-       int plane;\r
-       //const int px, py;\r
+       sword plane;\r
        int i;\r
-       const int px=x-page->dx;\r
-       const int py=y-page->dy;\r
+       const int px=x;//-page->dx;\r
+       const int py=y;//-page->dy;\r
+       #define PEEE ((rw)/4)-rx\r
+       //-(rx/4)\r
+       #define PEEEE ((p->pwidth)*(ry))\r
+       //y=py;\r
+       //x=px;\r
+       //printf("%d,%d p(%d,%d) r(%d,%d) rwh(%d,%d)\n", x, y, px, py, rx, ry, rw, rh);\r
        for(plane=0; plane < 4; plane++) {\r
-               i=(rw/4)+((p->pwidth)*ry);\r
+               i=PEEE+PEEEE;\r
+               //printf("PEEE=%d ", PEEE);\r
+               //printf("PEEEE=%d ", PEEEE);\r
+               //printf("i=%d\n", i);\r
                modexSelectPlane(PLANE(plane+x));\r
                for(; y < py+rh; y++) {\r
                        //for(px=0; px < p->width; px++) {\r
                                //printf("%02X ", (int) p->plane[plane][i++]);\r
 //                           _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
 //                           printf("buff %u==%s\n", y, *buff);\r
-                               _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), rw/4);\r
+                               _fmemcpy(page->data + (((page->width/4) * y) + (x / 4)), &(p->plane[plane][i+=p->pwidth]), (rw/4));\r
                        //}\r
+                       //if(plane==3) IN_Ack();\r
                }\r
+               /*printf("y%d=%d ", plane, y);\r
+               if(plane==3) printf("y%d=%d\n", plane, y);*/\r
                x=px;\r
                y=py;\r
                }\r
@@ -429,8 +440,10 @@ modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)
        int plane;\r
        int i;\r
 //     byte near *buff;\r
-       const int px=x;\r
-       const int py=y;\r
+       const int px=x+page->dx;\r
+       const int py=y+page->dy;\r
+       x=px;\r
+       y=py;\r
 //     buff = _nmalloc(p->pwidth+1);\r
        // TODO Make this fast.  It's SLOOOOOOW\r
 //     for(plane=0; plane < 4; plane++) {\r
@@ -456,7 +469,7 @@ modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)
 //                             _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
 //                             printf("buff %u==%s\n", y, *buff);\r
 //                             _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), buff, p->pwidth);\r
-                               _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
+                               _fmemcpy(page->data + (((page->width/4) * y) + (x / 4)), &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
                        //}\r
                }\r
                x=px;\r
@@ -507,10 +520,6 @@ modexDrawBmpRegion(page_t *page, int x, int y,
     word rowCounter;\r
     byte planeCounter = 4;\r
 \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
        //code is a bit slow here\r
     __asm {\r
                MOV AX, SCREEN_SEG      ; go to the VGA memory\r
index a60d13ea7e80821531e63b8d471b30cd336631b4..ccc347a5b1162a11831ff7da64b8ba8695d8104b 100755 (executable)
@@ -65,6 +65,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
 #else
                                modexDrawSpriteRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 24, 32, &player[pn].data);
 #endif
+#else
                                modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 14);
 #endif
                                modexShowPage(pip[1].page);
index dda07176094fa417887619ac22e1ed4893616afd..9594015241f99524de9abd83515f269b34537234 100755 (executable)
@@ -58,7 +58,7 @@ baka = 1;
        bmp = bitmapLoadPcx(bakapeee);\r
        p = planar_buf_from_bitmap(&bmp);\r
        ptmpbt = bitmapLoadPcx("data/ptmp.pcx");\r
-       ptmp = planar_buf_from_bitmap(&bmp);\r
+       ptmp = planar_buf_from_bitmap(&ptmpbt);\r
        VGAmodeX(baka, &gvar);\r
        gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
 \r
@@ -88,9 +88,8 @@ baka = 1;
                modexDrawPBuf(&gvar.video.page[0], 0, 0, p, 0);\r
        }\r
        t2 = (*clockw-start) /18.2;\r
-       getch();\r
        modexPalUpdate1(ptmpbt.palette);\r
-       modexDrawPBufRegion(&gvar.video.page[0], 140, 140, 48, 32, 24, 32, ptmp, 1);\r
+       modexDrawPBufRegion(&gvar.video.page[0], 160, 140, 48, 32, 24, 32, ptmp, 1);\r
        while(!kbhit())\r
        {\r
        }\r
@@ -104,20 +103,20 @@ baka = 1;
        for(plane=0; plane < 4; plane++) {\r
                i=0;\r
                printf("Plane %d\n", plane);\r
-               for(py=0; py < p->height; py++) {\r
-                       for(px=0; px < p->pwidth; px++) {\r
-                               printf("%02X ", (int) p->plane[plane][i++]);\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
                        }\r
                        printf("\n");\r
                }\r
        }\r
        col=0x0d, bgcol=0;\r
-       for(i=0; i<8; i++)\r
+       /*for(i=0; i<8; i++)\r
        {\r
-               /*modexSelectPlane(PLANE(x));\r
-               j=1<<8;\r
-               *bakapee=(l[i] & j ? col:bgcol);\r
-               _fmemcpy(page->data + (((page->width/4) * (y+page->dy+i)) + ((x+page->dx+chw) / 4)), bakapee, 8);*/\r
+               //modexSelectPlane(PLANE(x));\r
+               //j=1<<8;\r
+               //*bakapee=(l[i] & j ? col:bgcol);\r
+               //_fmemcpy(page->data + (((page->width/4) * (y+page->dy+i)) + ((x+page->dx+chw) / 4)), bakapee, 8);\r
                j=4<<8;\r
                fprintf(stderr, "j<<=%u\n", j);\r
                xp=0;\r
@@ -130,7 +129,7 @@ baka = 1;
                        fprintf(stderr, "       j>>=%u\n", j);\r
                }\r
                //fprintf(stderr, "\n");\r
-       }\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
index a5a0ebae8f69ccdbd8ebe4e26e880d54a7f9dd68..0ad7e77cabd96a4037cee20be77d385d24745b3d 100755 (executable)
Binary files a/test.exe and b/test.exe differ
index e1fc73c85f64e1bbf7bcdb3dffc5badeaca11d85..3b0ebe5d79f31baf9bd33ff6b2b480da5a04a411 100755 (executable)
Binary files a/test2.exe and b/test2.exe differ