summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
diff options
context:
space:
mode:
authorPistonight <pistonknight@outlook.com>2025-05-03 21:27:10 -0700
committerPistonight <pistonknight@outlook.com>2025-06-19 12:18:30 -0700
commit3d920314042fc84ccffc5f4b503e85e3b77fc4a2 (patch)
tree2be90adf201ed3e7ea9c9da68cf4699d1c190f5e /src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
parentf18a3f4f9410e6eedb85b0434dbedc119e49d81b (diff)
CreatePlayerEquipActorMgr
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp')
-rw-r--r--src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
index c44d5717..06694bbf 100644
--- a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
+++ b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
@@ -1,4 +1,6 @@
#include "KingSystem/ActorSystem/actActorLinkConstDataAccess.h"
+#include <prim/seadRuntimeTypeInfo.h>
+#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actBaseProc.h"
#include "KingSystem/ActorSystem/actBaseProcMgr.h"
#include "KingSystem/Utils/Debug.h"
@@ -25,6 +27,19 @@ bool ActorLinkConstDataAccess::acquire(BaseProc* proc) {
return proc && proc->acquire(*this);
}
+const Actor* ActorLinkConstDataAccess::getActor() const {
+ if (!mProc)
+ return nullptr;
+ return sead::DynamicCast<Actor>(mProc);
+}
+
+const sead::Matrix34f& ActorLinkConstDataAccess::getActorMtx() {
+ const Actor* actor = getActor();
+ if (actor)
+ return actor->getMtx();
+ return sead::Matrix34f::ident;
+}
+
bool acquireProc(ActorLinkConstDataAccess* accessor, BaseProc* proc, const sead::SafeString& from,
s32) {
bool acquired = false;