void aiContext::destroyObject(aiObject *obj) { if (obj == getTopObject()) { m_top_node.reset(); } else { delete obj; } }
void CMapObjectManager::sortZorder(MapObject** objs,int len) { int idx = 0; while (idx < len) { // 找出当前最上层的元素对象(没有任何元素对象遮挡) int ret = getTopObject(objs,len,idx); assert(ret != -1); MapObject* obj = objs[idx]; objs[idx] = objs[ret]; objs[ret] = obj; idx++; } }