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

Heretic: Adding A11Y Features: Weapon Flash Lighting & Sprite, Palette Changes, Invul Colormap, Extra Lighting #1258

Merged
merged 10 commits into from
Jan 13, 2025

Conversation

Noseey
Copy link

@Noseey Noseey commented Jan 12, 2025

Related Issue:
None - I can open one if required.

Changes Summary
Added the following A11Y Features in Crispy-Heretic (to align with Crispy-Doom):

  • Weapon Flash Lighting (also disables Torch Flickering)
  • Weapon Flash Sprite
  • Palette Changes
  • Invulnerability Colormap
  • Extra Lighting

The Blinking of diminishing Powers (Torch, Invul) remains active as an indicator for the player.

Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

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

I'm not familiar with Heretic's color maps, but the code looks good to me.

@@ -992,7 +993,14 @@ void R_SetupFrame(player_t * player)
sscount = 0;
if (player->fixedcolormap)
{
fixedcolormap = colormaps + player->fixedcolormap
tmpColormap = player->fixedcolormap;
if ((!a11y_invul_colormap && player->powers[pw_invulnerability]) ||
Copy link
Owner

Choose a reason for hiding this comment

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

This part is a bit confusing.

Copy link
Author

Choose a reason for hiding this comment

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

My first idea was to handle the disabling of the invul colormap and torch flickering directly within P_PlayerThink (p_user.c ), however I found that for the torch flickering, a M_Random call is involved. So I refrained from changing it there but instead did it right before the colormap is applied.

grafik

So assigning the colormap to 1 (stable "infrared") to either deactive the invul or to stablize the torch.

Copy link
Owner

Choose a reason for hiding this comment

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

Maybe you could add a comment or two to make clear what happens here.

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I added a few comments!

Copy link
Owner

Choose a reason for hiding this comment

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

Very good, thank you very much!

@@ -978,8 +979,9 @@ void R_DrawPlayerSprites(void)
if (psp->state)
{
// [crispy] Draw offset base frame and translucent current frame
if (crispy->translucency & TRANSLUCENCY_ITEM &&
!(viewplayer->powers[pw_invisibility] > 4*32 || viewplayer->powers[pw_invisibility] & 8))
if (!a11y_weapon_pspr ||
Copy link
Owner

Choose a reason for hiding this comment

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

So, here you are using the translucent variable to "mark" the attack sprite?

Copy link
Author

Choose a reason for hiding this comment

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

If the weaponsprites are disabled, the "translucent" variable would mark that a base-frame (idle with y-offset) was drawn instead and the real attack-frame can be discarded. In case the weaponsprites and transparency option is enabled, the variable would instead be used to draw a transparent attack-frame in addition to the base-frame.

Maybe renaming it would be helpful, just need to find a good name.. 😉

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, a comment and a renaming of the translucent variable would be welcome. How about attackframe?

Copy link
Author

Choose a reason for hiding this comment

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

I did an update, let me know if it was for better or worse. 😁

@fabiangreffrath fabiangreffrath merged commit cd6c427 into fabiangreffrath:master Jan 13, 2025
6 checks passed
@Noseey Noseey deleted the Heretic_a11y_Feature branch January 13, 2025 19:39
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.

2 participants