summaryrefslogtreecommitdiff
path: root/src/KingSystem/Sound/sndInfoData.h
blob: 75f2b1e948e25bae26d312ab70989798a62e8d76 (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
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once

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

namespace ksys::snd {

class InfoData {
    SEAD_SINGLETON_DISPOSER(InfoData)

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

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

    al::ByamlIter getInfo(const sead::SafeString& key) const;
    sead::SafeString getSoundSettingUserName(const sead::SafeString& key) const;

    sead::SafeString getReactionSettingLandType(const al::ByamlIter& iter,
                                                const sead::SafeString& key) const;
    float getReactionSettingLandPitch(const al::ByamlIter& iter) const;
    float getReactionSettingLandVolume(const al::ByamlIter& iter) const;
    float getReactionSettingLandVelocityRatio(const al::ByamlIter& iter) const;

    sead::SafeString getReactionSettingSlideType(const al::ByamlIter& iter) const;
    sead::SafeString getReactionSettingSlideSlideType(const al::ByamlIter& iter) const;
    float getReactionSettingSlidePitch(const al::ByamlIter& iter) const;
    float getReactionSettingSlideVolume(const al::ByamlIter& iter) const;
    float getReactionSettingSlideVelocityRatio(const al::ByamlIter& iter) const;

    sead::SafeString getWeaponOwnerSettingOwnerType(const al::ByamlIter& iter) const;

    sead::SafeString getEquipSoundSettingEquipMaterial(const al::ByamlIter& iter) const;

    bool getMiscInDoorOcclusion(const al::ByamlIter& iter) const;

    sead::SafeString getMiscPlantShakeType(const al::ByamlIter& iter) const;

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

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

}  // namespace ksys::snd