-
Notifications
You must be signed in to change notification settings - Fork 133
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
Heretic: Adding A11Y Features: Weapon Flash Lighting & Sprite, Palette Changes, Invul Colormap, Extra Lighting #1258
Conversation
based upon doom solution.
There was a problem hiding this 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]) || |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
So assigning the colormap to 1 (stable "infrared") to either deactive the invul or to stablize the torch.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 || |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.. 😉
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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. 😁
Related Issue:
None - I can open one if required.
Changes Summary
Added the following A11Y Features in Crispy-Heretic (to align with Crispy-Doom):
The Blinking of diminishing Powers (Torch, Invul) remains active as an indicator for the player.