commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
63
include/modules/script_squirrel/legacy/instance_binding.cpp
Normal file
63
include/modules/script_squirrel/legacy/instance_binding.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include "binding_helpers.h"
|
||||
#include "scene3d/instance.h"
|
||||
#include "scene3d/group.h"
|
||||
|
||||
using namespace GS::S3D;
|
||||
using namespace GS::Script;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
SQInteger InstanceGetItemList(HSQUIRRELVM vm)
|
||||
{
|
||||
__SQ_GETSINGLESAFEPTR(instance, Instance, typetag_Instance)
|
||||
sq_newarray(vm, 0);
|
||||
if (instance->instance_group)
|
||||
ListForeachPtr(MItem *, i, instance->instance_group->GetItemList())
|
||||
{
|
||||
CObject::Push(vm, (void *)i, typetag_Item);
|
||||
sq_arrayappend(vm, -2);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
SQInteger InstanceGetTemplatePath(HSQUIRRELVM vm)
|
||||
{
|
||||
__SQ_GETSINGLESAFEPTR(instance, Instance, typetag_Instance)
|
||||
__SQ_RETURNSTRING(instance->template_path.c_str())
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void RegisterInstanceBinding(HSQUIRRELVM vm)
|
||||
{
|
||||
/*#
|
||||
Topic: Instance
|
||||
Type: Instance
|
||||
#*/
|
||||
|
||||
/*#
|
||||
Section: InstanceGeneric
|
||||
Desc: Generic functions
|
||||
#*/
|
||||
/*#
|
||||
Func: InstanceGetItemList
|
||||
Proto: array:Instance
|
||||
Desc: Return instance item list. Note: The instance must have been instantiate to return any item.
|
||||
#*/
|
||||
sq_register(vm, InstanceGetItemList, "InstanceGetItemList", _SC(".x"));
|
||||
/*#
|
||||
Func: InstanceGetTemplatePath
|
||||
Proto: string:Instance
|
||||
Desc: Return instance path
|
||||
#*/
|
||||
sq_register(vm, InstanceGetTemplatePath, "InstanceGetTemplatePath", _SC(".x"));
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user