From: orz Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro True Color Date: Mon, 23 Feb 1998 19:19:01 -0800 Organization: Worcester Polytechnic Institute Lines: 36 Message-ID: <34F23C25.37ED@atticus.com> References: <01bd40ae$8a128a80$871e89ce AT rosenbrock DOT parlorcity DOT com> NNTP-Posting-Host: orz.res.wpi.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk A Bester wrote: > I seem to be missing something about True Color graphics modes... > I've set_color_depth(15) and set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0). > How many palette registers should I have? Specifically, I'm trying to set > up a screen that I can treat as 256x256 with 512 palettes. Have I gone > wrong here? 15, 16, 24, and 32 bit modes don't use a palette (a palette for 24 bit mode would take 48 megabytes). A given number is always the same color. > After that, how can I go about generating the palette? Do I continue to use > set_color()? I need to be able to copy values from a table and copy them > into the palette. And how many bits per r, g, or b do I have? In 15 and 24 bit modes the bits are split evenly among red, green, and blue. 32 bit mode is the same as 24. In 16 bit mode the extra bit goes to green. > Is the answer to create my own registers in an array, and then use > line[x][y]=makecol15(palette[reg]->r, palette[reg]->g, palette[reg]->b) as > the parameter? Yes, that would work, though if I'm interpreting your suggestion correctly there should be a . between the ] and the structure member instead of an ->. If you use that method pretend you have 8 bits each for red, green, and blue. p.s. Actualy the above isn't entirely true, at least on my video card. When in 15 bit mode I CAN use hardware palette support: when the normally unused bit 15 is set to high it ignores bits 8-14 and uses bits 0-7 as a palette entry just like in 8 bit mode. Unfortunately, I don't know if that is standard or just a nifty little feature of my video card. >I've RTFM, but I still don't get it.