diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-11 20:44:26 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-10-15 11:50:39 +0200 |
commit | b1e8889d969f5f88539c47c2afac6c9ea2a2dc11 (patch) | |
tree | e5d3cec5db3c03d59f257ee94ecbefa48956a602 | |
parent | c31ad71f10f68705a456b4257c084d4008c34370 (diff) |
dds/etc1/pbm/pvr: Make those modules and split thirdparty files
They are not particularly packaged in Linux distros so we do not
facilitate unbundling via SCons. There could be done if/when there
is interest.
Also s/pnm/pbm/, long-lived typo :)
-rw-r--r-- | SConstruct | 12 | ||||
-rw-r--r-- | drivers/SCsub | 4 | ||||
-rw-r--r-- | drivers/dds/SCsub | 10 | ||||
-rw-r--r-- | drivers/etc1/SCsub | 15 | ||||
-rw-r--r-- | drivers/pnm/SCsub | 10 | ||||
-rw-r--r-- | drivers/pvr/SCsub | 15 | ||||
-rw-r--r-- | drivers/register_driver_types.cpp | 56 | ||||
-rw-r--r-- | modules/dds/SCsub | 7 | ||||
-rw-r--r-- | modules/dds/config.py | 6 | ||||
-rw-r--r-- | modules/dds/register_types.cpp | 44 | ||||
-rw-r--r-- | modules/dds/register_types.h | 30 | ||||
-rw-r--r-- | modules/dds/texture_loader_dds.cpp (renamed from drivers/dds/texture_loader_dds.cpp) | 0 | ||||
-rw-r--r-- | modules/dds/texture_loader_dds.h (renamed from drivers/dds/texture_loader_dds.h) | 0 | ||||
-rw-r--r-- | modules/etc1/SCsub | 19 | ||||
-rw-r--r-- | modules/etc1/config.py | 6 | ||||
-rw-r--r-- | modules/etc1/image_etc.cpp (renamed from drivers/etc1/image_etc.cpp) | 0 | ||||
-rw-r--r-- | modules/etc1/image_etc.h (renamed from drivers/etc1/image_etc.h) | 0 | ||||
-rw-r--r-- | modules/etc1/register_types.cpp | 47 | ||||
-rw-r--r-- | modules/etc1/register_types.h | 30 | ||||
-rw-r--r-- | modules/etc1/texture_loader_pkm.cpp (renamed from drivers/etc1/texture_loader_pkm.cpp) | 0 | ||||
-rw-r--r-- | modules/etc1/texture_loader_pkm.h (renamed from drivers/etc1/texture_loader_pkm.h) | 0 | ||||
-rw-r--r-- | modules/pbm/SCsub | 7 | ||||
-rw-r--r-- | modules/pbm/bitmap_loader_pbm.cpp (renamed from drivers/pnm/bitmap_loader_pnm.cpp) | 4 | ||||
-rw-r--r-- | modules/pbm/bitmap_loader_pbm.h (renamed from drivers/pnm/bitmap_loader_pnm.h) | 6 | ||||
-rw-r--r-- | modules/pbm/config.py | 6 | ||||
-rw-r--r-- | modules/pbm/register_types.cpp | 44 | ||||
-rw-r--r-- | modules/pbm/register_types.h | 30 | ||||
-rw-r--r-- | modules/pvr/SCsub | 23 | ||||
-rw-r--r-- | modules/pvr/config.py | 6 | ||||
-rw-r--r-- | modules/pvr/register_types.cpp | 44 | ||||
-rw-r--r-- | modules/pvr/register_types.h | 30 | ||||
-rw-r--r-- | modules/pvr/texture_loader_pvr.cpp (renamed from drivers/pvr/texture_loader_pvr.cpp) | 0 | ||||
-rw-r--r-- | modules/pvr/texture_loader_pvr.h (renamed from drivers/pvr/texture_loader_pvr.h) | 0 | ||||
-rw-r--r-- | thirdparty/README.md | 23 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/AlphaBitmap.h (renamed from drivers/pvr/AlphaBitmap.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/BitScale.cpp (renamed from drivers/pvr/BitScale.cpp) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/BitScale.h (renamed from drivers/pvr/BitScale.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/BitUtility.h (renamed from drivers/pvr/BitUtility.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/Bitmap.h (renamed from drivers/pvr/Bitmap.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/ColorRgba.h (renamed from drivers/pvr/ColorRgba.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/Interval.h (renamed from drivers/pvr/Interval.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/LICENSE.TXT | 25 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/MortonTable.cpp (renamed from drivers/pvr/MortonTable.cpp) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/MortonTable.h (renamed from drivers/pvr/MortonTable.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/Point2.h (renamed from drivers/pvr/Point2.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/PvrTcDecoder.cpp (renamed from drivers/pvr/PvrTcDecoder.cpp) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/PvrTcDecoder.h (renamed from drivers/pvr/PvrTcDecoder.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/PvrTcEncoder.cpp (renamed from drivers/pvr/PvrTcEncoder.cpp) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/PvrTcEncoder.h (renamed from drivers/pvr/PvrTcEncoder.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/PvrTcPacket.cpp (renamed from drivers/pvr/PvrTcPacket.cpp) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/PvrTcPacket.h (renamed from drivers/pvr/PvrTcPacket.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/RgbBitmap.h (renamed from drivers/pvr/RgbBitmap.h) | 0 | ||||
-rw-r--r-- | thirdparty/pvrtccompressor/RgbaBitmap.h (renamed from drivers/pvr/RgbaBitmap.h) | 0 | ||||
-rw-r--r-- | thirdparty/rg-etc1/rg_etc1.cpp (renamed from drivers/etc1/rg_etc1.cpp) | 0 | ||||
-rw-r--r-- | thirdparty/rg-etc1/rg_etc1.h (renamed from drivers/etc1/rg_etc1.h) | 0 |
55 files changed, 433 insertions, 126 deletions
diff --git a/SConstruct b/SConstruct index 19c62a9d15..2e4ff24d3b 100644 --- a/SConstruct +++ b/SConstruct @@ -129,9 +129,6 @@ opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') opts.Add('webp','WEBP Image loader support (yes/no)','yes') -opts.Add('dds','DDS Texture loader support (yes/no)','yes') -opts.Add('pvr','PVR (PowerVR) Texture loader support (yes/no)','yes') -opts.Add('etc1','etc1 Texture compression support (yes/no)','yes') opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no') opts.Add('musepack','Musepack Audio (yes/no)','yes') @@ -157,7 +154,7 @@ for k in platform_opts.keys(): opts.Add(o[0],o[1],o[2]) for x in module_list: - opts.Add('module_'+x+'_enabled', "Enable module '"+x+"'.", "yes") + opts.Add('module_'+x+'_enabled', "Enable module '"+x+"' (yes/no)", "yes") opts.Update(env_base) # update environment Help(opts.GenerateHelpText(env_base)) # generate help @@ -350,10 +347,6 @@ if selected_platform in platform_list: if (env['theoralib']=='yes'): env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']); - if (env['dds']=='yes'): - env.Append(CPPFLAGS=['-DDDS_ENABLED']); - if (env['pvr']=='yes'): - env.Append(CPPFLAGS=['-DPVR_ENABLED']); if (env['webp']=='yes'): env.Append(CPPFLAGS=['-DWEBP_ENABLED']); @@ -375,9 +368,6 @@ if selected_platform in platform_list: if (env['colored']=='yes'): methods.colored(sys,env) - if (env['etc1']=='yes'): - env.Append(CPPFLAGS=['-DETC1_ENABLED']) - Export('env') #build subdirs, the build order is dependent on link order. diff --git a/drivers/SCsub b/drivers/SCsub index 27bd63dfed..98849b431e 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -14,7 +14,6 @@ SConscript('pulseaudio/SCsub'); SConscript('windows/SCsub'); SConscript('gles2/SCsub'); SConscript('gl_context/SCsub'); -SConscript('pnm/SCsub'); if (env['openssl']!='no'): env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); @@ -29,9 +28,6 @@ if (env['openssl']!='no'): SConscript("png/SCsub"); if (env["webp"]=="yes"): SConscript("webp/SCsub"); -SConscript("dds/SCsub"); -SConscript("pvr/SCsub"); -SConscript("etc1/SCsub") if (env["builtin_zlib"]=="yes"): SConscript("builtin_zlib/SCsub"); diff --git a/drivers/dds/SCsub b/drivers/dds/SCsub deleted file mode 100644 index 159829384f..0000000000 --- a/drivers/dds/SCsub +++ /dev/null @@ -1,10 +0,0 @@ -Import('env') - - -dds_sources = [ - "dds/texture_loader_dds.cpp" - ] - -env.drivers_sources+=dds_sources - -#env.add_source_files(env.drivers_sources, dds_sources) diff --git a/drivers/etc1/SCsub b/drivers/etc1/SCsub deleted file mode 100644 index 2b9dc1b31c..0000000000 --- a/drivers/etc1/SCsub +++ /dev/null @@ -1,15 +0,0 @@ -Import('env') - - -etc_sources = [ - "etc1/image_etc.cpp", - "etc1/rg_etc1.cpp", - "etc1/texture_loader_pkm.cpp" -] - -if (env["etc1"] != "no"): - env.drivers_sources+=etc_sources - -#env.add_source_files(env.drivers_sources, etc_sources) - -Export('env') diff --git a/drivers/pnm/SCsub b/drivers/pnm/SCsub deleted file mode 100644 index 28b35773a4..0000000000 --- a/drivers/pnm/SCsub +++ /dev/null @@ -1,10 +0,0 @@ -Import('env') - - -pnm_sources = [ - "pnm/bitmap_loader_pnm.cpp" - ] - -env.drivers_sources+=pnm_sources - -#env.add_source_files(env.drivers_sources, pnm_sources) diff --git a/drivers/pvr/SCsub b/drivers/pvr/SCsub deleted file mode 100644 index 44b8c3d6bb..0000000000 --- a/drivers/pvr/SCsub +++ /dev/null @@ -1,15 +0,0 @@ -Import('env') - - -pvr_sources = [ - "pvr/BitScale.cpp", - "pvr/MortonTable.cpp", - "pvr/PvrTcDecoder.cpp", - "pvr/PvrTcEncoder.cpp", - "pvr/PvrTcPacket.cpp", - "pvr/texture_loader_pvr.cpp" - ] - -env.drivers_sources+=pvr_sources - -#env.add_source_files(env.drivers_sources, pvr_sources) diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index ca922da6f0..9623c29b1a 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -31,12 +31,7 @@ #include "png/image_loader_png.h" #include "png/resource_saver_png.h" #include "webp/image_loader_webp.h" -#include "dds/texture_loader_dds.h" -#include "etc1/texture_loader_pkm.h" -#include "pvr/texture_loader_pvr.h" -#include "etc1/image_etc.h" #include "chibi/event_stream_chibi.h" -#include "pnm/bitmap_loader_pnm.h" #ifdef TOOLS_ENABLED @@ -81,19 +76,6 @@ static ResourceSaverPNG *resource_saver_png=NULL; static ImageLoaderWEBP *image_loader_webp=NULL; #endif -#ifdef DDS_ENABLED -static ResourceFormatDDS *resource_loader_dds=NULL; -#endif - -#ifdef ETC1_ENABLED -static ResourceFormatPKM *resource_loader_pkm=NULL; -#endif - - -#ifdef PVR_ENABLED -static ResourceFormatPVR *resource_loader_pvr=NULL; -#endif - #ifdef TREMOR_ENABLED static ResourceFormatLoaderAudioStreamOGG *vorbis_stream_loader=NULL; #endif @@ -119,9 +101,6 @@ static ResourceFormatLoaderAudioStreamMPC * mpc_stream_loader=NULL; #endif - -static ResourceFormatPBM * pbm_loader=NULL; - void register_core_driver_types() { image_loader_png = memnew( ImageLoaderPNG ); @@ -135,9 +114,6 @@ void register_core_driver_types() { ImageLoader::add_image_format_loader( image_loader_webp ); #endif - pbm_loader = memnew( ResourceFormatPBM ); - ResourceLoader::add_resource_format_loader(pbm_loader); - ObjectTypeDB::register_type<RegEx>(); } @@ -153,7 +129,6 @@ void unregister_core_driver_types() { memdelete( image_loader_webp ); #endif - memdelete( pbm_loader ); } @@ -177,21 +152,6 @@ void register_driver_types() { ObjectTypeDB::register_type<AudioStreamOpus>(); #endif -#ifdef DDS_ENABLED - resource_loader_dds = memnew( ResourceFormatDDS ); - ResourceLoader::add_resource_format_loader(resource_loader_dds ); -#endif - -#ifdef ETC1_ENABLED - resource_loader_pkm = memnew( ResourceFormatPKM ); - ResourceLoader::add_resource_format_loader(resource_loader_pkm); -#endif - -#ifdef PVR_ENABLED - resource_loader_pvr = memnew( ResourceFormatPVR ); - ResourceLoader::add_resource_format_loader(resource_loader_pvr ); -#endif - #ifdef TOOLS_ENABLED Geometry::_decompose_func=b2d_decompose; @@ -225,10 +185,6 @@ void register_driver_types() { #endif #endif -#ifdef ETC1_ENABLED - _register_etc1_compress_func(); -#endif - initialize_chibi(); } @@ -257,18 +213,6 @@ void unregister_driver_types() { memdelete (mpc_stream_loader); #endif -#ifdef DDS_ENABLED - memdelete(resource_loader_dds); -#endif - -#ifdef ETC1_ENABLED - memdelete(resource_loader_pkm); -#endif - -#ifdef PVR_ENABLED - memdelete(resource_loader_pvr); -#endif - #ifdef OPENSSL_ENABLED unregister_openssl(); diff --git a/modules/dds/SCsub b/modules/dds/SCsub new file mode 100644 index 0000000000..bcea3a84c0 --- /dev/null +++ b/modules/dds/SCsub @@ -0,0 +1,7 @@ +Import('env') +Import('env_modules') + +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/dds/config.py b/modules/dds/config.py new file mode 100644 index 0000000000..368e97e152 --- /dev/null +++ b/modules/dds/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/dds/register_types.cpp b/modules/dds/register_types.cpp new file mode 100644 index 0000000000..0d28e2bbef --- /dev/null +++ b/modules/dds/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "texture_loader_dds.h" + +static ResourceFormatDDS *resource_loader_dds = NULL; + +void register_dds_types() { + + resource_loader_dds = memnew( ResourceFormatDDS ); + ResourceLoader::add_resource_format_loader(resource_loader_dds); +} + +void unregister_dds_types() { + + memdelete(resource_loader_dds); +} diff --git a/modules/dds/register_types.h b/modules/dds/register_types.h new file mode 100644 index 0000000000..f9ecfb8ef9 --- /dev/null +++ b/modules/dds/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_dds_types(); +void unregister_dds_types(); diff --git a/drivers/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 0cc84f02f7..0cc84f02f7 100644 --- a/drivers/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp diff --git a/drivers/dds/texture_loader_dds.h b/modules/dds/texture_loader_dds.h index 371eb1858c..371eb1858c 100644 --- a/drivers/dds/texture_loader_dds.h +++ b/modules/dds/texture_loader_dds.h diff --git a/modules/etc1/SCsub b/modules/etc1/SCsub new file mode 100644 index 0000000000..93c304fe7f --- /dev/null +++ b/modules/etc1/SCsub @@ -0,0 +1,19 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +# Not unbundled so far since not widespread as shared library +thirdparty_dir = "#thirdparty/rg-etc1/" +thirdparty_etc1_sources = [ + "rg_etc1.cpp", +] +thirdparty_etc1_sources = [thirdparty_dir + file for file in thirdparty_etc1_sources] + +env_modules.add_source_files(env.modules_sources, thirdparty_etc1_sources) +env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/etc1/config.py b/modules/etc1/config.py new file mode 100644 index 0000000000..368e97e152 --- /dev/null +++ b/modules/etc1/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/drivers/etc1/image_etc.cpp b/modules/etc1/image_etc.cpp index cf2384240b..cf2384240b 100644 --- a/drivers/etc1/image_etc.cpp +++ b/modules/etc1/image_etc.cpp diff --git a/drivers/etc1/image_etc.h b/modules/etc1/image_etc.h index edcff39bfd..edcff39bfd 100644 --- a/drivers/etc1/image_etc.h +++ b/modules/etc1/image_etc.h diff --git a/modules/etc1/register_types.cpp b/modules/etc1/register_types.cpp new file mode 100644 index 0000000000..e9eba6c864 --- /dev/null +++ b/modules/etc1/register_types.cpp @@ -0,0 +1,47 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "image_etc.h" +#include "texture_loader_pkm.h" + +static ResourceFormatPKM *resource_loader_pkm = NULL; + +void register_etc1_types() { + + resource_loader_pkm = memnew( ResourceFormatPKM ); + ResourceLoader::add_resource_format_loader(resource_loader_pkm); + + _register_etc1_compress_func(); +} + +void unregister_etc1_types() { + + memdelete(resource_loader_pkm); +} diff --git a/modules/etc1/register_types.h b/modules/etc1/register_types.h new file mode 100644 index 0000000000..bc26699d54 --- /dev/null +++ b/modules/etc1/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_etc1_types(); +void unregister_etc1_types(); diff --git a/drivers/etc1/texture_loader_pkm.cpp b/modules/etc1/texture_loader_pkm.cpp index 275afc1fd6..275afc1fd6 100644 --- a/drivers/etc1/texture_loader_pkm.cpp +++ b/modules/etc1/texture_loader_pkm.cpp diff --git a/drivers/etc1/texture_loader_pkm.h b/modules/etc1/texture_loader_pkm.h index 5788716d9f..5788716d9f 100644 --- a/drivers/etc1/texture_loader_pkm.h +++ b/modules/etc1/texture_loader_pkm.h diff --git a/modules/pbm/SCsub b/modules/pbm/SCsub new file mode 100644 index 0000000000..bcea3a84c0 --- /dev/null +++ b/modules/pbm/SCsub @@ -0,0 +1,7 @@ +Import('env') +Import('env_modules') + +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/drivers/pnm/bitmap_loader_pnm.cpp b/modules/pbm/bitmap_loader_pbm.cpp index e06d4c80f0..1d08b10824 100644 --- a/drivers/pnm/bitmap_loader_pnm.cpp +++ b/modules/pbm/bitmap_loader_pbm.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* bitmap_loader_pnm.cpp */ +/* bitmap_loader_pbm.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,7 +26,7 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "bitmap_loader_pnm.h" +#include "bitmap_loader_pbm.h" #include "os/file_access.h" #include "scene/resources/bit_mask.h" diff --git a/drivers/pnm/bitmap_loader_pnm.h b/modules/pbm/bitmap_loader_pbm.h index 965cf7a451..4f7144b3e0 100644 --- a/drivers/pnm/bitmap_loader_pnm.h +++ b/modules/pbm/bitmap_loader_pbm.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* bitmap_loader_pnm.h */ +/* bitmap_loader_pbm.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,8 +26,8 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef BITMAP_LOADER_PNM_H -#define BITMAP_LOADER_PNM_H +#ifndef BITMAP_LOADER_PBM_H +#define BITMAP_LOADER_PBM_H #include "io/resource_loader.h" diff --git a/modules/pbm/config.py b/modules/pbm/config.py new file mode 100644 index 0000000000..368e97e152 --- /dev/null +++ b/modules/pbm/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/pbm/register_types.cpp b/modules/pbm/register_types.cpp new file mode 100644 index 0000000000..181083773a --- /dev/null +++ b/modules/pbm/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "bitmap_loader_pbm.h" + +static ResourceFormatPBM * pbm_loader = NULL; + +void register_pbm_types() { + + pbm_loader = memnew( ResourceFormatPBM ); + ResourceLoader::add_resource_format_loader(pbm_loader); +} + +void unregister_pbm_types() { + + memdelete( pbm_loader ); +} diff --git a/modules/pbm/register_types.h b/modules/pbm/register_types.h new file mode 100644 index 0000000000..20c8133c2c --- /dev/null +++ b/modules/pbm/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_pbm_types(); +void unregister_pbm_types(); diff --git a/modules/pvr/SCsub b/modules/pvr/SCsub new file mode 100644 index 0000000000..b169695018 --- /dev/null +++ b/modules/pvr/SCsub @@ -0,0 +1,23 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +# Not unbundled so far since not widespread as shared library +thirdparty_dir = "#thirdparty/pvrtccompressor/" +thirdparty_pvr_sources = [ + "BitScale.cpp", + "MortonTable.cpp", + "PvrTcDecoder.cpp", + "PvrTcEncoder.cpp", + "PvrTcPacket.cpp", +] +thirdparty_pvr_sources = [thirdparty_dir + file for file in thirdparty_pvr_sources] + +env_modules.add_source_files(env.modules_sources, thirdparty_pvr_sources) +env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/pvr/config.py b/modules/pvr/config.py new file mode 100644 index 0000000000..368e97e152 --- /dev/null +++ b/modules/pvr/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/pvr/register_types.cpp b/modules/pvr/register_types.cpp new file mode 100644 index 0000000000..e5e18fb3d1 --- /dev/null +++ b/modules/pvr/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "texture_loader_pvr.h" + +static ResourceFormatPVR *resource_loader_pvr = NULL; + +void register_pvr_types() { + + resource_loader_pvr = memnew( ResourceFormatPVR ); + ResourceLoader::add_resource_format_loader(resource_loader_pvr); +} + +void unregister_pvr_types() { + + memdelete(resource_loader_pvr); +} diff --git a/modules/pvr/register_types.h b/modules/pvr/register_types.h new file mode 100644 index 0000000000..d600f54d51 --- /dev/null +++ b/modules/pvr/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_pvr_types(); +void unregister_pvr_types(); diff --git a/drivers/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index 3ab3240512..3ab3240512 100644 --- a/drivers/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp diff --git a/drivers/pvr/texture_loader_pvr.h b/modules/pvr/texture_loader_pvr.h index 5efb3b2507..5efb3b2507 100644 --- a/drivers/pvr/texture_loader_pvr.h +++ b/modules/pvr/texture_loader_pvr.h diff --git a/thirdparty/README.md b/thirdparty/README.md index 5c8208b9a5..78a3d4116e 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -42,3 +42,26 @@ Files extracted from upstream source: * pngtest.c - the arm/ folder - scripts/pnglibconf.h.prebuilt as pnglibconf.h + + +## pvrtccompressor + +- Upstream: https://bitbucket.org/jthlim/pvrtccompressor +- Version: hg commit cf71777 - 2015-01-08 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- all .cpp and .h files apart from main.cpp +- LICENSE.TXT + + +## rg-etc1 + +- Upstream: https://github.com/richgel999/rg-etc1 +- Version: 1.04 +- License: zlib + +Files extracted from upstream source: + +- all of them: rg_etc1.{cpp,h} diff --git a/drivers/pvr/AlphaBitmap.h b/thirdparty/pvrtccompressor/AlphaBitmap.h index 57c6b026ea..57c6b026ea 100644 --- a/drivers/pvr/AlphaBitmap.h +++ b/thirdparty/pvrtccompressor/AlphaBitmap.h diff --git a/drivers/pvr/BitScale.cpp b/thirdparty/pvrtccompressor/BitScale.cpp index 97b3f0aa25..97b3f0aa25 100644 --- a/drivers/pvr/BitScale.cpp +++ b/thirdparty/pvrtccompressor/BitScale.cpp diff --git a/drivers/pvr/BitScale.h b/thirdparty/pvrtccompressor/BitScale.h index 36613aeeee..36613aeeee 100644 --- a/drivers/pvr/BitScale.h +++ b/thirdparty/pvrtccompressor/BitScale.h diff --git a/drivers/pvr/BitUtility.h b/thirdparty/pvrtccompressor/BitUtility.h index 588ff3e892..588ff3e892 100644 --- a/drivers/pvr/BitUtility.h +++ b/thirdparty/pvrtccompressor/BitUtility.h diff --git a/drivers/pvr/Bitmap.h b/thirdparty/pvrtccompressor/Bitmap.h index 508ed8cb75..508ed8cb75 100644 --- a/drivers/pvr/Bitmap.h +++ b/thirdparty/pvrtccompressor/Bitmap.h diff --git a/drivers/pvr/ColorRgba.h b/thirdparty/pvrtccompressor/ColorRgba.h index 0701420566..0701420566 100644 --- a/drivers/pvr/ColorRgba.h +++ b/thirdparty/pvrtccompressor/ColorRgba.h diff --git a/drivers/pvr/Interval.h b/thirdparty/pvrtccompressor/Interval.h index a7252e8375..a7252e8375 100644 --- a/drivers/pvr/Interval.h +++ b/thirdparty/pvrtccompressor/Interval.h diff --git a/thirdparty/pvrtccompressor/LICENSE.TXT b/thirdparty/pvrtccompressor/LICENSE.TXT new file mode 100644 index 0000000000..974fc09e25 --- /dev/null +++ b/thirdparty/pvrtccompressor/LICENSE.TXT @@ -0,0 +1,25 @@ +Copyright © 2014, Jeffrey Lim. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/pvr/MortonTable.cpp b/thirdparty/pvrtccompressor/MortonTable.cpp index 29a5af67f6..29a5af67f6 100644 --- a/drivers/pvr/MortonTable.cpp +++ b/thirdparty/pvrtccompressor/MortonTable.cpp diff --git a/drivers/pvr/MortonTable.h b/thirdparty/pvrtccompressor/MortonTable.h index 7a27e59544..7a27e59544 100644 --- a/drivers/pvr/MortonTable.h +++ b/thirdparty/pvrtccompressor/MortonTable.h diff --git a/drivers/pvr/Point2.h b/thirdparty/pvrtccompressor/Point2.h index 89fa4b6322..89fa4b6322 100644 --- a/drivers/pvr/Point2.h +++ b/thirdparty/pvrtccompressor/Point2.h diff --git a/drivers/pvr/PvrTcDecoder.cpp b/thirdparty/pvrtccompressor/PvrTcDecoder.cpp index d8a36b342c..d8a36b342c 100644 --- a/drivers/pvr/PvrTcDecoder.cpp +++ b/thirdparty/pvrtccompressor/PvrTcDecoder.cpp diff --git a/drivers/pvr/PvrTcDecoder.h b/thirdparty/pvrtccompressor/PvrTcDecoder.h index 1b6fcf964c..1b6fcf964c 100644 --- a/drivers/pvr/PvrTcDecoder.h +++ b/thirdparty/pvrtccompressor/PvrTcDecoder.h diff --git a/drivers/pvr/PvrTcEncoder.cpp b/thirdparty/pvrtccompressor/PvrTcEncoder.cpp index 587b1320f1..587b1320f1 100644 --- a/drivers/pvr/PvrTcEncoder.cpp +++ b/thirdparty/pvrtccompressor/PvrTcEncoder.cpp diff --git a/drivers/pvr/PvrTcEncoder.h b/thirdparty/pvrtccompressor/PvrTcEncoder.h index b9344367d9..b9344367d9 100644 --- a/drivers/pvr/PvrTcEncoder.h +++ b/thirdparty/pvrtccompressor/PvrTcEncoder.h diff --git a/drivers/pvr/PvrTcPacket.cpp b/thirdparty/pvrtccompressor/PvrTcPacket.cpp index 2e40d371e8..2e40d371e8 100644 --- a/drivers/pvr/PvrTcPacket.cpp +++ b/thirdparty/pvrtccompressor/PvrTcPacket.cpp diff --git a/drivers/pvr/PvrTcPacket.h b/thirdparty/pvrtccompressor/PvrTcPacket.h index ac3b6a4dd1..ac3b6a4dd1 100644 --- a/drivers/pvr/PvrTcPacket.h +++ b/thirdparty/pvrtccompressor/PvrTcPacket.h diff --git a/drivers/pvr/RgbBitmap.h b/thirdparty/pvrtccompressor/RgbBitmap.h index cf1d78667d..cf1d78667d 100644 --- a/drivers/pvr/RgbBitmap.h +++ b/thirdparty/pvrtccompressor/RgbBitmap.h diff --git a/drivers/pvr/RgbaBitmap.h b/thirdparty/pvrtccompressor/RgbaBitmap.h index 66b5542c1a..66b5542c1a 100644 --- a/drivers/pvr/RgbaBitmap.h +++ b/thirdparty/pvrtccompressor/RgbaBitmap.h diff --git a/drivers/etc1/rg_etc1.cpp b/thirdparty/rg-etc1/rg_etc1.cpp index 8e28b53f9d..8e28b53f9d 100644 --- a/drivers/etc1/rg_etc1.cpp +++ b/thirdparty/rg-etc1/rg_etc1.cpp diff --git a/drivers/etc1/rg_etc1.h b/thirdparty/rg-etc1/rg_etc1.h index 9ce89a6cc6..9ce89a6cc6 100644 --- a/drivers/etc1/rg_etc1.h +++ b/thirdparty/rg-etc1/rg_etc1.h |