summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
diff options
context:
space:
mode:
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;