#pragma once #include #include #include #include #include #include #include "KingSystem/Resource/resResource.h" #include "KingSystem/Utils/ParamIO.h" #include "KingSystem/Utils/Types.h" namespace ksys::res { // TODO class BoneControl : public ParamIO, public Resource { SEAD_RTTI_OVERRIDE(BoneControl, Resource) public: struct Whole { agl::utl::ParameterObj obj; agl::utl::Parameter isFaceCtrlInvalid; agl::utl::Parameter neckAndEyeRatio; }; KSYS_CHECK_SIZE_NX150(Whole, 0x70); struct EyeBall { agl::utl::ParameterObj obj; agl::utl::Parameter isEyeBallCtrlInvalid; agl::utl::Parameter isEyeBallRotWorldAxis; agl::utl::Parameter eyeBallSRTName; agl::utl::Parameter eyeRotRateLR; agl::utl::Parameter eyeRotRateUD; agl::utl::Parameter eyeMinRotPerFrame; agl::utl::Parameter eyeMaxRotPerFrame; agl::utl::Parameter eyeSetNum; }; KSYS_CHECK_SIZE_NX150(EyeBall, 0x138); struct EyeSet { agl::utl::ParameterObj obj; agl::utl::Parameter boneName; agl::utl::Parameter isControlTexture; agl::utl::Parameter materialName; agl::utl::Parameter forwardBoneName; agl::utl::Parameter forwardAxis; agl::utl::Parameter axisLR; agl::utl::Parameter axisUD; agl::utl::Parameter lTransLimit; agl::utl::Parameter rTransLimit; agl::utl::Parameter dTransLimit; agl::utl::Parameter uTransLimit; agl::utl::Parameter isCorrectForward; agl::utl::Parameter axisCorrect; agl::utl::Parameter correctRot; agl::utl::Parameter lRotLimit; agl::utl::Parameter rRotLimit; agl::utl::Parameter dRotLimit; agl::utl::Parameter uRotLimit; agl::utl::Parameter offset; }; KSYS_CHECK_SIZE_NX150(EyeSet, 0x2b0); struct Bone { agl::utl::Parameter name; }; KSYS_CHECK_SIZE_NX150(Bone, 0x28); struct BoneGroup { agl::utl::ParameterList list; agl::utl::ParameterObj paramObj; agl::utl::ParameterObj bonesObj; agl::utl::Parameter groupName; sead::Buffer bones; }; KSYS_CHECK_SIZE_NX150(BoneGroup, 0xe0); struct SpineNode { agl::utl::ParameterObj obj; agl::utl::Parameter boneName; agl::utl::Parameter isRotWorldAxis; agl::utl::Parameter axisLR; agl::utl::Parameter axisUD; agl::utl::Parameter lLimit; agl::utl::Parameter rLimit; agl::utl::Parameter dLimit; agl::utl::Parameter uLimit; agl::utl::Parameter lBattleLimit; agl::utl::Parameter rBattleLimit; agl::utl::Parameter dBattleLimit; agl::utl::Parameter uBattleLimit; agl::utl::Parameter isEnableCorrect; agl::utl::Parameter axisCorrect; agl::utl::Parameter lCorrect; agl::utl::Parameter rCorrect; agl::utl::Parameter lBattleCorrect; agl::utl::Parameter rBattleCorrect; agl::utl::Parameter minRotPerFrame; agl::utl::Parameter maxRotPerFrame; }; KSYS_CHECK_SIZE_NX150(SpineNode, 0x2b8); struct Spine { agl::utl::ParameterObj obj; agl::utl::ParameterList list; agl::utl::Parameter isInvalid; agl::utl::Parameter isBasisSelfPosNeckLR; agl::utl::Parameter isBasisSelfPosNeckUD; agl::utl::Parameter isBattleNeckRecalcUD; agl::utl::Parameter spineDisableBaseDirAlongXZ; agl::utl::Parameter spineRotRate; agl::utl::Parameter spineRetRotRate; agl::utl::Parameter spineNeckBaseBone; agl::utl::Parameter neckPosOffset; agl::utl::Parameter spineNeckNodeNum; agl::utl::Parameter spineNodeNum; sead::Buffer spineNodes; }; KSYS_CHECK_SIZE_NX150(Spine, 0x1f8); struct FootIkController { agl::utl::ParameterObj obj; agl::utl::Parameter isInvalidFt; agl::utl::Parameter calculateTypeFt; agl::utl::Parameter ankleOffsetYFt; agl::utl::Parameter ankleOffsetAngleDegFt; agl::utl::Parameter ankleAngleLimitUpDegFt; agl::utl::Parameter ankleAngleLimitDownDegFt; agl::utl::Parameter ankleHeightLimitRateFt; agl::utl::Parameter waistDownRateFt; agl::utl::Parameter kneeRotateAgnleMinDegFt; agl::utl::Parameter kneeRotateAgnleMaxDegFt; agl::utl::Parameter enableLimitThighAngleFt; agl::utl::Parameter thighRotateAngleMinDegFt; agl::utl::Parameter thighRotateAngleMaxDegFt; }; KSYS_CHECK_SIZE_NX150(FootIkController, 0x1d0); BoneControl(); ~BoneControl() override; void doCreate_(u8* buffer, u32 buffer_size, sead::Heap* heap) override; bool parse_(u8* data, size_t size, sead::Heap* heap) override; bool ParamIO_m0() override { return true; } bool needsParse() const override { return true; } const Whole& getWhole() const { return mWhole; } const Spine& getSpine() const { return mSpine; } const EyeBall& getEyeBall() const { return mEyeBall; } const sead::Buffer& getEyeSets() const { return mEyeSets; } const FootIkController& getFootIkController() const { return mFootIkController; } const sead::Buffer& getBoneGroups() const { return mBoneGroups; } const BoneGroup* getBoneGroup(const sead::SafeString& name) const; private: Whole mWhole; Spine mSpine; EyeBall mEyeBall; agl::utl::ParameterList _650; sead::Buffer mEyeSets; FootIkController mFootIkController; agl::utl::ParameterList mBoneGroupsList; sead::Buffer mBoneGroups; }; KSYS_CHECK_SIZE_NX150(BoneControl, 0x8d0); } // namespace ksys::res