refactor: use zone reference in AssetLoader

This commit is contained in:
Jan
2025-05-02 11:19:52 +01:00
parent 50612d117e
commit 9e940a6f53
49 changed files with 173 additions and 160 deletions

View File

@ -5,7 +5,7 @@
using namespace IW5;
Actions_GfxImage::Actions_GfxImage(Zone* zone)
Actions_GfxImage::Actions_GfxImage(Zone& zone)
: AssetLoadingActions(zone)
{
}
@ -19,6 +19,6 @@ void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image)
{
const size_t loadDefSize = offsetof(IW5::GfxImageLoadDef, data) + loadDef->resourceSize;
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone->GetMemory()->AllocRaw(loadDefSize));
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone.GetMemory()->AllocRaw(loadDefSize));
memcpy(image->texture.loadDef, loadDef, loadDefSize);
}