summaryrefslogtreecommitdiff
path: root/ZAPD/ExporterSet.h
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2023-05-05 18:24:21 -0400
committerGitHub <noreply@github.com>2023-05-05 18:24:21 -0400
commita8874cf4a6274ff3a0388fb08d43a91b620d3618 (patch)
tree3a1b6d995ab77b3b2649a74f7af169f96ea5f9cf /ZAPD/ExporterSet.h
parentecc25616ec90e14f3ddcf3c703b7a29d6ccf1f95 (diff)
Refactor - Clean up ZTexture, ZFile, and Main (#292)
* ZTexture and ZFile cleanup * Moved Exporter Set into its own file * Some minor renaming * Arguments handled through dictionary instead of if else chain * Build error fix
Diffstat (limited to 'ZAPD/ExporterSet.h')
-rw-r--r--ZAPD/ExporterSet.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/ZAPD/ExporterSet.h b/ZAPD/ExporterSet.h
new file mode 100644
index 0000000..c4dd934
--- /dev/null
+++ b/ZAPD/ExporterSet.h
@@ -0,0 +1,24 @@
+#pragma once
+
+typedef void (*ExporterSetFunc)(ZFile*);
+typedef bool (*ExporterSetFuncBool)(ZFileMode fileMode);
+typedef void (*ExporterSetFuncVoid)(int argc, char* argv[], int& i);
+typedef void (*ExporterSetFuncVoid2)(const std::string& buildMode, ZFileMode& fileMode);
+typedef void (*ExporterSetFuncVoid3)();
+typedef void (*ExporterSetResSave)(ZResource* res, BinaryWriter& writer);
+
+class ExporterSet
+{
+public:
+ ~ExporterSet();
+
+ std::map<ZResourceType, ZResourceExporter*> exporters;
+ ExporterSetFuncVoid parseArgsFunc = nullptr;
+ ExporterSetFuncVoid2 parseFileModeFunc = nullptr;
+ ExporterSetFuncBool processFileModeFunc = nullptr;
+ ExporterSetFunc beginFileFunc = nullptr;
+ ExporterSetFunc endFileFunc = nullptr;
+ ExporterSetFuncVoid3 beginXMLFunc = nullptr;
+ ExporterSetFuncVoid3 endXMLFunc = nullptr;
+ ExporterSetResSave resSaveFunc = nullptr;
+}; \ No newline at end of file