FIXED: Flat Sprites Overhauled

Moderator: Graf Zahl

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: Flat Sprites Overhauled

Post by Rachael » Fri Sep 16, 2016 19:46

Alright. I'll process this, and then post it on the dev builds site for you, if everything comes up clear. I'm going to be removing some vestigial files from this, but otherwise I think I have everything I need.
Spoiler: Zen Sarcasm

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: Flat Sprites Overhauled

Post by Rachael » Fri Sep 16, 2016 19:51

You don't have any 32-bit builds available? It's alright if not - but that does limit who can test this.
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Flat Sprites Overhauled

Post by Major Cooke » Fri Sep 16, 2016 19:57

...I miss the days of being able to just flip the button in VS from Win32 to x64 and back...

Compiling one now.


User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: Flat Sprites Overhauled

Post by Rachael » Fri Sep 16, 2016 20:09

That one is still 64-bit.
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Flat Sprites Overhauled

Post by Major Cooke » Fri Sep 16, 2016 20:12

When you started it up?

Try redownloading one more time, I used manage versions link in google drive.

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: Flat Sprites Overhauled

Post by Rachael » Fri Sep 16, 2016 20:20

Alright, got it. :) Packing it now.

EDIT - one problem, it was compiled with no sound support at all?...
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Flat Sprites Overhauled

Post by Major Cooke » Fri Sep 16, 2016 20:44

I forgot to set the path... Seriously wish there could be something to default towards.

I'll post a new one when I'm home in an hour or two.

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: Flat Sprites Overhauled

Post by Rachael » Fri Sep 16, 2016 20:45

Alright. I've posted the x64 one in the meantime.
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Flat Sprites Overhauled

Post by Major Cooke » Fri Sep 16, 2016 21:58

EDIT: That was faster than I thought. Anyway, can I have you also throw up a small note about the flat sprites?

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: Flat Sprites Overhauled

Post by Rachael » Fri Sep 16, 2016 22:09

It's up now. Thank you.

And yes, I can - what would you like me to put?
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Flat Sprites Overhauled

Post by Major Cooke » Fri Sep 16, 2016 22:10

Sorry, I got a little hasty. Had a panic moment thinking I uploaded the wrong one. Heh.

Anyway, can you do me a favor and quote this?

-----
Notes for modders:
1. Flat sprites are now base upon pitch being 0 (completely horizontal) and +/-90 (completely vertical).
2. Roll property is always factored into account without requiring ROLLSPRITE.
3. DONTFLIP currently has no effect. This will be addressed shortly.

As such, anyone currently using flat sprites will need to adjust their code -- it may take more than just adding pitch to change it. If it doesn't appear correctly, change the angle and/or roll as well.
-----

User avatar
Rachael
Developer
Developer
Posts: 3617
Joined: Sat May 13, 2006 10:30

Re: Flat Sprites Overhauled

Post by Rachael » Fri Sep 16, 2016 22:14

Done.
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Flat Sprites Overhauled

Post by Major Cooke » Fri Sep 16, 2016 22:49

Image

Small offsetting issue identified. Hmmm... This one's tricky. I'll need some input here. Something to do with the z axis, or the one used for the y parameter in mat.Transform and Rotate functions... Thing is, I tried centering it with (z1 + z2) * 0.5 but that only made them offset and fly around like paper airplanes.

Code: Select all

		float cx, cy, cz = z;
		if ((actor->renderflags & RF_ROLLCENTER))
		{
			cx = (x1 + x2) * 0.5;
			cy = (y1 + y2) * 0.5;
		}
		else
		{
			cx = x;
			cy = y;
		}

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Flat Sprites Overhauled

Post by Major Cooke » Fri Sep 16, 2016 23:24

I was wrong. It's actually something to do with this part:

Code: Select all

		case RF_FLATSPRITE:
		{	
			x1 = x + leftfac;
			x2 = x + rightfac;
			y1 = y - bottomfac;
			y2 = y - topfac;
		}
(Also, a dev tag? Shocking!)

Locked

Return to “Closed Feature Suggestions”