chore: update all usages of memory manager allocation

This commit is contained in:
Jan
2024-04-22 21:21:31 +02:00
parent 0845cccd12
commit a3acba8bc0
51 changed files with 149 additions and 211 deletions

View File

@ -19,6 +19,6 @@ void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image)
{
const size_t loadDefSize = offsetof(IW4::GfxImageLoadDef, data) + loadDef->resourceSize;
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone->GetMemory()->Alloc(loadDefSize));
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone->GetMemory()->AllocRaw(loadDefSize));
memcpy(image->texture.loadDef, loadDef, loadDefSize);
}

View File

@ -13,8 +13,8 @@ void Actions_LoadedSound::SetSoundData(MssSound* sound) const
{
if (sound->info.data_len > 0)
{
char* tempData = sound->data;
sound->data = static_cast<char*>(m_zone->GetMemory()->Alloc(sound->info.data_len));
const auto* tempData = sound->data;
sound->data = m_zone->GetMemory()->Alloc<char>(sound->info.data_len);
memcpy(sound->data, tempData, sound->info.data_len);
}
else