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 :)
This commit is contained in:
parent
c31ad71f10
commit
b1e8889d96
55 changed files with 433 additions and 126 deletions
12
SConstruct
12
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.
|
||||
|
|
4
drivers/SCsub
vendored
4
drivers/SCsub
vendored
|
@ -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");
|
||||
|
||||
|
|
|
@ -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)
|
|
@ -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')
|
|
@ -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)
|
|
@ -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)
|
56
drivers/register_driver_types.cpp
vendored
56
drivers/register_driver_types.cpp
vendored
|
@ -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();
|
||||
|
|
7
modules/dds/SCsub
Normal file
7
modules/dds/SCsub
Normal file
|
@ -0,0 +1,7 @@
|
|||
Import('env')
|
||||
Import('env_modules')
|
||||
|
||||
env_modules.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
||||
Export('env_modules')
|
||||
Export('env')
|
6
modules/dds/config.py
Normal file
6
modules/dds/config.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
def can_build(platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
pass
|
44
modules/dds/register_types.cpp
Normal file
44
modules/dds/register_types.cpp
Normal file
|
@ -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);
|
||||
}
|
30
modules/dds/register_types.h
Normal file
30
modules/dds/register_types.h
Normal file
|
@ -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();
|
19
modules/etc1/SCsub
Normal file
19
modules/etc1/SCsub
Normal file
|
@ -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')
|
6
modules/etc1/config.py
Normal file
6
modules/etc1/config.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
def can_build(platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
pass
|
47
modules/etc1/register_types.cpp
Normal file
47
modules/etc1/register_types.cpp
Normal file
|
@ -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);
|
||||
}
|
30
modules/etc1/register_types.h
Normal file
30
modules/etc1/register_types.h
Normal file
|
@ -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();
|
7
modules/pbm/SCsub
Normal file
7
modules/pbm/SCsub
Normal file
|
@ -0,0 +1,7 @@
|
|||
Import('env')
|
||||
Import('env_modules')
|
||||
|
||||
env_modules.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
||||
Export('env_modules')
|
||||
Export('env')
|
|
@ -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"
|
||||
|
|
@ -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"
|
||||
|
6
modules/pbm/config.py
Normal file
6
modules/pbm/config.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
def can_build(platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
pass
|
44
modules/pbm/register_types.cpp
Normal file
44
modules/pbm/register_types.cpp
Normal file
|
@ -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 );
|
||||
}
|
30
modules/pbm/register_types.h
Normal file
30
modules/pbm/register_types.h
Normal file
|
@ -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();
|
23
modules/pvr/SCsub
Normal file
23
modules/pvr/SCsub
Normal file
|
@ -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')
|
6
modules/pvr/config.py
Normal file
6
modules/pvr/config.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
def can_build(platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
pass
|
44
modules/pvr/register_types.cpp
Normal file
44
modules/pvr/register_types.cpp
Normal file
|
@ -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);
|
||||
}
|
30
modules/pvr/register_types.h
Normal file
30
modules/pvr/register_types.h
Normal file
|
@ -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();
|
23
thirdparty/README.md
vendored
23
thirdparty/README.md
vendored
|
@ -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}
|
||||
|
|
25
thirdparty/pvrtccompressor/LICENSE.TXT
vendored
Normal file
25
thirdparty/pvrtccompressor/LICENSE.TXT
vendored
Normal file
|
@ -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.
|
Loading…
Reference in a new issue