Page 1 of 1
Overlay Flip Flag
Posted: Tue Oct 11, 2016 7:23 pm
by Major Cooke
ZDoom
GZDoom
Add PSPF_FLIP to overlays to draw them flipped over the X axis.
If this gets in, I'll update my alpha/renderstyle one accordingly.
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 12:39 pm
by D2JK
Hmm, interesting, just too bad this doesn't mirror the sprite horizontally across the entire screen (think akimbo weapons).
Did you, by any chance, come up with any sort of formula to solve the X-offset required to mirror a sprite perfectly across the screen? I'd be interested in something more sophisticated than constant trial, error and eyeballing...
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 12:41 pm
by Major Cooke
Now you know how I felt when trying to make the scaling work.
But if it's of any comfort, try to use the TEXTURES lump to get ideas of an offset. That, I think, should help out (just use it as a test case scenario, and yes I'm talking about SLADE's texture editor). It'll help cut down the amount of eyeballing.
I'm not going to change the coordinate system at all. Doing so could create a huge mess of offsets. Unless Leonard would like to.
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 12:43 pm
by Rachael
Erm - it should flip on the screen axis, shouldn't it?
It makes no sense to flip on the sprite itself - it's like the vanishing point discussion I had with Major Cooke earlier...?
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 12:52 pm
by Major Cooke
I stopped supporting it for a certain reason, though I can't remember why now. Probably because it backwardized the coordinates. Also I don't even remember how it was done. I'll look into another flag.
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 1:20 pm
by Major Cooke
Ah yes I remember now. The damn thing kept misbehaving the whole time no matter which way I tried to put it, so I gave up on it.
By all means, feel free to try if you want.
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 1:29 pm
by Graf Zahl
Eruanna wrote:Erm - it should flip on the screen axis, shouldn't it?
Why should it? That'd negate all bobbing as well which really makes no sense.
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 1:31 pm
by D2JK
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 1:49 pm
by Graf Zahl
Correct, but like I said, all you'd do is flip the entire bobbed sprite, which is certainly not what anyone may want here.
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 1:49 pm
by Rachael
Graf Zahl wrote:Why should it? That'd negate all bobbing as well which really makes no sense.
Screen axis relative to bobbing, is what I meant.
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 5:06 pm
by Xaser
I can't imagine what use this would have if the flipping isn't occurring over the screen axis. Akimbo weapons (or maybe a right/left handedness toggle) are the use case for a "flip" feature, and I expect around 100% of people who try and use this will be unpleasantly surprised.
[I suppose you could still use it by artificially padding your sprites with empty space, but that's not much better in practice than using TEXTURES for doing the flipping in the first place].
Re: Overlay Flip Flag
Posted: Wed Oct 12, 2016 6:16 pm
by Major Cooke
By all means. Give it a try yourself. I couldn't really get it to work without it going haywire.
As is, it's useful for not having to deal with the headache of making 400+ TEXTURES entries and sparing myself the pain of writing down offsets/sizes for dual wielding weaponry. I work with vast projects mind you.