================================================================
#1 gives perfect results with non-alpha 8-bit bitmaps. My popup is rendered correctly over the inventory:
Code: Select all
function sys_render_other(bmp, gui_name, frozen)
dsb_bitmap_clear(bmp, color.powerpink)
dsb_bitmap_draw(gfx.ui_stats_popup, bmp, 192, 38, false)
{render out the stats text}
end
================================================================
#2 I replace my popup with a 32-bit bitmap which contains alpha transparency. It gets blended with the powerpink of the cleared "parent" bitmap:
Code: Select all
function sys_render_other(bmp, gui_name, frozen)
dsb_bitmap_clear(bmp, color.powerpink)
dsb_bitmap_draw(gfx.ui_stats_popup_ALPHA, bmp, 192, 38, false)
{render out the stats text}
end
================================================================
#3 I change the bitmap clearing method to use the alpha clearing method instead (that you previously suggested in a different thread). Now the popup renders its alpha correctly, but subsequent drawing onto this bitmap is also affected (the text is now transparent!). Note that other gui_zones are now not rendered at all (the red circle):
Code: Select all
function sys_render_other(bmp, gui_name, frozen)
bitmap_clear_alpha(bmp, color.black)
dsb_bitmap_draw(gfx.ui_stats_popup_ALPHA, bmp, 192, 38, false)
{render out the stats text}
end
================================================================
#4 Let's repeat example #3, but BLIT the alpha popup rather than DRAW it. Same results as #3:
Code: Select all
function sys_render_other(bmp, gui_name, frozen)
bitmap_clear_alpha(bmp, color.black)
dsb_bitmap_blit(gfx.ui_stats_popup_ALPHA, bmp, 0, 0, 192, 38, 284, 262)
{render out the stats text}
end
================================================================
#5 Let's repeat example #4, but clear the parent bitmap to powerpink again, rather than the alpha clear to black. Other gui_zones now show up again correctly (the main stats bottom left), but the popup is still mangling the text:
Code: Select all
function sys_render_other(bmp, gui_name, frozen)
dsb_bitmap_clear(bmp, color.powerpink)
dsb_bitmap_blit(gfx.ui_stats_popup_ALPHA, bmp, 0, 0, 192, 38, 284, 262)
{render out the stats text}
end
================================================================
Hopefully you can help me either (a) clear up my code to work correctly or (b) fix what might be a bug...? I'm pretty confused by all this now...!