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
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
41de092
Heretic: Adding Translucency Option - not functionally yet
Noseey Dec 18, 2024
f2ebddc
Heretic: Adding certain sprites to be translucent and disable item/pr…
Noseey Dec 18, 2024
88b613f
Heretic: Adding further translucency effects.
Noseey Dec 20, 2024
5b4926e
Heretic: Dirty Translucent Goldwand firing.
Noseey Dec 20, 2024
43d2b48
Heretic: Translucency gun flash Goldwand
Noseey Dec 20, 2024
c29bf51
Heretic: Translucency gun flash Blaster, Hellrod
Noseey Dec 21, 2024
0cb6f26
Heretic: Reconstructing maxlight when loading to align with Doom.
Noseey Dec 21, 2024
65c4275
Heretic: Translucency gun flash Gauntlet, PhoenixRod
Noseey Dec 21, 2024
ae7bafc
Heretic: Restructured Translucent Weapon Fire evaluation.
Noseey Dec 22, 2024
cfcf484
Heretic: Translucency conditions and selection changed
Noseey Dec 23, 2024
feca92a
Heretic: Restructured Translucent Weapon Fire evaluation. (2nd)
Noseey Dec 23, 2024
d7f93db
Heretic: Translucency Option cleanup
Noseey Dec 23, 2024
fdef0dd
Merge branch 'fabiangreffrath:master' into Heretic_Translucency_Option
Noseey Dec 23, 2024
359a359
Heretic: Changed Translucency for various things
Noseey Dec 24, 2024
5e9aeb7
Merge branch 'Heretic_Translucency_Option' of https://github.com/Nose…
Noseey Dec 24, 2024
df9dae1
Heretic: Add Miscmissle Flag directly to MT_POD
Noseey Dec 25, 2024
7159024
Heretic: Translucency Option fixing whitespaces, adding comments and …
Noseey Dec 25, 2024
65f7469
Heretic: Weapon Translucency considering Invisibility Powerup
Noseey Dec 25, 2024
facde61
Heretic: Undo Translucency for dying Mummyleaders.
Noseey Dec 30, 2024
dafa64b
Revert "Heretic: Reconstructing maxlight when loading to align with D…
Noseey Dec 30, 2024
94f4d1f
Heretic: Gauntlets no longer considered for weapon sprite translucency.
Noseey Dec 30, 2024
a7d2127
Heretic: Moved Translucency offsets to r_things.c
Noseey Dec 30, 2024
ae33ec6
Heretic: Fixing Whitespaces in info.h
Noseey Dec 30, 2024
16e15f8
Heretic: Renamed translucency option for weapon flashes.
Noseey Jan 2, 2025
b974d88
Heretic: Removed MISCMISSILE Flag
Noseey Jan 2, 2025
94f29f4
Heretic: Reworked y-offets for translucency
Noseey Jan 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Heretic: Changed Translucency for various things
- added/removed some translucent effects.
- make goopods translucent upon explosion.
- make leadermummy translucent upon facing enemy for ranged-attack.
Noseey committed Dec 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 359a359ad8443f8261ab0cfcd4896ce85aa48fca
12 changes: 6 additions & 6 deletions src/heretic/info.c
Original file line number Diff line number Diff line change
@@ -1812,7 +1812,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = {
100, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP | MF_MISSILE | MF_DROPOFF | MF_TRANSLUCENT, // flags
MF_NOBLOCKMAP | MF_MISSILE | MF_DROPOFF, // flags
MF2_NOTELEPORT | MF2_LOGRAV | MF2_CANNOTPUSH // flags2
},

@@ -2595,7 +2595,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = {
100, // mass
2, // damage
sfx_None, // activesound
MF_NOBLOCKMAP | MF_MISSILE | MF_DROPOFF, // flags
MF_NOBLOCKMAP | MF_MISSILE | MF_DROPOFF | MF_TRANSLUCENT, // flags
MF2_LOGRAV | MF2_NOTELEPORT | MF2_FIREDAMAGE // flags2
},

@@ -2622,7 +2622,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = {
100, // mass
1, // damage
sfx_None, // activesound
MF_NOBLOCKMAP | MF_MISSILE | MF_DROPOFF, // flags
MF_NOBLOCKMAP | MF_MISSILE | MF_DROPOFF | MF_TRANSLUCENT, // flags
MF2_LOGRAV | MF2_NOTELEPORT | MF2_FIREDAMAGE // flags2
},

@@ -2649,7 +2649,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = {
100, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP | MF_NOGRAVITY | MF_NOSECTOR | MF_TRANSLUCENT, // flags
MF_NOBLOCKMAP | MF_NOGRAVITY | MF_NOSECTOR, // flags
0 // flags2
},

@@ -2676,7 +2676,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = {
100, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP | MF_NOGRAVITY | MF_NOSECTOR | MF_TRANSLUCENT, // flags
MF_NOBLOCKMAP | MF_NOGRAVITY | MF_NOSECTOR, // flags
0 // flags2
},

@@ -4057,7 +4057,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = {
75, // mass
0, // damage
sfx_mumact, // activesound
MF_SOLID | MF_SHOOTABLE | MF_COUNTKILL, // flags
MF_SOLID | MF_SHOOTABLE | MF_COUNTKILL | MF_MISCMISSILE, // flags
MF2_FOOTCLIP | MF2_PASSMOBJ // flags2
},

15 changes: 14 additions & 1 deletion src/heretic/p_enemy.c
Original file line number Diff line number Diff line change
@@ -626,7 +626,11 @@ void A_Look(mobj_t *actor, player_t *player, pspdef_t *psp)
else
goto seeyou;
}


if (actor->type == MT_MUMMYLEADER)
{
actor->flags &= ~MF_TRANSLUCENT;
}

if (!P_LookForPlayers(actor, false))
return;
@@ -702,6 +706,11 @@ void A_Chase(mobj_t *actor, player_t *player, pspdef_t *psp)
}
}

if (actor->type == MT_MUMMYLEADER)
{
actor->flags &= ~MF_TRANSLUCENT;
}

//
// turn towards movement direction if not there yet
//
@@ -822,6 +831,10 @@ void A_FaceTarget(mobj_t *actor, player_t *player, pspdef_t *psp)
{ // Target is a ghost
actor->angle += P_SubRandom() << 21;
}
if (actor->type == MT_MUMMYLEADER)
{
actor->flags |= MF_TRANSLUCENT;
}
}

//----------------------------------------------------------------------------
5 changes: 5 additions & 0 deletions src/heretic/p_inter.c
Original file line number Diff line number Diff line change
@@ -975,6 +975,11 @@ void P_KillMobj(mobj_t * source, mobj_t * target)
return;
}
}

// [crispy] Exploding Goo-Pods are translucent
if (target->type == MT_POD)
target->flags |= MF_MISCMISSILE | MF_TRANSLUCENT;

if (target->health < -(target->info->spawnhealth >> 1)
&& target->info->xdeathstate)
{ // Extreme death
2 changes: 1 addition & 1 deletion src/heretic/r_things.c
Original file line number Diff line number Diff line change
@@ -435,7 +435,7 @@ void R_DrawVisSprite(vissprite_t * vis, int x1, int x2)
// [crispy] translucent sprites
else if (crispy->translucency && vis->mobjflags & MF_TRANSLUCENT)
{
if ((vis->mobjflags & (MF_NOGRAVITY | MF_MISCMISSILE) && crispy->translucency & TRANSLUCENCY_MISSILE) ||
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.

(vis->psprite && crispy->translucency & TRANSLUCENCY_ITEM))
colfunc = tlcolfunc;
}