summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-11-08 15:51:44 +0100
committerLéo Lam <leo@leolam.fr>2020-11-08 16:17:44 +0100
commita9ec880f2ef182947bb1bf037a3e388f1f466a86 (patch)
tree58453ce275df02bdd2b1168039ee49861a44be13 /src/KingSystem/ActorSystem
parentaa92bf882c41b292a9ee11b6ec5ba8593b4b4fc2 (diff)
ksys/act: Fix ActorParamMgr struct and add ASSetting stub
Diffstat (limited to 'src/KingSystem/ActorSystem')
-rw-r--r--src/KingSystem/ActorSystem/CMakeLists.txt1
-rw-r--r--src/KingSystem/ActorSystem/actASSetting.cpp1
-rw-r--r--src/KingSystem/ActorSystem/actASSetting.h12
-rw-r--r--src/KingSystem/ActorSystem/actActorParamMgr.cpp14
-rw-r--r--src/KingSystem/ActorSystem/actActorParamMgr.h33
5 files changed, 60 insertions, 1 deletions
diff --git a/src/KingSystem/ActorSystem/CMakeLists.txt b/src/KingSystem/ActorSystem/CMakeLists.txt
index 3eb27a0f..f328738b 100644
--- a/src/KingSystem/ActorSystem/CMakeLists.txt
+++ b/src/KingSystem/ActorSystem/CMakeLists.txt
@@ -10,6 +10,7 @@ target_sources(uking PRIVATE
actActorLinkConstDataAccess.h
actActorParam.cpp
actActorParam.h
+ actActorParamMgr.cpp
actActorParamMgr.h
actAiAction.cpp
actAiAction.h
diff --git a/src/KingSystem/ActorSystem/actASSetting.cpp b/src/KingSystem/ActorSystem/actASSetting.cpp
new file mode 100644
index 00000000..1dff9658
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actASSetting.cpp
@@ -0,0 +1 @@
+#include "KingSystem/ActorSystem/actASSetting.h"
diff --git a/src/KingSystem/ActorSystem/actASSetting.h b/src/KingSystem/ActorSystem/actASSetting.h
new file mode 100644
index 00000000..82d9873a
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actASSetting.h
@@ -0,0 +1,12 @@
+#pragma once
+
+#include <heap/seadDisposer.h>
+
+namespace ksys::act {
+
+// FIXME: very incomplete
+class ASSetting {
+ SEAD_SINGLETON_DISPOSER(ASSetting)
+};
+
+} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actActorParamMgr.cpp b/src/KingSystem/ActorSystem/actActorParamMgr.cpp
new file mode 100644
index 00000000..f4b3d5cb
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actActorParamMgr.cpp
@@ -0,0 +1,14 @@
+#include "KingSystem/ActorSystem/actActorParamMgr.h"
+#include "KingSystem/ActorSystem/actASSetting.h"
+
+namespace ksys::act {
+
+SEAD_SINGLETON_DISPOSER_IMPL(ActorParamMgr)
+
+ActorParamMgr::ActorParamMgr() = default;
+
+ActorParamMgr::~ActorParamMgr() {
+ ASSetting::deleteInstance();
+}
+
+} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actActorParamMgr.h b/src/KingSystem/ActorSystem/actActorParamMgr.h
index df1e5cac..4ec7ee52 100644
--- a/src/KingSystem/ActorSystem/actActorParamMgr.h
+++ b/src/KingSystem/ActorSystem/actActorParamMgr.h
@@ -1,6 +1,13 @@
#pragma once
+#include <container/seadSafeArray.h>
#include <heap/seadDisposer.h>
+#include <hostio/seadHostIONode.h>
+#include <thread/seadCriticalSection.h>
+#include "KingSystem/Resource/resHandle.h"
+#include "KingSystem/System/DebugMessage.h"
+#include "KingSystem/System/KingEditor.h"
+#include "KingSystem/Utils/Types.h"
namespace ksys {
@@ -10,14 +17,38 @@ class GParamList;
namespace act {
+class ActorParam;
+
// FIXME: incomplete
-class ActorParamMgr {
+class ActorParamMgr final : public sead::hostio::Node, public KingEditorComponent {
SEAD_SINGLETON_DISPOSER(ActorParamMgr)
+ ActorParamMgr();
+ ~ActorParamMgr();
+
public:
+ const char* getName() const override { return "AglXml"; }
+ void syncData(const char* data) override;
+
void init(sead::Heap* heap, sead::Heap* debug_heap);
res::GParamList* getDummyGParamList() const;
+
+ DebugMessage& getDebugMessage() { return mDebugMessage; }
+ sead::Heap* getDebugHeap() const { return mDebugHeap; }
+ sead::Heap* getTmpActorParamMgrHeap() const { return mTmpActorParamMgrHeap; }
+
+private:
+ u8 mFlags{};
+ ActorParam* mParams = nullptr;
+ DebugMessage mDebugMessage{"アクタパラメータ"};
+ void* _e0 = nullptr;
+ void* _e8 = nullptr;
+ sead::Heap* mDebugHeap = nullptr;
+ sead::Heap* mTmpActorParamMgrHeap = nullptr;
+ sead::SafeArray<res::Handle, 28> mResHandles;
+ sead::CriticalSection mCS;
};
+KSYS_CHECK_SIZE_NX150(ActorParamMgr, 0xa00);
} // namespace act