Mail Archives: djgpp/1997/06/15/18:32:16
On 12 Jun 1997 21:01:12 GMT, suganuma AT jaist DOT ac DOT jp (SUGANUMA yoshinori) wrote:
>Hello.
>
>I would like to use 256 grayscale colors with djgpp.
>Is it possible? and are there any libraries to do so?
>
>I tried allegro2.2 with GFX_ET4000 gfx_mode, but I could only
>obtain 64 grayscale colors.
>e.g.
>set_gfx_mode(GFX_ET4000,640,480,0,0);
>for(c=0;c<256;c++){
> pallete[c].r=c;
> pallete[c].g=c;
> pallete[c].b=c;
>}
>These palletes seem to repeat 64 grayscale colors for 4 times
>with my video card, ET-4000/W32 2Mram.
Indeed, any 256 colour mode will have this limitation, because when VGA
was created, they only allowed a value between 0 and 63 (inclusive) to be
stored, therefore only 64 shades of true black / white are available, therefore
in a 256 colour palette, you will simply get the same 64 colours (256/64) 4
times over. As I say, this is a limitation of VGA and those 256 colour modes
based upon it, and not a software problem.
-Thomas
>
>Thanks.
>
>--
>suganuma
- Raw text -