]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/modex16.c
added screen 2 gfor more details wwww
[16.git] / src / lib / modex16.c
index 4d10ab58e75ae9fca19192ccda0e4683a55c0ac6..786cd1faa3072d66e18cc24bcf8925de490dce96 100644 (file)
@@ -599,7 +599,7 @@ modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset)
        word q=0;
        word qq=0;
        //word ii;
-       static word a[PAL_SIZE/3];
+       static word a[PAL_SIZE];
        word z=0, aq=0, aa=0, pp=0;
        //sword aqpw;
 
@@ -643,18 +643,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]);
+                               printf("                %d's color=%d\n", (*i), (a[qp])*3);//+(aqoffset*3)
+                               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);
@@ -812,8 +812,8 @@ void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, wor
 //                     printf("\n              z: %d\n", (*z));
 //                     printf("                q: %d\n", (*q));
 //                     printf("                z+q: %d\n\n", ((*z)+(*q)));
-                       if((*z)%3==0)
-                       {
+                       //if((*z)%3==0)
+                       //{
 //----                         if(pal[(*z)]==pal[(*z)+3] && pal[(*z)+1]==pal[(*z)+4] && pal[(*z)+2]==pal[(*z)+5])
                                if((*z)==(*i))
                                {
@@ -845,8 +845,16 @@ void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, wor
 //                                                     printf("        z : %d  [%02d][%02d][%02d] offset value~\n", (*z)/3, pal[(*z)], pal[(*z)+1], pal[(*z)+2]);
 //++++                                                 (*i)--;
 //                                                     (*z)--;
-                                                       a[(((*z)+(*q))/3)]=zz/3;
-                                                       (*aa)=(((*z)+(*q))/3);
+
+                                                       //expand dong here
+/*
+planned features that i plan to implement~
+image that has values on the pallete list!
+wwww 
+
+*/
+                                                       a[(((*z)+(*q)))]=zz;
+                                                       (*aa)=(((*z)+(*q)));
                                                        printf("!!                              a[%02d]: %d\n", (((*z)+(*q))/3), zz/3);
 //                                                     printf("\n              aa: %d\n\n", (*aa));
 //                                                     printf("        a[%02d]=(%02d) offset array i think the palette should be updated again~\n", ((*z)+(*q))/3, a[((*z)+(*q))/3]);
@@ -866,7 +874,7 @@ void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, wor
                                //printf("\nz:  %d\n", z);
                                //printf("q:    %d\n", q);
                                //printf("zz:   %d\n", zz);
-                       }
+                       //}
                }
                printf("2                               (*z): %d\n", (*z)/3);
                printf("2                               (*i): %d\n", (*i)/3);