\r
}\r
\r
-void modexprint(word x, word y, word t, word col, word bgcol, const byte *str)\r
+void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str)\r
{
word i, s, o, w, j, xp;
byte l[1024];\r
\r
for(; *str != '\0'; str++)\r
{
- if(chw>=SCREEN_WIDTH-1) y+=w;
+ if(chw>=page->width-1)
+ {
+ x=chw=0;
+ y+=w;
+ continue;
+ }
c = (*str);
+ if(c=='\n' || c=="\
+")
+ {
+ y+=w;
+ x=chw=0;
+ continue;
+ }
//load the letter 'A'\r
__asm {\r
MOV DI, addr\r
j>>=1;
}
}\r
- chw += xp;\r
+ chw += xp-1;\r
}\r
}\r
\r