&overlay transparency

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

&overlay transparency

Post by beowuuf »

Would it be possible to set a single colour in the overlay to be fully transparent?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

My original plan was to allow you to provide a
custom overlay function. Nobody seemed interested
so it never got done. I've written it down but there
are suddenly a lot of cards ahead of it.

There are 512 possible colors in the Atari viewport.
Many are genrally not used. An overlay has 256 colors.
That is 128k different combinations. A complete table
of 16-bit colors would require 256k bytes. That is one
way to go and is totally arbitrary. But it is big.
Another way to go is to let you write 'pseudo-code'
to generate a resulting color for each of the possible
128k possibilities and then it would be computed at runtime.

Code: Select all

OI 33 = IF VC ELSE OC Trans % VC 1-Trans % +% THEN
or something like that. It says that if the overlay color
index is number 33 use the viewport color else use transparency
as we do already. And we could add functions as
needed - like modifying the colors for the current light level.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Of course, I forgot about lighting too...

That second method does indeed sounds quite elegant. Since I know it is possible and carded then I will carry on drawing my 'conversation with a door' idea happily : )
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

conversation with a door
Yes. Quite. I see. And what is the strangest thing you have
done outside the DM world?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Who said anything about DM? I was just asking the door how to do object fetching,. Very knowledgeable doors.

DSAs really are fun... I can now have conversations with doors inside CSBwin aswell as outside! *I'm just geekily excited it works and looks not too bad*
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”