]> 4ch.mooo.com Git - 16.git/commitdiff
going to optimize the font rendering next
authorsparky4 <sparky4@cock.li>
Sat, 24 Oct 2015 01:30:17 +0000 (20:30 -0500)
committersparky4 <sparky4@cock.li>
Sat, 24 Oct 2015 01:30:17 +0000 (20:30 -0500)
16.exe
exmmtest.exe
planrpcx.exe
scroll.exe
src/lib/modex16.c
src/planrpcx.c
test.exe

diff --git a/16.exe b/16.exe
index c5061459409c60eea2f96fbf2fb6fc070839fe8e..bbea9b48fff320ef76fea2f3c59b5ee23692cf44 100755 (executable)
Binary files a/16.exe and b/16.exe differ
index b20c288dcf82b61dd16da4f17ff9e21d536af5f8..a1c2c31dd218631f9c115adc3b7fc5a12b1016c6 100755 (executable)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 95359c40dd3f08cf6b3eeb64d6703ee3056363c1..a3063d175199a5b269687f7c6c12184282f15107 100755 (executable)
Binary files a/planrpcx.exe and b/planrpcx.exe differ
index 51f48a5fee479ed577b1f6002b4f59ea866fe56e..1442c7186fe395cf31c207a861d8c8ff76426237 100755 (executable)
Binary files a/scroll.exe and b/scroll.exe differ
index ea58ebd0547083ce035a90f5bc929d196fb9221d..4edc4c790036061150e21571da8cea92991ae856 100755 (executable)
@@ -400,7 +400,6 @@ DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)
        int plane;\r
        int px, py, i;\r
 //     byte near *buff;\r
-\r
        px=x;\r
        py=y;\r
 //     buff = _nmalloc(p->pwidth+1);\r
@@ -1278,6 +1277,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons
        word addr = (word) l;\r
        word chw=0;\r
        byte c;\r
+       //byte near *bakapee;\r
 \r
        switch(t)\r
        {\r
@@ -1330,9 +1330,14 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons
                DEC CX\r
                JNZ L1\r
        }\r
+       //bakapee = _nmalloc(sizeof(byte)*8);\r
 //TODO: OPTIMIZE THIS!!!!\r
                for(i=0; i<w; 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
                        j=1<<8;\r
                        xp=0;\r
                        while(j)\r
@@ -1344,6 +1349,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons
                }\r
                chw += xp;\r
        }\r
+       //_nfree(bakapee);\r
 }\r
 \r
 void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str)\r
index d4b91e009101257bae68c3874e2d74cd14c4f608..7ed2b7b95bb07214034bf5680575e335a8043be6 100755 (executable)
@@ -42,13 +42,17 @@ void main(int argc, char *argv[])
        sword baka;\r
        char *bakapeee;\r
 \r
+       byte l[1024];\r
+       word j,chw,xp,col,bgcol;\r
+\r
+\r
        bakapeee = malloc(64);\r
 \r
        if(argv[1]) bakapeee = argv[1];\r
        else bakapeee = "data/koishi~.pcx";\r
 \r
-       if(argv[2]) baka = atoi(argv[2]);\r
-       else\r
+//     if(argv[2]) baka = atoi(argv[2]);\r
+//     else\r
 baka = 1;\r
 \r
        bmp = bitmapLoadPcx(bakapeee);\r
@@ -116,5 +120,26 @@ baka = 1;
        fprintf(stderr, "DrawPBuf:      %f\n", t2);\r
        fprintf(stderr, "gvar.video.page[0].width: %u\n", gvar.video.page[0].width);\r
        fprintf(stderr, "gvar.video.page[0].height: %u\n", gvar.video.page[0].height);\r
+       col=0x0d, bgcol=0;\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
+               j=4<<8;\r
+               fprintf(stderr, "j<<=%u\n", j);\r
+               xp=0;\r
+               while(j)\r
+               {\r
+                       //modexputPixel(page, x+xp+chw, y+i, l[i] & j ? col:bgcol);\r
+                       //fprintf(stderr, "%u", l[i] & j ? col:bgcol);\r
+                       xp++;\r
+                       j>>=4;\r
+                       fprintf(stderr, "       j>>=%u\n", j);\r
+               }\r
+               //fprintf(stderr, "\n");\r
+       }\r
+       chw += xp;\r
        return;\r
 }\r
index 3ba082c257eecea87e2574ebfe383872a80e0c46..f9d46241f24d6c58a9e17e9a70f80677aec2279b 100755 (executable)
Binary files a/test.exe and b/test.exe differ