diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Common/DLC/DLCAudioFile.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/DLC/DLCAudioFile.h')
| -rw-r--r-- | Minecraft.Client/Common/DLC/DLCAudioFile.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/DLC/DLCAudioFile.h b/Minecraft.Client/Common/DLC/DLCAudioFile.h new file mode 100644 index 00000000..728512d7 --- /dev/null +++ b/Minecraft.Client/Common/DLC/DLCAudioFile.h @@ -0,0 +1,54 @@ +#pragma once +#include "DLCFile.h" + +class DLCAudioFile : public DLCFile +{ + +public: + + // If you add to the Enum,then you need to add the array of type names + // These are the names used in the XML for the parameters + enum EAudioType + { + e_AudioType_Invalid = -1, + + e_AudioType_Overworld = 0, + e_AudioType_Nether, + e_AudioType_End, + + e_AudioType_Max, + }; + enum EAudioParameterType + { + e_AudioParamType_Invalid = -1, + + e_AudioParamType_Cuename = 0, + e_AudioParamType_Credit, + + e_AudioParamType_Max, + + }; + static WCHAR *wchTypeNamesA[e_AudioParamType_Max]; + + DLCAudioFile(const wstring &path); + + virtual void addData(PBYTE pbData, DWORD dwBytes); + virtual PBYTE getData(DWORD &dwBytes); + + bool processDLCDataFile(PBYTE pbData, DWORD dwLength); + int GetCountofType(DLCAudioFile::EAudioType ptype); + wstring &GetSoundName(int iIndex); + +private: + using DLCFile::addParameter; + + PBYTE m_pbData; + DWORD m_dwBytes; + static const int CURRENT_AUDIO_VERSION_NUM=1; + //unordered_map<int, wstring> m_parameters; + vector<wstring> m_parameters[e_AudioType_Max]; + + // use the EAudioType to order these + void addParameter(DLCAudioFile::EAudioType type, DLCAudioFile::EAudioParameterType ptype, const wstring &value); + DLCAudioFile::EAudioParameterType getParameterType(const wstring ¶mName); +}; |
