diff options
| author | Aetias <aetias@outlook.com> | 2024-10-21 20:36:15 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2024-10-21 20:36:15 +0200 |
| commit | a62cc074e93cdd77605bddcd145a96d3cfa7618d (patch) | |
| tree | 31f0d5bf0872b316643d543957ea2a6d22e632e2 /src/00_Core/Actor/ActorManager.cpp | |
| parent | 5c3e3aee99af35884462f518a9bc1fbf65ae92d4 (diff) | |
| parent | f4c5e4862419a14487575bf477118458c0e4a289 (diff) | |
Merge branch 'main' into actor-manager
Diffstat (limited to 'src/00_Core/Actor/ActorManager.cpp')
| -rw-r--r-- | src/00_Core/Actor/ActorManager.cpp | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/00_Core/Actor/ActorManager.cpp b/src/00_Core/Actor/ActorManager.cpp index d3e7f13f..4438c7a1 100644 --- a/src/00_Core/Actor/ActorManager.cpp +++ b/src/00_Core/Actor/ActorManager.cpp @@ -1,20 +1,21 @@ #include "Actor/ActorManager.hpp" void ActorManager::func_ov00_020c3484(ActorRef *ref, Actor *actor, unk32 param3) {} -Actor* ActorManager::GetActor(ActorRef *ref) {} +void ActorManager::Actor_vfunc_10(u32 param1) {} +Actor *ActorManager::FindActorById(u32 id) {} +Actor *ActorManager::GetActor(ActorRef *ref) {} bool FilterActor::Filter(Actor *actor) {} s32 ActorManager::FilterActors(FilterActorBase *filter, ActorList *filteredActors) {} void ActorManager::FindActorByType(ActorRef *ref, ActorManager *manager, ActorTypeId type) {} void ActorManager::FindNearestActorOfType(ActorRef *ref, ActorManager *manager, ActorTypeId type, Vec3p *pos) {} bool ActorManager::func_ov00_020c398c(u32 index) {} void ActorManager::func_ov00_020c399c(u32 index, Cylinder *cylinder) {} -Actor* ActorManager::func_ov00_020c39ac(u32 index, const ActorTypeId *actorTypes, bool param3) {} +Actor *ActorManager::func_ov00_020c39ac(u32 index, const ActorTypeId *actorTypes, bool param3) {} s32 ActorManager::func_ov00_020c3b2c(s32 *param1) {} s32 ActorManager::func_ov00_020c3bb0(unk32 param1, s32 *param2) {} void ActorManager::func_ov00_020c3ce8(unk32 param1, unk32 param2) {} void ActorManager::Actor_vfunc_28() {} - extern void func_ov00_020c3f54(void *, u32 param2); extern s32 *data_027e103c; extern s32 *data_027e077c; @@ -29,7 +30,7 @@ ARM void ActorManager::DeleteActor(u32 index, bool param2) { if (this->mActorTable[index] != NULL) { delete this->mActorTable[index]; } - + this->mActorTable[index] = NULL; if (param2) { @@ -37,7 +38,7 @@ ARM void ActorManager::DeleteActor(u32 index, bool param2) { } this->mNumActors--; - + if (index + 1 != this->mMaxActorIndex) { return; } @@ -59,7 +60,7 @@ ARM void ActorManager::Actor_vfunc_10(u32 param1) { Actor *actor; int i; - u32 uVar1 = param1; + u32 uVar1 = param1; Actor **currentActor = this->mActorTable; for (i = 0; i < this->mMaxActorIndex; ++i) { @@ -75,7 +76,7 @@ ARM void ActorManager::Actor_vfunc_10(u32 param1) { return; } -ARM Actor* ActorManager::FindActorById(s32 id) { +ARM Actor *ActorManager::FindActorById(s32 id) { u32 actorId; s32 cacheIndex; Actor *actor; @@ -88,24 +89,24 @@ ARM Actor* ActorManager::FindActorById(s32 id) { if ((cacheIndex >= 0) && (cacheIndex < this->mMaxActorIndex)) { pActor = this->mActorTable; if (pActor[cacheIndex] != NULL) { - if ((Actor**)(u32)pActor[cacheIndex]->mAlive != NULL && id == pActor[cacheIndex]->mId) { + if ((Actor **) (u32) pActor[cacheIndex]->mAlive != NULL && id == pActor[cacheIndex]->mId) { actor = pActor[cacheIndex]; goto ret; } } } - pActor = this->mActorTable; - actorId = this->mMaxActorIndex; + pActor = this->mActorTable; + actorId = this->mMaxActorIndex; lastActor = pActor + actorId; for (; pActor < lastActor; pActor = pActor + 1) { - if (*pActor != NULL) { - actorId = (u32)(*pActor)->mAlive; - if (actorId != 0 && id == (*pActor)->mId) { - actor = *pActor; - break; + if (*pActor != NULL) { + actorId = (u32) (*pActor)->mAlive; + if (actorId != 0 && id == (*pActor)->mId) { + actor = *pActor; + break; + } } - } } } @@ -113,13 +114,13 @@ ret: return actor; } -Actor* ActorManager::GetActor(ActorRef *ref) { +Actor *ActorManager::GetActor(ActorRef *ref) { Actor *pActor; u32 alive; alive = ref->index; - if ((s32)alive < 0) { + if ((s32) alive < 0) { return NULL; } @@ -128,7 +129,7 @@ Actor* ActorManager::GetActor(ActorRef *ref) { alive = pActor->mAlive; if (alive != 0 && ref->id == pActor->mId) { return pActor; - } + } } return NULL; |
