summaryrefslogtreecommitdiff
path: root/src/KingSystem/XLink/xlinkInfoData.h
blob: 9b429d2058f6d7bca6675646e543f998186009d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include <heap/seadDisposer.h>
#include "KingSystem/Resource/resHandle.h"
#include "KingSystem/Utils/Byaml/Byaml.h"

namespace ksys::xlink {

class InfoData {
    SEAD_SINGLETON_DISPOSER(InfoData)

    InfoData() = default;
    virtual ~InfoData();

public:
    void init(sead::Heap* heap);

    al::ByamlIter getIter(const sead::SafeString& key) const;

    sead::SafeString getXLinkSettingPropertyTableName(const al::ByamlIter& iter) const;
    sead::SafeString getXLinkSettingFootStepProcTypeName(const al::ByamlIter& iter) const;
    float getXLinkSettingVeloClampThreshold(const al::ByamlIter& iter) const;
    float getXLinkSettingVeloRollClampThreshold(const al::ByamlIter& iter) const;
    bool getXLinkSettingIsReactionTargetEnemy(const al::ByamlIter& iter) const;
    bool getXLinkSettingIsReactionTargetTinyEnemy(const al::ByamlIter& iter) const;
    bool getXLinkSettingIsReactionTargetObject(const al::ByamlIter& iter) const;
    bool getXLinkSettingIsIgnoreDamageToObject(const sead::SafeString& key) const;

private:
    void loadInfo(sead::Heap* heap);

    al::ByamlIter* mRootIter{};
    res::Handle mResHandle{};
};

}  // namespace ksys::xlink