WOF_ADD for A_OverlayAlpha

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: WOF_ADD for A_OverlayAlpha

WOF_ADD for A_OverlayAlpha

by Jekyll Grim Payne » Fri May 20, 2022 4:57 am

It's very easy to implement fade-in/fade-out in ZScript, but I feel like adding it to the native function would be good for consistency, since other A_Overlay* manipulation functions use that parameter in some way.

My idea is to simply expand it to A_OverlayAlpha(int layer, double alph, int flags = 0) where the flags argument recognizes WOF_ADD and performs an incremental change instead of an absolute one.

I'd add PSPF_REMOVE as a flag option as well, to make it move to the "Null" state sequence if alpha <= 0 (similarly to FTF_REMOVE in A_FadeOut). Or it could be just another boolean argument.

Top