summaryrefslogtreecommitdiff
path: root/src/script/squirrel_class.hpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-11-29 22:23:33 +0000
committertruebrain <truebrain@openttd.org>2011-11-29 22:23:33 +0000
commitbff7c33aa909d00428f81e6b5f89b236343fc13b (patch)
tree8a7617a800d443a19f871b7b7a0eb1382f08dfa5 /src/script/squirrel_class.hpp
parentb13fa6924b8bca7ec378d4daf87e18318670a44f (diff)
downloadopenttd-bff7c33aa909d00428f81e6b5f89b236343fc13b.tar.xz
(svn r23350) -Add: support different ScriptTypes in the helper functions for GetClassName (Rubidium)
Diffstat (limited to 'src/script/squirrel_class.hpp')
-rw-r--r--src/script/squirrel_class.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/script/squirrel_class.hpp b/src/script/squirrel_class.hpp
index a08d8b3a6..73117b60a 100644
--- a/src/script/squirrel_class.hpp
+++ b/src/script/squirrel_class.hpp
@@ -18,7 +18,7 @@
* The template to define classes in Squirrel. It takes care of the creation
* and calling of such classes, to minimize the API layer.
*/
-template <class CL>
+template <class CL, ScriptType ST>
class DefSQClass {
private:
const char *classname;
@@ -35,7 +35,7 @@ public:
void DefSQMethod(Squirrel *engine, Func function_proc, const char *function_name)
{
using namespace SQConvert;
- engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc));
+ engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func, ST>, 0, NULL, &function_proc, sizeof(function_proc));
}
/**
@@ -45,7 +45,7 @@ public:
void DefSQAdvancedMethod(Squirrel *engine, Func function_proc, const char *function_name)
{
using namespace SQConvert;
- engine->AddMethod(function_name, DefSQAdvancedNonStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc));
+ engine->AddMethod(function_name, DefSQAdvancedNonStaticCallback<CL, Func, ST>, 0, NULL, &function_proc, sizeof(function_proc));
}
/**
@@ -58,7 +58,7 @@ public:
void DefSQMethod(Squirrel *engine, Func function_proc, const char *function_name, int nparam, const char *params)
{
using namespace SQConvert;
- engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func>, nparam, params, &function_proc, sizeof(function_proc));
+ engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func, ST>, nparam, params, &function_proc, sizeof(function_proc));
}
/**