Make some map data struct functions accessible from ui scope

Moderator: GZDoom Developers

Post Reply
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Make some map data struct functions accessible from ui scope

Post by Marisa the Magician »

Namely, those that are pretty much read-only / have no side effects, such as Line's Index(), and various other getters. It would be fine if these were all marked as clearscope, just like many other function on the Actor class, for example.

It's kind of annoying to not have this, honestly, when trying to read properties of these structs from, say, a RenderOverlay function in an event handler.

Edit: Can this be moved to code submissions? I have a pull request ready
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Make some map data struct functions accessible from ui s

Post by Major Cooke »

This would be highly appreciated. Not having to access ACS specifically for certain contexts would be greatly helpful, especially if we want to not use TIDs.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Make some map data struct functions accessible from ui s

Post by Graf Zahl »

I'm not convinced this is good. You basically made everything that looked constant accessible. A large portion of these functions has little to no use in UI scope and may cause problems down the line that more state than necessary needs to be kept up-to-date on the UI side of things.

Please break this down into smaller submissions so that they can be evaluated independently of each other.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Make some map data struct functions accessible from ui s

Post by Marisa the Magician »

Very well.

Edit: I have opened a small PR for now. Those three functions are the only ones I can find a "general" use for.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Make some map data struct functions accessible from ui s

Post by Major Cooke »

And an image too, also by Marisa. Holy crap this looks fantastic!
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: Make some map data struct functions accessible from ui s

Post by gwHero »

Marisa Kirisame wrote:Very well.

Edit: I have opened a small PR for now. Those three functions are the only ones I can find a "general" use for.
Wow, checked that example wad, that's quite impressive. Do you think this will perform well also on large maps?
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Make some map data struct functions accessible from ui s

Post by Marisa the Magician »

It shouldn't make any difference. The trace is only as long as the player's use range.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Make some map data struct functions accessible from ui s

Post by Marisa the Magician »

Big bump: I think this should just be closed, can't think of any other functions that should be ui-accessible.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”