]> 4ch.mooo.com Git - 16.git/commitdiff
^^ yay!!
authorsparky4 <sparky4@cock.li>
Tue, 10 Nov 2015 21:13:59 +0000 (15:13 -0600)
committersparky4 <sparky4@cock.li>
Tue, 10 Nov 2015 21:13:59 +0000 (15:13 -0600)
16.exe
exmmtest.exe
pcxtest.exe
pcxtest2.exe
planrpcx.exe
scroll.exe
src/lib/modex16/16render.c
src/planrpcx.c
test.exe

diff --git a/16.exe b/16.exe
index 2841cdd3dab436c04d9f36473fc1f655e5888314..b8d3955caeb461f8ad7d540a0171eeefec42ddcb 100755 (executable)
Binary files a/16.exe and b/16.exe differ
index 45d19ef5815771abcd1bfc5b2dc67df488ffa2b7..535e3f15f130ffb123b0013b77f5210cab74cdfe 100755 (executable)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index d9b1600490fca046ca93bb78a1f1d96f83bc9eee..2b33f92f6df3ef19c321cec02821a6e6dfb67180 100755 (executable)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index f11ee4890896a910e55c21ef460c827bbbbb8a5a..73cfe3263232e6f21be515e5ea275535595396e8 100755 (executable)
Binary files a/pcxtest2.exe and b/pcxtest2.exe differ
index 9d4235357cfda7c46cfd0aa373c01e7cf187f925..8fde3f24600335b89f34fa4b4c7ab6c002b6d455 100755 (executable)
Binary files a/planrpcx.exe and b/planrpcx.exe differ
index 5ee67760f3e7af12fafa84b81ef4c3786691b74a..3488f5ecc511b984c30c9c68cab670b9e3a18ce9 100755 (executable)
Binary files a/scroll.exe and b/scroll.exe differ
index 500afdbf54393c010bf954aba32d416c13027604..f80d5ea8fc367bcd1a2aa9460d7758c0cd30e441 100755 (executable)
 //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
-       sword plane;\r
+       word plane;\r
        int i;\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
+       const int px=x+page->dx;\r
+       const int py=y+page->dy;\r
+       const int prw = rw/4;\r
+       rx+=1;\r
+       ry+=1;\r
+       #define PEEE    rx-prw\r
+       #define PE              (p->pwidth)\r
+       #define PEEEE   (PE*(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=PEEE+PEEEE;\r
-               //printf("PEEE=%d ", PEEE);\r
-               //printf("PEEEE=%d ", PEEEE);\r
-               //printf("i=%d\n", i);\r
-               modexSelectPlane(PLANE(plane+x));\r
+               modexSelectPlane(PLANE(plane-1));\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) + (x / 4)), &(p->plane[plane][i+=p->pwidth]), (rw/4));\r
+                               _fmemcpy(page->data + (((page->width/4) * (y)) + ((x) / 4)), &(p->plane[plane][i]), prw);\r
+                               i+=PE;\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
@@ -68,7 +66,9 @@ void modexDrawPBufRegion      (page_t *page, int x, int y, int rx, int ry, int rw, in
 void\r
 modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)\r
 {\r
-       int plane;\r
+       modexDrawPBufRegion     (page, x, x, 0, 0, p->width, p->height, p, sprite);\r
+       /*\r
+       sword plane;\r
        int i;\r
 //     byte near *buff;\r
        const int px=x+page->dx;\r
@@ -107,7 +107,7 @@ modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)
                x=px;\r
                y=py;\r
        }\r
-//     _nfree(buff);\r
+//     _nfree(buff);*/\r
 }\r
 \r
 void\r
index 9dc97ce492559b77cd9738786ff24760d247c43c..bb473178e11221650b389cf03611fa484b4ed352 100755 (executable)
@@ -94,14 +94,15 @@ baka = 1;
                modexDrawPBuf           (&gvar.video.page[0], 0, 0, &p, 0);\r
        }\r
        t3 = (*clockw-start) /18.2;\r
+getch();\r
        for(i=0; i<100 ;i++) {\r
-               //modexDrawPBufRegion   (&gvar.video.page[0], 0, 0, 0+p.width, 0, p.width, p.height, &p, 0);\r
+                                               //(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite);\r
+               modexDrawPBufRegion     (&gvar.video.page[0], p.width, 0, p.width-16, p.height-16, 16, 16, &p, 0);//(&gvar.video.page[0], 0, 0, 0+p.width, 0, p.width, p.height, &p, 0);\r
        }\r
        t4 = (*clockw-start) /18.2;\r
        //++++  modexPalUpdate1(ptmp.palette);\r
        //modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, ptmp);\r
        //modexDrawPBuf(&gvar.video.page[0], 64, 64, &ptmp, 0);\r
-getch();\r
        while(!kbhit())\r
        {\r
        }\r
index 27ea560d9c3ed7b861995531cb6d2560f295ef02..798f4b1b00f8aefb94244ab2d5d95fd6d340b98f 100755 (executable)
Binary files a/test.exe and b/test.exe differ