mirror of
https://github.com/zeldaret/botw
synced 2026-06-18 23:26:37 -04:00
ksys/act: Implement more ActorParamMgr functions
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
class AS;
|
||||
|
||||
class ASList : public ParamIO, public Resource {
|
||||
SEAD_RTTI_OVERRIDE(ASList, Resource)
|
||||
public:
|
||||
@@ -17,7 +19,7 @@ public:
|
||||
agl::utl::Parameter<sead::SafeString> name;
|
||||
agl::utl::Parameter<sead::SafeString> file_name;
|
||||
agl::utl::ParameterObj obj;
|
||||
void* _88;
|
||||
AS* as;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(ASDefine, 0x88);
|
||||
|
||||
@@ -65,6 +67,8 @@ public:
|
||||
const Buffers& getBuffers() const { return mBuffers; }
|
||||
const Common& getCommon() const { return mCommon.ref(); }
|
||||
|
||||
void addAS_(s32 index, AS* as);
|
||||
|
||||
protected:
|
||||
bool finishParsing_() override;
|
||||
bool m7_() override;
|
||||
|
||||
@@ -13,41 +13,68 @@ namespace ksys::res {
|
||||
class ActorLink : public ParamIO, public Resource {
|
||||
SEAD_RTTI_OVERRIDE(ActorLink, Resource)
|
||||
public:
|
||||
struct Users {
|
||||
enum class User {
|
||||
Profile = 0,
|
||||
ActorCapture = 1,
|
||||
AS = 2,
|
||||
Model = 3,
|
||||
Anim = 4,
|
||||
AIProgram = 5,
|
||||
GParam = 6,
|
||||
DamageParam = 7,
|
||||
RgConfigList = 8,
|
||||
RgBlendWeight = 9,
|
||||
Awareness = 10,
|
||||
Physics = 11,
|
||||
Chemical = 12,
|
||||
Attention = 13,
|
||||
ELink = 14,
|
||||
SLink = 15,
|
||||
XLink = 16,
|
||||
DropTable = 17,
|
||||
ShopData = 18,
|
||||
Recipe = 19,
|
||||
LOD = 20,
|
||||
BoneControl = 21,
|
||||
AISchedule = 22,
|
||||
LifeCondition = 23,
|
||||
UMii = 24,
|
||||
AnimationInfo = 25,
|
||||
};
|
||||
enum class User {
|
||||
Profile = 0,
|
||||
ActorCapture = 1,
|
||||
AS = 2,
|
||||
Model = 3,
|
||||
Anim = 4,
|
||||
AIProgram = 5,
|
||||
GParam = 6,
|
||||
DamageParam = 7,
|
||||
RgConfigList = 8,
|
||||
RgBlendWeight = 9,
|
||||
Awareness = 10,
|
||||
Physics = 11,
|
||||
Chemical = 12,
|
||||
Attention = 13,
|
||||
ELink = 14,
|
||||
SLink = 15,
|
||||
XLink = 16,
|
||||
DropTable = 17,
|
||||
ShopData = 18,
|
||||
Recipe = 19,
|
||||
LOD = 20,
|
||||
BoneControl = 21,
|
||||
AISchedule = 22,
|
||||
LifeCondition = 23,
|
||||
UMii = 24,
|
||||
AnimationInfo = 25,
|
||||
};
|
||||
|
||||
struct Users {
|
||||
const agl::utl::Parameter<sead::SafeString>& getUser(User user) const {
|
||||
return *(&profile + u32(user));
|
||||
}
|
||||
|
||||
sead::SafeString getUserName(User user) const { return getUser(user).ref().cstr(); }
|
||||
const char* getUserName(User user) const { return getUser(user).ref().cstr(); }
|
||||
|
||||
const char* getProfile() const { return profile.ref().cstr(); }
|
||||
const char* getActorCapture() const { return actor_capture.ref().cstr(); }
|
||||
const char* getAS() const { return as.ref().cstr(); }
|
||||
const char* getModel() const { return model.ref().cstr(); }
|
||||
const char* getAnim() const { return anim.ref().cstr(); }
|
||||
const char* getAIProgram() const { return ai_program.ref().cstr(); }
|
||||
const char* getGParam() const { return gparam.ref().cstr(); }
|
||||
const char* getDamageParam() const { return damage_param.ref().cstr(); }
|
||||
const char* getRgConfigList() const { return rg_config_list.ref().cstr(); }
|
||||
const char* getRgBlendWeight() const { return rg_blend_weight.ref().cstr(); }
|
||||
const char* getAwareness() const { return awareness.ref().cstr(); }
|
||||
const char* getPhysics() const { return physics.ref().cstr(); }
|
||||
const char* getChemical() const { return chemical.ref().cstr(); }
|
||||
const char* getAttention() const { return attention.ref().cstr(); }
|
||||
const char* getELink() const { return elink.ref().cstr(); }
|
||||
const char* getSLink() const { return slink.ref().cstr(); }
|
||||
const char* getXLink() const { return xlink.ref().cstr(); }
|
||||
const char* getDropTable() const { return drop_table.ref().cstr(); }
|
||||
const char* getShopData() const { return shop_data.ref().cstr(); }
|
||||
const char* getRecipe() const { return recipe.ref().cstr(); }
|
||||
const char* getLOD() const { return lod.ref().cstr(); }
|
||||
const char* getBoneControl() const { return bone_control.ref().cstr(); }
|
||||
const char* getAISchedule() const { return ai_schedule.ref().cstr(); }
|
||||
const char* getLifeCondition() const { return life_condition.ref().cstr(); }
|
||||
const char* getUMii() const { return umii.ref().cstr(); }
|
||||
const char* getAnimationInfo() const { return animation_info.ref().cstr(); }
|
||||
|
||||
agl::utl::Parameter<sead::SafeString> profile;
|
||||
agl::utl::Parameter<sead::SafeString> actor_capture;
|
||||
@@ -84,6 +111,7 @@ public:
|
||||
bool needsParse() const override { return true; }
|
||||
|
||||
const Users& getUsers() const { return mUsers; }
|
||||
const char* getUserName(User user) const { return getUsers().getUserName(user); }
|
||||
const sead::SafeString& getActorNameJpn() const { return mActorNameJpn.ref(); }
|
||||
const sead::SafeString& getPriority() const { return mPriority.ref(); }
|
||||
f32 getActorScale() const { return mActorScale.ref(); }
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
class AttClient;
|
||||
|
||||
class AttClientList : public ParamIO, public Resource {
|
||||
SEAD_RTTI_OVERRIDE(AttClientList, Resource)
|
||||
public:
|
||||
@@ -26,7 +28,7 @@ public:
|
||||
agl::utl::Parameter<sead::SafeString> file_name;
|
||||
agl::utl::Parameter<bool> is_valid;
|
||||
agl::utl::ParameterObj obj;
|
||||
void* _a0;
|
||||
AttClient* client;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(Client, 0xa8);
|
||||
|
||||
@@ -36,6 +38,8 @@ public:
|
||||
bool isForceEdit() const { return mForceEdit.ref(); }
|
||||
const sead::Buffer<Client>& getClients() const { return mClients; }
|
||||
|
||||
void addClient_(s32 index, AttClient* client) { mClients[index].client = client; }
|
||||
|
||||
private:
|
||||
agl::utl::ParameterList mAttClientsList;
|
||||
agl::utl::ParameterObj mAttPosObj;
|
||||
|
||||
@@ -373,7 +373,7 @@ bool ResourceMgrTask::canUseSdCard() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ResourceMgrTask::returnFalse() const {
|
||||
bool ResourceMgrTask::isHostPath(const sead::SafeString&) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -634,6 +634,12 @@ bool ResourceMgrTask::isCompactionStopped() const {
|
||||
return mCompactionCounter == 0;
|
||||
}
|
||||
|
||||
bool ResourceMgrTask::initTempResourceLoader(TempResourceLoader* loader,
|
||||
TempResourceLoader::InitArg& arg) {
|
||||
arg.work = mTexHandleMgr->getArchiveWork();
|
||||
return loader->init(arg);
|
||||
}
|
||||
|
||||
bool ResourceMgrTask::returnTrue1() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "KingSystem/Resource/resControlTask.h"
|
||||
#include "KingSystem/Resource/resCounter.h"
|
||||
#include "KingSystem/Resource/resInfoContainer.h"
|
||||
#include "KingSystem/Resource/resTempResourceLoader.h"
|
||||
#include "KingSystem/Resource/resUnit.h"
|
||||
#include "KingSystem/Resource/resUnitPool.h"
|
||||
#include "KingSystem/System/OverlayArena.h"
|
||||
@@ -162,7 +163,7 @@ public:
|
||||
sead::DirectResource* load(const DirectLoadArg& arg);
|
||||
|
||||
bool canUseSdCard() const;
|
||||
bool returnFalse() const;
|
||||
bool isHostPath(const sead::SafeString& path) const;
|
||||
|
||||
bool dropSFromExtensionIfNeeded(const sead::SafeString& path,
|
||||
sead::BufferedSafeString& new_path, s32 dot_idx,
|
||||
@@ -213,6 +214,8 @@ public:
|
||||
void setCompactionStopped(bool stopped);
|
||||
bool isCompactionStopped() const;
|
||||
|
||||
bool initTempResourceLoader(TempResourceLoader* loader, TempResourceLoader::InitArg& arg);
|
||||
|
||||
bool returnTrue1();
|
||||
|
||||
void clearCacheWithFileExtension(const sead::SafeString& extension);
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
class RagdollConfig;
|
||||
|
||||
class RagdollConfigList : public ParamIO, public Resource {
|
||||
SEAD_RTTI_OVERRIDE(RagdollConfigList, Resource)
|
||||
public:
|
||||
struct ImpulseParam {
|
||||
agl::utl::Parameter<sead::SafeString> file_name;
|
||||
agl::utl::ParameterObj obj;
|
||||
void* _58;
|
||||
RagdollConfig* config;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(ImpulseParam, 0x60);
|
||||
|
||||
@@ -39,7 +41,11 @@ public:
|
||||
const sead::Buffer<ImpulseParam>& getImpulseParams() const { return mImpulseParams; }
|
||||
f32 getUpperLimitHeight() const { return mUpperLimitHeight.ref(); }
|
||||
f32 getLowerLimitHeight() const { return mLowerLimitHeight.ref(); }
|
||||
const sead::Buffer<BodyParam>& getMBodyParams() const { return mBodyParams; }
|
||||
const sead::Buffer<BodyParam>& getBodyParams() const { return mBodyParams; }
|
||||
|
||||
void addImpulseParamConfig_(s32 index, RagdollConfig* config) {
|
||||
mImpulseParams[index].config = config;
|
||||
}
|
||||
|
||||
private:
|
||||
agl::utl::ParameterList mImpulseParamList;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "KingSystem/Resource/resSystem.h"
|
||||
#include "KingSystem/Resource/resResourceMgrTask.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
@@ -6,6 +7,10 @@ bool stubbedLogFunction() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isHostPath(const sead::SafeString& path) {
|
||||
return ResourceMgrTask::instance()->isHostPath(path);
|
||||
}
|
||||
|
||||
bool returnFalse() {
|
||||
return false;
|
||||
}
|
||||
@@ -14,6 +19,10 @@ bool returnFalse2(const sead::SafeString&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool returnFalse3(const sead::SafeString&) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 getDefaultAlignment() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ class EntryFactoryBase;
|
||||
void registerEntryFactory(EntryFactoryBase* factory, const sead::SafeString& name);
|
||||
void unregisterEntryFactory(EntryFactoryBase* factory);
|
||||
|
||||
bool isHostPath(const sead::SafeString& path);
|
||||
|
||||
// In release builds, the only thing this function does is return 1.
|
||||
// TODO: figure out what this is used for. Stubbed log function?
|
||||
bool stubbedLogFunction();
|
||||
@@ -21,6 +23,8 @@ bool returnFalse();
|
||||
// TODO: figure out what this is used for. Stubbed log function?
|
||||
bool returnFalse2(const sead::SafeString&);
|
||||
|
||||
bool returnFalse3(const sead::SafeString& path);
|
||||
|
||||
s32 getDefaultAlignment();
|
||||
|
||||
} // namespace ksys::res
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
class ArchiveWork;
|
||||
|
||||
// TODO: very incomplete
|
||||
class TextureHandleMgr {
|
||||
public:
|
||||
virtual ~TextureHandleMgr();
|
||||
|
||||
ArchiveWork* getArchiveWork() const;
|
||||
void clearAllCache();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user