| 2530 | } |
| 2531 | |
| 2532 | CScriptArray* ASGetObjectIDArray() { |
| 2533 | asIScriptContext* ctx = asGetActiveContext(); |
| 2534 | asIScriptEngine* engine = ctx->GetEngine(); |
| 2535 | asITypeInfo* arrayType = engine->GetTypeInfoById(engine->GetTypeIdByDecl("array<int>")); |
| 2536 | CScriptArray* array = CScriptArray::Create(arrayType, (asUINT)0); |
| 2537 | array->Reserve(the_scenegraph->objects_.size()); |
| 2538 | |
| 2539 | const SceneGraph::object_list& objects = the_scenegraph->objects_; |
| 2540 | for (auto object : objects) { |
| 2541 | int val = object->GetID(); |
| 2542 | if (val != -1) { |
| 2543 | array->InsertLast(&val); |
| 2544 | } |
| 2545 | } |
| 2546 | return array; |
| 2547 | } |
| 2548 | |
| 2549 | void ASDeleteObjectID(int val) { |
| 2550 | LOGD << "Deleting id: " << val << std::endl; |
nothing calls this directly
no test coverage detected