Re: Are there any global registers?
And we only get a limited number of global variables, right? So if I want to make a set of global variables that mirror Link's inventory, checking for all items he could possibly have, do I even have enough space to do that? I guess I could use some creative data structure, where I use X bits to determine unique combinations of 2^X different items, but I'll be damned if that doesn't sound like a pain in the ass.
Re: Are there any global registers?
Quote:
Originally Posted by
Saffith
You meant SETR, not LOADR, right?
Oops, yes, yes I did.
Quote:
I attached it to eight different FFCs. For the first two, the output isn't entirely predictable. One of them prints #1's X position, and the other one prints 0.
:odd:
Well, here's the bug. REFFFC should be intialized to 0 for the first FFC, 1 for the second, etc. If they are being set to unpredictable values, then yes, cross-script intereference is very possible.
Quote:
So if I want to make a set of global variables that mirror Link's inventory, checking for all items he could possibly have, do I even have enough space to do that?
Well, there are 256 item slots, of which a little over 100 are used now, so yes, you could use global variables. But since each global is a long, it would be much more efficient to use individual bits. When arrays are implemented that won't be too bad to implement; right now it's so painful that it's probably not worth doing.
EDIT: Sorry beefster09, I completely missed your post.
Gobal variables are always totally global, you don't need to do anything special to access them from elsewhere in the game.
Re: Are there any global registers?