add offsets to decaldef

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

add offsets to decaldef

Postby Sir Robin » Sun Jan 09, 2022 11:01 pm

I wish that decaldef lump had offsets for the image, like the textures lump does. I know I can set offsets in the png files, but I'd like to have to option to override those in the decaldef lump.

So I could do this
Code: Select allExpand view
decal MyDecal235 235
{
offset 32,64
pic Image235
}
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: add offsets to decaldef

Postby Logan MTM » Sun Jan 09, 2022 11:06 pm

Just curious. What would be the practical application of this?
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: add offsets to decaldef

Postby Sir Robin » Mon Jan 10, 2022 9:15 am

It would be for the same purpose as the textures lump, to set offsets for the image to be used as a decal. This would override the png grAb lump if it has one. This means I can adjust the offsets of a decal without having to use an external program like setpng or grabpng or whatever. It also means I can use the same image for different decals with different offsets. For example, I need to have some decals drawn from the center and some drawn from the bottom middle. Since I can't set the offsets here, I have to have 2 different image files for either of those decals. That adds unneeded bulk to my pk3 file. Something I haven't yet tested is to create a texture with the proper offsets then see if decaldef can load a texture. If that works, it's a work-around, but it would be nice to do that without those extra steps.
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: add offsets to decaldef

Postby 22alpha22 » Tue Jan 11, 2022 8:36 am

This would indeed be a useful feature. In my own projects there have been times I needed to use the same decal with multiple projectiles and have had to define the decal image several times with TEXTURES in order set different offsets so that decal lined up properly with the projectile. This was mildly annoying and being able to define offset overrides in DECALDEF would have been a better option I think.
User avatar
22alpha22
So lonely...
 
Joined: 21 Feb 2014
Location: Montana, USA
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests