Files
tp/libs/SSystem/SComponent/c_tree.cpp
T

30 lines
743 B
C++
Raw Normal View History

2020-11-30 14:26:55 -08:00
#include "SComponent/c_tree.h"
2020-12-26 11:31:49 -05:00
#include "global.h"
2020-11-30 14:26:55 -08:00
2020-12-26 11:31:49 -05:00
int cTr_SingleCut(node_class* pNode) {
2020-11-30 14:26:55 -08:00
return cLs_SingleCut(pNode);
}
2020-12-26 11:31:49 -05:00
int cTr_Addition(node_lists_tree_class* pTree, int listIdx, node_class* pNode) {
2020-11-30 14:26:55 -08:00
if (listIdx >= pTree->mNumLists)
return 0;
return cLs_Addition(&pTree->mpLists[listIdx], pNode);
}
2020-12-26 11:31:49 -05:00
int cTr_Insert(node_lists_tree_class* pTree, int listIdx, node_class* pNode, int idx) {
2020-11-30 14:26:55 -08:00
if (listIdx >= pTree->mNumLists)
return 0;
return cLs_Insert(&pTree->mpLists[listIdx], idx, pNode);
}
2020-12-26 11:31:49 -05:00
void cTr_Create(node_lists_tree_class* pTree, node_list_class* pLists, int numLists) {
2020-11-30 14:26:55 -08:00
pTree->mpLists = pLists;
pTree->mNumLists = numLists;
while (numLists-- > 0)
cLs_Create(pLists++);
}