Mail Archives: djgpp/2000/01/21/12:50:46
Night Walker writes:
> I must draw a translucent 8bpp bitmap on a 15/16/24/32bpp screen.
> Which functions I must call to create the trans table(s?)?
You can't, because Allegro doesn't support mixing color depths like
that. See "info allegro converting" for a full explanation, but in
brief, only the blit() function has full support for mixing different
color depths (it's the workhorse routine used to convert between
formats), while a few other routines have support for specific useful
and simple combinations, for example draw_sprite() is able to display
256 color source images on any format of destination. But in general,
mixing formats doesn't work, and should be avoided. The easy approach
is to convert all your images into the screen format while they are
being loaded: Allegro makes this very easy if you use the
set_color_conversion(), load_datafile(), and/or load_bitmap() calls.
Shawn Hargreaves.
- Raw text -