mirror of https://github.com/zeldaret/botw.git
ksys/res: Move AttPos to separate translation unit
This commit is contained in:
parent
ba05fa5165
commit
edcfc9b7ab
|
|
@ -152,6 +152,8 @@ target_sources(uking PRIVATE
|
|||
resResourceAttCheck.h
|
||||
resResourceAttClient.cpp
|
||||
resResourceAttClient.h
|
||||
resResourceAttPos.cpp
|
||||
resResourceAttPos.h
|
||||
resResourceArchive.cpp
|
||||
resResourceArchive.h
|
||||
resResourceAwareness.cpp
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <agl/Utils/aglParameterObj.h>
|
||||
#include <prim/seadRuntimeTypeInfo.h>
|
||||
#include "KingSystem/Resource/resResourceAttClient.h"
|
||||
#include "KingSystem/Resource/resResourceAttPos.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,4 @@ AttClient::~AttClient() {
|
|||
|
||||
void AttClient::doCreate_(u8*, u32, sead::Heap*) {}
|
||||
|
||||
AttPos::AttPos() = default;
|
||||
|
||||
void AttPos::init(agl::utl::IParameterObj* obj, const char* node_key, const char* offset_key,
|
||||
const char* rotate_key, const char* y_rot_only_key) {
|
||||
node.init("", node_key, "ノード", "", obj);
|
||||
offset.init(sead::Vector3f::zero, offset_key, "オフセット", "Min=-100.f,Max=100.f", obj);
|
||||
rotate.init(sead::Vector3f::zero, rotate_key, "回転", "Min=-3.1415f,Max=3.1415f", obj);
|
||||
y_rot_only.init(false, y_rot_only_key, "Y軸回転のみ有効", "", obj);
|
||||
}
|
||||
|
||||
} // namespace ksys::res
|
||||
|
|
|
|||
|
|
@ -7,27 +7,12 @@
|
|||
#include <prim/seadSafeString.h>
|
||||
#include "KingSystem/ActorSystem/Attention/actAttention.h"
|
||||
#include "KingSystem/Resource/resResource.h"
|
||||
#include "KingSystem/Resource/resResourceAttPos.h"
|
||||
#include "KingSystem/Utils/ParamIO.h"
|
||||
#include "KingSystem/Utils/Types.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
struct AttPos {
|
||||
AttPos();
|
||||
|
||||
void init(agl::utl::IParameterObj* obj, const char* node_key = "Node",
|
||||
const char* offset_key = "Offset", const char* rotate_key = "Rotate",
|
||||
const char* y_rot_only_key = "YRotOnly");
|
||||
|
||||
// TODO: more functions
|
||||
|
||||
agl::utl::Parameter<sead::SafeString> node;
|
||||
agl::utl::Parameter<sead::Vector3f> offset;
|
||||
agl::utl::Parameter<sead::Vector3f> rotate;
|
||||
agl::utl::Parameter<bool> y_rot_only;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(AttPos, 0x98);
|
||||
|
||||
class AttClient : public ParamIO, public Resource {
|
||||
SEAD_RTTI_OVERRIDE(AttClient, Resource)
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
#include "KingSystem/Resource/resResourceAttPos.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
AttPos::AttPos() = default;
|
||||
|
||||
void AttPos::init(agl::utl::IParameterObj* obj, const char* node_key, const char* offset_key,
|
||||
const char* rotate_key, const char* y_rot_only_key) {
|
||||
node.init("", node_key, "ノード", "", obj);
|
||||
offset.init(sead::Vector3f::zero, offset_key, "オフセット", "Min=-100.f,Max=100.f", obj);
|
||||
rotate.init(sead::Vector3f::zero, rotate_key, "回転", "Min=-3.1415f,Max=3.1415f", obj);
|
||||
y_rot_only.init(false, y_rot_only_key, "Y軸回転のみ有効", "", obj);
|
||||
}
|
||||
|
||||
} // namespace ksys::res
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include <agl/Utils/aglParameter.h>
|
||||
#include <agl/Utils/aglParameterObj.h>
|
||||
#include "KingSystem/Utils/Types.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
struct AttPos {
|
||||
AttPos();
|
||||
|
||||
void init(agl::utl::IParameterObj* obj, const char* node_key = "Node",
|
||||
const char* offset_key = "Offset", const char* rotate_key = "Rotate",
|
||||
const char* y_rot_only_key = "YRotOnly");
|
||||
|
||||
// TODO: more functions
|
||||
|
||||
agl::utl::Parameter<sead::SafeString> node;
|
||||
agl::utl::Parameter<sead::Vector3f> offset;
|
||||
agl::utl::Parameter<sead::Vector3f> rotate;
|
||||
agl::utl::Parameter<bool> y_rot_only;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(AttPos, 0x98);
|
||||
|
||||
} // namespace ksys::res
|
||||
Loading…
Reference in New Issue