From: sparky4 Date: Mon, 18 Apr 2016 04:40:23 +0000 (-0500) Subject: joncampbell123 i tried ww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b3b84c37d78d8a3ec502cdf300b1abeb172b7905;p=16.git joncampbell123 i tried ww --- diff --git a/src/fontgfx.c b/src/fontgfx.c index d0c2e1bc..50427a3a 100755 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -96,7 +96,6 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\ gvar.video.page[0].width += (16*2); gvar.video.page[0].height += (16*2); modexShowPage(&gvar.video.page[0]); - addr = (gvar.video.page[0].width/4) * chy + (chx / 4) + ((word)gvar.video.page[0].data); /* at start of function */ vga_read_crtc_mode(&cm); // NTS: We're in Mode-X now. printf() is useless. Do not use printf(). Or INT 10h text printing. Or DOS console output. //modexprint(16, 16, 1, 15, "wwww"); @@ -115,11 +114,11 @@ IIIIIII BBBBBBBBB MMMM M MMMM\n\ chx=0; chy+=8; sprintf(pee,"%u", colpee); - modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee, addr, 1); + modexprint(&gvar.video.page[0], 200, 200, 1, 47, 0, &pee); //getch(); } sprintf(pee, "%zc", e); - modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e, addr, 1); + modexprint(&gvar.video.page[0], chx, chy, 1, 0, colpee, &e); chx+=9; colpee++; if(colpee>=32+24) colpee=32; diff --git a/src/lib/bakapee.c b/src/lib/bakapee.c index f0b798ce..b50c16e1 100755 --- a/src/lib/bakapee.c +++ b/src/lib/bakapee.c @@ -239,7 +239,7 @@ void ding(page_t *page, bakapee_t *pee, word q) break; case 8: colorz(page, pee); - modexprint(page, page->sw/2, page->sh/2, 1, 47, 0, "bakapi", (page[0].width/4) * pee->yy + (pee->xx / 4) + ((word)page[0].data), 1); + modexprint(page, page->sw/2, page->sh/2, 1, 47, 0, "bakapi"); break; case 9: if(pee->coor <= HGQ) diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 247a24d3..4e7004e1 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -873,10 +873,11 @@ 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 addrq, boolean q) +void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str) { word s, o, w; word addr = (word) romFontsData.l; + word addrq = (page->width/4) * y + (x / 4) + ((word)page->data); byte c; s=romFonts[t].seg; @@ -913,7 +914,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons JNZ L1 } //TODO: OPTIMIZE THIS!!!! - modexDrawCharPBuf(page, x, y, t, col, bgcol, addrq, q); + modexDrawCharPBuf(page, x, y, t, col, bgcol, addrq); //if(!q) getch(); } diff --git a/src/lib/modex16.h b/src/lib/modex16.h index b334e7fe..c1c45252 100755 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -172,7 +172,7 @@ static inline byte modexreadPixel(page_t *page, int x, int y, word addr) outpw(GC_INDEX+1, x & 3); return vga_state.vga_graphics_ram[addr]; } -void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str, word addrq, boolean q); +void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); void modexpdump(page_t *pee); void modexcls(page_t *page, byte color, byte *Where); diff --git a/src/lib/modex16/16render.c b/src/lib/modex16/16render.c index ad88168f..fe78022d 100755 --- a/src/lib/modex16/16render.c +++ b/src/lib/modex16/16render.c @@ -435,7 +435,7 @@ modexDrawSpritePBufRegion(page_t *page, int x, int y, } } -void modexDrawCharPBuf(page_t *page, int x, int y, word t, word col, word bgcol, word addr, boolean q) +void modexDrawCharPBuf(page_t *page, int x, int y, word t, word col, word bgcol, word addr) { word i, j, k; for(i=0; idata + (((page->width/4) * (y+i)) + ((x+romFontsData.chw+k) / 4)), romFontsData.l[i] & j ? col:bgcol, 2); modexwritepixel(page, x+k+romFontsData.chw, y+i, addr, romFontsData.l[i] & j ? col:bgcol); - else +// else //printf("l[i]=%c j=%02u l[i] & j=%02u %c\n", l[i] , j, l[i] & j, l[i] & j ? '*':' '); //printf("%c", l[i] & j ? '*':' '); - romFontsData.z[k]=romFontsData.l[i] & j ? '*':' '; +// romFontsData.z[k]=romFontsData.l[i] & j ? '*':' '; j>>=1; k++; } - if(!q) - { - for(k=0;k<9;k++) - { - printf("%c", romFontsData.z[k]); - } - printf("\n"); - } +// if(!q) +// { +// for(k=0;k<9;k++) +// { +// printf("%c", romFontsData.z[k]); +// } +// printf("\n"); +// } } romFontsData.chw += k; } diff --git a/src/lib/modex16/16render.h b/src/lib/modex16/16render.h index 7edb4422..abf8f1f5 100755 --- a/src/lib/modex16/16render.h +++ b/src/lib/modex16/16render.h @@ -36,6 +36,6 @@ void modexDrawBmpPBuf(page_t *page, int x, int y, planar_buf_t *bmp); /*pbuf ver void modexDrawBmpPBufRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *bmp); void modexDrawSpritePBuf(page_t *page, int x, int y, planar_buf_t *bmp); void modexDrawSpritePBufRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *bmp); -void modexDrawCharPBuf(page_t *page, int x, int y, word t, word col, word bgcol, word addr, boolean q); +void modexDrawCharPBuf(page_t *page, int x, int y, word t, word col, word bgcol, word addr); #endif diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 69ec8720..e77faf1b 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -599,11 +599,8 @@ void shinku(map_view_t *pip, global_game_variables_t *gv) word bgcol = 0; word type = 1; //t=(((*(gv->clock))-gv->clock_start) /18.2); - //sprintf(gv->pee, "%f fps", (double)gv->kurokku.tiku/ticktock(gv)); - vga_moveto(x,y); - vga_sync_bios_cursor(); - printf("%f fps", (double)gv->kurokku.tiku/ticktock(gv)); - //modexprint(pip[1].page, 16, 16, 1, 15, 0, gv->pee, 1); + sprintf(gv->pee, "%f fps", (double)gv->kurokku.tiku/ticktock(gv)); + modexprint(pip[1].page, 16, 16, 1, 15, 0, gv->pee); //(gv->clock_start)=*(gv->clock); gv->kurokku.tiku=0; }