#pragma once #include #include #include #include #include #include #include #include #include "KingSystem/Utils/Types.h" namespace ksys::snd { class MusicInfo : public agl::utl::IParameterIO { public: template struct MinMax : public agl::utl::IParameterObj { MinMax(T min, T max, const sead::SafeString& name, const sead::SafeString& label, const sead::SafeString& meta, agl::utl::IParameterList* parent) : mLabel(label), mMeta(meta), mMin(min, "Min", "最小", mMeta, this), mMax(max, "Max", "最大", mMeta, this) { parent->addObj(this, name); } sead::FixedSafeString<64> mLabel; sead::FixedSafeString<32> mMeta; agl::utl::Parameter mMin; agl::utl::Parameter mMax; }; MusicInfo() : IParameterIO("mscinfo", 0) {} virtual void init(sead::Heap* heap) {} protected: void applySoundResource(); private: // TODO: 0x7101015628, requires `Sound` and `snd::ResourceMgr` sead::DirectResource* loadMusic(); protected: sead::SafeString mBgmTypeName; }; class EnvBgmInfo : public MusicInfo { public: SEAD_ENUM(EnvTimeEnum,EnvDayBgm,EnvNightBgm) struct ParamPerType : public agl::utl::IParameterObj { ParamPerType(); agl::utl::Parameter mBpm; agl::utl::Parameter mPart0FirstWaitCount; agl::utl::Parameter mPart1FirstWaitCount; agl::utl::Parameter mPart2FirstWaitCount; agl::utl::Parameter mPart3FirstWaitCount; }; KSYS_CHECK_SIZE_NX150(ParamPerType, 0xD0); EnvBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterList mHeader; agl::utl::IParameterObj mData; public: sead::Buffer mParamPerTypes; agl::utl::Parameter mEnableWaitSec; agl::utl::Parameter mDistanceOfCheckingActiveEnemy; agl::utl::Parameter mTimeDay; agl::utl::Parameter mTimeNight; MinMax mConstVolume; MinMax mConstPan; agl::utl::Parameter mMasterBeatBase; MinMax mMasterBeatRate; MinMax mPart0Volume; MinMax mPart0Pan; agl::utl::Parameter mPart1SegmentAWaitCountBase; MinMax mPart1SegmentAWaitCountRate; agl::utl::Parameter mPart1SegmentBWaitCountBase; MinMax mPart1SegmentBWaitCountRate; agl::utl::Parameter mPart1SegmentCWaitCountBase; MinMax mPart1SegmentCWaitCountRate; MinMax mPart1Volume; MinMax mPart1Pan; agl::utl::Parameter mPart2WaitCountBase; MinMax mPart2WaitCountRate; MinMax mPart2Volume; agl::utl::Parameter mPart3WaitCountBase; MinMax mPart3WaitCountRate; MinMax mPart3Volume; MinMax mPart3Pan; }; KSYS_CHECK_SIZE_NX150(EnvBgmInfo, 0x12A8); class HorseBgmInfo : public MusicInfo { public: HorseBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mTimeDay; agl::utl::Parameter mTimeNight; agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeInSec; agl::utl::Parameter mMinVolume; agl::utl::Parameter mFadeOutWaitSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mPlayingSecUseOutro; agl::utl::Parameter mIgnoreRequestSec; }; KSYS_CHECK_SIZE_NX150(HorseBgmInfo, 0x330); class TemperatureBgmInfo : public MusicInfo { public: SEAD_ENUM(TemperatureEnum,ColdBgm,HotBgm,BurnBgm) struct ParamPerType : public agl::utl::IParameterObj { ParamPerType(); agl::utl::Parameter mTemperatureThreshold; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mCancelFadeSec; }; KSYS_CHECK_SIZE_NX150(ParamPerType, 0x90); TemperatureBgmInfo() = default; ~TemperatureBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterList mData; public: sead::Buffer mParamPerTypes; }; KSYS_CHECK_SIZE_NX150(TemperatureBgmInfo, 0x238); class SpotBgmInfo : public MusicInfo { public: SpotBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mTimeDay; agl::utl::Parameter mTimeNight; agl::utl::Parameter mFilterOnFadeSec; agl::utl::Parameter mFilterOffFadeSec; agl::utl::Parameter mFilterValueLo; agl::utl::Parameter mFilterValueHi; agl::utl::Parameter mSubTrackNearDistance; agl::utl::Parameter mSubTrackFarDistance; agl::utl::Parameter mSubTrackVolumeMaxDelta; agl::utl::Parameter mAllowFadeInSec; agl::utl::Parameter mAllowFadeOutSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mCullingYFadeOutSec; agl::utl::Parameter mCullingYFadeInSec; }; KSYS_CHECK_SIZE_NX150(SpotBgmInfo, 0x3D0); class MazeForestBgmInfo : public MusicInfo { public: MazeForestBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeInSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mVolumeNormal; agl::utl::Parameter mLostBoostSec; agl::utl::Parameter mLostBoostCancelSec; }; KSYS_CHECK_SIZE_NX150(MazeForestBgmInfo, 0x2D0); class CastleBgmInfo : public MusicInfo { public: CastleBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mFadeOutWaitSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mToIndoorWaitSec; agl::utl::Parameter mToIndoorFadeSec; agl::utl::Parameter mToOutdoorFadeSec; agl::utl::Parameter mBattleWaitSec; agl::utl::Parameter mBattleFadeInSec; agl::utl::Parameter mBattleFadeOutSec; }; KSYS_CHECK_SIZE_NX150(CastleBgmInfo, 0x310); class BigMazeBgmInfo : public MusicInfo { public: BigMazeBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeInSec; agl::utl::Parameter mFadeOutSec; }; KSYS_CHECK_SIZE_NX150(BigMazeBgmInfo, 0x270); class AnimalMasterBgmInfo : public MusicInfo { public: AnimalMasterBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeInSec; agl::utl::Parameter mFadeOutSec; }; KSYS_CHECK_SIZE_NX150(BigMazeBgmInfo, 0x270); class FieldBattleBgmInfo : public MusicInfo { public: FieldBattleBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mBpm; agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeInSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mFeelPlayingSec; agl::utl::Parameter mEasy1_OddsByKey0; agl::utl::Parameter mEasy1_OddsByKey1; agl::utl::Parameter mEasy1R_OddsBySameKey; agl::utl::Parameter mEasy5_OddsBySameKey; agl::utl::Parameter mMiddle0_OddsBySameKey; agl::utl::Parameter mHard0_OddsBySameKey; agl::utl::Parameter mHard1_OddsBySameKey; agl::utl::Parameter mHard1F_OddsBySameKey; agl::utl::Parameter mOddsByKeySubId0; agl::utl::Parameter mTension_SkipEasy2; agl::utl::Parameter mTension_SkipEasy5; agl::utl::Parameter mTension_SkipMiddle1; agl::utl::Parameter mTension_SkipHard; agl::utl::Parameter mReserveHitWaitBeat; agl::utl::Parameter mHitChainGridThreshold; agl::utl::Parameter mIgnoreReserveHitGrid_Chain0; agl::utl::Parameter mIgnoreReserveHitGrid_Chain1; agl::utl::Parameter mIgnoreReserveHitGrid_Chain2; agl::utl::Parameter mStopMainBgmWaitBeat; agl::utl::Parameter mReserveOutroWaitBeat; }; KSYS_CHECK_SIZE_NX150(FieldBattleBgmInfo, 0x530); class BossBgmInfo : public MusicInfo { public: BossBgmInfo(); void init(sead::Heap* heap) override; protected: agl::utl::IParameterObj mData; public: agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mOutroWaitSec; agl::utl::Parameter mChangeTypeFadeOutSec; agl::utl::Parameter mFeelPlayingSec; }; KSYS_CHECK_SIZE_NX150(BossBgmInfo, 0x2B0); class GolemBgmInfo : public BossBgmInfo { public: GolemBgmInfo(); }; KSYS_CHECK_SIZE_NX150(GolemBgmInfo, 0x2B0); class GiantBgmInfo : public BossBgmInfo { public: GiantBgmInfo(); }; KSYS_CHECK_SIZE_NX150(GiantBgmInfo, 0x2B0); class SandwormBgmInfo : public BossBgmInfo { public: SandwormBgmInfo(); private: agl::utl::Parameter mAngryStartFadeSec; agl::utl::Parameter mAngryEndFadeSec; agl::utl::Parameter mChanceStartWaitSec; }; KSYS_CHECK_SIZE_NX150(SandwormBgmInfo, 0x310); class AssassinSeniorBgmInfo : public MusicInfo { public: AssassinSeniorBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mToDemoFadeSec; agl::utl::Parameter mToBattleFadeSec; agl::utl::Parameter mFeelPlayingSec; }; KSYS_CHECK_SIZE_NX150(AssassinSeniorBgmInfo, 0x290); class GuardianBgmInfo : public MusicInfo { public: GuardianBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeOutWaitSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mFeelPlayingSec; agl::utl::Parameter mDamageThresholdHitReserve; agl::utl::Parameter mCancelHitSec; agl::utl::Parameter mIgnoreReserveCountDownSec; agl::utl::Parameter mMarkerIdHitSectionB; agl::utl::Parameter mMarkerIdHitSectionC; agl::utl::Parameter mMarkerIdHitSectionA; agl::utl::Parameter mMarkerCallbackOffsetSample; }; KSYS_CHECK_SIZE_NX150(GuardianBgmInfo, 0x370); class GuardianFixedBgmInfo : public MusicInfo { public: GuardianFixedBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mFadeWaitSec; agl::utl::Parameter mFeelPlayingSec; }; KSYS_CHECK_SIZE_NX150(GuardianFixedBgmInfo, 0x290); class DragonBgmInfo : public MusicInfo { public: SEAD_ENUM(DragonEnum,DragonBgm,GrudgeDragonBgm) struct ParamPerType : public agl::utl::IParameterObj { agl::utl::Parameter mDistanceThreshold; agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeInSec; agl::utl::Parameter mFadeWaitSec; agl::utl::Parameter mFadeOutSec; ParamPerType(); }; DragonBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterList mData; public: sead::Buffer mParamPerTypes; }; KSYS_CHECK_SIZE_NX150(DragonBgmInfo, 0x238); class GanonGrudgeBattleBgmInfo : public MusicInfo { public: GanonGrudgeBattleBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mFadeInSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mFeelPlayingSec; }; KSYS_CHECK_SIZE_NX150(GanonGrudgeBattleBgmInfo, 0x270); class EventBgmRemainsElecBattleInfo : public MusicInfo { public: EventBgmRemainsElecBattleInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mMinVolumeOutStorm; agl::utl::Parameter mFadeInSecOutStorm; agl::utl::Parameter mFadeOutSecOutStorm; agl::utl::Parameter mMinVolumeWakeBoarding; agl::utl::Parameter mFadeInSecWakeBoarding; agl::utl::Parameter mFadeOutSecWakeBoarding; }; KSYS_CHECK_SIZE_NX150(EventBgmRemainsElecBattleInfo, 0x2d0); class EventBgmRemainsFireBattleInfo : public MusicInfo { public: EventBgmRemainsFireBattleInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mFoundFadeOutSec; agl::utl::Parameter mFoundWaitSec; agl::utl::Parameter mFoundAgainWaitSec; }; KSYS_CHECK_SIZE_NX150(EventBgmRemainsFireBattleInfo, 0x270); class DungeonNormalBgmInfo : public MusicInfo { public: struct PartChangeOdds : public agl::utl::IParameterObj { PartChangeOdds(); agl::utl::Parameter mOdds_1To1; agl::utl::Parameter mOdds_2To1; agl::utl::Parameter mOdds_2To2; agl::utl::Parameter mOdds_3To2; agl::utl::Parameter mOdds_3To3; agl::utl::Parameter mOdds_4To3; }; DungeonNormalBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterList mHeader; public: sead::Buffer mPartChangeOdds; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mLoopNumForOddsId2; agl::utl::Parameter mLoopNumForOddsId3; agl::utl::Parameter mMaxPartChainThreshold; agl::utl::Parameter mOdds_FirstArp; agl::utl::Parameter mTitleDelaySec; }; KSYS_CHECK_SIZE_NX150(DungeonNormalBgmInfo, 0x308); class DungeonRewardBgmInfo : public MusicInfo { public: DungeonRewardBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mOddsPlayableString; agl::utl::Parameter mTitleDelaySec; }; KSYS_CHECK_SIZE_NX150(DungeonRewardBgmInfo, 0x250); class DungeonBattleBgmInfo : public MusicInfo { public: DungeonBattleBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeOutSec; agl::utl::Parameter mVolumeNormal; }; KSYS_CHECK_SIZE_NX150(DungeonBattleBgmInfo, 0x270); class RemainsNormalBgmInfo : public MusicInfo { public: RemainsNormalBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mFadeOutSecA; agl::utl::Parameter mFadeOutSecB; agl::utl::Parameter mFadeOutSecZ; agl::utl::Parameter mCrossFadeSec; }; KSYS_CHECK_SIZE_NX150(RemainsNormalBgmInfo, 0x290); class TutorialDungeonBattleBgmInfo : public MusicInfo { public: TutorialDungeonBattleBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mTransitionDelaySec; agl::utl::Parameter mOutroDelaySec; }; KSYS_CHECK_SIZE_NX150(TutorialDungeonBattleBgmInfo, 0x250); class GanonBeastBgmInfo : public MusicInfo { public: GanonBeastBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mStartDelaySec; agl::utl::Parameter mRetryDelaySec; agl::utl::Parameter m1To2TransitionDelaySec; agl::utl::Parameter m2To3TransitionDelaySec; agl::utl::Parameter mFadeOutSec; }; KSYS_CHECK_SIZE_NX150(GanonBeastBgmInfo, 0x2b0); class FinalTrialBossBattleBgmInfo : public MusicInfo { public: FinalTrialBossBattleBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterObj mData; public: agl::utl::Parameter mTransformDemoWaitSec; agl::utl::Parameter mFadeSecToTransformDemo; agl::utl::Parameter mCurveTypeToTransformDemo; agl::utl::Parameter mFadeSecFromTransformDemo; agl::utl::Parameter mCurveTypeFromTransformDemo; agl::utl::Parameter mFadeSeLevel3To4; agl::utl::Parameter mCurveTypeLevel3To4; agl::utl::Parameter mStopFadeSec; }; KSYS_CHECK_SIZE_NX150(FinalTrialBossBattleBgmInfo, 0x310); class EnvPaletteReactiveBgmInfo : public MusicInfo { public: SEAD_ENUM(EnvPaletteReactiveBgmEnum,DLC2nd_OneHitKillTrial) struct ParamPerType : public agl::utl::IParameterObj { agl::utl::Parameter mPlayWaitSec; agl::utl::Parameter mFadeInSec; agl::utl::Parameter mFadeOutSec; ParamPerType(); }; EnvPaletteReactiveBgmInfo(); void init(sead::Heap* heap) override; private: agl::utl::IParameterList mData; public: sead::Buffer mParamPerTypes; }; KSYS_CHECK_SIZE_NX150(EnvPaletteReactiveBgmInfo, 0x238); } // namespace ksys::snd