PDA

View Full Version : Seeking Help on Changing Screen Data



C-Dawg
02-22-2008, 11:18 PM
I can't figure out what function in Zscript.txt lets me write or read combo data from a given screen on a given map. I need to do that to make up some general array functions.

We got anything like that?

ScaryBinary
02-23-2008, 12:03 AM
...Couldn't find anything. There's plenty of stuff to deal with combos on the current screen, but I couldn't find any functions that would grab the combos from a given screen. :shrug:

However, let me throw this idea out: there are functions to read and set the D[] registers for a given screen.

float GetScreenD(int screen, int reg)
* Retrieves the value of SD[reg] on the given screen of the current
* DMap.

void SetScreenD(int screen, int reg, float value)
* Sets the value of SD[reg] on the given screen of the current DMap.
(I'm hoping that by SD[reg], "they" really mean Screen->D[]?)

That would give you an X-by-8 array, where X is the number of screens you dedicate to your array? Any takers?

The only other thing I can think of, and it sounds like it would get really ugly really fast, is to actually warp Link to the desired screen so you can use the "ComboAt" function tucked away in std.zh or the Screen->ComboD[] to read the combo data from the screen...then warp Link back to his original spot once you've read the data. But again that sounds nasty.

Gleeok
02-23-2008, 09:50 PM
Hmm, I'm not sure. You might be able to write Data to the current screen only. How many screens would you need to check for it to work? The only thing I can think of would be to use Layer 0 of the current screen if GetScreenD doesn't work.