mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-01 16:15:07 -04:00
15 lines
418 B
C++
15 lines
418 B
C++
#include "TextureExporter.h"
|
|
#include "../ZAPD/ZFile.h"
|
|
|
|
void ExporterExample_Texture::Save(ZResource* res, [[maybe_unused]] const fs::path& outPath,
|
|
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]);
|
|
}
|