2022-03-21 21:54:48 -04:00
|
|
|
#include "TextureExporter.h"
|
|
|
|
#include "../ZAPD/ZFile.h"
|
|
|
|
|
2022-05-11 13:18:24 -04:00
|
|
|
void ExporterExample_Texture::Save(ZResource* res, [[maybe_unused]] const fs::path& outPath,
|
2022-03-21 21:54:48 -04:00
|
|
|
BinaryWriter* writer)
|
|
|
|
{
|
|
|
|
ZTexture* tex = (ZTexture*)res;
|
|
|
|
|
|
|
|
auto data = tex->parent->GetRawData();
|
|
|
|
|
|
|
|
for (offset_t i = tex->GetRawDataIndex(); i < tex->GetRawDataIndex() + tex->GetRawDataSize();
|
|
|
|
i++)
|
|
|
|
writer->Write(data[i]);
|
|
|
|
}
|