like ActorUtil::Create. Most of the time, use LoadActor,
which is for loading files by filename, like ActorUtil::MakeActor.
(If you're creating "a Model with these parameters", use Def.Model.
If you're just loading "this other filename, whatever it is",
use LoadActor.)
This doesn't actually need to be two files anymore. Previously, XML
forced us to split actors apart at a finer level than was natural. This could
be merged into a single file easily now, but I've left it as two for now for
demonstration and testing purposes.
-1 key
-2 value
-3 key
...
The top key and value can be removed or modified as required. The key at -3 should not be touched since it is required for the next iteration through the loop.
Stack management is simplified. Anything left on the stack above the key will be popped. After the loop terminates normally, the stack will be as it was before the loop was entered (no nil values to clean up).
with Lua bindings: they couldn't read from disk, or render, or do anything
else potentially time-consuming, because that would hold the Lua lock,
preventing other threads from using it.
call.
- this means that nested calls which use Lua in unrelated, black boxed
ways (and so don't pass around an *L) don't share a stack; when you
Get a new state, you're guaranteed an empty stack, and like function
dispatches, you can use absolute stack indexes starting from 1
- we don't have to track stack counts to sanity check it; it always starts
at 0, so just check that the stack is empty again on Release
- we maintain a pool of states, so Get() is still fast; we typically create
only a couple states