Generalized the psprite system and made it useable by mods.

Moderator: GZDoom Developers

User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: Generalized the psprite system and made it useable by mo

Post by Amuscaria »

Does this mean I can finally put ammo counters on weapon sprites? :D
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Generalized the psprite system and made it useable by mo

Post by Gez »

Yes, looks like.
User avatar
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

Post by NeuralStunner »

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.
User avatar
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

Post by Ed the Bat »

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.
User avatar
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

Post by Major Cooke »

A simple and easy explanation: multi-threading in a nutshell. You run multiple states at once, with or without graphics, it doesn't matter. ;)
User avatar
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

Post by NeuralStunner »

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

(Are you thinking of Reelism, too? ;) )
User avatar
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

Post by Ed the Bat »

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.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: Generalized the psprite system and made it useable by mo

Post by Edward-san »

Not only that, it's also easy to make the program crash badly. This should mitigate some I discovered.
User avatar
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

Post by Major Cooke »

Graf will want that in the bug reports section, just an FYI.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

Why?
User avatar
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

Post by Major Cooke »

It was a bug wasn't it?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

'Was' being the operative term here.
User avatar
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

Post by Major Cooke »

Must've posted at the same time as you had merged it. Oh well. :P
User avatar
Leonard2
Posts: 313
Joined: Tue Aug 14, 2012 6:10 pm

Re: Generalized the psprite system and made it useable by mo

Post by Leonard2 »

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:
fixes.zip
(1.22 KiB) Downloaded 51 times
Let's just say I "bought" strife and now I can test it.
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 guess you simply didn't see it in the thread but this was actually addressed as well.
I generalized it so that you can create overlays from within the player's own body and made strife's firehands use that internally.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
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

Post by Graf Zahl »

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.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”