new pack system

This commit is contained in:
d1str4ught
2025-09-21 05:28:55 +02:00
parent 775cb2f927
commit 5b1d3c6bce
100 changed files with 5269 additions and 5825 deletions

View File

@@ -3,7 +3,7 @@
#include "EterBase/Random.h"
#include "EterBase/Timer.h"
#include "Eterpack/EterPackManager.h"
#include "PackLib/PackManager.h"
SoundEngine::SoundEngine()
{
@@ -246,17 +246,16 @@ bool SoundEngine::Internal_LoadSoundFromPack(const std::string& name)
{
if (m_Files.find(name) == m_Files.end())
{
LPCVOID soundData;
CMappedFile soundFile;
if (!CEterPackManager::Instance().Get(soundFile, name.c_str(), &soundData))
TPackFile soundFile;
if (!CPackManager::Instance().GetFile(name, soundFile))
{
TraceError("Internal_LoadSoundFromPack: SoundEngine: Failed to register file '%s' - not found.", name.c_str());
return false;
}
auto& buffer = m_Files[name];
buffer.resize(soundFile.Size());
memcpy(buffer.data(), soundData, soundFile.Size());
buffer.resize(soundFile.size());
memcpy(buffer.data(), soundFile.data(), soundFile.size());
}
return true;
}