IW5 support initial commit

This commit is contained in:
Jan
2021-07-23 01:12:36 +02:00
parent c6ea52018a
commit f201dfafd8
102 changed files with 8835 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#include "gfximage_actions.h"
#include <cassert>
#include <cstring>
using namespace IW5;
Actions_GfxImage::Actions_GfxImage(Zone* zone)
: AssetLoadingActions(zone)
{
}
void Actions_GfxImage::OnImageLoaded(GfxImage* image) const
{
image->cardMemory.platform[0] = 0;
}
void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const
{
const size_t loadDefSize = offsetof(IW5::GfxImageLoadDef, data) + loadDef->resourceSize;
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone->GetMemory()->Alloc(loadDefSize));
memcpy(image->texture.loadDef, loadDef, loadDefSize);
}