[Added] Generalized the psprite system and made it useable by mods.

Moderator: GZDoom Developers

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

Postby Amuscaria » Fri Jun 17, 2016 6:49 am

Does this mean I can finally put ammo counters on weapon sprites? :D
User avatar
Amuscaria
The Sentient Mushroom
 
Joined: 26 Jul 2004
Location: Growing from mycelium near you.

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

Postby Gez » Fri Jun 17, 2016 7:28 am

Yes, looks like.
Gez
 
 
 
Joined: 06 Jul 2007

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

Postby NeuralStunner » Fri Jun 17, 2016 11:43 am

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
NeuralStunner
not actually a catgirl
 
 
 
Joined: 21 Jul 2009
Location: =o_O=
Discord: NeuralStunner#1293
Operating System: Windows Vista/7/2008 64-bit

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

Postby Ed the Bat » Fri Jun 17, 2016 12:06 pm

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
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

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

Postby Major Cooke » Fri Jun 17, 2016 2:05 pm

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
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby NeuralStunner » Fri Jun 17, 2016 2:24 pm

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
NeuralStunner
not actually a catgirl
 
 
 
Joined: 21 Jul 2009
Location: =o_O=
Discord: NeuralStunner#1293
Operating System: Windows Vista/7/2008 64-bit

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

Postby Ed the Bat » Fri Jun 17, 2016 2:28 pm

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.
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

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

Postby Edward-san » Fri Jun 17, 2016 3:23 pm

Not only that, it's also easy to make the program crash badly. This should mitigate some I discovered.
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

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

Postby Major Cooke » Fri Jun 17, 2016 3:24 pm

Graf will want that in the bug reports section, just an FYI.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby Graf Zahl » Fri Jun 17, 2016 3:26 pm

Why?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Major Cooke » Fri Jun 17, 2016 3:27 pm

It was a bug wasn't it?
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby Graf Zahl » Fri Jun 17, 2016 5:16 pm

'Was' being the operative term here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Major Cooke » Fri Jun 17, 2016 6:07 pm

Must've posted at the same time as you had merged it. Oh well. :P
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby Leonard2 » Sat Jun 18, 2016 4:09 am

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


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.
You do not have the required permissions to view the files attached to this post.
User avatar
Leonard2
 
Joined: 15 Aug 2012

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

Postby Graf Zahl » Sat Jun 18, 2016 4:19 am

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest