Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep color from [highcontrast] in [dragon] #2419

Closed
dankamongmen opened this issue Dec 4, 2021 · 14 comments
Closed

keep color from [highcontrast] in [dragon] #2419

dankamongmen opened this issue Dec 4, 2021 · 14 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@dankamongmen
Copy link
Owner

ncchannels_reverse() claims to invert the colors, but not touch anything else (including alpha). But it is illegal to have anything other than NCALPHA_OPAQUE with default colors (which is weird -- why can't you have NCALPHA_TRANSPARENT?).

@dankamongmen dankamongmen added bug Something isn't working documentation Improvements or additions to documentation labels Dec 4, 2021
@dankamongmen dankamongmen added this to the 4.0.0 milestone Dec 4, 2021
@dankamongmen dankamongmen self-assigned this Dec 4, 2021
@dankamongmen
Copy link
Owner Author

I've changed up ncchannel_set_default() and ncchannel_set_palindex() so that they can both stay in NCALPHA_TRANSPARENT.

@dankamongmen
Copy link
Owner Author

I've changed up ncchannel_set_default() and ncchannel_set_palindex() so that they can both stay in NCALPHA_TRANSPARENT.

so the problem there is that in postpaint_cell() we change anything that is NCALPHA_TRANSPARENT to the default color, moving it to OPAQUE along the way. this is done, so far as i can tell/remember, so that we compare equal to default cells in cellcmp_and_dup_far(). if we comment out that transmogrification, [dragon] clears its background on transition from [highcontrast], for instance. this happens because the blitter is explicitly setting cells TRANSPARENT, as it must.

but so if you get to the bottom with TRANSPARENT and don't get converted to default, how does that matter for [dragon]? either way, you're going to mismatch against the residue from [highcontrast] and force a damage, right? how is this working normally?

@dankamongmen
Copy link
Owner Author

so currently, the residue is left up, but it's stripped of color--it all switches to the default. so clearly the default case is having effect there. why do we hide the residue with the fg transition removed?

@dankamongmen
Copy link
Owner Author

yep, sure enough, there's a huge chunk of damage with these removed that isn't there normally. how?

@dankamongmen
Copy link
Owner Author

there seems deep evil at work here...or i'm on a goose chase

@dankamongmen
Copy link
Owner Author

because frankly i'd like to have [dragon] atop the colored output from [highcontrast]. it does not seem we can do that currently.

@dankamongmen
Copy link
Owner Author

hrmmm it seems to be damaged in both scenarios:

-CHANNELS: 0x6000000060000000 0x4000ad8040000000                                                                                    
+CHANNELS: 0x0000000000000000 0x4000ad8040000000                                                                                    
 STYLEMASK: 0x0000 0x0000                                                                                                           
 GC: 0x0000006c 0x0000006c                                                                                                          
 damaging due to cmp [l] 14 35    

but in one we rast a space:

-RAST 00000020 [ ] to 14/35 cols: 1 6000000060000000 

and in one we don't:

+RAST 0000006c [l] to 14/35 cols: 1 0000000000000000   

why?

@dankamongmen
Copy link
Owner Author

we show the right value (0x6c) in postpaint_cell(). how is it becoming 0x20 by raster time?

@dankamongmen
Copy link
Owner Author

ahh the space is coming from the rgbequal hack introduced near the end of 3.0.0!

@dankamongmen dankamongmen changed the title ncchannels_reverse() results in illegal states keep color from [highcontrast] in [dragon] Dec 4, 2021
@dankamongmen dankamongmen modified the milestones: 4.0.0, 3.1.0 Dec 16, 2021
@dankamongmen
Copy link
Owner Author

so is the issue just that the blitter shouldn't be marking all that stuff transparent? if it is marking it transparent, shouldn't it be clearing the glyph?

could we just blit to a different plane, rather than the standard plane?

@dankamongmen
Copy link
Owner Author

so yeah, i think the cell blitters ought be zorching any cell onto which they're blitting transparently. yes, that's pretty certain.

and [dragon] ought be blitting to a second plane.

@dankamongmen
Copy link
Owner Author

alright, clearing the cell when transparent seems both well-advised and works as expected. in the absence of other changes, it clears the background for [dragon]. now we'll throw up a second plane.

@dankamongmen
Copy link
Owner Author

2021-12-16-210144_1392x1410_scrot

got it, nice.

@dankamongmen
Copy link
Owner Author

alright, both issues are addressed. good stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant