[Added] OverlayX/Y + Flags/Offset Enhancements

Moderator: GZDoom Developers

OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Sat Oct 08, 2016 11:10 am

Pull Request

  • OverlayX/Y - Retrieves the X/Y coordinates of the overlay. Interprets layer 0 as 'this layer'.
  • A_OverlayOffset - Now interprets 0 as 'this layer' instead of nothing.
  • A_OverlayFlags - Now interprets 0 as 'this layer' instead of nothing.

Leonard2 suggested to me the idea of layer 0 meaning 'this layer' after seeing OverlayID so I thought I'd include it in one.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Rachael » Sat Oct 08, 2016 7:11 pm

What project is this that's requiring all these overlay enhancements?

I'm not trying to be mean or anything but these overlay additions all seem to be singularly focused.

I guess the more important question is what applications does this actually have for ZDoom in general, rather than said mod, but I guess both questions are actually really important in this case.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Sat Oct 08, 2016 7:51 pm

Doom 4 for Doom. There's a feature I plan on which is going to be extremely reliant on this, though I won't begin working on it until after this next forthcoming release. The feature is going to be huge and these enhancements will greatly reduce the amount of pain I go through. If you're curious about what it is, you (eruanna) and graf/randi can send me a PM inquiring what it is, considering the 'trusted programmer' rule stuffs. Can't talk about it in public -- DBThanatos has an 'NDA' of sorts in effect. I'll have him post confirmation later if needed that we indeed go by it.

I've already laid out plans and everything. I'm just waiting for the next release to get out the door on that one.

Many of my submissions seem niche, but I just happen to desire a better way to manipulate and use them without resorting to overdriven code bloat that could be solved with simple functionality improvements.

Spoiler:
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Rachael » Sat Oct 08, 2016 8:09 pm

I am not a trusted programmer so my word is zilch on this, and so is my qualification for being the one that crosses your NDA line - therefore, the best kept secret is the one I'm not told - at least, in this instance. I can only predict the sentiments that will come as a result of this and I've found usually (though not always) I am right. However, that being said, nothing looks too bad from what I can see, only one line gives me any red flag but only because I don't really know what it does.

That being said, yes, your submissions do tend to be a bit niche, but that's not altogether a bad thing by itself. The problems that it causes, however, is it creates a bit of bloat - and the more that needs to be done, the more hacks you tend to have to program in. Every hack changes the way a certain function behaves, and every hack that has to be added has nearly a 100% success rate of interfering with another feature or bug fix down the line, so even if the effects of the hack are not immediate, they will cause problems eventually.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Sat Oct 08, 2016 8:24 pm

This is neither code bloat nor a hack. It's exposing the X and Y position storage. Even Leonard said this is something that aught to be relatively good and it will be EXTREMELY useful for actor overlays if that gets in. Though at this point I wouldn't be surprised if Zscript supercedes it entirely. So I wouldn't be surprised if everything from here on out is WFZS'd for the time being.

What line red-flags for you?
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Rachael » Sat Oct 08, 2016 8:32 pm

Just this one: https://github.com/rheit/zdoom/pull/842 ... 196f7R1036 - like I said, it's probably just because I don't know what it does. The reason it red-flags me is because you replaced a nullptr check.

Though at this point I wouldn't be surprised if Zscript supercedes it entirely.

I had actually written up a much longer post predicting exactly this, but I deleted most of it before I submitted that. >_>

This is neither code bloat nor a hack.

I know. I didn't say this was, I was just saying in general.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Sat Oct 08, 2016 9:07 pm

Oh. That line actually includes the same check plus a few others that are necessary in order to retrieve the function mPSPIndex which is what makes OverlayID tick. It makes sure a player exists, along with it being an action function and there being a non-null stateinfo stuffs.

So no worries there. :P
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Rachael » Sat Oct 08, 2016 9:12 pm

Well it passes my cursory test, then. But a more seasoned developer will need to do a more thorough check - as I've said, I'm not qualified to make that determination. (Yet)
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Sun Oct 09, 2016 11:17 am

I would like Graf to confirm that though, it would be nice to hear from him directly on this.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Graf Zahl » Mon Oct 10, 2016 4:24 am

Looks ok to me. Be aware that this conflicts with your other overlay related PR.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Mon Oct 10, 2016 1:55 pm

I'm aware. I figured you were waiting on something for the alpha/style types, so I committed these separately since they're a lot simpler.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Graf Zahl » Mon Oct 10, 2016 1:56 pm

I'm mainly waiting for someone else to drop a word but that doesn't seem to happen ever... :(
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Tue Oct 11, 2016 1:54 am

I think I'm going to split the flipping from it and make a separate pull request so that part doesn't have to wait as long, if you think that's alright. A mere flip of the X axis, nothing more. I understand the renderstyle testing should still happen, but it was foolish of me to get something so simple barred by something much more complex.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: OverlayX/Y + Flags/Offset Enhancements

Postby D2JK » Sun Oct 30, 2016 2:52 pm

Did anyone ever figure out a way to selectively disable the interpolation for overlaid/HUD sprites? The sprites tend to jump visibly if you change their offsets on the fly.

Currently, I figured I could weave in an invisible frame, and change to the new offset during this frame, hiding the jumping effect. The downside to this is that it requires 1 tic where the overlay is showing nothing, every time you want to change an offset.

Alternatively, I would have to manage my sprites in a way that keeps their offsets fixed throughout the animation.
D2JK
 
Joined: 30 Aug 2014

Re: OverlayX/Y + Flags/Offset Enhancements

Postby Major Cooke » Sun Oct 30, 2016 2:54 pm

That's a question for Leonard2.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: DotBot and 2 guests