From: Jonathan Campbell Date: Wed, 20 Apr 2016 11:34:10 +0000 (-0700) Subject: remove wraparound check in modex print, add addr adjust for newline. X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=8239a15b6eaad9b098720623339f168a54f51ca5;p=16.git remove wraparound check in modex print, add addr adjust for newline. FONTGFX.EXE now prints the ascii rose in mode X, though the ASCII art is too wide for 320x240 mode. --- diff --git a/pcx2vrl b/pcx2vrl index bd947e55..06179c75 100755 Binary files a/pcx2vrl and b/pcx2vrl differ diff --git a/pcxsscut b/pcxsscut index 1deec74d..2ce56d28 100755 Binary files a/pcxsscut and b/pcxsscut differ diff --git a/src/fontgfx.c b/src/fontgfx.c index 0c300aa3..954416d5 100755 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -122,7 +122,7 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\ if(colpee>=32+24) colpee=32; } getch(); - modexprint(&gvar.video.page[0], 0, 0, 1, 0, colpee, &rose); + 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); getch(); //modexprint(100, 100, 1, 47, 0, "wwww"); // modexprint(0, 0, 1, 0, colpee, &rose); diff --git a/src/lib/doslib b/src/lib/doslib index f7f22a8e..ef2fcb68 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit f7f22a8e03568d3de5174df096ce3bccec5b5d53 +Subproject commit ef2fcb68ef3c2f9ab023bd455acf488fda73c6eb diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 2246595c..2d018dc1 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -880,8 +880,10 @@ byte modexgetPixel(page_t *page, int x, int y) void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str) { word s, o, w; + word x_draw = x; word addr = (word) romFontsData.l; word addrq = (page->width/4) * y + (x / 4) + ((word)page->data); + word addrr = addrq; byte c; s=romFonts[t].seg; @@ -892,12 +894,13 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons for(; *str != '\0'; str++) { c = (*str); - if((c=='\n'/* || c=="\ -"*/) || romFontsData.chw ->=page->width) + if(c=='\n') { - romFontsData.chw=0; - y+=romFonts[t].charSize; + x = x_draw; + romFontsData.chw = 0; + addrq += (page->width / 4) * 8; + addrr = addrq; + y += 8; continue; } //load the letter 'A' @@ -918,10 +921,9 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons JNZ L1 } //TODO: OPTIMIZE THIS!!!! - modexDrawChar(page, x/*for mode X planar use*/, t, col, bgcol, addrq); - addrq += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */ - - //if(!q) getch(); + modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr); + x_draw += 8; /* track X for edge of screen */ + addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */ } } diff --git a/vrl2vrs b/vrl2vrs index b67956b7..cee2d1d5 100755 Binary files a/vrl2vrs and b/vrl2vrs differ diff --git a/vrsdump b/vrsdump index dbaba30e..a75a903a 100755 Binary files a/vrsdump and b/vrsdump differ