if(colpee>=32+24) colpee=32;\r
}\r
getch();\r
- modexprint(&gvar.video.page[0], 0, 0, 1, 0, colpee, &rose);\r
+ modexprint(&gvar.video.page[0], gvar.video.page[0].width - (8*16)/*HACK: The rose ASCII is too wide for 320x240 so offset it to make sure the petals are visible*/, 8, 1, 32, 0, &rose);\r
getch();\r
//modexprint(100, 100, 1, 47, 0, "wwww");\r
// modexprint(0, 0, 1, 0, colpee, &rose);\r
void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str)\r
{\r
word s, o, w;\r
+ word x_draw = x;\r
word addr = (word) romFontsData.l;\r
word addrq = (page->width/4) * y + (x / 4) + ((word)page->data);\r
+ word addrr = addrq;\r
byte c;\r
\r
s=romFonts[t].seg;\r
for(; *str != '\0'; str++)\r
{\r
c = (*str);\r
- if((c=='\n'/* || c=="\\r
-"*/) || romFontsData.chw\r
->=page->width)\r
+ if(c=='\n')\r
{\r
- romFontsData.chw=0;\r
- y+=romFonts[t].charSize;\r
+ x = x_draw;\r
+ romFontsData.chw = 0;\r
+ addrq += (page->width / 4) * 8;\r
+ addrr = addrq;\r
+ y += 8;\r
continue;\r
}\r
//load the letter 'A'\r
JNZ L1\r
}\r
//TODO: OPTIMIZE THIS!!!!\r
- modexDrawChar(page, x/*for mode X planar use*/, t, col, bgcol, addrq);\r
- addrq += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */\r
-\r
- //if(!q) getch();\r
+ modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr);\r
+ x_draw += 8; /* track X for edge of screen */\r
+ addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */\r
}\r
}\r
\r