mirror of https://github.com/zeldaret/botw.git
ksys: Fix ActorParam struct
This commit is contained in:
parent
3bd9d7a599
commit
f9456b5b1c
|
|
@ -89046,11 +89046,11 @@
|
|||
0x00000071011856c0,sub_71011856C0,156,
|
||||
0x000000710118575c,sub_710118575C,8,
|
||||
0x0000007101185764,sub_7101185764,8,
|
||||
0x000000710118576c,memsetSomeMemory,36,
|
||||
0x0000007101185790,ActorParam::Event::ctor,244,
|
||||
0x0000007101185884,sub_7101185884,60,
|
||||
0x000000710118576c,memsetSomeMemory,36,_ZN4ksys3act10ActorParam19resetDummyResourcesEv
|
||||
0x0000007101185790,ActorParam::Event::ctor,244,_ZN4ksys3act10ActorParamC1Ev
|
||||
0x0000007101185884,sub_7101185884,60,_ZN4ksys3act10ActorParamD1Ev
|
||||
0x00000071011858c0,ActorParam::Data::doUnload,440,
|
||||
0x0000007101185a78,sub_7101185A78,68,
|
||||
0x0000007101185a78,sub_7101185A78,68,_ZN4ksys3act10ActorParamD0Ev
|
||||
0x0000007101185abc,ActorParam::Load::deleteRes2,164,
|
||||
0x0000007101185b60,ActorParam::Load::isDummyParamResource,136,
|
||||
0x0000007101185be8,ActorParam::Load::constructRes2,188,
|
||||
|
|
|
|||
|
Can't render this file because it is too large.
|
|
|
@ -8,6 +8,8 @@ target_sources(uking PRIVATE
|
|||
actActorFactory.h
|
||||
actActorLinkConstDataAccess.cpp
|
||||
actActorLinkConstDataAccess.h
|
||||
actActorParam.cpp
|
||||
actActorParam.h
|
||||
actActorParamMgr.h
|
||||
actAiAction.cpp
|
||||
actAiAction.h
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
#include "KingSystem/ActorSystem/actActorParam.h"
|
||||
|
||||
namespace ksys::act {
|
||||
|
||||
ActorParam::Resources ActorParam::sDummyResources;
|
||||
|
||||
void ActorParam::resetDummyResources() {
|
||||
sDummyResources = {};
|
||||
}
|
||||
|
||||
ActorParam::ActorParam() {
|
||||
mRes = {};
|
||||
mNumHandles1 = mNumHandles2 = 0;
|
||||
mEvent.resetSignal();
|
||||
}
|
||||
|
||||
ActorParam::~ActorParam() {
|
||||
finalize();
|
||||
}
|
||||
|
||||
} // namespace ksys::act
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
#pragma once
|
||||
|
||||
#include <container/seadBuffer.h>
|
||||
#include <heap/seadDisposer.h>
|
||||
#include <hostio/seadHostIONode.h>
|
||||
#include <prim/seadSafeString.h>
|
||||
#include <thread/seadCriticalSection.h>
|
||||
#include "KingSystem/ActorSystem/actBaseProcJob.h"
|
||||
#include "KingSystem/Resource/resHandle.h"
|
||||
#include "KingSystem/Utils/Thread/Event.h"
|
||||
|
||||
namespace ksys {
|
||||
|
||||
namespace res {
|
||||
class ActorLink;
|
||||
class AIProgram;
|
||||
class AISchedule;
|
||||
class AnimationInfo;
|
||||
class ASList;
|
||||
class AttClientList;
|
||||
class Awareness;
|
||||
class BoneControl;
|
||||
class Chemical;
|
||||
class DamageParam;
|
||||
class Drop;
|
||||
class EventFlow;
|
||||
class GParamList;
|
||||
class LifeCondition;
|
||||
class Lod;
|
||||
class ModelList;
|
||||
class Physics;
|
||||
class RagdollBlendWeight;
|
||||
class RagdollConfig;
|
||||
class RagdollConfigList;
|
||||
class Recipe;
|
||||
class Shop;
|
||||
class UMii;
|
||||
} // namespace res
|
||||
|
||||
namespace act {
|
||||
|
||||
// FIXME: incomplete
|
||||
class ActorParam : public sead::hostio::Node {
|
||||
public:
|
||||
struct Resources {
|
||||
res::ActorLink* mActorLink;
|
||||
res::ModelList* mModelList;
|
||||
res::ASList* mASList;
|
||||
res::AIProgram* mAIProgram;
|
||||
res::GParamList* mGParamList;
|
||||
res::Physics* mPhysics;
|
||||
res::Chemical* mChemical;
|
||||
res::AttClientList* mAttClientList;
|
||||
res::AISchedule* mAISchedule;
|
||||
res::EventFlow* mEventFlow;
|
||||
res::DamageParam* mDamageParam;
|
||||
res::RagdollConfigList* mRagdollConfigList;
|
||||
res::RagdollBlendWeight* mRagdollBlendWeight;
|
||||
res::Awareness* mAwareness;
|
||||
void* mResource14;
|
||||
void* mResource15;
|
||||
void* mResource16;
|
||||
res::Drop* mDropTable;
|
||||
res::Shop* mShopData;
|
||||
res::Recipe* mRecipe;
|
||||
res::Lod* mLod;
|
||||
res::BoneControl* mBoneControl;
|
||||
res::LifeCondition* mLifeCondition;
|
||||
res::UMii* mUMii;
|
||||
res::AnimationInfo* mAnimationInfo;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(Resources, 0xc8);
|
||||
|
||||
ActorParam();
|
||||
virtual ~ActorParam();
|
||||
|
||||
u16 _8 = 0;
|
||||
u8 _a = 0;
|
||||
sead::FixedSafeString<64> mActorName;
|
||||
sead::SafeString mProfile;
|
||||
const char* mClassName{};
|
||||
Priority mPriority = Priority::AllAfter;
|
||||
u32 _74 = 2;
|
||||
Resources mRes;
|
||||
sead::Buffer<res::Handle> mHandles1;
|
||||
sead::Buffer<res::Handle> mHandles2;
|
||||
s32 mNumHandles1;
|
||||
s32 mNumHandles2;
|
||||
u32 _168{};
|
||||
|
||||
static void resetDummyResources();
|
||||
|
||||
static Resources sDummyResources;
|
||||
|
||||
private:
|
||||
void finalize();
|
||||
|
||||
sead::CriticalSection mCS{nullptr};
|
||||
util::Event mEvent{nullptr,
|
||||
sead::IDisposer::HeapNullOption::DoNotAppendDisposerIfNoHeapSpecified, true};
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(ActorParam, 0x200);
|
||||
|
||||
} // namespace act
|
||||
|
||||
} // namespace ksys
|
||||
|
|
@ -6,33 +6,10 @@ namespace ksys {
|
|||
|
||||
namespace res {
|
||||
class GParamList;
|
||||
}
|
||||
} // namespace res
|
||||
|
||||
namespace act {
|
||||
|
||||
// FIXME: incomplete
|
||||
class ActorParam {
|
||||
public:
|
||||
// FIXME: incomplete
|
||||
struct Data {
|
||||
public:
|
||||
u8 TEMP1[0xA0];
|
||||
|
||||
res::GParamList* mGParamList;
|
||||
u8 TEMP2[0x18];
|
||||
void* mDamageParam;
|
||||
u8 TEMP3[0x128];
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(ActorParam::Data, 0x1F0);
|
||||
|
||||
// vtable is still unknown
|
||||
virtual void TEMP_VTABLE();
|
||||
|
||||
u64 TEMP; // Unknown number of fields(2+)
|
||||
Data mData;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(ActorParam, 0x200);
|
||||
|
||||
// FIXME: incomplete
|
||||
class ActorParamMgr {
|
||||
SEAD_SINGLETON_DISPOSER(ActorParamMgr)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace ksys::act {
|
|||
|
||||
class BaseProc;
|
||||
|
||||
enum class Priority : u8 {
|
||||
enum class Priority {
|
||||
PlayerBefore = 0,
|
||||
Player = 2,
|
||||
PlayerAfter = 2,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include "Game/DLC/aoc2.h"
|
||||
#include "KingSystem/ActorSystem/actActor.h"
|
||||
#include "KingSystem/ActorSystem/actActorConstDataAccess.h"
|
||||
#include "KingSystem/ActorSystem/actActorParamMgr.h"
|
||||
#include "KingSystem/ActorSystem/actActorParam.h"
|
||||
#include "KingSystem/ActorSystem/actLifeRecoveryInfo.h"
|
||||
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h"
|
||||
#include "KingSystem/Resource/resResourceGParamList.h"
|
||||
|
|
@ -104,7 +104,7 @@ void DamageManagerBase::removeDamageCallback(DamageCallback* callback) {
|
|||
}
|
||||
|
||||
bool DamageManagerBase::applyDamage(s32& life) {
|
||||
auto* param_list = mActor->mActorParam->mData.mGParamList;
|
||||
auto* param_list = mActor->mActorParam->mRes.mGParamList;
|
||||
|
||||
const res::GParamListObjectGeneral& params = param_list->getGeneral();
|
||||
if (params.mIsLifeInfinite.ref()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue