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

Implement dark overlay for menus and automap #547

Merged
merged 5 commits into from
Dec 7, 2024

Conversation

andrikpowell
Copy link
Contributor

@andrikpowell andrikpowell commented Dec 2, 2024

This PR adds the dark overlay that Woof has.

I've implemented it via V_DrawShaded which gets directed to two different functions depending on OpenGL or Software (this is how most render functions currently work in DSDA Doom)

The V_DrawShaded function includes a gradual fade option (dboolean animate) that's used in Nyan Doom, although I've set it to false in both instances that it's used here to match Woof's implementation.

The automap now has 3 overlay settings in the same way Woof does: "No Overlay", "Overlay 1" (what DSDA already had), and "Overlay dark" which adds a translucent background. The dark overlay is also compatible with the DSDA Doom Minimap.

The final commit here is probably the most controversial, but I wanted to bring it up here. It's because of this commit that implementing the dark overlay was actually harder to get working for DSDA Doom compared to Nyan Doom. In order for Nyan Doom to support overlapping HUD icons and statusbar animations, I have the statusbar always refresh in Software just as it does in OpenGL. In my testing I haven't run into issues or slowdown by doing this, and it fixes many statusbar bleed issues with PWADs such as "Pirate Doom II" and "200 Line Christmas".

@andrikpowell
Copy link
Contributor Author

I've done a force-push as I found an issue regarding the overlay menu and STBAR... However this force push fixes all the STBAR issues for Doom and Raven.

@andrikpowell
Copy link
Contributor Author

The final commit here is probably the most controversial, but I wanted to bring it up here. It's because of this commit that implementing the dark overlay was actually harder to get working for DSDA Doom compared to Nyan Doom. In order for Nyan Doom to support overlapping HUD icons and statusbar animations, I have the statusbar always refresh in Software just as it does in OpenGL. In my testing I haven't run into issues or slowdown by doing this, and it fixes many statusbar bleed issues with PWADs such as "Pirate Doom II" and "200 Line Christmas".

I've decided to extract this and place it into another pull request... It's not that related to this PR, and is honestly a separate issue altogether.

@rfomin
Copy link
Collaborator

rfomin commented Dec 3, 2024

Set to OpenGL mode, go to the general menu and wait a few minutes - the background will start to flicker. On my system it seems to happen more often with VSync turned off.

@Pedro-Beirao
Copy link
Collaborator

So the map overlay keybind cycles thru these 3 options. I dont like that since I use overlay when playing, but when I want to check the map name, coords, etc, I switch to no overlay.

This will make me have to cycle thru 1 more option. Its one of those small changes that affect the players in annoying ways. I think it would be best to have an option in the automap menu to decide if the overlay is faded or not.

@Pedro-Beirao
Copy link
Collaborator

[Bug] Being in the faded menu, but then pressing CMD+Q (Mac keybind to bring up the "Are u sure u want to quit" prompt)and then cancelling: keeps the titlepic faded, and is only fixed after pressing Esc to bring up the menu again

This doesnt happen with the Texture option

@Pedro-Beirao
Copy link
Collaborator

Can you remove the animate logic altogether? Since its always false + it looks better with no fade

@andrikpowell
Copy link
Contributor Author

I've removed (or extracted for Nyan Doom) the overlay fade logic. Point is it's now gone for DSDA Doom.

In addition, I've fixed the Mac "CMD + Q" overlay issue.

I spent a full day trying another approach for the overlay logic, but it wasn't very compatible with disabling itself when the automap overlay is present, so I think the current way is better... I really don't wanna talk about how long I spent on this...

I plan on moving onto the revising the automap logic next :)

@andrikpowell
Copy link
Contributor Author

Ready for automap dark overlay review

Copy link
Collaborator

@rfomin rfomin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works well from my testing, thank you!

prboom2/src/am_map.c Outdated Show resolved Hide resolved
prboom2/src/m_menu.c Outdated Show resolved Hide resolved
prboom2/src/m_menu.c Outdated Show resolved Hide resolved
@andrikpowell andrikpowell force-pushed the dsda-dark-overlay branch 3 times, most recently from 16765a0 to bfb2739 Compare December 7, 2024 07:23
prboom2/src/m_menu.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@rfomin rfomin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@andrikpowell
Copy link
Contributor Author

Ok, fixed up PR and simplified commits 👍

@Pedro-Beirao
Copy link
Collaborator

Pedro-Beirao commented Dec 7, 2024

Please make Textured be the default mode for Menu Background. Like it was before

And I see that Textured only "kicks in" when going into sub-menus of Options, while Dark is straight when going into Options. Its inconsistent, but I kind of like it like this (and woof does the same). So no need to change this, just wanted to note it

@Pedro-Beirao Pedro-Beirao merged commit 7537262 into kraflab:master Dec 7, 2024
5 checks passed
@Pedro-Beirao
Copy link
Collaborator

Thanks!

@andrikpowell andrikpowell deleted the dsda-dark-overlay branch December 8, 2024 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants