summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem
diff options
context:
space:
mode:
Diffstat (limited to 'src/KingSystem/ActorSystem')
-rw-r--r--src/KingSystem/ActorSystem/CMakeLists.txt13
-rw-r--r--src/KingSystem/ActorSystem/actASSetting.cpp31
-rw-r--r--src/KingSystem/ActorSystem/actASSetting.h26
-rw-r--r--src/KingSystem/ActorSystem/actActor.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actActorEditorNode.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actActorParamMgr.cpp8
-rw-r--r--src/KingSystem/ActorSystem/actAiAction.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actAiActionBase.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actAiAi.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actAiBehavior.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actAiQuery.cpp2
-rw-r--r--src/KingSystem/ActorSystem/actDebugFinder.cpp11
-rw-r--r--src/KingSystem/ActorSystem/actDebugFinder.h19
-rw-r--r--src/KingSystem/ActorSystem/actLodState.cpp (renamed from src/KingSystem/ActorSystem/LOD/actLodState.cpp)2
-rw-r--r--src/KingSystem/ActorSystem/actLodState.h (renamed from src/KingSystem/ActorSystem/LOD/actLodState.h)0
-rw-r--r--src/KingSystem/ActorSystem/aiForkAI.cpp2
-rw-r--r--src/KingSystem/ActorSystem/aiRootAi.cpp (renamed from src/KingSystem/ActorSystem/actAiRoot.cpp)2
-rw-r--r--src/KingSystem/ActorSystem/aiRootAi.h (renamed from src/KingSystem/ActorSystem/actAiRoot.h)0
19 files changed, 51 insertions, 79 deletions
diff --git a/src/KingSystem/ActorSystem/CMakeLists.txt b/src/KingSystem/ActorSystem/CMakeLists.txt
index c83f97de..e0b70bfd 100644
--- a/src/KingSystem/ActorSystem/CMakeLists.txt
+++ b/src/KingSystem/ActorSystem/CMakeLists.txt
@@ -13,9 +13,6 @@ target_sources(uking PRIVATE
Awareness/actAwarenessInstance.h
- LOD/actLodState.cpp
- LOD/actLodState.h
-
Profiles/actRopeBase.cpp
Profiles/actRopeBase.h
Profiles/actWeaponBase.cpp
@@ -62,10 +59,6 @@ target_sources(uking PRIVATE
actAiQuery.h
actAiQueries.cpp
actAiQueries.h
- actAiRoot.cpp
- actAiRoot.h
- actASSetting.cpp
- actASSetting.h
actBaseProc.cpp
actBaseProc.h
actBaseProcAccessor.cpp
@@ -99,6 +92,8 @@ target_sources(uking PRIVATE
actClusteredRenderer.h
actDebug.cpp
actDebug.h
+ actDebugFinder.cpp
+ actDebugFinder.h
actGlobalParameter.cpp
actGlobalParameter.h
actIDamageManager.cpp
@@ -110,6 +105,8 @@ target_sources(uking PRIVATE
actInstParamPack.cpp
actInstParamPack.h
actLifeRecoveryInfo.h
+ actLodState.cpp
+ actLodState.h
actPhysicsConstraints.cpp
actPhysicsConstraints.h
actPhysicsUserTag.cpp
@@ -134,6 +131,8 @@ target_sources(uking PRIVATE
aiFork6AI.h
aiForkAI.cpp
aiForkAI.h
+ aiRootAi.cpp
+ aiRootAi.h
behaviorDummyBehavior.cpp
behaviorDummyBehavior.h
diff --git a/src/KingSystem/ActorSystem/actASSetting.cpp b/src/KingSystem/ActorSystem/actASSetting.cpp
deleted file mode 100644
index 2b020cfe..00000000
--- a/src/KingSystem/ActorSystem/actASSetting.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "KingSystem/ActorSystem/actASSetting.h"
-#include "KingSystem/Resource/resLoadRequest.h"
-#include "KingSystem/Resource/resResourceASSetting.h"
-
-namespace ksys::act {
-
-SEAD_SINGLETON_DISPOSER_IMPL(ASSetting)
-
-ASSetting::~ASSetting() = default;
-
-void ASSetting::init(const sead::SafeString& config_path, sead::Heap* heap) {
- res::LoadRequest req;
- req.mRequester = "ASSetting";
- req._22 = true;
- mHandle.load(config_path, &req);
-}
-
-// NON_MATCHING: sead::DirectResource to res::ASSetting cast nullptr check; branching for the return
-res::ASParamParser* ASSetting::getBoneParams(const sead::SafeString& key) const {
- auto* res = sead::DynamicCast<res::ASSetting>(mHandle.getResource());
- if (!res)
- return nullptr;
-
- for (auto& bones : res->getBlenderBones()) {
- if (key == bones.mKeyName.ref())
- return &bones.mBoneParams;
- }
- return nullptr;
-}
-
-} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actASSetting.h b/src/KingSystem/ActorSystem/actASSetting.h
deleted file mode 100644
index 8c97c85a..00000000
--- a/src/KingSystem/ActorSystem/actASSetting.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#pragma once
-
-#include <heap/seadDisposer.h>
-#include <prim/seadSafeString.h>
-#include "KingSystem/Resource/resHandle.h"
-#include "KingSystem/Resource/resResourceASSetting.h"
-#include "KingSystem/Utils/Types.h"
-
-namespace ksys::act {
-
-// FIXME: very incomplete
-class ASSetting {
- SEAD_SINGLETON_DISPOSER(ASSetting)
- ASSetting() = default;
- virtual ~ASSetting();
-
-public:
- void init(const sead::SafeString& config_path, sead::Heap* heap);
- res::ASParamParser* getBoneParams(const sead::SafeString& key) const;
-
-private:
- res::Handle mHandle;
-};
-KSYS_CHECK_SIZE_NX150(ASSetting, 0x78);
-
-} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actActor.cpp b/src/KingSystem/ActorSystem/actActor.cpp
index ec7f3ea1..40432678 100644
--- a/src/KingSystem/ActorSystem/actActor.cpp
+++ b/src/KingSystem/ActorSystem/actActor.cpp
@@ -1,8 +1,8 @@
#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actActorParam.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
#include "KingSystem/ActorSystem/actBaseProcLink.h"
#include "KingSystem/ActorSystem/actBaseProcMgr.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/Physics/System/physInstanceSet.h"
namespace ksys::act {
diff --git a/src/KingSystem/ActorSystem/actActorEditorNode.cpp b/src/KingSystem/ActorSystem/actActorEditorNode.cpp
index 47b6621e..ecb1bf00 100644
--- a/src/KingSystem/ActorSystem/actActorEditorNode.cpp
+++ b/src/KingSystem/ActorSystem/actActorEditorNode.cpp
@@ -1,5 +1,5 @@
#include "KingSystem/ActorSystem/actActorEditorNode.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/System/KingEditor.h"
namespace ksys::act {
diff --git a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
index 591df49e..e7ce2c15 100644
--- a/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
+++ b/src/KingSystem/ActorSystem/actActorLinkConstDataAccess.cpp
@@ -3,8 +3,8 @@
#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actActorParam.h"
#include "KingSystem/ActorSystem/actActorUtil.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
#include "KingSystem/ActorSystem/actBaseProc.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/Map/mapObject.h"
#include "KingSystem/Resource/Actor/resResourceGParamList.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttack.h"
diff --git a/src/KingSystem/ActorSystem/actActorParamMgr.cpp b/src/KingSystem/ActorSystem/actActorParamMgr.cpp
index fdf9c870..2ff51d04 100644
--- a/src/KingSystem/ActorSystem/actActorParamMgr.cpp
+++ b/src/KingSystem/ActorSystem/actActorParamMgr.cpp
@@ -1,11 +1,11 @@
#include "KingSystem/ActorSystem/actActorParamMgr.h"
#include <prim/seadScopedLock.h>
-#include "KingSystem/ActorSystem/actASSetting.h"
#include "KingSystem/ActorSystem/actActorParam.h"
#include "KingSystem/Resource/Actor/resResourceAIProgram.h"
#include "KingSystem/Resource/Actor/resResourceAISchedule.h"
#include "KingSystem/Resource/Actor/resResourceAS.h"
#include "KingSystem/Resource/Actor/resResourceASList.h"
+#include "KingSystem/Resource/Actor/resResourceASSettingMgr.h"
#include "KingSystem/Resource/Actor/resResourceActorLink.h"
#include "KingSystem/Resource/Actor/resResourceAnimInfo.h"
#include "KingSystem/Resource/Actor/resResourceAttClient.h"
@@ -140,13 +140,13 @@ void ActorParamMgr::init(sead::Heap* heap, sead::Heap* debug_heap) {
res::registerEntryFactory(new (mTempHeap) res::EntryFactory<res::ASSetting>(0.0, 0x80000),
"bassetting");
- ASSetting::createInstance(mTempHeap);
- ASSetting::instance()->init("Actor/ASSetting.bassetting", mTempHeap);
+ res::ASSettingMgr::createInstance(mTempHeap);
+ res::ASSettingMgr::instance()->init("Actor/ASSetting.bassetting", mTempHeap);
ActorParam::resetDummyResources();
}
ActorParamMgr::~ActorParamMgr() {
- ASSetting::deleteInstance();
+ res::ASSettingMgr::deleteInstance();
}
bool ActorParamMgr::checkPath(const sead::SafeString& path) const {
diff --git a/src/KingSystem/ActorSystem/actAiAction.cpp b/src/KingSystem/ActorSystem/actAiAction.cpp
index 4c57a5e6..721afb09 100644
--- a/src/KingSystem/ActorSystem/actAiAction.cpp
+++ b/src/KingSystem/ActorSystem/actAiAction.cpp
@@ -2,8 +2,8 @@
#include <codec/seadHashCRC32.h>
#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actActorParam.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
#include "KingSystem/ActorSystem/actionDummyAction.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/Resource/Actor/resResourceAIProgram.h"
namespace ksys::act::ai {
diff --git a/src/KingSystem/ActorSystem/actAiActionBase.cpp b/src/KingSystem/ActorSystem/actAiActionBase.cpp
index 81320ef1..794ec395 100644
--- a/src/KingSystem/ActorSystem/actAiActionBase.cpp
+++ b/src/KingSystem/ActorSystem/actAiActionBase.cpp
@@ -3,7 +3,7 @@
#include "KingSystem/ActorSystem/actActorParam.h"
#include "KingSystem/ActorSystem/actAiAction.h"
#include "KingSystem/ActorSystem/actAiInlineParam.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/Resource/Actor/resResourceAIProgram.h"
#include "KingSystem/Utils/InitTimeInfo.h"
#include "KingSystem/Utils/Thread/MessageTransceiverId.h"
diff --git a/src/KingSystem/ActorSystem/actAiAi.cpp b/src/KingSystem/ActorSystem/actAiAi.cpp
index 26949474..7602eb47 100644
--- a/src/KingSystem/ActorSystem/actAiAi.cpp
+++ b/src/KingSystem/ActorSystem/actAiAi.cpp
@@ -5,8 +5,8 @@
#include "KingSystem/ActorSystem/actAiAction.h"
#include "KingSystem/ActorSystem/actAiClassDef.h"
#include "KingSystem/ActorSystem/actAiInlineParam.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
#include "KingSystem/ActorSystem/aiDummyAi.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/Resource/Actor/resResourceAIProgram.h"
namespace ksys::act::ai {
diff --git a/src/KingSystem/ActorSystem/actAiBehavior.cpp b/src/KingSystem/ActorSystem/actAiBehavior.cpp
index 2f868984..d6e31cd4 100644
--- a/src/KingSystem/ActorSystem/actAiBehavior.cpp
+++ b/src/KingSystem/ActorSystem/actAiBehavior.cpp
@@ -1,7 +1,7 @@
#include "KingSystem/ActorSystem/actAiBehavior.h"
#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actActorParam.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/ActorSystem/behaviorDummyBehavior.h"
#include "KingSystem/Resource/Actor/resResourceAIProgram.h"
diff --git a/src/KingSystem/ActorSystem/actAiQuery.cpp b/src/KingSystem/ActorSystem/actAiQuery.cpp
index 97f9ac33..cbfef6c0 100644
--- a/src/KingSystem/ActorSystem/actAiQuery.cpp
+++ b/src/KingSystem/ActorSystem/actAiQuery.cpp
@@ -3,7 +3,7 @@
#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actActorParam.h"
#include "KingSystem/ActorSystem/actAiClassDef.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/Resource/Actor/resResourceAIProgram.h"
namespace ksys::act::ai {
diff --git a/src/KingSystem/ActorSystem/actDebugFinder.cpp b/src/KingSystem/ActorSystem/actDebugFinder.cpp
new file mode 100644
index 00000000..54b4e1f8
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actDebugFinder.cpp
@@ -0,0 +1,11 @@
+#include "KingSystem/ActorSystem/actDebugFinder.h"
+
+namespace ksys::act {
+
+SEAD_SINGLETON_DISPOSER_IMPL(DebugFinder)
+
+DebugFinder::DebugFinder() = default;
+
+DebugFinder::~DebugFinder() = default;
+
+} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actDebugFinder.h b/src/KingSystem/ActorSystem/actDebugFinder.h
new file mode 100644
index 00000000..3ca020ca
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actDebugFinder.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <heap/seadDisposer.h>
+#include <prim/seadSafeString.h>
+
+namespace ksys::act {
+
+class DebugFinder {
+ SEAD_SINGLETON_DISPOSER(DebugFinder)
+ DebugFinder();
+ virtual ~DebugFinder();
+
+private:
+ sead::FixedSafeString<0x40> unused_1;
+ sead::FixedSafeString<0x100> unused_2;
+ u32 unused_3 = 0;
+};
+
+} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/LOD/actLodState.cpp b/src/KingSystem/ActorSystem/actLodState.cpp
index 3b11296b..8625ab45 100644
--- a/src/KingSystem/ActorSystem/LOD/actLodState.cpp
+++ b/src/KingSystem/ActorSystem/actLodState.cpp
@@ -1,4 +1,4 @@
-#include "KingSystem/ActorSystem/LOD/actLodState.h"
+#include "KingSystem/ActorSystem/actLodState.h"
#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actActorParam.h"
#include "KingSystem/ActorSystem/actActorUtil.h"
diff --git a/src/KingSystem/ActorSystem/LOD/actLodState.h b/src/KingSystem/ActorSystem/actLodState.h
index 817e1a82..817e1a82 100644
--- a/src/KingSystem/ActorSystem/LOD/actLodState.h
+++ b/src/KingSystem/ActorSystem/actLodState.h
diff --git a/src/KingSystem/ActorSystem/aiForkAI.cpp b/src/KingSystem/ActorSystem/aiForkAI.cpp
index d8cd4249..5989bdba 100644
--- a/src/KingSystem/ActorSystem/aiForkAI.cpp
+++ b/src/KingSystem/ActorSystem/aiForkAI.cpp
@@ -1,5 +1,5 @@
#include "KingSystem/ActorSystem/aiForkAI.h"
-#include "KingSystem/ActorSystem/actAiRoot.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
namespace ksys::act::ai {
diff --git a/src/KingSystem/ActorSystem/actAiRoot.cpp b/src/KingSystem/ActorSystem/aiRootAi.cpp
index 0aa8f4ac..2706a208 100644
--- a/src/KingSystem/ActorSystem/actAiRoot.cpp
+++ b/src/KingSystem/ActorSystem/aiRootAi.cpp
@@ -1,4 +1,4 @@
-#include "KingSystem/ActorSystem/actAiRoot.h"
+#include "KingSystem/ActorSystem/aiRootAi.h"
#include "KingSystem/ActorSystem/actActor.h"
#include "KingSystem/ActorSystem/actAiClassDef.h"
#include "KingSystem/Utils/InitTimeInfo.h"
diff --git a/src/KingSystem/ActorSystem/actAiRoot.h b/src/KingSystem/ActorSystem/aiRootAi.h
index c9b61df6..c9b61df6 100644
--- a/src/KingSystem/ActorSystem/actAiRoot.h
+++ b/src/KingSystem/ActorSystem/aiRootAi.h