DRActorRecurse functions matching

This commit is contained in:
Dethrace Labs 2025-09-06 07:14:16 +12:00 committed by Dethrace Engineering Department
parent f7ece6e227
commit f77755b94e
1 changed files with 10 additions and 3 deletions

View File

@ -518,11 +518,14 @@ br_uintptr_t DRActorEnumRecurse(br_actor* pActor, br_actor_enum_cbfn* callback,
if (result != 0) {
return result;
}
for (pActor = pActor->children; pActor != NULL; pActor = pActor->next) {
pActor = pActor->children;
while (pActor) {
result = DRActorEnumRecurse(pActor, callback, arg);
if (result != 0) {
return result;
}
pActor = pActor->next;
}
return 0;
}
@ -557,11 +560,13 @@ br_uint_32 DRActorEnumRecurseWithMat(br_actor* pActor, br_material* pMat, recurs
if (result != 0) {
return result;
}
for (pActor = pActor->children; pActor != NULL; pActor = pActor->next) {
pActor = pActor->children;
while (pActor != NULL) {
result = DRActorEnumRecurseWithMat(pActor, pMat, pCall_back, pArg);
if (result != 0) {
return result;
}
pActor = pActor->next;
}
return 0;
}
@ -581,11 +586,13 @@ br_uint_32 DRActorEnumRecurseWithTrans(br_actor* pActor, br_matrix34* pMatrix, b
if (result != 0) {
return result;
}
for (pActor = pActor->children; pActor != NULL; pActor = pActor->next) {
pActor = pActor->children;
while (pActor != NULL) {
result = DRActorEnumRecurseWithTrans(pActor, &combined_transform, pCall_back, pArg);
if (result != 0) {
return result;
}
pActor = pActor->next;
}
return 0;
}