Commit Graph
23276 Commits
Author SHA1 Message Date
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
Glenn Maynard fe2b5f8e17 fix error case 2006-10-15 01:17:30 +00:00
Glenn Maynard 7282c5668b moved 2006-10-15 01:16:13 +00:00
Glenn Maynard 71af20fdf8 allow passing params to RunScript 2006-10-15 01:14:32 +00:00
Steve Checkoway fbd0863d56 Unused. 2006-10-15 00:09:59 +00:00
Steve Checkoway e87789da7c Rename XToString2 to XToString. 2006-10-15 00:09:18 +00:00
Steve Checkoway 04bff6bc1d Use XToString2. 2006-10-15 00:00:22 +00:00
Glenn Maynard 5c88094731 bind FileType 2006-10-14 23:35:31 +00:00
Glenn Maynard d639ff3388 bind ActorUtil::GetFileType 2006-10-14 23:34:41 +00:00
Glenn Maynard 596eb4d881 add LUA_REGISTER_NAMESPACE, for simple non-singleton bindings 2006-10-14 23:33:25 +00:00
Glenn Maynard fdd7b0accd simplify 2006-10-14 23:26:43 +00:00
Glenn Maynard 9fc246d64c remove unused 2006-10-14 22:36:16 +00:00
Glenn Maynard 82233e2ae7 Maintain multiple Lua states. Return an unused one for each LUA->Get()
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
2006-10-14 22:34:15 +00:00
Glenn Maynard 0c6d792648 simplify/optimize: use provided L 2006-10-14 22:22:16 +00:00
Steve Checkoway a6b3f71e67 Change some settings. 2006-10-14 22:20:24 +00:00
Glenn Maynard 1324b0a97f if LUA_NOREF, already unregistered 2006-10-14 22:20:00 +00:00
Glenn Maynard d2d46fb406 simplify 2006-10-14 22:19:13 +00:00
Steve Checkoway 3ef367e613 fix 2006-10-14 21:59:51 +00:00
Glenn Maynard 3dc13b568a LuaManager::L -> m_pLuaMain 2006-10-14 20:49:35 +00:00
Glenn Maynard 48d3733296 lock for consistency 2006-10-14 20:37:30 +00:00
Glenn Maynard 89b435ef51 LuaManager::GetLuaInformation -> LuaHelpers::GetLuaInformation 2006-10-14 20:35:32 +00:00
Glenn Maynard 4276c87b67 this needs to lock, like everything else 2006-10-14 20:33:08 +00:00
Steve Checkoway daa4b4617c "0" is not a boolean. 2006-10-14 08:04:57 +00:00
Steve Checkoway 4195f10b80 LoadingScreen is a global. 2006-10-14 07:00:31 +00:00
Steve Checkoway 2568284699 Unbreak HighScoreForACourseAndTrail node creation. 2006-10-14 06:53:16 +00:00
Glenn Maynard ec030b56ba parent 2006-10-14 04:55:36 +00:00