]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/modex16.c
added instructions~
[16.git] / src / lib / modex16.c
index acc0058b7950f7f23c96b1a77f17b593cd8e0e62..e4dfeea23da9051b2daddbb9e970a3f490a9d20e 100644 (file)
@@ -969,10 +969,10 @@ byte modexgetPixel(int x, int y)
 \r
 }\r
 \r
-void modexprint(word x, word y, word t, word col, const byte *str)\r
+void modexprint(word x, word y, word t, word col, word bgcol, const byte *str)\r
 {
        word i, s, o, w, j, xp;
-       byte l[16];\r
+       byte l[1024];\r
        word addr = (word) l;
        word chw=0;
        byte c;
@@ -1002,7 +1002,8 @@ void modexprint(word x, word y, word t, word col, const byte *str)
 \r
        for(; *str != '\0'; str++)\r
        {
-       c = *(str);
+       if(chw>=SCREEN_WIDTH-1) y+=w;
+       c = (*str);
        //load the letter 'A'\r
        __asm {\r
                MOV DI, addr\r
@@ -1027,12 +1028,12 @@ void modexprint(word x, word y, word t, word col, const byte *str)
                        xp=0;\r
                        while(j)
                        {
-                               modexputPixel(x+xp+chw, y+i, l[i] & j ? col:0);
+                               modexputPixel(x+xp+chw, y+i, l[i] & j ? col:bgcol);
                                xp++;
                                j>>=1;
                        }
                }\r
-               chw += 8;\r
+               chw += xp;\r
        }\r
 }\r
 \r