]> 4ch.mooo.com Git - 16.git/commitdiff
font rendering = fail
authorsparky4 <sparky4@cock.li>
Sun, 14 Jun 2015 23:28:21 +0000 (18:28 -0500)
committersparky4 <sparky4@cock.li>
Sun, 14 Jun 2015 23:28:21 +0000 (18:28 -0500)
modified:   Project 16.bfproject
modified:   maptest.exe
modified:   pcxtest.exe
modified:   scroll.exe
modified:   src/lib/modex16.c
modified:   src/lib/modex16.h
modified:   test.exe
modified:   test2.exe

Project 16.bfproject
maptest.exe
pcxtest.exe
scroll.exe
src/lib/modex16.c
src/lib/modex16.h
test.exe
test2.exe

index d992d1947899035001dccf12bf66268d6cbb8505..efc7e5917dbfad644f89f46fb056b41358a1aedb 100644 (file)
@@ -8,14 +8,14 @@ openfiles: /dos/z/16/src/fmemtest.c:116:0:0:
 openfiles: /dos/z/16/src/emmtest.c:732:0:0:
 openfiles: /dos/z/16/src/emsdump.c:456:0:0:
 openfiles: /dos/z/16/src/maptest.c:463:0:0:
-openfiles: /dos/z/16/src/maptest0.c:506:19:0:
+openfiles: /dos/z/16/src/maptest0.c:366:19:0:
 openfiles: /dos/z/16/src/test.c:0:0:0:
 openfiles: /dos/z/16/src/test2.c:0:0:0:
 openfiles: /dos/z/16/src/lib/planar.h:602:0:0:
 openfiles: /dos/z/16/src/lib/PLANAR.C:0:0:0:
 openfiles: /dos/z/16/src/lib/bitmap.c:294:0:0:
 openfiles: /dos/z/16/src/lib/bitmap.h:257:0:0:
-openfiles: /dos/z/16/src/lib/modex16.c:23968:23029:1:
+openfiles: /dos/z/16/src/lib/modex16.c:23351:22964:1:
 openfiles: /dos/z/16/src/lib/modex16.h:2566:1791:0:
 openfiles: /dos/z/16/src/lib/dos_kb.c:3264:2598:0:
 openfiles: /dos/z/16/src/lib/dos_kb.h:0:0:0:
index 75de896a178b29462b8c31cec840e5ca023a5f34..aa7f662bbba95d63727abb36c84bb15240dc24e9 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index a6bd559d0ccb3469438fb6e00b5cb1b957557654..a5970fd519f5f91303c92976137c3f953673cb38 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index aa6367d680faa22b478c394dc0b0069e19c4c373..9667cb30dd0eed08ea956579aa50921ec6366d34 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index 9b9545299b6474860446e08f1b51d75a9ec7ab56..b25d86741c6c54110680a7c418d85650c526bef9 100644 (file)
@@ -8,6 +8,12 @@
 
 
 byte far* VGA=(byte far*) 0xA0000000;  /* this points to video memory. */
+word text_mask[16] = {
+       0x0002, 0x0102, 0x0202, 0x0302,\r
+       0x0402, 0x0502, 0x0602, 0x0702,\r
+       0x0802, 0x0902, 0x0A02, 0x0B02,\r
+       0x0C02, 0x0D02, 0x0E02, 0x0F02
+};
 
 static void fadePalette(sbyte fade, sbyte start, word iter, byte *palette);
 static byte tmppal[PAL_SIZE];
@@ -912,17 +918,32 @@ byte far *bios_8x8_font(void)
 /*****************************************************************************\r
 *****************************************************************************/\r
 void bputs(page_t *pee, int x, int y, const char *s)\r
-{\r
+{
+       //int i, skip;\r
        byte far *font;
-       byte far *fontoffset;
+       byte far *font_pntr;
+       //byte c, temp;
 \r
        font = bios_8x8_font();
+       //skip = 2 - ((pee->width/4) << 3);
        //printf("font=%Fp\n", font);\r
        for(; *s != '\0'; s++)\r
        {\r
                //src.raster = font + 8 * (*s);
                //BLOODY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111111111111!!!11!!11!111!11!!1111!!111!11!!1!!!11!11!!1!!111!11!!
 //             (*(bmp->data)) = (*(font + 8 * (*s)));
+               font_pntr = (*(font + 8 * (*s)));
+//             font_pntr = font + (c << 3);
+//             i=8;\r
+//             while (i--) {\r
+//                     temp = *font_pntr++;\r
+//                     outpw(SC_INDEX, text_mask[temp & 0x0F]);\r
+                       //*vga_ptr++ = color;\r
+\r
+//                     outpw(SC_INDEX, text_mask[temp >> 4]);\r
+                       //*vga_ptr-- = color;\r
+                       //vga_ptr += widthBytes;\r
+//             }
 
                //printf("fontoffset=%Fp\n", font + 8 * (*s));
                //printf("*fontoffset=%s\n", *(font + 8 * (*s)));
@@ -934,8 +955,9 @@ void bputs(page_t *pee, int x, int y, const char *s)
 //             printf("%x\n", (*(font + 8 * (*s))));
                //_fmemset(VGA, *(font + 8 * (*s)), _msize(font));
                //draw text?!?! wwww
+
                modexClearRegion(pee, x, y, 8, 8, 4);
-               x += 8;\r
+//             x += 8;\r
        }
 //     printf("\n");\r
 }
index b81fb36c46dc199eeaa0220b8a30e44a883246a2..f3064d1b182bac0673d331cc3b677433e618f406 100644 (file)
@@ -74,6 +74,7 @@ void bputs(page_t *pee, int x, int y, const char *s);
 
 /* -======================= Constants & Vars ==========================- */
 extern byte far*  VGA;  /* The VGA Memory */
+extern word text_mask[16];
 #define SCREEN_SEG             0xa000
 #define VIDEO_INT              0x10
 #define SET_MODE               0x00
index ec3ea875e855426b5ac823c95775510272e3b12b..410e743c4854484005eaf50cd0b6a78c6d6fc7ef 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 92bb6efb919f9fd126d0d09e927c2c3318e3feb2..2809a69cc5f1b302431ede4b5fba05131ec28d39 100644 (file)
Binary files a/test2.exe and b/test2.exe differ