Hey, so in my opinion A_Overlay is one of the more convoluted functions that the world of doom modding has to offer... Therefore I bring you this feature suggestion.
A_Overlayex Would be a significantly more easier to use version of A_Overlay, The syntax for it would probably go like this:
A_Overlayex(int layer, int x offset, int y offset, string state, flags)
The flags could be:
OEX_KEEPX (x parameter not used)
OEX_KEEPY (y parameter not used)
OEX_INTERPOLATE (makes the animation smooth)
OEX_TRUEOFFSETS (Uses the offsets used in the sprite instead of the x and y parameters)
OEX_FORCEOFFSETS (Forces the offsets for overlay, can be used in conjunction with OEX_TRUEOFFSETS)
This would be a pain to code, but if it ever sees the light of day it would theoretically make working with overlays significantly easier than what the standard A_Overlay function can do.
A_Overlayex... A more simple version of A_Overlay
Moderator: GZDoom Developers
-
- Posts: 196
- Joined: Tue Apr 05, 2022 3:43 am
-
- Spotlight Team
- Posts: 414
- Joined: Tue Oct 05, 2010 12:04 am
- Graphics Processor: nVidia with Vulkan support
Re: A_Overlayex... A more simple version of A_Overlay
We've already got several separate functions that accomplish this, such as A_OverlayOffset that also takes similar flags as arguments. I don't think reducing two functions into one would solve any perceived difficulties with the overlay system.
-
- Posts: 196
- Joined: Tue Apr 05, 2022 3:43 am
Re: A_Overlayex... A more simple version of A_Overlay
Maybe so, but it would be pretty handy to have a A_Overlay variant that condenses the other seperate functions into one...
-
- Posts: 21644
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
Re: A_Overlayex... A more simple version of A_Overlay
But suppose you don't want to use all of them at once - we would run into HUDMessage-esque problems where we'd have to zero out or memorize the default values of the stuff that we don't want to change. Plus, you could always Anonymous Function your way through it:
And of course you can always change them independently as is needed without having to set the entire thing all over again.
Code: Select all
WOOP A 1
{
A_Overlay(args...)
A_OverlayScale(args...)
A_OverlayOffset(args...)
}
-
- Lead GZDoom+Raze Developer
- Posts: 48666
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_Overlayex... A more simple version of A_Overlay
I don't think it's good idea to make such a function.
-
- Posts: 9695
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: A_Overlayex... A more simple version of A_Overlay
Best to make a custom wrapper in ZScript for your specific needs. (I recently did this with A_SpawnParticle...)
-
- Posts: 8111
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: A_Overlayex... A more simple version of A_Overlay
Yep. Just create your own wrapper function and call it a day.
Of course this would only be a concern if you don't run GZDoom on JIT since that can slow down performance, but at this point, is anyone?
Of course this would only be a concern if you don't run GZDoom on JIT since that can slow down performance, but at this point, is anyone?
-
- Lead GZDoom+Raze Developer
- Posts: 48666
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_Overlayex... A more simple version of A_Overlay
If you have an ARM Mac the JIT won't be available.