From: sparky4 Date: Thu, 16 Jul 2015 20:18:27 +0000 (-0500) Subject: wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=1994e0d47edc486c81a3d6086574132870c644ed;p=16.git wwww modified: 16.exe renamed: rose -> data/rose modified: fontgfx.exe modified: fonttes0.exe modified: maptest.exe modified: palettec.exe modified: pcxtest.exe modified: src/fontgfx.c modified: src/lib/modex16.c modified: src/lib/modex16.h modified: test.exe modified: test2.exe --- diff --git a/16.exe b/16.exe index b74b601a..5385c3d7 100644 Binary files a/16.exe and b/16.exe differ diff --git a/rose b/data/rose similarity index 100% rename from rose rename to data/rose diff --git a/fontgfx.exe b/fontgfx.exe index fe30ff47..383c6074 100644 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/fonttes0.exe b/fonttes0.exe index 0f5bfce7..7de3837f 100644 Binary files a/fonttes0.exe and b/fonttes0.exe differ diff --git a/maptest.exe b/maptest.exe index 342a6bea..93a389d3 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index 96e18a07..1b6fda6c 100644 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index c7abb981..f7ee0d8d 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/src/fontgfx.c b/src/fontgfx.c index 36903721..ebfbb6d5 100644 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -31,28 +31,42 @@ void main(int argc, char near *argv[]) static byte e; //word ri; byte pee[2]; - static byte rose[]=" :. ,..\n\ - .' :~.':_.,\n\ - .' ::.::'.'\n\ - : ::' .:\n\ - `.: .: .:/\n\ - `::--.:'.::'\n\ - |. _:===-'\n\ - / /\n\ - ,---.---. __,','\n\ - (~`. \ ) )','.,---..\n\ - `v`\ | ,' .-'.:,'_____ `.\n\ - )|/.-~.--~~--. ~~~-. \ \n\ - _/-'_.-~ ""---.._`.|\n\ - _.-~~_.-~ ""'\n\ - _..--~~_.(~~\n\ - __...---~~~_..--~~\n\ -,'___...---~~~\n\ + page_t screen; + static byte ibmlogo[]="IIIIIII BBBBBBBBB MMMMM MMMMM\n\ +IIIIIII BBBBBBBBBBB MMMMMM MMMMMM\n\ + III BBB BBB MMMMMM MMMMMM\n\ + III BBBBBBBBB MMMMMMM MMMMMMM\n\ + III BBBBBBBBB MMM MMMMMMM MMM\n\ + III BBB BBB MMM MMMMM MMM\n\ +IIIIIII BBBBBBBBBBB MMMM MMM MMMM\n\ +IIIIIII BBBBBBBBB MMMM M MMMM\n\ +"; + static byte rose[]=" :. ,..\ + .' :~.':_.,\ + .' ::.::'.'\ + : ::' .:\ + `.: .: .:/\ + `::--.:'.::'\ + |. _:===-'\ + / /\ + ,---.---. __,','\ + (~`. \ ) )','.,---..\ + `v`\ | ,' .-'.:,'_____ `.\ + )|/.-~.--~~--. ~~~-. \\ + _/-'_.-~ ""---.._`.|\ + _.-~~_.-~ ""'\ + _..--~~_.(~~\ + __...---~~~_..--~~\ +,'___...---~~~\ "; // static byte *rosa; static word chx, chy, colpee; textInit(); modexEnter(); + /* setup camera and screen~ */ + screen = modexDefaultPage(); + screen.width += (16*2); + screen.height += (16*2); //modexprint(16, 16, 1, 15, "wwww"); //getch(); chx=0; @@ -65,17 +79,18 @@ void main(int argc, char near *argv[]) chx=0; chy+=8; sprintf(pee,"%u", colpee); - modexprint(200, 200, 1, 47, 0, &pee); + modexprint(&screen, 200, 200, 1, 47, 0, &pee); //getch(); } - modexprint(chx, chy, 1, 0, colpee, &e); + modexprint(&screen, chx, chy, 1, 0, colpee, &e); chx+=9; colpee++; if(colpee>=32+24) colpee=32; } //modexprint(100, 100, 1, 47, 0, "wwww"); getch(); - modexprint(0, 0, 1, 0, colpee, &rose); +// modexprint(0, 0, 1, 0, colpee, &rose); + modexprint(&screen, 0, 0, 1, 0, colpee, &ibmlogo); // modexprint(0, 0, 1, 0, colpee, ROSE); getch(); modexLeave(); diff --git a/src/lib/modex16.c b/src/lib/modex16.c index e4dfeea2..7ac8f1b2 100644 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -969,7 +969,7 @@ byte modexgetPixel(int x, int y) } -void modexprint(word x, word y, word t, word col, word bgcol, const byte *str) +void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str) { word i, s, o, w, j, xp; byte l[1024]; @@ -1002,8 +1002,20 @@ void modexprint(word x, word y, word t, word col, word bgcol, const byte *str) for(; *str != '\0'; str++) { - 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' __asm { MOV DI, addr @@ -1033,7 +1045,7 @@ void modexprint(word x, word y, word t, word col, word bgcol, const byte *str) j>>=1; } } - chw += xp; + chw += xp-1; } } diff --git a/src/lib/modex16.h b/src/lib/modex16.h index 61e75d9c..f311a69e 100644 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -94,7 +94,7 @@ void modexPalUpdate1(byte *p); void modexPalUpdate0(byte *p); void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/); void modexputPixel(int x, int y, byte color); -void modexprint(word x, word y, word t, word col, word bgcol, const byte *str); +void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); void modexWaitBorder(); /* -======================= Constants & Vars ==========================- */ diff --git a/test.exe b/test.exe index 17d922a3..135dea41 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index f9dc5174..87695578 100644 Binary files a/test2.exe and b/test2.exe differ