ksys/act: Fix ActorParamMgr struct and add ASSetting stub

This commit is contained in:
Léo Lam
2020-11-08 15:51:44 +01:00
parent aa92bf882c
commit a9ec880f2e
9 changed files with 101 additions and 17 deletions
@@ -10,6 +10,7 @@ target_sources(uking PRIVATE
actActorLinkConstDataAccess.h
actActorParam.cpp
actActorParam.h
actActorParamMgr.cpp
actActorParamMgr.h
actAiAction.cpp
actAiAction.h
@@ -0,0 +1 @@
#include "KingSystem/ActorSystem/actASSetting.h"
+12
View File
@@ -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
@@ -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
+32 -1
View File
@@ -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