summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike <mikebuntu68@gmail.com>2024-05-11 14:44:34 -0400
committerMike <mikebuntu68@gmail.com>2024-07-20 11:37:22 -0400
commit902f3bbce4ab442abd897df1d084e4913774c787 (patch)
tree9f55b01c643b5b149bf267fc7289d38b63c38abc /src
parentb7a6355bc660424ccf246ad3bfec25a9560a4ddf (diff)
Match `ActorManager::FindActorById`
Diffstat (limited to 'src')
-rw-r--r--src/00_Core/Actor/ActorManager.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/00_Core/Actor/ActorManager.cpp b/src/00_Core/Actor/ActorManager.cpp
index 7390dcda..6408d6aa 100644
--- a/src/00_Core/Actor/ActorManager.cpp
+++ b/src/00_Core/Actor/ActorManager.cpp
@@ -135,10 +135,7 @@ ARM void ActorManager::Actor_vfunc_10(u32 param1) {
return;
}
-Actor* NONMATCH(ActorManager::FindActorById)(s32 id) {
- #ifndef NONMATCHING
- #include "../asm/ov00/Actor/ActorManager_Actor_FindActorById.inc"
- #else
+ARM Actor* ActorManager::FindActorById(s32 id) {
u32 actorId;
s32 cacheIndex;
Actor *actor;
@@ -150,11 +147,10 @@ Actor* NONMATCH(ActorManager::FindActorById)(s32 id) {
cacheIndex = this->mCacheEmptyActorIndex;
if ((cacheIndex >= 0) && (cacheIndex < this->mMaxActorIndex)) {
pActor = this->mActorTable;
- actor = this->mActorTable[cacheIndex];
- if (actor != NULL) {
- pActor = (Actor**)(u32)actor->mAlive;
- if (pActor != NULL && id == actor->mId) {
- return actor;
+ if (pActor[cacheIndex] != NULL) {
+ if ((Actor**)(u32)pActor[cacheIndex]->mAlive != NULL && id == pActor[cacheIndex]->mId) {
+ actor = pActor[cacheIndex];
+ goto ret;
}
}
}
@@ -173,8 +169,8 @@ Actor* NONMATCH(ActorManager::FindActorById)(s32 id) {
}
}
+ret:
return actor;
- #endif
}
Actor* ActorManager::GetActor(ActorRef *ref) {