A_Overlayex... A more simple version of A_Overlay

Moderator: GZDoom Developers

Post Reply
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

A_Overlayex... A more simple version of A_Overlay

Post by DELTAtheDboi005 »

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.
User avatar
kevansevans
Spotlight Team
Posts: 420
Joined: Tue Oct 05, 2010 12:04 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: A_Overlayex... A more simple version of A_Overlay

Post by kevansevans »

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.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: A_Overlayex... A more simple version of A_Overlay

Post by DELTAtheDboi005 »

Maybe so, but it would be pretty handy to have a A_Overlay variant that condenses the other seperate functions into one...
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: A_Overlayex... A more simple version of A_Overlay

Post by wildweasel »

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:

Code: Select all

WOOP A 1
{
   A_Overlay(args...)
   A_OverlayScale(args...)
   A_OverlayOffset(args...)
}
And of course you can always change them independently as is needed without having to set the entire thing all over again.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_Overlayex... A more simple version of A_Overlay

Post by Graf Zahl »

I don't think it's good idea to make such a function.
User avatar
Matt
Posts: 9696
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
Contact:

Re: A_Overlayex... A more simple version of A_Overlay

Post by Matt »

Best to make a custom wrapper in ZScript for your specific needs. (I recently did this with A_SpawnParticle...)
User avatar
Major Cooke
Posts: 8175
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

Post by Major Cooke »

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?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_Overlayex... A more simple version of A_Overlay

Post by Graf Zahl »

If you have an ARM Mac the JIT won't be available.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”