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

Color demo progress bar for Heretic and Hexen #477

Closed
wants to merge 1 commit into from

Conversation

kitchen-ace
Copy link
Contributor

Palette colour 4 in those games is near-black, while 255 is white.

@fabiangreffrath
Copy link
Contributor

Alternatively, you could determine the lightest and darkest color in the current palette during init and use these.

https://github.com/fabiangreffrath/woof/blob/8412588aff0b6247f7a601625480de614aa1064c/src/v_video.c#L259-L260

@@ -756,7 +756,7 @@ int HU_DrawDemoProgress(int force)

prev_len = len;

V_FillRect(0, 0, SCREENHEIGHT - 4, len - 0, 4, 4);
V_FillRect(0, 0, SCREENHEIGHT - 4, len - 0, 4, (dsda_Flag(dsda_arg_heretic) || dsda_Flag(dsda_arg_hexen)) ? 255 : 4);
Copy link
Owner

Choose a reason for hiding this comment

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

The shorthand for this is raven ? 255 : 4. But I would probably add a variable because I try to avoid having value branches like this all over the place.

Take a look at https://github.com/kraflab/dsda-doom/blob/master/prboom2/src/dsda/global.c#L127 and add something like g_demo_progress_color.

@kraflab
Copy link
Owner

kraflab commented Jul 20, 2024

844d49c

@kraflab kraflab closed this Jul 20, 2024
@kitchen-ace
Copy link
Contributor Author

Thanks, I got busy and then forgot all about this.

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