2023-12-25 07:31:05 -08:00
|
|
|
/**
|
|
|
|
|
* c_node_iter.cpp
|
|
|
|
|
*
|
|
|
|
|
*/
|
2020-11-30 14:26:55 -08:00
|
|
|
|
2021-03-29 00:10:25 +02:00
|
|
|
#include "SSystem/SComponent/c_node_iter.h"
|
2023-05-12 12:10:14 -07:00
|
|
|
#include "SSystem/SComponent/c_node.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
#include "dolphin/types.h"
|
2020-11-30 14:26:55 -08:00
|
|
|
|
2021-03-29 00:10:25 +02:00
|
|
|
/* 80266324-802663B4 0090+00 s=0 e=1 z=0 None .text
|
|
|
|
|
* cNdIt_Method__FP10node_classPFP10node_classPv_iPv */
|
2023-12-25 07:31:05 -08:00
|
|
|
int cNdIt_Method(node_class* node, cNdIt_MethodFunc method, void* data) {
|
2021-03-30 02:45:32 +02:00
|
|
|
int ret = 1;
|
2023-12-25 07:31:05 -08:00
|
|
|
node_class* pNext = NODE_GET_NEXT(node);
|
2021-03-30 02:45:32 +02:00
|
|
|
|
2023-12-25 07:31:05 -08:00
|
|
|
while (node) {
|
|
|
|
|
int methodRet = method(node, data);
|
2021-03-30 02:45:32 +02:00
|
|
|
if (!methodRet)
|
|
|
|
|
ret = 0;
|
2023-12-25 07:31:05 -08:00
|
|
|
node = pNext;
|
2021-03-30 02:45:32 +02:00
|
|
|
pNext = NODE_GET_NEXT(pNext);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ret;
|
2020-11-30 14:26:55 -08:00
|
|
|
}
|
|
|
|
|
|
2021-03-29 00:10:25 +02:00
|
|
|
/* 802663B4-80266440 008C+00 s=0 e=1 z=0 None .text
|
|
|
|
|
* cNdIt_Judge__FP10node_classPFP10node_classPv_PvPv */
|
2023-12-25 07:31:05 -08:00
|
|
|
void* cNdIt_Judge(node_class* node, cNdIt_JudgeFunc judge, void* data) {
|
|
|
|
|
node_class* pNext = NODE_GET_NEXT(node);
|
2021-03-30 02:45:32 +02:00
|
|
|
|
2023-12-25 07:31:05 -08:00
|
|
|
while (node) {
|
|
|
|
|
void* ret = judge(node, data);
|
|
|
|
|
if (ret != NULL)
|
|
|
|
|
return ret;
|
|
|
|
|
node = pNext;
|
2021-03-30 02:45:32 +02:00
|
|
|
pNext = NODE_GET_NEXT(pNext);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
2020-11-30 14:26:55 -08:00
|
|
|
}
|