-
Notifications
You must be signed in to change notification settings - Fork 132
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/Hexen: Correction of Transparent HUD Elements in Heretic Truecolor #1272
base: master
Are you sure you want to change the base?
Heretic/Hexen: Correction of Transparent HUD Elements in Heretic Truecolor #1272
Conversation
This reverts commit 68e4621.
…ey/crispy-doom into Heretic_TC_Transparency_Fix
@@ -87,14 +87,26 @@ const uint32_t I_BlendOverTranmap (const uint32_t bg, const uint32_t fg) | |||
return I_BlendOver(bg, fg, 0xA8); // 168 (66% opacity) | |||
} | |||
|
|||
// [crispy] TINTTAB blending emulation, used for Heretic and Hexen | |||
const uint32_t I_BlendOverTinttab (const uint32_t bg, const uint32_t fg) | |||
// [crispy] TINTTAB blending emulation, used for Heretic |
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 idea was to rename the previous I_BlendOverTinttab()
to e.g. I_BlendOverTinttab38()
and I_BlendOverAltTinttab()
to I_BlendOverTinttab56()
,. Then we could introduce function pointers with the former names of the functions and let them point to either I_BlendOverTinttab38()
or I_BlendOverTinttab56()
depending on game mission. The way it is now introduces an extra layer of indirection.
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 could rename blendfunc_tinttab
and blendfunc_alt_tinttab
to I_BlendOverTinttab
and I_BlendOverAltTinttab
respectively, I think that makes sense.
As for those four functions, it seems you want to keep game-specifics out of the name. But I'm hesitant to add fixed opacity-values to the name itself. How about something like I_BlendStrongOverTinttab
and I_BlendWeakOverTinttab
?
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, fine with me.
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 renamed the symbols now, hope that gets it closer to the above mentioned idea.
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.
You still have two pairs of two identical functions (I_BlendStrongOverTinttab() == I_BlendStrongOverAltTinttab()
and I_BlendWeakOverTinttab() == I_BlendWeakOverAltTinttab()
) and I want to get rid of this. The game should only call I_BlendOverTinttab()
or I_BlendOverAltTinttab()
and nothing else, just as before. The initialization code should determine which of the actual blending functions these point to.
src/heretic/r_draw.c
Outdated
#ifndef CRISPY_TRUECOLOR | ||
V_LoadTintTable(); | ||
#endif | ||
V_LoadTintTable(mission); |
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.
Or simply V_LoadTintTable(heretic)
(or V_LoadTintTable((GameMission_t)heretic)
if you want to be explicit).
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 changed it using the cast.
…ey/crispy-doom into Heretic_TC_Transparency_Fix
Related Issue:
Closes #1269
Changes Summary
Fixing the Transparent HUD Elements in Heretic Truecolor by introducing different blendovertinttab-functions for Heretic and Hexen in truecolor.