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

Method AddClassBegin

src/script/squirrel.cpp:291–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void Squirrel::AddClassBegin(std::string_view class_name)
292{
293 ScriptAllocatorScope alloc_scope(this);
294
295 sq_pushroottable(this->vm);
296 sq_pushstring(this->vm, class_name);
297 sq_newclass(this->vm, SQFalse);
298}
299
300void Squirrel::AddClassBegin(std::string_view class_name, std::string_view parent_class)
301{

Callers 3

RegisterAPIMethod · 0.80
PreRegisterMethod · 0.80
RegisterAPIMethod · 0.80

Calls 4

sq_pushroottableFunction · 0.85
sq_pushstringFunction · 0.85
sq_newclassFunction · 0.85
sq_getFunction · 0.85

Tested by

no test coverage detected