diff options
| author | Léo Lam <leo@leolam.fr> | 2025-06-22 23:48:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-22 23:48:19 +0200 |
| commit | 5dda15014c0ae35c31b7b0dc6c56c828752baba1 (patch) | |
| tree | 3db6e21a0025e9a0b20d88199e781c95c7947878 /src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp | |
| parent | 71530ca9b1b9a5d974f28a97ebe52ae8b29c208f (diff) | |
| parent | 3d920314042fc84ccffc5f4b503e85e3b77fc4a2 (diff) | |
Merge pull request #141 from Pistonight/cpeam
CreatePlayerEquipActorMgr
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp')
| -rw-r--r-- | src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp | 15 |
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; |
