summaryrefslogtreecommitdiffhomepage
path: root/MagicEx/src/3ds2mag.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-04-08 01:21:41 +0200
committerAki <please@ignore.pl>2024-04-08 01:21:41 +0200
commit3cc6b923edb69907794c3dc6daa61a445b3a56c0 (patch)
tree2e9c736042ef364bba0957052e9fddf0fae41097 /MagicEx/src/3ds2mag.cpp
parent3b1776352524c9f24b478260e18cb04d2d27efb5 (diff)
downloadstarshatter-3cc6b923edb69907794c3dc6daa61a445b3a56c0.zip
starshatter-3cc6b923edb69907794c3dc6daa61a445b3a56c0.tar.gz
starshatter-3cc6b923edb69907794c3dc6daa61a445b3a56c0.tar.bz2
Added 3ds2mag converter
Solidified the converters a bit to prevent selected segvs/page faults.
Diffstat (limited to 'MagicEx/src/3ds2mag.cpp')
-rw-r--r--MagicEx/src/3ds2mag.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/MagicEx/src/3ds2mag.cpp b/MagicEx/src/3ds2mag.cpp
new file mode 100644
index 0000000..3bf9460
--- /dev/null
+++ b/MagicEx/src/3ds2mag.cpp
@@ -0,0 +1,23 @@
+/* Starshatter: The Open Source Project
+ Copyright (c) 2021-2024, Starshatter: The Open Source Project Contributors
+ Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
+ Copyright (c) 1997-2006, Destroyer Studios LLC.
+*/
+
+#include <string>
+
+#include <ModelFile3DS.h>
+#include <ModelFileMAG.h>
+
+#include "convert.h"
+
+
+int
+main(int argc, char* argv[])
+{
+ if (argc < 2)
+ return 2;
+ const std::string input {argv[1]};
+ const auto output = input + ".mag";
+ return starshatter::convert<ModelFile3DS, ModelFileMAG>(input, output);
+}