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

Colors are not restored on exit #81

Closed
mnml opened this issue Oct 4, 2019 · 1 comment · Fixed by #83
Closed

Colors are not restored on exit #81

mnml opened this issue Oct 4, 2019 · 1 comment · Fixed by #83

Comments

@mnml
Copy link
Contributor

mnml commented Oct 4, 2019

On my specific setup (using WSL and the Windows Console), the colors are changed after exiting the game (note the brighter green and white in the last image):

image
image
image

I can think of two possible solutions:

  1. Saving the color values before calling init_color in colors.c, and restoring them on exit.
  2. Not using init_color at all, instead leaving the colors up to the player's terminal settings.

Also, I noticed the rat in the middle image is white, even though it's set to COLORS_RED in the code:

rulebook[book_length].pic = 'r'|A_BOLD| COLORS_RED;

I suspect the A_BOLD is somehow responsible (maybe causing it to use a different color value?).

I'd be more than happy to make a pull request implementing whichever solution is deemed more preferable. I'm partial to option 2, since it would probably fix the enemy color bug, while also allowing players to customize their colors if they find the current ones undesirable (e.g. due to color blindness).

@JohnathonNow
Copy link
Collaborator

Option 2 sounds good to me.

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 a pull request may close this issue.

2 participants