]> 4ch.mooo.com Git - 16.git/commitdiff
do not pull this is for me
authorsparky4 <sparky4@cock.li>
Tue, 14 Jul 2015 12:54:16 +0000 (07:54 -0500)
committersparky4 <sparky4@cock.li>
Tue, 14 Jul 2015 12:54:16 +0000 (07:54 -0500)
modified:   src/lib/modex16.c
modified:   src/lib/modex16.h

src/lib/modex16.c
src/lib/modex16.h

index e61df5a1ce7928c7e979029eb64428c8db9e54ef..4c127c735f455206480848f153b27ea1e88ce1a2 100644 (file)
@@ -969,21 +969,47 @@ byte modexgetPixel(int x, int y)
 \r
 }\r
 \r
-void bputs(/*bmp_t *bmp, */unsigned x, unsigned y, const char *s)\r
-{\r
-        byte far *font;\r
-        //bmp_t src;\r
-\r
-        //font = bios_8x8_font();\r
-        //src.wd = 8;\r
-        //src.ht = 8;\r
-        //src.ops = &g_ops1;\r
-        for(; *s != '\0'; s++)\r
-        {\r
-                //src.raster = font + 8 * (*s);\r
-                //blit1(&src, bmp, x, y);\r
-                x += 8;\r
-        }\r
+void bputs(word x, unsigned y, , const char *s)\r
+{
+       int j;
+       word s, o, t, w;\r
+       word addr = (word) l;\r
+       s=romFonts[t].seg;\r
+       o=romFonts[t].off;\r
+\r
+       //load the letter 'A'\r
+       __asm {\r
+               MOV DI, addr\r
+               MOV SI, o\r
+               MOV ES, s\r
+               SUB AH, AH\r
+               MOV AL, c       ; the letter\r
+               MOV CX, w\r
+               MUL CX\r
+               ADD SI, AX      ;the address of charcter\r
+       L1:     MOV AX, ES:SI\r
+               MOV DS:DI, AX\r
+               INC SI\r
+               INC DI\r
+               DEC CX\r
+               JNZ L1\r
+       }
+\r
+       for(; *s != '\0'; s++)\r
+       {\r
+               for(i=0; i<w; i++)
+               {\r
+                       j=1<<8;
+                       x=0;\r
+                       while(j)
+                       {
+                               modexputPixel(x, i, l[i] & j ? 15:0);
+                               xp++;
+                               j>>=1;
+                       }
+               }\r
+               chw += 8;\r
+       }\r
 }\r
 \r
 void\r
index 159f72ba1586c9edb144c586c900113f2acf7b58..b69f658b432fb3e2ae669ffc867c74bd4dc0563b 100644 (file)
@@ -30,6 +30,7 @@
 #include "src/lib/bitmap.h"
 #include "src/lib/planar.h"
 #include "src/lib/16_head.h"
+#include "src/lib/16text.h"
 
 /* -========================== Types & Macros ==========================- */
 #define PAGE_OFFSET(x,y) (((y)<<6)+((y)<<4)+((x)>>2))