Re: understanding .pal files - XCC ForumRegister | Login | Search
History | Home | Messages

understanding .pal filessuicdman16:41 29-09-2005
Re: understanding .pal filesOlaf van der Spek17:13 29-09-2005
Re: understanding .pal filessuicdman17:44 29-09-2005
Re: understanding .pal filesOlaf van der Spek20:15 29-09-2005

> > > ive been looking at olaf's .pal file description and i cant understand them really. it says that its an array[0-255], so does this mean that its an array with 256 slots(i assume it is). and then it is a record of (red,green,blue;byte), so does this mean that each slot in the array is another array of each of these items?. so in c++ how can you read a .pal file, i just want to read it and experiment with it. can someone explain all this for me?

> > byte pal[768];
> > int i = 9;
> > int red = pal[3 * i];
> > int green = pal[3 * i + 1];
> > int blue = pal[3 * i + 2];

> (bare with me here)
> makes more sense now, but why is i = 9?

That's just an example. 0 to 255 are also valid.

> i assume i increases to put more entires into the array, right? how would you read a .pal file and enter all of the colors into the array?

With fread().

Olaf van der Spek

XCC Home Page


Re: understanding .pal filessuicdman23:48 29-09-20054
    Re: understanding .pal filesOlaf van der Spek05:30 30-09-2005
        Re: understanding .pal filesMorden Tral04:55 08-10-2005
    Re: understanding .pal filesmeselfs18:49 30-09-2005


Home | Post | Users | Messages