From 3d920314042fc84ccffc5f4b503e85e3b77fc4a2 Mon Sep 17 00:00:00 2001 From: Pistonight Date: Sat, 3 May 2025 21:27:10 -0700 Subject: CreatePlayerEquipActorMgr --- .../ActorSystem/actActorLinkConstDataAccess.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp') 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 +#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(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; -- cgit v1.2.3