summaryrefslogtreecommitdiff
path: root/ExporterTest/TextureExporter.cpp
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2021-08-05 05:11:24 -0400
committerGitHub <noreply@github.com>2021-08-05 05:11:24 -0400
commit82bd27604a4c8f8c1f01f9c2f54c87fab103c39f (patch)
tree282b189bd2d6113bf134a8b34d7ddc518369f3bb /ExporterTest/TextureExporter.cpp
parent469285b3e1f7885b42905fbfb9b4448f51ea20b3 (diff)
Exporter Support Added (#127)
* Initial exporter implementation * Updated to use static library. * minor cleanup * Cleaned things up a bit * Fixed merge issues * Minor commenting * Added Begin and End functions, and removed HL stuff (to be turned into an exporter at a later date) * Cleaned some stuff up * Additional cleanup * Removed some commented out code * Fixed compilation issues * Cleanup * Fixed merge issues * Got rid of unused windows.h includes * Cleanup * Fixed warning * Removed additional redundancies * Cleanup * Fixed merge issues * Fixed some compiler issues, added makefile for exportertest. * Removed redundancies and clang formatted * Made sure exportertest compiles with C++17 * Moved certain files into new "Utils" folder. * GetExporterMap uses a reference now * Minor fixes and updates. Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
Diffstat (limited to 'ExporterTest/TextureExporter.cpp')
-rw-r--r--ExporterTest/TextureExporter.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/ExporterTest/TextureExporter.cpp b/ExporterTest/TextureExporter.cpp
new file mode 100644
index 0000000..95d3eb9
--- /dev/null
+++ b/ExporterTest/TextureExporter.cpp
@@ -0,0 +1,12 @@
+#include "TextureExporter.h"
+#include "../ZAPD/ZFile.h"
+
+void ExporterExample_Texture::Save(ZResource* res, fs::path outPath, BinaryWriter* writer)
+{
+ ZTexture* tex = (ZTexture*)res;
+
+ auto data = tex->parent->GetRawData();
+
+ for (int i = tex->GetRawDataIndex(); i < tex->GetRawDataIndex() + tex->GetRawDataSize(); i++)
+ writer->Write(data[i]);
+} \ No newline at end of file