[DECORATE] Sprite Flip Flag?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [DECORATE] Sprite Flip Flag?

Re: [DECORATE] Sprite Flip Flag?

by Rachael » Sat May 06, 2017 8:43 am

No. A8A2 is going to be A8A2 in the end.

What it will do is if you have a singular A8 frame and singular A2 frame, it will use a reversed A2 frame in place of A8 and a reversed A8 in place of A2. But that's it.

It's the exact same mechanics as what happens when you view the sprites in a mirror.

If you still don't understand how it is working, please download the attached pk3 and run it. I can't repeat the same thing over and over again until you understand it - you just have to try it yourself.

Re: [DECORATE] Sprite Flip Flag?

by Major Cooke » Sat May 06, 2017 8:25 am

Just to make sure the idea is clear here, from reading what the posts above say, it takes A8A2 and reads it as A2A8 instead, correct?

I.e. a lump with ZOMBA2A8 is instead read as ZOMBA8A2 and vice versa

Re: [DECORATE] Sprite Flip Flag?

by Rachael » Fri May 05, 2017 4:22 pm

It flips all of them but you won't notice it if the sprite does not have full rotations. It piggybacks the mirror code.

Re: [DECORATE] Sprite Flip Flag?

by Matt » Fri May 05, 2017 3:45 pm

So does this flag flip the X of the sprite generally, or only the 1/5(/0?) ones?

Re: [DECORATE] Sprite Flip Flag?

by Xaser » Wed May 03, 2017 12:48 pm

I've been spending too much time on GitHub. I was looking for the "Add Your Reaction" button so I could post the "Hooray!" image.

For the sake of it anyway:
Image


[EDIT] Or I could do that on the PR like a brainful person would. Welp, time to double-dip.

Re: [DECORATE] Sprite Flip Flag?

by Rachael » Wed May 03, 2017 11:48 am

Attachments
flippers.pk3
test pk3
(355 Bytes) Downloaded 87 times

Re: [DECORATE] Sprite Flip Flag?

by Rachael » Wed Nov 23, 2016 3:24 am

This is on my "to-do" list. I'd like to see this feature as well and it does look interesting enough to implement.

But if someone beats me to it, don't let me stop you, I don't know when I will get to this. (Having other things I've been meaning to do for quite some time...)

Re: [DECORATE] Sprite Flip Flag?

by Graf Zahl » Wed Nov 23, 2016 3:05 am

Wasn't that exactly what I was saying? Yes, if an animation is marked 'flipped' it needs to do precisely that.

Re: [DECORATE] Sprite Flip Flag?

by Ravick » Tue Nov 22, 2016 8:49 pm

Humm... Couldn't it be to "just" tell the engine to, lets say, additionally to flipping the '1' and the '5' sprites, draw the '8' sprite in place of the '2', the '3' in place of the '7', the '4' in place of the '6', and vice-versa?
I mean, somewhere in the hard code, it is told that the XXXXA2 is to be draw when the actor is seem from some angles. Couldn't it be told that, if the flag is on, the sprite XXXXA8 is to be drawn instead?
This would be needed only for actors that actually have 8 rotations sprites, I think. For those who have just 5, just like the imp, for example, maybe just flip the '1' and '5' cold work.

Well, I'm just guessing here. I'm seem this only from a "user view", not as a developer. (And I remember old discussions about the use of the word "just" in feature suggestions, XD ) Of course it maybe would be very hard to do, and would not worth the effort.

I'm just tossing some ideas in hope that they may be useful. :)

Re: [DECORATE] Sprite Flip Flag?

by Graf Zahl » Sun Nov 20, 2016 6:37 pm

You can't do a flip on a single rotation without messing around with the sprite itself. Actually, for this to work you not only have to flip the sprite rotations but also the rotation angle.

Re: [DECORATE] Sprite Flip Flag?

by Xaser » Sun Nov 20, 2016 6:13 pm

That'll flip the 2-4 rotations as well, which ain't gonna work.

[Also the parser accepts "XScale -1.0" in the actor definition anyhow; still will muck up the rotations though.]

Re: [DECORATE] Sprite Flip Flag?

by Major Cooke » Sun Nov 20, 2016 5:11 pm

Code: Select all

A_SetScale(ScaleX * -1)

[DECORATE] Sprite Flip Flag?

by Ravick » Sun Nov 20, 2016 4:06 pm

In Blood's MAPEDIT, you could press 'F' at a sprite, or a sprite based thing, just like a monster, and it'd appear with its sprites flipped in game. I mean, a Cultist could appear to be left handed or right handed, simply by having or not having received an 'F' at the map editing. If the mapper pressed 'F' twice, it'd be upside down in game, and with a third "F", the monster would be upside down and left handed.

It probably has been suggested before, but I haven't seem any topic about it. So, I'd like to suggest a "FLIPPED" flag, that tells the engine to draw the sprites 1 and 5 side-inverted, (and, if the actor has actually 8 rotations, swap the corresponding ones). I't be nice to have side-variation in monsters, for example, so they'd not look to be all clones from the same guy. The same for decorations, effects and so on.

Well, as always, just an idea. :)

Top