forked from sascha/godot
parent
4ff4177acc
commit
1022705707
@ -1,23 +0,0 @@
|
||||
Import('env')
|
||||
|
||||
|
||||
squish_sources=[
|
||||
'squish/alpha.cpp',
|
||||
'squish/clusterfit.cpp',
|
||||
'squish/colourblock.cpp',
|
||||
'squish/colourfit.cpp',
|
||||
'squish/colourset.cpp',
|
||||
'squish/maths.cpp',
|
||||
'squish/rangefit.cpp',
|
||||
'squish/singlecolourfit.cpp',
|
||||
'squish/squish.cpp',
|
||||
'squish/image_compress_squish.cpp',
|
||||
]
|
||||
|
||||
|
||||
if (env["tools"]=="yes"):
|
||||
env.drivers_sources+=squish_sources
|
||||
|
||||
#env.add_source_files(env.drivers_sources, squish_sources)
|
||||
|
||||
Export('env')
|
||||
@ -0,0 +1,27 @@
|
||||
Import('env')
|
||||
Import('env_modules')
|
||||
|
||||
env_squish = env_modules.Clone()
|
||||
|
||||
# Thirdparty source files
|
||||
if (env["squish"] != "system"): # builtin
|
||||
thirdparty_dir = "#thirdparty/squish/"
|
||||
thirdparty_sources = [
|
||||
"alpha.cpp",
|
||||
"clusterfit.cpp",
|
||||
"colourblock.cpp",
|
||||
"colourfit.cpp",
|
||||
"colourset.cpp",
|
||||
"maths.cpp",
|
||||
"rangefit.cpp",
|
||||
"singlecolourfit.cpp",
|
||||
"squish.cpp",
|
||||
]
|
||||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_squish.add_source_files(env.modules_sources, thirdparty_sources)
|
||||
env_squish.Append(CPPPATH = [thirdparty_dir])
|
||||
|
||||
# Godot source files
|
||||
env_squish.add_source_files(env.modules_sources, "*.cpp")
|
||||
@ -0,0 +1,10 @@
|
||||
|
||||
def can_build(platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
# Tools only, disabled for non-tools
|
||||
# TODO: Find a cleaner way to achieve that
|
||||
if (env["tools"] == "no"):
|
||||
env["module_squish_enabled"] = "no"
|
||||
env.disabled_modules.append("squish")
|
||||
@ -0,0 +1,42 @@
|
||||
/*************************************************************************/
|
||||
/* 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"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
#include "image_compress_squish.h"
|
||||
|
||||
void register_squish_types() {
|
||||
|
||||
Image::set_compress_bc_func(image_compress_squish);
|
||||
}
|
||||
|
||||
void unregister_squish_types() {}
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,32 @@
|
||||
/*************************************************************************/
|
||||
/* 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. */
|
||||
/*************************************************************************/
|
||||
#ifdef TOOLS_ENABLED
|
||||
void register_squish_types();
|
||||
void unregister_squish_types();
|
||||
#endif
|
||||
Loading…
Reference in New Issue