From: sparky4 Date: Sat, 24 Oct 2015 01:30:17 +0000 (-0500) Subject: going to optimize the font rendering next X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=2ac6d138ce852064f3c792957880a87b5f3d4523;p=16.git going to optimize the font rendering next --- diff --git a/16.exe b/16.exe index c5061459..bbea9b48 100755 Binary files a/16.exe and b/16.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index b20c288d..a1c2c31d 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index 95359c40..a3063d17 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index 51f48a5f..1442c718 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/modex16.c b/src/lib/modex16.c index ea58ebd0..4edc4c79 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -400,7 +400,6 @@ DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite) int plane; int px, py, i; // byte near *buff; - px=x; py=y; // buff = _nmalloc(p->pwidth+1); @@ -1278,6 +1277,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons word addr = (word) l; word chw=0; byte c; + //byte near *bakapee; switch(t) { @@ -1330,9 +1330,14 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons DEC CX JNZ L1 } + //bakapee = _nmalloc(sizeof(byte)*8); //TODO: OPTIMIZE THIS!!!! for(i=0; idata + (((page->width/4) * (y+page->dy+i)) + ((x+page->dx+chw) / 4)), bakapee, 8);*/ j=1<<8; xp=0; while(j) @@ -1344,6 +1349,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons } chw += xp; } + //_nfree(bakapee); } void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str) diff --git a/src/planrpcx.c b/src/planrpcx.c index d4b91e00..7ed2b7b9 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -42,13 +42,17 @@ void main(int argc, char *argv[]) sword baka; char *bakapeee; + byte l[1024]; + word j,chw,xp,col,bgcol; + + bakapeee = malloc(64); if(argv[1]) bakapeee = argv[1]; else bakapeee = "data/koishi~.pcx"; - if(argv[2]) baka = atoi(argv[2]); - else +// if(argv[2]) baka = atoi(argv[2]); +// else baka = 1; bmp = bitmapLoadPcx(bakapeee); @@ -116,5 +120,26 @@ baka = 1; fprintf(stderr, "DrawPBuf: %f\n", t2); fprintf(stderr, "gvar.video.page[0].width: %u\n", gvar.video.page[0].width); fprintf(stderr, "gvar.video.page[0].height: %u\n", gvar.video.page[0].height); + col=0x0d, bgcol=0; + for(i=0; i<8; i++) + { + /*modexSelectPlane(PLANE(x)); + j=1<<8; + *bakapee=(l[i] & j ? col:bgcol); + _fmemcpy(page->data + (((page->width/4) * (y+page->dy+i)) + ((x+page->dx+chw) / 4)), bakapee, 8);*/ + j=4<<8; + fprintf(stderr, "j<<=%u\n", j); + xp=0; + while(j) + { + //modexputPixel(page, x+xp+chw, y+i, l[i] & j ? col:bgcol); + //fprintf(stderr, "%u", l[i] & j ? col:bgcol); + xp++; + j>>=4; + fprintf(stderr, " j>>=%u\n", j); + } + //fprintf(stderr, "\n"); + } + chw += xp; return; } diff --git a/test.exe b/test.exe index 3ba082c2..f9d46241 100755 Binary files a/test.exe and b/test.exe differ