Page 1 of 1
Transparency not respected in CONTROL_BACKGROUND
Posted: Wed Jan 23, 2013 2:57 pm
by Gambit37
Transparency is not respected in the CONTROL_BACKGROUND image - both 8-bit powerpink and 32-bit alpha is ignored.
Re: Transparency not respected in CONTROL_BACKGROUND
Posted: Wed Jan 23, 2013 7:59 pm
by Sophia
You're correct. It is not.

Re: Transparency not respected in CONTROL_BACKGROUND
Posted: Wed Jan 23, 2013 8:22 pm
by Gambit37
You tease
One thing I don't get about these sorts of issues is this: surely once you add support for transparency into the engine via Allegro, shouldn't it "just work" everywhere? I realise I'm showing my ignorance here...
Re: Transparency not respected in CONTROL_BACKGROUND
Posted: Thu Jan 24, 2013 12:10 am
by Sophia
The actual current bug in my mind is that the GUI shows the background image. I intended for it to be black all the time, so there wasn't any point in respecting that stuff. Of course, we can talk about whether that's what should happen.
Anyway, it doesn't "just work." Allegro 4 has about a million different commands to blit things, depending on whether you want power pink transparency, alpha, and so on. Nowadays most of the game's rendering code goes through a couple of functions that just automagically sort it all out, but GUI rendering code that I wrote like 5 years ago (before DSB had alpha support) slipped through the cracks.
Re: Transparency not respected in CONTROL_BACKGROUND
Posted: Thu Jan 24, 2013 12:42 am
by Gambit37
Aha, I see, thanks for explaining
Re, the control_background, now that I have a fully textured interface, I need a way of overlaying the control_background over that texture with semi-transparency (you know, when you've clicked Save and it pops up in place of the inventory -- parts of the full interface background need to show through the control_background.)
Since the same image is also used at game start to load a save game, but the background is fully black, the transparency would need to be respected there too.
I think the buttons that are overlaid also don't respect transparency, I've not fully tested that yet.