-
Notifications
You must be signed in to change notification settings - Fork 31
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
add darkcolormap to shade the screen during drawing #1610
base: master
Are you sure you want to change the base?
Conversation
Thanks, but I think you are over-engineering this. If you want to fix #1609 and help spot HOMs, then we could either (1) draw them in a brighter color, or (2) ask users to use the menu without backdrop or (3) use pause instead of the menu to interrupt the game. |
Also, does it hep if we let HOMs blink based on |
It's not about the HOM cheat or the menu background, it's about the automap overlay. There are some PWADs that use HOM as a visual effect, wow.wad is one of them. HOM pixels are not "refreshed" every frame, so if we use the current |
Ah, now I see. But, instead of duplicating drawing functions or introducing more branching into drawing functions I'd recommend to introduce a function pointer for pixel drawing and use this in the drawing functions. static byte draw_pixel_regular (byte src) {return colormap[brightmap[src]][src];};
static byte draw_pixel_shaded (byte src) {return darkcolormap[colormap[brightmap[src]][src]];};
static byte (*draw_pixel) (byte src) = draw_pixel_regular;
void R_ShadeScreen(boolean on)
{
if (on)
{
draw_pixel = draw_pixel_shaded;
}
else
{
draw_pixel = draw_pixel_regular;
}
} However, this doesn't solve the problem of shading the HUD elements and status bar. Is this really worth the effort? |
It's not hard to add a "shade" option to a patch drawing, but yeah, I'm not sure it's worth it. If we already had a system for drawing parameters, we can add another option to it. Maybe we should have such a system, for example we could remove |
If we had such a system, we'd be one step closer to truecolor rendering. 🤔 |
Just a note that this method has a nice performance boost over the old one, so it may be worth pursuing for that reason alone. For example, compare the master branch and this one at native resolution with dark overlay automap. |
Fix #1609
This is unfinished. I think we should duplicate r_draw functions for this, or introduce some other system for changing drawing parameters.