From: sparky4 Date: Tue, 10 Nov 2015 20:35:19 +0000 (-0600) Subject: fixed ^^ still buggy but it works better now~ X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=fe27008e8685590d96a503ff4ce76afe229db4d2 fixed ^^ still buggy but it works better now~ --- diff --git a/16.exe b/16.exe index fc35d3fc..2841cdd3 100755 Binary files a/16.exe and b/16.exe differ diff --git a/data/tesuto.pcx b/data/tesuto.pcx new file mode 100755 index 00000000..b7e6e8e9 Binary files /dev/null and b/data/tesuto.pcx differ diff --git a/exmmtest.exe b/exmmtest.exe index d818a69c..45d19ef5 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index 42a26c7e..d9b16004 100755 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/pcxtest2.exe b/pcxtest2.exe index 5ce969cc..f11ee489 100755 Binary files a/pcxtest2.exe and b/pcxtest2.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index e730a414..9d423535 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index 1428edc4..5ee67760 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/modex16/16planar.c b/src/lib/modex16/16planar.c index 4c167597..c8d3b54e 100755 --- a/src/lib/modex16/16planar.c +++ b/src/lib/modex16/16planar.c @@ -90,7 +90,7 @@ pbuf_alloc(word width, word height) { /* allocate the planes */ for(i=0; i<4; i++) { - p.plane[i] = _fmalloc(p.height * p.pwidth); + p.plane[i] = _fmalloc((p.height * p.pwidth)+1); } return p; @@ -180,6 +180,9 @@ fprintf(stderr, "%u ", w++);*/ /* write the pixel the specified number of times */ //fprintf(stderr, "\nputting in memory~ %u\n", w++); for(; count && (index[0]+index[1]+index[2]+index[3]) < bufSize; count--,index[plane]++) { + // copy to each plane + result.plane[plane][index[plane]]=(word)val; +//fprintf(stdout, "plane=%u index val=%02X val=%02X\n", plane, result.plane[plane][index[plane]], val); switch (plane) { case 4: @@ -194,17 +197,14 @@ fprintf(stderr, "%u ", w++);*/ plane=0; break; } - // copy to each plane - result.plane[plane][index[plane]]=val; //fprintf(stdout, "count=%02X index=%u plane=%u ", count, index[plane], plane); -//fprintf(stdout, "index val=%02X val=%02X\n", result.plane[plane][index[plane]], val); } + //val++; // fprintf(stdout, "\nindex=%lu bufsize=%lu\n\n", (dword)(index[0]+index[1]+index[2]+index[3]), bufSize); } while((index[0]+index[1]+index[2]+index[3]) < bufSize); loadPcxpbufPalette(file, &result); fclose(file); // fprintf(stderr, "\n\n%s count=%d index=%d plane=%d\n", filename, count, (dword)(index[0]+index[1]+index[2]+index[3]), pla); -// exit(0); return result; } diff --git a/src/lib/modex16/16render.c b/src/lib/modex16/16render.c index b70c7f19..500afdbf 100755 --- a/src/lib/modex16/16render.c +++ b/src/lib/modex16/16render.c @@ -93,7 +93,7 @@ modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite) // } for(plane=0; plane < 4; plane++) { i=0; - modexSelectPlane(PLANE(plane+x)); + modexSelectPlane(PLANE(plane-1)); for(; y < py+p->height; y++) { //for(px=0; px < p->width; px++) { //printf("%02X ", (int) p->plane[plane][i++]); diff --git a/test.exe b/test.exe index 6fbfb6f8..27ea560d 100755 Binary files a/test.exe and b/test.exe differ