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 Translucency Option #1251

Merged

Conversation

Noseey
Copy link

@Noseey Noseey commented Dec 30, 2024

Related Issue:
Closes #1250

Changes Summary

  • Adding Translucency Option to Heretic based upon Doom solution
  • Expanding Crispy-Menu.
  • Translucency supported for:

Option 1 (Projectiles):

  • Own Weapon Projectiles
  • Enemy Projectiles and Enemy Special Effects
  • Various Environmental Things (Volcano-Balls, Goo-Pod explosions...)

Option 2 (vanilla Weapon flash)

  • Weapon firing flashes to be transparent when using vanilla weapon sprites, by use of y-offsets and drawing transparent firing-frames over weapon idle-frames.

.. or both Options together.

Added separate Offset struct, reworked drawing of player sprites.
- Use Item for Weapon-Flash selection
- Added MISCMISSILE Flag to further projectile effects.
- Restructured conditions (work in progress).
- fix typo for MISCMISSILES
- Rearrange Menu
- added/removed some translucent effects.
- make goopods translucent upon explosion.
- make leadermummy translucent upon facing enemy for ranged-attack.
.. instead of assigning it upon explosion.
…cleanup flags

- remove translucency flag from goldwand ammo
- adding / moving comments
- fixing whitespace.
Should not draw base frame when being invisible anyways.
// [crispy] translucent sprites
else if (crispy->translucency && vis->mobjflags & MF_TRANSLUCENT)
{
if ((vis->mobjflags & (MF_NOGRAVITY | MF_MISCMISSILE | MF_MISSILE) && crispy->translucency & TRANSLUCENCY_MISSILE) ||
Copy link
Author

Choose a reason for hiding this comment

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

I tagged effects with MF_MISCMISSILE since some of them were neither MF_NOGRAVITY nor MF_MISSLE, and I still felt they should be translucent. If we stay with the current foreseen options, I think the flag and this whole condition might not be needed and I will remove or rework them. What do you think?

Copy link
Owner

@fabiangreffrath fabiangreffrath Dec 30, 2024

Choose a reason for hiding this comment

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

Frankly, I'd prefer if we could get away without a second flag. But if it makes things easier, that'd be alright as well. But please add some elaborate comments if you decide to go that way.

Copy link
Author

Choose a reason for hiding this comment

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

The flag is now removed and the condition reworked.

{
{TRANSLUCENCY_OFF, "OFF"},
{TRANSLUCENCY_MISSILE, "PROJECTILES"},
{TRANSLUCENCY_ITEM, "VANILLA WEAPON FLASH"},
Copy link
Author

Choose a reason for hiding this comment

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

I used the item for the vanilla weapon flash instead, to have the "both" option (binary 11) working correctly.

Copy link
Owner

Choose a reason for hiding this comment

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

Fine with me, but please drop the "Vanilla" part. This is an implementation detail that needn't get exposed in the in-game menu.

Copy link
Author

Choose a reason for hiding this comment

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

I have changed the description and removed the vanilla part.

@@ -67,6 +90,21 @@ int maxframe;
const char *spritename;


// [crispy] Y-Offsets for various sprite frames used for weapon fire translucency
spriteoffset_t spriteoffsets[NUMSOFFSETS] = {
Copy link
Owner

Choose a reason for hiding this comment

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

One last thing, could you write these as multiples of FRACUNIT (e.g. 0x80000 = 8 * FRACUNIT), please?

Copy link
Author

Choose a reason for hiding this comment

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

I changed it accordingly and also corrected a 1px mismatch for the Hellrod base-frame.

Using FRACUNIT and doing a 1px correction for HROD_F1.
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.

Thank you very much!

@fabiangreffrath fabiangreffrath merged commit ccdea7c into fabiangreffrath:master Jan 2, 2025
6 checks passed
@Noseey Noseey deleted the Heretic_Translucency_Option branch January 4, 2025 19:31
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.

[Suggestion] Heretic: Translucency Option
2 participants