|
@@ -42,6 +42,7 @@
|
|
#include "translation.h"
|
|
#include "translation.h"
|
|
#include "compressed_translation.h"
|
|
#include "compressed_translation.h"
|
|
#include "io/translation_loader_po.h"
|
|
#include "io/translation_loader_po.h"
|
|
|
|
+#include "io/resource_format_text.h"
|
|
#include "io/resource_format_xml.h"
|
|
#include "io/resource_format_xml.h"
|
|
#include "io/resource_format_binary.h"
|
|
#include "io/resource_format_binary.h"
|
|
#include "io/stream_peer_ssl.h"
|
|
#include "io/stream_peer_ssl.h"
|
|
@@ -53,6 +54,9 @@
|
|
#include "input_map.h"
|
|
#include "input_map.h"
|
|
#include "undo_redo.h"
|
|
#include "undo_redo.h"
|
|
|
|
|
|
|
|
+
|
|
|
|
+static ResourceFormatSaverText *resource_saver_text=NULL;
|
|
|
|
+static ResourceFormatLoaderText *resource_loader_text=NULL;
|
|
#ifdef XML_ENABLED
|
|
#ifdef XML_ENABLED
|
|
static ResourceFormatSaverXML *resource_saver_xml=NULL;
|
|
static ResourceFormatSaverXML *resource_saver_xml=NULL;
|
|
static ResourceFormatLoaderXML *resource_loader_xml=NULL;
|
|
static ResourceFormatLoaderXML *resource_loader_xml=NULL;
|
|
@@ -102,6 +106,11 @@ void register_core_types() {
|
|
resource_loader_binary = memnew( ResourceFormatLoaderBinary );
|
|
resource_loader_binary = memnew( ResourceFormatLoaderBinary );
|
|
ResourceLoader::add_resource_format_loader(resource_loader_binary);
|
|
ResourceLoader::add_resource_format_loader(resource_loader_binary);
|
|
|
|
|
|
|
|
+ resource_saver_text = memnew( ResourceFormatSaverText );
|
|
|
|
+ ResourceSaver::add_resource_format_saver(resource_saver_text);
|
|
|
|
+ resource_loader_text = memnew( ResourceFormatLoaderText );
|
|
|
|
+ ResourceLoader::add_resource_format_loader(resource_loader_text);
|
|
|
|
+
|
|
#ifdef XML_ENABLED
|
|
#ifdef XML_ENABLED
|
|
resource_saver_xml = memnew( ResourceFormatSaverXML );
|
|
resource_saver_xml = memnew( ResourceFormatSaverXML );
|
|
ResourceSaver::add_resource_format_saver(resource_saver_xml);
|
|
ResourceSaver::add_resource_format_saver(resource_saver_xml);
|
|
@@ -202,6 +211,11 @@ void unregister_core_types() {
|
|
if (resource_loader_binary)
|
|
if (resource_loader_binary)
|
|
memdelete(resource_loader_binary);
|
|
memdelete(resource_loader_binary);
|
|
|
|
|
|
|
|
+ if (resource_saver_text)
|
|
|
|
+ memdelete(resource_saver_text);
|
|
|
|
+ if (resource_loader_text)
|
|
|
|
+ memdelete(resource_loader_text);
|
|
|
|
+
|
|
|
|
|
|
memdelete( resource_format_po );
|
|
memdelete( resource_format_po );
|
|
|
|
|