ACS DynaStrings for SBARINFO

Moderator: GZDoom Developers

Post Reply
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

ACS DynaStrings for SBARINFO

Post by DavidPH »

This patch makes a minor change that enables the use of ACS dynamic strings in SBARINFO. (And probably other places, but SBARINFO was the actual case given.)
Attachments
SBARINFO_DynaString.7z
patch for r3401
(410 Bytes) Downloaded 34 times
Blzut3
 
 
Posts: 3202
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: ACS DynaStrings for SBARINFO

Post by Blzut3 »

I guess I should comment on this. The reason I haven't added it yet is I'm not sure this is the proper way to go about things. Dynamic strings are not supposed to be persistent in any way and I think the only reason this patch works is because of DrawString's caching. It isn't safe to assume that SBarInfo will pick up on the change to the ACS variable. For example draw a string on the normal statusbar and start with the full screen. Set the variable to a dynamic string and then switch to the normal status bar. SBarInfo will try to fetch the string on the tick screenblocks changes, does your patch account for that?

I think the proper solution would be to add support for drawing character arrays with SBarInfo.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: ACS DynaStrings for SBARINFO

Post by Xaser »

I actually have a setup in which the string is updated every tic -- Drawing character arrays would do it, though, if it's possible to print out a character array global variable with DrawString.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: ACS DynaStrings for SBARINFO

Post by DavidPH »

I didn't know SBARINFO did caching, I had assumed that failure to update the string from ACS every tic would just immediately break things. I felt that was an acceptable limitation.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: ACS DynaStrings for SBARINFO

Post by randi »

Blzut3 wrote:I think the proper solution would be to add support for drawing character arrays with SBarInfo.
Or, you could add real strings to ACS. I might try that after 2.6.0 is out of the way. ;-)
Blzut3
 
 
Posts: 3202
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: ACS DynaStrings for SBARINFO

Post by Blzut3 »

I hope that isn't distracting from ZScript, linked portals, and everything else we've been waiting for! :P

Honestly, with dynamic strings and character arrays we basically have real strings. With a little help from a new compiler (which I'm working on) and a strings library I'm not sure why we would need byte code support for real strings?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ACS DynaStrings for SBARINFO

Post by Graf Zahl »

I think that finishing the scripting branch should come first. The current string workaround for ACS is more than sufficient for most situations. But extending WFDS for that - please not.

(...unless this is an April Fools, of course...)
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”