Transparency not respected in CONTROL_BACKGROUND

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Transparency not respected in CONTROL_BACKGROUND

Post by Gambit37 »

Transparency is not respected in the CONTROL_BACKGROUND image - both 8-bit powerpink and 32-bit alpha is ignored.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Transparency not respected in CONTROL_BACKGROUND

Post by Sophia »

You're correct. It is not. :)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Transparency not respected in CONTROL_BACKGROUND

Post 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...
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Transparency not respected in CONTROL_BACKGROUND

Post 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.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Transparency not respected in CONTROL_BACKGROUND

Post 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.
Post Reply