Re: [AD] Documentation update

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


> On 2005-03-22, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> > > if (bitmap_color_depth(screen) == 8)
> >
> > shouldn't that be
> > if (get_color_depth() == 8) ?
> >
> > This change could/should probably be made in other areas of
> > the docs and some example programmes as well. I'd pretty much
> > forgot about get_color_depth() myself until someone reminded me
> > of its existance.

I don't think so. get_color_depth() will return current selected color
depth. But this one doesn't have to be screen color depth, see my
example:

set_color_depth(32);
set_gfx_mode(GFX_SAFE, 320, 240, 0, 0);
allegro_message("%d - %d", get_color_depth(), bitmap_color_depth(screen));
set_color_depth(16);
allegro_message("%d - %d", get_color_depth(), bitmap_color_depth(screen));




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