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.
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 [b]A_OverlayAlpha(int layer, double alph, int flags = 0)[/b] 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.