|
|
|
[
Permlink
| « Hide
]
Maggie Darwin added a comment - 24/Oct/08 05:48 AM
Excellent idea. Voted.
I haven't seen this suggested in years. It wouldn't be hard to implement in LSO or in Mono (only requires changes to the compiler, no VM changes needed). Mind you for LSO, you would need to insert code into the start of the state_entry() event (and insert a state_entry() event too if needed).
In LSO you would implement it with globals and recycle the memory addressed depending upon the state. Thanks for the code tags, Strife. One of these days I'll have to learn Jira Markup Language.
A state that declared a variable but had no events would be a no-op anyway, and one would hope the compiler would ignore the variable declaration when it came to allocating memory. The compiler isn't that smart sadly... BUT I don't think it will currently let you declare a state without atleast one event.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||