MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / DefSQAdvancedMethod

Method DefSQAdvancedMethod

src/script/squirrel_class.hpp:46–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 */
45 template <typename Func>
46 void DefSQAdvancedMethod(Squirrel &engine, Func function_proc, std::string_view function_name)
47 {
48 using namespace SQConvert;
49 engine.AddMethod(function_name, DefSQAdvancedNonStaticCallback<CL, Func, ST>, {}, &function_proc, sizeof(function_proc));
50 }
51
52 /**
53 * This defines a static method inside a class for Squirrel with defined params.

Callers 2

RegisterAPIMethod · 0.80
RegisterAPIMethod · 0.80

Calls 1

AddMethodMethod · 0.80

Tested by

no test coverage detected