Steve Checkoway
c3eccabd98
foo?
2006-10-15 08:00:28 +00:00
Steve Checkoway
1948d57161
Simplify.
2006-10-15 07:51:38 +00:00
Steve Checkoway
335227c095
Nothing is pushed when lua_next() returns 0.
2006-10-15 07:39:16 +00:00
Glenn Maynard
e3f3adc963
cleanup
2006-10-15 07:37:50 +00:00
Glenn Maynard
2ae28fb758
fix every top-level directory is scanned for courses
2006-10-15 07:30:58 +00:00
Glenn Maynard
84edde11b8
simplify
2006-10-15 07:16:57 +00:00
Glenn Maynard
df90e4f4c2
simplify
2006-10-15 07:15:40 +00:00
Glenn Maynard
a6b000a81b
don't think this was meant to be merged out
2006-10-15 07:13:41 +00:00
Glenn Maynard
cb26942e45
no backslashes in XML/Lua
2006-10-15 06:46:15 +00:00
Glenn Maynard
27524421e1
don't use backslashes in redirs
2006-10-15 06:44:39 +00:00
Glenn Maynard
329e2ea4a1
Type -> Class
2006-10-15 06:01:44 +00:00
Glenn Maynard
16ee8fec3a
IsRegisteredClass
2006-10-15 05:58:54 +00:00
Glenn Maynard
70cebc91e1
IsRegisteredType -> IsRegisteredClass
2006-10-15 05:58:27 +00:00
Glenn Maynard
68064ec6aa
Always use a real type with Def; don't say "Def.Layer". If you don't
...
know the type you're using, you should be using LoadActor.
2006-10-15 05:56:30 +00:00
Glenn Maynard
61e58cd51f
bind IsRegisteredType
2006-10-15 05:54:50 +00:00
Glenn Maynard
d38897a6fd
This code creates actors, then loads nodes with their parameters
...
later. Make this less of a special case: load the node normally,
and check that the resulting actor is the wanted type.
2006-10-15 05:53:26 +00:00
Glenn Maynard
116db99a92
The "Def.Type { }" syntax is for defining actors by type,
...
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.)
2006-10-15 05:51:23 +00:00
Glenn Maynard
852de9484b
ComboGraph -> GraphDisplay
2006-10-15 05:37:35 +00:00
Glenn Maynard
8e34463f78
assert
2006-10-15 05:31:44 +00:00
Glenn Maynard
5a3a5a926f
save before commit
2006-10-15 05:08:29 +00:00
Glenn Maynard
6a8fb25435
convert to Lua
...
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.
2006-10-15 05:06:31 +00:00
Glenn Maynard
b0e5b201e3
move actor definition stuff into ActorDef.lua
...
handle loading other definitions
2006-10-15 05:02:58 +00:00
Glenn Maynard
68db5dff42
proper error messages, and return nil on error
2006-10-15 04:59:48 +00:00
Glenn Maynard
54698735cd
don't bother asserting here; states commonly still active when aborting from a dialog
2006-10-15 04:49:18 +00:00
Glenn Maynard
01d6504058
on GetAttrPath where the file doesn't exist and we ignore the error, return false as if the attribute didn't exist
2006-10-15 04:01:12 +00:00
Glenn Maynard
f0227238a5
instead of assuming png, and returning a bad filename, return false
2006-10-15 03:59:24 +00:00
Glenn Maynard
7962c4c739
maybe not, but it doesn't matter
2006-10-15 03:56:46 +00:00
Glenn Maynard
f3ad2fc57c
remove unused
2006-10-15 03:54:53 +00:00
Glenn Maynard
9e89f2acdb
ActorUtil::GetAttrPath does this
2006-10-15 03:44:11 +00:00
Steve Checkoway
a183541eed
Use FOREACH_LUATABLE.
2006-10-15 03:16:06 +00:00
Steve Checkoway
943ba7e0fa
FOREACH_LUATABLE simplifies iterating over all key-value pairs in the lua table at index. One difference with calling lua_next() is that the key is duplicated and pushed onto the stack above the value. At the beginning of the loop body the stack looks like:
...
-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).
2006-10-15 03:15:32 +00:00
Glenn Maynard
285b1db112
debug.traceback in a more natural format for me
2006-10-15 02:55:21 +00:00
Glenn Maynard
32e6fe6198
license
2006-10-15 02:53:11 +00:00
Glenn Maynard
95cf160912
usable loadfile/dofile
2006-10-15 02:52:04 +00:00
Glenn Maynard
2af845a248
ActorUtil::ResolvePath
2006-10-15 02:42:33 +00:00
Glenn Maynard
4be14b7f50
bind "lua.ReadFile"
2006-10-15 02:35:33 +00:00
Glenn Maynard
c8a8572a21
Allow yielding the Lua engine. This fixes a long-standing limitation
...
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.
2006-10-15 01:58:36 +00:00
Glenn Maynard
c186d03028
remove unused
2006-10-15 01:50:13 +00:00
Glenn Maynard
0833c198e3
SetCurrentSong(nil) is valid
2006-10-15 01:47:22 +00:00
Glenn Maynard
2478ec0873
scattered ActorUtil::ResolvePath calls unneeded
2006-10-15 01:46:23 +00:00
Glenn Maynard
4ebd0192db
ActorUtil::ResolvePath in ActorUtil::GetAttrPath
2006-10-15 01:45:33 +00:00
Glenn Maynard
9f207942b6
use LuaHelpers::DeepCopy
2006-10-15 01:43:13 +00:00
Glenn Maynard
10b96b08b8
LuaHelpers::DeepCopy
2006-10-15 01:40:11 +00:00
Glenn Maynard
f7bb9fe3a4
change DeepCopy(table) to DeepCopy(from,to)
2006-10-15 01:36:50 +00:00
Steve Checkoway
f3c949486e
NEver -> Never.
2006-10-15 01:33:36 +00:00
Glenn Maynard
6a0d5b1f73
wasn't ready for that transition yet ...
2006-10-15 01:31:15 +00:00
Glenn Maynard
ac22c5015f
XToString -> XToString2
2006-10-15 01:26:52 +00:00
Glenn Maynard
6f93fca60b
no params
2006-10-15 01:23:00 +00:00
Glenn Maynard
72b59c1405
pass pParentActor
2006-10-15 01:21:54 +00:00
Glenn Maynard
f4dc9ddf25
sName is a file now, not a dir
2006-10-15 01:20:33 +00:00