summaryrefslogtreecommitdiff
path: root/modules/etc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/etc')
-rw-r--r--modules/etc/SCsub7
-rw-r--r--modules/etc/image_etc.cpp7
-rw-r--r--modules/etc/image_etc.h4
-rw-r--r--modules/etc/register_types.cpp11
-rw-r--r--modules/etc/register_types.h4
-rw-r--r--modules/etc/texture_loader_pkm.cpp4
-rw-r--r--modules/etc/texture_loader_pkm.h5
7 files changed, 20 insertions, 22 deletions
diff --git a/modules/etc/SCsub b/modules/etc/SCsub
index d2c77d6e3c..eb2738053b 100644
--- a/modules/etc/SCsub
+++ b/modules/etc/SCsub
@@ -31,12 +31,7 @@ env_etc.Append(CPPPATH=[thirdparty_dir])
# upstream uses c++11
if not env.msvc:
- env_etc.Append(CCFLAGS="-std=c++11")
-
-# -ffast-math seems to be incompatible with etc2comp on recent versions of
-# GCC and Clang
-if '-ffast-math' in env_etc['CCFLAGS']:
- env_etc['CCFLAGS'].remove('-ffast-math')
+ env_etc.Append(CXXFLAGS="-std=c++11")
env_thirdparty = env_etc.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp
index fbbc765bf2..6f54436bf9 100644
--- a/modules/etc/image_etc.cpp
+++ b/modules/etc/image_etc.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -115,7 +115,8 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
case Image::FORMAT_RGBA5551: {
detected_channels = Image::DETECTED_RGBA;
} break;
- default: {}
+ default: {
+ }
}
}
diff --git a/modules/etc/image_etc.h b/modules/etc/image_etc.h
index 371c38176f..724d06545b 100644
--- a/modules/etc/image_etc.h
+++ b/modules/etc/image_etc.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/etc/register_types.cpp b/modules/etc/register_types.cpp
index 1d1f0e1b77..584a1fcce8 100644
--- a/modules/etc/register_types.cpp
+++ b/modules/etc/register_types.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,11 +33,11 @@
#include "image_etc.h"
#include "texture_loader_pkm.h"
-static ResourceFormatPKM *resource_loader_pkm = NULL;
+static Ref<ResourceFormatPKM> resource_loader_pkm;
void register_etc_types() {
- resource_loader_pkm = memnew(ResourceFormatPKM);
+ resource_loader_pkm.instance();
ResourceLoader::add_resource_format_loader(resource_loader_pkm);
_register_etc_compress_func();
@@ -45,5 +45,6 @@ void register_etc_types() {
void unregister_etc_types() {
- memdelete(resource_loader_pkm);
+ ResourceLoader::remove_resource_format_loader(resource_loader_pkm);
+ resource_loader_pkm.unref();
}
diff --git a/modules/etc/register_types.h b/modules/etc/register_types.h
index 4a8513a687..161c37b52f 100644
--- a/modules/etc/register_types.h
+++ b/modules/etc/register_types.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp
index 3041dde876..f302834222 100644
--- a/modules/etc/texture_loader_pkm.cpp
+++ b/modules/etc/texture_loader_pkm.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/etc/texture_loader_pkm.h b/modules/etc/texture_loader_pkm.h
index b5a95767c7..860fe8b5df 100644
--- a/modules/etc/texture_loader_pkm.h
+++ b/modules/etc/texture_loader_pkm.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,6 +35,7 @@
#include "scene/resources/texture.h"
class ResourceFormatPKM : public ResourceFormatLoader {
+ GDCLASS(ResourceFormatPKM, ResourceFormatLoader)
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;