Is there a quick method of writing the values of an 8bit bit map to the alpha channel of a 32bit bitmap, without changing the RGB components of the 32bit bitmap?
Alternatively, is there a quick method of writing the alpha channel of a 32bit bitmap to the alpha channel of another 32bit bitmap without changing the RGB components of the second bitmap (the one being written to)?
[edit]
Worked it out :
// image = 32 bit image, size of buffer == size of screen // trans = 8 bit image representing what the alpha channel on image should be drawing_mode(DRAW_MODE_TRANS, NULL, 0, 0); set_write_alpha_blender(); draw_trans_sprite(image, trans, tx, ty); set_alpha_blender(); draw_trans_sprite(buffer, image, 0, 0);
[/edit]