Commit Graph
28 Commits
Author SHA1 Message Date
Glenn Maynard 9dbcdd3812 remove unused Push and FromStack overloads. 2005-04-30 03:13:24 +00:00
Glenn Maynard 0d7cbe1d43 remove unused Push and FromStack overloads. 2005-04-30 03:08:52 +00:00
Glenn Maynard cfb0143810 fix CreateTableFromArray 2005-04-29 08:05:13 +00:00
Glenn Maynard 134ee5e24a fix ReadArrayFromTable 2005-04-25 07:01:52 +00:00
Chris Danford 8415b4466d fix VC7 template error: move templated methods out of LuaManager 2005-03-13 00:01:05 +00:00
Ted Percival 17dbf884a7 fix build errors with gcc 2005-03-12 22:32:54 +00:00
Glenn Maynard 2d97c8e0ca fixes 2005-02-25 04:37:27 +00:00
Glenn Maynard 3b993dfa08 Replace PopStack with FromStack as a basic overloaded function.
Move Push and FromStack into a namespace, so other files can add to it;
that way, we can say Push(1) or Push(Actor*), instead of Push(1) and
pActor->PushSelf(), allowing easier templating.
Add presently unused/untested LuaHelpers::ReadArrayFromTable.
2005-02-24 20:03:07 +00:00
Glenn Maynard f762300f49 PopStack() calls 2005-02-22 04:20:58 +00:00
Glenn Maynard baf8ef940e RunScript cleanup, default to 0 return values 2005-02-22 01:21:38 +00:00
Chris Danford b688bff51d add pushing to vectors with any type 2005-02-21 06:51:10 +00:00
Chris Danford 8da09ebd6e let each file register its own constants with Lua 2005-02-17 07:32:21 +00:00
Chris Danford 9c29426f5f cleanup 2005-02-17 07:12:20 +00:00
Glenn Maynard 6f88bf18c0 Cleanup: change RunExpression to a RunScript helper. Never tack on
"return "; the caller can do that if it wants.  Instead, just act as a helper to
display a generic dialog on error.
2005-02-17 05:46:31 +00:00
Chris Danford c13accadc0 evaluate PlayerNumber as a lua expression 2005-02-16 21:20:33 +00:00
Chris Danford eb63c30d15 make hack more surgical 2005-02-16 17:33:28 +00:00
Chris Danford 4d31f3b4c1 evaluate TargetNumber as a Lua expression 2005-02-16 00:16:14 +00:00
Glenn Maynard 8584cbc0d7 when compiling a script from a file, don't dump the entire contents of the
script to the log/dialog
2005-02-15 07:17:49 +00:00
Glenn Maynard 0a0ad8714c allow LuaManager::RunExpression to return a function
show the filename when a full script has an error
use LuaManager::RunExpression in LuaExpression
2005-02-15 02:15:26 +00:00
Glenn Maynard 004d774889 simplify 2005-02-15 02:07:59 +00:00
Glenn Maynard 2103eb0531 bring RunExpression and RunScript closer together 2005-02-15 02:02:08 +00:00
Glenn Maynard 831e7c1825 remove LuaManager::PushNopFunction(). Just compile an empty function;
it'll be tiny, anyway.
2005-02-15 01:49:03 +00:00
Glenn Maynard fe6cd41543 update
add LuaManager::CreateTableFromArray, LuaManager::ReadArrayFromTable
2005-02-13 04:09:28 +00:00
Glenn Maynard a4de4c8c0d better function registration: store a reference, instead of making up a name 2005-02-05 23:03:20 +00:00
Glenn Maynard 088b7bb356 Allow passing a lua_State to PushStack; make them static.
Add SetGlobal(bool), UnsetGlobal, PushStackNil.
Pass lua_State* to LUA_RETURN.
2005-01-30 02:01:27 +00:00
Chris Danford 8555a6da45 use Lua to execute commands
(needs cleanup)
2005-01-26 11:21:43 +00:00
Chris Danford ed6aa8b02e The Lua state needs to be reset on a theme change to reload scripts 2005-01-24 03:05:37 +00:00
Chris Danford b055671a63 LuaHelpers.cpp -> LuaManager 2005-01-24 02:12:07 +00:00