/* colour-conv.m,
 *
 * A prewritten colour conversion thingos.
 */

#include <allegro.h>
#include "colour-conv.h"


/* set_colour_conversion_keep_alpha keeps the alpha channel for images
   which have alpha, and converts other to the current colour
   depth. */
void set_colour_conversion_keep_alpha(void)
{
    /* int depth = get_color_depth(); */
    int depth = bitmap_color_depth(screen);

    if (depth == 32)
	;//set_color_conversion(COLORCONV_32_TO_16);
    else if (depth == 24)
	set_color_conversion(COLORCONV_32_TO_24);
    else if (depth == 16)
	set_color_conversion(COLORCONV_32_TO_16|COLORCONV_24_TO_16);
    else if (depth == 15)
	set_color_conversion(COLORCONV_32_TO_15|COLORCONV_24_TO_15);

}
