From 9052636ff934722f10fccd7e166c8459091523f3 Mon Sep 17 00:00:00 2001 From: twanvl Date: Tue, 20 Mar 2007 17:21:08 +0000 Subject: [PATCH] Addded script functions for exporting, ExportTemplate package type git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@220 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/export_template.cpp | 22 ++++ src/data/export_template.hpp | 34 +++++ src/data/game.cpp | 2 +- src/data/symbol_font.hpp | 2 +- src/mse.vcproj | 6 + src/script/context.cpp | 2 +- src/script/dependency.cpp | 6 +- src/script/functions/basic.cpp | 96 +++++++++++++- src/script/functions/english.cpp | 106 +++++++++++++++ src/script/functions/export.cpp | 218 ++++++++++++++++++++++++++++++- src/script/functions/util.hpp | 1 + src/script/to_value.hpp | 23 +++- src/script/value.cpp | 52 ++++++-- src/script/value.hpp | 3 +- src/util/io/package.cpp | 3 - src/util/io/package.hpp | 2 - src/util/io/package_manager.cpp | 12 +- src/util/tagged_string.cpp | 6 +- 18 files changed, 556 insertions(+), 40 deletions(-) create mode 100644 src/data/export_template.cpp create mode 100644 src/data/export_template.hpp diff --git a/src/data/export_template.cpp b/src/data/export_template.cpp new file mode 100644 index 00000000..39dba481 --- /dev/null +++ b/src/data/export_template.cpp @@ -0,0 +1,22 @@ +//+----------------------------------------------------------------------------+ +//| Description: Magic Set Editor - Program to make Magic (tm) cards | +//| Copyright: (C) 2001 - 2006 Twan van Laarhoven | +//| License: GNU General Public License 2 or later (see file COPYING) | +//+----------------------------------------------------------------------------+ + +// ----------------------------------------------------------------------------- : Includes + +#include + +// ----------------------------------------------------------------------------- : Export template, basics + +String ExportTemplate::typeNameStatic() { return _("export-template"); } +String ExportTemplate::typeName() const { return _("export-template"); } + +IMPLEMENT_REFLECTION(ExportTemplate) { + REFLECT_BASE(Packaged); + REFLECT(file_type); + REFLECT(create_directory); +} + +// ----------------------------------------------------------------------------- : diff --git a/src/data/export_template.hpp b/src/data/export_template.hpp new file mode 100644 index 00000000..5c23562a --- /dev/null +++ b/src/data/export_template.hpp @@ -0,0 +1,34 @@ +//+----------------------------------------------------------------------------+ +//| Description: Magic Set Editor - Program to make Magic (tm) cards | +//| Copyright: (C) 2001 - 2006 Twan van Laarhoven | +//| License: GNU General Public License 2 or later (see file COPYING) | +//+----------------------------------------------------------------------------+ + +#ifndef HEADER_DATA_EXPORT_TEMPLATE +#define HEADER_DATA_EXPORT_TEMPLATE + +// ----------------------------------------------------------------------------- : Includes + +#include +#include +#include