]> 4ch.mooo.com Git - 16.git/commitdiff
fixed ^^ still buggy but it works better now~
authorsparky4 <sparky4@cock.li>
Tue, 10 Nov 2015 20:35:19 +0000 (14:35 -0600)
committersparky4 <sparky4@cock.li>
Tue, 10 Nov 2015 20:35:19 +0000 (14:35 -0600)
16.exe
data/tesuto.pcx [new file with mode: 0755]
exmmtest.exe
pcxtest.exe
pcxtest2.exe
planrpcx.exe
scroll.exe
src/lib/modex16/16planar.c
src/lib/modex16/16render.c
test.exe

diff --git a/16.exe b/16.exe
index fc35d3fc50705b0c68f9c8b034f2ad816afc9d17..2841cdd3dab436c04d9f36473fc1f655e5888314 100755 (executable)
Binary files a/16.exe and b/16.exe differ
diff --git a/data/tesuto.pcx b/data/tesuto.pcx
new file mode 100755 (executable)
index 0000000..b7e6e8e
Binary files /dev/null and b/data/tesuto.pcx differ
index d818a69c2e39b63857c20a7276378333bb476cd2..45d19ef5815771abcd1bfc5b2dc67df488ffa2b7 100755 (executable)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 42a26c7edc8cef9f932ac7cfdbf4a9b447a4dd7f..d9b1600490fca046ca93bb78a1f1d96f83bc9eee 100755 (executable)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 5ce969cc6f1eef25c3043618857c3a4a652a634e..f11ee4890896a910e55c21ef460c827bbbbb8a5a 100755 (executable)
Binary files a/pcxtest2.exe and b/pcxtest2.exe differ
index e730a4145441a4decfaed7a217831b3ac07d5588..9d4235357cfda7c46cfd0aa373c01e7cf187f925 100755 (executable)
Binary files a/planrpcx.exe and b/planrpcx.exe differ
index 1428edc43d1f73faa53742f9c2a4e0f30c624e75..5ee67760f3e7af12fafa84b81ef4c3786691b74a 100755 (executable)
Binary files a/scroll.exe and b/scroll.exe differ
index 4c167597c292b135026234d81b4719598aa9bdb0..c8d3b54e5dd19e88c4df1f6b6ddc7f6b9ba49030 100755 (executable)
@@ -90,7 +90,7 @@ pbuf_alloc(word width, word height) {
 \r
        /* allocate the planes */\r
        for(i=0; i<4; i++) {\r
-               p.plane[i] = _fmalloc(p.height * p.pwidth);\r
+               p.plane[i] = _fmalloc((p.height * p.pwidth)+1);\r
        }\r
 \r
        return p;\r
@@ -180,6 +180,9 @@ fprintf(stderr, "%u ", w++);*/
        /* write the pixel the specified number of times */\r
 //fprintf(stderr, "\nputting in memory~ %u\n", w++);\r
        for(; count && (index[0]+index[1]+index[2]+index[3]) < bufSize; count--,index[plane]++)  {\r
+               // copy to each plane\r
+               result.plane[plane][index[plane]]=(word)val;\r
+//fprintf(stdout, "plane=%u    index val=%02X  val=%02X\n", plane, result.plane[plane][index[plane]], val);\r
                switch (plane)\r
                {\r
                        case 4:\r
@@ -194,17 +197,14 @@ fprintf(stderr, "%u ", w++);*/
                                plane=0;\r
                        break;\r
                }\r
-               // copy to each plane\r
-               result.plane[plane][index[plane]]=val;\r
 //fprintf(stdout, "count=%02X  index=%u        plane=%u        ", count, index[plane], plane);\r
-//fprintf(stdout, "index val=%02X      val=%02X\n", result.plane[plane][index[plane]], val);\r
        }\r
+       //val++;\r
 // fprintf(stdout, "\nindex=%lu                bufsize=%lu\n\n", (dword)(index[0]+index[1]+index[2]+index[3]),  bufSize);\r
        } while((index[0]+index[1]+index[2]+index[3]) < bufSize);\r
        loadPcxpbufPalette(file, &result);\r
        fclose(file);\r
 // fprintf(stderr, "\n\n%s     count=%d        index=%d        plane=%d\n", filename, count, (dword)(index[0]+index[1]+index[2]+index[3]), pla);\r
-// exit(0);\r
        return result;\r
 \r
 }\r
index b70c7f19cdae73dbb29ccb53d7c0b9d6faf0c984..500afdbf54393c010bf954aba32d416c13027604 100755 (executable)
@@ -93,7 +93,7 @@ modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)
 //     }\r
        for(plane=0; plane < 4; plane++) {\r
                i=0;\r
-               modexSelectPlane(PLANE(plane+x));\r
+               modexSelectPlane(PLANE(plane-1));\r
                for(; y < py+p->height; y++) {\r
                        //for(px=0; px < p->width; px++) {\r
                                //printf("%02X ", (int) p->plane[plane][i++]);\r
index 6fbfb6f8cfcb631e53bdff9217eff5317e26b246..27ea560d9c3ed7b861995531cb6d2560f295ef02 100755 (executable)
Binary files a/test.exe and b/test.exe differ