A_Overlayex... A more simple version of A_Overlay

Moderator: GZDoom Developers

User avatar
DELTAtheDboi005
Posts: 56
Joined: Tue Apr 05, 2022 3:43 am

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: 400
Joined: Tue Oct 05, 2010 12:04 am
Github ID: kevansevans
Graphics Processor: nVidia with Vulkan support

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: 56
Joined: Tue Apr 05, 2022 3:43 am

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
Moderator Team Lead
Posts: 21384
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support

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: 47995
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: 9666
Joined: Sun Jan 04, 2004 5:37 pm
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

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: 8059
Joined: Sun Jan 28, 2007 3:55 pm

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: 47995
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.

Return to “Closed Feature Suggestions”