X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16.c;h=fa13d3658ccc16987c8127c7e0a90d17c0d2ec40;hb=60bed23e449fb5296f73e5cd6bddb0d8d7f0eb4c;hp=4d10ab58e75ae9fca19192ccda0e4683a55c0ac6;hpb=5fc15e3d34041d3e1192ea2f17a9ed13df097806;p=16.git diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 4d10ab58..fa13d365 100644 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -593,13 +593,12 @@ modexPalWhite() { void modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset) { -//---- static word count=0; byte *p = bmp->palette; word w=0; word q=0; word qq=0; //word ii; - static word a[PAL_SIZE/3]; + static word a[PAL_SIZE/3]; //palette array of change values! word z=0, aq=0, aa=0, pp=0; //sword aqpw; @@ -643,18 +642,18 @@ modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset) */ //printf("qp=%d\n", qp); //printf(" (*i)=%d\n", (*i)/3); - printf(" (*i)=%d bmp->offset=%d aqoffset=%d\n", (*i)/3, (bmp->offset), aqoffset); - printf(" %d's color=%d\n", (*i)/3, (*i)-(bmp->offset*3));//+(aqoffset*3) - outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3))]); - (*i)++; - break; + //for(w=(*i); w<()){ + printf(" (*i)=%d a[%d]=%d\n", (*i), qp, a[qp]); +//0000 printf(" %d's color=%d\n", (*i), (a[qp])*3);//+(aqoffset*3) +//0000 outp(PAL_DATA_REG, p[((a[qp])*3)]);// fix this shit! + if((*i)+1==(qp*3)+3){ w++; /*(*i)++;*/ break; } } else { if(bmp->offset==0 && (*i)<3 && q==0) outp(PAL_DATA_REG, 0); else if(qp==0) outp(PAL_DATA_REG, p[(*i)-q]); - else outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3))]); + else outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3)/*+(aqoffset*3)*/)]); } } //if(qp>0) printf("qp=%d\n", qp); @@ -673,10 +672,6 @@ modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset) } else if(qp>0 && (*i)>=(qp*3) && (*i)<((qp*3)+3)) { - /* - note to self - use a[qp] instead of bmp->offset for this spot! - */ //printf("qp=%d\n", qp); //printf(" (*i)=%d\n", (*i)/3); printf(" (*i)=%d bmp->offset*3=%d (qp*3)=%d\n", (*i), (bmp->offset), (qp)); @@ -721,6 +716,28 @@ aqpee: for(lq=0; lqoffset for this spot! + NO! wwww + */ + + + + + /* + Facking bloody point the values of the changed palette to correct values.... major confusion! wwww + */ + + + + + + //(offset/bmp->offset)*bmp->offset + + + printf("%02d ",bmp->data[lq]+bmp->offset); + if(lq > 0 && lq%bmp->width==0) printf("\n"); //printf("%02d_", bmp->data[lq]+bmp->offset); /*if(bmp->data[lq]+bmp->offset==aq) { @@ -806,14 +823,16 @@ void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, wor printf("chkcolor start~\n"); printf("1 (*z): %d\n", (*z)/3); printf("1 (*i): %d\n", (*i)/3); +// printf("1 offset of color in palette (*q): %d\n", (*q)/3); + printf("wwwwwwwwwwwwwwww\n"); //check palette for dups for(; (*z)