mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into terrain
This commit is contained in:
commit
4ca6b559e6
24
CHANGELOG
24
CHANGELOG
|
@ -1,9 +1,29 @@
|
|||
cocos2d-x-3.6beta0 Apr.14 2015
|
||||
[NEW] 3D: added texturecub supported
|
||||
cocos2d-x-3.6alpha0 Apr.8 2015
|
||||
[NEW] 3D: added texturecub support
|
||||
[NEW] 3D: added skybox support
|
||||
[NEW] 3D: added node animation support
|
||||
[NEW] 3D: added terrian support
|
||||
[NEW] 3rd: updated libcurl to v7.4 on all supported platforms except WP8/WP8.1 universal
|
||||
[NEW] 3rd: updated chipmunk to v6.2.2
|
||||
[NEW] 3rd: updated openssl to v1.0.11
|
||||
[NEW] 3rd: updated freetype to v2.5.5
|
||||
[NEW] 3rd: updated png to v1.6.16 on all supported platforms except WP8/WP8.1 universal because it is not needed on these two platforms
|
||||
[NEW] Animate3D: added `Animate3D::setHighQuality()` to set animation quality
|
||||
[NEW] Label: added disableEffect()
|
||||
[NEW] Lua-binding: used luajit arm64 version on iOS 64-bit devices
|
||||
[NEW] Sprite3D: getAABBRecursively return own aabb combining childeren's
|
||||
[NEW] Vec3: added `Vec3::add(float, float, float)` and `Vec3::setZero()`
|
||||
|
||||
[FIX] Audio: memory leak
|
||||
[FIX] Audio: crashed on iOS 5.1.1
|
||||
[FIX] C++: lag issue if `Director::setContentScaleFactor` is called frequently
|
||||
[FIX] C++: CDT builder is enabled by default in cpp template on Android
|
||||
[FIX] Label: shadow color is incorrect
|
||||
[FIX] MenuItem: crash if `MenuItem::onExit` is called multiple times
|
||||
[FIX] Particle3D: particles' rotation affect particle system's rotation
|
||||
[FIX] Sprite3D: memory leak
|
||||
[FIX] Vec3: use inline function to improve performance
|
||||
[FIX] WebView: loadHTMLString() can not work if it is invoked in the same frame of creating a webview on iOS
|
||||
|
||||
cocos2d-x-3.5 Mar.23 2015
|
||||
[NEW] EditBox: support Color4B
|
||||
|
|
|
@ -29,16 +29,16 @@ cmake_minimum_required(VERSION 2.8)
|
|||
# also from cmake's Modules dir, to not clash with per-project files.
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
|
||||
# Use new behaviour with cmake >= 3.0:
|
||||
# Use new behaviour with cmake >= 3.1:
|
||||
# Only interpret if() arguments as variables or keywords when unquoted.
|
||||
if(CMAKE_VERSION VERSION_GREATER 3)
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.1)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
project (Cocos2d-X)
|
||||
|
||||
# The version number
|
||||
set(COCOS2D_X_VERSION 3.5)
|
||||
set(COCOS2D_X_VERSION 3.6alpha0)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
|
||||
include(CocosBuildHelpers)
|
||||
|
|
|
@ -1154,6 +1154,7 @@
|
|||
1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; };
|
||||
29031E0719BFE8D400EFA1DF /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29031E0619BFE8D400EFA1DF /* libchipmunk.a */; };
|
||||
29031E0919BFE8DE00EFA1DF /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29031E0819BFE8DE00EFA1DF /* libchipmunk.a */; };
|
||||
2905E9CD1ACD3D8C00092DD2 /* libz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2905E9CC1ACD3D8C00092DD2 /* libz.a */; };
|
||||
292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; };
|
||||
292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; };
|
||||
292DB13F19B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; };
|
||||
|
@ -1799,7 +1800,6 @@
|
|||
B21770421977ECF8009EE11B /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B21770411977ECF8009EE11B /* ApplicationServices.framework */; };
|
||||
B21770451977ED14009EE11B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B21770431977ED07009EE11B /* Cocoa.framework */; };
|
||||
B21770471977ED34009EE11B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B21770461977ED34009EE11B /* QuartzCore.framework */; };
|
||||
B21770491977ED4C009EE11B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B21770481977ED4C009EE11B /* libz.dylib */; };
|
||||
B217704E1977ED9F009EE11B /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B217704C1977ED8B009EE11B /* libsqlite3.dylib */; };
|
||||
B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */; };
|
||||
B230ED7219B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */; };
|
||||
|
@ -2987,6 +2987,7 @@
|
|||
1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = "<group>"; };
|
||||
29031E0619BFE8D400EFA1DF /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/mac/libchipmunk.a; sourceTree = "<group>"; };
|
||||
29031E0819BFE8DE00EFA1DF /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/ios/libchipmunk.a; sourceTree = "<group>"; };
|
||||
2905E9CC1ACD3D8C00092DD2 /* libz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libz.a; path = ../external/zlib/prebuilt/mac/libz.a; sourceTree = "<group>"; };
|
||||
2905F9E918CF08D000240AA3 /* CocosGUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUI.cpp; sourceTree = "<group>"; };
|
||||
2905F9EA18CF08D000240AA3 /* CocosGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUI.h; sourceTree = "<group>"; };
|
||||
2905F9EB18CF08D000240AA3 /* GUIDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDefine.h; sourceTree = "<group>"; };
|
||||
|
@ -4028,10 +4029,10 @@
|
|||
files = (
|
||||
29031E0719BFE8D400EFA1DF /* libchipmunk.a in Frameworks */,
|
||||
15AE1C1A19AAE3C800C27E9E /* libwebsockets.a in Frameworks */,
|
||||
2905E9CD1ACD3D8C00092DD2 /* libz.a in Frameworks */,
|
||||
292F1A6B1A5250F700E479F8 /* libssl.a in Frameworks */,
|
||||
292F1A631A52447100E479F8 /* libcrypto.a in Frameworks */,
|
||||
B217704E1977ED9F009EE11B /* libsqlite3.dylib in Frameworks */,
|
||||
B21770491977ED4C009EE11B /* libz.dylib in Frameworks */,
|
||||
B21770471977ED34009EE11B /* QuartzCore.framework in Frameworks */,
|
||||
B21770451977ED14009EE11B /* Cocoa.framework in Frameworks */,
|
||||
B21770421977ECF8009EE11B /* ApplicationServices.framework in Frameworks */,
|
||||
|
@ -4129,6 +4130,7 @@
|
|||
1551A341158F2AB200E66CFE /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2905E9CC1ACD3D8C00092DD2 /* libz.a */,
|
||||
292F1A661A524F2700E479F8 /* libssl.dylib */,
|
||||
B217704C1977ED8B009EE11B /* libsqlite3.dylib */,
|
||||
B217704A1977ED55009EE11B /* libcurl.dylib */,
|
||||
|
@ -9353,10 +9355,11 @@
|
|||
"\"$(SRCROOT)/../external/websockets/prebuilt/mac\"",
|
||||
"\"$(SRCROOT)/../external/chipmunk/prebuilt/mac\"",
|
||||
"\"$(SRCROOT)/../external/curl/prebuilt/mac\"",
|
||||
"\"$(SRCROOT)/../external/zlib/prebuilt/mac\"",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
OTHER_LDFLAGS = "";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../external/curl/include/mac";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../external/curl/include/mac $(SRCROOT)/../external/freetype2/include/mac/freetype2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -9389,10 +9392,11 @@
|
|||
"\"$(SRCROOT)/../external/websockets/prebuilt/mac\"",
|
||||
"\"$(SRCROOT)/../external/chipmunk/prebuilt/mac\"",
|
||||
"\"$(SRCROOT)/../external/curl/prebuilt/mac\"",
|
||||
"\"$(SRCROOT)/../external/zlib/prebuilt/mac\"",
|
||||
);
|
||||
MACH_O_TYPE = staticlib;
|
||||
OTHER_LDFLAGS = "";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../external/curl/include/mac";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../external/curl/include/mac $(SRCROOT)/../external/freetype2/include/mac/freetype2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -9422,7 +9426,7 @@
|
|||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../external/freetype2/include/ios/freetype2";
|
||||
VALID_ARCHS = "arm64 armv7";
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -9454,7 +9458,7 @@
|
|||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../external/freetype2/include/ios/freetype2";
|
||||
VALID_ARCHS = "arm64 armv7";
|
||||
};
|
||||
name = Release;
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1502702D1AD3BDBC0089CD03 /* TerrainTest in Resources */ = {isa = PBXBuildFile; fileRef = B603F1B31AC8FBFB00A9579C /* TerrainTest */; };
|
||||
1502702E1AD3BDC90089CD03 /* TerrainTest in Resources */ = {isa = PBXBuildFile; fileRef = B603F1B31AC8FBFB00A9579C /* TerrainTest */; };
|
||||
150F918819DA409E00B89F57 /* lua_test_bindings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 150F918619DA409E00B89F57 /* lua_test_bindings.cpp */; };
|
||||
150F918919DA409F00B89F57 /* lua_test_bindings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 150F918619DA409E00B89F57 /* lua_test_bindings.cpp */; };
|
||||
15427B79198B879900DC375D /* libluacocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15EFA665198B33EE000C57D3 /* libluacocos2d iOS.a */; };
|
||||
|
@ -4376,6 +4378,7 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1502702E1AD3BDC90089CD03 /* TerrainTest in Resources */,
|
||||
157B08EC1A90864100B7BEA4 /* Particle3D in Resources */,
|
||||
15B13E5219F0FD4D008A1ADC /* Manifests in Resources */,
|
||||
156EAE071977D0BD00F53709 /* ActionTimeline in Resources */,
|
||||
|
@ -4421,6 +4424,7 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1502702D1AD3BDBC0089CD03 /* TerrainTest in Resources */,
|
||||
157B08ED1A90865600B7BEA4 /* Particle3D in Resources */,
|
||||
15B3709A19EE5EED00ABE682 /* Manifests in Resources */,
|
||||
15AECE0F195C1FDD00907DB0 /* cocosvideo.mp4 in Resources */,
|
||||
|
@ -5557,6 +5561,12 @@
|
|||
"$(inherited)",
|
||||
"$(SRCROOT)/../external/curl/prebuilt/ios",
|
||||
);
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator*][arch=x86_64]" = (
|
||||
"-pagezero_size",
|
||||
10000,
|
||||
"-image_base",
|
||||
100000000,
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
|
||||
|
@ -5578,6 +5588,12 @@
|
|||
"$(inherited)",
|
||||
"$(SRCROOT)/../external/curl/prebuilt/ios",
|
||||
);
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator*][arch=x86_64]" = (
|
||||
"-pagezero_size",
|
||||
10000,
|
||||
"-image_base",
|
||||
100000000,
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
|
||||
|
@ -5639,6 +5655,12 @@
|
|||
"$(SRCROOT)/../external/curl/prebuilt/ios",
|
||||
"/Users/cocos2d/MyWork/cocos2d-x-develop/external/curl/prebuilt/ios",
|
||||
);
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator*][arch=x86_64]" = (
|
||||
"-pagezero_size",
|
||||
10000,
|
||||
"-image_base",
|
||||
100000000,
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
|
||||
|
@ -5660,6 +5682,12 @@
|
|||
"$(SRCROOT)/../external/curl/prebuilt/ios",
|
||||
"/Users/cocos2d/MyWork/cocos2d-x-develop/external/curl/prebuilt/ios",
|
||||
);
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator*][arch=x86_64]" = (
|
||||
"-pagezero_size",
|
||||
10000,
|
||||
"-image_base",
|
||||
100000000,
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto";
|
||||
|
|
|
@ -58,7 +58,7 @@ set(_OpenalSoft_inc_paths AL)
|
|||
set(_OpenalSoft_libs OpenAL32)
|
||||
|
||||
set(_zlib_inc zlib.h)
|
||||
set(_zlib_libs libzlib)
|
||||
set(_zlib_libs z libzlib libz)
|
||||
|
||||
set(_fmod_prefix FMODEX)
|
||||
set(_fmod_inc fmod.h)
|
||||
|
@ -77,7 +77,7 @@ set(all_prebuilt_libs
|
|||
|
||||
|
||||
if(MACOSX)
|
||||
list(APPEND all_prebuilt_libs glfw3)
|
||||
list(APPEND all_prebuilt_libs glfw3 zlib)
|
||||
endif()
|
||||
|
||||
# We use MSVC instead of WINDOWS because it can be mingw that can't use our prebuilt libs
|
||||
|
|
|
@ -60,9 +60,9 @@ ActionCamera * ActionCamera::reverse() const
|
|||
|
||||
void ActionCamera::restore()
|
||||
{
|
||||
_center = Vec3(0, 0, 0);
|
||||
_eye = Vec3(0, 0, FLT_EPSILON);
|
||||
_up = Vec3(0, 1, 0);
|
||||
_center.setZero();
|
||||
_eye.set(0.0f, 0.0f, FLT_EPSILON);
|
||||
_up.set(0.0f, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
void ActionCamera::setEye(const Vec3& eye)
|
||||
|
@ -73,7 +73,7 @@ void ActionCamera::setEye(const Vec3& eye)
|
|||
|
||||
void ActionCamera::setEye(float x, float y, float z)
|
||||
{
|
||||
_eye = Vec3(x, y, z);
|
||||
_eye.set(x, y, z);
|
||||
updateTransform();
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,8 @@ static inline Vec2 v2fforangle(float _a_)
|
|||
|
||||
static inline Vec2 v2fnormalize(const Vec2 &p)
|
||||
{
|
||||
Vec2 r = Vec2(p.x, p.y).getNormalized();
|
||||
Vec2 r(p.x, p.y);
|
||||
r.normalize();
|
||||
return v2f(r.x, r.y);
|
||||
}
|
||||
|
||||
|
|
|
@ -752,41 +752,36 @@ void Label::enableOutline(const Color4B& outlineColor,int outlineSize /* = -1 */
|
|||
{
|
||||
CCASSERT(_currentLabelType == LabelType::STRING_TEXTURE || _currentLabelType == LabelType::TTF, "Only supported system font and TTF!");
|
||||
|
||||
_effectColor = outlineColor;
|
||||
_effectColorF.r = _effectColor.r / 255.0f;
|
||||
_effectColorF.g = _effectColor.g / 255.0f;
|
||||
_effectColorF.b = _effectColor.b / 255.0f;
|
||||
_effectColorF.a = _effectColor.a / 255.0f;
|
||||
|
||||
if (outlineSize > 0)
|
||||
if (outlineSize > 0 || _currLabelEffect == LabelEffect::OUTLINE)
|
||||
{
|
||||
_outlineSize = outlineSize;
|
||||
if (_currentLabelType == LabelType::TTF)
|
||||
{
|
||||
if (_fontConfig.outlineSize != outlineSize)
|
||||
{
|
||||
auto config = _fontConfig;
|
||||
config.outlineSize = outlineSize;
|
||||
setTTFConfig(config);
|
||||
updateShaderProgram();
|
||||
}
|
||||
}
|
||||
_effectColorF.r = outlineColor.r / 255.0f;
|
||||
_effectColorF.g = outlineColor.g / 255.0f;
|
||||
_effectColorF.b = outlineColor.b / 255.0f;
|
||||
_effectColorF.a = outlineColor.a / 255.0f;
|
||||
|
||||
if (outlineSize > 0 && _fontConfig.outlineSize != outlineSize)
|
||||
{
|
||||
_fontConfig.outlineSize = outlineSize;
|
||||
setTTFConfig(_fontConfig);
|
||||
}
|
||||
}
|
||||
else if (_effectColor != outlineColor || _outlineSize != outlineSize)
|
||||
{
|
||||
_effectColor = outlineColor;
|
||||
_outlineSize = outlineSize;
|
||||
_currLabelEffect = LabelEffect::OUTLINE;
|
||||
_contentDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const Size &offset /* = Size(2 ,-2)*/, int blurRadius /* = 0 */)
|
||||
{
|
||||
_shadowEnabled = true;
|
||||
_shadowDirty = true;
|
||||
|
||||
_shadowColor.r = shadowColor.r;
|
||||
_shadowColor.g = shadowColor.g;
|
||||
_shadowColor.b = shadowColor.b;
|
||||
_shadowOpacity = shadowColor.a / 255.0f;
|
||||
|
||||
auto contentScaleFactor = CC_CONTENT_SCALE_FACTOR();
|
||||
_shadowOffset.width = offset.width * contentScaleFactor;
|
||||
_shadowOffset.height = offset.height * contentScaleFactor;
|
||||
|
@ -795,22 +790,58 @@ void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const
|
|||
|
||||
if (_textSprite && _shadowNode)
|
||||
{
|
||||
_shadowNode->setColor(_shadowColor);
|
||||
_shadowNode->setOpacity(_shadowOpacity * _displayedOpacity);
|
||||
if (shadowColor != _shadowColor4F)
|
||||
{
|
||||
Node::removeChild(_shadowNode, true);
|
||||
_shadowNode = nullptr;
|
||||
createShadowSpriteForSystemFont();
|
||||
}
|
||||
else
|
||||
{
|
||||
_shadowNode->setPosition(_shadowOffset.width, _shadowOffset.height);
|
||||
}
|
||||
}
|
||||
|
||||
_shadowColor3B.r = shadowColor.r;
|
||||
_shadowColor3B.g = shadowColor.g;
|
||||
_shadowColor3B.b = shadowColor.b;
|
||||
_shadowOpacity = shadowColor.a;
|
||||
|
||||
_shadowColor4F.r = shadowColor.r / 255.0f;
|
||||
_shadowColor4F.g = shadowColor.g / 255.0f;
|
||||
_shadowColor4F.b = shadowColor.b / 255.0f;
|
||||
_shadowColor4F.a = shadowColor.a / 255.0f;
|
||||
}
|
||||
|
||||
void Label::disableEffect()
|
||||
{
|
||||
disableEffect(LabelEffect::GLOW);
|
||||
disableEffect(LabelEffect::OUTLINE);
|
||||
disableEffect(LabelEffect::SHADOW);
|
||||
}
|
||||
|
||||
void Label::disableEffect(LabelEffect effect)
|
||||
{
|
||||
switch (effect)
|
||||
{
|
||||
case cocos2d::LabelEffect::NORMAL:
|
||||
break;
|
||||
case cocos2d::LabelEffect::OUTLINE:
|
||||
if (_currLabelEffect == LabelEffect::OUTLINE)
|
||||
{
|
||||
if (_currentLabelType == LabelType::TTF)
|
||||
{
|
||||
_fontConfig.outlineSize = 0;
|
||||
setTTFConfig(_fontConfig);
|
||||
}
|
||||
|
||||
_currLabelEffect = LabelEffect::NORMAL;
|
||||
updateShaderProgram();
|
||||
_contentDirty = true;
|
||||
}
|
||||
break;
|
||||
case cocos2d::LabelEffect::SHADOW:
|
||||
if (_shadowEnabled)
|
||||
{
|
||||
_shadowEnabled = false;
|
||||
if (_shadowNode)
|
||||
{
|
||||
|
@ -818,6 +849,18 @@ void Label::disableEffect()
|
|||
_shadowNode = nullptr;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cocos2d::LabelEffect::GLOW:
|
||||
if (_currLabelEffect == LabelEffect::GLOW)
|
||||
{
|
||||
_currLabelEffect = LabelEffect::NORMAL;
|
||||
updateShaderProgram();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Label::setFontScale(float fontScale)
|
||||
{
|
||||
|
@ -827,8 +870,6 @@ void Label::setFontScale(float fontScale)
|
|||
|
||||
void Label::onDraw(const Mat4& transform, bool transformUpdated)
|
||||
{
|
||||
CC_PROFILER_START("Label - draw");
|
||||
|
||||
// Optimization: Fast Dispatch
|
||||
if( _batchNodes.size() == 1 && _textureAtlas->getTotalQuads() == 0 )
|
||||
{
|
||||
|
@ -839,21 +880,57 @@ void Label::onDraw(const Mat4& transform, bool transformUpdated)
|
|||
glprogram->use();
|
||||
GL::blendFunc( _blendFunc.src, _blendFunc.dst );
|
||||
|
||||
if (_shadowEnabled)
|
||||
{
|
||||
if (_currentLabelType == LabelType::TTF)
|
||||
{
|
||||
glprogram->setUniformLocationWith4f(_uniformTextColor,
|
||||
_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a);
|
||||
glprogram->setUniformLocationWith4f(_uniformEffectColor,
|
||||
_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a);
|
||||
|
||||
getGLProgram()->setUniformsForBuiltins(_shadowTransform);
|
||||
for (const auto &child : _children)
|
||||
{
|
||||
child->updateTransform();
|
||||
}
|
||||
for (const auto& batchNode : _batchNodes)
|
||||
{
|
||||
batchNode->getTextureAtlas()->drawQuads();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Color3B oldColor = _realColor;
|
||||
GLubyte oldOPacity = _displayedOpacity;
|
||||
_displayedOpacity = _shadowOpacity;
|
||||
setColor(_shadowColor3B);
|
||||
|
||||
getGLProgram()->setUniformsForBuiltins(_shadowTransform);
|
||||
for (const auto &child : _children)
|
||||
{
|
||||
child->updateTransform();
|
||||
}
|
||||
for (const auto& batchNode : _batchNodes)
|
||||
{
|
||||
batchNode->getTextureAtlas()->drawQuads();
|
||||
}
|
||||
|
||||
_displayedOpacity = oldOPacity;
|
||||
setColor(oldColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (_currentLabelType == LabelType::TTF)
|
||||
{
|
||||
glprogram->setUniformLocationWith4f(_uniformTextColor,
|
||||
_textColorF.r,_textColorF.g,_textColorF.b,_textColorF.a);
|
||||
}
|
||||
|
||||
if (_currLabelEffect == LabelEffect::OUTLINE || _currLabelEffect == LabelEffect::GLOW)
|
||||
{
|
||||
glprogram->setUniformLocationWith4f(_uniformEffectColor,
|
||||
_effectColorF.r, _effectColorF.g, _effectColorF.b, _effectColorF.a);
|
||||
}
|
||||
|
||||
if(_shadowEnabled && _shadowBlurRadius <= 0)
|
||||
{
|
||||
drawShadowWithoutBlur();
|
||||
}
|
||||
|
||||
glprogram->setUniformsForBuiltins(transform);
|
||||
|
@ -868,29 +945,6 @@ void Label::onDraw(const Mat4& transform, bool transformUpdated)
|
|||
{
|
||||
batchNode->getTextureAtlas()->drawQuads();
|
||||
}
|
||||
|
||||
CC_PROFILER_STOP("Label - draw");
|
||||
}
|
||||
|
||||
void Label::drawShadowWithoutBlur()
|
||||
{
|
||||
Color3B oldColor = _realColor;
|
||||
GLubyte oldOPacity = _displayedOpacity;
|
||||
_displayedOpacity = _shadowOpacity * _displayedOpacity;
|
||||
setColor(_shadowColor);
|
||||
|
||||
getGLProgram()->setUniformsForBuiltins(_shadowTransform);
|
||||
for(const auto &child: _children)
|
||||
{
|
||||
child->updateTransform();
|
||||
}
|
||||
for (const auto& batchNode:_batchNodes)
|
||||
{
|
||||
batchNode->getTextureAtlas()->drawQuads();
|
||||
}
|
||||
|
||||
_displayedOpacity = oldOPacity;
|
||||
setColor(oldColor);
|
||||
}
|
||||
|
||||
void Label::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
||||
|
@ -910,93 +964,10 @@ void Label::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
void Label::setCameraMask(unsigned short mask, bool applyChildren)
|
||||
{
|
||||
SpriteBatchNode::setCameraMask(mask, applyChildren);
|
||||
|
||||
if (_textSprite)
|
||||
{
|
||||
_textSprite->setCameraMask(mask, applyChildren);
|
||||
}
|
||||
if (_shadowNode)
|
||||
{
|
||||
_shadowNode->setCameraMask(mask, applyChildren);
|
||||
}
|
||||
}
|
||||
|
||||
void Label::createSpriteWithFontDefinition()
|
||||
void Label::createSpriteForSystemFont()
|
||||
{
|
||||
_currentLabelType = LabelType::STRING_TEXTURE;
|
||||
|
||||
auto texture = new (std::nothrow) Texture2D;
|
||||
texture->initWithString(_originalUTF8String.c_str(),_fontDefinition);
|
||||
|
||||
_textSprite = Sprite::createWithTexture(texture);
|
||||
//set camera mask using label's camera mask, because _textSprite may be null when setting camera mask to label
|
||||
_textSprite->setCameraMask(getCameraMask());
|
||||
_textSprite->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
|
||||
this->setContentSize(_textSprite->getContentSize());
|
||||
texture->release();
|
||||
if (_blendFuncDirty)
|
||||
{
|
||||
_textSprite->setBlendFunc(_blendFunc);
|
||||
}
|
||||
|
||||
Node::addChild(_textSprite,0,Node::INVALID_TAG);
|
||||
|
||||
_textSprite->updateDisplayedColor(_displayedColor);
|
||||
_textSprite->updateDisplayedOpacity(_displayedOpacity);
|
||||
}
|
||||
|
||||
void Label::setFontDefinition(const FontDefinition& textDefinition)
|
||||
{
|
||||
_fontDefinition = textDefinition;
|
||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)
|
||||
if (_fontDefinition._stroke._strokeEnabled)
|
||||
{
|
||||
CCLOGERROR("Currently only supported on iOS and Android!");
|
||||
}
|
||||
_fontDefinition._stroke._strokeEnabled = false;
|
||||
#endif
|
||||
if (_fontDefinition._shadow._shadowEnabled)
|
||||
{
|
||||
_fontDefinition._shadow._shadowEnabled = false;
|
||||
enableShadow(Color4B(0,0,0,255 * _fontDefinition._shadow._shadowOpacity),_fontDefinition._shadow._shadowOffset,_fontDefinition._shadow._shadowBlur);
|
||||
}
|
||||
_compatibleMode = true;
|
||||
}
|
||||
|
||||
void Label::updateContent()
|
||||
{
|
||||
std::u16string utf16String;
|
||||
if (StringUtils::UTF8ToUTF16(_originalUTF8String, utf16String))
|
||||
{
|
||||
_currentUTF16String = utf16String;
|
||||
}
|
||||
|
||||
computeStringNumLines();
|
||||
if (_fontAtlas)
|
||||
{
|
||||
computeHorizontalKernings(_currentUTF16String);
|
||||
}
|
||||
|
||||
if (_textSprite)
|
||||
{
|
||||
Node::removeChild(_textSprite,true);
|
||||
_textSprite = nullptr;
|
||||
if (_shadowNode)
|
||||
{
|
||||
Node::removeChild(_shadowNode,true);
|
||||
_shadowNode = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (_fontAtlas)
|
||||
{
|
||||
alignText();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_compatibleMode)
|
||||
{
|
||||
_fontDefinition._fontName = _systemFont;
|
||||
|
@ -1038,12 +1009,100 @@ void Label::updateContent()
|
|||
#endif
|
||||
}
|
||||
|
||||
createSpriteWithFontDefinition();
|
||||
}
|
||||
_contentDirty = false;
|
||||
auto texture = new (std::nothrow) Texture2D;
|
||||
texture->initWithString(_originalUTF8String.c_str(), _fontDefinition);
|
||||
|
||||
_textSprite = Sprite::createWithTexture(texture);
|
||||
//set camera mask using label's camera mask, because _textSprite may be null when setting camera mask to label
|
||||
_textSprite->setCameraMask(getCameraMask());
|
||||
_textSprite->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
|
||||
this->setContentSize(_textSprite->getContentSize());
|
||||
texture->release();
|
||||
if (_blendFuncDirty)
|
||||
{
|
||||
_textSprite->setBlendFunc(_blendFunc);
|
||||
}
|
||||
|
||||
void Label::updateFont()
|
||||
Node::addChild(_textSprite, 0, Node::INVALID_TAG);
|
||||
|
||||
_textSprite->updateDisplayedColor(_displayedColor);
|
||||
_textSprite->updateDisplayedOpacity(_displayedOpacity);
|
||||
}
|
||||
|
||||
void Label::createShadowSpriteForSystemFont()
|
||||
{
|
||||
if (!_fontDefinition._stroke._strokeEnabled && _fontDefinition._fontFillColor == _shadowColor4F
|
||||
&& (_fontDefinition._fontAlpha == _shadowColor4F.a * 255))
|
||||
{
|
||||
_shadowNode = Sprite::createWithTexture(_textSprite->getTexture());
|
||||
}
|
||||
else
|
||||
{
|
||||
auto shadowFontDefinition = _fontDefinition;
|
||||
shadowFontDefinition._fontFillColor.r = _shadowColor4F.r * 255;
|
||||
shadowFontDefinition._fontFillColor.g = _shadowColor4F.g * 255;
|
||||
shadowFontDefinition._fontFillColor.b = _shadowColor4F.b * 255;
|
||||
shadowFontDefinition._fontAlpha = _shadowColor4F.a * 255;
|
||||
|
||||
shadowFontDefinition._stroke._strokeColor = shadowFontDefinition._fontFillColor;
|
||||
shadowFontDefinition._stroke._strokeAlpha = shadowFontDefinition._fontAlpha;
|
||||
|
||||
auto texture = new (std::nothrow) Texture2D;
|
||||
texture->initWithString(_originalUTF8String.c_str(), shadowFontDefinition);
|
||||
_shadowNode = Sprite::createWithTexture(texture);
|
||||
texture->release();
|
||||
}
|
||||
|
||||
if (_shadowNode)
|
||||
{
|
||||
if (_blendFuncDirty)
|
||||
{
|
||||
_shadowNode->setBlendFunc(_blendFunc);
|
||||
}
|
||||
_shadowNode->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
|
||||
_shadowNode->setPosition(_shadowOffset.width, _shadowOffset.height);
|
||||
Node::addChild(_shadowNode, 0, Node::INVALID_TAG);
|
||||
|
||||
_shadowNode->updateDisplayedColor(_displayedColor);
|
||||
_shadowNode->updateDisplayedOpacity(_displayedOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
void Label::setCameraMask(unsigned short mask, bool applyChildren)
|
||||
{
|
||||
SpriteBatchNode::setCameraMask(mask, applyChildren);
|
||||
|
||||
if (_textSprite)
|
||||
{
|
||||
_textSprite->setCameraMask(mask, applyChildren);
|
||||
}
|
||||
if (_shadowNode)
|
||||
{
|
||||
_shadowNode->setCameraMask(mask, applyChildren);
|
||||
}
|
||||
}
|
||||
|
||||
void Label::setFontDefinition(const FontDefinition& textDefinition)
|
||||
{
|
||||
_fontDefinition = textDefinition;
|
||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)
|
||||
if (_fontDefinition._stroke._strokeEnabled)
|
||||
{
|
||||
CCLOGERROR("Currently only supported on iOS and Android!");
|
||||
}
|
||||
_fontDefinition._stroke._strokeEnabled = false;
|
||||
#endif
|
||||
if (_fontDefinition._shadow._shadowEnabled)
|
||||
{
|
||||
_fontDefinition._shadow._shadowEnabled = false;
|
||||
enableShadow(Color4B(0,0,0,255 * _fontDefinition._shadow._shadowOpacity),_fontDefinition._shadow._shadowOffset,_fontDefinition._shadow._shadowBlur);
|
||||
}
|
||||
_compatibleMode = true;
|
||||
}
|
||||
|
||||
void Label::updateContent()
|
||||
{
|
||||
if (_systemFontDirty)
|
||||
{
|
||||
if (_fontAtlas)
|
||||
{
|
||||
|
@ -1054,41 +1113,41 @@ void Label::updateFont()
|
|||
_fontAtlas = nullptr;
|
||||
}
|
||||
|
||||
_contentDirty = true;
|
||||
_systemFontDirty = false;
|
||||
}
|
||||
|
||||
void Label::drawTextSprite(Renderer *renderer, uint32_t parentFlags)
|
||||
if (_textSprite)
|
||||
{
|
||||
if (_fontDefinition._fontFillColor.r != _textColor.r || _fontDefinition._fontFillColor.g != _textColor.g
|
||||
|| _fontDefinition._fontFillColor.b != _textColor.b)
|
||||
Node::removeChild(_textSprite, true);
|
||||
_textSprite = nullptr;
|
||||
if (_shadowNode)
|
||||
{
|
||||
updateContent();
|
||||
Node::removeChild(_shadowNode, true);
|
||||
_shadowNode = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (_shadowEnabled && _shadowNode == nullptr)
|
||||
if (_fontAtlas)
|
||||
{
|
||||
_shadowNode = Sprite::createWithTexture(_textSprite->getTexture());
|
||||
if (_shadowNode)
|
||||
std::u16string utf16String;
|
||||
if (StringUtils::UTF8ToUTF16(_originalUTF8String, utf16String))
|
||||
{
|
||||
if (_blendFuncDirty)
|
||||
{
|
||||
_shadowNode->setBlendFunc(_blendFunc);
|
||||
_currentUTF16String = utf16String;
|
||||
}
|
||||
//set camera mask using label's mask. Because _shadowNode may be null when setting the label's camera mask
|
||||
_shadowNode->setCameraMask(getCameraMask());
|
||||
_shadowNode->setAnchorPoint(Vec2::ANCHOR_BOTTOM_LEFT);
|
||||
_shadowNode->setColor(_shadowColor);
|
||||
_shadowNode->setOpacity(_shadowOpacity * _displayedOpacity);
|
||||
_shadowNode->setPosition(_shadowOffset.width, _shadowOffset.height);
|
||||
Node::addChild(_shadowNode,0,Node::INVALID_TAG);
|
||||
|
||||
computeStringNumLines();
|
||||
computeHorizontalKernings(_currentUTF16String);
|
||||
alignText();
|
||||
}
|
||||
else
|
||||
{
|
||||
createSpriteForSystemFont();
|
||||
if (_shadowEnabled)
|
||||
{
|
||||
createShadowSpriteForSystemFont();
|
||||
}
|
||||
}
|
||||
if (_shadowNode)
|
||||
{
|
||||
_shadowNode->visit(renderer, _modelViewTransform, parentFlags);
|
||||
}
|
||||
_textSprite->visit(renderer, _modelViewTransform, parentFlags);
|
||||
_contentDirty = false;
|
||||
}
|
||||
|
||||
void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
|
||||
|
@ -1097,11 +1156,8 @@ void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t pare
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (_systemFontDirty)
|
||||
{
|
||||
updateFont();
|
||||
}
|
||||
if (_contentDirty)
|
||||
|
||||
if (_systemFontDirty || _contentDirty)
|
||||
{
|
||||
updateContent();
|
||||
}
|
||||
|
@ -1140,7 +1196,11 @@ void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t pare
|
|||
|
||||
if (_textSprite)
|
||||
{
|
||||
drawTextSprite(renderer, flags);
|
||||
if (_shadowNode)
|
||||
{
|
||||
_shadowNode->visit(renderer, _modelViewTransform, parentFlags);
|
||||
}
|
||||
_textSprite->visit(renderer, _modelViewTransform, parentFlags);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1343,6 +1403,15 @@ void Label::setTextColor(const Color4B &color)
|
|||
_textColorF.g = _textColor.g / 255.0f;
|
||||
_textColorF.b = _textColor.b / 255.0f;
|
||||
_textColorF.a = _textColor.a / 255.0f;
|
||||
|
||||
if (_currentLabelType == LabelType::STRING_TEXTURE)
|
||||
{
|
||||
if (_fontDefinition._fontFillColor.r != _textColor.r || _fontDefinition._fontFillColor.g != _textColor.g
|
||||
|| _fontDefinition._fontFillColor.b != _textColor.b || _fontDefinition._fontAlpha != _textColor.a)
|
||||
{
|
||||
_contentDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Label::updateColor()
|
||||
|
@ -1390,11 +1459,7 @@ std::string Label::getDescription() const
|
|||
|
||||
const Size& Label::getContentSize() const
|
||||
{
|
||||
if (_systemFontDirty)
|
||||
{
|
||||
const_cast<Label*>(this)->updateFont();
|
||||
}
|
||||
if (_contentDirty)
|
||||
if (_systemFontDirty || _contentDirty)
|
||||
{
|
||||
const_cast<Label*>(this)->updateContent();
|
||||
}
|
||||
|
|
|
@ -335,6 +335,13 @@ public:
|
|||
*/
|
||||
virtual void disableEffect();
|
||||
|
||||
/**
|
||||
* Disable effect to Label.
|
||||
*
|
||||
* @see `LabelEffect`
|
||||
*/
|
||||
virtual void disableEffect(LabelEffect effect);
|
||||
|
||||
/** Sets the Label's text horizontal alignment.*/
|
||||
void setAlignment(TextHAlignment hAlignment) { setAlignment(hAlignment,_vAlignment);}
|
||||
|
||||
|
@ -528,13 +535,10 @@ protected:
|
|||
|
||||
virtual void updateShaderProgram();
|
||||
|
||||
void drawShadowWithoutBlur();
|
||||
void createSpriteForSystemFont();
|
||||
|
||||
void drawTextSprite(Renderer *renderer, uint32_t parentFlags);
|
||||
void createShadowSpriteForSystemFont();
|
||||
|
||||
void createSpriteWithFontDefinition();
|
||||
|
||||
void updateFont();
|
||||
void reset();
|
||||
|
||||
std::string _bmFontPath;
|
||||
|
@ -597,8 +601,9 @@ protected:
|
|||
Size _shadowOffset;
|
||||
int _shadowBlurRadius;
|
||||
Mat4 _shadowTransform;
|
||||
Color3B _shadowColor;
|
||||
float _shadowOpacity;
|
||||
Color4F _shadowColor4F;
|
||||
Color3B _shadowColor3B;
|
||||
GLubyte _shadowOpacity;
|
||||
Sprite* _shadowNode;
|
||||
|
||||
int _outlineSize;
|
||||
|
|
|
@ -367,20 +367,21 @@ void Sprite::setTextureRect(const Rect& rect, bool rotated, const Size& untrimme
|
|||
setVertexRect(rect);
|
||||
setTextureCoords(rect);
|
||||
|
||||
Vec2 relativeOffset = _unflippedOffsetPositionFromCenter;
|
||||
float relativeOffsetX = _unflippedOffsetPositionFromCenter.x;
|
||||
float relativeOffsetY = _unflippedOffsetPositionFromCenter.y;
|
||||
|
||||
// issue #732
|
||||
if (_flippedX)
|
||||
{
|
||||
relativeOffset.x = -relativeOffset.x;
|
||||
relativeOffsetX = -relativeOffsetX;
|
||||
}
|
||||
if (_flippedY)
|
||||
{
|
||||
relativeOffset.y = -relativeOffset.y;
|
||||
relativeOffsetY = -relativeOffsetY;
|
||||
}
|
||||
|
||||
_offsetPosition.x = relativeOffset.x + (_contentSize.width - _rect.size.width) / 2;
|
||||
_offsetPosition.y = relativeOffset.y + (_contentSize.height - _rect.size.height) / 2;
|
||||
_offsetPosition.x = relativeOffsetX + (_contentSize.width - _rect.size.width) / 2;
|
||||
_offsetPosition.y = relativeOffsetY + (_contentSize.height - _rect.size.height) / 2;
|
||||
|
||||
// rendering using batch node
|
||||
if (_batchNode)
|
||||
|
@ -393,16 +394,16 @@ void Sprite::setTextureRect(const Rect& rect, bool rotated, const Size& untrimme
|
|||
// self rendering
|
||||
|
||||
// Atlas: Vertex
|
||||
float x1 = 0 + _offsetPosition.x;
|
||||
float y1 = 0 + _offsetPosition.y;
|
||||
float x1 = 0.0f + _offsetPosition.x;
|
||||
float y1 = 0.0f + _offsetPosition.y;
|
||||
float x2 = x1 + _rect.size.width;
|
||||
float y2 = y1 + _rect.size.height;
|
||||
|
||||
// Don't update Z.
|
||||
_quad.bl.vertices = Vec3(x1, y1, 0);
|
||||
_quad.br.vertices = Vec3(x2, y1, 0);
|
||||
_quad.tl.vertices = Vec3(x1, y2, 0);
|
||||
_quad.tr.vertices = Vec3(x2, y2, 0);
|
||||
_quad.bl.vertices.set(x1, y1, 0.0f);
|
||||
_quad.br.vertices.set(x2, y1, 0.0f);
|
||||
_quad.tl.vertices.set(x1, y2, 0.0f);
|
||||
_quad.tr.vertices.set(x2, y2, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -507,7 +508,10 @@ void Sprite::updateTransform(void)
|
|||
// If it is not visible, or one of its ancestors is not visible, then do nothing:
|
||||
if( !_visible || ( _parent && _parent != _batchNode && static_cast<Sprite*>(_parent)->_shouldBeHidden) )
|
||||
{
|
||||
_quad.br.vertices = _quad.tl.vertices = _quad.tr.vertices = _quad.bl.vertices = Vec3(0,0,0);
|
||||
_quad.br.vertices.setZero();
|
||||
_quad.tl.vertices.setZero();
|
||||
_quad.tr.vertices.setZero();
|
||||
_quad.bl.vertices.setZero();
|
||||
_shouldBeHidden = true;
|
||||
}
|
||||
else
|
||||
|
@ -556,10 +560,10 @@ void Sprite::updateTransform(void)
|
|||
float dx = x1 * cr - y2 * sr2 + x;
|
||||
float dy = x1 * sr + y2 * cr2 + y;
|
||||
|
||||
_quad.bl.vertices = Vec3( RENDER_IN_SUBPIXEL(ax), RENDER_IN_SUBPIXEL(ay), _positionZ );
|
||||
_quad.br.vertices = Vec3( RENDER_IN_SUBPIXEL(bx), RENDER_IN_SUBPIXEL(by), _positionZ );
|
||||
_quad.tl.vertices = Vec3( RENDER_IN_SUBPIXEL(dx), RENDER_IN_SUBPIXEL(dy), _positionZ );
|
||||
_quad.tr.vertices = Vec3( RENDER_IN_SUBPIXEL(cx), RENDER_IN_SUBPIXEL(cy), _positionZ );
|
||||
_quad.bl.vertices.set(RENDER_IN_SUBPIXEL(ax), RENDER_IN_SUBPIXEL(ay), _positionZ);
|
||||
_quad.br.vertices.set(RENDER_IN_SUBPIXEL(bx), RENDER_IN_SUBPIXEL(by), _positionZ);
|
||||
_quad.tl.vertices.set(RENDER_IN_SUBPIXEL(dx), RENDER_IN_SUBPIXEL(dy), _positionZ);
|
||||
_quad.tr.vertices.set(RENDER_IN_SUBPIXEL(cx), RENDER_IN_SUBPIXEL(cy), _positionZ);
|
||||
}
|
||||
|
||||
// MARMALADE CHANGE: ADDED CHECK FOR nullptr, TO PERMIT SPRITES WITH NO BATCH NODE / TEXTURE ATLAS
|
||||
|
@ -1016,10 +1020,10 @@ void Sprite::setBatchNode(SpriteBatchNode *spriteBatchNode)
|
|||
float y1 = _offsetPosition.y;
|
||||
float x2 = x1 + _rect.size.width;
|
||||
float y2 = y1 + _rect.size.height;
|
||||
_quad.bl.vertices = Vec3( x1, y1, 0 );
|
||||
_quad.br.vertices = Vec3( x2, y1, 0 );
|
||||
_quad.tl.vertices = Vec3( x1, y2, 0 );
|
||||
_quad.tr.vertices = Vec3( x2, y2, 0 );
|
||||
_quad.bl.vertices.set( x1, y1, 0 );
|
||||
_quad.br.vertices.set(x2, y1, 0);
|
||||
_quad.tl.vertices.set(x1, y2, 0);
|
||||
_quad.tr.vertices.set(x2, y2, 0);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ Vec2 TMXLayer::calculateLayerOffset(const Vec2& pos)
|
|||
case TMXOrientationStaggered:
|
||||
{
|
||||
float diffX = 0;
|
||||
if ((int)abs(pos.y) % 2 == 1)
|
||||
if ((int)std::abs(pos.y) % 2 == 1)
|
||||
{
|
||||
diffX = _mapTileSize.width/2;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES;$(EngineRoot)external\freetype2\include\win32\freetype2;$(EngineRoot)external\freetype2\include\win32\</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ProjectReference>
|
||||
|
|
|
@ -480,7 +480,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
|
|||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\CCActionFrame.cpp" />
|
||||
|
@ -1036,7 +1035,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
|
|||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimelineMacro.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.h" />
|
||||
|
|
|
@ -1240,7 +1240,6 @@
|
|||
<ClCompile Include="..\audio\win32\AudioPlayer.cpp">
|
||||
<Filter>audioengine</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClCompile>
|
||||
|
@ -2944,7 +2943,6 @@
|
|||
<ClInclude Include="..\audio\win32\AudioPlayer.h">
|
||||
<Filter>audioengine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.h">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -341,7 +341,6 @@
|
|||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCFrame.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCNodeReader.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCTimeLine.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCTimelineMacro.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CSLoader.h" />
|
||||
|
@ -914,7 +913,6 @@
|
|||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCFrame.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCNodeReader.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCTimeLine.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\CCActionFrame.cpp" />
|
||||
|
|
|
@ -703,9 +703,6 @@
|
|||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCFrame.h">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCNodeReader.h">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCTimeLine.h">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClInclude>
|
||||
|
@ -2344,9 +2341,6 @@
|
|||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCFrame.cpp">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCNodeReader.cpp">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\..\..\editor-support\cocostudio\ActionTimeline\CCTimeLine.cpp">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -502,7 +502,6 @@
|
|||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimelineMacro.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.h" />
|
||||
|
@ -1147,7 +1146,6 @@
|
|||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\CCActionFrame.cpp" />
|
||||
|
|
|
@ -962,9 +962,6 @@
|
|||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.cpp">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.cpp">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.cpp">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClCompile>
|
||||
|
@ -2633,9 +2630,6 @@
|
|||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.h">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCNodeReader.h">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.h">
|
||||
<Filter>cocostudio\TimelineAction</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\wp8;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype;$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\wp8;$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WP8;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
|
@ -33,7 +33,7 @@ void AnimationCurve<componentSize>::evaluate(float time, float* dst, EvaluateTyp
|
|||
break;
|
||||
case EvaluateType::INT_NEAR:
|
||||
{
|
||||
float* src = t > 0.5f ? toValue : fromValue;
|
||||
float* src = fabs(t) > 0.5f ? toValue : fromValue;
|
||||
memcpy(dst, src, _componentSizeByte);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -173,7 +173,7 @@ bool BillBoard::calculateBillbaordTransform()
|
|||
switch (_mode)
|
||||
{
|
||||
case Mode::VIEW_POINT_ORIENTED:
|
||||
camDir = Vec3(localToWorld.m[12] - camWorldMat.m[12], localToWorld.m[13] - camWorldMat.m[13], localToWorld.m[14] - camWorldMat.m[14]);
|
||||
camDir.set(localToWorld.m[12] - camWorldMat.m[12], localToWorld.m[13] - camWorldMat.m[13], localToWorld.m[14] - camWorldMat.m[14]);
|
||||
break;
|
||||
case Mode::VIEW_PLANE_ORIENTED:
|
||||
camWorldMat.transformVector(Vec3(0.0f, 0.0f, -1.0f), &camDir);
|
||||
|
@ -196,7 +196,7 @@ bool BillBoard::calculateBillbaordTransform()
|
|||
Mat4 rotationMatrix;
|
||||
rotationMatrix.setIdentity();
|
||||
|
||||
Vec3 upAxis = Vec3(rotationMatrix.m[4],rotationMatrix.m[5],rotationMatrix.m[6]);
|
||||
Vec3 upAxis(rotationMatrix.m[4],rotationMatrix.m[5],rotationMatrix.m[6]);
|
||||
Vec3 x, y;
|
||||
camWorldMat.transformVector(upAxis, &y);
|
||||
Vec3::cross(camDir, y, &x);
|
||||
|
|
|
@ -751,8 +751,8 @@ bool Bundle3D::loadMeshDatasJson(MeshDatas& meshdatas)
|
|||
const rapidjson::Value& mesh_part_aabb = mesh_part[AABBS];
|
||||
if (mesh_part.HasMember(AABBS) && mesh_part_aabb.Size() == 6)
|
||||
{
|
||||
Vec3 min = Vec3(mesh_part_aabb[(rapidjson::SizeType)0].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)1].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)2].GetDouble());
|
||||
Vec3 max = Vec3(mesh_part_aabb[(rapidjson::SizeType)3].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)4].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)5].GetDouble());
|
||||
Vec3 min(mesh_part_aabb[(rapidjson::SizeType)0].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)1].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)2].GetDouble());
|
||||
Vec3 max(mesh_part_aabb[(rapidjson::SizeType)3].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)4].GetDouble(), mesh_part_aabb[(rapidjson::SizeType)5].GetDouble());
|
||||
meshData->subMeshAABB.push_back(AABB(min, max));
|
||||
}
|
||||
else
|
||||
|
@ -1436,7 +1436,7 @@ bool Bundle3D::loadAnimationDataJson(const std::string& id, Animation3DData* ani
|
|||
{
|
||||
const rapidjson::Value& bone_keyframe_translation = bone_keyframe[TRANSLATION];
|
||||
float keytime = bone_keyframe[KEYTIME].GetDouble();
|
||||
Vec3 val = Vec3(bone_keyframe_translation[(rapidjson::SizeType)0].GetDouble(), bone_keyframe_translation[1].GetDouble(), bone_keyframe_translation[2].GetDouble());
|
||||
Vec3 val(bone_keyframe_translation[(rapidjson::SizeType)0].GetDouble(), bone_keyframe_translation[1].GetDouble(), bone_keyframe_translation[2].GetDouble());
|
||||
animationdata->_translationKeys[bone_name].push_back(Animation3DData::Vec3Key(keytime,val));
|
||||
}
|
||||
|
||||
|
@ -1452,7 +1452,7 @@ bool Bundle3D::loadAnimationDataJson(const std::string& id, Animation3DData* ani
|
|||
{
|
||||
const rapidjson::Value& bone_keyframe_scale = bone_keyframe[SCALE];
|
||||
float keytime = bone_keyframe[KEYTIME].GetDouble();
|
||||
Vec3 val = Vec3(bone_keyframe_scale[(rapidjson::SizeType)0].GetDouble(), bone_keyframe_scale[1].GetDouble(), bone_keyframe_scale[2].GetDouble());
|
||||
Vec3 val(bone_keyframe_scale[(rapidjson::SizeType)0].GetDouble(), bone_keyframe_scale[1].GetDouble(), bone_keyframe_scale[2].GetDouble());
|
||||
animationdata->_scaleKeys[bone_name].push_back(Animation3DData::Vec3Key(keytime,val));
|
||||
}
|
||||
}
|
||||
|
@ -2104,7 +2104,7 @@ cocos2d::AABB Bundle3D::calculateAABB( const std::vector<float>& vertex, int str
|
|||
stride /= 4;
|
||||
for (const auto& it : index)
|
||||
{
|
||||
Vec3 point = Vec3(vertex[it * stride ], vertex[ it * stride + 1], vertex[it * stride + 2 ]);
|
||||
Vec3 point(vertex[it * stride], vertex[it * stride + 1], vertex[it * stride + 2]);
|
||||
aabb.updateMinMax(&point, 1);
|
||||
}
|
||||
return aabb;
|
||||
|
|
|
@ -209,9 +209,9 @@ OBB::OBB(const AABB& aabb)
|
|||
|
||||
_center = (aabb._min + aabb._max);
|
||||
_center.scale(0.5f);
|
||||
_xAxis = Vec3(1.0f, 0.0f, 0.0f);
|
||||
_yAxis = Vec3(0.0f, 1.0f, 0.0f);
|
||||
_zAxis = Vec3(0.0f, 0.0f, 1.0f);
|
||||
_xAxis.set(1.0f, 0.0f, 0.0f);
|
||||
_yAxis.set(0.0f, 1.0f, 0.0f);
|
||||
_zAxis.set(0.0f, 0.0f, 1.0f);
|
||||
|
||||
_extents = aabb._max - aabb._min;
|
||||
_extents.scale(0.5f);
|
||||
|
@ -249,9 +249,9 @@ OBB::OBB(const Vec3* verts, int num)
|
|||
|
||||
matTransform.transpose();
|
||||
|
||||
_xAxis = Vec3(matTransform.m[0], matTransform.m[1], matTransform.m[2]);
|
||||
_yAxis = Vec3(matTransform.m[4], matTransform.m[5], matTransform.m[6]);
|
||||
_zAxis = Vec3(matTransform.m[8], matTransform.m[9], matTransform.m[10]);
|
||||
_xAxis.set(matTransform.m[0], matTransform.m[1], matTransform.m[2]);
|
||||
_yAxis.set(matTransform.m[4], matTransform.m[5], matTransform.m[6]);
|
||||
_zAxis.set(matTransform.m[8], matTransform.m[9], matTransform.m[10]);
|
||||
|
||||
_center = 0.5f * (vecMax + vecMin);
|
||||
_center *= matTransform;
|
||||
|
|
|
@ -820,6 +820,22 @@ const BlendFunc& Sprite3D::getBlendFunc() const
|
|||
return _blend;
|
||||
}
|
||||
|
||||
AABB Sprite3D::getAABBRecursively()
|
||||
{
|
||||
AABB aabb;
|
||||
const Vector<Node*>& children = getChildren();
|
||||
for (const auto& iter : children)
|
||||
{
|
||||
Sprite3D* child = dynamic_cast<Sprite3D*>(iter);
|
||||
if(child)
|
||||
{
|
||||
aabb.merge(child->getAABBRecursively());
|
||||
}
|
||||
}
|
||||
aabb.merge(getAABB());
|
||||
return aabb;
|
||||
}
|
||||
|
||||
const AABB& Sprite3D::getAABB() const
|
||||
{
|
||||
Mat4 nodeToWorldTransform(getNodeToWorldTransform());
|
||||
|
@ -832,6 +848,8 @@ const AABB& Sprite3D::getAABB() const
|
|||
else
|
||||
{
|
||||
_aabb.reset();
|
||||
if (_meshes.size())
|
||||
{
|
||||
Mat4 transform(nodeToWorldTransform);
|
||||
for (const auto& it : _meshes) {
|
||||
if (it->isVisible())
|
||||
|
@ -842,6 +860,7 @@ const AABB& Sprite3D::getAABB() const
|
|||
_nodeToWorldTransform = nodeToWorldTransform;
|
||||
_aabbDirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
return _aabb;
|
||||
}
|
||||
|
|
|
@ -135,6 +135,14 @@ public:
|
|||
*/
|
||||
const AABB& getAABB() const;
|
||||
|
||||
/*
|
||||
* Get AABB Recursively
|
||||
* Because some times we may have an empty Sprite3D Node as parent, but
|
||||
* the Sprite3D don't contain any meshes, so getAABB()
|
||||
* will return a wrong value at that time.
|
||||
*/
|
||||
AABB getAABBRecursively();
|
||||
|
||||
/**
|
||||
* Executes an action, and returns the action that is executed. For Sprite3D special logic are needed to take care of Fading.
|
||||
*
|
||||
|
|
|
@ -221,7 +221,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) \
|
|||
|
||||
LOCAL_EXPORT_LDLIBS := -lGLESv2 \
|
||||
-llog \
|
||||
-lz \
|
||||
-landroid
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := cocos_freetype2_static
|
||||
|
@ -230,6 +229,7 @@ LOCAL_STATIC_LIBRARIES += cocos_jpeg_static
|
|||
LOCAL_STATIC_LIBRARIES += cocos_tiff_static
|
||||
LOCAL_STATIC_LIBRARIES += cocos_webp_static
|
||||
LOCAL_STATIC_LIBRARIES += cocos_chipmunk_static
|
||||
LOCAL_STATIC_LIBRARIES += cocos_zlib_static
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dxandroid_static
|
||||
|
||||
|
@ -260,6 +260,7 @@ include $(BUILD_STATIC_LIBRARY)
|
|||
$(call import-module,freetype2/prebuilt/android)
|
||||
$(call import-module,platform/android)
|
||||
$(call import-module,png/prebuilt/android)
|
||||
$(call import-module,zlib/prebuilt/android)
|
||||
$(call import-module,jpeg/prebuilt/android)
|
||||
$(call import-module,tiff/prebuilt/android)
|
||||
$(call import-module,webp/prebuilt/android)
|
||||
|
|
|
@ -141,12 +141,32 @@ namespace cocos2d {
|
|||
|
||||
@implementation AudioEngineSessionHandler
|
||||
|
||||
void AudioEngineInterruptionListenerCallback(void* user_data, UInt32 interruption_state)
|
||||
{
|
||||
if (kAudioSessionBeginInterruption == interruption_state)
|
||||
{
|
||||
alcMakeContextCurrent(nullptr);
|
||||
}
|
||||
else if (kAudioSessionEndInterruption == interruption_state)
|
||||
{
|
||||
OSStatus result = AudioSessionSetActive(true);
|
||||
if (result) NSLog(@"Error setting audio session active! %d\n", result);
|
||||
|
||||
alcMakeContextCurrent(s_ALContext);
|
||||
}
|
||||
}
|
||||
|
||||
-(id) init
|
||||
{
|
||||
if (self == [super init])
|
||||
{
|
||||
if ([[[UIDevice currentDevice] systemVersion] intValue] > 5) {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]];
|
||||
}
|
||||
else {
|
||||
AudioSessionInitialize(NULL, NULL, AudioEngineInterruptionListenerCallback, self);
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ NS_CC_BEGIN
|
|||
|
||||
CC_DLL const char* cocos2dVersion()
|
||||
{
|
||||
return "cocos2d-x 3.5";
|
||||
return "cocos2d-x 3.6alpha0";
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
|||
|
||||
// 0x00 HI ME LO
|
||||
// 00 03 03 00
|
||||
#define COCOS2D_VERSION 0x00030500
|
||||
#define COCOS2D_VERSION 0x00030600
|
||||
|
||||
//
|
||||
// all cocos2d include files
|
||||
|
|
|
@ -578,19 +578,19 @@ Vec4* kmVec4Transform(Vec4* pOut, const Vec4* pV, const Mat4* pM)
|
|||
return pOut;
|
||||
}
|
||||
|
||||
const Vec3 KM_VEC3_NEG_Z = Vec3(0, 0, -1);
|
||||
const Vec3 KM_VEC3_POS_Z = Vec3(0, 0, 1);
|
||||
const Vec3 KM_VEC3_POS_Y = Vec3(0, 1, 0);
|
||||
const Vec3 KM_VEC3_NEG_Y = Vec3(0, -1, 0);
|
||||
const Vec3 KM_VEC3_NEG_X = Vec3(-1, 0, 0);
|
||||
const Vec3 KM_VEC3_POS_X = Vec3(1, 0, 0);
|
||||
const Vec3 KM_VEC3_ZERO = Vec3(0, 0, 0);
|
||||
const Vec3 KM_VEC3_NEG_Z(0, 0, -1);
|
||||
const Vec3 KM_VEC3_POS_Z(0, 0, 1);
|
||||
const Vec3 KM_VEC3_POS_Y(0, 1, 0);
|
||||
const Vec3 KM_VEC3_NEG_Y(0, -1, 0);
|
||||
const Vec3 KM_VEC3_NEG_X(-1, 0, 0);
|
||||
const Vec3 KM_VEC3_POS_X(1, 0, 0);
|
||||
const Vec3 KM_VEC3_ZERO(0, 0, 0);
|
||||
|
||||
const Vec2 KM_VEC2_POS_Y = Vec2(0, 1);
|
||||
const Vec2 KM_VEC2_NEG_Y = Vec2(0, -1);
|
||||
const Vec2 KM_VEC2_NEG_X = Vec2(-1, 0);
|
||||
const Vec2 KM_VEC2_POS_X = Vec2(1, 0);
|
||||
const Vec2 KM_VEC2_ZERO = Vec2(0, 0);
|
||||
const Vec2 KM_VEC2_POS_Y(0, 1);
|
||||
const Vec2 KM_VEC2_NEG_Y(0, -1);
|
||||
const Vec2 KM_VEC2_NEG_X(-1, 0);
|
||||
const Vec2 KM_VEC2_POS_X(1, 0);
|
||||
const Vec2 KM_VEC2_ZERO(0, 0);
|
||||
|
||||
NS_CC_END
|
||||
|
||||
|
|
|
@ -1,473 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
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 "CCNodeReader.h"
|
||||
#include "CCActionTimelineCache.h"
|
||||
#include "CCActionTimeline.h"
|
||||
|
||||
#include "cocostudio/CCSGUIReader.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace ui;
|
||||
|
||||
namespace cocostudio {
|
||||
namespace timeline{
|
||||
|
||||
|
||||
static const char* ClassName_Node = "Node";
|
||||
static const char* ClassName_SubGraph = "SubGraph";
|
||||
static const char* ClassName_Sprite = "Sprite";
|
||||
static const char* ClassName_Particle = "Particle";
|
||||
|
||||
static const char* ClassName_Panel = "Panel";
|
||||
static const char* ClassName_Button = "Button";
|
||||
static const char* ClassName_CheckBox = "CheckBox";
|
||||
static const char* ClassName_ImageView = "ImageView";
|
||||
static const char* ClassName_TextAtlas = "TextAtlas";
|
||||
static const char* ClassName_LabelAtlas = "LabelAtlas";
|
||||
static const char* ClassName_LabelBMFont= "LabelBMFont";
|
||||
static const char* ClassName_TextBMFont = "TextBMFont";
|
||||
static const char* ClassName_Text = "Text";
|
||||
static const char* ClassName_LoadingBar = "LoadingBar";
|
||||
static const char* ClassName_TextField = "TextField";
|
||||
static const char* ClassName_Slider = "Slider";
|
||||
static const char* ClassName_Layout = "Layout";
|
||||
static const char* ClassName_ScrollView = "ScrollView";
|
||||
static const char* ClassName_ListView = "ListView";
|
||||
static const char* ClassName_PageView = "PageView";
|
||||
static const char* ClassName_Widget = "Widget";
|
||||
static const char* ClassName_Label = "Label";
|
||||
|
||||
|
||||
static const char* NODE = "nodeTree";
|
||||
static const char* CHILDREN = "children";
|
||||
static const char* CLASSNAME = "classname";
|
||||
static const char* FILE_PATH = "fileName";
|
||||
static const char* PLIST_FILE = "plistFile";
|
||||
static const char* TAG = "tag";
|
||||
static const char* ACTION_TAG = "actionTag";
|
||||
|
||||
static const char* OPTIONS = "options";
|
||||
|
||||
static const char* WIDTH = "width";
|
||||
static const char* HEIGHT = "height";
|
||||
static const char* X = "x";
|
||||
static const char* Y = "y";
|
||||
static const char* SCALE_X = "scaleX";
|
||||
static const char* SCALE_Y = "scaleY";
|
||||
static const char* SKEW_X = "skewX";
|
||||
static const char* SKEW_Y = "skewY";
|
||||
static const char* ROTATION = "rotation";
|
||||
static const char* ROTATION_SKEW_X = "rotationSkewX";
|
||||
static const char* ROTATION_SKEW_Y = "rotationSkewY";
|
||||
static const char* ANCHOR_X = "anchorPointX";
|
||||
static const char* ANCHOR_Y = "anchorPointY";
|
||||
static const char* ALPHA = "opacity";
|
||||
static const char* RED = "colorR";
|
||||
static const char* GREEN = "colorG";
|
||||
static const char* BLUE = "colorB";
|
||||
static const char* ZORDER = "ZOrder";
|
||||
static const char* PARTICLE_NUM = "particleNum";
|
||||
static const char* FLIPX = "flipX";
|
||||
static const char* FLIPY = "flipY";
|
||||
static const char* VISIBLE = "visible";
|
||||
|
||||
static const char* TEXTURES = "textures";
|
||||
static const char* TEXTURES_PNG = "texturesPng";
|
||||
|
||||
|
||||
// NodeReader
|
||||
static NodeReader* _sharedNodeReader = nullptr;
|
||||
|
||||
NodeReader* NodeReader::getInstance()
|
||||
{
|
||||
if (! _sharedNodeReader)
|
||||
{
|
||||
_sharedNodeReader = new (std::nothrow) NodeReader();
|
||||
_sharedNodeReader->init();
|
||||
}
|
||||
|
||||
return _sharedNodeReader;
|
||||
}
|
||||
|
||||
void NodeReader::destroyInstance()
|
||||
{
|
||||
CC_SAFE_DELETE(_sharedNodeReader);
|
||||
}
|
||||
|
||||
NodeReader::NodeReader()
|
||||
: _recordJsonPath(true)
|
||||
, _jsonPath("")
|
||||
{
|
||||
}
|
||||
|
||||
void NodeReader::purge()
|
||||
{
|
||||
}
|
||||
|
||||
void NodeReader::init()
|
||||
{
|
||||
using namespace std::placeholders;
|
||||
|
||||
_funcs.insert(Pair(ClassName_Node, std::bind(&NodeReader::loadSimpleNode, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_SubGraph, std::bind(&NodeReader::loadSubGraph, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Sprite, std::bind(&NodeReader::loadSprite, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Particle, std::bind(&NodeReader::loadParticle, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_LabelAtlas,std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_LabelBMFont,std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Panel, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Button, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_CheckBox, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_ImageView, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_TextAtlas, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_TextBMFont,std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Text, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_LoadingBar,std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_TextField, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Slider, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Layout, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_ScrollView,std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_ListView, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_PageView, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Widget, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
_funcs.insert(Pair(ClassName_Label, std::bind(&NodeReader::loadWidget, this, _1)));
|
||||
|
||||
}
|
||||
|
||||
Node* NodeReader::createNode(const std::string& filename)
|
||||
{
|
||||
if(_recordJsonPath)
|
||||
{
|
||||
std::string jsonPath = filename.substr(0, filename.find_last_of('/') + 1);
|
||||
GUIReader::getInstance()->setFilePath(jsonPath);
|
||||
|
||||
_jsonPath = jsonPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIReader::getInstance()->setFilePath("");
|
||||
_jsonPath = "";
|
||||
}
|
||||
|
||||
Node* node = loadNodeWithFile(filename);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
Node* NodeReader::loadNodeWithFile(const std::string& fileName)
|
||||
{
|
||||
// Read content from file
|
||||
std::string contentStr = FileUtils::getInstance()->getStringFromFile(fileName);
|
||||
|
||||
Node* node = loadNodeWithContent(contentStr);
|
||||
|
||||
// Load animation data from file
|
||||
ActionTimelineCache::getInstance()->loadAnimationActionWithContent(fileName, contentStr);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
Node* NodeReader::loadNodeWithContent(const std::string& content)
|
||||
{
|
||||
rapidjson::Document doc;
|
||||
doc.Parse<0>(content.c_str());
|
||||
if (doc.HasParseError())
|
||||
{
|
||||
CCLOG("GetParseError %s\n", doc.GetParseError());
|
||||
}
|
||||
|
||||
// decode plist
|
||||
int length = DICTOOL->getArrayCount_json(doc, TEXTURES);
|
||||
|
||||
for(int i=0; i<length; i++)
|
||||
{
|
||||
std::string plist = DICTOOL->getStringValueFromArray_json(doc, TEXTURES, i);
|
||||
std::string png = DICTOOL->getStringValueFromArray_json(doc, TEXTURES_PNG, i);
|
||||
plist = _jsonPath + plist;
|
||||
png = _jsonPath + png;
|
||||
SpriteFrameCache::getInstance()->addSpriteFramesWithFile(plist, png);
|
||||
}
|
||||
|
||||
// decode node tree
|
||||
const rapidjson::Value& subJson = DICTOOL->getSubDictionary_json(doc, NODE);
|
||||
Node* root = loadNode(subJson);
|
||||
root->release();
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
Node* NodeReader::loadNode(const rapidjson::Value& json)
|
||||
{
|
||||
Node* node = nullptr;
|
||||
std::string nodeType = DICTOOL->getStringValue_json(json, CLASSNAME);
|
||||
|
||||
NodeCreateFunc func = _funcs[nodeType];
|
||||
if (func != nullptr)
|
||||
{
|
||||
const rapidjson::Value& options = DICTOOL->getSubDictionary_json(json, OPTIONS);
|
||||
node = func(options);
|
||||
}
|
||||
|
||||
if(node)
|
||||
{
|
||||
int length = DICTOOL->getArrayCount_json(json, CHILDREN, 0);
|
||||
for (int i = 0; i<length; i++)
|
||||
{
|
||||
const rapidjson::Value &dic = DICTOOL->getSubDictionary_json(json, CHILDREN, i);
|
||||
Node* child = loadNode(dic);
|
||||
if (child)
|
||||
{
|
||||
auto widgetChild = dynamic_cast<Widget*>(child);
|
||||
if (widgetChild
|
||||
&& dynamic_cast<Widget*>(node)
|
||||
&& !dynamic_cast<Layout*>(node))
|
||||
{
|
||||
if (widgetChild->getPositionType() == ui::Widget::PositionType::PERCENT)
|
||||
{
|
||||
widgetChild->setPositionPercent(Vec2(widgetChild->getPositionPercent().x + node->getAnchorPoint().x, widgetChild->getPositionPercent().y + node->getAnchorPoint().y));
|
||||
}
|
||||
widgetChild->setPosition(Vec2(widgetChild->getPositionX() + node->getAnchorPointInPoints().x, widgetChild->getPositionY() + node->getAnchorPointInPoints().y));
|
||||
}
|
||||
|
||||
node->addChild(child);
|
||||
child->release();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CCLOG("Not supported NodeType: %s", nodeType.c_str());
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
void NodeReader::initNode(Node* node, const rapidjson::Value& json)
|
||||
{
|
||||
float width = DICTOOL->getFloatValue_json(json, WIDTH);
|
||||
float height = DICTOOL->getFloatValue_json(json, HEIGHT);
|
||||
float x = DICTOOL->getFloatValue_json(json, X);
|
||||
float y = DICTOOL->getFloatValue_json(json, Y);
|
||||
float scalex = DICTOOL->getFloatValue_json(json, SCALE_X, 1);
|
||||
float scaley = DICTOOL->getFloatValue_json(json, SCALE_Y, 1);
|
||||
float rotation = DICTOOL->getFloatValue_json(json, ROTATION);
|
||||
float rotationSkewX = DICTOOL->getFloatValue_json(json, ROTATION_SKEW_X);
|
||||
float rotationSkewY = DICTOOL->getFloatValue_json(json, ROTATION_SKEW_Y);
|
||||
float skewx = DICTOOL->getFloatValue_json(json, SKEW_X);
|
||||
float skewy = DICTOOL->getFloatValue_json(json, SKEW_Y);
|
||||
float anchorx = DICTOOL->getFloatValue_json(json, ANCHOR_X, 0.5f);
|
||||
float anchory = DICTOOL->getFloatValue_json(json, ANCHOR_Y, 0.5f);
|
||||
GLubyte alpha = (GLubyte)DICTOOL->getIntValue_json(json, ALPHA, 255);
|
||||
GLubyte red = (GLubyte)DICTOOL->getIntValue_json(json, RED, 255);
|
||||
GLubyte green = (GLubyte)DICTOOL->getIntValue_json(json, GREEN, 255);
|
||||
GLubyte blue = (GLubyte)DICTOOL->getIntValue_json(json, BLUE, 255);
|
||||
int zorder = DICTOOL->getIntValue_json(json, ZORDER);
|
||||
int tag = DICTOOL->getIntValue_json(json, TAG);
|
||||
int actionTag = DICTOOL->getIntValue_json(json, ACTION_TAG);
|
||||
bool visible = DICTOOL->getBooleanValue_json(json, VISIBLE);
|
||||
|
||||
if(x != 0 || y != 0)
|
||||
node->setPosition(x, y);
|
||||
if(scalex != 1)
|
||||
node->setScaleX(scalex);
|
||||
if(scaley != 1)
|
||||
node->setScaleY(scaley);
|
||||
if (rotation != 0)
|
||||
node->setRotation(rotation);
|
||||
if(rotationSkewX != 0)
|
||||
node->setRotationSkewX(rotationSkewX);
|
||||
if(rotationSkewY != 0)
|
||||
node->setRotationSkewY(rotationSkewY);
|
||||
if(skewx != 0)
|
||||
node->setSkewX(skewx);
|
||||
if(skewy != 0)
|
||||
node->setSkewY(skewy);
|
||||
if(anchorx != 0.5f || anchory != 0.5f)
|
||||
node->setAnchorPoint(Point(anchorx, anchory));
|
||||
if(width != 0 || height != 0)
|
||||
node->setContentSize(Size(width, height));
|
||||
if(zorder != 0)
|
||||
node->setLocalZOrder(zorder);
|
||||
if(visible != true)
|
||||
node->setVisible(visible);
|
||||
|
||||
if(alpha != 255)
|
||||
{
|
||||
node->setOpacity(alpha);
|
||||
}
|
||||
if(red != 255 || green != 255 || blue != 255)
|
||||
{
|
||||
node->setColor(Color3B(red, green, blue));
|
||||
}
|
||||
|
||||
|
||||
node->setTag(tag);
|
||||
node->setUserObject(ActionTimelineData::create(actionTag));
|
||||
}
|
||||
|
||||
Node* NodeReader::loadSimpleNode(const rapidjson::Value& json)
|
||||
{
|
||||
Node* node = Node::create();
|
||||
node->retain();
|
||||
initNode(node, json);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
Node* NodeReader::loadSubGraph(const rapidjson::Value& json)
|
||||
{
|
||||
const char* filePath = DICTOOL->getStringValue_json(json, FILE_PATH);
|
||||
|
||||
Node* node = nullptr;
|
||||
if (filePath && strcmp("", filePath) != 0)
|
||||
{
|
||||
node = createNode(filePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
node = Node::create();
|
||||
}
|
||||
|
||||
node->retain();
|
||||
|
||||
initNode(node, json);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
Node* NodeReader::loadSprite(const rapidjson::Value& json)
|
||||
{
|
||||
const char* filePath = DICTOOL->getStringValue_json(json, FILE_PATH);
|
||||
Sprite *sprite = nullptr;
|
||||
|
||||
if(filePath != nullptr)
|
||||
{
|
||||
std::string path = filePath;
|
||||
|
||||
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(path);
|
||||
if(!spriteFrame)
|
||||
{
|
||||
path = _jsonPath + path;
|
||||
sprite = Sprite::create(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite = Sprite::createWithSpriteFrame(spriteFrame);
|
||||
}
|
||||
|
||||
if(!sprite)
|
||||
{
|
||||
sprite = CCSprite::create();
|
||||
CCLOG("filePath is empty. Create a sprite with no texture");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite = Sprite::create();
|
||||
}
|
||||
|
||||
sprite->retain();
|
||||
|
||||
initNode(sprite, json);
|
||||
|
||||
bool flipX = DICTOOL->getBooleanValue_json(json, FLIPX);
|
||||
bool flipY = DICTOOL->getBooleanValue_json(json, FLIPY);
|
||||
|
||||
if(flipX != false)
|
||||
sprite->setFlippedX(flipX);
|
||||
if(flipY != false)
|
||||
sprite->setFlippedY(flipY);
|
||||
|
||||
return sprite;
|
||||
}
|
||||
|
||||
Node* NodeReader::loadParticle(const rapidjson::Value& json)
|
||||
{
|
||||
const char* filePath = DICTOOL->getStringValue_json(json, PLIST_FILE);
|
||||
int num = DICTOOL->getIntValue_json(json, PARTICLE_NUM);
|
||||
|
||||
ParticleSystemQuad* particle = ParticleSystemQuad::create(filePath);
|
||||
particle->setTotalParticles(num);
|
||||
particle->retain();
|
||||
|
||||
initNode(particle, json);
|
||||
|
||||
return particle;
|
||||
}
|
||||
|
||||
Node* NodeReader::loadWidget(const rapidjson::Value& json)
|
||||
{
|
||||
const char* str = DICTOOL->getStringValue_json(json, CLASSNAME);
|
||||
if(str == nullptr)
|
||||
return nullptr;
|
||||
|
||||
std::string classname = str;
|
||||
|
||||
if (classname == "Panel")
|
||||
{
|
||||
classname = "Layout";
|
||||
}
|
||||
else if (classname == "TextArea")
|
||||
{
|
||||
classname = "Text";
|
||||
}
|
||||
else if (classname == "TextButton")
|
||||
{
|
||||
classname = "Button";
|
||||
}
|
||||
else if (classname == "Label")
|
||||
{
|
||||
classname = "Text";
|
||||
}
|
||||
else if (classname == "LabelAtlas")
|
||||
{
|
||||
classname = "TextAtlas";
|
||||
}
|
||||
else if (classname == "LabelBMFont")
|
||||
{
|
||||
classname = "TextBMFont";
|
||||
}
|
||||
|
||||
std::string readerName = classname;
|
||||
readerName.append("Reader");
|
||||
|
||||
Widget* widget = dynamic_cast<Widget*>(ObjectFactory::getInstance()->createObject(classname));
|
||||
widget->retain();
|
||||
|
||||
WidgetReaderProtocol* reader = dynamic_cast<WidgetReaderProtocol*>(ObjectFactory::getInstance()->createObject(readerName));
|
||||
|
||||
WidgetPropertiesReader0300* guiReader = new (std::nothrow) WidgetPropertiesReader0300();
|
||||
guiReader->setPropsForAllWidgetFromJsonDictionary(reader, widget, json);
|
||||
CC_SAFE_DELETE(guiReader);
|
||||
|
||||
int actionTag = DICTOOL->getIntValue_json(json, ACTION_TAG);
|
||||
widget->setUserObject(ActionTimelineData::create(actionTag));
|
||||
|
||||
initNode(widget, json);
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,91 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CC_NODE_CACHE_H__
|
||||
#define __CC_NODE_CACHE_H__
|
||||
|
||||
#include <unordered_map>
|
||||
#include "cocostudio/DictionaryHelper.h"
|
||||
#include "cocostudio/CocosStudioExport.h"
|
||||
#include "2d/CCNode.h"
|
||||
|
||||
namespace cocostudio {
|
||||
|
||||
|
||||
namespace timeline{
|
||||
|
||||
class CC_STUDIO_DLL NodeReader
|
||||
{
|
||||
public:
|
||||
static NodeReader* getInstance();
|
||||
static void destroyInstance();
|
||||
|
||||
NodeReader();
|
||||
void purge();
|
||||
|
||||
void init();
|
||||
|
||||
cocos2d::Node* createNode(const std::string& filename);
|
||||
|
||||
cocos2d::Node* loadNodeWithFile(const std::string& fileName);
|
||||
cocos2d::Node* loadNodeWithContent(const std::string& content);
|
||||
|
||||
void setRecordJsonPath(bool record) { _recordJsonPath = record; }
|
||||
bool isRecordJsonPath() const { return _recordJsonPath; }
|
||||
|
||||
void setJsonPath(std::string jsonPath) { _jsonPath = jsonPath; }
|
||||
std::string getJsonPath() const { return _jsonPath; }
|
||||
|
||||
protected:
|
||||
|
||||
cocos2d::Node* loadNode(const rapidjson::Value& json);
|
||||
|
||||
void locateNodeWithMulresPosition(cocos2d::Node* node, const rapidjson::Value& json);
|
||||
|
||||
void initNode(cocos2d::Node* node, const rapidjson::Value& json);
|
||||
|
||||
// load nodes
|
||||
cocos2d::Node* loadSimpleNode(const rapidjson::Value& json);
|
||||
cocos2d::Node* loadSubGraph (const rapidjson::Value& json);
|
||||
cocos2d::Node* loadSprite (const rapidjson::Value& json);
|
||||
cocos2d::Node* loadParticle (const rapidjson::Value& json);
|
||||
|
||||
// load gui
|
||||
cocos2d::Node* loadWidget(const rapidjson::Value& json);
|
||||
|
||||
typedef std::function<cocos2d::Node*(const rapidjson::Value& json)> NodeCreateFunc;
|
||||
typedef std::pair<std::string, NodeCreateFunc> Pair;
|
||||
|
||||
std::unordered_map<std::string, NodeCreateFunc> _funcs;
|
||||
|
||||
bool _recordJsonPath;
|
||||
|
||||
std::string _jsonPath;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /*__CC_NODE_CACHE_H__*/
|
|
@ -65,7 +65,6 @@ WidgetReader/Node3DReader/Node3DReader.cpp \
|
|||
WidgetReader/Sprite3DReader/Sprite3DReader.cpp \
|
||||
WidgetReader/UserCameraReader/UserCameraReader.cpp \
|
||||
WidgetReader/Particle3DReader/Particle3DReader.cpp \
|
||||
ActionTimeline/CCNodeReader.cpp \
|
||||
ActionTimeline/CCActionTimelineCache.cpp \
|
||||
ActionTimeline/CCFrame.cpp \
|
||||
ActionTimeline/CCTimeLine.cpp \
|
||||
|
|
|
@ -42,8 +42,6 @@ namespace cocostudio {
|
|||
#define RENDER_IN_SUBPIXEL(__ARGS__) (ceil(__ARGS__))
|
||||
#endif
|
||||
|
||||
#define SET_VERTEX3F(_v_, _x_, _y_, _z_) (_v_).x = (_x_); (_v_).y = (_y_); (_v_).z = (_z_);
|
||||
|
||||
Skin *Skin::create()
|
||||
{
|
||||
Skin *skin = new (std::nothrow) Skin();
|
||||
|
@ -152,7 +150,10 @@ void Skin::updateTransform()
|
|||
// If it is not visible, or one of its ancestors is not visible, then do nothing:
|
||||
if( !_visible)
|
||||
{
|
||||
_quad.br.vertices = _quad.tl.vertices = _quad.tr.vertices = _quad.bl.vertices = Vec3(0, 0, 0);
|
||||
_quad.br.vertices.setZero();
|
||||
_quad.tl.vertices.setZero();
|
||||
_quad.tr.vertices.setZero();
|
||||
_quad.bl.vertices.setZero();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -188,10 +189,10 @@ void Skin::updateTransform()
|
|||
float dx = x1 * cr - y2 * sr2 + x;
|
||||
float dy = x1 * sr + y2 * cr2 + y;
|
||||
|
||||
SET_VERTEX3F( _quad.bl.vertices, RENDER_IN_SUBPIXEL(ax), RENDER_IN_SUBPIXEL(ay), _positionZ );
|
||||
SET_VERTEX3F( _quad.br.vertices, RENDER_IN_SUBPIXEL(bx), RENDER_IN_SUBPIXEL(by), _positionZ );
|
||||
SET_VERTEX3F( _quad.tl.vertices, RENDER_IN_SUBPIXEL(dx), RENDER_IN_SUBPIXEL(dy), _positionZ );
|
||||
SET_VERTEX3F( _quad.tr.vertices, RENDER_IN_SUBPIXEL(cx), RENDER_IN_SUBPIXEL(cy), _positionZ );
|
||||
_quad.bl.vertices.set(RENDER_IN_SUBPIXEL(ax), RENDER_IN_SUBPIXEL(ay), _positionZ);
|
||||
_quad.br.vertices.set(RENDER_IN_SUBPIXEL(bx), RENDER_IN_SUBPIXEL(by), _positionZ);
|
||||
_quad.tl.vertices.set(RENDER_IN_SUBPIXEL(dx), RENDER_IN_SUBPIXEL(dy), _positionZ);
|
||||
_quad.tr.vertices.set(RENDER_IN_SUBPIXEL(cx), RENDER_IN_SUBPIXEL(cy), _positionZ);
|
||||
}
|
||||
|
||||
// MARMALADE CHANGE: ADDED CHECK FOR nullptr, TO PERMIT SPRITES WITH NO BATCH NODE / TEXTURE ATLAS
|
||||
|
|
|
@ -53,6 +53,7 @@ struct Color;
|
|||
struct ColorVector;
|
||||
struct FlatSize;
|
||||
struct CapInsets;
|
||||
struct BlendFunc;
|
||||
struct ResourceData;
|
||||
|
||||
MANUALLY_ALIGNED_STRUCT(4) RotationSkew {
|
||||
|
@ -175,6 +176,20 @@ MANUALLY_ALIGNED_STRUCT(4) CapInsets {
|
|||
};
|
||||
STRUCT_END(CapInsets, 16);
|
||||
|
||||
MANUALLY_ALIGNED_STRUCT(4) BlendFunc {
|
||||
private:
|
||||
int32_t src_;
|
||||
int32_t dst_;
|
||||
|
||||
public:
|
||||
BlendFunc(int32_t src, int32_t dst)
|
||||
: src_(flatbuffers::EndianScalar(src)), dst_(flatbuffers::EndianScalar(dst)) { }
|
||||
|
||||
int32_t src() const { return flatbuffers::EndianScalar(src_); }
|
||||
int32_t dst() const { return flatbuffers::EndianScalar(dst_); }
|
||||
};
|
||||
STRUCT_END(BlendFunc, 8);
|
||||
|
||||
struct CSParseBinary : private flatbuffers::Table {
|
||||
const flatbuffers::String *version() const { return GetPointer<const flatbuffers::String *>(4); }
|
||||
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *textures() const { return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(6); }
|
||||
|
@ -585,12 +600,14 @@ inline flatbuffers::Offset<SingleNodeOptions> CreateSingleNodeOptions(flatbuffer
|
|||
struct SpriteOptions : private flatbuffers::Table {
|
||||
const WidgetOptions *nodeOptions() const { return GetPointer<const WidgetOptions *>(4); }
|
||||
const ResourceData *fileNameData() const { return GetPointer<const ResourceData *>(6); }
|
||||
const BlendFunc *blendFunc() const { return GetStruct<const BlendFunc *>(8); }
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* nodeOptions */) &&
|
||||
verifier.VerifyTable(nodeOptions()) &&
|
||||
VerifyField<flatbuffers::uoffset_t>(verifier, 6 /* fileNameData */) &&
|
||||
verifier.VerifyTable(fileNameData()) &&
|
||||
VerifyField<BlendFunc>(verifier, 8 /* blendFunc */) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
};
|
||||
|
@ -600,18 +617,21 @@ struct SpriteOptionsBuilder {
|
|||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<WidgetOptions> nodeOptions) { fbb_.AddOffset(4, nodeOptions); }
|
||||
void add_fileNameData(flatbuffers::Offset<ResourceData> fileNameData) { fbb_.AddOffset(6, fileNameData); }
|
||||
void add_blendFunc(const BlendFunc *blendFunc) { fbb_.AddStruct(8, blendFunc); }
|
||||
SpriteOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
|
||||
SpriteOptionsBuilder &operator=(const SpriteOptionsBuilder &);
|
||||
flatbuffers::Offset<SpriteOptions> Finish() {
|
||||
auto o = flatbuffers::Offset<SpriteOptions>(fbb_.EndTable(start_, 2));
|
||||
auto o = flatbuffers::Offset<SpriteOptions>(fbb_.EndTable(start_, 3));
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<SpriteOptions> CreateSpriteOptions(flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<WidgetOptions> nodeOptions = 0,
|
||||
flatbuffers::Offset<ResourceData> fileNameData = 0) {
|
||||
flatbuffers::Offset<ResourceData> fileNameData = 0,
|
||||
const BlendFunc *blendFunc = 0) {
|
||||
SpriteOptionsBuilder builder_(_fbb);
|
||||
builder_.add_blendFunc(blendFunc);
|
||||
builder_.add_fileNameData(fileNameData);
|
||||
builder_.add_nodeOptions(nodeOptions);
|
||||
return builder_.Finish();
|
||||
|
@ -620,12 +640,14 @@ inline flatbuffers::Offset<SpriteOptions> CreateSpriteOptions(flatbuffers::FlatB
|
|||
struct ParticleSystemOptions : private flatbuffers::Table {
|
||||
const WidgetOptions *nodeOptions() const { return GetPointer<const WidgetOptions *>(4); }
|
||||
const ResourceData *fileNameData() const { return GetPointer<const ResourceData *>(6); }
|
||||
const BlendFunc *blendFunc() const { return GetStruct<const BlendFunc *>(8); }
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* nodeOptions */) &&
|
||||
verifier.VerifyTable(nodeOptions()) &&
|
||||
VerifyField<flatbuffers::uoffset_t>(verifier, 6 /* fileNameData */) &&
|
||||
verifier.VerifyTable(fileNameData()) &&
|
||||
VerifyField<BlendFunc>(verifier, 8 /* blendFunc */) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
};
|
||||
|
@ -635,18 +657,21 @@ struct ParticleSystemOptionsBuilder {
|
|||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<WidgetOptions> nodeOptions) { fbb_.AddOffset(4, nodeOptions); }
|
||||
void add_fileNameData(flatbuffers::Offset<ResourceData> fileNameData) { fbb_.AddOffset(6, fileNameData); }
|
||||
void add_blendFunc(const BlendFunc *blendFunc) { fbb_.AddStruct(8, blendFunc); }
|
||||
ParticleSystemOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
|
||||
ParticleSystemOptionsBuilder &operator=(const ParticleSystemOptionsBuilder &);
|
||||
flatbuffers::Offset<ParticleSystemOptions> Finish() {
|
||||
auto o = flatbuffers::Offset<ParticleSystemOptions>(fbb_.EndTable(start_, 2));
|
||||
auto o = flatbuffers::Offset<ParticleSystemOptions>(fbb_.EndTable(start_, 3));
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<ParticleSystemOptions> CreateParticleSystemOptions(flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<WidgetOptions> nodeOptions = 0,
|
||||
flatbuffers::Offset<ResourceData> fileNameData = 0) {
|
||||
flatbuffers::Offset<ResourceData> fileNameData = 0,
|
||||
const BlendFunc *blendFunc = 0) {
|
||||
ParticleSystemOptionsBuilder builder_(_fbb);
|
||||
builder_.add_blendFunc(blendFunc);
|
||||
builder_.add_fileNameData(fileNameData);
|
||||
builder_.add_nodeOptions(nodeOptions);
|
||||
return builder_.Finish();
|
||||
|
@ -1011,6 +1036,14 @@ struct TextOptions : private flatbuffers::Table {
|
|||
int32_t vAlignment() const { return GetField<int32_t>(20, 0); }
|
||||
uint8_t touchScaleEnable() const { return GetField<uint8_t>(22, 0); }
|
||||
uint8_t isCustomSize() const { return GetField<uint8_t>(24, 0); }
|
||||
uint8_t outlineEnabled() const { return GetField<uint8_t>(26, 0); }
|
||||
const Color *outlineColor() const { return GetStruct<const Color *>(28); }
|
||||
int32_t outlineSize() const { return GetField<int32_t>(30, 1); }
|
||||
uint8_t shadowEnabled() const { return GetField<uint8_t>(32, 0); }
|
||||
const Color *shadowColor() const { return GetStruct<const Color *>(34); }
|
||||
float shadowOffsetX() const { return GetField<float>(36, 2); }
|
||||
float shadowOffsetY() const { return GetField<float>(38, -2); }
|
||||
int32_t shadowBlurRadius() const { return GetField<int32_t>(40, 0); }
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* widgetOptions */) &&
|
||||
|
@ -1028,6 +1061,14 @@ struct TextOptions : private flatbuffers::Table {
|
|||
VerifyField<int32_t>(verifier, 20 /* vAlignment */) &&
|
||||
VerifyField<uint8_t>(verifier, 22 /* touchScaleEnable */) &&
|
||||
VerifyField<uint8_t>(verifier, 24 /* isCustomSize */) &&
|
||||
VerifyField<uint8_t>(verifier, 26 /* outlineEnabled */) &&
|
||||
VerifyField<Color>(verifier, 28 /* outlineColor */) &&
|
||||
VerifyField<int32_t>(verifier, 30 /* outlineSize */) &&
|
||||
VerifyField<uint8_t>(verifier, 32 /* shadowEnabled */) &&
|
||||
VerifyField<Color>(verifier, 34 /* shadowColor */) &&
|
||||
VerifyField<float>(verifier, 36 /* shadowOffsetX */) &&
|
||||
VerifyField<float>(verifier, 38 /* shadowOffsetY */) &&
|
||||
VerifyField<int32_t>(verifier, 40 /* shadowBlurRadius */) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
};
|
||||
|
@ -1046,10 +1087,18 @@ struct TextOptionsBuilder {
|
|||
void add_vAlignment(int32_t vAlignment) { fbb_.AddElement<int32_t>(20, vAlignment, 0); }
|
||||
void add_touchScaleEnable(uint8_t touchScaleEnable) { fbb_.AddElement<uint8_t>(22, touchScaleEnable, 0); }
|
||||
void add_isCustomSize(uint8_t isCustomSize) { fbb_.AddElement<uint8_t>(24, isCustomSize, 0); }
|
||||
void add_outlineEnabled(uint8_t outlineEnabled) { fbb_.AddElement<uint8_t>(26, outlineEnabled, 0); }
|
||||
void add_outlineColor(const Color *outlineColor) { fbb_.AddStruct(28, outlineColor); }
|
||||
void add_outlineSize(int32_t outlineSize) { fbb_.AddElement<int32_t>(30, outlineSize, 1); }
|
||||
void add_shadowEnabled(uint8_t shadowEnabled) { fbb_.AddElement<uint8_t>(32, shadowEnabled, 0); }
|
||||
void add_shadowColor(const Color *shadowColor) { fbb_.AddStruct(34, shadowColor); }
|
||||
void add_shadowOffsetX(float shadowOffsetX) { fbb_.AddElement<float>(36, shadowOffsetX, 2); }
|
||||
void add_shadowOffsetY(float shadowOffsetY) { fbb_.AddElement<float>(38, shadowOffsetY, -2); }
|
||||
void add_shadowBlurRadius(int32_t shadowBlurRadius) { fbb_.AddElement<int32_t>(40, shadowBlurRadius, 0); }
|
||||
TextOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
|
||||
TextOptionsBuilder &operator=(const TextOptionsBuilder &);
|
||||
flatbuffers::Offset<TextOptions> Finish() {
|
||||
auto o = flatbuffers::Offset<TextOptions>(fbb_.EndTable(start_, 11));
|
||||
auto o = flatbuffers::Offset<TextOptions>(fbb_.EndTable(start_, 19));
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
@ -1065,8 +1114,22 @@ inline flatbuffers::Offset<TextOptions> CreateTextOptions(flatbuffers::FlatBuffe
|
|||
int32_t hAlignment = 0,
|
||||
int32_t vAlignment = 0,
|
||||
uint8_t touchScaleEnable = 0,
|
||||
uint8_t isCustomSize = 0) {
|
||||
uint8_t isCustomSize = 0,
|
||||
uint8_t outlineEnabled = 0,
|
||||
const Color *outlineColor = 0,
|
||||
int32_t outlineSize = 1,
|
||||
uint8_t shadowEnabled = 0,
|
||||
const Color *shadowColor = 0,
|
||||
float shadowOffsetX = 2,
|
||||
float shadowOffsetY = -2,
|
||||
int32_t shadowBlurRadius = 0) {
|
||||
TextOptionsBuilder builder_(_fbb);
|
||||
builder_.add_shadowBlurRadius(shadowBlurRadius);
|
||||
builder_.add_shadowOffsetY(shadowOffsetY);
|
||||
builder_.add_shadowOffsetX(shadowOffsetX);
|
||||
builder_.add_shadowColor(shadowColor);
|
||||
builder_.add_outlineSize(outlineSize);
|
||||
builder_.add_outlineColor(outlineColor);
|
||||
builder_.add_vAlignment(vAlignment);
|
||||
builder_.add_hAlignment(hAlignment);
|
||||
builder_.add_areaHeight(areaHeight);
|
||||
|
@ -1076,6 +1139,8 @@ inline flatbuffers::Offset<TextOptions> CreateTextOptions(flatbuffers::FlatBuffe
|
|||
builder_.add_fontName(fontName);
|
||||
builder_.add_fontResource(fontResource);
|
||||
builder_.add_widgetOptions(widgetOptions);
|
||||
builder_.add_shadowEnabled(shadowEnabled);
|
||||
builder_.add_outlineEnabled(outlineEnabled);
|
||||
builder_.add_isCustomSize(isCustomSize);
|
||||
builder_.add_touchScaleEnable(touchScaleEnable);
|
||||
return builder_.Finish();
|
||||
|
@ -1685,7 +1750,7 @@ inline flatbuffers::Offset<ListViewOptions> CreateListViewOptions(flatbuffers::F
|
|||
struct ProjectNodeOptions : private flatbuffers::Table {
|
||||
const WidgetOptions *nodeOptions() const { return GetPointer<const WidgetOptions *>(4); }
|
||||
const flatbuffers::String *fileName() const { return GetPointer<const flatbuffers::String *>(6); }
|
||||
float innerActionSpeed() const { return GetField<float>(8, 0); }
|
||||
float innerActionSpeed() const { return GetField<float>(8, 1.0); }
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* nodeOptions */) &&
|
||||
|
@ -1702,7 +1767,7 @@ struct ProjectNodeOptionsBuilder {
|
|||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<WidgetOptions> nodeOptions) { fbb_.AddOffset(4, nodeOptions); }
|
||||
void add_fileName(flatbuffers::Offset<flatbuffers::String> fileName) { fbb_.AddOffset(6, fileName); }
|
||||
void add_innerActionSpeed(float innerActionSpeed) { fbb_.AddElement<float>(8, innerActionSpeed, 0); }
|
||||
void add_innerActionSpeed(float innerActionSpeed) { fbb_.AddElement<float>(8, innerActionSpeed, 1.0); }
|
||||
ProjectNodeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
|
||||
ProjectNodeOptionsBuilder &operator=(const ProjectNodeOptionsBuilder &);
|
||||
flatbuffers::Offset<ProjectNodeOptions> Finish() {
|
||||
|
@ -1714,7 +1779,7 @@ struct ProjectNodeOptionsBuilder {
|
|||
inline flatbuffers::Offset<ProjectNodeOptions> CreateProjectNodeOptions(flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<WidgetOptions> nodeOptions = 0,
|
||||
flatbuffers::Offset<flatbuffers::String> fileName = 0,
|
||||
float innerActionSpeed = 0) {
|
||||
float innerActionSpeed = 1.0) {
|
||||
ProjectNodeOptionsBuilder builder_(_fbb);
|
||||
builder_.add_innerActionSpeed(innerActionSpeed);
|
||||
builder_.add_fileName(fileName);
|
||||
|
|
|
@ -63,5 +63,11 @@ namespace cocostudio
|
|||
Particle3DReader::destroyInstance();
|
||||
|
||||
cocos2d::CSLoader::destroyInstance();
|
||||
|
||||
|
||||
ArmatureDataManager::destroyInstance();
|
||||
SceneReader::destroyInstance();
|
||||
ActionManagerEx::destroyInstance();
|
||||
GUIReader::destroyInstance();
|
||||
}
|
||||
}
|
|
@ -79,6 +79,8 @@ namespace cocostudio
|
|||
std::string plistFile = "";
|
||||
int resourceType = 0;
|
||||
|
||||
cocos2d::BlendFunc blendFunc = cocos2d::BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
|
||||
// child elements
|
||||
const tinyxml2::XMLElement* child = objectData->FirstChildElement();
|
||||
while (child)
|
||||
|
@ -110,16 +112,40 @@ namespace cocostudio
|
|||
attribute = attribute->Next();
|
||||
}
|
||||
}
|
||||
else if (name == "BlendFunc")
|
||||
{
|
||||
const tinyxml2::XMLAttribute* attribute = child->FirstAttribute();
|
||||
|
||||
while (attribute)
|
||||
{
|
||||
name = attribute->Name();
|
||||
std::string value = attribute->Value();
|
||||
|
||||
if (name == "Src")
|
||||
{
|
||||
blendFunc.src = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "Dst")
|
||||
{
|
||||
blendFunc.dst = atoi(value.c_str());
|
||||
}
|
||||
|
||||
attribute = attribute->Next();
|
||||
}
|
||||
}
|
||||
|
||||
child = child->NextSiblingElement();
|
||||
}
|
||||
|
||||
flatbuffers::BlendFunc f_blendFunc(blendFunc.src, blendFunc.dst);
|
||||
|
||||
auto options = CreateParticleSystemOptions(*builder,
|
||||
nodeOptions,
|
||||
CreateResourceData(*builder,
|
||||
builder->CreateString(path),
|
||||
builder->CreateString(plistFile),
|
||||
resourceType));
|
||||
resourceType),
|
||||
&f_blendFunc);
|
||||
|
||||
return *(Offset<Table>*)(&options);
|
||||
}
|
||||
|
@ -127,7 +153,18 @@ namespace cocostudio
|
|||
void ParticleReader::setPropsWithFlatBuffers(cocos2d::Node *node,
|
||||
const flatbuffers::Table *particleOptions)
|
||||
{
|
||||
auto particle = static_cast<ParticleSystemQuad*>(node);
|
||||
auto options = (ParticleSystemOptions*)particleOptions;
|
||||
|
||||
auto f_blendFunc = options->blendFunc();
|
||||
if (f_blendFunc)
|
||||
{
|
||||
cocos2d::BlendFunc blendFunc = cocos2d::BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
blendFunc.src = f_blendFunc->src();
|
||||
blendFunc.dst = f_blendFunc->dst();
|
||||
particle->setBlendFunc(blendFunc);
|
||||
}
|
||||
|
||||
auto nodeReader = NodeReader::getInstance();
|
||||
nodeReader->setPropsWithFlatBuffers(node, (Table*)options->nodeOptions());
|
||||
}
|
||||
|
|
|
@ -80,6 +80,8 @@ namespace cocostudio
|
|||
std::string plistFile = "";
|
||||
int resourceType = 0;
|
||||
|
||||
cocos2d::BlendFunc blendFunc = cocos2d::BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
|
||||
// FileData
|
||||
const tinyxml2::XMLElement* child = objectData->FirstChildElement();
|
||||
while (child)
|
||||
|
@ -121,17 +123,40 @@ namespace cocostudio
|
|||
fbs->_textures.push_back(builder->CreateString(texture));
|
||||
}
|
||||
}
|
||||
else if (name == "BlendFunc")
|
||||
{
|
||||
const tinyxml2::XMLAttribute* attribute = child->FirstAttribute();
|
||||
|
||||
while (attribute)
|
||||
{
|
||||
name = attribute->Name();
|
||||
std::string value = attribute->Value();
|
||||
|
||||
if (name == "Src")
|
||||
{
|
||||
blendFunc.src = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "Dst")
|
||||
{
|
||||
blendFunc.dst = atoi(value.c_str());
|
||||
}
|
||||
|
||||
attribute = attribute->Next();
|
||||
}
|
||||
}
|
||||
|
||||
child = child->NextSiblingElement();
|
||||
}
|
||||
|
||||
flatbuffers::BlendFunc f_blendFunc(blendFunc.src, blendFunc.dst);
|
||||
|
||||
auto options = CreateSpriteOptions(*builder,
|
||||
nodeOptions,
|
||||
CreateResourceData(*builder,
|
||||
builder->CreateString(path),
|
||||
builder->CreateString(plistFile),
|
||||
resourceType)
|
||||
);
|
||||
resourceType),
|
||||
&f_blendFunc);
|
||||
|
||||
return *(Offset<Table>*)(&options);
|
||||
}
|
||||
|
@ -208,6 +233,15 @@ namespace cocostudio
|
|||
sprite->addChild(label);
|
||||
}
|
||||
|
||||
auto f_blendFunc = options->blendFunc();
|
||||
if (f_blendFunc)
|
||||
{
|
||||
cocos2d::BlendFunc blendFunc = cocos2d::BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
blendFunc.src = f_blendFunc->src();
|
||||
blendFunc.dst = f_blendFunc->dst();
|
||||
sprite->setBlendFunc(blendFunc);
|
||||
}
|
||||
|
||||
|
||||
auto nodeReader = NodeReader::getInstance();
|
||||
nodeReader->setPropsWithFlatBuffers(node, (Table*)(options->nodeOptions()));
|
||||
|
|
|
@ -164,6 +164,13 @@ namespace cocostudio
|
|||
int areaHeight = 0;
|
||||
int h_alignment = 0;
|
||||
int v_alignment = 0;
|
||||
bool outlineEnabled = false;
|
||||
Color4B outlineColor = Color4B::BLACK;
|
||||
int outlineSize = 1;
|
||||
bool shadowEnabled = false;
|
||||
Color4B shadowColor = Color4B::BLACK;
|
||||
Size shadowOffset = Size(2, -2);
|
||||
int shadowBlurRadius = 0;
|
||||
|
||||
std::string path = "";
|
||||
std::string plistFile = "";
|
||||
|
@ -234,6 +241,30 @@ namespace cocostudio
|
|||
{
|
||||
isCustomSize = (value == "True") ? true : false;
|
||||
}
|
||||
else if (name == "OutlineEnabled")
|
||||
{
|
||||
outlineEnabled = (value == "True") ? true : false;
|
||||
}
|
||||
else if (name == "OutlineSize")
|
||||
{
|
||||
outlineSize = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "ShadowEnabled")
|
||||
{
|
||||
shadowEnabled = (value == "True") ? true : false;
|
||||
}
|
||||
else if (name == "ShadowOffsetX")
|
||||
{
|
||||
shadowOffset.width = atof(value.c_str());
|
||||
}
|
||||
else if (name == "ShadowOffsetY")
|
||||
{
|
||||
shadowOffset.height = atof(value.c_str());
|
||||
}
|
||||
else if (name == "ShadowBlurRadius")
|
||||
{
|
||||
shadowBlurRadius = atoi(value.c_str());
|
||||
}
|
||||
|
||||
attribute = attribute->Next();
|
||||
}
|
||||
|
@ -269,10 +300,71 @@ namespace cocostudio
|
|||
attribute = attribute->Next();
|
||||
}
|
||||
}
|
||||
else if (name == "OutlineColor")
|
||||
{
|
||||
attribute = child->FirstAttribute();
|
||||
|
||||
while (attribute)
|
||||
{
|
||||
name = attribute->Name();
|
||||
std::string value = attribute->Value();
|
||||
|
||||
if (name == "A")
|
||||
{
|
||||
outlineColor.a = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "R")
|
||||
{
|
||||
outlineColor.r = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "G")
|
||||
{
|
||||
outlineColor.g = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "B")
|
||||
{
|
||||
outlineColor.b = atoi(value.c_str());
|
||||
}
|
||||
|
||||
attribute = attribute->Next();
|
||||
}
|
||||
}
|
||||
else if (name == "ShadowColor")
|
||||
{
|
||||
attribute = child->FirstAttribute();
|
||||
|
||||
while (attribute)
|
||||
{
|
||||
name = attribute->Name();
|
||||
std::string value = attribute->Value();
|
||||
|
||||
if (name == "A")
|
||||
{
|
||||
shadowColor.a = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "R")
|
||||
{
|
||||
shadowColor.r = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "G")
|
||||
{
|
||||
shadowColor.g = atoi(value.c_str());
|
||||
}
|
||||
else if (name == "B")
|
||||
{
|
||||
shadowColor.b = atoi(value.c_str());
|
||||
}
|
||||
|
||||
attribute = attribute->Next();
|
||||
}
|
||||
}
|
||||
|
||||
child = child->NextSiblingElement();
|
||||
}
|
||||
|
||||
flatbuffers::Color f_outlineColor(outlineColor.a, outlineColor.r, outlineColor.g, outlineColor.b);
|
||||
flatbuffers::Color f_shadowColor(shadowColor.a, shadowColor.r, shadowColor.g, shadowColor.b);
|
||||
|
||||
auto options = CreateTextOptions(*builder,
|
||||
widgetOptions,
|
||||
CreateResourceData(*builder,
|
||||
|
@ -287,7 +379,15 @@ namespace cocostudio
|
|||
h_alignment,
|
||||
v_alignment,
|
||||
touchScaleEnabled,
|
||||
isCustomSize);
|
||||
isCustomSize,
|
||||
outlineEnabled,
|
||||
&f_outlineColor,
|
||||
outlineSize,
|
||||
shadowEnabled,
|
||||
&f_shadowColor,
|
||||
shadowOffset.width,
|
||||
shadowOffset.height,
|
||||
shadowBlurRadius);
|
||||
|
||||
return *(Offset<Table>*)(&options);
|
||||
}
|
||||
|
@ -348,6 +448,29 @@ namespace cocostudio
|
|||
}
|
||||
}
|
||||
|
||||
bool outlineEnabled = options->outlineEnabled();
|
||||
if (outlineEnabled)
|
||||
{
|
||||
auto f_outlineColor = options->outlineColor();
|
||||
if (f_outlineColor)
|
||||
{
|
||||
Color4B outlineColor(f_outlineColor->a(), f_outlineColor->r(), f_outlineColor->g(), f_outlineColor->b());
|
||||
label->enableOutline(outlineColor, options->outlineSize());
|
||||
}
|
||||
}
|
||||
|
||||
bool shadowEnabled = options->shadowEnabled();
|
||||
if (shadowEnabled)
|
||||
{
|
||||
auto f_shadowColor = options->shadowColor();
|
||||
if (f_shadowColor)
|
||||
{
|
||||
Color4B shadowColor(f_shadowColor->a(), f_shadowColor->r(), f_shadowColor->g(), f_shadowColor->b());
|
||||
label->enableShadow(shadowColor, Size(options->shadowOffsetX(), options->shadowOffsetY()), options->shadowBlurRadius());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
auto widgetReader = WidgetReader::getInstance();
|
||||
widgetReader->setPropsWithFlatBuffers(node, (Table*)options->widgetOptions());
|
||||
|
||||
|
|
|
@ -68,16 +68,6 @@ Vec3::~Vec3()
|
|||
{
|
||||
}
|
||||
|
||||
bool Vec3::isZero() const
|
||||
{
|
||||
return x == 0.0f && y == 0.0f && z == 0.0f;
|
||||
}
|
||||
|
||||
bool Vec3::isOne() const
|
||||
{
|
||||
return x == 1.0f && y == 1.0f && z == 1.0f;
|
||||
}
|
||||
|
||||
float Vec3::angle(const Vec3& v1, const Vec3& v2)
|
||||
{
|
||||
float dx = v1.y * v2.z - v1.z * v2.y;
|
||||
|
@ -87,13 +77,6 @@ float Vec3::angle(const Vec3& v1, const Vec3& v2)
|
|||
return atan2f(sqrt(dx * dx + dy * dy + dz * dz) + MATH_FLOAT_SMALL, dot(v1, v2));
|
||||
}
|
||||
|
||||
void Vec3::add(const Vec3& v)
|
||||
{
|
||||
x += v.x;
|
||||
y += v.y;
|
||||
z += v.z;
|
||||
}
|
||||
|
||||
void Vec3::add(const Vec3& v1, const Vec3& v2, Vec3* dst)
|
||||
{
|
||||
GP_ASSERT(dst);
|
||||
|
@ -196,23 +179,6 @@ float Vec3::dot(const Vec3& v1, const Vec3& v2)
|
|||
return (v1.x * v2.x + v1.y * v2.y + v1.z * v2.z);
|
||||
}
|
||||
|
||||
float Vec3::length() const
|
||||
{
|
||||
return sqrt(x * x + y * y + z * z);
|
||||
}
|
||||
|
||||
float Vec3::lengthSquared() const
|
||||
{
|
||||
return (x * x + y * y + z * z);
|
||||
}
|
||||
|
||||
void Vec3::negate()
|
||||
{
|
||||
x = -x;
|
||||
y = -y;
|
||||
z = -z;
|
||||
}
|
||||
|
||||
void Vec3::normalize()
|
||||
{
|
||||
float n = x * x + y * y + z * z;
|
||||
|
@ -238,50 +204,6 @@ Vec3 Vec3::getNormalized() const
|
|||
return v;
|
||||
}
|
||||
|
||||
void Vec3::scale(float scalar)
|
||||
{
|
||||
x *= scalar;
|
||||
y *= scalar;
|
||||
z *= scalar;
|
||||
}
|
||||
|
||||
void Vec3::set(float xx, float yy, float zz)
|
||||
{
|
||||
this->x = xx;
|
||||
this->y = yy;
|
||||
this->z = zz;
|
||||
}
|
||||
|
||||
void Vec3::set(const float* array)
|
||||
{
|
||||
GP_ASSERT(array);
|
||||
|
||||
x = array[0];
|
||||
y = array[1];
|
||||
z = array[2];
|
||||
}
|
||||
|
||||
void Vec3::set(const Vec3& v)
|
||||
{
|
||||
this->x = v.x;
|
||||
this->y = v.y;
|
||||
this->z = v.z;
|
||||
}
|
||||
|
||||
void Vec3::set(const Vec3& p1, const Vec3& p2)
|
||||
{
|
||||
x = p2.x - p1.x;
|
||||
y = p2.y - p1.y;
|
||||
z = p2.z - p1.z;
|
||||
}
|
||||
|
||||
void Vec3::subtract(const Vec3& v)
|
||||
{
|
||||
x -= v.x;
|
||||
y -= v.y;
|
||||
z -= v.z;
|
||||
}
|
||||
|
||||
void Vec3::subtract(const Vec3& v1, const Vec3& v2, Vec3* dst)
|
||||
{
|
||||
GP_ASSERT(dst);
|
||||
|
@ -299,10 +221,10 @@ void Vec3::smooth(const Vec3& target, float elapsedTime, float responseTime)
|
|||
}
|
||||
}
|
||||
|
||||
const Vec3 Vec3::ZERO = Vec3(0.0f, 0.0f, 0.0f);
|
||||
const Vec3 Vec3::ONE = Vec3(1.0f, 1.0f, 1.0f);
|
||||
const Vec3 Vec3::UNIT_X = Vec3(1.0f, 0.0f, 0.0f);
|
||||
const Vec3 Vec3::UNIT_Y = Vec3(0.0f, 1.0f, 0.0f);
|
||||
const Vec3 Vec3::UNIT_Z = Vec3(0.0f, 0.0f, 1.0f);
|
||||
const Vec3 Vec3::ZERO(0.0f, 0.0f, 0.0f);
|
||||
const Vec3 Vec3::ONE(1.0f, 1.0f, 1.0f);
|
||||
const Vec3 Vec3::UNIT_X(1.0f, 0.0f, 0.0f);
|
||||
const Vec3 Vec3::UNIT_Y(0.0f, 1.0f, 0.0f);
|
||||
const Vec3 Vec3::UNIT_Z(0.0f, 0.0f, 1.0f);
|
||||
|
||||
NS_CC_MATH_END
|
||||
|
|
|
@ -118,14 +118,14 @@ public:
|
|||
*
|
||||
* @return true if this vector contains all zeros, false otherwise.
|
||||
*/
|
||||
bool isZero() const;
|
||||
inline bool isZero() const;
|
||||
|
||||
/**
|
||||
* Indicates whether this vector contains all ones.
|
||||
*
|
||||
* @return true if this vector contains all ones, false otherwise.
|
||||
*/
|
||||
bool isOne() const;
|
||||
inline bool isOne() const;
|
||||
|
||||
/**
|
||||
* Returns the angle (in radians) between the specified vectors.
|
||||
|
@ -143,7 +143,17 @@ public:
|
|||
*
|
||||
* @param v The vector to add.
|
||||
*/
|
||||
void add(const Vec3& v);
|
||||
inline void add(const Vec3& v);
|
||||
|
||||
|
||||
/**
|
||||
* Adds the elements of this vector to the specified values.
|
||||
*
|
||||
* @param xx The add x coordinate.
|
||||
* @param yy The add y coordinate.
|
||||
* @param zz The add z coordinate.
|
||||
*/
|
||||
inline void add(float xx, float yy, float zz);
|
||||
|
||||
/**
|
||||
* Adds the specified vectors and stores the result in dst.
|
||||
|
@ -241,7 +251,7 @@ public:
|
|||
*
|
||||
* @see lengthSquared
|
||||
*/
|
||||
float length() const;
|
||||
inline float length() const;
|
||||
|
||||
/**
|
||||
* Returns the squared length of this vector.
|
||||
|
@ -255,12 +265,12 @@ public:
|
|||
*
|
||||
* @see length
|
||||
*/
|
||||
float lengthSquared() const;
|
||||
inline float lengthSquared() const;
|
||||
|
||||
/**
|
||||
* Negates this vector.
|
||||
*/
|
||||
void negate();
|
||||
inline void negate();
|
||||
|
||||
/**
|
||||
* Normalizes this vector.
|
||||
|
@ -285,7 +295,7 @@ public:
|
|||
*
|
||||
* @param scalar The scalar value.
|
||||
*/
|
||||
void scale(float scalar);
|
||||
inline void scale(float scalar);
|
||||
|
||||
/**
|
||||
* Sets the elements of this vector to the specified values.
|
||||
|
@ -294,26 +304,31 @@ public:
|
|||
* @param yy The new y coordinate.
|
||||
* @param zz The new z coordinate.
|
||||
*/
|
||||
void set(float xx, float yy, float zz);
|
||||
inline void set(float xx, float yy, float zz);
|
||||
|
||||
/**
|
||||
* Sets the elements of this vector from the values in the specified array.
|
||||
*
|
||||
* @param array An array containing the elements of the vector in the order x, y, z.
|
||||
*/
|
||||
void set(const float* array);
|
||||
inline void set(const float* array);
|
||||
|
||||
/**
|
||||
* Sets the elements of this vector to those in the specified vector.
|
||||
*
|
||||
* @param v The vector to copy.
|
||||
*/
|
||||
void set(const Vec3& v);
|
||||
inline void set(const Vec3& v);
|
||||
|
||||
/**
|
||||
* Sets this vector to the directional vector between the specified points.
|
||||
*/
|
||||
void set(const Vec3& p1, const Vec3& p2);
|
||||
inline void set(const Vec3& p1, const Vec3& p2);
|
||||
|
||||
/**
|
||||
* Sets the elements of this vector to zero.
|
||||
*/
|
||||
inline void setZero();
|
||||
|
||||
/**
|
||||
* Subtracts this vector and the specified vector as (this - v)
|
||||
|
@ -321,7 +336,7 @@ public:
|
|||
*
|
||||
* @param v The vector to subtract.
|
||||
*/
|
||||
void subtract(const Vec3& v);
|
||||
inline void subtract(const Vec3& v);
|
||||
|
||||
/**
|
||||
* Subtracts the specified vectors and stores the result in dst.
|
||||
|
|
|
@ -23,6 +23,97 @@
|
|||
|
||||
NS_CC_MATH_BEGIN
|
||||
|
||||
|
||||
inline bool Vec3::isZero() const
|
||||
{
|
||||
return x == 0.0f && y == 0.0f && z == 0.0f;
|
||||
}
|
||||
|
||||
inline bool Vec3::isOne() const
|
||||
{
|
||||
return x == 1.0f && y == 1.0f && z == 1.0f;
|
||||
}
|
||||
|
||||
inline void Vec3::add(const Vec3& v)
|
||||
{
|
||||
x += v.x;
|
||||
y += v.y;
|
||||
z += v.z;
|
||||
}
|
||||
|
||||
inline void Vec3::add(float xx, float yy, float zz)
|
||||
{
|
||||
x += xx;
|
||||
y += yy;
|
||||
z += zz;
|
||||
}
|
||||
|
||||
inline float Vec3::length() const
|
||||
{
|
||||
return sqrt(x * x + y * y + z * z);
|
||||
}
|
||||
|
||||
inline float Vec3::lengthSquared() const
|
||||
{
|
||||
return (x * x + y * y + z * z);
|
||||
}
|
||||
|
||||
inline void Vec3::negate()
|
||||
{
|
||||
x = -x;
|
||||
y = -y;
|
||||
z = -z;
|
||||
}
|
||||
|
||||
inline void Vec3::scale(float scalar)
|
||||
{
|
||||
x *= scalar;
|
||||
y *= scalar;
|
||||
z *= scalar;
|
||||
}
|
||||
|
||||
inline void Vec3::set(float xx, float yy, float zz)
|
||||
{
|
||||
this->x = xx;
|
||||
this->y = yy;
|
||||
this->z = zz;
|
||||
}
|
||||
|
||||
inline void Vec3::set(const float* array)
|
||||
{
|
||||
GP_ASSERT(array);
|
||||
|
||||
x = array[0];
|
||||
y = array[1];
|
||||
z = array[2];
|
||||
}
|
||||
|
||||
inline void Vec3::set(const Vec3& v)
|
||||
{
|
||||
this->x = v.x;
|
||||
this->y = v.y;
|
||||
this->z = v.z;
|
||||
}
|
||||
|
||||
inline void Vec3::set(const Vec3& p1, const Vec3& p2)
|
||||
{
|
||||
x = p2.x - p1.x;
|
||||
y = p2.y - p1.y;
|
||||
z = p2.z - p1.z;
|
||||
}
|
||||
|
||||
inline void Vec3::setZero()
|
||||
{
|
||||
x = y = z = 0.0f;
|
||||
}
|
||||
|
||||
inline void Vec3::subtract(const Vec3& v)
|
||||
{
|
||||
x -= v.x;
|
||||
y -= v.y;
|
||||
z -= v.z;
|
||||
}
|
||||
|
||||
inline const Vec3 Vec3::operator+(const Vec3& v) const
|
||||
{
|
||||
Vec3 result(*this);
|
||||
|
|
|
@ -713,7 +713,7 @@ std::string FileUtils::getNewFilename(const std::string &filename) const
|
|||
return newFileName;
|
||||
}
|
||||
|
||||
std::string FileUtils::getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath)
|
||||
std::string FileUtils::getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const
|
||||
{
|
||||
std::string file = filename;
|
||||
std::string file_path = "";
|
||||
|
@ -735,7 +735,7 @@ std::string FileUtils::getPathForFilename(const std::string& filename, const std
|
|||
return path;
|
||||
}
|
||||
|
||||
std::string FileUtils::fullPathForFilename(const std::string &filename)
|
||||
std::string FileUtils::fullPathForFilename(const std::string &filename) const
|
||||
{
|
||||
if (filename.empty())
|
||||
{
|
||||
|
@ -926,7 +926,7 @@ void FileUtils::loadFilenameLookupDictionaryFromFile(const std::string &filename
|
|||
}
|
||||
}
|
||||
|
||||
std::string FileUtils::getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename)
|
||||
std::string FileUtils::getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const
|
||||
{
|
||||
// get directory+filename, safely adding '/' as necessary
|
||||
std::string ret = directory;
|
||||
|
@ -948,7 +948,7 @@ std::string FileUtils::searchFullPathForFilename(const std::string& filename) co
|
|||
{
|
||||
return filename;
|
||||
}
|
||||
std::string path = const_cast<FileUtils*>(this)->fullPathForFilename(filename);
|
||||
std::string path = fullPathForFilename(filename);
|
||||
if (0 == path.compare(filename))
|
||||
{
|
||||
return "";
|
||||
|
@ -1010,7 +1010,7 @@ bool FileUtils::isDirectoryExistInternal(const std::string& dirPath) const
|
|||
|
||||
}
|
||||
|
||||
bool FileUtils::isDirectoryExist(const std::string& dirPath)
|
||||
bool FileUtils::isDirectoryExist(const std::string& dirPath) const
|
||||
{
|
||||
CCASSERT(!dirPath.empty(), "Invalid path");
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ bool FileUtils::isDirectoryExist(const std::string& dirPath)
|
|||
fullpath = searchIt + dirPath + resolutionIt;
|
||||
if (isDirectoryExistInternal(fullpath))
|
||||
{
|
||||
const_cast<FileUtils*>(this)->_fullPathCache.insert(std::make_pair(dirPath, fullpath));
|
||||
_fullPathCache.insert(std::make_pair(dirPath, fullpath));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1359,7 +1359,7 @@ void FileUtils::setPopupNotify(bool notify)
|
|||
s_popupNotify = notify;
|
||||
}
|
||||
|
||||
bool FileUtils::isPopupNotify()
|
||||
bool FileUtils::isPopupNotify() const
|
||||
{
|
||||
return s_popupNotify;
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ public:
|
|||
|
||||
@since v2.1
|
||||
*/
|
||||
virtual std::string fullPathForFilename(const std::string &filename);
|
||||
virtual std::string fullPathForFilename(const std::string &filename) const;
|
||||
|
||||
/**
|
||||
* Loads the filenameLookup dictionary from the contents of a filename.
|
||||
|
@ -311,7 +311,7 @@ public:
|
|||
/** Checks whether to pop up a message box when failed to load an image.
|
||||
* @return True if pop up a message box when failed to load an image, false if not.
|
||||
*/
|
||||
virtual bool isPopupNotify();
|
||||
virtual bool isPopupNotify() const;
|
||||
|
||||
/**
|
||||
* Converts the contents of a file to a ValueMap.
|
||||
|
@ -360,7 +360,7 @@ public:
|
|||
* @param dirPath The path of the directory, it could be a relative or an absolute path.
|
||||
* @return True if the directory exists, false if not.
|
||||
*/
|
||||
virtual bool isDirectoryExist(const std::string& dirPath);
|
||||
virtual bool isDirectoryExist(const std::string& dirPath) const;
|
||||
|
||||
/**
|
||||
* Creates a directory.
|
||||
|
@ -455,7 +455,7 @@ protected:
|
|||
* @param searchPath The search path.
|
||||
* @return The full path of the file. It will return an empty string if the full path of the file doesn't exist.
|
||||
*/
|
||||
virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath);
|
||||
virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const;
|
||||
|
||||
/**
|
||||
* Gets full path for the directory and the filename.
|
||||
|
@ -467,13 +467,12 @@ protected:
|
|||
* @param filename The name of the file.
|
||||
* @return The full path of the file, if the file can't be found, it will return an empty string.
|
||||
*/
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename);
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const;
|
||||
|
||||
/**
|
||||
* Returns the fullpath for a given filename.
|
||||
* This is an alternative for fullPathForFilename, there are two main differences:
|
||||
* First, it returns empty string instead of the original filename when no file found for the given name.
|
||||
* Secondly, it's a const function.
|
||||
* This is an alternative for fullPathForFilename
|
||||
* It returns empty string instead of the original filename when no file found for the given name.
|
||||
* @param filename The file name to look up for
|
||||
* @return The full path for the file, if not found, the return value will be an empty string
|
||||
*/
|
||||
|
@ -514,7 +513,7 @@ protected:
|
|||
* The full path cache. When a file is found, it will be added into this cache.
|
||||
* This variable is used for improving the performance of file search.
|
||||
*/
|
||||
std::unordered_map<std::string, std::string> _fullPathCache;
|
||||
mutable std::unordered_map<std::string, std::string> _fullPathCache;
|
||||
|
||||
/**
|
||||
* Writable path.
|
||||
|
|
|
@ -635,7 +635,6 @@ bool Image::isS3TC(const unsigned char * data, ssize_t dataLen)
|
|||
|
||||
if (strncmp(header->fileCode, "DDS", 3) != 0)
|
||||
{
|
||||
CCLOG("cocos2d: the file is not a dds file!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -647,7 +646,6 @@ bool Image::isATITC(const unsigned char *data, ssize_t dataLen)
|
|||
|
||||
if (strncmp(&header->identifier[1], "KTX", 3) != 0)
|
||||
{
|
||||
CCLOG("cocos3d: the file is not a ktx file!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -742,6 +740,7 @@ Image::Format Image::detectFormat(const unsigned char * data, ssize_t dataLen)
|
|||
}
|
||||
else
|
||||
{
|
||||
CCLOG("cocos2d: can't detect image format");
|
||||
return Format::UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
FileUtilsApple();
|
||||
/* override funtions */
|
||||
virtual std::string getWritablePath() const override;
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) override;
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const override;
|
||||
|
||||
virtual ValueMap getValueMapFromFile(const std::string& filename) override;
|
||||
virtual ValueMap getValueMapFromData(const char* filedata, int filesize);
|
||||
|
|
|
@ -392,7 +392,7 @@ bool FileUtilsApple::isFileExistInternal(const std::string& filePath) const
|
|||
return ret;
|
||||
}
|
||||
|
||||
std::string FileUtilsApple::getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename)
|
||||
std::string FileUtilsApple::getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const
|
||||
{
|
||||
if (directory[0] != '/')
|
||||
{
|
||||
|
|
|
@ -104,67 +104,27 @@ LanguageType Application::getCurrentLanguage()
|
|||
NSDictionary* temp = [NSLocale componentsFromLocaleIdentifier:currentLanguage];
|
||||
NSString * languageCode = [temp objectForKey:NSLocaleLanguageCode];
|
||||
|
||||
LanguageType ret = LanguageType::ENGLISH;
|
||||
if ([languageCode isEqualToString:@"zh"])
|
||||
{
|
||||
ret = LanguageType::CHINESE;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"en"])
|
||||
{
|
||||
ret = LanguageType::ENGLISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"fr"]){
|
||||
ret = LanguageType::FRENCH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"it"]){
|
||||
ret = LanguageType::ITALIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"de"]){
|
||||
ret = LanguageType::GERMAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"es"]){
|
||||
ret = LanguageType::SPANISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"nl"]){
|
||||
ret = LanguageType::DUTCH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ru"]){
|
||||
ret = LanguageType::RUSSIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ko"]){
|
||||
ret = LanguageType::KOREAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ja"]){
|
||||
ret = LanguageType::JAPANESE;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"hu"]){
|
||||
ret = LanguageType::HUNGARIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"pt"]){
|
||||
ret = LanguageType::PORTUGUESE;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ar"]){
|
||||
ret = LanguageType::ARABIC;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"nb"]){
|
||||
ret = LanguageType::NORWEGIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"pl"]){
|
||||
ret = LanguageType::POLISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"tr"]){
|
||||
ret = LanguageType::TURKISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"uk"]){
|
||||
ret = LanguageType::UKRAINIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ro"]){
|
||||
ret = LanguageType::ROMANIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"bg"]){
|
||||
ret = LanguageType::BULGARIAN;
|
||||
}
|
||||
return ret;
|
||||
if ([languageCode isEqualToString:@"zh"]) return LanguageType::CHINESE;
|
||||
if ([languageCode isEqualToString:@"en"]) return LanguageType::ENGLISH;
|
||||
if ([languageCode isEqualToString:@"fr"]) return LanguageType::FRENCH;
|
||||
if ([languageCode isEqualToString:@"it"]) return LanguageType::ITALIAN;
|
||||
if ([languageCode isEqualToString:@"de"]) return LanguageType::GERMAN;
|
||||
if ([languageCode isEqualToString:@"es"]) return LanguageType::SPANISH;
|
||||
if ([languageCode isEqualToString:@"nl"]) return LanguageType::DUTCH;
|
||||
if ([languageCode isEqualToString:@"ru"]) return LanguageType::RUSSIAN;
|
||||
if ([languageCode isEqualToString:@"ko"]) return LanguageType::KOREAN;
|
||||
if ([languageCode isEqualToString:@"ja"]) return LanguageType::JAPANESE;
|
||||
if ([languageCode isEqualToString:@"hu"]) return LanguageType::HUNGARIAN;
|
||||
if ([languageCode isEqualToString:@"pt"]) return LanguageType::PORTUGUESE;
|
||||
if ([languageCode isEqualToString:@"ar"]) return LanguageType::ARABIC;
|
||||
if ([languageCode isEqualToString:@"nb"]) return LanguageType::NORWEGIAN;
|
||||
if ([languageCode isEqualToString:@"pl"]) return LanguageType::POLISH;
|
||||
if ([languageCode isEqualToString:@"tr"]) return LanguageType::TURKISH;
|
||||
if ([languageCode isEqualToString:@"uk"]) return LanguageType::UKRAINIAN;
|
||||
if ([languageCode isEqualToString:@"ro"]) return LanguageType::ROMANIAN;
|
||||
if ([languageCode isEqualToString:@"bg"]) return LanguageType::BULGARIAN;
|
||||
return LanguageType::ENGLISH;
|
||||
|
||||
}
|
||||
|
||||
Application::Platform Application::getTargetPlatform()
|
||||
|
|
|
@ -160,65 +160,27 @@ LanguageType Application::getCurrentLanguage()
|
|||
NSDictionary* temp = [NSLocale componentsFromLocaleIdentifier:currentLanguage];
|
||||
NSString * languageCode = [temp objectForKey:NSLocaleLanguageCode];
|
||||
|
||||
LanguageType ret = LanguageType::ENGLISH;
|
||||
if ([languageCode isEqualToString:@"zh"]){
|
||||
ret = LanguageType::CHINESE;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"en"]){
|
||||
ret = LanguageType::ENGLISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"fr"]){
|
||||
ret = LanguageType::FRENCH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"it"]){
|
||||
ret = LanguageType::ITALIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"de"]){
|
||||
ret = LanguageType::GERMAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"es"]){
|
||||
ret = LanguageType::SPANISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"nl"]){
|
||||
ret = LanguageType::DUTCH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ru"]){
|
||||
ret = LanguageType::RUSSIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ko"]){
|
||||
ret = LanguageType::KOREAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ja"]){
|
||||
ret = LanguageType::JAPANESE;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"hu"]){
|
||||
ret = LanguageType::HUNGARIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"pt"]){
|
||||
ret = LanguageType::PORTUGUESE;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ar"]){
|
||||
ret = LanguageType::ARABIC;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"nb"]){
|
||||
ret = LanguageType::NORWEGIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"pl"]){
|
||||
ret = LanguageType::POLISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"tr"]){
|
||||
ret = LanguageType::TURKISH;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"uk"]){
|
||||
ret = LanguageType::UKRAINIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ro"]){
|
||||
ret = LanguageType::ROMANIAN;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"bg"]){
|
||||
ret = LanguageType::BULGARIAN;
|
||||
}
|
||||
return ret;
|
||||
if ([languageCode isEqualToString:@"zh"]) return LanguageType::CHINESE;
|
||||
if ([languageCode isEqualToString:@"en"]) return LanguageType::ENGLISH;
|
||||
if ([languageCode isEqualToString:@"fr"]) return LanguageType::FRENCH;
|
||||
if ([languageCode isEqualToString:@"it"]) return LanguageType::ITALIAN;
|
||||
if ([languageCode isEqualToString:@"de"]) return LanguageType::GERMAN;
|
||||
if ([languageCode isEqualToString:@"es"]) return LanguageType::SPANISH;
|
||||
if ([languageCode isEqualToString:@"nl"]) return LanguageType::DUTCH;
|
||||
if ([languageCode isEqualToString:@"ru"]) return LanguageType::RUSSIAN;
|
||||
if ([languageCode isEqualToString:@"ko"]) return LanguageType::KOREAN;
|
||||
if ([languageCode isEqualToString:@"ja"]) return LanguageType::JAPANESE;
|
||||
if ([languageCode isEqualToString:@"hu"]) return LanguageType::HUNGARIAN;
|
||||
if ([languageCode isEqualToString:@"pt"]) return LanguageType::PORTUGUESE;
|
||||
if ([languageCode isEqualToString:@"ar"]) return LanguageType::ARABIC;
|
||||
if ([languageCode isEqualToString:@"nb"]) return LanguageType::NORWEGIAN;
|
||||
if ([languageCode isEqualToString:@"pl"]) return LanguageType::POLISH;
|
||||
if ([languageCode isEqualToString:@"tr"]) return LanguageType::TURKISH;
|
||||
if ([languageCode isEqualToString:@"uk"]) return LanguageType::UKRAINIAN;
|
||||
if ([languageCode isEqualToString:@"ro"]) return LanguageType::ROMANIAN;
|
||||
if ([languageCode isEqualToString:@"bg"]) return LanguageType::BULGARIAN;
|
||||
return LanguageType::ENGLISH;
|
||||
|
||||
}
|
||||
|
||||
bool Application::openURL(const std::string &url)
|
||||
|
|
|
@ -264,7 +264,7 @@ unsigned char* FileUtilsWin32::getFileData(const std::string& filename, const ch
|
|||
return pBuffer;
|
||||
}
|
||||
|
||||
std::string FileUtilsWin32::getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath)
|
||||
std::string FileUtilsWin32::getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const
|
||||
{
|
||||
std::string unixFileName = convertPathFormatToUnixStyle(filename);
|
||||
std::string unixResolutionDirectory = convertPathFormatToUnixStyle(resolutionDirectory);
|
||||
|
@ -273,7 +273,7 @@ std::string FileUtilsWin32::getPathForFilename(const std::string& filename, cons
|
|||
return FileUtils::getPathForFilename(unixFileName, unixResolutionDirectory, unixSearchPath);
|
||||
}
|
||||
|
||||
std::string FileUtilsWin32::getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename)
|
||||
std::string FileUtilsWin32::getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename) const
|
||||
{
|
||||
std::string unixDirectory = convertPathFormatToUnixStyle(strDirectory);
|
||||
std::string unixFilename = convertPathFormatToUnixStyle(strFilename);
|
||||
|
|
|
@ -85,7 +85,7 @@ protected:
|
|||
* @param searchPath The search path.
|
||||
* @return The full path of the file. It will return an empty string if the full path of the file doesn't exist.
|
||||
*/
|
||||
virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) override;
|
||||
virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const override;
|
||||
|
||||
/**
|
||||
* Gets full path for the directory and the filename.
|
||||
|
@ -97,7 +97,7 @@ protected:
|
|||
* @param filename The name of the file.
|
||||
* @return The full path of the file, if the file can't be found, it will return an empty string.
|
||||
*/
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) override;
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename) const override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ bool CCFileUtilsWinRT::init()
|
|||
return FileUtils::init();
|
||||
}
|
||||
|
||||
std::string CCFileUtilsWinRT::getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath)
|
||||
std::string CCFileUtilsWinRT::getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const
|
||||
{
|
||||
std::string unixFileName = convertPathFormatToUnixStyle(filename);
|
||||
std::string unixResolutionDirectory = convertPathFormatToUnixStyle(resolutionDirectory);
|
||||
|
@ -93,7 +93,7 @@ std::string CCFileUtilsWinRT::getPathForFilename(const std::string& filename, co
|
|||
return FileUtils::getPathForFilename(unixFileName, unixResolutionDirectory, unixSearchPath);
|
||||
}
|
||||
|
||||
std::string CCFileUtilsWinRT::getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename)
|
||||
std::string CCFileUtilsWinRT::getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename) const
|
||||
{
|
||||
std::string unixDirectory = convertPathFormatToUnixStyle(strDirectory);
|
||||
std::string unixFilename = convertPathFormatToUnixStyle(strFilename);
|
||||
|
|
|
@ -49,8 +49,8 @@ public:
|
|||
bool init();
|
||||
virtual std::string getWritablePath() const;
|
||||
virtual bool isAbsolutePath(const std::string& strPath) const;
|
||||
virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) override;
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename) override;
|
||||
virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath) const override;
|
||||
virtual std::string getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename) const override;
|
||||
virtual std::string getStringFromFile(const std::string& filename) override;
|
||||
static std::string getAppPath();
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@ THE SOFTWARE.
|
|||
#define generic GenericFromFreeTypeLibrary
|
||||
#define internal InternalFromFreeTypeLibrary
|
||||
#include <ft2build.h>
|
||||
#include <freetype/freetype.h>
|
||||
#include <freetype/ftglyph.h>
|
||||
#include <freetype/ftoutln.h>
|
||||
#include <freetype/fttrigon.h>
|
||||
#include <freetype.h>
|
||||
#include <ftglyph.h>
|
||||
#include <ftoutln.h>
|
||||
#include <fttrigon.h>
|
||||
#undef generic
|
||||
#undef internal
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ void MeshCommand::setLightUniforms()
|
|||
Vec3 dir = dirLight->getDirectionInWorld();
|
||||
dir.normalize();
|
||||
const Color3B &col = dirLight->getDisplayedColor();
|
||||
s_dirLightUniformColorValues[enabledDirLightNum] = Vec3(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
s_dirLightUniformColorValues[enabledDirLightNum].set(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
s_dirLightUniformDirValues[enabledDirLightNum] = dir;
|
||||
++enabledDirLightNum;
|
||||
}
|
||||
|
@ -437,8 +437,8 @@ void MeshCommand::setLightUniforms()
|
|||
auto pointLight = static_cast<PointLight *>(light);
|
||||
Mat4 mat= pointLight->getNodeToWorldTransform();
|
||||
const Color3B &col = pointLight->getDisplayedColor();
|
||||
s_pointLightUniformColorValues[enabledPointLightNum] = Vec3(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
s_pointLightUniformPositionValues[enabledPointLightNum] = Vec3(mat.m[12], mat.m[13], mat.m[14]);
|
||||
s_pointLightUniformColorValues[enabledPointLightNum].set(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
s_pointLightUniformPositionValues[enabledPointLightNum].set(mat.m[12], mat.m[13], mat.m[14]);
|
||||
s_pointLightUniformRangeInverseValues[enabledPointLightNum] = 1.0f / pointLight->getRange();
|
||||
++enabledPointLightNum;
|
||||
}
|
||||
|
@ -453,8 +453,8 @@ void MeshCommand::setLightUniforms()
|
|||
dir.normalize();
|
||||
Mat4 mat= light->getNodeToWorldTransform();
|
||||
const Color3B &col = spotLight->getDisplayedColor();
|
||||
s_spotLightUniformColorValues[enabledSpotLightNum] = Vec3(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
s_spotLightUniformPositionValues[enabledSpotLightNum] = Vec3(mat.m[12], mat.m[13], mat.m[14]);
|
||||
s_spotLightUniformColorValues[enabledSpotLightNum].set(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
s_spotLightUniformPositionValues[enabledSpotLightNum].set(mat.m[12], mat.m[13], mat.m[14]);
|
||||
s_spotLightUniformDirValues[enabledSpotLightNum] = dir;
|
||||
s_spotLightUniformInnerAngleCosValues[enabledSpotLightNum] = spotLight->getCosInnerAngle();
|
||||
s_spotLightUniformOuterAngleCosValues[enabledSpotLightNum] = spotLight->getCosOuterAngle();
|
||||
|
@ -467,7 +467,7 @@ void MeshCommand::setLightUniforms()
|
|||
{
|
||||
auto ambLight = static_cast<AmbientLight *>(light);
|
||||
const Color3B &col = ambLight->getDisplayedColor();
|
||||
ambientColor += Vec3(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
ambientColor.add(col.r / 255.0f * intensity, col.g / 255.0f * intensity, col.b / 255.0f * intensity);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -38,9 +38,11 @@
|
|||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Disable all effect to Label.
|
||||
-- @overload self, int
|
||||
-- @overload self
|
||||
-- @function [parent=#Label] disableEffect
|
||||
-- @param self
|
||||
-- @param #int effect
|
||||
-- @return Label#Label self (return value: cc.Label)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Terrain
|
||||
-- @extend Node
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- initialize heightMap data
|
||||
-- @function [parent=#Terrain] initHeightMap
|
||||
-- @param self
|
||||
-- @param #char heightMap
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set the MaxDetailAmount.
|
||||
-- @function [parent=#Terrain] setMaxDetailMapAmount
|
||||
-- @param self
|
||||
-- @param #int maxValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- show the wireline instead of the surface,Debug Use only.<br>
|
||||
-- Note only support desktop platform
|
||||
-- @function [parent=#Terrain] setDrawWire
|
||||
-- @param self
|
||||
-- @param #bool boolValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- Switch frustum Culling Flag<br>
|
||||
-- Note frustum culling will remarkable improve your terrain rendering performance.
|
||||
-- @function [parent=#Terrain] setIsEnableFrustumCull
|
||||
-- @param self
|
||||
-- @param #bool boolValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- set the Detail Map
|
||||
-- @function [parent=#Terrain] setDetailMap
|
||||
-- @param self
|
||||
-- @param #unsigned int index
|
||||
-- @param #cc.Terrain::DetailMap detailMap
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- reset the heightmap data.
|
||||
-- @function [parent=#Terrain] resetHeightMap
|
||||
-- @param self
|
||||
-- @param #char heightMap
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- set the alpha map
|
||||
-- @function [parent=#Terrain] setAlphaMap
|
||||
-- @param self
|
||||
-- @param #cc.Texture2D newAlphaMapTexture
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- set the skirt height ratio
|
||||
-- @function [parent=#Terrain] setSkirtHeightRatio
|
||||
-- @param self
|
||||
-- @param #float ratio
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- Convert a world Space position (X,Z) to terrain space position (X,Z)
|
||||
-- @function [parent=#Terrain] convertToTerrainSpace
|
||||
-- @param self
|
||||
-- @param #vec2_table worldSpace
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
||||
--------------------------------
|
||||
-- initialize alphaMap ,detailMaps textures
|
||||
-- @function [parent=#Terrain] initTextures
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- initialize all Properties which terrain need
|
||||
-- @function [parent=#Terrain] initProperties
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Set threshold distance of each LOD level,must equal or gereater than the chunk size<br>
|
||||
-- Note when invoke initHeightMap, the LOD distance will be automatic calculated.
|
||||
-- @function [parent=#Terrain] setLODDistance
|
||||
-- @param self
|
||||
-- @param #float lod1
|
||||
-- @param #float lod2
|
||||
-- @param #float lod3
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- get the normal of the specified pistion in terrain<br>
|
||||
-- return the normal vector of the specified position of the terrain.<br>
|
||||
-- note the fast normal calculation may not get precise normal vector.
|
||||
-- @function [parent=#Terrain] getNormal
|
||||
-- @param self
|
||||
-- @param #int pixelX
|
||||
-- @param #int pixelY
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- get height from the raw height filed
|
||||
-- @function [parent=#Terrain] getImageHeight
|
||||
-- @param self
|
||||
-- @param #int pixelX
|
||||
-- @param #int pixelY
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get the terrain's maximum height.
|
||||
-- @function [parent=#Terrain] getMaxHeight
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get the terrain's mininal height.
|
||||
-- @function [parent=#Terrain] getMinHeight
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Terrain] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #mat4_table transform
|
||||
-- @param #unsigned int flags
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
return nil
|
|
@ -4,12 +4,24 @@
|
|||
-- @extend Scene
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#TransitionScene] getInScene
|
||||
-- @param self
|
||||
-- @return Scene#Scene ret (return value: cc.Scene)
|
||||
|
||||
--------------------------------
|
||||
-- Called after the transition finishes.
|
||||
-- @function [parent=#TransitionScene] finish
|
||||
-- @param self
|
||||
-- @return TransitionScene#TransitionScene self (return value: cc.TransitionScene)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#TransitionScene] getDuration
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Used by some transitions to hide the outer scene.
|
||||
-- @function [parent=#TransitionScene] hideOutShowIn
|
||||
|
|
|
@ -51,4 +51,9 @@
|
|||
-- @field [parent=#cc] Skybox#Skybox Skybox preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Terrain
|
||||
-- @field [parent=#cc] Terrain#Terrain Terrain preloaded module
|
||||
|
||||
|
||||
return nil
|
||||
|
|
|
@ -3408,6 +3408,845 @@ int lua_register_cocos2dx_3d_Skybox(lua_State* tolua_S)
|
|||
g_typeCast["Skybox"] = "cc.Skybox";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_Terrain_initHeightMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_initHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char* arg0;
|
||||
|
||||
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:initHeightMap"); arg0 = arg0_tmp.c_str();
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_initHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->initHeightMap(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:initHeightMap",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_initHeightMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:setMaxDetailMapAmount");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setMaxDetailMapAmount(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setDrawWire(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setIsEnableFrustumCull(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
unsigned int arg0;
|
||||
cocos2d::Terrain::DetailMap arg1;
|
||||
|
||||
ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap");
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR DetailMap
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setDetailMap(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char* arg0;
|
||||
|
||||
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str();
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->resetHeightMap(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setAlphaMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setAlphaMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Texture2D* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 2, "cc.Texture2D",&arg0);
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setAlphaMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setAlphaMap(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setAlphaMap",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setAlphaMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setSkirtHeightRatio(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setSkirtHeightRatio'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
double arg0;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setSkirtHeightRatio");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setSkirtHeightRatio'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setSkirtHeightRatio(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setSkirtHeightRatio",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setSkirtHeightRatio'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_convertToTerrainSpace(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_convertToTerrainSpace'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Vec2 arg0;
|
||||
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Terrain:convertToTerrainSpace");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_convertToTerrainSpace'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Vec2 ret = cobj->convertToTerrainSpace(arg0);
|
||||
vec2_to_luaval(tolua_S, ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:convertToTerrainSpace",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_convertToTerrainSpace'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_initTextures(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_initTextures'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_initTextures'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->initTextures();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:initTextures",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_initTextures'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_initProperties(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_initProperties'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_initProperties'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->initProperties();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:initProperties",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_initProperties'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 3)
|
||||
{
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance");
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance");
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setLODDistance(arg0, arg1, arg2);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getNormal'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
int arg0;
|
||||
int arg1;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:getNormal");
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Terrain:getNormal");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getNormal'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Vec3 ret = cobj->getNormal(arg0, arg1);
|
||||
vec3_to_luaval(tolua_S, ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getNormal",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getNormal'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getImageHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
int arg0;
|
||||
int arg1;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:getImageHeight");
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Terrain:getImageHeight");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getImageHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getImageHeight(arg0, arg1);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getImageHeight",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getImageHeight'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getMaxHeight();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMaxHeight",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getMinHeight();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMinHeight",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMinHeight'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_3d_Terrain_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (Terrain)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.Terrain");
|
||||
tolua_cclass(tolua_S,"Terrain","cc.Terrain","cc.Node",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"Terrain");
|
||||
tolua_function(tolua_S,"initHeightMap",lua_cocos2dx_3d_Terrain_initHeightMap);
|
||||
tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount);
|
||||
tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire);
|
||||
tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull);
|
||||
tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap);
|
||||
tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap);
|
||||
tolua_function(tolua_S,"setAlphaMap",lua_cocos2dx_3d_Terrain_setAlphaMap);
|
||||
tolua_function(tolua_S,"setSkirtHeightRatio",lua_cocos2dx_3d_Terrain_setSkirtHeightRatio);
|
||||
tolua_function(tolua_S,"convertToTerrainSpace",lua_cocos2dx_3d_Terrain_convertToTerrainSpace);
|
||||
tolua_function(tolua_S,"initTextures",lua_cocos2dx_3d_Terrain_initTextures);
|
||||
tolua_function(tolua_S,"initProperties",lua_cocos2dx_3d_Terrain_initProperties);
|
||||
tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance);
|
||||
tolua_function(tolua_S,"getNormal",lua_cocos2dx_3d_Terrain_getNormal);
|
||||
tolua_function(tolua_S,"getImageHeight",lua_cocos2dx_3d_Terrain_getImageHeight);
|
||||
tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight);
|
||||
tolua_function(tolua_S,"getMinHeight",lua_cocos2dx_3d_Terrain_getMinHeight);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::Terrain).name();
|
||||
g_luaType[typeName] = "cc.Terrain";
|
||||
g_typeCast["Terrain"] = "cc.Terrain";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
@ -3420,6 +4259,7 @@ TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_3d_AttachNode(tolua_S);
|
||||
lua_register_cocos2dx_3d_TextureCube(tolua_S);
|
||||
lua_register_cocos2dx_3d_Sprite3DCache(tolua_S);
|
||||
lua_register_cocos2dx_3d_Terrain(tolua_S);
|
||||
lua_register_cocos2dx_3d_Skybox(tolua_S);
|
||||
lua_register_cocos2dx_3d_BillBoard(tolua_S);
|
||||
lua_register_cocos2dx_3d_Animation3D(tolua_S);
|
||||
|
|
|
@ -68,6 +68,23 @@ int register_all_cocos2dx_3d(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -38637,18 +38637,14 @@ int lua_cocos2dx_Label_disableEffect(lua_State* tolua_S)
|
|||
int argc = 0;
|
||||
cocos2d::Label* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Label",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Label*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
|
@ -38656,19 +38652,27 @@ int lua_cocos2dx_Label_disableEffect(lua_State* tolua_S)
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Label_disableEffect'", nullptr);
|
||||
return 0;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::LabelEffect arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Label:disableEffect");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->disableEffect(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 0) {
|
||||
cobj->disableEffect();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Label:disableEffect",argc, 0);
|
||||
return 0;
|
||||
|
||||
|
@ -42303,6 +42307,53 @@ int lua_register_cocos2dx_TransitionEaseScene(lua_State* tolua_S)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_TransitionScene_getInScene(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TransitionScene* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_getInScene'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_getInScene'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Scene* ret = cobj->getInScene();
|
||||
object_to_luaval<cocos2d::Scene>(tolua_S, "cc.Scene",(cocos2d::Scene*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:getInScene",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_getInScene'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_TransitionScene_finish(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -42350,6 +42401,53 @@ int lua_cocos2dx_TransitionScene_finish(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_TransitionScene_getDuration(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TransitionScene* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.TransitionScene",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::TransitionScene*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TransitionScene_getDuration'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_getDuration'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getDuration();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TransitionScene:getDuration",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TransitionScene_getDuration'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_TransitionScene_hideOutShowIn(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -42447,7 +42545,9 @@ int lua_register_cocos2dx_TransitionScene(lua_State* tolua_S)
|
|||
tolua_cclass(tolua_S,"TransitionScene","cc.TransitionScene","cc.Scene",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"TransitionScene");
|
||||
tolua_function(tolua_S,"getInScene",lua_cocos2dx_TransitionScene_getInScene);
|
||||
tolua_function(tolua_S,"finish",lua_cocos2dx_TransitionScene_finish);
|
||||
tolua_function(tolua_S,"getDuration",lua_cocos2dx_TransitionScene_getDuration);
|
||||
tolua_function(tolua_S,"hideOutShowIn",lua_cocos2dx_TransitionScene_hideOutShowIn);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_TransitionScene_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
|
|
|
@ -1632,6 +1632,8 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ tolua_lerror:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_Sprite3D_createAsync(lua_State* tolua_S)
|
||||
int lua_cocos2dx_3d_Sprite3D_createAsync(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
@ -125,39 +125,39 @@ int lua_cocos2dx_3d_Sprite3D_createAsync(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(L,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
argc = lua_gettop(L)-1;
|
||||
|
||||
do
|
||||
{
|
||||
if (argc == 3)
|
||||
{
|
||||
std::string modelPath;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&modelPath, "cc.Sprite3D:createAsync");
|
||||
ok &= luaval_to_std_string(L, 2,&modelPath, "cc.Sprite3D:createAsync");
|
||||
if (!ok)
|
||||
break;
|
||||
std::string texturePath;
|
||||
ok &= luaval_to_std_string(tolua_S, 3,&texturePath, "cc.Sprite3D:createAsync");
|
||||
ok &= luaval_to_std_string(L, 3,&texturePath, "cc.Sprite3D:createAsync");
|
||||
if (!ok)
|
||||
break;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!toluafix_isfunction(tolua_S,4,"LUA_FUNCTION",0,&tolua_err)) {
|
||||
if (!toluafix_isfunction(L,4,"LUA_FUNCTION",0,&tolua_err)) {
|
||||
goto tolua_lerror;
|
||||
}
|
||||
#endif
|
||||
LUA_FUNCTION handler = toluafix_ref_function(tolua_S,4,0);
|
||||
LUA_FUNCTION handler = toluafix_ref_function(L,4,0);
|
||||
|
||||
cocos2d::Sprite3D::createAsync(modelPath, texturePath, [=](cocos2d::Sprite3D* sprite, void* callbackparam){
|
||||
int id = (sprite) ? (int)sprite->_ID : -1;
|
||||
int* luaID = (sprite) ? &sprite->_luaID : nullptr;
|
||||
toluafix_pushusertype_ccobject(tolua_S, id, luaID, (void*)sprite,"cc.Sprite3D");
|
||||
toluafix_pushusertype_ccobject(L, id, luaID, (void*)sprite,"cc.Sprite3D");
|
||||
LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 1);
|
||||
}, nullptr);
|
||||
|
||||
lua_settop(tolua_S, 1);
|
||||
lua_settop(L, 1);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
|
@ -167,34 +167,34 @@ int lua_cocos2dx_3d_Sprite3D_createAsync(lua_State* tolua_S)
|
|||
if (argc == 2)
|
||||
{
|
||||
std::string modelPath;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&modelPath, "cc.Sprite3D:createAsync");
|
||||
ok &= luaval_to_std_string(L, 2,&modelPath, "cc.Sprite3D:createAsync");
|
||||
if (!ok)
|
||||
break;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!toluafix_isfunction(tolua_S, 3, "LUA_FUNCTION", 0, &tolua_err)) {
|
||||
if (!toluafix_isfunction(L, 3, "LUA_FUNCTION", 0, &tolua_err)) {
|
||||
goto tolua_lerror;
|
||||
}
|
||||
#endif
|
||||
LUA_FUNCTION handler = toluafix_ref_function(tolua_S, 3, 0);
|
||||
LUA_FUNCTION handler = toluafix_ref_function(L, 3, 0);
|
||||
|
||||
cocos2d::Sprite3D::createAsync(modelPath, [=](cocos2d::Sprite3D* sprite, void* callbackparam){
|
||||
int id = (sprite) ? (int)sprite->_ID : -1;
|
||||
int* luaID = (sprite) ? &sprite->_luaID : nullptr;
|
||||
toluafix_pushusertype_ccobject(tolua_S, id, luaID, (void*)sprite,"cc.Sprite3D");
|
||||
toluafix_pushusertype_ccobject(L, id, luaID, (void*)sprite,"cc.Sprite3D");
|
||||
LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 1);
|
||||
}, nullptr);
|
||||
|
||||
lua_settop(tolua_S, 1);
|
||||
lua_settop(L, 1);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:createAsync",argc, 3);
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:createAsync",argc, 3);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_createAsync'.",&tolua_err);
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_createAsync'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -212,12 +212,327 @@ static void extendSprite3D(lua_State* L)
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
bool luaval_to_terraindata(lua_State* L, int lo, cocos2d::Terrain::TerrainData* outValue , const char* funcName = "")
|
||||
{
|
||||
if (nullptr == L || nullptr == outValue)
|
||||
return false;
|
||||
|
||||
bool ok = true;
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_istable(L, lo, 0, &tolua_err))
|
||||
{
|
||||
#if COCOS2D_DEBUG >=1
|
||||
luaval_to_native_err(L,"#ferror:",&tolua_err,funcName);
|
||||
ok = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
lua_pushstring(L, "chunkSize");
|
||||
lua_gettable(L,lo);
|
||||
if (!lua_isnil(L, -1))
|
||||
{
|
||||
luaval_to_size(L, -1, &(outValue->chunkSize));
|
||||
}
|
||||
else
|
||||
{
|
||||
outValue->chunkSize = cocos2d::Size(32, 32);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "heightMapSrc");
|
||||
lua_gettable(L,lo);
|
||||
outValue->heightMapSrc = tolua_tocppstring(L, -1, "");
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "alphaMapSrc");
|
||||
lua_gettable(L,lo);
|
||||
outValue->alphaMapSrc = const_cast<char*>(tolua_tocppstring(L, -1, ""));
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "detailMaps");
|
||||
lua_gettable(L,lo);
|
||||
if (lua_istable(L, -1))
|
||||
{
|
||||
size_t len = lua_objlen(L, -1);
|
||||
for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
lua_pushnumber(L,i + 1);
|
||||
lua_gettable(L,-2);
|
||||
if (lua_istable(L, -1))
|
||||
{
|
||||
lua_pushstring(L, "detailMapSrc");
|
||||
lua_gettable(L,-2);
|
||||
outValue->detailMaps[i].detailMapSrc = tolua_tocppstring(L, -1, "");
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "detailMapSize");
|
||||
lua_gettable(L,-2);
|
||||
outValue->detailMaps[i].detailMapSize = lua_isnil(L,-1) ? 0.0f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
}
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "mapHeight");
|
||||
lua_gettable(L,lo);
|
||||
outValue->mapHeight = lua_isnil(L,-1) ? 2.0f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "mapScale");
|
||||
lua_gettable(L,lo);
|
||||
outValue->mapScale = lua_isnil(L,-1) ? 0.1f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "_detailMapAmount");
|
||||
lua_gettable(L,lo);
|
||||
outValue->_detailMapAmount = lua_isnil(L,-1) ? 0 : (int)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "skirtHeightRatio");
|
||||
lua_gettable(L,lo);
|
||||
outValue->skirtHeightRatio = lua_isnil(L,-1) ? 1.0f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
void terraindata_to_luaval(lua_State* L,const cocos2d::Terrain::TerrainData& inValue)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return;
|
||||
|
||||
lua_newtable(L);
|
||||
lua_pushstring(L, "chunkSize");
|
||||
size_to_luaval(L, inValue.chunkSize);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
if (inValue.heightMapSrc.length() > 0)
|
||||
{
|
||||
lua_pushstring(L, "heightMapSrc");
|
||||
lua_pushstring(L, inValue.heightMapSrc.c_str());
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
if (nullptr != inValue.alphaMapSrc)
|
||||
{
|
||||
lua_pushstring(L, "alphaMapSrc");
|
||||
lua_pushstring(L, inValue.alphaMapSrc);
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
lua_pushstring(L, "detailMaps");
|
||||
lua_newtable(L);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
lua_pushnumber(L, (lua_Number) i + 1);
|
||||
lua_newtable(L);
|
||||
|
||||
lua_pushstring(L, "detailMapSrc");
|
||||
lua_pushstring(L, inValue.detailMaps[i].detailMapSrc.c_str());
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "detailMapSize");
|
||||
lua_pushnumber(L, (lua_Number)inValue.detailMaps[i].detailMapSize);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
lua_rawset(L, -3);
|
||||
|
||||
|
||||
lua_pushstring(L, "mapHeight");
|
||||
lua_pushnumber(L, (lua_Number)inValue.mapHeight);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "mapScale");
|
||||
lua_pushnumber(L, (lua_Number)inValue.mapScale);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "_detailMapAmount");
|
||||
lua_pushnumber(L, (lua_Number)inValue._detailMapAmount);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "skirtHeightRatio");
|
||||
lua_pushnumber(L, (lua_Number)inValue.skirtHeightRatio);
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_Terrain_create(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(L,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Terrain::TerrainData arg0;
|
||||
ok &= luaval_to_terraindata(L, 2, &arg0);
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Terrain* ret = cocos2d::Terrain::create(arg0);
|
||||
object_to_luaval<cocos2d::Terrain>(L, "cc.Terrain",(cocos2d::Terrain*)ret);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
cocos2d::Terrain::TerrainData arg0;
|
||||
cocos2d::Terrain::CrackFixedType arg1;
|
||||
|
||||
ok &= luaval_to_terraindata(L, 2, &arg0);
|
||||
ok &= luaval_to_int32(L, 3,(int *)&arg1, "cc.Terrain:create");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(L,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Terrain* ret = cocos2d::Terrain::create(arg0, arg1);
|
||||
object_to_luaval<cocos2d::Terrain>(L, "cc.Terrain",(cocos2d::Terrain*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Terrain:create",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_3d_Terrain_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_Terrain_getHeight(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(L,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(L,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(L,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(L)-1;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::Vec2 arg0;
|
||||
ok &= luaval_to_vec2(L, 2, &arg0, "cc.Terrain:getHeight");
|
||||
|
||||
if (!ok) { break; }
|
||||
double ret = cobj->getHeight(arg0);
|
||||
tolua_pushnumber(L,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
cocos2d::Vec2 arg0;
|
||||
ok &= luaval_to_vec2(L, 2, &arg0, "cc.Terrain:getHeight");
|
||||
|
||||
if (!ok) { break; }
|
||||
cocos2d::Vec3* arg1;
|
||||
ok &= luaval_to_object<cocos2d::Vec3>(L, 3, "cc.Vec3",&arg1);
|
||||
|
||||
if (!ok) { break; }
|
||||
double ret = cobj->getHeight(arg0, arg1);
|
||||
tolua_pushnumber(L,(lua_Number)ret);
|
||||
vec3_to_luaval(L, *arg1);
|
||||
return 2;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
double arg0;
|
||||
ok &= luaval_to_number(L, 2,&arg0, "cc.Terrain:getHeight");
|
||||
|
||||
if (!ok) { break; }
|
||||
double arg1;
|
||||
ok &= luaval_to_number(L, 3,&arg1, "cc.Terrain:getHeight");
|
||||
|
||||
if (!ok) { break; }
|
||||
double ret = cobj->getHeight(arg0, arg1);
|
||||
tolua_pushnumber(L,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 3) {
|
||||
double arg0;
|
||||
ok &= luaval_to_number(L, 2,&arg0, "cc.Terrain:getHeight");
|
||||
|
||||
if (!ok) { break; }
|
||||
double arg1;
|
||||
ok &= luaval_to_number(L, 3,&arg1, "cc.Terrain:getHeight");
|
||||
|
||||
if (!ok) { break; }
|
||||
cocos2d::Vec3 arg2;
|
||||
ok &= luaval_to_vec3(L, 4, &arg2);
|
||||
|
||||
if (!ok) { break; }
|
||||
double ret = cobj->getHeight(arg0, arg1, &arg2);
|
||||
tolua_pushnumber(L,(lua_Number)ret);
|
||||
vec3_to_luaval(L, arg2);
|
||||
return 2;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getHeight",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'lua_cocos2dx_3d_Terrain_getHeight'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void extendTerrain(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "cc.Terrain");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "create", lua_cocos2dx_3d_Terrain_create);
|
||||
tolua_function(L, "getHeight", lua_cocos2dx_3d_Terrain_getHeight);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int register_all_cocos2dx_3d_manual(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
extendSprite3D(L);
|
||||
extendTerrain(L);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -7088,6 +7088,56 @@ tolua_lerror:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_Application_is64BitIOSDevice(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Application* cobj = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Application",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Application*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Application_is64BitIOSDevice'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
bool is64BitIOSDevice = false;
|
||||
Application::Platform platform = cocos2d::Application::getInstance()->getTargetPlatform();
|
||||
if (Application::Platform::OS_IPHONE == platform || Application::Platform::OS_IPAD == platform)
|
||||
{
|
||||
#if defined(__arm64__)
|
||||
is64BitIOSDevice = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
tolua_pushboolean(tolua_S, is64BitIOSDevice);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Application:is64BitIOSDevice",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Application_is64BitIOSDevice'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void extendApplication(lua_State* tolua_S)
|
||||
{
|
||||
lua_pushstring(tolua_S, "cc.Application");
|
||||
|
@ -7095,6 +7145,7 @@ static void extendApplication(lua_State* tolua_S)
|
|||
if (lua_istable(tolua_S,-1))
|
||||
{
|
||||
tolua_function(tolua_S, "isIOS64bit", lua_cocos2dx_Application_isIOS64bit);
|
||||
tolua_function(tolua_S, "is64BitIOSDevice", lua_cocos2dx_Application_is64BitIOSDevice);
|
||||
}
|
||||
lua_pop(tolua_S, 1);
|
||||
}
|
||||
|
|
|
@ -203,7 +203,6 @@
|
|||
15C1C2EE19874CBE00A46ACC /* tolua_fix.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE7B418BC45C200215002 /* tolua_fix.h */; };
|
||||
15EFA1F61989E528000C57D3 /* lua_cocos2dx_experimental_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */; };
|
||||
15EFA1F71989E582000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15622968197780DE009C9067 /* lua_cocos2dx_experimental_auto.hpp */; };
|
||||
15EFA5D8198B2DAA000C57D3 /* liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D9BAFA1974D30000EC35BB /* liblua.a */; };
|
||||
15EFA5D9198B2DAA000C57D3 /* libluajit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1ABCA1F318CD8F540087CE3A /* libluajit.a */; };
|
||||
15EFA617198B2E2B000C57D3 /* lua_cocos2dx_experimental_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15622967197780DE009C9067 /* lua_cocos2dx_experimental_auto.cpp */; };
|
||||
15EFA618198B2E2B000C57D3 /* lua_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74918BC45C200215002 /* lua_cocos2dx_auto.cpp */; };
|
||||
|
@ -452,7 +451,6 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
15EFA5D8198B2DAA000C57D3 /* liblua.a in Frameworks */,
|
||||
15EFA5D9198B2DAA000C57D3 /* libluajit.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -1310,12 +1308,7 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../../../../external/lua/luajit/prebuilt/ios",
|
||||
"$(SRCROOT)/../../../../external/lua/lua/prebuilt/ios",
|
||||
);
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator7.1]" = "-llua";
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator8.0]" = "-llua";
|
||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../../../external/lua/luajit/prebuilt/ios";
|
||||
PRODUCT_NAME = "libluacocos2d iOS";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
|
@ -1337,12 +1330,7 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../../../../external/lua/luajit/prebuilt/ios",
|
||||
"$(SRCROOT)/../../../../external/lua/lua/prebuilt/ios",
|
||||
);
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator7.1]" = "-llua";
|
||||
"OTHER_LDFLAGS[sdk=iphonesimulator8.0]" = "-llua";
|
||||
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../../../external/lua/luajit/prebuilt/ios";
|
||||
PRODUCT_NAME = "libluacocos2d iOS";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
if nil == cc.Terrain then
|
||||
return
|
||||
end
|
||||
|
||||
cc.Terrain.CrackFixedType =
|
||||
{
|
||||
SKIRT = 0,
|
||||
INCREASE_LOWER = 1,
|
||||
}
|
|
@ -441,6 +441,22 @@ function cc.quaternion(_x, _y ,_z,_w)
|
|||
return { x = _x, y = _y, z = _z, w = _w }
|
||||
end
|
||||
|
||||
function cc.quaternion_createFromAxisAngle(axis, angle)
|
||||
|
||||
local halfAngle = angle * 0.5
|
||||
local sinHalfAngle = math.sin(halfAngle)
|
||||
|
||||
local normal = cc.vec3(axis.x, axis.y, axis.z)
|
||||
normal = cc.vec3normalize(normal)
|
||||
local dst = cc.vec3(0.0, 0.0, 0.0)
|
||||
dst.x = normal.x * sinHalfAngle
|
||||
dst.y = normal.y * sinHalfAngle
|
||||
dst.z = normal.z * sinHalfAngle
|
||||
dst.w = math.cos(halfAngle)
|
||||
|
||||
return dst
|
||||
end
|
||||
|
||||
function cc.blendFunc(_src, _dst)
|
||||
return {src = _src, dst = _dst}
|
||||
end
|
||||
|
|
|
@ -164,6 +164,7 @@ static std::string getFixedBaseUrl(const std::string& baseUrl)
|
|||
}
|
||||
|
||||
- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL {
|
||||
if (!self.uiWebView) {[self setupWebView];}
|
||||
[self.uiWebView loadHTMLString:@(string.c_str()) baseURL:[NSURL URLWithString:@(getFixedBaseUrl(baseURL).c_str())]];
|
||||
}
|
||||
|
||||
|
@ -211,6 +212,7 @@ static std::string getFixedBaseUrl(const std::string& baseUrl)
|
|||
}
|
||||
|
||||
- (void)setScalesPageToFit:(const bool)scalesPageToFit {
|
||||
if (!self.uiWebView) {[self setupWebView];}
|
||||
self.uiWebView.scalesPageToFit = scalesPageToFit;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# cocos2d-x v3.5 Release Notes #
|
||||
# cocos2d-x v3.6 Release Notes #
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
||||
|
@ -13,7 +13,7 @@
|
|||
- [Windows](#windows)
|
||||
- [Linux](#linux)
|
||||
- [How to start a new game](#how-to-start-a-new-game)
|
||||
- [v3.6beta0](#v36beta0)
|
||||
- [v3.6alpha0](#v36alpha0)
|
||||
- [Highlights of v3.6beta0](#highlights-of-v36beta0)
|
||||
- [Features in detail](#features-in-detail-1)
|
||||
- [3D TextureCube](#3d-texturecube)
|
||||
|
@ -110,9 +110,15 @@ Run
|
|||
|
||||
Please refer to this document: [ReadMe](../README.md)
|
||||
|
||||
# v3.6beta0
|
||||
# v3.6alpha0
|
||||
|
||||
## Highlights of v3.6alpha0
|
||||
|
||||
* 3D: added skybox support
|
||||
* 3D: added terrian support
|
||||
* uses luajit v2.1-20150331 on 64-bit iOS devices
|
||||
* added test automation support for cpp-tests
|
||||
|
||||
## Highlights of v3.6beta0
|
||||
## Features in detail
|
||||
|
||||
### 3D TextureCube
|
||||
|
@ -191,3 +197,13 @@ if (animation)
|
|||
```
|
||||
|
||||
The animation quality is also configurable in config.plist, the key is cocos2d.x.3d.animate_high_quality. All the created `Animate3D` base on this key if exist. You can modify it using the above method.
|
||||
|
||||
### luajit arm64
|
||||
|
||||
The version of the luajit is [v2.1-20150331](https://github.com/openresty/luajit2/releases). We have consulted the author of luajit, he said it was stability enough to be used. We will update to v2.1 when it is released.
|
||||
|
||||
Using luajit arm64 version is that because it can improve the performance. In previous versions of cocos2d-x, it uses lua on iOS 64-bit devices.
|
||||
|
||||
Bytecode of luajit and luajit arm64 are not compatible, which means you can not use one version of bytecode on iOS 32-bit devices and iOS 64-bit devices.
|
||||
|
||||
As there is not mandatory requirement of having arm64 bit bin on Android, so we don't use luajit arm64 on Android as its bytecode is not compatible with luajit arm32.
|
||||
|
|
|
@ -269,8 +269,7 @@ void Particle3DModelRender::render(Renderer* renderer, const Mat4 &transform, Pa
|
|||
for (auto iter : activeParticleList)
|
||||
{
|
||||
auto particle = iter;
|
||||
q *= particle->orientation;
|
||||
Mat4::createRotation(q, &rotMat);
|
||||
Mat4::createRotation(q * particle->orientation, &rotMat);
|
||||
sclMat.m[0] = particle->width / _spriteSize.x;
|
||||
sclMat.m[5] = particle->height / _spriteSize.y;
|
||||
sclMat.m[10] = particle->depth / _spriteSize.z;
|
||||
|
|
|
@ -272,8 +272,8 @@ void PUBeamRender::prepare()
|
|||
for (size_t numDev = 0; numDev < _numberOfSegments; ++numDev)
|
||||
{
|
||||
// Initialise the positions
|
||||
visualData->half[numDev] = Vec3::ZERO;
|
||||
visualData->destinationHalf[numDev] = Vec3::ZERO;
|
||||
visualData->half[numDev].setZero();
|
||||
visualData->destinationHalf[numDev].setZero();
|
||||
}
|
||||
_allVisualData.push_back(visualData); // Managed by this renderer
|
||||
_visualData.push_back(visualData); // Used to assign to a particle
|
||||
|
|
|
@ -418,7 +418,7 @@ void PUBillboardChain::updateVertexBuffer(const Mat4 &camMat)
|
|||
//Vector3 eyePos = mParentNode->_getDerivedOrientation().Inverse() *
|
||||
// (camPos - mParentNode->_getDerivedPosition()) / mParentNode->_getDerivedScale();
|
||||
|
||||
Vec3 eyePos = Vec3(camMat.m[12], camMat.m[13], camMat.m[14]);
|
||||
Vec3 eyePos(camMat.m[12], camMat.m[13], camMat.m[14]);
|
||||
|
||||
Vec3 chainTangent;
|
||||
for (ChainSegmentList::iterator segi = _chainSegmentList.begin();
|
||||
|
|
|
@ -173,7 +173,6 @@ void PUCircleEmitter::initParticleDirection(PUParticle3D* particle)
|
|||
{
|
||||
Mat4 rotMat;
|
||||
Mat4::createRotation(_orientation, &rotMat);
|
||||
particle->direction = Vec3(_x, 0, _z);
|
||||
particle->direction = rotMat * Vec3(_x, 0, _z);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -423,7 +423,7 @@ float PUDynamicAttributeOscillate::getValue (float x)
|
|||
case OSCT_SQUARE:
|
||||
{
|
||||
float val = sin(_phase + _frequency * x * M_PI * 2.0f);
|
||||
if (abs(val) < 0.00001f)
|
||||
if (std::abs(val) < 0.00001f)
|
||||
val = val >0? 1: -1;
|
||||
return _base + _amplitude * val;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ void PUFlockCenteringAffector::preUpdateAffector( float deltaTime )
|
|||
{
|
||||
_average = getDerivedPosition(); // Set to position of the affector
|
||||
}
|
||||
_sum = Vec3::ZERO;
|
||||
_sum.setZero();
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
const Vec3 PUForceFieldCalculationFactory::DEFAULT_WORLDSIZE = Vec3(500.0f, 500.0f, 500.0f);
|
||||
const Vec3 PUForceFieldCalculationFactory::DEFAULT_WORLDSIZE(500.0f, 500.0f, 500.0f);
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
unsigned short PUForceFieldCalculationFactory::getOctaves(void) const
|
||||
|
|
|
@ -37,8 +37,8 @@ const double PUForceFieldAffector::DEFAULT_FREQUENCY = 1.0f;
|
|||
const double PUForceFieldAffector::DEFAULT_AMPLITUDE = 1.0f;
|
||||
const double PUForceFieldAffector::DEFAULT_PERSISTENCE = 3.0f;
|
||||
const unsigned int PUForceFieldAffector::DEFAULT_FORCEFIELDSIZE = 64;
|
||||
const Vec3 PUForceFieldAffector::DEFAULT_WORLDSIZE = Vec3(500.0f, 500.0f, 500.0f);
|
||||
const Vec3 PUForceFieldAffector::DEFAULT_MOVEMENT = Vec3(500.0f, 0.0f, 0.0f);
|
||||
const Vec3 PUForceFieldAffector::DEFAULT_WORLDSIZE(500.0f, 500.0f, 500.0f);
|
||||
const Vec3 PUForceFieldAffector::DEFAULT_MOVEMENT(500.0f, 0.0f, 0.0f);
|
||||
const float PUForceFieldAffector::DEFAULT_MOVEMENT_FREQUENCY = 5.0f;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
|
|
@ -108,8 +108,8 @@ bool PUParticle3DInterParticleCollider::validateAndExecuteSphereCollision (PUPar
|
|||
// The new velocity is based on the angle between original direction and new direction.
|
||||
// Note, that this usually means that the velocity decreases.
|
||||
|
||||
float velocity1 = Vec3(abs(vp1->direction.x), abs(vp1->direction.y), abs(vp1->direction.z)).dot(n);
|
||||
float velocity2 = Vec3(abs(vp2->direction.x), abs(vp2->direction.y), abs(vp2->direction.z)).dot(n);
|
||||
float velocity1 = Vec3(std::abs(vp1->direction.x), std::abs(vp1->direction.y), std::abs(vp1->direction.z)).dot(n);
|
||||
float velocity2 = Vec3(std::abs(vp2->direction.x), std::abs(vp2->direction.y), std::abs(vp2->direction.z)).dot(n);
|
||||
vp1->direction = velocity1 * vp2->mass * n;
|
||||
vp2->direction = velocity2 * vp1->mass * -n;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ void PULineEmitter::notifyRescaled(const Vec3& scale)
|
|||
// Scale the internal attributes and use them, otherwise this results in too many calculations per particle
|
||||
PUEmitter::notifyRescaled(scale);
|
||||
float scaleLength = scale.length();
|
||||
_scaledEnd = Vec3(_end.x * scale.x, _end.y * scale.y, _end.z * scale.z);
|
||||
_scaledEnd.set(_end.x * scale.x, _end.y * scale.y, _end.z * scale.z);
|
||||
_scaledMaxDeviation = _maxDeviation * scaleLength;
|
||||
_scaledMinIncrement = _minIncrement * scaleLength;
|
||||
_scaledMaxIncrement = (_maxIncrement - _minIncrement) * scaleLength;
|
||||
|
@ -108,7 +108,7 @@ const Vec3& PULineEmitter::getEnd(void) const
|
|||
void PULineEmitter::setEnd(const Vec3& end)
|
||||
{
|
||||
_end = end;
|
||||
_scaledEnd = Vec3(_end.x * _emitterScale.x, _end.y * _emitterScale.y, _end.z * _emitterScale.z);
|
||||
_scaledEnd.set(_end.x * _emitterScale.x, _end.y * _emitterScale.y, _end.z * _emitterScale.z);
|
||||
_length = _end.length();
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
|
|
@ -111,30 +111,24 @@ const PUTriangle::PositionAndNormal PUTriangle::getRandomEdgePositionAndNormal (
|
|||
float mult = CCRANDOM_0_1();
|
||||
float randomVal = CCRANDOM_0_1() * 3.0f;
|
||||
PositionAndNormal pAndN;
|
||||
pAndN.position = Vec3::ZERO;
|
||||
pAndN.normal = Vec3::ZERO;
|
||||
pAndN.position.setZero();
|
||||
pAndN.normal.setZero();
|
||||
if (randomVal < 1)
|
||||
{
|
||||
pAndN.position = Vec3( v2.x + mult*(v1.x - v2.x),
|
||||
v2.y + mult*(v1.y - v2.y),
|
||||
v2.z + mult*(v1.z - v2.z));
|
||||
pAndN.position.set(v2.x + mult*(v1.x - v2.x), v2.y + mult*(v1.y - v2.y), v2.z + mult*(v1.z - v2.z));
|
||||
pAndN.normal = en1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (randomVal < 2)
|
||||
{
|
||||
pAndN.position = Vec3( v3.x + mult*(v2.x - v3.x),
|
||||
v3.y + mult*(v2.y - v3.y),
|
||||
v3.z + mult*(v2.z - v3.z));
|
||||
pAndN.position.set(v3.x + mult*(v2.x - v3.x), v3.y + mult*(v2.y - v3.y), v3.z + mult*(v2.z - v3.z));
|
||||
pAndN.normal = en2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
pAndN.position = Vec3( v1.x + mult*(v3.x - v1.x),
|
||||
v1.y + mult*(v3.y - v1.y),
|
||||
v1.z + mult*(v3.z - v1.z));
|
||||
pAndN.position.set(v1.x + mult*(v3.x - v1.x), v1.y + mult*(v3.y - v1.y), v1.z + mult*(v3.z - v1.z));
|
||||
pAndN.normal = en3;
|
||||
}
|
||||
}
|
||||
|
@ -146,8 +140,8 @@ const PUTriangle::PositionAndNormal PUTriangle::getRandomVertexAndNormal (void)
|
|||
{
|
||||
float randomVal = CCRANDOM_0_1() * 3.0f;
|
||||
PositionAndNormal pAndN;
|
||||
pAndN.position = Vec3::ZERO;
|
||||
pAndN.normal = Vec3::ZERO;
|
||||
pAndN.position.setZero();
|
||||
pAndN.normal.setZero();
|
||||
|
||||
if (randomVal < 1)
|
||||
{
|
||||
|
@ -209,7 +203,7 @@ inline float MeshInfo::getGaussianRandom (float high, float cutoff)
|
|||
} while (w >= 1.0f);
|
||||
|
||||
w = sqrt((-2.0f * ::log(w)) / w);
|
||||
y1 = abs(x1 * w);
|
||||
y1 = std::abs(x1 * w);
|
||||
y1 = y1 > cutoff ? cutoff : y1;
|
||||
y1 *= high / cutoff;
|
||||
return y1;
|
||||
|
@ -240,8 +234,8 @@ const PUTriangle::PositionAndNormal MeshInfo::getRandomPositionAndNormal (const
|
|||
{
|
||||
PUTriangle triangle = getTriangle(triangleIndex);
|
||||
PUTriangle::PositionAndNormal pAndN;
|
||||
pAndN.position = Vec3::ZERO;
|
||||
pAndN.normal = Vec3::ZERO;
|
||||
pAndN.position.setZero();
|
||||
pAndN.normal.setZero();
|
||||
if (mDistribution == MSD_HOMOGENEOUS || mDistribution == MSD_HETEROGENEOUS_1 || mDistribution == MSD_HETEROGENEOUS_2)
|
||||
{
|
||||
pAndN.position = triangle.getRandomTrianglePosition();
|
||||
|
@ -448,8 +442,8 @@ void PUMeshSurfaceEmitter::unPrepare()
|
|||
void PUMeshSurfaceEmitter::initParticlePosition(PUParticle3D* particle)
|
||||
{
|
||||
PUTriangle::PositionAndNormal pAndN;
|
||||
pAndN.position = Vec3::ZERO;
|
||||
pAndN.normal = Vec3::ZERO;
|
||||
pAndN.position.setZero();
|
||||
pAndN.normal.setZero();
|
||||
_directionSet = false;
|
||||
|
||||
if (_meshInfo && _meshInfo->getTriangleCount())
|
||||
|
|
|
@ -896,7 +896,7 @@ void PUParticleSystem3D::emitParticles( ParticlePool &pool, PUEmitter* emitter,
|
|||
|
||||
initParticleForEmission(particle);
|
||||
|
||||
particle->position += Vec3(particle->direction.x * scale.x * _particleSystemScaleVelocity * timePoint
|
||||
particle->position.add(particle->direction.x * scale.x * _particleSystemScaleVelocity * timePoint
|
||||
, particle->direction.y * scale.y * _particleSystemScaleVelocity * timePoint
|
||||
, particle->direction.z * scale.z * _particleSystemScaleVelocity * timePoint);
|
||||
// Increment time fragment
|
||||
|
@ -1313,7 +1313,7 @@ void PUParticleSystem3D::processMotion( PUParticle3D* particle, float timeElapse
|
|||
|
||||
Vec3 scale = getDerivedScale();
|
||||
// Update the position with the direction.
|
||||
particle->position += Vec3(particle->direction.x * scale.x * _particleSystemScaleVelocity * timeElapsed
|
||||
particle->position.add(particle->direction.x * scale.x * _particleSystemScaleVelocity * timeElapsed
|
||||
, particle->direction.y * scale.y * _particleSystemScaleVelocity * timeElapsed
|
||||
, particle->direction.z * scale.z * _particleSystemScaleVelocity * timeElapsed);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ void PUPathFollower::updatePUAffector( PUParticle3D *particle, float deltaTime )
|
|||
float timeFractionPlusDelta = (timeLeft + deltaTime ) / particle->totalTimeToLive;
|
||||
timeFractionPlusDelta = timeFractionPlusDelta < 1.0f ? timeFractionPlusDelta : 1.0f;
|
||||
Vec3 inter = _spline.interpolate(timeFractionPlusDelta) - _spline.interpolate(timeFraction);
|
||||
particle->position += Vec3(_affectorScale.x * inter.x, _affectorScale.y * inter.y, _affectorScale.z * inter.z);
|
||||
particle->position.add(_affectorScale.x * inter.x, _affectorScale.y * inter.y, _affectorScale.z * inter.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ NS_CC_BEGIN
|
|||
//-----------------------------------------------------------------------
|
||||
PUPlane::PUPlane ()
|
||||
{
|
||||
normal = Vec3::ZERO;
|
||||
// Vec3 default constructor zero
|
||||
//normal = Vec3::ZERO;
|
||||
d = 0.0;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
|
|
@ -124,7 +124,7 @@ void PURandomiser::updatePUAffector( PUParticle3D *particle, float deltaTime )
|
|||
if (_randomDirection)
|
||||
{
|
||||
// Random direction: Change the direction after each update
|
||||
particle->direction += Vec3(CCRANDOM_MINUS1_1() * _maxDeviationX,
|
||||
particle->direction.add(CCRANDOM_MINUS1_1() * _maxDeviationX,
|
||||
CCRANDOM_MINUS1_1() * _maxDeviationY,
|
||||
CCRANDOM_MINUS1_1() * _maxDeviationZ);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ void PURandomiser::updatePUAffector( PUParticle3D *particle, float deltaTime )
|
|||
return;
|
||||
|
||||
// Random position: Add the position deviation after each update
|
||||
particle->position += Vec3(CCRANDOM_MINUS1_1() * _maxDeviationX * _affectorScale.x,
|
||||
particle->position.add(CCRANDOM_MINUS1_1() * _maxDeviationX * _affectorScale.x,
|
||||
CCRANDOM_MINUS1_1() * _maxDeviationY * _affectorScale.y,
|
||||
CCRANDOM_MINUS1_1() * _maxDeviationZ * _affectorScale.z);
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ void PUParticle3DQuadRender::render(Renderer* renderer, const Mat4 &transform, P
|
|||
up.normalize();
|
||||
backward = direction;
|
||||
}else if (_type == ORIENTED_SHAPE){
|
||||
up = Vec3(particle->orientation.x, particle->orientation.y, particle->orientation.z);
|
||||
up.set(particle->orientation.x, particle->orientation.y, particle->orientation.z);
|
||||
up.normalize();
|
||||
Vec3::cross(up, backward, &right);
|
||||
right.normalize();
|
||||
|
@ -470,8 +470,7 @@ void PUParticle3DModelRender::render( Renderer* renderer, const Mat4 &transform,
|
|||
for (auto iter : activeParticleList)
|
||||
{
|
||||
auto particle = static_cast<PUParticle3D *>(iter);
|
||||
q *= particle->orientation;
|
||||
Mat4::createRotation(q, &rotMat);
|
||||
Mat4::createRotation(q * particle->orientation, &rotMat);
|
||||
sclMat.m[0] = particle->width / _spriteSize.x;
|
||||
sclMat.m[5] = particle->height / _spriteSize.y;
|
||||
sclMat.m[10] = particle->depth / _spriteSize.z;
|
||||
|
@ -867,7 +866,7 @@ void PUSphereRender::buildBuffers( unsigned short count )
|
|||
float z0 = r0 * cosf(segment * stepSegmentAngle);
|
||||
|
||||
// Vertex
|
||||
vi.position = Vec3(x0, y0, z0);
|
||||
vi.position.set(x0, y0, z0);
|
||||
|
||||
// Colour
|
||||
vi.color = Vec4::ONE;
|
||||
|
|
|
@ -285,7 +285,7 @@ void PURibbonTrail::updateTrail(size_t index, const Node* node)
|
|||
|
||||
// Vary the head elem, but bake new version if that exceeds element len
|
||||
Mat4 toWMat = node->getNodeToWorldTransform();
|
||||
Vec3 newPos = Vec3(toWMat.m[12], toWMat.m[13], toWMat.m[14]);
|
||||
Vec3 newPos(toWMat.m[12], toWMat.m[13], toWMat.m[14]);
|
||||
if (_parentNode)
|
||||
{
|
||||
Mat4 toLMat = _parentNode->getWorldToNodeTransform() * toWMat;
|
||||
|
@ -394,7 +394,7 @@ void PURibbonTrail::resetTrail(size_t index, const Node* node)
|
|||
// Create new element, v coord is always 0.0f
|
||||
// need to convert to take parent node's position into account
|
||||
Mat4 toWMat = node->getNodeToWorldTransform();
|
||||
Vec3 position = Vec3(toWMat.m[12], toWMat.m[13], toWMat.m[14]);
|
||||
Vec3 position(toWMat.m[12], toWMat.m[13], toWMat.m[14]);
|
||||
if (_parentNode)
|
||||
{
|
||||
Mat4 toLMat = _parentNode->getWorldToNodeTransform() * toWMat;
|
||||
|
|
|
@ -53,9 +53,7 @@ void PUSphereSurfaceEmitter::initParticlePosition(PUParticle3D* particle)
|
|||
{
|
||||
// Generate a random unit vector to calculate a point on the sphere. This unit vector is
|
||||
// also used as direction vector if mAutoDirection has been set.
|
||||
_randomVector = Vec3(CCRANDOM_MINUS1_1(),
|
||||
CCRANDOM_MINUS1_1(),
|
||||
CCRANDOM_MINUS1_1());
|
||||
_randomVector.set(CCRANDOM_MINUS1_1(), CCRANDOM_MINUS1_1(), CCRANDOM_MINUS1_1());
|
||||
_randomVector.normalize();
|
||||
//ParticleSystem* sys = mParentTechnique->getParentSystem();
|
||||
//if (sys)
|
||||
|
|
|
@ -80,8 +80,8 @@ void PUVelocityMatchingAffector::updatePUAffector( PUParticle3D *particle, float
|
|||
// return;
|
||||
|
||||
// unsigned int size = static_cast<unsigned int>(cell.size());
|
||||
// Vec3 sumDirection = Vec3::ZERO;
|
||||
// Vec3 diff = Vec3::ZERO;
|
||||
// Vec3 sumDirection;
|
||||
// Vec3 diff;
|
||||
// unsigned int count = 0;
|
||||
// for (unsigned int i = 0; i < size; ++i)
|
||||
// {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version":"v3-deps-35",
|
||||
"version":"v3-deps-38",
|
||||
"zip_file_size":"87419231",
|
||||
"repo_name":"cocos2d-x-3rd-party-libs-bin",
|
||||
"repo_parent":"https://github.com/cocos2d/",
|
||||
|
|
|
@ -0,0 +1,511 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define ZEXPORT WINAPI
|
||||
# ifdef WIN32
|
||||
# define ZEXPORTVA WINAPIV
|
||||
# else
|
||||
# define ZEXPORTVA FAR CDECL
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__BEOS__)
|
||||
# ifdef ZLIB_DLL
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXPORT __declspec(dllexport)
|
||||
# define ZEXPORTVA __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXPORT __declspec(dllimport)
|
||||
# define ZEXPORTVA __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ZEXTERN
|
||||
# define ZEXTERN extern
|
||||
#endif
|
||||
#ifndef ZEXPORT
|
||||
# define ZEXPORT
|
||||
#endif
|
||||
#ifndef ZEXPORTVA
|
||||
# define ZEXPORTVA
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,8 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := cocos_zlib_static
|
||||
LOCAL_MODULE_FILENAME := zlib
|
||||
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libz.a
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -281,6 +281,8 @@
|
|||
"cocos/3d/CCSprite3D.h",
|
||||
"cocos/3d/CCSprite3DMaterial.cpp",
|
||||
"cocos/3d/CCSprite3DMaterial.h",
|
||||
"cocos/3d/CCTerrain.cpp",
|
||||
"cocos/3d/CCTerrain.h",
|
||||
"cocos/3d/CCTextureCube.cpp",
|
||||
"cocos/3d/CCTextureCube.h",
|
||||
"cocos/3d/CMakeLists.txt",
|
||||
|
@ -557,8 +559,6 @@
|
|||
"cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineNode.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.cpp",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.h",
|
||||
"cocos/editor-support/cocostudio/ActionTimeline/CCTimelineMacro.h",
|
||||
|
@ -1124,6 +1124,8 @@
|
|||
"cocos/renderer/ccShader_3D_PositionTex.vert",
|
||||
"cocos/renderer/ccShader_3D_Skybox.frag",
|
||||
"cocos/renderer/ccShader_3D_Skybox.vert",
|
||||
"cocos/renderer/ccShader_3D_Terrain.frag",
|
||||
"cocos/renderer/ccShader_3D_Terrain.vert",
|
||||
"cocos/renderer/ccShader_Label.vert",
|
||||
"cocos/renderer/ccShader_Label_df.frag",
|
||||
"cocos/renderer/ccShader_Label_df_glow.frag",
|
||||
|
@ -1765,7 +1767,6 @@
|
|||
"external/curl/include/android/curl/multi.h",
|
||||
"external/curl/include/android/curl/stdcheaders.h",
|
||||
"external/curl/include/android/curl/typecheck-gcc.h",
|
||||
"external/curl/include/android/curl/types.h",
|
||||
"external/curl/include/ios/curl/curl.h",
|
||||
"external/curl/include/ios/curl/curlbuild-32.h",
|
||||
"external/curl/include/ios/curl/curlbuild-64.h",
|
||||
|
@ -1778,8 +1779,6 @@
|
|||
"external/curl/include/ios/curl/stdcheaders.h",
|
||||
"external/curl/include/ios/curl/typecheck-gcc.h",
|
||||
"external/curl/include/mac/curl/curl.h",
|
||||
"external/curl/include/mac/curl/curlbuild-32.h",
|
||||
"external/curl/include/mac/curl/curlbuild-64.h",
|
||||
"external/curl/include/mac/curl/curlbuild.h",
|
||||
"external/curl/include/mac/curl/curlrules.h",
|
||||
"external/curl/include/mac/curl/curlver.h",
|
||||
|
@ -1842,8 +1841,8 @@
|
|||
"external/curl/prebuilt/mac/libssl.a",
|
||||
"external/curl/prebuilt/win32/libcurl.dll",
|
||||
"external/curl/prebuilt/win32/libcurl_imp.lib",
|
||||
"external/curl/prebuilt/win32/libeay32.dll",
|
||||
"external/curl/prebuilt/win32/ssleay32.dll",
|
||||
"external/curl/prebuilt/win32/libeay32.lib",
|
||||
"external/curl/prebuilt/win32/ssleay32.lib",
|
||||
"external/curl/prebuilt/winrt_8.1/arm/libcurl.dll",
|
||||
"external/curl/prebuilt/winrt_8.1/arm/libcurl.lib",
|
||||
"external/curl/prebuilt/winrt_8.1/arm/libeay32.dll",
|
||||
|
@ -1886,145 +1885,108 @@
|
|||
"external/flatbuffers/idl_gen_text.cpp",
|
||||
"external/flatbuffers/idl_parser.cpp",
|
||||
"external/flatbuffers/util.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/freetype.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftautoh.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftbbox.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftbdf.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftbitmap.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftbzip2.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftcache.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftcffdrv.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftchapters.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftcid.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/fterrdef.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/fterrors.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftgasp.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftglyph.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftgxval.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftgzip.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftimage.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftincrem.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftlcdfil.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftlist.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftlzw.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftmac.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftmm.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftmodapi.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftmoderr.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftotval.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftoutln.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftpfr.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftrender.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftsizes.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftsnames.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftstroke.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftsynth.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftsystem.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/fttrigon.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftttdrv.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/fttypes.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftwinfnt.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ftxf86.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/t1tables.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ttnameid.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/tttables.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/tttags.h",
|
||||
"external/freetype2/include/android/freetype2/freetype/ttunpat.h",
|
||||
"external/freetype2/include/android/ft2build.h",
|
||||
"external/freetype2/include/ios/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/ios/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/ios/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/ios/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/ios/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/ios/freetype/freetype.h",
|
||||
"external/freetype2/include/ios/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/ios/freetype/ftautoh.h",
|
||||
"external/freetype2/include/ios/freetype/ftbbox.h",
|
||||
"external/freetype2/include/ios/freetype/ftbdf.h",
|
||||
"external/freetype2/include/ios/freetype/ftbitmap.h",
|
||||
"external/freetype2/include/ios/freetype/ftbzip2.h",
|
||||
"external/freetype2/include/ios/freetype/ftcache.h",
|
||||
"external/freetype2/include/ios/freetype/ftcffdrv.h",
|
||||
"external/freetype2/include/ios/freetype/ftchapters.h",
|
||||
"external/freetype2/include/ios/freetype/ftcid.h",
|
||||
"external/freetype2/include/ios/freetype/fterrdef.h",
|
||||
"external/freetype2/include/ios/freetype/fterrors.h",
|
||||
"external/freetype2/include/ios/freetype/ftgasp.h",
|
||||
"external/freetype2/include/ios/freetype/ftglyph.h",
|
||||
"external/freetype2/include/ios/freetype/ftgxval.h",
|
||||
"external/freetype2/include/ios/freetype/ftgzip.h",
|
||||
"external/freetype2/include/ios/freetype/ftimage.h",
|
||||
"external/freetype2/include/ios/freetype/ftincrem.h",
|
||||
"external/freetype2/include/ios/freetype/ftlcdfil.h",
|
||||
"external/freetype2/include/ios/freetype/ftlist.h",
|
||||
"external/freetype2/include/ios/freetype/ftlzw.h",
|
||||
"external/freetype2/include/ios/freetype/ftmac.h",
|
||||
"external/freetype2/include/ios/freetype/ftmm.h",
|
||||
"external/freetype2/include/ios/freetype/ftmodapi.h",
|
||||
"external/freetype2/include/ios/freetype/ftmoderr.h",
|
||||
"external/freetype2/include/ios/freetype/ftotval.h",
|
||||
"external/freetype2/include/ios/freetype/ftoutln.h",
|
||||
"external/freetype2/include/ios/freetype/ftpfr.h",
|
||||
"external/freetype2/include/ios/freetype/ftrender.h",
|
||||
"external/freetype2/include/ios/freetype/ftsizes.h",
|
||||
"external/freetype2/include/ios/freetype/ftsnames.h",
|
||||
"external/freetype2/include/ios/freetype/ftstroke.h",
|
||||
"external/freetype2/include/ios/freetype/ftsynth.h",
|
||||
"external/freetype2/include/ios/freetype/ftsystem.h",
|
||||
"external/freetype2/include/ios/freetype/fttrigon.h",
|
||||
"external/freetype2/include/ios/freetype/ftttdrv.h",
|
||||
"external/freetype2/include/ios/freetype/fttypes.h",
|
||||
"external/freetype2/include/ios/freetype/ftwinfnt.h",
|
||||
"external/freetype2/include/ios/freetype/ftxf86.h",
|
||||
"external/freetype2/include/ios/freetype/internal/autohint.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftcalc.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftdebug.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftdriver.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftgloadr.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftmemory.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftobjs.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftpic.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftrfork.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftserv.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftstream.h",
|
||||
"external/freetype2/include/ios/freetype/internal/fttrace.h",
|
||||
"external/freetype2/include/ios/freetype/internal/ftvalid.h",
|
||||
"external/freetype2/include/ios/freetype/internal/internal.h",
|
||||
"external/freetype2/include/ios/freetype/internal/psaux.h",
|
||||
"external/freetype2/include/ios/freetype/internal/pshints.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svbdf.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svcid.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svgldict.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svgxval.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svkern.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svmm.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svotval.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svpfr.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svpostnm.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svprop.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svpscmap.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svpsinfo.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svsfnt.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svttcmap.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svtteng.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svttglyf.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svwinfnt.h",
|
||||
"external/freetype2/include/ios/freetype/internal/services/svxf86nm.h",
|
||||
"external/freetype2/include/ios/freetype/internal/sfnt.h",
|
||||
"external/freetype2/include/ios/freetype/internal/t1types.h",
|
||||
"external/freetype2/include/ios/freetype/internal/tttypes.h",
|
||||
"external/freetype2/include/ios/freetype/t1tables.h",
|
||||
"external/freetype2/include/ios/freetype/ttnameid.h",
|
||||
"external/freetype2/include/ios/freetype/tttables.h",
|
||||
"external/freetype2/include/ios/freetype/tttags.h",
|
||||
"external/freetype2/include/ios/freetype/ttunpat.h",
|
||||
"external/freetype2/include/ios/ft2build.h",
|
||||
"external/freetype2/include/android/freetype2/config/ftconfig.h",
|
||||
"external/freetype2/include/android/freetype2/config/ftheader.h",
|
||||
"external/freetype2/include/android/freetype2/config/ftmodule.h",
|
||||
"external/freetype2/include/android/freetype2/config/ftoption.h",
|
||||
"external/freetype2/include/android/freetype2/config/ftstdlib.h",
|
||||
"external/freetype2/include/android/freetype2/freetype.h",
|
||||
"external/freetype2/include/android/freetype2/ft2build.h",
|
||||
"external/freetype2/include/android/freetype2/ftadvanc.h",
|
||||
"external/freetype2/include/android/freetype2/ftautoh.h",
|
||||
"external/freetype2/include/android/freetype2/ftbbox.h",
|
||||
"external/freetype2/include/android/freetype2/ftbdf.h",
|
||||
"external/freetype2/include/android/freetype2/ftbitmap.h",
|
||||
"external/freetype2/include/android/freetype2/ftbzip2.h",
|
||||
"external/freetype2/include/android/freetype2/ftcache.h",
|
||||
"external/freetype2/include/android/freetype2/ftcffdrv.h",
|
||||
"external/freetype2/include/android/freetype2/ftchapters.h",
|
||||
"external/freetype2/include/android/freetype2/ftcid.h",
|
||||
"external/freetype2/include/android/freetype2/fterrdef.h",
|
||||
"external/freetype2/include/android/freetype2/fterrors.h",
|
||||
"external/freetype2/include/android/freetype2/ftgasp.h",
|
||||
"external/freetype2/include/android/freetype2/ftglyph.h",
|
||||
"external/freetype2/include/android/freetype2/ftgxval.h",
|
||||
"external/freetype2/include/android/freetype2/ftgzip.h",
|
||||
"external/freetype2/include/android/freetype2/ftimage.h",
|
||||
"external/freetype2/include/android/freetype2/ftincrem.h",
|
||||
"external/freetype2/include/android/freetype2/ftlcdfil.h",
|
||||
"external/freetype2/include/android/freetype2/ftlist.h",
|
||||
"external/freetype2/include/android/freetype2/ftlzw.h",
|
||||
"external/freetype2/include/android/freetype2/ftmac.h",
|
||||
"external/freetype2/include/android/freetype2/ftmm.h",
|
||||
"external/freetype2/include/android/freetype2/ftmodapi.h",
|
||||
"external/freetype2/include/android/freetype2/ftmoderr.h",
|
||||
"external/freetype2/include/android/freetype2/ftotval.h",
|
||||
"external/freetype2/include/android/freetype2/ftoutln.h",
|
||||
"external/freetype2/include/android/freetype2/ftpfr.h",
|
||||
"external/freetype2/include/android/freetype2/ftrender.h",
|
||||
"external/freetype2/include/android/freetype2/ftsizes.h",
|
||||
"external/freetype2/include/android/freetype2/ftsnames.h",
|
||||
"external/freetype2/include/android/freetype2/ftstroke.h",
|
||||
"external/freetype2/include/android/freetype2/ftsynth.h",
|
||||
"external/freetype2/include/android/freetype2/ftsystem.h",
|
||||
"external/freetype2/include/android/freetype2/fttrigon.h",
|
||||
"external/freetype2/include/android/freetype2/ftttdrv.h",
|
||||
"external/freetype2/include/android/freetype2/fttypes.h",
|
||||
"external/freetype2/include/android/freetype2/ftwinfnt.h",
|
||||
"external/freetype2/include/android/freetype2/ftxf86.h",
|
||||
"external/freetype2/include/android/freetype2/t1tables.h",
|
||||
"external/freetype2/include/android/freetype2/ttnameid.h",
|
||||
"external/freetype2/include/android/freetype2/tttables.h",
|
||||
"external/freetype2/include/android/freetype2/tttags.h",
|
||||
"external/freetype2/include/android/freetype2/ttunpat.h",
|
||||
"external/freetype2/include/ios/freetype2/config/ftconfig.h",
|
||||
"external/freetype2/include/ios/freetype2/config/ftheader.h",
|
||||
"external/freetype2/include/ios/freetype2/config/ftmodule.h",
|
||||
"external/freetype2/include/ios/freetype2/config/ftoption.h",
|
||||
"external/freetype2/include/ios/freetype2/config/ftstdlib.h",
|
||||
"external/freetype2/include/ios/freetype2/freetype.h",
|
||||
"external/freetype2/include/ios/freetype2/ft2build.h",
|
||||
"external/freetype2/include/ios/freetype2/ftadvanc.h",
|
||||
"external/freetype2/include/ios/freetype2/ftautoh.h",
|
||||
"external/freetype2/include/ios/freetype2/ftbbox.h",
|
||||
"external/freetype2/include/ios/freetype2/ftbdf.h",
|
||||
"external/freetype2/include/ios/freetype2/ftbitmap.h",
|
||||
"external/freetype2/include/ios/freetype2/ftbzip2.h",
|
||||
"external/freetype2/include/ios/freetype2/ftcache.h",
|
||||
"external/freetype2/include/ios/freetype2/ftcffdrv.h",
|
||||
"external/freetype2/include/ios/freetype2/ftchapters.h",
|
||||
"external/freetype2/include/ios/freetype2/ftcid.h",
|
||||
"external/freetype2/include/ios/freetype2/fterrdef.h",
|
||||
"external/freetype2/include/ios/freetype2/fterrors.h",
|
||||
"external/freetype2/include/ios/freetype2/ftgasp.h",
|
||||
"external/freetype2/include/ios/freetype2/ftglyph.h",
|
||||
"external/freetype2/include/ios/freetype2/ftgxval.h",
|
||||
"external/freetype2/include/ios/freetype2/ftgzip.h",
|
||||
"external/freetype2/include/ios/freetype2/ftimage.h",
|
||||
"external/freetype2/include/ios/freetype2/ftincrem.h",
|
||||
"external/freetype2/include/ios/freetype2/ftlcdfil.h",
|
||||
"external/freetype2/include/ios/freetype2/ftlist.h",
|
||||
"external/freetype2/include/ios/freetype2/ftlzw.h",
|
||||
"external/freetype2/include/ios/freetype2/ftmac.h",
|
||||
"external/freetype2/include/ios/freetype2/ftmm.h",
|
||||
"external/freetype2/include/ios/freetype2/ftmodapi.h",
|
||||
"external/freetype2/include/ios/freetype2/ftmoderr.h",
|
||||
"external/freetype2/include/ios/freetype2/ftotval.h",
|
||||
"external/freetype2/include/ios/freetype2/ftoutln.h",
|
||||
"external/freetype2/include/ios/freetype2/ftpfr.h",
|
||||
"external/freetype2/include/ios/freetype2/ftrender.h",
|
||||
"external/freetype2/include/ios/freetype2/ftsizes.h",
|
||||
"external/freetype2/include/ios/freetype2/ftsnames.h",
|
||||
"external/freetype2/include/ios/freetype2/ftstroke.h",
|
||||
"external/freetype2/include/ios/freetype2/ftsynth.h",
|
||||
"external/freetype2/include/ios/freetype2/ftsystem.h",
|
||||
"external/freetype2/include/ios/freetype2/fttrigon.h",
|
||||
"external/freetype2/include/ios/freetype2/ftttdrv.h",
|
||||
"external/freetype2/include/ios/freetype2/fttypes.h",
|
||||
"external/freetype2/include/ios/freetype2/ftwinfnt.h",
|
||||
"external/freetype2/include/ios/freetype2/ftxf86.h",
|
||||
"external/freetype2/include/ios/freetype2/t1tables.h",
|
||||
"external/freetype2/include/ios/freetype2/ttnameid.h",
|
||||
"external/freetype2/include/ios/freetype2/tttables.h",
|
||||
"external/freetype2/include/ios/freetype2/tttags.h",
|
||||
"external/freetype2/include/ios/freetype2/ttunpat.h",
|
||||
"external/freetype2/include/linux/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/linux/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/linux/freetype/config/ftmodule.h",
|
||||
|
@ -2032,11 +1994,13 @@
|
|||
"external/freetype2/include/linux/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/linux/freetype/freetype.h",
|
||||
"external/freetype2/include/linux/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/linux/freetype/ftautoh.h",
|
||||
"external/freetype2/include/linux/freetype/ftbbox.h",
|
||||
"external/freetype2/include/linux/freetype/ftbdf.h",
|
||||
"external/freetype2/include/linux/freetype/ftbitmap.h",
|
||||
"external/freetype2/include/linux/freetype/ftbzip2.h",
|
||||
"external/freetype2/include/linux/freetype/ftcache.h",
|
||||
"external/freetype2/include/linux/freetype/ftcffdrv.h",
|
||||
"external/freetype2/include/linux/freetype/ftchapters.h",
|
||||
"external/freetype2/include/linux/freetype/ftcid.h",
|
||||
"external/freetype2/include/linux/freetype/fterrdef.h",
|
||||
|
@ -2064,227 +2028,155 @@
|
|||
"external/freetype2/include/linux/freetype/ftsynth.h",
|
||||
"external/freetype2/include/linux/freetype/ftsystem.h",
|
||||
"external/freetype2/include/linux/freetype/fttrigon.h",
|
||||
"external/freetype2/include/linux/freetype/ftttdrv.h",
|
||||
"external/freetype2/include/linux/freetype/fttypes.h",
|
||||
"external/freetype2/include/linux/freetype/ftwinfnt.h",
|
||||
"external/freetype2/include/linux/freetype/ftxf86.h",
|
||||
"external/freetype2/include/linux/freetype/internal/autohint.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftcalc.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftdebug.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftdriver.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftgloadr.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftmemory.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftobjs.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftpic.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftrfork.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftserv.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftstream.h",
|
||||
"external/freetype2/include/linux/freetype/internal/fttrace.h",
|
||||
"external/freetype2/include/linux/freetype/internal/ftvalid.h",
|
||||
"external/freetype2/include/linux/freetype/internal/internal.h",
|
||||
"external/freetype2/include/linux/freetype/internal/psaux.h",
|
||||
"external/freetype2/include/linux/freetype/internal/pshints.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svbdf.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svcid.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svgldict.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svgxval.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svkern.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svmm.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svotval.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svpfr.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svpostnm.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svpscmap.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svpsinfo.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svsfnt.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svttcmap.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svtteng.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svttglyf.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svwinfnt.h",
|
||||
"external/freetype2/include/linux/freetype/internal/services/svxf86nm.h",
|
||||
"external/freetype2/include/linux/freetype/internal/sfnt.h",
|
||||
"external/freetype2/include/linux/freetype/internal/t1types.h",
|
||||
"external/freetype2/include/linux/freetype/internal/tttypes.h",
|
||||
"external/freetype2/include/linux/freetype/t1tables.h",
|
||||
"external/freetype2/include/linux/freetype/ttnameid.h",
|
||||
"external/freetype2/include/linux/freetype/tttables.h",
|
||||
"external/freetype2/include/linux/freetype/tttags.h",
|
||||
"external/freetype2/include/linux/freetype/ttunpat.h",
|
||||
"external/freetype2/include/linux/ft2build.h",
|
||||
"external/freetype2/include/mac/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/mac/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/mac/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/mac/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/mac/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/mac/freetype/freetype.h",
|
||||
"external/freetype2/include/mac/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/mac/freetype/ftautoh.h",
|
||||
"external/freetype2/include/mac/freetype/ftbbox.h",
|
||||
"external/freetype2/include/mac/freetype/ftbdf.h",
|
||||
"external/freetype2/include/mac/freetype/ftbitmap.h",
|
||||
"external/freetype2/include/mac/freetype/ftbzip2.h",
|
||||
"external/freetype2/include/mac/freetype/ftcache.h",
|
||||
"external/freetype2/include/mac/freetype/ftcffdrv.h",
|
||||
"external/freetype2/include/mac/freetype/ftchapters.h",
|
||||
"external/freetype2/include/mac/freetype/ftcid.h",
|
||||
"external/freetype2/include/mac/freetype/fterrdef.h",
|
||||
"external/freetype2/include/mac/freetype/fterrors.h",
|
||||
"external/freetype2/include/mac/freetype/ftgasp.h",
|
||||
"external/freetype2/include/mac/freetype/ftglyph.h",
|
||||
"external/freetype2/include/mac/freetype/ftgxval.h",
|
||||
"external/freetype2/include/mac/freetype/ftgzip.h",
|
||||
"external/freetype2/include/mac/freetype/ftimage.h",
|
||||
"external/freetype2/include/mac/freetype/ftincrem.h",
|
||||
"external/freetype2/include/mac/freetype/ftlcdfil.h",
|
||||
"external/freetype2/include/mac/freetype/ftlist.h",
|
||||
"external/freetype2/include/mac/freetype/ftlzw.h",
|
||||
"external/freetype2/include/mac/freetype/ftmac.h",
|
||||
"external/freetype2/include/mac/freetype/ftmm.h",
|
||||
"external/freetype2/include/mac/freetype/ftmodapi.h",
|
||||
"external/freetype2/include/mac/freetype/ftmoderr.h",
|
||||
"external/freetype2/include/mac/freetype/ftotval.h",
|
||||
"external/freetype2/include/mac/freetype/ftoutln.h",
|
||||
"external/freetype2/include/mac/freetype/ftpfr.h",
|
||||
"external/freetype2/include/mac/freetype/ftrender.h",
|
||||
"external/freetype2/include/mac/freetype/ftsizes.h",
|
||||
"external/freetype2/include/mac/freetype/ftsnames.h",
|
||||
"external/freetype2/include/mac/freetype/ftstroke.h",
|
||||
"external/freetype2/include/mac/freetype/ftsynth.h",
|
||||
"external/freetype2/include/mac/freetype/ftsystem.h",
|
||||
"external/freetype2/include/mac/freetype/fttrigon.h",
|
||||
"external/freetype2/include/mac/freetype/ftttdrv.h",
|
||||
"external/freetype2/include/mac/freetype/fttypes.h",
|
||||
"external/freetype2/include/mac/freetype/ftwinfnt.h",
|
||||
"external/freetype2/include/mac/freetype/ftxf86.h",
|
||||
"external/freetype2/include/mac/freetype/internal/autohint.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftcalc.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftdebug.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftdriver.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftgloadr.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftmemory.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftobjs.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftpic.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftrfork.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftserv.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftstream.h",
|
||||
"external/freetype2/include/mac/freetype/internal/fttrace.h",
|
||||
"external/freetype2/include/mac/freetype/internal/ftvalid.h",
|
||||
"external/freetype2/include/mac/freetype/internal/internal.h",
|
||||
"external/freetype2/include/mac/freetype/internal/psaux.h",
|
||||
"external/freetype2/include/mac/freetype/internal/pshints.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svbdf.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svcid.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svgldict.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svgxval.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svkern.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svmm.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svotval.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svpfr.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svpostnm.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svprop.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svpscmap.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svpsinfo.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svsfnt.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svttcmap.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svtteng.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svttglyf.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svwinfnt.h",
|
||||
"external/freetype2/include/mac/freetype/internal/services/svxf86nm.h",
|
||||
"external/freetype2/include/mac/freetype/internal/sfnt.h",
|
||||
"external/freetype2/include/mac/freetype/internal/t1types.h",
|
||||
"external/freetype2/include/mac/freetype/internal/tttypes.h",
|
||||
"external/freetype2/include/mac/freetype/t1tables.h",
|
||||
"external/freetype2/include/mac/freetype/ttnameid.h",
|
||||
"external/freetype2/include/mac/freetype/tttables.h",
|
||||
"external/freetype2/include/mac/freetype/tttags.h",
|
||||
"external/freetype2/include/mac/freetype/ttunpat.h",
|
||||
"external/freetype2/include/mac/ft2build.h",
|
||||
"external/freetype2/include/win32/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/win32/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/win32/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/win32/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/win32/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/win32/freetype/freetype.h",
|
||||
"external/freetype2/include/win32/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/win32/freetype/ftautoh.h",
|
||||
"external/freetype2/include/win32/freetype/ftbbox.h",
|
||||
"external/freetype2/include/win32/freetype/ftbdf.h",
|
||||
"external/freetype2/include/win32/freetype/ftbitmap.h",
|
||||
"external/freetype2/include/win32/freetype/ftbzip2.h",
|
||||
"external/freetype2/include/win32/freetype/ftcache.h",
|
||||
"external/freetype2/include/win32/freetype/ftcffdrv.h",
|
||||
"external/freetype2/include/win32/freetype/ftchapters.h",
|
||||
"external/freetype2/include/win32/freetype/ftcid.h",
|
||||
"external/freetype2/include/win32/freetype/fterrdef.h",
|
||||
"external/freetype2/include/win32/freetype/fterrors.h",
|
||||
"external/freetype2/include/win32/freetype/ftgasp.h",
|
||||
"external/freetype2/include/win32/freetype/ftglyph.h",
|
||||
"external/freetype2/include/win32/freetype/ftgxval.h",
|
||||
"external/freetype2/include/win32/freetype/ftgzip.h",
|
||||
"external/freetype2/include/win32/freetype/ftimage.h",
|
||||
"external/freetype2/include/win32/freetype/ftincrem.h",
|
||||
"external/freetype2/include/win32/freetype/ftlcdfil.h",
|
||||
"external/freetype2/include/win32/freetype/ftlist.h",
|
||||
"external/freetype2/include/win32/freetype/ftlzw.h",
|
||||
"external/freetype2/include/win32/freetype/ftmac.h",
|
||||
"external/freetype2/include/win32/freetype/ftmm.h",
|
||||
"external/freetype2/include/win32/freetype/ftmodapi.h",
|
||||
"external/freetype2/include/win32/freetype/ftmoderr.h",
|
||||
"external/freetype2/include/win32/freetype/ftotval.h",
|
||||
"external/freetype2/include/win32/freetype/ftoutln.h",
|
||||
"external/freetype2/include/win32/freetype/ftpfr.h",
|
||||
"external/freetype2/include/win32/freetype/ftrender.h",
|
||||
"external/freetype2/include/win32/freetype/ftsizes.h",
|
||||
"external/freetype2/include/win32/freetype/ftsnames.h",
|
||||
"external/freetype2/include/win32/freetype/ftstroke.h",
|
||||
"external/freetype2/include/win32/freetype/ftsynth.h",
|
||||
"external/freetype2/include/win32/freetype/ftsystem.h",
|
||||
"external/freetype2/include/win32/freetype/fttrigon.h",
|
||||
"external/freetype2/include/win32/freetype/ftttdrv.h",
|
||||
"external/freetype2/include/win32/freetype/fttypes.h",
|
||||
"external/freetype2/include/win32/freetype/ftwinfnt.h",
|
||||
"external/freetype2/include/win32/freetype/ftxf86.h",
|
||||
"external/freetype2/include/win32/freetype/internal/autohint.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftcalc.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftdebug.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftdriver.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftgloadr.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftmemory.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftobjs.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftpic.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftrfork.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftserv.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftstream.h",
|
||||
"external/freetype2/include/win32/freetype/internal/fttrace.h",
|
||||
"external/freetype2/include/win32/freetype/internal/ftvalid.h",
|
||||
"external/freetype2/include/win32/freetype/internal/internal.h",
|
||||
"external/freetype2/include/win32/freetype/internal/psaux.h",
|
||||
"external/freetype2/include/win32/freetype/internal/pshints.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svbdf.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svcid.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svgldict.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svgxval.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svkern.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svmm.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svotval.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svpfr.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svpostnm.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svprop.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svpscmap.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svpsinfo.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svsfnt.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svttcmap.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svtteng.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svttglyf.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svwinfnt.h",
|
||||
"external/freetype2/include/win32/freetype/internal/services/svxf86nm.h",
|
||||
"external/freetype2/include/win32/freetype/internal/sfnt.h",
|
||||
"external/freetype2/include/win32/freetype/internal/t1types.h",
|
||||
"external/freetype2/include/win32/freetype/internal/tttypes.h",
|
||||
"external/freetype2/include/win32/freetype/t1tables.h",
|
||||
"external/freetype2/include/win32/freetype/ttnameid.h",
|
||||
"external/freetype2/include/win32/freetype/tttables.h",
|
||||
"external/freetype2/include/win32/freetype/tttags.h",
|
||||
"external/freetype2/include/win32/freetype/ttunpat.h",
|
||||
"external/freetype2/include/win32/ft2build.h",
|
||||
"external/freetype2/include/mac/freetype2/config/ftconfig.h",
|
||||
"external/freetype2/include/mac/freetype2/config/ftheader.h",
|
||||
"external/freetype2/include/mac/freetype2/config/ftmodule.h",
|
||||
"external/freetype2/include/mac/freetype2/config/ftoption.h",
|
||||
"external/freetype2/include/mac/freetype2/config/ftstdlib.h",
|
||||
"external/freetype2/include/mac/freetype2/freetype.h",
|
||||
"external/freetype2/include/mac/freetype2/ft2build.h",
|
||||
"external/freetype2/include/mac/freetype2/ftadvanc.h",
|
||||
"external/freetype2/include/mac/freetype2/ftautoh.h",
|
||||
"external/freetype2/include/mac/freetype2/ftbbox.h",
|
||||
"external/freetype2/include/mac/freetype2/ftbdf.h",
|
||||
"external/freetype2/include/mac/freetype2/ftbitmap.h",
|
||||
"external/freetype2/include/mac/freetype2/ftbzip2.h",
|
||||
"external/freetype2/include/mac/freetype2/ftcache.h",
|
||||
"external/freetype2/include/mac/freetype2/ftcffdrv.h",
|
||||
"external/freetype2/include/mac/freetype2/ftchapters.h",
|
||||
"external/freetype2/include/mac/freetype2/ftcid.h",
|
||||
"external/freetype2/include/mac/freetype2/fterrdef.h",
|
||||
"external/freetype2/include/mac/freetype2/fterrors.h",
|
||||
"external/freetype2/include/mac/freetype2/ftgasp.h",
|
||||
"external/freetype2/include/mac/freetype2/ftglyph.h",
|
||||
"external/freetype2/include/mac/freetype2/ftgxval.h",
|
||||
"external/freetype2/include/mac/freetype2/ftgzip.h",
|
||||
"external/freetype2/include/mac/freetype2/ftimage.h",
|
||||
"external/freetype2/include/mac/freetype2/ftincrem.h",
|
||||
"external/freetype2/include/mac/freetype2/ftlcdfil.h",
|
||||
"external/freetype2/include/mac/freetype2/ftlist.h",
|
||||
"external/freetype2/include/mac/freetype2/ftlzw.h",
|
||||
"external/freetype2/include/mac/freetype2/ftmac.h",
|
||||
"external/freetype2/include/mac/freetype2/ftmm.h",
|
||||
"external/freetype2/include/mac/freetype2/ftmodapi.h",
|
||||
"external/freetype2/include/mac/freetype2/ftmoderr.h",
|
||||
"external/freetype2/include/mac/freetype2/ftotval.h",
|
||||
"external/freetype2/include/mac/freetype2/ftoutln.h",
|
||||
"external/freetype2/include/mac/freetype2/ftpfr.h",
|
||||
"external/freetype2/include/mac/freetype2/ftrender.h",
|
||||
"external/freetype2/include/mac/freetype2/ftsizes.h",
|
||||
"external/freetype2/include/mac/freetype2/ftsnames.h",
|
||||
"external/freetype2/include/mac/freetype2/ftstroke.h",
|
||||
"external/freetype2/include/mac/freetype2/ftsynth.h",
|
||||
"external/freetype2/include/mac/freetype2/ftsystem.h",
|
||||
"external/freetype2/include/mac/freetype2/fttrigon.h",
|
||||
"external/freetype2/include/mac/freetype2/ftttdrv.h",
|
||||
"external/freetype2/include/mac/freetype2/fttypes.h",
|
||||
"external/freetype2/include/mac/freetype2/ftwinfnt.h",
|
||||
"external/freetype2/include/mac/freetype2/ftxf86.h",
|
||||
"external/freetype2/include/mac/freetype2/t1tables.h",
|
||||
"external/freetype2/include/mac/freetype2/ttnameid.h",
|
||||
"external/freetype2/include/mac/freetype2/tttables.h",
|
||||
"external/freetype2/include/mac/freetype2/tttags.h",
|
||||
"external/freetype2/include/mac/freetype2/ttunpat.h",
|
||||
"external/freetype2/include/win32/freetype2/config/ftconfig.h",
|
||||
"external/freetype2/include/win32/freetype2/config/ftheader.h",
|
||||
"external/freetype2/include/win32/freetype2/config/ftmodule.h",
|
||||
"external/freetype2/include/win32/freetype2/config/ftoption.h",
|
||||
"external/freetype2/include/win32/freetype2/config/ftstdlib.h",
|
||||
"external/freetype2/include/win32/freetype2/freetype.h",
|
||||
"external/freetype2/include/win32/freetype2/ft2build.h",
|
||||
"external/freetype2/include/win32/freetype2/ftadvanc.h",
|
||||
"external/freetype2/include/win32/freetype2/ftautoh.h",
|
||||
"external/freetype2/include/win32/freetype2/ftbbox.h",
|
||||
"external/freetype2/include/win32/freetype2/ftbdf.h",
|
||||
"external/freetype2/include/win32/freetype2/ftbitmap.h",
|
||||
"external/freetype2/include/win32/freetype2/ftbzip2.h",
|
||||
"external/freetype2/include/win32/freetype2/ftcache.h",
|
||||
"external/freetype2/include/win32/freetype2/ftcffdrv.h",
|
||||
"external/freetype2/include/win32/freetype2/ftchapters.h",
|
||||
"external/freetype2/include/win32/freetype2/ftcid.h",
|
||||
"external/freetype2/include/win32/freetype2/fterrdef.h",
|
||||
"external/freetype2/include/win32/freetype2/fterrors.h",
|
||||
"external/freetype2/include/win32/freetype2/ftgasp.h",
|
||||
"external/freetype2/include/win32/freetype2/ftglyph.h",
|
||||
"external/freetype2/include/win32/freetype2/ftgxval.h",
|
||||
"external/freetype2/include/win32/freetype2/ftgzip.h",
|
||||
"external/freetype2/include/win32/freetype2/ftimage.h",
|
||||
"external/freetype2/include/win32/freetype2/ftincrem.h",
|
||||
"external/freetype2/include/win32/freetype2/ftlcdfil.h",
|
||||
"external/freetype2/include/win32/freetype2/ftlist.h",
|
||||
"external/freetype2/include/win32/freetype2/ftlzw.h",
|
||||
"external/freetype2/include/win32/freetype2/ftmac.h",
|
||||
"external/freetype2/include/win32/freetype2/ftmm.h",
|
||||
"external/freetype2/include/win32/freetype2/ftmodapi.h",
|
||||
"external/freetype2/include/win32/freetype2/ftmoderr.h",
|
||||
"external/freetype2/include/win32/freetype2/ftotval.h",
|
||||
"external/freetype2/include/win32/freetype2/ftoutln.h",
|
||||
"external/freetype2/include/win32/freetype2/ftpfr.h",
|
||||
"external/freetype2/include/win32/freetype2/ftrender.h",
|
||||
"external/freetype2/include/win32/freetype2/ftsizes.h",
|
||||
"external/freetype2/include/win32/freetype2/ftsnames.h",
|
||||
"external/freetype2/include/win32/freetype2/ftstroke.h",
|
||||
"external/freetype2/include/win32/freetype2/ftsynth.h",
|
||||
"external/freetype2/include/win32/freetype2/ftsystem.h",
|
||||
"external/freetype2/include/win32/freetype2/fttrigon.h",
|
||||
"external/freetype2/include/win32/freetype2/ftttdrv.h",
|
||||
"external/freetype2/include/win32/freetype2/fttypes.h",
|
||||
"external/freetype2/include/win32/freetype2/ftwinfnt.h",
|
||||
"external/freetype2/include/win32/freetype2/ftxf86.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/autohint.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftcalc.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftdebug.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftdriver.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftgloadr.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftmemory.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftobjs.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftpic.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftrfork.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftserv.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftstream.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/fttrace.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/ftvalid.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/internal.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/psaux.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/pshints.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svbdf.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svcid.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svgldict.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svgxval.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svkern.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svmm.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svotval.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svpfr.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svpostnm.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svprop.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svpscmap.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svpsinfo.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svsfnt.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svttcmap.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svtteng.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svttglyf.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svwinfnt.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/services/svxf86nm.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/sfnt.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/t1types.h",
|
||||
"external/freetype2/include/win32/freetype2/internal/tttypes.h",
|
||||
"external/freetype2/include/win32/freetype2/t1tables.h",
|
||||
"external/freetype2/include/win32/freetype2/ttnameid.h",
|
||||
"external/freetype2/include/win32/freetype2/tttables.h",
|
||||
"external/freetype2/include/win32/freetype2/tttags.h",
|
||||
"external/freetype2/include/win32/freetype2/ttunpat.h",
|
||||
"external/freetype2/include/winrt/README.txt",
|
||||
"external/freetype2/include/winrt/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/winrt/freetype/config/ftheader.h",
|
||||
|
@ -3115,6 +3007,13 @@
|
|||
"external/xxhash/xxhash.h",
|
||||
"external/xxtea/xxtea.cpp",
|
||||
"external/xxtea/xxtea.h",
|
||||
"external/zlib/include/zconf.h",
|
||||
"external/zlib/include/zlib.h",
|
||||
"external/zlib/prebuilt/android/Android.mk",
|
||||
"external/zlib/prebuilt/android/armeabi-v7a/libz.a",
|
||||
"external/zlib/prebuilt/android/armeabi/libz.a",
|
||||
"external/zlib/prebuilt/android/x86/libz.a",
|
||||
"external/zlib/prebuilt/mac/libz.a",
|
||||
"licenses/LICENSE_AA-EDT.txt",
|
||||
"licenses/LICENSE_CCBReader.txt",
|
||||
"licenses/LICENSE_CCControlExtension.txt",
|
||||
|
@ -5376,6 +5275,7 @@
|
|||
"cocos/scripting/lua-bindings/auto/api/TableView.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/TableViewCell.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/TargetedAction.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Terrain.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/Text.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/TextAtlas.lua",
|
||||
"cocos/scripting/lua-bindings/auto/api/TextBMFont.lua",
|
||||
|
@ -5561,6 +5461,7 @@
|
|||
"cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj",
|
||||
"cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj",
|
||||
"cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj.filters",
|
||||
"cocos/scripting/lua-bindings/script/3d/3dConstants.lua",
|
||||
"cocos/scripting/lua-bindings/script/cocos2d/Cocos2d.lua",
|
||||
"cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua",
|
||||
"cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dClass.lua",
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.cdt.managedbuilder.core.genmakebuilder"/>
|
||||
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS">
|
||||
<mapEntry key="?children?" value="?children?=?name?=entry\\\\\\\|\\\|\|?name?=outputEntries\||"/>
|
||||
<mapEntry key="?name?" value=""/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.append_environment" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.autoBuildTarget" value="all"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.buildArguments" value="${ProjDirPath}/build_native.py -b release"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.buildCommand" value="python"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.buildLocation" value="${ProjDirPath}"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.cleanBuildTarget" value="clean"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.contents" value="org.eclipse.cdt.make.core.activeConfigSettings"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.enableAutoBuild" value="false"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.enableCleanBuild" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.enableFullBuild" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.fullBuildTarget" value="all"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.stopOnError" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.useDefaultBuildCmd" value="false"/>
|
||||
</mapAttribute>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
</launchConfiguration>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue