
Generalized the psprite system and made it useable by mods.
Moderator: GZDoom Developers
Re: Generalized the psprite system and made it useable by mo
Does this mean I can finally put ammo counters on weapon sprites? 

Re: Generalized the psprite system and made it useable by mo
Yes, looks like.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Generalized the psprite system and made it useable by mo
And with a separate layer for each digit, even. 
Heck, I'll be happy with putting gunflashes behind the main sprite so I don't have to keep cutting the muzzle shape out of them.

Heck, I'll be happy with putting gunflashes behind the main sprite so I don't have to keep cutting the muzzle shape out of them.
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: Generalized the psprite system and made it useable by mo
I'm happy to see this, but I don't suppose this will help get us any closer to a less hacky solution for Strife's flaming hands? I've always been bothered with how that had to be implemented.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Generalized the psprite system and made it useable by mo
A simple and easy explanation: multi-threading in a nutshell. You run multiple states at once, with or without graphics, it doesn't matter. 

- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Generalized the psprite system and made it useable by mo
The problem there is using it with arbitrary weapons. If you're making all-custom weapons, you can inherit from a base class that has special states like this, and do your own switching. Native weapon functions are a pain, but fortunately we have pretty good documentation of those, so they should be relatively easy to replicate with generic functions.Ed the Bat wrote:I'm happy to see this, but I don't suppose this will help get us any closer to a less hacky solution for Strife's flaming hands? I've always been bothered with how that had to be implemented.
(Are you thinking of Reelism, too?

- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: Generalized the psprite system and made it useable by mo
Among other things, yes I am. I just really wish there was a better way to do what A_ItBurnsItBurns does. A (restricted, no less) function from within the playerclass affecting the weapons? Seems iffy at best. And I've heard Graf himself say it's a disgusting hack, the way it is right now.
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: Generalized the psprite system and made it useable by mo
Not only that, it's also easy to make the program crash badly. This should mitigate some I discovered.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Generalized the psprite system and made it useable by mo
Graf will want that in the bug reports section, just an FYI.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Generalized the psprite system and made it useable by mo
It was a bug wasn't it?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49231
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Generalized the psprite system and made it useable by mo
'Was' being the operative term here.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Generalized the psprite system and made it useable by mo
Must've posted at the same time as you had merged it. Oh well. 

Re: Generalized the psprite system and made it useable by mo
Here, I fixed the strife hands.
The PR fixes 2 crashes related to strife and one small bug I found.
Hopefully there are no issues left with strife's firehands.
Here are test wads for all the issues I addressed: Let's just say I "bought" strife and now I can test it.
I generalized it so that you can create overlays from within the player's own body and made strife's firehands use that internally.
The PR fixes 2 crashes related to strife and one small bug I found.
Hopefully there are no issues left with strife's firehands.
Here are test wads for all the issues I addressed: Let's just say I "bought" strife and now I can test it.
I guess you simply didn't see it in the thread but this was actually addressed as well.Ed the Bat wrote:I just really wish there was a better way to do what A_ItBurnsItBurns does. A (restricted, no less) function from within the playerclass affecting the weapons? Seems iffy at best. And I've heard Graf himself say it's a disgusting hack, the way it is right now.
I generalized it so that you can create overlays from within the player's own body and made strife's firehands use that internally.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49231
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Generalized the psprite system and made it useable by mo
Why did you 'remove the unneeded checks' that were deliberately added?
It's the second time that you reverted code that got added by someone else without thinking it through.
As a reminder: It WILL crash if someone clears the Firehands states off a child class.
And what's it with shoving all code into the generic functions? No, that's not the way to do it! I very intentionally set the position info for STRIFEHANDS outside of the SetState function and I am going to remove more such special cases when I find the time.
It's the second time that you reverted code that got added by someone else without thinking it through.
As a reminder: It WILL crash if someone clears the Firehands states off a child class.
And what's it with shoving all code into the generic functions? No, that's not the way to do it! I very intentionally set the position info for STRIFEHANDS outside of the SetState function and I am going to remove more such special cases when I find the time.