mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-19 19:27:52 -05:00
Added iw4 assets related to materials, xmodels
This commit is contained in:
@ -1,23 +1,25 @@
|
||||
#include "gfximage_actions.h"
|
||||
#include <cassert>
|
||||
|
||||
using namespace T6;
|
||||
|
||||
Actions_GfxImage::Actions_GfxImage(Zone* zone)
|
||||
: AssetLoadingActions(zone)
|
||||
{
|
||||
}
|
||||
|
||||
void Actions_GfxImage::OnImageLoaded(T6::GfxImage* image) const
|
||||
void Actions_GfxImage::OnImageLoaded(GfxImage* image) const
|
||||
{
|
||||
image->loadedSize = 0;
|
||||
}
|
||||
|
||||
void Actions_GfxImage::LoadImageData(T6::GfxImageLoadDef* loadDef, T6::GfxImage* image) const
|
||||
void Actions_GfxImage::LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const
|
||||
{
|
||||
if(loadDef->resourceSize > 0)
|
||||
{
|
||||
const size_t loadDefSize = offsetof(T6::GfxImageLoadDef, data) + loadDef->resourceSize;
|
||||
|
||||
image->texture.loadDef = static_cast<T6::GfxImageLoadDef*>(m_zone->GetMemory()->Alloc(loadDefSize));
|
||||
image->texture.loadDef = static_cast<GfxImageLoadDef*>(m_zone->GetMemory()->Alloc(loadDefSize));
|
||||
memcpy(image->texture.loadDef, loadDef, loadDefSize);
|
||||
}
|
||||
else
|
||||
|
@ -3,11 +3,14 @@
|
||||
#include "Loading/AssetLoadingActions.h"
|
||||
#include "Game/T6/T6.h"
|
||||
|
||||
class Actions_GfxImage final : public AssetLoadingActions
|
||||
namespace T6
|
||||
{
|
||||
public:
|
||||
explicit Actions_GfxImage(Zone* zone);
|
||||
class Actions_GfxImage final : public AssetLoadingActions
|
||||
{
|
||||
public:
|
||||
explicit Actions_GfxImage(Zone* zone);
|
||||
|
||||
void OnImageLoaded(T6::GfxImage* image) const;
|
||||
void LoadImageData(T6::GfxImageLoadDef* loadDef, T6::GfxImage* image) const;
|
||||
};
|
||||
void OnImageLoaded(GfxImage* image) const;
|
||||
void LoadImageData(GfxImageLoadDef* loadDef, GfxImage* image) const;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user