(svn r23623) -Add: allow bi-directional communication with the AdminPort and GameScript

This commit is contained in:
truebrain
2011-12-19 21:00:32 +00:00
parent 77b7366c29
commit 3a535690d4
27 changed files with 656 additions and 7 deletions

View File

@@ -71,6 +71,16 @@ public:
engine->AddMethod(function_name, DefSQStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc));
}
/**
* This defines a static method inside a class for Squirrel, which has access to the 'engine' (experts only!).
*/
template <typename Func>
void DefSQAdvancedStaticMethod(Squirrel *engine, Func function_proc, const char *function_name)
{
using namespace SQConvert;
engine->AddMethod(function_name, DefSQAdvancedStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc));
}
/**
* This defines a static method inside a class for Squirrel with defined params.
* @note If you define nparam, make sure that he first param is always 'x',