Overlay Flip Flag

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8212
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:

Overlay Flip Flag

Post 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.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: Overlay Flip Flag

Post 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...
User avatar
Major Cooke
Posts: 8212
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: Overlay Flip Flag

Post 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.
User avatar
Rachael
Posts: 13960
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Overlay Flip Flag

Post 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...?
User avatar
Major Cooke
Posts: 8212
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: Overlay Flip Flag

Post 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.
User avatar
Major Cooke
Posts: 8212
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: Overlay Flip Flag

Post 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.
Last edited by Major Cooke on Wed Oct 12, 2016 1:32 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49235
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Overlay Flip Flag

Post 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.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: Overlay Flip Flag

Post by D2JK »

Re: formula for mirroring a sprite across the screen; judging by a few quick tests, this seems to work:
Spoiler:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49235
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Overlay Flip Flag

Post 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.
User avatar
Rachael
Posts: 13960
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Overlay Flip Flag

Post 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.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Overlay Flip Flag

Post 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].
User avatar
Major Cooke
Posts: 8212
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: Overlay Flip Flag

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

Return to “Closed Feature Suggestions [GZDoom]”