diff --git a/data/file_list.yml b/data/file_list.yml index 849ee8c91c..d6dfe85b9e 100644 --- a/data/file_list.yml +++ b/data/file_list.yml @@ -280404,19 +280404,19 @@ Library/Se/Project/SePlayParam.o: label: - _ZN2al11SePlayParamC1Ev - _ZN2al11SePlayParamC2Ev - status: NotDecompiled + status: Matching - offset: 0x9e8fb0 size: 16 label: _ZN2al11SePlayParam5resetEv - status: NotDecompiled + status: Matching - offset: 0x9e8fc0 size: 16 label: _ZN2al11SePlayParam3setENS_15SePlayParamTypeEff - status: NotDecompiled + status: Matching - offset: 0x9e8fd0 size: 24 label: _ZN2al11SePlayParam6setMulENS_15SePlayParamTypeEff - status: NotDecompiled + status: Matching Library/Se/Project/SePlayParamList.o: '.text': - offset: 0x9e8fe8 diff --git a/lib/al/Library/Se/Project/SePlayParam.cpp b/lib/al/Library/Se/Project/SePlayParam.cpp new file mode 100644 index 0000000000..d26d6f846c --- /dev/null +++ b/lib/al/Library/Se/Project/SePlayParam.cpp @@ -0,0 +1,28 @@ +#include "Library/Se/Project/SePlayParam.h" + +namespace al { + +SePlayParam::SePlayParam() { + reset(); +} + +void SePlayParam::reset() { + mType = SePlayParamType::Invalid; + mValue = 1.0f; + mValue2 = 0.0f; +} + +void SePlayParam::set(SePlayParamType type, f32 value, f32 value2) { + mType = type; + mValue = value; + mValue2 = value2; +} + +void SePlayParam::setMul(SePlayParamType type, f32 value, f32 value2) { + f32 mul = mValue * value; + mType = type; + mValue2 = value2; + mValue = mul; +} + +} // namespace al diff --git a/lib/al/Library/Se/Project/SePlayParam.h b/lib/al/Library/Se/Project/SePlayParam.h new file mode 100644 index 0000000000..fd564de7ab --- /dev/null +++ b/lib/al/Library/Se/Project/SePlayParam.h @@ -0,0 +1,35 @@ +#pragma once + +#include + +namespace al { + +enum class SePlayParamType { + Invalid, + Volume, + Pitch, + SeqTempoRatio, + EffectSend, + SeqLocalVariable, + SeqGlobalVariable, + LpfFreq, + BiquadFilter, +}; + +class SePlayParam { +public: + SePlayParam(); + + void reset(); + void set(SePlayParamType type, f32 value, f32 value2); + void setMul(SePlayParamType type, f32 value, f32 value2); + +private: + SePlayParamType mType; + f32 mValue; + f32 mValue2; +}; + +static_assert(sizeof(SePlayParam) == 0xC); + +} // namespace al