Definition of Varaction 2 variable 1B?
Posted: 06 Feb 2008 22:00
I am almost done making a transparency-options toolbar for TTDPatch like OpenTTD's toolbar:
I had hoped that Open provided a defined behaviour for variable 1B, bit 4 (transparency) that I could copy, but it does not.
On discussion, there are two competing views of the definition for that bit:
1) That bit is clear[0] if anything is transparent, and set if nothing is transparent. An additional variable should be provided to specify which items are transparent.
2) That bit is clear if the current feature is being drawn transparently, and set if the current feature is being drawn non-transparently.
Both mean a change. For #1, transparency might even be indicated just because station signs are being drawn transparently (CC text without a background box, instead of black text on a CC background box). For #2, transparency would not be indicated to things like vehicles and cargos, unless it becomes possible to, for example, toggle transparency for vehicles.
So, I think the questions are:
A) Which is less likely to break existing code, if any?
B) Which would you consider more useful?
[0] Logical or not, this part is obvious. Clear means transparent and set means non-transparent.
(That question-mark is for toggling invisible trees, and yes, I need a new sprite for that, but that's not particularly germane to this discussion.)I had hoped that Open provided a defined behaviour for variable 1B, bit 4 (transparency) that I could copy, but it does not.
On discussion, there are two competing views of the definition for that bit:
1) That bit is clear[0] if anything is transparent, and set if nothing is transparent. An additional variable should be provided to specify which items are transparent.
2) That bit is clear if the current feature is being drawn transparently, and set if the current feature is being drawn non-transparently.
Both mean a change. For #1, transparency might even be indicated just because station signs are being drawn transparently (CC text without a background box, instead of black text on a CC background box). For #2, transparency would not be indicated to things like vehicles and cargos, unless it becomes possible to, for example, toggle transparency for vehicles.
So, I think the questions are:
A) Which is less likely to break existing code, if any?
B) Which would you consider more useful?
[0] Logical or not, this part is obvious. Clear means transparent and set means non-transparent.