Re: [AD] TGA palette patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Michael Bukin <M.A.Bukin@xxxxxxxxxx> wrote:
> Peter Wang <tjaden@xxxxxxxxxx> writes:
> 
> > +	 case 24:
> > +	 case 32:
> > +	    pal[i].b = pack_getc(f);
> > +	    pal[i].g = pack_getc(f);
> > +	    pal[i].r = pack_getc(f);
> 
> Just to clarify: do these values contain 6bit for each color
> component, or do they contain 8bit?  In the latter case, it might be
> necessary to convert data to 6bit, or palette data should be loaded
> into image_palette array, not to pal directly.

Oops!  That should have been replaced.

Thanks, Michael.

--- tga.c.old   Tue Aug  8 16:06:07 2000
+++ tga.c       Tue Aug  8 16:07:22 2000
@@ -223,9 +223,9 @@
 
         case 24:
         case 32:
-           pal[i].b = pack_getc(f);
-           pal[i].g = pack_getc(f);
-           pal[i].r = pack_getc(f);
+           image_palette[i][0] = pack_getc(f);
+           image_palette[i][1] = pack_getc(f);
+           image_palette[i][2] = pack_getc(f);
            if (palette_entry_size == 32)
               pack_getc(f);
            break;



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/