X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16.c;h=e4dfeea23da9051b2daddbb9e970a3f490a9d20e;hb=6e1e6445d36dc09619dbd22716455fa794998d0d;hp=acc0058b7950f7f23c96b1a77f17b593cd8e0e62;hpb=8d1c541aafd07bb04574041ddcc6e96a10d3eac9;p=16.git diff --git a/src/lib/modex16.c b/src/lib/modex16.c index acc0058b..e4dfeea2 100644 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -969,10 +969,10 @@ byte modexgetPixel(int x, int y) } -void modexprint(word x, word y, word t, word col, const byte *str) +void modexprint(word x, word y, word t, word col, word bgcol, const byte *str) { word i, s, o, w, j, xp; - byte l[16]; + byte l[1024]; 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) for(; *str != '\0'; str++) { - c = *(str); + if(chw>=SCREEN_WIDTH-1) y+=w; + c = (*str); //load the letter 'A' __asm { MOV DI, addr @@ -1027,12 +1028,12 @@ void modexprint(word x, word y, word t, word col, const byte *str) xp=0; 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; } } - chw += 8; + chw += xp; } }