X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16.c;h=cbf4df0525f2815a6c79fc728a49bab0ed41d1e3;hb=08920a89e2c02810bae246835b46c920fcb314da;hp=cd56390b3a5fcf7c95275cc75086dc44078ce60c;hpb=415ffb75c84f777d2ce7e3501079823aa544d63f;p=16.git diff --git a/src/lib/modex16.c b/src/lib/modex16.c index cd56390b..cbf4df05 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -115,14 +115,14 @@ modexEnter(sword vq, global_game_variables_t *gv) } break; case 2: - CRTParmCount = sizeof(ModeX_192x144regs) / sizeof(ModeX_192x144regs[0]); + CRTParmCount = sizeof(ModeX_160x120regs) / sizeof(ModeX_160x120regs[0]); /* width and height */ - gv->video.page[0].sw=192; - gv->video.page[0].sh=144; + gv->video.page[0].sw=120; + gv->video.page[0].sh=160; /* send the CRTParms */ for(i=0; ivideo.page[0].sw=192; + gv->video.page[0].sh=144; + + /* send the CRTParms */ + for(i=0; ipwidth+1); + // TODO Make this fast. It's SLOOOOOOW +// for(plane=0; plane < 4; plane++) { +// i=0; +// modexSelectPlane(PLANE(plane+x)); +// for(px = plane; px < p->width; px+=4) { +// offset=px; +// for(py=0; pyheight/2; py++) { +// //SELECT_ALL_PLANES(); +// if(!sprite || p->plane[offset]) +// page->data = &(p->plane[offset][i++]); +// offset+=p->width; +// offset++; +// } +// } +// } + for(plane=0; plane < 4; plane++) { + i=0; + modexSelectPlane(PLANE(plane+x)); + for(; y < p->height-1; y++) { + //for(px=0; px < p->width; px++) { + //printf("%02X ", (int) p->plane[plane][i++]); + _fstrncpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth); +// printf("buff %u==%s\n", y, *buff); + _fstrncpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), buff, p->pwidth); + //} + } + //getch(); + x=px; + y=py; + } + _ffree(buff); +} void oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite) @@ -1071,6 +1130,14 @@ modexPalUpdate0(byte *p) } } +void +modexPalOverscan(byte *p, word col) +{ + modexWaitBorder(); + outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */ + outp(PAL_DATA_REG, col); +} + //color checker~ //i want to make another vesion that checks the palette when the palette is being appened~ void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/)