diff --git a/.gitignore b/.gitignore index 1f241f7eb9..eb159dc67d 100644 --- a/.gitignore +++ b/.gitignore @@ -113,9 +113,14 @@ build/build/ cocos/scripting/lua-bindings/proj.ios_mac/build/ tests/*/runtime/ tests/*/publish/ +tests/*/project/proj.android-studio/app/build.xml +tests/*/project/proj.android-studio/app/proguard-project.txt +tests/*/proj.android-studio/app/build.xml +tests/*/proj.android-studio/app/proguard-project.txt # Android project.properties +*.iml # Ignore prebuilt libraries folder /external/* @@ -130,3 +135,4 @@ tests/cpp-tests/Resources/audio /tests/lua-game-controller-test/src/cocos/ /tests/lua-tests/src/cocos/ /tests/js-tests/res/ +/tools/framework-compile/ diff --git a/AUTHORS b/AUTHORS index 604a521487..a64e2a8252 100644 --- a/AUTHORS +++ b/AUTHORS @@ -833,6 +833,7 @@ Developers: flashjay Remove deprecated code in lua tests & template + luaLoadChunksFromZip should just remove .lua or .luac extension zukkun Fixed incorrect function invocation in PhysicsBody::setAngularVelocityLimit @@ -1127,6 +1128,9 @@ Developers: tankorsmash Fixed the bug that ProgressTimer::setSprite() doesn't take effect + namezero111111 + ui: TextField add `getTextColor`, `getTextHorizontalAlignment` and `getTextVerticalAlignment` API + Retired Core Developers: WenSheng Yang Author of windows port, CCTextField, diff --git a/CHANGELOG b/CHANGELOG index e9681bb743..eaf7753da9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,13 +1,32 @@ cocos2d-x-3.7 ?? + [NEW] android: Add Samsung API for cocos, please refer to the release note for more details. + [NEW] 3rd: updated rapidjson to v1.0.2 [NEW] 3d: added physics3d support + [NEW] console: support build & run Android Studio project + [NEW] Audio: added support on WP8.1, now it supports wav format [NEW] C++: added ActionFloat - [NEW] C++: support physical keyboard on WinRT + [NEW] C++: supported physical keyboard on WinRT + [NEW] C++: added Android Studio support [NEW] FileUtils: checked filename case characters on windows [NEW] FileUitls: added supporting loading files that which file path include utf-8 characters [NEW] PhysicsShape: added sensor property - + [NEW] Scale9Sprite: added Android 9-patch image support + [NEW] Sprite: used triangle command + [NEW] 3d: add `getFarPlane` and `getNearPlane` in `Camera` class + [NEW] 3d: add opengl version project/unproject function in camera. + [NEW] ui: button add BMFont title support + [NEW] ui: TextField add `getTextColor`, `getTextHorizontalAlignment` and `getTextVerticalAlignment` API + [NEW] audio: Added MP3 support to winrt audio + + [FIX] audio: Fixed program may freeze if `AudioEngine::stop` or `AudioEngine::stopAll()` is invoked frequently on Android + [FIX] audio: Fixed audio can't resume if it is interrupted by an incoming phone call. + [FIX] audio: Fixed SimpleAudioEngine::playEffect() lagged on Android 5.0.x + [FIX] ui: TextField scale factor is wrong with multiline text. + [FIX] 3d: skybox can't move to other position except origin point in world space + [FIX] 3d: terrain can't move to other position except origin point in world space [FIX] 3rd: fix PIE link error on iOS caused by libpng and libtiff [FIX] AssetsManager: crashed issue + [FIX] Audio: can not play large ogg files on windows [FIX] EaseRateAction: no way to create an `EaseRateAction` instance [FIX] Label: crashed if invoking `setString(text` after `getLetter(letterIndex)` and `letterIndex` is greater than the length of text [FIX] Label: position is wrong if label content is changed after invoking `getLetter(letterIndex)` @@ -15,9 +34,13 @@ cocos2d-x-3.7 ?? [FIX] Label: outline effect doesn't match characters well [FIX] ProgressTimer: `setSprite()` doesn't take effect [FIX] Sprite3D: setGLProgram() does not work + [FIX] Sprite3D: transition breaks when there is a Sprite3D in the scene [FIX] Terrain: terrain is on top of particles, particles can not be seen + [FIX] TextureCache: unbindImageAsync failed to unbind all asynchronous callback for a specified bound image + [FIX] TileMap: crashed if a layer contains nothing [FIX] WebView: memory leak on iOS [FIX] WebView: crashed if url contains illegal characters on Android + [FIX] Lua: luaLoadChunksFromZip should just remove .lua or .luac extension cocos2d-x-3.6 Apr.30 2015 [NEW] 3rd: update chipmunk to v 6.2.2 on Windows 8.1 Universal App diff --git a/CMakeLists.txt b/CMakeLists.txt index d1c40c3b19..dad20ba10b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,8 +58,8 @@ endif() set(BUILD_CPP_TESTS_DEFAULT ON) set(BUILD_LUA_LIBS_DEFAULT ON) set(BUILD_LUA_TESTS_DEFAULT ON) -set(BUILD_JS_LIBS_DEFAULT OFF) -set(BUILD_JS_TESTS_DEFAULT OFF) +set(BUILD_JS_LIBS_DEFAULT ON) +set(BUILD_JS_TESTS_DEFAULT ON) # TODO: fix test samples for MSVC if(MSVC) set(BUILD_CPP_TESTS_DEFAULT OFF) diff --git a/README.md b/README.md index de6121afb0..d0fcd5fcda 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ $ bin/lua-empty-test/lua-empty-test * For Windows -Open the `cocos2d-x/build/cocos2d-win32.vc2013.sln` +Open the `cocos2d-x/build/cocos2d-win32.sln` * For Windows 8.1 Universal Apps (Phone and Store) diff --git a/build/android-build.py b/build/android-build.py index 47ffe5930e..bca7221447 100755 --- a/build/android-build.py +++ b/build/android-build.py @@ -4,12 +4,12 @@ import sys import os, os.path -import shutil from optparse import OptionParser CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests', 'game-controller-test'] LUA_SAMPLES = ['lua-empty-test', 'lua-tests', 'lua-game-controller-test'] -ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES +JS_SAMPLES = ['js-tests'] +ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES + JS_SAMPLES def caculate_built_samples(args): ''' Compute the sampels to be built @@ -27,6 +27,9 @@ def caculate_built_samples(args): if 'lua' in args: targets += LUA_SAMPLES args.remove('lua') + if 'js' in args: + targets += JS_SAMPLES + args.remove('js') targets += args @@ -36,8 +39,8 @@ def caculate_built_samples(args): return list(targets) def do_build(app_android_root, build_mode): - - command = 'cocos compile -p android -s %s --ndk-mode %s' % (app_android_root, build_mode) + + command = 'cocos compile -p android -s %s --ndk-mode %s' % (app_android_root, build_mode) print command if os.system(command) != 0: @@ -49,7 +52,7 @@ def build_samples(target, build_mode): build_mode = 'debug' elif build_mode != 'release': build_mode = 'debug' - + build_targets = caculate_built_samples(target) app_android_root = '' @@ -60,7 +63,8 @@ def build_samples(target, build_mode): "cpp-tests": "tests/cpp-tests", "lua-empty-test": "tests/lua-empty-test", "lua-tests": "tests/lua-tests", - "lua-game-controller-test": "tests/lua-game-controller-test" + "lua-game-controller-test": "tests/lua-game-controller-test", + "js-tests": "tests/js-tests" } cocos_root = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..") @@ -81,7 +85,7 @@ if __name__ == '__main__': usage = """ This script is mainy used for building tests built-in with cocos2d-x. - Usage: %prog [options] [cpp-empty-test|cpp-tests|lua-empty-test|lua-tests|cpp|lua|all] + Usage: %prog [options] [cpp-empty-test|cpp-tests|lua-empty-test|lua-tests|js-tests|cpp|lua|all] If you are new to cocos2d-x, I recommend you start with cpp-empty-test, lua-empty-test. @@ -93,13 +97,15 @@ if __name__ == '__main__': parser = OptionParser(usage=usage) parser.add_option("-n", "--ndk", dest="ndk_build_param", - help='It is not used anymore, because cocos console does not support it.') + help='It is not used anymore, because cocos console does not support it.') parser.add_option("-p", "--platform", dest="android_platform", - help='This parameter is not used any more, just keep compatible.') + help='This parameter is not used any more, just keep compatible.') parser.add_option("-b", "--build", dest="build_mode", - help='The build mode for java project,debug[default] or release. Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html') + help='The build mode for java project,debug[default] or release. \ + Get more information, \ + please refer to http://developer.android.com/tools/building/building-cmdline.html') (opts, args) = parser.parse_args() - + if len(args) == 0: parser.print_help() sys.exit(1) diff --git a/build/cocos2d-js-win32.vc2013.sln b/build/cocos2d-js-win32.sln similarity index 100% rename from build/cocos2d-js-win32.vc2013.sln rename to build/cocos2d-js-win32.sln diff --git a/build/cocos2d-js-win8.1-universal.sln b/build/cocos2d-js-win8.1-universal.sln index c7e811fd33..0b34f599a9 100644 --- a/build/cocos2d-js-win8.1-universal.sln +++ b/build/cocos2d-js-win8.1-universal.sln @@ -45,6 +45,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d.Windows", "..\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d.WindowsPhone", "..\cocos\scripting\js-bindings\proj.win8.1-universal\libjscocos2d\libjscocos2d.WindowsPhone\libjscocos2d.WindowsPhone.vcxproj", "{CA082EC4-17CE-430B-8207-D1E947A5D1E9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libbullet", "libbullet", "{9A66AB4C-057B-4675-849D-5D69B98C728C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Shared", "..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems", "{16AF311F-74CA-45A3-A82D-6334200FB124}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Windows", "..\external\bullet\proj.win8.1-universal\libbullet.Windows\libbullet.Windows.vcxproj", "{EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.WindowsPhone", "..\external\bullet\proj.win8.1-universal\libbullet.WindowsPhone\libbullet.WindowsPhone.vcxproj", "{E35634BD-B91B-4A6D-B957-96F56DD065F9}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems*{ae6763f6-1549-441e-afb5-377be1c776dc}*SharedItemsImports = 9 @@ -53,7 +61,10 @@ Global ..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems*{70914fc8-7709-4cd6-b86b-c63fde5478db}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{cc1da216-a80d-4be4-b309-acb6af313aff}*SharedItemsImports = 4 ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{4a3c6ba8-c227-498b-aa21-40bda27b461f}*SharedItemsImports = 9 + ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{e35634bd-b91b-4a6d-b957-96f56dd065f9}*SharedItemsImports = 4 + ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{ec2b1292-2d8c-4feb-a84b-2550b32c1ae7}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{adafd00d-a0d6-46ef-9f0b-ea2880bfe1de}*SharedItemsImports = 9 + ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{16af311f-74ca-45a3-a82d-6334200fb124}*SharedItemsImports = 9 ..\cocos\scripting\js-bindings\proj.win8.1-universal\libjscocos2d\libjscocos2d.Shared\libjscocos2d.Shared.vcxitems*{ca082ec4-17ce-430b-8207-d1e947a5d1e9}*SharedItemsImports = 4 ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{5d6f020f-7e72-4494-90a0-2df11d235df9}*SharedItemsImports = 9 ..\cocos\scripting\js-bindings\proj.win8.1-universal\libjscocos2d\libjscocos2d.Shared\libjscocos2d.Shared.vcxitems*{bea66276-51dd-4c53-92a8-f3d1fea50892}*SharedItemsImports = 9 @@ -192,6 +203,28 @@ Global {CA082EC4-17CE-430B-8207-D1E947A5D1E9}.Release|Win32.ActiveCfg = Release|Win32 {CA082EC4-17CE-430B-8207-D1E947A5D1E9}.Release|Win32.Build.0 = Release|Win32 {CA082EC4-17CE-430B-8207-D1E947A5D1E9}.Release|x64.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.ActiveCfg = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.Build.0 = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.ActiveCfg = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.Build.0 = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.ActiveCfg = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.Build.0 = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.ActiveCfg = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.Build.0 = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.Build.0 = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.ActiveCfg = Release|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.Build.0 = Release|x64 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.ActiveCfg = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.Build.0 = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.Build.0 = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|x64.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.ActiveCfg = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.Build.0 = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.ActiveCfg = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.Build.0 = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -214,5 +247,9 @@ Global {BEA66276-51DD-4C53-92A8-F3D1FEA50892} = {60DCAEA9-E344-40C0-B90C-82FB8E671BD5} {BCF5546D-66A0-4998-AFD6-C5514F618930} = {60DCAEA9-E344-40C0-B90C-82FB8E671BD5} {CA082EC4-17CE-430B-8207-D1E947A5D1E9} = {60DCAEA9-E344-40C0-B90C-82FB8E671BD5} + {9A66AB4C-057B-4675-849D-5D69B98C728C} = {85630454-74EA-4B5B-9B62-0E459B4476CB} + {16AF311F-74CA-45A3-A82D-6334200FB124} = {9A66AB4C-057B-4675-849D-5D69B98C728C} + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7} = {9A66AB4C-057B-4675-849D-5D69B98C728C} + {E35634BD-B91B-4A6D-B957-96F56DD065F9} = {9A66AB4C-057B-4675-849D-5D69B98C728C} EndGlobalSection EndGlobal diff --git a/build/cocos2d-win10.sln b/build/cocos2d-win10.sln new file mode 100644 index 0000000000..07f54c2bc2 --- /dev/null +++ b/build/cocos2d-win10.sln @@ -0,0 +1,123 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22823.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{17093B03-00CA-402F-981A-D8C84B2922B5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win10\libSpine.vcxproj", "{4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj-win10\libbox2d.vcxproj", "{0C32D479-46D5-46C3-9AA9-0A8FF8320516}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d_win10\libcocos2d.vcxproj", "{07C2895D-720C-487D-B7B4-12C293EA533F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj.win10\cpp-empty-test.vcxproj", "{87ED86E7-A850-433F-88D5-D5F65CFF7BF5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win10\cpp-tests.vcxproj", "{C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win10\libbullet.vcxproj", "{ECEE1119-CE2E-4F7E-83A8-1932EA48E893}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.ActiveCfg = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.Build.0 = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.ActiveCfg = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.Build.0 = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.ActiveCfg = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.Build.0 = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.ActiveCfg = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.Build.0 = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.ActiveCfg = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.Build.0 = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.ActiveCfg = Release|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.Build.0 = Release|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.ActiveCfg = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.Build.0 = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.ActiveCfg = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.Build.0 = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.ActiveCfg = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.Build.0 = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.ActiveCfg = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.Build.0 = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.ActiveCfg = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.Build.0 = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.ActiveCfg = Release|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.Build.0 = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.ActiveCfg = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.Build.0 = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.ActiveCfg = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.Build.0 = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.ActiveCfg = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.Build.0 = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.ActiveCfg = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.Build.0 = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.ActiveCfg = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.Build.0 = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.ActiveCfg = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.Build.0 = Release|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.ActiveCfg = Debug|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.Build.0 = Debug|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.Deploy.0 = Debug|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.ActiveCfg = Debug|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.Build.0 = Debug|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.Deploy.0 = Debug|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.ActiveCfg = Debug|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.Build.0 = Debug|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.Deploy.0 = Debug|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.ActiveCfg = Release|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.Build.0 = Release|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.Deploy.0 = Release|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.ActiveCfg = Release|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.Build.0 = Release|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.Deploy.0 = Release|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.ActiveCfg = Release|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.Build.0 = Release|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.Deploy.0 = Release|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.ActiveCfg = Debug|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.Build.0 = Debug|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.Deploy.0 = Debug|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.ActiveCfg = Debug|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.Build.0 = Debug|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.Deploy.0 = Debug|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.ActiveCfg = Debug|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.Build.0 = Debug|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.Deploy.0 = Debug|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.ActiveCfg = Release|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.Build.0 = Release|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.Deploy.0 = Release|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.ActiveCfg = Release|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.Build.0 = Release|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.Deploy.0 = Release|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.ActiveCfg = Release|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.Build.0 = Release|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.Deploy.0 = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.ActiveCfg = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.Build.0 = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.ActiveCfg = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.Build.0 = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.ActiveCfg = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.Build.0 = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.ActiveCfg = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.Build.0 = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.ActiveCfg = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.Build.0 = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.ActiveCfg = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8} = {17093B03-00CA-402F-981A-D8C84B2922B5} + {0C32D479-46D5-46C3-9AA9-0A8FF8320516} = {17093B03-00CA-402F-981A-D8C84B2922B5} + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893} = {17093B03-00CA-402F-981A-D8C84B2922B5} + EndGlobalSection +EndGlobal diff --git a/build/cocos2d-win32.vc2013.sln b/build/cocos2d-win32.sln similarity index 100% rename from build/cocos2d-win32.vc2013.sln rename to build/cocos2d-win32.sln diff --git a/build/cocos2d-win8.1-universal.sln b/build/cocos2d-win8.1-universal.sln index 4ef61407d8..e850e1c542 100644 --- a/build/cocos2d-win8.1-universal.sln +++ b/build/cocos2d-win8.1-universal.sln @@ -45,6 +45,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp.Windows", "..\test EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp.WindowsPhone", "..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.WindowsPhone\HelloCpp.WindowsPhone.vcxproj", "{396FE85E-BB05-4B92-BCCB-F89AED4EA41A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libbullet", "libbullet", "{0500043C-7E95-4351-97D6-0382A8C92DD3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Shared", "..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems", "{16AF311F-74CA-45A3-A82D-6334200FB124}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Windows", "..\external\bullet\proj.win8.1-universal\libbullet.Windows\libbullet.Windows.vcxproj", "{EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.WindowsPhone", "..\external\bullet\proj.win8.1-universal\libbullet.WindowsPhone\libbullet.WindowsPhone.vcxproj", "{E35634BD-B91B-4A6D-B957-96F56DD065F9}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{9335005f-678e-4e8e-9b84-50037216aec8}*SharedItemsImports = 4 @@ -52,9 +60,12 @@ Global ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{a3ad93e4-0b2f-4c58-9181-69bed2e42e3e}*SharedItemsImports = 9 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{cc1da216-a80d-4be4-b309-acb6af313aff}*SharedItemsImports = 4 ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{4a3c6ba8-c227-498b-aa21-40bda27b461f}*SharedItemsImports = 9 + ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{e35634bd-b91b-4a6d-b957-96f56dd065f9}*SharedItemsImports = 4 ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{79a8fcda-4b12-4dd1-b676-ff148d651638}*SharedItemsImports = 4 + ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{ec2b1292-2d8c-4feb-a84b-2550b32c1ae7}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{adafd00d-a0d6-46ef-9f0b-ea2880bfe1de}*SharedItemsImports = 9 ..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.Shared\cpp-tests.Shared.vcxitems*{be3a1791-5bce-4cea-92cd-0e2d86dde27a}*SharedItemsImports = 9 + ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{16af311f-74ca-45a3-a82d-6334200fb124}*SharedItemsImports = 9 ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{5d6f020f-7e72-4494-90a0-2df11d235df9}*SharedItemsImports = 9 ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{3b26a12d-3a44-47ea-82d2-282660fc844d}*SharedItemsImports = 4 ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{22f3b9df-1209-4574-8331-003966f562bf}*SharedItemsImports = 4 @@ -202,6 +213,28 @@ Global {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Release|Win32.Build.0 = Release|Win32 {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Release|Win32.Deploy.0 = Release|Win32 {396FE85E-BB05-4B92-BCCB-F89AED4EA41A}.Release|x64.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.ActiveCfg = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.Build.0 = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.ActiveCfg = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.Build.0 = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.ActiveCfg = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.Build.0 = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.ActiveCfg = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.Build.0 = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.Build.0 = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.ActiveCfg = Release|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.Build.0 = Release|x64 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.ActiveCfg = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.Build.0 = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.Build.0 = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|x64.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.ActiveCfg = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.Build.0 = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.ActiveCfg = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.Build.0 = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -224,5 +257,9 @@ Global {A3AD93E4-0B2F-4C58-9181-69BED2E42E3E} = {B70EF25E-E352-4020-BCDF-388973E44637} {79A8FCDA-4B12-4DD1-B676-FF148D651638} = {B70EF25E-E352-4020-BCDF-388973E44637} {396FE85E-BB05-4B92-BCCB-F89AED4EA41A} = {B70EF25E-E352-4020-BCDF-388973E44637} + {0500043C-7E95-4351-97D6-0382A8C92DD3} = {85630454-74EA-4B5B-9B62-0E459B4476CB} + {16AF311F-74CA-45A3-A82D-6334200FB124} = {0500043C-7E95-4351-97D6-0382A8C92DD3} + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7} = {0500043C-7E95-4351-97D6-0382A8C92DD3} + {E35634BD-B91B-4A6D-B957-96F56DD065F9} = {0500043C-7E95-4351-97D6-0382A8C92DD3} EndGlobalSection EndGlobal diff --git a/build/cocos2d_js_tests.xcodeproj/project.pbxproj b/build/cocos2d_js_tests.xcodeproj/project.pbxproj index f69655eb62..ddbf43fb28 100644 --- a/build/cocos2d_js_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_js_tests.xcodeproj/project.pbxproj @@ -596,7 +596,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\""; + shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\"\ncp -r \"${SRCROOT}/../tests/js-tests/resjs/\" \"${cocos_dir}\""; }; EDCA13EE1AEA4E7B00F445CA /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -609,7 +609,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\""; + shellScript = "#!/bin/bash\ncocos_dir=${SRCROOT}/../tests/js-tests/res\nif [ -d \"${cocos_dir}\" ]; then\nrm -rv \"${cocos_dir}\"\nmkdir \"${cocos_dir}\"\nelse\nmkdir \"${cocos_dir}\"\nfi\n\ncp -r \"${SRCROOT}/../tests/cpp-tests/Resources/\" \"${cocos_dir}\"\ncp -r \"${SRCROOT}/../tests/js-tests/resjs/\" \"${cocos_dir}\""; }; /* End PBXShellScriptBuildPhase section */ @@ -821,7 +821,7 @@ ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.. $(SRCROOT)/../cocos $(SRCROOT)/../cocos/base $(SRCROOT)/../cocos/physics $(SRCROOT)/../cocos/math/kazmath $(SRCROOT)/../cocos/2d $(SRCROOT)/../cocos/gui $(SRCROOT)/../cocos/network $(SRCROOT)/../cocos/audio/include $(SRCROOT)/../cocos/editor-support $(SRCROOT)/../extensions $(SRCROOT)/../external $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../cocos/scripting/js-bindings/auto $(SRCROOT)/../cocos/scripting/js-bindings/manual"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.. $(SRCROOT)/../cocos $(SRCROOT)/../cocos/base $(SRCROOT)/../cocos/2d $(SRCROOT)/../cocos/gui $(SRCROOT)/../cocos/network $(SRCROOT)/../cocos/audio/include $(SRCROOT)/../cocos/editor-support $(SRCROOT)/../extensions $(SRCROOT)/../external $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../cocos/scripting/js-bindings/auto $(SRCROOT)/../cocos/scripting/js-bindings/manual"; }; name = Debug; }; @@ -845,7 +845,7 @@ HEADER_SEARCH_PATHS = ""; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.. $(SRCROOT)/../cocos $(SRCROOT)/../cocos/base $(SRCROOT)/../cocos/physics $(SRCROOT)/../cocos/math/kazmath $(SRCROOT)/../cocos/2d $(SRCROOT)/../cocos/gui $(SRCROOT)/../cocos/network $(SRCROOT)/../cocos/audio/include $(SRCROOT)/../cocos/editor-support $(SRCROOT)/../extensions $(SRCROOT)/../external $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../cocos/scripting/js-bindings/auto $(SRCROOT)/../cocos/scripting/js-bindings/manual"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.. $(SRCROOT)/../cocos $(SRCROOT)/../cocos/base $(SRCROOT)/../cocos/2d $(SRCROOT)/../cocos/gui $(SRCROOT)/../cocos/network $(SRCROOT)/../cocos/audio/include $(SRCROOT)/../cocos/editor-support $(SRCROOT)/../extensions $(SRCROOT)/../external $(SRCROOT)/../external/chipmunk/include/chipmunk $(SRCROOT)/../cocos/scripting/js-bindings/auto $(SRCROOT)/../cocos/scripting/js-bindings/manual"; }; name = Release; }; diff --git a/build/cocos2d_js_tests.xcodeproj/xcshareddata/xcschemes/js-tests Mac.xcscheme b/build/cocos2d_js_tests.xcodeproj/xcshareddata/xcschemes/js-tests Mac.xcscheme new file mode 100644 index 0000000000..76f33cd18d --- /dev/null +++ b/build/cocos2d_js_tests.xcodeproj/xcshareddata/xcschemes/js-tests Mac.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/cocos2d_js_tests.xcodeproj/xcshareddata/xcschemes/js-tests iOS.xcscheme b/build/cocos2d_js_tests.xcodeproj/xcshareddata/xcschemes/js-tests iOS.xcscheme new file mode 100644 index 0000000000..97cb029f2e --- /dev/null +++ b/build/cocos2d_js_tests.xcodeproj/xcshareddata/xcschemes/js-tests iOS.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index a4e01596e4..87be2384e6 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1190,6 +1190,10 @@ 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 */; }; + 291901431B05895600F8B4BA /* CCNinePatchImageParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */; }; + 291901441B05895600F8B4BA /* CCNinePatchImageParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */; }; + 291901451B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */; }; + 291901461B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */; }; 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 */; }; @@ -3921,6 +3925,8 @@ 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; 29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = ""; }; + 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNinePatchImageParser.h; path = ../base/CCNinePatchImageParser.h; sourceTree = ""; }; + 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNinePatchImageParser.cpp; path = ../base/CCNinePatchImageParser.cpp; sourceTree = ""; }; 292DB12F19B4574100A80320 /* UIEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBox.cpp; sourceTree = ""; }; 292DB13019B4574100A80320 /* UIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBox.h; sourceTree = ""; }; 292DB13119B4574100A80320 /* UIEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImpl.h; sourceTree = ""; }; @@ -5620,6 +5626,8 @@ 1A5700A2180BC5E60088DEC7 /* base */ = { isa = PBXGroup; children = ( + 291901411B05895600F8B4BA /* CCNinePatchImageParser.h */, + 291901421B05895600F8B4BA /* CCNinePatchImageParser.cpp */, 505385001B01887A00793096 /* CCProperties.h */, 505385011B01887A00793096 /* CCProperties.cpp */, B63990CA1A490AFE00B07923 /* CCAsyncTaskPool.cpp */, @@ -9408,6 +9416,7 @@ 50ABBE211925AB6F00A911A9 /* atitc.h in Headers */, 15AE19A519AAD39600C27E9E /* TextFieldReader.h in Headers */, B665E3401AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h in Headers */, + 291901431B05895600F8B4BA /* CCNinePatchImageParser.h in Headers */, B24AA98B195A675C007B4522 /* CCFastTMXTiledMap.h in Headers */, B665E3A01AA80A6500DDB1C5 /* CCPUPositionEmitter.h in Headers */, B29594B61926D5EC003EEF37 /* CCMeshCommand.h in Headers */, @@ -10210,6 +10219,7 @@ 50ABBE481925AB6F00A911A9 /* CCEvent.h in Headers */, 5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */, 15AE1A9719AAD40300C27E9E /* b2Draw.h in Headers */, + 291901441B05895600F8B4BA /* CCNinePatchImageParser.h in Headers */, 3E6176691960F89B00DE83F5 /* CCController.h in Headers */, B6CAB43E1AF9AA1A00B9B856 /* btGpuDefines.h in Headers */, 3823841D1A2590D2002C4610 /* ComAudioReader.h in Headers */, @@ -10682,6 +10692,7 @@ 50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */, B665E2321AA80A6500DDB1C5 /* CCPUBoxEmitter.cpp in Sources */, B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */, + 291901451B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */, 15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */, 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayer-ios.mm in Sources */, B665E32A1AA80A6500DDB1C5 /* CCPUOnCountObserver.cpp in Sources */, @@ -11642,6 +11653,7 @@ 15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */, 1A5701C8180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, 1A5701CC180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, + 291901461B05895600F8B4BA /* CCNinePatchImageParser.cpp in Sources */, B665E39B1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp in Sources */, 382384291A2590F9002C4610 /* NodeReader.cpp in Sources */, 15AE193419AAD35100C27E9E /* CCActionObject.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index 0911ac3177..c51f3af656 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -60,6 +60,10 @@ 15B3709819EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */; }; 15B3709919EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */; }; 15B3709A19EE5EED00ABE682 /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; }; + 15B914481B156A3700C6B95B /* Materials in Resources */ = {isa = PBXBuildFile; fileRef = 5046AB5A1AF2C4180060550B /* Materials */; }; + 15B914491B15721400C6B95B /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B2507B6A192589AF00FA4972 /* Shaders3D */; }; + 15B9144A1B15A18C00C6B95B /* Materials in Resources */ = {isa = PBXBuildFile; fileRef = 5046AB5A1AF2C4180060550B /* Materials */; }; + 15B9144B1B15A18C00C6B95B /* Shaders3D in Resources */ = {isa = PBXBuildFile; fileRef = B2507B6A192589AF00FA4972 /* Shaders3D */; }; 15C64825165F3934007D4F18 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64824165F3934007D4F18 /* OpenGL.framework */; }; 15C64827165F394E007D4F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64826165F394E007D4F18 /* QuartzCore.framework */; }; 15C64829165F396B007D4F18 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64828165F396B007D4F18 /* OpenAL.framework */; }; @@ -4438,6 +4442,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 15B914491B15721400C6B95B /* Shaders3D in Resources */, + 15B914481B156A3700C6B95B /* Materials in Resources */, 1531B2501AE013DE0075DB94 /* Test.html in Resources */, 1502702E1AD3BDC90089CD03 /* TerrainTest in Resources */, 157B08EC1A90864100B7BEA4 /* Particle3D in Resources */, @@ -4485,6 +4491,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 15B9144A1B15A18C00C6B95B /* Materials in Resources */, + 15B9144B1B15A18C00C6B95B /* Shaders3D in Resources */, 1531B2511AE013F00075DB94 /* Test.html in Resources */, 1502702D1AD3BDBC0089CD03 /* TerrainTest in Resources */, 157B08ED1A90865600B7BEA4 /* Particle3D in Resources */, @@ -5787,6 +5795,7 @@ "$(inherited)", CC_TARGET_OS_MAC, ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.mac/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac"; @@ -5802,6 +5811,7 @@ "$(inherited)", CC_TARGET_OS_MAC, ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.mac/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos/platform/mac $(SRCROOT)/../external/glfw3/include/mac"; @@ -5890,6 +5900,7 @@ "$(inherited)", CC_TARGET_OS_IPHONE, ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.ios/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; LIBRARY_SEARCH_PATHS = ( @@ -5913,6 +5924,7 @@ "$(inherited)", CC_TARGET_OS_IPHONE, ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; INFOPLIST_FILE = "$(SRCROOT)/../tests/cpp-tests/proj.ios/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; LIBRARY_SEARCH_PATHS = ( diff --git a/cocos/2d/CCActionCamera.h b/cocos/2d/CCActionCamera.h index 4ab7c1eac7..2dcc6c25e9 100644 --- a/cocos/2d/CCActionCamera.h +++ b/cocos/2d/CCActionCamera.h @@ -125,9 +125,9 @@ public: * @param t Duration in seconds. * @param radius The start radius. * @param deltaRadius The delta radius. - * @param angleZ The start Angel in Z. + * @param angleZ The start angle in Z. * @param deltaAngleZ The delta angle in Z. - * @param angleX The start Angel in X. + * @param angleX The start angle in X. * @param deltaAngleX The delta angle in X. * @return An OrbitCamera. */ diff --git a/cocos/2d/CCCamera.cpp b/cocos/2d/CCCamera.cpp index 2659dd9c64..a4f880a971 100644 --- a/cocos/2d/CCCamera.cpp +++ b/cocos/2d/CCCamera.cpp @@ -245,11 +245,42 @@ Vec2 Camera::project(const Vec3& src) const return screenPos; } +Vec2 Camera::projectGL(const Vec3& src) const +{ + Vec2 screenPos; + + auto viewport = Director::getInstance()->getWinSize(); + Vec4 clipPos; + getViewProjectionMatrix().transformVector(Vec4(src.x, src.y, src.z, 1.0f), &clipPos); + + CCASSERT(clipPos.w != 0.0f, ""); + float ndcX = clipPos.x / clipPos.w; + float ndcY = clipPos.y / clipPos.w; + + screenPos.x = (ndcX + 1.0f) * 0.5f * viewport.width; + screenPos.y = (ndcY + 1.0f) * 0.5f * viewport.height; + return screenPos; +} + Vec3 Camera::unproject(const Vec3& src) const { - auto viewport = Director::getInstance()->getWinSize(); + Vec3 dst; + unproject(Director::getInstance()->getWinSize(), &src, &dst); + return dst; +} - Vec4 screen(src.x / viewport.width, ((viewport.height - src.y)) / viewport.height, src.z, 1.0f); +Vec3 Camera::unprojectGL(const Vec3& src) const +{ + Vec3 dst; + unprojectGL(Director::getInstance()->getWinSize(), &src, &dst); + return dst; +} + +void Camera::unproject(const Size& viewport, const Vec3* src, Vec3* dst) const +{ + CCASSERT(src && dst, "vec3 can not be null"); + + Vec4 screen(src->x / viewport.width, ((viewport.height - src->y)) / viewport.height, src->z, 1.0f); screen.x = screen.x * 2.0f - 1.0f; screen.y = screen.y * 2.0f - 1.0f; screen.z = screen.z * 2.0f - 1.0f; @@ -262,14 +293,14 @@ Vec3 Camera::unproject(const Vec3& src) const screen.z /= screen.w; } - return Vec3(screen.x, screen.y, screen.z); + dst->set(screen.x, screen.y, screen.z); } -void Camera::unproject(const Size& viewport, const Vec3* src, Vec3* dst) const +void Camera::unprojectGL(const Size& viewport, const Vec3* src, Vec3* dst) const { CCASSERT(src && dst, "vec3 can not be null"); - Vec4 screen(src->x / viewport.width, ((viewport.height - src->y)) / viewport.height, src->z, 1.0f); + Vec4 screen(src->x / viewport.width, src->y / viewport.height, src->z, 1.0f); screen.x = screen.x * 2.0f - 1.0f; screen.y = screen.y * 2.0f - 1.0f; screen.z = screen.z * 2.0f - 1.0f; diff --git a/cocos/2d/CCCamera.h b/cocos/2d/CCCamera.h index 34ecac77ee..37493af08c 100644 --- a/cocos/2d/CCCamera.h +++ b/cocos/2d/CCCamera.h @@ -61,6 +61,7 @@ enum class CameraFlag class CC_DLL Camera :public Node { friend class Scene; + friend class EventDispatcher; public: /** * The type of camera. @@ -128,30 +129,60 @@ public: /**get view projection matrix*/ const Mat4& getViewProjectionMatrix() const; - /* convert the specified point of viewport from world-space coordinates into the screen-space coordinates. + /* convert the specified point in 3D world-space coordinates into the screen-space coordinates. * + * Origin point at left top corner in screen-space. * @param src The world-space position. * @return The screen-space position. */ Vec2 project(const Vec3& src) const; - /** - * Convert the specified point of viewport from screen-space coordinate into the world-space coordinate. + /* convert the specified point in 3D world-space coordinates into the GL-screen-space coordinates. * + * Origin point at left bottom corner in GL-screen-space. + * @param src The 3D world-space position. + * @return The GL-screen-space position. + */ + Vec2 projectGL(const Vec3& src) const; + + /** + * Convert the specified point of screen-space coordinate into the 3D world-space coordinate. + * + * Origin point at left top corner in screen-space. * @param src The screen-space position. - * @return The world-space position. + * @return The 3D world-space position. */ Vec3 unproject(const Vec3& src) const; - - /** - * Convert the specified point of viewport from screen-space coordinate into the world-space coordinate. - * - * @param viewport The viewport size to use. - * @param src The screen-space position. - * @param dst The world-space position. - */ - void unproject(const Size& viewport, const Vec3* src, Vec3* dst) const; + /** + * Convert the specified point of GL-screen-space coordinate into the 3D world-space coordinate. + * + * Origin point at left bottom corner in GL-screen-space. + * @param src The GL-screen-space position. + * @return The 3D world-space position. + */ + Vec3 unprojectGL(const Vec3& src) const; + + /** + * Convert the specified point of screen-space coordinate into the 3D world-space coordinate. + * + * Origin point at left top corner in screen-space. + * @param size The window size to use. + * @param src The screen-space position. + * @param dst The 3D world-space position. + */ + void unproject(const Size& size, const Vec3* src, Vec3* dst) const; + + /** + * Convert the specified point of GL-screen-space coordinate into the 3D world-space coordinate. + * + * Origin point at left bottom corner in GL-screen-space. + * @param size The window size to use. + * @param src The GL-screen-space position. + * @param dst The 3D world-space position. + */ + void unprojectGL(const Size& size, const Vec3* src, Vec3* dst) const; + /** * Is this aabb visible in frustum */ @@ -172,6 +203,16 @@ public: */ int getDepth() const { return _depth; } + /** + * Get the frustum's far plane. + */ + float getFarPlane() const { return _farPlane; } + + /** + * Get the frustum's near plane. + */ + float getNearPlane() const { return _nearPlane; } + //override virtual void onEnter() override; virtual void onExit() override; diff --git a/cocos/2d/CCDrawNode.h b/cocos/2d/CCDrawNode.h index 00236f8da1..712fc8ac3b 100644 --- a/cocos/2d/CCDrawNode.h +++ b/cocos/2d/CCDrawNode.h @@ -118,7 +118,7 @@ public: * * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @param drawLineToCenter Whether or not draw the line from the origin to center. * @param scaleX The scale value in x. @@ -131,7 +131,7 @@ public: * * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @param drawLineToCenter Whether or not draw the line from the origin to center. * @param color Set the circle color. @@ -216,7 +216,7 @@ public: /** Draws a solid circle given the center, radius and number of segments. * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @param scaleX The scale value in x. * @param scaleY The scale value in y. @@ -228,7 +228,7 @@ public: /** Draws a solid circle given the center, radius and number of segments. * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @param color The solid circle color. * @js NA diff --git a/cocos/2d/CCDrawingPrimitives.h b/cocos/2d/CCDrawingPrimitives.h index eb13fb8348..38379c027d 100644 --- a/cocos/2d/CCDrawingPrimitives.h +++ b/cocos/2d/CCDrawingPrimitives.h @@ -153,7 +153,7 @@ namespace DrawPrimitives * * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @param drawLineToCenter Whether or not draw the line from the origin to center. * @param scaleX The scale value in x. @@ -165,7 +165,7 @@ namespace DrawPrimitives * * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @param drawLineToCenter Whether or not draw the line from the origin to center. */ @@ -174,7 +174,7 @@ namespace DrawPrimitives /** Draws a solid circle given the center, radius and number of segments. * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @param scaleX The scale value in x. * @param scaleY The scale value in y. @@ -185,7 +185,7 @@ namespace DrawPrimitives /** Draws a solid circle given the center, radius and number of segments. * @param center The circle center point. * @param radius The circle rotate of radius. - * @param angle The circle angel. + * @param angle The circle angle. * @param segments The number of segments. * @js NA */ diff --git a/cocos/2d/CCFastTMXTiledMap.cpp b/cocos/2d/CCFastTMXTiledMap.cpp index e444276ce1..3a13b0bebc 100644 --- a/cocos/2d/CCFastTMXTiledMap.cpp +++ b/cocos/2d/CCFastTMXTiledMap.cpp @@ -101,6 +101,9 @@ TMXTiledMap::~TMXTiledMap() TMXLayer * TMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo) { TMXTilesetInfo *tileset = tilesetForLayer(layerInfo, mapInfo); + if (tileset == nullptr) + return nullptr; + TMXLayer *layer = TMXLayer::create(tileset, layerInfo, mapInfo); // tell the layerinfo to release the ownership of the tiles map. @@ -170,6 +173,10 @@ void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo) if (layerInfo->_visible) { TMXLayer *child = parseLayer(layerInfo, mapInfo); + if (child == nullptr) { + idx++; + continue; + } addChild(child, idx, idx); // update content size with the max size diff --git a/cocos/2d/CCLabelTextFormatter.cpp b/cocos/2d/CCLabelTextFormatter.cpp index b135d06cff..a7e94cee3f 100644 --- a/cocos/2d/CCLabelTextFormatter.cpp +++ b/cocos/2d/CCLabelTextFormatter.cpp @@ -40,23 +40,21 @@ bool LabelTextFormatter::multilineText(Label *theLabel) std::vector multiline_string; multiline_string.reserve( limit ); - std::vector last_word; last_word.reserve( 25 ); - bool isStartOfLine = false, isStartOfWord = false; - float startOfLine = -1, startOfWord = -1; + bool lineIsEmpty = true; + bool calculateLineStart = false; + float startOfLine = 0.f; - int skip = 0; - + int skip = 0; int tIndex = 0; - float scalsX = theLabel->getScaleX(); float lineWidth = theLabel->_maxLineWidth; bool breakLineWithoutSpace = theLabel->_lineBreakWithoutSpaces; Label::LetterInfo* info = nullptr; for (int j = 0; j+skip < limit; j++) - { + { info = & theLabel->_lettersInfo.at(j+skip); unsigned int justSkipped = 0; @@ -72,10 +70,10 @@ bool LabelTextFormatter::multilineText(Label *theLabel) last_word.push_back('\n'); multiline_string.insert(multiline_string.end(), last_word.begin(), last_word.end()); last_word.clear(); - isStartOfWord = false; - isStartOfLine = false; - startOfWord = -1; - startOfLine = -1; + + calculateLineStart = false; + startOfLine = 0.f; + lineIsEmpty = true; } if(tIndex < limit) { @@ -90,69 +88,21 @@ bool LabelTextFormatter::multilineText(Label *theLabel) if (tIndex >= limit) break; - char16_t character = strWhole[tIndex]; - - if (!isStartOfWord) + if (calculateLineStart) { - startOfWord = info->position.x * scalsX; - isStartOfWord = true; + startOfLine = info->position.x - info->def.offsetX - theLabel->_horizontalKernings[tIndex]; + calculateLineStart = false; + lineIsEmpty = true; } - if (!isStartOfLine) + auto character = strWhole[tIndex]; + if (breakLineWithoutSpace) { - startOfLine = startOfWord; - isStartOfLine = true; - } - - // 1) Whitespace. - // 2) This character is non-CJK, but the last character is CJK - bool isspace = StringUtils::isUnicodeSpace(character); - bool isCJK = false; - if(!isspace) - { - isCJK = StringUtils::isCJKUnicode(character); - } - - if (isspace || - (!last_word.empty() && StringUtils::isCJKUnicode(last_word.back()) && !isCJK)) - { - // if current character is white space, put it into the current word - if (isspace) last_word.push_back(character); - multiline_string.insert(multiline_string.end(), last_word.begin(), last_word.end()); - last_word.clear(); - isStartOfWord = false; - startOfWord = -1; - // put the CJK character in the last word - // and put the non-CJK(ASCII) character in the current word - if (!isspace) last_word.push_back(character); - continue; - } - - float posRight = (info->position.x + info->contentSize.width) * scalsX; - // Out of bounds. - if (posRight - startOfLine > lineWidth) - { - if (!breakLineWithoutSpace && !isCJK) + float posRight = info->position.x + info->contentSize.width; + if (posRight - startOfLine > lineWidth) { - last_word.push_back(character); - - int found = StringUtils::getIndexOfLastNotChar16(multiline_string, ' '); - if (found != -1) - StringUtils::trimUTF16Vector(multiline_string); - else - multiline_string.clear(); - - if (multiline_string.size() > 0) - multiline_string.push_back('\n'); - - isStartOfLine = false; - startOfLine = -1; - } - else - { - StringUtils::trimUTF16Vector(last_word); //issue #8492:endless loop if not using system font, and constrained length is less than one character width - if (isStartOfLine && last_word.size() == 0) + if (last_word.empty()) last_word.push_back(character); else --j; @@ -160,22 +110,102 @@ bool LabelTextFormatter::multilineText(Label *theLabel) last_word.push_back('\n'); multiline_string.insert(multiline_string.end(), last_word.begin(), last_word.end()); last_word.clear(); - - isStartOfWord = false; - isStartOfLine = false; - startOfWord = -1; - startOfLine = -1; + + startOfLine = 0.f; + } + else + { + last_word.push_back(character); } } + //Break line with space. else { - // Character is normal. - last_word.push_back(character); + std::vector nonCJKword; + int wordIndex = tIndex; + for (; wordIndex < limit; ++wordIndex) + { + auto ch = strWhole[wordIndex]; + if (ch == '\n' || StringUtils::isUnicodeSpace(ch) || StringUtils::isCJKUnicode(ch)) + { + break; + } + + nonCJKword.push_back(ch); + } + + if (!nonCJKword.empty()) + { + auto wordLenth = nonCJKword.size(); + auto lastCharacterInfo = &theLabel->_lettersInfo.at(tIndex + wordLenth - 1); + + float posRight = lastCharacterInfo->position.x + lastCharacterInfo->contentSize.width; + if (posRight - startOfLine > lineWidth) + { + if (last_word.empty()) + { + nonCJKword.push_back('\n'); + multiline_string.insert(multiline_string.end(), nonCJKword.begin(), nonCJKword.end()); + + calculateLineStart = true; + } + else + { + last_word.push_back('\n'); + multiline_string.insert(multiline_string.end(), last_word.begin(), last_word.end()); + last_word.clear(); + + startOfLine = info->position.x - info->def.offsetX - theLabel->_horizontalKernings[tIndex]; + if (posRight - startOfLine > lineWidth) + { + nonCJKword.push_back('\n'); + multiline_string.insert(multiline_string.end(), nonCJKword.begin(), nonCJKword.end()); + calculateLineStart = true; + } + else + { + multiline_string.insert(multiline_string.end(), nonCJKword.begin(), nonCJKword.end()); + lineIsEmpty = false; + calculateLineStart = false; + } + } + } + else + { + multiline_string.insert(multiline_string.end(), last_word.begin(), last_word.end()); + last_word.clear(); + + multiline_string.insert(multiline_string.end(), nonCJKword.begin(), nonCJKword.end()); + lineIsEmpty = false; + } + + j += wordLenth - 1; + continue; + } + + float posRight = info->position.x + info->contentSize.width; + if (posRight - startOfLine > lineWidth) + { + //issue #8492:endless loop if not using system font, and constrained length is less than one character width + if (lineIsEmpty && last_word.empty()) + last_word.push_back(character); + else + --j; + + last_word.push_back('\n'); + multiline_string.insert(multiline_string.end(), last_word.begin(), last_word.end()); + last_word.clear(); + + calculateLineStart = true; + } + else + { + last_word.push_back(character); + } } } multiline_string.insert(multiline_string.end(), last_word.begin(), last_word.end()); - std::u16string strNew(multiline_string.begin(), multiline_string.end()); theLabel->_currentUTF16String = strNew; @@ -386,33 +416,16 @@ bool LabelTextFormatter::createStringSprites(Label *theLabel) continue; } - nextFontPositionX += charAdvance + kernings[i]; + nextFontPositionX += charAdvance + theLabel->_additionalKerning; - if (longestLine < nextFontPositionX) + auto letterRight = letterPosition.x + tempDefinition.width; + if (longestLine < letterRight) { - longestLine = nextFontPositionX; + longestLine = letterRight; } - - // check longest line before adding additional kerning - nextFontPositionX += theLabel->_additionalKerning; } - float lastCharWidth = tempDefinition.width * contentScaleFactor; - Size tmpSize; - // If the last character processed has an xAdvance which is less that the width of the characters image, then we need - // to adjust the width of the string to take this into account, or the character will overlap the end of the bounding - // box - if(charAdvance < lastCharWidth) - { - tmpSize.width = longestLine - charAdvance + lastCharWidth; - } - else - { - tmpSize.width = longestLine; - } - - tmpSize.height = totalHeight; - + Size tmpSize(longestLine * contentScaleFactor, totalHeight); if (theLabel->_labelHeight > 0) { tmpSize.height = theLabel->_labelHeight * contentScaleFactor; diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index bb9115162f..423a60286e 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1314,9 +1314,12 @@ uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFl _normalizedPositionDirty = false; } } + + //remove this two line given that isVisitableByVisitingCamera should not affect the calculation of transform given that we are visiting scene + //without involving view and projection matrix. - if (!isVisitableByVisitingCamera()) - return parentFlags; +// if (!isVisitableByVisitingCamera()) +// return parentFlags; uint32_t flags = parentFlags; flags |= (_transformUpdated ? FLAGS_TRANSFORM_DIRTY : 0); diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index be359bd71d..656f4bf605 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -598,8 +598,8 @@ void Sprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) if(_insideBounds) #endif { - _quadCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, transform, flags); - renderer->addCommand(&_quadCommand); + _trianglesCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, getRenderedTriangles(), transform, flags); + renderer->addCommand(&_trianglesCommand); #if CC_SPRITE_DEBUG_DRAW _debugDrawNode->clear(); @@ -614,6 +614,17 @@ void Sprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) } } +TrianglesCommand::Triangles Sprite::getRenderedTriangles() const +{ + static unsigned short indices[6] = {0, 1, 2, 3, 2, 1}; + TrianglesCommand::Triangles result; + result.indices = indices; + result.verts = (V3F_C4B_T2F*)&_quad; + result.vertCount = 4; + result.indexCount = 6; + return result; +} + // MARK: visit, draw, transform void Sprite::addChild(Node *child, int zOrder, int tag) @@ -993,6 +1004,10 @@ bool Sprite::isFrameDisplayed(SpriteFrame *frame) const SpriteFrame* Sprite::getSpriteFrame() const { + if(nullptr != this->_spriteFrame) + { + return this->_spriteFrame; + } return SpriteFrame::createWithTexture(_texture, CC_RECT_POINTS_TO_PIXELS(_rect), _rectRotated, diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 66110f9a4b..2f6a65a36a 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -33,7 +33,7 @@ THE SOFTWARE. #include "2d/CCDrawNode.h" #include "base/CCProtocols.h" #include "renderer/CCTextureAtlas.h" -#include "renderer/CCQuadCommand.h" +#include "renderer/CCTrianglesCommand.h" #include "renderer/CCCustomCommand.h" NS_CC_BEGIN @@ -538,7 +538,8 @@ protected: virtual void updateBlendFunc(); virtual void setReorderChildDirtyRecursively(); virtual void setDirtyRecursively(bool value); - + + TrianglesCommand::Triangles getRenderedTriangles() const; // // Data used when the sprite is rendered using a SpriteSheet // @@ -557,7 +558,7 @@ protected: BlendFunc _blendFunc; /// It's required for TextureProtocol inheritance Texture2D* _texture; /// Texture2D object that is used to render the sprite SpriteFrame* _spriteFrame; - QuadCommand _quadCommand; /// quad command + TrianglesCommand _trianglesCommand; /// #if CC_SPRITE_DEBUG_DRAW DrawNode *_debugDrawNode; #endif //CC_SPRITE_DEBUG_DRAW diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index c7a56eecef..1a656a5a9b 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -39,7 +39,7 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "renderer/CCTexture2D.h" #include "renderer/CCTextureCache.h" - +#include "base/CCNinePatchImageParser.h" #include "deprecated/CCString.h" @@ -104,6 +104,10 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu // check the format CCASSERT(format >=0 && format <= 3, "format is not supported for SpriteFrameCache addSpriteFramesWithDictionary:textureFilename:"); + auto textureFileName = Director::getInstance()->getTextureCache()->getTextureFilePath(texture); + auto image = new Image(); + image->initWithImageFile(textureFileName); + NinePatchImageParser parser; for (auto iter = framesDict.begin(); iter != framesDict.end(); ++iter) { ValueMap& frameDict = iter->second.asValueMap(); @@ -183,7 +187,7 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu _spriteFramesAliases[oneAlias] = Value(spriteFrameName); } - + // create frame spriteFrame = SpriteFrame::createWithTexture(texture, Rect(textureRect.origin.x, textureRect.origin.y, spriteSize.width, spriteSize.height), @@ -192,9 +196,16 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu spriteSourceSize); } + bool flag = NinePatchImageParser::isNinePatchImage(spriteFrameName); + if(flag) + { + parser.setSpriteFrameInfo(image, spriteFrame->getRectInPixels(), spriteFrame->isRotated()); + texture->addSpriteFrameCapInset(spriteFrame, parser.parseCapInset()); + } // add sprite frame _spriteFrames.insert(spriteFrameName, spriteFrame); } + CC_SAFE_DELETE(image); } void SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist, Texture2D *texture) @@ -327,13 +338,14 @@ void SpriteFrameCache::removeUnusedSpriteFrames() if( spriteFrame->getReferenceCount() == 1 ) { toRemoveFrames.push_back(iter->first); + spriteFrame->getTexture()->removeSpriteFrameCapInset(spriteFrame); CCLOG("cocos2d: SpriteFrameCache: removing unused frame: %s", iter->first.c_str()); removed = true; } } _spriteFrames.erase(toRemoveFrames); - + // FIXME:. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache if( removed ) { diff --git a/cocos/2d/CCTMXTiledMap.cpp b/cocos/2d/CCTMXTiledMap.cpp index d5a3d842e8..773cf01d24 100644 --- a/cocos/2d/CCTMXTiledMap.cpp +++ b/cocos/2d/CCTMXTiledMap.cpp @@ -102,6 +102,9 @@ TMXTiledMap::~TMXTiledMap() TMXLayer * TMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo) { TMXTilesetInfo *tileset = tilesetForLayer(layerInfo, mapInfo); + if (tileset == nullptr) + return nullptr; + TMXLayer *layer = TMXLayer::create(tileset, layerInfo, mapInfo); // tell the layerinfo to release the ownership of the tiles map. @@ -171,9 +174,12 @@ void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo) auto& layers = mapInfo->getLayers(); for(const auto &layerInfo : layers) { - if (layerInfo->_visible) - { + if (layerInfo->_visible) { TMXLayer *child = parseLayer(layerInfo, mapInfo); + if (child == nullptr) { + idx++; + continue; + } addChild(child, idx, idx); // update content size with the max size diff --git a/cocos/2d/MarchingSquare.cpp b/cocos/2d/MarchingSquare.cpp index 773e51e7e8..b59b1502d6 100644 --- a/cocos/2d/MarchingSquare.cpp +++ b/cocos/2d/MarchingSquare.cpp @@ -257,8 +257,8 @@ void MarchingSquare::marchSquare(int startx, int starty) { //TODO: we triangulation cannot work collineer points, so we need to modify same point a little //TODO: maybe we can detect if we go into a hole and coming back the hole, we should extract those points and remove them - points.back().x -= 0.00001; - points.back().y -= 0.00001; + points.back().x -= 0.00001f; + points.back().y -= 0.00001f; points.push_back(Vec2((float)curx, (float)height-cury)/ scaleFactor); } else{ diff --git a/cocos/2d/cocos2dx.props b/cocos/2d/cocos2dx.props index a0a234ee9f..f1a0af1cd4 100644 --- a/cocos/2d/cocos2dx.props +++ b/cocos/2d/cocos2dx.props @@ -7,7 +7,7 @@ - opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;glfw3.lib;freetype250.lib;winmm.lib;ws2_32.lib;libchipmunk.lib;libbox2d.lib;libSpine.lib;%(AdditionalDependencies) + opengl32.lib;glew32.lib;libzlib.lib;libwebp.lib;libiconv.lib;freetype250.lib;winmm.lib;ws2_32.lib;libbox2d.lib;libSpine.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) false diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index fb05f4a5d9..66e821a166 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -432,6 +432,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + @@ -995,6 +996,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 5f21b80697..0fa1979adb 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -1872,6 +1872,9 @@ renderer + + base + @@ -3662,6 +3665,9 @@ renderer + + base + diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems index 723413e8ac..11dd2de823 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems @@ -236,6 +236,9 @@ + + + @@ -282,6 +285,7 @@ + @@ -442,6 +446,14 @@ + + + + + + + + @@ -830,11 +842,15 @@ + NotUsing + + + NotUsing @@ -883,6 +899,7 @@ + @@ -892,7 +909,7 @@ - + @@ -1019,6 +1036,14 @@ + + + + + + + + @@ -1222,4 +1247,7 @@ + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters index d433b0f87d..73c955fe4c 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters @@ -1791,6 +1791,43 @@ renderer + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + audioengine + + + audioengine + + + audioengine + + + audioengine + + @@ -2776,9 +2813,6 @@ base - - base - base @@ -3405,6 +3439,46 @@ renderer + + audioengine + + + audioengine + + + audioengine + + + audioengine + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + base + + @@ -3662,6 +3736,12 @@ {932c5f6e-07b3-4b34-97ae-2f3d42024149} + + {bd1a6214-d6e0-4341-a1fc-79da99b55e35} + + + {e6f8ab69-f66f-48be-a40f-e33c08e77516} + @@ -3777,4 +3857,9 @@ 3d + + + physics3d + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj index 7a5ccc03d0..aa50019dda 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj @@ -30,6 +30,9 @@ {3b26a12d-3a44-47ea-82d2-282660fc844d} + + {ec2b1292-2d8c-4feb-a84b-2550b32c1ae7} + {f3550fe0-c795-44f6-8feb-093eb68143ae} @@ -157,7 +160,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1\freetype2;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -177,7 +180,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1\freetype2;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -197,7 +200,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1\freetype2;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -217,7 +220,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1\freetype2;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -237,7 +240,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1\freetype2;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -257,7 +260,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\winrt_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\winrt_8.1\freetype2;$(EngineRoot)external\websockets\include\winrt_8.1;$(EngineRoot)external\curl\include\winrt_8.1;$(EngineRoot)external\tiff\include\winrt_8.1;$(EngineRoot)external\jpeg\include\winrt_8.1;$(EngineRoot)external\png\include\winrt_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj index 9194a11930..d6f4970a79 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj @@ -22,6 +22,9 @@ {22f798d8-bfff-4754-996f-a5395343d5ec} + + {e35634bd-b91b-4a6d-b957-96f56dd065f9} + {cc1da216-a80d-4be4-b309-acb6af313aff} @@ -111,7 +114,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1\freetype2;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -131,7 +134,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1\freetype2;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -151,7 +154,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1\freetype2;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) @@ -171,7 +174,7 @@ /Zm384 /bigobj %(AdditionalOptions) pch.h $(EngineRoot)external\wp_8.1-specific\zlib\include;$(EngineRoot)external\freetype2\include\wp_8.1\freetype2;$(EngineRoot)external\websockets\include\wp_8.1;$(EngineRoot)external\curl\include\wp_8.1;$(EngineRoot)external\tiff\include\wp_8.1;$(EngineRoot)external\jpeg\include\wp_8.1;$(EngineRoot)external\png\include\wp_8.1;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) - CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;_USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;NDEBUG;%(PreprocessorDefinitions) false %(DisableSpecificWarnings) diff --git a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj new file mode 100644 index 0000000000..a6df06194a --- /dev/null +++ b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj @@ -0,0 +1,1616 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ecee1119-ce2e-4f7e-83a8-1932ea48e893} + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + DynamicLibrary + libcocos2d + libcocos2d + en-US + 14.0 + true + Windows Store + 8.2 + 10.0.10069.0 + 10.0.10069.0 + + + + DynamicLibrary + true + v140 + + + DynamicLibrary + true + v140 + + + DynamicLibrary + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + ProgramDatabase + + + Console + false + false + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + false + + + Console + false + false + + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + ProgramDatabase + + + Console + false + false + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + false + ProgramDatabase + + + Console + false + false + + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + EditAndContinue + + + Console + false + false + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + false + + + Console + false + false + + + + + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters new file mode 100644 index 0000000000..c79856b76e --- /dev/null +++ b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters @@ -0,0 +1,3862 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms + + + {7a1f75b9-e286-444c-9469-0cf18caf9851} + + + {0fee395c-63c7-44c6-a4f4-1f36e2c87bb8} + + + {50c0af16-c916-4fa8-9fa2-b86e38449e26} + + + {5aeb6e4f-9e25-4b88-b583-fa11189743a0} + + + {cfeb83ba-f330-49a3-a32f-4360729feb34} + + + {48ef00ff-acc8-4c9c-a6e4-00d72e737ad2} + + + {f2236b85-0526-49e2-a18c-ac4951062666} + + + {33f548c2-d835-4404-9e44-ad1511588c8e} + + + {26495053-242d-4ec8-bf5a-6ea6f5ac4000} + + + {94bbb957-b493-45d2-9f5a-753ac1ab78ce} + + + {a2141e87-a561-433e-905b-63ff5c4e0e6e} + + + {661c905d-7ec2-4161-8b09-1c22ddefb830} + + + {6b13d475-62b0-4d73-8cee-52f077aa3fe7} + + + {33af945f-9ffb-4e87-9467-7774d4cbaaee} + + + {abb46246-b4f9-4ad0-8db8-11b47ce43a1f} + + + {e779fbed-6102-4689-81bd-57b2e70b0f26} + + + {769e8f33-4eef-4d34-a192-6113354d584f} + + + {2775a689-9303-4568-8bdd-85793c152dc0} + + + {d58e753e-e7d1-49ea-970a-4e980b04cffa} + + + {9ec27523-fcde-48f7-8f77-34e2f2c51d3d} + + + {e7a997f1-97ef-408f-9455-132da617f439} + + + {b7fa88eb-4dd8-4476-89b3-665a128ecd49} + + + {84e54bc0-68a3-4466-b64b-147525501276} + + + {1c30324c-b033-419a-b0bc-fcd04bf5e887} + + + {5f24927a-be4e-43d4-bfa6-19a11c86ba74} + + + {b4dfd33e-325a-45e5-b5c4-bc759a765944} + + + {1adc7897-87b2-4fa2-9de1-a662bbc0cef2} + + + {8f07e318-d877-4880-834e-0e5a36759148} + + + {47260f4a-f9ab-4801-8a7f-5610755592f6} + + + {69e44658-eabe-4434-bc55-09ba8fc18a65} + + + {0a31f1b5-366b-4b0e-b998-6eee00a5e232} + + + {c2ef43b9-5a8e-4810-9430-31427c61cd57} + + + {377b23e6-4800-4305-b6de-7ffd6ab75445} + + + {3629c3cd-b691-403d-bec6-6915a63304bd} + + + {46c2c273-aa0e-4bc5-8eea-3aa512372d3a} + + + {09f711eb-3ba4-447e-85a0-b2b5ebb40328} + + + {ed4442ff-0420-424c-bbfa-720b8ab658d0} + + + {e6726a08-977a-4d22-b4b4-4e8c5aa75c80} + + + {33cb6b93-333c-4f05-bc0b-e17ac95abdf9} + + + {e74ad41e-c739-4e66-8b54-15914b651f1b} + + + {e6a2d595-06dc-436f-b5d7-57e8852f800e} + + + {5b4d4e9c-90de-496a-9897-930e48c96052} + + + {f711caa7-1c16-43ec-8f2e-92438bfdd92d} + + + {9b4e1b59-dc28-49aa-9b93-05ae39afeef4} + + + {566aad08-9d43-48ff-99a0-3f4a8e6cfa23} + + + {ebca298d-3724-42b8-923f-934f2df267de} + + + {2e9af99e-c268-459a-9615-9f3c5b58efdc} + + + {cdcb5464-cce7-4252-9fa9-0113c6f88731} + + + {6ba31aca-4ffb-4c7f-86b3-68c686e9e83a} + + + {12508884-4921-4027-9e3f-0afcc4d51b18} + + + {d28da99a-5849-465a-a1ef-a39f13b8d71b} + + + {5c9216f7-37c5-45a7-abd5-0f91ab126e78} + + + {efebb9af-0744-4d20-947b-a118679860ba} + + + {c67477ac-753e-48da-9f7c-2044d8d3561c} + + + {b96929a6-1068-4e34-ba12-9b1506c52029} + + + {2b9df357-22d4-4fd0-b797-a9bfb25a2f49} + + + {cd711175-67df-4a15-bc83-c13422334b46} + + + {2520090a-69d8-46d3-a958-de49c068035c} + + + {21031d69-8a1d-468a-98d7-2c3080705ab3} + + + {b666aa35-1920-44d0-8311-86e80b7a010a} + + + {21d16309-93ee-4b38-a10a-de87be25dcc9} + + + {939431be-589b-461b-a4dd-791ad66e9611} + + + {00ac48e4-fa60-4020-b924-18562a81d799} + + + {593b7ac7-693d-4a46-ab32-e0203004e865} + + + {6651f0d8-3685-457c-9674-91ba9c2bde9b} + + + {922ba080-bc7b-4493-b12a-2ccf5ccc3d68} + + + {7bfc1d7e-a562-4ef8-82f0-af7c5f9ec004} + + + {fff4ac28-7649-4202-85ee-4fc22b4de31b} + + + {d0b5ce80-dfff-44b8-8ca0-c01ec18c3983} + + + {8d2b7057-43b4-41e4-a752-0cfc20b1c825} + + + {1715f2ff-18ed-405a-a0b7-1bb7fc7968de} + + + {7a8dbff0-49af-4a9e-af07-7ecc643cf7d0} + + + {287c8ea7-54ab-4514-94ad-bc60fca8e2f6} + + + {f8e329a2-40aa-428b-b111-3b788023c5e0} + + + {0a443764-b762-4858-b578-114bfc5d7ab5} + + + {6fcf3801-c3e1-4097-ba82-3da0a6599555} + + + {acb13cf1-4b21-4392-826a-0ca62db8afe9} + + + {92cd288c-1327-4990-8ae2-dab11fa3a69c} + + + {bc47263f-0690-488e-b240-0b7bf763f401} + + + {5937896e-882c-429a-ada7-72c799c06920} + + + {f68e83b4-2fa3-4f47-9864-e7dfd90c16a6} + + + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base\allocator + + + base\allocator + + + base\allocator + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosdenshion\winrt + + + cocosdenshion\winrt + + + cocosdenshion\winrt + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\physics + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader\ArmatureNodeReader + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ComAudioReader + + + cocostudio\reader\WidgetReader\GameMapReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\Node3DReader + + + cocostudio\reader\WidgetReader\NodeReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\Particle3DReader + + + cocostudio\reader\WidgetReader\ParticleReader + + + cocostudio\reader\WidgetReader\ProjectNodeReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\Sprite3DReader + + + cocostudio\reader\WidgetReader\SpriteReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\reader\WidgetReader\UserCameraReader + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\physics_nodes + + + extension\physics_nodes + + + extension + + + external\ConvertUTF + + + external\ConvertUTF + + + external\edtaa + + + external\xxhash + + + external\unzip + + + external\unzip + + + external\unzip + + + external\tinyxml2 + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + network + + + network + + + network + + + physics + + + physics + + + physics + + + physics + + + physics + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + storage + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + cocostudio\reader + + + cocostudio\reader + + + platform\winrt + + + 2d + + + 2d + + + 2d + + + external\poly2tri\common + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + network + + + network + + + base + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + base + + + base + + + audioengine + + + audioengine + + + audioengine + + + audioengine + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosdenshion\include + + + cocosdenshion\include + + + cocosdenshion\include + + + cocosdenshion\winrt + + + cocosdenshion\winrt + + + cocostudio + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\physics + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader\ArmatureNodeReader + + + cocostudio\reader\WidgetReader\ArmatureNodeReader + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ComAudioReader + + + cocostudio\reader\WidgetReader\GameMapReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\Node3DReader + + + cocostudio\reader\WidgetReader\NodeReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\Particle3DReader + + + cocostudio\reader\WidgetReader\ParticleReader + + + cocostudio\reader\WidgetReader\ProjectNodeReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\Sprite3DReader + + + cocostudio\reader\WidgetReader\SpriteReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\reader\WidgetReader\UserCameraReader + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\physics_nodes + + + extension\physics_nodes + + + extension + + + extension + + + extension + + + extension + + + external\ConvertUTF + + + external\edtaa + + + external\xxhash + + + external\unzip + + + external\unzip + + + external\unzip + + + external\unzip + + + external\tinyxml2 + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + network + + + network + + + network + + + network + + + network + + + network + + + physics + + + physics + + + physics + + + physics + + + physics + + + physics + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + storage + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + cocostudio\reader + + + cocostudio\reader + + + platform\winrt + + + 2d + + + 2d + + + 2d + + + external\poly2tri + + + external\poly2tri\common + + + external\poly2tri\common + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + network + + + base + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + base + + + audioengine + + + audioengine + + + audioengine + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + + + base + + + base + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + + + renderer + + + \ No newline at end of file diff --git a/cocos/2d/win10_props/cocos2d_win10.props b/cocos/2d/win10_props/cocos2d_win10.props new file mode 100644 index 0000000000..b5bfaeca85 --- /dev/null +++ b/cocos/2d/win10_props/cocos2d_win10.props @@ -0,0 +1,32 @@ + + + + + $(MSBuildThisFileDirectory)..\..\..\ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(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;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories) + + + WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;%(PreprocessorDefinitions) + true + true + false + OldStyle + 4056;4244;4251;4756;4453;28204;4099; + + + libGLESv2.lib;libEGL.lib;ws2_32.lib;libwebsockets.lib;chipmunk.lib;zlib.lib;freetype.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalLibraryDirectories); + /IGNORE:4264 %(AdditionalOptions) + + + + + $(EngineRoot) + true + + + \ No newline at end of file diff --git a/cocos/2d/win10_props/cocos2d_win10_app.props b/cocos/2d/win10_props/cocos2d_win10_app.props new file mode 100644 index 0000000000..9d5ace9ee9 --- /dev/null +++ b/cocos/2d/win10_props/cocos2d_win10_app.props @@ -0,0 +1,27 @@ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform)\ + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform)\ + $(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ + $(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform)\ + + + + true + + + true + + + true + + + true + + + true + + + \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt_platform.props b/cocos/2d/win10_props/cocos2d_win10_platform.props similarity index 59% rename from cocos/2d/winrt_props/cocos2d_winrt_platform.props rename to cocos/2d/win10_props/cocos2d_win10_platform.props index 761976bf4e..14747a896d 100644 --- a/cocos/2d/winrt_props/cocos2d_winrt_platform.props +++ b/cocos/2d/win10_props/cocos2d_win10_platform.props @@ -2,6 +2,11 @@ - winrt_8.1 + win10 + + + msxml6.lib;%(AdditionalDependencies) + + \ No newline at end of file diff --git a/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props index 672498aa94..3e56e02d37 100644 --- a/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props +++ b/cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props @@ -10,12 +10,12 @@ $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(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;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories) - WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;%(PreprocessorDefinitions) true true false OldStyle - 4056;4244;4251;4756;4453;28204; + 4056;4244;4251;4756;4453;28204;4099; libGLESv2.lib;libEGL.lib;ws2_32.lib;libwebsockets.lib;libcurl.lib;chipmunk.lib;zlib.lib;freetype.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) diff --git a/cocos/2d/winrt_props/cocos2d_winrt.props b/cocos/2d/winrt_props/cocos2d_winrt.props deleted file mode 100644 index a35aa77534..0000000000 --- a/cocos/2d/winrt_props/cocos2d_winrt.props +++ /dev/null @@ -1,32 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\..\..\ - - - - - $(EngineRoot)external\winrt-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;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories); - - - WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - true - true - false - OldStyle - 4056;4996;4244;4251; - - - libGLESv2.lib;libEGL.lib;ws2_32.lib;libwebsockets.lib;libcurl.lib;libchipmunk.lib;zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype250.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) - $(EngineRoot)external\winrt-specific\angle\prebuilt\$(Platform);$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\tiff\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\jpeg\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalLibraryDirectories); - /IGNORE:4264 %(AdditionalOptions) - - - - - $(EngineRoot) - true - - - \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt_app.props b/cocos/2d/winrt_props/cocos2d_winrt_app.props deleted file mode 100644 index d0685779c1..0000000000 --- a/cocos/2d/winrt_props/cocos2d_winrt_app.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - $(EngineRoot)external\winrt-specific\angle\prebuilt\$(Platform)\ - - - - true - - - true - - - \ No newline at end of file diff --git a/cocos/3d/CCBillBoard.cpp b/cocos/3d/CCBillBoard.cpp index 95ec6aacd9..b8bbcb5238 100644 --- a/cocos/3d/CCBillBoard.cpp +++ b/cocos/3d/CCBillBoard.cpp @@ -230,10 +230,10 @@ void BillBoard::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { //FIXME: frustum culling here flags |= Node::FLAGS_RENDER_AS_3D; - _quadCommand.init(0, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, _modelViewTransform, flags); - _quadCommand.setTransparent(true); - _quadCommand.set3D(true); - renderer->addCommand(&_quadCommand); + _trianglesCommand.init(0, _texture->getName(), getGLProgramState(), _blendFunc, getRenderedTriangles(), _modelViewTransform, flags); + _trianglesCommand.setTransparent(true); + _trianglesCommand.set3D(true); + renderer->addCommand(&_trianglesCommand); } void BillBoard::setMode( Mode mode ) diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index 247cf35e29..baccc3db2e 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -760,18 +760,27 @@ bool Bundle3D::loadMeshDatasJson(MeshDatas& meshdatas) meshData->subMeshIndices.push_back(indexArray); meshData->numIndex = (int)meshData->subMeshIndices.size(); - //meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray)); - const rapidjson::Value& mesh_part_aabb = mesh_part[AABBS]; - if (mesh_part.HasMember(AABBS) && mesh_part_aabb.Size() == 6) + if(mesh_data.HasMember(AABBS)) { - 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)); + const rapidjson::Value& mesh_part_aabb = mesh_part[AABBS]; + if (mesh_part.HasMember(AABBS) && mesh_part_aabb.Size() == 6) + { + 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 + { + meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray)); + } } else { meshData->subMeshAABB.push_back(calculateAABB(meshData->vertex, meshData->getPerVertexSize(), indexArray)); } + } meshdatas.meshDatas.push_back(meshData); } diff --git a/cocos/3d/CCSkybox.cpp b/cocos/3d/CCSkybox.cpp index dc6e841340..ddcab5f257 100644 --- a/cocos/3d/CCSkybox.cpp +++ b/cocos/3d/CCSkybox.cpp @@ -152,18 +152,32 @@ void Skybox::draw(Renderer* renderer, const Mat4& transform, uint32_t flags) void Skybox::onDraw(const Mat4& transform, uint32_t flags) { - Mat4 trans(transform); - const cocos2d::Vec3 pos(Camera::getVisitingCamera()->getPosition3D()); - trans.m[12] = pos.x; - trans.m[13] = pos.y; - trans.m[14] = pos.z; - + auto camera = Camera::getVisitingCamera(); + + /* + At beginning, we have a regular skybox at origin point. + To render the skybox, we should keep camera at the center of skybox. + So we need a translate matrix, which can transform origin point to camera pos. + Camera's node to word transform matrix don't match our requement, + because it maybe contain the scale, rotate, reflact... effects, which isn't need. + First, we transform origin point to camera position by camera's node to world matrix. + Second, we create a translate matrix with the origin point's world position. + */ + Vec3 cameraPosInNode(0, 0, 0); + Vec3 cameraPosInWorld; + Mat4 cameraModelMat = camera->getNodeToWorldTransform(); + Mat4 trans = Mat4::IDENTITY; + cameraModelMat.transformPoint(cameraPosInNode, &cameraPosInWorld); + trans.translate(cameraPosInWorld); + auto state = getGLProgramState(); state->apply(trans); Vec4 color(_displayedColor.r / 255.f, _displayedColor.g / 255.f, _displayedColor.b / 255.f, 1.f); state->setUniformVec4("u_color", color); - + float scalf = (camera->getFarPlane() + camera->getNearPlane()) / 2; + state->setUniformFloat("u_scalef", scalf); + GLboolean depthFlag = glIsEnabled(GL_DEPTH_TEST); GLint depthFunc; glGetIntegerv(GL_DEPTH_FUNC, &depthFunc); diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index f50a2564c1..091ec7ddb2 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -701,7 +701,7 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { #if CC_USE_CULLING // camera clipping - if(!Camera::getVisitingCamera()->isVisibleInFrustum(&this->getAABB())) + if(Camera::getVisitingCamera() && !Camera::getVisitingCamera()->isVisibleInFrustum(&this->getAABB())) return; #endif diff --git a/cocos/3d/CCTerrain.cpp b/cocos/3d/CCTerrain.cpp index d8c9b13a4f..a309052a98 100644 --- a/cocos/3d/CCTerrain.cpp +++ b/cocos/3d/CCTerrain.cpp @@ -33,6 +33,7 @@ USING_NS_CC; #include "renderer/CCRenderer.h" #include "renderer/CCGLProgramStateCache.h" #include "renderer/ccGLStateCache.h" +#include "renderer/CCRenderState.h" #include "base/CCDirector.h" #include "2d/CCCamera.h" @@ -79,6 +80,12 @@ bool Terrain::initProperties() auto state = GLProgramState::create(shader); setGLProgramState(state); + + _stateBlock->setBlend(false); + _stateBlock->setDepthWrite(true); + _stateBlock->setDepthTest(true); + _stateBlock->setCullFace(true); + setDrawWire(false); setIsEnableFrustumCull(true); setAnchorPoint(Vec2(0,0)); @@ -93,6 +100,13 @@ void Terrain::draw(cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, void Terrain::onDraw(const Mat4 &transform, uint32_t flags) { + auto modelMatrix = getNodeToWorldTransform(); + if(memcmp(&modelMatrix,&_terrainModelMatrix,sizeof(Mat4))!=0) + { + _terrainModelMatrix = modelMatrix; + _quadRoot->preCalculateAABB(_terrainModelMatrix); + } + auto glProgram = getGLProgram(); glProgram->use(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) @@ -104,34 +118,16 @@ void Terrain::onDraw(const Mat4 &transform, uint32_t flags) glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); } #endif - GLboolean blendCheck = glIsEnabled(GL_BLEND); - if(blendCheck) - { - glDisable(GL_BLEND); - } + + _stateBlock->bind(); + GL::enableVertexAttribs(1<<_positionLocation | 1 << _texcordLocation | 1<<_normalLocation); glProgram->setUniformsForBuiltins(transform); - GLboolean depthMaskCheck; - glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMaskCheck); - if(!depthMaskCheck) - { - glDepthMask(GL_TRUE); - } - GLboolean CullFaceCheck =glIsEnabled(GL_CULL_FACE); - if(!CullFaceCheck) - { - glEnable(GL_CULL_FACE); - } - GLboolean depthTestCheck; - depthTestCheck = glIsEnabled(GL_DEPTH_TEST); - if(!depthTestCheck) - { - glEnable(GL_DEPTH_TEST); - } + if(!_alphaMap) { glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D,_detailMapTextures[0]->getName()); + GL::bindTexture2D(_detailMapTextures[0]->getName()); glUniform1i(_detailMapLocation[0],0); glUniform1i(_alphaIsHasAlphaMapLocation,0); }else @@ -139,7 +135,7 @@ void Terrain::onDraw(const Mat4 &transform, uint32_t flags) for(int i =0;i<_maxDetailMapValue;i++) { glActiveTexture(GL_TEXTURE0+i); - glBindTexture(GL_TEXTURE_2D,_detailMapTextures[i]->getName()); + GL::bindTexture2D(_detailMapTextures[i]->getName()); glUniform1i(_detailMapLocation[i],i); glUniform1f(_detailMapSizeLocation[i],_terrainData._detailMaps[i]._detailMapSize); @@ -148,7 +144,7 @@ void Terrain::onDraw(const Mat4 &transform, uint32_t flags) glUniform1i(_alphaIsHasAlphaMapLocation,1); glActiveTexture(GL_TEXTURE4); - glBindTexture(GL_TEXTURE_2D,_alphaMap->getName()); + GL::bindTexture2D(_alphaMap->getName()); glUniform1i(_alphaMapLocation,4); } @@ -164,6 +160,8 @@ void Terrain::onDraw(const Mat4 &transform, uint32_t flags) if(_isCameraViewChanged ) { auto camPos = camera->getPosition3D(); + auto camModelMat = camera->getNodeToWorldTransform(); + camModelMat.transformPoint(&camPos); //set lod setChunksLOD(camPos); } @@ -180,28 +178,7 @@ void Terrain::onDraw(const Mat4 &transform, uint32_t flags) _isCameraViewChanged = false; } glActiveTexture(GL_TEXTURE0); - if(depthTestCheck) - { - }else - { - glDisable(GL_DEPTH_TEST); - } - if(depthMaskCheck) - { - }else - { - glDepthMask(GL_FALSE); - } - if(CullFaceCheck) - { - }else - { - glEnable(GL_CULL_FACE); - } - if(blendCheck) - { - glEnable(GL_BLEND); - } + #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) if(_isDrawWire)//reset state. { @@ -260,8 +237,12 @@ bool Terrain::initHeightMap(const char * heightMap) } Terrain::Terrain() +: _alphaMap(nullptr) +, _stateBlock(nullptr) { - _alphaMap = nullptr; + _stateBlock = RenderState::StateBlock::create(); + CC_SAFE_RETAIN(_stateBlock); + _customCommand.setTransparent(false); _customCommand.set3D(true); #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) @@ -453,6 +434,8 @@ void Terrain::setIsEnableFrustumCull(bool bool_value) Terrain::~Terrain() { + CC_SAFE_RELEASE(_stateBlock); + _alphaMap->release(); _heightMapImage->release(); delete _quadRoot; @@ -832,7 +815,6 @@ void Terrain::reload() } } - CCLOG("recreate"); initTextures(); _chunkLodIndicesSet.clear(); _chunkLodIndicesSkirtSet.clear(); diff --git a/cocos/3d/CCTerrain.h b/cocos/3d/CCTerrain.h index c348ecb22b..d06e1005d1 100644 --- a/cocos/3d/CCTerrain.h +++ b/cocos/3d/CCTerrain.h @@ -24,15 +24,18 @@ THE SOFTWARE. #ifndef CC_TERRAIN_H #define CC_TERRAIN_H +#include + #include "2d/CCNode.h" #include "2d/CCCamera.h" #include "renderer/CCTexture2D.h" #include "renderer/CCCustomCommand.h" +#include "renderer/CCRenderState.h" #include "3d/CCAABB.h" #include "3d/CCRay.h" -#include #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" + NS_CC_BEGIN /** @@ -81,7 +84,7 @@ NS_CC_BEGIN * We can use ray-terrain intersection to pick a point of the terrain; * Also we can get an arbitrary point of the terrain's height and normal vector for convenience . **/ -class CC_DLL Terrain :public Node +class CC_DLL Terrain : public Node { public: @@ -433,6 +436,7 @@ protected: ChunkIndices insertIndicesLOD(int neighborLod[4], int selfLod, GLushort * indices, int size); ChunkIndices insertIndicesLODSkirt(int selfLod, GLushort * indices, int size); + protected: std::vector _chunkLodIndicesSet; std::vector _chunkLodIndicesSkirtSet; @@ -469,6 +473,9 @@ protected: GLint _alphaMapLocation; GLint _alphaIsHasAlphaMapLocation; GLint _detailMapSizeLocation[4]; + + RenderState::StateBlock* _stateBlock; + #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) EventListenerCustom* _backToForegroundListener; #endif diff --git a/cocos/Android.mk b/cocos/Android.mk index e9c51ed861..951fadcf2b 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -103,6 +103,7 @@ math/TransformUtils.cpp \ math/Vec2.cpp \ math/Vec3.cpp \ math/Vec4.cpp \ +base/CCNinePatchImageParser.cpp \ base/CCAsyncTaskPool.cpp \ base/CCAutoreleasePool.cpp \ base/CCConfiguration.cpp \ diff --git a/cocos/audio/AudioEngine.cpp b/cocos/audio/AudioEngine.cpp index 3532870bea..252c8de835 100644 --- a/cocos/audio/AudioEngine.cpp +++ b/cocos/audio/AudioEngine.cpp @@ -24,7 +24,7 @@ #include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "audio/include/AudioEngine.h" #include "platform/CCFileUtils.h" @@ -36,6 +36,8 @@ #include "apple/AudioEngine-inl.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "win32/AudioEngine-win32.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT +#include "winrt/AudioEngine-winrt.h" #endif #define TIME_DELAY_PRECISION 0.0001 diff --git a/cocos/audio/android/Android.mk b/cocos/audio/android/Android.mk index bbd7725d9d..95b8d5dc7f 100644 --- a/cocos/audio/android/Android.mk +++ b/cocos/audio/android/Android.mk @@ -1,23 +1,6 @@ LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := cocosdenshion_static - -LOCAL_MODULE_FILENAME := libcocosdenshion - -LOCAL_SRC_FILES := cddSimpleAudioEngine.cpp \ - ccdandroidUtils.cpp \ - jni/cddandroidAndroidJavaEngine.cpp - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../platform/android - -include $(BUILD_STATIC_LIBRARY) - -#new audio engine +#New AudioEngine include $(CLEAR_VARS) LOCAL_MODULE := audioengine_static @@ -36,3 +19,23 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \ $(LOCAL_PATH)/../../platform/android include $(BUILD_STATIC_LIBRARY) + +#SimpleAudioEngine +include $(CLEAR_VARS) + +LOCAL_MODULE := cocosdenshion_static + +LOCAL_MODULE_FILENAME := libcocosdenshion + +LOCAL_SRC_FILES := cddSimpleAudioEngine.cpp \ + ccdandroidUtils.cpp \ + jni/cddandroidAndroidJavaEngine.cpp + +LOCAL_STATIC_LIBRARIES := audioengine_static +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \ + $(LOCAL_PATH)/../.. \ + $(LOCAL_PATH)/../../platform/android + +include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/audio/android/AudioEngine-inl.cpp b/cocos/audio/android/AudioEngine-inl.cpp index 53efb94ea6..804454bd99 100644 --- a/cocos/audio/android/AudioEngine-inl.cpp +++ b/cocos/audio/android/AudioEngine-inl.cpp @@ -43,6 +43,8 @@ using namespace cocos2d; using namespace cocos2d::experimental; +#define DELAY_TIME_TO_REMOVE 0.5f + void PlayOverEvent(SLPlayItf caller, void* context, SLuint32 playEvent) { if (context && playEvent == SL_PLAYEVENT_HEADATEND) @@ -67,6 +69,7 @@ AudioPlayer::AudioPlayer() , _playOver(false) , _loop(false) , _assetFd(0) + , _delayTimeToRemove(-1.f) { } @@ -276,18 +279,32 @@ int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume void AudioEngineImpl::update(float dt) { - auto itend = _audioPlayers.end(); - for (auto iter = _audioPlayers.begin(); iter != itend; ++iter) - { - if(iter->second._playOver) - { - if (iter->second._finishCallback) - iter->second._finishCallback(iter->second._audioID, *AudioEngine::_audioIDInfoMap[iter->second._audioID].filePath); + AudioPlayer* player = nullptr; - AudioEngine::remove(iter->second._audioID); - _audioPlayers.erase(iter); - break; + auto itend = _audioPlayers.end(); + for (auto iter = _audioPlayers.begin(); iter != itend; ) + { + player = &(iter->second); + if (player->_playOver) + { + if (player->_finishCallback) + player->_finishCallback(player->_audioID, *AudioEngine::_audioIDInfoMap[player->_audioID].filePath); + + AudioEngine::remove(player->_audioID); + iter = _audioPlayers.erase(iter); + continue; } + else if (player->_delayTimeToRemove > 0.f) + { + player->_delayTimeToRemove -= dt; + if (player->_delayTimeToRemove < 0.f) + { + iter = _audioPlayers.erase(iter); + continue; + } + } + + ++iter; } if(_audioPlayers.empty()){ @@ -348,7 +365,13 @@ void AudioEngineImpl::stop(int audioID) log("%s error:%u",__func__, result); } - _audioPlayers.erase(audioID); + /*If destroy openSL object immediately,it may cause dead lock. + *It's a system issue.For more information: + * https://github.com/cocos2d/cocos2d-x/issues/11697 + * https://groups.google.com/forum/#!msg/android-ndk/zANdS2n2cQI/AT6q1F3nNGIJ + */ + player._delayTimeToRemove = DELAY_TIME_TO_REMOVE; + //_audioPlayers.erase(audioID); } void AudioEngineImpl::stopAll() @@ -356,9 +379,13 @@ void AudioEngineImpl::stopAll() auto itEnd = _audioPlayers.end(); for (auto it = _audioPlayers.begin(); it != itEnd; ++it) { - auto result = (*it->second._fdPlayerPlay)->SetPlayState(it->second._fdPlayerPlay, SL_PLAYSTATE_STOPPED); + (*it->second._fdPlayerPlay)->SetPlayState(it->second._fdPlayerPlay, SL_PLAYSTATE_STOPPED); + if (it->second._delayTimeToRemove < 0.f) + { + //If destroy openSL object immediately,it may cause dead lock. + it->second._delayTimeToRemove = DELAY_TIME_TO_REMOVE; + } } - _audioPlayers.clear(); } float AudioEngineImpl::getDuration(int audioID) diff --git a/cocos/audio/android/AudioEngine-inl.h b/cocos/audio/android/AudioEngine-inl.h index 8f42a6c00d..28218953c1 100644 --- a/cocos/audio/android/AudioEngine-inl.h +++ b/cocos/audio/android/AudioEngine-inl.h @@ -60,6 +60,7 @@ private: float _duration; int _audioID; int _assetFd; + float _delayTimeToRemove; std::function _finishCallback; diff --git a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.cpp b/cocos/audio/android/jni/cddandroidAndroidJavaEngine.cpp index 5d4a767a40..074495f96f 100644 --- a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.cpp +++ b/cocos/audio/android/jni/cddandroidAndroidJavaEngine.cpp @@ -1,6 +1,6 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2014 Chukong Technologies Inc. +Copyright (c) 2013-2015 Chukong Technologies Inc. http://www.cocos2d-x.org @@ -24,10 +24,13 @@ THE SOFTWARE. ****************************************************************************/ #include "cddandroidAndroidJavaEngine.h" -#include "platform/android/jni/JniHelper.h" -#include "ccdandroidUtils.h" +#include #include #include +#include +#include "platform/android/jni/JniHelper.h" +#include "ccdandroidUtils.h" +#include "audio/include/AudioEngine.h" // logging #define LOG_TAG "cocosdenshion::android::AndroidJavaEngine" @@ -36,282 +39,463 @@ THE SOFTWARE. // Java class #define CLASS_NAME "org/cocos2dx/lib/Cocos2dxHelper" -namespace CocosDenshion { - namespace android { +using namespace cocos2d::experimental; +using namespace CocosDenshion::android; - bool AndroidJavaEngine::getJNIStaticMethodInfo(cocos2d::JniMethodInfo &methodinfo, - const char *methodName, - const char *paramCode) { - return cocos2d::JniHelper::getStaticMethodInfo(methodinfo, - CLASS_NAME, - methodName, - paramCode); - } +static inline bool getJNIStaticMethodInfo(cocos2d::JniMethodInfo &methodinfo, + const char *methodName, + const char *paramCode) { + return cocos2d::JniHelper::getStaticMethodInfo(methodinfo, + CLASS_NAME, + methodName, + paramCode); +} - AndroidJavaEngine::~AndroidJavaEngine() { - cocos2d::JniMethodInfo methodInfo; - - if (!getJNIStaticMethodInfo(methodInfo, "end", "()V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::preloadBackgroundMusic(const char* pszFilePath) { - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(pszFilePath); - - // void playBackgroundMusic(String,boolean) - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "preloadBackgroundMusic", "(Ljava/lang/String;)V")) { - return; - } - - jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg); - methodInfo.env->DeleteLocalRef(stringArg); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) { - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(pszFilePath); - - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "playBackgroundMusic", "(Ljava/lang/String;Z)V")) { - return; - } - - jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg, bLoop); - methodInfo.env->DeleteLocalRef(stringArg); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::stopBackgroundMusic(bool bReleaseData) { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "stopBackgroundMusic", "()V")) { - return; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::pauseBackgroundMusic() { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "pauseBackgroundMusic", "()V")) { - return; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::resumeBackgroundMusic() { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "resumeBackgroundMusic", "()V")) { - return; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::rewindBackgroundMusic() { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "rewindBackgroundMusic", "()V")) { - return; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - - bool AndroidJavaEngine::willPlayBackgroundMusic() { - return true; - } - - bool AndroidJavaEngine::isBackgroundMusicPlaying() { - cocos2d::JniMethodInfo methodInfo; - jboolean ret = false; - - if (! getJNIStaticMethodInfo(methodInfo, "isBackgroundMusicPlaying", "()Z")) { - return ret; - } - - ret = methodInfo.env->CallStaticBooleanMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - - return ret; - } - - float AndroidJavaEngine::getBackgroundMusicVolume() { - cocos2d::JniMethodInfo methodInfo; - jfloat ret = -1.0; - - if (! getJNIStaticMethodInfo(methodInfo, "getBackgroundMusicVolume", "()F")) { - return ret; - } - - ret = methodInfo.env->CallStaticFloatMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - - return ret; - } - - void AndroidJavaEngine::setBackgroundMusicVolume(float volume) { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "setBackgroundMusicVolume", "(F)V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, volume); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - float AndroidJavaEngine::getEffectsVolume() { - cocos2d::JniMethodInfo methodInfo; - jfloat ret = -1.0; - - if (! getJNIStaticMethodInfo(methodInfo, "getEffectsVolume", "()F")) { - return ret; - } - - ret = methodInfo.env->CallStaticFloatMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - - return ret; - } - - void AndroidJavaEngine::setEffectsVolume(float volume) { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "setEffectsVolume", "(F)V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, volume); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - unsigned int AndroidJavaEngine::playEffect(const char* pszFilePath, bool bLoop, - float pitch, float pan, float gain) { - cocos2d::JniMethodInfo methodInfo; - int ret = 0; - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(pszFilePath); - - if (! getJNIStaticMethodInfo(methodInfo, "playEffect", "(Ljava/lang/String;ZFFF)I")) { - return ret; - } - - jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); - ret = methodInfo.env->CallStaticIntMethod(methodInfo.classID, - methodInfo.methodID, - stringArg, - bLoop, - pitch, pan, gain); - methodInfo.env->DeleteLocalRef(stringArg); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - - return (unsigned int)ret; - } - - void AndroidJavaEngine::pauseEffect(unsigned int nSoundId) { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "pauseEffect", "(I)V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)nSoundId); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::pauseAllEffects() { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "pauseAllEffects", "()V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::resumeEffect(unsigned int nSoundId) { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "resumeEffect", "(I)V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)nSoundId); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::resumeAllEffects() { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "resumeAllEffects", "()V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::stopEffect(unsigned int nSoundId) { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "stopEffect", "(I)V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)nSoundId); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - void AndroidJavaEngine::stopAllEffects() { - cocos2d::JniMethodInfo methodInfo; - - if (! getJNIStaticMethodInfo(methodInfo, "stopAllEffects", "()V")) { - return ; - } - - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - static void loadEffect(const char* pszFilePath, char* loadEffectName) { - cocos2d::JniMethodInfo methodInfo; - std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(pszFilePath); - - if (! cocos2d::JniHelper::getStaticMethodInfo(methodInfo, CLASS_NAME, loadEffectName, "(Ljava/lang/String;)V")) { - return ; - } - - jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); - methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg); - methodInfo.env->DeleteLocalRef(stringArg); - methodInfo.env->DeleteLocalRef(methodInfo.classID); - } - - - void AndroidJavaEngine::preloadEffect(const char* pszFilePath) { - loadEffect(pszFilePath, "preloadEffect"); - } - - void AndroidJavaEngine::unloadEffect(const char* pszFilePath) { - loadEffect(pszFilePath, "unloadEffect"); +AndroidJavaEngine::AndroidJavaEngine() + : _implementBaseOnAudioEngine(false) + , _effectVolume(1.f) +{ + char sdk_ver_str[PROP_VALUE_MAX] = "0"; + auto len = __system_property_get("ro.build.version.sdk", sdk_ver_str); + if (len > 0) + { + auto sdk_ver = atoi(sdk_ver_str); + __android_log_print(ANDROID_LOG_DEBUG, "cocos2d", "android build version:%d", sdk_ver); + if (sdk_ver == 21) + { + _implementBaseOnAudioEngine = true; } } -} \ No newline at end of file + else + { + __android_log_print(ANDROID_LOG_DEBUG, "cocos2d", "%s", "Fail to get android build version."); + } +} + +AndroidJavaEngine::~AndroidJavaEngine() { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "end", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +void AndroidJavaEngine::preloadBackgroundMusic(const char* filePath) { + std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); + + // void playBackgroundMusic(String,boolean) + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "preloadBackgroundMusic", "(Ljava/lang/String;)V")) { + return; + } + + jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg); + methodInfo.env->DeleteLocalRef(stringArg); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +void AndroidJavaEngine::playBackgroundMusic(const char* filePath, bool loop) { + std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); + + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "playBackgroundMusic", "(Ljava/lang/String;Z)V")) { + return; + } + + jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg, loop); + methodInfo.env->DeleteLocalRef(stringArg); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +void AndroidJavaEngine::stopBackgroundMusic(bool releaseData) { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "stopBackgroundMusic", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +void AndroidJavaEngine::pauseBackgroundMusic() { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "pauseBackgroundMusic", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +void AndroidJavaEngine::resumeBackgroundMusic() { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "resumeBackgroundMusic", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +void AndroidJavaEngine::rewindBackgroundMusic() { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "rewindBackgroundMusic", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +bool AndroidJavaEngine::willPlayBackgroundMusic() { + return true; +} + +bool AndroidJavaEngine::isBackgroundMusicPlaying() { + cocos2d::JniMethodInfo methodInfo; + jboolean ret = false; + + if (!getJNIStaticMethodInfo(methodInfo, "isBackgroundMusicPlaying", "()Z")) { + return ret; + } + + ret = methodInfo.env->CallStaticBooleanMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); + + return ret; +} + +float AndroidJavaEngine::getBackgroundMusicVolume() { + cocos2d::JniMethodInfo methodInfo; + jfloat ret = -1.0; + + if (!getJNIStaticMethodInfo(methodInfo, "getBackgroundMusicVolume", "()F")) { + return ret; + } + + ret = methodInfo.env->CallStaticFloatMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); + + return ret; +} + +void AndroidJavaEngine::setBackgroundMusicVolume(float volume) { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "setBackgroundMusicVolume", "(F)V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, volume); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + + +static float _jni_getEffectsVolume() { + cocos2d::JniMethodInfo methodInfo; + jfloat ret = -1.0; + + if (!getJNIStaticMethodInfo(methodInfo, "getEffectsVolume", "()F")) { + return ret; + } + + ret = methodInfo.env->CallStaticFloatMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); + + return ret; +} + +static void _jni_setEffectsVolume(float volume) { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "setEffectsVolume", "(F)V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, volume); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static unsigned int _jni_playEffect(const char* filePath, bool loop, float pitch, float pan, float gain) +{ + cocos2d::JniMethodInfo methodInfo; + int ret = 0; + std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); + + if (!getJNIStaticMethodInfo(methodInfo, "playEffect", "(Ljava/lang/String;ZFFF)I")) { + return ret; + } + + jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); + ret = methodInfo.env->CallStaticIntMethod(methodInfo.classID, + methodInfo.methodID, + stringArg, + loop, + pitch, pan, gain); + methodInfo.env->DeleteLocalRef(stringArg); + methodInfo.env->DeleteLocalRef(methodInfo.classID); + + return (unsigned int)ret; +} + +static void _jni_pauseEffect(unsigned int soundId) { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "pauseEffect", "(I)V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)soundId); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static void _jni_pauseAllEffects() { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "pauseAllEffects", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static void _jni_resumeEffect(unsigned int soundId) { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "resumeEffect", "(I)V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)soundId); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static void _jni_resumeAllEffects() { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "resumeAllEffects", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static void _jni_stopEffect(unsigned int soundId) { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "stopEffect", "(I)V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, (int)soundId); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static void _jni_stopAllEffects() { + cocos2d::JniMethodInfo methodInfo; + + if (!getJNIStaticMethodInfo(methodInfo, "stopAllEffects", "()V")) { + return; + } + + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static void loadEffect(const char* filePath, char* loadEffectName) { + cocos2d::JniMethodInfo methodInfo; + std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath); + + if (!cocos2d::JniHelper::getStaticMethodInfo(methodInfo, CLASS_NAME, loadEffectName, "(Ljava/lang/String;)V")) { + return; + } + + jstring stringArg = methodInfo.env->NewStringUTF(fullPath.c_str()); + methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, stringArg); + methodInfo.env->DeleteLocalRef(stringArg); + methodInfo.env->DeleteLocalRef(methodInfo.classID); +} + +static void _jni_preloadEffect(const char* filePath) { + loadEffect(filePath, "preloadEffect"); +} + +static void _jni_unloadEffect(const char* filePath) { + loadEffect(filePath, "unloadEffect"); +} + + +float AndroidJavaEngine::getEffectsVolume() +{ + if (_implementBaseOnAudioEngine) + { + return _effectVolume; + } + else + { + return _jni_getEffectsVolume(); + } +} + +void AndroidJavaEngine::setEffectsVolume(float volume) +{ + if (_implementBaseOnAudioEngine) + { + if (volume > 1.f) + { + volume = 1.f; + } + else if (volume < 0.f) + { + volume = 0.f; + } + + if (_effectVolume != volume) + { + _effectVolume = volume; + for (auto& it : _soundIDs) + { + AudioEngine::setVolume(it.first, volume); + } + } + } + else + { + _jni_setEffectsVolume(volume); + } +} + +unsigned int AndroidJavaEngine::playEffect(const char* filePath, bool loop, + float pitch, float pan, float gain) +{ + if (_implementBaseOnAudioEngine) + { + auto soundID = AudioEngine::play2d(filePath, loop, _effectVolume); + if (soundID != AudioEngine::INVALID_AUDIO_ID) + { + _soundIDs[soundID] = soundID; + + AudioEngine::setFinishCallback(soundID, [this](int id, const std::string& filePath){ + _soundIDs.erase(id); + }); + } + + return soundID; + } + else + { + return _jni_playEffect(filePath, loop, pitch, pan, gain); + } +} + +void AndroidJavaEngine::pauseEffect(unsigned int soundID) +{ + if (_implementBaseOnAudioEngine) + { + AudioEngine::pause(soundID); + } + else + { + _jni_pauseEffect(soundID); + } +} + +void AndroidJavaEngine::resumeEffect(unsigned int soundID) +{ + if (_implementBaseOnAudioEngine) + { + AudioEngine::resume(soundID); + } + else + { + _jni_resumeEffect(soundID); + } +} + +void AndroidJavaEngine::stopEffect(unsigned int soundID) +{ + if (_implementBaseOnAudioEngine) + { + AudioEngine::stop(soundID); + _soundIDs.erase(soundID); + } + else + { + _jni_stopEffect(soundID); + } +} + +void AndroidJavaEngine::pauseAllEffects() +{ + if (_implementBaseOnAudioEngine) + { + for (auto& it : _soundIDs) + { + AudioEngine::pause(it.first); + } + } + else + { + _jni_pauseAllEffects(); + } +} + +void AndroidJavaEngine::resumeAllEffects() +{ + if (_implementBaseOnAudioEngine) + { + for (auto& it : _soundIDs) + { + AudioEngine::resume(it.first); + } + } + else + { + _jni_resumeAllEffects(); + } +} + +void AndroidJavaEngine::stopAllEffects() +{ + if (_implementBaseOnAudioEngine) + { + for (auto& it : _soundIDs) + { + AudioEngine::stop(it.first); + } + _soundIDs.clear(); + } + else + { + _jni_stopAllEffects(); + } +} + +void AndroidJavaEngine::preloadEffect(const char* filePath) +{ + if (!_implementBaseOnAudioEngine) + { + _jni_preloadEffect(filePath); + } +} + +void AndroidJavaEngine::unloadEffect(const char* filePath) +{ + if (!_implementBaseOnAudioEngine) + { + _jni_unloadEffect(filePath); + } +} diff --git a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.h b/cocos/audio/android/jni/cddandroidAndroidJavaEngine.h index a6bb400ea4..c5d6dbcd9a 100644 --- a/cocos/audio/android/jni/cddandroidAndroidJavaEngine.h +++ b/cocos/audio/android/jni/cddandroidAndroidJavaEngine.h @@ -1,6 +1,6 @@ /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2013-2014 Chukong Technologies Inc. +Copyright (c) 2013-2015 Chukong Technologies Inc. http://www.cocos2d-x.org @@ -27,39 +27,42 @@ THE SOFTWARE. #include "SimpleAudioEngine.h" #include "platform/android/jni/JniHelper.h" +#include namespace CocosDenshion { namespace android { class AndroidJavaEngine : public SimpleAudioEngine { + public: + AndroidJavaEngine(); ~AndroidJavaEngine(); - void preloadBackgroundMusic(const char* pszFilePath); - void playBackgroundMusic(const char* pszFilePath, bool bLoop); - void stopBackgroundMusic(bool bReleaseData); - void pauseBackgroundMusic(); - void resumeBackgroundMusic(); - void rewindBackgroundMusic(); - bool willPlayBackgroundMusic(); - bool isBackgroundMusicPlaying(); - float getBackgroundMusicVolume(); - void setBackgroundMusicVolume(float volume); - float getEffectsVolume(); - void setEffectsVolume(float volume); - unsigned int playEffect(const char* pszFilePath, bool bLoop = false, + virtual void preloadBackgroundMusic(const char* filePath); + virtual void playBackgroundMusic(const char* filePath, bool loop); + virtual void stopBackgroundMusic(bool releaseData); + virtual void pauseBackgroundMusic(); + virtual void resumeBackgroundMusic(); + virtual void rewindBackgroundMusic(); + virtual bool willPlayBackgroundMusic(); + virtual bool isBackgroundMusicPlaying(); + virtual float getBackgroundMusicVolume(); + virtual void setBackgroundMusicVolume(float volume); + virtual float getEffectsVolume(); + virtual void setEffectsVolume(float volume); + virtual unsigned int playEffect(const char* filePath, bool loop = false, float pitch = 1.0f, float pan = 0.0f, float gain = 1.0f); - void pauseEffect(unsigned int nSoundId); - void pauseAllEffects(); - void resumeEffect(unsigned int nSoundId); - void resumeAllEffects(); - void stopEffect(unsigned int nSoundId); - void stopAllEffects(); - void preloadEffect(const char* pszFilePath); - void unloadEffect(const char* pszFilePath); + virtual void pauseEffect(unsigned int soundId); + virtual void pauseAllEffects(); + virtual void resumeEffect(unsigned int soundId); + virtual void resumeAllEffects(); + virtual void stopEffect(unsigned int soundId); + virtual void stopAllEffects(); + virtual void preloadEffect(const char* filePath); + virtual void unloadEffect(const char* filePath); private : - static bool getJNIStaticMethodInfo(cocos2d::JniMethodInfo &methodinfo, - const char *methodName, - const char *paramCode); + bool _implementBaseOnAudioEngine; + float _effectVolume; + std::unordered_map _soundIDs; }; } } diff --git a/cocos/audio/apple/AudioEngine-inl.mm b/cocos/audio/apple/AudioEngine-inl.mm index 0f9bc4df00..01b4c9260b 100644 --- a/cocos/audio/apple/AudioEngine-inl.mm +++ b/cocos/audio/apple/AudioEngine-inl.mm @@ -158,10 +158,11 @@ void AudioEngineInterruptionListenerCallback(void* user_data, UInt32 interruptio -(id) init { - if (self == [super init]) + if (self = [super init]) { if ([[[UIDevice currentDevice] systemVersion] intValue] > 5) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:UIApplicationDidBecomeActiveNotification object:[AVAudioSession sharedInstance]]; } else { AudioSessionInitialize(NULL, NULL, AudioEngineInterruptionListenerCallback, self); @@ -172,6 +173,8 @@ void AudioEngineInterruptionListenerCallback(void* user_data, UInt32 interruptio -(void)handleInterruption:(NSNotification*)notification { + static bool resumeOnBecomingActive = false; + if ([notification.name isEqualToString:AVAudioSessionInterruptionNotification]) { NSInteger reason = [[[notification userInfo] objectForKey:AVAudioSessionInterruptionTypeKey] integerValue]; if (reason == AVAudioSessionInterruptionTypeBegan) { @@ -179,17 +182,35 @@ void AudioEngineInterruptionListenerCallback(void* user_data, UInt32 interruptio } if (reason == AVAudioSessionInterruptionTypeEnded) { - OSStatus result = AudioSessionSetActive(true); - if (result) NSLog(@"Error setting audio session active! %d\n", result); - - alcMakeContextCurrent(s_ALContext); + if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) { + NSError *error = nil; + [[AVAudioSession sharedInstance] setActive:YES error:&error]; + alcMakeContextCurrent(s_ALContext); + } else { + resumeOnBecomingActive = true; + } } } + + if ([notification.name isEqualToString:UIApplicationDidBecomeActiveNotification] && resumeOnBecomingActive) { + resumeOnBecomingActive = false; + NSError *error = nil; + BOOL success = [[AVAudioSession sharedInstance] + setCategory: AVAudioSessionCategoryAmbient + error: &error]; + if (!success) { + printf("Fail to set audio session.\n"); + return; + } + [[AVAudioSession sharedInstance] setActive:YES error:&error]; + alcMakeContextCurrent(s_ALContext); + } } -(void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionInterruptionNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; [super dealloc]; } @@ -239,12 +260,11 @@ bool AudioEngineImpl::init() s_ALDevice = alcOpenDevice(nullptr); if (s_ALDevice) { - auto alError = alGetError(); s_ALContext = alcCreateContext(s_ALDevice, nullptr); alcMakeContextCurrent(s_ALContext); alGenSources(MAX_AUDIOINSTANCES, _alSources); - alError = alGetError(); + auto alError = alGetError(); if(alError != AL_NO_ERROR) { printf("%s:generating sources fail! error = %x\n", __PRETTY_FUNCTION__, alError); diff --git a/cocos/audio/include/AudioEngine.h b/cocos/audio/include/AudioEngine.h index 7cad808f6f..f96fbe75e8 100644 --- a/cocos/audio/include/AudioEngine.h +++ b/cocos/audio/include/AudioEngine.h @@ -23,7 +23,7 @@ ****************************************************************************/ #include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #ifndef __AUDIO_ENGINE_H_ #define __AUDIO_ENGINE_H_ diff --git a/cocos/audio/win32/AudioCache.h b/cocos/audio/win32/AudioCache.h index 9d27d7abd8..97896b2d15 100644 --- a/cocos/audio/win32/AudioCache.h +++ b/cocos/audio/win32/AudioCache.h @@ -38,7 +38,7 @@ #endif #include "CCPlatformMacros.h" -#define QUEUEBUFFER_NUM 3 +#define QUEUEBUFFER_NUM 5 #define QUEUEBUFFER_TIME_STEP 0.1f NS_CC_BEGIN diff --git a/cocos/audio/win32/AudioEngine-win32.cpp b/cocos/audio/win32/AudioEngine-win32.cpp index f131f7ed2c..573daa2867 100644 --- a/cocos/audio/win32/AudioEngine-win32.cpp +++ b/cocos/audio/win32/AudioEngine-win32.cpp @@ -62,6 +62,7 @@ namespace cocos2d { for (int index = 0; index < _numThread; ++index) { _tasks.push_back(nullptr); _threads.push_back( std::thread( std::bind(&AudioEngineThreadPool::threadFunc,this,index) ) ); + _threads[index].detach(); } } @@ -78,7 +79,7 @@ namespace cocos2d { if (targetIndex == -1) { _tasks.push_back(task); _threads.push_back( std::thread( std::bind(&AudioEngineThreadPool::threadFunc,this,_numThread) ) ); - + _threads[_numThread].detach(); _numThread++; } _taskMutex.unlock(); @@ -212,16 +213,14 @@ int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume auto it = _audioCaches.find(filePath); if (it == _audioCaches.end()) { audioCache = &_audioCaches[filePath]; - - auto ext = filePath.substr(filePath.rfind('.')); - transform(ext.begin(), ext.end(), ext.begin(), tolower); - + auto ext = strchr(filePath.c_str(), '.'); bool eraseCache = true; - if (ext.compare(".ogg") == 0){ + + if (_stricmp(ext, ".ogg") == 0){ audioCache->_fileFormat = AudioCache::FileFormat::OGG; eraseCache = false; } - else if (ext.compare(".mp3") == 0){ + else if (_stricmp(ext, ".mp3") == 0){ audioCache->_fileFormat = AudioCache::FileFormat::MP3; if (MPG123_LAZYINIT){ @@ -239,7 +238,7 @@ int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume } } else{ - log("unsupported media type:%s\n",ext.c_str()); + log("unsupported media type:%s\n", ext); } if (eraseCache){ @@ -380,7 +379,14 @@ bool AudioEngineImpl::stop(int audioID) alSourcei(player._alSource, AL_BUFFER, NULL); _alSourceUsed[player._alSource] = false; - _audioPlayers.erase(audioID); + if (player._streamingSource) + { + player.notifyExitThread(); + } + else + { + _audioPlayers.erase(audioID); + } return ret; } @@ -394,7 +400,19 @@ void AudioEngineImpl::stopAll() _alSourceUsed[_alSources[index]] = false; } - _audioPlayers.clear(); + for (auto it = _audioPlayers.begin(); it != _audioPlayers.end();) + { + auto& player = it->second; + if (player._streamingSource) + { + player.notifyExitThread(); + ++it; + } + else + { + it = _audioPlayers.erase(it); + } + } } float AudioEngineImpl::getDuration(int audioID) @@ -498,7 +516,11 @@ void AudioEngineImpl::update(float dt) auto& player = it->second; alGetSourcei(player._alSource, AL_SOURCE_STATE, &sourceState); - if (player._ready && sourceState == AL_STOPPED) { + if (player._readForRemove) + { + it = _audioPlayers.erase(it); + } + else if (player._ready && sourceState == AL_STOPPED) { _alSourceUsed[player._alSource] = false; if (player._finishCallbak) { auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID]; @@ -507,7 +529,15 @@ void AudioEngineImpl::update(float dt) AudioEngine::remove(audioID); - it = _audioPlayers.erase(it); + if (player._streamingSource) + { + player.notifyExitThread(); + ++it; + } + else + { + it = _audioPlayers.erase(it); + } } else{ ++it; diff --git a/cocos/audio/win32/AudioPlayer.cpp b/cocos/audio/win32/AudioPlayer.cpp index e7225e5f04..a2a96363e7 100644 --- a/cocos/audio/win32/AudioPlayer.cpp +++ b/cocos/audio/win32/AudioPlayer.cpp @@ -42,6 +42,7 @@ AudioPlayer::AudioPlayer() , _finishCallbak(nullptr) , _ready(false) , _audioCache(nullptr) + , _readForRemove(false) { } @@ -59,13 +60,17 @@ AudioPlayer::AudioPlayer(const AudioPlayer& player) AudioPlayer::~AudioPlayer() { - _exitThread = true; if (_audioCache && _audioCache->_queBufferFrames > 0) { + alDeleteBuffers(QUEUEBUFFER_NUM, _bufferIds); + } +} + +void AudioPlayer::notifyExitThread() +{ + if (_audioCache && _audioCache->_queBufferFrames > 0) { + std::unique_lock lk(_sleepMutex); + _exitThread = true; _sleepCondition.notify_all(); - if (_rotateBufferThread.joinable()) { - _rotateBufferThread.join(); - } - alDeleteBuffers(3, _bufferIds); } } @@ -94,11 +99,9 @@ bool AudioPlayer::play2d(AudioCache* cache) alSourcei(_alSource, AL_LOOPING, AL_FALSE); auto alError = alGetError(); - alGenBuffers(3, _bufferIds); + alGenBuffers(QUEUEBUFFER_NUM, _bufferIds); alError = alGetError(); if (alError == AL_NO_ERROR) { - _rotateBufferThread = std::thread(&AudioPlayer::rotateBufferThread,this, _audioCache->_queBufferFrames * QUEUEBUFFER_NUM + 1); - for (int index = 0; index < QUEUEBUFFER_NUM; ++index) { alBufferData(_bufferIds[index], _audioCache->_alBufferFormat, _audioCache->_queBuffers[index], _audioCache->_queBufferSize[index], _audioCache->_sampleRate); } @@ -110,13 +113,22 @@ bool AudioPlayer::play2d(AudioCache* cache) } } - alSourcePlay(_alSource); - _ready = true; - auto alError = alGetError(); + if (_streamingSource) + { + _rotateBufferThread = std::thread(&AudioPlayer::rotateBufferThread, this, _audioCache->_queBufferFrames * QUEUEBUFFER_NUM + 1); + _rotateBufferThread.detach(); + } + else + { + alSourcePlay(_alSource); - if (alError != AL_NO_ERROR) { - log("%s:alSourcePlay error code:%x\n", __FUNCTION__,alError); - return false; + auto alError = alGetError(); + if (alError != AL_NO_ERROR) { + log("%s:alSourcePlay error code:%x\n", __FUNCTION__, alError); + return false; + } + + _ready = true; } return true; @@ -177,9 +189,13 @@ void AudioPlayer::rotateBufferThread(int offsetFrame) break; } + alSourcePlay(_alSource); + while (!_exitThread) { alGetSourcei(_alSource, AL_SOURCE_STATE, &sourceState); if (sourceState == AL_PLAYING) { + _ready = true; + alGetSourcei(_alSource, AL_BUFFERS_PROCESSED, &bufferProcessed); while (bufferProcessed > 0) { bufferProcessed--; @@ -250,11 +266,13 @@ void AudioPlayer::rotateBufferThread(int offsetFrame) } } - if (_exitThread){ + std::unique_lock lk(_sleepMutex); + if (_exitThread) + { break; } - std::unique_lock lk(_sleepMutex); - _sleepCondition.wait_for(lk,std::chrono::milliseconds(75)); + + _sleepCondition.wait_for(lk,std::chrono::milliseconds(35)); } ExitBufferThread: switch (audioFileFormat) @@ -272,6 +290,7 @@ ExitBufferThread: break; } free(tmpBuffer); + _readForRemove = true; } bool AudioPlayer::setLoop(bool loop) diff --git a/cocos/audio/win32/AudioPlayer.h b/cocos/audio/win32/AudioPlayer.h index 7c20ff3701..21ad5222a2 100644 --- a/cocos/audio/win32/AudioPlayer.h +++ b/cocos/audio/win32/AudioPlayer.h @@ -37,6 +37,7 @@ #include #endif #include "CCPlatformMacros.h" +#include "AudioCache.h" NS_CC_BEGIN namespace experimental{ @@ -55,7 +56,8 @@ public: bool setTime(float time); float getTime() { return _currTime;} bool setLoop(bool loop); - + void notifyExitThread(); + protected: void rotateBufferThread(int offsetFrame); bool play2d(AudioCache* cache); @@ -73,11 +75,12 @@ protected: float _currTime; bool _timeDirty; bool _streamingSource; - ALuint _bufferIds[3]; + ALuint _bufferIds[QUEUEBUFFER_NUM]; std::thread _rotateBufferThread; std::mutex _sleepMutex; std::condition_variable _sleepCondition; - bool _exitThread; + bool _exitThread; + bool _readForRemove; friend class AudioEngineImpl; }; diff --git a/cocos/audio/winrt/Audio.cpp b/cocos/audio/winrt/Audio.cpp index feaf711a18..13ed507632 100644 --- a/cocos/audio/winrt/Audio.cpp +++ b/cocos/audio/winrt/Audio.cpp @@ -17,8 +17,8 @@ */ #include "Audio.h" -#include "MediaStreamer.h" -//#include "CCCommon.h" +#include "CCCommon.h" +#include "AudioSourceReader.h" inline void ThrowIfFailed(HRESULT hr) { @@ -522,13 +522,34 @@ void Audio::PreloadSoundEffect(const char* pszFilePath, bool isMusic) int sound = Hash(pszFilePath); - MediaStreamer mediaStreamer; - mediaStreamer.Initialize(CCUtf8ToUnicode(pszFilePath).c_str()); - m_soundEffects[sound].m_soundID = sound; - - uint32 bufferLength = mediaStreamer.GetMaxStreamLengthInBytes(); - m_soundEffects[sound].m_soundEffectBufferData = new byte[bufferLength]; - mediaStreamer.ReadAll(m_soundEffects[sound].m_soundEffectBufferData, bufferLength, &m_soundEffects[sound].m_soundEffectBufferLength); + std::unique_ptr reader = std::make_unique(); + + if (!reader) { + return; + } + + static_cast(reader.get())->doLargeFileSupport(false); + + if (!reader->initialize(pszFilePath)) { + return; + } + + m_soundEffects[sound].m_soundID = sound; + uint32 bufferLength = reader->getTotalAudioBytes(); + WAVEFORMATEX wfx = reader->getWaveFormatInfo(); + + cocos2d::experimental::AudioDataChunk chunk; + if (!reader->consumeChunk(chunk)) { + return; + } + + m_soundEffects[sound].m_soundEffectBufferData = new (std::nothrow) BYTE[chunk._dataSize]; + if (nullptr == m_soundEffects[sound].m_soundEffectBufferData) { + return; + } + + m_soundEffects[sound].m_soundEffectBufferLength = chunk._dataSize; + CopyMemory(m_soundEffects[sound].m_soundEffectBufferData, chunk._data->data(), chunk._dataSize); if (isMusic) { @@ -541,7 +562,7 @@ void Audio::PreloadSoundEffect(const char* pszFilePath, bool isMusic) ThrowIfFailed( m_musicEngine->CreateSourceVoice(&m_soundEffects[sound].m_soundEffectSourceVoice, - &(mediaStreamer.GetOutputWaveFormatEx()), 0, 1.0f, &m_voiceContext, &sends) + &wfx, 0, 1.0f, &m_voiceContext, &sends) ); //fix bug: set a initial volume m_soundEffects[sound].m_soundEffectSourceVoice->SetVolume(m_backgroundMusicVolume); @@ -556,13 +577,13 @@ void Audio::PreloadSoundEffect(const char* pszFilePath, bool isMusic) ThrowIfFailed( m_soundEffectEngine->CreateSourceVoice(&m_soundEffects[sound].m_soundEffectSourceVoice, - &(mediaStreamer.GetOutputWaveFormatEx()), 0, 1.0f, &m_voiceContext, &sends, nullptr) + &wfx, 0, 1.0f, &m_voiceContext, &sends, nullptr) ); //fix bug: set a initial volume m_soundEffects[sound].m_soundEffectSourceVoice->SetVolume(m_soundEffctVolume); } - m_soundEffects[sound].m_soundEffectSampleRate = mediaStreamer.GetOutputWaveFormatEx().nSamplesPerSec; + m_soundEffects[sound].m_soundEffectSampleRate = wfx.nSamplesPerSec; // Queue in-memory buffer for playback ZeroMemory(&m_soundEffects[sound].m_audioBuffer, sizeof(m_soundEffects[sound].m_audioBuffer)); diff --git a/cocos/audio/winrt/AudioCachePlayer.cpp b/cocos/audio/winrt/AudioCachePlayer.cpp new file mode 100644 index 0000000000..19dab3147c --- /dev/null +++ b/cocos/audio/winrt/AudioCachePlayer.cpp @@ -0,0 +1,563 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "platform/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT + +#include "AudioCachePlayer.h" + +using namespace cocos2d; +using namespace cocos2d::experimental; + +inline void ThrowIfFailed(HRESULT hr) +{ + if (FAILED(hr)) { + // Set a breakpoint on this line to catch XAudio2 API errors. + throw Platform::Exception::CreateException(hr); + } +} + + +// AudioCache +AudioCache::AudioCache() + : _isReady(false) + , _fileFullPath("") + , _srcReader(nullptr) + , _fileFormat(FileFormat::UNKNOWN) +{ + _callbacks.clear(); + memset(&_audInfo, 0, sizeof(AudioInfo)); +} + +AudioCache::~AudioCache() +{ + _callbacks.clear(); + + if (nullptr != _srcReader) { + delete _srcReader; + _srcReader = nullptr; + } +} + +void AudioCache::readDataTask() +{ + std::wstring path(_fileFullPath.begin(), _fileFullPath.end()); + + if (nullptr != _srcReader) { + delete _srcReader; + _srcReader = nullptr; + } + + switch (_fileFormat) + { + case FileFormat::WAV: + _srcReader = new (std::nothrow) WAVReader(); + if (_srcReader && _srcReader->initialize(_fileFullPath)) { + _audInfo._totalAudioBytes = _srcReader->getTotalAudioBytes(); + _audInfo._wfx = _srcReader->getWaveFormatInfo(); + _isReady = true; + invokeCallbacks(); + } + break; + + case FileFormat::OGG: + break; + + case FileFormat::MP3: + _srcReader = new (std::nothrow) MP3Reader(); + if (_srcReader && _srcReader->initialize(_fileFullPath)) { + _audInfo._totalAudioBytes = _srcReader->getTotalAudioBytes(); + _audInfo._wfx = _srcReader->getWaveFormatInfo(); + _isReady = true; + invokeCallbacks(); + } + break; + + case FileFormat::UNKNOWN: + default: + break; + } +} + +void AudioCache::addCallback(const std::function &callback) +{ + _cbMutex.lock(); + if (_isReady) { + callback(); + } + else { + _callbacks.push_back(callback); + } + _cbMutex.unlock(); +} + +void AudioCache::invokeCallbacks() +{ + _cbMutex.lock(); + auto cnt = _callbacks.size(); + for (size_t ind = 0; ind < cnt; ind++) + { + _callbacks[ind](); + } + _callbacks.clear(); + _cbMutex.unlock(); +} + +bool AudioCache::getChunk(AudioDataChunk& chunk) +{ + bool ret = false; + + if (nullptr != _srcReader) { + ret = _srcReader->consumeChunk(chunk); + } + + return ret; +} + +void AudioCache::doBuffering() +{ + if (isStreamingSource()){ + _srcReader->produceChunk(); + } +} + +bool AudioCache::isStreamingSource() +{ + if (nullptr != _srcReader) { + return _srcReader->isStreamingSource(); + } + + return false; +} + +void AudioCache::seek(const float ratio) +{ + if (nullptr != _srcReader){ + _srcReader->seekTo(ratio); + } +} + + +// AudioPlayer +AudioPlayer::AudioPlayer() + : _loop(false) + , _ready(false) + , _current(0.0) + , _volume(0.0) + , _duration(0.0) + , _cache(nullptr) + , _totalSamples(0) + , _samplesOffset(0) + , _criticalError(false) + , _isStreaming(false) + , _finishCallback(nullptr) + , _xaMasterVoice(nullptr) + , _xaSourceVoice(nullptr) + , _state(AudioPlayerState::INITIALZING) +{ + init(); +} + +AudioPlayer::~AudioPlayer() +{ + free(); +} + +void AudioPlayer::stop() +{ + _stop(); +} + +void AudioPlayer::pause() +{ + _stop(true); +} + +bool AudioPlayer::update() +{ + if (_criticalError){ + free(); + init(); + } + + if (_cache != nullptr) { + _cache->doBuffering(); + } + + //log("bufferQueued: %d, _current: %f", _cachedBufferQ.size(), _current); + return _criticalError; +} + +void AudioPlayer::resume() +{ + _play(true); +} + +bool AudioPlayer::isInError() +{ + return _criticalError; +} + +float AudioPlayer::getDuration() +{ + if (nullptr == _cache) { + return _duration; + } + + auto fmt = _cache->_audInfo._wfx; + + if (!fmt.nChannels) { + return _duration; + } + + if ((int)_duration <= 0) + { + switch (fmt.wFormatTag) + { + case WAVE_FORMAT_PCM: + case WAVE_FORMAT_ADPCM: + _duration = (float(_cache->_audInfo._totalAudioBytes / ((fmt.wBitsPerSample / 8) * fmt.nChannels)) / fmt.nSamplesPerSec) * 1000; + _totalSamples = fmt.nSamplesPerSec * _duration / 1000; + break; + + default: + break; + } + } + + return _duration; +} + +float AudioPlayer::getCurrentTime() +{ + _stMutex.lock(); + auto samplesPlayed = getSourceVoiceState().SamplesPlayed; + //log("_samplesOffset: %lu, samplesPlayed: %lu, _current: %f", (UINT32)_samplesOffset, (UINT32)samplesPlayed, _current); + _current += ((samplesPlayed - _samplesOffset) / (float)_totalSamples) * _duration; + _current = _current > _duration ? 0.0 : _current; + _samplesOffset = samplesPlayed; + _stMutex.unlock(); + return _current; +} + +bool AudioPlayer::setTime(float time) +{ + bool ret = true; + _stop(); + + if (!_isStreaming) { + auto fmt = _cache->_audInfo._wfx; + int seek = (time / _duration) * _totalSamples; + seek -= (seek % (fmt.nChannels * fmt.nBlockAlign)); + + _xaBuffer.LoopCount = 0; + _xaBuffer.PlayBegin = seek; + _xaBuffer.PlayLength = _totalSamples - seek; + + if (_xaBuffer.PlayBegin >= _totalSamples) { + _xaBuffer.PlayBegin = _totalSamples - (fmt.nChannels * fmt.nBlockAlign); + _xaBuffer.PlayLength = (fmt.nChannels * fmt.nBlockAlign); + } + } + + _stMutex.lock(); + _samplesOffset = getSourceVoiceState().SamplesPlayed; + _current = time; + _stMutex.unlock(); + _play(); + return ret; +} + +void AudioPlayer::setVolume(float volume) +{ + if (_xaMasterVoice != nullptr){ + if (FAILED(_xaMasterVoice->SetVolume(volume))) { + error(); + } + } +} + +bool AudioPlayer::play2d(AudioCache* cache) +{ + bool ret = false; + + if (cache != nullptr) + { + _cache = cache; + if (nullptr == _xaSourceVoice && _ready) { + + XAUDIO2_SEND_DESCRIPTOR descriptors[1]; + descriptors[0].pOutputVoice = _xaMasterVoice; + descriptors[0].Flags = 0; + XAUDIO2_VOICE_SENDS sends = { 0 }; + sends.SendCount = 1; + sends.pSends = descriptors; + ThrowIfFailed(_xaEngine->CreateSourceVoice(&_xaSourceVoice, &cache->_audInfo._wfx, 0, 1.0, this, &sends)); + } + + _isStreaming = _cache->isStreamingSource(); + _duration = getDuration(); + ret = _play(); + } + + return ret; +} + +void AudioPlayer::init() +{ + memset(&_xaBuffer, 0, sizeof(_xaBuffer)); + ThrowIfFailed(XAudio2Create(_xaEngine.ReleaseAndGetAddressOf())); + +#if defined(_DEBUG) + XAUDIO2_DEBUG_CONFIGURATION debugConfig = { 0 }; + debugConfig.BreakMask = XAUDIO2_LOG_ERRORS; + debugConfig.TraceMask = XAUDIO2_LOG_ERRORS; + _xaEngine->SetDebugConfiguration(&debugConfig); +#endif + + _xaEngine->RegisterForCallbacks(this); + ThrowIfFailed(_xaEngine->CreateMasteringVoice(&_xaMasterVoice, XAUDIO2_DEFAULT_CHANNELS, XAUDIO2_DEFAULT_SAMPLERATE, 0, nullptr, nullptr, AudioCategory_GameMedia)); + _ready = true; + _state = AudioPlayerState::READY; +} + +void AudioPlayer::free() +{ + _stop(); + memset(&_xaBuffer, 0, sizeof(_xaBuffer)); + + if (_xaEngine) { + _xaEngine->StopEngine(); + } + + if (_xaSourceVoice != nullptr) { + _xaSourceVoice->DestroyVoice(); + _xaSourceVoice = nullptr; + } + + if (_xaMasterVoice != nullptr) { + _xaMasterVoice->DestroyVoice(); + _xaMasterVoice = nullptr; + } + + while (!_cachedBufferQ.empty()) { + popBuffer(); + } +} + +bool AudioPlayer::_play(bool resume) +{ + do { + if (!resume) { + _cache->seek(_current / _duration); + submitBuffers(); + } + + if (_state == AudioPlayerState::PAUSED && !resume || nullptr == _xaSourceVoice) break; + + if (FAILED(_xaSourceVoice->Start())) { + error(); + } + else { + _state = AudioPlayerState::PLAYING; + } + } while (false); + + return !_criticalError; +} + +void AudioPlayer::_stop(bool pause) +{ + if (_xaSourceVoice != nullptr) { + + if (FAILED(_xaSourceVoice->Stop())) { + error(); + } + else { + if (!pause) { + _xaSourceVoice->FlushSourceBuffers(); + if (_state != AudioPlayerState::PAUSED) _state = AudioPlayerState::STOPPED; + } + else { + _state = AudioPlayerState::PAUSED; + } + } + } +} + +void AudioPlayer::error() +{ + _criticalError = true; + _ready = false; + _state = AudioPlayerState::ERRORED; +} + +void AudioPlayer::popBuffer() +{ + _bqMutex.lock(); + if (!_cachedBufferQ.empty()) { + _cachedBufferQ.pop(); + } + _bqMutex.unlock(); +} + +bool AudioPlayer::submitBuffers() +{ + bool ret = false; + + _bqMutex.lock(); + do { + if (nullptr == _xaSourceVoice) break; + if (!_cachedBufferQ.size() || (_isStreaming && _cachedBufferQ.size() < QUEUEBUFFER_NUM)) { + AudioDataChunk chunk; + if (_cache->getChunk(chunk) && chunk._dataSize) { + _xaBuffer.AudioBytes = chunk._dataSize; + _xaBuffer.pAudioData = chunk._data->data(); + _xaBuffer.Flags = chunk._endOfStream ? XAUDIO2_END_OF_STREAM : 0; + _cachedBufferQ.push(chunk); + ret = SUCCEEDED(_xaSourceVoice->SubmitSourceBuffer(&_xaBuffer)); + if (!_isStreaming) break; + } + else { + break; + } + } + else if (!_isStreaming) { + ret = SUCCEEDED(_xaSourceVoice->SubmitSourceBuffer(&_xaBuffer)); + break; + } + else { + break; + } + } while (ret); + _bqMutex.unlock(); + + return ret; +} + +void AudioPlayer::updateState() +{ + if (!_isStreaming) { + _stMutex.lock(); + _samplesOffset = getSourceVoiceState().SamplesPlayed; + _stMutex.unlock(); + } + else { + if (_cachedBufferQ.size() > getSourceVoiceState(true).BuffersQueued) { + popBuffer(); + } + } +} + +void AudioPlayer::onBufferRunOut() +{ + _stMutex.lock(); + _samplesOffset = 0; + _current = 0.0; + _xaBuffer.PlayBegin = _xaBuffer.PlayLength = 0; + _stMutex.unlock(); + + if (!_loop) { + _stop(); + //invokeFinishCallback(); + } + else { + _play(); + } +} + +void AudioPlayer::invokeFinishCallback() +{ + if (_finishCallback) { + _finishCallback(0, ""); + } +} + +XAUDIO2_VOICE_STATE AudioPlayer::getSourceVoiceState(bool fast) +{ + XAUDIO2_VOICE_STATE state; + memset(&state, 0, sizeof(XAUDIO2_VOICE_STATE)); + + if (_xaSourceVoice != nullptr) { + _xaSourceVoice->GetState(&state, fast ? XAUDIO2_VOICE_NOSAMPLESPLAYED : 0); + } + + return state; +} + +// IXAudio2EngineCallback +void AudioPlayer::OnProcessingPassStart() +{ +} + +void AudioPlayer::OnProcessingPassEnd() +{ +} + +void AudioPlayer::OnCriticalError(HRESULT err) +{ + UNREFERENCED_PARAMETER(err); + error(); +} + +// IXAudio2VoiceCallback +void AudioPlayer::OnVoiceProcessingPassStart(UINT32 uBytesRequired) +{ + if (uBytesRequired && _isStreaming){ + submitBuffers(); + } +} + +void AudioPlayer::OnVoiceProcessingPassEnd() +{ +} + +void AudioPlayer::OnStreamEnd() +{ + onBufferRunOut(); +} + +void AudioPlayer::OnBufferStart(void* pBufferContext) +{ + UNREFERENCED_PARAMETER(pBufferContext); +} + +void AudioPlayer::OnBufferEnd(void* pBufferContext) +{ + UNREFERENCED_PARAMETER(pBufferContext); + updateState(); +} + +void AudioPlayer::OnLoopEnd(void* pBufferContext) +{ + UNREFERENCED_PARAMETER(pBufferContext); + + if (!_loop) { + _stop(); + } +} + +void AudioPlayer::OnVoiceError(void* pBufferContext, HRESULT err) +{ + UNREFERENCED_PARAMETER(pBufferContext); + UNREFERENCED_PARAMETER(err); + error(); +} + +#endif diff --git a/cocos/audio/winrt/AudioCachePlayer.h b/cocos/audio/winrt/AudioCachePlayer.h new file mode 100644 index 0000000000..f6911f47c6 --- /dev/null +++ b/cocos/audio/winrt/AudioCachePlayer.h @@ -0,0 +1,161 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "platform/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT + +#ifndef __AUDIO_CACHE_PLAYER_H_ +#define __AUDIO_CACHE_PLAYER_H_ + +#include "AudioSourceReader.h" + +NS_CC_BEGIN +namespace experimental{ + +typedef struct AudioInfo +{ + size_t _totalAudioBytes; + WAVEFORMATEX _wfx; +} AudioInfo; + +enum class AudioPlayerState +{ + ERRORED = -1, + INITIALZING, + READY, + PLAYING, + PAUSED, + STOPPED +}; + + class AudioCache +{ +public: + AudioCache(); + ~AudioCache(); + + void readDataTask(); + void addCallback(const std::function &callback); + bool getChunk(AudioDataChunk& chunk); + void doBuffering(); + bool isStreamingSource(); + void seek(const float ratio); + +protected: + void invokeCallbacks(); + +private: + AudioCache(const AudioCache&); + AudioCache& operator=(const AudioCache&); + +private: + bool _isReady; + AudioInfo _audInfo; + std::mutex _cbMutex; + FileFormat _fileFormat; + std::string _fileFullPath; + AudioSourceReader *_srcReader; + std::vector> _callbacks; + + + friend class AudioPlayer; + friend class AudioEngineImpl; + }; + + + class AudioPlayer : public IXAudio2EngineCallback, IXAudio2VoiceCallback + { + public: + AudioPlayer(); + virtual ~AudioPlayer(); + + void stop(); + void pause(); + bool update(); + void resume(); + bool isInError(); + float getDuration(); + float getCurrentTime(); + bool setTime(float time); + void setVolume(float volume); + bool play2d(AudioCache* cache); + AudioPlayerState getState() { return _state; } + + protected: + AudioPlayer(AudioPlayer&); + AudioPlayer& operator=(AudioPlayer&); + + void init(); + void free(); + void error(); + void popBuffer(); + void updateState(); + bool submitBuffers(); + void onBufferRunOut(); + void invokeFinishCallback(); + void _stop(bool pause = false); + bool _play(bool resume = false); + XAUDIO2_VOICE_STATE getSourceVoiceState(bool fast = false); + + // IXAudio2EngineCallback + STDMETHOD_(void, OnProcessingPassStart) () override; + STDMETHOD_(void, OnProcessingPassEnd) () override; + STDMETHOD_(void, OnCriticalError) (HRESULT error) override; + + // IXAudio2VoiceCallback + STDMETHOD_(void, OnVoiceProcessingPassStart) (UINT32 uBytesRequired) override; + STDMETHOD_(void, OnVoiceProcessingPassEnd) () override; + STDMETHOD_(void, OnStreamEnd) () override; + STDMETHOD_(void, OnBufferStart) (void* pBufferContext) override; + STDMETHOD_(void, OnBufferEnd) (void* pBufferContext) override; + STDMETHOD_(void, OnLoopEnd) (void* pBufferContext) override; + STDMETHOD_(void, OnVoiceError) (void *pBufferContext, HRESULT error) override; + + private: + bool _loop; + bool _ready; + float _volume; + float _current; + float _duration; + bool _criticalError; + bool _isStreaming; + UINT64 _totalSamples; + UINT64 _samplesOffset; + + XAUDIO2_BUFFER _xaBuffer; + IXAudio2SourceVoice *_xaSourceVoice; + IXAudio2MasteringVoice *_xaMasterVoice; + Microsoft::WRL::ComPtr _xaEngine; + + AudioCache *_cache; + std::mutex _stMutex; + std::mutex _bqMutex; + AudioPlayerState _state; + std::queue _cachedBufferQ; + std::function _finishCallback; + + + friend class AudioEngineImpl; + }; + +} +NS_CC_END +#endif // __AUDIO_CACHE_PLAYER_H_ +#endif + diff --git a/cocos/audio/winrt/AudioEngine-winrt.cpp b/cocos/audio/winrt/AudioEngine-winrt.cpp new file mode 100644 index 0000000000..bb6f1d5ece --- /dev/null +++ b/cocos/audio/winrt/AudioEngine-winrt.cpp @@ -0,0 +1,430 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "platform/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT + +#include "AudioEngine-winrt.h" +#include + + +using namespace cocos2d; +using namespace cocos2d::experimental; + + +namespace cocos2d { + namespace experimental { + class AudioEngineThreadPool + { + public: + AudioEngineThreadPool() + : _running(true) + , _numThread(6) + { + _threads.reserve(_numThread); + _tasks.reserve(_numThread); + + for (int index = 0; index < _numThread; ++index) { + _tasks.push_back(nullptr); + _threads.push_back(std::thread(std::bind(&AudioEngineThreadPool::threadFunc, this, index))); + } + } + + void addTask(const std::function &task){ + _taskMutex.lock(); + int targetIndex = -1; + for (int index = 0; index < _numThread; ++index) { + if (_tasks[index] == nullptr) { + targetIndex = index; + _tasks[index] = task; + break; + } + } + if (targetIndex == -1) { + _tasks.push_back(task); + _threads.push_back(std::thread(std::bind(&AudioEngineThreadPool::threadFunc, this, _numThread))); + + _numThread++; + } + _taskMutex.unlock(); + _sleepCondition.notify_all(); + } + + void destroy() + { + _running = false; + _sleepCondition.notify_all(); + + for (int index = 0; index < _numThread; ++index) { + _threads[index].join(); + } + } + private: + bool _running; + std::vector _threads; + std::vector< std::function > _tasks; + + void threadFunc(int index) + { + while (_running) { + std::function task = nullptr; + _taskMutex.lock(); + task = _tasks[index]; + _taskMutex.unlock(); + + if (nullptr == task) + { + std::unique_lock lk(_sleepMutex); + _sleepCondition.wait(lk); + continue; + } + + task(); + + _taskMutex.lock(); + _tasks[index] = nullptr; + _taskMutex.unlock(); + } + } + + int _numThread; + + std::mutex _taskMutex; + std::mutex _sleepMutex; + std::condition_variable _sleepCondition; + }; + } +} + +AudioEngineImpl::AudioEngineImpl() + : _lazyInitLoop(true) + , _currentAudioID(0) + , _threadPool(nullptr) +{ + +} + +AudioEngineImpl::~AudioEngineImpl() +{ + _audioCaches.clear(); + + if (_threadPool) { + _threadPool->destroy(); + delete _threadPool; + } +} + +bool AudioEngineImpl::init() +{ + bool ret = false; + + if (nullptr == _threadPool) { + _threadPool = new (std::nothrow) AudioEngineThreadPool(); + } + + ret = true; + return ret; +} + +int AudioEngineImpl::play2d(const std::string &filePath, bool loop, float volume) +{ + AudioCache* audioCache = nullptr; + auto it = _audioCaches.find(filePath); + if (it == _audioCaches.end()) { + audioCache = &_audioCaches[filePath]; + + auto ext = filePath.substr(filePath.rfind('.')); + transform(ext.begin(), ext.end(), ext.begin(), tolower); + + bool eraseCache = true; + + if (ext.compare(".wav") == 0){ + audioCache->_fileFormat = FileFormat::WAV; + eraseCache = false; + } + else if (ext.compare(".ogg") == 0){ + audioCache->_fileFormat = FileFormat::OGG; + //eraseCache = false; //TODO add support for OGG + } + else if (ext.compare(".mp3") == 0){ + audioCache->_fileFormat = FileFormat::MP3; + eraseCache = false; + } + else{ + log("unsupported media type:%s\n", ext.c_str()); + eraseCache = false; + } + + if (eraseCache){ + _audioCaches.erase(filePath); + return AudioEngine::INVALID_AUDIO_ID; + } + + std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filePath); + audioCache->_fileFullPath = fullPath; + _threadPool->addTask(std::bind(&AudioCache::readDataTask, audioCache)); + } + else { + audioCache = &it->second; + } + + auto player = &_audioPlayers[_currentAudioID]; + player->_loop = loop; + player->_volume = volume; + audioCache->addCallback(std::bind(&AudioEngineImpl::_play2d, this, audioCache, _currentAudioID)); + + if (_lazyInitLoop) { + _lazyInitLoop = false; + + auto scheduler = cocos2d::Director::getInstance()->getScheduler(); + scheduler->schedule(schedule_selector(AudioEngineImpl::update), this, 0.05f, false); + } + + return _currentAudioID++; +} + +void AudioEngineImpl::_play2d(AudioCache *cache, int audioID) +{ + if (cache->_isReady){ + auto playerIt = _audioPlayers.find(audioID); + if (playerIt != _audioPlayers.end()) { + if (playerIt->second.play2d(cache)) { + AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING; + } + else{ + _threadMutex.lock(); + _toRemoveAudioIDs.push_back(audioID); + _threadMutex.unlock(); + } + } + } + else { + _threadMutex.lock(); + _toRemoveCaches.push_back(cache); + _toRemoveAudioIDs.push_back(audioID); + _threadMutex.unlock(); + } +} + +void AudioEngineImpl::setVolume(int audioID, float volume) +{ + auto& player = _audioPlayers[audioID]; + + if (player._ready){ + player.setVolume(volume); + } + + if (player.isInError()) { + log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); + } +} + +void AudioEngineImpl::setLoop(int audioID, bool loop) +{ + auto& player = _audioPlayers[audioID]; + + if (player._ready) { + player._loop = loop; + } + + if (player.isInError()) { + log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); + } +} + +bool AudioEngineImpl::pause(int audioID) +{ + bool ret = false; + auto& player = _audioPlayers[audioID]; + + if (player._ready) { + player.pause(); + AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PAUSED; + } + + ret = !player.isInError(); + + if (!ret) { + log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); + } + + return ret; +} + +bool AudioEngineImpl::resume(int audioID) +{ + bool ret = false; + auto& player = _audioPlayers[audioID]; + + if (player._ready) { + player.resume(); + AudioEngine::_audioIDInfoMap[audioID].state = AudioEngine::AudioState::PLAYING; + } + + ret = !player.isInError(); + + if (!ret) { + log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); + } + + return ret; +} + +bool AudioEngineImpl::stop(int audioID) +{ + bool ret = false; + auto& player = _audioPlayers[audioID]; + + if (player._ready) { + player.stop(); + ret = !player.isInError(); + } + + if (!ret) { + log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); + } + + _audioPlayers.erase(audioID); + return ret; +} + +void AudioEngineImpl::stopAll() +{ + for (auto &player : _audioPlayers) { + player.second.stop(); + } + + _audioPlayers.clear(); +} + +float AudioEngineImpl::getDuration(int audioID) +{ + auto& player = _audioPlayers[audioID]; + + if (player._ready) { + return player.getDuration(); + } + else { + return AudioEngine::TIME_UNKNOWN; + } +} + +float AudioEngineImpl::getCurrentTime(int audioID) +{ + float ret = 0.0f; + auto& player = _audioPlayers[audioID]; + + if (player._ready) { + ret = player.getCurrentTime(); + } + + return ret; +} + +bool AudioEngineImpl::setCurrentTime(int audioID, float time) +{ + bool ret = false; + auto& player = _audioPlayers[audioID]; + + if (player._ready) { + ret = player.setTime(time); + } + + if (!ret) { + log("%s: audio id = %d, error.\n", __FUNCTION__, audioID); + } + + return ret; +} + +void AudioEngineImpl::setFinishCallback(int audioID, const std::function &callback) +{ + _audioPlayers[audioID]._finishCallback = callback; +} + +void AudioEngineImpl::update(float dt) +{ + int audioID; + + if (_threadMutex.try_lock()) { + size_t removeAudioCount = _toRemoveAudioIDs.size(); + for (size_t index = 0; index < removeAudioCount; ++index) { + audioID = _toRemoveAudioIDs[index]; + auto playerIt = _audioPlayers.find(audioID); + if (playerIt != _audioPlayers.end()) { + if (playerIt->second._finishCallback) { + auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID]; + playerIt->second._finishCallback(audioID, *audioInfo.filePath); + } + _audioPlayers.erase(audioID); + AudioEngine::remove(audioID); + } + } + + size_t removeCacheCount = _toRemoveCaches.size(); + for (size_t index = 0; index < removeCacheCount; ++index) { + auto itEnd = _audioCaches.end(); + for (auto it = _audioCaches.begin(); it != itEnd; ++it) { + if (&it->second == _toRemoveCaches[index]) { + _audioCaches.erase(it); + break; + } + } + } + _threadMutex.unlock(); + } + + for (auto it = _audioPlayers.begin(); it != _audioPlayers.end();) { + audioID = it->first; + auto& player = it->second; + + if (player._ready && player._state == AudioPlayerState::STOPPED) { + if (player._finishCallback) { + auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID]; + player._finishCallback(audioID, *audioInfo.filePath); + } + + AudioEngine::remove(audioID); + it = _audioPlayers.erase(it); + } + else{ + player.update(); + ++it; + } + } + + if (_audioPlayers.empty()){ + _lazyInitLoop = true; + + auto scheduler = cocos2d::Director::getInstance()->getScheduler(); + scheduler->unschedule(schedule_selector(AudioEngineImpl::update), this); + } +} + +void AudioEngineImpl::uncache(const std::string &filePath) +{ + _audioCaches.erase(filePath); +} + +void AudioEngineImpl::uncacheAll() +{ + _audioCaches.clear(); +} + +#endif diff --git a/cocos/audio/winrt/AudioEngine-winrt.h b/cocos/audio/winrt/AudioEngine-winrt.h new file mode 100644 index 0000000000..906ab7ff31 --- /dev/null +++ b/cocos/audio/winrt/AudioEngine-winrt.h @@ -0,0 +1,82 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "platform/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT + +#ifndef __AUDIO_ENGINE_WINRT_H_ +#define __AUDIO_ENGINE_WINRT_H_ + +#define NEAR near + +#include + +#include "base/CCRef.h" +#include "AudioEngine.h" +#include "AudioCachePlayer.h" + +NS_CC_BEGIN + namespace experimental{ +#define MAX_AUDIOINSTANCES 32 + + + class AudioEngineThreadPool; + + class CC_DLL AudioEngineImpl : public cocos2d::Ref + { + public: + AudioEngineImpl(); + ~AudioEngineImpl(); + + bool init(); + int play2d(const std::string &fileFullPath, bool loop, float volume); + void setVolume(int audioID, float volume); + void setLoop(int audioID, bool loop); + bool pause(int audioID); + bool resume(int audioID); + bool stop(int audioID); + void stopAll(); + float getDuration(int audioID); + float getCurrentTime(int audioID); + bool setCurrentTime(int audioID, float time); + void setFinishCallback(int audioID, const std::function &callback); + void uncache(const std::string& filePath); + void uncacheAll(); + void update(float dt); + + private: + void _play2d(AudioCache *cache, int audioID); + + private: + std::unordered_map _audioPlayers; + std::unordered_map _audioCaches; + std::vector _toRemoveCaches; + + std::mutex _threadMutex; + std::vector _toRemoveAudioIDs; + bool _lazyInitLoop; + int _currentAudioID; + AudioEngineThreadPool* _threadPool; + }; +} + +NS_CC_END +#endif // __AUDIO_ENGINE_WINRT_H_ +#endif + diff --git a/cocos/audio/winrt/AudioSourceReader.cpp b/cocos/audio/winrt/AudioSourceReader.cpp new file mode 100644 index 0000000000..dcca1804f1 --- /dev/null +++ b/cocos/audio/winrt/AudioSourceReader.cpp @@ -0,0 +1,523 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "platform/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT + +#include "CCWinRTUtils.h" +#include "AudioSourceReader.h" + +using namespace cocos2d; +using namespace cocos2d::experimental; +using namespace Microsoft::WRL; + + +// AudioFileReader +AudioSourceReader::AudioSourceReader() : +_isStreaming(false) +, _filePath("") +, _audioSize(0) +, _bytesRead(0) +, _isDirty(false) +{ + memset(&_wfx, 0, sizeof(_wfx)); +} + +AudioSourceReader::~AudioSourceReader() +{ + flushChunks(); +} + +void AudioSourceReader::flushChunks() +{ + _rwMutex.lock(); + while (!_chnkQ.empty()) { + _chnkQ.pop(); + } + _rwMutex.unlock(); +} + + +// WAVFileReader +WAVReader::WAVReader() : +_streamer(nullptr) +{ +} + +WAVReader::~WAVReader() +{ +} + +bool WAVReader::initialize(const std::string& filePath) +{ + bool ret = false; + _isStreaming = false; + _filePath = filePath; + + do { + auto fileSize = FileUtils::getInstance()->getFileSize(_filePath); + + if (fileSize <= 0) + break; + + flushChunks(); + + _rwMutex.lock(); + _streamer = ref new MediaStreamer; + _streamer->Initialize(std::wstring(_filePath.begin(), _filePath.end()).c_str(), true); + _rwMutex.unlock(); + _wfx = _streamer->GetOutputWaveFormatEx(); + UINT32 dataSize = _streamer->GetMaxStreamLengthInBytes(); + + if (dataSize <= 0) + break; + + _audioSize = dataSize; + if (_audioSize <= PCMDATA_CACHEMAXSIZE) { + produceChunk(); + } + else { + _isStreaming = true; + for (int i = 0; i < QUEUEBUFFER_NUM; i++) { + produceChunk(); + } + } + + ret = true; + } while (false); + + return ret; +} + +bool WAVReader::consumeChunk(AudioDataChunk& chunk) +{ + bool ret = false; + _isDirty = true; + + _rwMutex.lock(); + if (_chnkQ.size() > 0) { + chunk = _chnkQ.front(); + if (_isStreaming) { + _chnkQ.pop(); + } + ret = true; + } + _rwMutex.unlock(); + + return ret; +} + +void WAVReader::produceChunk() +{ + _rwMutex.lock(); + int chunkSize = _audioSize; + + do { + if (!_isStreaming && _chnkQ.size() || _chnkQ.size() >= QUEUEBUFFER_NUM) { + break; + } + + if (_isStreaming) { + chunkSize = std::min(CHUNK_SIZE_MAX, _audioSize - _bytesRead); + } + + if (!chunkSize && !_chnkQ.size()) { + auto alignment = _wfx.nChannels * _wfx.nBlockAlign; + _bytesRead -= alignment; + chunkSize = alignment; + } + + if (!chunkSize) { + break; + } + + UINT retSize = 0; + AudioDataChunk chunk = { 0 }; + chunk._data = std::make_shared(chunkSize); + _streamer->ReadChunk(chunk._data->data(), _bytesRead, chunkSize, &retSize); + _bytesRead += retSize; + chunk._dataSize = retSize; + chunk._seqNo = ((float)_bytesRead / _audioSize) * ((float)_audioSize / CHUNK_SIZE_MAX); + chunk._endOfStream = (_bytesRead >= _audioSize); + _chnkQ.push(chunk); + } while (false); + _rwMutex.unlock(); +} + +void WAVReader::seekTo(const float ratio) +{ + if (_isStreaming) { + auto newPos = ratio * _audioSize; + + if (!newPos && !_isDirty && _chnkQ.size()) // already in 0.0 position + return; + + _bytesRead = newPos; + flushChunks(); + + switch (_wfx.wFormatTag) + { + case WAVE_FORMAT_PCM: + case WAVE_FORMAT_ADPCM: { + auto alignment = _wfx.nChannels * _wfx.nBlockAlign; + _bytesRead = _bytesRead >= _audioSize ? (_audioSize - alignment) : _bytesRead - (_bytesRead % alignment); + } break; + + default: + break; + } + + for (int i = 0; i < QUEUEBUFFER_NUM; i++) { + produceChunk(); + } + } +} + + +// MP3Reader +MP3Reader::MP3Reader() : +_mappedWavFile("") +, _largeFileSupport(true) +{ +} + +MP3Reader::~MP3Reader() +{ +} + +bool MP3Reader::initialize(const std::string& filePath) +{ + bool ret = false; + _filePath = filePath; + HRESULT hr = S_OK; + MFStartup(MF_VERSION); + + do { + ComPtr pReader; + ComPtr ppDecomprsdAudioType; + + if (FAILED(hr = MFCreateSourceReaderFromURL(std::wstring(_filePath.begin(), _filePath.end()).c_str(), NULL, &pReader))) { + break; + } + + hr = configureSourceReader(pReader.Get(), &ppDecomprsdAudioType); + + if (FAILED(hr)) { + break; + } + + UINT32 cbFormat = 0; + WAVEFORMATEX *pWav = nullptr; + if (FAILED(hr = MFCreateWaveFormatExFromMFMediaType(ppDecomprsdAudioType.Get(), &pWav, &cbFormat))) { + break; + } + + CopyMemory(&_wfx, pWav, sizeof(WAVEFORMATEX)); + CoTaskMemFree(pWav); + + if (FAILED(hr = readAudioData(pReader.Get()))) { + break; + } + + ret = SUCCEEDED(hr); + } while (false); + + MFShutdown(); + return ret; +} + +bool MP3Reader::consumeChunk(AudioDataChunk& chunk) +{ + bool ret = false; + _isDirty = true; + + _rwMutex.lock(); + if (_chnkQ.size() > 0) { + chunk = _chnkQ.front(); + if (_isStreaming) { + _chnkQ.pop(); + } + ret = true; + } + _rwMutex.unlock(); + + return ret; +} + +void MP3Reader::produceChunk() +{ + _rwMutex.lock(); + int chunkSize = _audioSize; + + do { + if (!_isStreaming && _chnkQ.size() || _chnkQ.size() >= QUEUEBUFFER_NUM) { + break; + } + + if (_isStreaming) { + chunkSize = std::min(CHUNK_SIZE_MAX, _audioSize - _bytesRead); + } + + if (!chunkSize && !_chnkQ.size()) { + auto alignment = _wfx.nChannels * _wfx.nBlockAlign; + _bytesRead -= alignment; + chunkSize = alignment; + } + + if (!chunkSize) { + break; + } + + UINT retSize = 0; + AudioDataChunk chunk = { 0 }; + chunk._data = std::make_shared(chunkSize); + readFromMappedWavFile(chunk._data->data(), _bytesRead, chunkSize, &retSize); + _bytesRead += retSize; + chunk._dataSize = retSize; + chunk._seqNo = ((float)_bytesRead / _audioSize) * ((float)_audioSize / CHUNK_SIZE_MAX); + chunk._endOfStream = (_bytesRead >= _audioSize); + _chnkQ.push(chunk); + } while (false); + _rwMutex.unlock(); +} + +void MP3Reader::seekTo(const float ratio) +{ + if (_isStreaming) { + auto newPos = ratio * _audioSize; + + if (!newPos && !_isDirty && _chnkQ.size()) // already in 0.0 position + return; + + _bytesRead = newPos; + flushChunks(); + auto alignment = _wfx.nChannels * _wfx.nBlockAlign; + _bytesRead = _bytesRead >= _audioSize ? (_audioSize - alignment) : _bytesRead - (_bytesRead % alignment); + + for (int i = 0; i < QUEUEBUFFER_NUM; i++) { + produceChunk(); + } + } +} + +HRESULT MP3Reader::configureSourceReader(IMFSourceReader* pReader, IMFMediaType** ppDecomprsdAudioType) +{ + HRESULT hr = S_OK; + + do { + ComPtr pTmpMediaType; + ComPtr pRetMediaType; + pReader->SetStreamSelection(MF_SOURCE_READER_ALL_STREAMS, FALSE); + pReader->SetStreamSelection(MF_SOURCE_READER_FIRST_AUDIO_STREAM, TRUE); + + if (FAILED(hr = MFCreateMediaType(&pTmpMediaType))) { + break; + } + + if (FAILED(hr = pTmpMediaType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Audio))) { + break; + } + + if (FAILED(hr = pTmpMediaType->SetGUID(MF_MT_SUBTYPE, MFAudioFormat_PCM))) { + break; + } + + if (FAILED(hr = pReader->SetCurrentMediaType(MF_SOURCE_READER_FIRST_AUDIO_STREAM, NULL, pTmpMediaType.Get()))) { + break; + } + + if (FAILED(hr = pReader->GetCurrentMediaType(MF_SOURCE_READER_FIRST_AUDIO_STREAM, &pRetMediaType))) { + break; + } + + if (FAILED(hr = pReader->SetStreamSelection(MF_SOURCE_READER_FIRST_AUDIO_STREAM, TRUE))) { + break; + } + + *ppDecomprsdAudioType = pRetMediaType.Get(); + (*ppDecomprsdAudioType)->AddRef(); + } while (false); + + return hr; +} + +HRESULT MP3Reader::readAudioData(IMFSourceReader* pReader) +{ + HRESULT hr = S_OK; + + do { + PCMBuffer buffer; + + if (createMappedCacheFile(_filePath, _mappedWavFile, ".dat")) { + _isStreaming = _largeFileSupport; + _audioSize = FileUtils::getInstance()->getFileSize(_mappedWavFile); + if (!_largeFileSupport) { + buffer.resize(_audioSize); + readFromMappedWavFile(buffer.data(), 0, _audioSize, nullptr); + chunkify(buffer); + } + break; + } + + buffer.reserve(PCMDATA_CACHEMAXSIZE); + + while (SUCCEEDED(hr)) + { + DWORD flags = 0; + DWORD cbSize = 0; + BYTE* pAudioData = nullptr; + ComPtr pSample; + ComPtr pBuffer; + + if (FAILED(hr = pReader->ReadSample(MF_SOURCE_READER_FIRST_AUDIO_STREAM, 0, NULL, &flags, NULL, &pSample))) { + break; + } + + if (flags & MF_SOURCE_READERF_ENDOFSTREAM) { + break; + } + + if (FAILED(hr = pSample->ConvertToContiguousBuffer(&pBuffer))) { + break; + } + + if (FAILED(hr = pBuffer->Lock(&pAudioData, NULL, &cbSize))) { + break; + } + + if (_largeFileSupport && _audioSize + cbSize > PCMDATA_CACHEMAXSIZE) { + + if (!_isStreaming) { + _isStreaming = true; + chunkify(buffer); + appendToMappedWavFile(buffer); + buffer.clear(); + } + + buffer.resize(cbSize); + CopyMemory(buffer.data(), pAudioData, cbSize); + appendToMappedWavFile(buffer); + buffer.clear(); + } + else { + buffer.resize(_audioSize + cbSize); + CopyMemory(&buffer[_audioSize], pAudioData, cbSize); + } + + _audioSize += cbSize; + hr = pBuffer->Unlock(); + pAudioData = NULL; + } + + if (FAILED(hr)) { + break; + } + + if (!_isStreaming) { + chunkify(buffer); + _audioSize > PCMDATA_CACHEMAXSIZE ? + appendToMappedWavFile(buffer) : + destroyMappedCacheFile(_filePath); + } + } while (false); + + return hr; +} + +void MP3Reader::chunkify(PCMBuffer& buffer) +{ + _rwMutex.lock(); + size_t offset = 0; + + if (buffer.size() && _chnkQ.size() < QUEUEBUFFER_NUM) + { + AudioDataChunk chunk = { 0 }; + int chunkSize = buffer.size(); + chunk._data = std::make_shared(buffer); + _bytesRead += chunkSize; + chunk._dataSize = chunkSize; + chunk._endOfStream = (!_isStreaming && _bytesRead >= _audioSize); + chunk._seqNo = ((float)_bytesRead / _audioSize) * ((float)_audioSize / CHUNK_SIZE_MAX); + _chnkQ.push(chunk); + offset += chunkSize; + } + _rwMutex.unlock(); +} + +bool MP3Reader::appendToMappedWavFile(PCMBuffer& buffer) +{ + bool ret = false; + + _rwMutex.lock(); + do { + auto file = openFile(_mappedWavFile, true); + + if (file.Get() == INVALID_HANDLE_VALUE) { + break; + } + + LARGE_INTEGER li = { 0 }; + if (!SetFilePointerEx(file.Get(), li, nullptr, FILE_END)) { + break; + } + + ret = (TRUE == WriteFile(file.Get(), buffer.data(), buffer.size(), nullptr, nullptr)); + } while (false); + _rwMutex.unlock(); + + return ret; +} + +void MP3Reader::readFromMappedWavFile(BYTE *data, size_t offset, int size, UINT *pRetSize) +{ + do { + auto file = openFile(_mappedWavFile); + + if (file.Get() == INVALID_HANDLE_VALUE) { + break; + } + + if (offset) { + LARGE_INTEGER li = { 0 }; + li.QuadPart = offset; + if (!SetFilePointerEx(file.Get(), li, nullptr, FILE_BEGIN)) { + break; + } + } + + ReadFile(file.Get(), data, size, (LPDWORD)pRetSize, nullptr); + } while (false); +} + +Wrappers::FileHandle MP3Reader::openFile(const std::string& path, bool append) +{ + CREATEFILE2_EXTENDED_PARAMETERS extParams = { 0 }; + extParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; + extParams.dwFileFlags = FILE_FLAG_RANDOM_ACCESS; + extParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; + extParams.dwSize = sizeof(extParams); + extParams.hTemplateFile = nullptr; + extParams.lpSecurityAttributes = nullptr; + + DWORD access = append ? GENERIC_WRITE : GENERIC_READ; + DWORD creation = append ? OPEN_ALWAYS : OPEN_EXISTING; + return Microsoft::WRL::Wrappers::FileHandle(CreateFile2(std::wstring(path.begin(), path.end()).c_str(), access, FILE_SHARE_READ, creation, &extParams)); +} + +#endif diff --git a/cocos/audio/winrt/AudioSourceReader.h b/cocos/audio/winrt/AudioSourceReader.h new file mode 100644 index 0000000000..e6d5f37a05 --- /dev/null +++ b/cocos/audio/winrt/AudioSourceReader.h @@ -0,0 +1,139 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2011 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "platform/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT + +#ifndef __AUDIO_SOURCE_READER_H_ +#define __AUDIO_SOURCE_READER_H_ + +#define NEAR near +#include +#include +#include +#include +#include +#include "MediaStreamer.h" + +NS_CC_BEGIN +namespace experimental{ + +const UINT PCMDATA_CACHEMAXSIZE = 2621440; +const UINT QUEUEBUFFER_NUM = 4; +const UINT CHUNK_SIZE_MAX = PCMDATA_CACHEMAXSIZE / QUEUEBUFFER_NUM; + +typedef std::vector PCMBuffer; + +enum class FileFormat +{ + UNKNOWN, + WAV, + MP3, + OGG +}; + +typedef struct AudioDataChunk +{ + std::shared_ptr _data; + size_t _dataSize; + bool _endOfStream; + int _seqNo; +} AudioDataChunk; + + +class AudioSourceReader +{ +public: + AudioSourceReader(); + virtual ~AudioSourceReader(); + + bool isStreamingSource() { return _isStreaming; } + std::string getFilePath() { return _filePath; } + virtual size_t getTotalAudioBytes() { return _audioSize; } + + virtual bool initialize(const std::string& filePath) = 0; + virtual FileFormat getFileFormat() = 0; + virtual bool consumeChunk(AudioDataChunk& chunk) = 0; + virtual void produceChunk() = 0; + virtual void seekTo(const float ratio) = 0; + virtual const WAVEFORMATEX& getWaveFormatInfo() { return _wfx; } + +protected: + void flushChunks(); + +protected: + bool _isDirty; + size_t _bytesRead; + bool _isStreaming; + std::string _filePath; + size_t _audioSize; + WAVEFORMATEX _wfx; + std::mutex _rwMutex; + std::queue _chnkQ; +}; + +class WAVReader : public AudioSourceReader + { + public: + WAVReader(); + virtual ~WAVReader(); + + virtual bool initialize(const std::string& filePath) override; + virtual FileFormat getFileFormat() override { return FileFormat::WAV; } + virtual bool consumeChunk(AudioDataChunk& chunk) override; + virtual void produceChunk() override; + virtual void seekTo(const float ratio) override; + + private: + MediaStreamer^ _streamer; + }; + +class MP3Reader : public AudioSourceReader + { + public: + MP3Reader(); + virtual ~MP3Reader(); + + virtual bool initialize(const std::string& filePath) override; + virtual FileFormat getFileFormat() override { return FileFormat::WAV; } + virtual bool consumeChunk(AudioDataChunk& chunk) override; + virtual void produceChunk() override; + virtual void seekTo(const float ratio) override; + + // for backward compatibility with simple audio engine + void doLargeFileSupport(bool action) { _largeFileSupport = action; } + + protected: + HRESULT configureSourceReader(IMFSourceReader* pReader, IMFMediaType** ppDecomprsdAudioType); + HRESULT readAudioData(IMFSourceReader* pReader); + void chunkify(PCMBuffer& buffer); + bool appendToMappedWavFile(PCMBuffer& buffer); + void readFromMappedWavFile(BYTE *data, size_t offset, int size, UINT *pRetSize); + Microsoft::WRL::Wrappers::FileHandle openFile(const std::string& path, bool append = false); + + private: + bool _largeFileSupport; + std::string _mappedWavFile; + }; + +} +NS_CC_END +#endif // __AUDIO_SOURCE_READER_H_ +#endif + diff --git a/cocos/audio/winrt/MediaStreamer.cpp b/cocos/audio/winrt/MediaStreamer.cpp index fc6287cd04..b50091634c 100644 --- a/cocos/audio/winrt/MediaStreamer.cpp +++ b/cocos/audio/winrt/MediaStreamer.cpp @@ -39,6 +39,8 @@ using namespace Concurrency; ((uint32)(byte)(ch2) << 16) | ((uint32)(byte)(ch3) << 24 )) #endif /* defined(MAKEFOURCC) */ +const int FMT_CHUNK_MAX = 256; + inline void ThrowIfFailed(HRESULT hr) { if (FAILED(hr)) @@ -50,6 +52,8 @@ inline void ThrowIfFailed(HRESULT hr) MediaStreamer::MediaStreamer() : m_offset(0) + , m_dataLen(0) + , m_filename(nullptr) { ZeroMemory(&m_waveFormat, sizeof(m_waveFormat)); m_location = Package::Current->InstalledLocation; @@ -59,39 +63,33 @@ MediaStreamer::MediaStreamer() : MediaStreamer::~MediaStreamer() { } -Platform::Array^ MediaStreamer::ReadData( - _In_ Platform::String^ filename - ) + +Platform::Array^ MediaStreamer::ReadData(_In_ Platform::String^ filename) +{ + return ReadData(filename, 0, 0); +} + +Platform::Array^ MediaStreamer::ReadData(_In_ Platform::String^ filename, uint32 from, uint32 length) { CREATEFILE2_EXTENDED_PARAMETERS extendedParams = {0}; extendedParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); extendedParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; - extendedParams.dwFileFlags = FILE_FLAG_SEQUENTIAL_SCAN; + extendedParams.dwFileFlags = from ? FILE_FLAG_RANDOM_ACCESS : FILE_FLAG_SEQUENTIAL_SCAN; extendedParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; extendedParams.lpSecurityAttributes = nullptr; extendedParams.hTemplateFile = nullptr; Wrappers::FileHandle file( - CreateFile2( - filename->Data(), - GENERIC_READ, - FILE_SHARE_READ, - OPEN_EXISTING, - &extendedParams - ) + CreateFile2(filename->Data(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extendedParams) ); + if (file.Get()==INVALID_HANDLE_VALUE) { throw ref new Platform::FailureException(); } - FILE_STANDARD_INFO fileInfo = {0}; - if (!GetFileInformationByHandleEx( - file.Get(), - FileStandardInfo, - &fileInfo, - sizeof(fileInfo) - )) + FILE_STANDARD_INFO fileInfo = { 0 }; + if (!GetFileInformationByHandleEx(file.Get(), FileStandardInfo, &fileInfo, sizeof(fileInfo))) { throw ref new Platform::FailureException(); } @@ -101,15 +99,21 @@ Platform::Array^ MediaStreamer::ReadData( throw ref new Platform::OutOfMemoryException(); } - Platform::Array^ fileData = ref new Platform::Array(fileInfo.EndOfFile.LowPart); + from += m_offset; + length = (length == 0 || from + length > fileInfo.EndOfFile.LowPart) ? fileInfo.EndOfFile.LowPart - from : length; + Platform::Array^ fileData = ref new Platform::Array(length); - if (!ReadFile( - file.Get(), - fileData->Data, - fileData->Length, - nullptr, - nullptr - ) ) + if (from) + { + LARGE_INTEGER pos = { 0 }; + pos.QuadPart = from; + if (!SetFilePointerEx(file.Get(), pos, nullptr, FILE_BEGIN)) + { + throw ref new Platform::FailureException(); + } + } + + if (!ReadFile(file.Get(), fileData->Data, fileData->Length, nullptr, nullptr)) { throw ref new Platform::FailureException(); } @@ -117,9 +121,9 @@ Platform::Array^ MediaStreamer::ReadData( return fileData; } -void MediaStreamer::Initialize(__in const WCHAR* url) +void MediaStreamer::Initialize(__in const WCHAR* url, bool lazy) { - + m_filename = ref new Platform::String(url); WCHAR filePath[MAX_PATH] = {0}; if ((wcslen(url) > 1 && url[1] == ':')) { @@ -139,8 +143,7 @@ void MediaStreamer::Initialize(__in const WCHAR* url) wcscat_s(filePath, url); } - - Platform::Array^ data = ReadData(ref new Platform::String(filePath)); + Platform::Array^ data = lazy ? ReadData(ref new Platform::String(filePath), 0, FMT_CHUNK_MAX) : ReadData(ref new Platform::String(filePath)); UINT32 length = data->Length; const byte * dataPtr = data->Data; UINT32 offset = 0; @@ -197,22 +200,45 @@ void MediaStreamer::Initialize(__in const WCHAR* url) // Locate the 'data' chunk and copy its contents to a buffer. ThrowIfFailed(ReadChunk(MAKEFOURCC('d', 'a', 't', 'a'), chunkSize, chunkPos)); - m_data.resize(chunkSize); - CopyMemory(m_data.data(), &dataPtr[chunkPos], chunkSize); + m_dataLen = chunkSize; + m_offset = chunkPos; - m_offset = 0; + if (!lazy) + { + m_data.resize(chunkSize); + CopyMemory(m_data.data(), &dataPtr[chunkPos], chunkSize); + m_offset = 0; + } } void MediaStreamer::ReadAll(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength) { - UINT32 toCopy = m_data.size() - m_offset; - if (toCopy > maxBufferSize) toCopy = maxBufferSize; + if (!m_data.size()) + { + ReadChunk(buffer, 0, m_dataLen, bufferLength); + } + else + { + UINT32 toCopy = m_data.size() - m_offset; + if (toCopy > maxBufferSize) toCopy = maxBufferSize; - CopyMemory(buffer, m_data.data(), toCopy); - *bufferLength = toCopy; + CopyMemory(buffer, m_data.data(), toCopy); + *bufferLength = toCopy; - m_offset += toCopy; - if (m_offset > m_data.size()) m_offset = m_data.size(); + m_offset += toCopy; + if (m_offset > m_data.size()) m_offset = m_data.size(); + } +} + +void MediaStreamer::ReadChunk(uint8* buffer, uint32 from, uint32 length, uint32* bytesRead) +{ + Platform::Array^ data = ReadData(m_filename, from, length); + *bytesRead = data->Length; + + if (*bytesRead > 0) + { + CopyMemory(buffer, (byte*)data->Data, data->Length); + } } void MediaStreamer::Restart() diff --git a/cocos/audio/winrt/MediaStreamer.h b/cocos/audio/winrt/MediaStreamer.h index e72ac5974a..d2c46f613f 100644 --- a/cocos/audio/winrt/MediaStreamer.h +++ b/cocos/audio/winrt/MediaStreamer.h @@ -29,9 +29,12 @@ private: uint32 m_maxStreamLengthInBytes; std::vector m_data; UINT32 m_offset; - Platform::Array^ ReadData( - _In_ Platform::String^ filename - ); + UINT32 m_dataLen; + Platform::String^ m_filename; + + Platform::Array^ ReadData(_In_ Platform::String^ filename); + Platform::Array^ ReadData(_In_ Platform::String^ filename, uint32 from, uint32 length); + internal: Windows::Storage::StorageFolder^ m_location; Platform::String^ m_locationPath; @@ -49,10 +52,11 @@ internal: UINT32 GetMaxStreamLengthInBytes() { - return m_data.size(); + return m_dataLen; } - void Initialize(_In_ const WCHAR* url); - void ReadAll(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength); + void Initialize(_In_ const WCHAR* url, bool lazy = false); + void ReadAll(uint8* buffer, uint32 maxBufferSize, uint32* bufferLength); + void ReadChunk(uint8* buffer, uint32 from, uint32 length, uint32* bytesRead); void Restart(); }; diff --git a/cocos/audio/winrt/SimpleAudioEngine.cpp b/cocos/audio/winrt/SimpleAudioEngine.cpp index 6a9b17354b..df69cf263c 100644 --- a/cocos/audio/winrt/SimpleAudioEngine.cpp +++ b/cocos/audio/winrt/SimpleAudioEngine.cpp @@ -18,10 +18,12 @@ #include "SimpleAudioEngine.h" #include "Audio.h" +#include "cocos2d.h" #include //#include "CCCommon.h" using namespace std; +USING_NS_CC; namespace CocosDenshion { @@ -81,7 +83,8 @@ void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) return; } - sharedAudioController()->PlayBackgroundMusic(pszFilePath, bLoop); + string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); + sharedAudioController()->PlayBackgroundMusic(fullPath.c_str(), bLoop); } void SimpleAudioEngine::stopBackgroundMusic(bool bReleaseData) @@ -121,8 +124,8 @@ bool SimpleAudioEngine::isBackgroundMusicPlaying() unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain) { unsigned int sound; - sharedAudioController()->PlaySoundEffect(pszFilePath, bLoop, sound); - // TODO: need to support playEffect parameters + string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); + sharedAudioController()->PlaySoundEffect(fullPath.c_str(), bLoop, sound); // TODO: need to support playEffect parameters return sound; } @@ -133,7 +136,8 @@ void SimpleAudioEngine::stopEffect(unsigned int nSoundId) void SimpleAudioEngine::preloadEffect(const char* pszFilePath) { - sharedAudioController()->PreloadSoundEffect(pszFilePath); + string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); + sharedAudioController()->PreloadSoundEffect(fullPath.c_str()); } void SimpleAudioEngine::pauseEffect(unsigned int nSoundId) @@ -168,7 +172,8 @@ void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) void SimpleAudioEngine::unloadEffect(const char* pszFilePath) { - sharedAudioController()->UnloadSoundEffect(pszFilePath); + string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath); + sharedAudioController()->UnloadSoundEffect(fullPath.c_str()); } ////////////////////////////////////////////////////////////////////////// diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index b72d301d4e..aa306ce6bc 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -354,10 +354,6 @@ bool Console::listenOnTCP(int port) #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) WSADATA wsaData; n = WSAStartup(MAKEWORD(2, 2),&wsaData); - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - CCLogIPAddresses(); -#endif #endif if ( (n = getaddrinfo(nullptr, serv, &hints, &res)) != 0) { @@ -446,7 +442,10 @@ void Console::stop() { if( _running ) { _endThread = true; - _thread.join(); + if (_thread.joinable()) + { + _thread.join(); + } } } @@ -1056,6 +1055,17 @@ void Console::addClient() _maxfd = std::max(_maxfd,fd); sendPrompt(fd); + + /** + * A SIGPIPE is sent to a process if it tried to write to socket that had been shutdown for + * writing or isn't connected (anymore) on iOS. + * + * The default behaviour for this signal is to end the process.So we make the process ignore SIGPIPE. + */ +#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS + int set = 1; + setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int)); +#endif } } @@ -1155,14 +1165,16 @@ void Console::loop() /* Any message for the remote console ? send it! */ if( !_DebugStrings.empty() ) { - _DebugStringsMutex.lock(); - for(const auto &str : _DebugStrings) { - for(const auto &fd : _fds) { - send(fd, str.c_str(), str.length(),0); + if (_DebugStringsMutex.try_lock()) + { + for (const auto &str : _DebugStrings) { + for (auto fd : _fds) { + send(fd, str.c_str(), str.length(), 0); + } } + _DebugStrings.clear(); + _DebugStringsMutex.unlock(); } - _DebugStrings.clear(); - _DebugStringsMutex.unlock(); } } diff --git a/cocos/base/CCEventMouse.h b/cocos/base/CCEventMouse.h index 4f0980abda..8bfc72e463 100644 --- a/cocos/base/CCEventMouse.h +++ b/cocos/base/CCEventMouse.h @@ -81,12 +81,12 @@ public: * * @return The scroll data of x axis. */ - inline float getScrollX() { return _scrollX; }; + inline float getScrollX() const { return _scrollX; }; /** Get mouse scroll data of y axis. * * @return The scroll data of y axis. */ - inline float getScrollY() { return _scrollY; }; + inline float getScrollY() const { return _scrollY; }; /** Set the cursor position. * @@ -118,19 +118,19 @@ public: * @return The mouse button. * @js getButton */ - inline int getMouseButton() { return _mouseButton; }; + inline int getMouseButton() const { return _mouseButton; }; /** Get the cursor position of x axis. * * @return The x coordinate of cursor position. * @js getLocationX */ - inline float getCursorX() { return _x; }; + inline float getCursorX() const { return _x; }; /** Get the cursor position of y axis. * * @return The y coordinate of cursor position. * @js getLocationY */ - inline float getCursorY() { return _y; }; + inline float getCursorY() const { return _y; }; /** Returns the current touch location in OpenGL coordinates. * diff --git a/cocos/base/CCNinePatchImageParser.cpp b/cocos/base/CCNinePatchImageParser.cpp new file mode 100644 index 0000000000..8ed4c2bb55 --- /dev/null +++ b/cocos/base/CCNinePatchImageParser.cpp @@ -0,0 +1,220 @@ +/**************************************************************************** + Copyright (c) 2013-2015 Chukong Technologies Inc. + + 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 "CCNinePatchImageParser.h" +#include "platform/CCImage.h" +#include "base/CCDirector.h" + +NS_CC_BEGIN + +NinePatchImageParser::~NinePatchImageParser() +{ + +} + +NinePatchImageParser::NinePatchImageParser() +:_image(nullptr) +,_imageFrame(Rect::ZERO) +,_isRotated(false) +{ + +} + + +NinePatchImageParser::NinePatchImageParser(Image* image) +:_image(image) +,_imageFrame(Rect::ZERO) +,_isRotated(false) +{ + this->_imageFrame = Rect(0,0,image->getWidth(), image->getHeight()); + CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888, + "unsupported format, currently only supports rgba8888"); +} + +NinePatchImageParser::NinePatchImageParser(Image* image, const Rect& frame, bool rotated) +:_image(image) +,_imageFrame(frame) +,_isRotated(rotated) +{ + CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888, + "unsupported format, currently only supports rgba8888"); +} + +int NinePatchImageParser::getFrameHeight()const +{ + if (_isRotated) + { + return _imageFrame.size.width; + } + return _imageFrame.size.height; +} + +int NinePatchImageParser::getFrameWidth()const +{ + if (_isRotated) + { + return _imageFrame.size.height; + } + return _imageFrame.size.width; +} + +int NinePatchImageParser::getPixelOriginOffset(Direction direction)const +{ + int imageWidth = _image->getWidth(); + int frameWidth = this->getFrameWidth(); + + int topLineLeftOffset = (int)_imageFrame.origin.y * imageWidth * 4 + (int)_imageFrame.origin.x * 4; + if(direction == Direction::HORIZONTAL) + { + return topLineLeftOffset; + } + else + { + if(_isRotated) + { + return topLineLeftOffset + (frameWidth - 1) * 4; + } + else + { + return topLineLeftOffset; + } + } +} + +Vec2 NinePatchImageParser::parseHorizontalMargin()const +{ + unsigned char* data = _image->getData(); + + data = data + this->getPixelOriginOffset(Direction::HORIZONTAL); + unsigned char lastPixel = *(data + 3); + int x1 = 0; + int x2 = 0; + + int length = _imageFrame.origin.x + this->getFrameWidth(); + for(int i = (int)_imageFrame.origin.x; i <= length ; i++) + { + unsigned char pixel = *(data + (i - (int)_imageFrame.origin.x) * 4 +3); + if(pixel != lastPixel) + { + if (pixel > 0) + { + x1 = (i - (int)_imageFrame.origin.x); + } + else + { + x2 = (i - (int)_imageFrame.origin.x); + break; + } + } + lastPixel = pixel; + } + return Vec2(x1,x2); +} + +Vec2 NinePatchImageParser::parseVerticalMargin()const +{ + unsigned char* data = _image->getData(); + int imageWidth = _image->getWidth(); + + int y1 = 0; + int y2 = 0; + + data = data + this->getPixelOriginOffset(Direction::VERTICAL); + unsigned char lastPixel = *(data + 3); + + int length = (int)(_imageFrame.origin.y + this->getFrameHeight()); + for(int i = _imageFrame.origin.y; i <= length; i++) + { + unsigned char pixel = *(data + (i - (int)_imageFrame.origin.y) * imageWidth * 4 + 3); + if(pixel != lastPixel) + { + if(pixel > 0) + { + y1 = (i - (int)_imageFrame.origin.y); + } + else + { + y2 = (i - (int)_imageFrame.origin.y); + break; + } + } + lastPixel = pixel; + } + return Vec2(y1,y2); +} + +Rect NinePatchImageParser::parseCapInset() const +{ + Rect capInsets; + Vec2 horizontalLine = this->parseHorizontalMargin(); + Vec2 verticalLine = this->parseVerticalMargin(); + + if(_isRotated) + { + capInsets = Rect(verticalLine.y, + _imageFrame.size.height - horizontalLine.y, + verticalLine.y - verticalLine.x, + horizontalLine.y - horizontalLine.x); + } + else + { + capInsets = Rect(horizontalLine.x, + verticalLine.x, + horizontalLine.y - horizontalLine.x, + verticalLine.y - verticalLine.x); + } + + capInsets = Rect(capInsets.origin.x / CC_CONTENT_SCALE_FACTOR(), + capInsets.origin.y / CC_CONTENT_SCALE_FACTOR(), + capInsets.size.width / CC_CONTENT_SCALE_FACTOR(), + capInsets.size.height / CC_CONTENT_SCALE_FACTOR()); + return capInsets; +} + +void NinePatchImageParser::setSpriteFrameInfo(Image* image, const cocos2d::Rect& frameRect, bool rotated ) +{ + this->_image = image; + CCASSERT(image->getRenderFormat()==Texture2D::PixelFormat::RGBA8888, + "unsupported format, currently only supports rgba8888"); + this->_imageFrame = frameRect; + this->_isRotated = rotated; +} + +bool NinePatchImageParser::isNinePatchImage(const std::string& filepath) +{ + size_t length = filepath.length(); + if(length <7 ) + { + return false; + } + if(filepath.compare(length-6, 6, ".9.png") == 0) + { + return true; + } + else + { + return false; + } +} + +NS_CC_END diff --git a/cocos/base/CCNinePatchImageParser.h b/cocos/base/CCNinePatchImageParser.h new file mode 100644 index 0000000000..946dd44538 --- /dev/null +++ b/cocos/base/CCNinePatchImageParser.h @@ -0,0 +1,120 @@ +/**************************************************************************** + Copyright (c) 2013-2015 Chukong Technologies Inc. + + 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 "platform/CCPlatformMacros.h" +#include "math/CCGeometry.h" + +NS_CC_BEGIN + +class Image; +class SpriteFrame; + + +/** + * A class for paring Android .9 patch image. + * For more about Android .9 patch image format, please refer to + * http://developer.android.com/tools/help/draw9patch.html + * + * The class could parse a single .9 patch image and produce the capInsets + * as well as a sprite atlas and store all the capInsets infos in a Texture2D. + * Note: + * - Currently only PixelFormat::RGBA8888 is supported. + * - TexturePacker Trim mode is not supported at the moment. + */ + +class CC_DLL NinePatchImageParser +{ +public: + /** + * Determines whether a filename contains ".9.png" suffix. + * @param filename A 9-patch image name. + * + * @return If the filename contains ".9.png", then return true, otherwise false. + */ + static bool isNinePatchImage(const std::string& filename); + + /** + * Default constructor. + * + */ + NinePatchImageParser(); + + /** + * Instantiate a NinePatchImageParser with a Image object. + * + * @param image A Image object pointer. + * + * @return A NinePatchImageParser instance. + */ + explicit NinePatchImageParser(Image* image); + + /** + * Instantiate a NinePatchImageParser with a Image object and the spriteFrame info. + * The spriteFrame contains the frame rect in the image atlas and whether it + * is rotated or not. + * + * @param image A Image object pointer. + * @param frameRect The sprite frame rect in the image atlas. + * @param ratated Whether is sprite frame is rotated in the image atlas. + * + * @return + */ + NinePatchImageParser(Image* image, const Rect& frameRect, bool ratated); + + /** + * Change the sprite frame info. + * It is useful when parsing multiple sprite frame with only on NinePatchImageParser. + * + * @param frameRect The sprite frame rect in the image atlas. + * @param rotated Whether is sprite frame is rotated in the image atlas. + */ + void setSpriteFrameInfo(Image* image, const Rect& frameRect, bool rotated); + + /** + * Default destructor. + */ + virtual ~NinePatchImageParser(); + + /** + * Parsing the image data and extract the capInsets info. + * @return The capInsets Rect. + */ + Rect parseCapInset()const; +private: + enum class Direction + { + HORIZONTAL, + VERTICAL + }; + int getPixelOriginOffset(Direction direction)const; + Vec2 parseHorizontalMargin()const; + Vec2 parseVerticalMargin()const; + int getFrameWidth()const; + int getFrameHeight()const; + + Image* _image; + Rect _imageFrame; + bool _isRotated; +}; + +NS_CC_END diff --git a/cocos/base/CCProperties.cpp b/cocos/base/CCProperties.cpp index 46c4710660..407c460500 100644 --- a/cocos/base/CCProperties.cpp +++ b/cocos/base/CCProperties.cpp @@ -85,7 +85,7 @@ Properties::Properties(Data* data, ssize_t* dataIdx, const std::string& name, co rewind(); } -Properties* Properties::createWithoutAutorelease(const std::string& url) +Properties* Properties::createNonRefCounted(const std::string& url) { if (url.size() == 0) { @@ -419,24 +419,25 @@ signed char Properties::readChar() char* Properties::readLine(char* output, int num) { - int idx=0; - if (eof()) return nullptr; // little optimization: avoid uneeded dereferences - ssize_t dataIdx = *_dataIdx; + const ssize_t dataIdx = *_dataIdx; + int i; - while (dataIdx<_data->_size && _data->_bytes[dataIdx]!='\n' && idx-1_size; i++) { - dataIdx++; idx++; + auto c = _data->_bytes[dataIdx+i]; + if (c == '\n') + break; + output[i] = c; } - memcpy(output, &_data->_bytes[*_dataIdx], idx); - output[idx] = '\0'; + output[i] = '\0'; // restore value - *_dataIdx = dataIdx; + *_dataIdx = dataIdx+i; return output; } diff --git a/cocos/base/CCProperties.h b/cocos/base/CCProperties.h index 70cd2e48fb..5a60896477 100644 --- a/cocos/base/CCProperties.h +++ b/cocos/base/CCProperties.h @@ -105,7 +105,7 @@ class Data; @verbatim // Create the top-level Properties object. - Properties* properties = Properties::createWithoutAutorelease("example.properties"); + Properties* properties = Properties::createNonRefCounted("example.properties"); // Retrieve the "spriteTexture" namespace. Properties* spriteTexture = properties->getNamespace("spriteTexture"); @@ -187,7 +187,7 @@ public: * @return The created Properties or NULL if there was an error. * @script{create} */ - static Properties* createWithoutAutorelease(const std::string& url); + static Properties* createNonRefCounted(const std::string& url); /** * Destructor. @@ -579,7 +579,7 @@ private: bool seekFromCurrent(int offset); bool eof(); - // Called after createWithoutAutorelease(); copies info from parents into derived namespaces. + // Called after createNonRefCounted(); copies info from parents into derived namespaces. void resolveInheritance(const char* id = NULL); // Called by resolveInheritance(). diff --git a/cocos/base/CCUserDefault-winrt.cpp b/cocos/base/CCUserDefault-winrt.cpp new file mode 100644 index 0000000000..4279c67ecb --- /dev/null +++ b/cocos/base/CCUserDefault-winrt.cpp @@ -0,0 +1,334 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +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 "base/CCUserDefault.h" +#include "platform/CCCommon.h" +#include "base/base64.h" +#include "base/ccUtils.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#include "CCWinRTUtils.h" + +using namespace Windows::Storage; +using namespace Windows::Foundation; +using namespace std; + +#define XML_FILE_NAME "UserDefault.xml" + +NS_CC_BEGIN + + +/** + * WinRT implementation of UserDefault + */ + +UserDefault* UserDefault::_userDefault = nullptr; +string UserDefault::_filePath = string(""); +bool UserDefault::_isFilePathInitialized = false; + +UserDefault::~UserDefault() +{ +} + +UserDefault::UserDefault() +{ +} + +Platform::Object^ getPlatformKeyValue(const char* pKey) +{ + // check key + if (!pKey) + { + return nullptr; + } + + ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings; + auto key = PlatformStringFromString(pKey); + auto values = localSettings->Values; + + if (values->HasKey(key)) + { + return values->Lookup(key); + } + + return nullptr; +} + +void setPlatformKeyValue(const char* pKey, PropertyValue^ value) +{ + // check key + if (!pKey) + { + return; + } + + ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings; + auto values = localSettings->Values; + values->Insert(PlatformStringFromString(pKey), value); +} + +bool UserDefault::getBoolForKey(const char* pKey) +{ + return getBoolForKey(pKey, false); +} + +bool UserDefault::getBoolForKey(const char* pKey, bool defaultValue) +{ + bool ret = defaultValue; + auto value = getPlatformKeyValue(pKey); + if (value) + { + ret = safe_cast(value); + } + return ret; +} + +int UserDefault::getIntegerForKey(const char* pKey) +{ + return getIntegerForKey(pKey, 0); +} + +int UserDefault::getIntegerForKey(const char* pKey, int defaultValue) +{ + int ret = defaultValue; + auto value = getPlatformKeyValue(pKey); + if (value) + { + ret = safe_cast(value); + } + return ret; +} + +float UserDefault::getFloatForKey(const char* pKey) +{ + return getFloatForKey(pKey, 0.0f); +} + +float UserDefault::getFloatForKey(const char* pKey, float defaultValue) +{ + float ret = (float)getDoubleForKey(pKey, (double)defaultValue); + + return ret; +} + +double UserDefault::getDoubleForKey(const char* pKey) +{ + return getDoubleForKey(pKey, 0.0); +} + +double UserDefault::getDoubleForKey(const char* pKey, double defaultValue) +{ + double ret = defaultValue; + auto value = getPlatformKeyValue(pKey); + if (value) + { + ret = safe_cast(value); + } + return ret; +} + +std::string UserDefault::getStringForKey(const char* pKey) +{ + return getStringForKey(pKey, ""); +} + +string UserDefault::getStringForKey(const char* pKey, const std::string & defaultValue) +{ + string ret = defaultValue; + auto value = getPlatformKeyValue(pKey); + if (value) + { + auto result = safe_cast(value); + ret = PlatformStringToString(result); + } + + return ret; +} + +Data UserDefault::getDataForKey(const char* pKey) +{ + return getDataForKey(pKey, Data::Null); +} + +Data UserDefault::getDataForKey(const char* pKey, const Data& defaultValue) +{ + Data ret = defaultValue; + std::string encodedData = getStringForKey(pKey,""); + + if (!encodedData.empty()) + { + unsigned char* decodedData = nullptr; + int decodedDataLen = base64Decode((unsigned char*) encodedData.c_str(), (unsigned int) encodedData.length(), &decodedData); + if (decodedData && decodedDataLen > 0) + { + ret.fastSet(decodedData, decodedDataLen); + } + } + + return ret; +} + +void UserDefault::setBoolForKey(const char* pKey, bool value) +{ + // check key + if (!pKey) + { + return; + } + + setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateBoolean(value))); +} + +void UserDefault::setIntegerForKey(const char* pKey, int value) +{ + // check key + if (! pKey) + { + return; + } + + setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateInt32(value))); +} + +void UserDefault::setFloatForKey(const char* pKey, float value) +{ + setDoubleForKey(pKey, value); +} + +void UserDefault::setDoubleForKey(const char* pKey, double value) +{ + // check key + if (! pKey) + { + return; + } + + setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateDouble(value))); +} + +void UserDefault::setStringForKey(const char* pKey, const std::string & value) +{ + // check key + if (! pKey) + { + return; + } + + setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateString(PlatformStringFromString(value)))); +} + +void UserDefault::setDataForKey(const char* pKey, const Data& value) { + // check key + if (! pKey) + { + return; + } + + char *encodedData = 0; + base64Encode(value.getBytes(), static_cast(value.getSize()), &encodedData); + + setPlatformKeyValue(pKey, dynamic_cast(PropertyValue::CreateString(PlatformStringFromString(encodedData)))); + + if (encodedData) + free(encodedData); +} + +UserDefault* UserDefault::getInstance() +{ + if (!_userDefault) + { + initXMLFilePath(); + + // only create xml file one time + // the file exists after the program exit + if ((!isXMLFileExist()) && (!createXMLFile())) + { + return nullptr; + } + + _userDefault = new (std::nothrow) UserDefault(); + } + + return _userDefault; +} + +void UserDefault::destroyInstance() +{ + CC_SAFE_DELETE(_userDefault); +} + +void UserDefault::setDelegate(UserDefault *delegate) +{ + if (_userDefault) + delete _userDefault; + + _userDefault = delegate; +} + + +// FIXME:: deprecated +UserDefault* UserDefault::sharedUserDefault() +{ + return UserDefault::getInstance(); +} + +// FIXME:: deprecated +void UserDefault::purgeSharedUserDefault() +{ + return UserDefault::destroyInstance(); +} + +bool UserDefault::isXMLFileExist() +{ + //return FileUtils::getInstance()->isFileExist(_filePath); + return true; +} + +void UserDefault::initXMLFilePath() +{ + if (! _isFilePathInitialized) + { + _filePath += FileUtils::getInstance()->getWritablePath() + XML_FILE_NAME; + _isFilePathInitialized = true; + } +} + +// create new xml file +bool UserDefault::createXMLFile() +{ + return false; +} + +const string& UserDefault::getXMLFilePath() +{ + return _filePath; +} + +void UserDefault::flush() +{ +} + +NS_CC_END + +#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/base/CCUserDefault.h b/cocos/base/CCUserDefault.h index 740fbb127f..5d080cbdb9 100644 --- a/cocos/base/CCUserDefault.h +++ b/cocos/base/CCUserDefault.h @@ -237,7 +237,7 @@ public: * @js NA */ static const std::string& getXMLFilePath(); - /** All supported platforms other iOS & Android use xml file to save values. This function checks whether the xml file exists or not. + /** All supported platforms other iOS & Android and CC_PLATFORM_WINRT use xml file to save values. This function checks whether the xml file exists or not. * @return True if the xml file exists, flase if not. * @js NA */ diff --git a/cocos/base/CMakeLists.txt b/cocos/base/CMakeLists.txt index 9d6cee3a81..ec3884ddeb 100644 --- a/cocos/base/CMakeLists.txt +++ b/cocos/base/CMakeLists.txt @@ -15,6 +15,7 @@ set(COCOS_BASE_SRC base/CCController.cpp base/CCData.cpp base/CCDataVisitor.cpp + base/CCNinePatchImageParser.cpp base/CCDirector.cpp base/CCEvent.cpp base/CCEventAcceleration.cpp diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index aa494ba416..550b9ba7ac 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -254,7 +254,8 @@ THE SOFTWARE. /** Use 3d physics integration API. */ #ifndef CC_USE_3D_PHYSICS -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#define CC_USE_3D_PHYSICS 1 #define CC_USE_3D_PHYSICS 1 #endif #endif diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 0fed03e9df..6a635d859f 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -199,6 +199,9 @@ THE SOFTWARE. #include "platform/android/CCGLViewImpl-android.h" #include "platform/android/CCGL-android.h" #include "platform/android/CCStdC-android.h" +//Enhance modification begin + #include "platform/android/CCEnhanceAPI-android.h" +//Enhance modification end #endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp index 45cf6f836f..f8f7628f7e 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp @@ -183,7 +183,7 @@ ActionTimeline* ActionTimelineCache::loadAnimationActionWithContent(const std::s doc.Parse<0>(content.c_str()); if (doc.HasParseError()) { - CCLOG("GetParseError %s\n", doc.GetParseError()); + CCLOG("GetParseError %d\n", doc.GetParseError()); } const rapidjson::Value& json = DICTOOL->getSubDictionary_json(doc, ACTION); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp index 38cc6dc528..44ad3c0a5a 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp @@ -606,20 +606,20 @@ void InnerActionFrame::onEnter(Frame *nextFrame, int currentFrameIndex) void InnerActionFrame::setStartFrameIndex(int frameIndex) { - CCASSERT(_enterWithName, " cannot setStartFrameIndex when enterWithName is set"); + CCASSERT(!_enterWithName, " cannot setStartFrameIndex when enterWithName is set"); _startFrameIndex = frameIndex; } void InnerActionFrame::setEndFrameIndex(int frameIndex) { - CCASSERT(_enterWithName, " cannot setEndFrameIndex when enterWithName is set"); + CCASSERT(!_enterWithName, " cannot setEndFrameIndex when enterWithName is set"); _endFrameIndex = frameIndex; } void InnerActionFrame::setAnimationName(const std::string& animationName) { - CCASSERT(!_enterWithName, " cannot set aniamtioname when enter frame with index. setEnterWithName true firstly!"); + CCASSERT(_enterWithName, " cannot set aniamtioname when enter frame with index. setEnterWithName true firstly!"); _animationName = animationName; } diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp index bee63a0aea..11b19c115d 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp @@ -376,7 +376,7 @@ Node* CSLoader::loadNodeWithContent(const std::string& content) doc.Parse<0>(content.c_str()); if (doc.HasParseError()) { - CCLOG("GetParseError %s\n", doc.GetParseError()); + CCLOG("GetParseError %d\n", doc.GetParseError()); } // cocos2dx version mono editor is based on @@ -724,7 +724,7 @@ Node* CSLoader::loadWidget(const rapidjson::Value& json) customJsonDict.Parse<0>(customProperty); if (customJsonDict.HasParseError()) { - CCLOG("GetParseError %s\n", customJsonDict.GetParseError()); + CCLOG("GetParseError %d\n", customJsonDict.GetParseError()); } widgetPropertiesReader->setPropsForAllCustomWidgetFromJsonDictionary(classname, widget, customJsonDict); diff --git a/cocos/editor-support/cocostudio/CCComAudio.cpp b/cocos/editor-support/cocostudio/CCComAudio.cpp index f6412ef667..25c334f87a 100644 --- a/cocos/editor-support/cocostudio/CCComAudio.cpp +++ b/cocos/editor-support/cocostudio/CCComAudio.cpp @@ -128,14 +128,6 @@ bool ComAudio::serialize(void* r) } if (strcmp(className, "CCBackgroundAudio") == 0) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - std::string::size_type pos = filePath.find(".mp3"); - if (pos == filePath.npos) - { - continue; - } - filePath.replace(pos, filePath.length(), ".wav"); -#endif preloadBackgroundMusic(filePath.c_str()); setLoop(loop); playBackgroundMusic(filePath.c_str(), loop); diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp index 041d2a2a74..dbeae98145 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp @@ -1247,7 +1247,7 @@ void DataReaderHelper::addDataFromJsonCache(const std::string& fileContent, Data json.ParseStream<0>(stream); if (json.HasParseError()) { - CCLOG("GetParseError %s\n",json.GetParseError()); + CCLOG("GetParseError %d\n",json.GetParseError()); } dataInfo->contentScale = DICTOOL->getFloatValue_json(json, CONTENT_SCALE, 1.0f); diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index e3ee2c5b19..5cda9f553d 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -212,7 +212,7 @@ Widget* GUIReader::widgetFromJsonFile(const char *fileName) jsonDict.Parse<0>(contentStr.c_str()); if (jsonDict.HasParseError()) { - CCLOG("GetParseError %s\n",jsonDict.GetParseError()); + CCLOG("GetParseError %d\n",jsonDict.GetParseError()); } Widget* widget = nullptr; const char* fileVersion = DICTOOL->getStringValue_json(jsonDict, "version"); @@ -1373,7 +1373,7 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* cocoLoader, st customJsonDict.Parse<0>(customProperty); if (customJsonDict.HasParseError()) { - CCLOG("GetParseError %s\n", customJsonDict.GetParseError()); + CCLOG("GetParseError %d\n", customJsonDict.GetParseError()); } setPropsForAllCustomWidgetFromJsonDictionary(classname, widget, customJsonDict); }else{ @@ -1474,7 +1474,7 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va customJsonDict.Parse<0>(customProperty); if (customJsonDict.HasParseError()) { - CCLOG("GetParseError %s\n", customJsonDict.GetParseError()); + CCLOG("GetParseError %d\n", customJsonDict.GetParseError()); } setPropsForAllCustomWidgetFromJsonDictionary(classname, widget, customJsonDict); }else{ diff --git a/cocos/editor-support/cocostudio/DictionaryHelper.cpp b/cocos/editor-support/cocostudio/DictionaryHelper.cpp index 7dad513cb6..44cec2bef0 100644 --- a/cocos/editor-support/cocostudio/DictionaryHelper.cpp +++ b/cocos/editor-support/cocostudio/DictionaryHelper.cpp @@ -72,6 +72,7 @@ int DictionaryHelper::getIntValue_json(const rapidjson::Value& root, const char* int nRet = def; do { CC_BREAK_IF(root.IsNull()); + CC_BREAK_IF(!root.HasMember(key)); CC_BREAK_IF(root[key].IsNull()); nRet = root[key].GetInt(); } while (0); @@ -85,6 +86,7 @@ float DictionaryHelper::getFloatValue_json(const rapidjson::Value& root,const ch float fRet = def; do { CC_BREAK_IF(root.IsNull()); + CC_BREAK_IF(!root.HasMember(key)); CC_BREAK_IF(root[key].IsNull()); fRet = (float)root[key].GetDouble(); } while (0); @@ -97,6 +99,7 @@ bool DictionaryHelper::getBooleanValue_json(const rapidjson::Value& root,const c bool bRet = def; do { CC_BREAK_IF(root.IsNull()); + CC_BREAK_IF(!root.HasMember(key)); CC_BREAK_IF(root[key].IsNull()); bRet = root[key].GetBool(); } while (0); @@ -109,6 +112,7 @@ const char* DictionaryHelper::getStringValue_json(const rapidjson::Value& root,c const char* sRet = def; do { CC_BREAK_IF(root.IsNull()); + CC_BREAK_IF(!root.HasMember(key)); CC_BREAK_IF(root[key].IsNull()); sRet = root[key].GetString(); } while (0); @@ -123,6 +127,7 @@ int DictionaryHelper::getArrayCount_json(const rapidjson::Value& root, const cha int nRet = def; do { CC_BREAK_IF(root.IsNull()); + CC_BREAK_IF(!root.HasMember(key)); CC_BREAK_IF(root[key].IsNull()); nRet = (int)(root[key].Size()); } while (0); @@ -136,6 +141,7 @@ int DictionaryHelper::getIntValueFromArray_json(const rapidjson::Value& root,con int nRet = def; do { CC_BREAK_IF(root.IsNull()); + CC_BREAK_IF(!root.HasMember(arrayKey)); CC_BREAK_IF(root[arrayKey].IsNull()); CC_BREAK_IF(root[arrayKey][idx].IsNull()); nRet = root[arrayKey][idx].GetInt(); diff --git a/cocos/editor-support/cocostudio/TriggerMng.cpp b/cocos/editor-support/cocostudio/TriggerMng.cpp index deeeabbec6..4fcd142ead 100755 --- a/cocos/editor-support/cocostudio/TriggerMng.cpp +++ b/cocos/editor-support/cocostudio/TriggerMng.cpp @@ -236,7 +236,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader { if (str2 != nullptr) { - action.AddMember("classname", str2, allocator); + action.AddMember("classname", rapidjson::Value(str2,allocator), allocator); } } else if (key2.compare("dataitems") == 0) @@ -257,7 +257,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader { if (str3 != nullptr) { - dataitem.AddMember("key", str3, allocator); + dataitem.AddMember("key", rapidjson::Value(str3,allocator), allocator); } } else @@ -265,7 +265,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader rapidjson::Type type = pDataItemArray[i5].GetType(pCocoLoader); if (type == rapidjson::kStringType) { - dataitem.AddMember("value", str3, allocator); + dataitem.AddMember("value", rapidjson::Value(str3,allocator), allocator); } else { @@ -312,7 +312,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader { if (str4 != nullptr) { - cond.AddMember("classname", str4, allocator); + cond.AddMember("classname", rapidjson::Value(str4,allocator), allocator); } } else if (key4.compare("dataitems") == 0) @@ -333,7 +333,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader { if (str5 != nullptr) { - dataitem.AddMember("key", str5, allocator); + dataitem.AddMember("key", rapidjson::Value(str5,allocator), allocator); } } else @@ -341,7 +341,7 @@ void TriggerMng::buildJson(rapidjson::Document &document, cocostudio::CocoLoader rapidjson::Type type = pDataItemArray[i9].GetType(pCocoLoader); if (type == rapidjson::kStringType) { - dataitem.AddMember("value", str5, allocator); + dataitem.AddMember("value", rapidjson::Value(str5,allocator), allocator); } else { diff --git a/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp index 957293280a..27ff13c4cf 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ArmatureNodeReader/ArmatureNodeReader.cpp @@ -154,12 +154,12 @@ void ArmatureNodeReader::setPropsWithFlatBuffers(cocos2d::Node *node, fileExist = false; } - if (!fileExist) - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", filepath.c_str())->getCString()); - custom->addChild(label); - } + //if (!fileExist) + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", filepath.c_str())->getCString()); + // custom->addChild(label); + //} } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp index 69ac8528ef..b1938bf081 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp @@ -706,12 +706,12 @@ namespace cocostudio { button->loadTextureNormal(normalTexturePath, (Widget::TextureResType)normalType); } - else if (!normalTexturePath.empty()) - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", normalErrorFilePath.c_str())->getCString()); - button->addChild(label); - } + //else if (!normalTexturePath.empty()) + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", normalErrorFilePath.c_str())->getCString()); + // button->addChild(label); + //} bool pressedFileExist = false; std::string pressedErrorFilePath = ""; @@ -770,12 +770,12 @@ namespace cocostudio { button->loadTexturePressed(pressedTexturePath, (Widget::TextureResType)pressedType); } - else if (!pressedTexturePath.empty()) - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", pressedErrorFilePath.c_str())->getCString()); - button->addChild(label); - } + //else if (!pressedTexturePath.empty()) + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", pressedErrorFilePath.c_str())->getCString()); + // button->addChild(label); + //} bool disabledFileExist = false; std::string disabledErrorFilePath = ""; @@ -834,12 +834,12 @@ namespace cocostudio { button->loadTextureDisabled(disabledTexturePath, (Widget::TextureResType)disabledType); } - else if (!disabledTexturePath.empty()) - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", disabledErrorFilePath.c_str())->getCString()); - button->addChild(label); - } + //else if (!disabledTexturePath.empty()) + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", disabledErrorFilePath.c_str())->getCString()); + // button->addChild(label); + //} std::string titleText = options->text()->c_str(); button->setTitleText(titleText); @@ -873,12 +873,12 @@ namespace cocostudio { button->setTitleFontName(path); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - button->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // button->addChild(label); + //} } bool displaystate = options->displaystate() != 0; diff --git a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp index 09148b143d..0bead625f0 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp @@ -491,12 +491,12 @@ namespace cocostudio { checkBox->loadTextureBackGround(backGroundTexturePath, (Widget::TextureResType)backGroundType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", backGroundErrorFilePath.c_str())->getCString()); - checkBox->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", backGroundErrorFilePath.c_str())->getCString()); + // checkBox->addChild(label); + //} //load background selected image bool backGroundSelectedfileExist = false; @@ -556,12 +556,12 @@ namespace cocostudio { checkBox->loadTextureBackGroundSelected(backGroundSelectedTexturePath, (Widget::TextureResType)backGroundSelectedType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", backGroundSelectedErrorFilePath.c_str())->getCString()); - checkBox->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", backGroundSelectedErrorFilePath.c_str())->getCString()); + // checkBox->addChild(label); + //} //load frontCross image bool frontCrossFileExist = false; @@ -621,12 +621,12 @@ namespace cocostudio { checkBox->loadTextureFrontCross(frontCrossFileName, (Widget::TextureResType)frontCrossType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", frontCrossErrorFilePath.c_str())->getCString()); - checkBox->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", frontCrossErrorFilePath.c_str())->getCString()); + // checkBox->addChild(label); + //} //load backGroundBoxDisabledData bool backGroundBoxDisabledFileExist = false; @@ -686,12 +686,12 @@ namespace cocostudio { checkBox->loadTextureBackGroundDisabled(backGroundDisabledFileName, (Widget::TextureResType)backGroundDisabledType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", backGroundBoxDisabledErrorFilePath.c_str())->getCString()); - checkBox->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", backGroundBoxDisabledErrorFilePath.c_str())->getCString()); + // checkBox->addChild(label); + //} ///load frontCrossDisabledData bool frontCrossDisabledFileExist = false; @@ -751,12 +751,12 @@ namespace cocostudio { checkBox->loadTextureFrontCrossDisabled(frontCrossDisabledFileName, (Widget::TextureResType)frontCrossDisabledType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", frontCrossDisabledErrorFilePath.c_str())->getCString()); - checkBox->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", frontCrossDisabledErrorFilePath.c_str())->getCString()); + // checkBox->addChild(label); + //} bool selectedstate = options->selectedState() != 0; checkBox->setSelected(selectedstate); diff --git a/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp index 10d7e0d938..903bba1811 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/GameMapReader/GameMapReader.cpp @@ -238,15 +238,15 @@ namespace cocostudio setPropsWithFlatBuffers(tmx, (Table*)gameMapOptions); } } - else - { - Node* node = Node::create(); - setPropsWithFlatBuffers(node, (Table*)gameMapOptions); - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - node->addChild(label); - return node; - } + //else + //{ + // Node* node = Node::create(); + // setPropsWithFlatBuffers(node, (Table*)gameMapOptions); + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // node->addChild(label); + // return node; + //} return tmx; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp index f72f9802ec..d387a54bd1 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp @@ -353,12 +353,12 @@ namespace cocostudio { imageView->loadTexture(imageFileName, (Widget::TextureResType)imageFileNameType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - imageView->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // imageView->addChild(label); + //} bool scale9Enabled = options->scale9Enabled() != 0; imageView->setScale9Enabled(scale9Enabled); diff --git a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp index 25b1708182..2c97f8f8e7 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp @@ -190,12 +190,21 @@ namespace cocostudio /* adapt screen gui */ float w = 0, h = 0; - bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen); - if (adaptScrenn) + bool adaptScrennExsit = DICTOOL->checkObjectExist_json(options, P_AdaptScreen); + if (adaptScrennExsit) { - Size screenSize = CCDirector::getInstance()->getWinSize(); - w = screenSize.width; - h = screenSize.height; + bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen); + if (adaptScrenn) + { + Size screenSize = Director::getInstance()->getWinSize(); + w = screenSize.width; + h = screenSize.height; + } + else + { + w = DICTOOL->getFloatValue_json(options, P_Width); + h = DICTOOL->getFloatValue_json(options, P_Height); + } } else { @@ -300,7 +309,11 @@ namespace cocostudio panel->setBackGroundImageCapInsets(Rect(cx, cy, cw, ch)); } - panel->setLayoutType((Layout::Type)DICTOOL->getIntValue_json(options, P_LayoutType)); + bool layoutTypeExsit = DICTOOL->checkObjectExist_json(options, P_LayoutType); + if (layoutTypeExsit) + { + panel->setLayoutType((Layout::Type)DICTOOL->getIntValue_json(options, P_LayoutType)); + } int bgimgcr = DICTOOL->getIntValue_json(options, P_ColorR,255); int bgimgcg = DICTOOL->getIntValue_json(options, P_ColorG,255); @@ -662,12 +675,12 @@ namespace cocostudio { panel->setBackGroundImage(imageFileName, (Widget::TextureResType)imageFileNameType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - panel->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // panel->addChild(label); + //} } auto widgetOptions = options->widgetOptions(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp index 6856a4432d..08eb06a3a5 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp @@ -490,12 +490,12 @@ namespace cocostudio { listView->setBackGroundImage(imageFileName, (Widget::TextureResType)imageFileNameType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - listView->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // listView->addChild(label); + //} } auto widgetOptions = options->widgetOptions(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp index accff552ec..4e570fa655 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp @@ -303,12 +303,12 @@ namespace cocostudio { loadingBar->loadTexture(imageFileName, (Widget::TextureResType)imageFileNameType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - loadingBar->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // loadingBar->addChild(label); + //} int direction = options->direction(); loadingBar->setDirection(LoadingBar::Direction(direction)); diff --git a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp index 0fde47f3be..376d69ef53 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp @@ -403,12 +403,12 @@ namespace cocostudio { pageView->setBackGroundImage(imageFileName, (Widget::TextureResType)imageFileNameType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - pageView->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // pageView->addChild(label); + //} } auto widgetOptions = options->widgetOptions(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp index beae5bc194..51f4f79e25 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ParticleReader/ParticleReader.cpp @@ -208,15 +208,15 @@ namespace cocostudio particle->setPositionType(ParticleSystem::PositionType::GROUPED); } } - else - { - Node* node = Node::create(); - setPropsWithFlatBuffers(node, (Table*)particleOptions); - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - node->addChild(label); - return node; - } + //else + //{ + // Node* node = Node::create(); + // setPropsWithFlatBuffers(node, (Table*)particleOptions); + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // node->addChild(label); + // return node; + //} return particle; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp index 12e8a839f3..14914cd199 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp @@ -489,12 +489,12 @@ namespace cocostudio { scrollView->setBackGroundImage(imageFileName, (Widget::TextureResType)imageFileNameType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - scrollView->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // scrollView->addChild(label); + //} } auto widgetOptions = options->widgetOptions(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp index 1a40f4825b..4ca33378ce 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp @@ -525,12 +525,12 @@ namespace cocostudio { slider->loadBarTexture(imageFileName, (Widget::TextureResType)imageFileNameType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", imageErrorFilePath.c_str())->getCString()); - slider->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", imageErrorFilePath.c_str())->getCString()); + // slider->addChild(label); + //} //loading normal slider ball texture bool normalFileExist = false; @@ -590,12 +590,12 @@ namespace cocostudio { slider->loadSlidBallTextureNormal(normalFileName, (Widget::TextureResType)normalType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", normalErrorFilePath.c_str())->getCString()); - slider->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", normalErrorFilePath.c_str())->getCString()); + // slider->addChild(label); + //} //loading slider ball press texture bool pressedFileExist = false; @@ -655,12 +655,12 @@ namespace cocostudio { slider->loadSlidBallTexturePressed(pressedFileName, (Widget::TextureResType)pressedType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", pressedErrorFilePath.c_str())->getCString()); - slider->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", pressedErrorFilePath.c_str())->getCString()); + // slider->addChild(label); + //} //loading silder ball disable texture bool disabledFileExist = false; @@ -720,12 +720,12 @@ namespace cocostudio { slider->loadSlidBallTextureDisabled(disabledFileName, (Widget::TextureResType)disabledType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", disabledErrorFilePath.c_str())->getCString()); - slider->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", disabledErrorFilePath.c_str())->getCString()); + // slider->addChild(label); + //} //load slider progress texture bool progressFileExist = false; @@ -785,12 +785,12 @@ namespace cocostudio { slider->loadProgressBarTexture(progressBarFileName, (Widget::TextureResType)progressBarType); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", progressErrorFilePath.c_str())->getCString()); - slider->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", progressErrorFilePath.c_str())->getCString()); + // slider->addChild(label); + //} bool displaystate = options->displaystate() != 0; slider->setBright(displaystate); diff --git a/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp index de217b8bb3..830a6a0d9f 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/SpriteReader/SpriteReader.cpp @@ -226,12 +226,12 @@ namespace cocostudio default: break; } - if (!fileExist) - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - sprite->addChild(label); - } + //if (!fileExist) + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // sprite->addChild(label); + //} auto f_blendFunc = options->blendFunc(); if (f_blendFunc) diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp index 6180d8fdda..93777b50e2 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp @@ -275,12 +275,12 @@ namespace cocostudio fileExist = false; } - if (!fileExist) - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - labelAtlas->addChild(label); - } + //if (!fileExist) + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // labelAtlas->addChild(label); + //} break; } diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp index 8ab76248ab..d457f0a88c 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp @@ -218,11 +218,11 @@ namespace cocostudio fileExist = false; } } - else - { - errorContent = "missed"; - fileExist = false; - } + //else + //{ + // errorContent = "missed"; + // fileExist = false; + //} break; } @@ -235,10 +235,13 @@ namespace cocostudio } else { - errorFilePath = path; - auto label = Label::create(); - label->setString(__String::createWithFormat("%s %s", errorFilePath.c_str(), errorContent.c_str())->getCString()); - labelBMFont->addChild(label); + if (!errorContent.empty()) + { + errorFilePath = path; + auto label = Label::create(); + label->setString(__String::createWithFormat("%s %s", errorFilePath.c_str(), errorContent.c_str())->getCString()); + labelBMFont->addChild(label); + } } std::string text = options->text()->c_str(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp index 6b808ebf82..81f2434a58 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp @@ -332,12 +332,12 @@ namespace cocostudio { textField->setFontName(path); } - else - { - auto label = Label::create(); - label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - textField->addChild(label); - } + //else + //{ + // auto label = Label::create(); + // label->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // textField->addChild(label); + //} } auto widgetReader = WidgetReader::getInstance(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp index f9d216bbf8..d53bfa4442 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp @@ -440,12 +440,12 @@ namespace cocostudio { label->setFontName(path); } - else - { - auto alert = Label::create(); - alert->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); - label->addChild(alert); - } + //else + //{ + // auto alert = Label::create(); + // alert->setString(__String::createWithFormat("%s missed", errorFilePath.c_str())->getCString()); + // label->addChild(alert); + //} } bool outlineEnabled = options->outlineEnabled(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp index 9b528021e4..612f417fec 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp @@ -160,12 +160,22 @@ namespace cocostudio /* adapt screen */ float w = 0, h = 0; - bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen); - if (adaptScrenn) + bool adaptScrennExsit = DICTOOL->checkObjectExist_json(options, P_AdaptScreen); + if (adaptScrennExsit) { - Size screenSize = CCDirector::getInstance()->getWinSize(); - w = screenSize.width; - h = screenSize.height; + bool adaptScrenn = DICTOOL->getBooleanValue_json(options, P_AdaptScreen); + if (adaptScrenn) + { + Size screenSize = Director::getInstance()->getWinSize(); + w = screenSize.width; + h = screenSize.height; + } + else + { + w = DICTOOL->getFloatValue_json(options, P_Width); + h = DICTOOL->getFloatValue_json(options, P_Height); + } + } else { diff --git a/cocos/editor-support/spine/proj.win10/libSpine.vcxproj b/cocos/editor-support/spine/proj.win10/libSpine.vcxproj new file mode 100644 index 0000000000..0cc0b2ecf4 --- /dev/null +++ b/cocos/editor-support/spine/proj.win10/libSpine.vcxproj @@ -0,0 +1,489 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + StaticLibrary + libSpine + libSpine + en-US + 14.0 + true + Windows Store + 8.2 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + + NotUsing + true + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + ProgramDatabase + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + false + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + ProgramDatabase + + + Console + false + false + + + false + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + false + /IGNORE:4264 %(AdditionalOptions) + + + + + + \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj index 933727d8ac..dce8fd1174 100644 --- a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.Windows/libSpine.Windows.vcxproj @@ -128,6 +128,7 @@ false WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -145,6 +146,7 @@ false WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -162,6 +164,7 @@ false WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -179,6 +182,7 @@ false WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -196,6 +200,7 @@ false WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -213,6 +218,7 @@ false WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\winrt_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console diff --git a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj index c5052f8f5c..f9a8f45178 100644 --- a/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj +++ b/cocos/editor-support/spine/proj.win8.1-universal/libSpine.WindowsPhone/libSpine.WindowsPhone.vcxproj @@ -93,6 +93,7 @@ false WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -110,6 +111,7 @@ false WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -127,6 +129,7 @@ false WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console @@ -144,6 +147,7 @@ false WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) $(EngineRoot)external\wp_8.1-specific\angle\include;%(AdditionalIncludeDirectories) + 4996;%(DisableSpecificWarnings) Console diff --git a/cocos/network/HttpClient-android.cpp b/cocos/network/HttpClient-android.cpp index 421c2b35a9..0eeec87b5a 100644 --- a/cocos/network/HttpClient-android.cpp +++ b/cocos/network/HttpClient-android.cpp @@ -26,17 +26,12 @@ #include "HttpClient.h" -#include #include #include -#include #include #include -#include "base/CCVector.h" #include "base/CCDirector.h" -#include "base/CCScheduler.h" - #include "platform/CCFileUtils.h" #include "platform/android/jni/JniHelper.h" @@ -49,24 +44,7 @@ typedef HttpRequestHeaders::iterator HttpRequestHeadersIter; typedef std::vector HttpCookies; typedef HttpCookies::iterator HttpCookiesIter; -static std::mutex s_requestQueueMutex; -static std::mutex s_responseQueueMutex; -static std::mutex s_cookieFileMutex; - -static std::condition_variable_any s_sleepCondition; - -static Vector* s_requestQueue = nullptr; -static Vector* s_responseQueue = nullptr; - -static HttpClient *s_httpClient = nullptr; // pointer to singleton - -static std::string s_responseMessage = ""; - -static std::string s_cookieFilename = ""; - -static std::string s_sslCaFilename = ""; - -static HttpRequest *s_requestSentinel = new HttpRequest; +static HttpClient* _httpClient = nullptr; // pointer to singleton struct CookiesInfo @@ -98,16 +76,16 @@ size_t writeHeaderData(void* buffer, size_t sizes,HttpResponse* response) return sizes; } -static void processResponse(HttpResponse* response, std::string& responseMessage); - class HttpURLConnection { public: - HttpURLConnection():_httpURLConnection(nullptr), - _requestmethod(""), - _responseCookies(""), - _cookieFileName(""), - _contentLength(0) + HttpURLConnection(HttpClient* httpClient) + :_httpURLConnection(nullptr) + ,_client(httpClient) + ,_requestmethod("") + ,_responseCookies("") + ,_cookieFileName("") + ,_contentLength(0) { } @@ -120,7 +98,7 @@ public: void setRequestMethod(const char* method) { _requestmethod = method; - + JniMethodInfo methodInfo; if (JniHelper::getStaticMethodInfo(methodInfo, "org/cocos2dx/lib/Cocos2dxHttpURLConnection", @@ -139,7 +117,9 @@ public: { createHttpURLConnection(request->getUrl()); if(!configure()) + { return false; + } /* get custom header data (if set) */ HttpRequestHeaders headers=request->getHeaders(); if(!headers.empty()) @@ -259,15 +239,15 @@ public: size_t saveResponseCookies(const char* responseCookies, size_t count) { if (nullptr == responseCookies || strlen(responseCookies) == 0 || count == 0) + { return 0; + } if (_cookieFileName.empty()) { _cookieFileName = FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"; } - std::lock_guard lock(s_cookieFileMutex); - FILE* fp = fopen(_cookieFileName.c_str(), "w"); if (nullptr == fp) { @@ -307,7 +287,9 @@ public: char* getResponseContent(HttpResponse* response) { if (nullptr == response) + { return nullptr; + } char* content = nullptr; JniMethodInfo methodInfo; @@ -447,14 +429,14 @@ private: void addCookiesForRequestHeader() { - if(s_cookieFilename.empty()) + if(_client->getCookieFilename().empty()) + { return; + } - _cookieFileName = FileUtils::getInstance()->fullPathForFilename(s_cookieFilename.c_str()); + _cookieFileName = FileUtils::getInstance()->fullPathForFilename(_client->getCookieFilename()); - std::lock_guard lock(s_cookieFileMutex); - - std::string cookiesInfo = FileUtils::getInstance()->getStringFromFile(_cookieFileName.c_str()); + std::string cookiesInfo = FileUtils::getInstance()->getStringFromFile(_cookieFileName); if (cookiesInfo.empty()) return; @@ -550,10 +532,10 @@ private: void setVerifySSL() { - if(s_sslCaFilename.empty()) + if(_client->getSSLVerification().empty()) return; - std::string fullpath = FileUtils::getInstance()->fullPathForFilename(s_sslCaFilename.c_str()); + std::string fullpath = FileUtils::getInstance()->fullPathForFilename(_client->getSSLVerification()); JniMethodInfo methodInfo; if (JniHelper::getStaticMethodInfo(methodInfo, @@ -572,13 +554,16 @@ private: bool configure() { if(nullptr == _httpURLConnection) + { return false; + } - HttpClient* instnace = HttpClient::getInstance(); - if(nullptr == instnace) + if(nullptr == _client) + { return false; + } - setReadAndConnectTimeout(instnace->getTimeoutForRead() * 1000, instnace->getTimeoutForConnect() * 1000); + setReadAndConnectTimeout(_client->getTimeoutForRead() * 1000, _client->getTimeoutForConnect() * 1000); setVerifySSL(); @@ -587,7 +572,7 @@ private: char* getBufferFromJString(jstring jstr, JNIEnv* env) { - if (nullptr == jstr) + if (nullptr == jstr) { return nullptr; } @@ -595,7 +580,7 @@ private: const char* str = nullptr; char* ret = nullptr; str = env->GetStringUTFChars(jstr, nullptr); - if (nullptr != str) + if (nullptr != str) { ret = strdup(str); } @@ -605,9 +590,9 @@ private: return ret; } - int getCStrFromJByteArray(jbyteArray jba, JNIEnv* env, char** ppData) + int getCStrFromJByteArray(jbyteArray jba, JNIEnv* env, char** ppData) { - if (nullptr == jba) + if (nullptr == jba) { *ppData = nullptr; return 0; @@ -628,6 +613,7 @@ private: return _responseCookies; } private: + HttpClient* _client; jobject _httpURLConnection; std::string _requestmethod; std::string _responseCookies; @@ -637,13 +623,13 @@ private: }; // Process Response -static void processResponse(HttpResponse* response, std::string& responseMessage) +void HttpClient::processResponse(HttpResponse* response, char* responseMessage) { auto request = response->getHttpRequest(); HttpRequest::Type requestType = request->getRequestType(); - if (HttpRequest::Type::GET != requestType && - HttpRequest::Type::POST != requestType && + if (HttpRequest::Type::GET != requestType && + HttpRequest::Type::POST != requestType && HttpRequest::Type::PUT != requestType && HttpRequest::Type::DELETE != requestType) { @@ -654,7 +640,7 @@ static void processResponse(HttpResponse* response, std::string& responseMessage long responseCode = -1; int retValue = 0; - HttpURLConnection urlConnection; + HttpURLConnection urlConnection(this); if(!urlConnection.init(request)) { response->setSucceed(false); @@ -718,24 +704,24 @@ static void processResponse(HttpResponse* response, std::string& responseMessage //content len int contentLength = urlConnection.getResponseHeaderByKeyInt("Content-Length"); char* contentInfo = urlConnection.getResponseContent(response); - if (nullptr != contentInfo) { -// response->setResponseDataString(contentInfo, contentLength); + if (nullptr != contentInfo) + { std::vector * recvBuffer = (std::vector*)response->getResponseData(); recvBuffer->clear(); recvBuffer->insert(recvBuffer->begin(), (char*)contentInfo, ((char*)contentInfo) + urlConnection.getContentLength()); } free(contentInfo); - responseMessage = urlConnection.getResponseMessage(); + strcpy(responseMessage, urlConnection.getResponseMessage()); urlConnection.disconnect(); // write data to HttpResponse response->setResponseCode(responseCode); - if (responseCode == -1) + if (responseCode == -1) { response->setSucceed(false); - response->setErrorBuffer(responseMessage.c_str()); + response->setErrorBuffer(responseMessage); } else { @@ -746,174 +732,209 @@ static void processResponse(HttpResponse* response, std::string& responseMessage // Worker thread void HttpClient::networkThread() { - auto scheduler = Director::getInstance()->getScheduler(); - + increaseThreadCount(); + while (true) { HttpRequest *request; // step 1: send http request if the requestQueue isn't empty { - std::lock_guard lock(s_requestQueueMutex); - while (s_requestQueue->empty()) { - s_sleepCondition.wait(s_requestQueueMutex); + std::lock_guard lock(_requestQueueMutex); + while (_requestQueue.empty()) { + _sleepCondition.wait(_requestQueueMutex); } - request = s_requestQueue->at(0); - s_requestQueue->erase(0); + request = _requestQueue.at(0); + _requestQueue.erase(0); } - if (request == s_requestSentinel) { + if (request == _requestSentinel) { break; } // Create a HttpResponse object, the default setting is http access failed HttpResponse *response = new (std::nothrow) HttpResponse(request); - processResponse(response, s_responseMessage); + processResponse(response, _responseMessage); // add response packet into queue - s_responseQueueMutex.lock(); - s_responseQueue->pushBack(response); - s_responseQueueMutex.unlock(); + _responseQueueMutex.lock(); + _responseQueue.pushBack(response); + _responseQueueMutex.unlock(); - if (nullptr != s_httpClient) { - scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); + _schedulerMutex.lock(); + if (nullptr != _scheduler) + { + _scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); } + _schedulerMutex.unlock(); } // cleanup: if worker thread received quit signal, clean up un-completed request queue - s_requestQueueMutex.lock(); - s_requestQueue->clear(); - s_requestQueueMutex.unlock(); - - - if (s_requestQueue != nullptr) { - delete s_requestQueue; - s_requestQueue = nullptr; - delete s_responseQueue; - s_responseQueue = nullptr; - } + _requestQueueMutex.lock(); + _requestQueue.clear(); + _requestQueueMutex.unlock(); + _responseQueueMutex.lock(); + _responseQueue.clear(); + _responseQueueMutex.unlock(); + + decreaseThreadCountAndMayDeleteThis(); } // Worker thread void HttpClient::networkThreadAlone(HttpRequest* request, HttpResponse* response) { - std::string responseMessage = ""; + increaseThreadCount(); + + char responseMessage[RESPONSE_BUFFER_SIZE] = { 0 }; processResponse(response, responseMessage); - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->performFunctionInCocosThread([response, request]{ - const ccHttpRequestCallback& callback = request->getCallback(); - Ref* pTarget = request->getTarget(); - SEL_HttpResponse pSelector = request->getSelector(); + _schedulerMutex.lock(); + if (_scheduler != nullptr) + { + _scheduler->performFunctionInCocosThread([this, response, request]{ + const ccHttpRequestCallback& callback = request->getCallback(); + Ref* pTarget = request->getTarget(); + SEL_HttpResponse pSelector = request->getSelector(); - if (callback != nullptr) - { - callback(s_httpClient, response); - } - else if (pTarget && pSelector) - { - (pTarget->*pSelector)(s_httpClient, response); - } - response->release(); - // do not release in other thread - request->release(); - }); + if (callback != nullptr) + { + callback(this, response); + } + else if (pTarget && pSelector) + { + (pTarget->*pSelector)(this, response); + } + response->release(); + // do not release in other thread + request->release(); + }); + } + _schedulerMutex.unlock(); + decreaseThreadCountAndMayDeleteThis(); } // HttpClient implementation HttpClient* HttpClient::getInstance() { - if (s_httpClient == nullptr) { - s_httpClient = new (std::nothrow) HttpClient(); + if (_httpClient == nullptr) + { + _httpClient = new (std::nothrow) HttpClient(); } - return s_httpClient; + return _httpClient; } void HttpClient::destroyInstance() { - CC_SAFE_DELETE(s_httpClient); + if (_httpClient == nullptr) + { + CCLOG("HttpClient singleton is nullptr"); + return; + } + + CCLOG("HttpClient::destroyInstance ..."); + + auto thiz = _httpClient; + _httpClient = nullptr; + + thiz->_scheduler->unscheduleAllForTarget(thiz); + + thiz->_schedulerMutex.lock(); + thiz->_scheduler = nullptr; + thiz->_schedulerMutex.unlock(); + + { + std::lock_guard lock(thiz->_requestQueueMutex); + thiz->_requestQueue.pushBack(thiz->_requestSentinel); + } + thiz->_sleepCondition.notify_one(); + + thiz->decreaseThreadCountAndMayDeleteThis(); + CCLOG("HttpClient::destroyInstance() finished!"); } -void HttpClient::enableCookies(const char* cookieFile) { - if (cookieFile) { - s_cookieFilename = std::string(cookieFile); +void HttpClient::enableCookies(const char* cookieFile) +{ + std::lock_guard lock(_cookieFileMutex); + if (cookieFile) + { + _cookieFilename = std::string(cookieFile); } - else { - s_cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); + else + { + _cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); } } void HttpClient::setSSLVerification(const std::string& caFile) { - s_sslCaFilename = caFile; + std::lock_guard lock(_sslCaFileMutex); + _sslCaFilename = caFile; } HttpClient::HttpClient() : _timeoutForConnect(30) , _timeoutForRead(60) +, _isInited(false) +, _threadCount(0) +, _requestSentinel(new HttpRequest()) +, _cookie(nullptr) { + CCLOG("In the constructor of HttpClient!"); + increaseThreadCount(); + _scheduler = Director::getInstance()->getScheduler(); } HttpClient::~HttpClient() { - if (s_requestQueue != nullptr) { - { - std::lock_guard lock(s_requestQueueMutex); - s_requestQueue->pushBack(s_requestSentinel); - } - s_sleepCondition.notify_one(); - } - - s_httpClient = nullptr; + CCLOG("In the destructor of HttpClient!"); + CC_SAFE_DELETE(_requestSentinel); } //Lazy create semaphore & mutex & thread bool HttpClient::lazyInitThreadSemphore() { - if (s_requestQueue != nullptr) { + if (_isInited) + { return true; - } else { - - s_requestQueue = new (std::nothrow) Vector(); - s_responseQueue = new (std::nothrow) Vector(); - + } + else + { auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this)); t.detach(); + _isInited = true; } - + return true; } //Add a get task to queue void HttpClient::send(HttpRequest* request) { - if (false == lazyInitThreadSemphore()) + if (!lazyInitThreadSemphore()) { return; } - if (!request) + if (nullptr == request) { return; } request->retain(); - if (nullptr != s_requestQueue) { - s_requestQueueMutex.lock(); - s_requestQueue->pushBack(request); - s_requestQueueMutex.unlock(); - - // Notify thread start to work - s_sleepCondition.notify_one(); - } + _requestQueueMutex.lock(); + _requestQueue.pushBack(request); + _requestQueueMutex.unlock(); + + // Notify thread start to work + _sleepCondition.notify_one(); } void HttpClient::sendImmediate(HttpRequest* request) { - if(!request) + if(nullptr == request) { return; } @@ -931,20 +952,17 @@ void HttpClient::dispatchResponseCallbacks() { // log("CCHttpClient::dispatchResponseCallbacks is running"); //occurs when cocos thread fires but the network thread has already quited - if (nullptr == s_responseQueue) { - return; - } HttpResponse* response = nullptr; - s_responseQueueMutex.lock(); + _responseQueueMutex.lock(); - if (!s_responseQueue->empty()) + if (!_responseQueue.empty()) { - response = s_responseQueue->at(0); - s_responseQueue->erase(0); + response = _responseQueue.at(0); + _responseQueue.erase(0); } - - s_responseQueueMutex.unlock(); + + _responseQueueMutex.unlock(); if (response) { @@ -968,6 +986,66 @@ void HttpClient::dispatchResponseCallbacks() } } +void HttpClient::increaseThreadCount() +{ + _threadCountMutex.lock(); + ++_threadCount; + _threadCountMutex.unlock(); +} + +void HttpClient::decreaseThreadCountAndMayDeleteThis() +{ + bool needDeleteThis = false; + _threadCountMutex.lock(); + --_threadCount; + if (0 == _threadCount) + { + needDeleteThis = true; + } + + _threadCountMutex.unlock(); + if (needDeleteThis) + { + delete this; + } +} + +void HttpClient::setTimeoutForConnect(int value) +{ + std::lock_guard lock(_timeoutForConnectMutex); + _timeoutForConnect = value; +} + +int HttpClient::getTimeoutForConnect() +{ + std::lock_guard lock(_timeoutForConnectMutex); + return _timeoutForConnect; +} + +void HttpClient::setTimeoutForRead(int value) +{ + std::lock_guard lock(_timeoutForReadMutex); + _timeoutForRead = value; +} + +int HttpClient::getTimeoutForRead() +{ + std::lock_guard lock(_timeoutForReadMutex); + return _timeoutForRead; +} + +const std::string& HttpClient::getCookieFilename() +{ + std::lock_guard lock(_cookieFileMutex); + return _cookieFilename; +} + +const std::string& HttpClient::getSSLVerification() +{ + std::lock_guard lock(_sslCaFileMutex); + return _sslCaFilename; +} + } NS_CC_END diff --git a/cocos/network/HttpClient-apple.mm b/cocos/network/HttpClient-apple.mm index 34c9f64d0e..0e144acb5c 100644 --- a/cocos/network/HttpClient-apple.mm +++ b/cocos/network/HttpClient-apple.mm @@ -26,56 +26,26 @@ #include "HttpClient.h" -#include #include -#include - #include -#import "HttpAsynConnection.h" -#include "HttpCookie.h" - -#include "base/CCVector.h" +#import "network/HttpAsynConnection.h" +#include "network/HttpCookie.h" #include "base/CCDirector.h" -#include "base/CCScheduler.h" - #include "platform/CCFileUtils.h" NS_CC_BEGIN namespace network { - -static std::mutex s_requestQueueMutex; -static std::mutex s_responseQueueMutex; - -static std::condition_variable_any s_SleepCondition; - -static Vector* s_requestQueue = nullptr; -static Vector* s_responseQueue = nullptr; - -static HttpClient *s_HttpClient = nullptr; // pointer to singleton -static HttpCookie *s_cookie = nullptr; - -static const int ERROR_SIZE = 256; +static HttpClient *_httpClient = nullptr; // pointer to singleton -static char s_errorBuffer[ERROR_SIZE] = {0}; - -static std::string s_cookieFilename = ""; - -static std::string s_sslCaFilename = ""; - - -static int processTask(HttpRequest *request, NSString *requestType, void *stream, long *errorCode, void *headerStream, char *errorBuffer); - -static void processResponse(HttpResponse* response, char* errorBuffer); - -static HttpRequest *s_requestSentinel = new HttpRequest; +static int processTask(HttpClient* client, HttpRequest *request, NSString *requestType, void *stream, long *errorCode, void *headerStream, char *errorBuffer); // Worker thread void HttpClient::networkThread() -{ - auto scheduler = Director::getInstance()->getScheduler(); +{ + increaseThreadCount(); while (true) @autoreleasepool { @@ -83,77 +53,90 @@ void HttpClient::networkThread() // step 1: send http request if the requestQueue isn't empty { - std::lock_guard lock(s_requestQueueMutex); - while (s_requestQueue->empty()) { - s_SleepCondition.wait(s_requestQueueMutex); + std::lock_guard lock(_requestQueueMutex); + while (_requestQueue.empty()) { + _sleepCondition.wait(_requestQueueMutex); } - request = s_requestQueue->at(0); - s_requestQueue->erase(0); + request = _requestQueue.at(0); + _requestQueue.erase(0); } - if (request == s_requestSentinel) { + if (request == _requestSentinel) { break; } // Create a HttpResponse object, the default setting is http access failed HttpResponse *response = new (std::nothrow) HttpResponse(request); - processResponse(response, s_errorBuffer); + processResponse(response, _responseMessage); // add response packet into queue - s_responseQueueMutex.lock(); - s_responseQueue->pushBack(response); - s_responseQueueMutex.unlock(); + _responseQueueMutex.lock(); + _responseQueue.pushBack(response); + _responseQueueMutex.unlock(); - if (nullptr != s_HttpClient) { - scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); + _schedulerMutex.lock(); + if (nullptr != _scheduler) + { + _scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); } + _schedulerMutex.unlock(); } // cleanup: if worker thread received quit signal, clean up un-completed request queue - s_requestQueueMutex.lock(); - s_requestQueue->clear(); - s_requestQueueMutex.unlock(); + _requestQueueMutex.lock(); + _requestQueue.clear(); + _requestQueueMutex.unlock(); + _responseQueueMutex.lock(); + _responseQueue.clear(); + _responseQueueMutex.unlock(); - if (s_requestQueue != nullptr) { - delete s_requestQueue; - s_requestQueue = nullptr; - delete s_responseQueue; - s_responseQueue = nullptr; - } - + decreaseThreadCountAndMayDeleteThis(); } // Worker thread void HttpClient::networkThreadAlone(HttpRequest* request, HttpResponse* response) { - char errorBuffer[ERROR_SIZE] = { 0 }; - processResponse(response, errorBuffer); - - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->performFunctionInCocosThread([response, request]{ - const ccHttpRequestCallback& callback = request->getCallback(); - Ref* pTarget = request->getTarget(); - SEL_HttpResponse pSelector = request->getSelector(); - - if (callback != nullptr) - { - callback(s_HttpClient, response); - } - else if (pTarget && pSelector) - { - (pTarget->*pSelector)(s_HttpClient, response); - } - response->release(); - // do not release in other thread - request->release(); - }); + increaseThreadCount(); + + char responseMessage[RESPONSE_BUFFER_SIZE] = { 0 }; + processResponse(response, responseMessage); + + _schedulerMutex.lock(); + if (nullptr != _scheduler) + { + _scheduler->performFunctionInCocosThread([this, response, request]{ + const ccHttpRequestCallback& callback = request->getCallback(); + Ref* pTarget = request->getTarget(); + SEL_HttpResponse pSelector = request->getSelector(); + + if (callback != nullptr) + { + callback(this, response); + } + else if (pTarget && pSelector) + { + (pTarget->*pSelector)(this, response); + } + response->release(); + // do not release in other thread + request->release(); + }); + } + _schedulerMutex.unlock(); + decreaseThreadCountAndMayDeleteThis(); } //Process Request -static int processTask(HttpRequest *request, NSString* requestType, void *stream, long *responseCode, void *headerStream, char *errorBuffer) +static int processTask(HttpClient* client, HttpRequest* request, NSString* requestType, void* stream, long* responseCode, void* headerStream, char* errorBuffer) { + if (nullptr == client) + { + strcpy(errorBuffer, "client object is invalid"); + return 0; + } + //create request with url NSString* urlstring = [NSString stringWithUTF8String:request->getUrl()]; NSURL *url = [NSURL URLWithString:urlstring]; @@ -199,9 +182,10 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream } //read cookie propertities from file and set cookie - if(!s_cookieFilename.empty()) + std::string cookieFilename = client->getCookieFilename(); + if(!cookieFilename.empty() && nullptr != client->getCookie()) { - const CookiesInfo* cookieInfo = s_cookie->getMatchCookie(request->getUrl()); + const CookiesInfo* cookieInfo = client->getCookie()->getMatchCookie(request->getUrl()); if(cookieInfo != nullptr) { NSString *domain = [NSString stringWithCString:cookieInfo->domain.c_str() encoding:[NSString defaultCStringEncoding]]; @@ -227,12 +211,13 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream httpAsynConn.srcURL = urlstring; httpAsynConn.sslFile = nil; - if(!s_sslCaFilename.empty()) + std::string sslCaFileName = client->getSSLVerification(); + if(!sslCaFileName.empty()) { - long len = s_sslCaFilename.length(); - long pos = s_sslCaFilename.rfind('.', len-1); + long len = sslCaFileName.length(); + long pos = sslCaFileName.rfind('.', len-1); - httpAsynConn.sslFile = [NSString stringWithUTF8String:s_sslCaFilename.substr(0, pos-1).c_str()]; + httpAsynConn.sslFile = [NSString stringWithUTF8String:sslCaFileName.substr(0, pos-1).c_str()]; } [httpAsynConn startRequest:nsrequest]; @@ -259,7 +244,7 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream *responseCode = httpAsynConn.responseCode; //add cookie to cookies vector - if(!s_cookieFilename.empty()) + if(!cookieFilename.empty()) { NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:httpAsynConn.responseHeader forURL:url]; for (NSHTTPCookie *cookie in cookies) @@ -282,7 +267,7 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream cookieInfo.value = [value cStringUsingEncoding: NSUTF8StringEncoding]; cookieInfo.tailmatch = true; - s_cookie->updateOrAddCookie(&cookieInfo); + client->getCookie()->updateOrAddCookie(&cookieInfo); } } @@ -313,131 +298,112 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream return 1; } -// Process Response -static void processResponse(HttpResponse* response, char* errorBuffer) -{ - auto request = response->getHttpRequest(); - long responseCode = -1; - int retValue = 0; - NSString* requestType = nil; - - // Process the request -> get response packet - switch (request->getRequestType()) - { - case HttpRequest::Type::GET: // HTTP GET - requestType = @"GET"; - break; - - case HttpRequest::Type::POST: // HTTP POST - requestType = @"POST"; - break; - - case HttpRequest::Type::PUT: - requestType = @"PUT"; - break; - - case HttpRequest::Type::DELETE: - requestType = @"DELETE"; - break; - - default: - CCASSERT(true, "CCHttpClient: unknown request type, only GET and POSt are supported"); - break; - } - - retValue = processTask(request, - requestType, - response->getResponseData(), - &responseCode, - response->getResponseHeader(), - errorBuffer); - - // write data to HttpResponse - response->setResponseCode(responseCode); - - if (retValue != 0) - { - response->setSucceed(true); - } - else - { - response->setSucceed(false); - response->setErrorBuffer(errorBuffer); - } -} - // HttpClient implementation HttpClient* HttpClient::getInstance() { - if (s_HttpClient == nullptr) { - s_HttpClient = new (std::nothrow) HttpClient(); + if (_httpClient == nullptr) + { + _httpClient = new (std::nothrow) HttpClient(); } - return s_HttpClient; + return _httpClient; } void HttpClient::destroyInstance() { - CC_SAFE_DELETE(s_HttpClient); -} - -void HttpClient::enableCookies(const char* cookieFile) { - if (cookieFile) { - s_cookieFilename = std::string(cookieFile); - s_cookieFilename = FileUtils::getInstance()->fullPathForFilename(s_cookieFilename); - } - else { - s_cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); + if (nullptr == _httpClient) + { + CCLOG("HttpClient singleton is nullptr"); + return; } - s_cookie = new(std::nothrow)HttpCookie; - s_cookie->setCookieFileName(s_cookieFilename); - s_cookie->readFile(); + CCLOG("HttpClient::destroyInstance begin"); + + auto thiz = _httpClient; + _httpClient = nullptr; + + thiz->_scheduler->unscheduleAllForTarget(thiz); + thiz->_schedulerMutex.lock(); + thiz->_scheduler = nullptr; + thiz->_schedulerMutex.unlock(); + + thiz->_requestQueueMutex.lock(); + thiz->_requestQueue.pushBack(thiz->_requestSentinel); + thiz->_requestQueueMutex.unlock(); + + thiz->_sleepCondition.notify_one(); + thiz->decreaseThreadCountAndMayDeleteThis(); + + CCLOG("HttpClient::destroyInstance() finished!"); +} + +void HttpClient::enableCookies(const char* cookieFile) +{ + _cookieFileMutex.lock(); + if (cookieFile) + { + _cookieFilename = std::string(cookieFile); + _cookieFilename = FileUtils::getInstance()->fullPathForFilename(_cookieFilename); + } + else + { + _cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); + } + _cookieFileMutex.unlock(); + + if (nullptr == _cookie) + { + _cookie = new(std::nothrow)HttpCookie; + } + _cookie->setCookieFileName(_cookieFilename); + _cookie->readFile(); } void HttpClient::setSSLVerification(const std::string& caFile) { - s_sslCaFilename = caFile; + std::lock_guard lock(_sslCaFileMutex); + _sslCaFilename = caFile; } HttpClient::HttpClient() : _timeoutForConnect(30) , _timeoutForRead(60) +, _isInited(false) +, _threadCount(0) +, _requestSentinel(new HttpRequest()) +, _cookie(nullptr) { + + CCLOG("In the constructor of HttpClient!"); + memset(_responseMessage, 0, sizeof(char) * RESPONSE_BUFFER_SIZE); + _scheduler = Director::getInstance()->getScheduler(); + increaseThreadCount(); } + HttpClient::~HttpClient() { - if (s_requestQueue != nullptr) { - { - std::lock_guard lock(s_requestQueueMutex); - s_requestQueue->pushBack(s_requestSentinel); - } - s_SleepCondition.notify_one(); - } - - s_HttpClient = nullptr; - - if(!s_cookieFilename.empty()) + CC_SAFE_DELETE(_requestSentinel); + if (!_cookieFilename.empty() && nullptr != _cookie) { - s_cookie->writeFile(); - //delete s_cookie; + _cookie->writeFile(); + CC_SAFE_DELETE(_cookie); } - //s_cookie = nullptr; + CCLOG("HttpClient destructor"); } //Lazy create semaphore & mutex & thread bool HttpClient::lazyInitThreadSemphore() { - if (s_requestQueue != nullptr) { + if (_isInited) + { return true; - } else { - - s_requestQueue = new (std::nothrow) Vector(); - s_responseQueue = new (std::nothrow) Vector(); - + } + else + { auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this)); t.detach(); + _isInited = true; } return true; @@ -458,14 +424,12 @@ void HttpClient::send(HttpRequest* request) request->retain(); - if (nullptr != s_requestQueue) { - s_requestQueueMutex.lock(); - s_requestQueue->pushBack(request); - s_requestQueueMutex.unlock(); - - // Notify thread start to work - s_SleepCondition.notify_one(); - } + _requestQueueMutex.lock(); + _requestQueue.pushBack(request); + _requestQueueMutex.unlock(); + + // Notify thread start to work + _sleepCondition.notify_one(); } void HttpClient::sendImmediate(HttpRequest* request) @@ -488,20 +452,14 @@ void HttpClient::dispatchResponseCallbacks() { // log("CCHttpClient::dispatchResponseCallbacks is running"); //occurs when cocos thread fires but the network thread has already quited - if (nullptr == s_responseQueue) { - return; - } HttpResponse* response = nullptr; - - s_responseQueueMutex.lock(); - - if (!s_responseQueue->empty()) + _responseQueueMutex.lock(); + if (!_responseQueue.empty()) { - response = s_responseQueue->at(0); - s_responseQueue->erase(0); + response = _responseQueue.at(0); + _responseQueue.erase(0); } - - s_responseQueueMutex.unlock(); + _responseQueueMutex.unlock(); if (response) { @@ -524,7 +482,122 @@ void HttpClient::dispatchResponseCallbacks() request->release(); } } + +// Process Response +void HttpClient::processResponse(HttpResponse* response, char* responseMessage) +{ + auto request = response->getHttpRequest(); + long responseCode = -1; + int retValue = 0; + NSString* requestType = nil; + + // Process the request -> get response packet + switch (request->getRequestType()) + { + case HttpRequest::Type::GET: // HTTP GET + requestType = @"GET"; + break; + + case HttpRequest::Type::POST: // HTTP POST + requestType = @"POST"; + break; + + case HttpRequest::Type::PUT: + requestType = @"PUT"; + break; + + case HttpRequest::Type::DELETE: + requestType = @"DELETE"; + break; + + default: + CCASSERT(true, "CCHttpClient: unknown request type, only GET and POSt are supported"); + break; + } + + retValue = processTask(this, + request, + requestType, + response->getResponseData(), + &responseCode, + response->getResponseHeader(), + responseMessage); + + // write data to HttpResponse + response->setResponseCode(responseCode); + + if (retValue != 0) + { + response->setSucceed(true); + } + else + { + response->setSucceed(false); + response->setErrorBuffer(responseMessage); + } +} + +void HttpClient::increaseThreadCount() +{ + _threadCountMutex.lock(); + ++_threadCount; + _threadCountMutex.unlock(); +} + +void HttpClient::decreaseThreadCountAndMayDeleteThis() +{ + bool needDeleteThis = false; + _threadCountMutex.lock(); + --_threadCount; + if (0 == _threadCount) + { + needDeleteThis = true; + } + + _threadCountMutex.unlock(); + if (needDeleteThis) + { + delete this; + } +} + +void HttpClient::setTimeoutForConnect(int value) +{ + std::lock_guard lock(_timeoutForConnectMutex); + _timeoutForConnect = value; +} + +int HttpClient::getTimeoutForConnect() +{ + std::lock_guard lock(_timeoutForConnectMutex); + return _timeoutForConnect; +} + +void HttpClient::setTimeoutForRead(int value) +{ + std::lock_guard lock(_timeoutForReadMutex); + _timeoutForRead = value; +} + +int HttpClient::getTimeoutForRead() +{ + std::lock_guard lock(_timeoutForReadMutex); + return _timeoutForRead; +} + +const std::string& HttpClient::getCookieFilename() +{ + std::lock_guard lock(_cookieFileMutex); + return _cookieFilename; +} + +const std::string& HttpClient::getSSLVerification() +{ + std::lock_guard lock(_sslCaFileMutex); + return _sslCaFilename; +} + } NS_CC_END diff --git a/cocos/network/HttpClient-winrt.cpp b/cocos/network/HttpClient-winrt.cpp new file mode 100644 index 0000000000..83949dc7d9 --- /dev/null +++ b/cocos/network/HttpClient-winrt.cpp @@ -0,0 +1,366 @@ +/**************************************************************************** +Copyright (c) 2012 greathqy +Copyright (c) 2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +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 "HttpClient.h" + +#include +#include +#include + +#include + +#include "base/CCVector.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" + +#include "platform/CCFileUtils.h" +#include "HttpConnection-winrt.h" + +NS_CC_BEGIN + +namespace network { + + static std::mutex s_requestQueueMutex; + static std::mutex s_responseQueueMutex; + + static std::condition_variable_any s_SleepCondition; + + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + typedef int int32_t; +#endif + + static Vector* s_requestQueue = nullptr; + static Vector* s_responseQueue = nullptr; + + static HttpClient *s_pHttpClient = nullptr; // pointer to singleton + + static std::string s_errorBuffer =""; + + static std::string s_cookieFilename = ""; + + static std::string s_sslCaFilename = ""; + + // function used to collect response/header data + static void writeData(std::vector *pFromBuffer, std::vector *pToBuffer) + { + if(nullptr == pFromBuffer || nullptr == pToBuffer) + return; + + pToBuffer->insert(pToBuffer->end(), pFromBuffer->begin(), pFromBuffer->end()); + } + + static void processHttpResponse(HttpResponse* response, std::string& errorStr); + + static HttpRequest *s_requestSentinel = new HttpRequest; + + // Worker thread + void HttpClient::networkThread() + { + auto scheduler = Director::getInstance()->getScheduler(); + + while (true) + { + HttpRequest *request; + + // step 1: send http request if the requestQueue isn't empty + { + std::lock_guard lock(s_requestQueueMutex); + while (s_requestQueue->empty()) { + s_SleepCondition.wait(s_requestQueueMutex); + } + request = s_requestQueue->at(0); + s_requestQueue->erase(0); + } + + if (request == s_requestSentinel) { + break; + } + + // step 2: libcurl sync access + + // Create a HttpResponse object, the default setting is http access failed + HttpResponse *response = new (std::nothrow) HttpResponse(request); + + processHttpResponse(response, s_errorBuffer); + + + // add response packet into queue + s_responseQueueMutex.lock(); + s_responseQueue->pushBack(response); + s_responseQueueMutex.unlock(); + + if (nullptr != s_pHttpClient) { + scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); + } + } + + // cleanup: if worker thread received quit signal, clean up un-completed request queue + s_requestQueueMutex.lock(); + s_requestQueue->clear(); + s_requestQueueMutex.unlock(); + + + if (s_requestQueue != nullptr) { + delete s_requestQueue; + s_requestQueue = nullptr; + delete s_responseQueue; + s_responseQueue = nullptr; + } + + } + + // Worker thread + void HttpClient::networkThreadAlone(HttpRequest* request, HttpResponse* response) + { + std::string errorStr; + processHttpResponse(response, errorStr); + + auto scheduler = Director::getInstance()->getScheduler(); + scheduler->performFunctionInCocosThread([response, request]{ + const ccHttpRequestCallback& callback = request->getCallback(); + Ref* pTarget = request->getTarget(); + SEL_HttpResponse pSelector = request->getSelector(); + + if (callback != nullptr) + { + callback(s_pHttpClient, response); + } + else if (pTarget && pSelector) + { + (pTarget->*pSelector)(s_pHttpClient, response); + } + response->release(); + // do not release in other thread + request->release(); + }); + } + + // Process Response + static void processHttpResponse(HttpResponse* response, std::string& errorStr) + { + auto request = response->getHttpRequest(); + long responseCode = -1; + int retValue = 0; + HttpConnection xhr; + bool ok = false; + bool manualAuthReqd = false; + + // Process the request -> get response packet + switch (request->getRequestType()) + { + case HttpRequest::Type::GET: // HTTP GET + ok = (xhr.init(request) && xhr.open("GET", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + case HttpRequest::Type::POST: // HTTP POST + ok = (xhr.init(request) && xhr.open("POST", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + case HttpRequest::Type::PUT: // HTTP PUT + ok = (xhr.init(request) && xhr.open("PUT", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + case HttpRequest::Type::DELETE: // HTTP DELETE + ok = (xhr.init(request) && xhr.open("DELETE", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + default: + CCASSERT(true, "CCHttpClient: unknown request type, only GET and POST are supported"); + break; + } + + writeData(xhr.getResponseHeader(), response->getResponseHeader()); + writeData(xhr.getResponseData(), response->getResponseData()); + retValue = ok ? 0 : 1; + errorStr = xhr.getErrorMessage(); + responseCode = xhr.getStatusCode(); + + // write data to HttpResponse + response->setResponseCode(responseCode); + + if (retValue != 0) + { + response->setSucceed(false); + response->setErrorBuffer(errorStr.c_str()); + } + else + { + response->setSucceed(true); + } + } + + // HttpClient implementation + HttpClient* HttpClient::getInstance() + { + if (s_pHttpClient == nullptr) { + s_pHttpClient = new (std::nothrow) HttpClient(); + } + + return s_pHttpClient; + } + + void HttpClient::destroyInstance() + { + CC_SAFE_DELETE(s_pHttpClient); + } + + void HttpClient::enableCookies(const char* cookieFile) { + if (cookieFile) { + s_cookieFilename = std::string(cookieFile); + } + else { + s_cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); + } + } + + void HttpClient::setSSLVerification(const std::string& caFile) + { + s_sslCaFilename = caFile; + } + + HttpClient::HttpClient() + : _timeoutForConnect(30) + , _timeoutForRead(60) + { + } + + HttpClient::~HttpClient() + { + if (s_requestQueue != nullptr) { + { + std::lock_guard lock(s_requestQueueMutex); + s_requestQueue->pushBack(s_requestSentinel); + } + s_SleepCondition.notify_one(); + } + + s_pHttpClient = nullptr; + } + + //Lazy create semaphore & mutex & thread + bool HttpClient::lazyInitThreadSemphore() + { + if (s_requestQueue != nullptr) { + return true; + } + else { + + s_requestQueue = new (std::nothrow) Vector(); + s_responseQueue = new (std::nothrow) Vector(); + + auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this)); + t.detach(); + } + + return true; + } + + //Add a get task to queue + void HttpClient::send(HttpRequest* request) + { + if (false == lazyInitThreadSemphore()) + { + return; + } + + if (!request) + { + return; + } + + request->retain(); + + if (nullptr != s_requestQueue) { + s_requestQueueMutex.lock(); + s_requestQueue->pushBack(request); + s_requestQueueMutex.unlock(); + + // Notify thread start to work + s_SleepCondition.notify_one(); + } + } + + void HttpClient::sendImmediate(HttpRequest* request) + { + if (!request) + { + return; + } + + request->retain(); + // Create a HttpResponse object, the default setting is http access failed + HttpResponse *response = new (std::nothrow) HttpResponse(request); + + auto t = std::thread(&HttpClient::networkThreadAlone, this, request, response); + t.detach(); + } + + // Poll and notify main thread if responses exists in queue + void HttpClient::dispatchResponseCallbacks() + { + // log("CCHttpClient::dispatchResponseCallbacks is running"); + //occurs when cocos thread fires but the network thread has already quited + if (nullptr == s_responseQueue) { + return; + } + HttpResponse* response = nullptr; + + s_responseQueueMutex.lock(); + + if (!s_responseQueue->empty()) + { + response = s_responseQueue->at(0); + s_responseQueue->erase(0); + } + + s_responseQueueMutex.unlock(); + + if (response) + { + HttpRequest *request = response->getHttpRequest(); + const ccHttpRequestCallback& callback = request->getCallback(); + Ref* pTarget = request->getTarget(); + SEL_HttpResponse pSelector = request->getSelector(); + + if (callback != nullptr) + { + callback(this, response); + } + else if (pTarget && pSelector) + { + (pTarget->*pSelector)(this, response); + } + + response->release(); + // do not release in other thread + request->release(); + } + } + + } + +NS_CC_END diff --git a/cocos/network/HttpClient.cpp b/cocos/network/HttpClient.cpp index c53e3742d0..53f13907ae 100644 --- a/cocos/network/HttpClient.cpp +++ b/cocos/network/HttpClient.cpp @@ -25,48 +25,24 @@ ****************************************************************************/ #include "HttpClient.h" - -#include #include -#include - #include - #include - -#include "base/CCVector.h" #include "base/CCDirector.h" -#include "base/CCScheduler.h" - #include "platform/CCFileUtils.h" NS_CC_BEGIN namespace network { -static std::mutex s_requestQueueMutex; -static std::mutex s_responseQueueMutex; - -static std::condition_variable_any s_SleepCondition; - - #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) typedef int int32_t; #endif -static Vector* s_requestQueue = nullptr; -static Vector* s_responseQueue = nullptr; - -static HttpClient *s_pHttpClient = nullptr; // pointer to singleton - -static char s_errorBuffer[CURL_ERROR_SIZE] = {0}; +static HttpClient* _httpClient = nullptr; // pointer to singleton typedef size_t (*write_callback)(void *ptr, size_t size, size_t nmemb, void *stream); -static std::string s_cookieFilename = ""; - -static std::string s_sslCaFilename = ""; - // Callback function used by libcurl for collect response data static size_t writeData(void *ptr, size_t size, size_t nmemb, void *stream) { @@ -94,19 +70,16 @@ static size_t writeHeaderData(void *ptr, size_t size, size_t nmemb, void *stream } -static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer); -static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer); -static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer); -static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer); +static int processGetTask(HttpClient* client, HttpRequest* request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char* errorBuffer); +static int processPostTask(HttpClient* client, HttpRequest* request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char* errorBuffer); +static int processPutTask(HttpClient* client, HttpRequest* request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char* errorBuffer); +static int processDeleteTask(HttpClient* client, HttpRequest* request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char* errorBuffer); // int processDownloadTask(HttpRequest *task, write_callback callback, void *stream, int32_t *errorCode); -static void processResponse(HttpResponse* response, char* errorBuffer); - -static HttpRequest *s_requestSentinel = new HttpRequest; // Worker thread void HttpClient::networkThread() -{ - auto scheduler = Director::getInstance()->getScheduler(); +{ + increaseThreadCount(); while (true) { @@ -114,15 +87,16 @@ void HttpClient::networkThread() // step 1: send http request if the requestQueue isn't empty { - std::lock_guard lock(s_requestQueueMutex); - while (s_requestQueue->empty()) { - s_SleepCondition.wait(s_requestQueueMutex); + std::lock_guard lock(_requestQueueMutex); + while (_requestQueue.empty()) + { + _sleepCondition.wait(_requestQueueMutex); } - request = s_requestQueue->at(0); - s_requestQueue->erase(0); + request = _requestQueue.at(0); + _requestQueue.erase(0); } - if (request == s_requestSentinel) { + if (request == _requestSentinel) { break; } @@ -131,62 +105,70 @@ void HttpClient::networkThread() // Create a HttpResponse object, the default setting is http access failed HttpResponse *response = new (std::nothrow) HttpResponse(request); - processResponse(response, s_errorBuffer); + processResponse(response, _responseMessage); // add response packet into queue - s_responseQueueMutex.lock(); - s_responseQueue->pushBack(response); - s_responseQueueMutex.unlock(); + _responseQueueMutex.lock(); + _responseQueue.pushBack(response); + _responseQueueMutex.unlock(); - if (nullptr != s_pHttpClient) { - scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); - } + _schedulerMutex.lock(); + if (nullptr != _scheduler) + { + _scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); + } + _schedulerMutex.unlock(); } // cleanup: if worker thread received quit signal, clean up un-completed request queue - s_requestQueueMutex.lock(); - s_requestQueue->clear(); - s_requestQueueMutex.unlock(); - - - if (s_requestQueue != nullptr) { - delete s_requestQueue; - s_requestQueue = nullptr; - delete s_responseQueue; - s_responseQueue = nullptr; - } + _requestQueueMutex.lock(); + _requestQueue.clear(); + _requestQueueMutex.unlock(); + _responseQueueMutex.lock(); + _responseQueue.clear(); + _responseQueueMutex.unlock(); + + decreaseThreadCountAndMayDeleteThis(); } // Worker thread void HttpClient::networkThreadAlone(HttpRequest* request, HttpResponse* response) { - char errorBuffer[CURL_ERROR_SIZE] = { 0 }; - processResponse(response, errorBuffer); + increaseThreadCount(); - auto scheduler = Director::getInstance()->getScheduler(); - scheduler->performFunctionInCocosThread([response, request]{ - const ccHttpRequestCallback& callback = request->getCallback(); - Ref* pTarget = request->getTarget(); - SEL_HttpResponse pSelector = request->getSelector(); + char responseMessage[RESPONSE_BUFFER_SIZE] = { 0 }; + processResponse(response, responseMessage); + + _schedulerMutex.lock(); + if (nullptr != _scheduler) + { + _scheduler->performFunctionInCocosThread([this, response, request]{ + const ccHttpRequestCallback& callback = request->getCallback(); + Ref* pTarget = request->getTarget(); + SEL_HttpResponse pSelector = request->getSelector(); - if (callback != nullptr) - { - callback(s_pHttpClient, response); - } - else if (pTarget && pSelector) - { - (pTarget->*pSelector)(s_pHttpClient, response); - } - response->release(); - // do not release in other thread - request->release(); - }); + if (callback != nullptr) + { + callback(this, response); + } + else if (pTarget && pSelector) + { + (pTarget->*pSelector)(this, response); + } + response->release(); + // do not release in other thread + request->release(); + }); + } + _schedulerMutex.unlock(); + + decreaseThreadCountAndMayDeleteThis(); } //Configure curl's timeout property -static bool configureCURL(CURL *handle, char *errorBuffer) +static bool configureCURL(HttpClient* client, CURL* handle, char* errorBuffer) { if (!handle) { return false; @@ -205,13 +187,15 @@ static bool configureCURL(CURL *handle, char *errorBuffer) if (code != CURLE_OK) { return false; } - if (s_sslCaFilename.empty()) { + + std::string sslCaFilename = client->getSSLVerification(); + if (sslCaFilename.empty()) { curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); } else { curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L); curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); - curl_easy_setopt(handle, CURLOPT_CAINFO, s_sslCaFilename.c_str()); + curl_easy_setopt(handle, CURLOPT_CAINFO, sslCaFilename.c_str()); } // FIXED #3224: The subthread of CCHttpClient interrupts main thread if timeout comes. @@ -255,11 +239,11 @@ public: * @param callback Response write callback * @param stream Response write stream */ - bool init(HttpRequest *request, write_callback callback, void *stream, write_callback headerCallback, void *headerStream, char *errorBuffer) + bool init(HttpClient* client, HttpRequest* request, write_callback callback, void* stream, write_callback headerCallback, void* headerStream, char* errorBuffer) { if (!_curl) return false; - if (!configureCURL(_curl, errorBuffer)) + if (!configureCURL(client, _curl, errorBuffer)) return false; /* get custom header data (if set) */ @@ -273,11 +257,12 @@ public: if (!setOption(CURLOPT_HTTPHEADER, _headers)) return false; } - if (!s_cookieFilename.empty()) { - if (!setOption(CURLOPT_COOKIEFILE, s_cookieFilename.c_str())) { + std::string cookieFilename = client->getCookieFilename(); + if (!cookieFilename.empty()) { + if (!setOption(CURLOPT_COOKIEFILE, cookieFilename.c_str())) { return false; } - if (!setOption(CURLOPT_COOKIEJAR, s_cookieFilename.c_str())) { + if (!setOption(CURLOPT_COOKIEJAR, cookieFilename.c_str())) { return false; } } @@ -307,20 +292,20 @@ public: }; //Process Get Request -static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) +static int processGetTask(HttpClient* client, HttpRequest* request, write_callback callback, void* stream, long* responseCode, write_callback headerCallback, void* headerStream, char* errorBuffer) { CURLRaii curl; - bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer) + bool ok = curl.init(client, request, callback, stream, headerCallback, headerStream, errorBuffer) && curl.setOption(CURLOPT_FOLLOWLOCATION, true) && curl.perform(responseCode); return ok ? 0 : 1; } //Process POST Request -static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) +static int processPostTask(HttpClient* client, HttpRequest* request, write_callback callback, void* stream, long* responseCode, write_callback headerCallback, void* headerStream, char* errorBuffer) { CURLRaii curl; - bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer) + bool ok = curl.init(client, request, callback, stream, headerCallback, headerStream, errorBuffer) && curl.setOption(CURLOPT_POST, 1) && curl.setOption(CURLOPT_POSTFIELDS, request->getRequestData()) && curl.setOption(CURLOPT_POSTFIELDSIZE, request->getRequestDataSize()) @@ -329,10 +314,10 @@ static int processPostTask(HttpRequest *request, write_callback callback, void * } //Process PUT Request -static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) +static int processPutTask(HttpClient* client, HttpRequest* request, write_callback callback, void* stream, long* responseCode, write_callback headerCallback, void* headerStream, char* errorBuffer) { CURLRaii curl; - bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer) + bool ok = curl.init(client, request, callback, stream, headerCallback, headerStream, errorBuffer) && curl.setOption(CURLOPT_CUSTOMREQUEST, "PUT") && curl.setOption(CURLOPT_POSTFIELDS, request->getRequestData()) && curl.setOption(CURLOPT_POSTFIELDSIZE, request->getRequestDataSize()) @@ -341,146 +326,105 @@ static int processPutTask(HttpRequest *request, write_callback callback, void *s } //Process DELETE Request -static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer) +static int processDeleteTask(HttpClient* client, HttpRequest* request, write_callback callback, void* stream, long* responseCode, write_callback headerCallback, void* headerStream, char* errorBuffer) { CURLRaii curl; - bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer) + bool ok = curl.init(client, request, callback, stream, headerCallback, headerStream, errorBuffer) && curl.setOption(CURLOPT_CUSTOMREQUEST, "DELETE") && curl.setOption(CURLOPT_FOLLOWLOCATION, true) && curl.perform(responseCode); return ok ? 0 : 1; } - -// Process Response -static void processResponse(HttpResponse* response, char* errorBuffer) -{ - auto request = response->getHttpRequest(); - long responseCode = -1; - int retValue = 0; - - // Process the request -> get response packet - switch (request->getRequestType()) - { - case HttpRequest::Type::GET: // HTTP GET - retValue = processGetTask(request, - writeData, - response->getResponseData(), - &responseCode, - writeHeaderData, - response->getResponseHeader(), - errorBuffer); - break; - - case HttpRequest::Type::POST: // HTTP POST - retValue = processPostTask(request, - writeData, - response->getResponseData(), - &responseCode, - writeHeaderData, - response->getResponseHeader(), - errorBuffer); - break; - - case HttpRequest::Type::PUT: - retValue = processPutTask(request, - writeData, - response->getResponseData(), - &responseCode, - writeHeaderData, - response->getResponseHeader(), - errorBuffer); - break; - - case HttpRequest::Type::DELETE: - retValue = processDeleteTask(request, - writeData, - response->getResponseData(), - &responseCode, - writeHeaderData, - response->getResponseHeader(), - errorBuffer); - break; - - default: - CCASSERT(true, "CCHttpClient: unknown request type, only GET and POSt are supported"); - break; - } - - // write data to HttpResponse - response->setResponseCode(responseCode); - - if (retValue != 0) - { - response->setSucceed(false); - response->setErrorBuffer(errorBuffer); - } - else - { - response->setSucceed(true); - } -} - // HttpClient implementation HttpClient* HttpClient::getInstance() { - if (s_pHttpClient == nullptr) { - s_pHttpClient = new (std::nothrow) HttpClient(); + if (_httpClient == nullptr) + { + _httpClient = new (std::nothrow) HttpClient(); } - return s_pHttpClient; + return _httpClient; } void HttpClient::destroyInstance() { - CC_SAFE_DELETE(s_pHttpClient); + if (nullptr == _httpClient) + { + CCLOG("HttpClient singleton is nullptr"); + return; + } + + CCLOG("HttpClient::destroyInstance begin"); + auto thiz = _httpClient; + _httpClient = nullptr; + + thiz->_scheduler->unscheduleAllForTarget(thiz); + thiz->_schedulerMutex.lock(); + thiz->_scheduler = nullptr; + thiz->_schedulerMutex.unlock(); + + thiz->_requestQueueMutex.lock(); + thiz->_requestQueue.pushBack(thiz->_requestSentinel); + thiz->_requestQueueMutex.unlock(); + + thiz->_sleepCondition.notify_one(); + thiz->decreaseThreadCountAndMayDeleteThis(); + + CCLOG("HttpClient::destroyInstance() finished!"); } -void HttpClient::enableCookies(const char* cookieFile) { - if (cookieFile) { - s_cookieFilename = std::string(cookieFile); +void HttpClient::enableCookies(const char* cookieFile) +{ + std::lock_guard lock(_cookieFileMutex); + if (cookieFile) + { + _cookieFilename = std::string(cookieFile); } - else { - s_cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); + else + { + _cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); } } void HttpClient::setSSLVerification(const std::string& caFile) { - s_sslCaFilename = caFile; + std::lock_guard lock(_sslCaFileMutex); + _sslCaFilename = caFile; } HttpClient::HttpClient() : _timeoutForConnect(30) , _timeoutForRead(60) +, _isInited(false) +, _threadCount(0) +, _requestSentinel(new HttpRequest()) +, _cookie(nullptr) { + CCLOG("In the constructor of HttpClient!"); + memset(_responseMessage, 0, RESPONSE_BUFFER_SIZE * sizeof(char)); + _scheduler = Director::getInstance()->getScheduler(); + increaseThreadCount(); } HttpClient::~HttpClient() { - if (s_requestQueue != nullptr) { - { - std::lock_guard lock(s_requestQueueMutex); - s_requestQueue->pushBack(s_requestSentinel); - } - s_SleepCondition.notify_one(); - } - - s_pHttpClient = nullptr; + CC_SAFE_DELETE(_requestSentinel); + CCLOG("HttpClient destructor"); } //Lazy create semaphore & mutex & thread bool HttpClient::lazyInitThreadSemphore() { - if (s_requestQueue != nullptr) { + if (_isInited) + { return true; - } else { - - s_requestQueue = new (std::nothrow) Vector(); - s_responseQueue = new (std::nothrow) Vector(); - + } + else + { auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this)); t.detach(); + _isInited = true; } return true; @@ -500,15 +444,13 @@ void HttpClient::send(HttpRequest* request) } request->retain(); - - if (nullptr != s_requestQueue) { - s_requestQueueMutex.lock(); - s_requestQueue->pushBack(request); - s_requestQueueMutex.unlock(); - - // Notify thread start to work - s_SleepCondition.notify_one(); - } + + _requestQueueMutex.lock(); + _requestQueue.pushBack(request); + _requestQueueMutex.unlock(); + + // Notify thread start to work + _sleepCondition.notify_one(); } void HttpClient::sendImmediate(HttpRequest* request) @@ -531,20 +473,15 @@ void HttpClient::dispatchResponseCallbacks() { // log("CCHttpClient::dispatchResponseCallbacks is running"); //occurs when cocos thread fires but the network thread has already quited - if (nullptr == s_responseQueue) { - return; - } HttpResponse* response = nullptr; - - s_responseQueueMutex.lock(); - if (!s_responseQueue->empty()) + _responseQueueMutex.lock(); + if (!_responseQueue.empty()) { - response = s_responseQueue->at(0); - s_responseQueue->erase(0); + response = _responseQueue.at(0); + _responseQueue.erase(0); } - - s_responseQueueMutex.unlock(); + _responseQueueMutex.unlock(); if (response) { @@ -568,6 +505,134 @@ void HttpClient::dispatchResponseCallbacks() } } +// Process Response +void HttpClient::processResponse(HttpResponse* response, char* responseMessage) +{ + auto request = response->getHttpRequest(); + long responseCode = -1; + int retValue = 0; + + // Process the request -> get response packet + switch (request->getRequestType()) + { + case HttpRequest::Type::GET: // HTTP GET + retValue = processGetTask(this, request, + writeData, + response->getResponseData(), + &responseCode, + writeHeaderData, + response->getResponseHeader(), + responseMessage); + break; + + case HttpRequest::Type::POST: // HTTP POST + retValue = processPostTask(this, request, + writeData, + response->getResponseData(), + &responseCode, + writeHeaderData, + response->getResponseHeader(), + responseMessage); + break; + + case HttpRequest::Type::PUT: + retValue = processPutTask(this, request, + writeData, + response->getResponseData(), + &responseCode, + writeHeaderData, + response->getResponseHeader(), + responseMessage); + break; + + case HttpRequest::Type::DELETE: + retValue = processDeleteTask(this, request, + writeData, + response->getResponseData(), + &responseCode, + writeHeaderData, + response->getResponseHeader(), + responseMessage); + break; + + default: + CCASSERT(true, "CCHttpClient: unknown request type, only GET and POSt are supported"); + break; + } + + // write data to HttpResponse + response->setResponseCode(responseCode); + if (retValue != 0) + { + response->setSucceed(false); + response->setErrorBuffer(responseMessage); + } + else + { + response->setSucceed(true); + } +} + +void HttpClient::increaseThreadCount() +{ + _threadCountMutex.lock(); + ++_threadCount; + _threadCountMutex.unlock(); +} + +void HttpClient::decreaseThreadCountAndMayDeleteThis() +{ + bool needDeleteThis = false; + _threadCountMutex.lock(); + --_threadCount; + if (0 == _threadCount) + { + needDeleteThis = true; + } + + _threadCountMutex.unlock(); + if (needDeleteThis) + { + delete this; + } +} + +void HttpClient::setTimeoutForConnect(int value) +{ + std::lock_guard lock(_timeoutForConnectMutex); + _timeoutForConnect = value; +} + +int HttpClient::getTimeoutForConnect() +{ + std::lock_guard lock(_timeoutForConnectMutex); + return _timeoutForConnect; +} + +void HttpClient::setTimeoutForRead(int value) +{ + std::lock_guard lock(_timeoutForReadMutex); + _timeoutForRead = value; +} + +int HttpClient::getTimeoutForRead() +{ + std::lock_guard lock(_timeoutForReadMutex); + return _timeoutForRead; +} + +const std::string& HttpClient::getCookieFilename() +{ + std::lock_guard lock(_cookieFileMutex); + return _cookieFilename; +} + +const std::string& HttpClient::getSSLVerification() +{ + std::lock_guard lock(_sslCaFileMutex); + return _sslCaFilename; +} + } NS_CC_END diff --git a/cocos/network/HttpClient.h b/cocos/network/HttpClient.h index 9cc2119a6c..4424594b1a 100644 --- a/cocos/network/HttpClient.h +++ b/cocos/network/HttpClient.h @@ -27,8 +27,13 @@ #ifndef __CCHTTPCLIENT_H__ #define __CCHTTPCLIENT_H__ +#include +#include +#include "base/CCVector.h" +#include "base/CCScheduler.h" #include "network/HttpRequest.h" #include "network/HttpResponse.h" +#include "network/HttpCookie.h" /** * @addtogroup core @@ -38,6 +43,8 @@ NS_CC_BEGIN namespace network { + + /** Singleton that handles asynchrounous http requests. * @@ -48,6 +55,11 @@ namespace network { class CC_DLL HttpClient { public: + /** + * The buffer size of _responseMessage + */ + static const int RESPONSE_BUFFER_SIZE = 256; + /** * Get instance of HttpClient. * @@ -67,12 +79,26 @@ public: */ void enableCookies(const char* cookieFile); + /** + * Get the cookie filename + * + * @return the cookie filename + */ + const std::string& getCookieFilename(); + /** * Set root certificate path for SSL verification. * * @param caFile a full path of root certificate.if it is empty, SSL verification is disabled. */ void setSSLVerification(const std::string& caFile); + + /** + * Get ths ssl CA filename + * + * @return the ssl CA filename + */ + const std::string& getSSLVerification(); /** * Add a get request to task queue @@ -89,38 +115,40 @@ public: please make sure request->_requestData is clear before calling "sendImmediate" here. */ void sendImmediate(HttpRequest* request); - /** * Set the timeout value for connecting. * * @param value the timeout value for connecting. */ - inline void setTimeoutForConnect(int value) {_timeoutForConnect = value;}; + void setTimeoutForConnect(int value); /** * Get the timeout value for connecting. * * @return int the timeout value for connecting. */ - inline int getTimeoutForConnect() {return _timeoutForConnect;} - + int getTimeoutForConnect(); /** * Set the timeout value for reading. * * @param value the timeout value for reading. */ - inline void setTimeoutForRead(int value) {_timeoutForRead = value;}; - + void setTimeoutForRead(int value); /** * Get the timeout value for reading. * * @return int the timeout value for reading. */ - inline int getTimeoutForRead() {return _timeoutForRead;}; - + int getTimeoutForRead(); + + HttpCookie* getCookie() const {return _cookie; } + + std::mutex& getCookieFileMutex() {return _cookieFileMutex;} + + std::mutex& getSSLCaFileMutex() {return _sslCaFileMutex;} private: HttpClient(); virtual ~HttpClient(); @@ -136,9 +164,44 @@ private: /** Poll function called from main thread to dispatch callbacks when http requests finished **/ void dispatchResponseCallbacks(); + void processResponse(HttpResponse* response, char* responseMessage); + void increaseThreadCount(); + void decreaseThreadCountAndMayDeleteThis(); + private: + bool _isInited; + int _timeoutForConnect; + std::mutex _timeoutForConnectMutex; + int _timeoutForRead; + std::mutex _timeoutForReadMutex; + + int _threadCount; + std::mutex _threadCountMutex; + + Scheduler* _scheduler; + std::mutex _schedulerMutex; + + Vector _requestQueue; + std::mutex _requestQueueMutex; + + Vector _responseQueue; + std::mutex _responseQueueMutex; + + std::string _cookieFilename; + std::mutex _cookieFileMutex; + + std::string _sslCaFilename; + std::mutex _sslCaFileMutex; + + HttpCookie* _cookie; + + std::condition_variable_any _sleepCondition; + + char _responseMessage[RESPONSE_BUFFER_SIZE]; + + HttpRequest* _requestSentinel; }; } @@ -148,4 +211,4 @@ NS_CC_END // end group /// @} -#endif //__CCHTTPREQUEST_H__ +#endif //__CCHTTPCLIENT_H__ diff --git a/cocos/network/HttpConnection-winrt.cpp b/cocos/network/HttpConnection-winrt.cpp new file mode 100644 index 0000000000..d44901197c --- /dev/null +++ b/cocos/network/HttpConnection-winrt.cpp @@ -0,0 +1,741 @@ +/**************************************************************************** +Copyright (c) 2012 greathqy +Copyright (c) 2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +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 "network/HttpCookie.h" +#include "HttpConnection-winrt.h" + +NS_CC_BEGIN + +namespace network { + + // Format and add default headers (Platform specific approach) + static void formatHeaders(std::vector& headers) + { +#if defined(_XBOX_ONE) + for(auto iter = headers.begin(); iter != headers.end(); ++iter) + { + (*iter) += "\r\n"; + } + + // append default headers + headers.emplace_back("User-Agent: XB1_IXHR2_HTTP\r\n"); + headers.emplace_back("x-xbl-device-type: XboxOne\r\n"); + headers.emplace_back("x-xbl-client-type: Console\r\n"); + headers.emplace_back("x-xbl-client-version: 1.0\r\n"); + headers.emplace_back("x-xbl-contract-version: 1\r\n"); +#endif + } + + // Get user authentication token (Platform specific approach) + static bool getAuthenticationToken(std::string verb, std::string url, std::string headersXST, std::string bodyXST, std::string& token, std::string& signature) + { +#if defined(_XBOX_ONE) + using namespace Windows::Xbox::System; + + token = ""; + signature = ""; + User^ loggedInUser = nullptr; + int ind = 0; + + while(ind < User::Users->Size) + { + loggedInUser = User::Users->GetAt(ind++); + if(loggedInUser->IsSignedIn) + break; + + loggedInUser = nullptr; + } + + if(nullptr == loggedInUser) + return false; + + Platform::Array^ body; + + if(!bodyXST.empty()) { + body = ref new Platform::Array((unsigned char*)bodyXST.c_str(), bodyXST.size()); + } + else { + body = ref new Platform::Array(1); + body[0] = 0; + } + + // this method will crash if TitleId & PrimaryServiceConfigId not specified in Package.appxmanifest. + auto asynOp = loggedInUser->GetTokenAndSignatureAsync( + ref new Platform::String(std::wstring(verb.begin(), verb.end()).c_str()), + ref new Platform::String(std::wstring(url.begin(), url.end()).c_str()), + ref new Platform::String(std::wstring(headersXST.begin(), headersXST.end()).c_str()), body); + + bool bRet = false; + HRESULT hr = S_OK; + + asynOp->Completed = ref new Windows::Foundation::AsyncOperationCompletedHandler( + [&token, &signature, &bRet, &hr](Windows::Foundation::IAsyncOperation^ operation, Windows::Foundation::AsyncStatus status) + { + if(status == Windows::Foundation::AsyncStatus::Completed) { + try + { + auto result = operation->GetResults(); + + std::wstring tok = result->Token->Data(); + std::wstring sig = result->Signature->Data(); + token = std::string(tok.begin(), tok.end()); + signature = std::string(sig.begin(), sig.end()); + + bRet = true; + } + catch(Platform::Exception^ e) + { + bRet = false; + } + } + else { + hr = operation->ErrorCode.Value; + + if(hr == 0x87dd0021) //AM_E_NO_TOKEN_REQUIRED + bRet = true; + } + }); + + while(asynOp->Status == Windows::Foundation::AsyncStatus::Started) + { + ::Sleep(1); + } + + return bRet; +#else + return false; +#endif + } + + + // CXMLHTTPRequest2Callback + CXHR2Callback::CXHR2Callback() : + _statusCode(0), + _hWfC(nullptr), + _errorMsg("") + { + } + + CXHR2Callback::~CXHR2Callback() + { + if (nullptr != _hWfC) + { + CloseHandle(_hWfC); + _hWfC = nullptr; + } + } + + HRESULT CXHR2Callback::RuntimeClassInitialize() + { + _hWfC = CreateEventEx(nullptr, nullptr, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS); + return HRESULT_FROM_WIN32(GetLastError()); + } + + HRESULT CXHR2Callback::OnRedirect(IXMLHTTPRequest2 *pXHR, const WCHAR *pwszRedirectUrl) + { + UNREFERENCED_PARAMETER(pXHR); + UNREFERENCED_PARAMETER(pwszRedirectUrl); + + return S_OK; + } + + HRESULT CXHR2Callback::OnHeadersAvailable(IXMLHTTPRequest2 *pXHR, DWORD dwStatus, const WCHAR *pwszStatus) + { + _statusCode = dwStatus; + + if(nullptr == pXHR) { + return E_INVALIDARG; + } + + WCHAR *headers = nullptr; + HRESULT hr = pXHR->GetAllResponseHeaders(&headers); + + if(SUCCEEDED(hr)) { + std::wstring hdr = headers; + _headers.insert(_headers.end(), hdr.begin(), hdr.end()); + } + + if(headers != nullptr) { + CoTaskMemFree(headers); + headers = nullptr; + } + + return hr; + } + + HRESULT CXHR2Callback::OnDataAvailable(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream) + { + UNREFERENCED_PARAMETER(pXHR); + + return ReadStreamData(pResponseStream); + } + + HRESULT CXHR2Callback::OnResponseReceived(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream) + { + UNREFERENCED_PARAMETER(pXHR); + + HRESULT hr = ReadStreamData(pResponseStream); + + CompleteRequest(hr); + + return hr; + } + + HRESULT CXHR2Callback::OnError(IXMLHTTPRequest2 *pXHR, HRESULT hrError) + { + CompleteRequest(hrError); + + return hrError; + } + + HRESULT CXHR2Callback::WaitForComplete(PDWORD pdwStatus) + { + HRESULT hr = E_FAIL; + + if (NULL != _hWfC) + { + hr = S_OK; + DWORD error; + + error = WaitForSingleObjectEx(_hWfC, INFINITE, FALSE); + + if (error == WAIT_FAILED) { + hr = HRESULT_FROM_WIN32(GetLastError()); + } + + if (error != WAIT_OBJECT_0) { + hr = E_ABORT; + } + } + + if (SUCCEEDED(hr)) { + *pdwStatus = _statusCode; + } + + return hr; + } + + HRESULT CXHR2Callback::ReadStreamData(ISequentialStream* pResponseStream) + { + if(pResponseStream == NULL) { + return E_INVALIDARG; + } + + CCHAR buff[READ_BUFFER_MAX]; + DWORD totalBytes = 0; + DWORD bytesRead = 0; + HRESULT hr = S_OK; + + do + { + hr = pResponseStream->Read(buff, READ_BUFFER_MAX, &bytesRead); + + if(FAILED(hr)) { + break; + } + + _data.insert(_data.end(), &buff[0], buff + bytesRead); + totalBytes += bytesRead; + } + while(hr == S_OK); + + if(SUCCEEDED(hr)) { + hr = S_OK; + } + + return hr; + } + + void CXHR2Callback::CompleteRequest(HRESULT hrError) + { + if (NULL != _hWfC) { + SetEvent(_hWfC); + } + + switch (hrError) + { + case S_OK: + case S_FALSE: + _statusCode = 200; + break; + + case INET_E_AUTHENTICATION_REQUIRED: + _statusCode = 401; + _errorMsg = ERR_MSG_401; + break; + + case INET_E_DOWNLOAD_FAILURE: + _statusCode = 500; + _errorMsg = ERR_MSG_DL_FLD; + break; + + case INET_E_FORBIDFRAMING: + _statusCode = 403; + _errorMsg = ERR_MSG_403; + break; + + case INET_E_RESOURCE_NOT_FOUND: + _statusCode = 404; + _errorMsg = ERR_MSG_404; + break; + + case RPC_S_PROXY_ACCESS_DENIED: + _statusCode = 407; + _errorMsg = ERR_MSG_407; + break; + + case ERROR_RESOURCE_CALL_TIMED_OUT: + _statusCode = 408; + _errorMsg = ERR_MSG_408; + break; + + case INET_E_INVALID_REQUEST: + _statusCode = 400; + _errorMsg = ERR_MSG_400; + break; + + case E_ABORT: + _statusCode = 412; + _errorMsg = ERR_MSG_412; + break; + + default: + _statusCode = 500; + _errorMsg = ERR_MSG_500; + break; + } + } + + + //CXHR2DataStream + CXHR2DataStream::CXHR2DataStream() : + _pData(nullptr), + _dataSize(0), + _seekIndex(0), + _refCnt(1) + { + } + + CXHR2DataStream::~CXHR2DataStream() + { + if(nullptr != _pData) + delete[] _pData; + } + + ULONG CXHR2DataStream::Length() + { + return _dataSize; + } + + HRESULT CXHR2DataStream::Init(const void *psBuffer, ULONG cbBufferSize) + { + HRESULT hr = S_OK; + + if(psBuffer == nullptr || cbBufferSize > REQUEST_BUFFER_MAX) { + hr = E_INVALIDARG; + } + + if(SUCCEEDED(hr)) { + _dataSize = cbBufferSize; + _seekIndex = 0; + _pData = new (std::nothrow) BYTE[_dataSize]; + + if(_pData == nullptr) + hr = E_OUTOFMEMORY; + } + + if(SUCCEEDED(hr)) { + memcpy_s(_pData, _dataSize, psBuffer, cbBufferSize); + } + + return hr; + } + + HRESULT CXHR2DataStream::Read(void *pv, ULONG cb, ULONG *pcbRead) + { + HRESULT hr = S_OK; + + if(pv == nullptr) { + hr = E_INVALIDARG; + } + + if(SUCCEEDED(hr)) { + BYTE* pOutput = (BYTE*)pv; + BYTE* _pInput = _pData; + + for(*pcbRead = 0; *pcbRead < cb; (*pcbRead)++) + { + if(_seekIndex == _dataSize) { + hr = S_FALSE; + break; + } + + pOutput[*pcbRead] = _pInput[*pcbRead]; + _seekIndex++; + } + } + + return hr; + } + + HRESULT CXHR2DataStream::Write(const void *pv, ULONG cb, ULONG *pcbWritten) + { + HRESULT hr = E_NOTIMPL; + + UNREFERENCED_PARAMETER(pv); + UNREFERENCED_PARAMETER(cb); + UNREFERENCED_PARAMETER(pcbWritten); + + return hr; + } + + ULONG CXHR2DataStream::AddRef() + { + return ::InterlockedIncrement(&_refCnt); + } + + ULONG CXHR2DataStream::Release() + { + ULONG refCnt = ::InterlockedDecrement(&_refCnt); + + if(0 == refCnt) { + delete this; + } + + return refCnt; + } + + HRESULT CXHR2DataStream::QueryInterface(REFIID riid, void **ppvObject) + { + HRESULT hr = S_OK; + + if(ppvObject == nullptr) { + hr = E_INVALIDARG; + } + + void *pObject = nullptr; + + if(SUCCEEDED(hr)) { + + if(riid == IID_IUnknown) { + pObject = static_cast((IDispatch*)this); + } + else if(riid == IID_IDispatch) { + pObject = static_cast(this); + } + else if(riid == IID_ISequentialStream) { + pObject = static_cast(this); + } + else { + hr = E_NOINTERFACE; + } + } + + if(SUCCEEDED(hr)) { + AddRef(); + *ppvObject = pObject; + pObject = nullptr; + } + + return hr; + } + + HRESULT CXHR2DataStream::GetTypeInfoCount(unsigned int FAR* pctinfo) + { + HRESULT hr = E_NOTIMPL; + + if(pctinfo) + *pctinfo = 0; + + return hr; + } + + HRESULT CXHR2DataStream::GetTypeInfo(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo) + { + HRESULT hr = E_NOTIMPL; + + if(ppTInfo) + *ppTInfo = 0; + + UNREFERENCED_PARAMETER(iTInfo); + UNREFERENCED_PARAMETER(lcid); + + return hr; + } + + HRESULT CXHR2DataStream::GetIDsOfNames(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgDispId) + { + HRESULT hr = DISP_E_UNKNOWNNAME; + + UNREFERENCED_PARAMETER(riid); + UNREFERENCED_PARAMETER(rgszNames); + UNREFERENCED_PARAMETER(cNames); + UNREFERENCED_PARAMETER(lcid); + UNREFERENCED_PARAMETER(rgDispId); + + return hr; + } + + HRESULT CXHR2DataStream::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr) + { + HRESULT hr = S_OK; + + UNREFERENCED_PARAMETER(dispIdMember); + UNREFERENCED_PARAMETER(riid); + UNREFERENCED_PARAMETER(lcid); + UNREFERENCED_PARAMETER(wFlags); + UNREFERENCED_PARAMETER(pDispParams); + UNREFERENCED_PARAMETER(pVarResult); + UNREFERENCED_PARAMETER(pExcepInfo); + UNREFERENCED_PARAMETER(puArgErr); + + return hr; + } + + + // HttpConnection + HttpConnection::HttpConnection() : + _isInitialized(false), + _spXhr(nullptr), + _spXhrCallback(nullptr), + _spXhrRequestData(nullptr), + _pRequest(nullptr), + _timeOutInMs(0) + { + } + + HttpConnection::~HttpConnection() + { + } + + bool HttpConnection::init(HttpRequest *pRequest, DWORD timeOutInMs) + { + if (_isInitialized || nullptr == pRequest) { + return _isInitialized; + } + + HRESULT hr = CoInitializeEx(NULL, NULL); + + if (SUCCEEDED(hr)) { + hr = CoCreateInstance(CLSID_FreeThreadedXMLHTTP60, NULL, CLSCTX_SERVER, IID_PPV_ARGS(&_spXhr)); + } + + if (SUCCEEDED(hr)) { + hr = MakeAndInitialize(&_spXhrCallback); + } + + if(SUCCEEDED(hr)) { + _pRequest = pRequest; + _timeOutInMs = timeOutInMs; + + LONG size = _pRequest->getRequestDataSize(); + + if(size > 0) { + _spXhrRequestData = Make(); + hr = _spXhrRequestData->Init(_pRequest->getRequestData(), size); + } + } + + return _isInitialized = SUCCEEDED(hr); + } + + bool HttpConnection::open(std::string verb) + { + return open(verb, false, ""); + } + + bool HttpConnection::open(std::string verb, bool userAuthentication) + { + return open(verb, userAuthentication, ""); + } + + bool HttpConnection::open(std::string verb, std::string cookieFile) + { + return open(verb, false, cookieFile); + } + + bool HttpConnection::open(std::string verb, bool userAuthentication, std::string cookieFile) + { + if (!_isInitialized) { + return false; + } + + std::wstring method(verb.begin(), verb.end()); + std::string url(_pRequest->getUrl()); + std::wstring wUrl(url.begin(), url.end()); + HRESULT hr = _spXhr->Open(method.c_str(), wUrl.c_str(), _spXhrCallback.Get(), NULL, NULL, NULL, NULL); + + if(SUCCEEDED(hr) && _timeOutInMs != 0) { + hr = _spXhr->SetProperty(XHR_PROP_TIMEOUT, _timeOutInMs); + } + +#if 0 + if(SUCCEEDED(hr)) { + hr = _spXhr->SetProperty(XHR_PROP_ONDATA_THRESHOLD, READ_BUFFER_MAX); + } +#endif + + auto headers = _pRequest->getHeaders(); + formatHeaders(headers); + + for(auto header : headers) + { + std::string key = header.substr(0, header.find_first_of(':')); + std::string value = header.substr(header.find_first_of(':') + 1, header.size() - 1); + if(SUCCEEDED(hr)) { + hr = _spXhr->SetRequestHeader(std::wstring(key.begin(), key.end()).c_str(), std::wstring(value.begin(), value.end()).c_str()); + } + } + + if(SUCCEEDED(hr) && userAuthentication) { + std::string authHeaders = std::accumulate(headers.begin(), headers.end(), std::string("")); + hr = authenticateUser(verb, url, authHeaders); + } + + if(SUCCEEDED(hr) && !cookieFile.empty()) { + hr = processCookieFile(url, cookieFile); + } + + if(FAILED(hr)) { + cancelRequest(hr); + } + + return SUCCEEDED(hr); + } + + HRESULT HttpConnection::authenticateUser(std::string& verb, std::string& url, std::string& headers) + { + HRESULT hr = S_OK; + std::string authToken; + std::string authSig; + std::string authBody; + + if(_pRequest->getRequestDataSize() > 0) + authBody = _pRequest->getRequestData(); + + if(getAuthenticationToken(verb, url, headers, authBody, authToken, authSig)) { + hr = _spXhr->SetRequestHeader(L"Authorization", std::wstring(authToken.begin(), authToken.end()).c_str()); + + if(SUCCEEDED(hr)) { + hr = _spXhr->SetRequestHeader(L"Signature", std::wstring(authSig.begin(), authSig.end()).c_str()); + } + } + else + { + hr = INET_E_AUTHENTICATION_REQUIRED; + } + + return hr; + } + + HRESULT HttpConnection::processCookieFile(std::string& url, std::string& cookieFile) + { + HRESULT hr = S_OK; + + HttpCookie cookie; + cookie.setCookieFileName(cookieFile); + auto cookies = cookie.getCookies(); + std::string cookieInfo = ""; + int cCnt = 0; + + for(auto iter = cookies->begin(); iter != cookies->end(); iter++) + { + if(url.find(iter->domain) != std::string::npos) + { + std::string keyVal = iter->name; + keyVal.append("="); + keyVal.append(iter->value); + if(cCnt != 0) { + cookieInfo.append(";"); + } + cookieInfo.append(keyVal); + cCnt++; + } + } + + if(!cookieInfo.empty() && nullptr != _spXhr) { + hr = _spXhr->SetRequestHeader(L"Cookie", std::wstring(cookieInfo.begin(), cookieInfo.end()).c_str()); + } + + return hr; + } + + bool HttpConnection::send() + { + if (!_isInitialized) { + return false; + } + + HRESULT hr = E_FAIL; + + if(nullptr == _spXhrRequestData) { + hr = _spXhr->Send(NULL, 0); + } + else { + hr = _spXhr->Send(_spXhrRequestData.Get(), _spXhrRequestData->Length()); + } + + if(SUCCEEDED(hr)) { + DWORD status = 0; + hr = _spXhrCallback->WaitForComplete(&status); + } + else { + cancelRequest(hr); + } + + return SUCCEEDED(hr); + } + + DWORD HttpConnection::getStatusCode() + { + return _spXhrCallback != nullptr ? _spXhrCallback->_statusCode : 500; + } + + std::string HttpConnection::getErrorMessage() + { + return _spXhrCallback != nullptr ? _spXhrCallback->_errorMsg : ERR_MSG_500; + } + + std::vector* HttpConnection::getResponseHeader() + { + return _spXhrCallback != nullptr ? &_spXhrCallback->_headers : nullptr; + } + + std::vector* HttpConnection::getResponseData() + { + return _spXhrCallback != nullptr ? &_spXhrCallback->_data : nullptr; + } + + void HttpConnection::cancelRequest(HRESULT hrError) + { + if(nullptr != _spXhr) { + _spXhr->Abort(); + _spXhrCallback->CompleteRequest(hrError); + } + } +} + +NS_CC_END diff --git a/cocos/network/HttpConnection-winrt.h b/cocos/network/HttpConnection-winrt.h new file mode 100644 index 0000000000..db757fe424 --- /dev/null +++ b/cocos/network/HttpConnection-winrt.h @@ -0,0 +1,157 @@ +/**************************************************************************** +Copyright (c) 2012 greathqy +Copyright (c) 2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +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 "network/HttpRequest.h" +#include "network/HttpClient.h" + +#include +#include +#include +#include + +#include + +#include +#if defined(_XBOX_ONE) +#include +#else +#include +#endif +using namespace Microsoft::WRL; +using namespace Microsoft::WRL::Details; + +#include "base/CCVector.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" + +#include "platform/CCFileUtils.h" + +NS_CC_BEGIN + +namespace network { + + const int READ_BUFFER_MAX = 16 * 1024; + const int REQUEST_BUFFER_MAX = 4 * 1024 * 1024; + + const char ERR_MSG_500[] = "Internal server error"; + const char ERR_MSG_400[] = "Invalid request"; + const char ERR_MSG_401[] = "Authentication is required to access this resource"; + const char ERR_MSG_403[] = "Forbidden"; + const char ERR_MSG_404[] = "Specified resource could not be found"; + const char ERR_MSG_407[] = "Proxy authentication failed"; + const char ERR_MSG_408[] = "Request timed out"; + const char ERR_MSG_412[] = "Request aborted"; + const char ERR_MSG_DL_FLD[] = "The download of the specified resource has failed"; + + class CXHR2Callback : public Microsoft::WRL::RuntimeClass, IXMLHTTPRequest2Callback> + { + public: + CXHR2Callback(); + ~CXHR2Callback(); + + HRESULT RuntimeClassInitialize(); + HRESULT ReadStreamData(ISequentialStream* pResponseStream); + STDMETHODIMP OnRedirect(IXMLHTTPRequest2 *pXHR, const WCHAR *pwszRedirectUrl); + STDMETHODIMP OnHeadersAvailable(IXMLHTTPRequest2 *pXHR, DWORD dwStatus, const WCHAR *pwszStatus); + STDMETHODIMP OnDataAvailable(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream); + STDMETHODIMP OnResponseReceived(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream); + STDMETHODIMP OnError(IXMLHTTPRequest2 *pXHR, HRESULT hrError); + STDMETHODIMP WaitForComplete(PDWORD pdwStatus); + + protected: + void CompleteRequest(HRESULT hrError); + + private: + HANDLE _hWfC; + DWORD _statusCode; + std::string _errorMsg; + std::vector _headers; + std::vector _data; + + friend class HttpConnection; + }; + + class CXHR2DataStream : public Microsoft::WRL::RuntimeClass, ISequentialStream, IDispatch> + { + public: + CXHR2DataStream(); + ~CXHR2DataStream(); + + STDMETHODIMP_(ULONG) Length(); + STDMETHODIMP Init(const void *psBuffer, ULONG cbBufferSize); + + STDMETHODIMP Read(void *pv, ULONG cb, ULONG *pcbRead); + STDMETHODIMP Write(const void *pv, ULONG cb, ULONG *pcbWritten); + + STDMETHODIMP_(ULONG) AddRef(); + STDMETHODIMP_(ULONG) Release(); + STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject); + + STDMETHODIMP GetTypeInfoCount(unsigned int FAR* pctinfo); + STDMETHODIMP GetTypeInfo(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo); + STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgDispId); + STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr); + + private: + ULONG _refCnt; + BYTE* _pData; + ULONG _dataSize; + ULONG _seekIndex; + }; + + class HttpConnection + { + public: + HttpConnection(); + ~HttpConnection(); + + bool init(HttpRequest *pRequest, DWORD timeOutInMs = 0); + bool open(std::string verb); + bool open(std::string verb, bool userAuthentication); + bool open(std::string verb, std::string cookieFile); + bool open(std::string verb, bool userAuthentication, std::string cookieFile); + bool send(); + DWORD getStatusCode(); + std::string getErrorMessage(); + std::vector* getResponseHeader(); + std::vector* getResponseData(); + + protected: + void cancelRequest(HRESULT hrError); + HRESULT authenticateUser(std::string& verb, std::string& url, std::string& headers); + HRESULT processCookieFile(std::string& url, std::string& cookieFile); + + private: + bool _isInitialized; + ComPtr _spXhr; + ComPtr _spXhrCallback; + ComPtr _spXhrRequestData; + DWORD _timeOutInMs; + cocos2d::network::HttpRequest* _pRequest; + }; +} + +NS_CC_END diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp index e1599b8082..b5b502decd 100644 --- a/cocos/platform/CCFileUtils.cpp +++ b/cocos/platform/CCFileUtils.cpp @@ -941,23 +941,6 @@ std::string FileUtils::getFullPathForDirectoryAndFilename(const std::string& dir return ret; } -std::string FileUtils::searchFullPathForFilename(const std::string& filename) const -{ - if (isAbsolutePath(filename)) - { - return filename; - } - std::string path = fullPathForFilename(filename); - if (0 == path.compare(filename)) - { - return ""; - } - else - { - return path; - } -} - bool FileUtils::isFileExist(const std::string& filename) const { if (isAbsolutePath(filename)) @@ -966,7 +949,7 @@ bool FileUtils::isFileExist(const std::string& filename) const } else { - std::string fullpath = searchFullPathForFilename(filename); + std::string fullpath = fullPathForFilename(filename); if (fullpath.empty()) return false; else @@ -1327,7 +1310,7 @@ long FileUtils::getFileSize(const std::string &filepath) std::string fullpath = filepath; if (!isAbsolutePath(filepath)) { - fullpath = searchFullPathForFilename(filepath); + fullpath = fullPathForFilename(filepath); if (fullpath.empty()) return 0; } diff --git a/cocos/platform/CCFileUtils.h b/cocos/platform/CCFileUtils.h index 01505475f4..4646f1299a 100644 --- a/cocos/platform/CCFileUtils.h +++ b/cocos/platform/CCFileUtils.h @@ -478,16 +478,6 @@ protected: */ 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 - * 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 - */ - virtual std::string searchFullPathForFilename(const std::string& filename) const; - - /** Dictionary used to lookup filenames based on a key. * It is used internally by the following methods: * diff --git a/cocos/platform/android/Android.mk b/cocos/platform/android/Android.mk index 3ff757e5bc..90324b197e 100644 --- a/cocos/platform/android/Android.mk +++ b/cocos/platform/android/Android.mk @@ -13,6 +13,7 @@ CCDevice-android.cpp \ CCGLViewImpl-android.cpp \ CCFileUtils-android.cpp \ javaactivity-android.cpp \ +CCEnhanceAPI-android.cpp \ jni/DPIJni.cpp \ jni/IMEJni.cpp \ jni/Java_org_cocos2dx_lib_Cocos2dxAccelerometer.cpp \ diff --git a/cocos/platform/android/CCEnhanceAPI-android.cpp b/cocos/platform/android/CCEnhanceAPI-android.cpp new file mode 100644 index 0000000000..29e1122ba4 --- /dev/null +++ b/cocos/platform/android/CCEnhanceAPI-android.cpp @@ -0,0 +1,105 @@ +/**************************************************************************** + * Samsung API for cocos + * Developed by Game Engine part + * + * Copyright 2015 by Mobile Solution Lab, MSG, SRC-NJ. + * Wang Ying + * All rights reserved. + * + * This software is the confidential and proprietary information of + * Samsung Electronics, Inc. ("Confidential Information"). You + * Shall not disclose such Confidential Information and shall use + * it only in accordance with the terms of the license agreement + * you entered into with Samsung +****************************************************************************/ + + +#include "platform/CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID + +#include "jni/JniHelper.h" +#include "CCEnhanceAPI-android.h" +#include +#include + +#define LOG_TAG "CCEnhanceAPI_android Debug" +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) + +#define CLASS_NAME "org/cocos2dx/lib/Cocos2dxHelper" + +// FIXME: using ndk-r10c will cause the next function could not be found. It may be a bug of ndk-r10c. +// Here is the workaround method to fix the problem. +#ifdef __aarch64__ +extern "C" size_t __ctype_get_mb_cur_max(void) { + return (size_t) sizeof(wchar_t); +} +#endif + +NS_CC_BEGIN + +EnhanceAPI::EnhanceAPI() +{ +} + +EnhanceAPI::~EnhanceAPI() +{ +} + +int EnhanceAPI::setResolutionPercent(int n) +{ + JniMethodInfo t; + int ret = -1; + if(JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setResolutionPercent", "(I)I")) + { + ret = t.env->CallStaticIntMethod(t.classID, t.methodID, n); + } + return ret; +} + +int EnhanceAPI::setFPS(int fps) +{ + JniMethodInfo t; + int ret = -1; + if(JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setFPS", "(I)I")) + { + ret = t.env->CallStaticIntMethod(t.classID, t.methodID, fps); + } + return ret; +} + +int EnhanceAPI::fastLoading(int sec) +{ + JniMethodInfo t; + int ret = -1; + if(JniHelper::getStaticMethodInfo(t, CLASS_NAME, "fastLoading", "(I)I")) + { + ret = t.env->CallStaticIntMethod(t.classID, t.methodID, sec); + } + return ret; +} + +int EnhanceAPI::getTemperature() +{ + JniMethodInfo t; + int ret = -1; + if(JniHelper::getStaticMethodInfo(t, CLASS_NAME, "getTemperature", "()I")) + { + ret = t.env->CallStaticIntMethod(t.classID, t.methodID); + } + return ret; +} + +int EnhanceAPI::setLowPowerMode(bool enable) +{ + JniMethodInfo t; + int ret = -1; + if(JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setLowPowerMode", "(Z)I")) + { + ret = t.env->CallStaticIntMethod(t.classID, t.methodID, enable); + } + return ret; +} +NS_CC_END + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID + diff --git a/cocos/platform/android/CCEnhanceAPI-android.h b/cocos/platform/android/CCEnhanceAPI-android.h new file mode 100644 index 0000000000..ebcee7dbfd --- /dev/null +++ b/cocos/platform/android/CCEnhanceAPI-android.h @@ -0,0 +1,84 @@ +/**************************************************************************** + * Samsung API for cocos + * Developed by Game Engine part + * + * Copyright 2015 by Mobile Solution Lab, MSG, SRC-NJ. + * Wang Ying + * All rights reserved. + * + * This software is the confidential and proprietary information of + * Samsung Electronics, Inc. ("Confidential Information"). You + * Shall not disclose such Confidential Information and shall use + * it only in accordance with the terms of the license agreement + * you entered into with Samsung +****************************************************************************/ + +#ifndef __CC_ENHANCEAPI_ANDROID_H__ +#define __CC_ENHANCEAPI_ANDROID_H__ + +#include "platform/CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID + +#include "platform/CCCommon.h" +#include "platform/CCApplicationProtocol.h" + +NS_CC_BEGIN + +class CC_DLL EnhanceAPI +{ +public: + /** + * @js ctor + */ + EnhanceAPI(); + /** + * @js NA + * @lua NA + */ + virtual ~EnhanceAPI(); + + /** + @brief call gameservice setResolutionSize API. + @param the optimized percent value. + @return success: 0, fail: -1. + */ + static int setResolutionPercent(int n); + + /** + @brief call gameservice setFPS API. + @param the fps value. + @return success: 0, fail: -1. + */ + static int setFPS(int fps); + + /** + @brief call gameservice fastLoading API. + @param the fast loading seconds. + @return success: 0, fail: -1. + */ + static int fastLoading(int sec); + + /** + @brief call gameservice getTemperature API. + @return -1: fail to get temperature + 0: normal temperature + 1: high + 2,3: very high + */ + static int getTemperature(); + + /** + @brief call gameservice setLowPowerMode API. + @return -1: fail to get temperature + 0: normal temperature + 1: high + 2,3: very high + */ + static int setLowPowerMode(bool enable); +}; + +NS_CC_END + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID + +#endif // __CC_ENHANCEAPI_ANDROID_H__ \ No newline at end of file diff --git a/cocos/platform/android/java/src/com/enhance/gameservice/IGameTuningService.aidl b/cocos/platform/android/java/src/com/enhance/gameservice/IGameTuningService.aidl new file mode 100644 index 0000000000..f584c53d5b --- /dev/null +++ b/cocos/platform/android/java/src/com/enhance/gameservice/IGameTuningService.aidl @@ -0,0 +1,10 @@ +package com.enhance.gameservice; + +interface IGameTuningService +{ + int setPreferredResolution(int resolution); + int setFramePerSecond(int fps); + int boostUp(int seconds); + int getAbstractTemperature(); + int setGamePowerSaving(boolean enable); +} \ No newline at end of file diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java index 9138e22b2d..da96a2fcc9 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java @@ -33,6 +33,7 @@ import java.lang.Runnable; import com.chukong.cocosplay.client.CocosPlayClient; import android.app.Activity; +import android.content.ComponentName; //Enhance API modification import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -40,10 +41,15 @@ import android.content.pm.ApplicationInfo; import android.content.res.AssetManager; import android.net.Uri; import android.os.Build; +import android.os.IBinder; //Enhance API modification import android.preference.PreferenceManager.OnActivityResultListener; import android.util.DisplayMetrics; +import android.util.Log; //Enhance API modification import android.view.Display; import android.view.WindowManager; +import android.content.ServiceConnection; //Enhance API modification + +import com.enhance.gameservice.IGameTuningService; //Enhance API modification public class Cocos2dxHelper { // =========================================================== @@ -67,7 +73,10 @@ public class Cocos2dxHelper { private static Activity sActivity = null; private static Cocos2dxHelperListener sCocos2dxHelperListener; private static Set onActivityResultListeners = new LinkedHashSet(); - + //Enhance API modification begin + private static IGameTuningService mGameServiceBinder = null; + private static final int BOOST_TIME = 7; + //Enhance API modification end // =========================================================== // Constructors @@ -104,10 +113,26 @@ public class Cocos2dxHelper { sActivity = activity; sInited = true; - + + //Enhance API modification begin + activity.getApplicationContext().bindService(new Intent(IGameTuningService.class.getName()), connection, Context.BIND_AUTO_CREATE); + //Enhance API modification end } } + //Enhance API modification begin + private static ServiceConnection connection = new ServiceConnection() { + public void onServiceConnected(ComponentName name, IBinder service) { + mGameServiceBinder = IGameTuningService.Stub.asInterface(service); + fastLoading(BOOST_TIME); + } + + public void onServiceDisconnected(ComponentName name) { + sActivity.getApplicationContext().unbindService(connection); + } + }; + //Enhance API modification end + public static Activity getActivity() { return sActivity; } @@ -424,4 +449,66 @@ public class Cocos2dxHelper { public void runOnGLThread(final Runnable pRunnable); } + + //Enhance API modification begin + public static int setResolutionPercent(int per) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.setPreferredResolution(per); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + + public static int setFPS(int fps) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.setFramePerSecond(fps); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + + public static int fastLoading(int sec) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.boostUp(sec); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + + public static int getTemperature() { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.getAbstractTemperature(); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + + public static int setLowPowerMode(boolean enable) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.setGamePowerSaving(enable); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); + return -1; + } + } + //Enhance API modification end } diff --git a/cocos/platform/android/libcocos2dx-with-controller/build.gradle b/cocos/platform/android/libcocos2dx-with-controller/build.gradle index 763d27285f..414f01b9e0 100644 --- a/cocos/platform/android/libcocos2dx-with-controller/build.gradle +++ b/cocos/platform/android/libcocos2dx-with-controller/build.gradle @@ -26,5 +26,4 @@ android { dependencies { compile fileTree(dir: '../ControllerManualAdapter/libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' } diff --git a/cocos/platform/android/libcocos2dx-with-controller/libcocos2dx_with_controller.iml b/cocos/platform/android/libcocos2dx-with-controller/libcocos2dx_with_controller.iml deleted file mode 100644 index 229611ed32..0000000000 --- a/cocos/platform/android/libcocos2dx-with-controller/libcocos2dx_with_controller.iml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cocos/platform/android/libcocos2dx/build.gradle b/cocos/platform/android/libcocos2dx/build.gradle index 392584e71c..c1ba45da12 100644 --- a/cocos/platform/android/libcocos2dx/build.gradle +++ b/cocos/platform/android/libcocos2dx/build.gradle @@ -26,5 +26,4 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' } diff --git a/cocos/platform/win32/CCPlatformDefine-win32.h b/cocos/platform/win32/CCPlatformDefine-win32.h index fe0559b5f7..0d6b52da36 100644 --- a/cocos/platform/win32/CCPlatformDefine-win32.h +++ b/cocos/platform/win32/CCPlatformDefine-win32.h @@ -60,6 +60,20 @@ THE SOFTWARE. #endif #endif +#if _MSC_VER > 1800 +#pragma comment(lib,"libpng-2015.lib") +#pragma comment(lib,"libjpeg-2015.lib") +#pragma comment(lib,"libtiff-2015.lib") +#pragma comment(lib,"glfw3-2015.lib") +#pragma comment(lib,"libchipmunk-2015.lib") +#else +#pragma comment(lib,"libpng.lib") +#pragma comment(lib,"libjpeg.lib") +#pragma comment(lib,"libtiff.lib") +#pragma comment(lib,"glfw3.lib") +#pragma comment(lib,"libchipmunk.lib") +#endif + #endif //s CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos/platform/winrt/CCFileUtilsWinRT.cpp b/cocos/platform/winrt/CCFileUtilsWinRT.cpp index 1ceea45d1c..897d999f86 100644 --- a/cocos/platform/winrt/CCFileUtilsWinRT.cpp +++ b/cocos/platform/winrt/CCFileUtilsWinRT.cpp @@ -134,7 +134,10 @@ bool CCFileUtilsWinRT::isAbsolutePath(const std::string& strPath) const static Data getData(const std::string& filename, bool forString) { - CCASSERT(!filename.empty(), "Invalid filename!"); + if (filename.empty()) + { + CCASSERT(!filename.empty(), "Invalid filename!"); + } Data ret; unsigned char* buffer = nullptr; diff --git a/cocos/platform/winrt/CCWinRTUtils.cpp b/cocos/platform/winrt/CCWinRTUtils.cpp index 0e4c113f11..2eed1618c7 100644 --- a/cocos/platform/winrt/CCWinRTUtils.cpp +++ b/cocos/platform/winrt/CCWinRTUtils.cpp @@ -28,6 +28,7 @@ THE SOFTWARE. #endif #include #include +#include #include #include #include @@ -104,6 +105,7 @@ Platform::String^ PlatformStringFromString(const std::string& s) return ref new Platform::String(ws.data(), ws.length()); } +#if 0 // Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. float ConvertDipsToPixels(float dips) { @@ -115,7 +117,7 @@ float getScaledDPIValue(float v) { auto dipFactor = DisplayProperties::LogicalDpi / 96.0f; return v * dipFactor; } - +#endif void CC_DLL CCLogIPAddresses() { @@ -267,5 +269,73 @@ Concurrency::task^> ReadDataAsync(Platform::String^ path) }); } +std::string computeHashForFile(const std::string& filePath) +{ + std::string ret = filePath; + int pos = std::string::npos; + pos = ret.find_last_of('/'); + + if (pos != std::string::npos) { + ret = ret.substr(pos); + } + + pos = ret.find_last_of('.'); + + if (pos != std::string::npos) { + ret = ret.substr(0, pos); + } + + CREATEFILE2_EXTENDED_PARAMETERS extParams = { 0 }; + extParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; + extParams.dwFileFlags = FILE_FLAG_RANDOM_ACCESS; + extParams.dwSecurityQosFlags = SECURITY_ANONYMOUS; + extParams.dwSize = sizeof(extParams); + extParams.hTemplateFile = nullptr; + extParams.lpSecurityAttributes = nullptr; + + Microsoft::WRL::Wrappers::FileHandle file(CreateFile2(std::wstring(filePath.begin(), filePath.end()).c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extParams)); + + if (file.Get() != INVALID_HANDLE_VALUE) { + FILE_BASIC_INFO fInfo = { 0 }; + if (GetFileInformationByHandleEx(file.Get(), FileBasicInfo, &fInfo, sizeof(FILE_BASIC_INFO))) { + std::stringstream ss; + ss << ret << "_"; + ss << fInfo.CreationTime.QuadPart; + ss << fInfo.ChangeTime.QuadPart; + ret = ss.str(); + } + } + + return ret; +} + +bool createMappedCacheFile(const std::string& srcFilePath, std::string& cacheFilePath, std::string ext) +{ + bool ret = false; + auto folderPath = FileUtils::getInstance()->getWritablePath(); + cacheFilePath = folderPath + computeHashForFile(srcFilePath) + ext; + std::string prevFile = UserDefault::getInstance()->getStringForKey(srcFilePath.c_str()); + + if (prevFile == cacheFilePath) { + ret = FileUtils::getInstance()->isFileExist(cacheFilePath); + } + else { + FileUtils::getInstance()->removeFile(prevFile); + } + + UserDefault::getInstance()->setStringForKey(srcFilePath.c_str(), cacheFilePath); + return ret; +} + +void destroyMappedCacheFile(const std::string& key) +{ + std::string value = UserDefault::getInstance()->getStringForKey(key.c_str()); + + if (!value.empty()) { + FileUtils::getInstance()->removeFile(value); + } + + UserDefault::getInstance()->setStringForKey(key.c_str(), ""); +} NS_CC_END diff --git a/cocos/platform/winrt/CCWinRTUtils.h b/cocos/platform/winrt/CCWinRTUtils.h index 986fb0dc90..9f791dd1ea 100644 --- a/cocos/platform/winrt/CCWinRTUtils.h +++ b/cocos/platform/winrt/CCWinRTUtils.h @@ -53,6 +53,14 @@ void CC_DLL CCLogIPAddresses(); std::string CC_DLL getDeviceIPAddresses(); +std::string computeHashForFile(const std::string& filePath); + +// creates a cache file path corresponding to given source file. +// srcFilePath - source file. +// cacheFilePath - cache file path to be used to save cache. +// return true if file already exists +bool createMappedCacheFile(/*In*/ const std::string& srcFilePath, /*Out*/ std::string& cacheFilePath, /*Optional*/ std::string ext = ""); +void destroyMappedCacheFile(const std::string& key); NS_CC_END diff --git a/cocos/platform/winrt/DirectXBase.cpp b/cocos/platform/winrt/DirectXBase.cpp deleted file mode 100644 index 21e1359e6f..0000000000 --- a/cocos/platform/winrt/DirectXBase.cpp +++ /dev/null @@ -1,470 +0,0 @@ -//----------------------------------------------------------------------------------------------- -// Copyright (c) 2012 Andrew Garrison -//----------------------------------------------------------------------------------------------- -// 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 "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "DirectXBase.h" -#include -#include - -using namespace Microsoft::WRL; -using namespace Windows::UI::Core; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::Foundation; -using namespace Windows::Graphics::Display; -using namespace D2D1; - -// Constructor. -DirectXBase::DirectXBase() : - m_dpi(-1.0f) -{ -} - -// Initialize the DirectX resources required to run. -void DirectXBase::Initialize(CoreWindow^ window, SwapChainBackgroundPanel^ panel, float dpi) -{ - m_window = window; - m_panel = panel; - - CreateDeviceIndependentResources(); - CreateDeviceResources(); - SetDpi(dpi); -} - -// These are the resources required independent of the device. -void DirectXBase::CreateDeviceIndependentResources() -{ - D2D1_FACTORY_OPTIONS options; - ZeroMemory(&options, sizeof(D2D1_FACTORY_OPTIONS)); - -#if defined(_DEBUG) - // If the project is in a debug build, enable Direct2D debugging via SDK Layers - options.debugLevel = D2D1_DEBUG_LEVEL_INFORMATION; -#endif - - DX::ThrowIfFailed( - D2D1CreateFactory( - D2D1_FACTORY_TYPE_SINGLE_THREADED, - __uuidof(ID2D1Factory1), - &options, - &m_d2dFactory - ) - ); - - DX::ThrowIfFailed( - DWriteCreateFactory( - DWRITE_FACTORY_TYPE_SHARED, - __uuidof(IDWriteFactory), - &m_dwriteFactory - ) - ); - - DX::ThrowIfFailed( - CoCreateInstance( - CLSID_WICImagingFactory, - nullptr, - CLSCTX_INPROC_SERVER, - IID_PPV_ARGS(&m_wicFactory) - ) - ); -} - -// These are the resources that depend on the device. -void DirectXBase::CreateDeviceResources() -{ - // This flag adds support for surfaces with a different color channel ordering than the API default. - // It is recommended usage, and is required for compatibility with Direct2D. - UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT; - ComPtr dxgiDevice; - -#if defined(_DEBUG) - // If the project is in a debug build, enable debugging via SDK Layers with this flag. - creationFlags |= D3D11_CREATE_DEVICE_DEBUG; -#endif - - // This array defines the set of DirectX hardware feature levels this app will support. - // Note the ordering should be preserved. - // Don't forget to declare your application's minimum required feature level in its - // description. All applications are assumed to support 9.1 unless otherwise stated. - D3D_FEATURE_LEVEL featureLevels[] = - { - D3D_FEATURE_LEVEL_11_1, - D3D_FEATURE_LEVEL_11_0, - D3D_FEATURE_LEVEL_10_1, - D3D_FEATURE_LEVEL_10_0, - D3D_FEATURE_LEVEL_9_3, - D3D_FEATURE_LEVEL_9_2, - D3D_FEATURE_LEVEL_9_1 - }; - - // Create the DX11 API device object, and get a corresponding context. - ComPtr device; - ComPtr context; - DX::ThrowIfFailed( - D3D11CreateDevice( - nullptr, // specify null to use the default adapter - D3D_DRIVER_TYPE_HARDWARE, - 0, // leave as 0 unless software device - creationFlags, // optionally set debug and Direct2D compatibility flags - featureLevels, // list of feature levels this app can support - ARRAYSIZE(featureLevels), // number of entries in above list - D3D11_SDK_VERSION, // always set this to D3D11_SDK_VERSION for Metro style apps - &device, // returns the Direct3D device created - &m_featureLevel, // returns feature level of device created - &context // returns the device immediate context - ) - ); - - // Get the DirectX11.1 device by QI off the DirectX11 one. - DX::ThrowIfFailed( - device.As(&m_d3dDevice) - ); - - // And get the corresponding device context in the same way. - DX::ThrowIfFailed( - context.As(&m_d3dContext) - ); - - // Obtain the underlying DXGI device of the Direct3D11.1 device. - DX::ThrowIfFailed( - m_d3dDevice.As(&dxgiDevice) - ); - - // Obtain the Direct2D device for 2-D rendering. - DX::ThrowIfFailed( - m_d2dFactory->CreateDevice(dxgiDevice.Get(), &m_d2dDevice) - ); - - // And get its corresponding device context object. - DX::ThrowIfFailed( - m_d2dDevice->CreateDeviceContext( - D2D1_DEVICE_CONTEXT_OPTIONS_NONE, - &m_d2dContext - ) - ); - - // Release the swap chain (if it exists) as it will be incompatible with the new device. - m_swapChain = nullptr; -} - -// Helps track the DPI in the helper class. -// This is called in the dpiChanged event handler in the view class. -void DirectXBase::SetDpi(float dpi) -{ - if (dpi != m_dpi) - { - // Save the DPI of this display in our class. - m_dpi = dpi; - - // Update Direct2D's stored DPI. - m_d2dContext->SetDpi(m_dpi, m_dpi); - - // Often a DPI change implies a window size change. In some cases Windows will issues - // both a size changed event and a DPI changed event. In this case, the resulting bounds - // will not change, and the window resize code will only be executed once. - UpdateForWindowSizeChange(); - } -} - -// This routine is called in the event handler for the view SizeChanged event. -void DirectXBase::UpdateForWindowSizeChange() -{ - // Only handle window size changed if there is no pending DPI change. - if (m_dpi != DisplayProperties::LogicalDpi) - return; - - if (m_window->Bounds.Width != m_windowBounds.Width || - m_window->Bounds.Height != m_windowBounds.Height) - { - m_d2dContext->SetTarget(nullptr); - m_d2dTargetBitmap = nullptr; - m_renderTargetView = nullptr; - m_depthStencilView = nullptr; - CreateWindowSizeDependentResources(); - } -} - -// Allocate all memory resources that change on a window SizeChanged event. -void DirectXBase::CreateWindowSizeDependentResources() -{ - // Store the window bounds so the next time we get a SizeChanged event we can - // avoid rebuilding everything if the size is identical. - m_windowBounds = m_window->Bounds; - - // Calculate the necessary swap chain and render target size in pixels. - m_renderTargetSize.Width = ConvertDipsToPixels(m_windowBounds.Width); - m_renderTargetSize.Height = ConvertDipsToPixels(m_windowBounds.Height); - - // If the swap chain already exists, resize it. - if (m_swapChain != nullptr) - { - DX::ThrowIfFailed( - m_swapChain->ResizeBuffers( - 2, - static_cast(m_renderTargetSize.Width), - static_cast(m_renderTargetSize.Height), - DXGI_FORMAT_B8G8R8A8_UNORM, - 0 - ) - ); - } - // Otherwise, create a new one. - else - { - // Allocate a descriptor. - DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0}; - swapChainDesc.Width = static_cast(m_renderTargetSize.Width); // Match the size of the windowm. - swapChainDesc.Height = static_cast(m_renderTargetSize.Height); - swapChainDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; // This is the most common swapchain format. - swapChainDesc.Stereo = false; - swapChainDesc.SampleDesc.Count = 1; // Don't use multi-sampling. - swapChainDesc.SampleDesc.Quality = 0; - swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - swapChainDesc.BufferCount = 2; // Use double buffering to enable flip. - swapChainDesc.Scaling = DXGI_SCALING_STRETCH; - swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; // All Metro style apps must use this SwapEffect. - swapChainDesc.Flags = 0; - - // Once the desired swap chain description is configured, it must be created on the same adapter as our D3D Device. - - // First, retrieve the underlying DXGI Device from the D3D Device. - ComPtr dxgiDevice; - DX::ThrowIfFailed( - m_d3dDevice.As(&dxgiDevice) - ); - - // Identify the physical adapter (GPU or card) this device is running on. - ComPtr dxgiAdapter; - DX::ThrowIfFailed( - dxgiDevice->GetAdapter(&dxgiAdapter) - ); - - // And obtain the factory object that created it. - ComPtr dxgiFactory; - DX::ThrowIfFailed( - dxgiAdapter->GetParent(IID_PPV_ARGS(&dxgiFactory)) - ); - - // Create the swap chain and then associate it with the SwapChainBackgroundPanel. - DX::ThrowIfFailed( - dxgiFactory->CreateSwapChainForComposition( - m_d3dDevice.Get(), - &swapChainDesc, - nullptr, - &m_swapChain - ) - ); - - ComPtr panelNative; - DX::ThrowIfFailed( - reinterpret_cast(m_panel)->QueryInterface(IID_PPV_ARGS(&panelNative)) - ); - - DX::ThrowIfFailed( - panelNative->SetSwapChain(m_swapChain.Get()) - ); - - // Ensure that DXGI does not queue more than one frame at a time. This both reduces - // latency and ensures that the application will only render after each VSync, minimizing - // power consumption. - DX::ThrowIfFailed( - dxgiDevice->SetMaximumFrameLatency(1) - ); - } - - // Obtain the backbuffer for this window which will be the final 3D rendertarget. - ComPtr backBuffer; - DX::ThrowIfFailed( - m_swapChain->GetBuffer(0, IID_PPV_ARGS(&backBuffer)) - ); - - // Create a view interface on the rendertarget to use on bind. - DX::ThrowIfFailed( - m_d3dDevice->CreateRenderTargetView( - backBuffer.Get(), - nullptr, - &m_renderTargetView - ) - ); - - // Create a descriptor for the depth/stencil buffer. - CD3D11_TEXTURE2D_DESC depthStencilDesc( - DXGI_FORMAT_D24_UNORM_S8_UINT, - static_cast(m_renderTargetSize.Width), - static_cast(m_renderTargetSize.Height), - 1, - 1, - D3D11_BIND_DEPTH_STENCIL - ); - - // Allocate a 2-D surface as the depth/stencil buffer. - ComPtr depthStencil; - DX::ThrowIfFailed( - m_d3dDevice->CreateTexture2D( - &depthStencilDesc, - nullptr, - &depthStencil - ) - ); - - // Create a DepthStencil view on this surface to use on bind. - CD3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc(D3D11_DSV_DIMENSION_TEXTURE2D); - DX::ThrowIfFailed( - m_d3dDevice->CreateDepthStencilView( - depthStencil.Get(), - &depthStencilViewDesc, - &m_depthStencilView - ) - ); - - // Create a viewport descriptor of the full window size. - CD3D11_VIEWPORT viewport( - 0.0f, - 0.0f, - m_renderTargetSize.Width, - m_renderTargetSize.Height - ); - - // Set the current viewport using the descriptor. - m_d3dContext->RSSetViewports(1, &viewport); - - // Now we set up the Direct2D render target bitmap linked to the swapchain. - // Whenever we render to this bitmap, it will be directly rendered to the - // swapchain associated with the window. - D2D1_BITMAP_PROPERTIES1 bitmapProperties = - BitmapProperties1( - D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW, - PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), - m_dpi, - m_dpi - ); - - // Direct2D needs the DXGI version of the backbuffer surface pointer. - ComPtr dxgiBackBuffer; - DX::ThrowIfFailed( - m_swapChain->GetBuffer(0, IID_PPV_ARGS(&dxgiBackBuffer)) - ); - - // Get a D2D surface from the DXGI back buffer to use as the D2D render target. - DX::ThrowIfFailed( - m_d2dContext->CreateBitmapFromDxgiSurface( - dxgiBackBuffer.Get(), - &bitmapProperties, - &m_d2dTargetBitmap - ) - ); - - // So now we can set the Direct2D render target. - m_d2dContext->SetTarget(m_d2dTargetBitmap.Get()); - - // Set D2D text anti-alias mode to Grayscale to ensure proper rendering of text on intermediate surfaces. - m_d2dContext->SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE); - - // Set the blend function. - ID3D11BlendState* g_pBlendState = NULL; - D3D11_BLEND_DESC blendDesc; - ZeroMemory(&blendDesc, sizeof(D3D11_BLEND_DESC)); - blendDesc.AlphaToCoverageEnable = false; - blendDesc.IndependentBlendEnable = false; - D3D11_RENDER_TARGET_BLEND_DESC rtBlendDesc; - rtBlendDesc.BlendEnable = false; - rtBlendDesc.SrcBlend = D3D11_BLEND_SRC_ALPHA; - rtBlendDesc.DestBlend = D3D11_BLEND_INV_SRC_ALPHA; - rtBlendDesc.BlendOp = D3D11_BLEND_OP_ADD; - rtBlendDesc.SrcBlendAlpha = D3D11_BLEND_ZERO; - rtBlendDesc.DestBlendAlpha = D3D11_BLEND_ZERO; - rtBlendDesc.BlendOpAlpha = D3D11_BLEND_OP_ADD; - rtBlendDesc.RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; - blendDesc.RenderTarget[0] = rtBlendDesc; - - auto hr1 = m_d3dDevice->CreateBlendState(&blendDesc, &g_pBlendState); - m_d3dContext->OMSetBlendState(g_pBlendState, 0, 0xffffffff); - - D3D11_DEPTH_STENCIL_DESC dsDesc; - // Depth test parameters - dsDesc.DepthEnable = false; - dsDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; - dsDesc.DepthFunc = D3D11_COMPARISON_LESS; - - // Stencil test parameters - dsDesc.StencilEnable = true; - dsDesc.StencilReadMask = 0xFF; - dsDesc.StencilWriteMask = 0xFF; - - // Stencil operations if pixel is front-facing - dsDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; - dsDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR; - dsDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; - dsDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS; - - // Stencil operations if pixel is back-facing - dsDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; - dsDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR; - dsDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; - dsDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS; - - // Create depth stencil state - ID3D11DepthStencilState * pDSState; - m_d3dDevice->CreateDepthStencilState(&dsDesc, &pDSState); - m_d3dContext->OMSetDepthStencilState(pDSState, 1); - m_d3dContext->OMSetRenderTargets(1, m_renderTargetView.GetAddressOf(), m_depthStencilView.Get()); -} - -// Method to deliver the final image to the display. -void DirectXBase::Present() -{ - // The application may optionally specify "dirty" or "scroll" rects to improve efficiency - // in certain scenarios. - DXGI_PRESENT_PARAMETERS parameters = {0}; - parameters.DirtyRectsCount = 0; - parameters.pDirtyRects = nullptr; - parameters.pScrollRect = nullptr; - parameters.pScrollOffset = nullptr; - - - - // The first argument instructs DXGI to block until VSync, putting the application - // to sleep until the next VSync. This ensures we don't waste any cycles rendering - // frames that will never be displayed to the screen. - HRESULT hr = m_swapChain->Present1(1, 0, ¶meters); - m_d3dContext->OMSetRenderTargets(1,m_renderTargetView.GetAddressOf(),m_depthStencilView.Get()); - - - - // If the device was removed either by a disconnect or a driver upgrade, we - // must completely reinitialize the renderer. - if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET) - { - Initialize(m_window.Get(), m_panel, m_dpi); - } - else - { - DX::ThrowIfFailed(hr); - } -} - -// Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. -float DirectXBase::ConvertDipsToPixels(float dips) -{ - static const float dipsPerInch = 96.0f; - return floor(dips * m_dpi / dipsPerInch + 0.5f); // Round to nearest integer. -} - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/DirectXBase.h b/cocos/platform/winrt/DirectXBase.h deleted file mode 100644 index 87f3aef4cc..0000000000 --- a/cocos/platform/winrt/DirectXBase.h +++ /dev/null @@ -1,83 +0,0 @@ -//----------------------------------------------------------------------------------------------- -// Copyright (c) 2012 Andrew Garrison -//----------------------------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------------------------- -#pragma once - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include -#include -#include -#include -#include -#include -#include -#include -#include "DirectXHelper.h" - -#pragma warning (disable: 4449) -using namespace Windows::UI::ViewManagement; - -// Helper class that initializes DirectX APIs -ref class DirectXBase abstract -{ -internal: - DirectXBase(); - -public: - virtual void Initialize(Windows::UI::Core::CoreWindow^ window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ panel, float dpi); - virtual void CreateDeviceIndependentResources(); - virtual void CreateDeviceResources(); - virtual void SetDpi(float dpi); - virtual void CreateWindowSizeDependentResources(); - virtual void UpdateForWindowSizeChange(); - virtual void Present(); - virtual float ConvertDipsToPixels(float dips); - -protected private: - - Platform::Agile m_window; - Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ m_panel; - - // Direct2D Objects - Microsoft::WRL::ComPtr m_d2dFactory; - Microsoft::WRL::ComPtr m_d2dDevice; - Microsoft::WRL::ComPtr m_d2dContext; - Microsoft::WRL::ComPtr m_d2dTargetBitmap; - - // DirectWrite & Windows Imaging Component Objects - Microsoft::WRL::ComPtr m_dwriteFactory; - Microsoft::WRL::ComPtr m_wicFactory; - - // Direct3D Objects - Microsoft::WRL::ComPtr m_d3dDevice; - Microsoft::WRL::ComPtr m_d3dContext; - Microsoft::WRL::ComPtr m_swapChain; - Microsoft::WRL::ComPtr m_renderTargetView; - Microsoft::WRL::ComPtr m_depthStencilView; - - D3D_FEATURE_LEVEL m_featureLevel; - Windows::Foundation::Size m_renderTargetSize; - Windows::Foundation::Rect m_windowBounds; - float m_dpi; -}; - -#pragma warning (default: 4449) - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/DirectXHelper.h b/cocos/platform/winrt/DirectXHelper.h deleted file mode 100644 index 9ff8d58538..0000000000 --- a/cocos/platform/winrt/DirectXHelper.h +++ /dev/null @@ -1,38 +0,0 @@ -//----------------------------------------------------------------------------------------------- -// Copyright (c) 2012 Andrew Garrison -//----------------------------------------------------------------------------------------------- -// 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. -//----------------------------------------------------------------------------------------------- -#pragma once - - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -// Helper utilities to make Win32 APIs work with exceptions. -namespace DX -{ - inline void ThrowIfFailed(HRESULT hr) - { - if (FAILED(hr)) - { - // Set a breakpoint on this line to catch Win32 API errors. - throw Platform::Exception::CreateException(hr); - } - } -} - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/renderer/CCMaterial.cpp b/cocos/renderer/CCMaterial.cpp index d81d915dab..490e7e7727 100644 --- a/cocos/renderer/CCMaterial.cpp +++ b/cocos/renderer/CCMaterial.cpp @@ -110,7 +110,7 @@ bool Material::initWithFile(const std::string& validfilename) bytes[data.getSize()-1]='\0'; // Warning: properties is not a "Ref" object, must be manually deleted - Properties* properties = Properties::createWithoutAutorelease(validfilename); + Properties* properties = Properties::createNonRefCounted(validfilename); // get the first material parseProperties((strlen(properties->getNamespace()) > 0) ? properties : properties->getNextNamespace()); diff --git a/cocos/renderer/CCMeshCommand.cpp b/cocos/renderer/CCMeshCommand.cpp index d4698d1b48..3f1e8faa87 100644 --- a/cocos/renderer/CCMeshCommand.cpp +++ b/cocos/renderer/CCMeshCommand.cpp @@ -49,23 +49,16 @@ NS_CC_BEGIN MeshCommand::MeshCommand() : _textureID(0) , _glProgramState(nullptr) -, _blendType(BlendFunc::DISABLE) , _displayColor(1.0f, 1.0f, 1.0f, 1.0f) , _matrixPalette(nullptr) , _matrixPaletteSize(0) , _materialID(0) , _vao(0) -, _cullFaceEnabled(false) -, _cullFace(GL_BACK) -, _depthTestEnabled(false) -, _depthWriteEnabled(false) -, _forceDepthWrite(false) -, _renderStateCullFaceEnabled(false) -, _renderStateDepthTest(false) -, _renderStateDepthWrite(GL_FALSE) , _material(nullptr) +, _stateBlock(nullptr) { _type = RenderCommand::Type::MESH_COMMAND; + #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) // listen the event that renderer was recreated on Android/WP8 _rendererRecreatedListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, CC_CALLBACK_1(MeshCommand::listenRendererRecreated, this)); @@ -100,40 +93,30 @@ void MeshCommand::init(float globalZOrder, _is3D = true; } -void MeshCommand::init(float globalOrder, - GLuint textureID, - GLProgramState* glProgramState, - BlendFunc blendType, - GLuint vertexBuffer, - GLuint indexBuffer, - GLenum primitive, - GLenum indexFormat, - ssize_t indexCount, - const Mat4 &mv) -{ - init(globalOrder, textureID, glProgramState, blendType, vertexBuffer, indexBuffer, primitive, indexFormat, indexCount, mv, 0); -} - void MeshCommand::init(float globalZOrder, GLuint textureID, - cocos2d::GLProgramState *glProgramState, - cocos2d::BlendFunc blendType, + GLProgramState* glProgramState, + RenderState::StateBlock* stateBlock, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexFormat, ssize_t indexCount, - const cocos2d::Mat4 &mv, + const cocos2d::Mat4& mv, uint32_t flags) { CCASSERT(glProgramState, "GLProgramState cannot be nill"); - + CCASSERT(stateBlock, "StateBlock cannot be nill"); + CCASSERT(!_material, "cannot init with GLProgramState if previously inited without GLProgramState"); + RenderCommand::init(globalZOrder, mv, flags); _globalOrder = globalZOrder; _textureID = textureID; - _blendType = blendType; + + // weak ref _glProgramState = glProgramState; + _stateBlock = stateBlock; _vertexBuffer = vertexBuffer; _indexBuffer = indexBuffer; @@ -143,36 +126,9 @@ void MeshCommand::init(float globalZOrder, _mv.set(mv); _is3D = true; + } -void MeshCommand::setCullFaceEnabled(bool enable) -{ - CCASSERT(!_material, "If using material, you should call material->setCullFace()"); - - _cullFaceEnabled = enable; -} - -void MeshCommand::setCullFace(GLenum cullFace) -{ - CCASSERT(!_material, "If using material, you should call material->setCullFaceSide()"); - - _cullFace = cullFace; -} - -void MeshCommand::setDepthTestEnabled(bool enable) -{ - CCASSERT(!_material, "If using material, you should call material->setDepthTest()"); - - _depthTestEnabled = enable; -} - -void MeshCommand::setDepthWriteEnabled(bool enable) -{ - CCASSERT(!_material, "If using material, you should call material->setDepthWrite()"); - - _forceDepthWrite = enable; - _depthWriteEnabled = enable; -} void MeshCommand::setDisplayColor(const Vec4& color) { @@ -195,24 +151,6 @@ void MeshCommand::setMatrixPaletteSize(int size) _matrixPaletteSize = size; } -void MeshCommand::setTransparent(bool value) -{ - CCASSERT(!_material, "If using material, you shouldn't call setTransparent."); - - _isTransparent = value; - //Skip batching for transparent mesh - _skipBatching = value; - - if (_isTransparent && !_forceDepthWrite) - { - _depthWriteEnabled = false; - } - else - { - _depthWriteEnabled = true; - } -} - MeshCommand::~MeshCommand() { releaseVAO(); @@ -224,67 +162,12 @@ MeshCommand::~MeshCommand() void MeshCommand::applyRenderState() { CCASSERT(!_material, "Must not be called when using materials"); + CCASSERT(_stateBlock, "StateBlock must be non null"); // blend and texture GL::bindTexture2D(_textureID); - GL::blendFunc(_blendType.src, _blendType.dst); - // cull face - _renderStateCullFaceEnabled = glIsEnabled(GL_CULL_FACE) != GL_FALSE; - GLint cullface; - glGetIntegerv(GL_CULL_FACE_MODE, &cullface); - _renderStateCullFace = (GLenum)cullface; - - if (_cullFaceEnabled != _renderStateCullFaceEnabled) - { - _cullFaceEnabled ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE); - } - - if (_cullFace != _renderStateCullFace) - { - glCullFace(_cullFace); - } - - // depth - _renderStateDepthTest = (glIsEnabled(GL_DEPTH_TEST) != GL_FALSE); - glGetBooleanv(GL_DEPTH_WRITEMASK, &_renderStateDepthWrite); - - if (_depthTestEnabled != _renderStateDepthTest) - { - _depthTestEnabled ? glEnable(GL_DEPTH_TEST) : glDisable(GL_DEPTH_TEST); - } - - if (_depthWriteEnabled != _renderStateDepthWrite) - { - glDepthMask(_depthWriteEnabled); - } -} - -void MeshCommand::restoreRenderState() -{ - CCASSERT(!_material, "Must not be called when using Material"); - - // cull - if (_cullFaceEnabled != _renderStateCullFaceEnabled) - { - _renderStateCullFaceEnabled ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE); - } - - if (_cullFace != _renderStateCullFace) - { - glCullFace(_renderStateCullFace); - } - - // depth - if (_depthTestEnabled != _renderStateDepthTest) - { - _renderStateDepthTest ? glEnable(GL_DEPTH_TEST) : glDisable(GL_DEPTH_TEST); - } - - if (_depthWriteEnabled != _renderStateDepthWrite) - { - glDepthMask(_renderStateDepthWrite); - } + _stateBlock->bind(); } void MeshCommand::genMaterialID(GLuint texID, void* glProgramState, GLuint vertexBuffer, GLuint indexBuffer, BlendFunc blend) @@ -353,9 +236,6 @@ void MeshCommand::batchDraw() // Draw glDrawElements(_primitive, (GLsizei)_indexCount, _indexFormat, 0); CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _indexCount); - - //restore render state - restoreRenderState(); } } void MeshCommand::postBatchDraw() @@ -404,9 +284,6 @@ void MeshCommand::execute() glDrawElements(_primitive, (GLsizei)_indexCount, _indexFormat, 0); CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _indexCount); - - //restore render state - restoreRenderState(); } glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); diff --git a/cocos/renderer/CCMeshCommand.h b/cocos/renderer/CCMeshCommand.h index 729adc2abb..998708a629 100644 --- a/cocos/renderer/CCMeshCommand.h +++ b/cocos/renderer/CCMeshCommand.h @@ -28,13 +28,12 @@ #include #include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgram.h" +#include "renderer/CCRenderState.h" #include "math/CCMath.h" NS_CC_BEGIN class GLProgramState; -class GLProgram; -struct Uniform; class EventListenerCustom; class EventCustom; class Material; @@ -45,32 +44,17 @@ class CC_DLL MeshCommand : public RenderCommand public: MeshCommand(); - ~MeshCommand(); + virtual ~MeshCommand(); void init(float globalZOrder, Material* material, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexFormat, ssize_t indexCount, const Mat4 &mv, uint32_t flags); - void init(float globalZOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexFormat, ssize_t indexCount, const Mat4 &mv, uint32_t flags); - - CC_DEPRECATED_ATTRIBUTE void init(float globalZOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexType, ssize_t indexCount, const Mat4 &mv); - - void setCullFaceEnabled(bool enable); - - void setCullFace(GLenum cullFace); - - void setDepthTestEnabled(bool enable); - - void setDepthWriteEnabled(bool enable); - - void setDisplayColor(const Vec4& color); - - void setMatrixPalette(const Vec4* matrixPalette); - - void setMatrixPaletteSize(int size); + void init(float globalZOrder, GLuint textureID, GLProgramState* glProgramState, RenderState::StateBlock* stateBlock, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexFormat, ssize_t indexCount, const Mat4 &mv, uint32_t flags); + void setDisplayColor(const Vec4& color); + void setMatrixPalette(const Vec4* matrixPalette); + void setMatrixPaletteSize(int size); void setLightMask(unsigned int lightmask); - - void setTransparent(bool value); - + void execute(); //used for batch @@ -93,12 +77,8 @@ protected: // apply renderstate, not used when using material void applyRenderState(); - void restoreRenderState(); - GLuint _textureID; - GLProgramState* _glProgramState; - BlendFunc _blendType; - + Vec4 _displayColor; // in order to support tint and fade in fade out // used for skin @@ -116,23 +96,22 @@ protected: ssize_t _indexCount; // States, default value all false - bool _cullFaceEnabled; - GLenum _cullFace; - bool _depthTestEnabled; - bool _depthWriteEnabled; - bool _forceDepthWrite; - - bool _renderStateCullFaceEnabled; - bool _renderStateDepthTest; - GLboolean _renderStateDepthWrite; - GLenum _renderStateCullFace; + // ModelView transform Mat4 _mv; + // Mode A: Material // weak ref Material* _material; + // Mode B: StateBlock + // weak ref + GLProgramState* _glProgramState; + RenderState::StateBlock* _stateBlock; + GLuint _textureID; + + #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) EventListenerCustom* _rendererRecreatedListener; #endif diff --git a/cocos/renderer/CCRenderState.cpp b/cocos/renderer/CCRenderState.cpp index 9d51cc6028..d67482e4a4 100644 --- a/cocos/renderer/CCRenderState.cpp +++ b/cocos/renderer/CCRenderState.cpp @@ -340,7 +340,8 @@ void RenderState::StateBlock::restore(long stateOverrideBits) CC_ASSERT(_defaultState); // If there is no state to restore (i.e. no non-default state), do nothing. - if (_defaultState->_bits == 0) +// if (_defaultState->_bits == 0) + if ( (stateOverrideBits | _defaultState->_bits) == stateOverrideBits) { return; } @@ -749,26 +750,8 @@ void RenderState::StateBlock::setBlend(bool enabled) void RenderState::StateBlock::setBlendFunc(const BlendFunc& blendFunc) { - if (blendFunc == BlendFunc::DISABLE) - { - setBlendSrc(BLEND_ONE); - setBlendDst(BLEND_ZERO); - } - else if (blendFunc == BlendFunc::ALPHA_PREMULTIPLIED) - { - setBlendSrc(BLEND_ONE); - setBlendDst(BLEND_ONE_MINUS_SRC_ALPHA); - } - else if (blendFunc == BlendFunc::ALPHA_NON_PREMULTIPLIED) - { - setBlendSrc(BLEND_SRC_ALPHA); - setBlendDst(BLEND_ONE_MINUS_SRC_ALPHA); - } - else if (blendFunc == BlendFunc::ADDITIVE) - { - setBlendSrc(BLEND_SRC_ALPHA); - setBlendDst(BLEND_ONE); - } + setBlendSrc((RenderState::Blend)blendFunc.src); + setBlendDst((RenderState::Blend)blendFunc.dst); } void RenderState::StateBlock::setBlendSrc(Blend blend) diff --git a/cocos/renderer/CCRenderState.h b/cocos/renderer/CCRenderState.h index 0a7649f079..088db5621c 100644 --- a/cocos/renderer/CCRenderState.h +++ b/cocos/renderer/CCRenderState.h @@ -352,6 +352,8 @@ public: uint32_t getHash() const; bool isDirty() const; + static StateBlock* _defaultState; + protected: StateBlock(); ~StateBlock(); @@ -382,8 +384,6 @@ public: long _bits; - static StateBlock* _defaultState; - mutable uint32_t _hash; mutable bool _hashDirty; }; diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index 240b947890..f51b5ae199 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -45,7 +45,7 @@ THE SOFTWARE. #include "renderer/CCGLProgram.h" #include "renderer/ccGLStateCache.h" #include "renderer/CCGLProgramCache.h" - +#include "base/CCNinePatchImageParser.h" #include "deprecated/CCString.h" @@ -435,6 +435,7 @@ Texture2D::Texture2D() , _hasMipmaps(false) , _shaderProgram(nullptr) , _antialiasEnabled(true) +, _ninePatchInfo(nullptr) { } @@ -447,6 +448,8 @@ Texture2D::~Texture2D() CCLOGINFO("deallocing Texture2D: %p - id=%u", this, _name); CC_SAFE_RELEASE(_shaderProgram); + CC_SAFE_DELETE(_ninePatchInfo); + if(_name) { GL::deleteTexture(_name); @@ -1393,5 +1396,60 @@ const Texture2D::PixelFormatInfoMap& Texture2D::getPixelFormatInfoMap() return _pixelFormatInfoTables; } +void Texture2D::addSpriteFrameCapInset(SpriteFrame* spritframe, const Rect& capInsets) +{ + if(nullptr == _ninePatchInfo) + { + _ninePatchInfo = new NinePatchInfo; + } + if(nullptr == spritframe) + { + _ninePatchInfo->capInsetSize = capInsets; + } + else + { + _ninePatchInfo->capInsetMap[spritframe] = capInsets; + } +} + +bool Texture2D::isContain9PatchInfo()const +{ + return nullptr != _ninePatchInfo; +} + +const Rect& Texture2D::getSpriteFrameCapInset( cocos2d::SpriteFrame *spriteFrame )const +{ + CCASSERT(_ninePatchInfo != nullptr, + "Can't get the sprite frame capInset when the texture contains no 9-patch info."); + if(nullptr == spriteFrame) + { + return this->_ninePatchInfo->capInsetSize; + } + else + { + auto capInsetMap = this->_ninePatchInfo->capInsetMap; + if(capInsetMap.find(spriteFrame) != capInsetMap.end()) + { + return capInsetMap.at(spriteFrame); + } + else + { + return this->_ninePatchInfo->capInsetSize; + } + } +} + + +void Texture2D::removeSpriteFrameCapInset(SpriteFrame* spriteFrame) +{ + if(nullptr != this->_ninePatchInfo) + { + auto capInsetMap = this->_ninePatchInfo->capInsetMap; + if(capInsetMap.find(spriteFrame) != capInsetMap.end()) + { + capInsetMap.erase(spriteFrame); + } + } +} NS_CC_END diff --git a/cocos/renderer/CCTexture2D.h b/cocos/renderer/CCTexture2D.h index 46e0d18ebe..0da5bc2b81 100644 --- a/cocos/renderer/CCTexture2D.h +++ b/cocos/renderer/CCTexture2D.h @@ -29,6 +29,7 @@ THE SOFTWARE. #include #include +#include #include "base/CCRef.h" #include "math/CCGeometry.h" @@ -40,8 +41,15 @@ THE SOFTWARE. NS_CC_BEGIN class Image; +class NinePatchInfo; +class SpriteFrame; typedef struct _MipmapInfo MipmapInfo; +namespace ui +{ + class Scale9Sprite; +} + /** * @addtogroup _2d * @{ @@ -309,6 +317,7 @@ public: * @endcode */ void setTexParameters(const TexParams& texParams); + /** * @js NA * @lua NA @@ -402,12 +411,55 @@ public: /** Get a shader program from the texture.*/ GLProgram* getGLProgram() const; - + + public: /** Get pixel info map, the key-value pairs is PixelFormat and PixelFormatInfo.*/ static const PixelFormatInfoMap& getPixelFormatInfoMap(); private: + /** + * A struct for storing 9-patch image capInsets. + */ + + class NinePatchInfo + { + public: + Rect capInsetSize; + std::unordered_map capInsetMap; + }; + + /** + * Whether the texture contains a 9-patch capInset info or not. + * + * @return True is Texture contains a 9-patch info, false otherwise. + */ + bool isContain9PatchInfo()const; + + /** + * Get spriteFrame capInset, If spriteFrame can't be found in 9-patch info map, + * then single 9-patch texture capInset will be returned. + * If the arg is nullptr, the capInset of single 9-patch texture will be returned. + * + * @param spriteFrame A SpriteFrame object pointer. + * + * @return The capInset of the SpriteFrame object. + */ + const Rect& getSpriteFrameCapInset(SpriteFrame* spriteFrame)const; + /** + * Remove the spriteFrame capInset info when the spriteFrame is removed. + * + * @param spriteFrame A SpriteFrame object pointer. + */ + void removeSpriteFrameCapInset(SpriteFrame* spriteFrame); + /** + * Add capInset for sprite atlas. + * When handling single texture, pass nullptr in the first arg. + * + * @param spritframe The sprite frame object. + * @param capInsets The parsed capInset from a .9 patch image. + */ + void addSpriteFrameCapInset(SpriteFrame* spritframe, const Rect& capInsets); /**convert functions*/ @@ -490,6 +542,10 @@ protected: static const PixelFormatInfoMap _pixelFormatInfoTables; bool _antialiasEnabled; + NinePatchInfo* _ninePatchInfo; + friend class SpriteFrameCache; + friend class TextureCache; + friend class ui::Scale9Sprite; }; diff --git a/cocos/renderer/CCTextureCache.cpp b/cocos/renderer/CCTextureCache.cpp index 239d4278e9..7afca3874e 100644 --- a/cocos/renderer/CCTextureCache.cpp +++ b/cocos/renderer/CCTextureCache.cpp @@ -40,6 +40,7 @@ THE SOFTWARE. #include "base/ccUtils.h" #include "deprecated/CCString.h" +#include "base/CCNinePatchImageParser.h" #ifdef EMSCRIPTEN @@ -114,8 +115,8 @@ void TextureCache::addImageAsync(const std::string &path, const std::function(); - _imageInfoQueue = new deque(); + _asyncStructQueue = new (std::nothrow) deque(); + _imageInfoQueue = new (std::nothrow) deque(); // create a new thread to load images _loadingThread = new std::thread(&TextureCache::loadImage, this); @@ -134,36 +135,62 @@ void TextureCache::addImageAsync(const std::string &path, const std::functionpush(data); - _asyncStructQueueMutex.unlock(); + _asyncMutex.lock(); + _asyncStructQueue->push_back(data); + _asyncMutex.unlock(); _sleepCondition.notify_one(); } void TextureCache::unbindImageAsync(const std::string& filename) { - _imageInfoMutex.lock(); - if (_imageInfoQueue && !_imageInfoQueue->empty()) + std::string fullpath = FileUtils::getInstance()->fullPathForFilename(filename); + + _asyncMutex.lock(); + + if (_asyncStructQueue && !_asyncStructQueue->empty()) { - std::string fullpath = FileUtils::getInstance()->fullPathForFilename(filename); - auto found = std::find_if(_imageInfoQueue->begin(), _imageInfoQueue->end(), [&fullpath](ImageInfo* ptr)->bool{ return ptr->asyncStruct->filename == fullpath; }); - if (found != _imageInfoQueue->end()) + for (auto it = _asyncStructQueue->begin(); it != _asyncStructQueue->end(); ++it) { - (*found)->asyncStruct->callback = nullptr; + if ((*it)->filename == fullpath) + { + (*it)->callback = nullptr; + } } } - _imageInfoMutex.unlock(); + + if (_imageInfoQueue && !_imageInfoQueue->empty()) + { + for (auto it = _imageInfoQueue->begin(); it != _imageInfoQueue->end(); ++it) + { + if ((*it)->asyncStruct->filename == fullpath) + { + (*it)->asyncStruct->callback = nullptr; + } + } + } + + _asyncMutex.unlock(); } void TextureCache::unbindAllImageAsync() { - _imageInfoMutex.lock(); + _asyncMutex.lock(); + if (_asyncStructQueue && !_asyncStructQueue->empty()) + { + for (auto it = _asyncStructQueue->begin(); it != _asyncStructQueue->end(); ++it) + { + (*it)->callback = nullptr; + } + } if (_imageInfoQueue && !_imageInfoQueue->empty()) { - std::for_each(_imageInfoQueue->begin(), _imageInfoQueue->end(), [](ImageInfo* ptr) { ptr->asyncStruct->callback = nullptr; }); + for (auto it = _imageInfoQueue->begin(); it != _imageInfoQueue->end(); ++it) + { + (*it)->asyncStruct->callback = nullptr; + } } - _imageInfoMutex.unlock(); + _asyncMutex.unlock(); } void TextureCache::loadImage() @@ -172,11 +199,10 @@ void TextureCache::loadImage() while (true) { - std::queue *pQueue = _asyncStructQueue; - _asyncStructQueueMutex.lock(); - if (pQueue->empty()) + _asyncMutex.lock(); + if (_asyncStructQueue->empty()) { - _asyncStructQueueMutex.unlock(); + _asyncMutex.unlock(); if (_needQuit) { break; } @@ -188,9 +214,8 @@ void TextureCache::loadImage() } else { - asyncStruct = pQueue->front(); - pQueue->pop(); - _asyncStructQueueMutex.unlock(); + asyncStruct = _asyncStructQueue->front(); + _asyncMutex.unlock(); } Image *image = nullptr; @@ -199,9 +224,9 @@ void TextureCache::loadImage() auto it = _textures.find(asyncStruct->filename); if( it == _textures.end() ) { - _imageInfoMutex.lock(); ImageInfo *imageInfo; size_t pos = 0; + _asyncMutex.lock(); size_t infoSize = _imageInfoQueue->size(); for (; pos < infoSize; pos++) { @@ -209,7 +234,7 @@ void TextureCache::loadImage() if(imageInfo->asyncStruct->filename.compare(asyncStruct->filename) == 0) break; } - _imageInfoMutex.unlock(); + _asyncMutex.unlock(); if(infoSize == 0 || pos == infoSize) generateImage = true; } @@ -223,6 +248,9 @@ void TextureCache::loadImage() { CC_SAFE_RELEASE(image); CCLOG("can not load %s", filename.c_str()); + _asyncMutex.lock(); + _asyncStructQueue->pop_front(); + _asyncMutex.unlock(); continue; } } @@ -233,9 +261,10 @@ void TextureCache::loadImage() imageInfo->image = image; // put the image info into the queue - _imageInfoMutex.lock(); + _asyncMutex.lock(); + _asyncStructQueue->pop_front(); _imageInfoQueue->push_back(imageInfo); - _imageInfoMutex.unlock(); + _asyncMutex.unlock(); } if(_asyncStructQueue != nullptr) @@ -252,16 +281,16 @@ void TextureCache::addImageAsyncCallBack(float dt) // the image is generated in loading thread std::deque *imagesQueue = _imageInfoQueue; - _imageInfoMutex.lock(); + _asyncMutex.lock(); if (imagesQueue->empty()) { - _imageInfoMutex.unlock(); + _asyncMutex.unlock(); } else { ImageInfo *imageInfo = imagesQueue->front(); imagesQueue->pop_front(); - _imageInfoMutex.unlock(); + _asyncMutex.unlock(); AsyncStruct *asyncStruct = imageInfo->asyncStruct; Image *image = imageInfo->image; @@ -275,7 +304,8 @@ void TextureCache::addImageAsyncCallBack(float dt) texture = new (std::nothrow) Texture2D(); texture->initWithImage(image); - + //parse 9-patch info + this->parseNinePatchImage(image, texture, filename); #if CC_ENABLE_CACHE_TEXTURE_DATA // cache the texture file name VolatileTextureMgr::addImageTexture(texture, filename); @@ -351,6 +381,9 @@ Texture2D * TextureCache::addImage(const std::string &path) #endif // texture already retained, no need to re-retain it _textures.insert( std::make_pair(fullpath, texture) ); + + //parse 9-patch info + this->parseNinePatchImage(image, texture, path); } else { @@ -364,6 +397,17 @@ Texture2D * TextureCache::addImage(const std::string &path) return texture; } +void TextureCache::parseNinePatchImage(cocos2d::Image *image, cocos2d::Texture2D *texture,const std::string& path) +{ + if(NinePatchImageParser::isNinePatchImage(path)) + { + Rect frameRect = Rect(0,0,image->getWidth(), image->getHeight()); + NinePatchImageParser parser(image, frameRect, false); + texture->addSpriteFrameCapInset(nullptr, parser.parseCapInset()); + } + +} + Texture2D* TextureCache::addImage(Image *image, const std::string &key) { CCASSERT(image != nullptr, "TextureCache: image MUST not be nil"); @@ -524,6 +568,19 @@ void TextureCache::reloadAllTextures() // #endif } +const std::string TextureCache::getTextureFilePath( cocos2d::Texture2D *texture )const +{ + for(auto& item : _textures) + { + if(item.second == texture) + { + return item.first; + break; + } + } + return ""; +} + void TextureCache::waitForQuit() { // notify sub thread to quick diff --git a/cocos/renderer/CCTextureCache.h b/cocos/renderer/CCTextureCache.h index ac22103f4a..e393c8593c 100644 --- a/cocos/renderer/CCTextureCache.h +++ b/cocos/renderer/CCTextureCache.h @@ -195,10 +195,19 @@ public: /**Called by director, please do not called outside.*/ void waitForQuit(); + /** + * Get the file path of the texture + * + * @param texture A Texture2D object pointer. + * + * @return The full path of the file. + */ + const std::string getTextureFilePath(Texture2D* texture)const; + private: void addImageAsyncCallBack(float dt); void loadImage(); - + void parseNinePatchImage(Image* image, Texture2D* texture, const std::string& path); public: struct AsyncStruct { @@ -218,11 +227,10 @@ protected: std::thread* _loadingThread; - std::queue* _asyncStructQueue; + std::deque* _asyncStructQueue; std::deque* _imageInfoQueue; - std::mutex _asyncStructQueueMutex; - std::mutex _imageInfoMutex; + std::mutex _asyncMutex; std::mutex _sleepMutex; std::condition_variable _sleepCondition; diff --git a/cocos/renderer/ccGLStateCache.cpp b/cocos/renderer/ccGLStateCache.cpp index 25eedc382f..477976db82 100644 --- a/cocos/renderer/ccGLStateCache.cpp +++ b/cocos/renderer/ccGLStateCache.cpp @@ -28,6 +28,7 @@ THE SOFTWARE. #include "renderer/ccGLStateCache.h" #include "renderer/CCGLProgram.h" +#include "renderer/CCRenderState.h" #include "base/CCDirector.h" #include "base/ccConfig.h" #include "base/CCConfiguration.h" @@ -109,12 +110,17 @@ static void SetBlending(GLenum sfactor, GLenum dfactor) if (sfactor == GL_ONE && dfactor == GL_ZERO) { glDisable(GL_BLEND); + RenderState::StateBlock::_defaultState->setBlend(false); } else { glEnable(GL_BLEND); glBlendFunc(sfactor, dfactor); - } + + RenderState::StateBlock::_defaultState->setBlend(true); + RenderState::StateBlock::_defaultState->setBlendSrc((RenderState::Blend)sfactor); + RenderState::StateBlock::_defaultState->setBlendSrc((RenderState::Blend)dfactor); + } } void blendFunc(GLenum sfactor, GLenum dfactor) diff --git a/cocos/renderer/ccShader_3D_Skybox.vert b/cocos/renderer/ccShader_3D_Skybox.vert index 5e560f500c..b7b039810b 100644 --- a/cocos/renderer/ccShader_3D_Skybox.vert +++ b/cocos/renderer/ccShader_3D_Skybox.vert @@ -1,11 +1,12 @@ const char* cc3D_Skybox_vert = STRINGIFY( +uniform float u_scalef; attribute vec3 a_position; varying vec3 v_reflect; void main(void) { - v_reflect = normalize(CC_NormalMatrix * a_position); - gl_Position = CC_MVPMatrix * vec4(a_position, 1.0); + v_reflect = a_position; + gl_Position = CC_MVPMatrix * vec4(u_scalef * a_position, 1.0); } ); \ No newline at end of file diff --git a/cocos/scripting/js-bindings/CMakeLists.txt b/cocos/scripting/js-bindings/CMakeLists.txt index 3f1a5d8f36..a233d6cf04 100644 --- a/cocos/scripting/js-bindings/CMakeLists.txt +++ b/cocos/scripting/js-bindings/CMakeLists.txt @@ -43,6 +43,7 @@ set(JSBINDING_SRC auto/jsb_cocos2dx_3d_auto.cpp auto/jsb_cocos2dx_3d_extension_auto.cpp auto/jsb_cocos2dx_experimental.cpp + auto/jsb_cocos2dx_physics3d_auto.cpp manual/ScriptingCore.cpp manual/cocos2d_specifics.cpp manual/js_manual_conversions.cpp @@ -69,6 +70,7 @@ set(JSBINDING_SRC manual/ui/jsb_cocos2dx_ui_manual.cpp manual/3d/jsb_cocos2dx_3d_manual.cpp manual/experimental/jsb_cocos2dx_experimental_manual.cpp + manual/physics3d/jsb_cocos2dx_physics3d_manual.cpp ${cocos_root}/cocos/storage/local-storage/LocalStorage.cpp ) @@ -80,11 +82,13 @@ include_directories( ${cocos_root}/external/spidermonkey/include/${PLATFORM_FOLDER} ${cocos_root}/cocos/base ${cocos_root}/cocos/2d + ${cocos_root}/cocos/3d ${cocos_root}/cocos/ui ${cocos_root}/cocos/audio/include ${cocos_root}/cocos/storage ${cocos_root}/cocos/network ${cocos_root}/cocos/platform + ${cocos_root}/cocos/physics3d ${cocos_root}/extensions ${cocos_root}/external ${cocos_root}/cocos/editor-support diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_3d_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_3d_auto_api.js index b48e88a837..b7b36f805e 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_3d_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_3d_auto_api.js @@ -1520,3 +1520,143 @@ TextureCube : function ( }, }; + +/** + * @class Bundle3D + */ +jsb.Bundle3D = { + +/** + * @method load + * @param {String} arg0 + * @return {bool} + */ +load : function ( +str +) +{ + return false; +}, + +/** + * @method loadSkinData + * @param {String} arg0 + * @param {cc.SkinData} arg1 + * @return {bool} + */ +loadSkinData : function ( +str, +skindata +) +{ + return false; +}, + +/** + * @method clear + */ +clear : function ( +) +{ +}, + +/** + * @method loadMaterials + * @param {cc.MaterialDatas} arg0 + * @return {bool} + */ +loadMaterials : function ( +materialdatas +) +{ + return false; +}, + +/** + * @method loadMeshDatas + * @param {cc.MeshDatas} arg0 + * @return {bool} + */ +loadMeshDatas : function ( +meshdatas +) +{ + return false; +}, + +/** + * @method loadNodes + * @param {cc.NodeDatas} arg0 + * @return {bool} + */ +loadNodes : function ( +nodedatas +) +{ + return false; +}, + +/** + * @method loadAnimationData + * @param {String} arg0 + * @param {cc.Animation3DData} arg1 + * @return {bool} + */ +loadAnimationData : function ( +str, +animation3ddata +) +{ + return false; +}, + +/** + * @method createBundle + * @return {cc.Bundle3D} + */ +createBundle : function ( +) +{ + return cc.Bundle3D; +}, + +/** + * @method destroyBundle + * @param {cc.Bundle3D} arg0 + */ +destroyBundle : function ( +bundle3d +) +{ +}, + +/** + * @method loadObj + * @param {cc.MeshDatas} arg0 + * @param {cc.MaterialDatas} arg1 + * @param {cc.NodeDatas} arg2 + * @param {String} arg3 + * @param {char} arg4 + * @return {bool} + */ +loadObj : function ( +meshdatas, +materialdatas, +nodedatas, +str, +char +) +{ + return false; +}, + +/** + * @method Bundle3D + * @constructor + */ +Bundle3D : function ( +) +{ +}, + +}; diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js index 293bdbd3f5..bb2ae21de2 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js @@ -5868,6 +5868,20 @@ vec3 return false; }, +/** + * @method parseVec3 + * @param {char} arg0 + * @param {vec3_object} arg1 + * @return {bool} + */ +parseVec3 : function ( +char, +vec3 +) +{ + return false; +}, + /** * @method parseAxisAngle * @param {char} arg0 @@ -5897,17 +5911,15 @@ vec2 }, /** - * @method parseVec3 - * @param {char} arg0 - * @param {vec3_object} arg1 - * @return {bool} + * @method createNonRefCounted + * @param {String} arg0 + * @return {cc.Properties} */ -parseVec3 : function ( -char, -vec3 +createNonRefCounted : function ( +str ) { - return false; + return cc.Properties; }, /** @@ -5924,18 +5936,6 @@ vec4 return false; }, -/** - * @method createWithoutAutorelease - * @param {String} arg0 - * @return {cc.Properties} - */ -createWithoutAutorelease : function ( -str -) -{ - return cc.Properties; -}, - }; /** @@ -18440,41 +18440,13 @@ TransitionProgressOutIn : function ( cc.Camera = { /** - * @method setScene - * @param {cc.Scene} arg0 + * @method getDepth + * @return {int} */ -setScene : function ( -scene +getDepth : function ( ) { -}, - -/** - * @method initPerspective - * @param {float} arg0 - * @param {float} arg1 - * @param {float} arg2 - * @param {float} arg3 - * @return {bool} - */ -initPerspective : function ( -float, -float, -float, -float -) -{ - return false; -}, - -/** - * @method getProjectionMatrix - * @return {mat4_object} - */ -getProjectionMatrix : function ( -) -{ - return cc.Mat4; + return 0; }, /** @@ -18488,15 +18460,69 @@ getViewProjectionMatrix : function ( }, /** - * @method getViewMatrix + * @method lookAt + * @param {vec3_object} arg0 + * @param {vec3_object} arg1 + */ +lookAt : function ( +vec3, +vec3 +) +{ +}, + +/** + * @method getProjectionMatrix * @return {mat4_object} */ -getViewMatrix : function ( +getProjectionMatrix : function ( ) { return cc.Mat4; }, +/** + * @method getDepthInView + * @param {mat4_object} arg0 + * @return {float} + */ +getDepthInView : function ( +mat4 +) +{ + return 0; +}, + +/** + * @method clearBackground + * @param {float} arg0 + */ +clearBackground : function ( +float +) +{ +}, + +/** + * @method setDepth + * @param {int} arg0 + */ +setDepth : function ( +int +) +{ +}, + +/** + * @method initDefault + * @return {bool} + */ +initDefault : function ( +) +{ + return false; +}, + /** * @method getCameraFlag * @return {cc.CameraFlag} @@ -18517,28 +18543,6 @@ getType : function ( return 0; }, -/** - * @method initDefault - * @return {bool} - */ -initDefault : function ( -) -{ - return false; -}, - -/** - * @method project - * @param {vec3_object} arg0 - * @return {vec2_object} - */ -project : function ( -vec3 -) -{ - return cc.Vec2; -}, - /** * @method initOrthographic * @param {float} arg0 @@ -18558,27 +18562,67 @@ float }, /** - * @method getDepthInView + * @method setAdditionalProjection * @param {mat4_object} arg0 + */ +setAdditionalProjection : function ( +mat4 +) +{ +}, + +/** + * @method setScene + * @param {cc.Scene} arg0 + */ +setScene : function ( +scene +) +{ +}, + +/** + * @method projectGL + * @param {vec3_object} arg0 + * @return {vec2_object} + */ +projectGL : function ( +vec3 +) +{ + return cc.Vec2; +}, + +/** + * @method getViewMatrix + * @return {mat4_object} + */ +getViewMatrix : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getNearPlane * @return {float} */ -getDepthInView : function ( -mat4 +getNearPlane : function ( ) { return 0; }, /** - * @method lookAt + * @method project * @param {vec3_object} arg0 - * @param {vec3_object} arg1 + * @return {vec2_object} */ -lookAt : function ( -vec3, +project : function ( vec3 ) { + return cc.Vec2; }, /** @@ -18592,43 +18636,31 @@ cameraflag }, /** - * @method clearBackground - * @param {float} arg0 + * @method getFarPlane + * @return {float} */ -clearBackground : function ( -float -) -{ -}, - -/** - * @method setAdditionalProjection - * @param {mat4_object} arg0 - */ -setAdditionalProjection : function ( -mat4 -) -{ -}, - -/** - * @method getDepth - * @return {int} - */ -getDepth : function ( +getFarPlane : function ( ) { return 0; }, /** - * @method setDepth - * @param {int} arg0 + * @method initPerspective + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + * @return {bool} */ -setDepth : function ( -int +initPerspective : function ( +float, +float, +float, +float ) { + return false; }, /** @@ -20323,6 +20355,18 @@ str return cc.Texture2D; }, +/** + * @method getTextureFilePath + * @param {cc.Texture2D} arg0 + * @return {String} + */ +getTextureFilePath : function ( +texture2d +) +{ + return ; +}, + /** * @method removeUnusedTextures */ diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js new file mode 100644 index 0000000000..b6d3825c06 --- /dev/null +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js @@ -0,0 +1,184 @@ +/** + * @module cocos2dx_experimental_webView + */ +var ccui = ccui || {}; + +/** + * @class WebView + */ +ccui.WebView = { + +/** + * @method canGoBack + * @return {bool} + */ +canGoBack : function ( +) +{ + return false; +}, + +/** + * @method loadHTMLString + * @param {String} arg0 + * @param {String} arg1 + */ +loadHTMLString : function ( +str, +str +) +{ +}, + +/** + * @method goForward + */ +goForward : function ( +) +{ +}, + +/** + * @method goBack + */ +goBack : function ( +) +{ +}, + +/** + * @method setScalesPageToFit + * @param {bool} arg0 + */ +setScalesPageToFit : function ( +bool +) +{ +}, + +/** + * @method getOnDidFailLoading + * @return {function} + */ +getOnDidFailLoading : function ( +) +{ + return std::function &)>; +}, + +/** + * @method loadFile + * @param {String} arg0 + */ +loadFile : function ( +str +) +{ +}, + +/** + * @method loadURL + * @param {String} arg0 + */ +loadURL : function ( +str +) +{ +}, + +/** + * @method evaluateJS + * @param {String} arg0 + */ +evaluateJS : function ( +str +) +{ +}, + +/** + * @method getOnJSCallback + * @return {function} + */ +getOnJSCallback : function ( +) +{ + return std::function &)>; +}, + +/** + * @method canGoForward + * @return {bool} + */ +canGoForward : function ( +) +{ + return false; +}, + +/** + * @method getOnShouldStartLoading + * @return {function} + */ +getOnShouldStartLoading : function ( +) +{ + return std::function &)>; +}, + +/** + * @method stopLoading + */ +stopLoading : function ( +) +{ +}, + +/** + * @method reload + */ +reload : function ( +) +{ +}, + +/** + * @method setJavascriptInterfaceScheme + * @param {String} arg0 + */ +setJavascriptInterfaceScheme : function ( +str +) +{ +}, + +/** + * @method getOnDidFinishLoading + * @return {function} + */ +getOnDidFinishLoading : function ( +) +{ + return std::function &)>; +}, + +/** + * @method create + * @return {cc.experimental::ui::WebView} + */ +create : function ( +) +{ + return cc.experimental::ui::WebView; +}, + +/** + * @method WebView + * @constructor + */ +WebView : function ( +) +{ +}, + +}; diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js new file mode 100644 index 0000000000..db5be29414 --- /dev/null +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js @@ -0,0 +1,2603 @@ +/** + * @module cocos2dx_physics3d + */ +var cc = cc || {}; + +/** + * @class Physics3DShape + */ +cc.Physics3DShape = { + +/** + * @method getbtShape + * @return {btCollisionShape} + */ +getbtShape : function ( +) +{ + return btCollisionShape; +}, + +/** + * @method getShapeType + * @return {cc.Physics3DShape::ShapeType} + */ +getShapeType : function ( +) +{ + return 0; +}, + +/** + * @method createBox + * @param {vec3_object} arg0 + * @return {cc.Physics3DShape} + */ +createBox : function ( +vec3 +) +{ + return cc.Physics3DShape; +}, + +/** + * @method createCylinder + * @param {float} arg0 + * @param {float} arg1 + * @return {cc.Physics3DShape} + */ +createCylinder : function ( +float, +float +) +{ + return cc.Physics3DShape; +}, + +/** + * @method createConvexHull + * @param {vec3_object} arg0 + * @param {int} arg1 + * @return {cc.Physics3DShape} + */ +createConvexHull : function ( +vec3, +int +) +{ + return cc.Physics3DShape; +}, + +/** + * @method createCapsule + * @param {float} arg0 + * @param {float} arg1 + * @return {cc.Physics3DShape} + */ +createCapsule : function ( +float, +float +) +{ + return cc.Physics3DShape; +}, + +/** + * @method createSphere + * @param {float} arg0 + * @return {cc.Physics3DShape} + */ +createSphere : function ( +float +) +{ + return cc.Physics3DShape; +}, + +}; + +/** + * @class Physics3DObject + */ +cc.Physics3DObject = { + +/** + * @method setUserData + * @param {void} arg0 + */ +setUserData : function ( +void +) +{ +}, + +/** + * @method getUserData + * @return {void} + */ +getUserData : function ( +) +{ + return void; +}, + +/** + * @method getObjType + * @return {cc.Physics3DObject::PhysicsObjType} + */ +getObjType : function ( +) +{ + return 0; +}, + +/** + * @method setPhysicsWorld + * @param {cc.Physics3DWorld} arg0 + */ +setPhysicsWorld : function ( +physics3dworld +) +{ +}, + +/** + * @method getWorldTransform + * @return {mat4_object} + */ +getWorldTransform : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getPhysicsWorld + * @return {cc.Physics3DWorld} + */ +getPhysicsWorld : function ( +) +{ + return cc.Physics3DWorld; +}, + +/** + * @method setMask + * @param {unsigned int} arg0 + */ +setMask : function ( +int +) +{ +}, + +/** + * @method getCollisionCallback + * @return {function} + */ +getCollisionCallback : function ( +) +{ + return std::function; +}, + +/** + * @method getMask + * @return {unsigned int} + */ +getMask : function ( +) +{ + return 0; +}, + +/** + * @method needCollisionCallback + * @return {bool} + */ +needCollisionCallback : function ( +) +{ + return false; +}, + +}; + +/** + * @class Physics3DRigidBody + */ +cc.Physics3DRigidBody = { + +/** + * @method setGravity + * @param {vec3_object} arg0 + */ +setGravity : function ( +vec3 +) +{ +}, + +/** + * @method getFriction + * @return {float} + */ +getFriction : function ( +) +{ + return 0; +}, + +/** + * @method setAngularFactor +* @param {float|vec3_object} float +*/ +setAngularFactor : function( +vec3 +) +{ +}, + +/** + * @method addConstraint + * @param {cc.Physics3DConstraint} arg0 + */ +addConstraint : function ( +physics3dconstraint +) +{ +}, + +/** + * @method getRigidBody + * @return {btRigidBody} + */ +getRigidBody : function ( +) +{ + return btRigidBody; +}, + +/** + * @method getTotalForce + * @return {vec3_object} + */ +getTotalForce : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method getConstraintCount + * @return {unsigned int} + */ +getConstraintCount : function ( +) +{ + return 0; +}, + +/** + * @method applyCentralForce + * @param {vec3_object} arg0 + */ +applyCentralForce : function ( +vec3 +) +{ +}, + +/** + * @method setMassProps + * @param {float} arg0 + * @param {vec3_object} arg1 + */ +setMassProps : function ( +float, +vec3 +) +{ +}, + +/** + * @method setFriction + * @param {float} arg0 + */ +setFriction : function ( +float +) +{ +}, + +/** + * @method setKinematic + * @param {bool} arg0 + */ +setKinematic : function ( +bool +) +{ +}, + +/** + * @method setDamping + * @param {float} arg0 + * @param {float} arg1 + */ +setDamping : function ( +float, +float +) +{ +}, + +/** + * @method applyImpulse + * @param {vec3_object} arg0 + * @param {vec3_object} arg1 + */ +applyImpulse : function ( +vec3, +vec3 +) +{ +}, + +/** + * @method isKinematic + * @return {bool} + */ +isKinematic : function ( +) +{ + return false; +}, + +/** + * @method applyTorque + * @param {vec3_object} arg0 + */ +applyTorque : function ( +vec3 +) +{ +}, + +/** + * @method setCcdMotionThreshold + * @param {float} arg0 + */ +setCcdMotionThreshold : function ( +float +) +{ +}, + +/** + * @method setRollingFriction + * @param {float} arg0 + */ +setRollingFriction : function ( +float +) +{ +}, + +/** + * @method getCcdMotionThreshold + * @return {float} + */ +getCcdMotionThreshold : function ( +) +{ + return 0; +}, + +/** + * @method getLinearFactor + * @return {vec3_object} + */ +getLinearFactor : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method applyDamping + * @param {float} arg0 + */ +applyDamping : function ( +float +) +{ +}, + +/** + * @method getAngularVelocity + * @return {vec3_object} + */ +getAngularVelocity : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method init + * @param {cc.Physics3DRigidBodyDes} arg0 + * @return {bool} + */ +init : function ( +physics3drigidbodydes +) +{ + return false; +}, + +/** + * @method applyTorqueImpulse + * @param {vec3_object} arg0 + */ +applyTorqueImpulse : function ( +vec3 +) +{ +}, + +/** + * @method setActive + * @param {bool} arg0 + */ +setActive : function ( +bool +) +{ +}, + +/** + * @method setLinearFactor + * @param {vec3_object} arg0 + */ +setLinearFactor : function ( +vec3 +) +{ +}, + +/** + * @method setLinearVelocity + * @param {vec3_object} arg0 + */ +setLinearVelocity : function ( +vec3 +) +{ +}, + +/** + * @method getLinearVelocity + * @return {vec3_object} + */ +getLinearVelocity : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method setCcdSweptSphereRadius + * @param {float} arg0 + */ +setCcdSweptSphereRadius : function ( +float +) +{ +}, + +/** + * @method applyForce + * @param {vec3_object} arg0 + * @param {vec3_object} arg1 + */ +applyForce : function ( +vec3, +vec3 +) +{ +}, + +/** + * @method setAngularVelocity + * @param {vec3_object} arg0 + */ +setAngularVelocity : function ( +vec3 +) +{ +}, + +/** + * @method applyCentralImpulse + * @param {vec3_object} arg0 + */ +applyCentralImpulse : function ( +vec3 +) +{ +}, + +/** + * @method getGravity + * @return {vec3_object} + */ +getGravity : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method getRollingFriction + * @return {float} + */ +getRollingFriction : function ( +) +{ + return 0; +}, + +/** + * @method setCenterOfMassTransform + * @param {mat4_object} arg0 + */ +setCenterOfMassTransform : function ( +mat4 +) +{ +}, + +/** + * @method setInvInertiaDiagLocal + * @param {vec3_object} arg0 + */ +setInvInertiaDiagLocal : function ( +vec3 +) +{ +}, + +/** + * @method removeConstraint +* @param {unsigned int|cc.Physics3DConstraint} int +*/ +removeConstraint : function( +physics3dconstraint +) +{ +}, + +/** + * @method getTotalTorque + * @return {vec3_object} + */ +getTotalTorque : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method getInvMass + * @return {float} + */ +getInvMass : function ( +) +{ + return 0; +}, + +/** + * @method getConstraint + * @param {unsigned int} arg0 + * @return {cc.Physics3DConstraint} + */ +getConstraint : function ( +int +) +{ + return cc.Physics3DConstraint; +}, + +/** + * @method getRestitution + * @return {float} + */ +getRestitution : function ( +) +{ + return 0; +}, + +/** + * @method getCcdSweptSphereRadius + * @return {float} + */ +getCcdSweptSphereRadius : function ( +) +{ + return 0; +}, + +/** + * @method getHitFraction + * @return {float} + */ +getHitFraction : function ( +) +{ + return 0; +}, + +/** + * @method getAngularDamping + * @return {float} + */ +getAngularDamping : function ( +) +{ + return 0; +}, + +/** + * @method getInvInertiaDiagLocal + * @return {vec3_object} + */ +getInvInertiaDiagLocal : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method getCenterOfMassTransform + * @return {mat4_object} + */ +getCenterOfMassTransform : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getAngularFactor + * @return {vec3_object} + */ +getAngularFactor : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method setRestitution + * @param {float} arg0 + */ +setRestitution : function ( +float +) +{ +}, + +/** + * @method setHitFraction + * @param {float} arg0 + */ +setHitFraction : function ( +float +) +{ +}, + +/** + * @method getLinearDamping + * @return {float} + */ +getLinearDamping : function ( +) +{ + return 0; +}, + +/** + * @method Physics3DRigidBody + * @constructor + */ +Physics3DRigidBody : function ( +) +{ +}, + +}; + +/** + * @class Physics3DComponent + */ +cc.Physics3DComponent = { + +/** + * @method addToPhysicsWorld + * @param {cc.Physics3DWorld} arg0 + */ +addToPhysicsWorld : function ( +physics3dworld +) +{ +}, + +/** + * @method syncToPhysics + */ +syncToPhysics : function ( +) +{ +}, + +/** + * @method syncToNode + */ +syncToNode : function ( +) +{ +}, + +/** + * @method getPhysics3DObject + * @return {cc.Physics3DObject} + */ +getPhysics3DObject : function ( +) +{ + return cc.Physics3DObject; +}, + +/** + * @method setPhysics3DObject + * @param {cc.Physics3DObject} arg0 + */ +setPhysics3DObject : function ( +physics3dobject +) +{ +}, + +/** + * @method setSyncFlag + * @param {cc.Physics3DComponent::PhysicsSyncFlag} arg0 + */ +setSyncFlag : function ( +physicssyncflag +) +{ +}, + +/** + * @method setTransformInPhysics + * @param {vec3_object} arg0 + * @param {cc.Quaternion} arg1 + */ +setTransformInPhysics : function ( +vec3, +quaternion +) +{ +}, + +/** + * @method create +* @param {cc.Physics3DObject} physics3dobject +* @param {vec3_object} vec3 +* @param {cc.Quaternion} quaternion +* @return {cc.Physics3DComponent|cc.Physics3DComponent} +*/ +create : function( +physics3dobject, +vec3, +quaternion +) +{ + return cc.Physics3DComponent; +}, + +/** + * @method getPhysics3DComponentName + * @return {String} + */ +getPhysics3DComponentName : function ( +) +{ + return ; +}, + +/** + * @method Physics3DComponent + * @constructor + */ +Physics3DComponent : function ( +) +{ +}, + +}; + +/** + * @class PhysicsSprite3D + */ +cc.PhysicsSprite3D = { + +/** + * @method syncToPhysics + */ +syncToPhysics : function ( +) +{ +}, + +/** + * @method syncToNode + */ +syncToNode : function ( +) +{ +}, + +/** + * @method getPhysicsObj + * @return {cc.Physics3DObject} + */ +getPhysicsObj : function ( +) +{ + return cc.Physics3DObject; +}, + +/** + * @method setSyncFlag + * @param {cc.Physics3DComponent::PhysicsSyncFlag} arg0 + */ +setSyncFlag : function ( +physicssyncflag +) +{ +}, + +/** + * @method PhysicsSprite3D + * @constructor + */ +PhysicsSprite3D : function ( +) +{ +}, + +}; + +/** + * @class Physics3DWorld + */ +cc.Physics3DWorld = { + +/** + * @method stepSimulate + * @param {float} arg0 + */ +stepSimulate : function ( +float +) +{ +}, + +/** + * @method needCollisionChecking + * @return {bool} + */ +needCollisionChecking : function ( +) +{ + return false; +}, + +/** + * @method collisionChecking + */ +collisionChecking : function ( +) +{ +}, + +/** + * @method init + * @param {cc.Physics3DWorldDes} arg0 + * @return {bool} + */ +init : function ( +physics3dworlddes +) +{ + return false; +}, + +/** + * @method removePhysics3DConstraint + * @param {cc.Physics3DConstraint} arg0 + */ +removePhysics3DConstraint : function ( +physics3dconstraint +) +{ +}, + +/** + * @method isDebugDrawEnabled + * @return {bool} + */ +isDebugDrawEnabled : function ( +) +{ + return false; +}, + +/** + * @method removeAllPhysics3DConstraints + */ +removeAllPhysics3DConstraints : function ( +) +{ +}, + +/** + * @method rayCast + * @param {vec3_object} arg0 + * @param {vec3_object} arg1 + * @param {cc.Physics3DWorld::HitResult} arg2 + * @return {bool} + */ +rayCast : function ( +vec3, +vec3, +hitresult +) +{ + return false; +}, + +/** + * @method removeAllPhysics3DObjects + */ +removeAllPhysics3DObjects : function ( +) +{ +}, + +/** + * @method addPhysics3DObject + * @param {cc.Physics3DObject} arg0 + */ +addPhysics3DObject : function ( +physics3dobject +) +{ +}, + +/** + * @method setDebugDrawEnable + * @param {bool} arg0 + */ +setDebugDrawEnable : function ( +bool +) +{ +}, + +/** + * @method removePhysics3DObject + * @param {cc.Physics3DObject} arg0 + */ +removePhysics3DObject : function ( +physics3dobject +) +{ +}, + +/** + * @method getPhysicsObject + * @param {btCollisionObject} arg0 + * @return {cc.Physics3DObject} + */ +getPhysicsObject : function ( +btcollisionobject +) +{ + return cc.Physics3DObject; +}, + +/** + * @method addPhysics3DConstraint + * @param {cc.Physics3DConstraint} arg0 + * @param {bool} arg1 + */ +addPhysics3DConstraint : function ( +physics3dconstraint, +bool +) +{ +}, + +/** + * @method debugDraw + * @param {cc.Renderer} arg0 + */ +debugDraw : function ( +renderer +) +{ +}, + +/** + * @method sweepShape + * @param {cc.Physics3DShape} arg0 + * @param {mat4_object} arg1 + * @param {mat4_object} arg2 + * @param {cc.Physics3DWorld::HitResult} arg3 + * @return {bool} + */ +sweepShape : function ( +physics3dshape, +mat4, +mat4, +hitresult +) +{ + return false; +}, + +/** + * @method create + * @param {cc.Physics3DWorldDes} arg0 + * @return {cc.Physics3DWorld} + */ +create : function ( +physics3dworlddes +) +{ + return cc.Physics3DWorld; +}, + +/** + * @method Physics3DWorld + * @constructor + */ +Physics3DWorld : function ( +) +{ +}, + +}; + +/** + * @class Physics3DConstraint + */ +cc.Physics3DConstraint = { + +/** + * @method setEnabled + * @param {bool} arg0 + */ +setEnabled : function ( +bool +) +{ +}, + +/** + * @method setBreakingImpulse + * @param {float} arg0 + */ +setBreakingImpulse : function ( +float +) +{ +}, + +/** + * @method getUserData + * @return {void} + */ +getUserData : function ( +) +{ + return void; +}, + +/** + * @method getBreakingImpulse + * @return {float} + */ +getBreakingImpulse : function ( +) +{ + return 0; +}, + +/** + * @method getBodyA + * @return {cc.Physics3DRigidBody} + */ +getBodyA : function ( +) +{ + return cc.Physics3DRigidBody; +}, + +/** + * @method isEnabled + * @return {bool} + */ +isEnabled : function ( +) +{ + return false; +}, + +/** + * @method getOverrideNumSolverIterations + * @return {int} + */ +getOverrideNumSolverIterations : function ( +) +{ + return 0; +}, + +/** + * @method getBodyB + * @return {cc.Physics3DRigidBody} + */ +getBodyB : function ( +) +{ + return cc.Physics3DRigidBody; +}, + +/** + * @method setOverrideNumSolverIterations + * @param {int} arg0 + */ +setOverrideNumSolverIterations : function ( +int +) +{ +}, + +/** + * @method getConstraintType + * @return {cc.Physics3DConstraint::ConstraintType} + */ +getConstraintType : function ( +) +{ + return 0; +}, + +/** + * @method setUserData + * @param {void} arg0 + */ +setUserData : function ( +void +) +{ +}, + +/** + * @method getbtContraint + * @return {btTypedConstraint} + */ +getbtContraint : function ( +) +{ + return btTypedConstraint; +}, + +}; + +/** + * @class Physics3DPointToPointConstraint + */ +cc.Physics3DPointToPointConstraint = { + +/** + * @method getPivotPointInA + * @return {vec3_object} + */ +getPivotPointInA : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method getPivotPointInB + * @return {vec3_object} + */ +getPivotPointInB : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method setPivotPointInA + * @param {vec3_object} arg0 + */ +setPivotPointInA : function ( +vec3 +) +{ +}, + +/** + * @method setPivotPointInB + * @param {vec3_object} arg0 + */ +setPivotPointInB : function ( +vec3 +) +{ +}, + +/** + * @method create +* @param {cc.Physics3DRigidBody|cc.Physics3DRigidBody} physics3drigidbody +* @param {cc.Physics3DRigidBody|vec3_object} physics3drigidbody +* @param {vec3_object} vec3 +* @param {vec3_object} vec3 +* @return {cc.Physics3DPointToPointConstraint|cc.Physics3DPointToPointConstraint} +*/ +create : function( +physics3drigidbody, +physics3drigidbody, +vec3, +vec3 +) +{ + return cc.Physics3DPointToPointConstraint; +}, + +/** + * @method Physics3DPointToPointConstraint + * @constructor + */ +Physics3DPointToPointConstraint : function ( +) +{ +}, + +}; + +/** + * @class Physics3DHingeConstraint + */ +cc.Physics3DHingeConstraint = { + +/** + * @method getHingeAngle +* @param {mat4_object} mat4 +* @param {mat4_object} mat4 +* @return {float|float} +*/ +getHingeAngle : function( +mat4, +mat4 +) +{ + return 0; +}, + +/** + * @method getMotorTargetVelosity + * @return {float} + */ +getMotorTargetVelosity : function ( +) +{ + return 0; +}, + +/** + * @method getFrameOffsetA + * @return {mat4_object} + */ +getFrameOffsetA : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getFrameOffsetB + * @return {mat4_object} + */ +getFrameOffsetB : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method setMaxMotorImpulse + * @param {float} arg0 + */ +setMaxMotorImpulse : function ( +float +) +{ +}, + +/** + * @method enableAngularMotor + * @param {bool} arg0 + * @param {float} arg1 + * @param {float} arg2 + */ +enableAngularMotor : function ( +bool, +float, +float +) +{ +}, + +/** + * @method getUpperLimit + * @return {float} + */ +getUpperLimit : function ( +) +{ + return 0; +}, + +/** + * @method getMaxMotorImpulse + * @return {float} + */ +getMaxMotorImpulse : function ( +) +{ + return 0; +}, + +/** + * @method getLowerLimit + * @return {float} + */ +getLowerLimit : function ( +) +{ + return 0; +}, + +/** + * @method setUseFrameOffset + * @param {bool} arg0 + */ +setUseFrameOffset : function ( +bool +) +{ +}, + +/** + * @method getEnableAngularMotor + * @return {bool} + */ +getEnableAngularMotor : function ( +) +{ + return false; +}, + +/** + * @method enableMotor + * @param {bool} arg0 + */ +enableMotor : function ( +bool +) +{ +}, + +/** + * @method getBFrame + * @return {mat4_object} + */ +getBFrame : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method setFrames + * @param {mat4_object} arg0 + * @param {mat4_object} arg1 + */ +setFrames : function ( +mat4, +mat4 +) +{ +}, + +/** + * @method getUseFrameOffset + * @return {bool} + */ +getUseFrameOffset : function ( +) +{ + return false; +}, + +/** + * @method setAngularOnly + * @param {bool} arg0 + */ +setAngularOnly : function ( +bool +) +{ +}, + +/** + * @method setLimit + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + * @param {float} arg4 + */ +setLimit : function ( +float, +float, +float, +float, +float +) +{ +}, + +/** + * @method setMotorTarget +* @param {float|cc.Quaternion} float +* @param {float|float} float +*/ +setMotorTarget : function( +quaternion, +float +) +{ +}, + +/** + * @method getAngularOnly + * @return {bool} + */ +getAngularOnly : function ( +) +{ + return false; +}, + +/** + * @method setAxis + * @param {vec3_object} arg0 + */ +setAxis : function ( +vec3 +) +{ +}, + +/** + * @method getAFrame + * @return {mat4_object} + */ +getAFrame : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method create +* @param {cc.Physics3DRigidBody|cc.Physics3DRigidBody|cc.Physics3DRigidBody|cc.Physics3DRigidBody} physics3drigidbody +* @param {vec3_object|mat4_object|cc.Physics3DRigidBody|cc.Physics3DRigidBody} vec3 +* @param {vec3_object|bool|vec3_object|mat4_object} vec3 +* @param {bool|vec3_object|mat4_object} bool +* @param {vec3_object|bool} vec3 +* @param {vec3_object} vec3 +* @param {bool} bool +* @return {cc.Physics3DHingeConstraint|cc.Physics3DHingeConstraint|cc.Physics3DHingeConstraint|cc.Physics3DHingeConstraint} +*/ +create : function( +physics3drigidbody, +physics3drigidbody, +vec3, +vec3, +vec3, +vec3, +bool +) +{ + return cc.Physics3DHingeConstraint; +}, + +/** + * @method Physics3DHingeConstraint + * @constructor + */ +Physics3DHingeConstraint : function ( +) +{ +}, + +}; + +/** + * @class Physics3DSliderConstraint + */ +cc.Physics3DSliderConstraint = { + +/** + * @method setPoweredAngMotor + * @param {bool} arg0 + */ +setPoweredAngMotor : function ( +bool +) +{ +}, + +/** + * @method getDampingLimAng + * @return {float} + */ +getDampingLimAng : function ( +) +{ + return 0; +}, + +/** + * @method setRestitutionOrthoLin + * @param {float} arg0 + */ +setRestitutionOrthoLin : function ( +float +) +{ +}, + +/** + * @method setRestitutionDirLin + * @param {float} arg0 + */ +setRestitutionDirLin : function ( +float +) +{ +}, + +/** + * @method getLinearPos + * @return {float} + */ +getLinearPos : function ( +) +{ + return 0; +}, + +/** + * @method getFrameOffsetA + * @return {mat4_object} + */ +getFrameOffsetA : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getFrameOffsetB + * @return {mat4_object} + */ +getFrameOffsetB : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method setPoweredLinMotor + * @param {bool} arg0 + */ +setPoweredLinMotor : function ( +bool +) +{ +}, + +/** + * @method getDampingDirAng + * @return {float} + */ +getDampingDirAng : function ( +) +{ + return 0; +}, + +/** + * @method getRestitutionLimLin + * @return {float} + */ +getRestitutionLimLin : function ( +) +{ + return 0; +}, + +/** + * @method getSoftnessOrthoAng + * @return {float} + */ +getSoftnessOrthoAng : function ( +) +{ + return 0; +}, + +/** + * @method setSoftnessOrthoLin + * @param {float} arg0 + */ +setSoftnessOrthoLin : function ( +float +) +{ +}, + +/** + * @method setSoftnessLimLin + * @param {float} arg0 + */ +setSoftnessLimLin : function ( +float +) +{ +}, + +/** + * @method getAngularPos + * @return {float} + */ +getAngularPos : function ( +) +{ + return 0; +}, + +/** + * @method setRestitutionLimAng + * @param {float} arg0 + */ +setRestitutionLimAng : function ( +float +) +{ +}, + +/** + * @method setUpperLinLimit + * @param {float} arg0 + */ +setUpperLinLimit : function ( +float +) +{ +}, + +/** + * @method setDampingDirLin + * @param {float} arg0 + */ +setDampingDirLin : function ( +float +) +{ +}, + +/** + * @method getUpperAngLimit + * @return {float} + */ +getUpperAngLimit : function ( +) +{ + return 0; +}, + +/** + * @method getDampingDirLin + * @return {float} + */ +getDampingDirLin : function ( +) +{ + return 0; +}, + +/** + * @method getSoftnessDirAng + * @return {float} + */ +getSoftnessDirAng : function ( +) +{ + return 0; +}, + +/** + * @method getPoweredAngMotor + * @return {bool} + */ +getPoweredAngMotor : function ( +) +{ + return false; +}, + +/** + * @method setLowerAngLimit + * @param {float} arg0 + */ +setLowerAngLimit : function ( +float +) +{ +}, + +/** + * @method setUpperAngLimit + * @param {float} arg0 + */ +setUpperAngLimit : function ( +float +) +{ +}, + +/** + * @method setTargetLinMotorVelocity + * @param {float} arg0 + */ +setTargetLinMotorVelocity : function ( +float +) +{ +}, + +/** + * @method setDampingLimAng + * @param {float} arg0 + */ +setDampingLimAng : function ( +float +) +{ +}, + +/** + * @method getRestitutionLimAng + * @return {float} + */ +getRestitutionLimAng : function ( +) +{ + return 0; +}, + +/** + * @method getUseFrameOffset + * @return {bool} + */ +getUseFrameOffset : function ( +) +{ + return false; +}, + +/** + * @method getSoftnessOrthoLin + * @return {float} + */ +getSoftnessOrthoLin : function ( +) +{ + return 0; +}, + +/** + * @method getDampingOrthoAng + * @return {float} + */ +getDampingOrthoAng : function ( +) +{ + return 0; +}, + +/** + * @method setUseFrameOffset + * @param {bool} arg0 + */ +setUseFrameOffset : function ( +bool +) +{ +}, + +/** + * @method setLowerLinLimit + * @param {float} arg0 + */ +setLowerLinLimit : function ( +float +) +{ +}, + +/** + * @method getRestitutionDirLin + * @return {float} + */ +getRestitutionDirLin : function ( +) +{ + return 0; +}, + +/** + * @method getTargetLinMotorVelocity + * @return {float} + */ +getTargetLinMotorVelocity : function ( +) +{ + return 0; +}, + +/** + * @method getLowerLinLimit + * @return {float} + */ +getLowerLinLimit : function ( +) +{ + return 0; +}, + +/** + * @method getSoftnessLimLin + * @return {float} + */ +getSoftnessLimLin : function ( +) +{ + return 0; +}, + +/** + * @method setDampingOrthoAng + * @param {float} arg0 + */ +setDampingOrthoAng : function ( +float +) +{ +}, + +/** + * @method setSoftnessDirAng + * @param {float} arg0 + */ +setSoftnessDirAng : function ( +float +) +{ +}, + +/** + * @method getPoweredLinMotor + * @return {bool} + */ +getPoweredLinMotor : function ( +) +{ + return false; +}, + +/** + * @method setRestitutionOrthoAng + * @param {float} arg0 + */ +setRestitutionOrthoAng : function ( +float +) +{ +}, + +/** + * @method setDampingDirAng + * @param {float} arg0 + */ +setDampingDirAng : function ( +float +) +{ +}, + +/** + * @method setFrames + * @param {mat4_object} arg0 + * @param {mat4_object} arg1 + */ +setFrames : function ( +mat4, +mat4 +) +{ +}, + +/** + * @method getRestitutionOrthoAng + * @return {float} + */ +getRestitutionOrthoAng : function ( +) +{ + return 0; +}, + +/** + * @method getMaxAngMotorForce + * @return {float} + */ +getMaxAngMotorForce : function ( +) +{ + return 0; +}, + +/** + * @method getDampingOrthoLin + * @return {float} + */ +getDampingOrthoLin : function ( +) +{ + return 0; +}, + +/** + * @method getUpperLinLimit + * @return {float} + */ +getUpperLinLimit : function ( +) +{ + return 0; +}, + +/** + * @method setMaxLinMotorForce + * @param {float} arg0 + */ +setMaxLinMotorForce : function ( +float +) +{ +}, + +/** + * @method getRestitutionOrthoLin + * @return {float} + */ +getRestitutionOrthoLin : function ( +) +{ + return 0; +}, + +/** + * @method setTargetAngMotorVelocity + * @param {float} arg0 + */ +setTargetAngMotorVelocity : function ( +float +) +{ +}, + +/** + * @method getSoftnessLimAng + * @return {float} + */ +getSoftnessLimAng : function ( +) +{ + return 0; +}, + +/** + * @method setRestitutionDirAng + * @param {float} arg0 + */ +setRestitutionDirAng : function ( +float +) +{ +}, + +/** + * @method getDampingLimLin + * @return {float} + */ +getDampingLimLin : function ( +) +{ + return 0; +}, + +/** + * @method getLowerAngLimit + * @return {float} + */ +getLowerAngLimit : function ( +) +{ + return 0; +}, + +/** + * @method getRestitutionDirAng + * @return {float} + */ +getRestitutionDirAng : function ( +) +{ + return 0; +}, + +/** + * @method getTargetAngMotorVelocity + * @return {float} + */ +getTargetAngMotorVelocity : function ( +) +{ + return 0; +}, + +/** + * @method setRestitutionLimLin + * @param {float} arg0 + */ +setRestitutionLimLin : function ( +float +) +{ +}, + +/** + * @method getMaxLinMotorForce + * @return {float} + */ +getMaxLinMotorForce : function ( +) +{ + return 0; +}, + +/** + * @method setDampingOrthoLin + * @param {float} arg0 + */ +setDampingOrthoLin : function ( +float +) +{ +}, + +/** + * @method setSoftnessOrthoAng + * @param {float} arg0 + */ +setSoftnessOrthoAng : function ( +float +) +{ +}, + +/** + * @method setDampingLimLin + * @param {float} arg0 + */ +setDampingLimLin : function ( +float +) +{ +}, + +/** + * @method setSoftnessDirLin + * @param {float} arg0 + */ +setSoftnessDirLin : function ( +float +) +{ +}, + +/** + * @method setMaxAngMotorForce + * @param {float} arg0 + */ +setMaxAngMotorForce : function ( +float +) +{ +}, + +/** + * @method getSoftnessDirLin + * @return {float} + */ +getSoftnessDirLin : function ( +) +{ + return 0; +}, + +/** + * @method setSoftnessLimAng + * @param {float} arg0 + */ +setSoftnessLimAng : function ( +float +) +{ +}, + +/** + * @method getUseLinearReferenceFrameA + * @return {bool} + */ +getUseLinearReferenceFrameA : function ( +) +{ + return false; +}, + +/** + * @method create + * @param {cc.Physics3DRigidBody} arg0 + * @param {cc.Physics3DRigidBody} arg1 + * @param {mat4_object} arg2 + * @param {mat4_object} arg3 + * @param {bool} arg4 + * @return {cc.Physics3DSliderConstraint} + */ +create : function ( +physics3drigidbody, +physics3drigidbody, +mat4, +mat4, +bool +) +{ + return cc.Physics3DSliderConstraint; +}, + +/** + * @method Physics3DSliderConstraint + * @constructor + */ +Physics3DSliderConstraint : function ( +) +{ +}, + +}; + +/** + * @class Physics3DConeTwistConstraint + */ +cc.Physics3DConeTwistConstraint = { + +/** + * @method getBFrame + * @return {mat4_object} + */ +getBFrame : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method setFixThresh + * @param {float} arg0 + */ +setFixThresh : function ( +float +) +{ +}, + +/** + * @method getFrameOffsetB + * @return {mat4_object} + */ +getFrameOffsetB : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getFrameOffsetA + * @return {mat4_object} + */ +getFrameOffsetA : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method getFixThresh + * @return {float} + */ +getFixThresh : function ( +) +{ + return 0; +}, + +/** + * @method getSwingSpan2 + * @return {float} + */ +getSwingSpan2 : function ( +) +{ + return 0; +}, + +/** + * @method getSwingSpan1 + * @return {float} + */ +getSwingSpan1 : function ( +) +{ + return 0; +}, + +/** + * @method setMaxMotorImpulse + * @param {float} arg0 + */ +setMaxMotorImpulse : function ( +float +) +{ +}, + +/** + * @method setFrames + * @param {mat4_object} arg0 + * @param {mat4_object} arg1 + */ +setFrames : function ( +mat4, +mat4 +) +{ +}, + +/** + * @method getTwistAngle + * @return {float} + */ +getTwistAngle : function ( +) +{ + return 0; +}, + +/** + * @method GetPointForAngle + * @param {float} arg0 + * @param {float} arg1 + * @return {vec3_object} + */ +GetPointForAngle : function ( +float, +float +) +{ + return cc.Vec3; +}, + +/** + * @method setMaxMotorImpulseNormalized + * @param {float} arg0 + */ +setMaxMotorImpulseNormalized : function ( +float +) +{ +}, + +/** + * @method getTwistSpan + * @return {float} + */ +getTwistSpan : function ( +) +{ + return 0; +}, + +/** + * @method setDamping + * @param {float} arg0 + */ +setDamping : function ( +float +) +{ +}, + +/** + * @method setLimit + * @param {float} arg0 + * @param {float} arg1 + * @param {float} arg2 + * @param {float} arg3 + * @param {float} arg4 + * @param {float} arg5 + */ +setLimit : function ( +float, +float, +float, +float, +float, +float +) +{ +}, + +/** + * @method getAFrame + * @return {mat4_object} + */ +getAFrame : function ( +) +{ + return cc.Mat4; +}, + +/** + * @method enableMotor + * @param {bool} arg0 + */ +enableMotor : function ( +bool +) +{ +}, + +/** + * @method create +* @param {cc.Physics3DRigidBody|cc.Physics3DRigidBody} physics3drigidbody +* @param {cc.Physics3DRigidBody|mat4_object} physics3drigidbody +* @param {mat4_object} mat4 +* @param {mat4_object} mat4 +* @return {cc.Physics3DConeTwistConstraint|cc.Physics3DConeTwistConstraint} +*/ +create : function( +physics3drigidbody, +physics3drigidbody, +mat4, +mat4 +) +{ + return cc.Physics3DConeTwistConstraint; +}, + +/** + * @method Physics3DConeTwistConstraint + * @constructor + */ +Physics3DConeTwistConstraint : function ( +) +{ +}, + +}; + +/** + * @class Physics3D6DofConstraint + */ +cc.Physics3D6DofConstraint = { + +/** + * @method setLinearLowerLimit + * @param {vec3_object} arg0 + */ +setLinearLowerLimit : function ( +vec3 +) +{ +}, + +/** + * @method getLinearLowerLimit + * @return {vec3_object} + */ +getLinearLowerLimit : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method getAngularUpperLimit + * @return {vec3_object} + */ +getAngularUpperLimit : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method getUseFrameOffset + * @return {bool} + */ +getUseFrameOffset : function ( +) +{ + return false; +}, + +/** + * @method getLinearUpperLimit + * @return {vec3_object} + */ +getLinearUpperLimit : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method setAngularLowerLimit + * @param {vec3_object} arg0 + */ +setAngularLowerLimit : function ( +vec3 +) +{ +}, + +/** + * @method isLimited + * @param {int} arg0 + * @return {bool} + */ +isLimited : function ( +int +) +{ + return false; +}, + +/** + * @method setUseFrameOffset + * @param {bool} arg0 + */ +setUseFrameOffset : function ( +bool +) +{ +}, + +/** + * @method setLinearUpperLimit + * @param {vec3_object} arg0 + */ +setLinearUpperLimit : function ( +vec3 +) +{ +}, + +/** + * @method getAngularLowerLimit + * @return {vec3_object} + */ +getAngularLowerLimit : function ( +) +{ + return cc.Vec3; +}, + +/** + * @method setAngularUpperLimit + * @param {vec3_object} arg0 + */ +setAngularUpperLimit : function ( +vec3 +) +{ +}, + +/** + * @method create +* @param {cc.Physics3DRigidBody|cc.Physics3DRigidBody} physics3drigidbody +* @param {mat4_object|cc.Physics3DRigidBody} mat4 +* @param {bool|mat4_object} bool +* @param {mat4_object} mat4 +* @param {bool} bool +* @return {cc.Physics3D6DofConstraint|cc.Physics3D6DofConstraint} +*/ +create : function( +physics3drigidbody, +physics3drigidbody, +mat4, +mat4, +bool +) +{ + return cc.Physics3D6DofConstraint; +}, + +/** + * @method Physics3D6DofConstraint + * @constructor + */ +Physics3D6DofConstraint : function ( +) +{ +}, + +}; diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js index 93a53d1097..902900ccf7 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js @@ -1496,6 +1496,18 @@ getCapInsetsNormalRenderer : function ( return cc.Rect; }, +/** + * @method setTitleAlignment +* @param {cc.TextHAlignment|cc.TextHAlignment} texthalignment +* @param {cc.TextVAlignment} textvalignment +*/ +setTitleAlignment : function( +texthalignment, +textvalignment +) +{ +}, + /** * @method getCapInsetsPressedRenderer * @return {rect_object} @@ -3618,6 +3630,16 @@ getDeleteBackward : function ( return false; }, +/** + * @method getTextColor + * @return {color4b_object} + */ +getTextColor : function ( +) +{ + return cc.Color4B; +}, + /** * @method getPlaceHolder * @return {String} @@ -3814,6 +3836,16 @@ bool { }, +/** + * @method getTextHorizontalAlignment + * @return {cc.TextHAlignment} + */ +getTextHorizontalAlignment : function ( +) +{ + return 0; +}, + /** * @method setFontSize * @param {int} arg0 @@ -3894,6 +3926,16 @@ bool { }, +/** + * @method getTextVerticalAlignment + * @return {cc.TextVAlignment} + */ +getTextVerticalAlignment : function ( +) +{ + return 0; +}, + /** * @method setTouchAreaEnabled * @param {bool} arg0 diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp index 5fb1448702..81928ad133 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp @@ -1,6 +1,7 @@ #include "jsb_cocos2dx_3d_auto.hpp" #include "cocos2d_specifics.hpp" #include "cocos2d.h" +#include "CCBundle3D.h" template static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) { @@ -367,6 +368,7 @@ bool js_cocos2dx_3d_Animate3D_initWithFrames(JSContext *cx, uint32_t argc, jsval int arg2; double arg3; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -441,6 +443,7 @@ bool js_cocos2dx_3d_Animate3D_init(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Animation3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -467,6 +470,7 @@ bool js_cocos2dx_3d_Animate3D_init(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Animation3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -551,6 +555,7 @@ bool js_cocos2dx_3d_Animate3D_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Animation3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -584,6 +589,7 @@ bool js_cocos2dx_3d_Animate3D_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Animation3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -632,6 +638,7 @@ bool js_cocos2dx_3d_Animate3D_createWithFrames(JSContext *cx, uint32_t argc, jsv int arg1; int arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -661,6 +668,7 @@ bool js_cocos2dx_3d_Animate3D_createWithFrames(JSContext *cx, uint32_t argc, jsv int arg2; double arg3; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -820,6 +828,7 @@ bool js_cocos2dx_3d_AttachNode_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Bone3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1117,6 +1126,7 @@ bool js_cocos2dx_3d_BillBoard_createWithTexture(JSContext *cx, uint32_t argc, js if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1142,6 +1152,7 @@ bool js_cocos2dx_3d_BillBoard_createWithTexture(JSContext *cx, uint32_t argc, js cocos2d::Texture2D* arg0; cocos2d::BillBoard::Mode arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1280,6 +1291,7 @@ bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1412,6 +1424,7 @@ bool js_cocos2dx_3d_Mesh_setMaterial(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Material* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1637,6 +1650,7 @@ bool js_cocos2dx_3d_Mesh_setMeshIndexData(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::MeshIndexData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1720,6 +1734,7 @@ bool js_cocos2dx_3d_Mesh_setSkin(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::MeshSkin* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1783,6 +1798,7 @@ bool js_cocos2dx_3d_Mesh_setGLProgramState(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::GLProgramState* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1961,6 +1977,7 @@ bool js_cocos2dx_3d_Skeleton3D_addBone(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Bone3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2109,6 +2126,7 @@ bool js_cocos2dx_3d_Skeleton3D_getBoneIndex(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Bone3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2323,6 +2341,7 @@ bool js_cocos2dx_3d_Skybox_setTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::TextureCube* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2530,6 +2549,7 @@ bool js_cocos2dx_3d_Sprite3D_setTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2691,6 +2711,7 @@ bool js_cocos2dx_3d_Sprite3D_addMesh(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Mesh* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2738,6 +2759,7 @@ bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp if (argc == 2) { cocos2d::Material* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2759,6 +2781,7 @@ bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Material* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2941,6 +2964,7 @@ bool js_cocos2dx_3d_Sprite3D_createNode(JSContext *cx, uint32_t argc, jsval *vp) #pragma warning NO CONVERSION TO NATIVE FOR NodeData* ok = false; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -3763,6 +3787,7 @@ bool js_cocos2dx_3d_Terrain_setAlphaMap(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3888,6 +3913,7 @@ bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Vec3* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -3930,6 +3956,7 @@ bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Vec3* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -4340,6 +4367,358 @@ void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global) } } +JSClass *jsb_cocos2d_Bundle3D_class; +JSObject *jsb_cocos2d_Bundle3D_prototype; + +bool js_cocos2dx_3d_Bundle3D_load(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Bundle3D* cobj = (cocos2d::Bundle3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Bundle3D_load : Invalid Native Object"); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_load : Error processing arguments"); + bool ret = cobj->load(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_load : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Bundle3D_loadSkinData(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Bundle3D* cobj = (cocos2d::Bundle3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Bundle3D_loadSkinData : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + cocos2d::SkinData* arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + #pragma warning NO CONVERSION TO NATIVE FOR SkinData* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadSkinData : Error processing arguments"); + bool ret = cobj->loadSkinData(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_loadSkinData : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_3d_Bundle3D_clear(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Bundle3D* cobj = (cocos2d::Bundle3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Bundle3D_clear : Invalid Native Object"); + if (argc == 0) { + cobj->clear(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_clear : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_3d_Bundle3D_loadMaterials(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Bundle3D* cobj = (cocos2d::Bundle3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Bundle3D_loadMaterials : Invalid Native Object"); + if (argc == 1) { + cocos2d::MaterialDatas arg0; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadMaterials : Error processing arguments"); + bool ret = cobj->loadMaterials(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_loadMaterials : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Bundle3D_loadMeshDatas(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Bundle3D* cobj = (cocos2d::Bundle3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Bundle3D_loadMeshDatas : Invalid Native Object"); + if (argc == 1) { + cocos2d::MeshDatas arg0; + #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadMeshDatas : Error processing arguments"); + bool ret = cobj->loadMeshDatas(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_loadMeshDatas : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Bundle3D_loadNodes(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Bundle3D* cobj = (cocos2d::Bundle3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Bundle3D_loadNodes : Invalid Native Object"); + if (argc == 1) { + cocos2d::NodeDatas arg0; + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadNodes : Error processing arguments"); + bool ret = cobj->loadNodes(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_loadNodes : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_3d_Bundle3D_loadAnimationData(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Bundle3D* cobj = (cocos2d::Bundle3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Bundle3D_loadAnimationData : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + cocos2d::Animation3DData* arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + #pragma warning NO CONVERSION TO NATIVE FOR Animation3DData* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadAnimationData : Error processing arguments"); + bool ret = cobj->loadAnimationData(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_loadAnimationData : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_3d_Bundle3D_createBundle(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::Bundle3D* ret = cocos2d::Bundle3D::createBundle(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Bundle3D*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_createBundle : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_3d_Bundle3D_destroyBundle(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::Bundle3D* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Bundle3D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_destroyBundle : Error processing arguments"); + cocos2d::Bundle3D::destroyBundle(arg0); + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_destroyBundle : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_3d_Bundle3D_loadObj(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 4) { + cocos2d::MeshDatas arg0; + cocos2d::MaterialDatas arg1; + cocos2d::NodeDatas arg2; + std::string arg3; + #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas + ok = false; + ok &= jsval_to_std_string(cx, args.get(3), &arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadObj : Error processing arguments"); + bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + if (argc == 5) { + cocos2d::MeshDatas arg0; + cocos2d::MaterialDatas arg1; + cocos2d::NodeDatas arg2; + std::string arg3; + const char* arg4; + #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas + ok = false; + ok &= jsval_to_std_string(cx, args.get(3), &arg3); + std::string arg4_tmp; ok &= jsval_to_std_string(cx, args.get(4), &arg4_tmp); arg4 = arg4_tmp.c_str(); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Bundle3D_loadObj : Error processing arguments"); + bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_3d_Bundle3D_loadObj : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_3d_Bundle3D_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Bundle3D* cobj = new (std::nothrow) cocos2d::Bundle3D(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Bundle3D"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + + +void js_cocos2d_Bundle3D_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Bundle3D)", obj); +} + +void js_register_cocos2dx_3d_Bundle3D(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Bundle3D_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Bundle3D_class->name = "Bundle3D"; + jsb_cocos2d_Bundle3D_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Bundle3D_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Bundle3D_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Bundle3D_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Bundle3D_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Bundle3D_class->resolve = JS_ResolveStub; + jsb_cocos2d_Bundle3D_class->convert = JS_ConvertStub; + jsb_cocos2d_Bundle3D_class->finalize = js_cocos2d_Bundle3D_finalize; + jsb_cocos2d_Bundle3D_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("load", js_cocos2dx_3d_Bundle3D_load, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadSkinData", js_cocos2dx_3d_Bundle3D_loadSkinData, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clear", js_cocos2dx_3d_Bundle3D_clear, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadMaterials", js_cocos2dx_3d_Bundle3D_loadMaterials, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadMeshDatas", js_cocos2dx_3d_Bundle3D_loadMeshDatas, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadNodes", js_cocos2dx_3d_Bundle3D_loadNodes, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadAnimationData", js_cocos2dx_3d_Bundle3D_loadAnimationData, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("createBundle", js_cocos2dx_3d_Bundle3D_createBundle, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("destroyBundle", js_cocos2dx_3d_Bundle3D_destroyBundle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadObj", js_cocos2dx_3d_Bundle3D_loadObj, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Bundle3D_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Bundle3D_class, + js_cocos2dx_3d_Bundle3D_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Bundle3D", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Bundle3D_class; + p->proto = jsb_cocos2d_Bundle3D_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj) { // Get the ns JS::RootedObject ns(cx); @@ -4352,6 +4731,7 @@ void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj) { js_register_cocos2dx_3d_Sprite3DCache(cx, ns); js_register_cocos2dx_3d_Terrain(cx, ns); js_register_cocos2dx_3d_Skybox(cx, ns); + js_register_cocos2dx_3d_Bundle3D(cx, ns); js_register_cocos2dx_3d_Skeleton3D(cx, ns); js_register_cocos2dx_3d_BillBoard(cx, ns); js_register_cocos2dx_3d_Animation3D(cx, ns); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.hpp index 7ccbe87356..968737b2ac 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.hpp @@ -222,5 +222,24 @@ void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_3d_TextureCube_reloadTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_3d_TextureCube_TextureCube(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Bundle3D_class; +extern JSObject *jsb_cocos2d_Bundle3D_prototype; + +bool js_cocos2dx_3d_Bundle3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_3d_Bundle3D_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_3d_Bundle3D(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_3d_Bundle3D_load(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_loadSkinData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_clear(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_loadMaterials(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_loadMeshDatas(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_loadNodes(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_loadAnimationData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_createBundle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_destroyBundle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_loadObj(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_3d_Bundle3D_Bundle3D(JSContext *cx, uint32_t argc, jsval *vp); #endif diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_extension_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_extension_auto.cpp index 8bc9e813e1..08c3a1cceb 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_extension_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_extension_auto.cpp @@ -777,6 +777,7 @@ bool js_cocos2dx_3d_extension_PUParticleSystem3D_copyAttributesTo(JSContext *cx, if (argc == 1) { cocos2d::PUParticleSystem3D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index 06b7e7b793..671517ebd0 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -124,6 +124,7 @@ bool js_cocos2dx_Texture2D_initWithImage(JSContext *cx, uint32_t argc, jsval *vp if (argc == 2) { cocos2d::Image* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -147,6 +148,7 @@ bool js_cocos2dx_Texture2D_initWithImage(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Image* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -177,6 +179,7 @@ bool js_cocos2dx_Texture2D_setGLProgram(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::GLProgram* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1446,6 +1449,7 @@ bool js_cocos2dx_Node_addChild(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1467,6 +1471,7 @@ bool js_cocos2dx_Node_addChild(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1485,6 +1490,7 @@ bool js_cocos2dx_Node_addChild(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1509,6 +1515,7 @@ bool js_cocos2dx_Node_addChild(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1547,6 +1554,7 @@ bool js_cocos2dx_Node_removeComponent(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Component* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1590,6 +1598,7 @@ bool js_cocos2dx_Node_setPhysicsBody(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::PhysicsBody* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2205,6 +2214,7 @@ bool js_cocos2dx_Node_removeChild(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2221,6 +2231,7 @@ bool js_cocos2dx_Node_removeChild(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Node* arg0; bool arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2319,6 +2330,7 @@ bool js_cocos2dx_Node_setGLProgramState(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::GLProgramState* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2444,6 +2456,7 @@ bool js_cocos2dx_Node_convertTouchToNodeSpace(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::Touch* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2577,6 +2590,7 @@ bool js_cocos2dx_Node_setParent(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2658,6 +2672,7 @@ bool js_cocos2dx_Node_convertTouchToNodeSpaceAR(JSContext *cx, uint32_t argc, js if (argc == 1) { cocos2d::Touch* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2751,6 +2766,7 @@ bool js_cocos2dx_Node_reorderChild(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Node* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3007,6 +3023,7 @@ bool js_cocos2dx_Node_addComponent(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Component* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3036,6 +3053,7 @@ bool js_cocos2dx_Node_runAction(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Action* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3084,6 +3102,7 @@ bool js_cocos2dx_Node_visit(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Renderer* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3118,6 +3137,7 @@ bool js_cocos2dx_Node_setGLProgram(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::GLProgram* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3274,6 +3294,7 @@ bool js_cocos2dx_Node_setScheduler(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Scheduler* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3610,6 +3631,7 @@ bool js_cocos2dx_Node_setActionManager(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionManager* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4264,6 +4286,7 @@ bool js_cocos2dx_Node_setEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::EventDispatcher* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4321,6 +4344,7 @@ bool js_cocos2dx_Node_draw(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Renderer* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4355,6 +4379,7 @@ bool js_cocos2dx_Node_setUserObject(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Ref* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4693,6 +4718,7 @@ bool js_cocos2dx_Node_stopAction(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Action* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5162,6 +5188,7 @@ bool js_cocos2dx_Scene_render(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Renderer* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5189,6 +5216,7 @@ bool js_cocos2dx_Scene_onProjectionChanged(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::EventCustom* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6106,6 +6134,7 @@ bool js_cocos2dx_Director_setEventDispatcher(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::EventDispatcher* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6223,6 +6252,7 @@ bool js_cocos2dx_Director_setActionManager(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::ActionManager* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6592,6 +6622,7 @@ bool js_cocos2dx_Director_setScheduler(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Scheduler* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6813,6 +6844,7 @@ bool js_cocos2dx_Director_setOpenGLView(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::GLView* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6896,6 +6928,7 @@ bool js_cocos2dx_Director_runWithScene(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Scene* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6923,6 +6956,7 @@ bool js_cocos2dx_Director_setNotificationNode(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7179,6 +7213,7 @@ bool js_cocos2dx_Director_pushScene(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Scene* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7287,6 +7322,7 @@ bool js_cocos2dx_Director_replaceScene(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Scene* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7876,6 +7912,7 @@ bool js_cocos2dx_Action_startWithTarget(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7903,6 +7940,7 @@ bool js_cocos2dx_Action_setOriginalTarget(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8099,6 +8137,7 @@ bool js_cocos2dx_Action_setTarget(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8345,6 +8384,7 @@ bool js_cocos2dx_Speed_setInnerAction(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8411,6 +8451,7 @@ bool js_cocos2dx_Speed_initWithAction(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8463,6 +8504,7 @@ bool js_cocos2dx_Speed_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8619,6 +8661,7 @@ bool js_cocos2dx_Follow_initWithTarget(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8637,6 +8680,7 @@ bool js_cocos2dx_Follow_initWithTarget(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Node* arg0; cocos2d::Rect arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8681,6 +8725,7 @@ bool js_cocos2dx_Follow_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8706,6 +8751,7 @@ bool js_cocos2dx_Follow_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Node* arg0; cocos2d::Rect arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8885,6 +8931,7 @@ bool js_cocos2dx_SpriteFrame_setTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9113,6 +9160,7 @@ bool js_cocos2dx_SpriteFrame_initWithTexture(JSContext *cx, uint32_t argc, jsval if (argc == 5) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9144,6 +9192,7 @@ bool js_cocos2dx_SpriteFrame_initWithTexture(JSContext *cx, uint32_t argc, jsval if (argc == 2) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9365,6 +9414,7 @@ bool js_cocos2dx_SpriteFrame_createWithTexture(JSContext *cx, uint32_t argc, jsv if (argc == 5) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9404,6 +9454,7 @@ bool js_cocos2dx_SpriteFrame_createWithTexture(JSContext *cx, uint32_t argc, jsv if (argc == 2) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9573,6 +9624,7 @@ bool js_cocos2dx_AnimationFrame_setSpriteFrame(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9744,6 +9796,7 @@ bool js_cocos2dx_AnimationFrame_initWithSpriteFrame(JSContext *cx, uint32_t argc double arg1; cocos2d::ValueMap arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9773,6 +9826,7 @@ bool js_cocos2dx_AnimationFrame_create(JSContext *cx, uint32_t argc, jsval *vp) double arg1; cocos2d::ValueMap arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9930,6 +9984,7 @@ bool js_cocos2dx_Animation_addSpriteFrame(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10265,6 +10320,7 @@ bool js_cocos2dx_Animation_addSpriteFrameWithTexture(JSContext *cx, uint32_t arg cocos2d::Texture2D* arg0; cocos2d::Rect arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10686,6 +10742,7 @@ bool js_cocos2dx_Sequence_initWithTwoActions(JSContext *cx, uint32_t argc, jsval cocos2d::FiniteTimeAction* arg0; cocos2d::FiniteTimeAction* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10694,6 +10751,7 @@ bool js_cocos2dx_Sequence_initWithTwoActions(JSContext *cx, uint32_t argc, jsval JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -10815,6 +10873,7 @@ bool js_cocos2dx_Repeat_setInnerAction(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::FiniteTimeAction* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10843,6 +10902,7 @@ bool js_cocos2dx_Repeat_initWithAction(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::FiniteTimeAction* arg0; unsigned int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10895,6 +10955,7 @@ bool js_cocos2dx_Repeat_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::FiniteTimeAction* arg0; unsigned int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11029,6 +11090,7 @@ bool js_cocos2dx_RepeatForever_setInnerAction(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11056,6 +11118,7 @@ bool js_cocos2dx_RepeatForever_initWithAction(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11106,6 +11169,7 @@ bool js_cocos2dx_RepeatForever_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11240,6 +11304,7 @@ bool js_cocos2dx_Spawn_initWithTwoActions(JSContext *cx, uint32_t argc, jsval *v cocos2d::FiniteTimeAction* arg0; cocos2d::FiniteTimeAction* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11248,6 +11313,7 @@ bool js_cocos2dx_Spawn_initWithTwoActions(JSContext *cx, uint32_t argc, jsval *v JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -13731,6 +13797,7 @@ bool js_cocos2dx_FadeIn_setReverseAction(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::FadeTo* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -13878,6 +13945,7 @@ bool js_cocos2dx_FadeOut_setReverseAction(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::FadeTo* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14480,6 +14548,7 @@ bool js_cocos2dx_ReverseTime_initWithAction(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::FiniteTimeAction* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14505,6 +14574,7 @@ bool js_cocos2dx_ReverseTime_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::FiniteTimeAction* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14684,6 +14754,7 @@ bool js_cocos2dx_Animate_initWithAnimation(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::Animation* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14713,6 +14784,7 @@ bool js_cocos2dx_Animate_setAnimation(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Animation* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14736,6 +14808,7 @@ bool js_cocos2dx_Animate_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Animation* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14918,6 +14991,7 @@ bool js_cocos2dx_TargetedAction_initWithTarget(JSContext *cx, uint32_t argc, jsv cocos2d::Node* arg0; cocos2d::FiniteTimeAction* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14926,6 +15000,7 @@ bool js_cocos2dx_TargetedAction_initWithTarget(JSContext *cx, uint32_t argc, jsv JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -14955,6 +15030,7 @@ bool js_cocos2dx_TargetedAction_setForcedTarget(JSContext *cx, uint32_t argc, js if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14979,6 +15055,7 @@ bool js_cocos2dx_TargetedAction_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Node* arg0; cocos2d::FiniteTimeAction* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14987,6 +15064,7 @@ bool js_cocos2dx_TargetedAction_create(JSContext *cx, uint32_t argc, jsval *vp) JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16111,6 +16189,7 @@ bool js_cocos2dx_Properties_getMat4(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Mat4* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16290,6 +16369,7 @@ bool js_cocos2dx_Properties_getColor(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Vec4* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16313,6 +16393,7 @@ bool js_cocos2dx_Properties_getColor(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Vec3* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16428,6 +16509,7 @@ bool js_cocos2dx_Properties_getVec3(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Vec3* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16459,6 +16541,7 @@ bool js_cocos2dx_Properties_getVec2(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Vec2* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16490,6 +16573,7 @@ bool js_cocos2dx_Properties_getVec4(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Vec4* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16568,6 +16652,7 @@ bool js_cocos2dx_Properties_getQuaternionFromAxisAngle(JSContext *cx, uint32_t a cocos2d::Quaternion* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16598,6 +16683,7 @@ bool js_cocos2dx_Properties_parseColor(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Vec4* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16621,6 +16707,7 @@ bool js_cocos2dx_Properties_parseColor(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Vec3* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16639,6 +16726,34 @@ bool js_cocos2dx_Properties_parseColor(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Properties_parseColor : wrong number of arguments"); return false; } +bool js_cocos2dx_Properties_parseVec3(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 2) { + const char* arg0; + cocos2d::Vec3* arg1; + std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Vec3*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Properties_parseVec3 : Error processing arguments"); + bool ret = cocos2d::Properties::parseVec3(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_Properties_parseVec3 : wrong number of arguments"); + return false; +} + bool js_cocos2dx_Properties_parseAxisAngle(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -16648,6 +16763,7 @@ bool js_cocos2dx_Properties_parseAxisAngle(JSContext *cx, uint32_t argc, jsval * cocos2d::Quaternion* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16675,6 +16791,7 @@ bool js_cocos2dx_Properties_parseVec2(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Vec2* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16693,30 +16810,28 @@ bool js_cocos2dx_Properties_parseVec2(JSContext *cx, uint32_t argc, jsval *vp) return false; } -bool js_cocos2dx_Properties_parseVec3(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Properties_createNonRefCounted(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - if (argc == 2) { - const char* arg0; - cocos2d::Vec3* arg1; - std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); - do { - if (!args.get(1).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(1).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg1 = (cocos2d::Vec3*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Properties_parseVec3 : Error processing arguments"); - bool ret = cocos2d::Properties::parseVec3(arg0, arg1); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Properties_createNonRefCounted : Error processing arguments"); + cocos2d::Properties* ret = cocos2d::Properties::createNonRefCounted(arg0); jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Properties*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Properties_parseVec3 : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_Properties_createNonRefCounted : wrong number of arguments"); return false; } @@ -16729,6 +16844,7 @@ bool js_cocos2dx_Properties_parseVec4(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Vec4* arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -16747,31 +16863,6 @@ bool js_cocos2dx_Properties_parseVec4(JSContext *cx, uint32_t argc, jsval *vp) return false; } -bool js_cocos2dx_Properties_createWithoutAutorelease(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Properties_createWithoutAutorelease : Error processing arguments"); - cocos2d::Properties* ret = cocos2d::Properties::createWithoutAutorelease(arg0); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Properties*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_Properties_createWithoutAutorelease : wrong number of arguments"); - return false; -} - void js_cocos2d_Properties_finalize(JSFreeOp *fop, JSObject *obj) { @@ -16824,11 +16915,11 @@ void js_register_cocos2dx_Properties(JSContext *cx, JS::HandleObject global) { static JSFunctionSpec st_funcs[] = { JS_FN("parseColor", js_cocos2dx_Properties_parseColor, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("parseVec3", js_cocos2dx_Properties_parseVec3, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("parseAxisAngle", js_cocos2dx_Properties_parseAxisAngle, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("parseVec2", js_cocos2dx_Properties_parseVec2, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("parseVec3", js_cocos2dx_Properties_parseVec3, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createNonRefCounted", js_cocos2dx_Properties_createNonRefCounted, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("parseVec4", js_cocos2dx_Properties_parseVec4, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithoutAutorelease", js_cocos2dx_Properties_createWithoutAutorelease, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; @@ -17500,6 +17591,7 @@ bool js_cocos2dx_FileUtils_setDelegate(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::FileUtils* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18032,6 +18124,7 @@ bool js_cocos2dx_EventDispatcher_addEventListenerWithSceneGraphPriority(JSContex cocos2d::EventListener* arg0; cocos2d::Node* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18040,6 +18133,7 @@ bool js_cocos2dx_EventDispatcher_addEventListenerWithSceneGraphPriority(JSContex JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -18127,6 +18221,7 @@ bool js_cocos2dx_EventDispatcher_addEventListenerWithFixedPriority(JSContext *cx cocos2d::EventListener* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18159,6 +18254,7 @@ bool js_cocos2dx_EventDispatcher_removeEventListenersForTarget(JSContext *cx, ui if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18177,6 +18273,7 @@ bool js_cocos2dx_EventDispatcher_removeEventListenersForTarget(JSContext *cx, ui if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18218,6 +18315,7 @@ bool js_cocos2dx_EventDispatcher_resumeEventListenersForTarget(JSContext *cx, ui if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18234,6 +18332,7 @@ bool js_cocos2dx_EventDispatcher_resumeEventListenersForTarget(JSContext *cx, ui cocos2d::Node* arg0; bool arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18263,6 +18362,7 @@ bool js_cocos2dx_EventDispatcher_setPriority(JSContext *cx, uint32_t argc, jsval cocos2d::EventListener* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18291,6 +18391,7 @@ bool js_cocos2dx_EventDispatcher_dispatchEvent(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocos2d::Event* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18318,6 +18419,7 @@ bool js_cocos2dx_EventDispatcher_pauseEventListenersForTarget(JSContext *cx, uin if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18334,6 +18436,7 @@ bool js_cocos2dx_EventDispatcher_pauseEventListenersForTarget(JSContext *cx, uin cocos2d::Node* arg0; bool arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18382,6 +18485,7 @@ bool js_cocos2dx_EventDispatcher_removeEventListener(JSContext *cx, uint32_t arg if (argc == 1) { cocos2d::EventListener* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18526,6 +18630,7 @@ bool js_cocos2dx_EventFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ui::Widget* arg0; cocos2d::ui::Widget* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -18534,6 +18639,7 @@ bool js_cocos2dx_EventFocus_constructor(JSContext *cx, uint32_t argc, jsval *vp) JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -20765,6 +20871,7 @@ bool js_cocos2dx_ActionEase_initWithAction(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -20904,6 +21011,7 @@ bool js_cocos2dx_EaseRateAction_initWithAction(JSContext *cx, uint32_t argc, jsv cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -20949,6 +21057,7 @@ bool js_cocos2dx_EaseRateAction_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21051,6 +21160,7 @@ bool js_cocos2dx_EaseIn_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21179,6 +21289,7 @@ bool js_cocos2dx_EaseOut_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21307,6 +21418,7 @@ bool js_cocos2dx_EaseInOut_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21434,6 +21546,7 @@ bool js_cocos2dx_EaseExponentialIn_create(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21560,6 +21673,7 @@ bool js_cocos2dx_EaseExponentialOut_create(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21686,6 +21800,7 @@ bool js_cocos2dx_EaseExponentialInOut_create(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21812,6 +21927,7 @@ bool js_cocos2dx_EaseSineIn_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -21938,6 +22054,7 @@ bool js_cocos2dx_EaseSineOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22064,6 +22181,7 @@ bool js_cocos2dx_EaseSineInOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22214,6 +22332,7 @@ bool js_cocos2dx_EaseElastic_initWithAction(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22232,6 +22351,7 @@ bool js_cocos2dx_EaseElastic_initWithAction(JSContext *cx, uint32_t argc, jsval cocos2d::ActionInterval* arg0; double arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22343,6 +22463,7 @@ bool js_cocos2dx_EaseElasticIn_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22370,6 +22491,7 @@ bool js_cocos2dx_EaseElasticIn_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22501,6 +22623,7 @@ bool js_cocos2dx_EaseElasticOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22528,6 +22651,7 @@ bool js_cocos2dx_EaseElasticOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22659,6 +22783,7 @@ bool js_cocos2dx_EaseElasticInOut_create(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22686,6 +22811,7 @@ bool js_cocos2dx_EaseElasticInOut_create(JSContext *cx, uint32_t argc, jsval *vp if (argc == 2) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -22877,6 +23003,7 @@ bool js_cocos2dx_EaseBounceIn_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23003,6 +23130,7 @@ bool js_cocos2dx_EaseBounceOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23129,6 +23257,7 @@ bool js_cocos2dx_EaseBounceInOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23255,6 +23384,7 @@ bool js_cocos2dx_EaseBackIn_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23381,6 +23511,7 @@ bool js_cocos2dx_EaseBackOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23507,6 +23638,7 @@ bool js_cocos2dx_EaseBackInOut_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23659,6 +23791,7 @@ bool js_cocos2dx_EaseBezierAction_create(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23803,6 +23936,7 @@ bool js_cocos2dx_EaseQuadraticActionIn_create(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -23946,6 +24080,7 @@ bool js_cocos2dx_EaseQuadraticActionOut_create(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -24089,6 +24224,7 @@ bool js_cocos2dx_EaseQuadraticActionInOut_create(JSContext *cx, uint32_t argc, j if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -24232,6 +24368,7 @@ bool js_cocos2dx_EaseQuarticActionIn_create(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -24375,6 +24512,7 @@ bool js_cocos2dx_EaseQuarticActionOut_create(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -24518,6 +24656,7 @@ bool js_cocos2dx_EaseQuarticActionInOut_create(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -24661,6 +24800,7 @@ bool js_cocos2dx_EaseQuinticActionIn_create(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -24804,6 +24944,7 @@ bool js_cocos2dx_EaseQuinticActionOut_create(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -24947,6 +25088,7 @@ bool js_cocos2dx_EaseQuinticActionInOut_create(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -25090,6 +25232,7 @@ bool js_cocos2dx_EaseCircleActionIn_create(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -25233,6 +25376,7 @@ bool js_cocos2dx_EaseCircleActionOut_create(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -25376,6 +25520,7 @@ bool js_cocos2dx_EaseCircleActionInOut_create(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -25519,6 +25664,7 @@ bool js_cocos2dx_EaseCubicActionIn_create(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -25662,6 +25808,7 @@ bool js_cocos2dx_EaseCubicActionOut_create(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -25805,6 +25952,7 @@ bool js_cocos2dx_EaseCubicActionInOut_create(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -29601,6 +29749,7 @@ bool js_cocos2dx_ActionManager_getActionByTag(JSContext *cx, uint32_t argc, jsva const cocos2d::Node* arg1; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -29639,6 +29788,7 @@ bool js_cocos2dx_ActionManager_removeActionByTag(JSContext *cx, uint32_t argc, j cocos2d::Node* arg1; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -29684,6 +29834,7 @@ bool js_cocos2dx_ActionManager_addAction(JSContext *cx, uint32_t argc, jsval *vp cocos2d::Node* arg1; bool arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -29692,6 +29843,7 @@ bool js_cocos2dx_ActionManager_addAction(JSContext *cx, uint32_t argc, jsval *vp JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -29720,6 +29872,7 @@ bool js_cocos2dx_ActionManager_resumeTarget(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -29767,6 +29920,7 @@ bool js_cocos2dx_ActionManager_pauseTarget(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -29794,6 +29948,7 @@ bool js_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(JSContext *cx, if (argc == 1) { const cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -29823,6 +29978,7 @@ bool js_cocos2dx_ActionManager_removeAllActionsFromTarget(JSContext *cx, uint32_ if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -29870,6 +30026,7 @@ bool js_cocos2dx_ActionManager_removeAction(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Action* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -29899,6 +30056,7 @@ bool js_cocos2dx_ActionManager_removeAllActionsByTag(JSContext *cx, uint32_t arg cocos2d::Node* arg1; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -33058,6 +33216,7 @@ bool js_cocos2dx_GLProgramState_setUniformVec2v(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } const cocos2d::Vec2* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -33082,6 +33241,7 @@ bool js_cocos2dx_GLProgramState_setUniformVec2v(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } const cocos2d::Vec2* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -33178,6 +33338,7 @@ bool js_cocos2dx_GLProgramState_setGLProgram(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::GLProgram* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -33301,6 +33462,7 @@ bool js_cocos2dx_GLProgramState_setUniformTexture(JSContext *cx, uint32_t argc, if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -33322,6 +33484,7 @@ bool js_cocos2dx_GLProgramState_setUniformTexture(JSContext *cx, uint32_t argc, if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -33474,6 +33637,7 @@ bool js_cocos2dx_GLProgramState_setUniformVec3v(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } const cocos2d::Vec3* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -33498,6 +33662,7 @@ bool js_cocos2dx_GLProgramState_setUniformVec3v(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } const cocos2d::Vec3* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -33540,6 +33705,7 @@ bool js_cocos2dx_GLProgramState_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::GLProgram* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -33597,6 +33763,7 @@ bool js_cocos2dx_GLProgramState_getOrCreateWithGLProgram(JSContext *cx, uint32_t if (argc == 1) { cocos2d::GLProgram* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -33819,6 +33986,7 @@ bool js_cocos2dx_AtlasNode_setTextureAtlas(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::TextureAtlas* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -33927,6 +34095,7 @@ bool js_cocos2dx_AtlasNode_setTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -33957,6 +34126,7 @@ bool js_cocos2dx_AtlasNode_initWithTexture(JSContext *cx, uint32_t argc, jsval * int arg2; int arg3; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -34183,6 +34353,7 @@ bool js_cocos2dx_ClippingNode_setStencil(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -34289,6 +34460,7 @@ bool js_cocos2dx_ClippingNode_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -34471,6 +34643,7 @@ bool js_cocos2dx_DrawNode_drawPoints(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 4) { const cocos2d::Vec2* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -34498,6 +34671,7 @@ bool js_cocos2dx_DrawNode_drawPoints(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { const cocos2d::Vec2* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -34700,6 +34874,7 @@ bool js_cocos2dx_DrawNode_drawCatmullRom(JSContext *cx, uint32_t argc, jsval *vp unsigned int arg1; cocos2d::Color4F arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -34917,6 +35092,7 @@ bool js_cocos2dx_DrawNode_drawSolidPoly(JSContext *cx, uint32_t argc, jsval *vp) unsigned int arg1; cocos2d::Color4F arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35011,6 +35187,7 @@ bool js_cocos2dx_DrawNode_drawCardinalSpline(JSContext *cx, uint32_t argc, jsval unsigned int arg2; cocos2d::Color4F arg3; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35068,6 +35245,7 @@ bool js_cocos2dx_DrawNode_drawPoly(JSContext *cx, uint32_t argc, jsval *vp) bool arg2; cocos2d::Color4F arg3; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35306,6 +35484,7 @@ bool js_cocos2dx_SpriteBatchNode_appendChild(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35335,6 +35514,7 @@ bool js_cocos2dx_SpriteBatchNode_addSpriteWithoutQuad(JSContext *cx, uint32_t ar int arg1; int arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35393,6 +35573,7 @@ bool js_cocos2dx_SpriteBatchNode_initWithTexture(JSContext *cx, uint32_t argc, j if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35411,6 +35592,7 @@ bool js_cocos2dx_SpriteBatchNode_initWithTexture(JSContext *cx, uint32_t argc, j cocos2d::Texture2D* arg0; ssize_t arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35459,6 +35641,7 @@ bool js_cocos2dx_SpriteBatchNode_lowestAtlasIndexInChild(JSContext *cx, uint32_t if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35489,6 +35672,7 @@ bool js_cocos2dx_SpriteBatchNode_atlasIndexForChild(JSContext *cx, uint32_t argc cocos2d::Sprite* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35519,6 +35703,7 @@ bool js_cocos2dx_SpriteBatchNode_setTextureAtlas(JSContext *cx, uint32_t argc, j if (argc == 1) { cocos2d::TextureAtlas* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35647,6 +35832,7 @@ bool js_cocos2dx_SpriteBatchNode_insertQuadFromSprite(JSContext *cx, uint32_t ar cocos2d::Sprite* arg0; ssize_t arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35675,6 +35861,7 @@ bool js_cocos2dx_SpriteBatchNode_setTexture(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35703,6 +35890,7 @@ bool js_cocos2dx_SpriteBatchNode_rebuildIndexInOrder(JSContext *cx, uint32_t arg cocos2d::Sprite* arg0; ssize_t arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35733,6 +35921,7 @@ bool js_cocos2dx_SpriteBatchNode_highestAtlasIndexInChild(JSContext *cx, uint32_ if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35784,6 +35973,7 @@ bool js_cocos2dx_SpriteBatchNode_removeSpriteFromAtlas(JSContext *cx, uint32_t a if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35871,6 +36061,7 @@ bool js_cocos2dx_SpriteBatchNode_createWithTexture(JSContext *cx, uint32_t argc, if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -35896,6 +36087,7 @@ bool js_cocos2dx_SpriteBatchNode_createWithTexture(JSContext *cx, uint32_t argc, cocos2d::Texture2D* arg0; ssize_t arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -36552,6 +36744,7 @@ bool js_cocos2dx_Label_setCharMap(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 4) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -37127,6 +37320,7 @@ bool js_cocos2dx_Label_createWithCharMap(JSContext *cx, uint32_t argc, jsval *vp if (argc == 4) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -37549,6 +37743,7 @@ bool js_cocos2dx_LabelAtlas_initWithString(JSContext *cx, uint32_t argc, jsval * if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -40340,6 +40535,7 @@ bool js_cocos2dx_LayerMultiplex_addLayer(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Layer* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -40787,6 +40983,7 @@ bool js_cocos2dx_MenuItemLabel_setLabel(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -40853,6 +41050,7 @@ bool js_cocos2dx_MenuItemLabel_initWithLabel(JSContext *cx, uint32_t argc, jsval cocos2d::Node* arg0; std::function arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -41582,6 +41780,7 @@ bool js_cocos2dx_MenuItemSprite_setNormalImage(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -41609,6 +41808,7 @@ bool js_cocos2dx_MenuItemSprite_setDisabledImage(JSContext *cx, uint32_t argc, j if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -41639,6 +41839,7 @@ bool js_cocos2dx_MenuItemSprite_initWithNormalSprite(JSContext *cx, uint32_t arg cocos2d::Node* arg2; std::function arg3; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -41647,6 +41848,7 @@ bool js_cocos2dx_MenuItemSprite_initWithNormalSprite(JSContext *cx, uint32_t arg JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -41655,6 +41857,7 @@ bool js_cocos2dx_MenuItemSprite_initWithNormalSprite(JSContext *cx, uint32_t arg JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -41713,6 +41916,7 @@ bool js_cocos2dx_MenuItemSprite_setSelectedImage(JSContext *cx, uint32_t argc, j if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -41949,6 +42153,7 @@ bool js_cocos2dx_MenuItemImage_setDisabledSpriteFrame(JSContext *cx, uint32_t ar if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -41976,6 +42181,7 @@ bool js_cocos2dx_MenuItemImage_setSelectedSpriteFrame(JSContext *cx, uint32_t ar if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -42003,6 +42209,7 @@ bool js_cocos2dx_MenuItemImage_setNormalSpriteFrame(JSContext *cx, uint32_t argc if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -42237,6 +42444,7 @@ bool js_cocos2dx_MenuItemToggle_initWithItem(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::MenuItem* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -42284,6 +42492,7 @@ bool js_cocos2dx_MenuItemToggle_addSubItem(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::MenuItem* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -42733,6 +42942,7 @@ bool js_cocos2dx_MotionStreak_setTexture(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -42933,6 +43143,7 @@ bool js_cocos2dx_MotionStreak_initWithFade(JSContext *cx, uint32_t argc, jsval * if (!ok) { ok = true; break; } cocos2d::Texture2D* arg4; do { + if (args.get(4).isNull()) { arg4 = nullptr; break; } if (!args.get(4).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(4).toObjectOrNull(); @@ -43038,6 +43249,7 @@ bool js_cocos2dx_MotionStreak_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Texture2D* arg4; do { + if (args.get(4).isNull()) { arg4 = nullptr; break; } if (!args.get(4).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(4).toObjectOrNull(); @@ -43230,6 +43442,7 @@ bool js_cocos2dx_NodeGrid_setTarget(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -43422,6 +43635,7 @@ bool js_cocos2dx_ParticleBatchNode_setTexture(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -43450,6 +43664,7 @@ bool js_cocos2dx_ParticleBatchNode_initWithTexture(JSContext *cx, uint32_t argc, cocos2d::Texture2D* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -43525,6 +43740,7 @@ bool js_cocos2dx_ParticleBatchNode_setTextureAtlas(JSContext *cx, uint32_t argc, if (argc == 1) { cocos2d::TextureAtlas* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -43660,6 +43876,7 @@ bool js_cocos2dx_ParticleBatchNode_insertChild(JSContext *cx, uint32_t argc, jsv cocos2d::ParticleSystem* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -43750,6 +43967,7 @@ bool js_cocos2dx_ParticleBatchNode_createWithTexture(JSContext *cx, uint32_t arg if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -43775,6 +43993,7 @@ bool js_cocos2dx_ParticleBatchNode_createWithTexture(JSContext *cx, uint32_t arg cocos2d::Texture2D* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -44442,6 +44661,7 @@ bool js_cocos2dx_ParticleSystem_setTexture(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -45157,6 +45377,7 @@ bool js_cocos2dx_ParticleSystem_setBatchNode(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ParticleBatchNode* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -46126,6 +46347,7 @@ bool js_cocos2dx_ParticleSystemQuad_setDisplayFrame(JSContext *cx, uint32_t argc if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -46154,6 +46376,7 @@ bool js_cocos2dx_ParticleSystemQuad_setTextureWithRect(JSContext *cx, uint32_t a cocos2d::Texture2D* arg0; cocos2d::Rect arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -46182,6 +46405,7 @@ bool js_cocos2dx_ParticleSystemQuad_listenRendererRecreated(JSContext *cx, uint3 if (argc == 1) { cocos2d::EventCustom* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -48367,6 +48591,7 @@ bool js_cocos2dx_ProgressTimer_initWithSprite(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -48452,6 +48677,7 @@ bool js_cocos2dx_ProgressTimer_setSprite(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -48648,6 +48874,7 @@ bool js_cocos2dx_ProgressTimer_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -48812,6 +49039,7 @@ bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, j if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -48833,6 +49061,7 @@ bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, j if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -48851,6 +49080,7 @@ bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, j if (argc == 3) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -48932,6 +49162,7 @@ bool js_cocos2dx_ProtectedNode_reorderProtectedChild(JSContext *cx, uint32_t arg cocos2d::Node* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49041,6 +49272,7 @@ bool js_cocos2dx_ProtectedNode_removeProtectedChild(JSContext *cx, uint32_t argc if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49057,6 +49289,7 @@ bool js_cocos2dx_ProtectedNode_removeProtectedChild(JSContext *cx, uint32_t argc cocos2d::Node* arg0; bool arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49230,6 +49463,7 @@ bool js_cocos2dx_Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49273,6 +49507,7 @@ bool js_cocos2dx_Sprite_setTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49421,6 +49656,7 @@ bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49444,6 +49680,7 @@ bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49464,6 +49701,7 @@ bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49625,6 +49863,7 @@ bool js_cocos2dx_Sprite_isFrameDisplayed(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49672,6 +49911,7 @@ bool js_cocos2dx_Sprite_setBatchNode(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::SpriteBatchNode* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49739,6 +49979,7 @@ bool js_cocos2dx_Sprite_setTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::TextureAtlas* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -49973,6 +50214,7 @@ bool js_cocos2dx_Sprite_initWithSpriteFrame(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -50123,6 +50365,7 @@ bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *v if (argc == 2) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -50152,6 +50395,7 @@ bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *v if (argc == 3) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -50185,6 +50429,7 @@ bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -50242,6 +50487,7 @@ bool js_cocos2dx_Sprite_createWithSpriteFrame(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -50988,6 +51234,7 @@ bool js_cocos2dx_RenderTexture_setSprite(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -51672,6 +51919,7 @@ bool js_cocos2dx_TransitionEaseScene_easeActionWithAction(JSContext *cx, uint32_ if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -51813,6 +52061,7 @@ bool js_cocos2dx_TransitionScene_initWithDuration(JSContext *cx, uint32_t argc, cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -51874,6 +52123,7 @@ bool js_cocos2dx_TransitionScene_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52029,6 +52279,7 @@ bool js_cocos2dx_TransitionSceneOriented_initWithDuration(JSContext *cx, uint32_ cocos2d::TransitionScene::Orientation arg2; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52058,6 +52309,7 @@ bool js_cocos2dx_TransitionSceneOriented_create(JSContext *cx, uint32_t argc, js cocos2d::TransitionScene::Orientation arg2; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52188,6 +52440,7 @@ bool js_cocos2dx_TransitionRotoZoom_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52316,6 +52569,7 @@ bool js_cocos2dx_TransitionJumpZoom_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52471,6 +52725,7 @@ bool js_cocos2dx_TransitionMoveInL_easeActionWithAction(JSContext *cx, uint32_t if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -52505,6 +52760,7 @@ bool js_cocos2dx_TransitionMoveInL_create(JSContext *cx, uint32_t argc, jsval *v cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52635,6 +52891,7 @@ bool js_cocos2dx_TransitionMoveInR_create(JSContext *cx, uint32_t argc, jsval *v cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52763,6 +53020,7 @@ bool js_cocos2dx_TransitionMoveInT_create(JSContext *cx, uint32_t argc, jsval *v cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -52891,6 +53149,7 @@ bool js_cocos2dx_TransitionMoveInB_create(JSContext *cx, uint32_t argc, jsval *v cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53046,6 +53305,7 @@ bool js_cocos2dx_TransitionSlideInL_easeActionWithAction(JSContext *cx, uint32_t if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -53080,6 +53340,7 @@ bool js_cocos2dx_TransitionSlideInL_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53210,6 +53471,7 @@ bool js_cocos2dx_TransitionSlideInR_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53338,6 +53600,7 @@ bool js_cocos2dx_TransitionSlideInB_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53466,6 +53729,7 @@ bool js_cocos2dx_TransitionSlideInT_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53596,6 +53860,7 @@ bool js_cocos2dx_TransitionShrinkGrow_easeActionWithAction(JSContext *cx, uint32 if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -53630,6 +53895,7 @@ bool js_cocos2dx_TransitionShrinkGrow_create(JSContext *cx, uint32_t argc, jsval cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53762,6 +54028,7 @@ bool js_cocos2dx_TransitionFlipX_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53792,6 +54059,7 @@ bool js_cocos2dx_TransitionFlipX_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53926,6 +54194,7 @@ bool js_cocos2dx_TransitionFlipY_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -53956,6 +54225,7 @@ bool js_cocos2dx_TransitionFlipY_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54090,6 +54360,7 @@ bool js_cocos2dx_TransitionFlipAngular_create(JSContext *cx, uint32_t argc, jsva if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54120,6 +54391,7 @@ bool js_cocos2dx_TransitionFlipAngular_create(JSContext *cx, uint32_t argc, jsva if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54254,6 +54526,7 @@ bool js_cocos2dx_TransitionZoomFlipX_create(JSContext *cx, uint32_t argc, jsval if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54284,6 +54557,7 @@ bool js_cocos2dx_TransitionZoomFlipX_create(JSContext *cx, uint32_t argc, jsval if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54418,6 +54692,7 @@ bool js_cocos2dx_TransitionZoomFlipY_create(JSContext *cx, uint32_t argc, jsval if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54448,6 +54723,7 @@ bool js_cocos2dx_TransitionZoomFlipY_create(JSContext *cx, uint32_t argc, jsval if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54582,6 +54858,7 @@ bool js_cocos2dx_TransitionZoomFlipAngular_create(JSContext *cx, uint32_t argc, if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54612,6 +54889,7 @@ bool js_cocos2dx_TransitionZoomFlipAngular_create(JSContext *cx, uint32_t argc, if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54752,6 +55030,7 @@ bool js_cocos2dx_TransitionFade_initWithDuration(JSContext *cx, uint32_t argc, j if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54775,6 +55054,7 @@ bool js_cocos2dx_TransitionFade_initWithDuration(JSContext *cx, uint32_t argc, j if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54809,6 +55089,7 @@ bool js_cocos2dx_TransitionFade_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54839,6 +55120,7 @@ bool js_cocos2dx_TransitionFade_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Scene* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -54971,6 +55253,7 @@ bool js_cocos2dx_TransitionCrossFade_create(JSContext *cx, uint32_t argc, jsval cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -55101,6 +55384,7 @@ bool js_cocos2dx_TransitionTurnOffTiles_easeActionWithAction(JSContext *cx, uint if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -55135,6 +55419,7 @@ bool js_cocos2dx_TransitionTurnOffTiles_create(JSContext *cx, uint32_t argc, jsv cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -55291,6 +55576,7 @@ bool js_cocos2dx_TransitionSplitCols_easeActionWithAction(JSContext *cx, uint32_ if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -55325,6 +55611,7 @@ bool js_cocos2dx_TransitionSplitCols_create(JSContext *cx, uint32_t argc, jsval cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -55455,6 +55742,7 @@ bool js_cocos2dx_TransitionSplitRows_create(JSContext *cx, uint32_t argc, jsval cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -55585,6 +55873,7 @@ bool js_cocos2dx_TransitionFadeTR_easeActionWithAction(JSContext *cx, uint32_t a if (argc == 1) { cocos2d::ActionInterval* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -55648,6 +55937,7 @@ bool js_cocos2dx_TransitionFadeTR_create(JSContext *cx, uint32_t argc, jsval *vp cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -55778,6 +56068,7 @@ bool js_cocos2dx_TransitionFadeBL_create(JSContext *cx, uint32_t argc, jsval *vp cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -55906,6 +56197,7 @@ bool js_cocos2dx_TransitionFadeUp_create(JSContext *cx, uint32_t argc, jsval *vp cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56034,6 +56326,7 @@ bool js_cocos2dx_TransitionFadeDown_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56196,6 +56489,7 @@ bool js_cocos2dx_TransitionPageTurn_initWithDuration(JSContext *cx, uint32_t arg bool arg2; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56225,6 +56519,7 @@ bool js_cocos2dx_TransitionPageTurn_create(JSContext *cx, uint32_t argc, jsval * bool arg2; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56356,6 +56651,7 @@ bool js_cocos2dx_TransitionProgress_create(JSContext *cx, uint32_t argc, jsval * cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56484,6 +56780,7 @@ bool js_cocos2dx_TransitionProgressRadialCCW_create(JSContext *cx, uint32_t argc cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56612,6 +56909,7 @@ bool js_cocos2dx_TransitionProgressRadialCW_create(JSContext *cx, uint32_t argc, cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56740,6 +57038,7 @@ bool js_cocos2dx_TransitionProgressHorizontal_create(JSContext *cx, uint32_t arg cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56868,6 +57167,7 @@ bool js_cocos2dx_TransitionProgressVertical_create(JSContext *cx, uint32_t argc, cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -56996,6 +57296,7 @@ bool js_cocos2dx_TransitionProgressInOut_create(JSContext *cx, uint32_t argc, js cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -57124,6 +57425,7 @@ bool js_cocos2dx_TransitionProgressOutIn_create(JSContext *cx, uint32_t argc, js cocos2d::Scene* arg1; ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -57243,77 +57545,22 @@ void js_register_cocos2dx_TransitionProgressOutIn(JSContext *cx, JS::HandleObjec JSClass *jsb_cocos2d_Camera_class; JSObject *jsb_cocos2d_Camera_prototype; -bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setScene : Invalid Native Object"); - if (argc == 1) { - cocos2d::Scene* arg0; - do { - if (!args.get(0).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(0).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::Scene*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setScene : Error processing arguments"); - cobj->setScene(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_setScene : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initPerspective : Invalid Native Object"); - if (argc == 4) { - double arg0; - double arg1; - double arg2; - double arg3; - ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); - ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); - ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initPerspective : Error processing arguments"); - bool ret = cobj->initPerspective(arg0, arg1, arg2, arg3); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_initPerspective : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getProjectionMatrix : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepth : Invalid Native Object"); if (argc == 0) { - const cocos2d::Mat4& ret = cobj->getProjectionMatrix(); + int ret = cobj->getDepth(); jsval jsret = JSVAL_NULL; - jsret = matrix_to_jsval(cx, ret); + jsret = int32_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Camera_getProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getDepth : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp) @@ -57334,22 +57581,132 @@ bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, js JS_ReportError(cx, "js_cocos2dx_Camera_getViewProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_lookAt : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments"); + cobj->lookAt(arg0); + args.rval().setUndefined(); + return true; + } + if (argc == 2) { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments"); + cobj->lookAt(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_lookAt : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getViewMatrix : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getProjectionMatrix : Invalid Native Object"); if (argc == 0) { - const cocos2d::Mat4& ret = cobj->getViewMatrix(); + const cocos2d::Mat4& ret = cobj->getProjectionMatrix(); jsval jsret = JSVAL_NULL; jsret = matrix_to_jsval(cx, ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Camera_getViewMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getProjectionMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepthInView : Invalid Native Object"); + if (argc == 1) { + cocos2d::Mat4 arg0; + ok &= jsval_to_matrix(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_getDepthInView : Error processing arguments"); + double ret = cobj->getDepthInView(arg0); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_getDepthInView : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_clearBackground : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_clearBackground : Error processing arguments"); + cobj->clearBackground(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_clearBackground : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setDepth : Invalid Native Object"); + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setDepth : Error processing arguments"); + cobj->setDepth(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_setDepth : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initDefault : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->initDefault(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_initDefault : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } bool js_cocos2dx_Camera_getCameraFlag(JSContext *cx, uint32_t argc, jsval *vp) @@ -57388,46 +57745,6 @@ bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Camera_getType : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initDefault : Invalid Native Object"); - if (argc == 0) { - bool ret = cobj->initDefault(); - jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_initDefault : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_project : Invalid Native Object"); - if (argc == 1) { - cocos2d::Vec3 arg0; - ok &= jsval_to_vector3(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_project : Error processing arguments"); - cocos2d::Vec2 ret = cobj->project(arg0); - jsval jsret = JSVAL_NULL; - jsret = vector2_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_project : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -57456,56 +57773,132 @@ bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp JS_ReportError(cx, "js_cocos2dx_Camera_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4); return false; } -bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepthInView : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Invalid Native Object"); if (argc == 1) { cocos2d::Mat4 arg0; ok &= jsval_to_matrix(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_getDepthInView : Error processing arguments"); - double ret = cobj->getDepthInView(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Error processing arguments"); + cobj->setAdditionalProjection(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_setAdditionalProjection : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setScene : Invalid Native Object"); + if (argc == 1) { + cocos2d::Scene* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Scene*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setScene : Error processing arguments"); + cobj->setScene(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_setScene : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Camera_projectGL(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_projectGL : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_projectGL : Error processing arguments"); + cocos2d::Vec2 ret = cobj->projectGL(arg0); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_projectGL : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getViewMatrix : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Mat4& ret = cobj->getViewMatrix(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Camera_getViewMatrix : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Camera_getNearPlane(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getNearPlane : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getNearPlane(); jsval jsret = JSVAL_NULL; jsret = DOUBLE_TO_JSVAL(ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Camera_getDepthInView : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Camera_getNearPlane : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_lookAt : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_project : Invalid Native Object"); if (argc == 1) { cocos2d::Vec3 arg0; ok &= jsval_to_vector3(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments"); - cobj->lookAt(arg0); - args.rval().setUndefined(); - return true; - } - if (argc == 2) { - cocos2d::Vec3 arg0; - cocos2d::Vec3 arg1; - ok &= jsval_to_vector3(cx, args.get(0), &arg0); - ok &= jsval_to_vector3(cx, args.get(1), &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_lookAt : Error processing arguments"); - cobj->lookAt(arg0, arg1); - args.rval().setUndefined(); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_project : Error processing arguments"); + cocos2d::Vec2 ret = cobj->project(arg0); + jsval jsret = JSVAL_NULL; + jsret = vector2_to_jsval(cx, ret); + args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Camera_lookAt : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Camera_project : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp) @@ -57528,82 +57921,50 @@ bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Camera_setCameraFlag : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_clearBackground : Invalid Native Object"); - if (argc == 1) { - double arg0; - ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_clearBackground : Error processing arguments"); - cobj->clearBackground(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_clearBackground : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Invalid Native Object"); - if (argc == 1) { - cocos2d::Mat4 arg0; - ok &= jsval_to_matrix(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setAdditionalProjection : Error processing arguments"); - cobj->setAdditionalProjection(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Camera_setAdditionalProjection : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_getFarPlane(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getDepth : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_getFarPlane : Invalid Native Object"); if (argc == 0) { - int ret = cobj->getDepth(); + double ret = cobj->getFarPlane(); jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); + jsret = DOUBLE_TO_JSVAL(ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Camera_getDepth : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Camera_getFarPlane : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_setDepth : Invalid Native Object"); - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_setDepth : Error processing arguments"); - cobj->setDepth(arg0); - args.rval().setUndefined(); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initPerspective : Invalid Native Object"); + if (argc == 4) { + double arg0; + double arg1; + double arg2; + double arg3; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initPerspective : Error processing arguments"); + bool ret = cobj->initPerspective(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Camera_setDepth : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Camera_initPerspective : wrong number of arguments: %d, was expecting %d", argc, 4); return false; } bool js_cocos2dx_Camera_create(JSContext *cx, uint32_t argc, jsval *vp) @@ -57786,23 +58147,26 @@ void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setScene", js_cocos2dx_Camera_setScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initPerspective", js_cocos2dx_Camera_initPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getProjectionMatrix", js_cocos2dx_Camera_getProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDepth", js_cocos2dx_Camera_getDepth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getViewProjectionMatrix", js_cocos2dx_Camera_getViewProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("lookAt", js_cocos2dx_Camera_lookAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getProjectionMatrix", js_cocos2dx_Camera_getProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDepthInView", js_cocos2dx_Camera_getDepthInView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clearBackground", js_cocos2dx_Camera_clearBackground, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initDefault", js_cocos2dx_Camera_initDefault, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getCameraFlag", js_cocos2dx_Camera_getCameraFlag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getType", js_cocos2dx_Camera_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initDefault", js_cocos2dx_Camera_initDefault, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("project", js_cocos2dx_Camera_project, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDepthInView", js_cocos2dx_Camera_getDepthInView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("lookAt", js_cocos2dx_Camera_lookAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCameraFlag", js_cocos2dx_Camera_setCameraFlag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clearBackground", js_cocos2dx_Camera_clearBackground, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setAdditionalProjection", js_cocos2dx_Camera_setAdditionalProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDepth", js_cocos2dx_Camera_getDepth, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScene", js_cocos2dx_Camera_setScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("projectGL", js_cocos2dx_Camera_projectGL, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNearPlane", js_cocos2dx_Camera_getNearPlane, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("project", js_cocos2dx_Camera_project, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCameraFlag", js_cocos2dx_Camera_setCameraFlag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFarPlane", js_cocos2dx_Camera_getFarPlane, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initPerspective", js_cocos2dx_Camera_initPerspective, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; @@ -57893,6 +58257,7 @@ bool js_cocos2dx_GridBase_afterDraw(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -58136,6 +58501,7 @@ bool js_cocos2dx_GridBase_initWithSize(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -58259,6 +58625,7 @@ bool js_cocos2dx_GridBase_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -58457,6 +58824,7 @@ bool js_cocos2dx_Grid3D_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -58630,6 +58998,7 @@ bool js_cocos2dx_TiledGrid3D_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -60617,6 +60986,7 @@ bool js_cocos2dx_GLProgramCache_addGLProgram(JSContext *cx, uint32_t argc, jsval cocos2d::GLProgram* arg0; std::string arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -60821,6 +61191,7 @@ bool js_cocos2dx_RenderState_setTexture(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -60848,6 +61219,7 @@ bool js_cocos2dx_RenderState_getTopmost(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::RenderState* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -60909,6 +61281,7 @@ bool js_cocos2dx_RenderState_bind(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Pass* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61240,6 +61613,7 @@ bool js_cocos2dx_Pass_setVertexAttribBinding(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::VertexAttribBinding* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61263,6 +61637,7 @@ bool js_cocos2dx_Pass_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Technique* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61296,6 +61671,7 @@ bool js_cocos2dx_Pass_createWithGLProgramState(JSContext *cx, uint32_t argc, jsv cocos2d::Technique* arg0; cocos2d::GLProgramState* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61304,6 +61680,7 @@ bool js_cocos2dx_Pass_createWithGLProgramState(JSContext *cx, uint32_t argc, jsv JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -61456,6 +61833,7 @@ bool js_cocos2dx_Technique_addPass(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Pass* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61544,6 +61922,7 @@ bool js_cocos2dx_Technique_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Material* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61577,6 +61956,7 @@ bool js_cocos2dx_Technique_createWithGLProgramState(JSContext *cx, uint32_t argc cocos2d::Material* arg0; cocos2d::GLProgramState* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61585,6 +61965,7 @@ bool js_cocos2dx_Technique_createWithGLProgramState(JSContext *cx, uint32_t argc JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -61870,6 +62251,7 @@ bool js_cocos2dx_Material_addTechnique(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Technique* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61943,6 +62325,7 @@ bool js_cocos2dx_Material_createWithGLStateProgram(JSContext *cx, uint32_t argc, if (argc == 1) { cocos2d::GLProgramState* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -61975,6 +62358,7 @@ bool js_cocos2dx_Material_createWithProperties(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocos2d::Properties* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -62252,6 +62636,7 @@ bool js_cocos2dx_TextureCache_addImage(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { cocos2d::Image* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -62350,6 +62735,36 @@ bool js_cocos2dx_TextureCache_getTextureForKey(JSContext *cx, uint32_t argc, jsv JS_ReportError(cx, "js_cocos2dx_TextureCache_getTextureForKey : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_TextureCache_getTextureFilePath(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::TextureCache* cobj = (cocos2d::TextureCache *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TextureCache_getTextureFilePath : Invalid Native Object"); + if (argc == 1) { + cocos2d::Texture2D* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Texture2D*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TextureCache_getTextureFilePath : Error processing arguments"); + const std::string ret = cobj->getTextureFilePath(arg0); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_TextureCache_getTextureFilePath : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_TextureCache_removeUnusedTextures(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -62377,6 +62792,7 @@ bool js_cocos2dx_TextureCache_removeTexture(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -62473,6 +62889,7 @@ void js_register_cocos2dx_TextureCache(JSContext *cx, JS::HandleObject global) { JS_FN("addImage", js_cocos2dx_TextureCache_addImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("unbindImageAsync", js_cocos2dx_TextureCache_unbindImageAsync, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getTextureForKey", js_cocos2dx_TextureCache_getTextureForKey, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextureFilePath", js_cocos2dx_TextureCache_getTextureFilePath, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeUnusedTextures", js_cocos2dx_TextureCache_removeUnusedTextures, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeTexture", js_cocos2dx_TextureCache_removeTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("waitForQuit", js_cocos2dx_TextureCache_waitForQuit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -62912,6 +63329,7 @@ bool js_cocos2dx_AnimationCache_addAnimation(JSContext *cx, uint32_t argc, jsval cocos2d::Animation* arg0; std::string arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -63155,6 +63573,7 @@ bool js_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent(JSContext *cx, cocos2d::Texture2D* arg1; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -63183,6 +63602,7 @@ bool js_cocos2dx_SpriteFrameCache_addSpriteFrame(JSContext *cx, uint32_t argc, j cocos2d::SpriteFrame* arg0; std::string arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -63243,6 +63663,7 @@ bool js_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile(JSContext *cx, uint32_ if (!ok) { ok = true; break; } cocos2d::Texture2D* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -63432,6 +63853,7 @@ bool js_cocos2dx_SpriteFrameCache_removeSpriteFramesFromTexture(JSContext *cx, u if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -64034,6 +64456,7 @@ bool js_cocos2dx_ParallaxNode_addChild(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::Vec2 arg2; cocos2d::Vec2 arg3; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -65925,6 +66348,7 @@ bool js_cocos2dx_TMXLayer_initWithTilesetInfo(JSContext *cx, uint32_t argc, jsva cocos2d::TMXLayerInfo* arg1; cocos2d::TMXMapInfo* arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -65933,6 +66357,7 @@ bool js_cocos2dx_TMXLayer_initWithTilesetInfo(JSContext *cx, uint32_t argc, jsva JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -65941,6 +66366,7 @@ bool js_cocos2dx_TMXLayer_initWithTilesetInfo(JSContext *cx, uint32_t argc, jsva JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -66109,6 +66535,7 @@ bool js_cocos2dx_TMXLayer_setTileSet(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::TMXTilesetInfo* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -66222,6 +66649,7 @@ bool js_cocos2dx_TMXLayer_create(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::TMXLayerInfo* arg1; cocos2d::TMXMapInfo* arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -66230,6 +66658,7 @@ bool js_cocos2dx_TMXLayer_create(JSContext *cx, uint32_t argc, jsval *vp) JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -66238,6 +66667,7 @@ bool js_cocos2dx_TMXLayer_create(JSContext *cx, uint32_t argc, jsval *vp) JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -66639,6 +67069,7 @@ bool js_cocos2dx_TMXTiledMap_getPropertiesForGID(JSContext *cx, uint32_t argc, j if (!ok) { ok = true; break; } cocos2d::Value** arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -67365,6 +67796,7 @@ bool js_cocos2dx_Component_setOwner(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -67573,6 +68005,7 @@ bool js_cocos2dx_ComponentContainer_remove(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::Component* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -67632,6 +68065,7 @@ bool js_cocos2dx_ComponentContainer_add(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Component* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -68409,6 +68843,7 @@ bool js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache(JSContext *cx, uint const cocos2d::Rect* arg1; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp index df03408d70..ceaaf23407 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp @@ -901,11 +901,11 @@ bool js_cocos2dx_Properties_getNextProperty(JSContext *cx, uint32_t argc, jsval bool js_cocos2dx_Properties_getFloat(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Properties_getQuaternionFromAxisAngle(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Properties_parseColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Properties_parseVec3(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Properties_parseAxisAngle(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Properties_parseVec2(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Properties_parseVec3(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Properties_createNonRefCounted(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Properties_parseVec4(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Properties_createWithoutAutorelease(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_FileUtils_class; extern JSObject *jsb_cocos2d_FileUtils_prototype; @@ -3353,23 +3353,26 @@ bool js_cocos2dx_Camera_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_Camera_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getCameraFlag(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_getDepth(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_projectGL(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getNearPlane(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_setCameraFlag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_getFarPlane(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Camera_initPerspective(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_createPerspective(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_createOrthographic(JSContext *cx, uint32_t argc, jsval *vp); @@ -3635,6 +3638,7 @@ bool js_cocos2dx_TextureCache_getCachedTextureInfo(JSContext *cx, uint32_t argc, bool js_cocos2dx_TextureCache_addImage(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TextureCache_unbindImageAsync(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TextureCache_getTextureForKey(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_TextureCache_getTextureFilePath(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TextureCache_removeUnusedTextures(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TextureCache_removeTexture(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TextureCache_waitForQuit(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp index eac168bf35..9870bbf2ad 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp @@ -56,6 +56,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_moveAnimationsFromNode(JSContext *c cocos2d::Node* arg0; cocos2d::Node* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -64,6 +65,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_moveAnimationsFromNode(JSContext *c JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -129,6 +131,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_actionForSoundChannel(JSContext *cx if (argc == 1) { cocosbuilder::CCBSequenceProperty* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -168,6 +171,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_setBaseValue(JSContext *cx, uint32_ std::string arg2; ok &= jsval_to_ccvalue(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -232,6 +236,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_setRootNode(JSContext *cx, uint32_t if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -341,6 +346,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_setObject(JSContext *cx, uint32_t a cocos2d::Node* arg1; std::string arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -349,6 +355,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_setObject(JSContext *cx, uint32_t a JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -377,6 +384,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_getContainerSize(JSContext *cx, uin if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -406,6 +414,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_actionForCallbackChannel(JSContext if (argc == 1) { cocosbuilder::CCBSequenceProperty* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -657,6 +666,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_addDocumentOutletNode(JSContext *cx if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -684,6 +694,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_setDelegate(JSContext *cx, uint32_t if (argc == 1) { cocosbuilder::CCBAnimationManagerDelegate* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -733,6 +744,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_addDocumentCallbackNode(JSContext * if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -803,6 +815,7 @@ bool js_cocos2dx_builder_CCBAnimationManager_setCallFunc(JSContext *cx, uint32_t cocos2d::CallFunc* arg0; std::string arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1055,6 +1068,7 @@ bool js_cocos2dx_builder_CCBReader_setAnimationManager(JSContext *cx, uint32_t a if (argc == 1) { cocosbuilder::CCBAnimationManager* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1160,6 +1174,7 @@ bool js_cocos2dx_builder_CCBReader_addOwnerOutletNode(JSContext *cx, uint32_t ar if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1205,6 +1220,7 @@ bool js_cocos2dx_builder_CCBReader_readSoundKeyframesForSeq(JSContext *cx, uint3 if (argc == 1) { cocosbuilder::CCBSequence* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1344,6 +1360,7 @@ bool js_cocos2dx_builder_CCBReader_readCallbackKeyframesForSeq(JSContext *cx, ui if (argc == 1) { cocosbuilder::CCBSequence* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1425,6 +1442,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocosbuilder::CCBReader* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1459,6 +1477,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocosbuilder::NodeLoaderLibrary* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1493,6 +1512,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (argc == 2) { cocosbuilder::NodeLoaderLibrary* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1503,6 +1523,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (!ok) { ok = true; break; } cocosbuilder::CCBMemberVariableAssigner* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1537,6 +1558,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (argc == 3) { cocosbuilder::NodeLoaderLibrary* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1547,6 +1569,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (!ok) { ok = true; break; } cocosbuilder::CCBMemberVariableAssigner* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1557,6 +1580,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (!ok) { ok = true; break; } cocosbuilder::CCBSelectorResolver* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -1591,6 +1615,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (argc == 4) { cocosbuilder::NodeLoaderLibrary* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1601,6 +1626,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (!ok) { ok = true; break; } cocosbuilder::CCBMemberVariableAssigner* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1611,6 +1637,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (!ok) { ok = true; break; } cocosbuilder::CCBSelectorResolver* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -1621,6 +1648,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (!ok) { ok = true; break; } cocosbuilder::NodeLoaderListener* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp index 6ef7dcf99c..57802ed4b0 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp @@ -59,6 +59,7 @@ bool js_cocos2dx_experimental_SpritePolygon_setTexture(JSContext *cx, uint32_t a if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -98,6 +99,7 @@ bool js_cocos2dx_experimental_SpritePolygon_initWithTexture(JSContext *cx, uint3 if (argc == 1) { cocos2d::Texture2D* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp new file mode 100644 index 0000000000..e28b6c0483 --- /dev/null +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp @@ -0,0 +1,484 @@ +#include "jsb_cocos2dx_experimental_webView_auto.hpp" +#include "cocos2d_specifics.hpp" +#include "UIWebView.h" + +template +static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedValue initializing(cx); + bool isNewValid = true; + JS::RootedObject global(cx, ScriptingCore::getInstance()->getGlobalObject()); + isNewValid = JS_GetProperty(cx, global, "initializing", &initializing) && initializing.toBoolean(); + if (isNewValid) + { + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject _tmp(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + + args.rval().set(OBJECT_TO_JSVAL(_tmp)); + return true; + } + + JS_ReportError(cx, "Constructor for the requested class is not available, please refer to the API reference."); + return false; +} + +static bool empty_constructor(JSContext *cx, uint32_t argc, jsval *vp) { + return false; +} + +static bool js_is_native_obj(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + args.rval().setBoolean(true); + return true; +} +JSClass *jsb_cocos2d_experimental_ui_WebView_class; +JSObject *jsb_cocos2d_experimental_ui_WebView_prototype; + +bool js_cocos2dx_experimental_webView_WebView_canGoBack(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_canGoBack : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->canGoBack(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_canGoBack : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_loadHTMLString(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_loadHTMLString : Invalid Native Object"); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_loadHTMLString : Error processing arguments"); + cobj->loadHTMLString(arg0); + args.rval().setUndefined(); + return true; + } + if (argc == 2) { + std::string arg0; + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_loadHTMLString : Error processing arguments"); + cobj->loadHTMLString(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_loadHTMLString : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_goForward(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_goForward : Invalid Native Object"); + if (argc == 0) { + cobj->goForward(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_goForward : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_goBack(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_goBack : Invalid Native Object"); + if (argc == 0) { + cobj->goBack(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_goBack : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_setScalesPageToFit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_setScalesPageToFit : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_setScalesPageToFit : Error processing arguments"); + cobj->setScalesPageToFit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_setScalesPageToFit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_getOnDidFailLoading(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_getOnDidFailLoading : Invalid Native Object"); + if (argc == 0) { + cocos2d::experimental::ui::WebView::ccWebViewCallback ret = cobj->getOnDidFailLoading(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR std::function; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_getOnDidFailLoading : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_loadFile(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_loadFile : Invalid Native Object"); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_loadFile : Error processing arguments"); + cobj->loadFile(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_loadFile : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_loadURL(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_loadURL : Invalid Native Object"); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_loadURL : Error processing arguments"); + cobj->loadURL(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_loadURL : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_evaluateJS(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_evaluateJS : Invalid Native Object"); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_evaluateJS : Error processing arguments"); + cobj->evaluateJS(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_evaluateJS : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_getOnJSCallback(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_getOnJSCallback : Invalid Native Object"); + if (argc == 0) { + cocos2d::experimental::ui::WebView::ccWebViewCallback ret = cobj->getOnJSCallback(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR std::function; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_getOnJSCallback : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_canGoForward(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_canGoForward : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->canGoForward(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_canGoForward : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_getOnShouldStartLoading(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_getOnShouldStartLoading : Invalid Native Object"); + if (argc == 0) { + std::function &)> ret = cobj->getOnShouldStartLoading(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR std::function; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_getOnShouldStartLoading : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_stopLoading(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_stopLoading : Invalid Native Object"); + if (argc == 0) { + cobj->stopLoading(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_stopLoading : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_reload(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_reload : Invalid Native Object"); + if (argc == 0) { + cobj->reload(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_reload : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme : Invalid Native Object"); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme : Error processing arguments"); + cobj->setJavascriptInterfaceScheme(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_getOnDidFinishLoading(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::experimental::ui::WebView* cobj = (cocos2d::experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_webView_WebView_getOnDidFinishLoading : Invalid Native Object"); + if (argc == 0) { + cocos2d::experimental::ui::WebView::ccWebViewCallback ret = cobj->getOnDidFinishLoading(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR std::function; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_getOnDidFinishLoading : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_experimental_webView_WebView_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::experimental::ui::WebView* ret = cocos2d::experimental::ui::WebView::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::experimental::ui::WebView*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_experimental_webView_WebView_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_experimental_webView_WebView_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::experimental::ui::WebView* cobj = new (std::nothrow) cocos2d::experimental::ui::WebView(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::experimental::ui::WebView"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_ui_Widget_prototype; + +void js_cocos2d_experimental_ui_WebView_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (WebView)", obj); +} + +void js_register_cocos2dx_experimental_webView_WebView(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_experimental_ui_WebView_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_experimental_ui_WebView_class->name = "WebView"; + jsb_cocos2d_experimental_ui_WebView_class->addProperty = JS_PropertyStub; + jsb_cocos2d_experimental_ui_WebView_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_experimental_ui_WebView_class->getProperty = JS_PropertyStub; + jsb_cocos2d_experimental_ui_WebView_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_experimental_ui_WebView_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_experimental_ui_WebView_class->resolve = JS_ResolveStub; + jsb_cocos2d_experimental_ui_WebView_class->convert = JS_ConvertStub; + jsb_cocos2d_experimental_ui_WebView_class->finalize = js_cocos2d_experimental_ui_WebView_finalize; + jsb_cocos2d_experimental_ui_WebView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("canGoBack", js_cocos2dx_experimental_webView_WebView_canGoBack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadHTMLString", js_cocos2dx_experimental_webView_WebView_loadHTMLString, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("goForward", js_cocos2dx_experimental_webView_WebView_goForward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("goBack", js_cocos2dx_experimental_webView_WebView_goBack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScalesPageToFit", js_cocos2dx_experimental_webView_WebView_setScalesPageToFit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOnDidFailLoading", js_cocos2dx_experimental_webView_WebView_getOnDidFailLoading, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadFile", js_cocos2dx_experimental_webView_WebView_loadFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadURL", js_cocos2dx_experimental_webView_WebView_loadURL, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("evaluateJS", js_cocos2dx_experimental_webView_WebView_evaluateJS, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOnJSCallback", js_cocos2dx_experimental_webView_WebView_getOnJSCallback, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("canGoForward", js_cocos2dx_experimental_webView_WebView_canGoForward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOnShouldStartLoading", js_cocos2dx_experimental_webView_WebView_getOnShouldStartLoading, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("stopLoading", js_cocos2dx_experimental_webView_WebView_stopLoading, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("reload", js_cocos2dx_experimental_webView_WebView_reload, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setJavascriptInterfaceScheme", js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOnDidFinishLoading", js_cocos2dx_experimental_webView_WebView_getOnDidFinishLoading, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_experimental_webView_WebView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_experimental_ui_WebView_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_ui_Widget_prototype), + jsb_cocos2d_experimental_ui_WebView_class, + js_cocos2dx_experimental_webView_WebView_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "WebView", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_experimental_ui_WebView_class; + p->proto = jsb_cocos2d_experimental_ui_WebView_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +void register_all_cocos2dx_experimental_webView(JSContext* cx, JS::HandleObject obj) { + // Get the ns + JS::RootedObject ns(cx); + get_or_create_js_obj(cx, obj, "ccui", &ns); + + js_register_cocos2dx_experimental_webView_WebView(cx, ns); +} + diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp new file mode 100644 index 0000000000..b1bb501fee --- /dev/null +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp @@ -0,0 +1,34 @@ +#ifndef __cocos2dx_experimental_webView_h__ +#define __cocos2dx_experimental_webView_h__ + +#include "jsapi.h" +#include "jsfriendapi.h" + + +extern JSClass *jsb_cocos2d_experimental_ui_WebView_class; +extern JSObject *jsb_cocos2d_experimental_ui_WebView_prototype; + +bool js_cocos2dx_experimental_webView_WebView_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_experimental_webView_WebView_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_experimental_webView_WebView(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_experimental_webView(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_experimental_webView_WebView_canGoBack(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_loadHTMLString(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_goForward(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_goBack(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_setScalesPageToFit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_getOnDidFailLoading(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_loadFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_loadURL(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_evaluateJS(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_getOnJSCallback(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_canGoForward(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_getOnShouldStartLoading(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_stopLoading(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_reload(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_setJavascriptInterfaceScheme(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_getOnDidFinishLoading(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_experimental_webView_WebView_WebView(JSContext *cx, uint32_t argc, jsval *vp); +#endif + diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp index 1e78c64812..a32be2994e 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp @@ -203,6 +203,7 @@ bool js_cocos2dx_extension_Control_isTouchInside(JSContext *cx, uint32_t argc, j if (argc == 1) { cocos2d::Touch* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -252,6 +253,7 @@ bool js_cocos2dx_extension_Control_getTouchLocation(JSContext *cx, uint32_t argc if (argc == 1) { cocos2d::Touch* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -445,6 +447,7 @@ bool js_cocos2dx_extension_ControlButton_setTitleLabelForState(JSContext *cx, ui cocos2d::Node* arg0; cocos2d::extension::Control::State arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -553,6 +556,7 @@ bool js_cocos2dx_extension_ControlButton_initWithBackgroundSprite(JSContext *cx, if (argc == 1) { cocos2d::ui::Scale9Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -648,6 +652,7 @@ bool js_cocos2dx_extension_ControlButton_setTitleLabel(JSContext *cx, uint32_t a if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -733,6 +738,7 @@ bool js_cocos2dx_extension_ControlButton_setBackgroundSprite(JSContext *cx, uint if (argc == 1) { cocos2d::ui::Scale9Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -983,6 +989,7 @@ bool js_cocos2dx_extension_ControlButton_setBackgroundSpriteFrameForState(JSCont cocos2d::SpriteFrame* arg0; cocos2d::extension::Control::State arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1012,6 +1019,7 @@ bool js_cocos2dx_extension_ControlButton_setBackgroundSpriteForState(JSContext * cocos2d::ui::Scale9Sprite* arg0; cocos2d::extension::Control::State arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1229,6 +1237,7 @@ bool js_cocos2dx_extension_ControlButton_initWithLabelAndBackgroundSprite(JSCont cocos2d::Node* arg0; cocos2d::ui::Scale9Sprite* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1237,6 +1246,7 @@ bool js_cocos2dx_extension_ControlButton_initWithLabelAndBackgroundSprite(JSCont JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1304,6 +1314,7 @@ bool js_cocos2dx_extension_ControlButton_create(JSContext *cx, uint32_t argc, js if (argc == 1) { cocos2d::ui::Scale9Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1348,6 +1359,7 @@ bool js_cocos2dx_extension_ControlButton_create(JSContext *cx, uint32_t argc, js if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1358,6 +1370,7 @@ bool js_cocos2dx_extension_ControlButton_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1570,6 +1583,7 @@ bool js_cocos2dx_extension_ControlHuePicker_initWithTargetAndPos(JSContext *cx, cocos2d::Node* arg0; cocos2d::Vec2 arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1681,6 +1695,7 @@ bool js_cocos2dx_extension_ControlHuePicker_setBackground(JSContext *cx, uint32_ if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1771,6 +1786,7 @@ bool js_cocos2dx_extension_ControlHuePicker_setSlider(JSContext *cx, uint32_t ar if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1795,6 +1811,7 @@ bool js_cocos2dx_extension_ControlHuePicker_create(JSContext *cx, uint32_t argc, cocos2d::Node* arg0; cocos2d::Vec2 arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1962,6 +1979,7 @@ bool js_cocos2dx_extension_ControlSaturationBrightnessPicker_initWithTargetAndPo cocos2d::Node* arg0; cocos2d::Vec2 arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2118,6 +2136,7 @@ bool js_cocos2dx_extension_ControlSaturationBrightnessPicker_create(JSContext *c cocos2d::Node* arg0; cocos2d::Vec2 arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2258,6 +2277,7 @@ bool js_cocos2dx_extension_ControlColourPicker_hueSliderValueChanged(JSContext * cocos2d::Ref* arg0; cocos2d::extension::Control::EventType arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2336,6 +2356,7 @@ bool js_cocos2dx_extension_ControlColourPicker_setBackground(JSContext *cx, uint if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2363,6 +2384,7 @@ bool js_cocos2dx_extension_ControlColourPicker_setcolourPicker(JSContext *cx, ui if (argc == 1) { cocos2d::extension::ControlSaturationBrightnessPicker* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2391,6 +2413,7 @@ bool js_cocos2dx_extension_ControlColourPicker_colourSliderValueChanged(JSContex cocos2d::Ref* arg0; cocos2d::extension::Control::EventType arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2419,6 +2442,7 @@ bool js_cocos2dx_extension_ControlColourPicker_setHuePicker(JSContext *cx, uint3 if (argc == 1) { cocos2d::extension::ControlHuePicker* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2780,6 +2804,7 @@ bool js_cocos2dx_extension_ControlPotentiometer_setThumbSprite(JSContext *cx, ui if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2887,6 +2912,7 @@ bool js_cocos2dx_extension_ControlPotentiometer_setProgressTimer(JSContext *cx, if (argc == 1) { cocos2d::ProgressTimer* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2961,6 +2987,7 @@ bool js_cocos2dx_extension_ControlPotentiometer_initWithTrackSprite_ProgressTime cocos2d::ProgressTimer* arg1; cocos2d::Sprite* arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2969,6 +2996,7 @@ bool js_cocos2dx_extension_ControlPotentiometer_initWithTrackSprite_ProgressTime JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -2977,6 +3005,7 @@ bool js_cocos2dx_extension_ControlPotentiometer_initWithTrackSprite_ProgressTime JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -3184,6 +3213,7 @@ bool js_cocos2dx_extension_ControlSlider_setBackgroundSprite(JSContext *cx, uint if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3233,6 +3263,7 @@ bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t if (argc == 4) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3243,6 +3274,7 @@ bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -3253,6 +3285,7 @@ bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -3263,6 +3296,7 @@ bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t if (!ok) { ok = true; break; } cocos2d::Sprite* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -3283,6 +3317,7 @@ bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t if (argc == 3) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3293,6 +3328,7 @@ bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -3303,6 +3339,7 @@ bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -3394,6 +3431,7 @@ bool js_cocos2dx_extension_ControlSlider_setProgressSprite(JSContext *cx, uint32 if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3459,6 +3497,7 @@ bool js_cocos2dx_extension_ControlSlider_setThumbSprite(JSContext *cx, uint32_t if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3574,6 +3613,7 @@ bool js_cocos2dx_extension_ControlSlider_locationFromTouch(JSContext *cx, uint32 if (argc == 1) { cocos2d::Touch* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3668,6 +3708,7 @@ bool js_cocos2dx_extension_ControlSlider_setSelectedThumbSprite(JSContext *cx, u if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3713,6 +3754,7 @@ bool js_cocos2dx_extension_ControlSlider_create(JSContext *cx, uint32_t argc, js if (argc == 3) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3723,6 +3765,7 @@ bool js_cocos2dx_extension_ControlSlider_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -3733,6 +3776,7 @@ bool js_cocos2dx_extension_ControlSlider_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -3815,6 +3859,7 @@ bool js_cocos2dx_extension_ControlSlider_create(JSContext *cx, uint32_t argc, js if (argc == 4) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3825,6 +3870,7 @@ bool js_cocos2dx_extension_ControlSlider_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -3835,6 +3881,7 @@ bool js_cocos2dx_extension_ControlSlider_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -3845,6 +3892,7 @@ bool js_cocos2dx_extension_ControlSlider_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -4078,6 +4126,7 @@ bool js_cocos2dx_extension_ControlStepper_initWithMinusSpriteAndPlusSprite(JSCon cocos2d::Sprite* arg0; cocos2d::Sprite* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4086,6 +4135,7 @@ bool js_cocos2dx_extension_ControlStepper_initWithMinusSpriteAndPlusSprite(JSCon JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -4227,6 +4277,7 @@ bool js_cocos2dx_extension_ControlStepper_setMinusLabel(JSContext *cx, uint32_t if (argc == 1) { cocos2d::Label* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4344,6 +4395,7 @@ bool js_cocos2dx_extension_ControlStepper_setPlusLabel(JSContext *cx, uint32_t a if (argc == 1) { cocos2d::Label* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4414,6 +4466,7 @@ bool js_cocos2dx_extension_ControlStepper_setPlusSprite(JSContext *cx, uint32_t if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4441,6 +4494,7 @@ bool js_cocos2dx_extension_ControlStepper_setMinusSprite(JSContext *cx, uint32_t if (argc == 1) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4465,6 +4519,7 @@ bool js_cocos2dx_extension_ControlStepper_create(JSContext *cx, uint32_t argc, j cocos2d::Sprite* arg0; cocos2d::Sprite* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4473,6 +4528,7 @@ bool js_cocos2dx_extension_ControlStepper_create(JSContext *cx, uint32_t argc, j JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -4676,6 +4732,7 @@ bool js_cocos2dx_extension_ControlSwitch_locationFromTouch(JSContext *cx, uint32 if (argc == 1) { cocos2d::Touch* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4727,6 +4784,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (argc == 6) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4737,6 +4795,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -4747,6 +4806,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -4757,6 +4817,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Sprite* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -4767,6 +4828,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Label* arg4; do { + if (args.get(4).isNull()) { arg4 = nullptr; break; } if (!args.get(4).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(4).toObjectOrNull(); @@ -4777,6 +4839,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Label* arg5; do { + if (args.get(5).isNull()) { arg5 = nullptr; break; } if (!args.get(5).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(5).toObjectOrNull(); @@ -4797,6 +4860,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (argc == 4) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4807,6 +4871,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -4817,6 +4882,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -4827,6 +4893,7 @@ bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::Sprite* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -4873,6 +4940,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (argc == 4) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4883,6 +4951,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -4893,6 +4962,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -4903,6 +4973,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -4930,6 +5001,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (argc == 6) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4940,6 +5012,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -4950,6 +5023,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -4960,6 +5034,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Sprite* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -4970,6 +5045,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Label* arg4; do { + if (args.get(4).isNull()) { arg4 = nullptr; break; } if (!args.get(4).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(4).toObjectOrNull(); @@ -4980,6 +5056,7 @@ bool js_cocos2dx_extension_ControlSwitch_create(JSContext *cx, uint32_t argc, js if (!ok) { ok = true; break; } cocos2d::Label* arg5; do { + if (args.get(5).isNull()) { arg5 = nullptr; break; } if (!args.get(5).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(5).toObjectOrNull(); @@ -5150,6 +5227,7 @@ bool js_cocos2dx_extension_ScrollView_setContainer(JSContext *cx, uint32_t argc, if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5390,6 +5468,7 @@ bool js_cocos2dx_extension_ScrollView_initWithViewSize(JSContext *cx, uint32_t a cocos2d::Node* arg1; ok &= jsval_to_ccsize(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -5419,6 +5498,7 @@ bool js_cocos2dx_extension_ScrollView_pause(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Ref* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5608,6 +5688,7 @@ bool js_cocos2dx_extension_ScrollView_resume(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::Ref* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5729,6 +5810,7 @@ bool js_cocos2dx_extension_ScrollView_isNodeVisible(JSContext *cx, uint32_t argc if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5851,6 +5933,7 @@ bool js_cocos2dx_extension_ScrollView_create(JSContext *cx, uint32_t argc, jsval if (!ok) { ok = true; break; } cocos2d::Node* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -6258,6 +6341,7 @@ bool js_cocos2dx_extension_TableView_scrollViewDidZoom(JSContext *cx, uint32_t a if (argc == 1) { cocos2d::extension::ScrollView* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6351,6 +6435,7 @@ bool js_cocos2dx_extension_TableView_initWithViewSize(JSContext *cx, uint32_t ar cocos2d::Node* arg1; ok &= jsval_to_ccsize(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -6380,6 +6465,7 @@ bool js_cocos2dx_extension_TableView_scrollViewDidScroll(JSContext *cx, uint32_t if (argc == 1) { cocos2d::extension::ScrollView* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6766,6 +6852,7 @@ bool js_cocos2dx_extension_EventAssetsManagerEx_constructor(JSContext *cx, uint3 cocos2d::extension::EventAssetsManagerEx::EventCode arg2; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -7342,6 +7429,7 @@ bool js_cocos2dx_extension_EventListenerAssetsManagerEx_init(JSContext *cx, uint const cocos2d::extension::AssetsManagerEx* arg0; std::function arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7397,6 +7485,7 @@ bool js_cocos2dx_extension_EventListenerAssetsManagerEx_create(JSContext *cx, ui cocos2d::extension::AssetsManagerEx* arg0; std::function arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp new file mode 100644 index 0000000000..7fc7723760 --- /dev/null +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp @@ -0,0 +1,6758 @@ +#include "jsb_cocos2dx_physics3d_auto.hpp" +#include "cocos2d_specifics.hpp" +#include "CCPhysics3D.h" + +template +static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedValue initializing(cx); + bool isNewValid = true; + JS::RootedObject global(cx, ScriptingCore::getInstance()->getGlobalObject()); + isNewValid = JS_GetProperty(cx, global, "initializing", &initializing) && initializing.toBoolean(); + if (isNewValid) + { + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject _tmp(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + + args.rval().set(OBJECT_TO_JSVAL(_tmp)); + return true; + } + + JS_ReportError(cx, "Constructor for the requested class is not available, please refer to the API reference."); + return false; +} + +static bool empty_constructor(JSContext *cx, uint32_t argc, jsval *vp) { + return false; +} + +static bool js_is_native_obj(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + args.rval().setBoolean(true); + return true; +} +JSClass *jsb_cocos2d_Physics3DShape_class; +JSObject *jsb_cocos2d_Physics3DShape_prototype; + +bool js_cocos2dx_physics3d_Physics3DShape_getbtShape(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DShape* cobj = (cocos2d::Physics3DShape *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DShape_getbtShape : Invalid Native Object"); + if (argc == 0) { + btCollisionShape* ret = cobj->getbtShape(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (btCollisionShape*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_getbtShape : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DShape_getShapeType(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DShape* cobj = (cocos2d::Physics3DShape *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DShape_getShapeType : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getShapeType(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_getShapeType : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DShape_createBox(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createBox : Error processing arguments"); + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createBox(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DShape*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createBox : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DShape_createCylinder(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 2) { + double arg0; + double arg1; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createCylinder : Error processing arguments"); + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCylinder(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DShape*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createCylinder : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DShape_createConvexHull(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 2) { + const cocos2d::Vec3* arg0; + int arg1; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (const cocos2d::Vec3*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createConvexHull : Error processing arguments"); + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createConvexHull(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DShape*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createConvexHull : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DShape_createCapsule(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 2) { + double arg0; + double arg1; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createCapsule : Error processing arguments"); + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCapsule(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DShape*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createCapsule : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DShape_createSphere(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createSphere : Error processing arguments"); + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createSphere(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DShape*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createSphere : wrong number of arguments"); + return false; +} + + + +void js_cocos2d_Physics3DShape_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DShape)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DShape(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DShape_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DShape_class->name = "Physics3DShape"; + jsb_cocos2d_Physics3DShape_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DShape_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DShape_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DShape_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DShape_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DShape_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DShape_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DShape_class->finalize = js_cocos2d_Physics3DShape_finalize; + jsb_cocos2d_Physics3DShape_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("getbtShape", js_cocos2dx_physics3d_Physics3DShape_getbtShape, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getShapeType", js_cocos2dx_physics3d_Physics3DShape_getShapeType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("createBox", js_cocos2dx_physics3d_Physics3DShape_createBox, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createCylinder", js_cocos2dx_physics3d_Physics3DShape_createCylinder, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createConvexHull", js_cocos2dx_physics3d_Physics3DShape_createConvexHull, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createCapsule", js_cocos2dx_physics3d_Physics3DShape_createCapsule, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createSphere", js_cocos2dx_physics3d_Physics3DShape_createSphere, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3DShape_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Physics3DShape_class, + dummy_constructor, 0, // no constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DShape", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DShape_class; + p->proto = jsb_cocos2d_Physics3DShape_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DObject_class; +JSObject *jsb_cocos2d_Physics3DObject_prototype; + +bool js_cocos2dx_physics3d_Physics3DObject_setUserData(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_setUserData : Invalid Native Object"); + if (argc == 1) { + void* arg0; + #pragma warning NO CONVERSION TO NATIVE FOR void* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DObject_setUserData : Error processing arguments"); + cobj->setUserData(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_setUserData : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_getUserData(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_getUserData : Invalid Native Object"); + if (argc == 0) { + void* ret = cobj->getUserData(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR void*; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_getUserData : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_getObjType(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_getObjType : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getObjType(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_getObjType : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DWorld* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DWorld*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld : Error processing arguments"); + cobj->setPhysicsWorld(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_getWorldTransform(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_getWorldTransform : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getWorldTransform(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_getWorldTransform : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld : Invalid Native Object"); + if (argc == 0) { + cocos2d::Physics3DWorld* ret = cobj->getPhysicsWorld(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DWorld*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_setMask(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_setMask : Invalid Native Object"); + if (argc == 1) { + unsigned int arg0; + ok &= jsval_to_uint32(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DObject_setMask : Error processing arguments"); + cobj->setMask(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_setMask : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_getCollisionCallback(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_getCollisionCallback : Invalid Native Object"); + if (argc == 0) { + const std::function& ret = cobj->getCollisionCallback(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR std::function; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_getCollisionCallback : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_getMask(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_getMask : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getMask(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_getMask : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DObject_needCollisionCallback(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DObject_needCollisionCallback : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->needCollisionCallback(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DObject_needCollisionCallback : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} + + +void js_cocos2d_Physics3DObject_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DObject)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DObject(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DObject_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DObject_class->name = "Physics3DObject"; + jsb_cocos2d_Physics3DObject_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DObject_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DObject_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DObject_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DObject_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DObject_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DObject_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DObject_class->finalize = js_cocos2d_Physics3DObject_finalize; + jsb_cocos2d_Physics3DObject_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("setUserData", js_cocos2dx_physics3d_Physics3DObject_setUserData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUserData", js_cocos2dx_physics3d_Physics3DObject_getUserData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getObjType", js_cocos2dx_physics3d_Physics3DObject_getObjType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPhysicsWorld", js_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getWorldTransform", js_cocos2dx_physics3d_Physics3DObject_getWorldTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPhysicsWorld", js_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMask", js_cocos2dx_physics3d_Physics3DObject_setMask, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCollisionCallback", js_cocos2dx_physics3d_Physics3DObject_getCollisionCallback, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMask", js_cocos2dx_physics3d_Physics3DObject_getMask, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("needCollisionCallback", js_cocos2dx_physics3d_Physics3DObject_needCollisionCallback, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_Physics3DObject_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Physics3DObject_class, + empty_constructor, 0, + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DObject", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DObject_class; + p->proto = jsb_cocos2d_Physics3DObject_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DRigidBody_class; +JSObject *jsb_cocos2d_Physics3DRigidBody_prototype; + +bool js_cocos2dx_physics3d_Physics3DRigidBody_setGravity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setGravity : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setGravity : Error processing arguments"); + cobj->setGravity(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setGravity : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getFriction(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getFriction : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getFriction(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getFriction : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Physics3DRigidBody* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor : Invalid Native Object"); + do { + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + if (!ok) { ok = true; break; } + cobj->setAngularFactor(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->setAngularFactor(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_addConstraint(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_addConstraint : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DConstraint* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DConstraint*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_addConstraint : Error processing arguments"); + cobj->addConstraint(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_addConstraint : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody : Invalid Native Object"); + if (argc == 0) { + btRigidBody* ret = cobj->getRigidBody(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (btRigidBody*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getTotalForce(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount : Invalid Native Object"); + if (argc == 0) { + unsigned int ret = cobj->getConstraintCount(); + jsval jsret = JSVAL_NULL; + jsret = uint32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce : Error processing arguments"); + cobj->applyCentralForce(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setMassProps(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setMassProps : Invalid Native Object"); + if (argc == 2) { + double arg0; + cocos2d::Vec3 arg1; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setMassProps : Error processing arguments"); + cobj->setMassProps(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setMassProps : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setFriction(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setFriction : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setFriction : Error processing arguments"); + cobj->setFriction(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setFriction : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setKinematic(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setKinematic : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setKinematic : Error processing arguments"); + cobj->setKinematic(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setKinematic : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setDamping(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setDamping : Invalid Native Object"); + if (argc == 2) { + double arg0; + double arg1; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setDamping : Error processing arguments"); + cobj->setDamping(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setDamping : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse : Invalid Native Object"); + if (argc == 2) { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse : Error processing arguments"); + cobj->applyImpulse(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_isKinematic(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_isKinematic : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isKinematic(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_isKinematic : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyTorque(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyTorque : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyTorque : Error processing arguments"); + cobj->applyTorque(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_applyTorque : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold : Error processing arguments"); + cobj->setCcdMotionThreshold(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction : Error processing arguments"); + cobj->setRollingFriction(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getCcdMotionThreshold(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getLinearFactor(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyDamping(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyDamping : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyDamping : Error processing arguments"); + cobj->applyDamping(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_applyDamping : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getAngularVelocity(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_init(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_init : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DRigidBodyDes* arg0; + #pragma warning NO CONVERSION TO NATIVE FOR Physics3DRigidBodyDes* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_init : Error processing arguments"); + bool ret = cobj->init(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_init : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse : Error processing arguments"); + cobj->applyTorqueImpulse(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setActive(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setActive : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setActive : Error processing arguments"); + cobj->setActive(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setActive : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor : Error processing arguments"); + cobj->setLinearFactor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity : Error processing arguments"); + cobj->setLinearVelocity(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getLinearVelocity(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius : Error processing arguments"); + cobj->setCcdSweptSphereRadius(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyForce(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyForce : Invalid Native Object"); + if (argc == 2) { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyForce : Error processing arguments"); + cobj->applyForce(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_applyForce : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity : Error processing arguments"); + cobj->setAngularVelocity(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse : Error processing arguments"); + cobj->applyCentralImpulse(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getGravity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getGravity : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getGravity(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getGravity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRollingFriction(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform : Invalid Native Object"); + if (argc == 1) { + cocos2d::Mat4 arg0; + ok &= jsval_to_matrix(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform : Error processing arguments"); + cobj->setCenterOfMassTransform(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal : Error processing arguments"); + cobj->setInvInertiaDiagLocal(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Physics3DRigidBody* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint : Invalid Native Object"); + do { + if (argc == 1) { + unsigned int arg0; + ok &= jsval_to_uint32(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cobj->removeConstraint(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::Physics3DConstraint* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DConstraint*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cobj->removeConstraint(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getTotalTorque(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getInvMass(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getInvMass : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getInvMass(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getInvMass : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getConstraint(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getConstraint : Invalid Native Object"); + if (argc == 1) { + unsigned int arg0; + ok &= jsval_to_uint32(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getConstraint : Error processing arguments"); + cocos2d::Physics3DConstraint* ret = cobj->getConstraint(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getConstraint : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getRestitution(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getRestitution : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRestitution(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getRestitution : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getCcdSweptSphereRadius(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getHitFraction(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getAngularDamping(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getInvInertiaDiagLocal(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getCenterOfMassTransform(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getAngularFactor(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setRestitution(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setRestitution : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setRestitution : Error processing arguments"); + cobj->setRestitution(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setRestitution : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction : Error processing arguments"); + cobj->setHitFraction(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DRigidBody* cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLinearDamping(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DRigidBody_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DRigidBody* cobj = new (std::nothrow) cocos2d::Physics3DRigidBody(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3DRigidBody"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Physics3DObject_prototype; + +void js_cocos2d_Physics3DRigidBody_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DRigidBody)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DRigidBody(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DRigidBody_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DRigidBody_class->name = "Physics3DRigidBody"; + jsb_cocos2d_Physics3DRigidBody_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DRigidBody_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DRigidBody_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DRigidBody_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DRigidBody_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DRigidBody_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DRigidBody_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DRigidBody_class->finalize = js_cocos2d_Physics3DRigidBody_finalize; + jsb_cocos2d_Physics3DRigidBody_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("setGravity", js_cocos2dx_physics3d_Physics3DRigidBody_setGravity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFriction", js_cocos2dx_physics3d_Physics3DRigidBody_getFriction, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAngularFactor", js_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addConstraint", js_cocos2dx_physics3d_Physics3DRigidBody_addConstraint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRigidBody", js_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTotalForce", js_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getConstraintCount", js_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("applyCentralForce", js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMassProps", js_cocos2dx_physics3d_Physics3DRigidBody_setMassProps, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFriction", js_cocos2dx_physics3d_Physics3DRigidBody_setFriction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setKinematic", js_cocos2dx_physics3d_Physics3DRigidBody_setKinematic, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDamping", js_cocos2dx_physics3d_Physics3DRigidBody_setDamping, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("applyImpulse", js_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isKinematic", js_cocos2dx_physics3d_Physics3DRigidBody_isKinematic, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("applyTorque", js_cocos2dx_physics3d_Physics3DRigidBody_applyTorque, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCcdMotionThreshold", js_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRollingFriction", js_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCcdMotionThreshold", js_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLinearFactor", js_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("applyDamping", js_cocos2dx_physics3d_Physics3DRigidBody_applyDamping, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngularVelocity", js_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("init", js_cocos2dx_physics3d_Physics3DRigidBody_init, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("applyTorqueImpulse", js_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setActive", js_cocos2dx_physics3d_Physics3DRigidBody_setActive, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLinearFactor", js_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLinearVelocity", js_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLinearVelocity", js_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCcdSweptSphereRadius", js_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("applyForce", js_cocos2dx_physics3d_Physics3DRigidBody_applyForce, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAngularVelocity", js_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("applyCentralImpulse", js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getGravity", js_cocos2dx_physics3d_Physics3DRigidBody_getGravity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRollingFriction", js_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCenterOfMassTransform", js_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setInvInertiaDiagLocal", js_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeConstraint", js_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTotalTorque", js_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInvMass", js_cocos2dx_physics3d_Physics3DRigidBody_getInvMass, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getConstraint", js_cocos2dx_physics3d_Physics3DRigidBody_getConstraint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRestitution", js_cocos2dx_physics3d_Physics3DRigidBody_getRestitution, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCcdSweptSphereRadius", js_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getHitFraction", js_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngularDamping", js_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInvInertiaDiagLocal", js_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCenterOfMassTransform", js_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngularFactor", js_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRestitution", js_cocos2dx_physics3d_Physics3DRigidBody_setRestitution, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setHitFraction", js_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLinearDamping", js_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_Physics3DRigidBody_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Physics3DObject_prototype), + jsb_cocos2d_Physics3DRigidBody_class, + js_cocos2dx_physics3d_Physics3DRigidBody_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DRigidBody", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DRigidBody_class; + p->proto = jsb_cocos2d_Physics3DRigidBody_prototype; + p->parentProto = jsb_cocos2d_Physics3DObject_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DComponent_class; +JSObject *jsb_cocos2d_Physics3DComponent_prototype; + +bool js_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DComponent* cobj = (cocos2d::Physics3DComponent *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DWorld* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DWorld*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld : Error processing arguments"); + cobj->addToPhysicsWorld(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_syncToPhysics(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DComponent* cobj = (cocos2d::Physics3DComponent *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_syncToPhysics : Invalid Native Object"); + if (argc == 0) { + cobj->syncToPhysics(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_syncToPhysics : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_syncToNode(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DComponent* cobj = (cocos2d::Physics3DComponent *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_syncToNode : Invalid Native Object"); + if (argc == 0) { + cobj->syncToNode(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_syncToNode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DComponent* cobj = (cocos2d::Physics3DComponent *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject : Invalid Native Object"); + if (argc == 0) { + cocos2d::Physics3DObject* ret = cobj->getPhysics3DObject(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DObject*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DComponent* cobj = (cocos2d::Physics3DComponent *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DObject* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DObject*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject : Error processing arguments"); + cobj->setPhysics3DObject(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_setSyncFlag(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DComponent* cobj = (cocos2d::Physics3DComponent *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_setSyncFlag : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DComponent::PhysicsSyncFlag arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_setSyncFlag : Error processing arguments"); + cobj->setSyncFlag(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_setSyncFlag : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_setTransformInPhysics(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DComponent* cobj = (cocos2d::Physics3DComponent *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_setTransformInPhysics : Invalid Native Object"); + if (argc == 2) { + cocos2d::Vec3 arg0; + cocos2d::Quaternion arg1; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + ok &= jsval_to_quaternion(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DComponent_setTransformInPhysics : Error processing arguments"); + cobj->setTransformInPhysics(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_setTransformInPhysics : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 1) { + cocos2d::Physics3DObject* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DObject*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DComponent*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 2) { + cocos2d::Physics3DObject* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DObject*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DComponent*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 3) { + cocos2d::Physics3DObject* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DObject*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Quaternion arg2; + ok &= jsval_to_quaternion(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DComponent*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 0) { + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DComponent*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + std::string& ret = cocos2d::Physics3DComponent::getPhysics3DComponentName(); + jsval jsret = JSVAL_NULL; + jsret = std_string_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DComponent_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DComponent* cobj = new (std::nothrow) cocos2d::Physics3DComponent(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3DComponent"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Component_prototype; + +void js_cocos2d_Physics3DComponent_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DComponent)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DComponent(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DComponent_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DComponent_class->name = "Physics3DComponent"; + jsb_cocos2d_Physics3DComponent_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DComponent_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DComponent_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DComponent_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DComponent_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DComponent_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DComponent_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DComponent_class->finalize = js_cocos2d_Physics3DComponent_finalize; + jsb_cocos2d_Physics3DComponent_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("addToPhysicsWorld", js_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("syncToPhysics", js_cocos2dx_physics3d_Physics3DComponent_syncToPhysics, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("syncToNode", js_cocos2dx_physics3d_Physics3DComponent_syncToNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPhysics3DObject", js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPhysics3DObject", js_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSyncFlag", js_cocos2dx_physics3d_Physics3DComponent_setSyncFlag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTransformInPhysics", js_cocos2dx_physics3d_Physics3DComponent_setTransformInPhysics, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_physics3d_Physics3DComponent_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPhysics3DComponentName", js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3DComponent_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Component_prototype), + jsb_cocos2d_Physics3DComponent_class, + js_cocos2dx_physics3d_Physics3DComponent_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DComponent", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DComponent_class; + p->proto = jsb_cocos2d_Physics3DComponent_prototype; + p->parentProto = jsb_cocos2d_Component_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_PhysicsSprite3D_class; +JSObject *jsb_cocos2d_PhysicsSprite3D_prototype; + +bool js_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::PhysicsSprite3D* cobj = (cocos2d::PhysicsSprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics : Invalid Native Object"); + if (argc == 0) { + cobj->syncToPhysics(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_PhysicsSprite3D_syncToNode(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::PhysicsSprite3D* cobj = (cocos2d::PhysicsSprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_syncToNode : Invalid Native Object"); + if (argc == 0) { + cobj->syncToNode(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_PhysicsSprite3D_syncToNode : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::PhysicsSprite3D* cobj = (cocos2d::PhysicsSprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj : Invalid Native Object"); + if (argc == 0) { + cocos2d::Physics3DObject* ret = cobj->getPhysicsObj(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DObject*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::PhysicsSprite3D* cobj = (cocos2d::PhysicsSprite3D *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DComponent::PhysicsSyncFlag arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag : Error processing arguments"); + cobj->setSyncFlag(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_PhysicsSprite3D_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::PhysicsSprite3D* cobj = new (std::nothrow) cocos2d::PhysicsSprite3D(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::PhysicsSprite3D"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Sprite3D_prototype; + +void js_cocos2d_PhysicsSprite3D_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (PhysicsSprite3D)", obj); +} + +void js_register_cocos2dx_physics3d_PhysicsSprite3D(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_PhysicsSprite3D_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_PhysicsSprite3D_class->name = "PhysicsSprite3D"; + jsb_cocos2d_PhysicsSprite3D_class->addProperty = JS_PropertyStub; + jsb_cocos2d_PhysicsSprite3D_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_PhysicsSprite3D_class->getProperty = JS_PropertyStub; + jsb_cocos2d_PhysicsSprite3D_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_PhysicsSprite3D_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_PhysicsSprite3D_class->resolve = JS_ResolveStub; + jsb_cocos2d_PhysicsSprite3D_class->convert = JS_ConvertStub; + jsb_cocos2d_PhysicsSprite3D_class->finalize = js_cocos2d_PhysicsSprite3D_finalize; + jsb_cocos2d_PhysicsSprite3D_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("syncToPhysics", js_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("syncToNode", js_cocos2dx_physics3d_PhysicsSprite3D_syncToNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPhysicsObj", js_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSyncFlag", js_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_PhysicsSprite3D_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Sprite3D_prototype), + jsb_cocos2d_PhysicsSprite3D_class, + js_cocos2dx_physics3d_PhysicsSprite3D_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "PhysicsSprite3D", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_PhysicsSprite3D_class; + p->proto = jsb_cocos2d_PhysicsSprite3D_prototype; + p->parentProto = jsb_cocos2d_Sprite3D_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DWorld_class; +JSObject *jsb_cocos2d_Physics3DWorld_prototype; + +bool js_cocos2dx_physics3d_Physics3DWorld_stepSimulate(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_stepSimulate : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_stepSimulate : Error processing arguments"); + cobj->stepSimulate(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_stepSimulate : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->needCollisionChecking(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_collisionChecking(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_collisionChecking : Invalid Native Object"); + if (argc == 0) { + cobj->collisionChecking(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_collisionChecking : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_init(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_init : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DWorldDes* arg0; + #pragma warning NO CONVERSION TO NATIVE FOR Physics3DWorldDes* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_init : Error processing arguments"); + bool ret = cobj->init(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_init : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DConstraint* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DConstraint*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint : Error processing arguments"); + cobj->removePhysics3DConstraint(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isDebugDrawEnabled(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllPhysics3DConstraints(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_rayCast(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_rayCast : Invalid Native Object"); + if (argc == 3) { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + cocos2d::Physics3DWorld::HitResult* arg2; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + #pragma warning NO CONVERSION TO NATIVE FOR HitResult* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_rayCast : Error processing arguments"); + bool ret = cobj->rayCast(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_rayCast : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects : Invalid Native Object"); + if (argc == 0) { + cobj->removeAllPhysics3DObjects(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DObject* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DObject*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject : Error processing arguments"); + cobj->addPhysics3DObject(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable : Error processing arguments"); + cobj->setDebugDrawEnable(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DObject* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DObject*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject : Error processing arguments"); + cobj->removePhysics3DObject(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_getPhysicsObject(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_getPhysicsObject : Invalid Native Object"); + if (argc == 1) { + const btCollisionObject* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (const btCollisionObject*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_getPhysicsObject : Error processing arguments"); + cocos2d::Physics3DObject* ret = cobj->getPhysicsObject(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DObject*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_getPhysicsObject : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint : Invalid Native Object"); + if (argc == 1) { + cocos2d::Physics3DConstraint* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DConstraint*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint : Error processing arguments"); + cobj->addPhysics3DConstraint(arg0); + args.rval().setUndefined(); + return true; + } + if (argc == 2) { + cocos2d::Physics3DConstraint* arg0; + bool arg1; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DConstraint*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + arg1 = JS::ToBoolean(args.get(1)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint : Error processing arguments"); + cobj->addPhysics3DConstraint(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_debugDraw(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_debugDraw : Invalid Native Object"); + if (argc == 1) { + cocos2d::Renderer* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Renderer*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_debugDraw : Error processing arguments"); + cobj->debugDraw(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_debugDraw : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_sweepShape(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_sweepShape : Invalid Native Object"); + if (argc == 4) { + cocos2d::Physics3DShape* arg0; + cocos2d::Mat4 arg1; + cocos2d::Mat4 arg2; + cocos2d::Physics3DWorld::HitResult* arg3; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DShape*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + ok &= jsval_to_matrix(cx, args.get(2), &arg2); + #pragma warning NO CONVERSION TO NATIVE FOR HitResult* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_sweepShape : Error processing arguments"); + bool ret = cobj->sweepShape(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_sweepShape : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_physics3d_Physics3DWorld_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 1) { + cocos2d::Physics3DWorldDes* arg0; + #pragma warning NO CONVERSION TO NATIVE FOR Physics3DWorldDes* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_create : Error processing arguments"); + cocos2d::Physics3DWorld* ret = cocos2d::Physics3DWorld::create(arg0); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DWorld*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DWorld_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DWorld* cobj = new (std::nothrow) cocos2d::Physics3DWorld(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3DWorld"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + + +void js_cocos2d_Physics3DWorld_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DWorld)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DWorld(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DWorld_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DWorld_class->name = "Physics3DWorld"; + jsb_cocos2d_Physics3DWorld_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DWorld_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DWorld_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DWorld_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DWorld_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DWorld_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DWorld_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DWorld_class->finalize = js_cocos2d_Physics3DWorld_finalize; + jsb_cocos2d_Physics3DWorld_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("stepSimulate", js_cocos2dx_physics3d_Physics3DWorld_stepSimulate, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("needCollisionChecking", js_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("collisionChecking", js_cocos2dx_physics3d_Physics3DWorld_collisionChecking, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("init", js_cocos2dx_physics3d_Physics3DWorld_init, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removePhysics3DConstraint", js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isDebugDrawEnabled", js_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllPhysics3DConstraints", js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("rayCast", js_cocos2dx_physics3d_Physics3DWorld_rayCast, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllPhysics3DObjects", js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addPhysics3DObject", js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDebugDrawEnable", js_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removePhysics3DObject", js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPhysicsObject", js_cocos2dx_physics3d_Physics3DWorld_getPhysicsObject, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addPhysics3DConstraint", js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("debugDraw", js_cocos2dx_physics3d_Physics3DWorld_debugDraw, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("sweepShape", js_cocos2dx_physics3d_Physics3DWorld_sweepShape, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_physics3d_Physics3DWorld_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3DWorld_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Physics3DWorld_class, + js_cocos2dx_physics3d_Physics3DWorld_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DWorld", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DWorld_class; + p->proto = jsb_cocos2d_Physics3DWorld_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DConstraint_class; +JSObject *jsb_cocos2d_Physics3DConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DConstraint_setEnabled(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setEnabled : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setEnabled : Error processing arguments"); + cobj->setEnabled(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse : Error processing arguments"); + cobj->setBreakingImpulse(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_getUserData(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_getUserData : Invalid Native Object"); + if (argc == 0) { + void* ret = cobj->getUserData(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR void*; + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_getUserData : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getBreakingImpulse(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_getBodyA(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_getBodyA : Invalid Native Object"); + if (argc == 0) { + cocos2d::Physics3DRigidBody* ret = cobj->getBodyA(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DRigidBody*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_getBodyA : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_isEnabled(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_isEnabled : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->isEnabled(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_isEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations : Invalid Native Object"); + if (argc == 0) { + int ret = cobj->getOverrideNumSolverIterations(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_getBodyB(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_getBodyB : Invalid Native Object"); + if (argc == 0) { + cocos2d::Physics3DRigidBody* ret = cobj->getBodyB(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DRigidBody*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_getBodyB : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations : Invalid Native Object"); + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations : Error processing arguments"); + cobj->setOverrideNumSolverIterations(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_getConstraintType(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_getConstraintType : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getConstraintType(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_getConstraintType : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_setUserData(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setUserData : Invalid Native Object"); + if (argc == 1) { + void* arg0; + #pragma warning NO CONVERSION TO NATIVE FOR void* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_setUserData : Error processing arguments"); + cobj->setUserData(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_setUserData : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConstraint_getbtContraint(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConstraint* cobj = (cocos2d::Physics3DConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConstraint_getbtContraint : Invalid Native Object"); + if (argc == 0) { + btTypedConstraint* ret = cobj->getbtContraint(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (btTypedConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConstraint_getbtContraint : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} + + +void js_cocos2d_Physics3DConstraint_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DConstraint)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DConstraint(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DConstraint_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DConstraint_class->name = "Physics3DConstraint"; + jsb_cocos2d_Physics3DConstraint_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DConstraint_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DConstraint_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DConstraint_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DConstraint_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DConstraint_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DConstraint_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DConstraint_class->finalize = js_cocos2d_Physics3DConstraint_finalize; + jsb_cocos2d_Physics3DConstraint_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("setEnabled", js_cocos2dx_physics3d_Physics3DConstraint_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBreakingImpulse", js_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUserData", js_cocos2dx_physics3d_Physics3DConstraint_getUserData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBreakingImpulse", js_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBodyA", js_cocos2dx_physics3d_Physics3DConstraint_getBodyA, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isEnabled", js_cocos2dx_physics3d_Physics3DConstraint_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getOverrideNumSolverIterations", js_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBodyB", js_cocos2dx_physics3d_Physics3DConstraint_getBodyB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setOverrideNumSolverIterations", js_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getConstraintType", js_cocos2dx_physics3d_Physics3DConstraint_getConstraintType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setUserData", js_cocos2dx_physics3d_Physics3DConstraint_setUserData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getbtContraint", js_cocos2dx_physics3d_Physics3DConstraint_getbtContraint, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + JSFunctionSpec *st_funcs = NULL; + + jsb_cocos2d_Physics3DConstraint_prototype = JS_InitClass( + cx, global, + JS::NullPtr(), // parent proto + jsb_cocos2d_Physics3DConstraint_class, + dummy_constructor, 0, // no constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DConstraint", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DConstraint_class; + p->proto = jsb_cocos2d_Physics3DConstraint_prototype; + p->parentProto = NULL; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DPointToPointConstraint_class; +JSObject *jsb_cocos2d_Physics3DPointToPointConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DPointToPointConstraint* cobj = (cocos2d::Physics3DPointToPointConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getPivotPointInA(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DPointToPointConstraint* cobj = (cocos2d::Physics3DPointToPointConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getPivotPointInB(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DPointToPointConstraint* cobj = (cocos2d::Physics3DPointToPointConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA : Error processing arguments"); + cobj->setPivotPointInA(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DPointToPointConstraint* cobj = (cocos2d::Physics3DPointToPointConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB : Error processing arguments"); + cobj->setPivotPointInB(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 4) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DRigidBody* arg1; + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg2; + ok &= jsval_to_vector3(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg3; + ok &= jsval_to_vector3(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::Physics3DPointToPointConstraint* ret = cocos2d::Physics3DPointToPointConstraint::create(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DPointToPointConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 2) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Physics3DPointToPointConstraint* ret = cocos2d::Physics3DPointToPointConstraint::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DPointToPointConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DPointToPointConstraint* cobj = new (std::nothrow) cocos2d::Physics3DPointToPointConstraint(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3DPointToPointConstraint"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Physics3DConstraint_prototype; + +void js_cocos2d_Physics3DPointToPointConstraint_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DPointToPointConstraint)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DPointToPointConstraint(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DPointToPointConstraint_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DPointToPointConstraint_class->name = "Physics3DPointToPointConstraint"; + jsb_cocos2d_Physics3DPointToPointConstraint_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DPointToPointConstraint_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DPointToPointConstraint_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DPointToPointConstraint_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DPointToPointConstraint_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DPointToPointConstraint_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DPointToPointConstraint_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DPointToPointConstraint_class->finalize = js_cocos2d_Physics3DPointToPointConstraint_finalize; + jsb_cocos2d_Physics3DPointToPointConstraint_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("getPivotPointInA", js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPivotPointInB", js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPivotPointInA", js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPivotPointInB", js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_physics3d_Physics3DPointToPointConstraint_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3DPointToPointConstraint_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Physics3DConstraint_prototype), + jsb_cocos2d_Physics3DPointToPointConstraint_class, + js_cocos2dx_physics3d_Physics3DPointToPointConstraint_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DPointToPointConstraint", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DPointToPointConstraint_class; + p->proto = jsb_cocos2d_Physics3DPointToPointConstraint_prototype; + p->parentProto = jsb_cocos2d_Physics3DConstraint_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DHingeConstraint_class; +JSObject *jsb_cocos2d_Physics3DHingeConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Physics3DHingeConstraint* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle : Invalid Native Object"); + do { + if (argc == 2) { + cocos2d::Mat4 arg0; + ok &= jsval_to_matrix(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double ret = cobj->getHingeAngle(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 0) { + double ret = cobj->getHingeAngle(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getMotorTargetVelosity(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getFrameOffsetA(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getFrameOffsetB(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse : Error processing arguments"); + cobj->setMaxMotorImpulse(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor : Invalid Native Object"); + if (argc == 3) { + bool arg0; + double arg1; + double arg2; + arg0 = JS::ToBoolean(args.get(0)); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor : Error processing arguments"); + cobj->enableAngularMotor(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getUpperLimit(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getMaxMotorImpulse(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLowerLimit(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset : Error processing arguments"); + cobj->setUseFrameOffset(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getEnableAngularMotor(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor : Error processing arguments"); + cobj->enableMotor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getBFrame(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames : Invalid Native Object"); + if (argc == 2) { + cocos2d::Mat4 arg0; + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(0), &arg0); + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames : Error processing arguments"); + cobj->setFrames(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getUseFrameOffset(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly : Error processing arguments"); + cobj->setAngularOnly(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit : Invalid Native Object"); + if (argc == 2) { + double arg0; + double arg1; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1); + args.rval().setUndefined(); + return true; + } + if (argc == 3) { + double arg0; + double arg1; + double arg2; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + if (argc == 4) { + double arg0; + double arg1; + double arg2; + double arg3; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + if (argc == 5) { + double arg0; + double arg1; + double arg2; + double arg3; + double arg4; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1, arg2, arg3, arg4); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setMotorTarget(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::Physics3DHingeConstraint* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setMotorTarget : Invalid Native Object"); + do { + if (argc == 2) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + if (!ok) { ok = true; break; } + double arg1; + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + if (!ok) { ok = true; break; } + cobj->setMotorTarget(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 2) { + cocos2d::Quaternion arg0; + ok &= jsval_to_quaternion(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + double arg1; + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + if (!ok) { ok = true; break; } + cobj->setMotorTarget(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setMotorTarget : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getAngularOnly(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis : Error processing arguments"); + cobj->setAxis(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DHingeConstraint* cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getAFrame(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 3) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg2; + ok &= jsval_to_vector3(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 4) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg1; + ok &= jsval_to_vector3(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg2; + ok &= jsval_to_vector3(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + bool arg3; + arg3 = JS::ToBoolean(args.get(3)); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 2) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 3) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool arg2; + arg2 = JS::ToBoolean(args.get(2)); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 6) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DRigidBody* arg1; + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg2; + ok &= jsval_to_vector3(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg3; + ok &= jsval_to_vector3(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg4; + ok &= jsval_to_vector3(cx, args.get(4), &arg4); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg5; + ok &= jsval_to_vector3(cx, args.get(5), &arg5); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3, arg4, arg5); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 7) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DRigidBody* arg1; + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg2; + ok &= jsval_to_vector3(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg3; + ok &= jsval_to_vector3(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg4; + ok &= jsval_to_vector3(cx, args.get(4), &arg4); + if (!ok) { ok = true; break; } + cocos2d::Vec3 arg5; + ok &= jsval_to_vector3(cx, args.get(5), &arg5); + if (!ok) { ok = true; break; } + bool arg6; + arg6 = JS::ToBoolean(args.get(6)); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3, arg4, arg5, arg6); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 4) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DRigidBody* arg1; + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg2; + ok &= jsval_to_matrix(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg3; + ok &= jsval_to_matrix(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 5) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DRigidBody* arg1; + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg2; + ok &= jsval_to_matrix(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg3; + ok &= jsval_to_matrix(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + bool arg4; + arg4 = JS::ToBoolean(args.get(4)); + if (!ok) { ok = true; break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DHingeConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DHingeConstraint_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DHingeConstraint* cobj = new (std::nothrow) cocos2d::Physics3DHingeConstraint(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3DHingeConstraint"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Physics3DConstraint_prototype; + +void js_cocos2d_Physics3DHingeConstraint_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DHingeConstraint)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DHingeConstraint(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DHingeConstraint_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DHingeConstraint_class->name = "Physics3DHingeConstraint"; + jsb_cocos2d_Physics3DHingeConstraint_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DHingeConstraint_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DHingeConstraint_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DHingeConstraint_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DHingeConstraint_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DHingeConstraint_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DHingeConstraint_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DHingeConstraint_class->finalize = js_cocos2d_Physics3DHingeConstraint_finalize; + jsb_cocos2d_Physics3DHingeConstraint_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("getHingeAngle", js_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMotorTargetVelosity", js_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameOffsetA", js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameOffsetB", js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxMotorImpulse", js_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("enableAngularMotor", js_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUpperLimit", js_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMaxMotorImpulse", js_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLowerLimit", js_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setUseFrameOffset", js_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getEnableAngularMotor", js_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("enableMotor", js_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBFrame", js_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFrames", js_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUseFrameOffset", js_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAngularOnly", js_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLimit", js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMotorTarget", js_cocos2dx_physics3d_Physics3DHingeConstraint_setMotorTarget, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngularOnly", js_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAxis", js_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAFrame", js_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_physics3d_Physics3DHingeConstraint_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3DHingeConstraint_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Physics3DConstraint_prototype), + jsb_cocos2d_Physics3DHingeConstraint_class, + js_cocos2dx_physics3d_Physics3DHingeConstraint_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DHingeConstraint", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DHingeConstraint_class; + p->proto = jsb_cocos2d_Physics3DHingeConstraint_prototype; + p->parentProto = jsb_cocos2d_Physics3DConstraint_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DSliderConstraint_class; +JSObject *jsb_cocos2d_Physics3DSliderConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor : Error processing arguments"); + cobj->setPoweredAngMotor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDampingLimAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin : Error processing arguments"); + cobj->setRestitutionOrthoLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin : Error processing arguments"); + cobj->setRestitutionDirLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLinearPos(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getFrameOffsetA(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getFrameOffsetB(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor : Error processing arguments"); + cobj->setPoweredLinMotor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDampingDirAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRestitutionLimLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSoftnessOrthoAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin : Error processing arguments"); + cobj->setSoftnessOrthoLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin : Error processing arguments"); + cobj->setSoftnessLimLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getAngularPos(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng : Error processing arguments"); + cobj->setRestitutionLimAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit : Error processing arguments"); + cobj->setUpperLinLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin : Error processing arguments"); + cobj->setDampingDirLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getUpperAngLimit(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDampingDirLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSoftnessDirAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getPoweredAngMotor(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit : Error processing arguments"); + cobj->setLowerAngLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit : Error processing arguments"); + cobj->setUpperAngLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity : Error processing arguments"); + cobj->setTargetLinMotorVelocity(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng : Error processing arguments"); + cobj->setDampingLimAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRestitutionLimAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getUseFrameOffset(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSoftnessOrthoLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDampingOrthoAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset : Error processing arguments"); + cobj->setUseFrameOffset(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit : Error processing arguments"); + cobj->setLowerLinLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRestitutionDirLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getTargetLinMotorVelocity(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLowerLinLimit(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSoftnessLimLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng : Error processing arguments"); + cobj->setDampingOrthoAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng : Error processing arguments"); + cobj->setSoftnessDirAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getPoweredLinMotor(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng : Error processing arguments"); + cobj->setRestitutionOrthoAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng : Error processing arguments"); + cobj->setDampingDirAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames : Invalid Native Object"); + if (argc == 2) { + cocos2d::Mat4 arg0; + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(0), &arg0); + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames : Error processing arguments"); + cobj->setFrames(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRestitutionOrthoAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getMaxAngMotorForce(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDampingOrthoLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getUpperLinLimit(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce : Error processing arguments"); + cobj->setMaxLinMotorForce(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRestitutionOrthoLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity : Error processing arguments"); + cobj->setTargetAngMotorVelocity(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSoftnessLimAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng : Error processing arguments"); + cobj->setRestitutionDirAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getDampingLimLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getLowerAngLimit(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRestitutionDirAng(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getTargetAngMotorVelocity(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin : Error processing arguments"); + cobj->setRestitutionLimLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getMaxLinMotorForce(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin : Error processing arguments"); + cobj->setDampingOrthoLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng : Error processing arguments"); + cobj->setSoftnessOrthoAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin : Error processing arguments"); + cobj->setDampingLimLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin : Error processing arguments"); + cobj->setSoftnessDirLin(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce : Error processing arguments"); + cobj->setMaxAngMotorForce(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSoftnessDirLin(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng : Error processing arguments"); + cobj->setSoftnessLimAng(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DSliderConstraint* cobj = (cocos2d::Physics3DSliderConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getUseLinearReferenceFrameA(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 5) { + cocos2d::Physics3DRigidBody* arg0; + cocos2d::Physics3DRigidBody* arg1; + cocos2d::Mat4 arg2; + cocos2d::Mat4 arg3; + bool arg4; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + ok &= jsval_to_matrix(cx, args.get(2), &arg2); + ok &= jsval_to_matrix(cx, args.get(3), &arg3); + arg4 = JS::ToBoolean(args.get(4)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DSliderConstraint_create : Error processing arguments"); + cocos2d::Physics3DSliderConstraint* ret = cocos2d::Physics3DSliderConstraint::create(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DSliderConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DSliderConstraint_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DSliderConstraint* cobj = new (std::nothrow) cocos2d::Physics3DSliderConstraint(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3DSliderConstraint"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Physics3DConstraint_prototype; + +void js_cocos2d_Physics3DSliderConstraint_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DSliderConstraint)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DSliderConstraint(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DSliderConstraint_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DSliderConstraint_class->name = "Physics3DSliderConstraint"; + jsb_cocos2d_Physics3DSliderConstraint_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DSliderConstraint_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DSliderConstraint_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DSliderConstraint_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DSliderConstraint_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DSliderConstraint_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DSliderConstraint_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DSliderConstraint_class->finalize = js_cocos2d_Physics3DSliderConstraint_finalize; + jsb_cocos2d_Physics3DSliderConstraint_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("setPoweredAngMotor", js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDampingLimAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRestitutionOrthoLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRestitutionDirLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLinearPos", js_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameOffsetA", js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameOffsetB", js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPoweredLinMotor", js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDampingDirAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRestitutionLimLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSoftnessOrthoAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSoftnessOrthoLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSoftnessLimLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngularPos", js_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRestitutionLimAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setUpperLinLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDampingDirLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUpperAngLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDampingDirLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSoftnessDirAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPoweredAngMotor", js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLowerAngLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setUpperAngLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTargetLinMotorVelocity", js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDampingLimAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRestitutionLimAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUseFrameOffset", js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSoftnessOrthoLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDampingOrthoAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setUseFrameOffset", js_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLowerLinLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRestitutionDirLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTargetLinMotorVelocity", js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLowerLinLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSoftnessLimLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDampingOrthoAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSoftnessDirAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPoweredLinMotor", js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRestitutionOrthoAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDampingDirAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFrames", js_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRestitutionOrthoAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMaxAngMotorForce", js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDampingOrthoLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUpperLinLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxLinMotorForce", js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRestitutionOrthoLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTargetAngMotorVelocity", js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSoftnessLimAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRestitutionDirAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDampingLimLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLowerAngLimit", js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRestitutionDirAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTargetAngMotorVelocity", js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRestitutionLimLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMaxLinMotorForce", js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDampingOrthoLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSoftnessOrthoAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDampingLimLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSoftnessDirLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxAngMotorForce", js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSoftnessDirLin", js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSoftnessLimAng", js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUseLinearReferenceFrameA", js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_physics3d_Physics3DSliderConstraint_create, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3DSliderConstraint_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Physics3DConstraint_prototype), + jsb_cocos2d_Physics3DSliderConstraint_class, + js_cocos2dx_physics3d_Physics3DSliderConstraint_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DSliderConstraint", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DSliderConstraint_class; + p->proto = jsb_cocos2d_Physics3DSliderConstraint_prototype; + p->parentProto = jsb_cocos2d_Physics3DConstraint_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3DConeTwistConstraint_class; +JSObject *jsb_cocos2d_Physics3DConeTwistConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getBFrame(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh : Error processing arguments"); + cobj->setFixThresh(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getFrameOffsetB(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getFrameOffsetA(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getFixThresh(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2 : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSwingSpan2(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2 : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1 : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getSwingSpan1(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1 : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse : Error processing arguments"); + cobj->setMaxMotorImpulse(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames : Invalid Native Object"); + if (argc == 2) { + cocos2d::Mat4 arg0; + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(0), &arg0); + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames : Error processing arguments"); + cobj->setFrames(arg0, arg1); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getTwistAngle(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle : Invalid Native Object"); + if (argc == 2) { + double arg0; + double arg1; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle : Error processing arguments"); + cocos2d::Vec3 ret = cobj->GetPointForAngle(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized : Error processing arguments"); + cobj->setMaxMotorImpulseNormalized(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getTwistSpan(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping : Error processing arguments"); + cobj->setDamping(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit : Invalid Native Object"); + if (argc == 3) { + double arg0; + double arg1; + double arg2; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + if (argc == 4) { + double arg0; + double arg1; + double arg2; + double arg3; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + if (argc == 5) { + double arg0; + double arg1; + double arg2; + double arg3; + double arg4; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1, arg2, arg3, arg4); + args.rval().setUndefined(); + return true; + } + if (argc == 6) { + double arg0; + double arg1; + double arg2; + double arg3; + double arg4; + double arg5; + ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); + ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); + ok &= JS::ToNumber( cx, args.get(5), &arg5) && !isnan(arg5); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit : Error processing arguments"); + cobj->setLimit(arg0, arg1, arg2, arg3, arg4, arg5); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame : Invalid Native Object"); + if (argc == 0) { + cocos2d::Mat4 ret = cobj->getAFrame(); + jsval jsret = JSVAL_NULL; + jsret = matrix_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DConeTwistConstraint* cobj = (cocos2d::Physics3DConeTwistConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor : Error processing arguments"); + cobj->enableMotor(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 4) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DRigidBody* arg1; + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg2; + ok &= jsval_to_matrix(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg3; + ok &= jsval_to_matrix(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + cocos2d::Physics3DConeTwistConstraint* ret = cocos2d::Physics3DConeTwistConstraint::create(arg0, arg1, arg2, arg3); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DConeTwistConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 2) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cocos2d::Physics3DConeTwistConstraint* ret = cocos2d::Physics3DConeTwistConstraint::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DConeTwistConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DConeTwistConstraint_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DConeTwistConstraint* cobj = new (std::nothrow) cocos2d::Physics3DConeTwistConstraint(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3DConeTwistConstraint"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Physics3DConstraint_prototype; + +void js_cocos2d_Physics3DConeTwistConstraint_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3DConeTwistConstraint)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3DConeTwistConstraint(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3DConeTwistConstraint_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3DConeTwistConstraint_class->name = "Physics3DConeTwistConstraint"; + jsb_cocos2d_Physics3DConeTwistConstraint_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DConeTwistConstraint_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3DConeTwistConstraint_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3DConeTwistConstraint_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3DConeTwistConstraint_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3DConeTwistConstraint_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3DConeTwistConstraint_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3DConeTwistConstraint_class->finalize = js_cocos2d_Physics3DConeTwistConstraint_finalize; + jsb_cocos2d_Physics3DConeTwistConstraint_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("getBFrame", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFixThresh", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameOffsetB", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFrameOffsetA", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getFixThresh", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSwingSpan2", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSwingSpan1", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxMotorImpulse", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFrames", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTwistAngle", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("GetPointForAngle", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxMotorImpulseNormalized", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTwistSpan", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDamping", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLimit", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAFrame", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("enableMotor", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_physics3d_Physics3DConeTwistConstraint_create, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3DConeTwistConstraint_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Physics3DConstraint_prototype), + jsb_cocos2d_Physics3DConeTwistConstraint_class, + js_cocos2dx_physics3d_Physics3DConeTwistConstraint_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3DConeTwistConstraint", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3DConeTwistConstraint_class; + p->proto = jsb_cocos2d_Physics3DConeTwistConstraint_prototype; + p->parentProto = jsb_cocos2d_Physics3DConstraint_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +JSClass *jsb_cocos2d_Physics3D6DofConstraint_class; +JSObject *jsb_cocos2d_Physics3D6DofConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit : Error processing arguments"); + cobj->setLinearLowerLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getLinearLowerLimit(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getAngularUpperLimit(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset : Invalid Native Object"); + if (argc == 0) { + bool ret = cobj->getUseFrameOffset(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getLinearUpperLimit(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit : Error processing arguments"); + cobj->setAngularLowerLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited : Invalid Native Object"); + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited : Error processing arguments"); + bool ret = cobj->isLimited(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset : Error processing arguments"); + cobj->setUseFrameOffset(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit : Error processing arguments"); + cobj->setLinearUpperLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vec3 ret = cobj->getAngularLowerLimit(); + jsval jsret = JSVAL_NULL; + jsret = vector3_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3D6DofConstraint* cobj = (cocos2d::Physics3D6DofConstraint *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit : Invalid Native Object"); + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= jsval_to_vector3(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit : Error processing arguments"); + cobj->setAngularUpperLimit(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + do { + if (argc == 3) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg1; + ok &= jsval_to_matrix(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + bool arg2; + arg2 = JS::ToBoolean(args.get(2)); + if (!ok) { ok = true; break; } + cocos2d::Physics3D6DofConstraint* ret = cocos2d::Physics3D6DofConstraint::create(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3D6DofConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + + do { + if (argc == 5) { + cocos2d::Physics3DRigidBody* arg0; + do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Physics3DRigidBody* arg1; + do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Physics3DRigidBody*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg2; + ok &= jsval_to_matrix(cx, args.get(2), &arg2); + if (!ok) { ok = true; break; } + cocos2d::Mat4 arg3; + ok &= jsval_to_matrix(cx, args.get(3), &arg3); + if (!ok) { ok = true; break; } + bool arg4; + arg4 = JS::ToBoolean(args.get(4)); + if (!ok) { ok = true; break; } + cocos2d::Physics3D6DofConstraint* ret = cocos2d::Physics3D6DofConstraint::create(arg0, arg1, arg2, arg3, arg4); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3D6DofConstraint*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + } while (0); + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3D6DofConstraint_create : wrong number of arguments"); + return false; +} +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3D6DofConstraint* cobj = new (std::nothrow) cocos2d::Physics3D6DofConstraint(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::Physics3D6DofConstraint"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Physics3DConstraint_prototype; + +void js_cocos2d_Physics3D6DofConstraint_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (Physics3D6DofConstraint)", obj); +} + +void js_register_cocos2dx_physics3d_Physics3D6DofConstraint(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_Physics3D6DofConstraint_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_Physics3D6DofConstraint_class->name = "Physics3D6DofConstraint"; + jsb_cocos2d_Physics3D6DofConstraint_class->addProperty = JS_PropertyStub; + jsb_cocos2d_Physics3D6DofConstraint_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_Physics3D6DofConstraint_class->getProperty = JS_PropertyStub; + jsb_cocos2d_Physics3D6DofConstraint_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_Physics3D6DofConstraint_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_Physics3D6DofConstraint_class->resolve = JS_ResolveStub; + jsb_cocos2d_Physics3D6DofConstraint_class->convert = JS_ConvertStub; + jsb_cocos2d_Physics3D6DofConstraint_class->finalize = js_cocos2d_Physics3D6DofConstraint_finalize; + jsb_cocos2d_Physics3D6DofConstraint_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("setLinearLowerLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLinearLowerLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngularUpperLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getUseFrameOffset", js_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLinearUpperLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAngularLowerLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isLimited", js_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setUseFrameOffset", js_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLinearUpperLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAngularLowerLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAngularUpperLimit", js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_physics3d_Physics3D6DofConstraint_create, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_Physics3D6DofConstraint_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Physics3DConstraint_prototype), + jsb_cocos2d_Physics3D6DofConstraint_class, + js_cocos2dx_physics3d_Physics3D6DofConstraint_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "Physics3D6DofConstraint", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_Physics3D6DofConstraint_class; + p->proto = jsb_cocos2d_Physics3D6DofConstraint_prototype; + p->parentProto = jsb_cocos2d_Physics3DConstraint_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj) { + // Get the ns + JS::RootedObject ns(cx); + get_or_create_js_obj(cx, obj, "cc", &ns); + + js_register_cocos2dx_physics3d_Physics3DConstraint(cx, ns); + js_register_cocos2dx_physics3d_Physics3D6DofConstraint(cx, ns); + js_register_cocos2dx_physics3d_Physics3DObject(cx, ns); + js_register_cocos2dx_physics3d_Physics3DRigidBody(cx, ns); + js_register_cocos2dx_physics3d_Physics3DWorld(cx, ns); + js_register_cocos2dx_physics3d_Physics3DSliderConstraint(cx, ns); + js_register_cocos2dx_physics3d_Physics3DComponent(cx, ns); + js_register_cocos2dx_physics3d_Physics3DConeTwistConstraint(cx, ns); + js_register_cocos2dx_physics3d_Physics3DPointToPointConstraint(cx, ns); + js_register_cocos2dx_physics3d_PhysicsSprite3D(cx, ns); + js_register_cocos2dx_physics3d_Physics3DHingeConstraint(cx, ns); + js_register_cocos2dx_physics3d_Physics3DShape(cx, ns); +} + diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp new file mode 100644 index 0000000000..b1986537fc --- /dev/null +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp @@ -0,0 +1,343 @@ +#ifndef __cocos2dx_physics3d_h__ +#define __cocos2dx_physics3d_h__ + +#include "jsapi.h" +#include "jsfriendapi.h" + + +extern JSClass *jsb_cocos2d_Physics3DShape_class; +extern JSObject *jsb_cocos2d_Physics3DShape_prototype; + +bool js_cocos2dx_physics3d_Physics3DShape_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DShape_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DShape(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DShape_getbtShape(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DShape_getShapeType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DShape_createBox(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DShape_createCylinder(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DShape_createConvexHull(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DShape_createCapsule(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DShape_createSphere(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DObject_class; +extern JSObject *jsb_cocos2d_Physics3DObject_prototype; + +bool js_cocos2dx_physics3d_Physics3DObject_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DObject_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DObject(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DObject_setUserData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_getUserData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_getObjType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_getWorldTransform(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_setMask(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_getCollisionCallback(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_getMask(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DObject_needCollisionCallback(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DRigidBody_class; +extern JSObject *jsb_cocos2d_Physics3DRigidBody_prototype; + +bool js_cocos2dx_physics3d_Physics3DRigidBody_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DRigidBody_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DRigidBody(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setGravity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getFriction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_addConstraint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setMassProps(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setFriction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setKinematic(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setDamping(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_isKinematic(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyTorque(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyDamping(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setActive(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyForce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getGravity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getInvMass(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getConstraint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getRestitution(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setRestitution(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DRigidBody_Physics3DRigidBody(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DComponent_class; +extern JSObject *jsb_cocos2d_Physics3DComponent_prototype; + +bool js_cocos2dx_physics3d_Physics3DComponent_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DComponent_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DComponent(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_syncToPhysics(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_syncToNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_setSyncFlag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_setTransformInPhysics(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DComponent_Physics3DComponent(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_PhysicsSprite3D_class; +extern JSObject *jsb_cocos2d_PhysicsSprite3D_prototype; + +bool js_cocos2dx_physics3d_PhysicsSprite3D_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_PhysicsSprite3D_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_PhysicsSprite3D(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_PhysicsSprite3D_syncToNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_PhysicsSprite3D_PhysicsSprite3D(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DWorld_class; +extern JSObject *jsb_cocos2d_Physics3DWorld_prototype; + +bool js_cocos2dx_physics3d_Physics3DWorld_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DWorld_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DWorld(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DWorld_stepSimulate(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_collisionChecking(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_init(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_rayCast(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_getPhysicsObject(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_debugDraw(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_sweepShape(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_Physics3DWorld(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DConstraint_class; +extern JSObject *jsb_cocos2d_Physics3DConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DConstraint_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DConstraint(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DConstraint_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_getUserData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_getBodyA(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_getBodyB(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_getConstraintType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_setUserData(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConstraint_getbtContraint(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DPointToPointConstraint_class; +extern JSObject *jsb_cocos2d_Physics3DPointToPointConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DPointToPointConstraint_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DPointToPointConstraint(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_Physics3DPointToPointConstraint(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DHingeConstraint_class; +extern JSObject *jsb_cocos2d_Physics3DHingeConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DHingeConstraint_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DHingeConstraint(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setMotorTarget(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DHingeConstraint_Physics3DHingeConstraint(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DSliderConstraint_class; +extern JSObject *jsb_cocos2d_Physics3DSliderConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DSliderConstraint_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DSliderConstraint(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DSliderConstraint_Physics3DSliderConstraint(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3DConeTwistConstraint_class; +extern JSObject *jsb_cocos2d_Physics3DConeTwistConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3DConeTwistConstraint_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3DConeTwistConstraint(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DConeTwistConstraint_Physics3DConeTwistConstraint(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_Physics3D6DofConstraint_class; +extern JSObject *jsb_cocos2d_Physics3D6DofConstraint_prototype; + +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_physics3d_Physics3D6DofConstraint_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_physics3d_Physics3D6DofConstraint(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx_physics3d(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3D6DofConstraint_Physics3D6DofConstraint(JSContext *cx, uint32_t argc, jsval *vp); +#endif + diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp index a06f019143..442488d907 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp @@ -189,6 +189,7 @@ bool js_cocos2dx_studio_ActionObject_play(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::CallFunc* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -243,6 +244,7 @@ bool js_cocos2dx_studio_ActionObject_removeActionNode(JSContext *cx, uint32_t ar if (argc == 1) { cocostudio::ActionNode* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -290,6 +292,7 @@ bool js_cocos2dx_studio_ActionObject_initWithBinary(JSContext *cx, uint32_t argc cocostudio::stExpCocoNode* arg1; cocos2d::Ref* arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -300,6 +303,7 @@ bool js_cocos2dx_studio_ActionObject_initWithBinary(JSContext *cx, uint32_t argc #pragma warning NO CONVERSION TO NATIVE FOR stExpCocoNode* ok = false; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -327,6 +331,7 @@ bool js_cocos2dx_studio_ActionObject_addActionNode(JSContext *cx, uint32_t argc, if (argc == 1) { cocostudio::ActionNode* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -624,6 +629,7 @@ bool js_cocos2dx_studio_ActionManagerEx_initWithBinary(JSContext *cx, uint32_t a cocostudio::stExpCocoNode* arg3; std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str(); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -632,6 +638,7 @@ bool js_cocos2dx_studio_ActionManagerEx_initWithBinary(JSContext *cx, uint32_t a JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -671,6 +678,7 @@ bool js_cocos2dx_studio_ActionManagerEx_playActionByName(JSContext *cx, uint32_t if (!ok) { ok = true; break; } cocos2d::CallFunc* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -1033,6 +1041,7 @@ bool js_cocos2dx_studio_MovementData_addMovementBoneData(JSContext *cx, uint32_t if (argc == 1) { cocostudio::MovementBoneData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1223,6 +1232,7 @@ bool js_cocos2dx_studio_AnimationData_addMovement(JSContext *cx, uint32_t argc, if (argc == 1) { cocostudio::MovementData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1568,6 +1578,7 @@ bool js_cocos2dx_studio_TextureData_addContourData(JSContext *cx, uint32_t argc, if (argc == 1) { cocostudio::ContourData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2167,6 +2178,7 @@ bool js_cocos2dx_studio_Tween_play(JSContext *cx, uint32_t argc, jsval *vp) int arg3; int arg4; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2218,6 +2230,7 @@ bool js_cocos2dx_studio_Tween_init(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2247,6 +2260,7 @@ bool js_cocos2dx_studio_Tween_setAnimation(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocostudio::ArmatureAnimation* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2270,6 +2284,7 @@ bool js_cocos2dx_studio_Tween_create(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2629,6 +2644,7 @@ bool js_cocos2dx_studio_ColliderDetector_init(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2689,6 +2705,7 @@ bool js_cocos2dx_studio_ColliderDetector_setBone(JSContext *cx, uint32_t argc, j if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2714,6 +2731,7 @@ bool js_cocos2dx_studio_ColliderDetector_create(JSContext *cx, uint32_t argc, js if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2889,6 +2907,7 @@ bool js_cocos2dx_studio_DecorativeDisplay_setDisplay(JSContext *cx, uint32_t arg if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2934,6 +2953,7 @@ bool js_cocos2dx_studio_DecorativeDisplay_setDisplayData(JSContext *cx, uint32_t if (argc == 1) { cocostudio::DisplayData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -2986,6 +3006,7 @@ bool js_cocos2dx_studio_DecorativeDisplay_setColliderDetector(JSContext *cx, uin if (argc == 1) { cocostudio::ColliderDetector* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3173,6 +3194,7 @@ bool js_cocos2dx_studio_DisplayManager_setCurrentDecorativeDisplay(JSContext *cx if (argc == 1) { cocostudio::DecorativeDisplay* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3258,6 +3280,7 @@ bool js_cocos2dx_studio_DisplayManager_init(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3327,6 +3350,7 @@ bool js_cocos2dx_studio_DisplayManager_addDisplay(JSContext *cx, uint32_t argc, if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3348,6 +3372,7 @@ bool js_cocos2dx_studio_DisplayManager_addDisplay(JSContext *cx, uint32_t argc, if (argc == 2) { cocostudio::DisplayData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3422,6 +3447,7 @@ bool js_cocos2dx_studio_DisplayManager_initDisplayList(JSContext *cx, uint32_t a if (argc == 1) { cocostudio::BoneData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3628,6 +3654,7 @@ bool js_cocos2dx_studio_DisplayManager_create(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -3894,6 +3921,7 @@ bool js_cocos2dx_studio_Bone_addChildBone(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4070,6 +4098,7 @@ bool js_cocos2dx_studio_Bone_setBoneData(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocostudio::BoneData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4119,6 +4148,7 @@ bool js_cocos2dx_studio_Bone_setParentBone(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4150,6 +4180,7 @@ bool js_cocos2dx_studio_Bone_addDisplay(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4171,6 +4202,7 @@ bool js_cocos2dx_studio_Bone_addDisplay(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 2) { cocostudio::DisplayData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4354,6 +4386,7 @@ bool js_cocos2dx_studio_Bone_setArmature(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocostudio::Armature* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4402,6 +4435,7 @@ bool js_cocos2dx_studio_Bone_removeChildBone(JSContext *cx, uint32_t argc, jsval cocostudio::Bone* arg0; bool arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4430,6 +4464,7 @@ bool js_cocos2dx_studio_Bone_setChildArmature(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocostudio::Armature* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4903,6 +4938,7 @@ bool js_cocos2dx_studio_ArmatureAnimation_setAnimationData(JSContext *cx, uint32 if (argc == 1) { cocostudio::AnimationData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -4995,6 +5031,7 @@ bool js_cocos2dx_studio_ArmatureAnimation_init(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocostudio::Armature* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5140,6 +5177,7 @@ bool js_cocos2dx_studio_ArmatureAnimation_create(JSContext *cx, uint32_t argc, j if (argc == 1) { cocostudio::Armature* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5323,6 +5361,7 @@ bool js_cocos2dx_studio_ArmatureDataManager_addArmatureData(JSContext *cx, uint3 cocostudio::ArmatureData* arg1; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -5341,6 +5380,7 @@ bool js_cocos2dx_studio_ArmatureDataManager_addArmatureData(JSContext *cx, uint3 std::string arg2; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -5520,6 +5560,7 @@ bool js_cocos2dx_studio_ArmatureDataManager_addAnimationData(JSContext *cx, uint cocostudio::AnimationData* arg1; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -5538,6 +5579,7 @@ bool js_cocos2dx_studio_ArmatureDataManager_addAnimationData(JSContext *cx, uint std::string arg2; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -5644,6 +5686,7 @@ bool js_cocos2dx_studio_ArmatureDataManager_addTextureData(JSContext *cx, uint32 cocostudio::TextureData* arg1; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -5662,6 +5705,7 @@ bool js_cocos2dx_studio_ArmatureDataManager_addTextureData(JSContext *cx, uint32 std::string arg2; ok &= jsval_to_std_string(cx, args.get(0), &arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -5886,6 +5930,7 @@ bool js_cocos2dx_studio_Armature_changeBoneParent(JSContext *cx, uint32_t argc, cocostudio::Bone* arg0; std::string arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -5914,6 +5959,7 @@ bool js_cocos2dx_studio_Armature_setAnimation(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocostudio::ArmatureAnimation* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6052,6 +6098,7 @@ bool js_cocos2dx_studio_Armature_removeBone(JSContext *cx, uint32_t argc, jsval cocostudio::Bone* arg0; bool arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6112,6 +6159,7 @@ bool js_cocos2dx_studio_Armature_init(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocostudio::Bone* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -6155,6 +6203,7 @@ bool js_cocos2dx_studio_Armature_setParentBone(JSContext *cx, uint32_t argc, jsv if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6182,6 +6231,7 @@ bool js_cocos2dx_studio_Armature_setBatchNode(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocostudio::BatchNode* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6227,6 +6277,7 @@ bool js_cocos2dx_studio_Armature_setArmatureData(JSContext *cx, uint32_t argc, j if (argc == 1) { cocostudio::ArmatureData* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6255,6 +6306,7 @@ bool js_cocos2dx_studio_Armature_addBone(JSContext *cx, uint32_t argc, jsval *vp cocostudio::Bone* arg0; std::string arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -6463,6 +6515,7 @@ bool js_cocos2dx_studio_Armature_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocostudio::Bone* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -6710,6 +6763,7 @@ bool js_cocos2dx_studio_Skin_setBone(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocostudio::Bone* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8385,6 +8439,7 @@ bool js_cocos2dx_studio_ComRender_setNode(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8410,6 +8465,7 @@ bool js_cocos2dx_studio_ComRender_create(JSContext *cx, uint32_t argc, jsval *vp if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8466,6 +8522,7 @@ bool js_cocos2dx_studio_ComRender_constructor(JSContext *cx, uint32_t argc, jsva if (argc == 2) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8657,6 +8714,7 @@ bool js_cocos2dx_studio_Frame_setNode(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8684,6 +8742,7 @@ bool js_cocos2dx_studio_Frame_setTimeline(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocostudio::timeline::Timeline* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11347,6 +11406,7 @@ bool js_cocos2dx_studio_Timeline_setNode(JSContext *cx, uint32_t argc, jsval *vp if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11400,6 +11460,7 @@ bool js_cocos2dx_studio_Timeline_insertFrame(JSContext *cx, uint32_t argc, jsval cocostudio::timeline::Frame* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11448,6 +11509,7 @@ bool js_cocos2dx_studio_Timeline_addFrame(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocostudio::timeline::Frame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11536,6 +11598,7 @@ bool js_cocos2dx_studio_Timeline_removeFrame(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocostudio::timeline::Frame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11563,6 +11626,7 @@ bool js_cocos2dx_studio_Timeline_setActionTimeline(JSContext *cx, uint32_t argc, if (argc == 1) { cocostudio::timeline::ActionTimeline* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11966,6 +12030,7 @@ bool js_cocos2dx_studio_ActionTimeline_addTimeline(JSContext *cx, uint32_t argc, if (argc == 1) { cocostudio::timeline::Timeline* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -12063,6 +12128,7 @@ bool js_cocos2dx_studio_ActionTimeline_removeTimeline(JSContext *cx, uint32_t ar if (argc == 1) { cocostudio::timeline::Timeline* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp index bfab5bd891..c3b5ced0d7 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp @@ -123,6 +123,7 @@ bool js_cocos2dx_ui_LayoutParameter_copyProperties(JSContext *cx, uint32_t argc, if (argc == 1) { cocos2d::ui::LayoutParameter* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1139,6 +1140,7 @@ bool js_cocos2dx_ui_Widget_findNextFocusedWidget(JSContext *cx, uint32_t argc, j cocos2d::ui::Widget* arg1; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1475,6 +1477,7 @@ bool js_cocos2dx_ui_Widget_setLayoutParameter(JSContext *cx, uint32_t argc, jsva if (argc == 1) { cocos2d::ui::LayoutParameter* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1584,6 +1587,7 @@ bool js_cocos2dx_ui_Widget_dispatchFocusEvent(JSContext *cx, uint32_t argc, jsva cocos2d::ui::Widget* arg0; cocos2d::ui::Widget* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1592,6 +1596,7 @@ bool js_cocos2dx_ui_Widget_dispatchFocusEvent(JSContext *cx, uint32_t argc, jsva JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1772,6 +1777,7 @@ bool js_cocos2dx_ui_Widget_onFocusChange(JSContext *cx, uint32_t argc, jsval *vp cocos2d::ui::Widget* arg0; cocos2d::ui::Widget* arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -1780,6 +1786,7 @@ bool js_cocos2dx_ui_Widget_onFocusChange(JSContext *cx, uint32_t argc, jsval *vp JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1900,6 +1907,7 @@ bool js_cocos2dx_ui_Widget_propagateTouchEvent(JSContext *cx, uint32_t argc, jsv cocos2d::Touch* arg2; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -1908,6 +1916,7 @@ bool js_cocos2dx_ui_Widget_propagateTouchEvent(JSContext *cx, uint32_t argc, jsv JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -2064,6 +2073,7 @@ bool js_cocos2dx_ui_Widget_interceptTouchEvent(JSContext *cx, uint32_t argc, jsv cocos2d::Touch* arg2; ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -2072,6 +2082,7 @@ bool js_cocos2dx_ui_Widget_interceptTouchEvent(JSContext *cx, uint32_t argc, jsv JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -3595,6 +3606,45 @@ bool js_cocos2dx_ui_Button_getCapInsetsNormalRenderer(JSContext *cx, uint32_t ar JS_ReportError(cx, "js_cocos2dx_ui_Button_getCapInsetsNormalRenderer : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_ui_Button_setTitleAlignment(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::ui::Button* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleAlignment : Invalid Native Object"); + do { + if (argc == 2) { + cocos2d::TextHAlignment arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + cocos2d::TextVAlignment arg1; + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + if (!ok) { ok = true; break; } + cobj->setTitleAlignment(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 1) { + cocos2d::TextHAlignment arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + cobj->setTitleAlignment(arg0); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_ui_Button_setTitleAlignment : wrong number of arguments"); + return false; +} bool js_cocos2dx_ui_Button_getCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -4051,6 +4101,7 @@ void js_register_cocos2dx_ui_Button(JSContext *cx, JS::HandleObject global) { JS_FN("loadTexturePressed", js_cocos2dx_ui_Button_loadTexturePressed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTitleFontName", js_cocos2dx_ui_Button_setTitleFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getCapInsetsNormalRenderer", js_cocos2dx_ui_Button_getCapInsetsNormalRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTitleAlignment", js_cocos2dx_ui_Button_setTitleAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getCapInsetsPressedRenderer", js_cocos2dx_ui_Button_getCapInsetsPressedRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("loadTextures", js_cocos2dx_ui_Button_loadTextures, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isScale9Enabled", js_cocos2dx_ui_Button_isScale9Enabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -7334,6 +7385,7 @@ bool js_cocos2dx_ui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ui::Widget* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7399,6 +7451,7 @@ bool js_cocos2dx_ui_ListView_pushBackCustomItem(JSContext *cx, uint32_t argc, js if (argc == 1) { cocos2d::ui::Widget* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7617,6 +7670,7 @@ bool js_cocos2dx_ui_ListView_setItemModel(JSContext *cx, uint32_t argc, jsval *v if (argc == 1) { cocos2d::ui::Widget* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -7677,6 +7731,7 @@ bool js_cocos2dx_ui_ListView_insertCustomItem(JSContext *cx, uint32_t argc, jsva cocos2d::ui::Widget* arg0; ssize_t arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8515,6 +8570,7 @@ bool js_cocos2dx_ui_UICCTextField_onTextFieldAttachWithIME(JSContext *cx, uint32 if (argc == 1) { cocos2d::TextFieldTTF* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8622,6 +8678,7 @@ bool js_cocos2dx_ui_UICCTextField_onTextFieldDeleteBackward(JSContext *cx, uint3 const char* arg1; unsigned long arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8861,6 +8918,7 @@ bool js_cocos2dx_ui_UICCTextField_onTextFieldInsertText(JSContext *cx, uint32_t const char* arg1; unsigned long arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -8892,6 +8950,7 @@ bool js_cocos2dx_ui_UICCTextField_onTextFieldDetachWithIME(JSContext *cx, uint32 if (argc == 1) { cocos2d::TextFieldTTF* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -9264,6 +9323,24 @@ bool js_cocos2dx_ui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, js JS_ReportError(cx, "js_cocos2dx_ui_TextField_getDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_ui_TextField_getTextColor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getTextColor : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Color4B& ret = cobj->getTextColor(); + jsval jsret = JSVAL_NULL; + jsret = cccolor4b_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getTextColor : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_ui_TextField_getPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -9636,6 +9713,24 @@ bool js_cocos2dx_ui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, js JS_ReportError(cx, "js_cocos2dx_ui_TextField_setDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_ui_TextField_getTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getTextHorizontalAlignment : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getTextHorizontalAlignment(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getTextHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_ui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -9808,6 +9903,24 @@ bool js_cocos2dx_ui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsv JS_ReportError(cx, "js_cocos2dx_ui_TextField_setDetachWithIME : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_ui_TextField_getTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getTextVerticalAlignment : Invalid Native Object"); + if (argc == 0) { + int ret = (int)cobj->getTextVerticalAlignment(); + jsval jsret = JSVAL_NULL; + jsret = int32_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getTextVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_ui_TextField_setTouchAreaEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -10033,6 +10146,7 @@ void js_register_cocos2dx_ui_TextField(JSContext *cx, JS::HandleObject global) { JS_FN("getString", js_cocos2dx_ui_TextField_getString, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setPasswordStyleText", js_cocos2dx_ui_TextField_setPasswordStyleText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getDeleteBackward", js_cocos2dx_ui_TextField_getDeleteBackward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextColor", js_cocos2dx_ui_TextField_getTextColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getPlaceHolder", js_cocos2dx_ui_TextField_getPlaceHolder, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getAttachWithIME", js_cocos2dx_ui_TextField_getAttachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setFontName", js_cocos2dx_ui_TextField_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -10053,6 +10167,7 @@ void js_register_cocos2dx_ui_TextField(JSContext *cx, JS::HandleObject global) { JS_FN("setMaxLengthEnabled", js_cocos2dx_ui_TextField_setMaxLengthEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isPasswordEnabled", js_cocos2dx_ui_TextField_isPasswordEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setDeleteBackward", js_cocos2dx_ui_TextField_setDeleteBackward, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextHorizontalAlignment", js_cocos2dx_ui_TextField_getTextHorizontalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setFontSize", js_cocos2dx_ui_TextField_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setPlaceHolder", js_cocos2dx_ui_TextField_setPlaceHolder, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setPlaceHolderColor", js_cocos2dx_ui_TextField_setPlaceHolderColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -10061,6 +10176,7 @@ void js_register_cocos2dx_ui_TextField(JSContext *cx, JS::HandleObject global) { JS_FN("getMaxLength", js_cocos2dx_ui_TextField_getMaxLength, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isMaxLengthEnabled", js_cocos2dx_ui_TextField_isMaxLengthEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setDetachWithIME", js_cocos2dx_ui_TextField_setDetachWithIME, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTextVerticalAlignment", js_cocos2dx_ui_TextField_getTextVerticalAlignment, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTouchAreaEnabled", js_cocos2dx_ui_TextField_setTouchAreaEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setMaxLength", js_cocos2dx_ui_TextField_setMaxLength, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTouchSize", js_cocos2dx_ui_TextField_setTouchSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -10415,6 +10531,7 @@ bool js_cocos2dx_ui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsval ssize_t arg1; bool arg2; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10491,6 +10608,7 @@ bool js_cocos2dx_ui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ui::Layout* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10559,6 +10677,7 @@ bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp) cocos2d::ui::Layout* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10661,6 +10780,7 @@ bool js_cocos2dx_ui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::ui::Layout* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10891,6 +11011,7 @@ bool js_cocos2dx_ui_Helper_seekActionWidgetByActionTag(JSContext *cx, uint32_t a cocos2d::ui::Widget* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10925,6 +11046,7 @@ bool js_cocos2dx_ui_Helper_seekWidgetByName(JSContext *cx, uint32_t argc, jsval cocos2d::ui::Widget* arg0; std::string arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -10959,6 +11081,7 @@ bool js_cocos2dx_ui_Helper_seekWidgetByTag(JSContext *cx, uint32_t argc, jsval * cocos2d::ui::Widget* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11012,6 +11135,7 @@ bool js_cocos2dx_ui_Helper_doLayout(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11599,6 +11723,7 @@ bool js_cocos2dx_ui_RichElementCustomNode_init(JSContext *cx, uint32_t argc, jsv ok &= jsval_to_cccolor3b(cx, args.get(1), &arg1); ok &= jsval_to_uint16(cx, args.get(2), &arg2); do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -11630,6 +11755,7 @@ bool js_cocos2dx_ui_RichElementCustomNode_create(JSContext *cx, uint32_t argc, j ok &= jsval_to_cccolor3b(cx, args.get(1), &arg1); ok &= jsval_to_uint16(cx, args.get(2), &arg2); do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -11779,6 +11905,7 @@ bool js_cocos2dx_ui_RichText_insertElement(JSContext *cx, uint32_t argc, jsval * cocos2d::ui::RichElement* arg0; int arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11807,6 +11934,7 @@ bool js_cocos2dx_ui_RichText_pushBackElement(JSContext *cx, uint32_t argc, jsval if (argc == 1) { cocos2d::ui::RichElement* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -11874,6 +12002,7 @@ bool js_cocos2dx_ui_RichText_removeElement(JSContext *cx, uint32_t argc, jsval * if (argc == 1) { cocos2d::ui::RichElement* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -12604,6 +12733,7 @@ bool js_cocos2dx_ui_Scale9Sprite_updateWithSprite(JSContext *cx, uint32_t argc, if (argc == 6) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -12638,6 +12768,7 @@ bool js_cocos2dx_ui_Scale9Sprite_updateWithSprite(JSContext *cx, uint32_t argc, if (argc == 4) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -12931,6 +13062,7 @@ bool js_cocos2dx_ui_Scale9Sprite_init(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 3) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -12957,6 +13089,7 @@ bool js_cocos2dx_ui_Scale9Sprite_init(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 4) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -12985,6 +13118,7 @@ bool js_cocos2dx_ui_Scale9Sprite_init(JSContext *cx, uint32_t argc, jsval *vp) if (argc == 6) { cocos2d::Sprite* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -13049,6 +13183,7 @@ bool js_cocos2dx_ui_Scale9Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, js if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -13065,6 +13200,7 @@ bool js_cocos2dx_ui_Scale9Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, js cocos2d::SpriteFrame* arg0; cocos2d::Rect arg1; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -13341,6 +13477,7 @@ bool js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrame(JSContext *cx, uint32_t arg if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -13361,6 +13498,7 @@ bool js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrame(JSContext *cx, uint32_t arg if (argc == 2) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -13652,6 +13790,7 @@ bool js_cocos2dx_ui_Scale9Sprite_createWithSpriteFrame(JSContext *cx, uint32_t a if (argc == 2) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -13682,6 +13821,7 @@ bool js_cocos2dx_ui_Scale9Sprite_createWithSpriteFrame(JSContext *cx, uint32_t a if (argc == 1) { cocos2d::SpriteFrame* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); @@ -14120,6 +14260,7 @@ bool js_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite(JSContext *cx, uint3 if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -14354,6 +14495,7 @@ bool js_cocos2dx_ui_EditBox_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -14383,6 +14525,7 @@ bool js_cocos2dx_ui_EditBox_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -14393,6 +14536,7 @@ bool js_cocos2dx_ui_EditBox_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -14422,6 +14566,7 @@ bool js_cocos2dx_ui_EditBox_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg1; do { + if (args.get(1).isNull()) { arg1 = nullptr; break; } if (!args.get(1).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(1).toObjectOrNull(); @@ -14432,6 +14577,7 @@ bool js_cocos2dx_ui_EditBox_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg2; do { + if (args.get(2).isNull()) { arg2 = nullptr; break; } if (!args.get(2).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(2).toObjectOrNull(); @@ -14442,6 +14588,7 @@ bool js_cocos2dx_ui_EditBox_create(JSContext *cx, uint32_t argc, jsval *vp) if (!ok) { ok = true; break; } cocos2d::ui::Scale9Sprite* arg3; do { + if (args.get(3).isNull()) { arg3 = nullptr; break; } if (!args.get(3).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(3).toObjectOrNull(); @@ -15554,6 +15701,7 @@ bool js_cocos2dx_ui_LayoutComponent_bindLayoutComponent(JSContext *cx, uint32_t if (argc == 1) { cocos2d::Node* arg0; do { + if (args.get(0).isNull()) { arg0 = nullptr; break; } if (!args.get(0).isObject()) { ok = false; break; } js_proxy_t *jsProxy; JSObject *tmpObj = args.get(0).toObjectOrNull(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp index 0b5ea66c16..9ab520641a 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp @@ -195,6 +195,7 @@ bool js_cocos2dx_ui_Button_setCapInsetsNormalRenderer(JSContext *cx, uint32_t ar bool js_cocos2dx_ui_Button_loadTexturePressed(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Button_setTitleFontName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Button_getCapInsetsNormalRenderer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setTitleAlignment(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Button_getCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_Button_isScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); @@ -466,6 +467,7 @@ bool js_cocos2dx_ui_TextField_getFontSize(JSContext *cx, uint32_t argc, jsval *v bool js_cocos2dx_ui_TextField_getString(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setPasswordStyleText(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getTextColor(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_getPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_getAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setFontName(JSContext *cx, uint32_t argc, jsval *vp); @@ -486,6 +488,7 @@ bool js_cocos2dx_ui_TextField_getPasswordStyleText(JSContext *cx, uint32_t argc, bool js_cocos2dx_ui_TextField_setMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_isPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setPlaceHolderColor(JSContext *cx, uint32_t argc, jsval *vp); @@ -494,6 +497,7 @@ bool js_cocos2dx_ui_TextField_setTextColor(JSContext *cx, uint32_t argc, jsval * bool js_cocos2dx_ui_TextField_getMaxLength(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_isMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setTouchAreaEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setMaxLength(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_ui_TextField_setTouchSize(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp b/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp index 9085c4670d..87e22e3f36 100644 --- a/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp +++ b/cocos/scripting/js-bindings/manual/3d/jsb_cocos2dx_3d_manual.cpp @@ -26,6 +26,7 @@ #include "jsb_cocos2dx_3d_manual.h" #include "cocos2d_specifics.hpp" #include "jsb_cocos2dx_3d_auto.hpp" +#include "3d/CCBundle3D.h" using namespace cocos2d; @@ -284,6 +285,60 @@ bool js_cocos2dx_Terrain_create(JSContext *cx, uint32_t argc, jsval *vp) return false; } +jsval std_vector_vec3_to_jsval(JSContext* cx, const std::vector& triangles) +{ + JS::RootedObject jsarr(cx, JS_NewArrayObject(cx, triangles.size())); + + uint32_t i = 0; + for(auto iter = triangles.begin(); iter != triangles.end(); ++iter) + { + JS::RootedValue element(cx, vector3_to_jsval(cx, *iter)); + JS_SetElement(cx, jsarr, i, element); + ++i; + } + + return OBJECT_TO_JSVAL(jsarr); +} + +bool js_cocos2dx_Bundle3D_getTrianglesList(JSContext *cx, uint32_t argc, jsval *vp) +{ + if(argc == 1) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + + std::string path; + bool ok = jsval_to_std_string(cx, args.get(0), &path); + JSB_PRECONDITION2(ok, cx, false, "Error processing arguments"); + + std::vector triangles = cocos2d::Bundle3D::getTrianglesList(path); + + JS::RootedValue ret(cx, std_vector_vec3_to_jsval(cx, triangles)); + args.rval().set(ret); + return true; + } + JS_ReportError(cx, "wrong number of arguments"); + return false; +} + +bool js_cocos2dx_Terrain_getHeightData(JSContext *cx, uint32_t argc, jsval *vp) +{ + if(argc == 0) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Terrain_getHeightData : Invalid Native Object"); + + auto data = cobj->getHeightData(); + + args.rval().set(std_vector_float_to_jsval(cx, data)); + return true; + } + JS_ReportError(cx, "wrong number of arguments"); + return false; +} + void register_all_cocos2dx_3d_manual(JSContext *cx, JS::HandleObject global) { JS::RootedValue tmpVal(cx); @@ -299,9 +354,15 @@ void register_all_cocos2dx_3d_manual(JSContext *cx, JS::HandleObject global) tmpObj = tmpVal.toObjectOrNull(); JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_Terrain_create, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_GetProperty(cx, ccObj, "Bundle3D", &tmpVal); + tmpObj = tmpVal.toObjectOrNull(); + JS_DefineFunction(cx, tmpObj, "getTrianglesList", js_cocos2dx_Bundle3D_getTrianglesList, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_Sprite3D_prototype), "getAABB", js_cocos2dx_Sprite3D_getAABB, 0, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_Mesh_prototype), "getMeshVertexAttribute", js_cocos2dx_Mesh_getMeshVertexAttribute, 1, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_TextureCube_prototype), "setTexParameters", js_cocos2dx_CCTextureCube_setTexParameters, 4, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_Terrain_prototype), "getHeightData", js_cocos2dx_Terrain_getHeightData, 0, JSPROP_READONLY | JSPROP_PERMANENT); } diff --git a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp index 935d212a2d..05e1fe2528 100644 --- a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp +++ b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp @@ -34,7 +34,7 @@ #include "jsb_cocos2dx_auto.hpp" #include "js_bindings_config.h" // for debug socket -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include #include #else @@ -105,7 +105,7 @@ static std::unordered_map globals; static void cc_closesocket(int fd) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) closesocket(fd); #else close(fd); @@ -347,8 +347,6 @@ bool JSBCore_os(JSContext *cx, uint32_t argc, jsval *vp) os = JS_InternString(cx, "Blackberry"); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) os = JS_InternString(cx, "OS X"); -#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - os = JS_InternString(cx, "WP8"); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) os = JS_InternString(cx, "WINRT"); #else @@ -1650,7 +1648,7 @@ static void serverEntryPoint(unsigned int port) int err = 0; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) WSADATA wsaData; err = WSAStartup(MAKEWORD(2, 2),&wsaData); #endif diff --git a/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp b/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp index 1c53e0e0f0..392d8bf0db 100644 --- a/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp +++ b/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp @@ -5339,6 +5339,89 @@ void get_or_create_js_obj(JSContext* cx, JS::HandleObject obj, const std::string } } +#if CC_ENABLE_BULLET_INTEGRATION && CC_USE_3D_PHYSICS + +#include "physics3d/CCPhysics3D.h" + +bool js_cocos2dx_Scene_setPhysics3DDebugCamera(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Scene* cobj = (cocos2d::Scene *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scene_setPhysics3DDebugCamera : Invalid Native Object"); + if (argc == 1) + { + cocos2d::Camera* arg0; + do + { + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Camera*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_setPhysics3DDebugCamera : Error processing arguments"); + cobj->setPhysics3DDebugCamera(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scene_setPhysics3DDebugCamera : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Scene_initWithPhysics(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Scene* cobj = (cocos2d::Scene *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scene_initWithPhysics : Invalid Native Object"); + if (argc == 0) + { + bool ret = cobj->initWithPhysics(); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scene_initWithPhysics : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Scene_getPhysics3DWorld(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Scene* cobj = (cocos2d::Scene *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scene_getPhysics3DWorld : Invalid Native Object"); + if (argc == 0) + { + cocos2d::Physics3DWorld* ret = cobj->getPhysics3DWorld(); + jsval jsret = JSVAL_NULL; + do + { + if (ret) + { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DWorld*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else + { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Scene_getPhysics3DWorld : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +#endif //CC_ENABLE_BULLET_INTEGRATION && CC_USE_3D_PHYSICS + void register_cocos2dx_js_core(JSContext* cx, JS::HandleObject global) { JS::RootedObject ccObj(cx); @@ -5633,4 +5716,11 @@ void register_cocos2dx_js_core(JSContext* cx, JS::HandleObject global) get_or_create_js_obj(cx, global, "console", &tmpObj); JS_DefineFunction(cx, tmpObj, "log", js_console_log, 1, JSPROP_READONLY | JSPROP_PERMANENT); + +#if CC_ENABLE_BULLET_INTEGRATION && CC_USE_3D_PHYSICS + tmpObj.set(jsb_cocos2d_Scene_prototype); + JS_DefineFunction(cx, tmpObj, "setPhysics3DDebugCamera", js_cocos2dx_Scene_setPhysics3DDebugCamera, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, tmpObj, "initWithPhysics", js_cocos2dx_Scene_initWithPhysics, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, tmpObj, "getPhysics3DWorld", js_cocos2dx_Scene_getPhysics3DWorld, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); +#endif //CC_ENABLE_BULLET_INTEGRATION && CC_USE_3D_PHYSICS } diff --git a/cocos/scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_manual.cpp b/cocos/scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_manual.cpp index bd4e2fe5b3..4975cbced3 100644 --- a/cocos/scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_manual.cpp +++ b/cocos/scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_manual.cpp @@ -303,7 +303,7 @@ static bool js_cocos2dx_studio_ActionManagerEx_initWithDictionaryEx(JSContext *c rapidjson::Document arg1Jsondoc; arg1Jsondoc.Parse<0>(arg1); if (arg1Jsondoc.HasParseError()) { - CCLOG("GetParseError %s\n",arg1Jsondoc.GetParseError()); + CCLOG("GetParseError %d\n",arg1Jsondoc.GetParseError()); } do { if (!args.get(2).isObject()) { ok = false; break; } diff --git a/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.cpp b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.cpp new file mode 100644 index 0000000000..9e57d3f3c0 --- /dev/null +++ b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.cpp @@ -0,0 +1,138 @@ +#include "jsb_cocos2dx_experimental_webView_manual.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + +#include "UIWebView.h" +#include "ScriptingCore.h" +#include "cocos2d_specifics.hpp" + +using namespace cocos2d; + + +static bool jsb_cocos2dx_experimental_webView_setOnShouldStartLoading(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + experimental::ui::WebView* cobj = (experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); + + if(argc == 1){ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::shared_ptr func(new JSFunctionWrapper(cx, obj, args.get(0))); + cobj->setOnShouldStartLoading([=](experimental::ui::WebView *sender, const std::string &url)->bool{ + jsval arg[2]; + js_proxy_t *proxy = js_get_or_create_proxy(cx, sender); + if(proxy) + arg[0] = OBJECT_TO_JSVAL(proxy->obj); + else + arg[0] = JSVAL_NULL; + arg[1] = std_string_to_jsval(cx, url); + JS::RootedValue rval(cx); + + bool ok = func->invoke(2, arg, &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + return true; + }); + return true; + } +} + +static bool jsb_cocos2dx_experimental_webView_setOnDidFinishLoading(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + experimental::ui::WebView* cobj = (experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); + + if(argc == 1){ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::shared_ptr func(new JSFunctionWrapper(cx, obj, args.get(0))); + cobj->setOnDidFinishLoading([=](experimental::ui::WebView *sender, const std::string &url)->void{ + jsval arg[2]; + js_proxy_t *proxy = js_get_or_create_proxy(cx, sender); + if(proxy) + arg[0] = OBJECT_TO_JSVAL(proxy->obj); + else + arg[0] = JSVAL_NULL; + arg[1] = std_string_to_jsval(cx, url); + JS::RootedValue rval(cx); + + bool ok = func->invoke(2, arg, &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }); + return true; + } +} + +static bool jsb_cocos2dx_experimental_webView_setOnDidFailLoading(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + experimental::ui::WebView* cobj = (experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); + + if(argc == 1){ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::shared_ptr func(new JSFunctionWrapper(cx, obj, args.get(0))); + cobj->setOnDidFailLoading([=](experimental::ui::WebView *sender, const std::string &url)->void{ + jsval arg[2]; + js_proxy_t *proxy = js_get_or_create_proxy(cx, sender); + if(proxy) + arg[0] = OBJECT_TO_JSVAL(proxy->obj); + else + arg[0] = JSVAL_NULL; + arg[1] = std_string_to_jsval(cx, url); + JS::RootedValue rval(cx); + + bool ok = func->invoke(2, arg, &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }); + return true; + } +} + +static bool jsb_cocos2dx_experimental_webView_setOnJSCallback(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + experimental::ui::WebView* cobj = (experimental::ui::WebView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); + + if(argc == 1){ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + std::shared_ptr func(new JSFunctionWrapper(cx, obj, args.get(0))); + cobj->setOnJSCallback([=](experimental::ui::WebView *sender, const std::string &url)->void{ + jsval arg[2]; + js_proxy_t *proxy = js_get_or_create_proxy(cx, sender); + if(proxy) + arg[0] = OBJECT_TO_JSVAL(proxy->obj); + else + arg[0] = JSVAL_NULL; + arg[1] = std_string_to_jsval(cx, url); + JS::RootedValue rval(cx); + + bool ok = func->invoke(2, arg, &rval); + if (!ok && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }); + return true; + } +} +extern JSObject* jsb_cocos2d_experimental_ui_WebView_prototype; + +void register_all_cocos2dx_experimental_webView_manual(JSContext* cx, JS::HandleObject global) +{ + JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_experimental_ui_WebView_prototype), "setOnShouldStartLoading", jsb_cocos2dx_experimental_webView_setOnShouldStartLoading, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_experimental_ui_WebView_prototype), "setOnDidFinishLoading", jsb_cocos2dx_experimental_webView_setOnDidFinishLoading, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_experimental_ui_WebView_prototype), "setOnDidFailLoading", jsb_cocos2dx_experimental_webView_setOnDidFailLoading, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_experimental_ui_WebView_prototype), "setOnJSCallback", jsb_cocos2dx_experimental_webView_setOnJSCallback, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); +} + +#endif diff --git a/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.h b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.h new file mode 100644 index 0000000000..f9d536f634 --- /dev/null +++ b/cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.h @@ -0,0 +1,9 @@ +#ifndef __jsb_cocos2dx_experimental_webView_manual__ +#define __jsb_cocos2dx_experimental_webView_manual__ + +#include "jsapi.h" +#include "jsfriendapi.h" + +void register_all_cocos2dx_experimental_webView_manual(JSContext* cx, JS::HandleObject global); + +#endif /* defined(__jsb_cocos2dx_experimental_webView_manual__) */ diff --git a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp index 187ddadab5..6b85f98ced 100644 --- a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp +++ b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp @@ -523,7 +523,7 @@ bool jsval_to_long_long(JSContext *cx, JS::HandleValue vp, long long* r) JSB_PRECONDITION2(str, cx, false, "Error encoding string"); char *endptr; -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WP8) +#if(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) __int64 ret = _strtoi64(str, &endptr, 10); #else long long ret = strtoll(str, &endptr, 10); @@ -1337,7 +1337,7 @@ bool jsval_to_std_vector_string( JSContext *cx, JS::HandleValue vp, std::vector< uint32_t len = 0; JS_GetArrayLength(cx, jsobj, &len); - + ret->reserve(len); for (uint32_t i=0; i < len; i++) { JS::RootedValue value(cx); @@ -1368,7 +1368,7 @@ bool jsval_to_std_vector_int( JSContext *cx, JS::HandleValue vp, std::vectorreserve(len); for (uint32_t i=0; i < len; i++) { JS::RootedValue value(cx); @@ -1394,6 +1394,41 @@ bool jsval_to_std_vector_int( JSContext *cx, JS::HandleValue vp, std::vector* ret) +{ + JS::RootedObject jsobj(cx); + bool ok = vp.isObject() && JS_ValueToObject( cx, vp, &jsobj ); + JSB_PRECONDITION3( ok, cx, false, "Error converting value to object"); + JSB_PRECONDITION3( jsobj && JS_IsArrayObject( cx, jsobj), cx, false, "Object must be an array"); + + uint32_t len = 0; + JS_GetArrayLength(cx, jsobj, &len); + ret->reserve(len); + for (uint32_t i=0; i < len; i++) + { + JS::RootedValue value(cx); + if (JS_GetElement(cx, jsobj, i, &value)) + { + if (value.isNumber()) + { + double number = 0.0; + ok = JS::ToNumber(cx, value, &number); + if (ok) + { + ret->push_back(number); + } + } + else + { + JS_ReportError(cx, "not supported type in array"); + return false; + } + } + } + + return true; +} + bool jsval_to_matrix(JSContext *cx, JS::HandleValue vp, cocos2d::Mat4* ret) { JS::RootedObject jsobj(cx); @@ -2458,7 +2493,7 @@ jsval ssize_to_jsval(JSContext *cx, ssize_t v) jsval std_vector_string_to_jsval( JSContext *cx, const std::vector& v) { - JS::RootedObject jsretArr(cx, JS_NewArrayObject(cx, 0)); + JS::RootedObject jsretArr(cx, JS_NewArrayObject(cx, v.size())); int i = 0; for (const std::string obj : v) @@ -2476,7 +2511,7 @@ jsval std_vector_string_to_jsval( JSContext *cx, const std::vector& jsval std_vector_int_to_jsval( JSContext *cx, const std::vector& v) { - JS::RootedObject jsretArr(cx, JS_NewArrayObject(cx, 0)); + JS::RootedObject jsretArr(cx, JS_NewArrayObject(cx, v.size())); int i = 0; for (const int obj : v) @@ -2492,6 +2527,24 @@ jsval std_vector_int_to_jsval( JSContext *cx, const std::vector& v) return OBJECT_TO_JSVAL(jsretArr); } +jsval std_vector_float_to_jsval( JSContext *cx, const std::vector& v) +{ + JS::RootedObject jsretArr(cx, JS_NewArrayObject(cx, v.size())); + + int i = 0; + for (const float obj : v) + { + JS::RootedValue arrElement(cx); + arrElement = DOUBLE_TO_JSVAL(obj); + + if (!JS_SetElement(cx, jsretArr, i, arrElement)) { + break; + } + ++i; + } + return OBJECT_TO_JSVAL(jsretArr); +} + jsval matrix_to_jsval(JSContext *cx, const cocos2d::Mat4& v) { JS::RootedObject jsretArr(cx, JS_NewArrayObject(cx, 16)); diff --git a/cocos/scripting/js-bindings/manual/js_manual_conversions.h b/cocos/scripting/js-bindings/manual/js_manual_conversions.h index 575dc940c6..9d9b1b8538 100644 --- a/cocos/scripting/js-bindings/manual/js_manual_conversions.h +++ b/cocos/scripting/js-bindings/manual/js_manual_conversions.h @@ -181,6 +181,7 @@ bool jsval_to_ccvaluevector(JSContext* cx, JS::HandleValue v, cocos2d::ValueVect bool jsval_to_ssize( JSContext *cx, JS::HandleValue vp, ssize_t* ret); bool jsval_to_std_vector_string( JSContext *cx, JS::HandleValue vp, std::vector* ret); bool jsval_to_std_vector_int( JSContext *cx, JS::HandleValue vp, std::vector* ret); +bool jsval_to_std_vector_float( JSContext *cx, JS::HandleValue vp, std::vector* ret); bool jsval_to_matrix(JSContext *cx, JS::HandleValue vp, cocos2d::Mat4* ret); bool jsval_to_vector2(JSContext *cx, JS::HandleValue vp, cocos2d::Vec2* ret); bool jsval_to_vector3(JSContext *cx, JS::HandleValue vp, cocos2d::Vec3* ret); @@ -327,6 +328,7 @@ jsval ccvaluevector_to_jsval(JSContext* cx, const cocos2d::ValueVector& v); jsval ssize_to_jsval(JSContext *cx, ssize_t v); jsval std_vector_string_to_jsval( JSContext *cx, const std::vector& v); jsval std_vector_int_to_jsval( JSContext *cx, const std::vector& v); +jsval std_vector_float_to_jsval( JSContext *cx, const std::vector& v); jsval matrix_to_jsval(JSContext *cx, const cocos2d::Mat4& v); jsval vector2_to_jsval(JSContext *cx, const cocos2d::Vec2& v); jsval vector3_to_jsval(JSContext *cx, const cocos2d::Vec3& v); diff --git a/cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.cpp b/cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.cpp new file mode 100644 index 0000000000..0936ffb8f6 --- /dev/null +++ b/cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.cpp @@ -0,0 +1,324 @@ +/**************************************************************************** + Copyright (c) 2008-2010 Ricardo Quesada + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2011 Zynga Inc. + Copyright (c) 2013-2014 Chukong Technologies Inc. + + 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 "jsb_cocos2dx_physics3d_manual.h" + +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + +#include "jsb_cocos2dx_physics3d_auto.hpp" +#include "cocos2d_specifics.hpp" +#include "physics3d/CCPhysics3D.h" + +using namespace cocos2d; + +bool jsval_to_physics3DRigidBodyDes(JSContext* cx, JS::HandleValue v, Physics3DRigidBodyDes* des) +{ + JS::RootedObject jsobj(cx, v.toObjectOrNull()); + JS::RootedValue tmp(cx); + + if(JS_GetProperty(cx, jsobj, "mass", &tmp)) + { + des->mass = tmp.toNumber(); + } + if(JS_GetProperty(cx, jsobj, "shape", &tmp)) + { + js_proxy_t* proxy = jsb_get_js_proxy(tmp.toObjectOrNull()); + des->shape = proxy ? (cocos2d::Physics3DShape*)proxy->ptr : nullptr; + } + if(JS_GetProperty(cx, jsobj, "localInertia", &tmp)) + { + Vec3 v3; + jsval_to_vector3(cx, tmp, &v3); + des->localInertia = v3; + } + if(JS_GetProperty(cx, jsobj, "originalTransform", &tmp)) + { + Mat4 m4; + jsval_to_matrix(cx, tmp, &m4); + des->originalTransform = m4; + } + return true; +} + +bool js_cocos2dx_PhysicsSprite3D_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + if (argc == 2) + { + std::string arg0; + cocos2d::Physics3DRigidBodyDes arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_physics3DRigidBodyDes(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_create : Error processing arguments"); + cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1); + + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::PhysicsSprite3D*)ret); + jsval jsret = jsProxy ? OBJECT_TO_JSVAL(jsProxy->obj) : JSVAL_VOID; + + args.rval().set(jsret); + return true; + } + if (argc == 3) + { + std::string arg0; + cocos2d::Physics3DRigidBodyDes arg1; + cocos2d::Vec3 arg2; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_physics3DRigidBodyDes(cx, args.get(1), &arg1); + ok &= jsval_to_vector3(cx, args.get(2), &arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_create : Error processing arguments"); + cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1, arg2); + + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::PhysicsSprite3D*)ret); + jsval jsret = jsProxy ? OBJECT_TO_JSVAL(jsProxy->obj) : JSVAL_VOID; + + args.rval().set(jsret); + return true; + } + if (argc == 4) + { + std::string arg0; + cocos2d::Physics3DRigidBodyDes arg1; + cocos2d::Vec3 arg2; + cocos2d::Quaternion arg3; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_physics3DRigidBodyDes(cx, args.get(1), &arg1); + ok &= jsval_to_vector3(cx, args.get(2), &arg2); + ok &= jsval_to_quaternion(cx, args.get(3), &arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_PhysicsSprite3D_create : Error processing arguments"); + cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1, arg2, arg3); + + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::PhysicsSprite3D*)ret); + jsval jsret = jsProxy ? OBJECT_TO_JSVAL(jsProxy->obj) : JSVAL_VOID; + + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_PhysicsSprite3D_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3DRigidBody_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc == 1) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::Physics3DRigidBodyDes arg0; + ok &= jsval_to_physics3DRigidBodyDes(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_create : Error processing arguments"); + cocos2d::Physics3DRigidBody* ret = cocos2d::Physics3DRigidBody::create(&arg0); + + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::Physics3DRigidBody*)ret); + jsval jsret = OBJECT_TO_JSVAL(jsProxy->obj); + + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DRigidBody_create : wrong number of arguments"); + return false; +} + +std::vector jsval_to_std_vector_vec3(JSContext* cx, JS::HandleValue v) +{ + std::vector ret; + JS::RootedObject jsobj(cx, v.toObjectOrNull()); + uint32_t length; + JS_GetArrayLength(cx, jsobj, &length); + ret.reserve(length); + + for(size_t i = 0; i < length; ++i) + { + JS::RootedValue element(cx); + JS_GetElement(cx, jsobj, (uint32_t)i, &element); + + Vec3 v3; + jsval_to_vector3(cx, element, &v3); + ret.push_back(v3); + } + return ret; +} + +bool js_cocos2dx_physics3d_Physics3dShape_createMesh(JSContext *cx, uint32_t argc, jsval *vp) +{ + if(argc == 2) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + + std::vector arg0 = jsval_to_std_vector_vec3(cx, args.get(0)); + int arg1; + + bool ok = jsval_to_int(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3dShape_createMesh : Error processing arguments"); + + Physics3DShape* ret = Physics3DShape::createMesh(&arg0[0], arg1); + js_proxy_t* proxy = js_get_or_create_proxy(cx, ret); + jsval jsret = OBJECT_TO_JSVAL(proxy->obj); + + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3dShape_createMesh : wrong number of arguments"); + return false; +} + +jsval physics3d_collisionPoint_to_jsval(JSContext*cx, const Physics3DCollisionInfo::CollisionPoint& point) +{ + JS::RootedObject tmp(cx, JS_NewObject(cx, NULL, JS::NullPtr(), JS::NullPtr())); + + JS_DefineProperty(cx, tmp, "localPositionOnA", JS::RootedValue(cx, vector3_to_jsval(cx, point.localPositionOnA)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineProperty(cx, tmp, "localPositionOnB", JS::RootedValue(cx, vector3_to_jsval(cx, point.localPositionOnB)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineProperty(cx, tmp, "worldPositionOnA", JS::RootedValue(cx, vector3_to_jsval(cx, point.worldPositionOnA)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineProperty(cx, tmp, "worldPositionOnB", JS::RootedValue(cx, vector3_to_jsval(cx, point.worldPositionOnB)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineProperty(cx, tmp, "worldNormalOnB", JS::RootedValue(cx, vector3_to_jsval(cx, point.worldNormalOnB)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + + return OBJECT_TO_JSVAL(tmp); +} + +jsval physics3d_collisioninfo_to_jsval(JSContext* cx, const Physics3DCollisionInfo& ci) +{ + JS::RootedObject tmp(cx, JS_NewObject(cx, NULL, JS::NullPtr(), JS::NullPtr())); + + js_proxy_t* proxy = js_get_or_create_proxy(cx, ci.objA); + JS_DefineProperty(cx, tmp, "objA", JS::RootedValue(cx, OBJECT_TO_JSVAL(proxy->obj)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + + proxy = js_get_or_create_proxy(cx, ci.objB); + JS_DefineProperty(cx, tmp, "objB", JS::RootedValue(cx, OBJECT_TO_JSVAL(proxy->obj)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + + JS::RootedObject jsarr(cx, JS_NewArrayObject(cx, ci.collisionPointList.size())); + uint32_t i = 0; + for(auto iter = ci.collisionPointList.begin(); iter != ci.collisionPointList.end(); ++iter) + { + JS::RootedValue element(cx, physics3d_collisionPoint_to_jsval(cx, *iter)); + JS_SetElement(cx, jsarr, i++, element); + } + JS_DefineProperty(cx, tmp, "collisionPointList", JS::RootedValue(cx, OBJECT_TO_JSVAL(jsarr)), JSPROP_ENUMERATE | JSPROP_PERMANENT); + + return OBJECT_TO_JSVAL(tmp); +} + +bool jsb_cocos2d_Physics3DObject_setCollisionCallback(JSContext *cx, uint32_t argc, jsval *vp) +{ + if(argc == 2) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DObject* cobj = (cocos2d::Physics3DObject *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "jsb_cocos2d_Physics3DObject_setCollisionCallback : Invalid Native Object"); + + std::function arg0; + std::shared_ptr func(new JSFunctionWrapper(cx, args.get(1).toObjectOrNull(), args.get(0))); + auto lambda = [=](const Physics3DCollisionInfo &ci) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + + jsval jsci = physics3d_collisioninfo_to_jsval(cx, ci); + JS::RootedValue rval(cx); + bool ok = func->invoke(1, &jsci, &rval); + if (!ok && JS_IsExceptionPending(cx)) + { + JS_ReportPendingException(cx); + } + }; + arg0 = lambda; + cobj->setCollisionCallback(arg0); + + args.rval().setUndefined(); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3dShape_createMesh : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_physics3d_Physics3dShape_createHeightfield(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc == 8 || argc == 9) + { + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + int arg0; + int arg1; + std::vector arg2; + double arg3; + double arg4; + double arg5; + bool arg6; + bool arg7; + bool arg8; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + ok &= jsval_to_std_vector_float(cx, args.get(2), &arg2); + ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); + ok &= JS::ToNumber( cx, args.get(4), &arg4) && !isnan(arg4); + ok &= JS::ToNumber( cx, args.get(5), &arg5) && !isnan(arg5); + arg6 = JS::ToBoolean(args.get(6)); + arg7 = JS::ToBoolean(args.get(7)); + if(argc == 9) + arg8 = JS::ToBoolean(args.get(8)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_physics3d_Physics3DShape_createHeightfield : Error processing arguments"); + + cocos2d::Physics3DShape* ret = nullptr; + if(argc == 8) + ret = cocos2d::Physics3DShape::createHeightfield(arg0, arg1, &arg2[0], arg3, arg4, arg5, arg6, arg7); + else if(argc == 9) + ret = cocos2d::Physics3DShape::createHeightfield(arg0, arg1, &arg2[0], arg3, arg4, arg5, arg6, arg7, arg8); + + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, ret); + jsval jsret = OBJECT_TO_JSVAL(jsProxy->obj); + + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DShape_createHeightfield : wrong number of arguments"); + return false; +} + +void register_all_cocos2dx_physics3d_manual(JSContext *cx, JS::HandleObject global) +{ + JS::RootedObject ccObj(cx); + get_or_create_js_obj(cx, global, "cc", &ccObj); + + JS::RootedValue tmpVal(cx); + JS_GetProperty(cx, ccObj, "PhysicsSprite3D", &tmpVal); + JS::RootedObject tmpObj(cx, tmpVal.toObjectOrNull()); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_PhysicsSprite3D_create, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_GetProperty(cx, ccObj, "Physics3DRigidBody", &tmpVal); + tmpObj = tmpVal.toObjectOrNull(); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_physics3d_Physics3DRigidBody_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_GetProperty(cx, ccObj, "Physics3DShape", &tmpVal); + tmpObj = tmpVal.toObjectOrNull(); + JS_DefineFunction(cx, tmpObj, "createMesh", js_cocos2dx_physics3d_Physics3dShape_createMesh, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, tmpObj, "createHeightfield", js_cocos2dx_physics3d_Physics3dShape_createHeightfield, 8, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, JS::RootedObject(cx, jsb_cocos2d_Physics3DObject_prototype), "setCollisionCallback", jsb_cocos2d_Physics3DObject_setCollisionCallback, 2, JSPROP_READONLY | JSPROP_PERMANENT); +} + +#endif //CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION diff --git a/cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.h b/cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.h new file mode 100644 index 0000000000..da5ae10550 --- /dev/null +++ b/cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.h @@ -0,0 +1,38 @@ +/**************************************************************************** + Copyright (c) 2008-2010 Ricardo Quesada + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + 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 __jsb_cococs2dx_physics3d_manual_h__ +#define __jsb_cococs2dx_physics3d_manual_h__ + +#include "base/ccConfig.h" +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + +#include "jsapi.h" + +void register_all_cocos2dx_physics3d_manual(JSContext *cx, JS::HandleObject global); + +#endif + +#endif //__jsb_cococs2dx_physics3d_manual_h__ diff --git a/cocos/scripting/js-bindings/proj.android/Android.mk b/cocos/scripting/js-bindings/proj.android/Android.mk index 1246b0259f..50b841d8c3 100755 --- a/cocos/scripting/js-bindings/proj.android/Android.mk +++ b/cocos/scripting/js-bindings/proj.android/Android.mk @@ -38,12 +38,14 @@ LOCAL_MODULE_FILENAME := libjscocos2d LOCAL_SRC_FILES := ../auto/jsb_cocos2dx_3d_auto.cpp \ ../auto/jsb_cocos2dx_extension_auto.cpp \ ../auto/jsb_cocos2dx_3d_extension_auto.cpp \ + ../auto/jsb_cocos2dx_experimental_webView_auto.cpp \ ../auto/jsb_cocos2dx_spine_auto.cpp \ ../auto/jsb_cocos2dx_auto.cpp \ ../auto/jsb_cocos2dx_studio_auto.cpp \ ../auto/jsb_cocos2dx_builder_auto.cpp \ ../auto/jsb_cocos2dx_ui_auto.cpp \ ../auto/jsb_cocos2dx_experimental.cpp \ + ../auto/jsb_cocos2dx_physics3d_auto.cpp \ ../manual/ScriptingCore.cpp \ \ ../manual/cocos2d_specifics.cpp \ ../manual/js_manual_conversions.cpp \ @@ -54,6 +56,7 @@ LOCAL_SRC_FILES := ../auto/jsb_cocos2dx_3d_auto.cpp \ ../manual/jsb_opengl_registration.cpp \ ../manual/jsb_event_dispatcher_manual.cpp \ ../manual/3d/jsb_cocos2dx_3d_manual.cpp \ + ../manual/experimental/jsb_cocos2dx_experimental_webView_manual.cpp \ ../manual/chipmunk/js_bindings_chipmunk_auto_classes.cpp \ ../manual/chipmunk/js_bindings_chipmunk_functions.cpp \ ../manual/chipmunk/js_bindings_chipmunk_manual.cpp \ @@ -69,8 +72,9 @@ LOCAL_SRC_FILES := ../auto/jsb_cocos2dx_3d_auto.cpp \ ../manual/network/XMLHTTPRequest.cpp \ ../manual/spine/jsb_cocos2dx_spine_manual.cpp \ ../manual/ui/jsb_cocos2dx_ui_manual.cpp \ - ../manual/experimental/jsb_cocos2dx_experimental_manual.cpp - + ../manual/experimental/jsb_cocos2dx_experimental_manual.cpp \ + ../manual/physics3d/jsb_cocos2dx_physics3d_manual.cpp + LOCAL_CFLAGS := -DCOCOS2D_JAVASCRIPT @@ -81,6 +85,8 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../manual \ $(LOCAL_PATH)/../manual/spine \ $(LOCAL_PATH)/../auto \ $(LOCAL_PATH)/../../../2d \ + $(LOCAL_PATH)/../../../3d \ + $(LOCAL_PATH)/../../../physics3d \ $(LOCAL_PATH)/../../../base \ $(LOCAL_PATH)/../../../ui \ $(LOCAL_PATH)/../../../audio/include \ @@ -93,7 +99,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../manual \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../manual \ $(LOCAL_PATH)/../auto \ - $(LOCAL_PATH)/../../../audio/include + $(LOCAL_PATH)/../../../audio/include LOCAL_WHOLE_STATIC_LIBRARIES := cocos2d_js_android_static diff --git a/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/project.pbxproj b/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/project.pbxproj index 5286614ffe..05849ea451 100644 --- a/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/project.pbxproj +++ b/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/project.pbxproj @@ -146,6 +146,14 @@ 420BBCF81AA48EE900493976 /* jsb_cocos2dx_3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 420BBCF51AA48EE900493976 /* jsb_cocos2dx_3d_manual.cpp */; }; 420BBCF91AA48EE900493976 /* jsb_cocos2dx_3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 420BBCF61AA48EE900493976 /* jsb_cocos2dx_3d_manual.h */; }; 420BBCFA1AA48EE900493976 /* jsb_cocos2dx_3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 420BBCF61AA48EE900493976 /* jsb_cocos2dx_3d_manual.h */; }; + 42638FFD1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42638FFB1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp */; }; + 42638FFE1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42638FFB1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp */; }; + 42638FFF1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 42638FFC1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp */; }; + 426390001B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 42638FFC1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp */; }; + 426390041B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 426390021B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp */; }; + 426390051B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 426390021B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp */; }; + 426390061B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 426390031B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h */; }; + 426390071B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 426390031B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h */; }; 42AD256C1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42AD256A1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp */; }; 42AD256D1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42AD256A1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp */; }; 42AD256E1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 42AD256B1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp */; }; @@ -154,6 +162,12 @@ 42AD25741AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42AD25711AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp */; }; 42AD25751AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 42AD25721AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h */; }; 42AD25761AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 42AD25721AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h */; }; + 4B22F4AA1B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B22F4A71B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.cpp */; }; + 4B22F4AB1B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B22F4A81B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h */; }; + 4B22F4AC1B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B22F4A81B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h */; }; + 4BE089E41ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BE089E01ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.cpp */; }; + 4BE089E51ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 4BE089E11ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.hpp */; }; + 4BE089EC1ADF967400D65D4B /* jsb_cocos2dx_experimental_webView_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BE089EA1ADF967400D65D4B /* jsb_cocos2dx_experimental_webView_manual.h */; }; 83A5661918DA878400FC31A0 /* jsb_socketio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83A5661718DA878400FC31A0 /* jsb_socketio.cpp */; }; 83A5661A18DA878400FC31A0 /* jsb_socketio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83A5661718DA878400FC31A0 /* jsb_socketio.cpp */; }; 83A5661B18DA878400FC31A0 /* jsb_socketio.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A5661818DA878400FC31A0 /* jsb_socketio.h */; }; @@ -263,10 +277,19 @@ 420BBCEF1AA48EDE00493976 /* jsb_cocos2dx_3d_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_3d_auto.hpp; sourceTree = ""; }; 420BBCF51AA48EE900493976 /* jsb_cocos2dx_3d_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_3d_manual.cpp; sourceTree = ""; }; 420BBCF61AA48EE900493976 /* jsb_cocos2dx_3d_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsb_cocos2dx_3d_manual.h; sourceTree = ""; }; + 42638FFB1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_physics3d_auto.cpp; sourceTree = ""; }; + 42638FFC1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_physics3d_auto.hpp; sourceTree = ""; }; + 426390021B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_physics3d_manual.cpp; sourceTree = ""; }; + 426390031B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsb_cocos2dx_physics3d_manual.h; sourceTree = ""; }; 42AD256A1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_experimental.cpp; sourceTree = ""; }; 42AD256B1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_experimental.hpp; sourceTree = ""; }; 42AD25711AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jsb_cocos2dx_experimental_manual.cpp; path = experimental/jsb_cocos2dx_experimental_manual.cpp; sourceTree = ""; }; 42AD25721AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jsb_cocos2dx_experimental_manual.h; path = experimental/jsb_cocos2dx_experimental_manual.h; sourceTree = ""; }; + 4B22F4A71B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jsb_cocos2dx_experimental_webView_manual.cpp; path = experimental/jsb_cocos2dx_experimental_webView_manual.cpp; sourceTree = ""; }; + 4B22F4A81B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jsb_cocos2dx_experimental_webView_manual.h; path = experimental/jsb_cocos2dx_experimental_webView_manual.h; sourceTree = ""; }; + 4BE089E01ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_experimental_webView_auto.cpp; sourceTree = ""; }; + 4BE089E11ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_experimental_webView_auto.hpp; sourceTree = ""; }; + 4BE089EA1ADF967400D65D4B /* jsb_cocos2dx_experimental_webView_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsb_cocos2dx_experimental_webView_manual.h; sourceTree = ""; }; 83A5661718DA878400FC31A0 /* jsb_socketio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_socketio.cpp; sourceTree = ""; }; 83A5661818DA878400FC31A0 /* jsb_socketio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsb_socketio.h; sourceTree = ""; }; BA4095C01A6F730A005E53F6 /* jsb_cocos2dx_studio_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_studio_conversions.cpp; sourceTree = ""; }; @@ -334,6 +357,10 @@ 1A119E2E18BDF19200352BAA /* auto */ = { isa = PBXGroup; children = ( + 4BE089E01ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.cpp */, + 4BE089E11ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.hpp */, + 42638FFB1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp */, + 42638FFC1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp */, 42AD256A1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp */, 42AD256B1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp */, 420BBCEE1AA48EDE00493976 /* jsb_cocos2dx_3d_auto.cpp */, @@ -362,6 +389,7 @@ 1A119E4118BDF19200352BAA /* manual */ = { isa = PBXGroup; children = ( + 426390011B0EC1C6004C53A2 /* physics3d */, 42AD25701AFF9DFC000176E2 /* experimental */, 420BBCF41AA48EE900493976 /* 3d */, 0541A74C1973876100E45470 /* ios */, @@ -538,9 +566,20 @@ path = 3d; sourceTree = ""; }; + 426390011B0EC1C6004C53A2 /* physics3d */ = { + isa = PBXGroup; + children = ( + 426390021B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp */, + 426390031B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h */, + ); + path = physics3d; + sourceTree = ""; + }; 42AD25701AFF9DFC000176E2 /* experimental */ = { isa = PBXGroup; children = ( + 4B22F4A71B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.cpp */, + 4B22F4A81B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h */, 42AD25711AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.cpp */, 42AD25721AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h */, ); @@ -581,6 +620,7 @@ 1A1D3B7A18C44FD000922D3C /* jsb_event_dispatcher_manual.h in Headers */, 1A119EF518BDF19200352BAA /* js_bindings_system_registration.h in Headers */, 1A119EBF18BDF19200352BAA /* cocosbuilder_specifics.hpp in Headers */, + 4B22F4AB1B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h in Headers */, 1A119ED118BDF19200352BAA /* js_bindings_config.h in Headers */, 1A119EB518BDF19200352BAA /* js_bindings_chipmunk_manual.h in Headers */, 1A119EF918BDF19200352BAA /* jsb_websocket.h in Headers */, @@ -603,7 +643,9 @@ 1AB5E63518D05BF30088DAA4 /* jsb_cocos2dx_ui_manual.h in Headers */, 1A119EE318BDF19200352BAA /* jsb_opengl_functions.h in Headers */, 42AD256E1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.hpp in Headers */, + 42638FFF1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp in Headers */, 0541A74F1973876100E45470 /* JavaScriptObjCBridge.h in Headers */, + 426390061B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h in Headers */, 1AB5E62D18D05BC80088DAA4 /* jsb_cocos2dx_ui_auto.hpp in Headers */, 420BBCF91AA48EE900493976 /* jsb_cocos2dx_3d_manual.h in Headers */, 1A119ED918BDF19200352BAA /* js_bindings_opengl.h in Headers */, @@ -626,6 +668,7 @@ files = ( 1A119EA418BDF19200352BAA /* jsb_cocos2dx_studio_auto.hpp in Headers */, 1A119F0218BDF19200352BAA /* ScriptingCore.h in Headers */, + 426390071B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.h in Headers */, 1A119EBE18BDF19200352BAA /* cocos2d_specifics.hpp in Headers */, 83A5661C18DA878400FC31A0 /* jsb_socketio.h in Headers */, 1A1D3B7B18C44FD000922D3C /* jsb_event_dispatcher_manual.h in Headers */, @@ -638,7 +681,9 @@ 1A119EFA18BDF19200352BAA /* jsb_websocket.h in Headers */, 1A119E9218BDF19200352BAA /* jsb_cocos2dx_extension_auto.hpp in Headers */, 42AD25761AFF9E17000176E2 /* jsb_cocos2dx_experimental_manual.h in Headers */, + 4B22F4AC1B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.h in Headers */, 1A119E8C18BDF19200352BAA /* jsb_cocos2dx_builder_auto.hpp in Headers */, + 4BE089E51ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.hpp in Headers */, BA623E19191A196F00761F37 /* jsb_cocos2dx_pluginx_auto.hpp in Headers */, 1A119EAA18BDF19200352BAA /* js_bindings_chipmunk_auto_classes.h in Headers */, 1A119E9E18BDF19200352BAA /* jsb_cocos2dx_spine_auto.hpp in Headers */, @@ -660,12 +705,14 @@ 1AB5E62E18D05BC80088DAA4 /* jsb_cocos2dx_ui_auto.hpp in Headers */, 1A119EDA18BDF19200352BAA /* js_bindings_opengl.h in Headers */, 1A119EC818BDF19200352BAA /* jsb_cocos2dx_studio_manual.h in Headers */, + 426390001B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.hpp in Headers */, 420BBCFA1AA48EE900493976 /* jsb_cocos2dx_3d_manual.h in Headers */, BA623E0C191A195F00761F37 /* jsb_pluginx_extension_registration.h in Headers */, 1A119EAC18BDF19200352BAA /* js_bindings_chipmunk_auto_classes_registration.h in Headers */, 420BBCF31AA48EDE00493976 /* jsb_cocos2dx_3d_auto.hpp in Headers */, 1A119EBA18BDF19200352BAA /* js_bindings_chipmunk_registration.h in Headers */, 1A119EB018BDF19200352BAA /* js_bindings_chipmunk_functions.h in Headers */, + 4BE089EC1ADF967400D65D4B /* jsb_cocos2dx_experimental_webView_manual.h in Headers */, BA623E0E191A195F00761F37 /* jsb_pluginx_manual_callback.h in Headers */, 1A119EB218BDF19200352BAA /* js_bindings_chipmunk_functions_registration.h in Headers */, 1A119EF218BDF19200352BAA /* js_bindings_system_functions_registration.h in Headers */, @@ -749,6 +796,7 @@ 1A119E8918BDF19200352BAA /* jsb_cocos2dx_builder_auto.cpp in Sources */, 1A119EAD18BDF19200352BAA /* js_bindings_chipmunk_functions.cpp in Sources */, 1A119EED18BDF19200352BAA /* js_bindings_system_functions.cpp in Sources */, + 426390041B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp in Sources */, 0541A7501973876100E45470 /* JavaScriptObjCBridge.mm in Sources */, 1A119EB318BDF19200352BAA /* js_bindings_chipmunk_manual.cpp in Sources */, 1A119EE918BDF19200352BAA /* jsb_opengl_registration.cpp in Sources */, @@ -779,6 +827,7 @@ 420BBCF01AA48EDE00493976 /* jsb_cocos2dx_3d_auto.cpp in Sources */, 83A5661918DA878400FC31A0 /* jsb_socketio.cpp in Sources */, 1A119EE118BDF19200352BAA /* jsb_opengl_functions.cpp in Sources */, + 42638FFD1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp in Sources */, 1A119EA718BDF19200352BAA /* js_bindings_chipmunk_auto_classes.cpp in Sources */, 1A119EFF18BDF19200352BAA /* ScriptingCore.cpp in Sources */, 1A1D3B7818C44FD000922D3C /* jsb_event_dispatcher_manual.cpp in Sources */, @@ -806,9 +855,12 @@ 1A119ED818BDF19200352BAA /* js_bindings_opengl.cpp in Sources */, 1AB5E62C18D05BC80088DAA4 /* jsb_cocos2dx_ui_auto.cpp in Sources */, 1A119E9C18BDF19200352BAA /* jsb_cocos2dx_spine_auto.cpp in Sources */, + 4BE089E41ADF965E00D65D4B /* jsb_cocos2dx_experimental_webView_auto.cpp in Sources */, 1A119EF418BDF19200352BAA /* js_bindings_system_registration.cpp in Sources */, 42AD256D1AFF9D1A000176E2 /* jsb_cocos2dx_experimental.cpp in Sources */, 1A119EBC18BDF19200352BAA /* cocos2d_specifics.cpp in Sources */, + 426390051B0EC1C6004C53A2 /* jsb_cocos2dx_physics3d_manual.cpp in Sources */, + 42638FFE1B0EC1B7004C53A2 /* jsb_cocos2dx_physics3d_auto.cpp in Sources */, 1A119EE618BDF19200352BAA /* jsb_opengl_manual.cpp in Sources */, 1A119F0618BDF19200352BAA /* jsb_cocos2dx_spine_manual.cpp in Sources */, BA623E0F191A195F00761F37 /* jsb_pluginx_manual_protocols.cpp in Sources */, @@ -819,6 +871,7 @@ 1A119E8418BDF19200352BAA /* jsb_cocos2dx_auto.cpp in Sources */, 1AB5E63418D05BF30088DAA4 /* jsb_cocos2dx_ui_manual.cpp in Sources */, 1A119ECA18BDF19200352BAA /* jsb_cocos2dx_extension_manual.cpp in Sources */, + 4B22F4AA1B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.cpp in Sources */, 1A119EA218BDF19200352BAA /* jsb_cocos2dx_studio_auto.cpp in Sources */, 1A119EDC18BDF19200352BAA /* js_manual_conversions.cpp in Sources */, 83A5661A18DA878400FC31A0 /* jsb_socketio.cpp in Sources */, @@ -873,7 +926,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../../../cocos $(SRCROOT)/../../../../cocos/base $(SRCROOT)/../../../../cocos/2d $(SRCROOT)/../../../../cocos/physics $(SRCROOT)/../../../../cocos/math/kazmath $(SRCROOT)/../../../../cocos/platform $(SRCROOT)/../../../../cocos/audio/include $(SRCROOT)/../../../../cocos/editor-support $(SRCROOT)/../../../../cocos/editor-support/cocosbuilder $(SRCROOT)/../../../../cocos/editor-support/cocostudio $(SRCROOT)/../../../../cocos/editor-support/spine $(SRCROOT)/../../../../cocos/ui $(SRCROOT)/../../../../cocos/storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external $(SRCROOT)/../auto $(SRCROOT)/../manual"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../../../cocos $(SRCROOT)/../../../../cocos/base $(SRCROOT)/../../../../cocos/3d $(SRCROOT)/../../../../cocos/2d $(SRCROOT)/../../../../cocos/physics3d $(SRCROOT)/../../../../cocos/platform $(SRCROOT)/../../../../cocos/audio/include $(SRCROOT)/../../../../cocos/editor-support $(SRCROOT)/../../../../cocos/editor-support/cocosbuilder $(SRCROOT)/../../../../cocos/editor-support/cocostudio $(SRCROOT)/../../../../cocos/editor-support/spine $(SRCROOT)/../../../../cocos/ui $(SRCROOT)/../../../../cocos/storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external $(SRCROOT)/../auto $(SRCROOT)/../manual"; }; name = Debug; }; @@ -907,7 +960,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../../../cocos $(SRCROOT)/../../../../cocos/base $(SRCROOT)/../../../../cocos/2d $(SRCROOT)/../../../../cocos/physics $(SRCROOT)/../../../../cocos/math/kazmath $(SRCROOT)/../../../../cocos/platform $(SRCROOT)/../../../../cocos/audio/include $(SRCROOT)/../../../../cocos/editor-support $(SRCROOT)/../../../../cocos/editor-support/cocosbuilder $(SRCROOT)/../../../../cocos/editor-support/cocostudio $(SRCROOT)/../../../../cocos/editor-support/spine $(SRCROOT)/../../../../cocos/ui $(SRCROOT)/../../../../cocos/storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external $(SRCROOT)/../auto $(SRCROOT)/../manual"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../../../cocos $(SRCROOT)/../../../../cocos/base $(SRCROOT)/../../../../cocos/3d $(SRCROOT)/../../../../cocos/2d $(SRCROOT)/../../../../cocos/physics3d $(SRCROOT)/../../../../cocos/platform $(SRCROOT)/../../../../cocos/audio/include $(SRCROOT)/../../../../cocos/editor-support $(SRCROOT)/../../../../cocos/editor-support/cocosbuilder $(SRCROOT)/../../../../cocos/editor-support/cocostudio $(SRCROOT)/../../../../cocos/editor-support/spine $(SRCROOT)/../../../../cocos/ui $(SRCROOT)/../../../../cocos/storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external $(SRCROOT)/../auto $(SRCROOT)/../manual"; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj index 8e09d72c6f..4eb40ed7af 100644 --- a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj +++ b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj @@ -17,6 +17,7 @@ + @@ -43,6 +44,7 @@ + @@ -54,6 +56,7 @@ + @@ -86,6 +89,7 @@ + @@ -151,7 +155,7 @@ Level3 Disabled WIN32;_WINDOWS;_DEBUG;_LIB;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - $(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot)external;$(ProjectDir)..\auto;$(ProjectDir)..\manual;$(ProjectDir)..\manual\cocostudio;$(ProjectDir)..\manual\spine;$(ProjectDir)..\..\..\..\external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot)external;$(ProjectDir)..\auto;$(ProjectDir)..\manual;$(ProjectDir)..\manual\cocostudio;$(ProjectDir)..\manual\spine;$(ProjectDir)..\..\..\..\external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4068;4101;4800;4251;4244;4099;4083;4700;%(DisableSpecificWarnings) true false @@ -177,7 +181,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\spidermonkey\prebuilt\win32\*.*" true true WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - $(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot)external;$(ProjectDir)..\auto;$(ProjectDir)..\manual;$(ProjectDir)..\manual\cocostudio;$(ProjectDir)..\manual\spine;$(ProjectDir)..\..\..\..\external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot)external;$(ProjectDir)..\auto;$(ProjectDir)..\manual;$(ProjectDir)..\manual\cocostudio;$(ProjectDir)..\manual\spine;$(ProjectDir)..\..\..\..\external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4068;4101;4800;4251;4244;4099;4083;4700;%(DisableSpecificWarnings) true None diff --git a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters index 45f154340e..c4e49936c6 100644 --- a/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters +++ b/cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters @@ -39,6 +39,9 @@ {9f37ec66-1e00-4015-baa6-dabdf755f0ff} + + {3aaaf02d-80d8-4339-b4cd-89d89ade5293} + @@ -146,6 +149,12 @@ manual\experimental + + auto + + + manual\physics3d + @@ -274,5 +283,11 @@ manual\experimental + + auto + + + manual\physics3d + \ No newline at end of file diff --git a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems index 62ccfa022d..409eb85c05 100644 --- a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems +++ b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems @@ -20,6 +20,7 @@ + @@ -52,6 +53,7 @@ + @@ -65,6 +67,7 @@ + @@ -91,6 +94,7 @@ + diff --git a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems.filters b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems.filters index e83c0ca52b..6824d69c63 100644 --- a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems.filters +++ b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Shared/libjscocos2d.Shared.vcxitems.filters @@ -128,6 +128,12 @@ manual\experimental + + auto + + + manual\physics3d + @@ -235,6 +241,12 @@ manual\experimental + + auto + + + manual\physics3d + @@ -276,6 +288,9 @@ {ddd3651e-c6e7-4dea-80c1-a0a3dc51a740} + + {511b128d-2604-48af-88e1-8cc0eba79e19} + diff --git a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Windows/libjscocos2d.Windows.vcxproj b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Windows/libjscocos2d.Windows.vcxproj index bd38032fea..f740fc7a57 100644 --- a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Windows/libjscocos2d.Windows.vcxproj +++ b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.Windows/libjscocos2d.Windows.vcxproj @@ -126,10 +126,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) true @@ -146,10 +146,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false OldStyle @@ -168,10 +168,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) true @@ -188,10 +188,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false OldStyle @@ -210,10 +210,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) true @@ -230,10 +230,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false OldStyle diff --git a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.WindowsPhone/libjscocos2d.WindowsPhone.vcxproj b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.WindowsPhone/libjscocos2d.WindowsPhone.vcxproj index 7db401debd..0d4d3dc118 100644 --- a/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.WindowsPhone/libjscocos2d.WindowsPhone.vcxproj +++ b/cocos/scripting/js-bindings/proj.win8.1-universal/libjscocos2d/libjscocos2d.WindowsPhone/libjscocos2d.WindowsPhone.vcxproj @@ -91,10 +91,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) true @@ -111,10 +111,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false OldStyle @@ -133,10 +133,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) true @@ -153,10 +153,10 @@ NotUsing true false - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;$(EngineRoot)external\spidermonkey\include\winrt_8.1;$(ProjectDir)..\..\..\auto;$(ProjectDir)..\..\..\manual;$(ProjectDir)..\..\..\manual\cocostudio;$(ProjectDir)..\..\..\manual\spine;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) 4800;4703;4101;4083;4700;4068;4996;%(DisableSpecificWarnings) Level3 - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false OldStyle diff --git a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_create_apis.js b/cocos/scripting/js-bindings/script/ccui/jsb_ccui_create_apis.js index f29af54e8d..495f8e67a5 100644 --- a/cocos/scripting/js-bindings/script/ccui/jsb_ccui_create_apis.js +++ b/cocos/scripting/js-bindings/script/ccui/jsb_ccui_create_apis.js @@ -136,6 +136,11 @@ ccui.RichElementCustomNode.prototype._ctor = function(tag, color, opacity, custo customNode !== undefined && this.init(tag, color, opacity, customNode); }; +ccui.WebView.prototype._ctor = function(url){ + this.init(); + url !== undefined && this.loadURL(url); +}; + cc.Scale9Sprite.prototype._ctor = function(file, rect, capInsets){ rect = rect || cc.rect(0, 0, 0, 0); capInsets = capInsets || cc.rect(0, 0, 0, 0); diff --git a/cocos/scripting/js-bindings/script/ccui/jsb_cocos2d_ui.js b/cocos/scripting/js-bindings/script/ccui/jsb_cocos2d_ui.js index 8a4d52fdd2..8cdedeb83f 100644 --- a/cocos/scripting/js-bindings/script/ccui/jsb_cocos2d_ui.js +++ b/cocos/scripting/js-bindings/script/ccui/jsb_cocos2d_ui.js @@ -373,6 +373,51 @@ ccui.Scale9Sprite.prototype.updateWithBatchNode = function (batchNode, originalR this.updateWithSprite(sprite, originalRect, rotated, cc.p(0, 0), cc.size(originalRect.width, originalRect.height), capInsets); }; +/** + * The WebView support list of events + * @type {{LOADING: string, LOADED: string, ERROR: string}} + */ +ccui.WebView.EventType = { + LOADING: "loading", + LOADED: "load", + ERROR: "error", + JS_EVALUATED: "js" +}; + +ccui.WebView.prototype._loadURL = ccui.WebView.prototype.loadURL; +ccui.WebView.prototype.loadURL = function (url) { + if (url.indexOf("http://") >= 0) + { + this._loadURL(url); + } + else + { + this.loadFile(url); + } +}; + +ccui.WebView.prototype.setEventListener = function(event, callback){ + switch(event) + { + case ccui.WebView.EventType.LOADING: + this.setOnShouldStartLoading(callback); + break; + case ccui.WebView.EventType.LOADED: + this.setOnDidFinishLoading(callback); + break; + case ccui.WebView.EventType.ERROR: + this.setOnDidFailLoading(callback); + break; + case ccui.WebView.EventType.JS_EVALUATED: + //this.setOnJSCallback(callback); + cc.log("unsupport web event:" + event); + break; + default: + cc.log("unsupport web event:" + event); + break; + } +}; + /* * UIWidget temporary solution to addChild * addNode and addChild function should be merged in ccui.Widget diff --git a/cocos/scripting/js-bindings/script/jsb.js b/cocos/scripting/js-bindings/script/jsb.js index 1ae745a3c5..e88f281201 100644 --- a/cocos/scripting/js-bindings/script/jsb.js +++ b/cocos/scripting/js-bindings/script/jsb.js @@ -135,5 +135,8 @@ if (jsb.Sprite3D){ } if (jsb.ParticleSystem3D) { - require('script/3d/jsb_cocos2d_3d_ext.js'); -} \ No newline at end of file + require('script/3d/jsb_cocos2d_3d_ext.js'); +} + +if(cc.Physics3DObject) + require("script/physics3d/jsb_physics3d.js"); diff --git a/cocos/scripting/js-bindings/script/jsb_cocos2d.js b/cocos/scripting/js-bindings/script/jsb_cocos2d.js index f3ede487b4..b7a92806f4 100644 --- a/cocos/scripting/js-bindings/script/jsb_cocos2d.js +++ b/cocos/scripting/js-bindings/script/jsb_cocos2d.js @@ -1094,7 +1094,7 @@ cc.Color = function (r, g, b, a) { this.r = r || 0; this.g = g || 0; this.b = b || 0; - this.a = a || 255; + this.a = (a === undefined) ? 255 : a; }; /** @@ -1124,8 +1124,8 @@ cc.color = function (r, g, b, a) { if (typeof r === "string") return cc.hexToColor(r); if (typeof r === "object") - return {r: r.r, g: r.g, b: r.b, a: r.a || 255}; - return {r: r, g: g, b: b, a: a || 255}; + return {r: r.r, g: r.g, b: r.b, a: (r.a === undefined) ? 255 : r.a}; + return {r: r, g: g, b: b, a: (a === undefined ? 255 : a)}; }; /** diff --git a/cocos/scripting/js-bindings/script/physics3d/jsb_physics3d.js b/cocos/scripting/js-bindings/script/physics3d/jsb_physics3d.js new file mode 100644 index 0000000000..932f74ea8c --- /dev/null +++ b/cocos/scripting/js-bindings/script/physics3d/jsb_physics3d.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2014 Chukong Technologies Inc. + * + * 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. + */ + +cc.Physics3DRigidBodyDes = function(){ + this.mass = 0; + this.localInertia = cc.math.vec3(0, 0, 0); + this.shape = null; + this.originalTransform = [1.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + 0.0, 0.0, 0.0, 1.0]; + this.disableSleep = false; +}; + +cc.physics3DRigidBodyDes = function(){ + return new cc.Physics3DRigidBodyDes(); +}; + +cc.Physics3DComponent.PhysicsSyncFlag = { + NONE : 0, + NODE_TO_PHYSICS : 1, //align node transform to the physics + PHYSICS_TO_NODE : 2, // align physics transform to the node + NODE_AND_NODE : 1 | 2, //pre simulation, align the physics object to the node and align the node transform according to physics object after simulation +}; diff --git a/cocos/scripting/lua-bindings/CMakeLists.txt b/cocos/scripting/lua-bindings/CMakeLists.txt index 0322dd47a8..00e298040d 100644 --- a/cocos/scripting/lua-bindings/CMakeLists.txt +++ b/cocos/scripting/lua-bindings/CMakeLists.txt @@ -18,6 +18,7 @@ include_directories( ${cocos_root}/cocos/editor-support ${cocos_root}/cocos/platform ${cocos_root}/cocos/audio/include + ${cocos_root}/cocos/physics3d manual manual/extension manual/cocostudio @@ -108,6 +109,7 @@ set(lua_bindings_manual_files manual/ui/lua_cocos2dx_ui_manual.cpp manual/video/lua_cocos2dx_experimental_video_manual.cpp manual/audioengine/lua_cocos2dx_audioengine_manual.cpp + manual/physics3d/lua_cocos2dx_physics3d_manual.cpp ) set(lua_bindings_auto_files @@ -125,6 +127,7 @@ set(lua_bindings_auto_files auto/lua_cocos2dx_csloader_auto.cpp auto/lua_cocos2dx_ui_auto.cpp auto/lua_cocos2dx_audioengine_auto.cpp + auto/lua_cocos2dx_physics3d_auto.cpp ) if(MACOSX) diff --git a/cocos/scripting/lua-bindings/auto/api/Bundle3D.lua b/cocos/scripting/lua-bindings/auto/api/Bundle3D.lua new file mode 100644 index 0000000000..70f96ee457 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Bundle3D.lua @@ -0,0 +1,83 @@ + +-------------------------------- +-- @module Bundle3D +-- @parent_module cc + +-------------------------------- +-- load a file. You must load a file first, then call loadMeshData, loadSkinData, and so on
+-- param path File to be loaded
+-- return result of load +-- @function [parent=#Bundle3D] load +-- @param self +-- @param #string path +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- load skin data from bundle
+-- param id The ID of the skin, load the first Skin in the bundle if it is empty +-- @function [parent=#Bundle3D] loadSkinData +-- @param self +-- @param #string id +-- @param #cc.SkinData skindata +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Bundle3D] clear +-- @param self +-- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D) + +-------------------------------- +-- +-- @function [parent=#Bundle3D] loadMaterials +-- @param self +-- @param #cc.MaterialDatas materialdatas +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Bundle3D] loadNodes +-- @param self +-- @param #cc.NodeDatas nodedatas +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- load material data from bundle
+-- param id The ID of the animation, load the first animation in the bundle if it is empty +-- @function [parent=#Bundle3D] loadAnimationData +-- @param self +-- @param #string id +-- @param #cc.Animation3DData animationdata +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- create a new bundle, destroy it when finish using it +-- @function [parent=#Bundle3D] createBundle +-- @param self +-- @return Bundle3D#Bundle3D ret (return value: cc.Bundle3D) + +-------------------------------- +-- +-- @function [parent=#Bundle3D] destroyBundle +-- @param self +-- @param #cc.Bundle3D bundle +-- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D) + +-------------------------------- +-- +-- @function [parent=#Bundle3D] loadObj +-- @param self +-- @param #cc.MeshDatas meshdatas +-- @param #cc.MaterialDatas materialdatas +-- @param #cc.NodeDatas nodedatas +-- @param #string fullPath +-- @param #char mtl_basepath +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Bundle3D] Bundle3D +-- @param self +-- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Button.lua b/cocos/scripting/lua-bindings/auto/api/Button.lua index 2ff96ab759..3b8ebc7ff3 100644 --- a/cocos/scripting/lua-bindings/auto/api/Button.lua +++ b/cocos/scripting/lua-bindings/auto/api/Button.lua @@ -142,6 +142,15 @@ -- @param self -- @return rect_table#rect_table ret (return value: rect_table) +-------------------------------- +-- @overload self, int, int +-- @overload self, int +-- @function [parent=#Button] setTitleAlignment +-- @param self +-- @param #int hAlignment +-- @param #int vAlignment +-- @return Button#Button self (return value: ccui.Button) + -------------------------------- -- Return the capInsets of pressed state scale9sprite.
-- return The pressed scale9 renderer capInsets. diff --git a/cocos/scripting/lua-bindings/auto/api/Camera.lua b/cocos/scripting/lua-bindings/auto/api/Camera.lua index 40e4fcd581..de5df3deaf 100644 --- a/cocos/scripting/lua-bindings/auto/api/Camera.lua +++ b/cocos/scripting/lua-bindings/auto/api/Camera.lua @@ -5,21 +5,26 @@ -- @parent_module cc -------------------------------- --- Set the scene,this method shall not be invoke manually --- @function [parent=#Camera] setScene +-- get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default +-- @function [parent=#Camera] getDepth -- @param self --- @param #cc.Scene scene --- @return Camera#Camera self (return value: cc.Camera) +-- @return int#int ret (return value: int) -------------------------------- --- --- @function [parent=#Camera] initPerspective +-- get view projection matrix +-- @function [parent=#Camera] getViewProjectionMatrix -- @param self --- @param #float fieldOfView --- @param #float aspectRatio --- @param #float nearPlane --- @param #float farPlane --- @return bool#bool ret (return value: bool) +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- Make Camera looks at target
+-- param target The target camera is point at
+-- param up The up vector, usually it's Y axis +-- @function [parent=#Camera] lookAt +-- @param self +-- @param #vec3_table target +-- @param #vec3_table up +-- @return Camera#Camera self (return value: cc.Camera) -------------------------------- -- Gets the camera's projection matrix.
@@ -29,17 +34,31 @@ -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- get view projection matrix --- @function [parent=#Camera] getViewProjectionMatrix +-- Get object depth towards camera +-- @function [parent=#Camera] getDepthInView -- @param self --- @return mat4_table#mat4_table ret (return value: mat4_table) +-- @param #mat4_table transform +-- @return float#float ret (return value: float) -------------------------------- --- Gets the camera's view matrix.
--- return The camera view matrix. --- @function [parent=#Camera] getViewMatrix +-- +-- @function [parent=#Camera] clearBackground -- @param self --- @return mat4_table#mat4_table ret (return value: mat4_table) +-- @param #float depth +-- @return Camera#Camera self (return value: cc.Camera) + +-------------------------------- +-- set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default +-- @function [parent=#Camera] setDepth +-- @param self +-- @param #int depth +-- @return Camera#Camera self (return value: cc.Camera) + +-------------------------------- +-- init camera +-- @function [parent=#Camera] initDefault +-- @param self +-- @return bool#bool ret (return value: bool) -------------------------------- -- get & set Camera flag @@ -54,19 +73,6 @@ -- @param self -- @return int#int ret (return value: int) --------------------------------- --- init camera --- @function [parent=#Camera] initDefault --- @param self --- @return bool#bool ret (return value: bool) - --------------------------------- --- --- @function [parent=#Camera] project --- @param self --- @param #vec3_table src --- @return vec2_table#vec2_table ret (return value: vec2_table) - -------------------------------- -- -- @function [parent=#Camera] initOrthographic @@ -77,23 +83,6 @@ -- @param #float farPlane -- @return bool#bool ret (return value: bool) --------------------------------- --- Get object depth towards camera --- @function [parent=#Camera] getDepthInView --- @param self --- @param #mat4_table transform --- @return float#float ret (return value: float) - --------------------------------- --- Make Camera looks at target
--- param target The target camera is point at
--- param up The up vector, usually it's Y axis --- @function [parent=#Camera] lookAt --- @param self --- @param #vec3_table target --- @param #vec3_table up --- @return Camera#Camera self (return value: cc.Camera) - -------------------------------- -- Is this aabb visible in frustum -- @function [parent=#Camera] isVisibleInFrustum @@ -101,20 +90,6 @@ -- @param #cc.AABB aabb -- @return bool#bool ret (return value: bool) --------------------------------- --- --- @function [parent=#Camera] setCameraFlag --- @param self --- @param #int flag --- @return Camera#Camera self (return value: cc.Camera) - --------------------------------- --- --- @function [parent=#Camera] clearBackground --- @param self --- @param #float depth --- @return Camera#Camera self (return value: cc.Camera) - -------------------------------- -- set additional matrix for the projection matrix, it multiplys mat to projection matrix when called, used by WP8 -- @function [parent=#Camera] setAdditionalProjection @@ -123,18 +98,62 @@ -- @return Camera#Camera self (return value: cc.Camera) -------------------------------- --- get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default --- @function [parent=#Camera] getDepth +-- Set the scene,this method shall not be invoke manually +-- @function [parent=#Camera] setScene -- @param self --- @return int#int ret (return value: int) +-- @param #cc.Scene scene +-- @return Camera#Camera self (return value: cc.Camera) -------------------------------- --- set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default --- @function [parent=#Camera] setDepth +-- +-- @function [parent=#Camera] projectGL -- @param self --- @param #int depth +-- @param #vec3_table src +-- @return vec2_table#vec2_table ret (return value: vec2_table) + +-------------------------------- +-- Gets the camera's view matrix.
+-- return The camera view matrix. +-- @function [parent=#Camera] getViewMatrix +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- Get the frustum's near plane. +-- @function [parent=#Camera] getNearPlane +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Camera] project +-- @param self +-- @param #vec3_table src +-- @return vec2_table#vec2_table ret (return value: vec2_table) + +-------------------------------- +-- +-- @function [parent=#Camera] setCameraFlag +-- @param self +-- @param #int flag -- @return Camera#Camera self (return value: cc.Camera) +-------------------------------- +-- Get the frustum's far plane. +-- @function [parent=#Camera] getFarPlane +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Camera] initPerspective +-- @param self +-- @param #float fieldOfView +-- @param #float aspectRatio +-- @param #float nearPlane +-- @param #float farPlane +-- @return bool#bool ret (return value: bool) + -------------------------------- -- create default camera, the camera type depends on Director::getProjection, the depth of the default camera is 0 -- @function [parent=#Camera] create diff --git a/cocos/scripting/lua-bindings/auto/api/Material.lua b/cocos/scripting/lua-bindings/auto/api/Material.lua new file mode 100644 index 0000000000..25682a18c7 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Material.lua @@ -0,0 +1,104 @@ + +-------------------------------- +-- @module Material +-- @extend RenderState +-- @parent_module cc + +-------------------------------- +-- returns a clone (deep-copy) of the material +-- @function [parent=#Material] clone +-- @param self +-- @return Material#Material ret (return value: cc.Material) + +-------------------------------- +-- Returns the number of Techniques in the Material. +-- @function [parent=#Material] getTechniqueCount +-- @param self +-- @return long#long ret (return value: long) + +-------------------------------- +-- / sets the material name +-- @function [parent=#Material] setName +-- @param self +-- @param #string name +-- @return Material#Material self (return value: cc.Material) + +-------------------------------- +-- Returns a Technique by index.
+-- returns `nullptr` if the index is invalid. +-- @function [parent=#Material] getTechniqueByIndex +-- @param self +-- @param #long index +-- @return Technique#Technique ret (return value: cc.Technique) + +-------------------------------- +-- / returns the material name +-- @function [parent=#Material] getName +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- Returns the list of Techniques +-- @function [parent=#Material] getTechniques +-- @param self +-- @return array_table#array_table ret (return value: array_table) + +-------------------------------- +-- Sets the current technique +-- @function [parent=#Material] setTechnique +-- @param self +-- @param #string techniqueName +-- @return Material#Material self (return value: cc.Material) + +-------------------------------- +-- Returns a Technique by its name.
+-- returns `nullptr` if the Technique can't be found. +-- @function [parent=#Material] getTechniqueByName +-- @param self +-- @param #string name +-- @return Technique#Technique ret (return value: cc.Technique) + +-------------------------------- +-- Adds a Technique into the Material +-- @function [parent=#Material] addTechnique +-- @param self +-- @param #cc.Technique technique +-- @return Material#Material self (return value: cc.Material) + +-------------------------------- +-- Returns the Technique used by the Material +-- @function [parent=#Material] getTechnique +-- @param self +-- @return Technique#Technique ret (return value: cc.Technique) + +-------------------------------- +-- Creates a Material using the data from the Properties object defined at the specified URL,
+-- where the URL is of the format ".#//.../"
+-- (and "#//.../" is optional).
+-- param url The URL pointing to the Properties object defining the material.
+-- return A new Material or NULL if there was an error. +-- @function [parent=#Material] createWithFilename +-- @param self +-- @param #string path +-- @return Material#Material ret (return value: cc.Material) + +-------------------------------- +-- Creates a Material with a GLProgramState.
+-- It will only contain one Technique and one Pass.
+-- Added in order to support legacy code. +-- @function [parent=#Material] createWithGLStateProgram +-- @param self +-- @param #cc.GLProgramState programState +-- @return Material#Material ret (return value: cc.Material) + +-------------------------------- +-- Creates a material from the specified properties object.
+-- param materialProperties The properties object defining the
+-- material (must have namespace equal to 'material').
+-- return A new Material. +-- @function [parent=#Material] createWithProperties +-- @param self +-- @param #cc.Properties materialProperties +-- @return Material#Material ret (return value: cc.Material) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua index 1488464d11..3552ff8ddc 100644 --- a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua @@ -22,9 +22,9 @@ -- param t Duration in seconds.
-- param radius The start radius.
-- param deltaRadius The delta radius.
--- param angleZ The start Angel in Z.
+-- param angleZ The start angle in Z.
-- param deltaAngleZ The delta angle in Z.
--- param angleX The start Angel in X.
+-- param angleX The start angle in X.
-- param deltaAngleX The delta angle in X.
-- return An OrbitCamera. -- @function [parent=#OrbitCamera] create diff --git a/cocos/scripting/lua-bindings/auto/api/Pass.lua b/cocos/scripting/lua-bindings/auto/api/Pass.lua new file mode 100644 index 0000000000..768270fa27 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Pass.lua @@ -0,0 +1,73 @@ + +-------------------------------- +-- @module Pass +-- @extend RenderState +-- @parent_module cc + +-------------------------------- +-- Unbinds the Pass.
+-- This method must be called AFTER calling the actuall draw call +-- @function [parent=#Pass] unbind +-- @param self +-- @return Pass#Pass self (return value: cc.Pass) + +-------------------------------- +-- @overload self, mat4_table, bool +-- @overload self, mat4_table +-- @function [parent=#Pass] bind +-- @param self +-- @param #mat4_table modelView +-- @param #bool bindAttributes +-- @return Pass#Pass self (return value: cc.Pass) + +-------------------------------- +-- Returns a clone (deep-copy) of this instance +-- @function [parent=#Pass] clone +-- @param self +-- @return Pass#Pass ret (return value: cc.Pass) + +-------------------------------- +-- Returns the GLProgramState +-- @function [parent=#Pass] getGLProgramState +-- @param self +-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) + +-------------------------------- +-- Returns the vertex attribute binding for this pass.
+-- return The vertex attribute binding for this pass. +-- @function [parent=#Pass] getVertexAttributeBinding +-- @param self +-- @return VertexAttribBinding#VertexAttribBinding ret (return value: cc.VertexAttribBinding) + +-------------------------------- +-- +-- @function [parent=#Pass] getHash +-- @param self +-- @return unsigned int#unsigned int ret (return value: unsigned int) + +-------------------------------- +-- Sets a vertex attribute binding for this pass.
+-- When a mesh binding is set, the VertexAttribBinding will be automatically
+-- bound when the bind() method is called for the pass.
+-- param binding The VertexAttribBinding to set (or NULL to remove an existing binding). +-- @function [parent=#Pass] setVertexAttribBinding +-- @param self +-- @param #cc.VertexAttribBinding binding +-- @return Pass#Pass self (return value: cc.Pass) + +-------------------------------- +-- +-- @function [parent=#Pass] create +-- @param self +-- @param #cc.Technique parent +-- @return Pass#Pass ret (return value: cc.Pass) + +-------------------------------- +-- Creates a Pass with a GLProgramState. +-- @function [parent=#Pass] createWithGLProgramState +-- @param self +-- @param #cc.Technique parent +-- @param #cc.GLProgramState programState +-- @return Pass#Pass ret (return value: cc.Pass) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3D6DofConstraint.lua b/cocos/scripting/lua-bindings/auto/api/Physics3D6DofConstraint.lua new file mode 100644 index 0000000000..b40a0306d3 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3D6DofConstraint.lua @@ -0,0 +1,98 @@ + +-------------------------------- +-- @module Physics3D6DofConstraint +-- @extend Physics3DConstraint +-- @parent_module cc + +-------------------------------- +-- set linear lower limit +-- @function [parent=#Physics3D6DofConstraint] setLinearLowerLimit +-- @param self +-- @param #vec3_table linearLower +-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint) + +-------------------------------- +-- get linear lower limit +-- @function [parent=#Physics3D6DofConstraint] getLinearLowerLimit +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- get angular upper limit +-- @function [parent=#Physics3D6DofConstraint] getAngularUpperLimit +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- access for UseFrameOffset +-- @function [parent=#Physics3D6DofConstraint] getUseFrameOffset +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- get linear upper limit +-- @function [parent=#Physics3D6DofConstraint] getLinearUpperLimit +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- set angular lower limit +-- @function [parent=#Physics3D6DofConstraint] setAngularLowerLimit +-- @param self +-- @param #vec3_table angularLower +-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint) + +-------------------------------- +-- is limited?
+-- param limitIndex first 3 are linear, next 3 are angular +-- @function [parent=#Physics3D6DofConstraint] isLimited +-- @param self +-- @param #int limitIndex +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- set use frame offset +-- @function [parent=#Physics3D6DofConstraint] setUseFrameOffset +-- @param self +-- @param #bool frameOffsetOnOff +-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint) + +-------------------------------- +-- set linear upper limit +-- @function [parent=#Physics3D6DofConstraint] setLinearUpperLimit +-- @param self +-- @param #vec3_table linearUpper +-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint) + +-------------------------------- +-- get angular lower limit +-- @function [parent=#Physics3D6DofConstraint] getAngularLowerLimit +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- set angular upper limit +-- @function [parent=#Physics3D6DofConstraint] setAngularUpperLimit +-- @param self +-- @param #vec3_table angularUpper +-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint) + +-------------------------------- +-- @overload self, cc.Physics3DRigidBody, mat4_table, bool +-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, mat4_table, mat4_table, bool +-- @function [parent=#Physics3D6DofConstraint] create +-- @param self +-- @param #cc.Physics3DRigidBody rbA +-- @param #cc.Physics3DRigidBody rbB +-- @param #mat4_table frameInA +-- @param #mat4_table frameInB +-- @param #bool useLinearReferenceFrameA +-- @return Physics3D6DofConstraint#Physics3D6DofConstraint ret (return value: cc.Physics3D6DofConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3D6DofConstraint] Physics3D6DofConstraint +-- @param self +-- @return Physics3D6DofConstraint#Physics3D6DofConstraint self (return value: cc.Physics3D6DofConstraint) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DComponent.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DComponent.lua new file mode 100644 index 0000000000..794d4e8d61 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DComponent.lua @@ -0,0 +1,83 @@ + +-------------------------------- +-- @module Physics3DComponent +-- @extend Component +-- @parent_module cc + +-------------------------------- +-- add this component to physics world, called by scene +-- @function [parent=#Physics3DComponent] addToPhysicsWorld +-- @param self +-- @param #cc.Physics3DWorld world +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- align node and physics according to physics object +-- @function [parent=#Physics3DComponent] syncToPhysics +-- @param self +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- align node and physics according to node +-- @function [parent=#Physics3DComponent] syncToNode +-- @param self +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- get physics object +-- @function [parent=#Physics3DComponent] getPhysics3DObject +-- @param self +-- @return Physics3DObject#Physics3DObject ret (return value: cc.Physics3DObject) + +-------------------------------- +-- set Physics object to the component +-- @function [parent=#Physics3DComponent] setPhysics3DObject +-- @param self +-- @param #cc.Physics3DObject physicsObj +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- synchronization between node and physics is time consuming, you can skip some synchronization using this function +-- @function [parent=#Physics3DComponent] setSyncFlag +-- @param self +-- @param #int syncFlag +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- get the component name, it is used to find whether it is Physics3DComponent +-- @function [parent=#Physics3DComponent] getPhysics3DComponentName +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- set it enable or not +-- @function [parent=#Physics3DComponent] setEnabled +-- @param self +-- @param #bool b +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- +-- @function [parent=#Physics3DComponent] init +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Physics3DComponent] onEnter +-- @param self +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- +-- @function [parent=#Physics3DComponent] onExit +-- @param self +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +-------------------------------- +-- +-- @function [parent=#Physics3DComponent] Physics3DComponent +-- @param self +-- @return Physics3DComponent#Physics3DComponent self (return value: cc.Physics3DComponent) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DConeTwistConstraint.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DConeTwistConstraint.lua new file mode 100644 index 0000000000..709581c5a2 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DConeTwistConstraint.lua @@ -0,0 +1,147 @@ + +-------------------------------- +-- @module Physics3DConeTwistConstraint +-- @extend Physics3DConstraint +-- @parent_module cc + +-------------------------------- +-- get B's frame +-- @function [parent=#Physics3DConeTwistConstraint] getBFrame +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- set fix thresh +-- @function [parent=#Physics3DConeTwistConstraint] setFixThresh +-- @param self +-- @param #float fixThresh +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- get B's frame offset +-- @function [parent=#Physics3DConeTwistConstraint] getFrameOffsetB +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- get A's frame offset +-- @function [parent=#Physics3DConeTwistConstraint] getFrameOffsetA +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- get fix thresh +-- @function [parent=#Physics3DConeTwistConstraint] getFixThresh +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get swing span2 +-- @function [parent=#Physics3DConeTwistConstraint] getSwingSpan2 +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get swing span1 +-- @function [parent=#Physics3DConeTwistConstraint] getSwingSpan1 +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- set max motor impulse +-- @function [parent=#Physics3DConeTwistConstraint] setMaxMotorImpulse +-- @param self +-- @param #float maxMotorImpulse +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- set A and B's frame +-- @function [parent=#Physics3DConeTwistConstraint] setFrames +-- @param self +-- @param #mat4_table frameA +-- @param #mat4_table frameB +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- get twist angle +-- @function [parent=#Physics3DConeTwistConstraint] getTwistAngle +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get point for angle +-- @function [parent=#Physics3DConeTwistConstraint] GetPointForAngle +-- @param self +-- @param #float fAngleInRadians +-- @param #float fLength +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- set max motor impulse normalize +-- @function [parent=#Physics3DConeTwistConstraint] setMaxMotorImpulseNormalized +-- @param self +-- @param #float maxMotorImpulse +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- get twist span +-- @function [parent=#Physics3DConeTwistConstraint] getTwistSpan +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- set damping +-- @function [parent=#Physics3DConeTwistConstraint] setDamping +-- @param self +-- @param #float damping +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- set limits
+-- param swingSpan1 swing span1
+-- param swingSpan2 swing span2
+-- param twistSpan twist span
+-- param softness 0->1, recommend ~0.8->1. Describes % of limits where movement is free. Beyond this softness %, the limit is gradually enforced until the "hard" (1.0) limit is reached.
+-- param biasFactor 0->1?, recommend 0.3 +/-0.3 or so. Strength with which constraint resists zeroth order (angular, not angular velocity) limit violation.
+-- param relaxationFactor 0->1, recommend to stay near 1. the lower the value, the less the constraint will fight velocities which violate the angular limits. +-- @function [parent=#Physics3DConeTwistConstraint] setLimit +-- @param self +-- @param #float swingSpan1 +-- @param #float swingSpan2 +-- @param #float twistSpan +-- @param #float softness +-- @param #float biasFactor +-- @param #float relaxationFactor +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- get A's frame +-- @function [parent=#Physics3DConeTwistConstraint] getAFrame +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- enable motor +-- @function [parent=#Physics3DConeTwistConstraint] enableMotor +-- @param self +-- @param #bool b +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, mat4_table, mat4_table +-- @overload self, cc.Physics3DRigidBody, mat4_table +-- @function [parent=#Physics3DConeTwistConstraint] create +-- @param self +-- @param #cc.Physics3DRigidBody rbA +-- @param #cc.Physics3DRigidBody rbB +-- @param #mat4_table frameA +-- @param #mat4_table frameB +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint ret (return value: cc.Physics3DConeTwistConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DConeTwistConstraint] Physics3DConeTwistConstraint +-- @param self +-- @return Physics3DConeTwistConstraint#Physics3DConeTwistConstraint self (return value: cc.Physics3DConeTwistConstraint) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DConstraint.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DConstraint.lua new file mode 100644 index 0000000000..3797d6d87d --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DConstraint.lua @@ -0,0 +1,83 @@ + +-------------------------------- +-- @module Physics3DConstraint +-- @extend Ref +-- @parent_module cc + +-------------------------------- +-- set enable or not +-- @function [parent=#Physics3DConstraint] setEnabled +-- @param self +-- @param #bool enabled +-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint) + +-------------------------------- +-- set the impulse that break the constraint +-- @function [parent=#Physics3DConstraint] setBreakingImpulse +-- @param self +-- @param #float impulse +-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint) + +-------------------------------- +-- get user data +-- @function [parent=#Physics3DConstraint] getUserData +-- @param self +-- @return void#void ret (return value: void) + +-------------------------------- +-- get the impulse that break the constraint +-- @function [parent=#Physics3DConstraint] getBreakingImpulse +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get rigid body a +-- @function [parent=#Physics3DConstraint] getBodyA +-- @param self +-- @return Physics3DRigidBody#Physics3DRigidBody ret (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- is it enabled +-- @function [parent=#Physics3DConstraint] isEnabled +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- get override number of solver iterations +-- @function [parent=#Physics3DConstraint] getOverrideNumSolverIterations +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- get rigid body b +-- @function [parent=#Physics3DConstraint] getBodyB +-- @param self +-- @return Physics3DRigidBody#Physics3DRigidBody ret (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- override the number of constraint solver iterations used to solve this constraint, -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations +-- @function [parent=#Physics3DConstraint] setOverrideNumSolverIterations +-- @param self +-- @param #int overideNumIterations +-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint) + +-------------------------------- +-- get constraint type +-- @function [parent=#Physics3DConstraint] getConstraintType +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- get user data +-- @function [parent=#Physics3DConstraint] setUserData +-- @param self +-- @param #void userData +-- @return Physics3DConstraint#Physics3DConstraint self (return value: cc.Physics3DConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DConstraint] getbtContraint +-- @param self +-- @return btTypedConstraint#btTypedConstraint ret (return value: btTypedConstraint) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DHingeConstraint.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DHingeConstraint.lua new file mode 100644 index 0000000000..cd359d00df --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DHingeConstraint.lua @@ -0,0 +1,167 @@ + +-------------------------------- +-- @module Physics3DHingeConstraint +-- @extend Physics3DConstraint +-- @parent_module cc + +-------------------------------- +-- @overload self, mat4_table, mat4_table +-- @overload self +-- @function [parent=#Physics3DHingeConstraint] getHingeAngle +-- @param self +-- @param #mat4_table transA +-- @param #mat4_table transB +-- @return float#float ret (return value: float) + +-------------------------------- +-- get motor target velosity +-- @function [parent=#Physics3DHingeConstraint] getMotorTargetVelosity +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get rigid body A's frame offset +-- @function [parent=#Physics3DHingeConstraint] getFrameOffsetA +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- get rigid body B's frame offset +-- @function [parent=#Physics3DHingeConstraint] getFrameOffsetB +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- set max motor impulse +-- @function [parent=#Physics3DHingeConstraint] setMaxMotorImpulse +-- @param self +-- @param #float maxMotorImpulse +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- enable angular motor +-- @function [parent=#Physics3DHingeConstraint] enableAngularMotor +-- @param self +-- @param #bool enableMotor +-- @param #float targetVelocity +-- @param #float maxMotorImpulse +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- get upper limit +-- @function [parent=#Physics3DHingeConstraint] getUpperLimit +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get max motor impulse +-- @function [parent=#Physics3DHingeConstraint] getMaxMotorImpulse +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get lower limit +-- @function [parent=#Physics3DHingeConstraint] getLowerLimit +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- set use frame offset +-- @function [parent=#Physics3DHingeConstraint] setUseFrameOffset +-- @param self +-- @param #bool frameOffsetOnOff +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- get enable angular motor +-- @function [parent=#Physics3DHingeConstraint] getEnableAngularMotor +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Physics3DHingeConstraint] enableMotor +-- @param self +-- @param #bool enableMotor +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- get B's frame +-- @function [parent=#Physics3DHingeConstraint] getBFrame +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- set frames for rigid body A and B +-- @function [parent=#Physics3DHingeConstraint] setFrames +-- @param self +-- @param #mat4_table frameA +-- @param #mat4_table frameB +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- access for UseFrameOffset +-- @function [parent=#Physics3DHingeConstraint] getUseFrameOffset +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- set angular only +-- @function [parent=#Physics3DHingeConstraint] setAngularOnly +-- @param self +-- @param #bool angularOnly +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- set limit +-- @function [parent=#Physics3DHingeConstraint] setLimit +-- @param self +-- @param #float low +-- @param #float high +-- @param #float _softness +-- @param #float _biasFactor +-- @param #float _relaxationFactor +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- get angular only +-- @function [parent=#Physics3DHingeConstraint] getAngularOnly +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- set axis +-- @function [parent=#Physics3DHingeConstraint] setAxis +-- @param self +-- @param #vec3_table axisInA +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- get A's frame +-- @function [parent=#Physics3DHingeConstraint] getAFrame +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- @overload self, cc.Physics3DRigidBody, vec3_table, vec3_table, bool +-- @overload self, cc.Physics3DRigidBody, mat4_table, bool +-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, vec3_table, vec3_table, vec3_table, vec3_table, bool +-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, mat4_table, mat4_table, bool +-- @function [parent=#Physics3DHingeConstraint] create +-- @param self +-- @param #cc.Physics3DRigidBody rbA +-- @param #cc.Physics3DRigidBody rbB +-- @param #vec3_table pivotInA +-- @param #vec3_table pivotInB +-- @param #vec3_table axisInA +-- @param #vec3_table axisInB +-- @param #bool useReferenceFrameA +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint ret (return value: cc.Physics3DHingeConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DHingeConstraint] Physics3DHingeConstraint +-- @param self +-- @return Physics3DHingeConstraint#Physics3DHingeConstraint self (return value: cc.Physics3DHingeConstraint) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DObject.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DObject.lua new file mode 100644 index 0000000000..3345873ca5 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DObject.lua @@ -0,0 +1,70 @@ + +-------------------------------- +-- @module Physics3DObject +-- @extend Ref +-- @parent_module cc + +-------------------------------- +-- Set the user data. +-- @function [parent=#Physics3DObject] setUserData +-- @param self +-- @param #void userData +-- @return Physics3DObject#Physics3DObject self (return value: cc.Physics3DObject) + +-------------------------------- +-- Get the user data. +-- @function [parent=#Physics3DObject] getUserData +-- @param self +-- @return void#void ret (return value: void) + +-------------------------------- +-- Get the Physics3DObject Type. +-- @function [parent=#Physics3DObject] getObjType +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- Internal method. Set the pointer of Physics3DWorld. +-- @function [parent=#Physics3DObject] setPhysicsWorld +-- @param self +-- @param #cc.Physics3DWorld world +-- @return Physics3DObject#Physics3DObject self (return value: cc.Physics3DObject) + +-------------------------------- +-- Get the world matrix of Physics3DObject. +-- @function [parent=#Physics3DObject] getWorldTransform +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- Get the pointer of Physics3DWorld. +-- @function [parent=#Physics3DObject] getPhysicsWorld +-- @param self +-- @return Physics3DWorld#Physics3DWorld ret (return value: cc.Physics3DWorld) + +-------------------------------- +-- Set the mask of Physics3DObject. +-- @function [parent=#Physics3DObject] setMask +-- @param self +-- @param #unsigned int mask +-- @return Physics3DObject#Physics3DObject self (return value: cc.Physics3DObject) + +-------------------------------- +-- Get the collision callback function. +-- @function [parent=#Physics3DObject] getCollisionCallback +-- @param self +-- @return function#function ret (return value: function) + +-------------------------------- +-- Get the mask of Physics3DObject. +-- @function [parent=#Physics3DObject] getMask +-- @param self +-- @return unsigned int#unsigned int ret (return value: unsigned int) + +-------------------------------- +-- Check has collision callback function. +-- @function [parent=#Physics3DObject] needCollisionCallback +-- @param self +-- @return bool#bool ret (return value: bool) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DPointToPointConstraint.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DPointToPointConstraint.lua new file mode 100644 index 0000000000..895175f6e6 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DPointToPointConstraint.lua @@ -0,0 +1,50 @@ + +-------------------------------- +-- @module Physics3DPointToPointConstraint +-- @extend Physics3DConstraint +-- @parent_module cc + +-------------------------------- +-- get pivot point in A's local space +-- @function [parent=#Physics3DPointToPointConstraint] getPivotPointInA +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- get pivot point in B's local space +-- @function [parent=#Physics3DPointToPointConstraint] getPivotPointInB +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- set pivot point in A's local space +-- @function [parent=#Physics3DPointToPointConstraint] setPivotPointInA +-- @param self +-- @param #vec3_table pivotA +-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint self (return value: cc.Physics3DPointToPointConstraint) + +-------------------------------- +-- set pivot point in B's local space +-- @function [parent=#Physics3DPointToPointConstraint] setPivotPointInB +-- @param self +-- @param #vec3_table pivotB +-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint self (return value: cc.Physics3DPointToPointConstraint) + +-------------------------------- +-- @overload self, cc.Physics3DRigidBody, cc.Physics3DRigidBody, vec3_table, vec3_table +-- @overload self, cc.Physics3DRigidBody, vec3_table +-- @function [parent=#Physics3DPointToPointConstraint] create +-- @param self +-- @param #cc.Physics3DRigidBody rbA +-- @param #cc.Physics3DRigidBody rbB +-- @param #vec3_table pivotPointInA +-- @param #vec3_table pivotPointInB +-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint ret (return value: cc.Physics3DPointToPointConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DPointToPointConstraint] Physics3DPointToPointConstraint +-- @param self +-- @return Physics3DPointToPointConstraint#Physics3DPointToPointConstraint self (return value: cc.Physics3DPointToPointConstraint) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DRigidBody.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DRigidBody.lua new file mode 100644 index 0000000000..6968c27bd5 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DRigidBody.lua @@ -0,0 +1,355 @@ + +-------------------------------- +-- @module Physics3DRigidBody +-- @extend Physics3DObject +-- @parent_module cc + +-------------------------------- +-- Set the acceleration. +-- @function [parent=#Physics3DRigidBody] setGravity +-- @param self +-- @param #vec3_table acceleration +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get friction. +-- @function [parent=#Physics3DRigidBody] getFriction +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- @overload self, float +-- @overload self, vec3_table +-- @function [parent=#Physics3DRigidBody] setAngularFactor +-- @param self +-- @param #vec3_table angFac +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- +-- @function [parent=#Physics3DRigidBody] addConstraint +-- @param self +-- @param #cc.Physics3DConstraint constraint +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get the pointer of btRigidBody. +-- @function [parent=#Physics3DRigidBody] getRigidBody +-- @param self +-- @return btRigidBody#btRigidBody ret (return value: btRigidBody) + +-------------------------------- +-- Get total force. +-- @function [parent=#Physics3DRigidBody] getTotalForce +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- Get the total number of constraints. +-- @function [parent=#Physics3DRigidBody] getConstraintCount +-- @param self +-- @return unsigned int#unsigned int ret (return value: unsigned int) + +-------------------------------- +-- Apply a central force.
+-- param force the value of the force +-- @function [parent=#Physics3DRigidBody] applyCentralForce +-- @param self +-- @param #vec3_table force +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set mass and inertia. +-- @function [parent=#Physics3DRigidBody] setMassProps +-- @param self +-- @param #float mass +-- @param #vec3_table inertia +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set friction. +-- @function [parent=#Physics3DRigidBody] setFriction +-- @param self +-- @param #float frict +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set kinematic object. +-- @function [parent=#Physics3DRigidBody] setKinematic +-- @param self +-- @param #bool kinematic +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set linear damping and angular damping. +-- @function [parent=#Physics3DRigidBody] setDamping +-- @param self +-- @param #float lin_damping +-- @param #float ang_damping +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Apply a impulse.
+-- param impulse the value of the impulse
+-- param rel_pos the position of the impulse +-- @function [parent=#Physics3DRigidBody] applyImpulse +-- @param self +-- @param #vec3_table impulse +-- @param #vec3_table rel_pos +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Check rigid body is kinematic object. +-- @function [parent=#Physics3DRigidBody] isKinematic +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Apply a torque.
+-- param torque the value of the torque +-- @function [parent=#Physics3DRigidBody] applyTorque +-- @param self +-- @param #vec3_table torque +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold +-- @function [parent=#Physics3DRigidBody] setCcdMotionThreshold +-- @param self +-- @param #float ccdMotionThreshold +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set rolling friction. +-- @function [parent=#Physics3DRigidBody] setRollingFriction +-- @param self +-- @param #float frict +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get motion threshold. +-- @function [parent=#Physics3DRigidBody] getCcdMotionThreshold +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Get the linear factor. +-- @function [parent=#Physics3DRigidBody] getLinearFactor +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- Damps the velocity, using the given linearDamping and angularDamping. +-- @function [parent=#Physics3DRigidBody] applyDamping +-- @param self +-- @param #float timeStep +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get the angular velocity. +-- @function [parent=#Physics3DRigidBody] getAngularVelocity +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- +-- @function [parent=#Physics3DRigidBody] init +-- @param self +-- @param #cc.Physics3DRigidBodyDes info +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Apply a torque impulse.
+-- param torque the value of the torque +-- @function [parent=#Physics3DRigidBody] applyTorqueImpulse +-- @param self +-- @param #vec3_table torque +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Active or inactive. +-- @function [parent=#Physics3DRigidBody] setActive +-- @param self +-- @param #bool active +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set the linear factor. +-- @function [parent=#Physics3DRigidBody] setLinearFactor +-- @param self +-- @param #vec3_table linearFactor +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set the linear velocity. +-- @function [parent=#Physics3DRigidBody] setLinearVelocity +-- @param self +-- @param #vec3_table lin_vel +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get the linear velocity. +-- @function [parent=#Physics3DRigidBody] getLinearVelocity +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- Set swept sphere radius. +-- @function [parent=#Physics3DRigidBody] setCcdSweptSphereRadius +-- @param self +-- @param #float radius +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Apply a force.
+-- param force the value of the force
+-- param rel_pos the position of the force +-- @function [parent=#Physics3DRigidBody] applyForce +-- @param self +-- @param #vec3_table force +-- @param #vec3_table rel_pos +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set the angular velocity. +-- @function [parent=#Physics3DRigidBody] setAngularVelocity +-- @param self +-- @param #vec3_table ang_vel +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Apply a central impulse.
+-- param impulse the value of the impulse +-- @function [parent=#Physics3DRigidBody] applyCentralImpulse +-- @param self +-- @param #vec3_table impulse +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get the acceleration. +-- @function [parent=#Physics3DRigidBody] getGravity +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- Get rolling friction. +-- @function [parent=#Physics3DRigidBody] getRollingFriction +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Set the center of mass. +-- @function [parent=#Physics3DRigidBody] setCenterOfMassTransform +-- @param self +-- @param #mat4_table xform +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set the inverse of local inertia. +-- @function [parent=#Physics3DRigidBody] setInvInertiaDiagLocal +-- @param self +-- @param #vec3_table diagInvInertia +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- @overload self, unsigned int +-- @overload self, cc.Physics3DConstraint +-- @function [parent=#Physics3DRigidBody] removeConstraint +-- @param self +-- @param #cc.Physics3DConstraint constraint +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get total torque. +-- @function [parent=#Physics3DRigidBody] getTotalTorque +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- Get inverse of mass. +-- @function [parent=#Physics3DRigidBody] getInvMass +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Get constraint by index. +-- @function [parent=#Physics3DRigidBody] getConstraint +-- @param self +-- @param #unsigned int idx +-- @return Physics3DConstraint#Physics3DConstraint ret (return value: cc.Physics3DConstraint) + +-------------------------------- +-- Get restitution. +-- @function [parent=#Physics3DRigidBody] getRestitution +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Get swept sphere radius. +-- @function [parent=#Physics3DRigidBody] getCcdSweptSphereRadius +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Get hit friction. +-- @function [parent=#Physics3DRigidBody] getHitFraction +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Get angular damping. +-- @function [parent=#Physics3DRigidBody] getAngularDamping +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Get the inverse of local inertia. +-- @function [parent=#Physics3DRigidBody] getInvInertiaDiagLocal +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- Get the center of mass. +-- @function [parent=#Physics3DRigidBody] getCenterOfMassTransform +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- Get the angular factor. +-- @function [parent=#Physics3DRigidBody] getAngularFactor +-- @param self +-- @return vec3_table#vec3_table ret (return value: vec3_table) + +-------------------------------- +-- Set restitution. +-- @function [parent=#Physics3DRigidBody] setRestitution +-- @param self +-- @param #float rest +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Set hit friction. +-- @function [parent=#Physics3DRigidBody] setHitFraction +-- @param self +-- @param #float hitFraction +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +-------------------------------- +-- Get linear damping. +-- @function [parent=#Physics3DRigidBody] getLinearDamping +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- override. +-- @function [parent=#Physics3DRigidBody] getWorldTransform +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- +-- @function [parent=#Physics3DRigidBody] Physics3DRigidBody +-- @param self +-- @return Physics3DRigidBody#Physics3DRigidBody self (return value: cc.Physics3DRigidBody) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DShape.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DShape.lua new file mode 100644 index 0000000000..bbe477df5f --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DShape.lua @@ -0,0 +1,65 @@ + +-------------------------------- +-- @module Physics3DShape +-- @extend Ref +-- @parent_module cc + +-------------------------------- +-- +-- @function [parent=#Physics3DShape] getbtShape +-- @param self +-- @return btCollisionShape#btCollisionShape ret (return value: btCollisionShape) + +-------------------------------- +-- get shape type +-- @function [parent=#Physics3DShape] getShapeType +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- create box shape
+-- param extent The extent of sphere. +-- @function [parent=#Physics3DShape] createBox +-- @param self +-- @param #vec3_table extent +-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape) + +-------------------------------- +-- create cylinder shape
+-- param radius The radius of cylinder.
+-- param height The height. +-- @function [parent=#Physics3DShape] createCylinder +-- @param self +-- @param #float radius +-- @param #float height +-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape) + +-------------------------------- +-- create convex hull
+-- param points The vertices of convex hull
+-- param numPoints The number of vertices. +-- @function [parent=#Physics3DShape] createConvexHull +-- @param self +-- @param #vec3_table points +-- @param #int numPoints +-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape) + +-------------------------------- +-- create capsule shape
+-- param radius The radius of casule.
+-- param height The height (cylinder part). +-- @function [parent=#Physics3DShape] createCapsule +-- @param self +-- @param #float radius +-- @param #float height +-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape) + +-------------------------------- +-- create sphere shape
+-- param radius The radius of sphere. +-- @function [parent=#Physics3DShape] createSphere +-- @param self +-- @param #float radius +-- @return Physics3DShape#Physics3DShape ret (return value: cc.Physics3DShape) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DSliderConstraint.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DSliderConstraint.lua new file mode 100644 index 0000000000..55e3a82d1a --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DSliderConstraint.lua @@ -0,0 +1,444 @@ + +-------------------------------- +-- @module Physics3DSliderConstraint +-- @extend Physics3DConstraint +-- @parent_module cc + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setPoweredAngMotor +-- @param self +-- @param #bool onOff +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getDampingLimAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setRestitutionOrthoLin +-- @param self +-- @param #float restitutionOrthoLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setRestitutionDirLin +-- @param self +-- @param #float restitutionDirLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getLinearPos +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get A's frame offset +-- @function [parent=#Physics3DSliderConstraint] getFrameOffsetA +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- get B's frame offset +-- @function [parent=#Physics3DSliderConstraint] getFrameOffsetB +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setPoweredLinMotor +-- @param self +-- @param #bool onOff +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getDampingDirAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getRestitutionLimLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getSoftnessOrthoAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setSoftnessOrthoLin +-- @param self +-- @param #float softnessOrthoLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setSoftnessLimLin +-- @param self +-- @param #float softnessLimLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getAngularPos +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setRestitutionLimAng +-- @param self +-- @param #float restitutionLimAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- set upper linear limit +-- @function [parent=#Physics3DSliderConstraint] setUpperLinLimit +-- @param self +-- @param #float upperLimit +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setDampingDirLin +-- @param self +-- @param #float dampingDirLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- get upper anglular limit +-- @function [parent=#Physics3DSliderConstraint] getUpperAngLimit +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getDampingDirLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getSoftnessDirAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getPoweredAngMotor +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- set lower angualr limit +-- @function [parent=#Physics3DSliderConstraint] setLowerAngLimit +-- @param self +-- @param #float lowerLimit +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- set upper anglular limit +-- @function [parent=#Physics3DSliderConstraint] setUpperAngLimit +-- @param self +-- @param #float upperLimit +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setTargetLinMotorVelocity +-- @param self +-- @param #float targetLinMotorVelocity +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setDampingLimAng +-- @param self +-- @param #float dampingLimAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getRestitutionLimAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- access for UseFrameOffset +-- @function [parent=#Physics3DSliderConstraint] getUseFrameOffset +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getSoftnessOrthoLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getDampingOrthoAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- set use frame offset +-- @function [parent=#Physics3DSliderConstraint] setUseFrameOffset +-- @param self +-- @param #bool frameOffsetOnOff +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- set lower linear limit +-- @function [parent=#Physics3DSliderConstraint] setLowerLinLimit +-- @param self +-- @param #float lowerLimit +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getRestitutionDirLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getTargetLinMotorVelocity +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get lower linear limit +-- @function [parent=#Physics3DSliderConstraint] getLowerLinLimit +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getSoftnessLimLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setDampingOrthoAng +-- @param self +-- @param #float dampingOrthoAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setSoftnessDirAng +-- @param self +-- @param #float softnessDirAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getPoweredLinMotor +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setRestitutionOrthoAng +-- @param self +-- @param #float restitutionOrthoAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setDampingDirAng +-- @param self +-- @param #float dampingDirAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- set frames for rigid body A and B +-- @function [parent=#Physics3DSliderConstraint] setFrames +-- @param self +-- @param #mat4_table frameA +-- @param #mat4_table frameB +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getRestitutionOrthoAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getMaxAngMotorForce +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getDampingOrthoLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get upper linear limit +-- @function [parent=#Physics3DSliderConstraint] getUpperLinLimit +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setMaxLinMotorForce +-- @param self +-- @param #float maxLinMotorForce +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getRestitutionOrthoLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setTargetAngMotorVelocity +-- @param self +-- @param #float targetAngMotorVelocity +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getSoftnessLimAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setRestitutionDirAng +-- @param self +-- @param #float restitutionDirAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getDampingLimLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- get lower angular limit +-- @function [parent=#Physics3DSliderConstraint] getLowerAngLimit +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getRestitutionDirAng +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getTargetAngMotorVelocity +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setRestitutionLimLin +-- @param self +-- @param #float restitutionLimLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getMaxLinMotorForce +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setDampingOrthoLin +-- @param self +-- @param #float dampingOrthoLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setSoftnessOrthoAng +-- @param self +-- @param #float softnessOrthoAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setDampingLimLin +-- @param self +-- @param #float dampingLimLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setSoftnessDirLin +-- @param self +-- @param #float softnessDirLin +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setMaxAngMotorForce +-- @param self +-- @param #float maxAngMotorForce +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] getSoftnessDirLin +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] setSoftnessLimAng +-- @param self +-- @param #float softnessLimAng +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- use A's frame as linear refference +-- @function [parent=#Physics3DSliderConstraint] getUseLinearReferenceFrameA +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- create slider constraint
+-- param rbA rigid body A
+-- param rbB rigid body B
+-- param frameInA frame in A's local space
+-- param frameInB frame in B's local space
+-- param useLinearReferenceFrameA use fixed frame A for linear limits +-- @function [parent=#Physics3DSliderConstraint] create +-- @param self +-- @param #cc.Physics3DRigidBody rbA +-- @param #cc.Physics3DRigidBody rbB +-- @param #mat4_table frameInA +-- @param #mat4_table frameInB +-- @param #bool useLinearReferenceFrameA +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint ret (return value: cc.Physics3DSliderConstraint) + +-------------------------------- +-- +-- @function [parent=#Physics3DSliderConstraint] Physics3DSliderConstraint +-- @param self +-- @return Physics3DSliderConstraint#Physics3DSliderConstraint self (return value: cc.Physics3DSliderConstraint) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua new file mode 100644 index 0000000000..67257504df --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua @@ -0,0 +1,93 @@ + +-------------------------------- +-- @module Physics3DWorld +-- @extend Ref +-- @parent_module cc + +-------------------------------- +-- Simulate one frame. +-- @function [parent=#Physics3DWorld] stepSimulate +-- @param self +-- @param #float dt +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- +-- @function [parent=#Physics3DWorld] needCollisionChecking +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- +-- @function [parent=#Physics3DWorld] collisionChecking +-- @param self +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Remove a Physics3DConstraint. +-- @function [parent=#Physics3DWorld] removePhysics3DConstraint +-- @param self +-- @param #cc.Physics3DConstraint constraint +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Check debug drawing is enabled. +-- @function [parent=#Physics3DWorld] isDebugDrawEnabled +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Remove all Physics3DConstraint. +-- @function [parent=#Physics3DWorld] removeAllPhysics3DConstraints +-- @param self +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Remove all Physics3DObjects. +-- @function [parent=#Physics3DWorld] removeAllPhysics3DObjects +-- @param self +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Add a Physics3DObject. +-- @function [parent=#Physics3DWorld] addPhysics3DObject +-- @param self +-- @param #cc.Physics3DObject physicsObj +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Enable or disable debug drawing. +-- @function [parent=#Physics3DWorld] setDebugDrawEnable +-- @param self +-- @param #bool enableDebugDraw +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Remove a Physics3DObject. +-- @function [parent=#Physics3DWorld] removePhysics3DObject +-- @param self +-- @param #cc.Physics3DObject physicsObj +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Add a Physics3DConstraint. +-- @function [parent=#Physics3DWorld] addPhysics3DConstraint +-- @param self +-- @param #cc.Physics3DConstraint constraint +-- @param #bool disableCollisionsBetweenLinkedObjs +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- Internal method, the updater of debug drawing, need called each frame. +-- @function [parent=#Physics3DWorld] debugDraw +-- @param self +-- @param #cc.Renderer renderer +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +-------------------------------- +-- +-- @function [parent=#Physics3DWorld] Physics3DWorld +-- @param self +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsSprite3D.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsSprite3D.lua new file mode 100644 index 0000000000..5352649b57 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsSprite3D.lua @@ -0,0 +1,38 @@ + +-------------------------------- +-- @module PhysicsSprite3D +-- @extend Sprite3D +-- @parent_module cc + +-------------------------------- +-- Physics synchronize rendering. +-- @function [parent=#PhysicsSprite3D] syncToPhysics +-- @param self +-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D) + +-------------------------------- +-- Rendering synchronize physics. +-- @function [parent=#PhysicsSprite3D] syncToNode +-- @param self +-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D) + +-------------------------------- +-- Get the Physics3DObject. +-- @function [parent=#PhysicsSprite3D] getPhysicsObj +-- @param self +-- @return Physics3DObject#Physics3DObject ret (return value: cc.Physics3DObject) + +-------------------------------- +-- Set synchronization flag, see Physics3DComponent. +-- @function [parent=#PhysicsSprite3D] setSyncFlag +-- @param self +-- @param #int syncFlag +-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D) + +-------------------------------- +-- +-- @function [parent=#PhysicsSprite3D] PhysicsSprite3D +-- @param self +-- @return PhysicsSprite3D#PhysicsSprite3D self (return value: cc.PhysicsSprite3D) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Properties.lua b/cocos/scripting/lua-bindings/auto/api/Properties.lua new file mode 100644 index 0000000000..1c6716b60d --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Properties.lua @@ -0,0 +1,307 @@ + +-------------------------------- +-- @module Properties +-- @parent_module cc + +-------------------------------- +-- Returns the value of a variable that is set in this Properties object.
+-- Variables take on the format ${name} and are inherited from parent Property objects.
+-- param name Name of the variable to get.
+-- param defaultValue Value to return if the variable is not found.
+-- return The value of the specified variable, or defaultValue if not found. +-- @function [parent=#Properties] getVariable +-- @param self +-- @param #char name +-- @param #char defaultValue +-- @return char#char ret (return value: char) + +-------------------------------- +-- Get the value of the given property as a string. This can always be retrieved,
+-- whatever the intended type of the property.
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- param defaultValue The default value to return if the specified property does not exist.
+-- return The value of the given property as a string, or the empty string if no property with that name exists. +-- @function [parent=#Properties] getString +-- @param self +-- @return char#char ret (return value: char) + +-------------------------------- +-- Interpret the value of the given property as a long integer.
+-- If the property does not exist, zero will be returned.
+-- If the property exists but could not be scanned, an error will be logged and zero will be returned.
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- return The value of the given property interpreted as a long.
+-- Zero if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getLong +-- @param self +-- @return long#long ret (return value: long) + +-------------------------------- +-- @overload self +-- @overload self, char, bool, bool +-- @function [parent=#Properties] getNamespace +-- @param self +-- @param #char id +-- @param #bool searchNames +-- @param #bool recurse +-- @return Properties#Properties ret (return value: cc.Properties) + +-------------------------------- +-- Gets the file path for the given property if the file exists.
+-- This method will first search for the file relative to the working directory.
+-- If the file is not found then it will search relative to the directory the bundle file is in.
+-- param name The name of the property.
+-- param path The string to copy the path to if the file exists.
+-- return True if the property exists and the file exists, false otherwise.
+-- script{ignore} +-- @function [parent=#Properties] getPath +-- @param self +-- @param #char name +-- @param #string path +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Interpret the value of the given property as a Matrix.
+-- If the property does not exist, out will be set to the identity matrix.
+-- If the property exists but could not be scanned, an error will be logged and out will be set
+-- to the identity matrix.
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- param out The matrix to set to this property's interpreted value.
+-- return True on success, false if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getMat4 +-- @param self +-- @param #char name +-- @param #mat4_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Check if a property with the given name is specified in this Properties object.
+-- param name The name of the property to query.
+-- return True if the property exists, false otherwise. +-- @function [parent=#Properties] exists +-- @param self +-- @param #char name +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Sets the value of the property with the specified name.
+-- If there is no property in this namespace with the current name,
+-- one is added. Otherwise, the value of the first property with the
+-- specified name is updated.
+-- If name is NULL, the value current property (see getNextProperty) is
+-- set, unless there is no current property, in which case false
+-- is returned.
+-- param name The name of the property to set.
+-- param value The property value.
+-- return True if the property was set, false otherwise. +-- @function [parent=#Properties] setString +-- @param self +-- @param #char name +-- @param #char value +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Get the ID of this Property's namespace. The ID should be a unique identifier,
+-- but its uniqueness is not enforced.
+-- return The ID of this Property's namespace. +-- @function [parent=#Properties] getId +-- @param self +-- @return char#char ret (return value: char) + +-------------------------------- +-- Rewind the getNextProperty() and getNextNamespace() iterators
+-- to the beginning of the file. +-- @function [parent=#Properties] rewind +-- @param self +-- @return Properties#Properties self (return value: cc.Properties) + +-------------------------------- +-- Sets the value of the specified variable.
+-- param name Name of the variable to set.
+-- param value The value to set. +-- @function [parent=#Properties] setVariable +-- @param self +-- @param #char name +-- @param #char value +-- @return Properties#Properties self (return value: cc.Properties) + +-------------------------------- +-- Interpret the value of the given property as a boolean.
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- param defaultValue the default value to return if the specified property does not exist within the properties file.
+-- return true if the property exists and its value is "true", otherwise false. +-- @function [parent=#Properties] getBool +-- @param self +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- @overload self, char, vec4_table +-- @overload self, char, vec3_table +-- @function [parent=#Properties] getColor +-- @param self +-- @param #char name +-- @param #vec3_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Returns the type of a property.
+-- param name The name of the property to interpret, or NULL to return the current property's type.
+-- return The type of the property. +-- @function [parent=#Properties] getType +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- Get the next namespace. +-- @function [parent=#Properties] getNextNamespace +-- @param self +-- @return Properties#Properties ret (return value: cc.Properties) + +-------------------------------- +-- Interpret the value of the given property as an integer.
+-- If the property does not exist, zero will be returned.
+-- If the property exists but could not be scanned, an error will be logged and zero will be returned.
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- return The value of the given property interpreted as an integer.
+-- Zero if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getInt +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- Interpret the value of the given property as a Vector3.
+-- If the property does not exist, out will be set to Vector3(0.0f, 0.0f, 0.0f).
+-- If the property exists but could not be scanned, an error will be logged and out will be set
+-- to Vector3(0.0f, 0.0f, 0.0f).
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- param out The vector to set to this property's interpreted value.
+-- return True on success, false if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getVec3 +-- @param self +-- @param #char name +-- @param #vec3_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Interpret the value of the given property as a Vector2.
+-- If the property does not exist, out will be set to Vector2(0.0f, 0.0f).
+-- If the property exists but could not be scanned, an error will be logged and out will be set
+-- to Vector2(0.0f, 0.0f).
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- param out The vector to set to this property's interpreted value.
+-- return True on success, false if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getVec2 +-- @param self +-- @param #char name +-- @param #vec2_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Interpret the value of the given property as a Vector4.
+-- If the property does not exist, out will be set to Vector4(0.0f, 0.0f, 0.0f, 0.0f).
+-- If the property exists but could not be scanned, an error will be logged and out will be set
+-- to Vector4(0.0f, 0.0f, 0.0f, 0.0f).
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- param out The vector to set to this property's interpreted value.
+-- return True on success, false if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getVec4 +-- @param self +-- @param #char name +-- @param #vec4_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Get the name of the next property.
+-- If a valid next property is returned, the value of the property can be
+-- retrieved using any of the get methods in this class, passing NULL for the property name.
+-- return The name of the next property, or NULL if there are no properties remaining. +-- @function [parent=#Properties] getNextProperty +-- @param self +-- @return char#char ret (return value: char) + +-------------------------------- +-- Interpret the value of the given property as a floating-point number.
+-- If the property does not exist, zero will be returned.
+-- If the property exists but could not be scanned, an error will be logged and zero will be returned.
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- return The value of the given property interpreted as a float.
+-- Zero if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getFloat +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Interpret the value of the given property as a Quaternion specified as an axis angle.
+-- If the property does not exist, out will be set to Quaternion().
+-- If the property exists but could not be scanned, an error will be logged and out will be set
+-- to Quaternion().
+-- param name The name of the property to interpret, or NULL to return the current property's value.
+-- param out The quaternion to set to this property's interpreted value.
+-- return True on success, false if the property does not exist or could not be scanned. +-- @function [parent=#Properties] getQuaternionFromAxisAngle +-- @param self +-- @param #char name +-- @param #cc.Quaternion out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- @overload self, char, vec4_table +-- @overload self, char, vec3_table +-- @function [parent=#Properties] parseColor +-- @param self +-- @param #char str +-- @param #vec3_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Attempts to parse the specified string as a Vector3 value.
+-- On error, false is returned and the output is set to all zero values.
+-- param str The string to parse.
+-- param out The value to populate if successful.
+-- return True if a valid Vector3 was parsed, false otherwise. +-- @function [parent=#Properties] parseVec3 +-- @param self +-- @param #char str +-- @param #vec3_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Attempts to parse the specified string as an axis-angle value.
+-- The specified string is expected to contain four comma-separated
+-- values, where the first three values represents the axis and the
+-- fourth value represents the angle, in degrees.
+-- On error, false is returned and the output is set to all zero values.
+-- param str The string to parse.
+-- param out A Quaternion populated with the orientation of the axis-angle, if successful.
+-- return True if a valid axis-angle was parsed, false otherwise. +-- @function [parent=#Properties] parseAxisAngle +-- @param self +-- @param #char str +-- @param #cc.Quaternion out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Attempts to parse the specified string as a Vector2 value.
+-- On error, false is returned and the output is set to all zero values.
+-- param str The string to parse.
+-- param out The value to populate if successful.
+-- return True if a valid Vector2 was parsed, false otherwise. +-- @function [parent=#Properties] parseVec2 +-- @param self +-- @param #char str +-- @param #vec2_table out +-- @return bool#bool ret (return value: bool) + +-------------------------------- +-- Attempts to parse the specified string as a Vector4 value.
+-- On error, false is returned and the output is set to all zero values.
+-- param str The string to parse.
+-- param out The value to populate if successful.
+-- return True if a valid Vector4 was parsed, false otherwise. +-- @function [parent=#Properties] parseVec4 +-- @param self +-- @param #char str +-- @param #vec4_table out +-- @return bool#bool ret (return value: bool) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RenderState.lua b/cocos/scripting/lua-bindings/auto/api/RenderState.lua new file mode 100644 index 0000000000..b10d6e2c7e --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/RenderState.lua @@ -0,0 +1,61 @@ + +-------------------------------- +-- @module RenderState +-- @extend Ref +-- @parent_module cc + +-------------------------------- +-- Replaces the texture that is at the front of _textures array.
+-- Added to be backwards compatible. +-- @function [parent=#RenderState] setTexture +-- @param self +-- @param #cc.Texture2D texture +-- @return RenderState#RenderState self (return value: cc.RenderState) + +-------------------------------- +-- Returns the topmost RenderState in the hierarchy below the given RenderState. +-- @function [parent=#RenderState] getTopmost +-- @param self +-- @param #cc.RenderState below +-- @return RenderState#RenderState ret (return value: cc.RenderState) + +-------------------------------- +-- Returns the texture that is at the front of the _textures array.
+-- Added to be backwards compatible. +-- @function [parent=#RenderState] getTexture +-- @param self +-- @return Texture2D#Texture2D ret (return value: cc.Texture2D) + +-------------------------------- +-- Binds the render state for this RenderState and any of its parents, top-down,
+-- for the given pass. +-- @function [parent=#RenderState] bind +-- @param self +-- @param #cc.Pass pass +-- @return RenderState#RenderState self (return value: cc.RenderState) + +-------------------------------- +-- +-- @function [parent=#RenderState] getName +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- +-- @function [parent=#RenderState] getStateBlock +-- @param self +-- @return RenderState::StateBlock#RenderState::StateBlock ret (return value: cc.RenderState::StateBlock) + +-------------------------------- +-- +-- @function [parent=#RenderState] getTextures +-- @param self +-- @return array_table#array_table ret (return value: array_table) + +-------------------------------- +-- Static initializer that is called during game startup. +-- @function [parent=#RenderState] initialize +-- @param self +-- @return RenderState#RenderState self (return value: cc.RenderState) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Technique.lua b/cocos/scripting/lua-bindings/auto/api/Technique.lua new file mode 100644 index 0000000000..d6a166558a --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Technique.lua @@ -0,0 +1,62 @@ + +-------------------------------- +-- @module Technique +-- @extend RenderState +-- @parent_module cc + +-------------------------------- +-- Returns the number of Passes in the Technique +-- @function [parent=#Technique] getPassCount +-- @param self +-- @return long#long ret (return value: long) + +-------------------------------- +-- Returns a new clone of the Technique +-- @function [parent=#Technique] clone +-- @param self +-- @return Technique#Technique ret (return value: cc.Technique) + +-------------------------------- +-- Adds a new pass to the Technique.
+-- Order matters. First added, first rendered +-- @function [parent=#Technique] addPass +-- @param self +-- @param #cc.Pass pass +-- @return Technique#Technique self (return value: cc.Technique) + +-------------------------------- +-- Returns the list of passes +-- @function [parent=#Technique] getPasses +-- @param self +-- @return array_table#array_table ret (return value: array_table) + +-------------------------------- +-- Returns the name of the Technique +-- @function [parent=#Technique] getName +-- @param self +-- @return string#string ret (return value: string) + +-------------------------------- +-- Returns the Pass at given index +-- @function [parent=#Technique] getPassByIndex +-- @param self +-- @param #long index +-- @return Pass#Pass ret (return value: cc.Pass) + +-------------------------------- +-- +-- @function [parent=#Technique] create +-- @param self +-- @param #cc.Material parent +-- @return Technique#Technique ret (return value: cc.Technique) + +-------------------------------- +-- Creates a new Technique with a GLProgramState.
+-- Method added to support legacy code +-- @function [parent=#Technique] createWithGLProgramState +-- @param self +-- @param #cc.Material parent +-- @param #cc.GLProgramState state +-- @return Technique#Technique ret (return value: cc.Technique) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Terrain.lua b/cocos/scripting/lua-bindings/auto/api/Terrain.lua index 492776496f..a2127a719d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Terrain.lua +++ b/cocos/scripting/lua-bindings/auto/api/Terrain.lua @@ -34,6 +34,12 @@ -- @param #bool boolValue -- @return Terrain#Terrain self (return value: cc.Terrain) +-------------------------------- +-- get the terrain's height data +-- @function [parent=#Terrain] getHeightData +-- @param self +-- @return array_table#array_table ret (return value: array_table) + -------------------------------- -- set the Detail Map -- @function [parent=#Terrain] setDetailMap diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua index 8fded01a39..5511cc8990 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextField.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua @@ -41,6 +41,13 @@ -- @param self -- @return bool#bool ret (return value: bool) +-------------------------------- +-- brief Query the text string color.
+-- return The color of the text. +-- @function [parent=#TextField] getTextColor +-- @param self +-- @return color4b_table#color4b_table ret (return value: color4b_table) + -------------------------------- -- brief Get the placeholder of TextField.
-- return A placeholder string. @@ -195,6 +202,13 @@ -- @param #bool deleteBackward -- @return TextField#TextField self (return value: ccui.TextField) +-------------------------------- +-- brief Inquire the horizontal alignment
+-- return The horizontal alignment +-- @function [parent=#TextField] getTextHorizontalAlignment +-- @param self +-- @return int#int ret (return value: int) + -------------------------------- -- brief Change font size of TextField.
-- param size The integer font size. @@ -257,6 +271,13 @@ -- @param #bool detach -- @return TextField#TextField self (return value: ccui.TextField) +-------------------------------- +-- brief Inquire the horizontal alignment
+-- return The horizontal alignment +-- @function [parent=#TextField] getTextVerticalAlignment +-- @param self +-- @return int#int ret (return value: int) + -------------------------------- -- brief Toggle enable touch area.
-- param enable True if enable touch area, false otherwise. diff --git a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua index 952e8477b4..e61cccc155 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua @@ -85,6 +85,15 @@ -- @param #string key -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) +-------------------------------- +-- Get the file path of the texture
+-- param texture A Texture2D object pointer.
+-- return The full path of the file. +-- @function [parent=#TextureCache] getTextureFilePath +-- @param self +-- @param #cc.Texture2D texture +-- @return string#string ret (return value: string) + -------------------------------- -- Removes unused textures.
-- Textures that have a retain count of 1 will be deleted.
diff --git a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua index 5068512651..4d88d55d71 100644 --- a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua +++ b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua @@ -124,7 +124,7 @@ -- @return string#string ret (return value: string) -------------------------------- --- All supported platforms other iOS & Android use xml file to save values. This function checks whether the xml file exists or not.
+-- All supported platforms other iOS & Android and CC_PLATFORM_WINRT use xml file to save values. This function checks whether the xml file exists or not.
-- return True if the xml file exists, flase if not.
-- js NA -- @function [parent=#UserDefault] isXMLFileExist diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua index 6cb399eff6..b756ba2c96 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua @@ -56,4 +56,9 @@ -- @field [parent=#cc] TextureCube#TextureCube TextureCube preloaded module +-------------------------------------------------------- +-- the cc Bundle3D +-- @field [parent=#cc] Bundle3D#Bundle3D Bundle3D preloaded module + + return nil diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index ae55f75851..892bf26e99 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -241,6 +241,11 @@ -- @field [parent=#cc] ActionFloat#ActionFloat ActionFloat preloaded module +-------------------------------------------------------- +-- the cc Properties +-- @field [parent=#cc] Properties#Properties Properties preloaded module + + -------------------------------------------------------- -- the cc UserDefault -- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module @@ -1181,6 +1186,26 @@ -- @field [parent=#cc] GLProgramCache#GLProgramCache GLProgramCache preloaded module +-------------------------------------------------------- +-- the cc RenderState +-- @field [parent=#cc] RenderState#RenderState RenderState preloaded module + + +-------------------------------------------------------- +-- the cc Pass +-- @field [parent=#cc] Pass#Pass Pass preloaded module + + +-------------------------------------------------------- +-- the cc Technique +-- @field [parent=#cc] Technique#Technique Technique preloaded module + + +-------------------------------------------------------- +-- the cc Material +-- @field [parent=#cc] Material#Material Material preloaded module + + -------------------------------------------------------- -- the cc TextureCache -- @field [parent=#cc] TextureCache#TextureCache TextureCache preloaded module diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics3d_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics3d_auto_api.lua new file mode 100644 index 0000000000..ca91e75951 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics3d_auto_api.lua @@ -0,0 +1,64 @@ +-------------------------------- +-- @module cc + +-------------------------------------------------------- +-- the cc Physics3DShape +-- @field [parent=#cc] Physics3DShape#Physics3DShape Physics3DShape preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DObject +-- @field [parent=#cc] Physics3DObject#Physics3DObject Physics3DObject preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DRigidBody +-- @field [parent=#cc] Physics3DRigidBody#Physics3DRigidBody Physics3DRigidBody preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DComponent +-- @field [parent=#cc] Physics3DComponent#Physics3DComponent Physics3DComponent preloaded module + + +-------------------------------------------------------- +-- the cc PhysicsSprite3D +-- @field [parent=#cc] PhysicsSprite3D#PhysicsSprite3D PhysicsSprite3D preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DWorld +-- @field [parent=#cc] Physics3DWorld#Physics3DWorld Physics3DWorld preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DConstraint +-- @field [parent=#cc] Physics3DConstraint#Physics3DConstraint Physics3DConstraint preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DPointToPointConstraint +-- @field [parent=#cc] Physics3DPointToPointConstraint#Physics3DPointToPointConstraint Physics3DPointToPointConstraint preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DHingeConstraint +-- @field [parent=#cc] Physics3DHingeConstraint#Physics3DHingeConstraint Physics3DHingeConstraint preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DSliderConstraint +-- @field [parent=#cc] Physics3DSliderConstraint#Physics3DSliderConstraint Physics3DSliderConstraint preloaded module + + +-------------------------------------------------------- +-- the cc Physics3DConeTwistConstraint +-- @field [parent=#cc] Physics3DConeTwistConstraint#Physics3DConeTwistConstraint Physics3DConeTwistConstraint preloaded module + + +-------------------------------------------------------- +-- the cc Physics3D6DofConstraint +-- @field [parent=#cc] Physics3D6DofConstraint#Physics3D6DofConstraint Physics3D6DofConstraint preloaded module + + +return nil diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 39cde04239..c86fe75f09 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -1,5 +1,6 @@ #include "lua_cocos2dx_3d_auto.hpp" #include "cocos2d.h" +#include "CCBundle3D.h" #include "tolua_fix.h" #include "LuaBasicConversions.h" @@ -495,7 +496,7 @@ int lua_cocos2dx_3d_Animate3D_initWithFrames(lua_State* tolua_S) int arg2; double arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0, "cc.Animate3D:initWithFrames"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Animate3D:initWithFrames"); @@ -642,7 +643,7 @@ int lua_cocos2dx_3d_Animate3D_init(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Animation3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0, "cc.Animate3D:init"); if (!ok) { break; } double arg1; @@ -662,7 +663,7 @@ int lua_cocos2dx_3d_Animate3D_init(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Animation3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0, "cc.Animate3D:init"); if (!ok) { break; } bool ret = cobj->init(arg0); @@ -844,7 +845,7 @@ int lua_cocos2dx_3d_Animate3D_create(lua_State* tolua_S) if (argc == 3) { cocos2d::Animation3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0, "cc.Animate3D:create"); if (!ok) { break; } double arg1; ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Animate3D:create"); @@ -863,7 +864,7 @@ int lua_cocos2dx_3d_Animate3D_create(lua_State* tolua_S) if (argc == 1) { cocos2d::Animation3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0, "cc.Animate3D:create"); if (!ok) { break; } cocos2d::Animate3D* ret = cocos2d::Animate3D::create(arg0); object_to_luaval(tolua_S, "cc.Animate3D",(cocos2d::Animate3D*)ret); @@ -933,7 +934,7 @@ int lua_cocos2dx_3d_Animate3D_createWithFrames(lua_State* tolua_S) cocos2d::Animation3D* arg0; int arg1; int arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0, "cc.Animate3D:createWithFrames"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Animate3D:createWithFrames"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Animate3D:createWithFrames"); if(!ok) @@ -951,7 +952,7 @@ int lua_cocos2dx_3d_Animate3D_createWithFrames(lua_State* tolua_S) int arg1; int arg2; double arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0, "cc.Animate3D:createWithFrames"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Animate3D:createWithFrames"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Animate3D:createWithFrames"); ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Animate3D:createWithFrames"); @@ -1098,7 +1099,7 @@ int lua_cocos2dx_3d_AttachNode_create(lua_State* tolua_S) if (argc == 1) { cocos2d::Bone3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0, "cc.AttachNode:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_AttachNode_create'", nullptr); @@ -1398,7 +1399,7 @@ int lua_cocos2dx_3d_BillBoard_createWithTexture(lua_State* tolua_S) if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.BillBoard:createWithTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_BillBoard_createWithTexture'", nullptr); @@ -1412,7 +1413,7 @@ int lua_cocos2dx_3d_BillBoard_createWithTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; cocos2d::BillBoard::Mode arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.BillBoard:createWithTexture"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.BillBoard:createWithTexture"); if(!ok) { @@ -1516,7 +1517,7 @@ int lua_cocos2dx_3d_Mesh_setTexture(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Mesh:setTexture"); if (!ok) { break; } cobj->setTexture(arg0); @@ -1718,7 +1719,7 @@ int lua_cocos2dx_3d_Mesh_setMaterial(lua_State* tolua_S) { cocos2d::Material* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.Mesh:setMaterial"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_setMaterial'", nullptr); @@ -1918,7 +1919,7 @@ int lua_cocos2dx_3d_Mesh_draw(lua_State* tolua_S) cocos2d::Vec4 arg5; bool arg6; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0, "cc.Mesh:draw"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Mesh:draw"); @@ -2077,7 +2078,7 @@ int lua_cocos2dx_3d_Mesh_setMeshIndexData(lua_State* tolua_S) { cocos2d::MeshIndexData* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.MeshIndexData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.MeshIndexData",&arg0, "cc.Mesh:setMeshIndexData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_setMeshIndexData'", nullptr); @@ -2224,7 +2225,7 @@ int lua_cocos2dx_3d_Mesh_setSkin(lua_State* tolua_S) { cocos2d::MeshSkin* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.MeshSkin",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.MeshSkin",&arg0, "cc.Mesh:setSkin"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_setSkin'", nullptr); @@ -2321,7 +2322,7 @@ int lua_cocos2dx_3d_Mesh_setGLProgramState(lua_State* tolua_S) { cocos2d::GLProgramState* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0, "cc.Mesh:setGLProgramState"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_setGLProgramState'", nullptr); @@ -2543,7 +2544,7 @@ int lua_cocos2dx_3d_Skeleton3D_addBone(lua_State* tolua_S) { cocos2d::Bone3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0, "cc.Skeleton3D:addBone"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_addBone'", nullptr); @@ -2837,7 +2838,7 @@ int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) { cocos2d::Bone3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0, "cc.Skeleton3D:getBoneIndex"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); @@ -3118,7 +3119,7 @@ int lua_cocos2dx_3d_Skybox_setTexture(lua_State* tolua_S) { cocos2d::TextureCube* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.TextureCube",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TextureCube",&arg0, "cc.Skybox:setTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Skybox_setTexture'", nullptr); @@ -3333,7 +3334,7 @@ int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite3D:setTexture"); if (!ok) { break; } cobj->setTexture(arg0); @@ -3582,7 +3583,7 @@ int lua_cocos2dx_3d_Sprite3D_setMaterial(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Material* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.Sprite3D:setMaterial"); if (!ok) { break; } int arg1; @@ -3598,7 +3599,7 @@ int lua_cocos2dx_3d_Sprite3D_setMaterial(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Material* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.Sprite3D:setMaterial"); if (!ok) { break; } cobj->setMaterial(arg0); @@ -4726,6 +4727,53 @@ int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S) return 0; } +int lua_cocos2dx_3d_Terrain_getHeightData(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_getHeightData'", 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_getHeightData'", nullptr); + return 0; + } + std::vector > ret = cobj->getHeightData(); + ccvector_float_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getHeightData",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getHeightData'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S) { int argc = 0; @@ -4860,7 +4908,7 @@ int lua_cocos2dx_3d_Terrain_setAlphaMap(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Terrain:setAlphaMap"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setAlphaMap'", nullptr); @@ -5440,6 +5488,7 @@ int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S) 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,"getHeightData",lua_cocos2dx_3d_Terrain_getHeightData); 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); @@ -5663,6 +5712,516 @@ int lua_register_cocos2dx_3d_TextureCube(lua_State* tolua_S) g_typeCast["TextureCube"] = "cc.TextureCube"; return 1; } + +int lua_cocos2dx_3d_Bundle3D_load(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Bundle3D* 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.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_load'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Bundle3D:load"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_load'", nullptr); + return 0; + } + bool ret = cobj->load(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.Bundle3D:load",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_load'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Bundle3D_loadSkinData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Bundle3D* 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.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadSkinData'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + cocos2d::SkinData* arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Bundle3D:loadSkinData"); + + #pragma warning NO CONVERSION TO NATIVE FOR SkinData* + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadSkinData'", nullptr); + return 0; + } + bool ret = cobj->loadSkinData(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:loadSkinData",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadSkinData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Bundle3D_clear(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Bundle3D* 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.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_clear'", 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_Bundle3D_clear'", nullptr); + return 0; + } + cobj->clear(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:clear",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_clear'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Bundle3D_loadMaterials(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Bundle3D* 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.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadMaterials'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::MaterialDatas arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadMaterials'", nullptr); + return 0; + } + bool ret = cobj->loadMaterials(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.Bundle3D:loadMaterials",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadMaterials'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Bundle3D_loadNodes(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Bundle3D* 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.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadNodes'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::NodeDatas arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadNodes'", nullptr); + return 0; + } + bool ret = cobj->loadNodes(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.Bundle3D:loadNodes",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadNodes'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Bundle3D_loadAnimationData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Bundle3D* 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.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Bundle3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Bundle3D_loadAnimationData'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + cocos2d::Animation3DData* arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Bundle3D:loadAnimationData"); + + #pragma warning NO CONVERSION TO NATIVE FOR Animation3DData* + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadAnimationData'", nullptr); + return 0; + } + bool ret = cobj->loadAnimationData(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:loadAnimationData",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadAnimationData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Bundle3D_createBundle(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_createBundle'", nullptr); + return 0; + } + cocos2d::Bundle3D* ret = cocos2d::Bundle3D::createBundle(); + object_to_luaval(tolua_S, "cc.Bundle3D",(cocos2d::Bundle3D*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:createBundle",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_createBundle'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_3d_Bundle3D_destroyBundle(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Bundle3D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Bundle3D",&arg0, "cc.Bundle3D:destroyBundle"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_destroyBundle'", nullptr); + return 0; + } + cocos2d::Bundle3D::destroyBundle(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:destroyBundle",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_destroyBundle'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_3d_Bundle3D_loadObj(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + cocos2d::MeshDatas arg0; + cocos2d::MaterialDatas arg1; + cocos2d::NodeDatas arg2; + std::string arg3; + #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas + ok = false; + ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.Bundle3D:loadObj"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadObj'", nullptr); + return 0; + } + bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + if (argc == 5) + { + cocos2d::MeshDatas arg0; + cocos2d::MaterialDatas arg1; + cocos2d::NodeDatas arg2; + std::string arg3; + const char* arg4; + #pragma warning NO CONVERSION TO NATIVE FOR MeshDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas + ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR NodeDatas + ok = false; + ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.Bundle3D:loadObj"); + std::string arg4_tmp; ok &= luaval_to_std_string(tolua_S, 6, &arg4_tmp, "cc.Bundle3D:loadObj"); arg4 = arg4_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadObj'", nullptr); + return 0; + } + bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3, arg4); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:loadObj",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadObj'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_3d_Bundle3D_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Bundle3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Bundle3D(); + tolua_pushusertype(tolua_S,(void*)cobj,"cc.Bundle3D"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Bundle3D:Bundle3D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_3d_Bundle3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Bundle3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Bundle3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Bundle3D"); + tolua_cclass(tolua_S,"Bundle3D","cc.Bundle3D","",nullptr); + + tolua_beginmodule(tolua_S,"Bundle3D"); + tolua_function(tolua_S,"new",lua_cocos2dx_3d_Bundle3D_constructor); + tolua_function(tolua_S,"load",lua_cocos2dx_3d_Bundle3D_load); + tolua_function(tolua_S,"loadSkinData",lua_cocos2dx_3d_Bundle3D_loadSkinData); + tolua_function(tolua_S,"clear",lua_cocos2dx_3d_Bundle3D_clear); + tolua_function(tolua_S,"loadMaterials",lua_cocos2dx_3d_Bundle3D_loadMaterials); + tolua_function(tolua_S,"loadNodes",lua_cocos2dx_3d_Bundle3D_loadNodes); + tolua_function(tolua_S,"loadAnimationData",lua_cocos2dx_3d_Bundle3D_loadAnimationData); + tolua_function(tolua_S,"createBundle", lua_cocos2dx_3d_Bundle3D_createBundle); + tolua_function(tolua_S,"destroyBundle", lua_cocos2dx_3d_Bundle3D_destroyBundle); + tolua_function(tolua_S,"loadObj", lua_cocos2dx_3d_Bundle3D_loadObj); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Bundle3D).name(); + g_luaType[typeName] = "cc.Bundle3D"; + g_typeCast["Bundle3D"] = "cc.Bundle3D"; + return 1; +} TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S) { tolua_open(tolua_S); @@ -5677,6 +6236,7 @@ TOLUA_API int register_all_cocos2dx_3d(lua_State* 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_Bundle3D(tolua_S); lua_register_cocos2dx_3d_Skeleton3D(tolua_S); lua_register_cocos2dx_3d_BillBoard(tolua_S); lua_register_cocos2dx_3d_Animation3D(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp index 1204dc145d..db36641db2 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -119,6 +119,18 @@ int register_all_cocos2dx_3d(lua_State* tolua_S); + + + + + + + + + + + + diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp index 25ae7429dc..302f2a90d6 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp @@ -660,7 +660,7 @@ int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:play2d"); ok &= luaval_to_number(tolua_S, 4,&arg2, "ccexp.AudioEngine:play2d"); - ok &= luaval_to_object(tolua_S, 5, "ccexp.AudioProfile",&arg3); + ok &= luaval_to_object(tolua_S, 5, "ccexp.AudioProfile",&arg3, "ccexp.AudioEngine:play2d"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_play2d'", nullptr); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 4e2286f400..97e3796024 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -560,7 +560,7 @@ int lua_cocos2dx_Texture2D_initWithImage(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Image* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0, "cc.Texture2D:initWithImage"); if (!ok) { break; } cocos2d::Texture2D::PixelFormat arg1; @@ -576,7 +576,7 @@ int lua_cocos2dx_Texture2D_initWithImage(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Image* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0, "cc.Texture2D:initWithImage"); if (!ok) { break; } bool ret = cobj->initWithImage(arg0); @@ -1444,7 +1444,7 @@ int lua_cocos2dx_Texture2D_setGLProgram(lua_State* tolua_S) { cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0, "cc.Texture2D:setGLProgram"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_setGLProgram'", nullptr); @@ -2899,7 +2899,7 @@ int lua_cocos2dx_Node_addChild(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:addChild"); if (!ok) { break; } int arg1; @@ -2915,7 +2915,7 @@ int lua_cocos2dx_Node_addChild(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:addChild"); if (!ok) { break; } cobj->addChild(arg0); @@ -2927,7 +2927,7 @@ int lua_cocos2dx_Node_addChild(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:addChild"); if (!ok) { break; } int arg1; @@ -2947,7 +2947,7 @@ int lua_cocos2dx_Node_addChild(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:addChild"); if (!ok) { break; } int arg1; @@ -2998,7 +2998,7 @@ int lua_cocos2dx_Node_removeComponent(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Component* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0, "cc.Node:removeComponent"); if (!ok) { break; } bool ret = cobj->removeComponent(arg0); @@ -4348,7 +4348,7 @@ int lua_cocos2dx_Node_removeChild(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:removeChild"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_removeChild'", nullptr); @@ -4363,7 +4363,7 @@ int lua_cocos2dx_Node_removeChild(lua_State* tolua_S) cocos2d::Node* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:removeChild"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChild"); if(!ok) @@ -4609,7 +4609,7 @@ int lua_cocos2dx_Node_setGLProgramState(lua_State* tolua_S) { cocos2d::GLProgramState* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0, "cc.Node:setGLProgramState"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setGLProgramState'", nullptr); @@ -4817,7 +4817,7 @@ int lua_cocos2dx_Node_convertTouchToNodeSpace(lua_State* tolua_S) { cocos2d::Touch* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0, "cc.Node:convertTouchToNodeSpace"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_convertTouchToNodeSpace'", nullptr); @@ -5012,7 +5012,7 @@ int lua_cocos2dx_Node_setParent(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:setParent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setParent'", nullptr); @@ -5250,7 +5250,7 @@ int lua_cocos2dx_Node_convertTouchToNodeSpaceAR(lua_State* tolua_S) { cocos2d::Touch* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0, "cc.Node:convertTouchToNodeSpaceAR"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_convertTouchToNodeSpaceAR'", nullptr); @@ -5460,7 +5460,7 @@ int lua_cocos2dx_Node_reorderChild(lua_State* tolua_S) cocos2d::Node* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Node:reorderChild"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:reorderChild"); if(!ok) @@ -6097,7 +6097,7 @@ int lua_cocos2dx_Node_addComponent(lua_State* tolua_S) { cocos2d::Component* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0, "cc.Node:addComponent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_addComponent'", nullptr); @@ -6147,7 +6147,7 @@ int lua_cocos2dx_Node_runAction(lua_State* tolua_S) { cocos2d::Action* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0, "cc.Node:runAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_runAction'", nullptr); @@ -6199,7 +6199,7 @@ int lua_cocos2dx_Node_visit(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0, "cc.Node:visit"); if (!ok) { break; } cocos2d::Mat4 arg1; @@ -6511,7 +6511,7 @@ int lua_cocos2dx_Node_setScheduler(lua_State* tolua_S) { cocos2d::Scheduler* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0, "cc.Node:setScheduler"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setScheduler'", nullptr); @@ -7084,7 +7084,7 @@ int lua_cocos2dx_Node_setActionManager(lua_State* tolua_S) { cocos2d::ActionManager* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0, "cc.Node:setActionManager"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setActionManager'", nullptr); @@ -8615,7 +8615,7 @@ int lua_cocos2dx_Node_setEventDispatcher(lua_State* tolua_S) { cocos2d::EventDispatcher* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0, "cc.Node:setEventDispatcher"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setEventDispatcher'", nullptr); @@ -8714,7 +8714,7 @@ int lua_cocos2dx_Node_draw(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0, "cc.Node:draw"); if (!ok) { break; } cocos2d::Mat4 arg1; @@ -8771,7 +8771,7 @@ int lua_cocos2dx_Node_setUserObject(lua_State* tolua_S) { cocos2d::Ref* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.Node:setUserObject"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setUserObject'", nullptr); @@ -9066,7 +9066,7 @@ int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S) { cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0, "cc.Node:setGLProgram"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); @@ -9401,7 +9401,7 @@ int lua_cocos2dx_Node_stopAction(lua_State* tolua_S) { cocos2d::Action* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0, "cc.Node:stopAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_stopAction'", nullptr); @@ -9769,7 +9769,7 @@ int lua_cocos2dx_Scene_render(lua_State* tolua_S) { cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0, "cc.Scene:render"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_render'", nullptr); @@ -9819,7 +9819,7 @@ int lua_cocos2dx_Scene_onProjectionChanged(lua_State* tolua_S) { cocos2d::EventCustom* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.EventCustom",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventCustom",&arg0, "cc.Scene:onProjectionChanged"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Scene_onProjectionChanged'", nullptr); @@ -11733,7 +11733,7 @@ int lua_cocos2dx_Director_setEventDispatcher(lua_State* tolua_S) { cocos2d::EventDispatcher* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0, "cc.Director:setEventDispatcher"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setEventDispatcher'", nullptr); @@ -12021,7 +12021,7 @@ int lua_cocos2dx_Director_setActionManager(lua_State* tolua_S) { cocos2d::ActionManager* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0, "cc.Director:setActionManager"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setActionManager'", nullptr); @@ -12888,7 +12888,7 @@ int lua_cocos2dx_Director_setScheduler(lua_State* tolua_S) { cocos2d::Scheduler* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0, "cc.Director:setScheduler"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setScheduler'", nullptr); @@ -13464,7 +13464,7 @@ int lua_cocos2dx_Director_setOpenGLView(lua_State* tolua_S) { cocos2d::GLView* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLView",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLView",&arg0, "cc.Director:setOpenGLView"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setOpenGLView'", nullptr); @@ -13658,7 +13658,7 @@ int lua_cocos2dx_Director_runWithScene(lua_State* tolua_S) { cocos2d::Scene* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0, "cc.Director:runWithScene"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_runWithScene'", nullptr); @@ -13708,7 +13708,7 @@ int lua_cocos2dx_Director_setNotificationNode(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Director:setNotificationNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_setNotificationNode'", nullptr); @@ -14387,7 +14387,7 @@ int lua_cocos2dx_Director_pushScene(lua_State* tolua_S) { cocos2d::Scene* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0, "cc.Director:pushScene"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_pushScene'", nullptr); @@ -14628,7 +14628,7 @@ int lua_cocos2dx_Director_replaceScene(lua_State* tolua_S) { cocos2d::Scene* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0, "cc.Director:replaceScene"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_replaceScene'", nullptr); @@ -15547,7 +15547,7 @@ int lua_cocos2dx_Action_startWithTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Action:startWithTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_startWithTarget'", nullptr); @@ -15597,7 +15597,7 @@ int lua_cocos2dx_Action_setOriginalTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Action:setOriginalTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setOriginalTarget'", nullptr); @@ -16032,7 +16032,7 @@ int lua_cocos2dx_Action_setTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Action:setTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Action_setTarget'", nullptr); @@ -16326,7 +16326,7 @@ int lua_cocos2dx_Speed_setInnerAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.Speed:setInnerAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Speed_setInnerAction'", nullptr); @@ -16474,7 +16474,7 @@ int lua_cocos2dx_Speed_initWithAction(lua_State* tolua_S) cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.Speed:initWithAction"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Speed:initWithAction"); if(!ok) @@ -16562,7 +16562,7 @@ int lua_cocos2dx_Speed_create(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.Speed:create"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Speed:create"); if(!ok) { @@ -16724,7 +16724,7 @@ int lua_cocos2dx_Follow_initWithTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Follow:initWithTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_initWithTarget'", nullptr); @@ -16739,7 +16739,7 @@ int lua_cocos2dx_Follow_initWithTarget(lua_State* tolua_S) cocos2d::Node* arg0; cocos2d::Rect arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Follow:initWithTarget"); ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Follow:initWithTarget"); if(!ok) @@ -16826,7 +16826,7 @@ int lua_cocos2dx_Follow_create(lua_State* tolua_S) if (argc == 1) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Follow:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Follow_create'", nullptr); @@ -16840,7 +16840,7 @@ int lua_cocos2dx_Follow_create(lua_State* tolua_S) { cocos2d::Node* arg0; cocos2d::Rect arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Follow:create"); ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Follow:create"); if(!ok) { @@ -17047,7 +17047,7 @@ int lua_cocos2dx_SpriteFrame_setTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteFrame:setTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteFrame_setTexture'", nullptr); @@ -17576,7 +17576,7 @@ int lua_cocos2dx_SpriteFrame_initWithTexture(lua_State* tolua_S) do{ if (argc == 5) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteFrame:initWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; @@ -17604,7 +17604,7 @@ int lua_cocos2dx_SpriteFrame_initWithTexture(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteFrame:initWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; @@ -17975,7 +17975,7 @@ int lua_cocos2dx_SpriteFrame_createWithTexture(lua_State* tolua_S) if (argc == 5) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteFrame:createWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.SpriteFrame:createWithTexture"); @@ -18000,7 +18000,7 @@ int lua_cocos2dx_SpriteFrame_createWithTexture(lua_State* tolua_S) if (argc == 2) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteFrame:createWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.SpriteFrame:createWithTexture"); @@ -18127,7 +18127,7 @@ int lua_cocos2dx_AnimationFrame_setSpriteFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.AnimationFrame:setSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_AnimationFrame_setSpriteFrame'", nullptr); @@ -18467,7 +18467,7 @@ int lua_cocos2dx_AnimationFrame_initWithSpriteFrame(lua_State* tolua_S) double arg1; cocos2d::ValueMap arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.AnimationFrame:initWithSpriteFrame"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.AnimationFrame:initWithSpriteFrame"); @@ -18511,7 +18511,7 @@ int lua_cocos2dx_AnimationFrame_create(lua_State* tolua_S) cocos2d::SpriteFrame* arg0; double arg1; cocos2d::ValueMap arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.AnimationFrame:create"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.AnimationFrame:create"); ok &= luaval_to_ccvaluemap(tolua_S, 4, &arg2, "cc.AnimationFrame:create"); if(!ok) @@ -18674,7 +18674,7 @@ int lua_cocos2dx_Animation_addSpriteFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.Animation:addSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Animation_addSpriteFrame'", nullptr); @@ -19447,7 +19447,7 @@ int lua_cocos2dx_Animation_addSpriteFrameWithTexture(lua_State* tolua_S) cocos2d::Texture2D* arg0; cocos2d::Rect arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Animation:addSpriteFrameWithTexture"); ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Animation:addSpriteFrameWithTexture"); if(!ok) @@ -19928,9 +19928,9 @@ int lua_cocos2dx_Sequence_initWithTwoActions(lua_State* tolua_S) cocos2d::FiniteTimeAction* arg0; cocos2d::FiniteTimeAction* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0, "cc.Sequence:initWithTwoActions"); - ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1, "cc.Sequence:initWithTwoActions"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sequence_initWithTwoActions'", nullptr); @@ -20038,7 +20038,7 @@ int lua_cocos2dx_Repeat_setInnerAction(lua_State* tolua_S) { cocos2d::FiniteTimeAction* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0, "cc.Repeat:setInnerAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Repeat_setInnerAction'", nullptr); @@ -20089,7 +20089,7 @@ int lua_cocos2dx_Repeat_initWithAction(lua_State* tolua_S) cocos2d::FiniteTimeAction* arg0; unsigned int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0, "cc.Repeat:initWithAction"); ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.Repeat:initWithAction"); if(!ok) @@ -20177,7 +20177,7 @@ int lua_cocos2dx_Repeat_create(lua_State* tolua_S) { cocos2d::FiniteTimeAction* arg0; unsigned int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0, "cc.Repeat:create"); ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.Repeat:create"); if(!ok) { @@ -20287,7 +20287,7 @@ int lua_cocos2dx_RepeatForever_setInnerAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.RepeatForever:setInnerAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RepeatForever_setInnerAction'", nullptr); @@ -20337,7 +20337,7 @@ int lua_cocos2dx_RepeatForever_initWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.RepeatForever:initWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RepeatForever_initWithAction'", nullptr); @@ -20422,7 +20422,7 @@ int lua_cocos2dx_RepeatForever_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.RepeatForever:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RepeatForever_create'", nullptr); @@ -20532,9 +20532,9 @@ int lua_cocos2dx_Spawn_initWithTwoActions(lua_State* tolua_S) cocos2d::FiniteTimeAction* arg0; cocos2d::FiniteTimeAction* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.FiniteTimeAction",&arg0, "cc.Spawn:initWithTwoActions"); - ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1, "cc.Spawn:initWithTwoActions"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Spawn_initWithTwoActions'", nullptr); @@ -22928,7 +22928,7 @@ int lua_cocos2dx_FadeIn_setReverseAction(lua_State* tolua_S) { cocos2d::FadeTo* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.FadeTo",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.FadeTo",&arg0, "cc.FadeIn:setReverseAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FadeIn_setReverseAction'", nullptr); @@ -23073,7 +23073,7 @@ int lua_cocos2dx_FadeOut_setReverseAction(lua_State* tolua_S) { cocos2d::FadeTo* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.FadeTo",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.FadeTo",&arg0, "cc.FadeOut:setReverseAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_FadeOut_setReverseAction'", nullptr); @@ -23697,7 +23697,7 @@ int lua_cocos2dx_Animate_initWithAnimation(lua_State* tolua_S) { cocos2d::Animation* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0, "cc.Animate:initWithAnimation"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Animate_initWithAnimation'", nullptr); @@ -23747,7 +23747,7 @@ int lua_cocos2dx_Animate_setAnimation(lua_State* tolua_S) { cocos2d::Animation* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0, "cc.Animate:setAnimation"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Animate_setAnimation'", nullptr); @@ -23785,7 +23785,7 @@ int lua_cocos2dx_Animate_create(lua_State* tolua_S) if (argc == 1) { cocos2d::Animation* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0, "cc.Animate:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Animate_create'", nullptr); @@ -23942,9 +23942,9 @@ int lua_cocos2dx_TargetedAction_initWithTarget(lua_State* tolua_S) cocos2d::Node* arg0; cocos2d::FiniteTimeAction* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.TargetedAction:initWithTarget"); - ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1, "cc.TargetedAction:initWithTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TargetedAction_initWithTarget'", nullptr); @@ -23994,7 +23994,7 @@ int lua_cocos2dx_TargetedAction_setForcedTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.TargetedAction:setForcedTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TargetedAction_setForcedTarget'", nullptr); @@ -24033,8 +24033,8 @@ int lua_cocos2dx_TargetedAction_create(lua_State* tolua_S) { cocos2d::Node* arg0; cocos2d::FiniteTimeAction* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.TargetedAction:create"); + ok &= luaval_to_object(tolua_S, 3, "cc.FiniteTimeAction",&arg1, "cc.TargetedAction:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TargetedAction_create'", nullptr); @@ -24281,6 +24281,1538 @@ int lua_register_cocos2dx_ActionFloat(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Properties_getVariable(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getVariable'", 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.Properties:getVariable"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getVariable'", nullptr); + return 0; + } + const char* ret = cobj->getVariable(arg0); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + if (argc == 2) + { + const char* arg0; + const char* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getVariable"); arg0 = arg0_tmp.c_str(); + + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.Properties:getVariable"); arg1 = arg1_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getVariable'", nullptr); + return 0; + } + const char* ret = cobj->getVariable(arg0, arg1); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getVariable",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getVariable'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getString'", 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_Properties_getString'", nullptr); + return 0; + } + const char* ret = cobj->getString(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getString"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getString'", nullptr); + return 0; + } + const char* ret = cobj->getString(arg0); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + if (argc == 2) + { + const char* arg0; + const char* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getString"); arg0 = arg0_tmp.c_str(); + + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.Properties:getString"); arg1 = arg1_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getString'", nullptr); + return 0; + } + const char* ret = cobj->getString(arg0, arg1); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getString",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getLong(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getLong'", 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_Properties_getLong'", nullptr); + return 0; + } + long ret = cobj->getLong(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getLong"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getLong'", nullptr); + return 0; + } + long ret = cobj->getLong(arg0); + 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.Properties:getLong",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getLong'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getNamespace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getNamespace'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const char* ret = cobj->getNamespace(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getNamespace"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + cocos2d::Properties* ret = cobj->getNamespace(arg0); + object_to_luaval(tolua_S, "cc.Properties",(cocos2d::Properties*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getNamespace"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + bool arg1; + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Properties:getNamespace"); + + if (!ok) { break; } + cocos2d::Properties* ret = cobj->getNamespace(arg0, arg1); + object_to_luaval(tolua_S, "cc.Properties",(cocos2d::Properties*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getNamespace"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + bool arg1; + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Properties:getNamespace"); + + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Properties:getNamespace"); + + if (!ok) { break; } + cocos2d::Properties* ret = cobj->getNamespace(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.Properties",(cocos2d::Properties*)ret); + return 1; + } + }while(0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getNamespace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getNamespace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getPath(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getPath'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + std::string* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getPath"); arg0 = arg0_tmp.c_str(); + + #pragma warning NO CONVERSION TO NATIVE FOR std::string* + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getPath'", nullptr); + return 0; + } + bool ret = cobj->getPath(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getPath",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getPath'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getMat4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getMat4'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + cocos2d::Mat4* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getMat4"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_object(tolua_S, 3, "cc.Mat4",&arg1, "cc.Properties:getMat4"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getMat4'", nullptr); + return 0; + } + bool ret = cobj->getMat4(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getMat4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getMat4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_exists(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_exists'", 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.Properties:exists"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_exists'", nullptr); + return 0; + } + bool ret = cobj->exists(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.Properties:exists",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_exists'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_setString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_setString'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + const char* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:setString"); arg0 = arg0_tmp.c_str(); + + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.Properties:setString"); arg1 = arg1_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_setString'", nullptr); + return 0; + } + bool ret = cobj->setString(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:setString",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_setString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getId(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getId'", 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_Properties_getId'", nullptr); + return 0; + } + const char* ret = cobj->getId(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getId",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getId'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_rewind(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_rewind'", 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_Properties_rewind'", nullptr); + return 0; + } + cobj->rewind(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:rewind",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_rewind'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_setVariable(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_setVariable'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + const char* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:setVariable"); arg0 = arg0_tmp.c_str(); + + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.Properties:setVariable"); arg1 = arg1_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_setVariable'", nullptr); + return 0; + } + cobj->setVariable(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.Properties:setVariable",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_setVariable'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getBool(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getBool'", 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_Properties_getBool'", nullptr); + return 0; + } + bool ret = cobj->getBool(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getBool"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getBool'", nullptr); + return 0; + } + bool ret = cobj->getBool(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + if (argc == 2) + { + const char* arg0; + bool arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getBool"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Properties:getBool"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getBool'", nullptr); + return 0; + } + bool ret = cobj->getBool(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getBool",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getBool'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getColor'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getColor"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + cocos2d::Vec4* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Vec4",&arg1, "cc.Properties:getColor"); + + if (!ok) { break; } + bool ret = cobj->getColor(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getColor"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + cocos2d::Vec3* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Vec3",&arg1, "cc.Properties:getColor"); + + if (!ok) { break; } + bool ret = cobj->getColor(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getColor",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getType'", 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_Properties_getType'", nullptr); + return 0; + } + int ret = (int)cobj->getType(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getType"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getType'", nullptr); + return 0; + } + int ret = (int)cobj->getType(arg0); + 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.Properties:getType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getNextNamespace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getNextNamespace'", 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_Properties_getNextNamespace'", nullptr); + return 0; + } + cocos2d::Properties* ret = cobj->getNextNamespace(); + object_to_luaval(tolua_S, "cc.Properties",(cocos2d::Properties*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getNextNamespace",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getNextNamespace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getInt(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getInt'", 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_Properties_getInt'", nullptr); + return 0; + } + int ret = cobj->getInt(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getInt"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getInt'", nullptr); + return 0; + } + int ret = cobj->getInt(arg0); + 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.Properties:getInt",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getInt'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getVec3(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getVec3'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + cocos2d::Vec3* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getVec3"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_object(tolua_S, 3, "cc.Vec3",&arg1, "cc.Properties:getVec3"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getVec3'", nullptr); + return 0; + } + bool ret = cobj->getVec3(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getVec3",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getVec3'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getVec2(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getVec2'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + cocos2d::Vec2* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getVec2"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_object(tolua_S, 3, "cc.Vec2",&arg1, "cc.Properties:getVec2"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getVec2'", nullptr); + return 0; + } + bool ret = cobj->getVec2(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getVec2",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getVec2'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getVec4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getVec4'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + cocos2d::Vec4* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getVec4"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_object(tolua_S, 3, "cc.Vec4",&arg1, "cc.Properties:getVec4"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getVec4'", nullptr); + return 0; + } + bool ret = cobj->getVec4(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getVec4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getVec4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getNextProperty(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getNextProperty'", 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_Properties_getNextProperty'", nullptr); + return 0; + } + const char* ret = cobj->getNextProperty(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getNextProperty",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getNextProperty'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getFloat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getFloat'", 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_Properties_getFloat'", nullptr); + return 0; + } + double ret = cobj->getFloat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getFloat"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getFloat'", nullptr); + return 0; + } + double ret = cobj->getFloat(arg0); + 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.Properties:getFloat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getFloat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_getQuaternionFromAxisAngle(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Properties* 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.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Properties*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Properties_getQuaternionFromAxisAngle'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + cocos2d::Quaternion* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:getQuaternionFromAxisAngle"); arg0 = arg0_tmp.c_str(); + + ok &= luaval_to_object(tolua_S, 3, "cc.Quaternion",&arg1, "cc.Properties:getQuaternionFromAxisAngle"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_getQuaternionFromAxisAngle'", nullptr); + return 0; + } + bool ret = cobj->getQuaternionFromAxisAngle(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Properties:getQuaternionFromAxisAngle",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_getQuaternionFromAxisAngle'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Properties_parseColor(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:parseColor"); arg0 = arg0_tmp.c_str(); + if (!ok) { break; } + cocos2d::Vec4* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Vec4",&arg1, "cc.Properties:parseColor"); + if (!ok) { break; } + bool ret = cocos2d::Properties::parseColor(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:parseColor"); arg0 = arg0_tmp.c_str(); + if (!ok) { break; } + cocos2d::Vec3* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Vec3",&arg1, "cc.Properties:parseColor"); + if (!ok) { break; } + bool ret = cocos2d::Properties::parseColor(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Properties:parseColor",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_parseColor'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Properties_parseVec3(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + const char* arg0; + cocos2d::Vec3* arg1; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:parseVec3"); arg0 = arg0_tmp.c_str(); + ok &= luaval_to_object(tolua_S, 3, "cc.Vec3",&arg1, "cc.Properties:parseVec3"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_parseVec3'", nullptr); + return 0; + } + bool ret = cocos2d::Properties::parseVec3(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Properties:parseVec3",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_parseVec3'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Properties_parseAxisAngle(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + const char* arg0; + cocos2d::Quaternion* arg1; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:parseAxisAngle"); arg0 = arg0_tmp.c_str(); + ok &= luaval_to_object(tolua_S, 3, "cc.Quaternion",&arg1, "cc.Properties:parseAxisAngle"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_parseAxisAngle'", nullptr); + return 0; + } + bool ret = cocos2d::Properties::parseAxisAngle(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Properties:parseAxisAngle",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_parseAxisAngle'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Properties_parseVec2(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + const char* arg0; + cocos2d::Vec2* arg1; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:parseVec2"); arg0 = arg0_tmp.c_str(); + ok &= luaval_to_object(tolua_S, 3, "cc.Vec2",&arg1, "cc.Properties:parseVec2"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_parseVec2'", nullptr); + return 0; + } + bool ret = cocos2d::Properties::parseVec2(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Properties:parseVec2",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_parseVec2'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Properties_parseVec4(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + const char* arg0; + cocos2d::Vec4* arg1; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Properties:parseVec4"); arg0 = arg0_tmp.c_str(); + ok &= luaval_to_object(tolua_S, 3, "cc.Vec4",&arg1, "cc.Properties:parseVec4"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_parseVec4'", nullptr); + return 0; + } + bool ret = cocos2d::Properties::parseVec4(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Properties:parseVec4",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_parseVec4'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Properties_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Properties)"); + return 0; +} + +int lua_register_cocos2dx_Properties(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Properties"); + tolua_cclass(tolua_S,"Properties","cc.Properties","",nullptr); + + tolua_beginmodule(tolua_S,"Properties"); + tolua_function(tolua_S,"getVariable",lua_cocos2dx_Properties_getVariable); + tolua_function(tolua_S,"getString",lua_cocos2dx_Properties_getString); + tolua_function(tolua_S,"getLong",lua_cocos2dx_Properties_getLong); + tolua_function(tolua_S,"getNamespace",lua_cocos2dx_Properties_getNamespace); + tolua_function(tolua_S,"getPath",lua_cocos2dx_Properties_getPath); + tolua_function(tolua_S,"getMat4",lua_cocos2dx_Properties_getMat4); + tolua_function(tolua_S,"exists",lua_cocos2dx_Properties_exists); + tolua_function(tolua_S,"setString",lua_cocos2dx_Properties_setString); + tolua_function(tolua_S,"getId",lua_cocos2dx_Properties_getId); + tolua_function(tolua_S,"rewind",lua_cocos2dx_Properties_rewind); + tolua_function(tolua_S,"setVariable",lua_cocos2dx_Properties_setVariable); + tolua_function(tolua_S,"getBool",lua_cocos2dx_Properties_getBool); + tolua_function(tolua_S,"getColor",lua_cocos2dx_Properties_getColor); + tolua_function(tolua_S,"getType",lua_cocos2dx_Properties_getType); + tolua_function(tolua_S,"getNextNamespace",lua_cocos2dx_Properties_getNextNamespace); + tolua_function(tolua_S,"getInt",lua_cocos2dx_Properties_getInt); + tolua_function(tolua_S,"getVec3",lua_cocos2dx_Properties_getVec3); + tolua_function(tolua_S,"getVec2",lua_cocos2dx_Properties_getVec2); + tolua_function(tolua_S,"getVec4",lua_cocos2dx_Properties_getVec4); + tolua_function(tolua_S,"getNextProperty",lua_cocos2dx_Properties_getNextProperty); + tolua_function(tolua_S,"getFloat",lua_cocos2dx_Properties_getFloat); + tolua_function(tolua_S,"getQuaternionFromAxisAngle",lua_cocos2dx_Properties_getQuaternionFromAxisAngle); + tolua_function(tolua_S,"parseColor", lua_cocos2dx_Properties_parseColor); + tolua_function(tolua_S,"parseVec3", lua_cocos2dx_Properties_parseVec3); + tolua_function(tolua_S,"parseAxisAngle", lua_cocos2dx_Properties_parseAxisAngle); + tolua_function(tolua_S,"parseVec2", lua_cocos2dx_Properties_parseVec2); + tolua_function(tolua_S,"parseVec4", lua_cocos2dx_Properties_parseVec4); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Properties).name(); + g_luaType[typeName] = "cc.Properties"; + g_typeCast["Properties"] = "cc.Properties"; + return 1; +} + int lua_cocos2dx_UserDefault_setIntegerForKey(lua_State* tolua_S) { int argc = 0; @@ -27047,7 +28579,7 @@ int lua_cocos2dx_EventDispatcher_pauseEventListenersForTarget(lua_State* tolua_S { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.EventDispatcher:pauseEventListenersForTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventDispatcher_pauseEventListenersForTarget'", nullptr); @@ -27062,7 +28594,7 @@ int lua_cocos2dx_EventDispatcher_pauseEventListenersForTarget(lua_State* tolua_S cocos2d::Node* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.EventDispatcher:pauseEventListenersForTarget"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.EventDispatcher:pauseEventListenersForTarget"); if(!ok) @@ -27115,9 +28647,9 @@ int lua_cocos2dx_EventDispatcher_addEventListenerWithSceneGraphPriority(lua_Stat cocos2d::EventListener* arg0; cocos2d::Node* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0, "cc.EventDispatcher:addEventListenerWithSceneGraphPriority"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.EventDispatcher:addEventListenerWithSceneGraphPriority"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventDispatcher_addEventListenerWithSceneGraphPriority'", nullptr); @@ -27218,7 +28750,7 @@ int lua_cocos2dx_EventDispatcher_addEventListenerWithFixedPriority(lua_State* to cocos2d::EventListener* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0, "cc.EventDispatcher:addEventListenerWithFixedPriority"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.EventDispatcher:addEventListenerWithFixedPriority"); if(!ok) @@ -27270,7 +28802,7 @@ int lua_cocos2dx_EventDispatcher_removeEventListener(lua_State* tolua_S) { cocos2d::EventListener* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0, "cc.EventDispatcher:removeEventListener"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventDispatcher_removeEventListener'", nullptr); @@ -27320,7 +28852,7 @@ int lua_cocos2dx_EventDispatcher_resumeEventListenersForTarget(lua_State* tolua_ { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.EventDispatcher:resumeEventListenersForTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventDispatcher_resumeEventListenersForTarget'", nullptr); @@ -27335,7 +28867,7 @@ int lua_cocos2dx_EventDispatcher_resumeEventListenersForTarget(lua_State* tolua_ cocos2d::Node* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.EventDispatcher:resumeEventListenersForTarget"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.EventDispatcher:resumeEventListenersForTarget"); if(!ok) @@ -27387,7 +28919,7 @@ int lua_cocos2dx_EventDispatcher_removeEventListenersForTarget(lua_State* tolua_ { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.EventDispatcher:removeEventListenersForTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventDispatcher_removeEventListenersForTarget'", nullptr); @@ -27402,7 +28934,7 @@ int lua_cocos2dx_EventDispatcher_removeEventListenersForTarget(lua_State* tolua_ cocos2d::Node* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.EventDispatcher:removeEventListenersForTarget"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.EventDispatcher:removeEventListenersForTarget"); if(!ok) @@ -27455,7 +28987,7 @@ int lua_cocos2dx_EventDispatcher_setPriority(lua_State* tolua_S) cocos2d::EventListener* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventListener",&arg0, "cc.EventDispatcher:setPriority"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.EventDispatcher:setPriority"); if(!ok) @@ -27564,7 +29096,7 @@ int lua_cocos2dx_EventDispatcher_dispatchEvent(lua_State* tolua_S) { cocos2d::Event* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Event",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Event",&arg0, "cc.EventDispatcher:dispatchEvent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventDispatcher_dispatchEvent'", nullptr); @@ -27867,9 +29399,9 @@ int lua_cocos2dx_EventFocus_constructor(lua_State* tolua_S) cocos2d::ui::Widget* arg0; cocos2d::ui::Widget* arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "cc.EventFocus:EventFocus"); - ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1, "cc.EventFocus:EventFocus"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EventFocus_constructor'", nullptr); @@ -30173,7 +31705,7 @@ int lua_cocos2dx_CardinalSplineTo_initWithDuration(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CardinalSplineTo:initWithDuration"); - ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1, "cc.CardinalSplineTo:initWithDuration"); ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.CardinalSplineTo:initWithDuration"); if(!ok) @@ -30345,7 +31877,7 @@ int lua_cocos2dx_CatmullRomTo_initWithDuration(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CatmullRomTo:initWithDuration"); - ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1, "cc.CatmullRomTo:initWithDuration"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CatmullRomTo_initWithDuration'", nullptr); @@ -30418,7 +31950,7 @@ int lua_cocos2dx_CatmullRomBy_initWithDuration(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.CatmullRomBy:initWithDuration"); - ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PointArray",&arg1, "cc.CatmullRomBy:initWithDuration"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CatmullRomBy_initWithDuration'", nullptr); @@ -30488,7 +32020,7 @@ int lua_cocos2dx_ActionEase_initWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.ActionEase:initWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionEase_initWithAction'", nullptr); @@ -30657,7 +32189,7 @@ int lua_cocos2dx_EaseRateAction_initWithAction(lua_State* tolua_S) cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseRateAction:initWithAction"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseRateAction:initWithAction"); if(!ok) @@ -30745,7 +32277,7 @@ int lua_cocos2dx_EaseRateAction_create(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseRateAction:create"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseRateAction:create"); if(!ok) { @@ -30806,7 +32338,7 @@ int lua_cocos2dx_EaseIn_create(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseIn:create"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseIn:create"); if(!ok) { @@ -30902,7 +32434,7 @@ int lua_cocos2dx_EaseOut_create(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseOut:create"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseOut:create"); if(!ok) { @@ -30998,7 +32530,7 @@ int lua_cocos2dx_EaseInOut_create(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseInOut:create"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseInOut:create"); if(!ok) { @@ -31093,7 +32625,7 @@ int lua_cocos2dx_EaseExponentialIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseExponentialIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseExponentialIn_create'", nullptr); @@ -31187,7 +32719,7 @@ int lua_cocos2dx_EaseExponentialOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseExponentialOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseExponentialOut_create'", nullptr); @@ -31281,7 +32813,7 @@ int lua_cocos2dx_EaseExponentialInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseExponentialInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseExponentialInOut_create'", nullptr); @@ -31375,7 +32907,7 @@ int lua_cocos2dx_EaseSineIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseSineIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseSineIn_create'", nullptr); @@ -31469,7 +33001,7 @@ int lua_cocos2dx_EaseSineOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseSineOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseSineOut_create'", nullptr); @@ -31563,7 +33095,7 @@ int lua_cocos2dx_EaseSineInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseSineInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseSineInOut_create'", nullptr); @@ -31719,7 +33251,7 @@ int lua_cocos2dx_EaseElastic_initWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElastic:initWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseElastic_initWithAction'", nullptr); @@ -31734,7 +33266,7 @@ int lua_cocos2dx_EaseElastic_initWithAction(lua_State* tolua_S) cocos2d::ActionInterval* arg0; double arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElastic:initWithAction"); ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseElastic:initWithAction"); if(!ok) @@ -31844,7 +33376,7 @@ int lua_cocos2dx_EaseElasticIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElasticIn:create"); if (!ok) { break; } cocos2d::EaseElasticIn* ret = cocos2d::EaseElasticIn::create(arg0); object_to_luaval(tolua_S, "cc.EaseElasticIn",(cocos2d::EaseElasticIn*)ret); @@ -31857,7 +33389,7 @@ int lua_cocos2dx_EaseElasticIn_create(lua_State* tolua_S) if (argc == 2) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElasticIn:create"); if (!ok) { break; } double arg1; ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseElasticIn:create"); @@ -31953,7 +33485,7 @@ int lua_cocos2dx_EaseElasticOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElasticOut:create"); if (!ok) { break; } cocos2d::EaseElasticOut* ret = cocos2d::EaseElasticOut::create(arg0); object_to_luaval(tolua_S, "cc.EaseElasticOut",(cocos2d::EaseElasticOut*)ret); @@ -31966,7 +33498,7 @@ int lua_cocos2dx_EaseElasticOut_create(lua_State* tolua_S) if (argc == 2) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElasticOut:create"); if (!ok) { break; } double arg1; ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseElasticOut:create"); @@ -32062,7 +33594,7 @@ int lua_cocos2dx_EaseElasticInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElasticInOut:create"); if (!ok) { break; } cocos2d::EaseElasticInOut* ret = cocos2d::EaseElasticInOut::create(arg0); object_to_luaval(tolua_S, "cc.EaseElasticInOut",(cocos2d::EaseElasticInOut*)ret); @@ -32075,7 +33607,7 @@ int lua_cocos2dx_EaseElasticInOut_create(lua_State* tolua_S) if (argc == 2) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseElasticInOut:create"); if (!ok) { break; } double arg1; ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.EaseElasticInOut:create"); @@ -32189,7 +33721,7 @@ int lua_cocos2dx_EaseBounceIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseBounceIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseBounceIn_create'", nullptr); @@ -32283,7 +33815,7 @@ int lua_cocos2dx_EaseBounceOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseBounceOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseBounceOut_create'", nullptr); @@ -32377,7 +33909,7 @@ int lua_cocos2dx_EaseBounceInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseBounceInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseBounceInOut_create'", nullptr); @@ -32471,7 +34003,7 @@ int lua_cocos2dx_EaseBackIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseBackIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseBackIn_create'", nullptr); @@ -32565,7 +34097,7 @@ int lua_cocos2dx_EaseBackOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseBackOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseBackOut_create'", nullptr); @@ -32659,7 +34191,7 @@ int lua_cocos2dx_EaseBackInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseBackInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseBackInOut_create'", nullptr); @@ -32812,7 +34344,7 @@ int lua_cocos2dx_EaseBezierAction_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseBezierAction:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseBezierAction_create'", nullptr); @@ -32907,7 +34439,7 @@ int lua_cocos2dx_EaseQuadraticActionIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuadraticActionIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuadraticActionIn_create'", nullptr); @@ -33001,7 +34533,7 @@ int lua_cocos2dx_EaseQuadraticActionOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuadraticActionOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuadraticActionOut_create'", nullptr); @@ -33095,7 +34627,7 @@ int lua_cocos2dx_EaseQuadraticActionInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuadraticActionInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuadraticActionInOut_create'", nullptr); @@ -33189,7 +34721,7 @@ int lua_cocos2dx_EaseQuarticActionIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuarticActionIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuarticActionIn_create'", nullptr); @@ -33283,7 +34815,7 @@ int lua_cocos2dx_EaseQuarticActionOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuarticActionOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuarticActionOut_create'", nullptr); @@ -33377,7 +34909,7 @@ int lua_cocos2dx_EaseQuarticActionInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuarticActionInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuarticActionInOut_create'", nullptr); @@ -33471,7 +35003,7 @@ int lua_cocos2dx_EaseQuinticActionIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuinticActionIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuinticActionIn_create'", nullptr); @@ -33565,7 +35097,7 @@ int lua_cocos2dx_EaseQuinticActionOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuinticActionOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuinticActionOut_create'", nullptr); @@ -33659,7 +35191,7 @@ int lua_cocos2dx_EaseQuinticActionInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseQuinticActionInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseQuinticActionInOut_create'", nullptr); @@ -33753,7 +35285,7 @@ int lua_cocos2dx_EaseCircleActionIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseCircleActionIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseCircleActionIn_create'", nullptr); @@ -33847,7 +35379,7 @@ int lua_cocos2dx_EaseCircleActionOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseCircleActionOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseCircleActionOut_create'", nullptr); @@ -33941,7 +35473,7 @@ int lua_cocos2dx_EaseCircleActionInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseCircleActionInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseCircleActionInOut_create'", nullptr); @@ -34035,7 +35567,7 @@ int lua_cocos2dx_EaseCubicActionIn_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseCubicActionIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseCubicActionIn_create'", nullptr); @@ -34129,7 +35661,7 @@ int lua_cocos2dx_EaseCubicActionOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseCubicActionOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseCubicActionOut_create'", nullptr); @@ -34223,7 +35755,7 @@ int lua_cocos2dx_EaseCubicActionInOut_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.EaseCubicActionInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_EaseCubicActionInOut_create'", nullptr); @@ -35309,7 +36841,7 @@ int lua_cocos2dx_CallFunc_setTargetCallback(lua_State* tolua_S) { cocos2d::Ref* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.CallFunc:setTargetCallback"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_CallFunc_setTargetCallback'", nullptr); @@ -38693,7 +40225,7 @@ int lua_cocos2dx_ActionManager_getActionByTag(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:getActionByTag"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.ActionManager:getActionByTag"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_getActionByTag'", nullptr); @@ -38746,7 +40278,7 @@ int lua_cocos2dx_ActionManager_removeActionByTag(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeActionByTag"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.ActionManager:removeActionByTag"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeActionByTag'", nullptr); @@ -38845,9 +40377,9 @@ int lua_cocos2dx_ActionManager_addAction(lua_State* tolua_S) cocos2d::Node* arg1; bool arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0, "cc.ActionManager:addAction"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.ActionManager:addAction"); ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.ActionManager:addAction"); if(!ok) @@ -38899,7 +40431,7 @@ int lua_cocos2dx_ActionManager_resumeTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ActionManager:resumeTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_resumeTarget'", nullptr); @@ -38999,7 +40531,7 @@ int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ActionManager:pauseTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); @@ -39049,7 +40581,7 @@ int lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(lua_State* tolu { const cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ActionManager:getNumberOfRunningActionsInTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget'", nullptr); @@ -39099,7 +40631,7 @@ int lua_cocos2dx_ActionManager_removeAllActionsFromTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ActionManager:removeAllActionsFromTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAllActionsFromTarget'", nullptr); @@ -39199,7 +40731,7 @@ int lua_cocos2dx_ActionManager_removeAction(lua_State* tolua_S) { cocos2d::Action* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0, "cc.ActionManager:removeAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAction'", nullptr); @@ -39252,7 +40784,7 @@ int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeAllActionsByTag"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.ActionManager:removeAllActionsByTag"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); @@ -42602,7 +44134,7 @@ int lua_cocos2dx_GLProgramState_setUniformVec4v(lua_State* tolua_S) if (!ok) { break; } const cocos2d::Vec4* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2, "cc.GLProgramState:setUniformVec4v"); if (!ok) { break; } cobj->setUniformVec4v(arg0, arg1, arg2); @@ -42622,7 +44154,7 @@ int lua_cocos2dx_GLProgramState_setUniformVec4v(lua_State* tolua_S) if (!ok) { break; } const cocos2d::Vec4* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Vec4",&arg2, "cc.GLProgramState:setUniformVec4v"); if (!ok) { break; } cobj->setUniformVec4v(arg0, arg1, arg2); @@ -42786,7 +44318,7 @@ int lua_cocos2dx_GLProgramState_setUniformVec2v(lua_State* tolua_S) if (!ok) { break; } const cocos2d::Vec2* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2, "cc.GLProgramState:setUniformVec2v"); if (!ok) { break; } cobj->setUniformVec2v(arg0, arg1, arg2); @@ -42806,7 +44338,7 @@ int lua_cocos2dx_GLProgramState_setUniformVec2v(lua_State* tolua_S) if (!ok) { break; } const cocos2d::Vec2* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Vec2",&arg2, "cc.GLProgramState:setUniformVec2v"); if (!ok) { break; } cobj->setUniformVec2v(arg0, arg1, arg2); @@ -43010,7 +44542,7 @@ int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) { cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0, "cc.GLProgramState:setGLProgram"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); @@ -43194,7 +44726,7 @@ int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.GLProgramState:setUniformTexture"); if (!ok) { break; } cobj->setUniformTexture(arg0, arg1); @@ -43210,7 +44742,7 @@ int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.GLProgramState:setUniformTexture"); if (!ok) { break; } cobj->setUniformTexture(arg0, arg1); @@ -43450,7 +44982,7 @@ int lua_cocos2dx_GLProgramState_setUniformVec3v(lua_State* tolua_S) if (!ok) { break; } const cocos2d::Vec3* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2, "cc.GLProgramState:setUniformVec3v"); if (!ok) { break; } cobj->setUniformVec3v(arg0, arg1, arg2); @@ -43470,7 +45002,7 @@ int lua_cocos2dx_GLProgramState_setUniformVec3v(lua_State* tolua_S) if (!ok) { break; } const cocos2d::Vec3* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2, "cc.GLProgramState:setUniformVec3v"); if (!ok) { break; } cobj->setUniformVec3v(arg0, arg1, arg2); @@ -43554,7 +45086,7 @@ int lua_cocos2dx_GLProgramState_create(lua_State* tolua_S) if (argc == 1) { cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0, "cc.GLProgramState:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_create'", nullptr); @@ -43626,7 +45158,7 @@ int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(lua_State* tolua_S) if (argc == 1) { cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0, "cc.GLProgramState:getOrCreateWithGLProgram"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'", nullptr); @@ -43911,7 +45443,7 @@ int lua_cocos2dx_AtlasNode_setTextureAtlas(lua_State* tolua_S) { cocos2d::TextureAtlas* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0, "cc.AtlasNode:setTextureAtlas"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'", nullptr); @@ -44152,7 +45684,7 @@ int lua_cocos2dx_AtlasNode_setTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.AtlasNode:setTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_AtlasNode_setTexture'", nullptr); @@ -44205,7 +45737,7 @@ int lua_cocos2dx_AtlasNode_initWithTexture(lua_State* tolua_S) int arg2; int arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.AtlasNode:initWithTexture"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.AtlasNode:initWithTexture"); @@ -44519,7 +46051,7 @@ int lua_cocos2dx_ClippingNode_setStencil(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ClippingNode:setStencil"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_setStencil'", nullptr); @@ -44616,7 +46148,7 @@ int lua_cocos2dx_ClippingNode_init(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ClippingNode:init"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ClippingNode_init'", nullptr); @@ -44799,7 +46331,7 @@ int lua_cocos2dx_ClippingNode_create(lua_State* tolua_S) if (argc == 1) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ClippingNode:create"); if (!ok) { break; } cocos2d::ClippingNode* ret = cocos2d::ClippingNode::create(arg0); object_to_luaval(tolua_S, "cc.ClippingNode",(cocos2d::ClippingNode*)ret); @@ -46304,7 +47836,7 @@ int lua_cocos2dx_SpriteBatchNode_appendChild(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:appendChild"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_appendChild'", nullptr); @@ -46451,7 +47983,7 @@ int lua_cocos2dx_SpriteBatchNode_setTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteBatchNode:setTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_setTexture'", nullptr); @@ -46554,7 +48086,7 @@ int lua_cocos2dx_SpriteBatchNode_removeSpriteFromAtlas(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:removeSpriteFromAtlas"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_removeSpriteFromAtlas'", nullptr); @@ -46606,7 +48138,7 @@ int lua_cocos2dx_SpriteBatchNode_addSpriteWithoutQuad(lua_State* tolua_S) int arg1; int arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:addSpriteWithoutQuad"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.SpriteBatchNode:addSpriteWithoutQuad"); @@ -46661,7 +48193,7 @@ int lua_cocos2dx_SpriteBatchNode_atlasIndexForChild(lua_State* tolua_S) cocos2d::Sprite* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:atlasIndexForChild"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.SpriteBatchNode:atlasIndexForChild"); if(!ok) @@ -46760,7 +48292,7 @@ int lua_cocos2dx_SpriteBatchNode_lowestAtlasIndexInChild(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:lowestAtlasIndexInChild"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_lowestAtlasIndexInChild'", nullptr); @@ -46857,7 +48389,7 @@ int lua_cocos2dx_SpriteBatchNode_initWithTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteBatchNode:initWithTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_initWithTexture'", nullptr); @@ -46872,7 +48404,7 @@ int lua_cocos2dx_SpriteBatchNode_initWithTexture(lua_State* tolua_S) cocos2d::Texture2D* arg0; ssize_t arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteBatchNode:initWithTexture"); ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.SpriteBatchNode:initWithTexture"); if(!ok) @@ -46924,7 +48456,7 @@ int lua_cocos2dx_SpriteBatchNode_setTextureAtlas(lua_State* tolua_S) { cocos2d::TextureAtlas* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0, "cc.SpriteBatchNode:setTextureAtlas"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_setTextureAtlas'", nullptr); @@ -47025,7 +48557,7 @@ int lua_cocos2dx_SpriteBatchNode_insertQuadFromSprite(lua_State* tolua_S) cocos2d::Sprite* arg0; ssize_t arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:insertQuadFromSprite"); ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.SpriteBatchNode:insertQuadFromSprite"); if(!ok) @@ -47195,7 +48727,7 @@ int lua_cocos2dx_SpriteBatchNode_rebuildIndexInOrder(lua_State* tolua_S) cocos2d::Sprite* arg0; ssize_t arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:rebuildIndexInOrder"); ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.SpriteBatchNode:rebuildIndexInOrder"); if(!ok) @@ -47294,7 +48826,7 @@ int lua_cocos2dx_SpriteBatchNode_highestAtlasIndexInChild(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.SpriteBatchNode:highestAtlasIndexInChild"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_highestAtlasIndexInChild'", nullptr); @@ -47383,7 +48915,7 @@ int lua_cocos2dx_SpriteBatchNode_createWithTexture(lua_State* tolua_S) if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteBatchNode:createWithTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteBatchNode_createWithTexture'", nullptr); @@ -47397,7 +48929,7 @@ int lua_cocos2dx_SpriteBatchNode_createWithTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; ssize_t arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteBatchNode:createWithTexture"); ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.SpriteBatchNode:createWithTexture"); if(!ok) { @@ -48772,7 +50304,7 @@ int lua_cocos2dx_Label_setCharMap(lua_State* tolua_S) do{ if (argc == 4) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Label:setCharMap"); if (!ok) { break; } int arg1; @@ -49916,7 +51448,7 @@ int lua_cocos2dx_Label_createWithCharMap(lua_State* tolua_S) if (argc == 4) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Label:createWithCharMap"); if (!ok) { break; } int arg1; ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Label:createWithCharMap"); @@ -50268,7 +51800,7 @@ int lua_cocos2dx_LabelAtlas_initWithString(lua_State* tolua_S) if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.LabelAtlas:initWithString"); if (!ok) { break; } int arg2; @@ -51930,7 +53462,7 @@ int lua_cocos2dx_LayerMultiplex_addLayer(lua_State* tolua_S) { cocos2d::Layer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Layer",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Layer",&arg0, "cc.LayerMultiplex:addLayer"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_LayerMultiplex_addLayer'", nullptr); @@ -52487,7 +54019,7 @@ int lua_cocos2dx_MenuItemLabel_setLabel(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.MenuItemLabel:setLabel"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemLabel_setLabel'", nullptr); @@ -52635,7 +54167,7 @@ int lua_cocos2dx_MenuItemLabel_initWithLabel(lua_State* tolua_S) cocos2d::Node* arg0; std::function arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.MenuItemLabel:initWithLabel"); do { // Lambda binding for lua is not supported. @@ -53532,7 +55064,7 @@ int lua_cocos2dx_MenuItemSprite_setNormalImage(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.MenuItemSprite:setNormalImage"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemSprite_setNormalImage'", nullptr); @@ -53582,7 +55114,7 @@ int lua_cocos2dx_MenuItemSprite_setDisabledImage(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.MenuItemSprite:setDisabledImage"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemSprite_setDisabledImage'", nullptr); @@ -53635,11 +55167,11 @@ int lua_cocos2dx_MenuItemSprite_initWithNormalSprite(lua_State* tolua_S) cocos2d::Node* arg2; std::function arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.MenuItemSprite:initWithNormalSprite"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.MenuItemSprite:initWithNormalSprite"); - ok &= luaval_to_object(tolua_S, 4, "cc.Node",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Node",&arg2, "cc.MenuItemSprite:initWithNormalSprite"); do { // Lambda binding for lua is not supported. @@ -53695,7 +55227,7 @@ int lua_cocos2dx_MenuItemSprite_setSelectedImage(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.MenuItemSprite:setSelectedImage"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemSprite_setSelectedImage'", nullptr); @@ -54000,7 +55532,7 @@ int lua_cocos2dx_MenuItemImage_setDisabledSpriteFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.MenuItemImage:setDisabledSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemImage_setDisabledSpriteFrame'", nullptr); @@ -54050,7 +55582,7 @@ int lua_cocos2dx_MenuItemImage_setSelectedSpriteFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.MenuItemImage:setSelectedSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemImage_setSelectedSpriteFrame'", nullptr); @@ -54100,7 +55632,7 @@ int lua_cocos2dx_MenuItemImage_setNormalSpriteFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.MenuItemImage:setNormalSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemImage_setNormalSpriteFrame'", nullptr); @@ -54372,7 +55904,7 @@ int lua_cocos2dx_MenuItemToggle_initWithItem(lua_State* tolua_S) { cocos2d::MenuItem* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.MenuItem",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.MenuItem",&arg0, "cc.MenuItemToggle:initWithItem"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemToggle_initWithItem'", nullptr); @@ -54469,7 +56001,7 @@ int lua_cocos2dx_MenuItemToggle_addSubItem(lua_State* tolua_S) { cocos2d::MenuItem* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.MenuItem",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.MenuItem",&arg0, "cc.MenuItemToggle:addSubItem"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MenuItemToggle_addSubItem'", nullptr); @@ -55131,7 +56663,7 @@ int lua_cocos2dx_MotionStreak_setTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.MotionStreak:setTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MotionStreak_setTexture'", nullptr); @@ -55576,7 +57108,7 @@ int lua_cocos2dx_MotionStreak_initWithFade(lua_State* tolua_S) if (!ok) { break; } cocos2d::Texture2D* arg4; - ok &= luaval_to_object(tolua_S, 6, "cc.Texture2D",&arg4); + ok &= luaval_to_object(tolua_S, 6, "cc.Texture2D",&arg4, "cc.MotionStreak:initWithFade"); if (!ok) { break; } bool ret = cobj->initWithFade(arg0, arg1, arg2, arg3, arg4); @@ -55754,7 +57286,7 @@ int lua_cocos2dx_MotionStreak_create(lua_State* tolua_S) ok &= luaval_to_color3b(tolua_S, 5, &arg3, "cc.MotionStreak:create"); if (!ok) { break; } cocos2d::Texture2D* arg4; - ok &= luaval_to_object(tolua_S, 6, "cc.Texture2D",&arg4); + ok &= luaval_to_object(tolua_S, 6, "cc.Texture2D",&arg4, "cc.MotionStreak:create"); if (!ok) { break; } cocos2d::MotionStreak* ret = cocos2d::MotionStreak::create(arg0, arg1, arg2, arg3, arg4); object_to_luaval(tolua_S, "cc.MotionStreak",(cocos2d::MotionStreak*)ret); @@ -55896,7 +57428,7 @@ int lua_cocos2dx_NodeGrid_setTarget(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.NodeGrid:setTarget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_NodeGrid_setTarget'", nullptr); @@ -55993,7 +57525,7 @@ int lua_cocos2dx_NodeGrid_setGrid(lua_State* tolua_S) { cocos2d::GridBase* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GridBase",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GridBase",&arg0, "cc.NodeGrid:setGrid"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_NodeGrid_setGrid'", nullptr); @@ -56138,7 +57670,7 @@ int lua_cocos2dx_ParticleBatchNode_setTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.ParticleBatchNode:setTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleBatchNode_setTexture'", nullptr); @@ -56189,7 +57721,7 @@ int lua_cocos2dx_ParticleBatchNode_initWithTexture(lua_State* tolua_S) cocos2d::Texture2D* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.ParticleBatchNode:initWithTexture"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ParticleBatchNode:initWithTexture"); if(!ok) @@ -56338,7 +57870,7 @@ int lua_cocos2dx_ParticleBatchNode_setTextureAtlas(lua_State* tolua_S) { cocos2d::TextureAtlas* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0, "cc.ParticleBatchNode:setTextureAtlas"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleBatchNode_setTextureAtlas'", nullptr); @@ -56636,7 +58168,7 @@ int lua_cocos2dx_ParticleBatchNode_insertChild(lua_State* tolua_S) cocos2d::ParticleSystem* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.ParticleSystem",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ParticleSystem",&arg0, "cc.ParticleBatchNode:insertChild"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ParticleBatchNode:insertChild"); if(!ok) @@ -56780,7 +58312,7 @@ int lua_cocos2dx_ParticleBatchNode_createWithTexture(lua_State* tolua_S) if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.ParticleBatchNode:createWithTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleBatchNode_createWithTexture'", nullptr); @@ -56794,7 +58326,7 @@ int lua_cocos2dx_ParticleBatchNode_createWithTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.ParticleBatchNode:createWithTexture"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ParticleBatchNode:createWithTexture"); if(!ok) { @@ -58169,7 +59701,7 @@ int lua_cocos2dx_ParticleSystem_setTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.ParticleSystem:setTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleSystem_setTexture'", nullptr); @@ -59874,7 +61406,7 @@ int lua_cocos2dx_ParticleSystem_setBatchNode(lua_State* tolua_S) { cocos2d::ParticleBatchNode* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ParticleBatchNode",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ParticleBatchNode",&arg0, "cc.ParticleSystem:setBatchNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleSystem_setBatchNode'", nullptr); @@ -61848,7 +63380,7 @@ int lua_cocos2dx_ParticleSystemQuad_setDisplayFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.ParticleSystemQuad:setDisplayFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleSystemQuad_setDisplayFrame'", nullptr); @@ -61899,7 +63431,7 @@ int lua_cocos2dx_ParticleSystemQuad_setTextureWithRect(lua_State* tolua_S) cocos2d::Texture2D* arg0; cocos2d::Rect arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.ParticleSystemQuad:setTextureWithRect"); ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.ParticleSystemQuad:setTextureWithRect"); if(!ok) @@ -61951,7 +63483,7 @@ int lua_cocos2dx_ParticleSystemQuad_listenRendererRecreated(lua_State* tolua_S) { cocos2d::EventCustom* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.EventCustom",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.EventCustom",&arg0, "cc.ParticleSystemQuad:listenRendererRecreated"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParticleSystemQuad_listenRendererRecreated'", nullptr); @@ -64566,7 +66098,7 @@ int lua_cocos2dx_ProgressTimer_initWithSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ProgressTimer:initWithSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_initWithSprite'", nullptr); @@ -64760,7 +66292,7 @@ int lua_cocos2dx_ProgressTimer_setSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ProgressTimer:setSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); @@ -65191,7 +66723,7 @@ int lua_cocos2dx_ProgressTimer_create(lua_State* tolua_S) if (argc == 1) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ProgressTimer:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_create'", nullptr); @@ -65304,7 +66836,7 @@ int lua_cocos2dx_ProtectedNode_addProtectedChild(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ProtectedNode:addProtectedChild"); if (!ok) { break; } int arg1; @@ -65320,7 +66852,7 @@ int lua_cocos2dx_ProtectedNode_addProtectedChild(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ProtectedNode:addProtectedChild"); if (!ok) { break; } cobj->addProtectedChild(arg0); @@ -65332,7 +66864,7 @@ int lua_cocos2dx_ProtectedNode_addProtectedChild(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ProtectedNode:addProtectedChild"); if (!ok) { break; } int arg1; @@ -65504,7 +67036,7 @@ int lua_cocos2dx_ProtectedNode_reorderProtectedChild(lua_State* tolua_S) cocos2d::Node* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ProtectedNode:reorderProtectedChild"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:reorderProtectedChild"); if(!ok) @@ -65750,7 +67282,7 @@ int lua_cocos2dx_ProtectedNode_removeProtectedChild(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ProtectedNode:removeProtectedChild"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); @@ -65765,7 +67297,7 @@ int lua_cocos2dx_ProtectedNode_removeProtectedChild(lua_State* tolua_S) cocos2d::Node* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ProtectedNode:removeProtectedChild"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChild"); if(!ok) @@ -65960,7 +67492,7 @@ int lua_cocos2dx_Sprite_setSpriteFrame(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.Sprite:setSpriteFrame"); if (!ok) { break; } cobj->setSpriteFrame(arg0); @@ -66015,7 +67547,7 @@ int lua_cocos2dx_Sprite_setTexture(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite:setTexture"); if (!ok) { break; } cobj->setTexture(arg0); @@ -66217,7 +67749,7 @@ int lua_cocos2dx_Sprite_initWithTexture(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite:initWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; @@ -66233,7 +67765,7 @@ int lua_cocos2dx_Sprite_initWithTexture(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite:initWithTexture"); if (!ok) { break; } bool ret = cobj->initWithTexture(arg0); @@ -66245,7 +67777,7 @@ int lua_cocos2dx_Sprite_initWithTexture(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite:initWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; @@ -66559,7 +68091,7 @@ int lua_cocos2dx_Sprite_isFrameDisplayed(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.Sprite:isFrameDisplayed"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_isFrameDisplayed'", nullptr); @@ -66656,7 +68188,7 @@ int lua_cocos2dx_Sprite_setBatchNode(lua_State* tolua_S) { cocos2d::SpriteBatchNode* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteBatchNode",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteBatchNode",&arg0, "cc.Sprite:setBatchNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setBatchNode'", nullptr); @@ -66806,7 +68338,7 @@ int lua_cocos2dx_Sprite_setTextureAtlas(lua_State* tolua_S) { cocos2d::TextureAtlas* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0, "cc.Sprite:setTextureAtlas"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_setTextureAtlas'", nullptr); @@ -67300,7 +68832,7 @@ int lua_cocos2dx_Sprite_initWithSpriteFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.Sprite:initWithSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_initWithSpriteFrame'", nullptr); @@ -67544,7 +69076,7 @@ int lua_cocos2dx_Sprite_createWithTexture(lua_State* tolua_S) if (argc == 2) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite:createWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:createWithTexture"); @@ -67560,7 +69092,7 @@ int lua_cocos2dx_Sprite_createWithTexture(lua_State* tolua_S) if (argc == 3) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite:createWithTexture"); if (!ok) { break; } cocos2d::Rect arg1; ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Sprite:createWithTexture"); @@ -67579,7 +69111,7 @@ int lua_cocos2dx_Sprite_createWithTexture(lua_State* tolua_S) if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Sprite:createWithTexture"); if (!ok) { break; } cocos2d::Sprite* ret = cocos2d::Sprite::createWithTexture(arg0); object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); @@ -67649,7 +69181,7 @@ int lua_cocos2dx_Sprite_createWithSpriteFrame(lua_State* tolua_S) if (argc == 1) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.Sprite:createWithSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Sprite_createWithSpriteFrame'", nullptr); @@ -68730,7 +70262,7 @@ int lua_cocos2dx_RenderTexture_setSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.RenderTexture:setSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderTexture_setSprite'", nullptr); @@ -69980,7 +71512,7 @@ int lua_cocos2dx_TransitionEaseScene_easeActionWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.TransitionEaseScene:easeActionWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionEaseScene_easeActionWithAction'", nullptr); @@ -70147,7 +71679,7 @@ int lua_cocos2dx_TransitionScene_initWithDuration(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionScene:initWithDuration"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionScene:initWithDuration"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_initWithDuration'", nullptr); @@ -70281,7 +71813,7 @@ int lua_cocos2dx_TransitionScene_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionScene:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionScene:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionScene_create'", nullptr); @@ -70396,7 +71928,7 @@ int lua_cocos2dx_TransitionSceneOriented_initWithDuration(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSceneOriented:initWithDuration"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSceneOriented:initWithDuration"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionSceneOriented:initWithDuration"); if(!ok) @@ -70439,7 +71971,7 @@ int lua_cocos2dx_TransitionSceneOriented_create(lua_State* tolua_S) cocos2d::Scene* arg1; cocos2d::TransitionScene::Orientation arg2; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSceneOriented:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSceneOriented:create"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionSceneOriented:create"); if(!ok) { @@ -70537,7 +72069,7 @@ int lua_cocos2dx_TransitionRotoZoom_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionRotoZoom:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionRotoZoom:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionRotoZoom_create'", nullptr); @@ -70633,7 +72165,7 @@ int lua_cocos2dx_TransitionJumpZoom_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionJumpZoom:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionJumpZoom:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionJumpZoom_create'", nullptr); @@ -70786,7 +72318,7 @@ int lua_cocos2dx_TransitionMoveInL_easeActionWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.TransitionMoveInL:easeActionWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInL_easeActionWithAction'", nullptr); @@ -70826,7 +72358,7 @@ int lua_cocos2dx_TransitionMoveInL_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionMoveInL:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionMoveInL:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInL_create'", nullptr); @@ -70924,7 +72456,7 @@ int lua_cocos2dx_TransitionMoveInR_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionMoveInR:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionMoveInR:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInR_create'", nullptr); @@ -71020,7 +72552,7 @@ int lua_cocos2dx_TransitionMoveInT_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionMoveInT:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionMoveInT:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInT_create'", nullptr); @@ -71116,7 +72648,7 @@ int lua_cocos2dx_TransitionMoveInB_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionMoveInB:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionMoveInB:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionMoveInB_create'", nullptr); @@ -71269,7 +72801,7 @@ int lua_cocos2dx_TransitionSlideInL_easeActionWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.TransitionSlideInL:easeActionWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInL_easeActionWithAction'", nullptr); @@ -71309,7 +72841,7 @@ int lua_cocos2dx_TransitionSlideInL_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSlideInL:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSlideInL:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInL_create'", nullptr); @@ -71407,7 +72939,7 @@ int lua_cocos2dx_TransitionSlideInR_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSlideInR:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSlideInR:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInR_create'", nullptr); @@ -71503,7 +73035,7 @@ int lua_cocos2dx_TransitionSlideInB_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSlideInB:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSlideInB:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInB_create'", nullptr); @@ -71599,7 +73131,7 @@ int lua_cocos2dx_TransitionSlideInT_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSlideInT:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSlideInT:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSlideInT_create'", nullptr); @@ -71705,7 +73237,7 @@ int lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.TransitionShrinkGrow:easeActionWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionShrinkGrow_easeActionWithAction'", nullptr); @@ -71745,7 +73277,7 @@ int lua_cocos2dx_TransitionShrinkGrow_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionShrinkGrow:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionShrinkGrow:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionShrinkGrow_create'", nullptr); @@ -71844,7 +73376,7 @@ int lua_cocos2dx_TransitionFlipX_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFlipX:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFlipX:create"); if (!ok) { break; } cocos2d::TransitionFlipX* ret = cocos2d::TransitionFlipX::create(arg0, arg1); object_to_luaval(tolua_S, "cc.TransitionFlipX",(cocos2d::TransitionFlipX*)ret); @@ -71860,7 +73392,7 @@ int lua_cocos2dx_TransitionFlipX_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFlipX:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFlipX:create"); if (!ok) { break; } cocos2d::TransitionScene::Orientation arg2; ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipX:create"); @@ -71959,7 +73491,7 @@ int lua_cocos2dx_TransitionFlipY_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFlipY:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFlipY:create"); if (!ok) { break; } cocos2d::TransitionFlipY* ret = cocos2d::TransitionFlipY::create(arg0, arg1); object_to_luaval(tolua_S, "cc.TransitionFlipY",(cocos2d::TransitionFlipY*)ret); @@ -71975,7 +73507,7 @@ int lua_cocos2dx_TransitionFlipY_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFlipY:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFlipY:create"); if (!ok) { break; } cocos2d::TransitionScene::Orientation arg2; ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipY:create"); @@ -72074,7 +73606,7 @@ int lua_cocos2dx_TransitionFlipAngular_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFlipAngular:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFlipAngular:create"); if (!ok) { break; } cocos2d::TransitionFlipAngular* ret = cocos2d::TransitionFlipAngular::create(arg0, arg1); object_to_luaval(tolua_S, "cc.TransitionFlipAngular",(cocos2d::TransitionFlipAngular*)ret); @@ -72090,7 +73622,7 @@ int lua_cocos2dx_TransitionFlipAngular_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFlipAngular:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFlipAngular:create"); if (!ok) { break; } cocos2d::TransitionScene::Orientation arg2; ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionFlipAngular:create"); @@ -72189,7 +73721,7 @@ int lua_cocos2dx_TransitionZoomFlipX_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionZoomFlipX:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionZoomFlipX:create"); if (!ok) { break; } cocos2d::TransitionZoomFlipX* ret = cocos2d::TransitionZoomFlipX::create(arg0, arg1); object_to_luaval(tolua_S, "cc.TransitionZoomFlipX",(cocos2d::TransitionZoomFlipX*)ret); @@ -72205,7 +73737,7 @@ int lua_cocos2dx_TransitionZoomFlipX_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionZoomFlipX:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionZoomFlipX:create"); if (!ok) { break; } cocos2d::TransitionScene::Orientation arg2; ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipX:create"); @@ -72304,7 +73836,7 @@ int lua_cocos2dx_TransitionZoomFlipY_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionZoomFlipY:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionZoomFlipY:create"); if (!ok) { break; } cocos2d::TransitionZoomFlipY* ret = cocos2d::TransitionZoomFlipY::create(arg0, arg1); object_to_luaval(tolua_S, "cc.TransitionZoomFlipY",(cocos2d::TransitionZoomFlipY*)ret); @@ -72320,7 +73852,7 @@ int lua_cocos2dx_TransitionZoomFlipY_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionZoomFlipY:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionZoomFlipY:create"); if (!ok) { break; } cocos2d::TransitionScene::Orientation arg2; ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipY:create"); @@ -72419,7 +73951,7 @@ int lua_cocos2dx_TransitionZoomFlipAngular_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionZoomFlipAngular:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionZoomFlipAngular:create"); if (!ok) { break; } cocos2d::TransitionZoomFlipAngular* ret = cocos2d::TransitionZoomFlipAngular::create(arg0, arg1); object_to_luaval(tolua_S, "cc.TransitionZoomFlipAngular",(cocos2d::TransitionZoomFlipAngular*)ret); @@ -72435,7 +73967,7 @@ int lua_cocos2dx_TransitionZoomFlipAngular_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionZoomFlipAngular:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionZoomFlipAngular:create"); if (!ok) { break; } cocos2d::TransitionScene::Orientation arg2; ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TransitionZoomFlipAngular:create"); @@ -72540,7 +74072,7 @@ int lua_cocos2dx_TransitionFade_initWithDuration(lua_State* tolua_S) if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFade:initWithDuration"); if (!ok) { break; } bool ret = cobj->initWithDuration(arg0, arg1); @@ -72556,7 +74088,7 @@ int lua_cocos2dx_TransitionFade_initWithDuration(lua_State* tolua_S) if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFade:initWithDuration"); if (!ok) { break; } cocos2d::Color3B arg2; @@ -72601,7 +74133,7 @@ int lua_cocos2dx_TransitionFade_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFade:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFade:create"); if (!ok) { break; } cocos2d::TransitionFade* ret = cocos2d::TransitionFade::create(arg0, arg1); object_to_luaval(tolua_S, "cc.TransitionFade",(cocos2d::TransitionFade*)ret); @@ -72617,7 +74149,7 @@ int lua_cocos2dx_TransitionFade_create(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFade:create"); if (!ok) { break; } cocos2d::Scene* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFade:create"); if (!ok) { break; } cocos2d::Color3B arg2; ok &= luaval_to_color3b(tolua_S, 4, &arg2, "cc.TransitionFade:create"); @@ -72715,7 +74247,7 @@ int lua_cocos2dx_TransitionCrossFade_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionCrossFade:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionCrossFade:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionCrossFade_create'", nullptr); @@ -72821,7 +74353,7 @@ int lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.TransitionTurnOffTiles:easeActionWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionTurnOffTiles_easeActionWithAction'", nullptr); @@ -72861,7 +74393,7 @@ int lua_cocos2dx_TransitionTurnOffTiles_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionTurnOffTiles:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionTurnOffTiles:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionTurnOffTiles_create'", nullptr); @@ -73015,7 +74547,7 @@ int lua_cocos2dx_TransitionSplitCols_easeActionWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.TransitionSplitCols:easeActionWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitCols_easeActionWithAction'", nullptr); @@ -73055,7 +74587,7 @@ int lua_cocos2dx_TransitionSplitCols_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSplitCols:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSplitCols:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitCols_create'", nullptr); @@ -73153,7 +74685,7 @@ int lua_cocos2dx_TransitionSplitRows_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionSplitRows:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionSplitRows:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionSplitRows_create'", nullptr); @@ -73259,7 +74791,7 @@ int lua_cocos2dx_TransitionFadeTR_easeActionWithAction(lua_State* tolua_S) { cocos2d::ActionInterval* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ActionInterval",&arg0, "cc.TransitionFadeTR:easeActionWithAction"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_easeActionWithAction'", nullptr); @@ -73349,7 +74881,7 @@ int lua_cocos2dx_TransitionFadeTR_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFadeTR:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFadeTR:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeTR_create'", nullptr); @@ -73447,7 +74979,7 @@ int lua_cocos2dx_TransitionFadeBL_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFadeBL:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFadeBL:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeBL_create'", nullptr); @@ -73543,7 +75075,7 @@ int lua_cocos2dx_TransitionFadeUp_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFadeUp:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFadeUp:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeUp_create'", nullptr); @@ -73639,7 +75171,7 @@ int lua_cocos2dx_TransitionFadeDown_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionFadeDown:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionFadeDown:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionFadeDown_create'", nullptr); @@ -73799,7 +75331,7 @@ int lua_cocos2dx_TransitionPageTurn_initWithDuration(lua_State* tolua_S) ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionPageTurn:initWithDuration"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionPageTurn:initWithDuration"); ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.TransitionPageTurn:initWithDuration"); if(!ok) @@ -73842,7 +75374,7 @@ int lua_cocos2dx_TransitionPageTurn_create(lua_State* tolua_S) cocos2d::Scene* arg1; bool arg2; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionPageTurn:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionPageTurn:create"); ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.TransitionPageTurn:create"); if(!ok) { @@ -73941,7 +75473,7 @@ int lua_cocos2dx_TransitionProgress_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionProgress:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionProgress:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgress_create'", nullptr); @@ -74037,7 +75569,7 @@ int lua_cocos2dx_TransitionProgressRadialCCW_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionProgressRadialCCW:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionProgressRadialCCW:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressRadialCCW_create'", nullptr); @@ -74133,7 +75665,7 @@ int lua_cocos2dx_TransitionProgressRadialCW_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionProgressRadialCW:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionProgressRadialCW:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressRadialCW_create'", nullptr); @@ -74229,7 +75761,7 @@ int lua_cocos2dx_TransitionProgressHorizontal_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionProgressHorizontal:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionProgressHorizontal:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressHorizontal_create'", nullptr); @@ -74325,7 +75857,7 @@ int lua_cocos2dx_TransitionProgressVertical_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionProgressVertical:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionProgressVertical:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressVertical_create'", nullptr); @@ -74421,7 +75953,7 @@ int lua_cocos2dx_TransitionProgressInOut_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionProgressInOut:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionProgressInOut:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressInOut_create'", nullptr); @@ -74517,7 +76049,7 @@ int lua_cocos2dx_TransitionProgressOutIn_create(lua_State* tolua_S) double arg0; cocos2d::Scene* arg1; ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.TransitionProgressOutIn:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Scene",&arg1, "cc.TransitionProgressOutIn:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TransitionProgressOutIn_create'", nullptr); @@ -74593,7 +76125,7 @@ int lua_register_cocos2dx_TransitionProgressOutIn(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Camera_setScene(lua_State* tolua_S) +int lua_cocos2dx_Camera_getDepth(lua_State* tolua_S) { int argc = 0; cocos2d::Camera* cobj = nullptr; @@ -74613,116 +76145,7 @@ int lua_cocos2dx_Camera_setScene(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setScene'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Scene* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setScene'", nullptr); - return 0; - } - cobj->setScene(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setScene",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_initPerspective(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_initPerspective'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 4) - { - double arg0; - double arg1; - double arg2; - double arg3; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:initPerspective"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:initPerspective"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:initPerspective"); - - ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:initPerspective"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_initPerspective'", nullptr); - return 0; - } - bool ret = cobj->initPerspective(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:initPerspective",argc, 4); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initPerspective'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getProjectionMatrix'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getDepth'", nullptr); return 0; } #endif @@ -74732,19 +76155,19 @@ int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getProjectionMatrix'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getDepth'", nullptr); return 0; } - const cocos2d::Mat4& ret = cobj->getProjectionMatrix(); - mat4_to_luaval(tolua_S, ret); + int ret = cobj->getDepth(); + 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.Camera:getProjectionMatrix",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getDepth",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getProjectionMatrix'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDepth'.",&tolua_err); #endif return 0; @@ -74796,7 +76219,7 @@ int lua_cocos2dx_Camera_getViewProjectionMatrix(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S) +int lua_cocos2dx_Camera_lookAt(lua_State* tolua_S) { int argc = 0; cocos2d::Camera* cobj = nullptr; @@ -74816,7 +76239,74 @@ int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getViewMatrix'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_lookAt'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:lookAt"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_lookAt'", nullptr); + return 0; + } + cobj->lookAt(arg0); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 2) + { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:lookAt"); + + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Camera:lookAt"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_lookAt'", nullptr); + return 0; + } + cobj->lookAt(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.Camera:lookAt",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_lookAt'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getProjectionMatrix'", nullptr); return 0; } #endif @@ -74826,19 +76316,216 @@ int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getViewMatrix'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getProjectionMatrix'", nullptr); return 0; } - const cocos2d::Mat4& ret = cobj->getViewMatrix(); + const cocos2d::Mat4& ret = cobj->getProjectionMatrix(); mat4_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getViewMatrix",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getProjectionMatrix",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewMatrix'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getProjectionMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getDepthInView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getDepthInView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Camera:getDepthInView"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getDepthInView'", nullptr); + return 0; + } + double ret = cobj->getDepthInView(arg0); + 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.Camera:getDepthInView",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDepthInView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_clearBackground(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_clearBackground'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:clearBackground"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_clearBackground'", nullptr); + return 0; + } + cobj->clearBackground(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:clearBackground",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_clearBackground'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setDepth'", 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.Camera:setDepth"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setDepth'", nullptr); + return 0; + } + cobj->setDepth(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setDepth",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setDepth'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_initDefault(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_initDefault'", 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_Camera_initDefault'", nullptr); + return 0; + } + bool ret = cobj->initDefault(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:initDefault",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initDefault'.",&tolua_err); #endif return 0; @@ -74937,103 +76624,6 @@ int lua_cocos2dx_Camera_getType(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_initDefault(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_initDefault'", 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_Camera_initDefault'", nullptr); - return 0; - } - bool ret = cobj->initDefault(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:initDefault",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initDefault'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_project(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_project'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3 arg0; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:project"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_project'", nullptr); - return 0; - } - cocos2d::Vec2 ret = cobj->project(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.Camera:project",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_project'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_initOrthographic(lua_State* tolua_S) { int argc = 0; @@ -75093,123 +76683,6 @@ int lua_cocos2dx_Camera_initOrthographic(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_getDepthInView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getDepthInView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Camera:getDepthInView"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getDepthInView'", nullptr); - return 0; - } - double ret = cobj->getDepthInView(arg0); - 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.Camera:getDepthInView",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDepthInView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_lookAt(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_lookAt'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3 arg0; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:lookAt"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_lookAt'", nullptr); - return 0; - } - cobj->lookAt(arg0); - lua_settop(tolua_S, 1); - return 1; - } - if (argc == 2) - { - cocos2d::Vec3 arg0; - cocos2d::Vec3 arg1; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:lookAt"); - - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Camera:lookAt"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_lookAt'", nullptr); - return 0; - } - cobj->lookAt(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.Camera:lookAt",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_lookAt'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S) { int argc = 0; @@ -75240,7 +76713,7 @@ int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S) { const cocos2d::AABB* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.AABB",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.AABB",&arg0, "cc.Camera:isVisibleInFrustum"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_isVisibleInFrustum'", nullptr); @@ -75260,106 +76733,6 @@ int lua_cocos2dx_Camera_isVisibleInFrustum(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_setCameraFlag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setCameraFlag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::CameraFlag arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Camera:setCameraFlag"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setCameraFlag'", nullptr); - return 0; - } - cobj->setCameraFlag(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setCameraFlag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setCameraFlag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Camera_clearBackground(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_clearBackground'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:clearBackground"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_clearBackground'", nullptr); - return 0; - } - cobj->clearBackground(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:clearBackground",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_clearBackground'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Camera_setAdditionalProjection(lua_State* tolua_S) { int argc = 0; @@ -75410,7 +76783,7 @@ int lua_cocos2dx_Camera_setAdditionalProjection(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Camera_getDepth(lua_State* tolua_S) +int lua_cocos2dx_Camera_setScene(lua_State* tolua_S) { int argc = 0; cocos2d::Camera* cobj = nullptr; @@ -75430,7 +76803,107 @@ int lua_cocos2dx_Camera_getDepth(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getDepth'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setScene'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Scene* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Scene",&arg0, "cc.Camera:setScene"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setScene'", nullptr); + return 0; + } + cobj->setScene(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setScene",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_projectGL(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_projectGL'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:projectGL"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_projectGL'", nullptr); + return 0; + } + cocos2d::Vec2 ret = cobj->projectGL(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.Camera:projectGL",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_projectGL'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getViewMatrix'", nullptr); return 0; } #endif @@ -75440,24 +76913,24 @@ int lua_cocos2dx_Camera_getDepth(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getDepth'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_getViewMatrix'", nullptr); return 0; } - int ret = cobj->getDepth(); - tolua_pushnumber(tolua_S,(lua_Number)ret); + const cocos2d::Mat4& ret = cobj->getViewMatrix(); + mat4_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getDepth",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getViewMatrix",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getDepth'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewMatrix'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S) +int lua_cocos2dx_Camera_getNearPlane(lua_State* tolua_S) { int argc = 0; cocos2d::Camera* cobj = nullptr; @@ -75477,7 +76950,54 @@ int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setDepth'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getNearPlane'", 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_Camera_getNearPlane'", nullptr); + return 0; + } + double ret = cobj->getNearPlane(); + 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.Camera:getNearPlane",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getNearPlane'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_project(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_project'", nullptr); return 0; } #endif @@ -75485,24 +77005,180 @@ int lua_cocos2dx_Camera_setDepth(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - int arg0; + cocos2d::Vec3 arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Camera:setDepth"); + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:project"); if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setDepth'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_project'", nullptr); return 0; } - cobj->setDepth(arg0); - lua_settop(tolua_S, 1); + cocos2d::Vec2 ret = cobj->project(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.Camera:setDepth",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:project",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setDepth'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_project'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_setCameraFlag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setCameraFlag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::CameraFlag arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Camera:setCameraFlag"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_setCameraFlag'", nullptr); + return 0; + } + cobj->setCameraFlag(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setCameraFlag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setCameraFlag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getFarPlane(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getFarPlane'", 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_Camera_getFarPlane'", nullptr); + return 0; + } + double ret = cobj->getFarPlane(); + 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.Camera:getFarPlane",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getFarPlane'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_initPerspective(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_initPerspective'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 4) + { + double arg0; + double arg1; + double arg2; + double arg3; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:initPerspective"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:initPerspective"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:initPerspective"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:initPerspective"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_initPerspective'", nullptr); + return 0; + } + bool ret = cobj->initPerspective(arg0, arg1, arg2, arg3); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:initPerspective",argc, 4); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initPerspective'.",&tolua_err); #endif return 0; @@ -75743,24 +77419,27 @@ int lua_register_cocos2dx_Camera(lua_State* tolua_S) tolua_beginmodule(tolua_S,"Camera"); tolua_function(tolua_S,"new",lua_cocos2dx_Camera_constructor); - tolua_function(tolua_S,"setScene",lua_cocos2dx_Camera_setScene); - tolua_function(tolua_S,"initPerspective",lua_cocos2dx_Camera_initPerspective); - tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix); + tolua_function(tolua_S,"getDepth",lua_cocos2dx_Camera_getDepth); tolua_function(tolua_S,"getViewProjectionMatrix",lua_cocos2dx_Camera_getViewProjectionMatrix); - tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix); + tolua_function(tolua_S,"lookAt",lua_cocos2dx_Camera_lookAt); + tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix); + tolua_function(tolua_S,"getDepthInView",lua_cocos2dx_Camera_getDepthInView); + tolua_function(tolua_S,"clearBackground",lua_cocos2dx_Camera_clearBackground); + tolua_function(tolua_S,"setDepth",lua_cocos2dx_Camera_setDepth); + tolua_function(tolua_S,"initDefault",lua_cocos2dx_Camera_initDefault); tolua_function(tolua_S,"getCameraFlag",lua_cocos2dx_Camera_getCameraFlag); tolua_function(tolua_S,"getType",lua_cocos2dx_Camera_getType); - tolua_function(tolua_S,"initDefault",lua_cocos2dx_Camera_initDefault); - tolua_function(tolua_S,"project",lua_cocos2dx_Camera_project); tolua_function(tolua_S,"initOrthographic",lua_cocos2dx_Camera_initOrthographic); - tolua_function(tolua_S,"getDepthInView",lua_cocos2dx_Camera_getDepthInView); - tolua_function(tolua_S,"lookAt",lua_cocos2dx_Camera_lookAt); tolua_function(tolua_S,"isVisibleInFrustum",lua_cocos2dx_Camera_isVisibleInFrustum); - tolua_function(tolua_S,"setCameraFlag",lua_cocos2dx_Camera_setCameraFlag); - tolua_function(tolua_S,"clearBackground",lua_cocos2dx_Camera_clearBackground); tolua_function(tolua_S,"setAdditionalProjection",lua_cocos2dx_Camera_setAdditionalProjection); - tolua_function(tolua_S,"getDepth",lua_cocos2dx_Camera_getDepth); - tolua_function(tolua_S,"setDepth",lua_cocos2dx_Camera_setDepth); + tolua_function(tolua_S,"setScene",lua_cocos2dx_Camera_setScene); + tolua_function(tolua_S,"projectGL",lua_cocos2dx_Camera_projectGL); + tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix); + tolua_function(tolua_S,"getNearPlane",lua_cocos2dx_Camera_getNearPlane); + tolua_function(tolua_S,"project",lua_cocos2dx_Camera_project); + tolua_function(tolua_S,"setCameraFlag",lua_cocos2dx_Camera_setCameraFlag); + tolua_function(tolua_S,"getFarPlane",lua_cocos2dx_Camera_getFarPlane); + tolua_function(tolua_S,"initPerspective",lua_cocos2dx_Camera_initPerspective); tolua_function(tolua_S,"create", lua_cocos2dx_Camera_create); tolua_function(tolua_S,"createPerspective", lua_cocos2dx_Camera_createPerspective); tolua_function(tolua_S,"createOrthographic", lua_cocos2dx_Camera_createOrthographic); @@ -75900,7 +77579,7 @@ int lua_cocos2dx_GridBase_afterDraw(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.GridBase:afterDraw"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GridBase_afterDraw'", nullptr); @@ -76486,7 +78165,7 @@ int lua_cocos2dx_GridBase_initWithSize(lua_State* tolua_S) if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.GridBase:initWithSize"); if (!ok) { break; } bool arg2; @@ -76735,7 +78414,7 @@ int lua_cocos2dx_GridBase_create(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.GridBase:create"); if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.GridBase:create"); if (!ok) { break; } bool arg2; ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.GridBase:create"); @@ -76925,7 +78604,7 @@ int lua_cocos2dx_Grid3D_create(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Grid3D:create"); if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.Grid3D:create"); if (!ok) { break; } bool arg2; ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Grid3D:create"); @@ -77039,7 +78718,7 @@ int lua_cocos2dx_TiledGrid3D_create(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TiledGrid3D:create"); if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.TiledGrid3D:create"); if (!ok) { break; } bool arg2; ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.TiledGrid3D:create"); @@ -79497,7 +81176,7 @@ int lua_cocos2dx_GLProgramCache_addGLProgram(lua_State* tolua_S) cocos2d::GLProgram* arg0; std::string arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0, "cc.GLProgramCache:addGLProgram"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgramCache:addGLProgram"); if(!ok) @@ -79794,6 +81473,1865 @@ int lua_register_cocos2dx_GLProgramCache(lua_State* tolua_S) return 1; } +int lua_cocos2dx_RenderState_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderState* 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.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_setTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Texture2D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.RenderState:setTexture"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_setTexture'", nullptr); + return 0; + } + cobj->setTexture(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderState_getTopmost(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderState* 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.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getTopmost'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::RenderState* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.RenderState",&arg0, "cc.RenderState:getTopmost"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_getTopmost'", nullptr); + return 0; + } + cocos2d::RenderState* ret = cobj->getTopmost(arg0); + object_to_luaval(tolua_S, "cc.RenderState",(cocos2d::RenderState*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getTopmost",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getTopmost'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderState_getTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderState* 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.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getTexture'", 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_RenderState_getTexture'", nullptr); + return 0; + } + cocos2d::Texture2D* ret = cobj->getTexture(); + object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderState_bind(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderState* 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.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_bind'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Pass* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Pass",&arg0, "cc.RenderState:bind"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_bind'", nullptr); + return 0; + } + cobj->bind(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:bind",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_bind'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderState_getName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderState* 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.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getName'", 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_RenderState_getName'", nullptr); + return 0; + } + std::string ret = cobj->getName(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderState_getStateBlock(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderState* 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.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getStateBlock'", 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_RenderState_getStateBlock'", nullptr); + return 0; + } + cocos2d::RenderState::StateBlock* ret = cobj->getStateBlock(); + object_to_luaval(tolua_S, "cc.RenderState::StateBlock",(cocos2d::RenderState::StateBlock*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getStateBlock",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getStateBlock'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderState_getTextures(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::RenderState* 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.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::RenderState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_RenderState_getTextures'", 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_RenderState_getTextures'", nullptr); + return 0; + } + const cocos2d::Vector& ret = cobj->getTextures(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.RenderState:getTextures",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_getTextures'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_RenderState_initialize(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.RenderState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_RenderState_initialize'", nullptr); + return 0; + } + cocos2d::RenderState::initialize(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.RenderState:initialize",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_RenderState_initialize'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_RenderState_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (RenderState)"); + return 0; +} + +int lua_register_cocos2dx_RenderState(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.RenderState"); + tolua_cclass(tolua_S,"RenderState","cc.RenderState","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"RenderState"); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_RenderState_setTexture); + tolua_function(tolua_S,"getTopmost",lua_cocos2dx_RenderState_getTopmost); + tolua_function(tolua_S,"getTexture",lua_cocos2dx_RenderState_getTexture); + tolua_function(tolua_S,"bind",lua_cocos2dx_RenderState_bind); + tolua_function(tolua_S,"getName",lua_cocos2dx_RenderState_getName); + tolua_function(tolua_S,"getStateBlock",lua_cocos2dx_RenderState_getStateBlock); + tolua_function(tolua_S,"getTextures",lua_cocos2dx_RenderState_getTextures); + tolua_function(tolua_S,"initialize", lua_cocos2dx_RenderState_initialize); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::RenderState).name(); + g_luaType[typeName] = "cc.RenderState"; + g_typeCast["RenderState"] = "cc.RenderState"; + return 1; +} + +int lua_cocos2dx_Pass_unbind(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Pass* 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.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_unbind'", 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_Pass_unbind'", nullptr); + return 0; + } + cobj->unbind(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:unbind",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_unbind'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Pass_bind(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Pass* 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.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_bind'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Mat4 arg0; + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Pass:bind"); + + if (!ok) { break; } + bool arg1; + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Pass:bind"); + + if (!ok) { break; } + cobj->bind(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Mat4 arg0; + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Pass:bind"); + + if (!ok) { break; } + cobj->bind(arg0); + 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.Pass:bind",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_bind'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Pass_clone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Pass* 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.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_clone'", 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_Pass_clone'", nullptr); + return 0; + } + cocos2d::Pass* ret = cobj->clone(); + object_to_luaval(tolua_S, "cc.Pass",(cocos2d::Pass*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:clone",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_clone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Pass_getGLProgramState(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Pass* 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.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_getGLProgramState'", 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_Pass_getGLProgramState'", nullptr); + return 0; + } + cocos2d::GLProgramState* ret = cobj->getGLProgramState(); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:getGLProgramState",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_getGLProgramState'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Pass_getVertexAttributeBinding(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Pass* 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.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_getVertexAttributeBinding'", 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_Pass_getVertexAttributeBinding'", nullptr); + return 0; + } + cocos2d::VertexAttribBinding* ret = cobj->getVertexAttributeBinding(); + object_to_luaval(tolua_S, "cc.VertexAttribBinding",(cocos2d::VertexAttribBinding*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:getVertexAttributeBinding",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_getVertexAttributeBinding'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Pass_getHash(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Pass* 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.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_getHash'", 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_Pass_getHash'", nullptr); + return 0; + } + unsigned int ret = cobj->getHash(); + 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.Pass:getHash",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_getHash'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Pass_setVertexAttribBinding(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Pass* 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.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Pass*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Pass_setVertexAttribBinding'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::VertexAttribBinding* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.VertexAttribBinding",&arg0, "cc.Pass:setVertexAttribBinding"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Pass_setVertexAttribBinding'", nullptr); + return 0; + } + cobj->setVertexAttribBinding(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Pass:setVertexAttribBinding",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_setVertexAttribBinding'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Pass_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Technique* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Technique",&arg0, "cc.Pass:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Pass_create'", nullptr); + return 0; + } + cocos2d::Pass* ret = cocos2d::Pass::create(arg0); + object_to_luaval(tolua_S, "cc.Pass",(cocos2d::Pass*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Pass:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Pass_createWithGLProgramState(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Pass",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + cocos2d::Technique* arg0; + cocos2d::GLProgramState* arg1; + ok &= luaval_to_object(tolua_S, 2, "cc.Technique",&arg0, "cc.Pass:createWithGLProgramState"); + ok &= luaval_to_object(tolua_S, 3, "cc.GLProgramState",&arg1, "cc.Pass:createWithGLProgramState"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Pass_createWithGLProgramState'", nullptr); + return 0; + } + cocos2d::Pass* ret = cocos2d::Pass::createWithGLProgramState(arg0, arg1); + object_to_luaval(tolua_S, "cc.Pass",(cocos2d::Pass*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Pass:createWithGLProgramState",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Pass_createWithGLProgramState'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Pass_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Pass)"); + return 0; +} + +int lua_register_cocos2dx_Pass(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Pass"); + tolua_cclass(tolua_S,"Pass","cc.Pass","cc.RenderState",nullptr); + + tolua_beginmodule(tolua_S,"Pass"); + tolua_function(tolua_S,"unbind",lua_cocos2dx_Pass_unbind); + tolua_function(tolua_S,"bind",lua_cocos2dx_Pass_bind); + tolua_function(tolua_S,"clone",lua_cocos2dx_Pass_clone); + tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Pass_getGLProgramState); + tolua_function(tolua_S,"getVertexAttributeBinding",lua_cocos2dx_Pass_getVertexAttributeBinding); + tolua_function(tolua_S,"getHash",lua_cocos2dx_Pass_getHash); + tolua_function(tolua_S,"setVertexAttribBinding",lua_cocos2dx_Pass_setVertexAttribBinding); + tolua_function(tolua_S,"create", lua_cocos2dx_Pass_create); + tolua_function(tolua_S,"createWithGLProgramState", lua_cocos2dx_Pass_createWithGLProgramState); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Pass).name(); + g_luaType[typeName] = "cc.Pass"; + g_typeCast["Pass"] = "cc.Pass"; + return 1; +} + +int lua_cocos2dx_Technique_getPassCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Technique* 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.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Technique*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Technique_getPassCount'", 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_Technique_getPassCount'", nullptr); + return 0; + } + ssize_t ret = cobj->getPassCount(); + 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.Technique:getPassCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_getPassCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Technique_clone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Technique* 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.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Technique*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Technique_clone'", 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_Technique_clone'", nullptr); + return 0; + } + cocos2d::Technique* ret = cobj->clone(); + object_to_luaval(tolua_S, "cc.Technique",(cocos2d::Technique*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Technique:clone",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_clone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Technique_addPass(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Technique* 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.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Technique*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Technique_addPass'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Pass* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Pass",&arg0, "cc.Technique:addPass"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Technique_addPass'", nullptr); + return 0; + } + cobj->addPass(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Technique:addPass",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_addPass'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Technique_getPasses(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Technique* 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.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Technique*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Technique_getPasses'", 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_Technique_getPasses'", nullptr); + return 0; + } + const cocos2d::Vector& ret = cobj->getPasses(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Technique:getPasses",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_getPasses'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Technique_getName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Technique* 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.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Technique*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Technique_getName'", 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_Technique_getName'", nullptr); + return 0; + } + std::string ret = cobj->getName(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Technique:getName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_getName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Technique_getPassByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Technique* 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.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Technique*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Technique_getPassByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + ssize_t arg0; + + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "cc.Technique:getPassByIndex"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Technique_getPassByIndex'", nullptr); + return 0; + } + cocos2d::Pass* ret = cobj->getPassByIndex(arg0); + object_to_luaval(tolua_S, "cc.Pass",(cocos2d::Pass*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Technique:getPassByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_getPassByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Technique_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Material* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.Technique:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Technique_create'", nullptr); + return 0; + } + cocos2d::Technique* ret = cocos2d::Technique::create(arg0); + object_to_luaval(tolua_S, "cc.Technique",(cocos2d::Technique*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Technique:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Technique_createWithGLProgramState(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Technique",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + cocos2d::Material* arg0; + cocos2d::GLProgramState* arg1; + ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.Technique:createWithGLProgramState"); + ok &= luaval_to_object(tolua_S, 3, "cc.GLProgramState",&arg1, "cc.Technique:createWithGLProgramState"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Technique_createWithGLProgramState'", nullptr); + return 0; + } + cocos2d::Technique* ret = cocos2d::Technique::createWithGLProgramState(arg0, arg1); + object_to_luaval(tolua_S, "cc.Technique",(cocos2d::Technique*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Technique:createWithGLProgramState",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Technique_createWithGLProgramState'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Technique_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Technique)"); + return 0; +} + +int lua_register_cocos2dx_Technique(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Technique"); + tolua_cclass(tolua_S,"Technique","cc.Technique","cc.RenderState",nullptr); + + tolua_beginmodule(tolua_S,"Technique"); + tolua_function(tolua_S,"getPassCount",lua_cocos2dx_Technique_getPassCount); + tolua_function(tolua_S,"clone",lua_cocos2dx_Technique_clone); + tolua_function(tolua_S,"addPass",lua_cocos2dx_Technique_addPass); + tolua_function(tolua_S,"getPasses",lua_cocos2dx_Technique_getPasses); + tolua_function(tolua_S,"getName",lua_cocos2dx_Technique_getName); + tolua_function(tolua_S,"getPassByIndex",lua_cocos2dx_Technique_getPassByIndex); + tolua_function(tolua_S,"create", lua_cocos2dx_Technique_create); + tolua_function(tolua_S,"createWithGLProgramState", lua_cocos2dx_Technique_createWithGLProgramState); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Technique).name(); + g_luaType[typeName] = "cc.Technique"; + g_typeCast["Technique"] = "cc.Technique"; + return 1; +} + +int lua_cocos2dx_Material_clone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_clone'", 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_Material_clone'", nullptr); + return 0; + } + cocos2d::Material* ret = cobj->clone(); + object_to_luaval(tolua_S, "cc.Material",(cocos2d::Material*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:clone",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_clone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_getTechniqueCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_getTechniqueCount'", 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_Material_getTechniqueCount'", nullptr); + return 0; + } + ssize_t ret = cobj->getTechniqueCount(); + 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.Material:getTechniqueCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_getTechniqueCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_setName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_setName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Material:setName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_setName'", nullptr); + return 0; + } + cobj->setName(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:setName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_setName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_getTechniqueByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_getTechniqueByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + ssize_t arg0; + + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "cc.Material:getTechniqueByIndex"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_getTechniqueByIndex'", nullptr); + return 0; + } + cocos2d::Technique* ret = cobj->getTechniqueByIndex(arg0); + object_to_luaval(tolua_S, "cc.Technique",(cocos2d::Technique*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:getTechniqueByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_getTechniqueByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_getName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_getName'", 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_Material_getName'", nullptr); + return 0; + } + std::string ret = cobj->getName(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:getName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_getName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_getTechniques(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_getTechniques'", 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_Material_getTechniques'", nullptr); + return 0; + } + const cocos2d::Vector& ret = cobj->getTechniques(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:getTechniques",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_getTechniques'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_setTechnique(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_setTechnique'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Material:setTechnique"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_setTechnique'", nullptr); + return 0; + } + cobj->setTechnique(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:setTechnique",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_setTechnique'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_getTechniqueByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_getTechniqueByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Material:getTechniqueByName"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_getTechniqueByName'", nullptr); + return 0; + } + cocos2d::Technique* ret = cobj->getTechniqueByName(arg0); + object_to_luaval(tolua_S, "cc.Technique",(cocos2d::Technique*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:getTechniqueByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_getTechniqueByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_addTechnique(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_addTechnique'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Technique* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Technique",&arg0, "cc.Material:addTechnique"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_addTechnique'", nullptr); + return 0; + } + cobj->addTechnique(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:addTechnique",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_addTechnique'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_getTechnique(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Material* 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.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Material*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Material_getTechnique'", 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_Material_getTechnique'", nullptr); + return 0; + } + cocos2d::Technique* ret = cobj->getTechnique(); + object_to_luaval(tolua_S, "cc.Technique",(cocos2d::Technique*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Material:getTechnique",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_getTechnique'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Material_createWithFilename(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Material:createWithFilename"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_createWithFilename'", nullptr); + return 0; + } + cocos2d::Material* ret = cocos2d::Material::createWithFilename(arg0); + object_to_luaval(tolua_S, "cc.Material",(cocos2d::Material*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Material:createWithFilename",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_createWithFilename'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Material_createWithGLStateProgram(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgramState* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0, "cc.Material:createWithGLStateProgram"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_createWithGLStateProgram'", nullptr); + return 0; + } + cocos2d::Material* ret = cocos2d::Material::createWithGLStateProgram(arg0); + object_to_luaval(tolua_S, "cc.Material",(cocos2d::Material*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Material:createWithGLStateProgram",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_createWithGLStateProgram'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Material_createWithProperties(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Material",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Properties* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Properties",&arg0, "cc.Material:createWithProperties"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Material_createWithProperties'", nullptr); + return 0; + } + cocos2d::Material* ret = cocos2d::Material::createWithProperties(arg0); + object_to_luaval(tolua_S, "cc.Material",(cocos2d::Material*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Material:createWithProperties",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Material_createWithProperties'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Material_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Material)"); + return 0; +} + +int lua_register_cocos2dx_Material(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Material"); + tolua_cclass(tolua_S,"Material","cc.Material","cc.RenderState",nullptr); + + tolua_beginmodule(tolua_S,"Material"); + tolua_function(tolua_S,"clone",lua_cocos2dx_Material_clone); + tolua_function(tolua_S,"getTechniqueCount",lua_cocos2dx_Material_getTechniqueCount); + tolua_function(tolua_S,"setName",lua_cocos2dx_Material_setName); + tolua_function(tolua_S,"getTechniqueByIndex",lua_cocos2dx_Material_getTechniqueByIndex); + tolua_function(tolua_S,"getName",lua_cocos2dx_Material_getName); + tolua_function(tolua_S,"getTechniques",lua_cocos2dx_Material_getTechniques); + tolua_function(tolua_S,"setTechnique",lua_cocos2dx_Material_setTechnique); + tolua_function(tolua_S,"getTechniqueByName",lua_cocos2dx_Material_getTechniqueByName); + tolua_function(tolua_S,"addTechnique",lua_cocos2dx_Material_addTechnique); + tolua_function(tolua_S,"getTechnique",lua_cocos2dx_Material_getTechnique); + tolua_function(tolua_S,"createWithFilename", lua_cocos2dx_Material_createWithFilename); + tolua_function(tolua_S,"createWithGLStateProgram", lua_cocos2dx_Material_createWithGLStateProgram); + tolua_function(tolua_S,"createWithProperties", lua_cocos2dx_Material_createWithProperties); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Material).name(); + g_luaType[typeName] = "cc.Material"; + g_typeCast["Material"] = "cc.Material"; + return 1; +} + int lua_cocos2dx_TextureCache_reloadTexture(lua_State* tolua_S) { int argc = 0; @@ -80106,7 +83644,7 @@ int lua_cocos2dx_TextureCache_addImage(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Image* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0, "cc.TextureCache:addImage"); if (!ok) { break; } std::string arg1; @@ -80241,6 +83779,56 @@ int lua_cocos2dx_TextureCache_getTextureForKey(lua_State* tolua_S) return 0; } +int lua_cocos2dx_TextureCache_getTextureFilePath(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TextureCache* 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.TextureCache",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TextureCache*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TextureCache_getTextureFilePath'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Texture2D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.TextureCache:getTextureFilePath"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TextureCache_getTextureFilePath'", nullptr); + return 0; + } + const std::string ret = cobj->getTextureFilePath(arg0); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCache:getTextureFilePath",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TextureCache_getTextureFilePath'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_TextureCache_removeUnusedTextures(lua_State* tolua_S) { int argc = 0; @@ -80318,7 +83906,7 @@ int lua_cocos2dx_TextureCache_removeTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.TextureCache:removeTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TextureCache_removeTexture'", nullptr); @@ -80444,6 +84032,7 @@ int lua_register_cocos2dx_TextureCache(lua_State* tolua_S) tolua_function(tolua_S,"addImage",lua_cocos2dx_TextureCache_addImage); tolua_function(tolua_S,"unbindImageAsync",lua_cocos2dx_TextureCache_unbindImageAsync); tolua_function(tolua_S,"getTextureForKey",lua_cocos2dx_TextureCache_getTextureForKey); + tolua_function(tolua_S,"getTextureFilePath",lua_cocos2dx_TextureCache_getTextureFilePath); tolua_function(tolua_S,"removeUnusedTextures",lua_cocos2dx_TextureCache_removeUnusedTextures); tolua_function(tolua_S,"removeTexture",lua_cocos2dx_TextureCache_removeTexture); tolua_function(tolua_S,"waitForQuit",lua_cocos2dx_TextureCache_waitForQuit); @@ -81149,7 +84738,7 @@ int lua_cocos2dx_AnimationCache_addAnimation(lua_State* tolua_S) cocos2d::Animation* arg0; std::string arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Animation",&arg0, "cc.AnimationCache:addAnimation"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.AnimationCache:addAnimation"); if(!ok) @@ -81537,7 +85126,7 @@ int lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent(lua_State* tolu ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.SpriteFrameCache:addSpriteFramesWithFileContent"); - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.SpriteFrameCache:addSpriteFramesWithFileContent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent'", nullptr); @@ -81588,7 +85177,7 @@ int lua_cocos2dx_SpriteFrameCache_addSpriteFrame(lua_State* tolua_S) cocos2d::SpriteFrame* arg0; std::string arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.SpriteFrameCache:addSpriteFrame"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.SpriteFrameCache:addSpriteFrame"); if(!ok) @@ -81666,7 +85255,7 @@ int lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile(lua_State* tolua_S) if (!ok) { break; } cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1, "cc.SpriteFrameCache:addSpriteFramesWithFile"); if (!ok) { break; } cobj->addSpriteFramesWithFile(arg0, arg1); @@ -82106,7 +85695,7 @@ int lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromTexture(lua_State* tolua { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.SpriteFrameCache:removeSpriteFramesFromTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromTexture'", nullptr); @@ -82260,7 +85849,7 @@ int lua_cocos2dx_ParallaxNode_addChild(lua_State* tolua_S) cocos2d::Vec2 arg2; cocos2d::Vec2 arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ParallaxNode:addChild"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ParallaxNode:addChild"); @@ -85448,11 +89037,11 @@ int lua_cocos2dx_TMXLayer_initWithTilesetInfo(lua_State* tolua_S) cocos2d::TMXLayerInfo* arg1; cocos2d::TMXMapInfo* arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0, "cc.TMXLayer:initWithTilesetInfo"); - ok &= luaval_to_object(tolua_S, 3, "cc.TMXLayerInfo",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.TMXLayerInfo",&arg1, "cc.TMXLayer:initWithTilesetInfo"); - ok &= luaval_to_object(tolua_S, 4, "cc.TMXMapInfo",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.TMXMapInfo",&arg2, "cc.TMXLayer:initWithTilesetInfo"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_initWithTilesetInfo'", nullptr); @@ -85810,7 +89399,7 @@ int lua_cocos2dx_TMXLayer_setTileSet(lua_State* tolua_S) { cocos2d::TMXTilesetInfo* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0, "cc.TMXLayer:setTileSet"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_setTileSet'", nullptr); @@ -85994,9 +89583,9 @@ int lua_cocos2dx_TMXLayer_create(lua_State* tolua_S) cocos2d::TMXTilesetInfo* arg0; cocos2d::TMXLayerInfo* arg1; cocos2d::TMXMapInfo* arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.TMXLayerInfo",&arg1); - ok &= luaval_to_object(tolua_S, 4, "cc.TMXMapInfo",&arg2); + ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0, "cc.TMXLayer:create"); + ok &= luaval_to_object(tolua_S, 3, "cc.TMXLayerInfo",&arg1, "cc.TMXLayer:create"); + ok &= luaval_to_object(tolua_S, 4, "cc.TMXMapInfo",&arg2, "cc.TMXLayer:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_create'", nullptr); @@ -87612,7 +91201,7 @@ int lua_cocos2dx_Component_setOwner(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.Component:setOwner"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Component_setOwner'", nullptr); @@ -87888,7 +91477,7 @@ int lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.SpritePolygonCache:removeSpritePolygonCache"); - ok &= luaval_to_object(tolua_S, 3, "cc.Rect",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Rect",&arg1, "cc.SpritePolygonCache:removeSpritePolygonCache"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache'", nullptr); @@ -88045,6 +91634,8 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) tolua_beginmodule(tolua_S,"cc"); lua_register_cocos2dx_Ref(tolua_S); + lua_register_cocos2dx_RenderState(tolua_S); + lua_register_cocos2dx_Material(tolua_S); lua_register_cocos2dx_Console(tolua_S); lua_register_cocos2dx_Node(tolua_S); lua_register_cocos2dx_Scene(tolua_S); @@ -88074,12 +91665,11 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_JumpBy(tolua_S); lua_register_cocos2dx_EventListener(tolua_S); lua_register_cocos2dx_EventListenerKeyboard(tolua_S); - lua_register_cocos2dx_ActionEase(tolua_S); - lua_register_cocos2dx_EaseBounce(tolua_S); - lua_register_cocos2dx_EaseBounceIn(tolua_S); + lua_register_cocos2dx_EventListenerMouse(tolua_S); lua_register_cocos2dx_TransitionRotoZoom(tolua_S); lua_register_cocos2dx_Director(tolua_S); lua_register_cocos2dx_Scheduler(tolua_S); + lua_register_cocos2dx_ActionEase(tolua_S); lua_register_cocos2dx_EaseElastic(tolua_S); lua_register_cocos2dx_EaseElasticOut(tolua_S); lua_register_cocos2dx_EaseQuadraticActionInOut(tolua_S); @@ -88093,6 +91683,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_FadeOutUpTiles(tolua_S); lua_register_cocos2dx_FadeOutDownTiles(tolua_S); lua_register_cocos2dx_StopGrid(tolua_S); + lua_register_cocos2dx_Technique(tolua_S); lua_register_cocos2dx_SkewTo(tolua_S); lua_register_cocos2dx_SkewBy(tolua_S); lua_register_cocos2dx_EaseQuadraticActionOut(tolua_S); @@ -88113,6 +91704,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EaseSineInOut(tolua_S); lua_register_cocos2dx_TransitionFlipAngular(tolua_S); lua_register_cocos2dx_EaseElasticInOut(tolua_S); + lua_register_cocos2dx_EaseBounce(tolua_S); lua_register_cocos2dx_Show(tolua_S); lua_register_cocos2dx_FadeOut(tolua_S); lua_register_cocos2dx_CallFunc(tolua_S); @@ -88177,13 +91769,14 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_JumpTo(tolua_S); lua_register_cocos2dx_ParticleExplosion(tolua_S); lua_register_cocos2dx_TransitionJumpZoom(tolua_S); + lua_register_cocos2dx_Pass(tolua_S); lua_register_cocos2dx_Touch(tolua_S); lua_register_cocos2dx_CardinalSplineBy(tolua_S); lua_register_cocos2dx_CatmullRomBy(tolua_S); lua_register_cocos2dx_NodeGrid(tolua_S); lua_register_cocos2dx_TMXLayerInfo(tolua_S); lua_register_cocos2dx_EaseSineIn(tolua_S); - lua_register_cocos2dx_EventListenerMouse(tolua_S); + lua_register_cocos2dx_EaseBounceIn(tolua_S); lua_register_cocos2dx_Camera(tolua_S); lua_register_cocos2dx_GLProgram(tolua_S); lua_register_cocos2dx_ParticleGalaxy(tolua_S); @@ -88211,6 +91804,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TransitionProgressRadialCCW(tolua_S); lua_register_cocos2dx_ScaleTo(tolua_S); lua_register_cocos2dx_TransitionPageTurn(tolua_S); + lua_register_cocos2dx_Properties(tolua_S); lua_register_cocos2dx_BezierBy(tolua_S); lua_register_cocos2dx_BezierTo(tolua_S); lua_register_cocos2dx_ParticleMeteor(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 643eefbedc..9d2d5fe682 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1953,6 +1953,80 @@ int register_all_cocos2dx(lua_State* tolua_S); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp index 4cd61b2291..c994d734dc 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_cocosbuilder_auto.cpp @@ -36,9 +36,9 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_moveAnimationsFromNode(lua_Sta cocos2d::Node* arg0; cocos2d::Node* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.CCBAnimationManager:moveAnimationsFromNode"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.CCBAnimationManager:moveAnimationsFromNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_moveAnimationsFromNode'", nullptr); @@ -185,7 +185,7 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForSoundChannel(lua_Stat { cocosbuilder::CCBSequenceProperty* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequenceProperty",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequenceProperty",&arg0, "cc.CCBAnimationManager:actionForSoundChannel"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForSoundChannel'", nullptr); @@ -239,7 +239,7 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setBaseValue(lua_State* tolua_ ok &= luaval_to_ccvalue(tolua_S, 2, &arg0, "cc.CCBAnimationManager:setBaseValue"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.CCBAnimationManager:setBaseValue"); ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.CCBAnimationManager:setBaseValue"); if(!ok) @@ -385,7 +385,7 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootNode(lua_State* tolua_S { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.CCBAnimationManager:setRootNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_setRootNode'", nullptr); @@ -684,9 +684,9 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_setObject(lua_State* tolua_S) cocos2d::Node* arg1; std::string arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.CCBAnimationManager:setObject"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.CCBAnimationManager:setObject"); ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.CCBAnimationManager:setObject"); if(!ok) @@ -738,7 +738,7 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_getContainerSize(lua_State* to { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.CCBAnimationManager:getContainerSize"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_getContainerSize'", nullptr); @@ -788,7 +788,7 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForCallbackChannel(lua_S { cocosbuilder::CCBSequenceProperty* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequenceProperty",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequenceProperty",&arg0, "cc.CCBAnimationManager:actionForCallbackChannel"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_actionForCallbackChannel'", nullptr); @@ -1370,7 +1370,7 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletNode(lua_Stat { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.CCBAnimationManager:addDocumentOutletNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentOutletNode'", nullptr); @@ -1470,7 +1470,7 @@ int lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackNode(lua_St { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.CCBAnimationManager:addDocumentCallbackNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBAnimationManager_addDocumentCallbackNode'", nullptr); @@ -2101,7 +2101,7 @@ int lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletNode(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.CCBReader:addOwnerOutletNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_addOwnerOutletNode'", nullptr); @@ -2198,7 +2198,7 @@ int lua_cocos2dx_cocosbuilder_CCBReader_readSoundKeyframesForSeq(lua_State* tolu { cocosbuilder::CCBSequence* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequence",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequence",&arg0, "cc.CCBReader:readSoundKeyframesForSeq"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_readSoundKeyframesForSeq'", nullptr); @@ -2533,7 +2533,7 @@ int lua_cocos2dx_cocosbuilder_CCBReader_setAnimationManager(lua_State* tolua_S) { cocosbuilder::CCBAnimationManager* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CCBAnimationManager",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.CCBAnimationManager",&arg0, "cc.CCBReader:setAnimationManager"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_setAnimationManager'", nullptr); @@ -2583,7 +2583,7 @@ int lua_cocos2dx_cocosbuilder_CCBReader_readCallbackKeyframesForSeq(lua_State* t { cocosbuilder::CCBSequence* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequence",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.CCBSequence",&arg0, "cc.CCBReader:readCallbackKeyframesForSeq"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosbuilder_CCBReader_readCallbackKeyframesForSeq'", nullptr); @@ -2793,7 +2793,7 @@ int lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State* tolua_S) do{ if (argc == 1) { cocosbuilder::CCBReader* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CCBReader",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.CCBReader",&arg0, "cc.CCBReader:CCBReader"); if (!ok) { break; } cobj = new cocosbuilder::CCBReader(arg0); @@ -2808,7 +2808,7 @@ int lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State* tolua_S) do{ if (argc == 1) { cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); if (!ok) { break; } cobj = new cocosbuilder::CCBReader(arg0); @@ -2823,11 +2823,11 @@ int lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State* tolua_S) do{ if (argc == 2) { cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); if (!ok) { break; } cocosbuilder::CCBMemberVariableAssigner* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1, "cc.CCBReader:CCBReader"); if (!ok) { break; } cobj = new cocosbuilder::CCBReader(arg0, arg1); @@ -2842,15 +2842,15 @@ int lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State* tolua_S) do{ if (argc == 3) { cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); if (!ok) { break; } cocosbuilder::CCBMemberVariableAssigner* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1, "cc.CCBReader:CCBReader"); if (!ok) { break; } cocosbuilder::CCBSelectorResolver* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.CCBSelectorResolver",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.CCBSelectorResolver",&arg2, "cc.CCBReader:CCBReader"); if (!ok) { break; } cobj = new cocosbuilder::CCBReader(arg0, arg1, arg2); @@ -2865,19 +2865,19 @@ int lua_cocos2dx_cocosbuilder_CCBReader_constructor(lua_State* tolua_S) do{ if (argc == 4) { cocosbuilder::NodeLoaderLibrary* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.NodeLoaderLibrary",&arg0, "cc.CCBReader:CCBReader"); if (!ok) { break; } cocosbuilder::CCBMemberVariableAssigner* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.CCBMemberVariableAssigner",&arg1, "cc.CCBReader:CCBReader"); if (!ok) { break; } cocosbuilder::CCBSelectorResolver* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.CCBSelectorResolver",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.CCBSelectorResolver",&arg2, "cc.CCBReader:CCBReader"); if (!ok) { break; } cocosbuilder::NodeLoaderListener* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.NodeLoaderListener",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.NodeLoaderListener",&arg3, "cc.CCBReader:CCBReader"); if (!ok) { break; } cobj = new cocosbuilder::CCBReader(arg0, arg1, arg2, arg3); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp index 62dcaeed5b..bd5aae3bf9 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp @@ -734,7 +734,7 @@ int lua_cocos2dx_controller_EventController_constructor(lua_State* tolua_S) if (!ok) { break; } cocos2d::Controller* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Controller",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Controller",&arg1, "cc.EventController:EventController"); if (!ok) { break; } bool arg2; @@ -757,7 +757,7 @@ int lua_cocos2dx_controller_EventController_constructor(lua_State* tolua_S) if (!ok) { break; } cocos2d::Controller* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Controller",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Controller",&arg1, "cc.EventController:EventController"); if (!ok) { break; } int arg2; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_csloader_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_csloader_auto.cpp index 19aeb63aad..8fbb5b5a57 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_csloader_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_csloader_auto.cpp @@ -192,9 +192,9 @@ int lua_cocos2dx_csloader_CSLoader_bindCallback(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.CSLoader:bindCallback"); - ok &= luaval_to_object(tolua_S, 4, "ccui.Widget",&arg2); + ok &= luaval_to_object(tolua_S, 4, "ccui.Widget",&arg2, "cc.CSLoader:bindCallback"); - ok &= luaval_to_object(tolua_S, 5, "cc.Node",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Node",&arg3, "cc.CSLoader:bindCallback"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_csloader_CSLoader_bindCallback'", nullptr); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_auto.cpp index c374abfaec..0a80669d0e 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_auto.cpp @@ -527,7 +527,7 @@ int lua_cocos2dx_experimental_TMXLayer_setupTileSprite(lua_State* tolua_S) cocos2d::Vec2 arg1; int arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "ccexp.TMXLayer:setupTileSprite"); ok &= luaval_to_vec2(tolua_S, 3, &arg1, "ccexp.TMXLayer:setupTileSprite"); @@ -842,7 +842,7 @@ int lua_cocos2dx_experimental_TMXLayer_setTileSet(lua_State* tolua_S) { cocos2d::TMXTilesetInfo* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0, "ccexp.TMXLayer:setTileSet"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_TMXLayer_setTileSet'", nullptr); @@ -979,9 +979,9 @@ int lua_cocos2dx_experimental_TMXLayer_create(lua_State* tolua_S) cocos2d::TMXTilesetInfo* arg0; cocos2d::TMXLayerInfo* arg1; cocos2d::TMXMapInfo* arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.TMXLayerInfo",&arg1); - ok &= luaval_to_object(tolua_S, 4, "cc.TMXMapInfo",&arg2); + ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0, "ccexp.TMXLayer:create"); + ok &= luaval_to_object(tolua_S, 3, "cc.TMXLayerInfo",&arg1, "ccexp.TMXLayer:create"); + ok &= luaval_to_object(tolua_S, 4, "cc.TMXMapInfo",&arg2, "ccexp.TMXLayer:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_TMXLayer_create'", nullptr); @@ -1894,7 +1894,7 @@ int lua_cocos2dx_experimental_SpritePolygon_setTexture(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "ccexp.SpritePolygon:setTexture"); if (!ok) { break; } cobj->setTexture(arg0); @@ -1955,7 +1955,7 @@ int lua_cocos2dx_experimental_SpritePolygon_initWithTexture(lua_State* tolua_S) { cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "ccexp.SpritePolygon:initWithTexture"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_SpritePolygon_initWithTexture'", nullptr); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp index 2f09abc130..4be0cfc60c 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp @@ -420,7 +420,7 @@ int lua_cocos2dx_extension_Control_isTouchInside(lua_State* tolua_S) { cocos2d::Touch* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0, "cc.Control:isTouchInside"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_Control_isTouchInside'", nullptr); @@ -520,7 +520,7 @@ int lua_cocos2dx_extension_Control_getTouchLocation(lua_State* tolua_S) { cocos2d::Touch* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0, "cc.Control:getTouchLocation"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_Control_getTouchLocation'", nullptr); @@ -769,7 +769,7 @@ int lua_cocos2dx_extension_ControlButton_setTitleLabelForState(lua_State* tolua_ cocos2d::Node* arg0; cocos2d::extension::Control::State arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlButton:setTitleLabelForState"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ControlButton:setTitleLabelForState"); if(!ok) @@ -1021,7 +1021,7 @@ int lua_cocos2dx_extension_ControlButton_initWithBackgroundSprite(lua_State* tol { cocos2d::ui::Scale9Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0, "cc.ControlButton:initWithBackgroundSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlButton_initWithBackgroundSprite'", nullptr); @@ -1227,7 +1227,7 @@ int lua_cocos2dx_extension_ControlButton_setTitleLabel(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlButton:setTitleLabel"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlButton_setTitleLabel'", nullptr); @@ -1424,7 +1424,7 @@ int lua_cocos2dx_extension_ControlButton_setBackgroundSprite(lua_State* tolua_S) { cocos2d::ui::Scale9Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0, "cc.ControlButton:setBackgroundSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlButton_setBackgroundSprite'", nullptr); @@ -1975,7 +1975,7 @@ int lua_cocos2dx_extension_ControlButton_setBackgroundSpriteFrameForState(lua_St cocos2d::SpriteFrame* arg0; cocos2d::extension::Control::State arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "cc.ControlButton:setBackgroundSpriteFrameForState"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ControlButton:setBackgroundSpriteFrameForState"); if(!ok) @@ -2028,7 +2028,7 @@ int lua_cocos2dx_extension_ControlButton_setBackgroundSpriteForState(lua_State* cocos2d::ui::Scale9Sprite* arg0; cocos2d::extension::Control::State arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0, "cc.ControlButton:setBackgroundSpriteForState"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ControlButton:setBackgroundSpriteForState"); if(!ok) @@ -2472,9 +2472,9 @@ int lua_cocos2dx_extension_ControlButton_initWithLabelAndBackgroundSprite(lua_St cocos2d::Node* arg0; cocos2d::ui::Scale9Sprite* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlButton:initWithLabelAndBackgroundSprite"); - ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1, "cc.ControlButton:initWithLabelAndBackgroundSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlButton_initWithLabelAndBackgroundSprite'", nullptr); @@ -2610,7 +2610,7 @@ int lua_cocos2dx_extension_ControlButton_create(lua_State* tolua_S) if (argc == 1) { cocos2d::ui::Scale9Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0, "cc.ControlButton:create"); if (!ok) { break; } cocos2d::extension::ControlButton* ret = cocos2d::extension::ControlButton::create(arg0); object_to_luaval(tolua_S, "cc.ControlButton",(cocos2d::extension::ControlButton*)ret); @@ -2633,10 +2633,10 @@ int lua_cocos2dx_extension_ControlButton_create(lua_State* tolua_S) if (argc == 2) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlButton:create"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1, "cc.ControlButton:create"); if (!ok) { break; } cocos2d::extension::ControlButton* ret = cocos2d::extension::ControlButton::create(arg0, arg1); object_to_luaval(tolua_S, "cc.ControlButton",(cocos2d::extension::ControlButton*)ret); @@ -2798,7 +2798,7 @@ int lua_cocos2dx_extension_ControlHuePicker_initWithTargetAndPos(lua_State* tolu cocos2d::Node* arg0; cocos2d::Vec2 arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlHuePicker:initWithTargetAndPos"); ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.ControlHuePicker:initWithTargetAndPos"); if(!ok) @@ -3041,7 +3041,7 @@ int lua_cocos2dx_extension_ControlHuePicker_setBackground(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlHuePicker:setBackground"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlHuePicker_setBackground'", nullptr); @@ -3235,7 +3235,7 @@ int lua_cocos2dx_extension_ControlHuePicker_setSlider(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlHuePicker:setSlider"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlHuePicker_setSlider'", nullptr); @@ -3274,7 +3274,7 @@ int lua_cocos2dx_extension_ControlHuePicker_create(lua_State* tolua_S) { cocos2d::Node* arg0; cocos2d::Vec2 arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlHuePicker:create"); ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.ControlHuePicker:create"); if(!ok) { @@ -3439,7 +3439,7 @@ int lua_cocos2dx_extension_ControlSaturationBrightnessPicker_initWithTargetAndPo cocos2d::Node* arg0; cocos2d::Vec2 arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlSaturationBrightnessPicker:initWithTargetAndPos"); ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.ControlSaturationBrightnessPicker:initWithTargetAndPos"); if(!ok) @@ -3762,7 +3762,7 @@ int lua_cocos2dx_extension_ControlSaturationBrightnessPicker_create(lua_State* t { cocos2d::Node* arg0; cocos2d::Vec2 arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ControlSaturationBrightnessPicker:create"); ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.ControlSaturationBrightnessPicker:create"); if(!ok) { @@ -3878,7 +3878,7 @@ int lua_cocos2dx_extension_ControlColourPicker_hueSliderValueChanged(lua_State* cocos2d::Ref* arg0; cocos2d::extension::Control::EventType arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.ControlColourPicker:hueSliderValueChanged"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ControlColourPicker:hueSliderValueChanged"); if(!ok) @@ -4024,7 +4024,7 @@ int lua_cocos2dx_extension_ControlColourPicker_setBackground(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlColourPicker:setBackground"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlColourPicker_setBackground'", nullptr); @@ -4074,7 +4074,7 @@ int lua_cocos2dx_extension_ControlColourPicker_setcolourPicker(lua_State* tolua_ { cocos2d::extension::ControlSaturationBrightnessPicker* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ControlSaturationBrightnessPicker",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ControlSaturationBrightnessPicker",&arg0, "cc.ControlColourPicker:setcolourPicker"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlColourPicker_setcolourPicker'", nullptr); @@ -4125,7 +4125,7 @@ int lua_cocos2dx_extension_ControlColourPicker_colourSliderValueChanged(lua_Stat cocos2d::Ref* arg0; cocos2d::extension::Control::EventType arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.ControlColourPicker:colourSliderValueChanged"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ControlColourPicker:colourSliderValueChanged"); if(!ok) @@ -4177,7 +4177,7 @@ int lua_cocos2dx_extension_ControlColourPicker_setHuePicker(lua_State* tolua_S) { cocos2d::extension::ControlHuePicker* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ControlHuePicker",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ControlHuePicker",&arg0, "cc.ControlColourPicker:setHuePicker"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlColourPicker_setHuePicker'", nullptr); @@ -4774,7 +4774,7 @@ int lua_cocos2dx_extension_ControlPotentiometer_setThumbSprite(lua_State* tolua_ { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlPotentiometer:setThumbSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlPotentiometer_setThumbSprite'", nullptr); @@ -5021,7 +5021,7 @@ int lua_cocos2dx_extension_ControlPotentiometer_setProgressTimer(lua_State* tolu { cocos2d::ProgressTimer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ProgressTimer",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ProgressTimer",&arg0, "cc.ControlPotentiometer:setProgressTimer"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlPotentiometer_setProgressTimer'", nullptr); @@ -5170,11 +5170,11 @@ int lua_cocos2dx_extension_ControlPotentiometer_initWithTrackSprite_ProgressTime cocos2d::ProgressTimer* arg1; cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlPotentiometer:initWithTrackSprite_ProgressTimer_ThumbSprite"); - ok &= luaval_to_object(tolua_S, 3, "cc.ProgressTimer",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.ProgressTimer",&arg1, "cc.ControlPotentiometer:initWithTrackSprite_ProgressTimer_ThumbSprite"); - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlPotentiometer:initWithTrackSprite_ProgressTimer_ThumbSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlPotentiometer_initWithTrackSprite_ProgressTimer_ThumbSprite'", nullptr); @@ -5390,7 +5390,7 @@ int lua_cocos2dx_extension_ControlSlider_setBackgroundSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:setBackgroundSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlSlider_setBackgroundSprite'", nullptr); @@ -5481,19 +5481,19 @@ int lua_cocos2dx_extension_ControlSlider_initWithSprites(lua_State* tolua_S) do{ if (argc == 4) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:initWithSprites"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSlider:initWithSprites"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSlider:initWithSprites"); if (!ok) { break; } cocos2d::Sprite* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3, "cc.ControlSlider:initWithSprites"); if (!ok) { break; } bool ret = cobj->initWithSprites(arg0, arg1, arg2, arg3); @@ -5505,15 +5505,15 @@ int lua_cocos2dx_extension_ControlSlider_initWithSprites(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:initWithSprites"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSlider:initWithSprites"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSlider:initWithSprites"); if (!ok) { break; } bool ret = cobj->initWithSprites(arg0, arg1, arg2); @@ -5703,7 +5703,7 @@ int lua_cocos2dx_extension_ControlSlider_setProgressSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:setProgressSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlSlider_setProgressSprite'", nullptr); @@ -5850,7 +5850,7 @@ int lua_cocos2dx_extension_ControlSlider_setThumbSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:setThumbSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlSlider_setThumbSprite'", nullptr); @@ -6091,7 +6091,7 @@ int lua_cocos2dx_extension_ControlSlider_locationFromTouch(lua_State* tolua_S) { cocos2d::Touch* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0, "cc.ControlSlider:locationFromTouch"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlSlider_locationFromTouch'", nullptr); @@ -6288,7 +6288,7 @@ int lua_cocos2dx_extension_ControlSlider_setSelectedThumbSprite(lua_State* tolua { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:setSelectedThumbSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlSlider_setSelectedThumbSprite'", nullptr); @@ -6377,13 +6377,13 @@ int lua_cocos2dx_extension_ControlSlider_create(lua_State* tolua_S) if (argc == 3) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:create"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSlider:create"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSlider:create"); if (!ok) { break; } cocos2d::extension::ControlSlider* ret = cocos2d::extension::ControlSlider::create(arg0, arg1, arg2); object_to_luaval(tolua_S, "cc.ControlSlider",(cocos2d::extension::ControlSlider*)ret); @@ -6437,16 +6437,16 @@ int lua_cocos2dx_extension_ControlSlider_create(lua_State* tolua_S) if (argc == 4) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSlider:create"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSlider:create"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSlider:create"); if (!ok) { break; } cocos2d::Sprite* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3, "cc.ControlSlider:create"); if (!ok) { break; } cocos2d::extension::ControlSlider* ret = cocos2d::extension::ControlSlider::create(arg0, arg1, arg2, arg3); object_to_luaval(tolua_S, "cc.ControlSlider",(cocos2d::extension::ControlSlider*)ret); @@ -6718,9 +6718,9 @@ int lua_cocos2dx_extension_ControlStepper_initWithMinusSpriteAndPlusSprite(lua_S cocos2d::Sprite* arg0; cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlStepper:initWithMinusSpriteAndPlusSprite"); - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlStepper:initWithMinusSpriteAndPlusSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlStepper_initWithMinusSpriteAndPlusSprite'", nullptr); @@ -7017,7 +7017,7 @@ int lua_cocos2dx_extension_ControlStepper_setMinusLabel(lua_State* tolua_S) { cocos2d::Label* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Label",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Label",&arg0, "cc.ControlStepper:setMinusLabel"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlStepper_setMinusLabel'", nullptr); @@ -7308,7 +7308,7 @@ int lua_cocos2dx_extension_ControlStepper_setPlusLabel(lua_State* tolua_S) { cocos2d::Label* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Label",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Label",&arg0, "cc.ControlStepper:setPlusLabel"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlStepper_setPlusLabel'", nullptr); @@ -7452,7 +7452,7 @@ int lua_cocos2dx_extension_ControlStepper_setPlusSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlStepper:setPlusSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlStepper_setPlusSprite'", nullptr); @@ -7502,7 +7502,7 @@ int lua_cocos2dx_extension_ControlStepper_setMinusSprite(lua_State* tolua_S) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlStepper:setMinusSprite"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlStepper_setMinusSprite'", nullptr); @@ -7541,8 +7541,8 @@ int lua_cocos2dx_extension_ControlStepper_create(lua_State* tolua_S) { cocos2d::Sprite* arg0; cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlStepper:create"); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlStepper:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlStepper_create'", nullptr); @@ -7727,7 +7727,7 @@ int lua_cocos2dx_extension_ControlSwitch_locationFromTouch(lua_State* tolua_S) { cocos2d::Touch* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0, "cc.ControlSwitch:locationFromTouch"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ControlSwitch_locationFromTouch'", nullptr); @@ -7818,27 +7818,27 @@ int lua_cocos2dx_extension_ControlSwitch_initWithMaskSprite(lua_State* tolua_S) do{ if (argc == 6) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Sprite* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Label* arg4; - ok &= luaval_to_object(tolua_S, 6, "cc.Label",&arg4); + ok &= luaval_to_object(tolua_S, 6, "cc.Label",&arg4, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Label* arg5; - ok &= luaval_to_object(tolua_S, 7, "cc.Label",&arg5); + ok &= luaval_to_object(tolua_S, 7, "cc.Label",&arg5, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } bool ret = cobj->initWithMaskSprite(arg0, arg1, arg2, arg3, arg4, arg5); @@ -7850,19 +7850,19 @@ int lua_cocos2dx_extension_ControlSwitch_initWithMaskSprite(lua_State* tolua_S) do{ if (argc == 4) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } cocos2d::Sprite* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3, "cc.ControlSwitch:initWithMaskSprite"); if (!ok) { break; } bool ret = cobj->initWithMaskSprite(arg0, arg1, arg2, arg3); @@ -7947,16 +7947,16 @@ int lua_cocos2dx_extension_ControlSwitch_create(lua_State* tolua_S) if (argc == 4) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Sprite* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::extension::ControlSwitch* ret = cocos2d::extension::ControlSwitch::create(arg0, arg1, arg2, arg3); object_to_luaval(tolua_S, "cc.ControlSwitch",(cocos2d::extension::ControlSwitch*)ret); @@ -7969,22 +7969,22 @@ int lua_cocos2dx_extension_ControlSwitch_create(lua_State* tolua_S) if (argc == 6) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Sprite",&arg1, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Sprite",&arg2, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Sprite* arg3; - ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Sprite",&arg3, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Label* arg4; - ok &= luaval_to_object(tolua_S, 6, "cc.Label",&arg4); + ok &= luaval_to_object(tolua_S, 6, "cc.Label",&arg4, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::Label* arg5; - ok &= luaval_to_object(tolua_S, 7, "cc.Label",&arg5); + ok &= luaval_to_object(tolua_S, 7, "cc.Label",&arg5, "cc.ControlSwitch:create"); if (!ok) { break; } cocos2d::extension::ControlSwitch* ret = cocos2d::extension::ControlSwitch::create(arg0, arg1, arg2, arg3, arg4, arg5); object_to_luaval(tolua_S, "cc.ControlSwitch",(cocos2d::extension::ControlSwitch*)ret); @@ -8140,7 +8140,7 @@ int lua_cocos2dx_extension_ScrollView_setContainer(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ScrollView:setContainer"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ScrollView_setContainer'", nullptr); @@ -8701,7 +8701,7 @@ int lua_cocos2dx_extension_ScrollView_initWithViewSize(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.ScrollView:initWithViewSize"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.ScrollView:initWithViewSize"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ScrollView_initWithViewSize'", nullptr); @@ -8751,7 +8751,7 @@ int lua_cocos2dx_extension_ScrollView_pause(lua_State* tolua_S) { cocos2d::Ref* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.ScrollView:pause"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ScrollView_pause'", nullptr); @@ -9206,7 +9206,7 @@ int lua_cocos2dx_extension_ScrollView_resume(lua_State* tolua_S) { cocos2d::Ref* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "cc.ScrollView:resume"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ScrollView_resume'", nullptr); @@ -9497,7 +9497,7 @@ int lua_cocos2dx_extension_ScrollView_isNodeVisible(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "cc.ScrollView:isNodeVisible"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ScrollView_isNodeVisible'", nullptr); @@ -9668,7 +9668,7 @@ int lua_cocos2dx_extension_ScrollView_create(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.ScrollView:create"); if (!ok) { break; } cocos2d::Node* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.ScrollView:create"); if (!ok) { break; } cocos2d::extension::ScrollView* ret = cocos2d::extension::ScrollView::create(arg0, arg1); object_to_luaval(tolua_S, "cc.ScrollView",(cocos2d::extension::ScrollView*)ret); @@ -10142,7 +10142,7 @@ int lua_cocos2dx_extension_TableView_scrollViewDidZoom(lua_State* tolua_S) { cocos2d::extension::ScrollView* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ScrollView",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ScrollView",&arg0, "cc.TableView:scrollViewDidZoom"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_TableView_scrollViewDidZoom'", nullptr); @@ -10353,7 +10353,7 @@ int lua_cocos2dx_extension_TableView_initWithViewSize(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TableView:initWithViewSize"); - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1, "cc.TableView:initWithViewSize"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_TableView_initWithViewSize'", nullptr); @@ -10403,7 +10403,7 @@ int lua_cocos2dx_extension_TableView_scrollViewDidScroll(lua_State* tolua_S) { cocos2d::extension::ScrollView* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.ScrollView",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.ScrollView",&arg0, "cc.TableView:scrollViewDidScroll"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_TableView_scrollViewDidScroll'", nullptr); @@ -11847,7 +11847,7 @@ int lua_cocos2dx_extension_EventAssetsManagerEx_constructor(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); - ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); if(!ok) @@ -11871,7 +11871,7 @@ int lua_cocos2dx_extension_EventAssetsManagerEx_constructor(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); - ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); @@ -11898,7 +11898,7 @@ int lua_cocos2dx_extension_EventAssetsManagerEx_constructor(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); - ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); @@ -11928,7 +11928,7 @@ int lua_cocos2dx_extension_EventAssetsManagerEx_constructor(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); - ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); @@ -11961,7 +11961,7 @@ int lua_cocos2dx_extension_EventAssetsManagerEx_constructor(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); - ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); @@ -11997,7 +11997,7 @@ int lua_cocos2dx_extension_EventAssetsManagerEx_constructor(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); - ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); @@ -12036,7 +12036,7 @@ int lua_cocos2dx_extension_EventAssetsManagerEx_constructor(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); - ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.AssetsManagerEx",&arg1, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.EventAssetsManagerEx:EventAssetsManagerEx"); @@ -12925,7 +12925,7 @@ int lua_cocos2dx_extension_EventListenerAssetsManagerEx_init(lua_State* tolua_S) const cocos2d::extension::AssetsManagerEx* arg0; std::function arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.AssetsManagerEx",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.AssetsManagerEx",&arg0, "cc.EventListenerAssetsManagerEx:init"); do { // Lambda binding for lua is not supported. @@ -13183,7 +13183,7 @@ int lua_cocos2dx_extension_ParticleSystem3D_addAffector(lua_State* tolua_S) { cocos2d::Particle3DAffector* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Particle3DAffector",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Particle3DAffector",&arg0, "cc.ParticleSystem3D:addAffector"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ParticleSystem3D_addAffector'", nullptr); @@ -13327,7 +13327,7 @@ int lua_cocos2dx_extension_ParticleSystem3D_setEmitter(lua_State* tolua_S) { cocos2d::Particle3DEmitter* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Particle3DEmitter",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Particle3DEmitter",&arg0, "cc.ParticleSystem3D:setEmitter"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ParticleSystem3D_setEmitter'", nullptr); @@ -13809,7 +13809,7 @@ int lua_cocos2dx_extension_ParticleSystem3D_setRender(lua_State* tolua_S) { cocos2d::Particle3DRender* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Particle3DRender",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Particle3DRender",&arg0, "cc.ParticleSystem3D:setRender"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_ParticleSystem3D_setRender'", nullptr); @@ -14706,7 +14706,7 @@ int lua_cocos2dx_extension_PUParticleSystem3D_forceEmission(lua_State* tolua_S) cocos2d::PUEmitter* arg0; unsigned int arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PUEmitter",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PUEmitter",&arg0, "cc.PUParticleSystem3D:forceEmission"); ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.PUParticleSystem3D:forceEmission"); if(!ok) @@ -14758,7 +14758,7 @@ int lua_cocos2dx_extension_PUParticleSystem3D_addListener(lua_State* tolua_S) { cocos2d::PUListener* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PUListener",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PUListener",&arg0, "cc.PUParticleSystem3D:addListener"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_PUParticleSystem3D_addListener'", nullptr); @@ -15049,7 +15049,7 @@ int lua_cocos2dx_extension_PUParticleSystem3D_addEmitter(lua_State* tolua_S) { cocos2d::PUEmitter* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PUEmitter",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PUEmitter",&arg0, "cc.PUParticleSystem3D:addEmitter"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_PUParticleSystem3D_addEmitter'", nullptr); @@ -15099,7 +15099,7 @@ int lua_cocos2dx_extension_PUParticleSystem3D_addBehaviourTemplate(lua_State* to { cocos2d::PUBehaviour* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PUBehaviour",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PUBehaviour",&arg0, "cc.PUParticleSystem3D:addBehaviourTemplate"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_PUParticleSystem3D_addBehaviourTemplate'", nullptr); @@ -15199,7 +15199,7 @@ int lua_cocos2dx_extension_PUParticleSystem3D_copyAttributesTo(lua_State* tolua_ { cocos2d::PUParticleSystem3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PUParticleSystem3D",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PUParticleSystem3D",&arg0, "cc.PUParticleSystem3D:copyAttributesTo"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_PUParticleSystem3D_copyAttributesTo'", nullptr); @@ -15346,7 +15346,7 @@ int lua_cocos2dx_extension_PUParticleSystem3D_removeListener(lua_State* tolua_S) { cocos2d::PUListener* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PUListener",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PUListener",&arg0, "cc.PUParticleSystem3D:removeListener"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_PUParticleSystem3D_removeListener'", nullptr); @@ -15979,7 +15979,7 @@ int lua_cocos2dx_extension_PUParticleSystem3D_addObserver(lua_State* tolua_S) { cocos2d::PUObserver* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PUObserver",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PUObserver",&arg0, "cc.PUParticleSystem3D:addObserver"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_extension_PUParticleSystem3D_addObserver'", nullptr); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp new file mode 100644 index 0000000000..150b475c9e --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp @@ -0,0 +1,11919 @@ +#include "lua_cocos2dx_physics3d_auto.hpp" +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +#include "CCPhysics3D.h" +#include "tolua_fix.h" +#include "LuaBasicConversions.h" + + + +int lua_cocos2dx_physics3d_Physics3DShape_getbtShape(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DShape* 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.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DShape*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DShape_getbtShape'", 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_physics3d_Physics3DShape_getbtShape'", nullptr); + return 0; + } + btCollisionShape* ret = cobj->getbtShape(); + object_to_luaval(tolua_S, "btCollisionShape",(btCollisionShape*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DShape:getbtShape",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_getbtShape'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DShape_getShapeType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DShape* 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.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DShape*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DShape_getShapeType'", 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_physics3d_Physics3DShape_getShapeType'", nullptr); + return 0; + } + int ret = (int)cobj->getShapeType(); + 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.Physics3DShape:getShapeType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_getShapeType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DShape_createBox(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Vec3 arg0; + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DShape:createBox"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createBox'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createBox(arg0); + object_to_luaval(tolua_S, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createBox",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createBox'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DShape_createCylinder(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + double arg0; + double arg1; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DShape:createCylinder"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DShape:createCylinder"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createCylinder'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCylinder(arg0, arg1); + object_to_luaval(tolua_S, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createCylinder",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createCylinder'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DShape_createConvexHull(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + const cocos2d::Vec3* arg0; + int arg1; + ok &= luaval_to_object(tolua_S, 2, "cc.Vec3",&arg0, "cc.Physics3DShape:createConvexHull"); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Physics3DShape:createConvexHull"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createConvexHull'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createConvexHull(arg0, arg1); + object_to_luaval(tolua_S, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createConvexHull",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createConvexHull'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DShape_createCapsule(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + double arg0; + double arg1; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DShape:createCapsule"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DShape:createCapsule"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createCapsule'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCapsule(arg0, arg1); + object_to_luaval(tolua_S, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createCapsule",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createCapsule'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DShape_createSphere(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DShape:createSphere"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createSphere'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createSphere(arg0); + object_to_luaval(tolua_S, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createSphere",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createSphere'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_physics3d_Physics3DShape_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DShape)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DShape(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DShape"); + tolua_cclass(tolua_S,"Physics3DShape","cc.Physics3DShape","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DShape"); + tolua_function(tolua_S,"getbtShape",lua_cocos2dx_physics3d_Physics3DShape_getbtShape); + tolua_function(tolua_S,"getShapeType",lua_cocos2dx_physics3d_Physics3DShape_getShapeType); + tolua_function(tolua_S,"createBox", lua_cocos2dx_physics3d_Physics3DShape_createBox); + tolua_function(tolua_S,"createCylinder", lua_cocos2dx_physics3d_Physics3DShape_createCylinder); + tolua_function(tolua_S,"createConvexHull", lua_cocos2dx_physics3d_Physics3DShape_createConvexHull); + tolua_function(tolua_S,"createCapsule", lua_cocos2dx_physics3d_Physics3DShape_createCapsule); + tolua_function(tolua_S,"createSphere", lua_cocos2dx_physics3d_Physics3DShape_createSphere); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DShape).name(); + g_luaType[typeName] = "cc.Physics3DShape"; + g_typeCast["Physics3DShape"] = "cc.Physics3DShape"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DObject_setUserData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_setUserData'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + void* arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR void* + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DObject_setUserData'", nullptr); + return 0; + } + cobj->setUserData(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:setUserData",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_setUserData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_getUserData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_getUserData'", 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_physics3d_Physics3DObject_getUserData'", nullptr); + return 0; + } + void* ret = cobj->getUserData(); + #pragma warning NO CONVERSION FROM NATIVE FOR void*; + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:getUserData",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_getUserData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_getObjType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_getObjType'", 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_physics3d_Physics3DObject_getObjType'", nullptr); + return 0; + } + int ret = (int)cobj->getObjType(); + 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.Physics3DObject:getObjType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_getObjType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DWorld* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DWorld",&arg0, "cc.Physics3DObject:setPhysicsWorld"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld'", nullptr); + return 0; + } + cobj->setPhysicsWorld(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:setPhysicsWorld",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_getWorldTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_getWorldTransform'", 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_physics3d_Physics3DObject_getWorldTransform'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getWorldTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:getWorldTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_getWorldTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld'", 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_physics3d_Physics3DObject_getPhysicsWorld'", nullptr); + return 0; + } + cocos2d::Physics3DWorld* ret = cobj->getPhysicsWorld(); + object_to_luaval(tolua_S, "cc.Physics3DWorld",(cocos2d::Physics3DWorld*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:getPhysicsWorld",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_setMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_setMask'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Physics3DObject:setMask"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DObject_setMask'", nullptr); + return 0; + } + cobj->setMask(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:setMask",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_setMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_getCollisionCallback(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_getCollisionCallback'", 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_physics3d_Physics3DObject_getCollisionCallback'", nullptr); + return 0; + } + const std::function& ret = cobj->getCollisionCallback(); + #pragma warning NO CONVERSION FROM NATIVE FOR std::function; + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:getCollisionCallback",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_getCollisionCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_getMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_getMask'", 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_physics3d_Physics3DObject_getMask'", nullptr); + return 0; + } + unsigned int ret = cobj->getMask(); + 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.Physics3DObject:getMask",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_getMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DObject_needCollisionCallback(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DObject* 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.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_needCollisionCallback'", 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_physics3d_Physics3DObject_needCollisionCallback'", nullptr); + return 0; + } + bool ret = cobj->needCollisionCallback(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:needCollisionCallback",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_needCollisionCallback'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_physics3d_Physics3DObject_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DObject)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DObject(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DObject"); + tolua_cclass(tolua_S,"Physics3DObject","cc.Physics3DObject","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DObject"); + tolua_function(tolua_S,"setUserData",lua_cocos2dx_physics3d_Physics3DObject_setUserData); + tolua_function(tolua_S,"getUserData",lua_cocos2dx_physics3d_Physics3DObject_getUserData); + tolua_function(tolua_S,"getObjType",lua_cocos2dx_physics3d_Physics3DObject_getObjType); + tolua_function(tolua_S,"setPhysicsWorld",lua_cocos2dx_physics3d_Physics3DObject_setPhysicsWorld); + tolua_function(tolua_S,"getWorldTransform",lua_cocos2dx_physics3d_Physics3DObject_getWorldTransform); + tolua_function(tolua_S,"getPhysicsWorld",lua_cocos2dx_physics3d_Physics3DObject_getPhysicsWorld); + tolua_function(tolua_S,"setMask",lua_cocos2dx_physics3d_Physics3DObject_setMask); + tolua_function(tolua_S,"getCollisionCallback",lua_cocos2dx_physics3d_Physics3DObject_getCollisionCallback); + tolua_function(tolua_S,"getMask",lua_cocos2dx_physics3d_Physics3DObject_getMask); + tolua_function(tolua_S,"needCollisionCallback",lua_cocos2dx_physics3d_Physics3DObject_needCollisionCallback); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DObject).name(); + g_luaType[typeName] = "cc.Physics3DObject"; + g_typeCast["Physics3DObject"] = "cc.Physics3DObject"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DRigidBody_setGravity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setGravity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:setGravity"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setGravity'", nullptr); + return 0; + } + cobj->setGravity(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setGravity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setGravity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getFriction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getFriction'", 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_physics3d_Physics3DRigidBody_getFriction'", nullptr); + return 0; + } + double ret = cobj->getFriction(); + 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.Physics3DRigidBody:getFriction",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getFriction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setAngularFactor"); + + if (!ok) { break; } + cobj->setAngularFactor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Vec3 arg0; + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:setAngularFactor"); + + if (!ok) { break; } + cobj->setAngularFactor(arg0); + 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.Physics3DRigidBody:setAngularFactor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_addConstraint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_addConstraint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DConstraint* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DConstraint",&arg0, "cc.Physics3DRigidBody:addConstraint"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_addConstraint'", nullptr); + return 0; + } + cobj->addConstraint(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:addConstraint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_addConstraint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody'", 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_physics3d_Physics3DRigidBody_getRigidBody'", nullptr); + return 0; + } + btRigidBody* ret = cobj->getRigidBody(); + object_to_luaval(tolua_S, "btRigidBody",(btRigidBody*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getRigidBody",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce'", 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_physics3d_Physics3DRigidBody_getTotalForce'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getTotalForce(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getTotalForce",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount'", 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_physics3d_Physics3DRigidBody_getConstraintCount'", nullptr); + return 0; + } + unsigned int ret = cobj->getConstraintCount(); + 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.Physics3DRigidBody:getConstraintCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:applyCentralForce"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce'", nullptr); + return 0; + } + cobj->applyCentralForce(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:applyCentralForce",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setMassProps(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setMassProps'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + double arg0; + cocos2d::Vec3 arg1; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setMassProps"); + + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Physics3DRigidBody:setMassProps"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setMassProps'", nullptr); + return 0; + } + cobj->setMassProps(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.Physics3DRigidBody:setMassProps",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setMassProps'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setFriction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setFriction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setFriction"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setFriction'", nullptr); + return 0; + } + cobj->setFriction(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setFriction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setFriction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setKinematic(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setKinematic'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setKinematic"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setKinematic'", nullptr); + return 0; + } + cobj->setKinematic(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setKinematic",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setKinematic'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setDamping(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setDamping'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + double arg0; + double arg1; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setDamping"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DRigidBody:setDamping"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setDamping'", nullptr); + return 0; + } + cobj->setDamping(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.Physics3DRigidBody:setDamping",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setDamping'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:applyImpulse"); + + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Physics3DRigidBody:applyImpulse"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse'", nullptr); + return 0; + } + cobj->applyImpulse(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.Physics3DRigidBody:applyImpulse",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_isKinematic(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_isKinematic'", 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_physics3d_Physics3DRigidBody_isKinematic'", nullptr); + return 0; + } + bool ret = cobj->isKinematic(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:isKinematic",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_isKinematic'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorque(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorque'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:applyTorque"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorque'", nullptr); + return 0; + } + cobj->applyTorque(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:applyTorque",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorque'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setCcdMotionThreshold"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold'", nullptr); + return 0; + } + cobj->setCcdMotionThreshold(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setCcdMotionThreshold",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setRollingFriction"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction'", nullptr); + return 0; + } + cobj->setRollingFriction(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setRollingFriction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold'", 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_physics3d_Physics3DRigidBody_getCcdMotionThreshold'", nullptr); + return 0; + } + double ret = cobj->getCcdMotionThreshold(); + 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.Physics3DRigidBody:getCcdMotionThreshold",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor'", 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_physics3d_Physics3DRigidBody_getLinearFactor'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getLinearFactor(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getLinearFactor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_applyDamping(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyDamping'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:applyDamping"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyDamping'", nullptr); + return 0; + } + cobj->applyDamping(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:applyDamping",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyDamping'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity'", 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_physics3d_Physics3DRigidBody_getAngularVelocity'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getAngularVelocity(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getAngularVelocity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_init(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_init'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DRigidBodyDes* arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR Physics3DRigidBodyDes* + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_init'", nullptr); + return 0; + } + bool ret = cobj->init(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.Physics3DRigidBody:init",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_init'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:applyTorqueImpulse"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse'", nullptr); + return 0; + } + cobj->applyTorqueImpulse(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:applyTorqueImpulse",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setActive(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setActive'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setActive"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setActive'", nullptr); + return 0; + } + cobj->setActive(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setActive",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setActive'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:setLinearFactor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor'", nullptr); + return 0; + } + cobj->setLinearFactor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setLinearFactor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:setLinearVelocity"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity'", nullptr); + return 0; + } + cobj->setLinearVelocity(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setLinearVelocity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity'", 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_physics3d_Physics3DRigidBody_getLinearVelocity'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getLinearVelocity(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getLinearVelocity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setCcdSweptSphereRadius"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius'", nullptr); + return 0; + } + cobj->setCcdSweptSphereRadius(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setCcdSweptSphereRadius",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_applyForce(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyForce'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:applyForce"); + + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Physics3DRigidBody:applyForce"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyForce'", nullptr); + return 0; + } + cobj->applyForce(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.Physics3DRigidBody:applyForce",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyForce'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:setAngularVelocity"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity'", nullptr); + return 0; + } + cobj->setAngularVelocity(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setAngularVelocity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:applyCentralImpulse"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse'", nullptr); + return 0; + } + cobj->applyCentralImpulse(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:applyCentralImpulse",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getGravity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getGravity'", 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_physics3d_Physics3DRigidBody_getGravity'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getGravity(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getGravity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getGravity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction'", 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_physics3d_Physics3DRigidBody_getRollingFriction'", nullptr); + return 0; + } + double ret = cobj->getRollingFriction(); + 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.Physics3DRigidBody:getRollingFriction",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:setCenterOfMassTransform"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform'", nullptr); + return 0; + } + cobj->setCenterOfMassTransform(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setCenterOfMassTransform",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DRigidBody:setInvInertiaDiagLocal"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal'", nullptr); + return 0; + } + cobj->setInvInertiaDiagLocal(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setInvInertiaDiagLocal",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + unsigned int arg0; + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:removeConstraint"); + + if (!ok) { break; } + cobj->removeConstraint(arg0); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Physics3DConstraint* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DConstraint",&arg0, "cc.Physics3DRigidBody:removeConstraint"); + + if (!ok) { break; } + cobj->removeConstraint(arg0); + 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.Physics3DRigidBody:removeConstraint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque'", 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_physics3d_Physics3DRigidBody_getTotalTorque'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getTotalTorque(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getTotalTorque",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getInvMass(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getInvMass'", 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_physics3d_Physics3DRigidBody_getInvMass'", nullptr); + return 0; + } + double ret = cobj->getInvMass(); + 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.Physics3DRigidBody:getInvMass",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getInvMass'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:getConstraint"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraint'", nullptr); + return 0; + } + cocos2d::Physics3DConstraint* ret = cobj->getConstraint(arg0); + object_to_luaval(tolua_S, "cc.Physics3DConstraint",(cocos2d::Physics3DConstraint*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getConstraint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getRestitution(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getRestitution'", 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_physics3d_Physics3DRigidBody_getRestitution'", nullptr); + return 0; + } + double ret = cobj->getRestitution(); + 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.Physics3DRigidBody:getRestitution",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getRestitution'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius'", 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_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius'", nullptr); + return 0; + } + double ret = cobj->getCcdSweptSphereRadius(); + 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.Physics3DRigidBody:getCcdSweptSphereRadius",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction'", 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_physics3d_Physics3DRigidBody_getHitFraction'", nullptr); + return 0; + } + double ret = cobj->getHitFraction(); + 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.Physics3DRigidBody:getHitFraction",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping'", 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_physics3d_Physics3DRigidBody_getAngularDamping'", nullptr); + return 0; + } + double ret = cobj->getAngularDamping(); + 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.Physics3DRigidBody:getAngularDamping",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal'", 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_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getInvInertiaDiagLocal(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getInvInertiaDiagLocal",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform'", 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_physics3d_Physics3DRigidBody_getCenterOfMassTransform'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getCenterOfMassTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getCenterOfMassTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor'", 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_physics3d_Physics3DRigidBody_getAngularFactor'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getAngularFactor(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:getAngularFactor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setRestitution(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setRestitution'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setRestitution"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setRestitution'", nullptr); + return 0; + } + cobj->setRestitution(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setRestitution",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setRestitution'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DRigidBody:setHitFraction"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction'", nullptr); + return 0; + } + cobj->setHitFraction(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:setHitFraction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* 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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DRigidBody*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping'", 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_physics3d_Physics3DRigidBody_getLinearDamping'", nullptr); + return 0; + } + double ret = cobj->getLinearDamping(); + 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.Physics3DRigidBody:getLinearDamping",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DRigidBody_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DRigidBody* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3DRigidBody(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3DRigidBody"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DRigidBody:Physics3DRigidBody",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3DRigidBody_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DRigidBody)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DRigidBody(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DRigidBody"); + tolua_cclass(tolua_S,"Physics3DRigidBody","cc.Physics3DRigidBody","cc.Physics3DObject",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DRigidBody"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3DRigidBody_constructor); + tolua_function(tolua_S,"setGravity",lua_cocos2dx_physics3d_Physics3DRigidBody_setGravity); + tolua_function(tolua_S,"getFriction",lua_cocos2dx_physics3d_Physics3DRigidBody_getFriction); + tolua_function(tolua_S,"setAngularFactor",lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor); + tolua_function(tolua_S,"addConstraint",lua_cocos2dx_physics3d_Physics3DRigidBody_addConstraint); + tolua_function(tolua_S,"getRigidBody",lua_cocos2dx_physics3d_Physics3DRigidBody_getRigidBody); + tolua_function(tolua_S,"getTotalForce",lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalForce); + tolua_function(tolua_S,"getConstraintCount",lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraintCount); + tolua_function(tolua_S,"applyCentralForce",lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralForce); + tolua_function(tolua_S,"setMassProps",lua_cocos2dx_physics3d_Physics3DRigidBody_setMassProps); + tolua_function(tolua_S,"setFriction",lua_cocos2dx_physics3d_Physics3DRigidBody_setFriction); + tolua_function(tolua_S,"setKinematic",lua_cocos2dx_physics3d_Physics3DRigidBody_setKinematic); + tolua_function(tolua_S,"setDamping",lua_cocos2dx_physics3d_Physics3DRigidBody_setDamping); + tolua_function(tolua_S,"applyImpulse",lua_cocos2dx_physics3d_Physics3DRigidBody_applyImpulse); + tolua_function(tolua_S,"isKinematic",lua_cocos2dx_physics3d_Physics3DRigidBody_isKinematic); + tolua_function(tolua_S,"applyTorque",lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorque); + tolua_function(tolua_S,"setCcdMotionThreshold",lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdMotionThreshold); + tolua_function(tolua_S,"setRollingFriction",lua_cocos2dx_physics3d_Physics3DRigidBody_setRollingFriction); + tolua_function(tolua_S,"getCcdMotionThreshold",lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdMotionThreshold); + tolua_function(tolua_S,"getLinearFactor",lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearFactor); + tolua_function(tolua_S,"applyDamping",lua_cocos2dx_physics3d_Physics3DRigidBody_applyDamping); + tolua_function(tolua_S,"getAngularVelocity",lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularVelocity); + tolua_function(tolua_S,"init",lua_cocos2dx_physics3d_Physics3DRigidBody_init); + tolua_function(tolua_S,"applyTorqueImpulse",lua_cocos2dx_physics3d_Physics3DRigidBody_applyTorqueImpulse); + tolua_function(tolua_S,"setActive",lua_cocos2dx_physics3d_Physics3DRigidBody_setActive); + tolua_function(tolua_S,"setLinearFactor",lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearFactor); + tolua_function(tolua_S,"setLinearVelocity",lua_cocos2dx_physics3d_Physics3DRigidBody_setLinearVelocity); + tolua_function(tolua_S,"getLinearVelocity",lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearVelocity); + tolua_function(tolua_S,"setCcdSweptSphereRadius",lua_cocos2dx_physics3d_Physics3DRigidBody_setCcdSweptSphereRadius); + tolua_function(tolua_S,"applyForce",lua_cocos2dx_physics3d_Physics3DRigidBody_applyForce); + tolua_function(tolua_S,"setAngularVelocity",lua_cocos2dx_physics3d_Physics3DRigidBody_setAngularVelocity); + tolua_function(tolua_S,"applyCentralImpulse",lua_cocos2dx_physics3d_Physics3DRigidBody_applyCentralImpulse); + tolua_function(tolua_S,"getGravity",lua_cocos2dx_physics3d_Physics3DRigidBody_getGravity); + tolua_function(tolua_S,"getRollingFriction",lua_cocos2dx_physics3d_Physics3DRigidBody_getRollingFriction); + tolua_function(tolua_S,"setCenterOfMassTransform",lua_cocos2dx_physics3d_Physics3DRigidBody_setCenterOfMassTransform); + tolua_function(tolua_S,"setInvInertiaDiagLocal",lua_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal); + tolua_function(tolua_S,"removeConstraint",lua_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint); + tolua_function(tolua_S,"getTotalTorque",lua_cocos2dx_physics3d_Physics3DRigidBody_getTotalTorque); + tolua_function(tolua_S,"getInvMass",lua_cocos2dx_physics3d_Physics3DRigidBody_getInvMass); + tolua_function(tolua_S,"getConstraint",lua_cocos2dx_physics3d_Physics3DRigidBody_getConstraint); + tolua_function(tolua_S,"getRestitution",lua_cocos2dx_physics3d_Physics3DRigidBody_getRestitution); + tolua_function(tolua_S,"getCcdSweptSphereRadius",lua_cocos2dx_physics3d_Physics3DRigidBody_getCcdSweptSphereRadius); + tolua_function(tolua_S,"getHitFraction",lua_cocos2dx_physics3d_Physics3DRigidBody_getHitFraction); + tolua_function(tolua_S,"getAngularDamping",lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularDamping); + tolua_function(tolua_S,"getInvInertiaDiagLocal",lua_cocos2dx_physics3d_Physics3DRigidBody_getInvInertiaDiagLocal); + tolua_function(tolua_S,"getCenterOfMassTransform",lua_cocos2dx_physics3d_Physics3DRigidBody_getCenterOfMassTransform); + tolua_function(tolua_S,"getAngularFactor",lua_cocos2dx_physics3d_Physics3DRigidBody_getAngularFactor); + tolua_function(tolua_S,"setRestitution",lua_cocos2dx_physics3d_Physics3DRigidBody_setRestitution); + tolua_function(tolua_S,"setHitFraction",lua_cocos2dx_physics3d_Physics3DRigidBody_setHitFraction); + tolua_function(tolua_S,"getLinearDamping",lua_cocos2dx_physics3d_Physics3DRigidBody_getLinearDamping); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DRigidBody).name(); + g_luaType[typeName] = "cc.Physics3DRigidBody"; + g_typeCast["Physics3DRigidBody"] = "cc.Physics3DRigidBody"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DComponent* 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.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DComponent*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DWorld* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DWorld",&arg0, "cc.Physics3DComponent:addToPhysicsWorld"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld'", nullptr); + return 0; + } + cobj->addToPhysicsWorld(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DComponent:addToPhysicsWorld",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DComponent_syncToPhysics(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DComponent* 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.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DComponent*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DComponent_syncToPhysics'", 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_physics3d_Physics3DComponent_syncToPhysics'", nullptr); + return 0; + } + cobj->syncToPhysics(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DComponent:syncToPhysics",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_syncToPhysics'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DComponent_syncToNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DComponent* 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.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DComponent*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DComponent_syncToNode'", 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_physics3d_Physics3DComponent_syncToNode'", nullptr); + return 0; + } + cobj->syncToNode(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DComponent:syncToNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_syncToNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DComponent* 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.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DComponent*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject'", 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_physics3d_Physics3DComponent_getPhysics3DObject'", nullptr); + return 0; + } + cocos2d::Physics3DObject* ret = cobj->getPhysics3DObject(); + object_to_luaval(tolua_S, "cc.Physics3DObject",(cocos2d::Physics3DObject*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DComponent:getPhysics3DObject",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DComponent* 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.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DComponent*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DObject* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DObject",&arg0, "cc.Physics3DComponent:setPhysics3DObject"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject'", nullptr); + return 0; + } + cobj->setPhysics3DObject(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DComponent:setPhysics3DObject",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DComponent_setSyncFlag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DComponent* 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.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DComponent*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DComponent_setSyncFlag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DComponent::PhysicsSyncFlag arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Physics3DComponent:setSyncFlag"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DComponent_setSyncFlag'", nullptr); + return 0; + } + cobj->setSyncFlag(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DComponent:setSyncFlag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_setSyncFlag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName'", nullptr); + return 0; + } + std::string& ret = cocos2d::Physics3DComponent::getPhysics3DComponentName(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DComponent:getPhysics3DComponentName",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DComponent_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DComponent* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DComponent_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3DComponent(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3DComponent"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DComponent:Physics3DComponent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3DComponent_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DComponent)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DComponent(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DComponent"); + tolua_cclass(tolua_S,"Physics3DComponent","cc.Physics3DComponent","cc.Component",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DComponent"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3DComponent_constructor); + tolua_function(tolua_S,"addToPhysicsWorld",lua_cocos2dx_physics3d_Physics3DComponent_addToPhysicsWorld); + tolua_function(tolua_S,"syncToPhysics",lua_cocos2dx_physics3d_Physics3DComponent_syncToPhysics); + tolua_function(tolua_S,"syncToNode",lua_cocos2dx_physics3d_Physics3DComponent_syncToNode); + tolua_function(tolua_S,"getPhysics3DObject",lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DObject); + tolua_function(tolua_S,"setPhysics3DObject",lua_cocos2dx_physics3d_Physics3DComponent_setPhysics3DObject); + tolua_function(tolua_S,"setSyncFlag",lua_cocos2dx_physics3d_Physics3DComponent_setSyncFlag); + tolua_function(tolua_S,"getPhysics3DComponentName", lua_cocos2dx_physics3d_Physics3DComponent_getPhysics3DComponentName); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DComponent).name(); + g_luaType[typeName] = "cc.Physics3DComponent"; + g_typeCast["Physics3DComponent"] = "cc.Physics3DComponent"; + return 1; +} + +int lua_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::PhysicsSprite3D* 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.PhysicsSprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::PhysicsSprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics'", 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_physics3d_PhysicsSprite3D_syncToPhysics'", nullptr); + return 0; + } + cobj->syncToPhysics(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsSprite3D:syncToPhysics",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_PhysicsSprite3D_syncToNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::PhysicsSprite3D* 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.PhysicsSprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::PhysicsSprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_syncToNode'", 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_physics3d_PhysicsSprite3D_syncToNode'", nullptr); + return 0; + } + cobj->syncToNode(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsSprite3D:syncToNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_syncToNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::PhysicsSprite3D* 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.PhysicsSprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::PhysicsSprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj'", 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_physics3d_PhysicsSprite3D_getPhysicsObj'", nullptr); + return 0; + } + cocos2d::Physics3DObject* ret = cobj->getPhysicsObj(); + object_to_luaval(tolua_S, "cc.Physics3DObject",(cocos2d::Physics3DObject*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsSprite3D:getPhysicsObj",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::PhysicsSprite3D* 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.PhysicsSprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::PhysicsSprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DComponent::PhysicsSyncFlag arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.PhysicsSprite3D:setSyncFlag"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag'", nullptr); + return 0; + } + cobj->setSyncFlag(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsSprite3D:setSyncFlag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_PhysicsSprite3D_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::PhysicsSprite3D* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::PhysicsSprite3D(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.PhysicsSprite3D"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsSprite3D:PhysicsSprite3D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_PhysicsSprite3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (PhysicsSprite3D)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_PhysicsSprite3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.PhysicsSprite3D"); + tolua_cclass(tolua_S,"PhysicsSprite3D","cc.PhysicsSprite3D","cc.Sprite3D",nullptr); + + tolua_beginmodule(tolua_S,"PhysicsSprite3D"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_PhysicsSprite3D_constructor); + tolua_function(tolua_S,"syncToPhysics",lua_cocos2dx_physics3d_PhysicsSprite3D_syncToPhysics); + tolua_function(tolua_S,"syncToNode",lua_cocos2dx_physics3d_PhysicsSprite3D_syncToNode); + tolua_function(tolua_S,"getPhysicsObj",lua_cocos2dx_physics3d_PhysicsSprite3D_getPhysicsObj); + tolua_function(tolua_S,"setSyncFlag",lua_cocos2dx_physics3d_PhysicsSprite3D_setSyncFlag); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::PhysicsSprite3D).name(); + g_luaType[typeName] = "cc.PhysicsSprite3D"; + g_typeCast["PhysicsSprite3D"] = "cc.PhysicsSprite3D"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DWorld_stepSimulate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_stepSimulate'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DWorld:stepSimulate"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_stepSimulate'", nullptr); + return 0; + } + cobj->stepSimulate(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:stepSimulate",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_stepSimulate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking'", 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_physics3d_Physics3DWorld_needCollisionChecking'", nullptr); + return 0; + } + bool ret = cobj->needCollisionChecking(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:needCollisionChecking",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_collisionChecking(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_collisionChecking'", 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_physics3d_Physics3DWorld_collisionChecking'", nullptr); + return 0; + } + cobj->collisionChecking(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:collisionChecking",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_collisionChecking'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DConstraint* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DConstraint",&arg0, "cc.Physics3DWorld:removePhysics3DConstraint"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint'", nullptr); + return 0; + } + cobj->removePhysics3DConstraint(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:removePhysics3DConstraint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled'", 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_physics3d_Physics3DWorld_isDebugDrawEnabled'", nullptr); + return 0; + } + bool ret = cobj->isDebugDrawEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:isDebugDrawEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints'", 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_physics3d_Physics3DWorld_removeAllPhysics3DConstraints'", nullptr); + return 0; + } + cobj->removeAllPhysics3DConstraints(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:removeAllPhysics3DConstraints",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects'", 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_physics3d_Physics3DWorld_removeAllPhysics3DObjects'", nullptr); + return 0; + } + cobj->removeAllPhysics3DObjects(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:removeAllPhysics3DObjects",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DObject* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DObject",&arg0, "cc.Physics3DWorld:addPhysics3DObject"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject'", nullptr); + return 0; + } + cobj->addPhysics3DObject(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:addPhysics3DObject",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DWorld:setDebugDrawEnable"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable'", nullptr); + return 0; + } + cobj->setDebugDrawEnable(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:setDebugDrawEnable",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DObject* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DObject",&arg0, "cc.Physics3DWorld:removePhysics3DObject"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject'", nullptr); + return 0; + } + cobj->removePhysics3DObject(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:removePhysics3DObject",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Physics3DConstraint* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DConstraint",&arg0, "cc.Physics3DWorld:addPhysics3DConstraint"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint'", nullptr); + return 0; + } + cobj->addPhysics3DConstraint(arg0); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 2) + { + cocos2d::Physics3DConstraint* arg0; + bool arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DConstraint",&arg0, "cc.Physics3DWorld:addPhysics3DConstraint"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Physics3DWorld:addPhysics3DConstraint"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint'", nullptr); + return 0; + } + cobj->addPhysics3DConstraint(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.Physics3DWorld:addPhysics3DConstraint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_debugDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_debugDraw'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Renderer* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0, "cc.Physics3DWorld:debugDraw"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_debugDraw'", nullptr); + return 0; + } + cobj->debugDraw(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:debugDraw",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_debugDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DWorld_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3DWorld(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3DWorld"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:Physics3DWorld",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3DWorld_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DWorld)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DWorld(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DWorld"); + tolua_cclass(tolua_S,"Physics3DWorld","cc.Physics3DWorld","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DWorld"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3DWorld_constructor); + tolua_function(tolua_S,"stepSimulate",lua_cocos2dx_physics3d_Physics3DWorld_stepSimulate); + tolua_function(tolua_S,"needCollisionChecking",lua_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking); + tolua_function(tolua_S,"collisionChecking",lua_cocos2dx_physics3d_Physics3DWorld_collisionChecking); + tolua_function(tolua_S,"removePhysics3DConstraint",lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DConstraint); + tolua_function(tolua_S,"isDebugDrawEnabled",lua_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled); + tolua_function(tolua_S,"removeAllPhysics3DConstraints",lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints); + tolua_function(tolua_S,"removeAllPhysics3DObjects",lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects); + tolua_function(tolua_S,"addPhysics3DObject",lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DObject); + tolua_function(tolua_S,"setDebugDrawEnable",lua_cocos2dx_physics3d_Physics3DWorld_setDebugDrawEnable); + tolua_function(tolua_S,"removePhysics3DObject",lua_cocos2dx_physics3d_Physics3DWorld_removePhysics3DObject); + tolua_function(tolua_S,"addPhysics3DConstraint",lua_cocos2dx_physics3d_Physics3DWorld_addPhysics3DConstraint); + tolua_function(tolua_S,"debugDraw",lua_cocos2dx_physics3d_Physics3DWorld_debugDraw); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DWorld).name(); + g_luaType[typeName] = "cc.Physics3DWorld"; + g_typeCast["Physics3DWorld"] = "cc.Physics3DWorld"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DConstraint_setEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DConstraint:setEnabled"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setEnabled'", nullptr); + return 0; + } + cobj->setEnabled(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:setEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConstraint:setBreakingImpulse"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse'", nullptr); + return 0; + } + cobj->setBreakingImpulse(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:setBreakingImpulse",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_getUserData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getUserData'", 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_physics3d_Physics3DConstraint_getUserData'", nullptr); + return 0; + } + void* ret = cobj->getUserData(); + #pragma warning NO CONVERSION FROM NATIVE FOR void*; + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:getUserData",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getUserData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse'", 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_physics3d_Physics3DConstraint_getBreakingImpulse'", nullptr); + return 0; + } + double ret = cobj->getBreakingImpulse(); + 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.Physics3DConstraint:getBreakingImpulse",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_getBodyA(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getBodyA'", 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_physics3d_Physics3DConstraint_getBodyA'", nullptr); + return 0; + } + cocos2d::Physics3DRigidBody* ret = cobj->getBodyA(); + object_to_luaval(tolua_S, "cc.Physics3DRigidBody",(cocos2d::Physics3DRigidBody*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:getBodyA",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getBodyA'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_isEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_isEnabled'", 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_physics3d_Physics3DConstraint_isEnabled'", nullptr); + return 0; + } + bool ret = cobj->isEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:isEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_isEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations'", 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_physics3d_Physics3DConstraint_getOverrideNumSolverIterations'", nullptr); + return 0; + } + int ret = cobj->getOverrideNumSolverIterations(); + 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.Physics3DConstraint:getOverrideNumSolverIterations",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_getBodyB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getBodyB'", 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_physics3d_Physics3DConstraint_getBodyB'", nullptr); + return 0; + } + cocos2d::Physics3DRigidBody* ret = cobj->getBodyB(); + object_to_luaval(tolua_S, "cc.Physics3DRigidBody",(cocos2d::Physics3DRigidBody*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:getBodyB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getBodyB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations'", 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.Physics3DConstraint:setOverrideNumSolverIterations"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations'", nullptr); + return 0; + } + cobj->setOverrideNumSolverIterations(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:setOverrideNumSolverIterations",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_getConstraintType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getConstraintType'", 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_physics3d_Physics3DConstraint_getConstraintType'", nullptr); + return 0; + } + int ret = (int)cobj->getConstraintType(); + 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.Physics3DConstraint:getConstraintType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getConstraintType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_setUserData(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setUserData'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + void* arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR void* + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setUserData'", nullptr); + return 0; + } + cobj->setUserData(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:setUserData",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_setUserData'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConstraint_getbtContraint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConstraint* 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.Physics3DConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getbtContraint'", 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_physics3d_Physics3DConstraint_getbtContraint'", nullptr); + return 0; + } + btTypedConstraint* ret = cobj->getbtContraint(); + object_to_luaval(tolua_S, "btTypedConstraint",(btTypedConstraint*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConstraint:getbtContraint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConstraint_getbtContraint'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_physics3d_Physics3DConstraint_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DConstraint)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DConstraint(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DConstraint"); + tolua_cclass(tolua_S,"Physics3DConstraint","cc.Physics3DConstraint","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DConstraint"); + tolua_function(tolua_S,"setEnabled",lua_cocos2dx_physics3d_Physics3DConstraint_setEnabled); + tolua_function(tolua_S,"setBreakingImpulse",lua_cocos2dx_physics3d_Physics3DConstraint_setBreakingImpulse); + tolua_function(tolua_S,"getUserData",lua_cocos2dx_physics3d_Physics3DConstraint_getUserData); + tolua_function(tolua_S,"getBreakingImpulse",lua_cocos2dx_physics3d_Physics3DConstraint_getBreakingImpulse); + tolua_function(tolua_S,"getBodyA",lua_cocos2dx_physics3d_Physics3DConstraint_getBodyA); + tolua_function(tolua_S,"isEnabled",lua_cocos2dx_physics3d_Physics3DConstraint_isEnabled); + tolua_function(tolua_S,"getOverrideNumSolverIterations",lua_cocos2dx_physics3d_Physics3DConstraint_getOverrideNumSolverIterations); + tolua_function(tolua_S,"getBodyB",lua_cocos2dx_physics3d_Physics3DConstraint_getBodyB); + tolua_function(tolua_S,"setOverrideNumSolverIterations",lua_cocos2dx_physics3d_Physics3DConstraint_setOverrideNumSolverIterations); + tolua_function(tolua_S,"getConstraintType",lua_cocos2dx_physics3d_Physics3DConstraint_getConstraintType); + tolua_function(tolua_S,"setUserData",lua_cocos2dx_physics3d_Physics3DConstraint_setUserData); + tolua_function(tolua_S,"getbtContraint",lua_cocos2dx_physics3d_Physics3DConstraint_getbtContraint); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DConstraint).name(); + g_luaType[typeName] = "cc.Physics3DConstraint"; + g_typeCast["Physics3DConstraint"] = "cc.Physics3DConstraint"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DPointToPointConstraint* 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.Physics3DPointToPointConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DPointToPointConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA'", 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_physics3d_Physics3DPointToPointConstraint_getPivotPointInA'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getPivotPointInA(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DPointToPointConstraint:getPivotPointInA",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DPointToPointConstraint* 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.Physics3DPointToPointConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DPointToPointConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB'", 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_physics3d_Physics3DPointToPointConstraint_getPivotPointInB'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getPivotPointInB(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DPointToPointConstraint:getPivotPointInB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DPointToPointConstraint* 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.Physics3DPointToPointConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DPointToPointConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DPointToPointConstraint:setPivotPointInA"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA'", nullptr); + return 0; + } + cobj->setPivotPointInA(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DPointToPointConstraint:setPivotPointInA",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DPointToPointConstraint* 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.Physics3DPointToPointConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DPointToPointConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DPointToPointConstraint:setPivotPointInB"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB'", nullptr); + return 0; + } + cobj->setPivotPointInB(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DPointToPointConstraint:setPivotPointInB",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DPointToPointConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 4) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DPointToPointConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DRigidBody* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3DPointToPointConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg2; + ok &= luaval_to_vec3(tolua_S, 4, &arg2, "cc.Physics3DPointToPointConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg3; + ok &= luaval_to_vec3(tolua_S, 5, &arg3, "cc.Physics3DPointToPointConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DPointToPointConstraint* ret = cocos2d::Physics3DPointToPointConstraint::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Physics3DPointToPointConstraint",(cocos2d::Physics3DPointToPointConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DPointToPointConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Physics3DPointToPointConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DPointToPointConstraint* ret = cocos2d::Physics3DPointToPointConstraint::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Physics3DPointToPointConstraint",(cocos2d::Physics3DPointToPointConstraint*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Physics3DPointToPointConstraint:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DPointToPointConstraint* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3DPointToPointConstraint(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3DPointToPointConstraint"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DPointToPointConstraint:Physics3DPointToPointConstraint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DPointToPointConstraint)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DPointToPointConstraint(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DPointToPointConstraint"); + tolua_cclass(tolua_S,"Physics3DPointToPointConstraint","cc.Physics3DPointToPointConstraint","cc.Physics3DConstraint",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DPointToPointConstraint"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_constructor); + tolua_function(tolua_S,"getPivotPointInA",lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInA); + tolua_function(tolua_S,"getPivotPointInB",lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB); + tolua_function(tolua_S,"setPivotPointInA",lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInA); + tolua_function(tolua_S,"setPivotPointInB",lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_setPivotPointInB); + tolua_function(tolua_S,"create", lua_cocos2dx_physics3d_Physics3DPointToPointConstraint_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DPointToPointConstraint).name(); + g_luaType[typeName] = "cc.Physics3DPointToPointConstraint"; + g_typeCast["Physics3DPointToPointConstraint"] = "cc.Physics3DPointToPointConstraint"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Mat4 arg0; + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Physics3DHingeConstraint:getHingeAngle"); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3DHingeConstraint:getHingeAngle"); + + if (!ok) { break; } + double ret = cobj->getHingeAngle(arg0, arg1); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + double ret = cobj->getHingeAngle(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + }while(0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getHingeAngle",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity'", 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_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity'", nullptr); + return 0; + } + double ret = cobj->getMotorTargetVelosity(); + 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.Physics3DHingeConstraint:getMotorTargetVelosity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA'", 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_physics3d_Physics3DHingeConstraint_getFrameOffsetA'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getFrameOffsetA(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getFrameOffsetA",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB'", 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_physics3d_Physics3DHingeConstraint_getFrameOffsetB'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getFrameOffsetB(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getFrameOffsetB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:setMaxMotorImpulse"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse'", nullptr); + return 0; + } + cobj->setMaxMotorImpulse(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:setMaxMotorImpulse",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + bool arg0; + double arg1; + double arg2; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:enableAngularMotor"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DHingeConstraint:enableAngularMotor"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DHingeConstraint:enableAngularMotor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor'", nullptr); + return 0; + } + cobj->enableAngularMotor(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.Physics3DHingeConstraint:enableAngularMotor",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit'", 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_physics3d_Physics3DHingeConstraint_getUpperLimit'", nullptr); + return 0; + } + double ret = cobj->getUpperLimit(); + 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.Physics3DHingeConstraint:getUpperLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse'", 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_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse'", nullptr); + return 0; + } + double ret = cobj->getMaxMotorImpulse(); + 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.Physics3DHingeConstraint:getMaxMotorImpulse",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit'", 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_physics3d_Physics3DHingeConstraint_getLowerLimit'", nullptr); + return 0; + } + double ret = cobj->getLowerLimit(); + 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.Physics3DHingeConstraint:getLowerLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:setUseFrameOffset"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset'", nullptr); + return 0; + } + cobj->setUseFrameOffset(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:setUseFrameOffset",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor'", 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_physics3d_Physics3DHingeConstraint_getEnableAngularMotor'", nullptr); + return 0; + } + bool ret = cobj->getEnableAngularMotor(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getEnableAngularMotor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:enableMotor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor'", nullptr); + return 0; + } + cobj->enableMotor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:enableMotor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame'", 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_physics3d_Physics3DHingeConstraint_getBFrame'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getBFrame(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getBFrame",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Mat4 arg0; + cocos2d::Mat4 arg1; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Physics3DHingeConstraint:setFrames"); + + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3DHingeConstraint:setFrames"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames'", nullptr); + return 0; + } + cobj->setFrames(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.Physics3DHingeConstraint:setFrames",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset'", 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_physics3d_Physics3DHingeConstraint_getUseFrameOffset'", nullptr); + return 0; + } + bool ret = cobj->getUseFrameOffset(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getUseFrameOffset",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:setAngularOnly"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly'", nullptr); + return 0; + } + cobj->setAngularOnly(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:setAngularOnly",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + double arg0; + double arg1; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DHingeConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 3) + { + double arg0; + double arg1; + double arg2; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DHingeConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 4) + { + double arg0; + double arg1; + double arg2; + double arg3; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Physics3DHingeConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1, arg2, arg3); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 5) + { + double arg0; + double arg1; + double arg2; + double arg3; + double arg4; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Physics3DHingeConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.Physics3DHingeConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1, arg2, arg3, arg4); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:setLimit",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly'", 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_physics3d_Physics3DHingeConstraint_getAngularOnly'", nullptr); + return 0; + } + bool ret = cobj->getAngularOnly(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getAngularOnly",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3DHingeConstraint:setAxis"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis'", nullptr); + return 0; + } + cobj->setAxis(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:setAxis",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* 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.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DHingeConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame'", 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_physics3d_Physics3DHingeConstraint_getAFrame'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getAFrame(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:getAFrame",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DHingeConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 3) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg2; + ok &= luaval_to_vec3(tolua_S, 4, &arg2, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 4) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg2; + ok &= luaval_to_vec3(tolua_S, 4, &arg2, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + bool arg3; + ok &= luaval_to_boolean(tolua_S, 5,&arg3, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 6) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DRigidBody* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg2; + ok &= luaval_to_vec3(tolua_S, 4, &arg2, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg3; + ok &= luaval_to_vec3(tolua_S, 5, &arg3, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg4; + ok &= luaval_to_vec3(tolua_S, 6, &arg4, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg5; + ok &= luaval_to_vec3(tolua_S, 7, &arg5, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3, arg4, arg5); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 7) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DRigidBody* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg2; + ok &= luaval_to_vec3(tolua_S, 4, &arg2, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg3; + ok &= luaval_to_vec3(tolua_S, 5, &arg3, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg4; + ok &= luaval_to_vec3(tolua_S, 6, &arg4, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Vec3 arg5; + ok &= luaval_to_vec3(tolua_S, 7, &arg5, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + bool arg6; + ok &= luaval_to_boolean(tolua_S, 8,&arg6, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3, arg4, arg5, arg6); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 4) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DRigidBody* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg2; + ok &= luaval_to_mat4(tolua_S, 4, &arg2, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg3; + ok &= luaval_to_mat4(tolua_S, 5, &arg3, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 5) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DRigidBody* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg2; + ok &= luaval_to_mat4(tolua_S, 4, &arg2, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg3; + ok &= luaval_to_mat4(tolua_S, 5, &arg3, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + bool arg4; + ok &= luaval_to_boolean(tolua_S, 6,&arg4, "cc.Physics3DHingeConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DHingeConstraint* ret = cocos2d::Physics3DHingeConstraint::create(arg0, arg1, arg2, arg3, arg4); + object_to_luaval(tolua_S, "cc.Physics3DHingeConstraint",(cocos2d::Physics3DHingeConstraint*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Physics3DHingeConstraint:create",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DHingeConstraint_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DHingeConstraint* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3DHingeConstraint(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3DHingeConstraint"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DHingeConstraint:Physics3DHingeConstraint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DHingeConstraint_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3DHingeConstraint_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DHingeConstraint)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DHingeConstraint(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DHingeConstraint"); + tolua_cclass(tolua_S,"Physics3DHingeConstraint","cc.Physics3DHingeConstraint","cc.Physics3DConstraint",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DHingeConstraint"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3DHingeConstraint_constructor); + tolua_function(tolua_S,"getHingeAngle",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle); + tolua_function(tolua_S,"getMotorTargetVelosity",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMotorTargetVelosity); + tolua_function(tolua_S,"getFrameOffsetA",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetA); + tolua_function(tolua_S,"getFrameOffsetB",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getFrameOffsetB); + tolua_function(tolua_S,"setMaxMotorImpulse",lua_cocos2dx_physics3d_Physics3DHingeConstraint_setMaxMotorImpulse); + tolua_function(tolua_S,"enableAngularMotor",lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableAngularMotor); + tolua_function(tolua_S,"getUpperLimit",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUpperLimit); + tolua_function(tolua_S,"getMaxMotorImpulse",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getMaxMotorImpulse); + tolua_function(tolua_S,"getLowerLimit",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getLowerLimit); + tolua_function(tolua_S,"setUseFrameOffset",lua_cocos2dx_physics3d_Physics3DHingeConstraint_setUseFrameOffset); + tolua_function(tolua_S,"getEnableAngularMotor",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getEnableAngularMotor); + tolua_function(tolua_S,"enableMotor",lua_cocos2dx_physics3d_Physics3DHingeConstraint_enableMotor); + tolua_function(tolua_S,"getBFrame",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getBFrame); + tolua_function(tolua_S,"setFrames",lua_cocos2dx_physics3d_Physics3DHingeConstraint_setFrames); + tolua_function(tolua_S,"getUseFrameOffset",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getUseFrameOffset); + tolua_function(tolua_S,"setAngularOnly",lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAngularOnly); + tolua_function(tolua_S,"setLimit",lua_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit); + tolua_function(tolua_S,"getAngularOnly",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAngularOnly); + tolua_function(tolua_S,"setAxis",lua_cocos2dx_physics3d_Physics3DHingeConstraint_setAxis); + tolua_function(tolua_S,"getAFrame",lua_cocos2dx_physics3d_Physics3DHingeConstraint_getAFrame); + tolua_function(tolua_S,"create", lua_cocos2dx_physics3d_Physics3DHingeConstraint_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DHingeConstraint).name(); + g_luaType[typeName] = "cc.Physics3DHingeConstraint"; + g_typeCast["Physics3DHingeConstraint"] = "cc.Physics3DHingeConstraint"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setPoweredAngMotor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor'", nullptr); + return 0; + } + cobj->setPoweredAngMotor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setPoweredAngMotor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng'", 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_physics3d_Physics3DSliderConstraint_getDampingLimAng'", nullptr); + return 0; + } + double ret = cobj->getDampingLimAng(); + 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.Physics3DSliderConstraint:getDampingLimAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setRestitutionOrthoLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin'", nullptr); + return 0; + } + cobj->setRestitutionOrthoLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setRestitutionOrthoLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setRestitutionDirLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin'", nullptr); + return 0; + } + cobj->setRestitutionDirLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setRestitutionDirLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos'", 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_physics3d_Physics3DSliderConstraint_getLinearPos'", nullptr); + return 0; + } + double ret = cobj->getLinearPos(); + 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.Physics3DSliderConstraint:getLinearPos",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA'", 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_physics3d_Physics3DSliderConstraint_getFrameOffsetA'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getFrameOffsetA(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:getFrameOffsetA",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB'", 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_physics3d_Physics3DSliderConstraint_getFrameOffsetB'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getFrameOffsetB(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:getFrameOffsetB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setPoweredLinMotor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor'", nullptr); + return 0; + } + cobj->setPoweredLinMotor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setPoweredLinMotor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng'", 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_physics3d_Physics3DSliderConstraint_getDampingDirAng'", nullptr); + return 0; + } + double ret = cobj->getDampingDirAng(); + 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.Physics3DSliderConstraint:getDampingDirAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin'", 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_physics3d_Physics3DSliderConstraint_getRestitutionLimLin'", nullptr); + return 0; + } + double ret = cobj->getRestitutionLimLin(); + 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.Physics3DSliderConstraint:getRestitutionLimLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng'", 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_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng'", nullptr); + return 0; + } + double ret = cobj->getSoftnessOrthoAng(); + 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.Physics3DSliderConstraint:getSoftnessOrthoAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setSoftnessOrthoLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin'", nullptr); + return 0; + } + cobj->setSoftnessOrthoLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setSoftnessOrthoLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setSoftnessLimLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin'", nullptr); + return 0; + } + cobj->setSoftnessLimLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setSoftnessLimLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos'", 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_physics3d_Physics3DSliderConstraint_getAngularPos'", nullptr); + return 0; + } + double ret = cobj->getAngularPos(); + 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.Physics3DSliderConstraint:getAngularPos",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setRestitutionLimAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng'", nullptr); + return 0; + } + cobj->setRestitutionLimAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setRestitutionLimAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setUpperLinLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit'", nullptr); + return 0; + } + cobj->setUpperLinLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setUpperLinLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setDampingDirLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin'", nullptr); + return 0; + } + cobj->setDampingDirLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setDampingDirLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit'", 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_physics3d_Physics3DSliderConstraint_getUpperAngLimit'", nullptr); + return 0; + } + double ret = cobj->getUpperAngLimit(); + 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.Physics3DSliderConstraint:getUpperAngLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin'", 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_physics3d_Physics3DSliderConstraint_getDampingDirLin'", nullptr); + return 0; + } + double ret = cobj->getDampingDirLin(); + 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.Physics3DSliderConstraint:getDampingDirLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng'", 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_physics3d_Physics3DSliderConstraint_getSoftnessDirAng'", nullptr); + return 0; + } + double ret = cobj->getSoftnessDirAng(); + 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.Physics3DSliderConstraint:getSoftnessDirAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor'", 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_physics3d_Physics3DSliderConstraint_getPoweredAngMotor'", nullptr); + return 0; + } + bool ret = cobj->getPoweredAngMotor(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:getPoweredAngMotor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setLowerAngLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit'", nullptr); + return 0; + } + cobj->setLowerAngLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setLowerAngLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setUpperAngLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit'", nullptr); + return 0; + } + cobj->setUpperAngLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setUpperAngLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setTargetLinMotorVelocity"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity'", nullptr); + return 0; + } + cobj->setTargetLinMotorVelocity(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setTargetLinMotorVelocity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setDampingLimAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng'", nullptr); + return 0; + } + cobj->setDampingLimAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setDampingLimAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng'", 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_physics3d_Physics3DSliderConstraint_getRestitutionLimAng'", nullptr); + return 0; + } + double ret = cobj->getRestitutionLimAng(); + 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.Physics3DSliderConstraint:getRestitutionLimAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset'", 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_physics3d_Physics3DSliderConstraint_getUseFrameOffset'", nullptr); + return 0; + } + bool ret = cobj->getUseFrameOffset(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:getUseFrameOffset",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin'", 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_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin'", nullptr); + return 0; + } + double ret = cobj->getSoftnessOrthoLin(); + 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.Physics3DSliderConstraint:getSoftnessOrthoLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng'", 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_physics3d_Physics3DSliderConstraint_getDampingOrthoAng'", nullptr); + return 0; + } + double ret = cobj->getDampingOrthoAng(); + 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.Physics3DSliderConstraint:getDampingOrthoAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setUseFrameOffset"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset'", nullptr); + return 0; + } + cobj->setUseFrameOffset(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setUseFrameOffset",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setLowerLinLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit'", nullptr); + return 0; + } + cobj->setLowerLinLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setLowerLinLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin'", 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_physics3d_Physics3DSliderConstraint_getRestitutionDirLin'", nullptr); + return 0; + } + double ret = cobj->getRestitutionDirLin(); + 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.Physics3DSliderConstraint:getRestitutionDirLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity'", 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_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity'", nullptr); + return 0; + } + double ret = cobj->getTargetLinMotorVelocity(); + 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.Physics3DSliderConstraint:getTargetLinMotorVelocity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit'", 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_physics3d_Physics3DSliderConstraint_getLowerLinLimit'", nullptr); + return 0; + } + double ret = cobj->getLowerLinLimit(); + 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.Physics3DSliderConstraint:getLowerLinLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin'", 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_physics3d_Physics3DSliderConstraint_getSoftnessLimLin'", nullptr); + return 0; + } + double ret = cobj->getSoftnessLimLin(); + 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.Physics3DSliderConstraint:getSoftnessLimLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setDampingOrthoAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng'", nullptr); + return 0; + } + cobj->setDampingOrthoAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setDampingOrthoAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setSoftnessDirAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng'", nullptr); + return 0; + } + cobj->setSoftnessDirAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setSoftnessDirAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor'", 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_physics3d_Physics3DSliderConstraint_getPoweredLinMotor'", nullptr); + return 0; + } + bool ret = cobj->getPoweredLinMotor(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:getPoweredLinMotor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setRestitutionOrthoAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng'", nullptr); + return 0; + } + cobj->setRestitutionOrthoAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setRestitutionOrthoAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setDampingDirAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng'", nullptr); + return 0; + } + cobj->setDampingDirAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setDampingDirAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Mat4 arg0; + cocos2d::Mat4 arg1; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Physics3DSliderConstraint:setFrames"); + + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3DSliderConstraint:setFrames"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames'", nullptr); + return 0; + } + cobj->setFrames(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.Physics3DSliderConstraint:setFrames",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng'", 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_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng'", nullptr); + return 0; + } + double ret = cobj->getRestitutionOrthoAng(); + 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.Physics3DSliderConstraint:getRestitutionOrthoAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce'", 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_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce'", nullptr); + return 0; + } + double ret = cobj->getMaxAngMotorForce(); + 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.Physics3DSliderConstraint:getMaxAngMotorForce",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin'", 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_physics3d_Physics3DSliderConstraint_getDampingOrthoLin'", nullptr); + return 0; + } + double ret = cobj->getDampingOrthoLin(); + 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.Physics3DSliderConstraint:getDampingOrthoLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit'", 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_physics3d_Physics3DSliderConstraint_getUpperLinLimit'", nullptr); + return 0; + } + double ret = cobj->getUpperLinLimit(); + 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.Physics3DSliderConstraint:getUpperLinLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setMaxLinMotorForce"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce'", nullptr); + return 0; + } + cobj->setMaxLinMotorForce(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setMaxLinMotorForce",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin'", 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_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin'", nullptr); + return 0; + } + double ret = cobj->getRestitutionOrthoLin(); + 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.Physics3DSliderConstraint:getRestitutionOrthoLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setTargetAngMotorVelocity"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity'", nullptr); + return 0; + } + cobj->setTargetAngMotorVelocity(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setTargetAngMotorVelocity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng'", 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_physics3d_Physics3DSliderConstraint_getSoftnessLimAng'", nullptr); + return 0; + } + double ret = cobj->getSoftnessLimAng(); + 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.Physics3DSliderConstraint:getSoftnessLimAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setRestitutionDirAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng'", nullptr); + return 0; + } + cobj->setRestitutionDirAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setRestitutionDirAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin'", 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_physics3d_Physics3DSliderConstraint_getDampingLimLin'", nullptr); + return 0; + } + double ret = cobj->getDampingLimLin(); + 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.Physics3DSliderConstraint:getDampingLimLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit'", 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_physics3d_Physics3DSliderConstraint_getLowerAngLimit'", nullptr); + return 0; + } + double ret = cobj->getLowerAngLimit(); + 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.Physics3DSliderConstraint:getLowerAngLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng'", 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_physics3d_Physics3DSliderConstraint_getRestitutionDirAng'", nullptr); + return 0; + } + double ret = cobj->getRestitutionDirAng(); + 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.Physics3DSliderConstraint:getRestitutionDirAng",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity'", 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_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity'", nullptr); + return 0; + } + double ret = cobj->getTargetAngMotorVelocity(); + 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.Physics3DSliderConstraint:getTargetAngMotorVelocity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setRestitutionLimLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin'", nullptr); + return 0; + } + cobj->setRestitutionLimLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setRestitutionLimLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce'", 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_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce'", nullptr); + return 0; + } + double ret = cobj->getMaxLinMotorForce(); + 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.Physics3DSliderConstraint:getMaxLinMotorForce",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setDampingOrthoLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin'", nullptr); + return 0; + } + cobj->setDampingOrthoLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setDampingOrthoLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setSoftnessOrthoAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng'", nullptr); + return 0; + } + cobj->setSoftnessOrthoAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setSoftnessOrthoAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setDampingLimLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin'", nullptr); + return 0; + } + cobj->setDampingLimLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setDampingLimLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setSoftnessDirLin"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin'", nullptr); + return 0; + } + cobj->setSoftnessDirLin(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setSoftnessDirLin",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setMaxAngMotorForce"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce'", nullptr); + return 0; + } + cobj->setMaxAngMotorForce(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setMaxAngMotorForce",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin'", 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_physics3d_Physics3DSliderConstraint_getSoftnessDirLin'", nullptr); + return 0; + } + double ret = cobj->getSoftnessDirLin(); + 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.Physics3DSliderConstraint:getSoftnessDirLin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DSliderConstraint:setSoftnessLimAng"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng'", nullptr); + return 0; + } + cobj->setSoftnessLimAng(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:setSoftnessLimAng",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* 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.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DSliderConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA'", 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_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA'", nullptr); + return 0; + } + bool ret = cobj->getUseLinearReferenceFrameA(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:getUseLinearReferenceFrameA",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DSliderConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 5) + { + cocos2d::Physics3DRigidBody* arg0; + cocos2d::Physics3DRigidBody* arg1; + cocos2d::Mat4 arg2; + cocos2d::Mat4 arg3; + bool arg4; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DSliderConstraint:create"); + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3DSliderConstraint:create"); + ok &= luaval_to_mat4(tolua_S, 4, &arg2, "cc.Physics3DSliderConstraint:create"); + ok &= luaval_to_mat4(tolua_S, 5, &arg3, "cc.Physics3DSliderConstraint:create"); + ok &= luaval_to_boolean(tolua_S, 6,&arg4, "cc.Physics3DSliderConstraint:create"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_create'", nullptr); + return 0; + } + cocos2d::Physics3DSliderConstraint* ret = cocos2d::Physics3DSliderConstraint::create(arg0, arg1, arg2, arg3, arg4); + object_to_luaval(tolua_S, "cc.Physics3DSliderConstraint",(cocos2d::Physics3DSliderConstraint*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DSliderConstraint:create",argc, 5); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DSliderConstraint_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DSliderConstraint* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3DSliderConstraint(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3DSliderConstraint"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DSliderConstraint:Physics3DSliderConstraint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DSliderConstraint_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3DSliderConstraint_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DSliderConstraint)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DSliderConstraint(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DSliderConstraint"); + tolua_cclass(tolua_S,"Physics3DSliderConstraint","cc.Physics3DSliderConstraint","cc.Physics3DConstraint",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DSliderConstraint"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3DSliderConstraint_constructor); + tolua_function(tolua_S,"setPoweredAngMotor",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredAngMotor); + tolua_function(tolua_S,"getDampingLimAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimAng); + tolua_function(tolua_S,"setRestitutionOrthoLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoLin); + tolua_function(tolua_S,"setRestitutionDirLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirLin); + tolua_function(tolua_S,"getLinearPos",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLinearPos); + tolua_function(tolua_S,"getFrameOffsetA",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetA); + tolua_function(tolua_S,"getFrameOffsetB",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getFrameOffsetB); + tolua_function(tolua_S,"setPoweredLinMotor",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setPoweredLinMotor); + tolua_function(tolua_S,"getDampingDirAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirAng); + tolua_function(tolua_S,"getRestitutionLimLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimLin); + tolua_function(tolua_S,"getSoftnessOrthoAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoAng); + tolua_function(tolua_S,"setSoftnessOrthoLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoLin); + tolua_function(tolua_S,"setSoftnessLimLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimLin); + tolua_function(tolua_S,"getAngularPos",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getAngularPos); + tolua_function(tolua_S,"setRestitutionLimAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimAng); + tolua_function(tolua_S,"setUpperLinLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperLinLimit); + tolua_function(tolua_S,"setDampingDirLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirLin); + tolua_function(tolua_S,"getUpperAngLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperAngLimit); + tolua_function(tolua_S,"getDampingDirLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingDirLin); + tolua_function(tolua_S,"getSoftnessDirAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirAng); + tolua_function(tolua_S,"getPoweredAngMotor",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredAngMotor); + tolua_function(tolua_S,"setLowerAngLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerAngLimit); + tolua_function(tolua_S,"setUpperAngLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUpperAngLimit); + tolua_function(tolua_S,"setTargetLinMotorVelocity",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetLinMotorVelocity); + tolua_function(tolua_S,"setDampingLimAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimAng); + tolua_function(tolua_S,"getRestitutionLimAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionLimAng); + tolua_function(tolua_S,"getUseFrameOffset",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseFrameOffset); + tolua_function(tolua_S,"getSoftnessOrthoLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessOrthoLin); + tolua_function(tolua_S,"getDampingOrthoAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoAng); + tolua_function(tolua_S,"setUseFrameOffset",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setUseFrameOffset); + tolua_function(tolua_S,"setLowerLinLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setLowerLinLimit); + tolua_function(tolua_S,"getRestitutionDirLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirLin); + tolua_function(tolua_S,"getTargetLinMotorVelocity",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetLinMotorVelocity); + tolua_function(tolua_S,"getLowerLinLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerLinLimit); + tolua_function(tolua_S,"getSoftnessLimLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimLin); + tolua_function(tolua_S,"setDampingOrthoAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoAng); + tolua_function(tolua_S,"setSoftnessDirAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirAng); + tolua_function(tolua_S,"getPoweredLinMotor",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getPoweredLinMotor); + tolua_function(tolua_S,"setRestitutionOrthoAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionOrthoAng); + tolua_function(tolua_S,"setDampingDirAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingDirAng); + tolua_function(tolua_S,"setFrames",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setFrames); + tolua_function(tolua_S,"getRestitutionOrthoAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoAng); + tolua_function(tolua_S,"getMaxAngMotorForce",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxAngMotorForce); + tolua_function(tolua_S,"getDampingOrthoLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingOrthoLin); + tolua_function(tolua_S,"getUpperLinLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUpperLinLimit); + tolua_function(tolua_S,"setMaxLinMotorForce",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxLinMotorForce); + tolua_function(tolua_S,"getRestitutionOrthoLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionOrthoLin); + tolua_function(tolua_S,"setTargetAngMotorVelocity",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setTargetAngMotorVelocity); + tolua_function(tolua_S,"getSoftnessLimAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessLimAng); + tolua_function(tolua_S,"setRestitutionDirAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionDirAng); + tolua_function(tolua_S,"getDampingLimLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getDampingLimLin); + tolua_function(tolua_S,"getLowerAngLimit",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getLowerAngLimit); + tolua_function(tolua_S,"getRestitutionDirAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getRestitutionDirAng); + tolua_function(tolua_S,"getTargetAngMotorVelocity",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getTargetAngMotorVelocity); + tolua_function(tolua_S,"setRestitutionLimLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setRestitutionLimLin); + tolua_function(tolua_S,"getMaxLinMotorForce",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getMaxLinMotorForce); + tolua_function(tolua_S,"setDampingOrthoLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingOrthoLin); + tolua_function(tolua_S,"setSoftnessOrthoAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessOrthoAng); + tolua_function(tolua_S,"setDampingLimLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setDampingLimLin); + tolua_function(tolua_S,"setSoftnessDirLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessDirLin); + tolua_function(tolua_S,"setMaxAngMotorForce",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setMaxAngMotorForce); + tolua_function(tolua_S,"getSoftnessDirLin",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getSoftnessDirLin); + tolua_function(tolua_S,"setSoftnessLimAng",lua_cocos2dx_physics3d_Physics3DSliderConstraint_setSoftnessLimAng); + tolua_function(tolua_S,"getUseLinearReferenceFrameA",lua_cocos2dx_physics3d_Physics3DSliderConstraint_getUseLinearReferenceFrameA); + tolua_function(tolua_S,"create", lua_cocos2dx_physics3d_Physics3DSliderConstraint_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DSliderConstraint).name(); + g_luaType[typeName] = "cc.Physics3DSliderConstraint"; + g_typeCast["Physics3DSliderConstraint"] = "cc.Physics3DSliderConstraint"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame'", 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_physics3d_Physics3DConeTwistConstraint_getBFrame'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getBFrame(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:getBFrame",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:setFixThresh"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh'", nullptr); + return 0; + } + cobj->setFixThresh(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:setFixThresh",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB'", 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_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getFrameOffsetB(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:getFrameOffsetB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA'", 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_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getFrameOffsetA(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:getFrameOffsetA",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh'", 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_physics3d_Physics3DConeTwistConstraint_getFixThresh'", nullptr); + return 0; + } + double ret = cobj->getFixThresh(); + 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.Physics3DConeTwistConstraint:getFixThresh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2'", 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_physics3d_Physics3DConeTwistConstraint_getSwingSpan2'", nullptr); + return 0; + } + double ret = cobj->getSwingSpan2(); + 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.Physics3DConeTwistConstraint:getSwingSpan2",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1'", 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_physics3d_Physics3DConeTwistConstraint_getSwingSpan1'", nullptr); + return 0; + } + double ret = cobj->getSwingSpan1(); + 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.Physics3DConeTwistConstraint:getSwingSpan1",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:setMaxMotorImpulse"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse'", nullptr); + return 0; + } + cobj->setMaxMotorImpulse(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:setMaxMotorImpulse",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Mat4 arg0; + cocos2d::Mat4 arg1; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Physics3DConeTwistConstraint:setFrames"); + + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3DConeTwistConstraint:setFrames"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames'", nullptr); + return 0; + } + cobj->setFrames(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.Physics3DConeTwistConstraint:setFrames",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle'", 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_physics3d_Physics3DConeTwistConstraint_getTwistAngle'", nullptr); + return 0; + } + double ret = cobj->getTwistAngle(); + 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.Physics3DConeTwistConstraint:getTwistAngle",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + double arg0; + double arg1; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:GetPointForAngle"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DConeTwistConstraint:GetPointForAngle"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->GetPointForAngle(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.Physics3DConeTwistConstraint:GetPointForAngle",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:setMaxMotorImpulseNormalized"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized'", nullptr); + return 0; + } + cobj->setMaxMotorImpulseNormalized(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:setMaxMotorImpulseNormalized",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan'", 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_physics3d_Physics3DConeTwistConstraint_getTwistSpan'", nullptr); + return 0; + } + double ret = cobj->getTwistSpan(); + 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.Physics3DConeTwistConstraint:getTwistSpan",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:setDamping"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping'", nullptr); + return 0; + } + cobj->setDamping(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:setDamping",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit'", 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.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DConeTwistConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 4) + { + double arg0; + double arg1; + double arg2; + double arg3; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Physics3DConeTwistConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1, arg2, arg3); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 5) + { + double arg0; + double arg1; + double arg2; + double arg3; + double arg4; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.Physics3DConeTwistConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1, arg2, arg3, arg4); + lua_settop(tolua_S, 1); + return 1; + } + if (argc == 6) + { + double arg0; + double arg1; + double arg2; + double arg3; + double arg4; + double arg5; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.Physics3DConeTwistConstraint:setLimit"); + + ok &= luaval_to_number(tolua_S, 7,&arg5, "cc.Physics3DConeTwistConstraint:setLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit'", nullptr); + return 0; + } + cobj->setLimit(arg0, arg1, arg2, arg3, arg4, arg5); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:setLimit",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame'", 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_physics3d_Physics3DConeTwistConstraint_getAFrame'", nullptr); + return 0; + } + cocos2d::Mat4 ret = cobj->getAFrame(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:getAFrame",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* 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.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DConeTwistConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3DConeTwistConstraint:enableMotor"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor'", nullptr); + return 0; + } + cobj->enableMotor(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:enableMotor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3DConeTwistConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 4) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DConeTwistConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DRigidBody* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3DConeTwistConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg2; + ok &= luaval_to_mat4(tolua_S, 4, &arg2, "cc.Physics3DConeTwistConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg3; + ok &= luaval_to_mat4(tolua_S, 5, &arg3, "cc.Physics3DConeTwistConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DConeTwistConstraint* ret = cocos2d::Physics3DConeTwistConstraint::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Physics3DConeTwistConstraint",(cocos2d::Physics3DConeTwistConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3DConeTwistConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3DConeTwistConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DConeTwistConstraint* ret = cocos2d::Physics3DConeTwistConstraint::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Physics3DConeTwistConstraint",(cocos2d::Physics3DConeTwistConstraint*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Physics3DConeTwistConstraint:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DConeTwistConstraint* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3DConeTwistConstraint(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3DConeTwistConstraint"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DConeTwistConstraint:Physics3DConeTwistConstraint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3DConeTwistConstraint)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3DConeTwistConstraint(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3DConeTwistConstraint"); + tolua_cclass(tolua_S,"Physics3DConeTwistConstraint","cc.Physics3DConeTwistConstraint","cc.Physics3DConstraint",nullptr); + + tolua_beginmodule(tolua_S,"Physics3DConeTwistConstraint"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_constructor); + tolua_function(tolua_S,"getBFrame",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getBFrame); + tolua_function(tolua_S,"setFixThresh",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFixThresh); + tolua_function(tolua_S,"getFrameOffsetB",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetB); + tolua_function(tolua_S,"getFrameOffsetA",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFrameOffsetA); + tolua_function(tolua_S,"getFixThresh",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getFixThresh); + tolua_function(tolua_S,"getSwingSpan2",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan2); + tolua_function(tolua_S,"getSwingSpan1",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getSwingSpan1); + tolua_function(tolua_S,"setMaxMotorImpulse",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulse); + tolua_function(tolua_S,"setFrames",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setFrames); + tolua_function(tolua_S,"getTwistAngle",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistAngle); + tolua_function(tolua_S,"GetPointForAngle",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_GetPointForAngle); + tolua_function(tolua_S,"setMaxMotorImpulseNormalized",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setMaxMotorImpulseNormalized); + tolua_function(tolua_S,"getTwistSpan",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getTwistSpan); + tolua_function(tolua_S,"setDamping",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setDamping); + tolua_function(tolua_S,"setLimit",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_setLimit); + tolua_function(tolua_S,"getAFrame",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_getAFrame); + tolua_function(tolua_S,"enableMotor",lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_enableMotor); + tolua_function(tolua_S,"create", lua_cocos2dx_physics3d_Physics3DConeTwistConstraint_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3DConeTwistConstraint).name(); + g_luaType[typeName] = "cc.Physics3DConeTwistConstraint"; + g_typeCast["Physics3DConeTwistConstraint"] = "cc.Physics3DConeTwistConstraint"; + return 1; +} + +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3D6DofConstraint:setLinearLowerLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit'", nullptr); + return 0; + } + cobj->setLinearLowerLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:setLinearLowerLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit'", 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_physics3d_Physics3D6DofConstraint_getLinearLowerLimit'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getLinearLowerLimit(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:getLinearLowerLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit'", 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_physics3d_Physics3D6DofConstraint_getAngularUpperLimit'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getAngularUpperLimit(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:getAngularUpperLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset'", 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_physics3d_Physics3D6DofConstraint_getUseFrameOffset'", nullptr); + return 0; + } + bool ret = cobj->getUseFrameOffset(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:getUseFrameOffset",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit'", 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_physics3d_Physics3D6DofConstraint_getLinearUpperLimit'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getLinearUpperLimit(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:getLinearUpperLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3D6DofConstraint:setAngularLowerLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit'", nullptr); + return 0; + } + cobj->setAngularLowerLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:setAngularLowerLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited'", 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.Physics3D6DofConstraint:isLimited"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited'", nullptr); + return 0; + } + bool ret = cobj->isLimited(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.Physics3D6DofConstraint:isLimited",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Physics3D6DofConstraint:setUseFrameOffset"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset'", nullptr); + return 0; + } + cobj->setUseFrameOffset(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:setUseFrameOffset",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3D6DofConstraint:setLinearUpperLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit'", nullptr); + return 0; + } + cobj->setLinearUpperLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:setLinearUpperLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit'", 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_physics3d_Physics3D6DofConstraint_getAngularLowerLimit'", nullptr); + return 0; + } + cocos2d::Vec3 ret = cobj->getAngularLowerLimit(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:getAngularLowerLimit",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* 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.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3D6DofConstraint*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Physics3D6DofConstraint:setAngularUpperLimit"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit'", nullptr); + return 0; + } + cobj->setAngularUpperLimit(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:setAngularUpperLimit",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Physics3D6DofConstraint",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 3) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3D6DofConstraint* ret = cocos2d::Physics3D6DofConstraint::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.Physics3D6DofConstraint",(cocos2d::Physics3D6DofConstraint*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 5) + { + cocos2d::Physics3DRigidBody* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Physics3DRigidBody",&arg0, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3DRigidBody* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Physics3DRigidBody",&arg1, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg2; + ok &= luaval_to_mat4(tolua_S, 4, &arg2, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + cocos2d::Mat4 arg3; + ok &= luaval_to_mat4(tolua_S, 5, &arg3, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + bool arg4; + ok &= luaval_to_boolean(tolua_S, 6,&arg4, "cc.Physics3D6DofConstraint:create"); + if (!ok) { break; } + cocos2d::Physics3D6DofConstraint* ret = cocos2d::Physics3D6DofConstraint::create(arg0, arg1, arg2, arg3, arg4); + object_to_luaval(tolua_S, "cc.Physics3D6DofConstraint",(cocos2d::Physics3D6DofConstraint*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Physics3D6DofConstraint:create",argc, 5); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_physics3d_Physics3D6DofConstraint_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3D6DofConstraint* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::Physics3D6DofConstraint(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Physics3D6DofConstraint"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3D6DofConstraint:Physics3D6DofConstraint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3D6DofConstraint_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_physics3d_Physics3D6DofConstraint_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Physics3D6DofConstraint)"); + return 0; +} + +int lua_register_cocos2dx_physics3d_Physics3D6DofConstraint(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Physics3D6DofConstraint"); + tolua_cclass(tolua_S,"Physics3D6DofConstraint","cc.Physics3D6DofConstraint","cc.Physics3DConstraint",nullptr); + + tolua_beginmodule(tolua_S,"Physics3D6DofConstraint"); + tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_Physics3D6DofConstraint_constructor); + tolua_function(tolua_S,"setLinearLowerLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearLowerLimit); + tolua_function(tolua_S,"getLinearLowerLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearLowerLimit); + tolua_function(tolua_S,"getAngularUpperLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularUpperLimit); + tolua_function(tolua_S,"getUseFrameOffset",lua_cocos2dx_physics3d_Physics3D6DofConstraint_getUseFrameOffset); + tolua_function(tolua_S,"getLinearUpperLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_getLinearUpperLimit); + tolua_function(tolua_S,"setAngularLowerLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularLowerLimit); + tolua_function(tolua_S,"isLimited",lua_cocos2dx_physics3d_Physics3D6DofConstraint_isLimited); + tolua_function(tolua_S,"setUseFrameOffset",lua_cocos2dx_physics3d_Physics3D6DofConstraint_setUseFrameOffset); + tolua_function(tolua_S,"setLinearUpperLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_setLinearUpperLimit); + tolua_function(tolua_S,"getAngularLowerLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_getAngularLowerLimit); + tolua_function(tolua_S,"setAngularUpperLimit",lua_cocos2dx_physics3d_Physics3D6DofConstraint_setAngularUpperLimit); + tolua_function(tolua_S,"create", lua_cocos2dx_physics3d_Physics3D6DofConstraint_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Physics3D6DofConstraint).name(); + g_luaType[typeName] = "cc.Physics3D6DofConstraint"; + g_typeCast["Physics3D6DofConstraint"] = "cc.Physics3D6DofConstraint"; + return 1; +} +TOLUA_API int register_all_cocos2dx_physics3d(lua_State* tolua_S) +{ + tolua_open(tolua_S); + + tolua_module(tolua_S,"cc",0); + tolua_beginmodule(tolua_S,"cc"); + + lua_register_cocos2dx_physics3d_Physics3DConstraint(tolua_S); + lua_register_cocos2dx_physics3d_Physics3D6DofConstraint(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DObject(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DRigidBody(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DWorld(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DSliderConstraint(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DComponent(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DConeTwistConstraint(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DPointToPointConstraint(tolua_S); + lua_register_cocos2dx_physics3d_PhysicsSprite3D(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DHingeConstraint(tolua_S); + lua_register_cocos2dx_physics3d_Physics3DShape(tolua_S); + + tolua_endmodule(tolua_S); + return 1; +} + +#endif diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp new file mode 100644 index 0000000000..0685ba505a --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp @@ -0,0 +1,260 @@ +#include "base/ccConfig.h" +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +#ifndef __cocos2dx_physics3d_h__ +#define __cocos2dx_physics3d_h__ + +#ifdef __cplusplus +extern "C" { +#endif +#include "tolua++.h" +#ifdef __cplusplus +} +#endif + +int register_all_cocos2dx_physics3d(lua_State* tolua_S); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#endif // __cocos2dx_physics3d_h__ +#endif //#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp index a388260869..3b2124eb3e 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp @@ -3090,7 +3090,7 @@ int lua_cocos2dx_physics_PhysicsBody_addShape(lua_State* tolua_S) { cocos2d::PhysicsShape* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.PhysicsBody:addShape"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsBody_addShape'", nullptr); @@ -3105,7 +3105,7 @@ int lua_cocos2dx_physics_PhysicsBody_addShape(lua_State* tolua_S) cocos2d::PhysicsShape* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.PhysicsBody:addShape"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.PhysicsBody:addShape"); if(!ok) @@ -4548,7 +4548,7 @@ int lua_cocos2dx_physics_PhysicsBody_removeShape(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::PhysicsShape* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.PhysicsBody:removeShape"); if (!ok) { break; } cobj->removeShape(arg0); @@ -4560,7 +4560,7 @@ int lua_cocos2dx_physics_PhysicsBody_removeShape(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::PhysicsShape* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.PhysicsBody:removeShape"); if (!ok) { break; } bool arg1; @@ -6877,9 +6877,9 @@ int lua_cocos2dx_physics_EventListenerPhysicsContactWithBodies_hitTest(lua_State cocos2d::PhysicsShape* arg0; cocos2d::PhysicsShape* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.EventListenerPhysicsContactWithBodies:hitTest"); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1, "cc.EventListenerPhysicsContactWithBodies:hitTest"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_EventListenerPhysicsContactWithBodies_hitTest'", nullptr); @@ -6918,8 +6918,8 @@ int lua_cocos2dx_physics_EventListenerPhysicsContactWithBodies_create(lua_State* { cocos2d::PhysicsBody* arg0; cocos2d::PhysicsBody* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.EventListenerPhysicsContactWithBodies:create"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.EventListenerPhysicsContactWithBodies:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_EventListenerPhysicsContactWithBodies_create'", nullptr); @@ -6989,9 +6989,9 @@ int lua_cocos2dx_physics_EventListenerPhysicsContactWithShapes_hitTest(lua_State cocos2d::PhysicsShape* arg0; cocos2d::PhysicsShape* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.EventListenerPhysicsContactWithShapes:hitTest"); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1, "cc.EventListenerPhysicsContactWithShapes:hitTest"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_EventListenerPhysicsContactWithShapes_hitTest'", nullptr); @@ -7030,8 +7030,8 @@ int lua_cocos2dx_physics_EventListenerPhysicsContactWithShapes_create(lua_State* { cocos2d::PhysicsShape* arg0; cocos2d::PhysicsShape* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.EventListenerPhysicsContactWithShapes:create"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1, "cc.EventListenerPhysicsContactWithShapes:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_EventListenerPhysicsContactWithShapes_create'", nullptr); @@ -7101,9 +7101,9 @@ int lua_cocos2dx_physics_EventListenerPhysicsContactWithGroup_hitTest(lua_State* cocos2d::PhysicsShape* arg0; cocos2d::PhysicsShape* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsShape",&arg0, "cc.EventListenerPhysicsContactWithGroup:hitTest"); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsShape",&arg1, "cc.EventListenerPhysicsContactWithGroup:hitTest"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_EventListenerPhysicsContactWithGroup_hitTest'", nullptr); @@ -7854,8 +7854,8 @@ int lua_cocos2dx_physics_PhysicsJointFixed_construct(lua_State* tolua_S) cocos2d::PhysicsBody* arg0; cocos2d::PhysicsBody* arg1; cocos2d::Vec2 arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointFixed:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointFixed:construct"); ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointFixed:construct"); if(!ok) { @@ -8349,10 +8349,10 @@ int lua_cocos2dx_physics_PhysicsJointLimit_construct(lua_State* tolua_S) if (argc == 6) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointLimit:construct"); if (!ok) { break; } cocos2d::PhysicsBody* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointLimit:construct"); if (!ok) { break; } cocos2d::Vec2 arg2; ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointLimit:construct"); @@ -8377,10 +8377,10 @@ int lua_cocos2dx_physics_PhysicsJointLimit_construct(lua_State* tolua_S) if (argc == 4) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointLimit:construct"); if (!ok) { break; } cocos2d::PhysicsBody* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointLimit:construct"); if (!ok) { break; } cocos2d::Vec2 arg2; ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointLimit:construct"); @@ -8497,10 +8497,10 @@ int lua_cocos2dx_physics_PhysicsJointPin_construct(lua_State* tolua_S) if (argc == 4) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointPin:construct"); if (!ok) { break; } cocos2d::PhysicsBody* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointPin:construct"); if (!ok) { break; } cocos2d::Vec2 arg2; ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointPin:construct"); @@ -8519,10 +8519,10 @@ int lua_cocos2dx_physics_PhysicsJointPin_construct(lua_State* tolua_S) if (argc == 3) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointPin:construct"); if (!ok) { break; } cocos2d::PhysicsBody* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointPin:construct"); if (!ok) { break; } cocos2d::Vec2 arg2; ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointPin:construct"); @@ -8727,8 +8727,8 @@ int lua_cocos2dx_physics_PhysicsJointDistance_construct(lua_State* tolua_S) cocos2d::PhysicsBody* arg1; cocos2d::Vec2 arg2; cocos2d::Vec2 arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointDistance:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointDistance:construct"); ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointDistance:construct"); ok &= luaval_to_vec2(tolua_S, 5, &arg3, "cc.PhysicsJointDistance:construct"); if(!ok) @@ -9326,8 +9326,8 @@ int lua_cocos2dx_physics_PhysicsJointSpring_construct(lua_State* tolua_S) cocos2d::Vec2 arg3; double arg4; double arg5; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointSpring:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointSpring:construct"); ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointSpring:construct"); ok &= luaval_to_vec2(tolua_S, 5, &arg3, "cc.PhysicsJointSpring:construct"); ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.PhysicsJointSpring:construct"); @@ -9740,8 +9740,8 @@ int lua_cocos2dx_physics_PhysicsJointGroove_construct(lua_State* tolua_S) cocos2d::Vec2 arg2; cocos2d::Vec2 arg3; cocos2d::Vec2 arg4; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointGroove:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointGroove:construct"); ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.PhysicsJointGroove:construct"); ok &= luaval_to_vec2(tolua_S, 5, &arg3, "cc.PhysicsJointGroove:construct"); ok &= luaval_to_vec2(tolua_S, 6, &arg4, "cc.PhysicsJointGroove:construct"); @@ -10148,8 +10148,8 @@ int lua_cocos2dx_physics_PhysicsJointRotarySpring_construct(lua_State* tolua_S) cocos2d::PhysicsBody* arg1; double arg2; double arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointRotarySpring:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointRotarySpring:construct"); ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.PhysicsJointRotarySpring:construct"); ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.PhysicsJointRotarySpring:construct"); if(!ok) @@ -10456,10 +10456,10 @@ int lua_cocos2dx_physics_PhysicsJointRotaryLimit_construct(lua_State* tolua_S) if (argc == 2) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointRotaryLimit:construct"); if (!ok) { break; } cocos2d::PhysicsBody* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointRotaryLimit:construct"); if (!ok) { break; } cocos2d::PhysicsJointRotaryLimit* ret = cocos2d::PhysicsJointRotaryLimit::construct(arg0, arg1); object_to_luaval(tolua_S, "cc.PhysicsJointRotaryLimit",(cocos2d::PhysicsJointRotaryLimit*)ret); @@ -10472,10 +10472,10 @@ int lua_cocos2dx_physics_PhysicsJointRotaryLimit_construct(lua_State* tolua_S) if (argc == 4) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointRotaryLimit:construct"); if (!ok) { break; } cocos2d::PhysicsBody* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointRotaryLimit:construct"); if (!ok) { break; } double arg2; ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.PhysicsJointRotaryLimit:construct"); @@ -10881,8 +10881,8 @@ int lua_cocos2dx_physics_PhysicsJointRatchet_construct(lua_State* tolua_S) cocos2d::PhysicsBody* arg1; double arg2; double arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointRatchet:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointRatchet:construct"); ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.PhysicsJointRatchet:construct"); ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.PhysicsJointRatchet:construct"); if(!ok) @@ -11191,8 +11191,8 @@ int lua_cocos2dx_physics_PhysicsJointGear_construct(lua_State* tolua_S) cocos2d::PhysicsBody* arg1; double arg2; double arg3; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointGear:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointGear:construct"); ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.PhysicsJointGear:construct"); ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.PhysicsJointGear:construct"); if(!ok) @@ -11401,8 +11401,8 @@ int lua_cocos2dx_physics_PhysicsJointMotor_construct(lua_State* tolua_S) cocos2d::PhysicsBody* arg0; cocos2d::PhysicsBody* arg1; double arg2; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsJointMotor:construct"); + ok &= luaval_to_object(tolua_S, 3, "cc.PhysicsBody",&arg1, "cc.PhysicsJointMotor:construct"); ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.PhysicsJointMotor:construct"); if(!ok) { @@ -11718,7 +11718,7 @@ int lua_cocos2dx_physics_PhysicsWorld_addJoint(lua_State* tolua_S) { cocos2d::PhysicsJoint* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsJoint",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsJoint",&arg0, "cc.PhysicsWorld:addJoint"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsWorld_addJoint'", nullptr); @@ -11882,7 +11882,7 @@ int lua_cocos2dx_physics_PhysicsWorld_removeBody(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.PhysicsWorld:removeBody"); if (!ok) { break; } cobj->removeBody(arg0); @@ -11931,7 +11931,7 @@ int lua_cocos2dx_physics_PhysicsWorld_removeJoint(lua_State* tolua_S) { cocos2d::PhysicsJoint* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsJoint",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsJoint",&arg0, "cc.PhysicsWorld:removeJoint"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsWorld_removeJoint'", nullptr); @@ -11946,7 +11946,7 @@ int lua_cocos2dx_physics_PhysicsWorld_removeJoint(lua_State* tolua_S) cocos2d::PhysicsJoint* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsJoint",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsJoint",&arg0, "cc.PhysicsWorld:removeJoint"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.PhysicsWorld:removeJoint"); if(!ok) diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_studio_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_studio_auto.cpp index 1d2d200521..f0247e3ffd 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_studio_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_studio_auto.cpp @@ -34,7 +34,7 @@ int lua_cocos2dx_studio_ActionFrame_getAction(lua_State* tolua_S) if (!ok) { break; } cocostudio::ActionFrame* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccs.ActionFrame",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.ActionFrame",&arg1, "ccs.ActionFrame:getAction"); if (!ok) { break; } cocos2d::ActionInterval* ret = cobj->getAction(arg0, arg1); @@ -1161,7 +1161,7 @@ int lua_cocos2dx_studio_ActionRotationFrame_getAction(lua_State* tolua_S) if (!ok) { break; } cocostudio::ActionFrame* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccs.ActionFrame",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.ActionFrame",&arg1, "ccs.ActionRotationFrame:getAction"); if (!ok) { break; } cocos2d::ActionInterval* ret = cobj->getAction(arg0, arg1); @@ -2075,7 +2075,7 @@ int lua_cocos2dx_studio_ActionObject_play(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::CallFunc* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.CallFunc",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.CallFunc",&arg0, "ccs.ActionObject:play"); if (!ok) { break; } cobj->play(arg0); @@ -2179,7 +2179,7 @@ int lua_cocos2dx_studio_ActionObject_removeActionNode(lua_State* tolua_S) { cocostudio::ActionNode* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ActionNode",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ActionNode",&arg0, "ccs.ActionObject:removeActionNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionObject_removeActionNode'", nullptr); @@ -2276,7 +2276,7 @@ int lua_cocos2dx_studio_ActionObject_addActionNode(lua_State* tolua_S) { cocostudio::ActionNode* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ActionNode",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ActionNode",&arg0, "ccs.ActionObject:addActionNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionObject_addActionNode'", nullptr); @@ -2752,7 +2752,7 @@ int lua_cocos2dx_studio_ActionManagerEx_playActionByName(lua_State* tolua_S) if (!ok) { break; } cocos2d::CallFunc* arg2; - ok &= luaval_to_object(tolua_S, 4, "cc.CallFunc",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.CallFunc",&arg2, "ccs.ActionManagerEx:playActionByName"); if (!ok) { break; } cocostudio::ActionObject* ret = cobj->playActionByName(arg0, arg1, arg2); @@ -3148,7 +3148,7 @@ int lua_cocos2dx_studio_DisplayData_copy(lua_State* tolua_S) { cocostudio::DisplayData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0, "ccs.DisplayData:copy"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_DisplayData_copy'", nullptr); @@ -3328,7 +3328,7 @@ int lua_cocos2dx_studio_SpriteDisplayData_copy(lua_State* tolua_S) { cocostudio::DisplayData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0, "ccs.SpriteDisplayData:copy"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_SpriteDisplayData_copy'", nullptr); @@ -3752,7 +3752,7 @@ int lua_cocos2dx_studio_BoneData_addDisplayData(lua_State* tolua_S) { cocostudio::DisplayData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0, "ccs.BoneData:addDisplayData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_BoneData_addDisplayData'", nullptr); @@ -3897,7 +3897,7 @@ int lua_cocos2dx_studio_ArmatureData_addBoneData(lua_State* tolua_S) { cocostudio::BoneData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.BoneData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.BoneData",&arg0, "ccs.ArmatureData:addBoneData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ArmatureData_addBoneData'", nullptr); @@ -4139,7 +4139,7 @@ int lua_cocos2dx_studio_FrameData_copy(lua_State* tolua_S) { const cocostudio::BaseData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.BaseData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.BaseData",&arg0, "ccs.FrameData:copy"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_FrameData_copy'", nullptr); @@ -4379,7 +4379,7 @@ int lua_cocos2dx_studio_MovementBoneData_addFrameData(lua_State* tolua_S) { cocostudio::FrameData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.FrameData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.FrameData",&arg0, "ccs.MovementBoneData:addFrameData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_MovementBoneData_addFrameData'", nullptr); @@ -4574,7 +4574,7 @@ int lua_cocos2dx_studio_MovementData_addMovementBoneData(lua_State* tolua_S) { cocostudio::MovementBoneData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.MovementBoneData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.MovementBoneData",&arg0, "ccs.MovementData:addMovementBoneData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_MovementData_addMovementBoneData'", nullptr); @@ -4815,7 +4815,7 @@ int lua_cocos2dx_studio_AnimationData_addMovement(lua_State* tolua_S) { cocostudio::MovementData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.MovementData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.MovementData",&arg0, "ccs.AnimationData:addMovement"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_AnimationData_addMovement'", nullptr); @@ -5248,7 +5248,7 @@ int lua_cocos2dx_studio_TextureData_addContourData(lua_State* tolua_S) { cocostudio::ContourData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ContourData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ContourData",&arg0, "ccs.TextureData:addContourData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_TextureData_addContourData'", nullptr); @@ -5494,7 +5494,7 @@ int lua_cocos2dx_studio_Tween_play(lua_State* tolua_S) int arg3; int arg4; - ok &= luaval_to_object(tolua_S, 2, "ccs.MovementBoneData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.MovementBoneData",&arg0, "ccs.Tween:play"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccs.Tween:play"); @@ -5602,7 +5602,7 @@ int lua_cocos2dx_studio_Tween_init(lua_State* tolua_S) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Tween:init"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Tween_init'", nullptr); @@ -5652,7 +5652,7 @@ int lua_cocos2dx_studio_Tween_setAnimation(lua_State* tolua_S) { cocostudio::ArmatureAnimation* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ArmatureAnimation",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ArmatureAnimation",&arg0, "ccs.Tween:setAnimation"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Tween_setAnimation'", nullptr); @@ -5690,7 +5690,7 @@ int lua_cocos2dx_studio_Tween_create(lua_State* tolua_S) if (argc == 1) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Tween:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Tween_create'", nullptr); @@ -6043,7 +6043,7 @@ int lua_cocos2dx_studio_DisplayManager_init(lua_State* tolua_S) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.DisplayManager:init"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_DisplayManager_init'", nullptr); @@ -6181,7 +6181,7 @@ int lua_cocos2dx_studio_DisplayManager_addDisplay(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.DisplayManager:addDisplay"); if (!ok) { break; } int arg1; @@ -6197,7 +6197,7 @@ int lua_cocos2dx_studio_DisplayManager_addDisplay(lua_State* tolua_S) do{ if (argc == 2) { cocostudio::DisplayData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0, "ccs.DisplayManager:addDisplay"); if (!ok) { break; } int arg1; @@ -6688,7 +6688,7 @@ int lua_cocos2dx_studio_DisplayManager_create(lua_State* tolua_S) if (argc == 1) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.DisplayManager:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_DisplayManager_create'", nullptr); @@ -7097,7 +7097,7 @@ int lua_cocos2dx_studio_Bone_addChildBone(lua_State* tolua_S) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Bone:addChildBone"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Bone_addChildBone'", nullptr); @@ -7482,7 +7482,7 @@ int lua_cocos2dx_studio_Bone_setBoneData(lua_State* tolua_S) { cocostudio::BoneData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.BoneData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.BoneData",&arg0, "ccs.Bone:setBoneData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Bone_setBoneData'", nullptr); @@ -7582,7 +7582,7 @@ int lua_cocos2dx_studio_Bone_setParentBone(lua_State* tolua_S) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Bone:setParentBone"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Bone_setParentBone'", nullptr); @@ -7626,7 +7626,7 @@ int lua_cocos2dx_studio_Bone_addDisplay(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.Bone:addDisplay"); if (!ok) { break; } int arg1; @@ -7642,7 +7642,7 @@ int lua_cocos2dx_studio_Bone_addDisplay(lua_State* tolua_S) do{ if (argc == 2) { cocostudio::DisplayData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.DisplayData",&arg0, "ccs.Bone:addDisplay"); if (!ok) { break; } int arg1; @@ -8039,7 +8039,7 @@ int lua_cocos2dx_studio_Bone_setArmature(lua_State* tolua_S) { cocostudio::Armature* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0, "ccs.Bone:setArmature"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Bone_setArmature'", nullptr); @@ -8140,7 +8140,7 @@ int lua_cocos2dx_studio_Bone_removeChildBone(lua_State* tolua_S) cocostudio::Bone* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Bone:removeChildBone"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccs.Bone:removeChildBone"); if(!ok) @@ -8192,7 +8192,7 @@ int lua_cocos2dx_studio_Bone_setChildArmature(lua_State* tolua_S) { cocostudio::Armature* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0, "ccs.Bone:setChildArmature"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Bone_setChildArmature'", nullptr); @@ -8891,7 +8891,7 @@ int lua_cocos2dx_studio_ArmatureAnimation_setAnimationData(lua_State* tolua_S) { cocostudio::AnimationData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.AnimationData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.AnimationData",&arg0, "ccs.ArmatureAnimation:setAnimationData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ArmatureAnimation_setAnimationData'", nullptr); @@ -9088,7 +9088,7 @@ int lua_cocos2dx_studio_ArmatureAnimation_init(lua_State* tolua_S) { cocostudio::Armature* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0, "ccs.ArmatureAnimation:init"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ArmatureAnimation_init'", nullptr); @@ -9394,7 +9394,7 @@ int lua_cocos2dx_studio_ArmatureAnimation_create(lua_State* tolua_S) if (argc == 1) { cocostudio::Armature* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Armature",&arg0, "ccs.ArmatureAnimation:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ArmatureAnimation_create'", nullptr); @@ -9613,7 +9613,7 @@ int lua_cocos2dx_studio_ArmatureDataManager_addArmatureData(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.ArmatureDataManager:addArmatureData"); - ok &= luaval_to_object(tolua_S, 3, "ccs.ArmatureData",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.ArmatureData",&arg1, "ccs.ArmatureDataManager:addArmatureData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ArmatureDataManager_addArmatureData'", nullptr); @@ -9631,7 +9631,7 @@ int lua_cocos2dx_studio_ArmatureDataManager_addArmatureData(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.ArmatureDataManager:addArmatureData"); - ok &= luaval_to_object(tolua_S, 3, "ccs.ArmatureData",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.ArmatureData",&arg1, "ccs.ArmatureDataManager:addArmatureData"); ok &= luaval_to_std_string(tolua_S, 4,&arg2, "ccs.ArmatureDataManager:addArmatureData"); if(!ok) @@ -9996,7 +9996,7 @@ int lua_cocos2dx_studio_ArmatureDataManager_addAnimationData(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.ArmatureDataManager:addAnimationData"); - ok &= luaval_to_object(tolua_S, 3, "ccs.AnimationData",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.AnimationData",&arg1, "ccs.ArmatureDataManager:addAnimationData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ArmatureDataManager_addAnimationData'", nullptr); @@ -10014,7 +10014,7 @@ int lua_cocos2dx_studio_ArmatureDataManager_addAnimationData(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.ArmatureDataManager:addAnimationData"); - ok &= luaval_to_object(tolua_S, 3, "ccs.AnimationData",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.AnimationData",&arg1, "ccs.ArmatureDataManager:addAnimationData"); ok &= luaval_to_std_string(tolua_S, 4,&arg2, "ccs.ArmatureDataManager:addAnimationData"); if(!ok) @@ -10263,7 +10263,7 @@ int lua_cocos2dx_studio_ArmatureDataManager_addTextureData(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.ArmatureDataManager:addTextureData"); - ok &= luaval_to_object(tolua_S, 3, "ccs.TextureData",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.TextureData",&arg1, "ccs.ArmatureDataManager:addTextureData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ArmatureDataManager_addTextureData'", nullptr); @@ -10281,7 +10281,7 @@ int lua_cocos2dx_studio_ArmatureDataManager_addTextureData(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.ArmatureDataManager:addTextureData"); - ok &= luaval_to_object(tolua_S, 3, "ccs.TextureData",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.TextureData",&arg1, "ccs.ArmatureDataManager:addTextureData"); ok &= luaval_to_std_string(tolua_S, 4,&arg2, "ccs.ArmatureDataManager:addTextureData"); if(!ok) @@ -10610,7 +10610,7 @@ int lua_cocos2dx_studio_Armature_changeBoneParent(lua_State* tolua_S) cocostudio::Bone* arg0; std::string arg1; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Armature:changeBoneParent"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccs.Armature:changeBoneParent"); if(!ok) @@ -10662,7 +10662,7 @@ int lua_cocos2dx_studio_Armature_setAnimation(lua_State* tolua_S) { cocostudio::ArmatureAnimation* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ArmatureAnimation",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ArmatureAnimation",&arg0, "ccs.Armature:setAnimation"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Armature_setAnimation'", nullptr); @@ -10957,7 +10957,7 @@ int lua_cocos2dx_studio_Armature_removeBone(lua_State* tolua_S) cocostudio::Bone* arg0; bool arg1; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Armature:removeBone"); ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccs.Armature:removeBone"); if(!ok) @@ -11054,7 +11054,7 @@ int lua_cocos2dx_studio_Armature_init(lua_State* tolua_S) if (!ok) { break; } cocostudio::Bone* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccs.Bone",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.Bone",&arg1, "ccs.Armature:init"); if (!ok) { break; } bool ret = cobj->init(arg0, arg1); @@ -11115,7 +11115,7 @@ int lua_cocos2dx_studio_Armature_setParentBone(lua_State* tolua_S) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Armature:setParentBone"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Armature_setParentBone'", nullptr); @@ -11165,7 +11165,7 @@ int lua_cocos2dx_studio_Armature_setBatchNode(lua_State* tolua_S) { cocostudio::BatchNode* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.BatchNode",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.BatchNode",&arg0, "ccs.Armature:setBatchNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Armature_setBatchNode'", nullptr); @@ -11262,7 +11262,7 @@ int lua_cocos2dx_studio_Armature_setArmatureData(lua_State* tolua_S) { cocostudio::ArmatureData* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ArmatureData",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ArmatureData",&arg0, "ccs.Armature:setArmatureData"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Armature_setArmatureData'", nullptr); @@ -11313,7 +11313,7 @@ int lua_cocos2dx_studio_Armature_addBone(lua_State* tolua_S) cocostudio::Bone* arg0; std::string arg1; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Armature:addBone"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccs.Armature:addBone"); if(!ok) @@ -11665,7 +11665,7 @@ int lua_cocos2dx_studio_Armature_create(lua_State* tolua_S) ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.Armature:create"); if (!ok) { break; } cocostudio::Bone* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccs.Bone",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.Bone",&arg1, "ccs.Armature:create"); if (!ok) { break; } cocostudio::Armature* ret = cocostudio::Armature::create(arg0, arg1); object_to_luaval(tolua_S, "ccs.Armature",(cocostudio::Armature*)ret); @@ -11979,7 +11979,7 @@ int lua_cocos2dx_studio_Skin_setBone(lua_State* tolua_S) { cocostudio::Bone* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Bone",&arg0, "ccs.Skin:setBone"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Skin_setBone'", nullptr); @@ -14340,7 +14340,7 @@ int lua_cocos2dx_studio_ComRender_setNode(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.ComRender:setNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ComRender_setNode'", nullptr); @@ -14426,7 +14426,7 @@ int lua_cocos2dx_studio_ComRender_create(lua_State* tolua_S) if (argc == 2) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.ComRender:create"); if (!ok) { break; } const char* arg1; std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "ccs.ComRender:create"); arg1 = arg1_tmp.c_str(); @@ -15823,7 +15823,7 @@ int lua_cocos2dx_studio_Frame_setNode(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.Frame:setNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Frame_setNode'", nullptr); @@ -15873,7 +15873,7 @@ int lua_cocos2dx_studio_Frame_setTimeline(lua_State* tolua_S) { cocostudio::timeline::Timeline* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Timeline",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Timeline",&arg0, "ccs.Frame:setTimeline"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Frame_setTimeline'", nullptr); @@ -20003,7 +20003,7 @@ int lua_cocos2dx_studio_Timeline_setNode(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.Timeline:setNode"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Timeline_setNode'", nullptr); @@ -20101,7 +20101,7 @@ int lua_cocos2dx_studio_Timeline_insertFrame(lua_State* tolua_S) cocostudio::timeline::Frame* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "ccs.Frame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Frame",&arg0, "ccs.Timeline:insertFrame"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccs.Timeline:insertFrame"); if(!ok) @@ -20203,7 +20203,7 @@ int lua_cocos2dx_studio_Timeline_addFrame(lua_State* tolua_S) { cocostudio::timeline::Frame* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Frame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Frame",&arg0, "ccs.Timeline:addFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Timeline_addFrame'", nullptr); @@ -20394,7 +20394,7 @@ int lua_cocos2dx_studio_Timeline_removeFrame(lua_State* tolua_S) { cocostudio::timeline::Frame* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Frame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Frame",&arg0, "ccs.Timeline:removeFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Timeline_removeFrame'", nullptr); @@ -20444,7 +20444,7 @@ int lua_cocos2dx_studio_Timeline_setActionTimeline(lua_State* tolua_S) { cocostudio::timeline::ActionTimeline* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ActionTimeline",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ActionTimeline",&arg0, "ccs.Timeline:setActionTimeline"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_Timeline_setActionTimeline'", nullptr); @@ -20893,7 +20893,7 @@ int lua_cocos2dx_studio_ActionTimeline_addTimeline(lua_State* tolua_S) { cocostudio::timeline::Timeline* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Timeline",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Timeline",&arg0, "ccs.ActionTimeline:addTimeline"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionTimeline_addTimeline'", nullptr); @@ -21131,7 +21131,7 @@ int lua_cocos2dx_studio_ActionTimeline_removeTimeline(lua_State* tolua_S) { cocostudio::timeline::Timeline* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.Timeline",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.Timeline",&arg0, "ccs.ActionTimeline:removeTimeline"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionTimeline_removeTimeline'", nullptr); @@ -22378,7 +22378,7 @@ int lua_cocos2dx_studio_ActionTimelineNode_setActionTimeline(lua_State* tolua_S) { cocostudio::timeline::ActionTimeline* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccs.ActionTimeline",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccs.ActionTimeline",&arg0, "ccs.ActionTimelineNode:setActionTimeline"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionTimelineNode_setActionTimeline'", nullptr); @@ -22429,9 +22429,9 @@ int lua_cocos2dx_studio_ActionTimelineNode_init(lua_State* tolua_S) cocos2d::Node* arg0; cocostudio::timeline::ActionTimeline* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.ActionTimelineNode:init"); - ok &= luaval_to_object(tolua_S, 3, "ccs.ActionTimeline",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccs.ActionTimeline",&arg1, "ccs.ActionTimelineNode:init"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionTimelineNode_init'", nullptr); @@ -22481,7 +22481,7 @@ int lua_cocos2dx_studio_ActionTimelineNode_setRoot(lua_State* tolua_S) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.ActionTimelineNode:setRoot"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionTimelineNode_setRoot'", nullptr); @@ -22520,8 +22520,8 @@ int lua_cocos2dx_studio_ActionTimelineNode_create(lua_State* tolua_S) { cocos2d::Node* arg0; cocostudio::timeline::ActionTimeline* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - ok &= luaval_to_object(tolua_S, 3, "ccs.ActionTimeline",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccs.ActionTimelineNode:create"); + ok &= luaval_to_object(tolua_S, 3, "ccs.ActionTimeline",&arg1, "ccs.ActionTimelineNode:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_studio_ActionTimelineNode_create'", nullptr); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp index f7be1967bb..85dddb9fec 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp @@ -176,7 +176,7 @@ int lua_cocos2dx_ui_LayoutParameter_copyProperties(lua_State* tolua_S) { cocos2d::ui::LayoutParameter* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.LayoutParameter",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.LayoutParameter",&arg0, "ccui.LayoutParameter:copyProperties"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_LayoutParameter_copyProperties'", nullptr); @@ -1969,7 +1969,7 @@ int lua_cocos2dx_ui_Widget_findNextFocusedWidget(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Widget:findNextFocusedWidget"); - ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1, "ccui.Widget:findNextFocusedWidget"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_findNextFocusedWidget'", nullptr); @@ -2742,7 +2742,7 @@ int lua_cocos2dx_ui_Widget_setLayoutParameter(lua_State* tolua_S) { cocos2d::ui::LayoutParameter* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.LayoutParameter",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.LayoutParameter",&arg0, "ccui.Widget:setLayoutParameter"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_setLayoutParameter'", nullptr); @@ -2984,9 +2984,9 @@ int lua_cocos2dx_ui_Widget_dispatchFocusEvent(lua_State* tolua_S) cocos2d::ui::Widget* arg0; cocos2d::ui::Widget* arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.Widget:dispatchFocusEvent"); - ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1, "ccui.Widget:dispatchFocusEvent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_dispatchFocusEvent'", nullptr); @@ -3376,9 +3376,9 @@ int lua_cocos2dx_ui_Widget_onFocusChange(lua_State* tolua_S) cocos2d::ui::Widget* arg0; cocos2d::ui::Widget* arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.Widget:onFocusChange"); - ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1, "ccui.Widget:onFocusChange"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_onFocusChange'", nullptr); @@ -3667,9 +3667,9 @@ int lua_cocos2dx_ui_Widget_propagateTouchEvent(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Widget:propagateTouchEvent"); - ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1, "ccui.Widget:propagateTouchEvent"); - ok &= luaval_to_object(tolua_S, 4, "cc.Touch",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Touch",&arg2, "ccui.Widget:propagateTouchEvent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_propagateTouchEvent'", nullptr); @@ -3917,9 +3917,9 @@ int lua_cocos2dx_ui_Widget_interceptTouchEvent(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Widget:interceptTouchEvent"); - ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1, "ccui.Widget:interceptTouchEvent"); - ok &= luaval_to_object(tolua_S, 4, "cc.Touch",&arg2); + ok &= luaval_to_object(tolua_S, 4, "cc.Touch",&arg2, "ccui.Widget:interceptTouchEvent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Widget_interceptTouchEvent'", nullptr); @@ -6986,6 +6986,65 @@ int lua_cocos2dx_ui_Button_getCapInsetsNormalRenderer(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Button_setTitleAlignment(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Button* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Button",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::ui::Button*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Button_setTitleAlignment'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::TextHAlignment arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Button:setTitleAlignment"); + + if (!ok) { break; } + cocos2d::TextVAlignment arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.Button:setTitleAlignment"); + + if (!ok) { break; } + cobj->setTitleAlignment(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::TextHAlignment arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Button:setTitleAlignment"); + + if (!ok) { break; } + cobj->setTitleAlignment(arg0); + 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", "ccui.Button:setTitleAlignment",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Button_setTitleAlignment'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Button_getCapInsetsPressedRenderer(lua_State* tolua_S) { int argc = 0; @@ -7737,6 +7796,7 @@ int lua_register_cocos2dx_ui_Button(lua_State* tolua_S) tolua_function(tolua_S,"loadTexturePressed",lua_cocos2dx_ui_Button_loadTexturePressed); tolua_function(tolua_S,"setTitleFontName",lua_cocos2dx_ui_Button_setTitleFontName); tolua_function(tolua_S,"getCapInsetsNormalRenderer",lua_cocos2dx_ui_Button_getCapInsetsNormalRenderer); + tolua_function(tolua_S,"setTitleAlignment",lua_cocos2dx_ui_Button_setTitleAlignment); tolua_function(tolua_S,"getCapInsetsPressedRenderer",lua_cocos2dx_ui_Button_getCapInsetsPressedRenderer); tolua_function(tolua_S,"loadTextures",lua_cocos2dx_ui_Button_loadTextures); tolua_function(tolua_S,"isScale9Enabled",lua_cocos2dx_ui_Button_isScale9Enabled); @@ -13549,7 +13609,7 @@ int lua_cocos2dx_ui_ListView_getIndex(lua_State* tolua_S) { cocos2d::ui::Widget* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.ListView:getIndex"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_ListView_getIndex'", nullptr); @@ -13696,7 +13756,7 @@ int lua_cocos2dx_ui_ListView_pushBackCustomItem(lua_State* tolua_S) { cocos2d::ui::Widget* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.ListView:pushBackCustomItem"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_ListView_pushBackCustomItem'", nullptr); @@ -14282,7 +14342,7 @@ int lua_cocos2dx_ui_ListView_setItemModel(lua_State* tolua_S) { cocos2d::ui::Widget* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.ListView:setItemModel"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_ListView_setItemModel'", nullptr); @@ -14427,7 +14487,7 @@ int lua_cocos2dx_ui_ListView_insertCustomItem(lua_State* tolua_S) cocos2d::ui::Widget* arg0; ssize_t arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.ListView:insertCustomItem"); ok &= luaval_to_ssize(tolua_S, 3, &arg1, "ccui.ListView:insertCustomItem"); if(!ok) @@ -16048,6 +16108,53 @@ int lua_cocos2dx_ui_TextField_getDeleteBackward(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_TextField_getTextColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::TextField* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getTextColor'", 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_ui_TextField_getTextColor'", nullptr); + return 0; + } + const cocos2d::Color4B& ret = cobj->getTextColor(); + color4b_to_luaval(tolua_S, ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getTextColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getTextColor'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_TextField_getPlaceHolder(lua_State* tolua_S) { int argc = 0; @@ -17066,6 +17173,53 @@ int lua_cocos2dx_ui_TextField_setDeleteBackward(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_TextField_getTextHorizontalAlignment(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::TextField* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getTextHorizontalAlignment'", 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_ui_TextField_getTextHorizontalAlignment'", nullptr); + return 0; + } + int ret = (int)cobj->getTextHorizontalAlignment(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getTextHorizontalAlignment",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getTextHorizontalAlignment'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_TextField_setFontSize(lua_State* tolua_S) { int argc = 0; @@ -17465,6 +17619,53 @@ int lua_cocos2dx_ui_TextField_setDetachWithIME(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_TextField_getTextVerticalAlignment(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::TextField* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getTextVerticalAlignment'", 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_ui_TextField_getTextVerticalAlignment'", nullptr); + return 0; + } + int ret = (int)cobj->getTextVerticalAlignment(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getTextVerticalAlignment",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getTextVerticalAlignment'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_TextField_setTouchAreaEnabled(lua_State* tolua_S) { int argc = 0; @@ -17802,6 +18003,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S) tolua_function(tolua_S,"getString",lua_cocos2dx_ui_TextField_getString); tolua_function(tolua_S,"setPasswordStyleText",lua_cocos2dx_ui_TextField_setPasswordStyleText); tolua_function(tolua_S,"getDeleteBackward",lua_cocos2dx_ui_TextField_getDeleteBackward); + tolua_function(tolua_S,"getTextColor",lua_cocos2dx_ui_TextField_getTextColor); tolua_function(tolua_S,"getPlaceHolder",lua_cocos2dx_ui_TextField_getPlaceHolder); tolua_function(tolua_S,"getAttachWithIME",lua_cocos2dx_ui_TextField_getAttachWithIME); tolua_function(tolua_S,"setFontName",lua_cocos2dx_ui_TextField_setFontName); @@ -17823,6 +18025,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S) tolua_function(tolua_S,"setMaxLengthEnabled",lua_cocos2dx_ui_TextField_setMaxLengthEnabled); tolua_function(tolua_S,"isPasswordEnabled",lua_cocos2dx_ui_TextField_isPasswordEnabled); tolua_function(tolua_S,"setDeleteBackward",lua_cocos2dx_ui_TextField_setDeleteBackward); + tolua_function(tolua_S,"getTextHorizontalAlignment",lua_cocos2dx_ui_TextField_getTextHorizontalAlignment); tolua_function(tolua_S,"setFontSize",lua_cocos2dx_ui_TextField_setFontSize); tolua_function(tolua_S,"setPlaceHolder",lua_cocos2dx_ui_TextField_setPlaceHolder); tolua_function(tolua_S,"setPlaceHolderColor",lua_cocos2dx_ui_TextField_setPlaceHolderColor); @@ -17831,6 +18034,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S) tolua_function(tolua_S,"getMaxLength",lua_cocos2dx_ui_TextField_getMaxLength); tolua_function(tolua_S,"isMaxLengthEnabled",lua_cocos2dx_ui_TextField_isMaxLengthEnabled); tolua_function(tolua_S,"setDetachWithIME",lua_cocos2dx_ui_TextField_setDetachWithIME); + tolua_function(tolua_S,"getTextVerticalAlignment",lua_cocos2dx_ui_TextField_getTextVerticalAlignment); tolua_function(tolua_S,"setTouchAreaEnabled",lua_cocos2dx_ui_TextField_setTouchAreaEnabled); tolua_function(tolua_S,"setMaxLength",lua_cocos2dx_ui_TextField_setMaxLength); tolua_function(tolua_S,"setTouchSize",lua_cocos2dx_ui_TextField_setTouchSize); @@ -18309,7 +18513,7 @@ int lua_cocos2dx_ui_PageView_addWidgetToPage(lua_State* tolua_S) ssize_t arg1; bool arg2; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.PageView:addWidgetToPage"); ok &= luaval_to_ssize(tolua_S, 3, &arg1, "ccui.PageView:addWidgetToPage"); @@ -18460,7 +18664,7 @@ int lua_cocos2dx_ui_PageView_removePage(lua_State* tolua_S) { cocos2d::ui::Layout* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0, "ccui.PageView:removePage"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_removePage'", nullptr); @@ -18665,7 +18869,7 @@ int lua_cocos2dx_ui_PageView_insertPage(lua_State* tolua_S) cocos2d::ui::Layout* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0, "ccui.PageView:insertPage"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.PageView:insertPage"); if(!ok) @@ -18911,7 +19115,7 @@ int lua_cocos2dx_ui_PageView_addPage(lua_State* tolua_S) { cocos2d::ui::Layout* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Layout",&arg0, "ccui.PageView:addPage"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_PageView_addPage'", nullptr); @@ -19168,7 +19372,7 @@ int lua_cocos2dx_ui_Helper_seekActionWidgetByActionTag(lua_State* tolua_S) { cocos2d::ui::Widget* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.Helper:seekActionWidgetByActionTag"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.Helper:seekActionWidgetByActionTag"); if(!ok) { @@ -19206,7 +19410,7 @@ int lua_cocos2dx_ui_Helper_seekWidgetByName(lua_State* tolua_S) { cocos2d::ui::Widget* arg0; std::string arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.Helper:seekWidgetByName"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.Helper:seekWidgetByName"); if(!ok) { @@ -19244,7 +19448,7 @@ int lua_cocos2dx_ui_Helper_seekWidgetByTag(lua_State* tolua_S) { cocos2d::ui::Widget* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0, "ccui.Helper:seekWidgetByTag"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.Helper:seekWidgetByTag"); if(!ok) { @@ -19319,7 +19523,7 @@ int lua_cocos2dx_ui_Helper_doLayout(lua_State* tolua_S) if (argc == 1) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccui.Helper:doLayout"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Helper_doLayout'", nullptr); @@ -19846,7 +20050,7 @@ int lua_cocos2dx_ui_RichElementCustomNode_init(lua_State* tolua_S) ok &= luaval_to_uint16(tolua_S, 4,&arg2, "ccui.RichElementCustomNode:init"); - ok &= luaval_to_object(tolua_S, 5, "cc.Node",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Node",&arg3, "ccui.RichElementCustomNode:init"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_RichElementCustomNode_init'", nullptr); @@ -19890,7 +20094,7 @@ int lua_cocos2dx_ui_RichElementCustomNode_create(lua_State* tolua_S) ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.RichElementCustomNode:create"); ok &= luaval_to_color3b(tolua_S, 3, &arg1, "ccui.RichElementCustomNode:create"); ok &= luaval_to_uint16(tolua_S, 4,&arg2, "ccui.RichElementCustomNode:create"); - ok &= luaval_to_object(tolua_S, 5, "cc.Node",&arg3); + ok &= luaval_to_object(tolua_S, 5, "cc.Node",&arg3, "ccui.RichElementCustomNode:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_RichElementCustomNode_create'", nullptr); @@ -19998,7 +20202,7 @@ int lua_cocos2dx_ui_RichText_insertElement(lua_State* tolua_S) cocos2d::ui::RichElement* arg0; int arg1; - ok &= luaval_to_object(tolua_S, 2, "ccui.RichElement",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.RichElement",&arg0, "ccui.RichText:insertElement"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.RichText:insertElement"); if(!ok) @@ -20050,7 +20254,7 @@ int lua_cocos2dx_ui_RichText_pushBackElement(lua_State* tolua_S) { cocos2d::ui::RichElement* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.RichElement",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.RichElement",&arg0, "ccui.RichText:pushBackElement"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_RichText_pushBackElement'", nullptr); @@ -20191,7 +20395,7 @@ int lua_cocos2dx_ui_RichText_removeElement(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::ui::RichElement* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccui.RichElement",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.RichElement",&arg0, "ccui.RichText:removeElement"); if (!ok) { break; } cobj->removeElement(arg0); @@ -20852,7 +21056,7 @@ int lua_cocos2dx_ui_Scale9Sprite_updateWithSprite(lua_State* tolua_S) do{ if (argc == 6) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "ccui.Scale9Sprite:updateWithSprite"); if (!ok) { break; } cocos2d::Rect arg1; @@ -20884,7 +21088,7 @@ int lua_cocos2dx_ui_Scale9Sprite_updateWithSprite(lua_State* tolua_S) do{ if (argc == 4) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "ccui.Scale9Sprite:updateWithSprite"); if (!ok) { break; } cocos2d::Rect arg1; @@ -21489,7 +21693,7 @@ int lua_cocos2dx_ui_Scale9Sprite_init(lua_State* tolua_S) do{ if (argc == 3) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "ccui.Scale9Sprite:init"); if (!ok) { break; } cocos2d::Rect arg1; @@ -21509,7 +21713,7 @@ int lua_cocos2dx_ui_Scale9Sprite_init(lua_State* tolua_S) do{ if (argc == 4) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "ccui.Scale9Sprite:init"); if (!ok) { break; } cocos2d::Rect arg1; @@ -21533,7 +21737,7 @@ int lua_cocos2dx_ui_Scale9Sprite_init(lua_State* tolua_S) do{ if (argc == 6) { cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0, "ccui.Scale9Sprite:init"); if (!ok) { break; } cocos2d::Rect arg1; @@ -21652,7 +21856,7 @@ int lua_cocos2dx_ui_Scale9Sprite_setSpriteFrame(lua_State* tolua_S) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "ccui.Scale9Sprite:setSpriteFrame"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Scale9Sprite_setSpriteFrame'", nullptr); @@ -21667,7 +21871,7 @@ int lua_cocos2dx_ui_Scale9Sprite_setSpriteFrame(lua_State* tolua_S) cocos2d::SpriteFrame* arg0; cocos2d::Rect arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "ccui.Scale9Sprite:setSpriteFrame"); ok &= luaval_to_rect(tolua_S, 3, &arg1, "ccui.Scale9Sprite:setSpriteFrame"); if(!ok) @@ -22237,7 +22441,7 @@ int lua_cocos2dx_ui_Scale9Sprite_initWithSpriteFrame(lua_State* tolua_S) do{ if (argc == 1) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "ccui.Scale9Sprite:initWithSpriteFrame"); if (!ok) { break; } bool ret = cobj->initWithSpriteFrame(arg0); @@ -22249,7 +22453,7 @@ int lua_cocos2dx_ui_Scale9Sprite_initWithSpriteFrame(lua_State* tolua_S) do{ if (argc == 2) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "ccui.Scale9Sprite:initWithSpriteFrame"); if (!ok) { break; } cocos2d::Rect arg1; @@ -22679,7 +22883,7 @@ int lua_cocos2dx_ui_Scale9Sprite_createWithSpriteFrame(lua_State* tolua_S) if (argc == 2) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "ccui.Scale9Sprite:createWithSpriteFrame"); if (!ok) { break; } cocos2d::Rect arg1; ok &= luaval_to_rect(tolua_S, 3, &arg1, "ccui.Scale9Sprite:createWithSpriteFrame"); @@ -22695,7 +22899,7 @@ int lua_cocos2dx_ui_Scale9Sprite_createWithSpriteFrame(lua_State* tolua_S) if (argc == 1) { cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0, "ccui.Scale9Sprite:createWithSpriteFrame"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* ret = cocos2d::ui::Scale9Sprite::createWithSpriteFrame(arg0); object_to_luaval(tolua_S, "ccui.Scale9Sprite",(cocos2d::ui::Scale9Sprite*)ret); @@ -23586,7 +23790,7 @@ int lua_cocos2dx_ui_EditBox_touchDownAction(lua_State* tolua_S) cocos2d::Ref* arg0; cocos2d::ui::Widget::TouchEventType arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0, "ccui.EditBox:touchDownAction"); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.EditBox:touchDownAction"); if(!ok) @@ -23739,7 +23943,7 @@ int lua_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite(lua_State* tolua_S) if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1, "ccui.EditBox:initWithSizeAndBackgroundSprite"); if (!ok) { break; } bool ret = cobj->initWithSizeAndBackgroundSprite(arg0, arg1); @@ -24201,7 +24405,7 @@ int lua_cocos2dx_ui_EditBox_create(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1); object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); @@ -24217,10 +24421,10 @@ int lua_cocos2dx_ui_EditBox_create(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "ccui.Scale9Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "ccui.Scale9Sprite",&arg2, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1, arg2); object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); @@ -24236,13 +24440,13 @@ int lua_cocos2dx_ui_EditBox_create(lua_State* tolua_S) ok &= luaval_to_size(tolua_S, 2, &arg0, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg2; - ok &= luaval_to_object(tolua_S, 4, "ccui.Scale9Sprite",&arg2); + ok &= luaval_to_object(tolua_S, 4, "ccui.Scale9Sprite",&arg2, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::Scale9Sprite* arg3; - ok &= luaval_to_object(tolua_S, 5, "ccui.Scale9Sprite",&arg3); + ok &= luaval_to_object(tolua_S, 5, "ccui.Scale9Sprite",&arg3, "ccui.EditBox:create"); if (!ok) { break; } cocos2d::ui::EditBox* ret = cocos2d::ui::EditBox::create(arg0, arg1, arg2, arg3); object_to_luaval(tolua_S, "ccui.EditBox",(cocos2d::ui::EditBox*)ret); @@ -26772,7 +26976,7 @@ int lua_cocos2dx_ui_LayoutComponent_bindLayoutComponent(lua_State* tolua_S) if (argc == 1) { cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0, "ccui.LayoutComponent:bindLayoutComponent"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_LayoutComponent_bindLayoutComponent'", nullptr); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp index 7853c6d456..f6e49f0ad1 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp @@ -555,6 +555,10 @@ int register_all_cocos2dx_ui(lua_State* tolua_S); + + + + diff --git a/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp b/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp index 7a26bbfe4b..4a2d049931 100644 --- a/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/3d/lua_cocos2dx_3d_manual.cpp @@ -25,6 +25,7 @@ #include "lua_cocos2dx_3d_auto.hpp" #include "LuaBasicConversions.h" #include "CCLuaEngine.h" +#include "3d/CCBundle3D.h" extern int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* L); @@ -231,9 +232,9 @@ bool luaval_to_terraindata(lua_State* L, int lo, cocos2d::Terrain::TerrainData* { lua_pushstring(L, "_chunkSize"); lua_gettable(L,lo); - if (!lua_isnil(L, -1)) + if (!lua_isnil(L, lua_gettop(L))) { - luaval_to_size(L, -1, &(outValue->_chunkSize)); + luaval_to_size(L, lua_gettop(L), &(outValue->_chunkSize)); } else { @@ -456,7 +457,7 @@ int lua_cocos2dx_3d_Terrain_getHeight(lua_State* L) if (!ok) { break; } cocos2d::Vec3* arg1; - ok &= luaval_to_object(L, 3, "cc.Vec3",&arg1); + ok &= luaval_to_object(L, 3, "cc.Vec3",&arg1, "cc.Terrain:getHeight"); if (!ok) { break; } double ret = cobj->getHeight(arg0, arg1); @@ -526,6 +527,56 @@ static void extendTerrain(lua_State* L) lua_pop(L, 1); } +int lua_cocos2dx_3d_Bundle3D_getTrianglesList(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.Bundle3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(L, 2,&arg0, "cc.Bundle3D:getTrianglesList"); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_getTrianglesList'", nullptr); + return 0; + } + + std::vector ret = cocos2d::Bundle3D::getTrianglesList(arg0); + std_vector_vec3_to_luaval(L,ret); + return 1; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:getTrianglesList",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_getTrianglesList'.",&tolua_err); +#endif + return 0; +} + +void extendBundle3D(lua_State* L) +{ + lua_pushstring(L, "cc.Bundle3D"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "getTrianglesList", lua_cocos2dx_3d_Bundle3D_getTrianglesList); + } + lua_pop(L, 1); +} + + static int register_all_cocos2dx_3d_manual(lua_State* L) { if (nullptr == L) @@ -533,6 +584,7 @@ static int register_all_cocos2dx_3d_manual(lua_State* L) extendSprite3D(L); extendTerrain(L); + extendBundle3D(L); return 0; } @@ -793,7 +845,7 @@ int lua_cocos2dx_3d_AABB_getCorners(lua_State* L) { cocos2d::Vec3* arg0; - ok &= luaval_to_object(L, 2, "cc.Vec3",&arg0); + ok &= luaval_to_object(L, 2, "cc.Vec3",&arg0, "cc.AABB:getCorners"); if(!ok) return 0; cobj->getCorners(arg0); @@ -840,7 +892,7 @@ int lua_cocos2dx_3d_AABB_updateMinMax(lua_State* L) const cocos2d::Vec3* arg0; ssize_t arg1; - ok &= luaval_to_object(L, 2, "cc.Vec3",&arg0); + ok &= luaval_to_object(L, 2, "cc.Vec3",&arg0, "cc.AABB:updateMinMax"); ok &= luaval_to_ssize(L, 3, &arg1, "cc.AABB:updateMinMax"); if(!ok) @@ -1326,7 +1378,7 @@ int lua_cocos2dx_3d_OBB_constructor(lua_State* L) do{ if (argc == 1) { cocos2d::AABB* arg0; - ok &= luaval_to_object(L, 2, "cc.AABB",&arg0); + ok &= luaval_to_object(L, 2, "cc.AABB",&arg0, "cc.OBB:OBB"); if (!ok) { break; } cobj = new cocos2d::OBB(*arg0); @@ -1348,7 +1400,7 @@ int lua_cocos2dx_3d_OBB_constructor(lua_State* L) do{ if (argc == 2) { const cocos2d::Vec3* arg0; - ok &= luaval_to_object(L, 2, "cc.Vec3",&arg0); + ok &= luaval_to_object(L, 2, "cc.Vec3",&arg0, "cc.OBB:OBB"); if (!ok) { break; } int arg1; @@ -1394,7 +1446,7 @@ int lua_cocos2dx_3d_OBB_intersects(lua_State* L) if(1 == argc) { cocos2d::OBB* arg0; - ok &= luaval_to_object(L, 2, "cc.OBB",&arg0); + ok &= luaval_to_object(L, 2, "cc.OBB",&arg0, "cc.OBB:intersects"); if (!ok) return 0; @@ -1985,7 +2037,7 @@ int lua_cocos2dx_3d_Ray_intersects(lua_State* L) if(1 == argc) { cocos2d::OBB* arg0 = nullptr; - ok &= luaval_to_object(L, 2, "cc.OBB",&arg0); + ok &= luaval_to_object(L, 2, "cc.OBB",&arg0, "cc.Ray:intersects"); if (!ok) return 0; diff --git a/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp b/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp index 6a114d5b40..69ef046381 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp +++ b/cocos/scripting/lua-bindings/manual/CCLuaEngine.cpp @@ -33,6 +33,12 @@ #include "lua_cocos2dx_coco_studio_manual.hpp" #include "lua_cocos2dx_ui_manual.hpp" +#if _MSC_VER > 1800 +#pragma comment(lib,"lua51-2015.lib") +#else +#pragma comment(lib,"lua51.lib") +#endif + NS_CC_BEGIN LuaEngine* LuaEngine::_defaultEngine = nullptr; diff --git a/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp b/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp index 349b3e82b9..a3de8b324b 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp +++ b/cocos/scripting/lua-bindings/manual/CCLuaStack.cpp @@ -272,13 +272,13 @@ int LuaStack::executeString(const char *codes) return executeFunction(0); } +static const std::string BYTECODE_FILE_EXT = ".luac"; +static const std::string NOT_BYTECODE_FILE_EXT = ".lua"; + int LuaStack::executeScriptFile(const char* filename) { CCAssert(filename, "CCLuaStack::executeScriptFile() - invalid filename"); - - static const std::string BYTECODE_FILE_EXT = ".luac"; - static const std::string NOT_BYTECODE_FILE_EXT = ".lua"; - + std::string buf(filename); // // remove .lua or .luac @@ -842,11 +842,14 @@ int LuaStack::luaLoadChunksFromZIP(lua_State *L) ssize_t bufferSize = 0; unsigned char *zbuffer = zip->getFileData(filename.c_str(), &bufferSize); if (bufferSize) { - // remove extension - std::size_t found = filename.rfind(".lua"); - if (found != std::string::npos) + // remove .lua or .luac extension + size_t pos = filename.find_last_of('.'); + if (pos != std::string::npos) { - filename.erase(found); + std::string suffix = filename.substr(pos, filename.length()); + if (suffix == NOT_BYTECODE_FILE_EXT || suffix == BYTECODE_FILE_EXT) { + filename.erase(pos); + } } // replace path seperator '/' '\' to '.' for (int i=0; i* return ok; } +bool luaval_to_std_vector_vec3(lua_State* L, int lo, std::vector* ret, const char* funcName) +{ + if (nullptr == L || nullptr == ret || lua_gettop(L) < lo) + return false; + + tolua_Error tolua_err; + bool ok = true; + + if (!tolua_istable(L, lo, 0, &tolua_err)) + { +#if COCOS2D_DEBUG >=1 + luaval_to_native_err(L,"#ferror:",&tolua_err,funcName); +#endif + ok = false; + } + + if (ok) + { + size_t len = lua_objlen(L, lo); + cocos2d::Vec3 value; + for (size_t i = 0; i < len; i++) + { + lua_pushnumber(L, i + 1); + lua_gettable(L,lo); + if (lua_istable(L, lua_gettop(L))) + { + ok &= luaval_to_vec3(L, lua_gettop(L), &value); + if (ok) + { + ret->push_back(value); + } + } + else + { + CCASSERT(false, "vec3 type is needed"); + } + lua_pop(L, 1); + } + } + + return ok; +} + bool luaval_to_std_vector_v3f_c4b_t2f(lua_State* L, int lo, std::vector* ret, const char* funcName) { if (nullptr == L || nullptr == ret || lua_gettop(L) < lo) @@ -3270,3 +3313,20 @@ void texParams_to_luaval(lua_State* L, const cocos2d::Texture2D::TexParams& inVa lua_pushnumber(L, (lua_Number) inValue.wrapT); /* L: table key value*/ lua_rawset(L, -3); } + +void std_vector_vec3_to_luaval(lua_State* L, const std::vector& inValue) +{ + if (nullptr == L) + return; + + lua_newtable(L); + + int index = 1; + for (const cocos2d::Vec3& value : inValue) + { + lua_pushnumber(L, (lua_Number)index); + vec3_to_luaval(L, value); + lua_rawset(L, -3); + ++index; + } +} diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h index 2fcccc6a79..ec2b0fbbb1 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h @@ -697,7 +697,7 @@ extern bool luaval_to_ccvaluevector(lua_State* L, int lo, cocos2d::ValueVector* * @return Return true if the type of Lua value at the index is a Lua userdata, otherwise return false. */ template -bool luaval_to_object(lua_State* L, int lo, const char* type, T** ret) +bool luaval_to_object(lua_State* L, int lo, const char* type, T** ret, const char* funcName = "") { if(nullptr == L || lua_gettop(L) < lo) return false; @@ -707,8 +707,8 @@ bool luaval_to_object(lua_State* L, int lo, const char* type, T** ret) *ret = static_cast(tolua_tousertype(L, lo, 0)); - if (nullptr == ret) - LUA_PRECONDITION(ret, "Invalid Native Object"); + if (nullptr == *ret) + CCLOG("Warning: %s argument %d is invalid native object(nullptr)", funcName, lo); return true; } @@ -818,6 +818,17 @@ extern bool luaval_to_std_vector_v3f_c4b_t2f(lua_State* L, int lo, std::vector* ret, const char* funcName = ""); +/** + * Get a pointer points to a std::vector from a Lua array table in the stack. + * + * @param L the current lua_State. + * @param lo the given accpetable index of stack. + * @param ret a pointer points to a std::vector. + * @param funcName the name of calling function, it is used for error output in the debug model. + * @return Return true if the value at the given accpetable index of stack is a table, otherwise return false. + */ +extern bool luaval_to_std_vector_vec3(lua_State* L, int lo, std::vector* ret, const char* funcName = ""); + /**@}**/ // from native @@ -1263,6 +1274,14 @@ void quaternion_to_luaval(lua_State* L,const cocos2d::Quaternion& inValue); */ void texParams_to_luaval(lua_State* L, const cocos2d::Texture2D::TexParams& inValue); +/** + * Push a Lua array table converted from a std::vector into the Lua stack. + * The format of table as follows: {vec3Value1, vec3Value2, ..., vec3ValueSize} + * + * @param L the current lua_State. + * @param inValue a std::vector vaule. + */ +void std_vector_vec3_to_luaval(lua_State* L, const std::vector& inValue); // end group /// @} #endif //__COCOS2DX_SCRIPTING_LUA_COCOS2DXSUPPORT_LUABAISCCONVERSIONS_H__ diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp index db09e5183a..39903bb965 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp @@ -2411,7 +2411,7 @@ int lua_cocos2dx_Node_setPhysicsBody(lua_State* tolua_S) { cocos2d::PhysicsBody* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.Node:setPhysicsBody"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setPhysicsBody'", nullptr); @@ -4657,6 +4657,106 @@ tolua_lerror: #endif //CC_USE_PHYSICS +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +#include "physics3d/CCPhysics3DWorld.h" +int lua_cocos2dx_Scene_getPhysics3DWorld(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Scene* 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.Scene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_getPhysics3DWorld'", 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_Scene_getPhysics3DWorld'", nullptr); + return 0; + } + cocos2d::Physics3DWorld* ret = cobj->getPhysics3DWorld(); + object_to_luaval(tolua_S, "cc.Physics3DWorld",(cocos2d::Physics3DWorld*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getPhysics3DWorld",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getPhysics3DWorld'.",&tolua_err); +#endif + + return 0; +} + +int lua_cocos2dx_Scene_setPhysics3DDebugCamera(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Scene* 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.Scene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_setPhysics3DDebugCamera'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S, 2, "cc.Camera", 0, &tolua_err)) { + goto tolua_lerror; + } +#endif + + cocos2d::Camera* camera = (cocos2d::Camera*)tolua_tousertype(tolua_S,2,0); + cobj->setPhysics3DDebugCamera(camera); + return 0; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:setPhysics3DDebugCamera",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_setPhysics3DDebugCamera'.",&tolua_err); +#endif + + return 0; +} +#endif + static void extendScene(lua_State* tolua_S) { lua_pushstring(tolua_S, "cc.Scene"); @@ -4664,12 +4764,12 @@ static void extendScene(lua_State* tolua_S) if (lua_istable(tolua_S,-1)) { #if CC_USE_PHYSICS - lua_pushstring(tolua_S, "getPhysicsWorld"); - lua_pushcfunction(tolua_S, lua_cocos2dx_Scene_getPhysicsWorld); - lua_rawset(tolua_S, -3); - lua_pushstring(tolua_S, "createWithPhysics"); - lua_pushcfunction(tolua_S, lua_cocos2dx_Scene_createWithPhysics); - lua_rawset(tolua_S, -3); + tolua_function(tolua_S, "getPhysicsWorld", lua_cocos2dx_Scene_getPhysicsWorld); + tolua_function(tolua_S, "createWithPhysics", lua_cocos2dx_Scene_createWithPhysics); +#endif +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + tolua_function(tolua_S, "getPhysics3DWorld", lua_cocos2dx_Scene_getPhysics3DWorld); + tolua_function(tolua_S, "setPhysics3DDebugCamera", lua_cocos2dx_Scene_setPhysics3DDebugCamera); #endif } lua_pop(tolua_S, 1); @@ -7411,6 +7511,69 @@ static void extendCamera(lua_State* tolua_S) lua_pop(tolua_S, 1); } +int lua_cocos2dx_Properties_createNonRefCounted(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Properties",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Properties:createNonRefCounted"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Properties_createNonRefCounted'", nullptr); + return 0; + } + cocos2d::Properties* ret = cocos2d::Properties::createNonRefCounted(arg0); + object_to_luaval(tolua_S, "cc.Properties",(cocos2d::Properties*)ret); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Properties:createNonRefCounted",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Properties_createNonRefCounted'.",&tolua_err); +#endif + return 0; +} + +static int lua_collect_Properties (lua_State* tolua_S) +{ + cocos2d::Properties* self = (cocos2d::Properties*) tolua_tousertype(tolua_S,1,0); + CC_SAFE_DELETE(self); + return 0; +} + +static void extendProperties(lua_State* tolua_S) +{ + lua_pushstring(tolua_S, "cc.Properties"); + lua_rawget(tolua_S, LUA_REGISTRYINDEX); + if (lua_istable(tolua_S,-1)) + { + tolua_function(tolua_S, "createNonRefCounted", lua_cocos2dx_Properties_createNonRefCounted); + } + lua_pop(tolua_S, 1); + + luaL_getmetatable(tolua_S, "cc.Properties"); + if (lua_istable(tolua_S, -1)) + { + tolua_function(tolua_S, ".collector", lua_collect_Properties); + } + lua_pop(tolua_S, 1); +} + int register_all_cocos2dx_manual(lua_State* tolua_S) { if (NULL == tolua_S) @@ -7467,6 +7630,7 @@ int register_all_cocos2dx_manual(lua_State* tolua_S) extendTextureCache(tolua_S); extendGLView(tolua_S); extendCamera(tolua_S); + extendProperties(tolua_S); return 0; } @@ -8008,6 +8172,253 @@ tolua_lerror: #endif } +int tolua_cocos2d_Mat4_translate(lua_State* tolua_S) +{ + bool ok = true; + int argc = lua_gettop(tolua_S); + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + if (argc == 1) + { +#if COCOS2D_DEBUG >= 1 + + if (!tolua_istable(tolua_S, 1, 0, &tolua_err) || + !tolua_istable(tolua_S, 2, 0, &tolua_err)) + goto tolua_lerror; + else +#endif + { + cocos2d::Mat4 mat; + cocos2d::Vec3 vec3; + ok &= luaval_to_mat4(tolua_S, 1, &mat); + if (!ok) + return 0; + + ok &= luaval_to_vec3(tolua_S, 2, &vec3); + if (!ok) + return 0; + + mat.translate(vec3); + mat4_to_luaval(tolua_S, mat); + return 1; + } + } + + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_translate'.",&tolua_err); + return 0; +#endif +} + +int tolua_cocos2d_Mat4_createRotationZ(lua_State* tolua_S) +{ + bool ok = true; + int argc = lua_gettop(tolua_S); + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + if (argc == 2) + { +#if COCOS2D_DEBUG >= 1 + + if (!tolua_istable(tolua_S, 1, 0, &tolua_err) || + !tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + goto tolua_lerror; + else +#endif + { + cocos2d::Mat4 mat; + float angle; + ok &= luaval_to_mat4(tolua_S, 1, &mat); + if (!ok) + return 0; + angle = lua_tonumber(tolua_S, 2); + cocos2d::Mat4::createRotationZ(angle, &mat); + mat4_to_luaval(tolua_S, mat); + return 1; + } + } + + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_createRotationZ'.",&tolua_err); + return 0; +#endif +} + +int tolua_cocos2d_Mat4_setIdentity(lua_State* tolua_S) +{ + bool ok = true; + int argc = lua_gettop(tolua_S); + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + if (argc == 1) + { +#if COCOS2D_DEBUG >= 1 + + if (!tolua_istable(tolua_S, 1, 0, &tolua_err)) + goto tolua_lerror; + else +#endif + { + cocos2d::Mat4 mat; + ok &= luaval_to_mat4(tolua_S, 1, &mat); + if (!ok) + return 0; + mat.setIdentity(); + mat4_to_luaval(tolua_S, mat); + return 1; + } + } + + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_setIdentity'.",&tolua_err); + return 0; +#endif +} + +int tolua_cocos2d_Mat4_createTranslation(lua_State* tolua_S) +{ + bool ok = true; + int argc = lua_gettop(tolua_S); + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + if (argc == 4) + { +#if COCOS2D_DEBUG >= 1 + + if ( !tolua_isnumber(tolua_S, 1, 0, &tolua_err) || + !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || + !tolua_isnumber(tolua_S, 3, 0, &tolua_err) || + !tolua_istable(tolua_S, 4, 0, &tolua_err)) + goto tolua_lerror; + else +#endif + { + cocos2d::Mat4 dst; + ok &= luaval_to_mat4(tolua_S, 4, &dst, "cc.Mat4.createTranslation"); + if (!ok) + return 0; + + float xTranslation = (float)lua_tonumber(tolua_S, 1); + float yTranslation = (float)lua_tonumber(tolua_S, 2); + float zTranslation = (float)lua_tonumber(tolua_S, 3); + + cocos2d::Mat4::createTranslation(xTranslation, yTranslation, zTranslation, &dst); + mat4_to_luaval(tolua_S, dst); + return 1; + } + } + else if (argc == 2) + { +#if COCOS2D_DEBUG >= 1 + + if ( !tolua_istable(tolua_S, 1, 0, &tolua_err) || + !tolua_istable(tolua_S, 2, 0, &tolua_err)) + goto tolua_lerror; + else +#endif + { + cocos2d::Vec3 translation; + cocos2d::Mat4 dst; + + ok &= luaval_to_vec3(tolua_S, 1, &translation, "cc.Mat4.createTranslation"); + ok &= luaval_to_mat4(tolua_S, 2, &dst, "cc.Mat4.createTranslation"); + if (!ok) + return 0; + + cocos2d::Mat4::createTranslation(translation, &dst); + mat4_to_luaval(tolua_S, dst); + return 1; + } + } + + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_createTranslation'.",&tolua_err); + return 0; +#endif +} + +int tolua_cocos2d_Mat4_createRotation(lua_State* tolua_S) +{ + bool ok = true; + int argc = lua_gettop(tolua_S); + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + if (argc == 2) + { +#if COCOS2D_DEBUG >= 1 + + if ( !tolua_istable(tolua_S, 1, 0, &tolua_err) || + !tolua_istable(tolua_S, 2, 0, &tolua_err)) + goto tolua_lerror; + else +#endif + { + cocos2d::Quaternion quat; + cocos2d::Mat4 dst; + + ok &= luaval_to_quaternion(tolua_S, 1, &quat, "cc.Mat4.createRotation"); + ok &= luaval_to_mat4(tolua_S, 2, &dst, "cc.Mat4.createRotation"); + if (!ok) + return 0; + + cocos2d::Mat4::createRotation(quat, &dst); + mat4_to_luaval(tolua_S, dst); + return 1; + } + } + else if (argc == 3) + { +#if COCOS2D_DEBUG >= 1 + + if ( !tolua_istable(tolua_S, 1, 0, &tolua_err) || + !tolua_isnumber(tolua_S, 2, 0, &tolua_err) || + !tolua_istable(tolua_S, 3, 0, &tolua_err)) + goto tolua_lerror; + else +#endif + { + cocos2d::Vec3 axis; + cocos2d::Mat4 dst; + + ok &= luaval_to_vec3(tolua_S, 1, &axis, "cc.Mat4.createRotation"); + ok &= luaval_to_mat4(tolua_S, 3, &dst, "cc.Mat4.createRotation"); + if (!ok) + return 0; + + float angle = (float)tolua_tonumber(tolua_S, 2, 0); + + cocos2d::Mat4::createRotation(axis, angle, &dst); + mat4_to_luaval(tolua_S, dst); + return 1; + } + } + + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_Mat4_createRotation'.",&tolua_err); + return 0; +#endif +} + int register_all_cocos2dx_math_manual(lua_State* tolua_S) { if (nullptr == tolua_S) @@ -8020,6 +8431,11 @@ int register_all_cocos2dx_math_manual(lua_State* tolua_S) tolua_function(tolua_S, "mat4_transformVector", tolua_cocos2d_Mat4_transformVector); tolua_function(tolua_S, "mat4_decompose", tolua_cocos2d_Mat4_decompose); tolua_function(tolua_S, "mat4_multiply", tolua_cocos2d_Mat4_multiply); + tolua_function(tolua_S, "mat4_translate", tolua_cocos2d_Mat4_translate); + tolua_function(tolua_S, "mat4_createRotationZ", tolua_cocos2d_Mat4_createRotationZ); + tolua_function(tolua_S, "mat4_setIdentity", tolua_cocos2d_Mat4_setIdentity); + tolua_function(tolua_S, "mat4_createTranslation", tolua_cocos2d_Mat4_createTranslation); + tolua_function(tolua_S, "mat4_createRotation", tolua_cocos2d_Mat4_createRotation); tolua_function(tolua_S, "vec3_cross", tolua_cocos2d_Vec3_cross); tolua_endmodule(tolua_S); return 0; diff --git a/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp b/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp index bb8d05a1b9..3673311eae 100644 --- a/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp +++ b/cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp @@ -76,9 +76,9 @@ namespace cocostudio customOptions.Accept(writer); auto stack = LuaEngine::getInstance()->getLuaStack(); - stack->pushString(classType.c_str(), classType.size()); + stack->pushString(classType.c_str(), static_cast(classType.size())); stack->pushObject(widget, "cc.Ref"); - stack->pushString(buffer.GetString(), buffer.Size()); + stack->pushString(buffer.GetString(), static_cast(buffer.GetSize())); stack->executeFunctionByHandler(_setPropsFunc, 3); } } diff --git a/cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.cpp b/cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.cpp new file mode 100644 index 0000000000..43165ac3ab --- /dev/null +++ b/cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.cpp @@ -0,0 +1,826 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + 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 "platform/CCPlatformConfig.h" +#include "base/ccConfig.h" +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +#include "lua_cocos2dx_physics3d_manual.h" +#include "lua_cocos2dx_physics3d_auto.hpp" +#include "tolua_fix.h" +#include "LuaBasicConversions.h" +#include "CCLuaEngine.h" +#include "physics3d/CCPhysics3D.h" + +bool luaval_to_Physics3DRigidBodyDes(lua_State* L,int lo,cocos2d::Physics3DRigidBodyDes* 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); +#endif + ok = false; + } + + if (ok) + { + lua_pushstring(L, "mass"); + lua_gettable(L, lo); + outValue->mass = lua_isnil(L, -1) ? 0 : lua_tonumber(L, -1); + lua_pop(L, 1); + + lua_pushstring(L, "localInertia"); + lua_gettable(L, lo); + if (!lua_istable(L, -1)) + { + outValue->localInertia = cocos2d::Vec3(0.0, 0.0, 0.0); + } + else + { + luaval_to_vec3(L, lua_gettop(L), &outValue->localInertia); + } + lua_pop(L, 1); + + lua_pushstring(L, "shape"); + lua_gettable(L, lo); + if (!tolua_isusertype(L, -1, "cc.Physics3DShape", 0, &tolua_err)) + { + outValue->shape = nullptr; + } + else + { + outValue->shape = static_cast(tolua_tousertype(L, lua_gettop(L), nullptr)); + } + lua_pop(L, 1); + + lua_pushstring(L, "originalTransform"); + lua_gettable(L, lo); + if (!lua_istable(L, -1)) + { + outValue->originalTransform = cocos2d::Mat4(); + } + else + { + luaval_to_mat4(L, lua_gettop(L), &outValue->originalTransform); + } + lua_pop(L, 1); + + lua_pushstring(L, "disableSleep"); + lua_gettable(L, lo); + outValue->disableSleep = lua_isnil(L, -1) ? false : lua_toboolean(L, -1); + lua_pop(L, 1); + } + return ok; +} + +bool luaval_to_Physics3DWorld_HitResult(lua_State* L,int lo, cocos2d::Physics3DWorld::HitResult* 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); +#endif + ok = false; + } + + if (ok) + { + lua_pushstring(L, "hitPosition"); + lua_gettable(L, lo); + if (!lua_istable(L, -1)) + { + outValue->hitPosition = cocos2d::Vec3(); + } + else + { + luaval_to_vec3(L, lua_gettop(L), &(outValue->hitPosition)); + } + lua_pop(L, 1); + + lua_pushstring(L, "hitNormal"); + lua_gettable(L, lo); + if (!lua_istable(L, -1)) + { + outValue->hitNormal = cocos2d::Vec3(); + } + else + { + luaval_to_vec3(L, lua_gettop(L), &(outValue->hitNormal)); + } + lua_pop(L, 1); + + lua_pushstring(L, "hitObj"); + lua_gettable(L, lo); + if (!tolua_isusertype(L, -1, "cc.Physics3DObject", 0, &tolua_err)) + { + outValue->hitObj = nullptr; + } + else + { + outValue->hitObj = static_cast(tolua_tousertype(L, lua_gettop(L), nullptr)); + } + lua_pop(L, 1); + } + return true; +} + +void Physics3DWorld_HitResult_to_luaval(lua_State* L, const cocos2d::Physics3DWorld::HitResult& hitResult) +{ + if (nullptr == L) + return; + + lua_newtable(L); + lua_pushstring(L, "hitPosition"); + vec3_to_luaval(L, hitResult.hitPosition); + lua_rawset(L, -3); + lua_pushstring(L, "hitNormal"); + vec3_to_luaval(L, hitResult.hitNormal); + lua_rawset(L, -3); + lua_pushstring(L, "hitObj"); + if (nullptr == hitResult.hitObj) + { + lua_pushnil(L); + } + else + { + object_to_luaval(L, "cc.Physics3DObject",hitResult.hitObj); + } + lua_rawset(L, -3); +} + +int lua_cocos2dx_physics3d_PhysicsSprite3D_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.PhysicsSprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L) - 1; + + if (argc == 2) + { + std::string arg0; + cocos2d::Physics3DRigidBodyDes arg1; + ok &= luaval_to_std_string(L, 2,&arg0, "cc.PhysicsSprite3D:create"); + ok &= luaval_to_Physics3DRigidBodyDes(L, 3, &arg1, "cc.PhysicsSprite3D:create"); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'", nullptr); + return 0; + } + cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1); + object_to_luaval(L, "cc.PhysicsSprite3D",(cocos2d::PhysicsSprite3D*)ret); + return 1; + } + if (argc == 3) + { + std::string arg0; + cocos2d::Physics3DRigidBodyDes arg1; + cocos2d::Vec3 arg2; + ok &= luaval_to_std_string(L, 2,&arg0, "cc.PhysicsSprite3D:create"); + ok &= luaval_to_Physics3DRigidBodyDes(L, 3, &arg1, "cc.PhysicsSprite3D:create"); + ok &= luaval_to_vec3(L, 4, &arg2, "cc.PhysicsSprite3D:create"); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'", nullptr); + return 0; + } + cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1, arg2); + object_to_luaval(L, "cc.PhysicsSprite3D",(cocos2d::PhysicsSprite3D*)ret); + return 1; + } + if (argc == 4) + { + std::string arg0; + cocos2d::Physics3DRigidBodyDes arg1; + cocos2d::Vec3 arg2; + cocos2d::Quaternion arg3; + ok &= luaval_to_std_string(L, 2,&arg0, "cc.PhysicsSprite3D:create"); + ok &= luaval_to_Physics3DRigidBodyDes(L, 3, &arg1, "cc.PhysicsSprite3D:create"); + ok &= luaval_to_vec3(L, 4, &arg2, "cc.PhysicsSprite3D:create"); + ok &= luaval_to_quaternion(L, 5, &arg3); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'", nullptr); + return 0; + } + cocos2d::PhysicsSprite3D* ret = cocos2d::PhysicsSprite3D::create(arg0, &arg1, arg2, arg3); + object_to_luaval(L, "cc.PhysicsSprite3D",(cocos2d::PhysicsSprite3D*)ret); + return 1; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.PhysicsSprite3D:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsSprite3D_create'.",&tolua_err); +#endif + return 0; +} + +void extendPhysicsSprite3D(lua_State* L) +{ + lua_pushstring(L, "cc.PhysicsSprite3D"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "create", lua_cocos2dx_physics3d_PhysicsSprite3D_create); + } + lua_pop(L, 1); +} + +int lua_cocos2dx_physics3d_Physics3DRigidBody_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.Physics3DRigidBody",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L) - 1; + + if (argc == 1) + { + cocos2d::Physics3DRigidBodyDes arg0; + ok &= luaval_to_Physics3DRigidBodyDes(L, 2, &arg0, "cc.Physics3DRigidBody:create"); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_create'", nullptr); + return 0; + } + cocos2d::Physics3DRigidBody* ret = cocos2d::Physics3DRigidBody::create(&arg0); + object_to_luaval(L, "cc.Physics3DRigidBody",(cocos2d::Physics3DRigidBody*)ret); + return 1; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DRigidBody:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DRigidBody_create'.",&tolua_err); +#endif + return 0; +} + +void extendPhysics3DRigidBody(lua_State* L) +{ + lua_pushstring(L, "cc.Physics3DRigidBody"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "create", lua_cocos2dx_physics3d_Physics3DRigidBody_create); + } + lua_pop(L, 1); +} + +int lua_cocos2dx_physics3d_Physics3DComponent_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.Physics3DComponent",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L)-1; + + do + { + if (argc == 1) + { + cocos2d::Physics3DObject* arg0; + ok &= luaval_to_object(L, 2, "cc.Physics3DObject",&arg0); + if (!ok) { break; } + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0); + object_to_luaval(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + cocos2d::Physics3DObject* arg0; + ok &= luaval_to_object(L, 2, "cc.Physics3DObject",&arg0); + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(L, 3, &arg1, "cc.Physics3DComponent:create"); + if (!ok) { break; } + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0, arg1); + object_to_luaval(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + cocos2d::Physics3DObject* arg0; + ok &= luaval_to_object(L, 2, "cc.Physics3DObject",&arg0); + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(L, 3, &arg1, "cc.Physics3DComponent:create"); + if (!ok) { break; } + cocos2d::Quaternion arg2; + ok &= luaval_to_quaternion(L, 4, &arg2); + if (!ok) { break; } + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(arg0, arg1, arg2); + object_to_luaval(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 0) + { + cocos2d::Physics3DComponent* ret = cocos2d::Physics3DComponent::create(); + object_to_luaval(L, "cc.Physics3DComponent",(cocos2d::Physics3DComponent*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d", "cc.Physics3DComponent:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DComponent_create'.",&tolua_err); +#endif + return 0; +} + +void extendPhysics3DComponent(lua_State* L) +{ + lua_pushstring(L, "cc.Physics3DComponent"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "create", lua_cocos2dx_physics3d_Physics3DComponent_create); + } + lua_pop(L, 1); +} + +int lua_cocos2dx_physics3d_Physics3DWorld_rayCast(lua_State* L) +{ + int argc = 0; + cocos2d::Physics3DWorld* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(L,1,"cc.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(L,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(L,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(L)-1; + if (argc == 3) + { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + cocos2d::Physics3DWorld::HitResult arg2; + + ok &= luaval_to_vec3(L, 2, &arg0, "cc.Physics3DWorld:rayCast"); + + ok &= luaval_to_vec3(L, 3, &arg1, "cc.Physics3DWorld:rayCast"); + + ok &= luaval_to_Physics3DWorld_HitResult(L, 4, &arg2, "cc.Physics3DWorld:rayCast"); + + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'", nullptr); + return 0; + } + bool ret = cobj->rayCast(arg0, arg1, &arg2); + tolua_pushboolean(L,(bool)ret); + Physics3DWorld_HitResult_to_luaval(L, arg2); + return 2; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:rayCast",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'.",&tolua_err); +#endif + + return 0; +} + +void extendPhysics3DWorld(lua_State* L) +{ + lua_pushstring(L, "cc.Physics3DWorld"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "rayCast", lua_cocos2dx_physics3d_Physics3DWorld_rayCast); + } + lua_pop(L, 1); +} + +int lua_cocos2dx_physics3d_Physics3DShape_createMesh(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.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L) - 1; + + if (argc == 2) + { + std::vector arg0; + int arg1; + ok &= luaval_to_std_vector_vec3(L, 2, &arg0, "cc.Physics3DShape:createMesh"); + ok &= luaval_to_int32(L, 3,(int *)&arg1, "cc.Physics3DShape:createMesh"); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createMesh'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createMesh(&arg0[0], arg1); + object_to_luaval(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createMesh",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createMesh'.",&tolua_err); +#endif + return 0; +} + +int lua_cocos2dx_physics3d_Physics3DShape_createHeightfield(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.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L) - 1; + + if (argc == 8) + { + int arg0; + int arg1; + std::vector arg2; + double arg3; + double arg4; + double arg5; + bool arg6; + bool arg7; + ok &= luaval_to_int32(L, 2,(int *)&arg0, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_int32(L, 3,(int *)&arg1, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_std_vector_float(L, 4, &arg2,"cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_number(L, 5,&arg3, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_number(L, 6,&arg4, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_number(L, 7,&arg5, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_boolean(L, 8,&arg6, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_boolean(L, 9,&arg7, "cc.Physics3DShape:createHeightfield"); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createHeightfield'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createHeightfield(arg0, arg1, &arg2[0], arg3, arg4, arg5, arg6, arg7); + object_to_luaval(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + if (argc == 9) + { + int arg0; + int arg1; + std::vector arg2; + double arg3; + double arg4; + double arg5; + bool arg6; + bool arg7; + bool arg8; + ok &= luaval_to_int32(L, 2,(int *)&arg0, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_int32(L, 3,(int *)&arg1, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_std_vector_float(L, 4, &arg2,"cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_number(L, 5,&arg3, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_number(L, 6,&arg4, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_number(L, 7,&arg5, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_boolean(L, 8,&arg6, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_boolean(L, 9,&arg7, "cc.Physics3DShape:createHeightfield"); + ok &= luaval_to_boolean(L, 10,&arg8, "cc.Physics3DShape:createHeightfield"); + if(!ok) + { + tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DShape_createHeightfield'", nullptr); + return 0; + } + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createHeightfield(arg0, arg1, &arg2[0], arg3, arg4, arg5, arg6, arg7, arg8); + object_to_luaval(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createHeightfield",argc, 8); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createHeightfield'.",&tolua_err); +#endif + return 0; +} + +int lua_cocos2dx_physics3d_Physics3DShape_createCompoundShape(lua_State* L) +{ + int argc = 0; + bool ok = true; + + tolua_Error tolua_err; + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(L,1,"cc.Physics3DShape",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(L) - 1; + + if (argc == 1) + { + + std::vector> shapes; + if (!tolua_istable(L, 2, 0, &tolua_err) ) + { +#if COCOS2D_DEBUG >=1 + luaval_to_native_err(L,"#ferror:",&tolua_err,"cc.Physics3DShape:createCompoundShape"); +#endif + ok = false; + } + + if (ok) + { + size_t len = lua_objlen(L, 2); + cocos2d::Physics3DShape* shape = nullptr; + cocos2d::Mat4 mat; + for (size_t i = 0; i < len; i++) + { + lua_pushnumber(L,i + 1); + lua_gettable(L,2); + if (lua_istable(L, -1)) + { + lua_pushnumber(L, 1); + lua_gettable(L, -2); + luaval_to_object(L, lua_gettop(L), "cc.Physics3DShape", &shape); + lua_pop(L,1); + + lua_pushnumber(L, 2); + lua_gettable(L, -2); + luaval_to_mat4(L, lua_gettop(L), &mat); + lua_pop(L,1); + + shapes.push_back(std::make_pair(shape, mat)); + } + lua_pop(L, 1); + } + } + + cocos2d::Physics3DShape* ret = cocos2d::Physics3DShape::createCompoundShape(shapes); + object_to_luaval(L, "cc.Physics3DShape",(cocos2d::Physics3DShape*)ret); + return 1; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Physics3DShape:createCompoundShape",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DShape_createCompoundShape'.",&tolua_err); +#endif + return 0; +} + +void extendPhysics3DShape(lua_State* L) +{ + lua_pushstring(L, "cc.Physics3DShape"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "createMesh", lua_cocos2dx_physics3d_Physics3DShape_createMesh); + tolua_function(L, "createHeightfield", lua_cocos2dx_physics3d_Physics3DShape_createHeightfield); + tolua_function(L, "createCompoundShape", lua_cocos2dx_physics3d_Physics3DShape_createCompoundShape); + } + lua_pop(L, 1); +} + +void CollisionPoint_to_luaval(lua_State* L,const cocos2d::Physics3DCollisionInfo::CollisionPoint& collisionPoint) +{ + if (nullptr == L) + return; + + lua_newtable(L); + lua_pushstring(L, "localPositionOnA"); + vec3_to_luaval(L, collisionPoint.localPositionOnA); + lua_rawset(L, -3); + lua_pushstring(L, "worldPositionOnA"); + vec3_to_luaval(L, collisionPoint.worldPositionOnA); + lua_rawset(L, -3); + lua_pushstring(L, "localPositionOnB"); + vec3_to_luaval(L, collisionPoint.localPositionOnB); + lua_rawset(L, -3); + lua_pushstring(L, "worldPositionOnB"); + vec3_to_luaval(L, collisionPoint.worldPositionOnB); + lua_rawset(L, -3); + lua_pushstring(L, "worldNormalOnB"); + vec3_to_luaval(L, collisionPoint.worldNormalOnB); + lua_rawset(L, -3); +} + +int lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback(lua_State* L) +{ + int argc = 0; + cocos2d::Physics3DObject* cobj = nullptr; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(L,1,"cc.Physics3DObject",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DObject*)tolua_tousertype(L,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(L,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(L)-1; + if (argc == 1) + { +#if COCOS2D_DEBUG >= 1 + if (!toluafix_isfunction(L,2,"LUA_FUNCTION",0,&tolua_err)) { + goto tolua_lerror; + } +#endif + LUA_FUNCTION handler = toluafix_ref_function(L,2,0); + cobj->setCollisionCallback([=](const cocos2d::Physics3DCollisionInfo& ci){ + lua_newtable(L); + lua_pushstring(L, "objA"); + if (nullptr == ci.objA) + { + lua_pushnil(L); + } + else + { + object_to_luaval(L, "cc.Physics3DObject", ci.objA); + } + lua_rawset(L, -3); + lua_pushstring(L, "objB"); + if (nullptr == ci.objB) + { + lua_pushnil(L); + } + else + { + object_to_luaval(L, "cc.Physics3DObject", ci.objB); + } + lua_rawset(L, -3); + lua_pushstring(L, "collisionPointList"); + if (ci.collisionPointList.empty()) + { + lua_pushnil(L); + } + else + { + int vecIndex = 1; + lua_newtable(L); + for (auto value : ci.collisionPointList) + { + lua_pushnumber(L, vecIndex); + CollisionPoint_to_luaval(L, value); + lua_rawset(L, -3); + ++vecIndex; + } + } + lua_rawset(L, -3); + LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 1); + }); + + ScriptHandlerMgr::getInstance()->addCustomHandler((void*)cobj, handler); + return 0; + } + luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DObject:setCollisionCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 +tolua_lerror: + tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback'.",&tolua_err); +#endif + + return 0; +} + +void extendPhysics3DObject(lua_State* L) +{ + lua_pushstring(L, "cc.Physics3DObject"); + lua_rawget(L, LUA_REGISTRYINDEX); + if (lua_istable(L,-1)) + { + tolua_function(L, "setCollisionCallback", lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback); + } + lua_pop(L, 1); +} + +int register_all_physics3d_manual(lua_State* L) +{ + if (nullptr == L) + return 0; + + extendPhysicsSprite3D(L); + extendPhysics3DRigidBody(L); + extendPhysics3DComponent(L); + extendPhysics3DWorld(L); + extendPhysics3DShape(L); + extendPhysics3DObject(L); + + return 1; +} + +int register_physics3d_module(lua_State* L) +{ + lua_getglobal(L, "_G"); + if (lua_istable(L,-1))//stack:...,_G, + { + register_all_cocos2dx_physics3d(L); + register_all_physics3d_manual(L); + } + lua_pop(L, 1); + return 1; +} + +#endif \ No newline at end of file diff --git a/cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.h b/cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.h new file mode 100644 index 0000000000..2935366387 --- /dev/null +++ b/cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.h @@ -0,0 +1,57 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + 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 COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_PHYSICS3D_LUA_COCOS2DX_PHYSICS3D_MANUAL_H__ +#define COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_PHYSICS3D_LUA_COCOS2DX_PHYSICS3D_MANUAL_H__ + +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + +#ifdef __cplusplus +extern "C" { +#endif +#include "tolua++.h" +#ifdef __cplusplus +} +#endif + + +/** + * @addtogroup lua + * @{ + */ + +/** + * Call this function can import the lua bindings for the physics3d module. + * After registering, we could call the related physics3d code conveniently in the lua. + * If you don't want to use the physics3d module in the lua, you only don't call this registering function. + * If you don't register the physics3d module, the package size would become smaller . + * The current mechanism,this function is called in the lua_module_register.h + */ + +TOLUA_API int register_physics3d_module(lua_State* L); + +// end group +/// @} + +#endif // #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION +#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_PHYSICS3D_LUA_COCOS2DX_PHYSICS3D_MANUAL_H__ diff --git a/cocos/scripting/lua-bindings/proj.android/Android.mk b/cocos/scripting/lua-bindings/proj.android/Android.mk index 109c7ec579..a0ab181509 100644 --- a/cocos/scripting/lua-bindings/proj.android/Android.mk +++ b/cocos/scripting/lua-bindings/proj.android/Android.mk @@ -116,6 +116,10 @@ LOCAL_SRC_FILES += ../manual/ui/lua_cocos2dx_experimental_webview_manual.cpp \ LOCAL_SRC_FILES += ../manual/extension/lua_cocos2dx_extension_manual.cpp \ ../auto/lua_cocos2dx_extension_auto.cpp \ +#physics3d +LOCAL_SRC_FILES += ../manual/physics3d/lua_cocos2dx_physics3d_manual.cpp \ + ../auto/lua_cocos2dx_physics3d_auto.cpp \ + LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \ $(LOCAL_PATH)/../../../../external/lua/luajit/include \ $(LOCAL_PATH)/../../../2d \ @@ -126,6 +130,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../external/lua/tolua \ $(LOCAL_PATH)/../../../editor-support/cocostudio/ActionTimeline \ $(LOCAL_PATH)/../../../editor-support/spine \ $(LOCAL_PATH)/../../../ui \ + $(LOCAL_PATH)/../../../physics3d \ $(LOCAL_PATH)/../../../../extensions \ $(LOCAL_PATH)/../auto \ $(LOCAL_PATH)/../manual \ diff --git a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj index f3bd4c33e4..585030e6b9 100644 --- a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj +++ b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/project.pbxproj @@ -151,6 +151,14 @@ 159552411A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1595523E1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp */; }; 159552421A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */; }; 159552431A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */; }; + 15A561E51B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */; }; + 15A561E61B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */; }; + 15A561E71B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */; }; + 15A561E81B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */; }; + 15A561EC1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */; }; + 15A561ED1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */; }; + 15A561EE1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */; }; + 15A561EF1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */; }; 15AC69D519876E9300D17520 /* lua_cocos2dx_physics_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */; }; 15AC69D619876EA200D17520 /* lua_cocos2dx_physics_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE75318BC45C200215002 /* lua_cocos2dx_physics_auto.hpp */; }; 15AC69D91987710400D17520 /* tolua_event.c in Sources */ = {isa = PBXBuildFile; fileRef = 1ABCA1F918CD8F6E0087CE3A /* tolua_event.c */; }; @@ -316,6 +324,10 @@ 159552391A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_csloader_auto.hpp; sourceTree = ""; }; 1595523E1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_csloader_manual.cpp; sourceTree = ""; }; 1595523F1A25E4B8001E9FC9 /* lua_cocos2dx_csloader_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_csloader_manual.hpp; sourceTree = ""; }; + 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_physics3d_auto.cpp; sourceTree = ""; }; + 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_physics3d_auto.hpp; sourceTree = ""; }; + 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lua_cocos2dx_physics3d_manual.cpp; path = physics3d/lua_cocos2dx_physics3d_manual.cpp; sourceTree = ""; }; + 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_cocos2dx_physics3d_manual.h; path = physics3d/lua_cocos2dx_physics3d_manual.h; sourceTree = ""; }; 15B5754D1A6F4D1500041C20 /* lua-cocos-studio-conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "lua-cocos-studio-conversions.cpp"; sourceTree = ""; }; 15B5754E1A6F4D1500041C20 /* lua-cocos-studio-conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lua-cocos-studio-conversions.h"; sourceTree = ""; }; 15C1BCC019864D8700A46ACC /* lua_cocos2dx_cocosbuilder_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_cocosbuilder_auto.cpp; sourceTree = ""; }; @@ -476,6 +488,15 @@ path = 3d; sourceTree = ""; }; + 15A561E91B00A3D0005D4720 /* physics3d */ = { + isa = PBXGroup; + children = ( + 15A561EA1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp */, + 15A561EB1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h */, + ); + name = physics3d; + sourceTree = ""; + }; 15C1BCD21986525900A46ACC /* cocos2d */ = { isa = PBXGroup; children = ( @@ -572,6 +593,8 @@ 1AACE74818BC45C200215002 /* auto */ = { isa = PBXGroup; children = ( + 15A561E31B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp */, + 15A561E41B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp */, 15C9A10C1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.cpp */, 15C9A10D1AE4972500C15443 /* lua_cocos2dx_experimental_webview_auto.hpp */, 159552381A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.cpp */, @@ -608,6 +631,7 @@ 1AACE75B18BC45C200215002 /* manual */ = { isa = PBXGroup; children = ( + 15A561E91B00A3D0005D4720 /* physics3d */, 3E2BDB0719C5E6100055CDCD /* audioengine */, 158C128419A0FA1300781A76 /* 3d */, 15427D41198F73F700DC375D /* cocosdenshion */, @@ -779,6 +803,7 @@ 15EFA1F71989E582000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */, 15415AA719A71A53004F1E71 /* auxiliar.h in Headers */, 155C7E1019A71C9D00F08B25 /* lua_extensions.h in Headers */, + 15A561E71B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */, 15415ABF19A71A53004F1E71 /* mime.h in Headers */, 15AC69E21987712500D17520 /* tolua_event.h in Headers */, 15415AD719A71A53004F1E71 /* udp.h in Headers */, @@ -820,6 +845,7 @@ 15C1C2DC19874B4400A46ACC /* xxtea.h in Headers */, 15415AD319A71A53004F1E71 /* timeout.h in Headers */, 15C1C2D5198749BC00A46ACC /* LuaOpengl.h in Headers */, + 15A561EE1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */, 155C7E2819A71CE600F08B25 /* lua_cocos2dx_ui_manual.hpp in Headers */, 15C1C2D6198749BC00A46ACC /* lua_cocos2dx_deprecated.h in Headers */, 15C1C2D7198749BC00A46ACC /* lua_cocos2dx_experimental_manual.hpp in Headers */, @@ -860,6 +886,7 @@ 15EFA650198B3342000C57D3 /* lualib.h in Headers */, 155C7E1519A71CAA00F08B25 /* Lua_web_socket.h in Headers */, 15EFA64B198B3320000C57D3 /* tolua_event.h in Headers */, + 15A561EF1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.h in Headers */, 15EFA64C198B3320000C57D3 /* tolua++.h in Headers */, 155C7DF919A71C4500F08B25 /* lua_cocos2dx_cocosdenshion_manual.h in Headers */, 15415AB019A71A53004F1E71 /* except.h in Headers */, @@ -900,6 +927,7 @@ 15EFA622198B2E74000C57D3 /* lua_cocos2dx_experimental_auto.hpp in Headers */, 15EFA623198B2E74000C57D3 /* lua_cocos2dx_auto.hpp in Headers */, 155C7E0119A71C6300F08B25 /* CCBProxy.h in Headers */, + 15A561E81B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.hpp in Headers */, 15415AC819A71A53004F1E71 /* select.h in Headers */, 155C7E1D19A71CC300F08B25 /* lua_cocos2dx_spine_manual.hpp in Headers */, 15EFA624198B2E74000C57D3 /* lua_cocos2dx_physics_auto.hpp in Headers */, @@ -984,6 +1012,7 @@ 15B5754F1A6F4D1500041C20 /* lua-cocos-studio-conversions.cpp in Sources */, 15415A7619A718FB004F1E71 /* lua_cocos2dx_ui_auto.cpp in Sources */, 15415A7719A718FB004F1E71 /* lua_cocos2dx_spine_auto.cpp in Sources */, + 15A561E51B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */, 15415A7819A718FB004F1E71 /* lua_cocos2dx_studio_auto.cpp in Sources */, 155C7DEC19A71BF200F08B25 /* lua_cocos2dx_cocosdenshion_auto.cpp in Sources */, 15AC69D91987710400D17520 /* tolua_event.c in Sources */, @@ -1035,6 +1064,7 @@ 155C7DF619A71C3E00F08B25 /* lua_cocos2dx_cocosdenshion_manual.cpp in Sources */, 15415AA519A71A53004F1E71 /* auxiliar.c in Sources */, 155C7E1A19A71CBC00F08B25 /* lua_cocos2dx_spine_manual.cpp in Sources */, + 15A561EC1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */, 15C1C2D01987498B00A46ACC /* lua_cocos2dx_experimental_manual.cpp in Sources */, 15C1C2D11987498B00A46ACC /* lua_cocos2dx_manual.cpp in Sources */, 15C1C2D21987498B00A46ACC /* lua_cocos2dx_physics_manual.cpp in Sources */, @@ -1052,6 +1082,7 @@ buildActionMask = 2147483647; files = ( 15415AC619A71A53004F1E71 /* select.c in Sources */, + 15A561ED1B00A3F1005D4720 /* lua_cocos2dx_physics3d_manual.cpp in Sources */, 15EFA646198B3311000C57D3 /* tolua_event.c in Sources */, 3E2BDB0A19C5E6100055CDCD /* lua_cocos2dx_audioengine_manual.cpp in Sources */, 15415AA619A71A53004F1E71 /* auxiliar.c in Sources */, @@ -1076,6 +1107,7 @@ 15415AD219A71A53004F1E71 /* timeout.c in Sources */, F4FE0D5819ECD00100B8B12B /* luasocket_scripts.c in Sources */, 15EFA639198B328B000C57D3 /* tolua_fix.cpp in Sources */, + 15A561E61B00A09A005D4720 /* lua_cocos2dx_physics3d_auto.cpp in Sources */, 155C7DFF19A71C5C00F08B25 /* CCBProxy.cpp in Sources */, 1595523B1A25E1C5001E9FC9 /* lua_cocos2dx_csloader_auto.cpp in Sources */, 15C9A1121AE4973400C15443 /* lua_cocos2dx_experimental_webview_manual.cpp in Sources */, @@ -1142,6 +1174,7 @@ "COCOS2D_DEBUG=1", USE_FILE32API, "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + "CC_ENABLE_BULLET_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; @@ -1159,7 +1192,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline $(SRCROOT)/../../../physics3d"; }; name = Debug; }; @@ -1176,6 +1209,7 @@ "CC_ENABLE_CHIPMUNK_INTEGRATION=1", NDEBUG, USE_FILE32API, + "CC_ENABLE_BULLET_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; @@ -1192,7 +1226,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../.. $(SRCROOT)/../../.. $(SRCROOT)/../../../base $(SRCROOT)/../../../3d $(SRCROOT)/../../../2d $(SRCROOT)/../../../deprecated $(SRCROOT)/../../../physics $(SRCROOT)/../../../math/kazmath $(SRCROOT)/../../../2d/platform $(SRCROOT)/../../../audio/include $(SRCROOT)/../../../editor-support $(SRCROOT)/../../../editor-support/spine $(SRCROOT)/../../../editor-support/cocostudio $(SRCROOT)/../../../editor-support/cocosbuilder $(SRCROOT)/../../../ui $(SRCROOT)/../../../storage $(SRCROOT)/../../../../extensions $(SRCROOT)/../../../../external $(SRCROOT)/../../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../../external/lua $(SRCROOT)/../../../../external/lua/luajit/include $(SRCROOT)/../../../../external/lua/tolua $(SRCROOT)/../../../editor-support/cocostudio/ActionTimeline $(SRCROOT)/../../../physics3d"; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj index 442584f70c..b2999ebed5 100644 --- a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj +++ b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj @@ -41,6 +41,7 @@ + @@ -71,6 +72,7 @@ + @@ -111,6 +113,7 @@ + @@ -141,6 +144,7 @@ + @@ -269,8 +273,8 @@ Disabled - $(EngineRoot);$(EngineRoot)cocos\2d;$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\ui;$(EngineRoot)external;$(EngineRoot)external\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot);$(EngineRoot)cocos\2d;$(EngineRoot)cocos\base;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\physics3d;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\ui;$(EngineRoot)external;$(EngineRoot)external\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_DEBUG;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -301,8 +305,8 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$ MinSpace true - $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)cocos\ui;$(EngineRoot)external;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;LIBLUA_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(EngineRoot);$(EngineRoot)cocos\base;$(EngineRoot)cocos;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\luajit\include;$(EngineRoot)external\lua;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\3d;$(EngineRoot)cocos\scripting\lua-bindings\manual\extension;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocostudio;$(EngineRoot)cocos\scripting\lua-bindings\manual\ui;$(EngineRoot)cocos\scripting\lua-bindings\manual\cocos2d;$(EngineRoot)extensions;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\editor-support\cocostudio\ActionTimeline;$(EngineRoot)cocos\editor-support\spine;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)cocos\ui;$(EngineRoot)cocos\physics3d;$(EngineRoot)external;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;LIBLUA_EXPORTS;_CRT_SECURE_NO_WARNINGS;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) MultiThreadedDLL true diff --git a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj.filters b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj.filters index f0af1a57a2..6c4950e6bc 100644 --- a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj.filters +++ b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj.filters @@ -73,6 +73,9 @@ {08e7d51a-6f8a-4e54-8abe-a86101be8dad} + + {3934b26e-18b0-465a-a89e-69a3417d107e} + @@ -273,6 +276,12 @@ manual\ui + + auto + + + manual\physics3d + @@ -479,6 +488,12 @@ manual\ui + + auto + + + manual\physics3d + diff --git a/cocos/scripting/lua-bindings/script/cocos2d/Cocos2d.lua b/cocos/scripting/lua-bindings/script/cocos2d/Cocos2d.lua index 5ea571a54c..2ec89cbddc 100644 --- a/cocos/scripting/lua-bindings/script/cocos2d/Cocos2d.lua +++ b/cocos/scripting/lua-bindings/script/cocos2d/Cocos2d.lua @@ -558,3 +558,23 @@ function cc.mat4.createRotation(q, dst) return dst end + +function cc.mat4.translate(self,vec3) + return mat4_translate(self,vec3) +end + +function cc.mat4.createRotationZ(self,angle) + return mat4_createRotationZ(self,angle) +end + +function cc.mat4.setIdentity(self) + return mat4_setIdentity(self) +end + +function cc.mat4.createTranslation(...) + return mat4_createTranslation(...) +end + +function cc.mat4.createRotation(...) + return mat4_createRotation(...) +end \ No newline at end of file diff --git a/cocos/scripting/lua-bindings/script/init.lua b/cocos/scripting/lua-bindings/script/init.lua index 956b38420d..92fc120a00 100644 --- a/cocos/scripting/lua-bindings/script/init.lua +++ b/cocos/scripting/lua-bindings/script/init.lua @@ -101,6 +101,9 @@ end -- cocosbuilder require "cocos.cocosbuilder.CCBReaderLoad" +-- physics3d +require "cocos.physics3d.physics3d-constants" + if CC_USE_FRAMEWORK then require "cocos.framework.init" end diff --git a/cocos/scripting/lua-bindings/script/physics3d/physics3d-constants.lua b/cocos/scripting/lua-bindings/script/physics3d/physics3d-constants.lua new file mode 100644 index 0000000000..f33cef98c5 --- /dev/null +++ b/cocos/scripting/lua-bindings/script/physics3d/physics3d-constants.lua @@ -0,0 +1,17 @@ +if nil == cc.Physics3DComponent then + return +end + +cc.Physics3DComponent.PhysicsSyncFlag = +{ + NONE = 0, + NODE_TO_PHYSICS = 1, + PHYSICS_TO_NODE = 2, + NODE_AND_NODE = 3, +} + +cc.Physics3DObject.PhysicsObjType = +{ + UNKNOWN = 0, + RIGID_BODY = 1, +} \ No newline at end of file diff --git a/cocos/ui/UIButton.cpp b/cocos/ui/UIButton.cpp index 62b6e1d458..b8bcdf5834 100644 --- a/cocos/ui/UIButton.cpp +++ b/cocos/ui/UIButton.cpp @@ -29,6 +29,7 @@ THE SOFTWARE. #include "2d/CCActionInterval.h" #include "platform/CCFileUtils.h" #include "ui/UIHelper.h" +#include NS_CC_BEGIN @@ -590,7 +591,7 @@ Size Button::getVirtualRendererSize() const return this->getNormalSize(); } - if(nullptr != _titleRenderer) + if (nullptr != _titleRenderer) { Size titleSize = _titleRenderer->getContentSize(); if (!_normalTextureLoaded && _titleRenderer->getString().size() > 0) @@ -737,6 +738,24 @@ void Button::setPressedActionEnabled(bool enabled) _pressedActionEnabled = enabled; } +void Button::setTitleAlignment(TextHAlignment hAlignment) +{ + if (nullptr == _titleRenderer) + { + this->createTitleRenderer(); + } + _titleRenderer->setAlignment(hAlignment); +} + +void Button::setTitleAlignment(TextHAlignment hAlignment, TextVAlignment vAlignment) +{ + if (nullptr == _titleRenderer) + { + this->createTitleRenderer(); + } + _titleRenderer->setAlignment(hAlignment, vAlignment); +} + void Button::setTitleText(const std::string& text) { if (text == getTitleText()) @@ -780,22 +799,27 @@ Color3B Button::getTitleColor() const void Button::setTitleFontSize(float size) { - if(nullptr == _titleRenderer) + if (nullptr == _titleRenderer) { this->createTitleRenderer(); } + + _fontSize = size; if (_type == FontType::SYSTEM) { - _titleRenderer->setSystemFontSize(size); + _titleRenderer->setSystemFontSize(_fontSize); } - else + else if (_type == FontType::TTF) { TTFConfig config = _titleRenderer->getTTFConfig(); - config.fontSize = size; + config.fontSize = _fontSize; _titleRenderer->setTTFConfig(config); } - updateContentSize(); - _fontSize = size; + //we can't change font size of BMFont. + if(FontType::BMFONT != _type) + { + updateContentSize(); + } } float Button::getTitleFontSize() const @@ -821,11 +845,21 @@ void Button::setTitleFontName(const std::string& fontName) } if(FileUtils::getInstance()->isFileExist(fontName)) { - TTFConfig config = _titleRenderer->getTTFConfig(); - config.fontFilePath = fontName; - config.fontSize = _fontSize; - _titleRenderer->setTTFConfig(config); - _type = FontType::TTF; + std::string lowerCasedFontName = fontName; + std::transform(lowerCasedFontName.begin(), lowerCasedFontName.end(), lowerCasedFontName.begin(), ::tolower); + if (lowerCasedFontName.find(".fnt") != std::string::npos) + { + _titleRenderer->setBMFontFilePath(fontName); + _type = FontType::BMFONT; + } + else + { + TTFConfig config = _titleRenderer->getTTFConfig(); + config.fontFilePath = fontName; + config.fontSize = _fontSize; + _titleRenderer->setTTFConfig(config); + _type = FontType::TTF; + } } else { @@ -849,14 +883,18 @@ const std::string Button::getTitleFontName() const { if (nullptr != _titleRenderer) { - if(this->_type == FontType::SYSTEM) + if (this->_type == FontType::SYSTEM) { return _titleRenderer->getSystemFontName(); } - else + else if (this->_type == FontType::TTF) { return _titleRenderer->getTTFConfig().fontFilePath; } + else + { + return _titleRenderer->getBMFontFilePath(); + } } else { diff --git a/cocos/ui/UIButton.h b/cocos/ui/UIButton.h index 161e99651d..aa13509370 100644 --- a/cocos/ui/UIButton.h +++ b/cocos/ui/UIButton.h @@ -247,6 +247,21 @@ public: */ const std::string getTitleFontName() const; + /** + * Sets the title's text horizontal alignment. + * + * @param hAlignment see TextHAlignment + */ + void setTitleAlignment(TextHAlignment hAlignment); + + /** + * Sets the title's text vertical alignment. + * + * @param hAlignment see TextHAlignment. + * @param vAlignment see TextVAlignment. + */ + void setTitleAlignment(TextHAlignment hAlignment, TextVAlignment vAlignment); + /** @brief When user pressed the button, the button will zoom to a scale. * The final scale of the button equals (button original scale + _zoomScale) * @since v3.3 @@ -331,7 +346,8 @@ private: enum class FontType { SYSTEM, - TTF + TTF, + BMFONT }; int _fontSize; diff --git a/cocos/ui/UIScale9Sprite.cpp b/cocos/ui/UIScale9Sprite.cpp index 20b5ac8959..6d0b91aeb1 100644 --- a/cocos/ui/UIScale9Sprite.cpp +++ b/cocos/ui/UIScale9Sprite.cpp @@ -20,7 +20,7 @@ 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 "UIScale9Sprite.h" #include "2d/CCSprite.h" @@ -29,31 +29,35 @@ #include "base/CCDirector.h" #include "renderer/CCGLProgram.h" #include "renderer/ccShaders.h" +#include "platform/CCImage.h" +#include "base/CCNinePatchImageParser.h" + NS_CC_BEGIN namespace ui { Scale9Sprite::Scale9Sprite() - : _spritesGenerated(false) - , _spriteFrameRotated(false) - , _positionsAreDirty(true) - , _scale9Image(nullptr) - , _topLeftSprite(nullptr) - , _topSprite(nullptr) - , _topRightSprite(nullptr) - , _leftSprite(nullptr) - , _centerSprite(nullptr) - , _rightSprite(nullptr) - , _bottomLeftSprite(nullptr) - , _bottomSprite(nullptr) - , _bottomRightSprite(nullptr) - , _scale9Enabled(true) - , _insetLeft(0) - , _insetTop(0) - , _insetRight(0) - , _insetBottom(0) - ,_flippedX(false) - ,_flippedY(false) + : _spritesGenerated(false) + , _spriteFrameRotated(false) + , _positionsAreDirty(true) + , _scale9Image(nullptr) + , _topLeftSprite(nullptr) + , _topSprite(nullptr) + , _topRightSprite(nullptr) + , _leftSprite(nullptr) + , _centerSprite(nullptr) + , _rightSprite(nullptr) + , _bottomLeftSprite(nullptr) + , _bottomSprite(nullptr) + , _bottomRightSprite(nullptr) + , _scale9Enabled(true) + , _insetLeft(0) + , _insetTop(0) + , _insetRight(0) + , _insetBottom(0) + ,_flippedX(false) + ,_flippedY(false) + ,_isPatch9(false) { this->setAnchorPoint(Vec2(0.5,0.5)); @@ -65,6 +69,265 @@ namespace ui { CC_SAFE_RELEASE(_scale9Image); } + bool Scale9Sprite::initWithFile(const Rect& capInsets, const std::string& file) + { + bool pReturn = this->initWithFile(file, Rect::ZERO, capInsets); + return pReturn; + } + + bool Scale9Sprite::initWithFile(const std::string& file) + { + bool pReturn = this->initWithFile(file, Rect::ZERO); + return pReturn; + } + bool Scale9Sprite::initWithSpriteFrame(SpriteFrame* spriteFrame, + const Rect& capInsets) + { + Texture2D* texture = spriteFrame->getTexture(); + CCASSERT(texture != NULL, "CCTexture must be not nil"); + Sprite *sprite = Sprite::createWithSpriteFrame(spriteFrame); + CCASSERT(sprite != NULL, "sprite must be not nil"); + bool pReturn = this->init(sprite, + spriteFrame->getRect(), + spriteFrame->isRotated(), + spriteFrame->getOffset(), + spriteFrame->getOriginalSize(), + capInsets); + return pReturn; + } + bool Scale9Sprite::initWithSpriteFrame(SpriteFrame* spriteFrame) + { + CCASSERT(spriteFrame != NULL, "Invalid spriteFrame for sprite"); + bool pReturn = this->initWithSpriteFrame(spriteFrame, Rect::ZERO); + return pReturn; + } + bool Scale9Sprite::initWithSpriteFrameName(const std::string& spriteFrameName, + const Rect& capInsets) + { + CCASSERT((SpriteFrameCache::getInstance()) != NULL, + "SpriteFrameCache::getInstance() must be non-NULL"); + + SpriteFrame *frame = SpriteFrameCache::getInstance()->getSpriteFrameByName(spriteFrameName); + CCASSERT(frame != NULL, "CCSpriteFrame must be non-NULL"); + + if (NULL == frame) return false; + bool pReturn = this->initWithSpriteFrame(frame, capInsets); + return pReturn; + } + bool Scale9Sprite::initWithSpriteFrameName(const std::string& spriteFrameName) + { + bool pReturn = this->initWithSpriteFrameName(spriteFrameName, Rect::ZERO); + return pReturn; + } + + bool Scale9Sprite::init() + { + return this->init(NULL, Rect::ZERO, Rect::ZERO); + } + + bool Scale9Sprite::init(Sprite* sprite, const Rect& rect, const Rect& capInsets) + { + return this->init(sprite, rect, false, capInsets); + } + + bool Scale9Sprite::init(Sprite* sprite, + const Rect& rect, + bool rotated, + const Rect& capInsets) + { + return init(sprite, rect, rotated, Vec2::ZERO, rect.size, capInsets); + } + + bool Scale9Sprite::init(Sprite* sprite, + const Rect& rect, + bool rotated, + const Vec2 &offset, + const Size &originalSize, + const Rect& capInsets) + { + if(sprite) + { + auto texture = sprite->getTexture(); + auto spriteFrame = sprite->getSpriteFrame(); + if (texture->isContain9PatchInfo()) + { + auto parsedCapInset = texture->getSpriteFrameCapInset(spriteFrame); + if(!parsedCapInset.equals(Rect::ZERO)) + { + this->_isPatch9 = true; + if(capInsets.equals(Rect::ZERO)) + { + this->_capInsetsInternal = this->_capInsets = parsedCapInset; + } + + } + } + + this->updateWithSprite(sprite, + rect, + rotated, + offset, + originalSize, + capInsets); + } + + return true; + } + + bool Scale9Sprite::initWithBatchNode(cocos2d::SpriteBatchNode *batchnode, + const cocos2d::Rect &rect, + bool rotated, + const cocos2d::Rect &capInsets) + { + Sprite *sprite = Sprite::createWithTexture(batchnode->getTexture()); + return init(sprite, rect, rotated, capInsets); + } + + bool Scale9Sprite::initWithBatchNode(cocos2d::SpriteBatchNode *batchnode, + const cocos2d::Rect &rect, + const cocos2d::Rect &capInsets) + { + auto sprite = Sprite::createWithTexture(batchnode->getTexture()); + return init(sprite, rect, false, capInsets); + } + bool Scale9Sprite::initWithFile(const std::string& file, + const Rect& rect, + const Rect& capInsets) + { + Sprite *sprite = nullptr; + sprite = Sprite::create(file); + bool pReturn = this->init(sprite, rect, capInsets); + return pReturn; + } + + bool Scale9Sprite::initWithFile(const std::string& file, const Rect& rect) + { + bool pReturn = this->initWithFile(file, rect, Rect::ZERO); + return pReturn; + } + + Scale9Sprite* Scale9Sprite::create() + { + Scale9Sprite *pReturn = new (std::nothrow) Scale9Sprite(); + if (pReturn && pReturn->init()) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + Scale9Sprite* Scale9Sprite::create(const std::string& file, + const Rect& rect, + const Rect& capInsets) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithFile(file, rect, capInsets) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + + Scale9Sprite* Scale9Sprite::create(const std::string& file, const Rect& rect) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithFile(file, rect) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + + + Scale9Sprite* Scale9Sprite::create(const Rect& capInsets, + const std::string& file) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithFile(capInsets, file) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + + Scale9Sprite* Scale9Sprite::create(const std::string& file) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithFile(file) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + + Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame, + const Rect& capInsets) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame, capInsets) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + + Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName, + const Rect& capInsets) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName, capInsets) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + return NULL; + } + + Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName) + { + Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); + if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName) ) + { + pReturn->autorelease(); + return pReturn; + } + CC_SAFE_DELETE(pReturn); + + log("Could not allocate Scale9Sprite()"); + return NULL; + + } + void Scale9Sprite::cleanupSlicedSprites() { if (_topLeftSprite && _topLeftSprite->isRunning()) @@ -121,42 +384,6 @@ namespace ui { CC_SAFE_RELEASE_NULL(_bottomRightSprite); } - bool Scale9Sprite::init() - { - return this->init(NULL, Rect::ZERO, Rect::ZERO); - } - - bool Scale9Sprite::init(Sprite* sprite, const Rect& rect, const Rect& capInsets) - { - return this->init(sprite, rect, false, capInsets); - } - - bool Scale9Sprite::init(Sprite* sprite, const Rect& rect, bool rotated, const Rect& capInsets) - { - return init(sprite, rect, rotated, Vec2::ZERO, rect.size, capInsets); - } - - bool Scale9Sprite::init(Sprite* sprite, const Rect& rect, bool rotated, const Vec2 &offset, const Size &originalSize, const Rect& capInsets) - { - if(sprite) - { - this->updateWithSprite(sprite, rect, rotated, offset, originalSize, capInsets); - } - - return true; - } - - bool Scale9Sprite::initWithBatchNode(cocos2d::SpriteBatchNode *batchnode, const cocos2d::Rect &rect, bool rotated, const cocos2d::Rect &capInsets) - { - Sprite *sprite = Sprite::createWithTexture(batchnode->getTexture()); - return init(sprite, rect, rotated, capInsets); - } - - bool Scale9Sprite::initWithBatchNode(cocos2d::SpriteBatchNode *batchnode, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) - { - auto sprite = Sprite::createWithTexture(batchnode->getTexture()); - return init(sprite, rect, false, capInsets); - } void Scale9Sprite::setBlendFunc(const BlendFunc &blendFunc) { @@ -208,13 +435,24 @@ namespace ui { _bottomRightSprite->setBlendFunc(_blendFunc); } - bool Scale9Sprite::updateWithBatchNode(cocos2d::SpriteBatchNode *batchnode, const cocos2d::Rect &originalRect, bool rotated, const cocos2d::Rect &capInsets) + bool Scale9Sprite::updateWithBatchNode(cocos2d::SpriteBatchNode *batchnode, + const cocos2d::Rect &originalRect, + bool rotated, + const cocos2d::Rect &capInsets) { Sprite *sprite = Sprite::createWithTexture(batchnode->getTexture()); - return this->updateWithSprite(sprite, originalRect, rotated, Vec2::ZERO, originalRect.size, capInsets); + return this->updateWithSprite(sprite, + originalRect, + rotated, + Vec2::ZERO, + originalRect.size, + capInsets); } - bool Scale9Sprite::updateWithSprite(Sprite* sprite, const Rect& rect, bool rotated, const Rect& capInsets) + bool Scale9Sprite::updateWithSprite(Sprite* sprite, + const Rect& rect, + bool rotated, + const Rect& capInsets) { return updateWithSprite(sprite, rect, rotated, Vec2::ZERO, rect.size, capInsets); } @@ -225,15 +463,22 @@ namespace ui { ret.origin.x = std::max(first.origin.x,second.origin.x); ret.origin.y = std::max(first.origin.y,second.origin.y); - float rightRealPoint = std::min(first.origin.x + first.size.width, second.origin.x + second.size.width); - float bottomRealPoint = std::min(first.origin.y + first.size.height, second.origin.y + second.size.height); + float rightRealPoint = std::min(first.origin.x + first.size.width, + second.origin.x + second.size.width); + float bottomRealPoint = std::min(first.origin.y + first.size.height, + second.origin.y + second.size.height); ret.size.width = std::max(rightRealPoint - ret.origin.x, 0.0f); ret.size.height = std::max(bottomRealPoint - ret.origin.y, 0.0f); return ret; } - bool Scale9Sprite::updateWithSprite(Sprite* sprite, const Rect& textureRect, bool rotated, const Vec2 &offset, const Size &originalSize, const Rect& capInsets) + bool Scale9Sprite::updateWithSprite(Sprite* sprite, + const Rect& textureRect, + bool rotated, + const Vec2 &offset, + const Size &originalSize, + const Rect& capInsets) { GLubyte opacity = getOpacity(); Color3B color = getColor(); @@ -277,7 +522,8 @@ namespace ui { Rect rect(textureRect); Size size(originalSize); - _capInsets = capInsets; + if(_capInsets.equals(Rect::ZERO)) + _capInsets = capInsets; // If there is no given rect if ( rect.equals(Rect::ZERO) ) @@ -299,7 +545,10 @@ namespace ui { _spriteFrameRotated = rotated; _originalSize = size; _preferredSize = size; - _capInsetsInternal = capInsets; + if(!capInsets.equals(Rect::ZERO)) + { + _capInsetsInternal = capInsets; + } if (_scale9Enabled) { @@ -307,7 +556,11 @@ namespace ui { } applyBlendFunc(); - + if(this->_isPatch9) + { + size.width = size.width - 2; + size.height = size.height - 2; + } this->setContentSize(size); if (_spritesGenerated) @@ -327,7 +580,7 @@ namespace ui { float height = _originalSize.height; Vec2 offsetPosition(ceilf(_offset.x + (_originalSize.width - _spriteRect.size.width) / 2), - ceilf(_offset.y + (_originalSize.height - _spriteRect.size.height) / 2)); + ceilf(_offset.y + (_originalSize.height - _spriteRect.size.height) / 2)); // If there is no specified center region if ( _capInsetsInternal.equals(Rect::ZERO) ) @@ -336,11 +589,15 @@ namespace ui { _capInsetsInternal = Rect(width /3, height /3, width /3, height /3); } - Rect originalRect; + Rect originalRect=_spriteRect; if(_spriteFrameRotated) - originalRect = Rect(_spriteRect.origin.x - offsetPosition.y, _spriteRect.origin.y - offsetPosition.x, _originalSize.width, _originalSize.height); + originalRect = Rect(_spriteRect.origin.x - offsetPosition.y, + _spriteRect.origin.y - offsetPosition.x, + _originalSize.width, _originalSize.height); else - originalRect = Rect(_spriteRect.origin.x - offsetPosition.x, _spriteRect.origin.y - offsetPosition.y, _originalSize.width, _originalSize.height); + originalRect = Rect(_spriteRect.origin.x - offsetPosition.x, + _spriteRect.origin.y - offsetPosition.y, + _originalSize.width, _originalSize.height); float leftWidth = _capInsetsInternal.origin.x; float centerWidth = _capInsetsInternal.size.width; @@ -355,8 +612,9 @@ namespace ui { // ... top row float x = 0.0; float y = 0.0; - - Rect pixelRect = Rect(offsetPosition.x, offsetPosition.y, _spriteRect.size.width, _spriteRect.size.height); + //why do we need pixelRect? + Rect pixelRect = Rect(offsetPosition.x, offsetPosition.y, + _spriteRect.size.width, _spriteRect.size.height); // top left Rect leftTopBoundsOriginal = Rect(x, y, leftWidth, topHeight); @@ -407,7 +665,7 @@ namespace ui { if((_capInsetsInternal.origin.x + _capInsetsInternal.size.width) <= _originalSize.width || (_capInsetsInternal.origin.y + _capInsetsInternal.size.height) <= _originalSize.height) - //in general case it is error but for legacy support we will check it + //in general case it is error but for legacy support we will check it { leftTopBounds = intersectRect(leftTopBounds, pixelRect); centerTopBounds = intersectRect(centerTopBounds, pixelRect); @@ -458,7 +716,9 @@ namespace ui { rotatedCenterTopBounds = RectApplyAffineTransform(rotatedCenterTopBounds, t); - } else { + } + else + { // set up transformation of coordinates // to handle the case where the sprite is stored rotated // in the spritesheet @@ -503,26 +763,103 @@ namespace ui { _topLeftSize = rotatedLeftTopBoundsOriginal.size; _centerSize = rotatedCenterBoundsOriginal.size; _bottomRightSize = rotatedRightBottomBoundsOriginal.size; + if(_isPatch9) + { + _topLeftSize.width = _topLeftSize.width - 1; + _topLeftSize.height = _topLeftSize.height - 1; + _bottomRightSize.width = _bottomRightSize.width - 1; + _bottomRightSize.height = _bottomRightSize.height - 1; + } if(_spriteFrameRotated) { - float offsetX = (rotatedCenterBounds.origin.x + rotatedCenterBounds.size.height/2) - (rotatedCenterBoundsOriginal.origin.x + rotatedCenterBoundsOriginal.size.height/2); - float offsetY = (rotatedCenterBoundsOriginal.origin.y + rotatedCenterBoundsOriginal.size.width/2)- (rotatedCenterBounds.origin.y + rotatedCenterBounds.size.width/2); + float offsetX = (rotatedCenterBounds.origin.x + rotatedCenterBounds.size.height/2) + - (rotatedCenterBoundsOriginal.origin.x + rotatedCenterBoundsOriginal.size.height/2); + float offsetY = (rotatedCenterBoundsOriginal.origin.y + rotatedCenterBoundsOriginal.size.width/2) + - (rotatedCenterBounds.origin.y + rotatedCenterBounds.size.width/2); _centerOffset.x = -offsetY; _centerOffset.y = offsetX; } else { - float offsetX = (rotatedCenterBounds.origin.x + rotatedCenterBounds.size.width/2) - (rotatedCenterBoundsOriginal.origin.x + rotatedCenterBoundsOriginal.size.width/2); - float offsetY = (rotatedCenterBoundsOriginal.origin.y + rotatedCenterBoundsOriginal.size.height/2)- (rotatedCenterBounds.origin.y + rotatedCenterBounds.size.height/2); + float offsetX = (rotatedCenterBounds.origin.x + rotatedCenterBounds.size.width/2) + - (rotatedCenterBoundsOriginal.origin.x + rotatedCenterBoundsOriginal.size.width/2); + float offsetY = (rotatedCenterBoundsOriginal.origin.y + rotatedCenterBoundsOriginal.size.height/2) + - (rotatedCenterBounds.origin.y + rotatedCenterBounds.size.height/2); _centerOffset.x = offsetX; _centerOffset.y = offsetY; } + //shrink the image size when it is 9-patch + if(_isPatch9) + { + float offset = 1.4f; + //Top left + if(!_spriteFrameRotated) + { + rotatedLeftTopBounds.origin.x+=offset; + rotatedLeftTopBounds.origin.y+=offset; + rotatedLeftTopBounds.size.width-=offset; + rotatedLeftTopBounds.size.height-=offset; + //Center left + rotatedLeftCenterBounds.origin.x+=offset; + rotatedLeftCenterBounds.size.width-=offset; + //Bottom left + rotatedLeftBottomBounds.origin.x+=offset; + rotatedLeftBottomBounds.size.width-=offset; + rotatedLeftBottomBounds.size.height-=offset; + //Top center + rotatedCenterTopBounds.size.height-=offset; + rotatedCenterTopBounds.origin.y+=offset; + //Bottom center + rotatedCenterBottomBounds.size.height-=offset; + //Top right + rotatedRightTopBounds.size.width-=offset; + rotatedRightTopBounds.size.height-=offset; + rotatedRightTopBounds.origin.y+=offset; + //Center right + rotatedRightCenterBounds.size.width-=offset; + //Bottom right + rotatedRightBottomBounds.size.width-=offset; + rotatedRightBottomBounds.size.height-=offset; + } + else + { + //Top left + rotatedLeftTopBounds.size.width-=offset; + rotatedLeftTopBounds.size.height-=offset; + rotatedLeftTopBounds.origin.y+=offset; + //Center left + rotatedLeftCenterBounds.origin.y+=offset; + rotatedLeftCenterBounds.size.width-=offset; + //Bottom left + rotatedLeftBottomBounds.origin.x+=offset; + rotatedLeftBottomBounds.origin.y+=offset; + rotatedLeftBottomBounds.size.width-=offset; + rotatedLeftBottomBounds.size.height-=offset; + //Top center + rotatedCenterTopBounds.size.height-=offset; + //Bottom center + rotatedCenterBottomBounds.size.height-=offset; + rotatedCenterBottomBounds.origin.x+=offset; + //Top right + rotatedRightTopBounds.size.width-=offset; + rotatedRightTopBounds.size.height-=offset; + //Center right + rotatedRightCenterBounds.size.width-=offset; + //Bottom right + rotatedRightBottomBounds.size.width-=offset; + rotatedRightBottomBounds.size.height-=offset; + rotatedRightBottomBounds.origin.x+=offset; + } + } + // Centre if(rotatedCenterBounds.size.width > 0 && rotatedCenterBounds.size.height > 0 ) { - _centerSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedCenterBounds, _spriteFrameRotated); + _centerSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedCenterBounds, + _spriteFrameRotated); _centerSprite->retain(); this->addProtectedChild(_centerSprite); } @@ -530,7 +867,9 @@ namespace ui { // Top if(rotatedCenterTopBounds.size.width > 0 && rotatedCenterTopBounds.size.height > 0 ) { - _topSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedCenterTopBounds, _spriteFrameRotated); + _topSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedCenterTopBounds, + _spriteFrameRotated); _topSprite->retain(); this->addProtectedChild(_topSprite); } @@ -538,7 +877,9 @@ namespace ui { // Bottom if(rotatedCenterBottomBounds.size.width > 0 && rotatedCenterBottomBounds.size.height > 0 ) { - _bottomSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedCenterBottomBounds, _spriteFrameRotated); + _bottomSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedCenterBottomBounds, + _spriteFrameRotated); _bottomSprite->retain(); this->addProtectedChild(_bottomSprite); } @@ -546,7 +887,9 @@ namespace ui { // Left if(rotatedLeftCenterBounds.size.width > 0 && rotatedLeftCenterBounds.size.height > 0 ) { - _leftSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedLeftCenterBounds, _spriteFrameRotated); + _leftSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedLeftCenterBounds, + _spriteFrameRotated); _leftSprite->retain(); this->addProtectedChild(_leftSprite); } @@ -554,7 +897,9 @@ namespace ui { // Right if(rotatedRightCenterBounds.size.width > 0 && rotatedRightCenterBounds.size.height > 0 ) { - _rightSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedRightCenterBounds, _spriteFrameRotated); + _rightSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedRightCenterBounds, + _spriteFrameRotated); _rightSprite->retain(); this->addProtectedChild(_rightSprite); } @@ -562,7 +907,9 @@ namespace ui { // Top left if(rotatedLeftTopBounds.size.width > 0 && rotatedLeftTopBounds.size.height > 0 ) { - _topLeftSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedLeftTopBounds, _spriteFrameRotated); + _topLeftSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedLeftTopBounds, + _spriteFrameRotated); _topLeftSprite->retain(); this->addProtectedChild(_topLeftSprite); } @@ -570,7 +917,9 @@ namespace ui { // Top right if(rotatedRightTopBounds.size.width > 0 && rotatedRightTopBounds.size.height > 0 ) { - _topRightSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedRightTopBounds, _spriteFrameRotated); + _topRightSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedRightTopBounds, + _spriteFrameRotated); _topRightSprite->retain(); this->addProtectedChild(_topRightSprite); } @@ -578,7 +927,9 @@ namespace ui { // Bottom left if(rotatedLeftBottomBounds.size.width > 0 && rotatedLeftBottomBounds.size.height > 0 ) { - _bottomLeftSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedLeftBottomBounds, _spriteFrameRotated); + _bottomLeftSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedLeftBottomBounds, + _spriteFrameRotated); _bottomLeftSprite->retain(); this->addProtectedChild(_bottomLeftSprite); } @@ -586,7 +937,9 @@ namespace ui { // Bottom right if(rotatedRightBottomBounds.size.width > 0 && rotatedRightBottomBounds.size.height > 0 ) { - _bottomRightSprite = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedRightBottomBounds, _spriteFrameRotated); + _bottomRightSprite = Sprite::createWithTexture(_scale9Image->getTexture(), + rotatedRightBottomBounds, + _spriteFrameRotated); _bottomRightSprite->retain(); this->addProtectedChild(_bottomRightSprite); } @@ -673,179 +1026,24 @@ namespace ui { if(_centerSprite) { _centerSprite->setAnchorPoint(Vec2(0.5,0.5)); - _centerSprite->setPosition(leftWidth+rescaledWidth/2 + centerOffset.x, bottomHeight+rescaledHeight/2 + centerOffset.y); + _centerSprite->setPosition(leftWidth+rescaledWidth/2 + centerOffset.x, + bottomHeight+rescaledHeight/2 + centerOffset.y); _centerSprite->setScaleX(horizontalScale); _centerSprite->setScaleY(verticalScale); } } - bool Scale9Sprite::initWithFile(const std::string& file, const Rect& rect, const Rect& capInsets) - { - Sprite *sprite = Sprite::create(file); - bool pReturn = this->init(sprite, rect, capInsets); - return pReturn; - } - Scale9Sprite* Scale9Sprite::create(const std::string& file, const Rect& rect, const Rect& capInsets) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(file, rect, capInsets) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } - - bool Scale9Sprite::initWithFile(const std::string& file, const Rect& rect) - { - bool pReturn = this->initWithFile(file, rect, Rect::ZERO); - return pReturn; - } - - Scale9Sprite* Scale9Sprite::create(const std::string& file, const Rect& rect) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(file, rect) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } - - - bool Scale9Sprite::initWithFile(const Rect& capInsets, const std::string& file) - { - bool pReturn = this->initWithFile(file, Rect::ZERO, capInsets); - return pReturn; - } - - Scale9Sprite* Scale9Sprite::create(const Rect& capInsets, const std::string& file) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(capInsets, file) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } - - bool Scale9Sprite::initWithFile(const std::string& file) - { - bool pReturn = this->initWithFile(file, Rect::ZERO); - return pReturn; - - } - - Scale9Sprite* Scale9Sprite::create(const std::string& file) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(file) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } - - bool Scale9Sprite::initWithSpriteFrame(SpriteFrame* spriteFrame, const Rect& capInsets) - { - Texture2D* texture = spriteFrame->getTexture(); - CCASSERT(texture != NULL, "CCTexture must be not nil"); - - Sprite *sprite = Sprite::createWithSpriteFrame(spriteFrame); - CCASSERT(sprite != NULL, "sprite must be not nil"); - - bool pReturn = this->init(sprite, spriteFrame->getRect(), spriteFrame->isRotated(), spriteFrame->getOffset(), spriteFrame->getOriginalSize(), capInsets); - return pReturn; - } - - Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame, const Rect& capInsets) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame, capInsets) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } - bool Scale9Sprite::initWithSpriteFrame(SpriteFrame* spriteFrame) - { - CCASSERT(spriteFrame != NULL, "Invalid spriteFrame for sprite"); - bool pReturn = this->initWithSpriteFrame(spriteFrame, Rect::ZERO); - return pReturn; - } - - Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } - - bool Scale9Sprite::initWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets) - { - CCASSERT((SpriteFrameCache::getInstance()) != NULL, "SpriteFrameCache::getInstance() must be non-NULL"); - - SpriteFrame *frame = SpriteFrameCache::getInstance()->getSpriteFrameByName(spriteFrameName); - CCASSERT(frame != NULL, "CCSpriteFrame must be non-NULL"); - - if (NULL == frame) return false; - - bool pReturn = this->initWithSpriteFrame(frame, capInsets); - return pReturn; - } - - Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName, capInsets) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } - - bool Scale9Sprite::initWithSpriteFrameName(const std::string& spriteFrameName) - { - bool pReturn = this->initWithSpriteFrameName(spriteFrameName, Rect::ZERO); - return pReturn; - } - - Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName) - { - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - - log("Could not allocate Scale9Sprite()"); - return NULL; - - } Scale9Sprite* Scale9Sprite::resizableSpriteWithCapInsets(const Rect& capInsets) const { Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->init(_scale9Image, _spriteRect, _spriteFrameRotated, _offset, _originalSize, _capInsets) ) + if ( pReturn && pReturn->init(_scale9Image, + _spriteRect, + _spriteFrameRotated, + _offset, + _originalSize, + _capInsets) ) { pReturn->autorelease(); return pReturn; @@ -854,34 +1052,23 @@ namespace ui { return NULL; } - Scale9Sprite* Scale9Sprite::create() - { - Scale9Sprite *pReturn = new (std::nothrow) Scale9Sprite(); - if (pReturn && pReturn->init()) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return NULL; - } void Scale9Sprite::setState(cocos2d::ui::Scale9Sprite::State state) { GLProgramState *glState = nullptr; switch (state) { - case State::NORMAL: - { - glState = GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP); - } - break; - case State::GRAY: - { - glState = GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_GRAYSCALE); - } - default: - break; + case State::NORMAL: + { + glState = GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP); + } + break; + case State::GRAY: + { + glState = GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_GRAYSCALE); + } + default: + break; } if (nullptr != _scale9Image) @@ -898,10 +1085,10 @@ namespace ui { } } - /** sets the opacity. - @warning If the the texture has premultiplied alpha then, the R, G and B channels will be modifed. - Values goes from 0 to 255, where 255 means fully opaque. - */ +/** sets the opacity. + @warning If the the texture has premultiplied alpha then, the R, G and B channels will be modifed. + Values goes from 0 to 255, where 255 means fully opaque. +*/ @@ -926,7 +1113,12 @@ namespace ui { void Scale9Sprite::setSpriteFrame(SpriteFrame * spriteFrame, const Rect& capInsets) { Sprite * sprite = Sprite::createWithTexture(spriteFrame->getTexture()); - this->updateWithSprite(sprite, spriteFrame->getRect(), spriteFrame->isRotated(), spriteFrame->getOffset(), spriteFrame->getOriginalSize(), capInsets); + this->updateWithSprite(sprite, + spriteFrame->getRect(), + spriteFrame->isRotated(), + spriteFrame->getOffset(), + spriteFrame->getOriginalSize(), + capInsets); // Reset insets this->_insetLeft = capInsets.origin.x; @@ -945,7 +1137,12 @@ namespace ui { void Scale9Sprite::setCapInsets(const Rect& capInsets) { Size contentSize = this->_contentSize; - this->updateWithSprite(this->_scale9Image, _spriteRect, _spriteFrameRotated, _offset, _originalSize, capInsets); + this->updateWithSprite(this->_scale9Image, + _spriteRect, + _spriteFrameRotated, + _offset, + _originalSize, + capInsets); this->_insetLeft = capInsets.origin.x; this->_insetTop = capInsets.origin.y; this->_insetRight = _originalSize.width - _insetLeft - capInsets.size.width; @@ -1125,7 +1322,12 @@ namespace ui { { if (_scale9Image) { - this->updateWithSprite(this->_scale9Image, _spriteRect, _spriteFrameRotated, _offset, _originalSize, _capInsets); + this->updateWithSprite(this->_scale9Image, + _spriteRect, + _spriteFrameRotated, + _offset, + _originalSize, + _capInsets); } } _positionsAreDirty = true; @@ -1152,7 +1354,9 @@ namespace ui { } if( _reorderProtectedChildDirty ) { - std::sort( std::begin(_protectedChildren), std::end(_protectedChildren), nodeComparisonLess ); + std::sort( std::begin(_protectedChildren), + std::end(_protectedChildren), + nodeComparisonLess ); _reorderProtectedChildDirty = false; } } @@ -1162,7 +1366,7 @@ namespace ui { if (_scale9Image) { _scale9Image->setPosition(_contentSize.width * _scale9Image->getAnchorPoint().x, - _contentSize.height * _scale9Image->getAnchorPoint().y); + _contentSize.height * _scale9Image->getAnchorPoint().y); } } @@ -1382,7 +1586,8 @@ namespace ui { float Scale9Sprite::getScale()const { - CCASSERT(this->getScaleX() == this->getScaleY(), "Scale9Sprite#scale. ScaleX != ScaleY. Don't know which one to return"); + CCASSERT(this->getScaleX() == this->getScaleY(), + "Scale9Sprite#scale. ScaleX != ScaleY. Don't know which one to return"); return this->getScaleX(); } diff --git a/cocos/ui/UIScale9Sprite.h b/cocos/ui/UIScale9Sprite.h index 1a90a725cd..076f241281 100644 --- a/cocos/ui/UIScale9Sprite.h +++ b/cocos/ui/UIScale9Sprite.h @@ -742,6 +742,7 @@ namespace ui { bool _flippedX; bool _flippedY; + bool _isPatch9; }; }} //end of namespace diff --git a/cocos/ui/UITextField.cpp b/cocos/ui/UITextField.cpp index b507178e3b..0b112490b8 100644 --- a/cocos/ui/UITextField.cpp +++ b/cocos/ui/UITextField.cpp @@ -461,7 +461,12 @@ void TextField::setPlaceHolderColor(const cocos2d::Color4B &color) { _textFieldRenderer->setColorSpaceHolder(color); } - + +const Color4B& TextField::getTextColor()const +{ + return _textFieldRenderer->getTextColor(); +} + void TextField::setTextColor(const cocos2d::Color4B &textColor) { _textFieldRenderer->setTextColor(textColor); @@ -844,11 +849,21 @@ void TextField::setTextHorizontalAlignment(TextHAlignment alignment) _textFieldRenderer->setHorizontalAlignment(alignment); } +TextHAlignment TextField::getTextHorizontalAlignment() const +{ + return _textFieldRenderer->getHorizontalAlignment(); +} + void TextField::setTextVerticalAlignment(TextVAlignment alignment) { _textFieldRenderer->setVerticalAlignment(alignment); } +TextVAlignment TextField::getTextVerticalAlignment() const +{ + return _textFieldRenderer->getVerticalAlignment(); +} + } NS_CC_END diff --git a/cocos/ui/UITextField.h b/cocos/ui/UITextField.h index 0932a9c90f..acfa199877 100644 --- a/cocos/ui/UITextField.h +++ b/cocos/ui/UITextField.h @@ -354,6 +354,13 @@ public: */ void setPlaceHolderColor(const Color4B& color); + /** + * @brief Query the text string color. + * + * @return The color of the text. + */ + const Color4B& getTextColor()const; + /** * @brief Change the text color. * @@ -594,6 +601,13 @@ public: * @param alignment A alignment arguments in @see `TextHAlignment`. */ void setTextHorizontalAlignment(TextHAlignment alignment); + + /** + * @brief Inquire the horizontal alignment + * + * @return The horizontal alignment + */ + TextHAlignment getTextHorizontalAlignment() const; /** * @brief Change the vertical text alignment. @@ -601,6 +615,13 @@ public: * @param alignment A alignment arguments in @see `TextVAlignment`. */ void setTextVerticalAlignment(TextVAlignment alignment); + + /** + * @brief Inquire the horizontal alignment + * + * @return The horizontal alignment + */ + TextVAlignment getTextVerticalAlignment() const; CC_CONSTRUCTOR_ACCESS: virtual bool init() override; diff --git a/extensions/Particle3D/CCParticle3DRender.cpp b/extensions/Particle3D/CCParticle3DRender.cpp index 0c46554e0b..14ca60de3f 100755 --- a/extensions/Particle3D/CCParticle3DRender.cpp +++ b/extensions/Particle3D/CCParticle3DRender.cpp @@ -44,8 +44,8 @@ Particle3DQuadRender::Particle3DQuadRender() , _indexBuffer(nullptr) , _vertexBuffer(nullptr) { - } + Particle3DQuadRender::~Particle3DQuadRender() { CC_SAFE_DELETE(_meshCommand); @@ -159,7 +159,19 @@ void Particle3DQuadRender::render(Renderer* renderer, const Mat4 &transform, Par GLuint texId = (_texture ? _texture->getName() : 0); float depthZ = -(viewMat.m[2] * transform.m[12] + viewMat.m[6] * transform.m[13] + viewMat.m[10] * transform.m[14] + viewMat.m[14]); - _meshCommand->init(depthZ, texId, _glProgramState, particleSystem->getBlendFunc(), _vertexBuffer->getVBO(), _indexBuffer->getVBO(), GL_TRIANGLES, GL_UNSIGNED_SHORT, index, transform, 0); + + _meshCommand->init( + depthZ, + texId, + _glProgramState, + _stateBlock, + _vertexBuffer->getVBO(), + _indexBuffer->getVBO(), + GL_TRIANGLES, + GL_UNSIGNED_SHORT, + index, + transform, + 0); _glProgramState->setUniformVec4("u_color", Vec4(1,1,1,1)); renderer->addCommand(_meshCommand); } @@ -192,26 +204,15 @@ bool Particle3DQuadRender::initQuadRender( const std::string& texFile ) //ret->_indexBuffer->retain(); _meshCommand = new (std::nothrow) MeshCommand(); + _meshCommand->setSkipBatching(true); _meshCommand->setTransparent(true); - _meshCommand->setDepthTestEnabled(_depthTest); - _meshCommand->setDepthWriteEnabled(_depthWrite); - _meshCommand->setCullFace(GL_BACK); - _meshCommand->setCullFaceEnabled(true); + _stateBlock->setDepthTest(_depthTest); + _stateBlock->setDepthWrite(_depthWrite); + _stateBlock->setCullFace(true); + _stateBlock->setCullFaceSide(RenderState::CULL_FACE_SIDE_BACK); return true; } -void Particle3DQuadRender::setDepthTest( bool isDepthTest ) -{ - Particle3DRender::setDepthTest(isDepthTest); - _meshCommand->setDepthTestEnabled(_depthTest); -} - -void Particle3DQuadRender::setDepthWrite( bool isDepthWrite ) -{ - Particle3DRender::setDepthWrite(isDepthWrite); - _meshCommand->setDepthWriteEnabled(_depthWrite); -} - ////////////////////////////////////////////////////////////////////////////// Particle3DModelRender::Particle3DModelRender() : _spriteSize(Vec3::ONE) @@ -283,6 +284,41 @@ void Particle3DModelRender::render(Renderer* renderer, const Mat4 &transform, Pa } } +// MARK: Particle3DRender + +Particle3DRender::Particle3DRender() +: _particleSystem(nullptr) +, _isVisible(true) +, _rendererScale(Vec3::ONE) +, _depthTest(true) +, _depthWrite(false) +{ + _stateBlock = RenderState::StateBlock::create(); + _stateBlock->retain(); + + _stateBlock->setCullFace(false); + _stateBlock->setCullFaceSide(RenderState::CULL_FACE_SIDE_BACK); + _stateBlock->setDepthTest(false); + _stateBlock->setDepthWrite(false); + _stateBlock->setBlend(true); +}; + +Particle3DRender::~Particle3DRender() +{ + _stateBlock->release(); +} + +void Particle3DRender::copyAttributesTo (Particle3DRender *render) +{ + CC_SAFE_RELEASE(render->_stateBlock); + render->_stateBlock = _stateBlock; + CC_SAFE_RETAIN(render->_stateBlock); + + render->_isVisible = _isVisible; + render->_rendererScale = _rendererScale; + render->_depthTest = _depthTest; + render->_depthWrite = _depthWrite; +} void Particle3DRender::notifyStart() { @@ -299,4 +335,21 @@ void Particle3DRender::notifyRescaled( const Vec3& scale ) _rendererScale = scale; } +void Particle3DRender::setDepthTest( bool isDepthTest ) +{ + _depthTest = isDepthTest; + _stateBlock->setDepthTest(_depthTest); +} + +void Particle3DRender::setDepthWrite( bool isDepthWrite ) +{ + _depthWrite = isDepthWrite; + _stateBlock->setDepthWrite(_depthWrite); +} + +void Particle3DRender::setBlendFunc(const BlendFunc &blendFunc) +{ + _stateBlock->setBlendFunc(blendFunc); +} + NS_CC_END diff --git a/extensions/Particle3D/CCParticle3DRender.h b/extensions/Particle3D/CCParticle3DRender.h index eee9904700..e2cf465222 100644 --- a/extensions/Particle3D/CCParticle3DRender.h +++ b/extensions/Particle3D/CCParticle3DRender.h @@ -25,9 +25,12 @@ #ifndef __CC_PARTICLE_3D_RENDER_H__ #define __CC_PARTICLE_3D_RENDER_H__ +#include + +#include "renderer/CCRenderState.h" #include "base/CCRef.h" #include "math/CCMath.h" -#include + NS_CC_BEGIN @@ -64,21 +67,19 @@ public: bool isVisible() const { return _isVisible; } - virtual void setDepthTest(bool isDepthTest) { _depthTest = isDepthTest; } - virtual void setDepthWrite(bool isDepthWrite) {_depthWrite = isDepthWrite; } - + void setDepthTest(bool isDepthTest); + void setDepthWrite(bool isDepthWrite); + void setBlendFunc(const BlendFunc& blendFunc); + + void copyAttributesTo (Particle3DRender *render); + CC_CONSTRUCTOR_ACCESS: - Particle3DRender() - : _particleSystem(nullptr) - , _isVisible(true) - , _rendererScale(Vec3::ONE) - , _depthTest(true) - , _depthWrite(false) - {}; - virtual ~Particle3DRender(){}; + Particle3DRender(); + virtual ~Particle3DRender(); protected: ParticleSystem3D *_particleSystem; + RenderState::StateBlock* _stateBlock; bool _isVisible; Vec3 _rendererScale; bool _depthTest; @@ -93,9 +94,6 @@ public: virtual void render(Renderer* renderer, const Mat4 &transform, ParticleSystem3D* particleSystem) override; - virtual void setDepthTest(bool isDepthTest) override; - virtual void setDepthWrite(bool isDepthWrite) override; - CC_CONSTRUCTOR_ACCESS: Particle3DQuadRender(); virtual ~Particle3DQuadRender(); @@ -105,7 +103,7 @@ protected: bool initQuadRender(const std::string& texFile); protected: - MeshCommand* _meshCommand; + MeshCommand* _meshCommand; Texture2D* _texture; GLProgramState* _glProgramState; IndexBuffer* _indexBuffer; //index buffer diff --git a/extensions/Particle3D/PU/CCPUBeamRender.cpp b/extensions/Particle3D/PU/CCPUBeamRender.cpp index 193835162f..c00afcf3fb 100644 --- a/extensions/Particle3D/PU/CCPUBeamRender.cpp +++ b/extensions/Particle3D/PU/CCPUBeamRender.cpp @@ -357,10 +357,9 @@ PUBeamRender* PUBeamRender::clone() return br; } -void PUBeamRender::copyAttributesTo( PURender *render ) +void PUBeamRender::copyAttributesTo(PUBeamRender *beamRender) { - PURender::copyAttributesTo(render); - PUBeamRender *beamRender = static_cast(render); + PURender::copyAttributesTo(beamRender); beamRender->setUseVertexColours(_useVertexColours); beamRender->setMaxChainElements(_maxChainElements); beamRender->setUpdateInterval(_updateInterval); diff --git a/extensions/Particle3D/PU/CCPUBeamRender.h b/extensions/Particle3D/PU/CCPUBeamRender.h index 8c17e45985..fa3556ed1c 100644 --- a/extensions/Particle3D/PU/CCPUBeamRender.h +++ b/extensions/Particle3D/PU/CCPUBeamRender.h @@ -127,7 +127,7 @@ public: void destroyAll(void); virtual PUBeamRender* clone() override; - virtual void copyAttributesTo (PURender *render) override; + void copyAttributesTo(PUBeamRender *render); CC_CONSTRUCTOR_ACCESS: PUBeamRender(); diff --git a/extensions/Particle3D/PU/CCPUBillboardChain.cpp b/extensions/Particle3D/PU/CCPUBillboardChain.cpp index 260df910c0..0009830a65 100644 --- a/extensions/Particle3D/PU/CCPUBillboardChain.cpp +++ b/extensions/Particle3D/PU/CCPUBillboardChain.cpp @@ -79,6 +79,15 @@ PUBillboardChain::PUBillboardChain(const std::string& name, const std::string &t _vertexBuffer(nullptr) { + _stateBlock = RenderState::StateBlock::create(); + CC_SAFE_RETAIN(_stateBlock); + + _stateBlock->setCullFace(false); + _stateBlock->setCullFaceSide(RenderState::CULL_FACE_SIDE_BACK); + _stateBlock->setDepthTest(false); + _stateBlock->setDepthWrite(false); + _stateBlock->setBlend(true); + _otherTexCoordRange[0] = 0.0f; _otherTexCoordRange[1] = 1.0f; @@ -90,6 +99,7 @@ PUBillboardChain::PUBillboardChain(const std::string& name, const std::string &t PUBillboardChain::~PUBillboardChain() { CC_SAFE_DELETE(_meshCommand); + CC_SAFE_RELEASE(_stateBlock); //CC_SAFE_RELEASE(_texture); CC_SAFE_RELEASE(_glProgramState); CC_SAFE_RELEASE(_vertexBuffer); @@ -666,11 +676,12 @@ void PUBillboardChain::init( const std::string &texFile ) _glProgramState = glProgramState; _meshCommand = new (std::nothrow) MeshCommand(); + _meshCommand->setSkipBatching(true); _meshCommand->setTransparent(true); - _meshCommand->setDepthTestEnabled(true); - _meshCommand->setDepthWriteEnabled(false); - _meshCommand->setCullFace(GL_BACK); - _meshCommand->setCullFaceEnabled(true); + _stateBlock->setDepthTest(true); + _stateBlock->setDepthWrite(false); + _stateBlock->setCullFaceSide(RenderState::CULL_FACE_SIDE_BACK); + _stateBlock->setCullFace(true); } void PUBillboardChain::render( Renderer* renderer, const Mat4 &transform, ParticleSystem3D* particleSystem ) @@ -678,14 +689,28 @@ void PUBillboardChain::render( Renderer* renderer, const Mat4 &transform, Partic auto camera = Camera::getVisitingCamera(); auto cameraMat = camera->getNodeToWorldTransform(); - if (!_chainSegmentList.empty()){ + if (!_chainSegmentList.empty()) + { updateVertexBuffer(cameraMat); updateIndexBuffer(); - if (!_vertices.empty() && !_indices.empty()){ + if (!_vertices.empty() && !_indices.empty()) + { GLuint texId = (_texture ? _texture->getName() : 0); - _meshCommand->init(0, texId, _glProgramState, particleSystem->getBlendFunc(), _vertexBuffer->getVBO(), _indexBuffer->getVBO(), GL_TRIANGLES, GL_UNSIGNED_SHORT, _indices.size(), transform, Node::FLAGS_RENDER_AS_3D); - _meshCommand->setTransparent(true); - _glProgramState->setUniformVec4("u_color", Vec4(1,1,1,1)); + _stateBlock->setBlendFunc(particleSystem->getBlendFunc()); + _meshCommand->init(0, + texId, + _glProgramState, + _stateBlock, + _vertexBuffer->getVBO(), + _indexBuffer->getVBO(), + GL_TRIANGLES, + GL_UNSIGNED_SHORT, + _indices.size(), + transform, + Node::FLAGS_RENDER_AS_3D); + _meshCommand->setSkipBatching(true); + _meshCommand->setTransparent(true); + _glProgramState->setUniformVec4("u_color", Vec4(1,1,1,1)); renderer->addCommand(_meshCommand); } } @@ -693,12 +718,17 @@ void PUBillboardChain::render( Renderer* renderer, const Mat4 &transform, Partic void PUBillboardChain::setDepthTest( bool isDepthTest ) { - _meshCommand->setDepthTestEnabled(isDepthTest); + _stateBlock->setDepthTest(isDepthTest); } void PUBillboardChain::setDepthWrite( bool isDepthWrite ) { - _meshCommand->setDepthWriteEnabled(isDepthWrite); + _stateBlock->setDepthWrite(isDepthWrite); +} + +void PUBillboardChain::setBlendFunc(const BlendFunc& blendFunc) +{ + _stateBlock->setBlendFunc(blendFunc); } //----------------------------------------------------------------------- diff --git a/extensions/Particle3D/PU/CCPUBillboardChain.h b/extensions/Particle3D/PU/CCPUBillboardChain.h index 6111263a6d..1fd9295f8a 100644 --- a/extensions/Particle3D/PU/CCPUBillboardChain.h +++ b/extensions/Particle3D/PU/CCPUBillboardChain.h @@ -26,9 +26,11 @@ #ifndef __CC_PU_PARTICLE_3D_BILLBOARD_CHAIN_H__ #define __CC_PU_PARTICLE_3D_BILLBOARD_CHAIN_H__ +#include +#include "renderer/CCRenderState.h" #include "base/CCRef.h" #include "math/CCMath.h" -#include + NS_CC_BEGIN @@ -54,11 +56,11 @@ public: Element(); - Element(const Vec3 &position, + Element(const Vec3& position, float width, float texCoord, - const Vec4 &colour, - const Quaternion &orientation); + const Vec4& colour, + const Quaternion& orientation); Vec3 position; float width; @@ -79,7 +81,7 @@ public: @param useVertexColours If true, use vertex colours from the chain elements @param dynamic If true, buffers are created with the intention of being updated */ - PUBillboardChain(const std::string& name, const std::string &texFile = "", size_t maxElements = 20, size_t numberOfChains = 1, + PUBillboardChain(const std::string& name, const std::string& texFile = "", size_t maxElements = 20, size_t numberOfChains = 1, bool useTextureCoords = true, bool useColours = true, bool dynamic = true); /// destructor virtual ~PUBillboardChain(); @@ -217,18 +219,19 @@ public: matrix, the segment corresponding to that point will be facing towards UNIT_Z This vector is internally normalized. */ - void setFaceCamera( bool faceCamera, const Vec3 &normalVector=Vec3::UNIT_X ); + void setFaceCamera( bool faceCamera, const Vec3& normalVector=Vec3::UNIT_X ); - virtual void setDepthTest(bool isDepthTest); - virtual void setDepthWrite(bool isDepthWrite); + void setDepthTest(bool isDepthTest); + void setDepthWrite(bool isDepthWrite); + void setBlendFunc(const BlendFunc& blendFunc); - void render(Renderer* renderer, const Mat4 &transform, ParticleSystem3D* particleSystem); + void render(Renderer* renderer, const Mat4& transform, ParticleSystem3D* particleSystem); // Overridden members follow - //void _updateRenderQueue(RenderQueue *); - //void getRenderOperation(RenderOperation &); + //void _updateRenderQueue(RenderQueue*); + //void getRenderOperation(RenderOperation&); //virtual bool preRender(SceneManager* sm, RenderSystem* rsys); - //void getWorldTransforms(Matrix4 *) const; + //void getWorldTransforms(Matrix4*) const; /// @copydoc MovableObject::visitRenderables protected: @@ -240,11 +243,11 @@ protected: // Setup buffers virtual void setupBuffers(void); /// Update the contents of the vertex buffer - virtual void updateVertexBuffer(const Mat4 &camMat); + virtual void updateVertexBuffer(const Mat4& camMat); /// Update the contents of the index buffer virtual void updateIndexBuffer(void); - void init(const std::string &texFile); + void init(const std::string& texFile); protected: @@ -312,11 +315,12 @@ protected: Vec2 uv; Vec4 color; }; - MeshCommand* _meshCommand; - Texture2D* _texture; - GLProgramState* _glProgramState; - IndexBuffer* _indexBuffer; //index buffer - VertexBuffer* _vertexBuffer; // vertex buffer + MeshCommand* _meshCommand; + RenderState::StateBlock* _stateBlock; + Texture2D* _texture; + GLProgramState* _glProgramState; + IndexBuffer* _indexBuffer; //index buffer + VertexBuffer* _vertexBuffer; // vertex buffer std::vector _vertices; std::vector _indices; diff --git a/extensions/Particle3D/PU/CCPUParticleSystem3D.cpp b/extensions/Particle3D/PU/CCPUParticleSystem3D.cpp index 7ec249c26f..21fff53b92 100755 --- a/extensions/Particle3D/PU/CCPUParticleSystem3D.cpp +++ b/extensions/Particle3D/PU/CCPUParticleSystem3D.cpp @@ -1056,7 +1056,7 @@ void PUParticleSystem3D::clearAllParticles() } } -void PUParticleSystem3D::copyAttributesTo( PUParticleSystem3D* system ) +void PUParticleSystem3D::copyAttributesTo(PUParticleSystem3D* system ) { system->removeAllEmitter(); system->removeAllAffector(); @@ -1171,7 +1171,8 @@ void PUParticleSystem3D::draw( Renderer *renderer, const Mat4 &transform, uint32 if (!_emittedSystemParticlePool.empty()) { - for (auto iter : _emittedSystemParticlePool){ + for (auto iter : _emittedSystemParticlePool) + { PUParticle3D *particle = static_cast(iter.second.getFirst()); while (particle) { diff --git a/extensions/Particle3D/PU/CCPUParticleSystem3D.h b/extensions/Particle3D/PU/CCPUParticleSystem3D.h index d22ff6bd2d..c2d2ce0fc9 100644 --- a/extensions/Particle3D/PU/CCPUParticleSystem3D.h +++ b/extensions/Particle3D/PU/CCPUParticleSystem3D.h @@ -351,7 +351,7 @@ public: void calulateRotationOffset(void); virtual PUParticleSystem3D* clone(); - virtual void copyAttributesTo (PUParticleSystem3D* system); + virtual void copyAttributesTo(PUParticleSystem3D* system); CC_CONSTRUCTOR_ACCESS: PUParticleSystem3D(); diff --git a/extensions/Particle3D/PU/CCPURender.cpp b/extensions/Particle3D/PU/CCPURender.cpp index 96d74e3a03..21ecf3c775 100644 --- a/extensions/Particle3D/PU/CCPURender.cpp +++ b/extensions/Particle3D/PU/CCPURender.cpp @@ -43,11 +43,8 @@ NS_CC_BEGIN void PURender::copyAttributesTo( PURender *render ) { - render->_particleSystem = _particleSystem; - render->_isVisible = _isVisible; - render->_rendererScale = _rendererScale; - render->_depthTest = _depthTest; - render->_depthWrite = _depthWrite; + Particle3DRender::copyAttributesTo(render); + render->_renderType = _renderType; } @@ -243,8 +240,21 @@ void PUParticle3DQuadRender::render(Renderer* renderer, const Mat4 &transform, P _vertexBuffer->updateVertices(&_vertices[0], vertexindex/* * sizeof(_posuvcolors[0])*/, 0); _indexBuffer->updateIndices(&_indices[0], index/* * sizeof(unsigned short)*/, 0); + _stateBlock->setBlendFunc(particleSystem->getBlendFunc()); + GLuint texId = (_texture ? _texture->getName() : 0); - _meshCommand->init(0, texId, _glProgramState, particleSystem->getBlendFunc(), _vertexBuffer->getVBO(), _indexBuffer->getVBO(), GL_TRIANGLES, GL_UNSIGNED_SHORT, index, transform, Node::FLAGS_RENDER_AS_3D); + _meshCommand->init(0, + texId, + _glProgramState, + _stateBlock, + _vertexBuffer->getVBO(), + _indexBuffer->getVBO(), + GL_TRIANGLES, + GL_UNSIGNED_SHORT, + index, + transform, + Node::FLAGS_RENDER_AS_3D); + _meshCommand->setSkipBatching(true); _meshCommand->setTransparent(true); _glProgramState->setUniformVec4("u_color", Vec4(1,1,1,1)); renderer->addCommand(_meshCommand); @@ -267,7 +277,6 @@ PUParticle3DQuadRender::PUParticle3DQuadRender() PUParticle3DQuadRender::~PUParticle3DQuadRender() { - } void PUParticle3DQuadRender::getOriginOffset( int &offsetX, int &offsetY ) @@ -396,16 +405,15 @@ void PUParticle3DQuadRender::setType( Type type ) { _type = type; if (_type == PERPENDICULAR_COMMON || _type == PERPENDICULAR_SELF){ - _meshCommand->setCullFaceEnabled(false); + _stateBlock->setCullFace(false); }else{ - _meshCommand->setCullFaceEnabled(true); + _stateBlock->setCullFace(true); } } -void PUParticle3DQuadRender::copyAttributesTo( PURender *render ) +void PUParticle3DQuadRender::copyAttributesTo(PUParticle3DQuadRender *quadRender) { - PURender::copyAttributesTo(render); - PUParticle3DQuadRender *quadRender = static_cast(render); + PURender::copyAttributesTo(quadRender); quadRender->_type = _type; quadRender->_origin = _origin; quadRender->_rotateType = _rotateType; @@ -499,7 +507,7 @@ PUParticle3DModelRender::~PUParticle3DModelRender() } } -void PUParticle3DModelRender::copyAttributesTo( PURender *render ) +void PUParticle3DModelRender::copyAttributesTo(PUParticle3DModelRender *render) { PURender::copyAttributesTo(render); } @@ -519,12 +527,20 @@ PUParticle3DEntityRender::PUParticle3DEntityRender() , _indexBuffer(nullptr) , _vertexBuffer(nullptr) { + _stateBlock = RenderState::StateBlock::create(); + CC_SAFE_RETAIN(_stateBlock); + _stateBlock->setCullFace(false); + _stateBlock->setCullFaceSide(RenderState::CULL_FACE_SIDE_BACK); + _stateBlock->setDepthTest(false); + _stateBlock->setDepthWrite(false); + _stateBlock->setBlend(true); } PUParticle3DEntityRender::~PUParticle3DEntityRender() { CC_SAFE_DELETE(_meshCommand); + CC_SAFE_RELEASE(_stateBlock); //CC_SAFE_RELEASE(_texture); CC_SAFE_RELEASE(_glProgramState); CC_SAFE_RELEASE(_vertexBuffer); @@ -556,27 +572,17 @@ bool PUParticle3DEntityRender::initRender( const std::string &texFile ) _glProgramState = glProgramState; _meshCommand = new (std::nothrow) MeshCommand(); + _meshCommand->setSkipBatching(true); _meshCommand->setTransparent(true); - _meshCommand->setDepthTestEnabled(_depthTest); - _meshCommand->setDepthWriteEnabled(_depthWrite); - _meshCommand->setCullFace(GL_BACK); - _meshCommand->setCullFaceEnabled(true); + + _stateBlock->setDepthTest(_depthTest); + _stateBlock->setDepthWrite(_depthWrite); + _stateBlock->setCullFaceSide(RenderState::CULL_FACE_SIDE_BACK); + _stateBlock->setCullFace(true); return true; } -void PUParticle3DEntityRender::setDepthTest( bool isDepthTest ) -{ - Particle3DRender::setDepthTest(isDepthTest); - _meshCommand->setDepthTestEnabled(_depthTest); -} - -void PUParticle3DEntityRender::setDepthWrite( bool isDepthWrite ) -{ - Particle3DRender::setDepthWrite(isDepthWrite); - _meshCommand->setDepthWriteEnabled(_depthWrite); -} - -void PUParticle3DEntityRender::copyAttributesTo( PURender *render ) +void PUParticle3DEntityRender::copyAttributesTo(PUParticle3DEntityRender *render) { PURender::copyAttributesTo(render); } @@ -691,8 +697,21 @@ void PUParticle3DBoxRender::render( Renderer* renderer, const Mat4 &transform, P _indexBuffer->updateIndices(&_indices[0], index/* * sizeof(unsigned short)*/, 0); GLuint texId = (_texture ? _texture->getName() : 0); - _meshCommand->init(0, texId, _glProgramState, particleSystem->getBlendFunc(), _vertexBuffer->getVBO(), _indexBuffer->getVBO(), GL_TRIANGLES, GL_UNSIGNED_SHORT, index, transform, Node::FLAGS_RENDER_AS_3D); + _stateBlock->setBlendFunc(_particleSystem->getBlendFunc()); + _meshCommand->init(0, + texId, + _glProgramState, + _stateBlock, + _vertexBuffer->getVBO(), + _indexBuffer->getVBO(), + GL_TRIANGLES, + GL_UNSIGNED_SHORT, + index, + transform, + Node::FLAGS_RENDER_AS_3D); + _meshCommand->setSkipBatching(true); _meshCommand->setTransparent(true); + _glProgramState->setUniformVec4("u_color", Vec4(1,1,1,1)); renderer->addCommand(_meshCommand); } @@ -842,9 +861,24 @@ void PUSphereRender::render( Renderer* renderer, const Mat4 &transform, Particle _indexBuffer->updateIndices(&_indices[0], index/* * sizeof(unsigned short)*/, 0); GLuint texId = (_texture ? _texture->getName() : 0); - _meshCommand->init(0, texId, _glProgramState, particleSystem->getBlendFunc(), _vertexBuffer->getVBO(), _indexBuffer->getVBO(), GL_TRIANGLES, GL_UNSIGNED_SHORT, index, transform, Node::FLAGS_RENDER_AS_3D); + + _stateBlock->setBlendFunc(particleSystem->getBlendFunc()); + _meshCommand->init( + 0, + texId, + _glProgramState, + _stateBlock, + _vertexBuffer->getVBO(), + _indexBuffer->getVBO(), + GL_TRIANGLES, + GL_UNSIGNED_SHORT, + index, + transform, + Node::FLAGS_RENDER_AS_3D); + _meshCommand->setSkipBatching(true); _meshCommand->setTransparent(true); - _glProgramState->setUniformVec4("u_color", Vec4(1,1,1,1)); + + _glProgramState->setUniformVec4("u_color", Vec4(1,1,1,1)); renderer->addCommand(_meshCommand); } } @@ -908,10 +942,9 @@ PUSphereRender::~PUSphereRender() } -void PUSphereRender::copyAttributesTo( PURender *render ) +void PUSphereRender::copyAttributesTo(PUSphereRender *sphereRender) { - PURender::copyAttributesTo(render); - PUSphereRender *sphereRender = static_cast(render); + PURender::copyAttributesTo(sphereRender); sphereRender->_numberOfRings = _numberOfRings; sphereRender->_numberOfSegments = _numberOfSegments; } diff --git a/extensions/Particle3D/PU/CCPURender.h b/extensions/Particle3D/PU/CCPURender.h index 7760d46cb0..f4600459d3 100644 --- a/extensions/Particle3D/PU/CCPURender.h +++ b/extensions/Particle3D/PU/CCPURender.h @@ -26,10 +26,12 @@ #ifndef __CC_PU_PARTICLE_3D_RENDER_H__ #define __CC_PU_PARTICLE_3D_RENDER_H__ +#include + #include "base/CCRef.h" #include "math/CCMath.h" #include "extensions/Particle3D/CCParticle3DRender.h" -#include +#include "renderer/CCRenderState.h" NS_CC_BEGIN @@ -48,7 +50,7 @@ public: void setRenderType(const std::string& observerType) {_renderType = observerType;}; virtual PURender* clone() = 0; - virtual void copyAttributesTo (PURender *render); + void copyAttributesTo(PURender* render); public: @@ -62,11 +64,7 @@ protected: class CC_DLL PUParticle3DEntityRender : public PURender { public: - - virtual void setDepthTest(bool isDepthTest) override; - virtual void setDepthWrite(bool isDepthWrite) override; - - virtual void copyAttributesTo (PURender *render) override; + void copyAttributesTo(PUParticle3DEntityRender *render); CC_CONSTRUCTOR_ACCESS: PUParticle3DEntityRender(); @@ -85,6 +83,7 @@ protected: Vec4 color; }; MeshCommand* _meshCommand; + RenderState::StateBlock* _stateBlock; Texture2D* _texture; GLProgramState* _glProgramState; IndexBuffer* _indexBuffer; //index buffer @@ -151,7 +150,7 @@ public: virtual void render(Renderer* renderer, const Mat4 &transform, ParticleSystem3D* particleSystem) override; virtual PUParticle3DQuadRender* clone() override; - virtual void copyAttributesTo (PURender *render) override; + void copyAttributesTo(PUParticle3DQuadRender *render); CC_CONSTRUCTOR_ACCESS: PUParticle3DQuadRender(); @@ -187,7 +186,7 @@ public: virtual void render(Renderer* renderer, const Mat4 &transform, ParticleSystem3D* particleSystem) override; virtual PUParticle3DModelRender* clone() override; - virtual void copyAttributesTo (PURender *render) override; + void copyAttributesTo(PUParticle3DModelRender *render); CC_CONSTRUCTOR_ACCESS: PUParticle3DModelRender(); @@ -229,7 +228,7 @@ public: virtual void render(Renderer* renderer, const Mat4 &transform, ParticleSystem3D* particleSystem) override; virtual PUSphereRender* clone() override; - virtual void copyAttributesTo (PURender *render) override; + void copyAttributesTo(PUSphereRender *render); CC_CONSTRUCTOR_ACCESS: PUSphereRender(); diff --git a/extensions/Particle3D/PU/CCPURendererTranslator.cpp b/extensions/Particle3D/PU/CCPURendererTranslator.cpp index 68c85a20ce..1d71a72d16 100644 --- a/extensions/Particle3D/PU/CCPURendererTranslator.cpp +++ b/extensions/Particle3D/PU/CCPURendererTranslator.cpp @@ -602,6 +602,7 @@ void PURendererTranslator::translate(PUScriptCompiler* compiler, PUAbstractNode if (material){ _renderer->setDepthTest(material->depthTest); _renderer->setDepthWrite(material->depthWrite); + _renderer->setBlendFunc(material->blendFunc); static_cast(_renderer)->setRenderType(type); } system->setRender(_renderer); diff --git a/extensions/Particle3D/PU/CCPURibbonTrail.h b/extensions/Particle3D/PU/CCPURibbonTrail.h index dc01ebb4ab..00ccf78781 100644 --- a/extensions/Particle3D/PU/CCPURibbonTrail.h +++ b/extensions/Particle3D/PU/CCPURibbonTrail.h @@ -77,7 +77,7 @@ public: /** @copydoc BillboardChain::setMaxChainElements */ void setMaxChainElements(size_t maxElements); /** @copydoc BillboardChain::setNumberOfChains */ - void setNumberOfChains(size_t numChains); + virtual void setNumberOfChains(size_t numChains) override; /** @copydoc BillboardChain::clearChain */ void clearChain(size_t chainIndex); diff --git a/extensions/Particle3D/PU/CCPURibbonTrailRender.cpp b/extensions/Particle3D/PU/CCPURibbonTrailRender.cpp index ac7b8b4b8b..5f0a436387 100644 --- a/extensions/Particle3D/PU/CCPURibbonTrailRender.cpp +++ b/extensions/Particle3D/PU/CCPURibbonTrailRender.cpp @@ -369,10 +369,9 @@ PURibbonTrailRender* PURibbonTrailRender::clone() return tr; } -void PURibbonTrailRender::copyAttributesTo( PURender *render ) +void PURibbonTrailRender::copyAttributesTo(PURibbonTrailRender *trailRender) { - PURender::copyAttributesTo(render); - PURibbonTrailRender *trailRender = static_cast(render); + PURender::copyAttributesTo(trailRender); trailRender->setUseVertexColors(_useVertexColours); trailRender->setMaxChainElements(_maxChainElements); trailRender->setTrailLength(_trailLength); diff --git a/extensions/Particle3D/PU/CCPURibbonTrailRender.h b/extensions/Particle3D/PU/CCPURibbonTrailRender.h index 9481043640..ea54912143 100644 --- a/extensions/Particle3D/PU/CCPURibbonTrailRender.h +++ b/extensions/Particle3D/PU/CCPURibbonTrailRender.h @@ -126,7 +126,7 @@ public: void destroyAll(void); virtual PURibbonTrailRender* clone() override; - virtual void copyAttributesTo (PURender *render) override; + void copyAttributesTo(PURibbonTrailRender *render); CC_CONSTRUCTOR_ACCESS: PURibbonTrailRender(); diff --git a/extensions/Particle3D/PU/CCPUTranslateManager.h b/extensions/Particle3D/PU/CCPUTranslateManager.h index 70d737294c..f53b942a53 100644 --- a/extensions/Particle3D/PU/CCPUTranslateManager.h +++ b/extensions/Particle3D/PU/CCPUTranslateManager.h @@ -77,7 +77,7 @@ public: CC_CONSTRUCTOR_ACCESS: PUTranslateManager(); - ~PUTranslateManager(); + virtual ~PUTranslateManager(); }; NS_CC_END diff --git a/extensions/assets-manager/AssetsManager.h b/extensions/assets-manager/AssetsManager.h index 8cb4e48017..ce21d884e1 100644 --- a/extensions/assets-manager/AssetsManager.h +++ b/extensions/assets-manager/AssetsManager.h @@ -33,6 +33,8 @@ #include "extensions/ExtensionMacros.h" #include "extensions/ExtensionExport.h" +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) + NS_CC_EXT_BEGIN class AssetsManagerDelegateProtocol; @@ -237,4 +239,5 @@ CC_DEPRECATED_ATTRIBUTE typedef AssetsManagerDelegateProtocol CCAssetsManagerDel NS_CC_EXT_END; +#endif /* #if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) */ #endif /* defined(__AssetsManager__) */ diff --git a/extensions/assets-manager/Downloader.cpp b/extensions/assets-manager/Downloader.cpp index 092e18c486..afa483440d 100644 --- a/extensions/assets-manager/Downloader.cpp +++ b/extensions/assets-manager/Downloader.cpp @@ -273,13 +273,6 @@ void Downloader::prepareDownload(const std::string &srcUrl, const std::string &s } } -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -Downloader::HeaderInfo Downloader::prepare(const std::string &srcUrl) -{ - return prepareHeader(srcUrl); -} -#endif - Downloader::HeaderInfo Downloader::prepareHeader(const std::string &srcUrl, void* header/* = nullptr */) { bool headerGiven = true; @@ -340,11 +333,7 @@ Downloader::HeaderInfo Downloader::getHeader(const std::string &srcUrl) void Downloader::getHeaderAsync(const std::string &srcUrl, const HeaderCallback &callback) { setHeaderCallback(callback); -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - auto t = std::thread(&Downloader::prepare, this, srcUrl); -#else auto t = std::thread(&Downloader::prepareHeader, this, srcUrl, nullptr); -#endif t.detach(); } diff --git a/extensions/assets-manager/Downloader.h b/extensions/assets-manager/Downloader.h index 88e91c7faa..2cf9fee8e0 100644 --- a/extensions/assets-manager/Downloader.h +++ b/extensions/assets-manager/Downloader.h @@ -172,9 +172,6 @@ protected: void prepareDownload(const std::string &srcUrl, const std::string &storagePath, const std::string &customId, bool resumeDownload, FileDescriptor *fDesc, ProgressData *pData); -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - HeaderInfo prepare(const std::string &srcUrl); -#endif HeaderInfo prepareHeader(const std::string &srcUrl, void* header = nullptr); void downloadToBuffer(const std::string &srcUrl, const std::string &customId, const StreamData &buffer, const ProgressData &data); diff --git a/extensions/assets-manager/Manifest.cpp b/extensions/assets-manager/Manifest.cpp index c5224be997..5d8dfa53a6 100644 --- a/extensions/assets-manager/Manifest.cpp +++ b/extensions/assets-manager/Manifest.cpp @@ -86,7 +86,7 @@ void Manifest::loadJson(const std::string& url) if (offset > 0) offset--; std::string errorSnippet = content.substr(offset, 10); - CCLOG("File parse error %s at <%s>\n", _json.GetParseError(), errorSnippet.c_str()); + CCLOG("File parse error %d at <%s>\n", _json.GetParseError(), errorSnippet.c_str()); } } } @@ -324,15 +324,14 @@ void Manifest::setAssetDownloadState(const std::string &key, const Manifest::Dow rapidjson::Value &assets = _json[KEY_ASSETS]; if (assets.IsObject()) { - for (rapidjson::Value::MemberIterator itr = assets.MemberonBegin(); itr != assets.MemberonEnd(); ++itr) + for (rapidjson::Value::MemberIterator itr = assets.MemberBegin(); itr != assets.MemberEnd(); ++itr) { std::string jkey = itr->name.GetString(); if (jkey == key) { rapidjson::Value &entry = itr->value; - rapidjson::Value &value = entry[KEY_DOWNLOAD_STATE]; - if (value.IsInt()) + if (entry.HasMember(KEY_DOWNLOAD_STATE) && entry[KEY_DOWNLOAD_STATE].IsInt()) { - value.SetInt((int)state); + entry[KEY_DOWNLOAD_STATE].SetInt((int) state); } else { @@ -426,7 +425,7 @@ void Manifest::loadVersion(const rapidjson::Document &json) const rapidjson::Value& groupVers = json[KEY_GROUP_VERSIONS]; if (groupVers.IsObject()) { - for (rapidjson::Value::ConstMemberIterator itr = groupVers.MemberonBegin(); itr != groupVers.MemberonEnd(); ++itr) + for (rapidjson::Value::ConstMemberIterator itr = groupVers.MemberBegin(); itr != groupVers.MemberEnd(); ++itr) { std::string group = itr->name.GetString(); std::string version = "0"; @@ -470,7 +469,7 @@ void Manifest::loadManifest(const rapidjson::Document &json) const rapidjson::Value& assets = json[KEY_ASSETS]; if (assets.IsObject()) { - for (rapidjson::Value::ConstMemberIterator itr = assets.MemberonBegin(); itr != assets.MemberonEnd(); ++itr) + for (rapidjson::Value::ConstMemberIterator itr = assets.MemberBegin(); itr != assets.MemberEnd(); ++itr) { std::string key = itr->name.GetString(); Asset asset = parseAsset(key, itr->value); @@ -508,4 +507,4 @@ void Manifest::saveToFile(const std::string &filepath) output << buffer.GetString() << std::endl; } -NS_CC_EXT_END \ No newline at end of file +NS_CC_EXT_END diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index c0f83798d8..283eede1fb 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -12,11 +12,15 @@ #include "physics-nodes/CCPhysicsDebugNode.h" #include "physics-nodes/CCPhysicsSprite.h" +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) +// Window 10 UWP does not yet support CURL #include "assets-manager/AssetsManager.h" #include "assets-manager/AssetsManagerEx.h" #include "assets-manager/CCEventAssetsManagerEx.h" #include "assets-manager/CCEventListenerAssetsManagerEx.h" #include "assets-manager/Manifest.h" +#endif + #include "ExtensionDeprecated.h" // Particle System, include Particle Universe Particle System diff --git a/external/config.json b/external/config.json index 8ca703e5d2..ab0658cafd 100644 --- a/external/config.json +++ b/external/config.json @@ -1,9 +1,10 @@ { - "version":"v3-deps-52", + "version":"v3-deps-56", "zip_file_size":"116842586", "repo_name":"cocos2d-x-3rd-party-libs-bin", "repo_parent":"https://github.com/cocos2d/", "move_dirs":{ - "fbx-conv":"tools" + "fbx-conv":"tools", + "framework-compile":"tools" } } diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 83f80bef33..40dcefaf52 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -6,9 +6,10 @@ "README.cmake", "README.md", "build/android-build.py", - "build/cocos2d-js-win32.vc2013.sln", + "build/cocos2d-js-win32.sln", "build/cocos2d-js-win8.1-universal.sln", - "build/cocos2d-win32.vc2013.sln", + "build/cocos2d-win10.sln", + "build/cocos2d-win32.sln", "build/cocos2d-win8.1-universal.sln", "build/cocos2d_js_tests.xcodeproj/project.pbxproj", "build/cocos2d_libs.xcodeproj/project.pbxproj", @@ -199,12 +200,14 @@ "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj.filters", "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj", "cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj.filters", + "cocos/2d/libcocos2d_win10/libcocos2d.vcxproj", + "cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters", + "cocos/2d/win10_props/cocos2d_win10.props", + "cocos/2d/win10_props/cocos2d_win10_app.props", + "cocos/2d/win10_props/cocos2d_win10_platform.props", "cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1.props", "cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_app.props", "cocos/2d/winrt_8.1_props/cocos2d_winrt_8.1_platform.props", - "cocos/2d/winrt_props/cocos2d_winrt.props", - "cocos/2d/winrt_props/cocos2d_winrt_app.props", - "cocos/2d/winrt_props/cocos2d_winrt_platform.props", "cocos/2d/wp_8.1_props/cocos2d_wp_8.1_platform.props", "cocos/3d/Android.mk", "cocos/3d/CCAABB.cpp", @@ -315,6 +318,12 @@ "cocos/audio/win32/SimpleAudioEngine.cpp", "cocos/audio/winrt/Audio.cpp", "cocos/audio/winrt/Audio.h", + "cocos/audio/winrt/AudioCachePlayer.cpp", + "cocos/audio/winrt/AudioCachePlayer.h", + "cocos/audio/winrt/AudioEngine-winrt.cpp", + "cocos/audio/winrt/AudioEngine-winrt.h", + "cocos/audio/winrt/AudioSourceReader.cpp", + "cocos/audio/winrt/AudioSourceReader.h", "cocos/audio/winrt/MediaStreamer.cpp", "cocos/audio/winrt/MediaStreamer.h", "cocos/audio/winrt/SimpleAudioEngine.cpp", @@ -378,6 +387,8 @@ "cocos/base/CCMap.h", "cocos/base/CCNS.cpp", "cocos/base/CCNS.h", + "cocos/base/CCNinePatchImageParser.cpp", + "cocos/base/CCNinePatchImageParser.h", "cocos/base/CCProfiling.cpp", "cocos/base/CCProfiling.h", "cocos/base/CCProperties.cpp", @@ -394,6 +405,7 @@ "cocos/base/CCTouch.h", "cocos/base/CCUserDefault-android.cpp", "cocos/base/CCUserDefault-apple.mm", + "cocos/base/CCUserDefault-winrt.cpp", "cocos/base/CCUserDefault.cpp", "cocos/base/CCUserDefault.h", "cocos/base/CCValue.cpp", @@ -730,6 +742,7 @@ "cocos/editor-support/spine/SlotData.h", "cocos/editor-support/spine/extension.c", "cocos/editor-support/spine/extension.h", + "cocos/editor-support/spine/proj.win10/libSpine.vcxproj", "cocos/editor-support/spine/proj.win32/libSpine.vcxproj", "cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters", "cocos/editor-support/spine/proj.win8.1-universal/libSpine.Shared/libSpine.Shared.vcxitems", @@ -779,8 +792,11 @@ "cocos/network/HttpAsynConnection.m", "cocos/network/HttpClient-android.cpp", "cocos/network/HttpClient-apple.mm", + "cocos/network/HttpClient-winrt.cpp", "cocos/network/HttpClient.cpp", "cocos/network/HttpClient.h", + "cocos/network/HttpConnection-winrt.cpp", + "cocos/network/HttpConnection-winrt.h", "cocos/network/HttpCookie.cpp", "cocos/network/HttpCookie.h", "cocos/network/HttpRequest.h", @@ -843,6 +859,8 @@ "cocos/platform/android/CCApplication-android.h", "cocos/platform/android/CCCommon-android.cpp", "cocos/platform/android/CCDevice-android.cpp", + "cocos/platform/android/CCEnhanceAPI-android.cpp", + "cocos/platform/android/CCEnhanceAPI-android.h", "cocos/platform/android/CCFileUtils-android.cpp", "cocos/platform/android/CCFileUtils-android.h", "cocos/platform/android/CCGL-android.h", @@ -877,6 +895,7 @@ "cocos/platform/android/java/proguard-project.txt", "cocos/platform/android/java/project.properties", "cocos/platform/android/java/src/com/chukong/cocosplay/client/CocosPlayClient.java", + "cocos/platform/android/java/src/com/enhance/gameservice/IGameTuningService.aidl", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxAccelerometer.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxBitmap.java", @@ -919,7 +938,6 @@ "cocos/platform/android/jni/TouchesJni.cpp", "cocos/platform/android/libcocos2dx-with-controller/AndroidManifest.xml", "cocos/platform/android/libcocos2dx-with-controller/build.gradle", - "cocos/platform/android/libcocos2dx-with-controller/libcocos2dx_with_controller.iml", "cocos/platform/android/libcocos2dx-with-controller/proguard-rules.pro", "cocos/platform/android/libcocos2dx/AndroidManifest.xml", "cocos/platform/android/libcocos2dx/build.gradle", @@ -1013,9 +1031,6 @@ "cocos/platform/winrt/CCStdC.h", "cocos/platform/winrt/CCWinRTUtils.cpp", "cocos/platform/winrt/CCWinRTUtils.h", - "cocos/platform/winrt/DirectXBase.cpp", - "cocos/platform/winrt/DirectXBase.h", - "cocos/platform/winrt/DirectXHelper.h", "cocos/platform/winrt/InputEvent.cpp", "cocos/platform/winrt/InputEvent.h", "cocos/platform/winrt/InputEventTypes.h", @@ -2162,6 +2177,12 @@ "external/bullet/btBulletDynamicsCommon.h", "external/bullet/proj.win32/libbullet.vcxproj", "external/bullet/proj.win32/libbullet.vcxproj.filters", + "external/bullet/proj.win8.1-universal/libbullet.Shared/libbullet.Shared.vcxitems", + "external/bullet/proj.win8.1-universal/libbullet.Shared/libbullet.Shared.vcxitems.filters", + "external/bullet/proj.win8.1-universal/libbullet.Windows/libbullet.Windows.vcxproj", + "external/bullet/proj.win8.1-universal/libbullet.Windows/libbullet.Windows.vcxproj.filters", + "external/bullet/proj.win8.1-universal/libbullet.WindowsPhone/libbullet.WindowsPhone.vcxproj", + "external/bullet/proj.win8.1-universal/libbullet.WindowsPhone/libbullet.WindowsPhone.vcxproj.filters", "external/bullet/vectormath/neon/boolInVec.h", "external/bullet/vectormath/neon/floatInVec.h", "external/bullet/vectormath/neon/mat_aos.h", @@ -2215,7 +2236,9 @@ "external/chipmunk/prebuilt/linux/32-bit/libchipmunk.a", "external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a", "external/chipmunk/prebuilt/mac/libchipmunk.a", + "external/chipmunk/prebuilt/win32/debug-lib/libchipmunk-2015.lib", "external/chipmunk/prebuilt/win32/debug-lib/libchipmunk.lib", + "external/chipmunk/prebuilt/win32/release-lib/libchipmunk-2015.lib", "external/chipmunk/prebuilt/win32/release-lib/libchipmunk.lib", "external/chipmunk/prebuilt/winrt_8.1/arm/chipmunk.lib", "external/chipmunk/prebuilt/winrt_8.1/win32/chipmunk.lib", @@ -2744,6 +2767,7 @@ "external/glfw3/include/win32/glfw3.h", "external/glfw3/include/win32/glfw3native.h", "external/glfw3/prebuilt/mac/libglfw3.a", + "external/glfw3/prebuilt/win32/glfw3-2015.lib", "external/glfw3/prebuilt/win32/glfw3.lib", "external/jpeg/CMakeLists.txt", "external/jpeg/include/android/jconfig.h", @@ -2771,12 +2795,31 @@ "external/jpeg/prebuilt/linux/32-bit/libjpeg.a", "external/jpeg/prebuilt/linux/64-bit/libjpeg.a", "external/jpeg/prebuilt/mac/libjpeg.a", + "external/jpeg/prebuilt/win32/libjpeg-2015.lib", "external/jpeg/prebuilt/win32/libjpeg.lib", + "external/json/allocators.h", "external/json/document.h", + "external/json/encodedstream.h", + "external/json/encodings.h", + "external/json/error/en.h", + "external/json/error/error.h", + "external/json/filereadstream.h", "external/json/filestream.h", + "external/json/filewritestream.h", + "external/json/internal/biginteger.h", + "external/json/internal/diyfp.h", + "external/json/internal/dtoa.h", + "external/json/internal/ieee754.h", + "external/json/internal/itoa.h", + "external/json/internal/meta.h", "external/json/internal/pow10.h", "external/json/internal/stack.h", "external/json/internal/strfunc.h", + "external/json/internal/strtod.h", + "external/json/memorybuffer.h", + "external/json/memorystream.h", + "external/json/msinttypes/inttypes.h", + "external/json/msinttypes/stdint.h", "external/json/prettywriter.h", "external/json/rapidjson.h", "external/json/reader.h", @@ -2824,6 +2867,7 @@ "external/png/prebuilt/android/x86/libpng.a", "external/png/prebuilt/ios/libpng.a", "external/png/prebuilt/mac/libpng.a", + "external/png/prebuilt/win32/libpng-2015.lib", "external/png/prebuilt/win32/libpng.lib", "external/poly2tri/common/shapes.cc", "external/poly2tri/common/shapes.h", @@ -2837,6 +2881,64 @@ "external/poly2tri/sweep/sweep.h", "external/poly2tri/sweep/sweep_context.cc", "external/poly2tri/sweep/sweep_context.h", + "external/recast/Android.mk", + "external/recast/CMakeLists.txt", + "external/recast/DebugUtils/DebugDraw.cpp", + "external/recast/DebugUtils/DebugDraw.h", + "external/recast/DebugUtils/DetourDebugDraw.cpp", + "external/recast/DebugUtils/DetourDebugDraw.h", + "external/recast/DebugUtils/RecastDebugDraw.cpp", + "external/recast/DebugUtils/RecastDebugDraw.h", + "external/recast/DebugUtils/RecastDump.cpp", + "external/recast/DebugUtils/RecastDump.h", + "external/recast/Detour/DetourAlloc.cpp", + "external/recast/Detour/DetourAlloc.h", + "external/recast/Detour/DetourAssert.h", + "external/recast/Detour/DetourCommon.cpp", + "external/recast/Detour/DetourCommon.h", + "external/recast/Detour/DetourMath.h", + "external/recast/Detour/DetourNavMesh.cpp", + "external/recast/Detour/DetourNavMesh.h", + "external/recast/Detour/DetourNavMeshBuilder.cpp", + "external/recast/Detour/DetourNavMeshBuilder.h", + "external/recast/Detour/DetourNavMeshQuery.cpp", + "external/recast/Detour/DetourNavMeshQuery.h", + "external/recast/Detour/DetourNode.cpp", + "external/recast/Detour/DetourNode.h", + "external/recast/Detour/DetourStatus.h", + "external/recast/DetourCrowd/DetourCrowd.cpp", + "external/recast/DetourCrowd/DetourCrowd.h", + "external/recast/DetourCrowd/DetourLocalBoundary.cpp", + "external/recast/DetourCrowd/DetourLocalBoundary.h", + "external/recast/DetourCrowd/DetourObstacleAvoidance.cpp", + "external/recast/DetourCrowd/DetourObstacleAvoidance.h", + "external/recast/DetourCrowd/DetourPathCorridor.cpp", + "external/recast/DetourCrowd/DetourPathCorridor.h", + "external/recast/DetourCrowd/DetourPathQueue.cpp", + "external/recast/DetourCrowd/DetourPathQueue.h", + "external/recast/DetourCrowd/DetourProximityGrid.cpp", + "external/recast/DetourCrowd/DetourProximityGrid.h", + "external/recast/DetourTileCache/DetourTileCache.cpp", + "external/recast/DetourTileCache/DetourTileCache.h", + "external/recast/DetourTileCache/DetourTileCacheBuilder.cpp", + "external/recast/DetourTileCache/DetourTileCacheBuilder.h", + "external/recast/Recast/Recast.cpp", + "external/recast/Recast/Recast.h", + "external/recast/Recast/RecastAlloc.cpp", + "external/recast/Recast/RecastAlloc.h", + "external/recast/Recast/RecastArea.cpp", + "external/recast/Recast/RecastAssert.h", + "external/recast/Recast/RecastContour.cpp", + "external/recast/Recast/RecastFilter.cpp", + "external/recast/Recast/RecastLayers.cpp", + "external/recast/Recast/RecastMesh.cpp", + "external/recast/Recast/RecastMeshDetail.cpp", + "external/recast/Recast/RecastRasterization.cpp", + "external/recast/Recast/RecastRegion.cpp", + "external/recast/fastlz/fastlz.c", + "external/recast/fastlz/fastlz.h", + "external/recast/proj.win32/librecast.vcxproj", + "external/recast/proj.win32/librecast.vcxproj.filters", "external/sqlite3/Android.mk", "external/sqlite3/include/sqlite3.h", "external/sqlite3/include/sqlite3ext.h", @@ -2879,6 +2981,7 @@ "external/tiff/prebuilt/linux/32-bit/libtiff.a", "external/tiff/prebuilt/linux/64-bit/libtiff.a", "external/tiff/prebuilt/mac/libtiff.a", + "external/tiff/prebuilt/win32/libtiff-2015.lib", "external/tiff/prebuilt/win32/libtiff.dll", "external/tiff/prebuilt/win32/libtiff.lib", "external/tinyxml2/CMakeLists.txt", @@ -4926,6 +5029,99 @@ "tools/fbx-conv/README.md", "tools/fbx-conv/mac/fbx-conv", "tools/fbx-conv/mac/libfbxsdk.dylib", + "tools/framework-compile/bin-templates/cpp-template-default/Classes/AppDelegate.cpp", + "tools/framework-compile/bin-templates/cpp-template-default/Classes/HelloWorldScene.cpp", + "tools/framework-compile/bin-templates/cpp-template-default/Classes/HelloWorldScene.h", + "tools/framework-compile/bin-templates/cpp-template-default/cocos-project-template.json", + "tools/framework-compile/bin-templates/cpp-template-default/proj.android/jni/Android.mk", + "tools/framework-compile/bin-templates/cpp-template-default/proj.android/project.properties", + "tools/framework-compile/bin-templates/cpp-template-default/proj.win32/HelloCpp.sln", + "tools/framework-compile/bin-templates/cpp-template-default/proj.win32/main.cpp", + "tools/framework-compile/bin-templates/cpp-template-default/res-landscape/HelloCpp.ccs", + "tools/framework-compile/bin-templates/cpp-template-default/res-landscape/HelloCpp.cfg", + "tools/framework-compile/bin-templates/cpp-template-default/res-landscape/HelloCpp.udf", + "tools/framework-compile/bin-templates/cpp-template-default/res-landscape/Resources/res/HelloWorld.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-landscape/Resources/res/MainScene.csb", + "tools/framework-compile/bin-templates/cpp-template-default/res-landscape/cocosstudio/HelloWorld.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-landscape/cocosstudio/MainScene.csd", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/HelloCpp.ccs", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/HelloCpp.cfg", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/HelloCpp.udf", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/Resources/res/HelloWorld.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/Resources/res/MainScene.csb", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/cocosstudio/HelloWorld.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/cocosstudio/MainScene.csd", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/proj.ios_mac/ios/Default-568h@2x.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/proj.ios_mac/ios/Default-667h@2x.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/proj.ios_mac/ios/Default-736h@3x.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/proj.ios_mac/ios/Default.png", + "tools/framework-compile/bin-templates/cpp-template-default/res-portrait/proj.ios_mac/ios/Default@2x.png", + "tools/framework-compile/bin-templates/js-template-runtime/.project", + "tools/framework-compile/bin-templates/js-template-runtime/cocos-project-template.json", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.android/project.properties", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.sln", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/build-cfg.json", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/main.cpp", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/stdafx.cpp", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/stdafx.h", + "tools/framework-compile/bin-templates/js-template-runtime/frameworks/runtime-src/proj.win32/targetver.h", + "tools/framework-compile/bin-templates/js-template-runtime/index.html", + "tools/framework-compile/bin-templates/js-template-runtime/main.js", + "tools/framework-compile/bin-templates/js-template-runtime/project.json", + "tools/framework-compile/bin-templates/js-template-runtime/res-landscape/HelloJavascript.ccs", + "tools/framework-compile/bin-templates/js-template-runtime/res-landscape/HelloJavascript.cfg", + "tools/framework-compile/bin-templates/js-template-runtime/res-landscape/HelloJavascript.udf", + "tools/framework-compile/bin-templates/js-template-runtime/res-landscape/cocosstudio/HelloWorld.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-landscape/cocosstudio/MainScene.csd", + "tools/framework-compile/bin-templates/js-template-runtime/res-landscape/res/HelloWorld.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-landscape/res/MainScene.json", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/HelloJavascript.ccs", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/HelloJavascript.cfg", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/HelloJavascript.udf", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/cocosstudio/HelloWorld.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/cocosstudio/MainScene.csd", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/res/HelloWorld.png", + "tools/framework-compile/bin-templates/js-template-runtime/res-portrait/res/MainScene.json", + "tools/framework-compile/bin-templates/js-template-runtime/src/app.js", + "tools/framework-compile/bin-templates/js-template-runtime/src/resource.js", + "tools/framework-compile/bin-templates/lua-template-runtime/cocos-project-template.json", + "tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk", + "tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.android/project.properties", + "tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.sln", + "tools/framework-compile/bin-templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp", + "tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/HelloLua.ccs", + "tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/HelloLua.cfg", + "tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/HelloLua.udf", + "tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/cocosstudio/HelloWorld.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/cocosstudio/MainScene.csd", + "tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/res/HelloWorld.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-landscape/res/MainScene.csb", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/HelloLua.ccs", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/HelloLua.cfg", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/HelloLua.udf", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/cocosstudio/HelloWorld.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/cocosstudio/MainScene.csd", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default-667h@2x.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default-736h@3x.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/res/HelloWorld.png", + "tools/framework-compile/bin-templates/lua-template-runtime/res-portrait/res/MainScene.csb", + "tools/framework-compile/bin-templates/lua-template-runtime/src/app/MyApp.lua", + "tools/framework-compile/bin-templates/lua-template-runtime/src/app/views/MainScene.lua", + "tools/framework-compile/bin-templates/lua-template-runtime/src/config.lua", + "tools/framework-compile/x-modified/cocos/audio/android/prebuilt-mk/Android.mk", + "tools/framework-compile/x-modified/cocos/prebuilt-mk/Android.mk", + "tools/framework-compile/x-modified/cocos/scripting/js-bindings/proj.android/prebuilt-mk/Android.mk", + "tools/framework-compile/x-modified/cocos/scripting/lua-bindings/proj.android/prebuilt-mk/Android.mk", "tools/gen-prebuilt/README.md", "tools/gen-prebuilt/build_config.json", "tools/gen-prebuilt/excopy.py", @@ -5166,7 +5362,9 @@ "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js", "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_builder_auto_api.js", "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_api.js", + "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_webView_auto_api.js", "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_extension_auto_api.js", + "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js", "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_spine_auto_api.js", "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_studio_auto_api.js", "cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_ui_auto_api.js", @@ -5180,8 +5378,12 @@ "cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.hpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.cpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental.hpp", + "cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp", + "cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp", + "cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp", + "cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp", "cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp", @@ -5213,6 +5415,8 @@ "cocos/scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_manual.h", "cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.cpp", "cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_manual.h", + "cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.cpp", + "cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.h", "cocos/scripting/js-bindings/manual/extension/jsb_cocos2dx_extension_manual.cpp", "cocos/scripting/js-bindings/manual/extension/jsb_cocos2dx_extension_manual.h", "cocos/scripting/js-bindings/manual/js_bindings_config.h", @@ -5242,6 +5446,8 @@ "cocos/scripting/js-bindings/manual/network/jsb_socketio.h", "cocos/scripting/js-bindings/manual/network/jsb_websocket.cpp", "cocos/scripting/js-bindings/manual/network/jsb_websocket.h", + "cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.cpp", + "cocos/scripting/js-bindings/manual/physics3d/jsb_cocos2dx_physics3d_manual.h", "cocos/scripting/js-bindings/manual/platform/android/CCJavascriptJavaBridge.cpp", "cocos/scripting/js-bindings/manual/platform/android/CCJavascriptJavaBridge.h", "cocos/scripting/js-bindings/manual/platform/ios/JavaScriptObjCBridge.h", @@ -5297,6 +5503,7 @@ "cocos/scripting/js-bindings/script/jsb_property_apis.js", "cocos/scripting/js-bindings/script/jsb_property_impls.js", "cocos/scripting/js-bindings/script/jsb_spine.js", + "cocos/scripting/js-bindings/script/physics3d/jsb_physics3d.js", "cocos/scripting/js-bindings/script/physicsSprite/jsb_physicsSprite.js", "cocos/scripting/js-bindings/script/studio/jsb_cocos2d_studio.js", "cocos/scripting/js-bindings/script/studio/jsb_studio_boot.js", @@ -6062,7 +6269,9 @@ "tools/tojs/cocos2dx_3d_ext.ini", "tools/tojs/cocos2dx_builder.ini", "tools/tojs/cocos2dx_experimental.ini", + "tools/tojs/cocos2dx_experimental_webView.ini", "tools/tojs/cocos2dx_extension.ini", + "tools/tojs/cocos2dx_physics3d.ini", "tools/tojs/cocos2dx_spine.ini", "tools/tojs/cocos2dx_studio.ini", "tools/tojs/cocos2dx_ui.ini", @@ -6165,17 +6374,33 @@ "web/cocos2d/core/utils/BinaryLoader.js", "web/cocos2d/effects/CCGrabber.js", "web/cocos2d/effects/CCGrid.js", + "web/cocos2d/kazmath/SIMDPolyfill.js", "web/cocos2d/kazmath/aabb.js", "web/cocos2d/kazmath/gl/mat4stack.js", "web/cocos2d/kazmath/gl/matrix.js", "web/cocos2d/kazmath/mat3.js", "web/cocos2d/kazmath/mat4.js", + "web/cocos2d/kazmath/mat4SIMD.js", "web/cocos2d/kazmath/plane.js", "web/cocos2d/kazmath/quaternion.js", "web/cocos2d/kazmath/ray2.js", + "web/cocos2d/kazmath/simd_benchmark/base.js", + "web/cocos2d/kazmath/simd_benchmark/index.html", + "web/cocos2d/kazmath/simd_benchmark/kernel-template.js", + "web/cocos2d/kazmath/simd_benchmark/kmMat4AreEqual.js", + "web/cocos2d/kazmath/simd_benchmark/kmMat4Assign.js", + "web/cocos2d/kazmath/simd_benchmark/kmMat4Inverse.js", + "web/cocos2d/kazmath/simd_benchmark/kmMat4IsIdentity.js", + "web/cocos2d/kazmath/simd_benchmark/kmMat4LookAt.js", + "web/cocos2d/kazmath/simd_benchmark/kmMat4Multiply.js", + "web/cocos2d/kazmath/simd_benchmark/kmMat4Transpose.js", + "web/cocos2d/kazmath/simd_benchmark/kmVec3TransformCoord.js", + "web/cocos2d/kazmath/simd_benchmark/run.js", + "web/cocos2d/kazmath/simd_benchmark/run_browser.js", "web/cocos2d/kazmath/utility.js", "web/cocos2d/kazmath/vec2.js", "web/cocos2d/kazmath/vec3.js", + "web/cocos2d/kazmath/vec3SIMD.js", "web/cocos2d/kazmath/vec4.js", "web/cocos2d/labels/CCLabelAtlas.js", "web/cocos2d/labels/CCLabelAtlasCanvasRenderCmd.js", @@ -6273,6 +6498,8 @@ "web/extensions/ccui/uiwidgets/UITextAtlas.js", "web/extensions/ccui/uiwidgets/UITextBMFont.js", "web/extensions/ccui/uiwidgets/UITextField.js", + "web/extensions/ccui/uiwidgets/UIVideoPlayer.js", + "web/extensions/ccui/uiwidgets/UIWebView.js", "web/extensions/ccui/uiwidgets/scroll-widget/UIListView.js", "web/extensions/ccui/uiwidgets/scroll-widget/UIPageView.js", "web/extensions/ccui/uiwidgets/scroll-widget/UIScrollView.js", @@ -6465,6 +6692,7 @@ "cocos/scripting/lua-bindings/auto/api/Blink.lua", "cocos/scripting/lua-bindings/auto/api/Bone.lua", "cocos/scripting/lua-bindings/auto/api/BoneData.lua", + "cocos/scripting/lua-bindings/auto/api/Bundle3D.lua", "cocos/scripting/lua-bindings/auto/api/Button.lua", "cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua", "cocos/scripting/lua-bindings/auto/api/CCBReader.lua", @@ -6616,6 +6844,7 @@ "cocos/scripting/lua-bindings/auto/api/ListView.lua", "cocos/scripting/lua-bindings/auto/api/LoadingBar.lua", "cocos/scripting/lua-bindings/auto/api/Manifest.lua", + "cocos/scripting/lua-bindings/auto/api/Material.lua", "cocos/scripting/lua-bindings/auto/api/Menu.lua", "cocos/scripting/lua-bindings/auto/api/MenuItem.lua", "cocos/scripting/lua-bindings/auto/api/MenuItemAtlasFont.lua", @@ -6653,6 +6882,18 @@ "cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua", "cocos/scripting/lua-bindings/auto/api/ParticleSystem3D.lua", "cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua", + "cocos/scripting/lua-bindings/auto/api/Pass.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3D6DofConstraint.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DComponent.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DConeTwistConstraint.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DConstraint.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DHingeConstraint.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DObject.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DPointToPointConstraint.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DRigidBody.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DShape.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DSliderConstraint.lua", + "cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua", "cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua", "cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua", "cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua", @@ -6678,6 +6919,7 @@ "cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua", "cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua", "cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua", + "cocos/scripting/lua-bindings/auto/api/PhysicsSprite3D.lua", "cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua", "cocos/scripting/lua-bindings/auto/api/Place.lua", "cocos/scripting/lua-bindings/auto/api/PointLight.lua", @@ -6685,11 +6927,13 @@ "cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua", "cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua", "cocos/scripting/lua-bindings/auto/api/ProgressTo.lua", + "cocos/scripting/lua-bindings/auto/api/Properties.lua", "cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua", "cocos/scripting/lua-bindings/auto/api/Ref.lua", "cocos/scripting/lua-bindings/auto/api/RelativeBox.lua", "cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua", "cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua", + "cocos/scripting/lua-bindings/auto/api/RenderState.lua", "cocos/scripting/lua-bindings/auto/api/RenderTexture.lua", "cocos/scripting/lua-bindings/auto/api/Repeat.lua", "cocos/scripting/lua-bindings/auto/api/RepeatForever.lua", @@ -6752,6 +6996,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/Technique.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", @@ -6832,6 +7077,7 @@ "cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_experimental_video_auto_api.lua", "cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_experimental_webview_auto_api.lua", "cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua", + "cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics3d_auto_api.lua", "cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics_auto_api.lua", "cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_spine_auto_api.lua", "cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_studio_auto_api.lua", @@ -6858,6 +7104,8 @@ "cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.hpp", "cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp", "cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp", + "cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp", + "cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp", "cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp", "cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp", "cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp", @@ -6920,6 +7168,8 @@ "cocos/scripting/lua-bindings/manual/network/lua_extensions.h", "cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.cpp", "cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.h", + "cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.cpp", + "cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.h", "cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp", "cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h", "cocos/scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp", @@ -6998,6 +7248,7 @@ "cocos/scripting/lua-bindings/script/network/DeprecatedNetworkEnum.lua", "cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua", "cocos/scripting/lua-bindings/script/network/NetworkConstants.lua", + "cocos/scripting/lua-bindings/script/physics3d/physics3d-constants.lua", "cocos/scripting/lua-bindings/script/spine/SpineConstants.lua", "cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua", "cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua", @@ -7075,6 +7326,7 @@ "external/lua/luajit/prebuilt/android/x86/libluajit.a", "external/lua/luajit/prebuilt/ios/libluajit.a", "external/lua/luajit/prebuilt/mac/libluajit.a", + "external/lua/luajit/prebuilt/win32/lua51-2015.lib", "external/lua/luajit/prebuilt/win32/lua51.dll", "external/lua/luajit/prebuilt/win32/lua51.lib", "external/lua/luasocket/auxiliar.c", @@ -7210,6 +7462,7 @@ "tools/tolua/cocos2dx_experimental_webview.ini", "tools/tolua/cocos2dx_extension.ini", "tools/tolua/cocos2dx_physics.ini", + "tools/tolua/cocos2dx_physics3d.ini", "tools/tolua/cocos2dx_spine.ini", "tools/tolua/cocos2dx_studio.ini", "tools/tolua/cocos2dx_ui.ini", diff --git a/templates/cpp-template-default/cocos-project-template.json b/templates/cpp-template-default/cocos-project-template.json index 727f296ed7..a89a2ccac2 100644 --- a/templates/cpp-template-default/cocos-project-template.json +++ b/templates/cpp-template-default/cocos-project-template.json @@ -19,7 +19,11 @@ "proj.win8.1-universal/App.Windows/PROJECT_NAME.Windows.vcxproj", "proj.win8.1-universal/App.Windows/PROJECT_NAME.Windows.vcxproj.filters", "proj.win8.1-universal/App.WindowsPhone/PROJECT_NAME.WindowsPhone.vcxproj", - "proj.win8.1-universal/App.WindowsPhone/PROJECT_NAME.WindowsPhone.vcxproj.filters" + "proj.win8.1-universal/App.WindowsPhone/PROJECT_NAME.WindowsPhone.vcxproj.filters", + "proj.win10/PROJECT_NAME.sln", + "proj.win10/App/PROJECT_NAME.vcxproj", + "proj.win10/App/PROJECT_NAME.vcxproj.filters", + "proj.win10/App/PROJECT_NAME_TemporaryKey.pfx" ] }, "project_replace_project_name":{ @@ -42,16 +46,23 @@ "proj.android/AndroidManifest.xml", "proj.android/build.xml", "proj.android/res/values/strings.xml", + "proj.android-studio/settings.gradle", "proj.ios_mac/ios/main.m", "proj.ios_mac/ios/Prefix.pch", "proj.ios_mac/PROJECT_NAME.xcodeproj/project.pbxproj", + "proj.win10/PROJECT_NAME.sln", + "proj.win10/App/PROJECT_NAME.vcxproj", + "proj.win10/App/PROJECT_NAME.vcxproj.filters", + "proj.win10/App/Package.appxmanifest", "CMakeLists.txt" ] }, "project_replace_package_name":{ "src_package_name":"org.cocos2dx.hellocpp", "files":[ - "proj.android/AndroidManifest.xml" + "proj.android/AndroidManifest.xml", + "proj.android-studio/app/build.gradle", + "proj.android-studio/app/AndroidManifest.xml" ] }, "project_replace_mac_bundleid": { diff --git a/templates/cpp-template-default/proj.android-studio/app/AndroidManifest.xml b/templates/cpp-template-default/proj.android-studio/app/AndroidManifest.xml index 2bc0113bdd..57ed2fb242 100644 --- a/templates/cpp-template-default/proj.android-studio/app/AndroidManifest.xml +++ b/templates/cpp-template-default/proj.android-studio/app/AndroidManifest.xml @@ -14,7 +14,7 @@ android:value="cocos2dcpp" /> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/cpp-template-default/proj.android-studio/settings.gradle b/templates/cpp-template-default/proj.android-studio/settings.gradle index e9cae16445..011889344e 100644 --- a/templates/cpp-template-default/proj.android-studio/settings.gradle +++ b/templates/cpp-template-default/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../cocos2d/cocos/platform/android/libcocos2dx') -include ':app' +include ':HelloCpp' +project(':HelloCpp').projectDir = new File(settingsDir, 'app') diff --git a/templates/cpp-template-default/proj.win10/App/App.xaml b/templates/cpp-template-default/proj.win10/App/App.xaml new file mode 100644 index 0000000000..62de149dd6 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/templates/cpp-template-default/proj.win10/App/App.xaml.cpp b/templates/cpp-template-default/proj.win10/App/App.xaml.cpp new file mode 100644 index 0000000000..f702179939 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/App.xaml.cpp @@ -0,0 +1,21 @@ +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; + +App::App() +{ + InitializeComponent(); +} + +void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +{ + if (mPage == nullptr) + { + mPage = ref new OpenGLESPage(&mOpenGLES); + } + + // Place the page in the current window and ensure that it is active. + Windows::UI::Xaml::Window::Current->Content = mPage; + Windows::UI::Xaml::Window::Current->Activate(); +} diff --git a/templates/cpp-template-default/proj.win10/App/App.xaml.h b/templates/cpp-template-default/proj.win10/App/App.xaml.h new file mode 100644 index 0000000000..8697d3d824 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/App.xaml.h @@ -0,0 +1,19 @@ +#pragma once + +#include "app.g.h" +#include "OpenGLES.h" +#include "openglespage.xaml.h" + +namespace cocos2d +{ + ref class App sealed + { + public: + App(); + virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; + + private: + OpenGLESPage^ mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/templates/cpp-template-default/proj.win10/App/Assets/Logo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/Logo.scale-100.png new file mode 100644 index 0000000000..e26771cb33 Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/Logo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/SmallLogo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/SmallLogo.scale-100.png new file mode 100644 index 0000000000..1eb0d9d528 Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/SmallLogo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/SplashScreen.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000000..c951e031bd Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/SplashScreen.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/StoreLogo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000000..dcb672712c Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/StoreLogo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/WideLogo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/WideLogo.scale-100.png new file mode 100644 index 0000000000..9dd94b628c Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/WideLogo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.cpp b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.cpp new file mode 100644 index 0000000000..85212dfded --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.cpp @@ -0,0 +1,158 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "Cocos2dRenderer.h" +#include "AppDelegate.h" +#include "CCGLViewImpl-winrt.h" +#include "CCApplication.h" +#include "cocos2d.h" +#include "renderer/CCTextureCache.h" + +// These are used by the shader compilation methods. +#include +#include +#include + +using namespace Platform; +using namespace Windows::UI::Core; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::Graphics::Display; + +USING_NS_CC; + + +Cocos2dRenderer::Cocos2dRenderer(int width, int height, float dpi, DisplayOrientations orientation, CoreDispatcher^ dispatcher, Panel^ panel) + : m_app(nullptr) + , m_width(width) + , m_height(height) + , m_dpi(dpi) + , m_dispatcher(dispatcher) + , m_panel(panel) + , m_orientation(orientation) +{ + m_app = new AppDelegate(); +} + +Cocos2dRenderer::~Cocos2dRenderer() +{ + delete m_app; +} + +void Cocos2dRenderer::Resume() +{ + auto director = cocos2d::Director::getInstance(); + auto glview = director->getOpenGLView(); + + if (!glview) + { + GLViewImpl* glview = GLViewImpl::create("Test Cpp"); + glview->setDispatcher(m_dispatcher.Get()); + glview->setPanel(m_panel.Get()); + glview->Create(static_cast(m_width), static_cast(m_height), m_dpi, m_orientation); + director->setOpenGLView(glview); + CCApplication::getInstance()->run(); + } + else + { + Application::getInstance()->applicationWillEnterForeground(); + cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent); + } +} + +void Cocos2dRenderer::Pause() +{ + if (Director::getInstance()->getOpenGLView()) { + Application::getInstance()->applicationDidEnterBackground(); + cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent); + } +} + +bool Cocos2dRenderer::AppShouldExit() +{ + return GLViewImpl::sharedOpenGLView()->AppShouldExit(); +} + +void Cocos2dRenderer::DeviceLost() +{ + Pause(); + + auto director = cocos2d::Director::getInstance(); + if (director->getOpenGLView()) { + cocos2d::GL::invalidateStateCache(); + cocos2d::GLProgramCache::getInstance()->reloadDefaultGLPrograms(); + cocos2d::DrawPrimitives::init(); + cocos2d::VolatileTextureMgr::reloadAllTextures(); + + cocos2d::EventCustom recreatedEvent(EVENT_RENDERER_RECREATED); + director->getEventDispatcher()->dispatchEvent(&recreatedEvent); + director->setGLDefaultValues(); + + Application::getInstance()->applicationWillEnterForeground(); + cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent); + } +} + + + +void Cocos2dRenderer::Draw(GLsizei width, GLsizei height, float dpi, DisplayOrientations orientation) +{ + auto glView = GLViewImpl::sharedOpenGLView(); + + if (orientation != m_orientation) + { + m_orientation = orientation; + glView->UpdateOrientation(orientation); + } + + if (width != m_width || height != m_height) + { + m_width = width; + m_height = height; + glView->UpdateForWindowSizeChange(static_cast(width), static_cast(height)); + } + + if (dpi != m_dpi) + { + m_dpi = dpi; + glView->SetDPI(m_dpi); + } + + glView->ProcessEvents(); + glView->Render(); +} + +void Cocos2dRenderer::QueuePointerEvent(cocos2d::PointerEventType type, Windows::UI::Core::PointerEventArgs^ args) +{ + GLViewImpl::sharedOpenGLView()->QueuePointerEvent(type, args); +} + +void Cocos2dRenderer::QueueBackButtonEvent() +{ + GLViewImpl::sharedOpenGLView()->QueueBackKeyPress(); +} + +void Cocos2dRenderer::QueueKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args) +{ + GLViewImpl::sharedOpenGLView()->QueueWinRTKeyboardEvent(type, args); +} + + + diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.h b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.h new file mode 100644 index 0000000000..b348c50043 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.h @@ -0,0 +1,57 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ +#pragma once + +#include + +#include "cocos2d.h" + + +class AppDelegate; + +namespace cocos2d +{ + class Cocos2dRenderer + { + public: + Cocos2dRenderer(int width, int height, float dpi, + Windows::Graphics::Display::DisplayOrientations orientation, + Windows::UI::Core::CoreDispatcher^ dispathcer, Windows::UI::Xaml::Controls::Panel^ panel); + ~Cocos2dRenderer(); + void Draw(GLsizei width, GLsizei height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation); + void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); + void QueueKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); + void QueueBackButtonEvent(); + void Pause(); + void Resume(); + void DeviceLost(); + bool AppShouldExit(); + + private: + + int m_width; + int m_height; + float m_dpi; + + // The AppDelegate for the Cocos2D app + AppDelegate* m_app; + Platform::Agile m_dispatcher; + Platform::Agile m_panel; + Windows::Graphics::Display::DisplayOrientations m_orientation; + }; +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.cpp b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.cpp new file mode 100644 index 0000000000..3afdab08a9 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.cpp @@ -0,0 +1,246 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "OpenGLES.h" +using namespace Platform; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; + +OpenGLES::OpenGLES() : + mEglConfig(nullptr), + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT) +{ + Initialize(); +} + +OpenGLES::~OpenGLES() +{ + Cleanup(); +} + +void OpenGLES::Initialize() +{ + const EGLint configAttributes[] = + { + EGL_RED_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_ALPHA_SIZE, 8, + EGL_DEPTH_SIZE, 8, + EGL_STENCIL_SIZE, 8, + EGL_NONE + }; + + const EGLint contextAttributes[] = + { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + + const EGLint defaultDisplayAttributes[] = + { + // These are the default display attributes, used to request ANGLE's D3D11 renderer. + // eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + + // EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices. + // Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it. + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, + + // EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call + // the IDXGIDevice3::Trim method on behalf of the application when it gets suspended. + // Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement. + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_NONE, + }; + + const EGLint fl9_3DisplayAttributes[] = + { + // These can be used to request ANGLE's D3D11 renderer, with D3D11 Feature Level 9_3. + // These attributes are used if the call to eglInitialize fails with the default display attributes. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9, + EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3, + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_NONE, + }; + + const EGLint warpDisplayAttributes[] = + { + // These attributes can be used to request D3D11 WARP. + // They are used if eglInitialize fails with both the default display attributes and the 9_3 display attributes. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_NONE, + }; + + EGLConfig config = NULL; + + // eglGetPlatformDisplayEXT is an alternative to eglGetDisplay. It allows us to pass in display attributes, used to configure D3D11. + PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast(eglGetProcAddress("eglGetPlatformDisplayEXT")); + if (!eglGetPlatformDisplayEXT) + { + throw Exception::CreateException(E_FAIL, L"Failed to get function eglGetPlatformDisplayEXT"); + } + + // + // To initialize the display, we make three sets of calls to eglGetPlatformDisplayEXT and eglInitialize, with varying + // parameters passed to eglGetPlatformDisplayEXT: + // 1) The first calls uses "defaultDisplayAttributes" as a parameter. This corresponds to D3D11 Feature Level 10_0+. + // 2) If eglInitialize fails for step 1 (e.g. because 10_0+ isn't supported by the default GPU), then we try again + // using "fl9_3DisplayAttributes". This corresponds to D3D11 Feature Level 9_3. + // 3) If eglInitialize fails for step 2 (e.g. because 9_3+ isn't supported by the default GPU), then we try again + // using "warpDisplayAttributes". This corresponds to D3D11 Feature Level 11_0 on WARP, a D3D11 software rasterizer. + // + // Note: On Windows Phone, we #ifdef out the first set of calls to eglPlatformDisplayEXT and eglInitialize. + // Windows Phones devices only support D3D11 Feature Level 9_3, but the Windows Phone emulator supports 11_0+. + // We use this #ifdef to limit the Phone emulator to Feature Level 9_3, making it behave more like + // real Windows Phone devices. + // If you wish to test Feature Level 10_0+ in the Windows Phone emulator then you should remove this #ifdef. + // + +#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) + // This tries to initialize EGL to D3D11 Feature Level 10_0+. See above comment for details. + mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, defaultDisplayAttributes); + if (mEglDisplay == EGL_NO_DISPLAY) + { + throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); + } + + if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) +#endif + { + // This tries to initialize EGL to D3D11 Feature Level 9_3, if 10_0+ is unavailable (e.g. on Windows Phone, or certain Windows tablets). + mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, fl9_3DisplayAttributes); + if (mEglDisplay == EGL_NO_DISPLAY) + { + throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); + } + + if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) + { + // This initializes EGL to D3D11 Feature Level 11_0 on WARP, if 9_3+ is unavailable on the default GPU (e.g. on Surface RT). + mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, warpDisplayAttributes); + if (mEglDisplay == EGL_NO_DISPLAY) + { + throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); + } + + if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) + { + // If all of the calls to eglInitialize returned EGL_FALSE then an error has occurred. + throw Exception::CreateException(E_FAIL, L"Failed to initialize EGL"); + } + } + } + + EGLint numConfigs = 0; + if ((eglChooseConfig(mEglDisplay, configAttributes, &mEglConfig, 1, &numConfigs) == EGL_FALSE) || (numConfigs == 0)) + { + throw Exception::CreateException(E_FAIL, L"Failed to choose first EGLConfig"); + } + + mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT, contextAttributes); + if (mEglContext == EGL_NO_CONTEXT) + { + throw Exception::CreateException(E_FAIL, L"Failed to create EGL context"); + } +} + +void OpenGLES::Cleanup() +{ + if (mEglDisplay != EGL_NO_DISPLAY && mEglContext != EGL_NO_CONTEXT) + { + eglDestroyContext(mEglDisplay, mEglContext); + mEglContext = EGL_NO_CONTEXT; + } + + if (mEglDisplay != EGL_NO_DISPLAY) + { + eglTerminate(mEglDisplay); + mEglDisplay = EGL_NO_DISPLAY; + } +} + +void OpenGLES::Reset() +{ + Cleanup(); + Initialize(); +} + +EGLSurface OpenGLES::CreateSurface(SwapChainPanel^ panel, const Size* renderSurfaceSize) +{ + if (!panel) + { + throw Exception::CreateException(E_INVALIDARG, L"SwapChainPanel parameter is invalid"); + } + + EGLSurface surface = EGL_NO_SURFACE; + + const EGLint surfaceAttributes[] = + { + // EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER is part of the same optimization as EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER (see above). + // If you have compilation issues with it then please update your Visual Studio templates. + EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER, EGL_TRUE, + EGL_NONE + }; + + // Create a PropertySet and initialize with the EGLNativeWindowType. + PropertySet^ surfaceCreationProperties = ref new PropertySet(); + surfaceCreationProperties->Insert(ref new String(EGLNativeWindowTypeProperty), panel); + + // If a render surface size is specified, add it to the surface creation properties + if (renderSurfaceSize != nullptr) + { + surfaceCreationProperties->Insert(ref new String(EGLRenderSurfaceSizeProperty), PropertyValue::CreateSize(*renderSurfaceSize)); + } + + surface = eglCreateWindowSurface(mEglDisplay, mEglConfig, reinterpret_cast(surfaceCreationProperties), surfaceAttributes); + if (surface == EGL_NO_SURFACE) + { + throw Exception::CreateException(E_FAIL, L"Failed to create EGL surface"); + } + + return surface; +} + +void OpenGLES::DestroySurface(const EGLSurface surface) +{ + if (mEglDisplay != EGL_NO_DISPLAY && surface != EGL_NO_SURFACE) + { + eglDestroySurface(mEglDisplay, surface); + } +} + +void OpenGLES::MakeCurrent(const EGLSurface surface) +{ + if (eglMakeCurrent(mEglDisplay, surface, surface, mEglContext) == EGL_FALSE) + { + throw Exception::CreateException(E_FAIL, L"Failed to make EGLSurface current"); + } +} + +EGLBoolean OpenGLES::SwapBuffers(const EGLSurface surface) +{ + return (eglSwapBuffers(mEglDisplay, surface)); +} diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.h b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.h new file mode 100644 index 0000000000..e2e7d7e8aa --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.h @@ -0,0 +1,51 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#pragma once + +// OpenGL ES includes +#include +#include + +// EGL includes +#include +#include +#include +#include + +class OpenGLES +{ +public: + OpenGLES(); + ~OpenGLES(); + + EGLSurface CreateSurface(Windows::UI::Xaml::Controls::SwapChainPanel^ panel, const Windows::Foundation::Size* renderSurfaceSize); + void DestroySurface(const EGLSurface surface); + void MakeCurrent(const EGLSurface surface); + EGLBoolean SwapBuffers(const EGLSurface surface); + void Reset(); + void Cleanup(); + +private: + void Initialize(); + +private: + EGLDisplay mEglDisplay; + EGLContext mEglContext; + EGLConfig mEglConfig; +}; diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml new file mode 100644 index 0000000000..e5b62802a5 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.cpp b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.cpp new file mode 100644 index 0000000000..fc4a36bc71 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.cpp @@ -0,0 +1,418 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; +using namespace Platform; +using namespace Concurrency; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::Graphics::Display; +using namespace Windows::System::Threading; +using namespace Windows::UI::Core; +using namespace Windows::UI::Input; +using namespace Windows::UI::Xaml; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::UI::Xaml::Controls::Primitives; +using namespace Windows::UI::Xaml::Data; +using namespace Windows::UI::Xaml::Input; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::UI::Xaml::Navigation; + +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 +using namespace Windows::Phone::UI::Input; +#endif + +OpenGLESPage::OpenGLESPage() : + OpenGLESPage(nullptr) +{ + +} + +OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : + mOpenGLES(openGLES), + mRenderSurface(EGL_NO_SURFACE), + mCustomRenderSurfaceSize(0,0), + mUseCustomRenderSurfaceSize(false), + m_coreInput(nullptr), + m_dpi(0.0f), + m_deviceLost(false), + m_orientation(DisplayOrientations::Landscape) +{ + InitializeComponent(); + + Windows::UI::Core::CoreWindow^ window = Windows::UI::Xaml::Window::Current->CoreWindow; + + window->VisibilityChanged += + ref new Windows::Foundation::TypedEventHandler(this, &OpenGLESPage::OnVisibilityChanged); + + window->KeyDown += ref new TypedEventHandler(this, &OpenGLESPage::OnKeyPressed); + + window->KeyUp += ref new TypedEventHandler(this, &OpenGLESPage::OnKeyReleased); + + window->CharacterReceived += ref new TypedEventHandler(this, &OpenGLESPage::OnCharacterReceived); + + swapChainPanel->SizeChanged += + ref new Windows::UI::Xaml::SizeChangedEventHandler(this, &OpenGLESPage::OnSwapChainPanelSizeChanged); + + DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); + + currentDisplayInformation->OrientationChanged += + ref new TypedEventHandler(this, &OpenGLESPage::OnOrientationChanged); + + m_orientation = currentDisplayInformation->CurrentOrientation; + + this->Loaded += + ref new Windows::UI::Xaml::RoutedEventHandler(this, &OpenGLESPage::OnPageLoaded); + + mSwapChainPanelSize = { swapChainPanel->RenderSize.Width, swapChainPanel->RenderSize.Height }; + +#if _MSC_VER >= 1900 + if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.UI.ViewManagement.StatusBar")) + { + Windows::UI::ViewManagement::StatusBar::GetForCurrentView()->HideAsync(); + } + + if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) + { + HardwareButtons::BackPressed += ref new EventHandler(this, &OpenGLESPage::OnBackButtonPressed); + } +#else +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) + Windows::UI::ViewManagement::StatusBar::GetForCurrentView()->HideAsync(); + HardwareButtons::BackPressed += ref new EventHandler(this, &OpenGLESPage::OnBackButtonPressed); +#else + // Disable all pointer visual feedback for better performance when touching. + // This is not supported on Windows Phone applications. + auto pointerVisualizationSettings = Windows::UI::Input::PointerVisualizationSettings::GetForCurrentView(); + pointerVisualizationSettings->IsContactFeedbackEnabled = false; + pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false; +#endif +#endif + + // Register our SwapChainPanel to get independent input pointer events + auto workItemHandler = ref new WorkItemHandler([this](IAsyncAction ^) + { + // The CoreIndependentInputSource will raise pointer events for the specified device types on whichever thread it's created on. + m_coreInput = swapChainPanel->CreateCoreIndependentInputSource( + Windows::UI::Core::CoreInputDeviceTypes::Mouse | + Windows::UI::Core::CoreInputDeviceTypes::Touch | + Windows::UI::Core::CoreInputDeviceTypes::Pen + ); + + // Register for pointer events, which will be raised on the background thread. + m_coreInput->PointerPressed += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerPressed); + m_coreInput->PointerMoved += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerMoved); + m_coreInput->PointerReleased += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerReleased); + + // Begin processing input messages as they're delivered. + m_coreInput->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit); + }); + + // Run task on a dedicated high priority background thread. + m_inputLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced); +} + +OpenGLESPage::~OpenGLESPage() +{ + StopRenderLoop(); + DestroyRenderSurface(); +} + +void OpenGLESPage::OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) +{ + // The SwapChainPanel has been created and arranged in the page layout, so EGL can be initialized. + CreateRenderSurface(); + StartRenderLoop(); +} + +void OpenGLESPage::OnPointerPressed(Object^ sender, PointerEventArgs^ e) +{ + if (m_renderer) + { + m_renderer->QueuePointerEvent(PointerEventType::PointerPressed, e); + } +} + +void OpenGLESPage::OnPointerMoved(Object^ sender, PointerEventArgs^ e) +{ + if (m_renderer) + { + m_renderer->QueuePointerEvent(PointerEventType::PointerMoved, e); + } +} + +void OpenGLESPage::OnPointerReleased(Object^ sender, PointerEventArgs^ e) +{ + if (m_renderer) + { + m_renderer->QueuePointerEvent(PointerEventType::PointerReleased, e); + } +} + +void OpenGLESPage::OnKeyPressed(CoreWindow^ sender, KeyEventArgs^ e) +{ + if (!e->KeyStatus.WasKeyDown) + { + //log("OpenGLESPage::OnKeyPressed %d", e->VirtualKey); + if (m_renderer) + { + m_renderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyPressed, e); + } + } +} + +void OpenGLESPage::OnCharacterReceived(CoreWindow^ sender, CharacterReceivedEventArgs^ e) +{ +#if 0 + if (!e->KeyStatus.WasKeyDown) + { + log("OpenGLESPage::OnCharacterReceived %d", e->KeyCode); + } +#endif +} + +void OpenGLESPage::OnKeyReleased(CoreWindow^ sender, KeyEventArgs^ e) +{ + //log("OpenGLESPage::OnKeyReleased %d", e->VirtualKey); + if (m_renderer) + { + m_renderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyReleased, e); + } +} + + +void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args) +{ + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + m_orientation = sender->CurrentOrientation; +} + +void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args) +{ + if (args->Visible && mRenderSurface != EGL_NO_SURFACE) + { + StartRenderLoop(); + } + else + { + StopRenderLoop(); + } +} + +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 +/* + We set args->Handled = true to prevent the app from quitting when the back button is pressed. + This is because this back button event happens on the XAML UI thread and not the cocos2d-x UI thread. + We need to give the game developer a chance to decide to exit the app depending on where they + are in their game. They can receive the back button event by listening for the + EventKeyboard::KeyCode::KEY_ESCAPE event. + + The default behavior is to exit the app if the EventKeyboard::KeyCode::KEY_ESCAPE event + is not handled by the game. +*/ +void OpenGLESPage::OnBackButtonPressed(Object^ sender, BackPressedEventArgs^ args) +{ + if (m_renderer) + { + m_renderer->QueueBackButtonEvent(); + args->Handled = true; + } +} +#endif + + +void OpenGLESPage::OnSwapChainPanelSizeChanged(Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e) +{ + // Size change events occur outside of the render thread. A lock is required when updating + // the swapchainpanel size + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + mSwapChainPanelSize = { e->NewSize.Width, e->NewSize.Height }; +} + +void OpenGLESPage::GetSwapChainPanelSize(GLsizei* width, GLsizei* height) +{ + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + // If a custom render surface size is specified, return its size instead of + // the swapchain panel size. + if (mUseCustomRenderSurfaceSize) + { + *width = static_cast(mCustomRenderSurfaceSize.Width); + *height = static_cast(mCustomRenderSurfaceSize.Height); + } + else + { + *width = static_cast(mSwapChainPanelSize.Width); + *height = static_cast(mSwapChainPanelSize.Height); + } +} + +void OpenGLESPage::CreateRenderSurface() +{ + if (mOpenGLES && mRenderSurface == EGL_NO_SURFACE) + { + // + // A Custom render surface size can be specified by uncommenting the following lines. + // The render surface will be automatically scaled to fit the entire window. Using a + // smaller sized render surface can result in a performance gain. + // + //mCustomRenderSurfaceSize = Size(800, 600); + //mUseCustomRenderSurfaceSize = true; + + mRenderSurface = mOpenGLES->CreateSurface(swapChainPanel, mUseCustomRenderSurfaceSize ? &mCustomRenderSurfaceSize : nullptr); + } +} + +void OpenGLESPage::DestroyRenderSurface() +{ + if (mOpenGLES) + { + mOpenGLES->DestroySurface(mRenderSurface); + } + mRenderSurface = EGL_NO_SURFACE; +} + +void OpenGLESPage::RecoverFromLostDevice() +{ + // Stop the render loop, reset OpenGLES, recreate the render surface + // and start the render loop again to recover from a lost device. + + StopRenderLoop(); + + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + DestroyRenderSurface(); + mOpenGLES->Reset(); + CreateRenderSurface(); + } + + StartRenderLoop(); +} + +void OpenGLESPage::TerminateApp() +{ + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + if (mOpenGLES) + { + mOpenGLES->DestroySurface(mRenderSurface); + mOpenGLES->Cleanup(); + } + + } + Windows::UI::Xaml::Application::Current->Exit(); +} + +void OpenGLESPage::StartRenderLoop() +{ + // If the render loop is already running then do not start another thread. + if (mRenderLoopWorker != nullptr && mRenderLoopWorker->Status == Windows::Foundation::AsyncStatus::Started) + { + return; + } + + DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); + m_dpi = currentDisplayInformation->LogicalDpi; + + auto dispatcher = Windows::UI::Xaml::Window::Current->CoreWindow->Dispatcher; + + // Create a task for rendering that will be run on a background thread. + auto workItemHandler = ref new Windows::System::Threading::WorkItemHandler([this, dispatcher](Windows::Foundation::IAsyncAction ^ action) + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + mOpenGLES->MakeCurrent(mRenderSurface); + + GLsizei panelWidth = 0; + GLsizei panelHeight = 0; + GetSwapChainPanelSize(&panelWidth, &panelHeight); + + if (m_renderer.get() == nullptr) + { + m_renderer = std::make_shared(panelWidth, panelHeight, m_dpi, m_orientation, dispatcher, swapChainPanel); + } + + if (m_deviceLost) + { + m_deviceLost = false; + m_renderer->DeviceLost(); + } + else + { + m_renderer->Resume(); + } + + + while (action->Status == Windows::Foundation::AsyncStatus::Started && !m_deviceLost) + { + GetSwapChainPanelSize(&panelWidth, &panelHeight); + m_renderer.get()->Draw(panelWidth, panelHeight, m_dpi, m_orientation); + + // run on main UI thread + if (m_renderer->AppShouldExit()) + { + swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this]() + { + TerminateApp(); + })); + + return; + } + else if (mOpenGLES->SwapBuffers(mRenderSurface) != GL_TRUE) + { + // The call to eglSwapBuffers might not be successful (i.e. due to Device Lost) + // If the call fails, then we must reinitialize EGL and the GL resources. + + m_deviceLost = true; + + if (m_renderer) + { + m_renderer->Pause(); + } + + // XAML objects like the SwapChainPanel must only be manipulated on the UI thread. + swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]() + { + RecoverFromLostDevice(); + }, CallbackContext::Any)); + + return; + } + } + + if (m_renderer) + { + m_renderer->Pause(); + } + }); + + // Run task on a dedicated high priority background thread. + mRenderLoopWorker = Windows::System::Threading::ThreadPool::RunAsync(workItemHandler, Windows::System::Threading::WorkItemPriority::High, Windows::System::Threading::WorkItemOptions::TimeSliced); +} + +void OpenGLESPage::StopRenderLoop() +{ + if (mRenderLoopWorker) + { + mRenderLoopWorker->Cancel(); + mRenderLoopWorker = nullptr; + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.h b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.h new file mode 100644 index 0000000000..26e3ff1fe0 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.h @@ -0,0 +1,85 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#pragma once + +#include "OpenGLES.h" +#include "OpenGLESPage.g.h" +#include + +#include "Cocos2dRenderer.h" + +namespace cocos2d +{ + public ref class OpenGLESPage sealed + { + public: + OpenGLESPage(); + virtual ~OpenGLESPage(); + + internal: + OpenGLESPage(OpenGLES* openGLES); + + private: + void OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); + void OnSwapChainPanelSizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e); +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 + void OnBackButtonPressed(Platform::Object^ sender, Windows::Phone::UI::Input::BackPressedEventArgs^ args); +#endif + void GetSwapChainPanelSize(GLsizei* width, GLsizei* height); + void CreateRenderSurface(); + void DestroyRenderSurface(); + void RecoverFromLostDevice(); + void TerminateApp(); + void StartRenderLoop(); + void StopRenderLoop(); + + OpenGLES* mOpenGLES; + std::shared_ptr m_renderer; + + Windows::Foundation::Size mSwapChainPanelSize; + Concurrency::critical_section mSwapChainPanelSizeCriticalSection; + + Windows::Foundation::Size mCustomRenderSurfaceSize; + bool mUseCustomRenderSurfaceSize; + + EGLSurface mRenderSurface; // This surface is associated with a swapChainPanel on the page + Concurrency::critical_section mRenderSurfaceCriticalSection; + Windows::Foundation::IAsyncAction^ mRenderLoopWorker; + + // Track user input on a background worker thread. + Windows::Foundation::IAsyncAction^ m_inputLoopWorker; + Windows::UI::Core::CoreIndependentInputSource^ m_coreInput; + + // Independent input handling functions. + void OnPointerPressed(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); + void OnPointerMoved(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); + void OnPointerReleased(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); + void OnKeyPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + void OnKeyReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args); + + void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); + + float m_dpi; + bool m_deviceLost; + Windows::Graphics::Display::DisplayOrientations m_orientation; + + }; +} diff --git a/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj new file mode 100644 index 0000000000..1b86b135f8 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj @@ -0,0 +1,279 @@ + + + + {187d3e60-961a-41ee-bc18-c510a431d22e} + HelloCpp + en-US + 14.0 + true + Windows Store + 8.2 + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + Application + true + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HelloCpp_TemporaryKey.pfx + + + false + + + false + + + false + + + false + + + false + + + false + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + + + App.xaml + + + + + Cocos2dEngine\OpenGLESPage.xaml + + + + + + Designer + + + + + Designer + + + + + + + + + + + + + + + App.xaml + + + + + Cocos2dEngine\OpenGLESPage.xaml + + + Create + Create + Create + Create + Create + Create + + + + + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + + + {0c32d479-46d5-46c3-9aa9-0a8ff8320516} + + + {ecee1119-ce2e-4f7e-83a8-1932ea48e893} + + + + + + + + + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj.filters b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj.filters new file mode 100644 index 0000000000..801c0b28ff --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj.filters @@ -0,0 +1,88 @@ + + + + + 187d3e60-961a-41ee-bc18-c510a431d22e + + + f8868b9a-1bec-48df-b4b6-294815dc7a5d + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Assets + + + Assets + + + Assets + + + Assets + + + {6b9ca606-5a38-4479-a7ec-01bdfeda67bc} + + + {a18967bc-4fa1-4c67-bf7e-3f9c8b6a1129} + + + + + + + + + Cocos2dEngine + + + Cocos2dEngine + + + + + Classes + + + Classes + + + + + + Cocos2dEngine + + + Cocos2dEngine + + + + + Classes + + + Classes + + + + + Assets + + + + + + + + + + + + + + + + Cocos2dEngine + + + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/HelloCpp_TemporaryKey.pfx b/templates/cpp-template-default/proj.win10/App/HelloCpp_TemporaryKey.pfx new file mode 100644 index 0000000000..76c0762f2c Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/HelloCpp_TemporaryKey.pfx differ diff --git a/templates/cpp-template-default/proj.win10/App/Package.appxmanifest b/templates/cpp-template-default/proj.win10/App/Package.appxmanifest new file mode 100644 index 0000000000..5dcf278215 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Package.appxmanifest @@ -0,0 +1,52 @@ + + + + + + + + + + HelloCpp + "Microsoft Open Technologies, Inc." + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/pch.cpp b/templates/cpp-template-default/proj.win10/App/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/templates/cpp-template-default/proj.win10/App/pch.h b/templates/cpp-template-default/proj.win10/App/pch.h new file mode 100644 index 0000000000..2e511d964f --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/pch.h @@ -0,0 +1,14 @@ +// +// pch.h +// Header for standard system include files. +// + +#pragma once + +#include +#include + +#include "cocos2d.h" +#include "cocos-ext.h" + + diff --git a/templates/cpp-template-default/proj.win10/App/resources.props b/templates/cpp-template-default/proj.win10/App/resources.props new file mode 100644 index 0000000000..044aa2eaa7 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/resources.props @@ -0,0 +1,19 @@ + + + + + + <_CustomResource Include="..\..\Resources\**\*"> + Assets\Resources\%(RecursiveDir)%(FileName)%(Extension) + true + + + + + + + + + + + diff --git a/templates/cpp-template-default/proj.win10/HelloCpp.sln b/templates/cpp-template-default/proj.win10/HelloCpp.sln new file mode 100644 index 0000000000..4837cb2bbe --- /dev/null +++ b/templates/cpp-template-default/proj.win10/HelloCpp.sln @@ -0,0 +1,103 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22823.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{B2F1FF1B-005C-490E-999E-17BD4B720B5C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\cocos2d\external\Box2D\proj-win10\libbox2d.vcxproj", "{0C32D479-46D5-46C3-9AA9-0A8FF8320516}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win10\libSpine.vcxproj", "{4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\libcocos2d_win10\libcocos2d.vcxproj", "{07C2895D-720C-487D-B7B4-12C293EA533F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "App\HelloCpp.vcxproj", "{187D3E60-961A-41EE-BC18-C510A431D22E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\cocos2d\external\bullet\proj.win10\libbullet.vcxproj", "{ECEE1119-CE2E-4F7E-83A8-1932EA48E893}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.ActiveCfg = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.Build.0 = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.ActiveCfg = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.Build.0 = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.ActiveCfg = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.Build.0 = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.ActiveCfg = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.Build.0 = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.ActiveCfg = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.Build.0 = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.ActiveCfg = Release|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.Build.0 = Release|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.ActiveCfg = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.Build.0 = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.ActiveCfg = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.Build.0 = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.ActiveCfg = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.Build.0 = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.ActiveCfg = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.Build.0 = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.ActiveCfg = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.Build.0 = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.ActiveCfg = Release|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.Build.0 = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.ActiveCfg = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.Build.0 = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.ActiveCfg = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.Build.0 = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.ActiveCfg = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.Build.0 = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.ActiveCfg = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.Build.0 = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.ActiveCfg = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.Build.0 = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.ActiveCfg = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.Build.0 = Release|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|ARM.ActiveCfg = Debug|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|ARM.Build.0 = Debug|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|ARM.Deploy.0 = Debug|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x64.ActiveCfg = Debug|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x64.Build.0 = Debug|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x64.Deploy.0 = Debug|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x86.ActiveCfg = Debug|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x86.Build.0 = Debug|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x86.Deploy.0 = Debug|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|ARM.ActiveCfg = Release|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|ARM.Build.0 = Release|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|ARM.Deploy.0 = Release|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x64.ActiveCfg = Release|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x64.Build.0 = Release|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x64.Deploy.0 = Release|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x86.ActiveCfg = Release|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x86.Build.0 = Release|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x86.Deploy.0 = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.ActiveCfg = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.Build.0 = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.ActiveCfg = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.Build.0 = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.ActiveCfg = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.Build.0 = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.ActiveCfg = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.Build.0 = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.ActiveCfg = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.Build.0 = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.ActiveCfg = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {0C32D479-46D5-46C3-9AA9-0A8FF8320516} = {B2F1FF1B-005C-490E-999E-17BD4B720B5C} + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8} = {B2F1FF1B-005C-490E-999E-17BD4B720B5C} + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893} = {B2F1FF1B-005C-490E-999E-17BD4B720B5C} + EndGlobalSection +EndGlobal diff --git a/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj b/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj index 663a68f0fd..459c424489 100644 --- a/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj +++ b/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj @@ -1,4 +1,4 @@ - + @@ -96,11 +96,20 @@ - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" -xcopy "$(ProjectDir)..\Resources" "$(OutDir)" /D /E /I /F /Y + + + + + xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" + xcopy "$(ProjectDir)..\Resources" "$(OutDir)" /D /E /I /F /Y + + $(TargetName).cab + $(TargetFileName) + + + MaxSpeed diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.Windows/HelloCpp.Windows.vcxproj b/templates/cpp-template-default/proj.win8.1-universal/App.Windows/HelloCpp.Windows.vcxproj index e48a4c0aea..b724fccccb 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Windows/HelloCpp.Windows.vcxproj +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Windows/HelloCpp.Windows.vcxproj @@ -123,6 +123,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -132,6 +133,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions)
@@ -141,6 +143,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -150,6 +153,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) @@ -159,6 +163,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -168,6 +173,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.Windows/Package.appxmanifest b/templates/cpp-template-default/proj.win8.1-universal/App.Windows/Package.appxmanifest index 1f5d2e56b1..91951e9a31 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.Windows/Package.appxmanifest +++ b/templates/cpp-template-default/proj.win8.1-universal/App.Windows/Package.appxmanifest @@ -1,6 +1,6 @@  - + HelloCpp.Windows msopentech diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/HelloCpp.WindowsPhone.vcxproj b/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/HelloCpp.WindowsPhone.vcxproj index 19157fa0d1..5f2cff6e4d 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/HelloCpp.WindowsPhone.vcxproj +++ b/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/HelloCpp.WindowsPhone.vcxproj @@ -89,7 +89,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false - CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -99,7 +99,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false - CC_WINDOWS_PHONE_8_1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) @@ -109,7 +109,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false - CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -119,7 +119,7 @@ pch.h ../../Classes;%(AdditionalIncludeDirectories) false - CC_WINDOWS_PHONE_8_1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) diff --git a/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/Package.appxmanifest b/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/Package.appxmanifest index eb4bab30a4..a2181cf8a0 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/Package.appxmanifest +++ b/templates/cpp-template-default/proj.win8.1-universal/App.WindowsPhone/Package.appxmanifest @@ -1,10 +1,10 @@  - - + + HelloCpp.WindowsPhone - dalestam + msopentech Assets\StoreLogo.png diff --git a/templates/cpp-template-default/proj.win8.1-universal/HelloCpp.sln b/templates/cpp-template-default/proj.win8.1-universal/HelloCpp.sln index be071c12a8..bd25e49291 100644 --- a/templates/cpp-template-default/proj.win8.1-universal/HelloCpp.sln +++ b/templates/cpp-template-default/proj.win8.1-universal/HelloCpp.sln @@ -36,14 +36,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.Windows", ". EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d_8_1.WindowsPhone", "..\cocos2d\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.WindowsPhone\libcocos2d_8_1.WindowsPhone.vcxproj", "{22F3B9DF-1209-4574-8331-003966F562BF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libbullet", "libbullet", "{72850ED1-A006-4767-B703-27A27C3F13FC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Shared", "..\cocos2d\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems", "{16AF311F-74CA-45A3-A82D-6334200FB124}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Windows", "..\cocos2d\external\bullet\proj.win8.1-universal\libbullet.Windows\libbullet.Windows.vcxproj", "{EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.WindowsPhone", "..\cocos2d\external\bullet\proj.win8.1-universal\libbullet.WindowsPhone\libbullet.WindowsPhone.vcxproj", "{E35634BD-B91B-4A6D-B957-96F56DD065F9}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\cocos2d\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{9335005f-678e-4e8e-9b84-50037216aec8}*SharedItemsImports = 4 App.Shared\HelloCpp.Shared.vcxitems*{a3ad93e4-0b2f-4c58-9181-69bed2e42e3e}*SharedItemsImports = 9 ..\cocos2d\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{cc1da216-a80d-4be4-b309-acb6af313aff}*SharedItemsImports = 4 ..\cocos2d\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{4a3c6ba8-c227-498b-aa21-40bda27b461f}*SharedItemsImports = 9 + ..\cocos2d\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{e35634bd-b91b-4a6d-b957-96f56dd065f9}*SharedItemsImports = 4 App.Shared\HelloCpp.Shared.vcxitems*{79a8fcda-4b12-4dd1-b676-ff148d651638}*SharedItemsImports = 4 + ..\cocos2d\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{ec2b1292-2d8c-4feb-a84b-2550b32c1ae7}*SharedItemsImports = 4 ..\cocos2d\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{adafd00d-a0d6-46ef-9f0b-ea2880bfe1de}*SharedItemsImports = 9 + ..\cocos2d\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{16af311f-74ca-45a3-a82d-6334200fb124}*SharedItemsImports = 9 ..\cocos2d\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{5d6f020f-7e72-4494-90a0-2df11d235df9}*SharedItemsImports = 9 ..\cocos2d\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{3b26a12d-3a44-47ea-82d2-282660fc844d}*SharedItemsImports = 4 ..\cocos2d\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{22f3b9df-1209-4574-8331-003966f562bf}*SharedItemsImports = 4 @@ -158,6 +169,28 @@ Global {22F3B9DF-1209-4574-8331-003966F562BF}.Release|Win32.ActiveCfg = Release|Win32 {22F3B9DF-1209-4574-8331-003966F562BF}.Release|Win32.Build.0 = Release|Win32 {22F3B9DF-1209-4574-8331-003966F562BF}.Release|x64.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.ActiveCfg = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.Build.0 = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.ActiveCfg = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.Build.0 = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.ActiveCfg = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.Build.0 = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.ActiveCfg = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.Build.0 = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.Build.0 = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.ActiveCfg = Release|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.Build.0 = Release|x64 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.ActiveCfg = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.Build.0 = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.Build.0 = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|x64.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.ActiveCfg = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.Build.0 = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.ActiveCfg = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.Build.0 = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -177,5 +210,9 @@ Global {5D6F020F-7E72-4494-90A0-2DF11D235DF9} = {80DA05C1-6532-4D2A-8606-EF02079B1373} {9335005F-678E-4E8E-9B84-50037216AEC8} = {80DA05C1-6532-4D2A-8606-EF02079B1373} {22F3B9DF-1209-4574-8331-003966F562BF} = {80DA05C1-6532-4D2A-8606-EF02079B1373} + {72850ED1-A006-4767-B703-27A27C3F13FC} = {F13CB4F7-BEE5-4368-A815-A971797387D8} + {16AF311F-74CA-45A3-A82D-6334200FB124} = {72850ED1-A006-4767-B703-27A27C3F13FC} + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7} = {72850ED1-A006-4767-B703-27A27C3F13FC} + {E35634BD-B91B-4A6D-B957-96F56DD065F9} = {72850ED1-A006-4767-B703-27A27C3F13FC} EndGlobalSection EndGlobal diff --git a/templates/js-template-default/cocos-project-template.json b/templates/js-template-default/cocos-project-template.json index a70ca555e5..a19eb38efc 100644 --- a/templates/js-template-default/cocos-project-template.json +++ b/templates/js-template-default/cocos-project-template.json @@ -2,16 +2,6 @@ "do_default":{ "exclude_from_template":[ "frameworks/runtime-src" - ], - "append_h5_engine":{ - "from":"web", - "to":"frameworks/cocos2d-html5" - }, - "append_file":[ - { - "from":"web/jsb_apis.js", - "to":"frameworks/cocos2d-html5/jsb_apis.js" - } ] }, "do_add_native_support":{ @@ -69,6 +59,7 @@ "frameworks/runtime-src/proj.android/AndroidManifest.xml", "frameworks/runtime-src/proj.android/build.xml", "frameworks/runtime-src/proj.android/res/values/strings.xml", + "frameworks/runtime-src/proj.android-studio/settings.gradle", "frameworks/runtime-src/proj.ios_mac/ios/main.m", "frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch", "frameworks/runtime-src/proj.ios_mac/PROJECT_NAME.xcodeproj/project.pbxproj", @@ -87,7 +78,9 @@ "project_replace_package_name":{ "src_package_name":"org.cocos2dx.hellojavascript", "files":[ - "frameworks/runtime-src/proj.android/AndroidManifest.xml" + "frameworks/runtime-src/proj.android/AndroidManifest.xml", + "frameworks/runtime-src/proj.android-studio/app/build.gradle", + "frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml" ] }, "project_replace_mac_bundleid":{ diff --git a/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml b/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml index 0df71de5f7..59cb2ffb84 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml +++ b/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml @@ -14,7 +14,7 @@ android:value="cocos2djs" /> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/js-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle b/templates/js-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle index aa7d6ba93b..133ec2d702 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle +++ b/templates/js-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../../cocos2d-x/cocos/platform/android/libcocos2dx') -include ':app' +include ':HelloJavascript' +project(':HelloJavascript').projectDir = new File(settingsDir, 'app') diff --git a/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj b/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj index 8620004ace..446dc3b7a2 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj +++ b/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj @@ -1,4 +1,4 @@ - + @@ -121,6 +121,17 @@ copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y Copy js and resource files. + + + xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(OutDir)\script" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\res" /D /E /I /F /Y +copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y +copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y + $(TargetName).cab + $(TargetFileName) + + NDEBUG;%(PreprocessorDefinitions) diff --git a/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.Windows/HelloJavascript.Windows.vcxproj b/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.Windows/HelloJavascript.Windows.vcxproj index 26f8cbeafb..dd0a618c31 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.Windows/HelloJavascript.Windows.vcxproj +++ b/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.Windows/HelloJavascript.Windows.vcxproj @@ -122,6 +122,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -131,6 +132,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) @@ -140,6 +142,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -149,6 +152,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) @@ -158,6 +162,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -167,6 +172,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) diff --git a/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.WindowsPhone/HelloJavascript.WindowsPhone.vcxproj b/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.WindowsPhone/HelloJavascript.WindowsPhone.vcxproj index d0b374b373..88a3886a31 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.WindowsPhone/HelloJavascript.WindowsPhone.vcxproj +++ b/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/App.WindowsPhone/HelloJavascript.WindowsPhone.vcxproj @@ -89,6 +89,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) @@ -98,6 +99,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) @@ -107,6 +109,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) @@ -116,6 +119,7 @@ pch.h $(ProjectDir)..\..\Classes;%(AdditionalIncludeDirectories) false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) @@ -148,4 +152,4 @@ - + \ No newline at end of file diff --git a/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/HelloJavascript.sln b/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/HelloJavascript.sln index 3658166bb4..6ba8f81a9a 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/HelloJavascript.sln +++ b/templates/js-template-default/frameworks/runtime-src/proj.win8.1-universal/HelloJavascript.sln @@ -44,14 +44,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d.Windows", "..\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d.WindowsPhone", "..\..\cocos2d-x\cocos\scripting\js-bindings\proj.win8.1-universal\libjscocos2d\libjscocos2d.WindowsPhone\libjscocos2d.WindowsPhone.vcxproj", "{CA082EC4-17CE-430B-8207-D1E947A5D1E9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libbullet", "libbullet", "{74FBA998-B56C-4170-AF95-CFC4FFB40468}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Shared", "..\..\cocos2d-x\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems", "{16AF311F-74CA-45A3-A82D-6334200FB124}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Windows", "..\..\cocos2d-x\external\bullet\proj.win8.1-universal\libbullet.Windows\libbullet.Windows.vcxproj", "{EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.WindowsPhone", "..\..\cocos2d-x\external\bullet\proj.win8.1-universal\libbullet.WindowsPhone\libbullet.WindowsPhone.vcxproj", "{E35634BD-B91B-4A6D-B957-96F56DD065F9}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\..\cocos2d-x\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{9335005f-678e-4e8e-9b84-50037216aec8}*SharedItemsImports = 4 App.Shared\HelloJavascript.Shared.vcxitems*{a3ad93e4-0b2f-4c58-9181-69bed2e42e3e}*SharedItemsImports = 9 ..\..\cocos2d-x\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{cc1da216-a80d-4be4-b309-acb6af313aff}*SharedItemsImports = 4 ..\..\cocos2d-x\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{4a3c6ba8-c227-498b-aa21-40bda27b461f}*SharedItemsImports = 9 + ..\..\cocos2d-x\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{e35634bd-b91b-4a6d-b957-96f56dd065f9}*SharedItemsImports = 4 App.Shared\HelloJavascript.Shared.vcxitems*{79a8fcda-4b12-4dd1-b676-ff148d651638}*SharedItemsImports = 4 + ..\..\cocos2d-x\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{ec2b1292-2d8c-4feb-a84b-2550b32c1ae7}*SharedItemsImports = 4 ..\..\cocos2d-x\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{adafd00d-a0d6-46ef-9f0b-ea2880bfe1de}*SharedItemsImports = 9 + ..\..\cocos2d-x\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{16af311f-74ca-45a3-a82d-6334200fb124}*SharedItemsImports = 9 ..\..\cocos2d-x\cocos\scripting\js-bindings\proj.win8.1-universal\libjscocos2d\libjscocos2d.Shared\libjscocos2d.Shared.vcxitems*{ca082ec4-17ce-430b-8207-d1e947a5d1e9}*SharedItemsImports = 4 ..\..\cocos2d-x\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{5d6f020f-7e72-4494-90a0-2df11d235df9}*SharedItemsImports = 9 ..\..\cocos2d-x\cocos\scripting\js-bindings\proj.win8.1-universal\libjscocos2d\libjscocos2d.Shared\libjscocos2d.Shared.vcxitems*{bea66276-51dd-4c53-92a8-f3d1fea50892}*SharedItemsImports = 9 @@ -191,6 +202,28 @@ Global {CA082EC4-17CE-430B-8207-D1E947A5D1E9}.Release|Win32.ActiveCfg = Release|Win32 {CA082EC4-17CE-430B-8207-D1E947A5D1E9}.Release|Win32.Build.0 = Release|Win32 {CA082EC4-17CE-430B-8207-D1E947A5D1E9}.Release|x64.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.ActiveCfg = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|ARM.Build.0 = Debug|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.ActiveCfg = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|Win32.Build.0 = Debug|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.ActiveCfg = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Debug|x64.Build.0 = Debug|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.ActiveCfg = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|ARM.Build.0 = Release|ARM + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.ActiveCfg = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|Win32.Build.0 = Release|Win32 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.ActiveCfg = Release|x64 + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7}.Release|x64.Build.0 = Release|x64 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.ActiveCfg = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|ARM.Build.0 = Debug|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|Win32.Build.0 = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Debug|x64.ActiveCfg = Debug|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.ActiveCfg = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|ARM.Build.0 = Release|ARM + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.ActiveCfg = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.Build.0 = Release|Win32 + {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -213,5 +246,9 @@ Global {BEA66276-51DD-4C53-92A8-F3D1FEA50892} = {FCB0EDBB-7A20-48D0-926B-E5617D40E6E5} {BCF5546D-66A0-4998-AFD6-C5514F618930} = {FCB0EDBB-7A20-48D0-926B-E5617D40E6E5} {CA082EC4-17CE-430B-8207-D1E947A5D1E9} = {FCB0EDBB-7A20-48D0-926B-E5617D40E6E5} + {74FBA998-B56C-4170-AF95-CFC4FFB40468} = {F13CB4F7-BEE5-4368-A815-A971797387D8} + {16AF311F-74CA-45A3-A82D-6334200FB124} = {74FBA998-B56C-4170-AF95-CFC4FFB40468} + {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7} = {74FBA998-B56C-4170-AF95-CFC4FFB40468} + {E35634BD-B91B-4A6D-B957-96F56DD065F9} = {74FBA998-B56C-4170-AF95-CFC4FFB40468} EndGlobalSection EndGlobal diff --git a/templates/js-template-default/project.json b/templates/js-template-default/project.json index e54f870660..6a7f37a61e 100644 --- a/templates/js-template-default/project.json +++ b/templates/js-template-default/project.json @@ -6,7 +6,7 @@ "frameRate" : 60, "id" : "gameCanvas", "renderMode" : 0, - "engineDir":"frameworks/cocos2d-html5", + "engineDir":"frameworks/cocos2d-x/web", "modules" : ["cocos2d"], diff --git a/templates/js-template-runtime/.project b/templates/js-template-runtime/.project new file mode 100644 index 0000000000..c816f0eddb --- /dev/null +++ b/templates/js-template-runtime/.project @@ -0,0 +1,23 @@ + + + HelloJavascript + + + + + + + org.ccdt.cocosproject + org.ccdt.jsdt.core.jsNature + + + 1.2 + + + + script + 2 + PROJECT_LOC/frameworks/js-bindings/bindings/script + + + diff --git a/templates/js-template-runtime/.settings/version.json b/templates/js-template-runtime/.settings/version.json new file mode 100644 index 0000000000..0369027256 --- /dev/null +++ b/templates/js-template-runtime/.settings/version.json @@ -0,0 +1,4 @@ +{ + "templateVersion":"1.8", + "runtimeVersion":"1.8" +} diff --git a/templates/js-template-runtime/cocos-project-template.json b/templates/js-template-runtime/cocos-project-template.json new file mode 100644 index 0000000000..b55c15e5ba --- /dev/null +++ b/templates/js-template-runtime/cocos-project-template.json @@ -0,0 +1,295 @@ +{ + "do_default":{ + "exclude_from_template":[ + "frameworks/runtime-src" + ], + "project_replace_project_name":{ + "src_project_name":"HelloJavascript", + "files":[ + "config.json", + ".project" + ] + }, + "append_dir":[ + { + "from":"plugin/plugins/facebook/proj.android/DependProject/src", + "to":"frameworks/cocos2d-x/plugin/plugins/facebook/proj.android/DependProject/src" + }, + { + "from":"cocos/scripting/js-bindings/script", + "to":"runtime/mac/PrebuiltRuntimeJs.app/Contents/Resources/script", + "exclude":[] + }, + { + "from":"cocos/scripting/js-bindings/script", + "to":"runtime/ios/PrebuiltRuntimeJs.app/script", + "exclude":[] + }, + { + "from":"cocos/scripting/js-bindings/script", + "to":"runtime/win32/script", + "exclude":[] + }, + { + "from":"templates/js-template-runtime/src", + "to":"runtime/win32/src", + "exclude":[] + }, + { + "from":"templates/js-template-runtime/res", + "to":"runtime/win32/res", + "exclude":[] + }, + { + "from":"external/win32-specific/gles/prebuilt", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/win32-specific/icon/prebuilt", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/win32-specific/MP3Decoder/prebuilt", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/win32-specific/OggDecoder/prebuilt", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/win32-specific/OpenalSoft/prebuilt", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/win32-specific/zlib/prebuilt", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/curl/prebuilt/win32", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/sqlite3/libraries/win32", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/websockets/prebuilt/win32", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/tiff/prebuilt/win32", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + }, + { + "from":"external/spidermonkey/prebuilt/win32", + "to":"runtime/win32", + "include": [ + "*.dll" + ] + } + ], + "append_file":[ + { + "from":"tools/simulator/frameworks/runtime-src/Classes/ide-support/lang", + "to":"runtime/win32/lang" + }, + { + "from":"templates/js-template-runtime/project.json", + "to":"runtime/ios/PrebuiltRuntimeJs.app/project.json" + }, + { + "from":"templates/js-template-runtime/project.json", + "to":"runtime/win32/project.json" + }, + { + "from":"templates/js-template-runtime/config.json", + "to":"runtime/win32/config.json" + }, + { + "from":"templates/js-template-runtime/main.js", + "to":"runtime/win32/main.js" + } + ] + }, + "do_add_native_support":{ + "append_from_template":{ + "from":"frameworks/runtime-src", + "to":"frameworks/runtime-src", + "exclude":[ + "proj.android/bin", + "proj.android/assets", + "proj.ios_mac/HelloJavascript.xcodeproj/project.xcworkspace", + "proj.ios_mac/HelloJavascript.xcodeproj/xcuserdata", + "proj.win32/Debug.win32", + "proj.win32/Release.win32", + "proj.win32/HelloJavascript.sdf" + ] + }, + "append_dir":[ + { + "from":"tools/bindings-generator", + "to":"tools/bindings-generator", + "exclude":[ + ".git" + ] + }, + { + "from":"tools", + "to":"tools", + "include":[ + "tojs" + ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/Classes/ide-support", + "to": "frameworks/runtime-src/Classes/ide-support", + "exclude": [ + "RuntimeLuaImpl.*", + "lua_debugger.*" + ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.ios_mac/ios", + "to": "frameworks/runtime-src/proj.ios_mac/ios", + "exclude": [ + "RootViewController.*", + "Info.plist" + ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.ios_mac/mac", + "to": "frameworks/runtime-src/proj.ios_mac/mac", + "exclude": [ + "Info.plist", + "Icon.icns", + "build-cfg.json" + ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.win32/build-cfg.json", + "to": "frameworks/runtime-src/proj.win32/", + "exclude": [] + }, + { + "from": "templates/lua-template-default/frameworks/runtime-src/proj.win32/game.rc", + "to": "frameworks/runtime-src/proj.win32/", + "exclude": [] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.win32/main.cpp", + "to": "frameworks/runtime-src/proj.win32/", + "exclude": [] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.win32/main.h", + "to": "frameworks/runtime-src/proj.win32/", + "exclude": [] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.win32/res", + "to": "frameworks/runtime-src/proj.win32/res", + "exclude": [] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.win32/resource.h", + "to": "frameworks/runtime-src/proj.win32/", + "exclude": [] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.cpp", + "to": "frameworks/runtime-src/proj.win32/", + "exclude": [] + }, + { + "from": "tools/simulator/frameworks/runtime-src/proj.win32/SimulatorWin.h", + "to": "frameworks/runtime-src/proj.win32/", + "exclude": [] + } + ], + "append_x_engine":{ + "from": ".", + "to": "frameworks/cocos2d-x" + }, + "project_rename":{ + "src_project_name":"HelloJavascript", + "files":[ + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.filters", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.user", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.sln", + "frameworks/runtime-src/proj.ios_mac/PROJECT_NAME.xcodeproj" + ] + }, + "project_replace_project_name":{ + "src_project_name":"HelloJavascript", + "files":[ + "config.json", + "manifest.webapp", + ".project", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.filters", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.vcxproj.user", + "frameworks/runtime-src/proj.win32/PROJECT_NAME.sln", + "frameworks/runtime-src/proj.win32/main.cpp", + "frameworks/runtime-src/proj.android/.project", + "frameworks/runtime-src/proj.android/AndroidManifest.xml", + "frameworks/runtime-src/proj.android/build.xml", + "frameworks/runtime-src/proj.android/res/values/strings.xml", + "frameworks/runtime-src/proj.ios_mac/ios/main.m", + "frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch", + "frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm", + "frameworks/runtime-src/proj.ios_mac/PROJECT_NAME.xcodeproj/project.pbxproj", + "frameworks/runtime-src/Classes/AppDelegate.cpp" + ] + }, + "project_replace_package_name":{ + "src_package_name":"org.cocos2dx.hellojavascript", + "files":[ + "frameworks/runtime-src/proj.android/AndroidManifest.xml" + ] + }, + "project_replace_mac_bundleid":{ + "src_bundle_id":"org.cocos2dx.hellojavascript", + "files":[ + "frameworks/runtime-src/proj.ios_mac/mac/Info.plist" + ] + }, + "project_replace_ios_bundleid":{ + "src_bundle_id":"org.cocos2dx.hellojavascript", + "files":[ + "frameworks/runtime-src/proj.ios_mac/ios/Info.plist" + ] + } + } +} + diff --git a/templates/js-template-runtime/config.json b/templates/js-template-runtime/config.json new file mode 100644 index 0000000000..dc3ef56c2b --- /dev/null +++ b/templates/js-template-runtime/config.json @@ -0,0 +1,60 @@ +{ + "init_cfg":{ + "isLandscape": true, + "isWindowTop": false, + "name": "HelloJavascript", + "width": 960, + "height": 640, + "entry": "main.js", + "consolePort": 6050, + "uploadPort": 6060, + "debugPort": 5086 + }, + "simulator_screen_size": [ + { + "title": "iPhone 3Gs (480x320)", + "width": 480, + "height": 320 + }, + { + "title": "iPhone 4 (960x640)", + "width": 960, + "height": 640 + }, + { + "title": "iPhone 5 (1136x640)", + "width": 1136, + "height": 640 + }, + { + "title": "iPad (1024x768)", + "width": 1024, + "height": 768 + }, + { + "title": "iPad Retina (2048x1536)", + "width": 2048, + "height": 1536 + }, + { + "title": "Android (800x480)", + "width": 800, + "height": 480 + }, + { + "title": "Android (854x480)", + "width": 854, + "height": 480 + }, + { + "title": "Android (1280x720)", + "width": 1280, + "height": 720 + }, + { + "title": "Android (1920x1080)", + "width": 1920, + "height": 1080 + } + ] +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/js-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp new file mode 100644 index 0000000000..81a01e10c2 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -0,0 +1,102 @@ +#include "AppDelegate.h" +#include "SimpleAudioEngine.h" + +#if (CC_TARGET_PLATFORM != CC_PLATFORM_LINUX) +#include "ide-support/CodeIDESupport.h" +#endif + +#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) +#include "runtime/Runtime.h" +#include "ide-support/RuntimeJsImpl.h" +#else +#include "js_module_register.h" +#endif + +USING_NS_CC; +using namespace CocosDenshion; + +AppDelegate::AppDelegate() +{ +} + +AppDelegate::~AppDelegate() +{ + SimpleAudioEngine::end(); + ScriptEngineManager::destroyInstance(); + +#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) + // NOTE:Please don't remove this call if you want to debug with Cocos Code IDE + RuntimeEngine::getInstance()->end(); +#endif +} + +//if you want a different context,just modify the value of glContextAttrs +//it will takes effect on all platforms +void AppDelegate::initGLContextAttrs() +{ + //set OpenGL context attributions,now can only set six attributions: + //red,green,blue,alpha,depth,stencil + GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8}; + + GLView::setGLContextAttrs(glContextAttrs); +} + +bool AppDelegate::applicationDidFinishLaunching() +{ + // initialize director + auto director = Director::getInstance(); + + // set FPS. the default value is 1.0/60 if you don't call this + director->setAnimationInterval(1.0 / 60); + +#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + // for getIPAddress + extern void setActivityPathForAndroid(const std::string &path); + setActivityPathForAndroid("org/cocos2dx/javascript/AppActivity"); +#endif + + auto runtimeEngine = RuntimeEngine::getInstance(); + auto jsRuntime = RuntimeJsImpl::create(); + runtimeEngine->addRuntime(jsRuntime, kRuntimeEngineJs); + runtimeEngine->start(); + + // js need special debug port + if (runtimeEngine->getProjectConfig().getDebuggerType() != kCCRuntimeDebuggerNone) + { + jsRuntime->startWithDebugger(); + } +#else + js_module_register(); + ScriptingCore* sc = ScriptingCore::getInstance(); + sc->start(); + sc->runScript("script/jsb_boot.js"); + ScriptEngineProtocol *engine = ScriptingCore::getInstance(); + ScriptEngineManager::getInstance()->setScriptEngine(engine); + ScriptingCore::getInstance()->runScript("main.js"); +#endif + + return true; +} + +// This function will be called when the app is inactive. When comes a phone call,it's be invoked too +void AppDelegate::applicationDidEnterBackground() +{ + auto director = Director::getInstance(); + director->stopAnimation(); + director->getEventDispatcher()->dispatchCustomEvent("game_on_hide"); + SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); + SimpleAudioEngine::getInstance()->pauseAllEffects(); +} + +// this function will be called when the app is active again +void AppDelegate::applicationWillEnterForeground() +{ + auto director = Director::getInstance(); + director->startAnimation(); + director->getEventDispatcher()->dispatchCustomEvent("game_on_show"); + SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); + SimpleAudioEngine::getInstance()->resumeAllEffects(); +} + diff --git a/templates/js-template-runtime/frameworks/runtime-src/Classes/AppDelegate.h b/templates/js-template-runtime/frameworks/runtime-src/Classes/AppDelegate.h new file mode 100644 index 0000000000..a17ef82644 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/Classes/AppDelegate.h @@ -0,0 +1,47 @@ +// +// GCTestAppDelegate.h +// GCTest +// +// Created by Rohan Kuruvilla on 06/08/2012. +// Copyright __MyCompanyName__ 2012. All rights reserved. +// + +#ifndef _APP_DELEGATE_H_ +#define _APP_DELEGATE_H_ + +#include "cocos2d.h" +/** + @brief The cocos2d Application. + + The reason for implement as private inheritance is to hide some interface call by Director. + */ +class AppDelegate : private cocos2d::Application +{ +public: + AppDelegate(); + virtual ~AppDelegate(); + + void initGLContextAttrs() override; + + /** + @brief Implement Director and Scene init code here. + @return true Initialize success, app continue. + @return false Initialize failed, app terminate. + */ + virtual bool applicationDidFinishLaunching(); + + /** + @brief The function be called when the application enter background + @param the pointer of the application + */ + virtual void applicationDidEnterBackground(); + + /** + @brief The function be called when the application enter foreground + @param the pointer of the application + */ + virtual void applicationWillEnterForeground(); +}; + +#endif // __APP_DELEGATE_H__ + diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h b/templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h similarity index 100% rename from templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h rename to templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h diff --git a/templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp b/templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp new file mode 100644 index 0000000000..af4e6fff18 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp @@ -0,0 +1,70 @@ + +#include "json/document.h" +#include "json/filestream.h" +#include "json/stringbuffer.h" +#include "json/writer.h" +#include "SimpleConfigParser.h" + +// SimpleConfigParser +SimpleConfigParser *SimpleConfigParser::s_sharedSimpleConfigParserInstance = NULL; +SimpleConfigParser *SimpleConfigParser::getInstance(void) +{ + if (!s_sharedSimpleConfigParserInstance) + { + s_sharedSimpleConfigParserInstance = new SimpleConfigParser(); + s_sharedSimpleConfigParserInstance->readConfig(); + } + return s_sharedSimpleConfigParserInstance; +} + +void SimpleConfigParser::purge() +{ + CC_SAFE_DELETE(s_sharedSimpleConfigParserInstance); +} + +void SimpleConfigParser::readConfig(const string &filepath) +{ + string fullPathFile = filepath; + + // read config file + if (fullPathFile.empty()) + { + fullPathFile = FileUtils::getInstance()->fullPathForFilename(CONFIG_FILE); + } + string fileContent = FileUtils::getInstance()->getStringFromFile(fullPathFile); + + if(fileContent.empty()) + return; + + if (_docRootjson.Parse<0>(fileContent.c_str()).HasParseError()) { + cocos2d::log("read json file %s failed because of %d", fullPathFile.c_str(), _docRootjson.GetParseError()); + return; + } + + if (_docRootjson.HasMember("init_cfg")) + { + if(_docRootjson["init_cfg"].IsObject()) + { + const rapidjson::Value& objectInitView = _docRootjson["init_cfg"]; + if (objectInitView.HasMember("isLandscape") && objectInitView["isLandscape"].IsBool()) + { + _isLandscape = objectInitView["isLandscape"].GetBool(); + } + } + } +} + +SimpleConfigParser::SimpleConfigParser(void) : +_isLandscape(true) +{ +} + +rapidjson::Document& SimpleConfigParser::getConfigJsonRoot() +{ + return _docRootjson; +} + +bool SimpleConfigParser::isLanscape() +{ + return _isLandscape; +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.h b/templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.h new file mode 100644 index 0000000000..2dc1aa0d8f --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.h @@ -0,0 +1,31 @@ +#ifndef __SIMPLE_CONFIG_PARSER_H__ +#define __SIMPLE_CONFIG_PARSER_H__ + +#include +#include +#include "cocos2d.h" +#include "json/document.h" +using namespace std; +USING_NS_CC; + +#define CONFIG_FILE "config.json" + +class SimpleConfigParser +{ +public: + static SimpleConfigParser *getInstance(void); + static void purge(); + + void readConfig(const string &filepath = ""); + bool isLanscape(); + rapidjson::Document& getConfigJsonRoot(); +private: + SimpleConfigParser(void); + static SimpleConfigParser *s_sharedSimpleConfigParserInstance; + bool _isLandscape; + + rapidjson::Document _docRootjson; +}; + +#endif // __SIMPLE_CONFIG_PARSER_H__ + diff --git a/templates/js-template-runtime/frameworks/runtime-src/Classes/js_module_register.h b/templates/js-template-runtime/frameworks/runtime-src/Classes/js_module_register.h new file mode 100644 index 0000000000..561b63bdc7 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/Classes/js_module_register.h @@ -0,0 +1,80 @@ +#ifndef __JS_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_JS_MODULE_HELPER_H__ +#define __JS_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_JS_MODULE_HELPER_H__ + +#include "scripting/js-bindings/manual/ScriptingCore.h" +#include "jsb_cocos2dx_auto.hpp" +#include "jsb_cocos2dx_ui_auto.hpp" +#include "jsb_cocos2dx_studio_auto.hpp" +#include "jsb_cocos2dx_builder_auto.hpp" +#include "jsb_cocos2dx_spine_auto.hpp" +#include "jsb_cocos2dx_extension_auto.hpp" +#include "ui/jsb_cocos2dx_ui_manual.h" +#include "cocostudio/jsb_cocos2dx_studio_manual.h" +#include "cocosbuilder/js_bindings_ccbreader.h" +#include "spine/jsb_cocos2dx_spine_manual.h" +#include "extension/jsb_cocos2dx_extension_manual.h" +#include "localstorage/js_bindings_system_registration.h" +#include "chipmunk/js_bindings_chipmunk_registration.h" +#include "jsb_opengl_registration.h" +#include "network/XMLHTTPRequest.h" +#include "network/jsb_websocket.h" +#include "network/jsb_socketio.h" +#include "cocos2d_specifics.hpp" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "platform/android/CCJavascriptJavaBridge.h" +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) +#include "platform/ios/JavaScriptObjCBridge.h" +#endif + +USING_NS_CC; +int js_module_register() +{ + ScriptingCore* sc = ScriptingCore::getInstance(); + sc->addRegisterCallback(register_all_cocos2dx); + sc->addRegisterCallback(register_cocos2dx_js_core); + //sc->addRegisterCallback(register_cocos2dx_js_extensions); + sc->addRegisterCallback(jsb_register_system); + + // extension can be commented out to reduce the package + sc->addRegisterCallback(register_all_cocos2dx_extension); + sc->addRegisterCallback(register_all_cocos2dx_extension_manual); + + // chipmunk can be commented out to reduce the package + sc->addRegisterCallback(jsb_register_chipmunk); + // opengl can be commented out to reduce the package + sc->addRegisterCallback(JSB_register_opengl); + + // builder can be commented out to reduce the package + sc->addRegisterCallback(register_all_cocos2dx_builder); + sc->addRegisterCallback(register_CCBuilderReader); + + // ui can be commented out to reduce the package, attension studio need ui module + sc->addRegisterCallback(register_all_cocos2dx_ui); + sc->addRegisterCallback(register_all_cocos2dx_ui_manual); + + // studio can be commented out to reduce the package, + sc->addRegisterCallback(register_all_cocos2dx_studio); + sc->addRegisterCallback(register_all_cocos2dx_studio_manual); + + // spine can be commented out to reduce the package + sc->addRegisterCallback(register_all_cocos2dx_spine); + sc->addRegisterCallback(register_all_cocos2dx_spine_manual); + + // XmlHttpRequest can be commented out to reduce the package + sc->addRegisterCallback(MinXmlHttpRequest::_js_register); + // websocket can be commented out to reduce the package + sc->addRegisterCallback(register_jsb_websocket); + // sokcet io can be commented out to reduce the package + sc->addRegisterCallback(register_jsb_socketio); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + sc->addRegisterCallback(JavascriptJavaBridge::_js_register); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS|| CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + sc->addRegisterCallback(JavaScriptObjCBridge::_js_register); +#endif + return 1; +} + +#endif // __JS_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_JS_MODULE_HELPER_H__ + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/.classpath b/templates/js-template-runtime/frameworks/runtime-src/proj.android/.classpath new file mode 100644 index 0000000000..d57ec02513 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/.project b/templates/js-template-runtime/frameworks/runtime-src/proj.android/.project new file mode 100644 index 0000000000..df461895c5 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/.project @@ -0,0 +1,65 @@ + + + HelloJavascript + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Classes + 2 + COCOS2DX/projects/HelloJavascript/Classes + + + cocos2dx + 2 + COCOS2DX/cocos2dx + + + extensions + 2 + COCOS2DX/extensions + + + scripting + 2 + COCOS2DX/scripting + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/.settings/org.eclipse.jdt.core.prefs b/templates/js-template-runtime/frameworks/runtime-src/proj.android/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..b080d2ddc8 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/AndroidManifest.xml b/templates/js-template-runtime/frameworks/runtime-src/proj.android/AndroidManifest.xml new file mode 100644 index 0000000000..0aaa49d85f --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/README.md b/templates/js-template-runtime/frameworks/runtime-src/proj.android/README.md new file mode 100644 index 0000000000..312835611a --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/README.md @@ -0,0 +1,87 @@ +## Prerequisites: + +* Android NDK +* Android SDK **OR** Eclipse ADT Bundle +* Android AVD target installed + +## Building project + +There are two ways of building Android projects. + +1. Eclipse +2. Command Line + +### Import Project in Eclipse + +#### Features: + +1. Complete workflow from Eclipse, including: + * Build C++. + * Clean C++. + * Build and Run whole project. + * Logcat view. + * Debug Java code. + * Javascript editor. + * Project management. +2. True C++ editing, including: + * Code completion. + * Jump to definition. + * Refactoring tools etc. + * Quick open C++ files. + + +#### Setup Eclipse Environment (only once) + + +**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. + +1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) + + **OR** + + Install Eclipse with Java. Add ADT and CDT plugins. + +2. Only for Windows + 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). + 2. Add `Cygwin\bin` directory to system PATH variable. + 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. + +3. Set up Variables: + 1. Path Variable `COCOS2DX`: + * Eclipse->Preferences->General->Workspace->**Linked Resources** + * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. + ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) + + 2. C/C++ Environment Variable `NDK_ROOT`: + * Eclipse->Preferences->C/C++->Build->**Environment**. + * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. + ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) + * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` + +4. Import libcocos2dx library project: + 1. File->New->Project->Android Project From Existing Code. + 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. + 3. Click **Finish** to add project. + +#### Adding and running from Eclipse + +![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) + +1. File->New->Project->Android Project From Existing Code +2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` +3. Add the project +4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. + + +### Running project from Command Line + + $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ + $ export NDK_ROOT=/path/to/ndk + $ ./build_native.sh + $ ant debug install + +If the last command results in sdk.dir missing error then do: + + $ android list target + $ android update project -p . -t (id from step 6) + $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/ant.properties b/templates/js-template-runtime/frameworks/runtime-src/proj.android/ant.properties new file mode 100644 index 0000000000..f8af38bfb4 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/ant.properties @@ -0,0 +1 @@ +aapt.ignore.assets="!*.pvr.gz:!*.gz:!.svn:!.git:.*:_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json b/templates/js-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json new file mode 100644 index 0000000000..fe8df19150 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json @@ -0,0 +1,35 @@ +{ + "ndk_module_path" :[ + "../../cocos2d-x", + "../../cocos2d-x/cocos", + "../../cocos2d-x/external" + ], + "copy_resources": [ + { + "from": "../../../src", + "to": "src" + }, + { + "from": "../../../res", + "to": "res" + }, + { + "from": "../../../main.js", + "to": "" + } + ], + "must_copy_resources": [ + { + "from": "../../cocos2d-x/cocos/scripting/js-bindings/script", + "to": "script" + }, + { + "from": "../../../config.json", + "to": "" + }, + { + "from": "../../../project.json", + "to": "" + } + ] +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/build.xml b/templates/js-template-runtime/frameworks/runtime-src/proj.android/build.xml new file mode 100644 index 0000000000..b46375fda9 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk b/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk new file mode 100644 index 0000000000..d2bd9dbe81 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk @@ -0,0 +1,30 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos2djs_shared + +LOCAL_MODULE_FILENAME := libcocos2djs + +LOCAL_ARM_MODE := arm + +LOCAL_SRC_FILES := \ +../../Classes/AppDelegate.cpp \ +../../Classes/ide-support/SimpleConfigParser.cpp \ +../../Classes/ide-support/RuntimeJsImpl.cpp \ +hellojavascript/main.cpp + +LOCAL_C_INCLUDES := \ +$(LOCAL_PATH)/../../Classes \ +$(LOCAL_PATH)/../../../cocos2d-x/tools/simulator/libsimulator/lib \ +$(LOCAL_PATH)/../../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite + + +LOCAL_STATIC_LIBRARIES := cocos2d_js_static +LOCAL_STATIC_LIBRARIES += cocos2d_simulator_static + +include $(BUILD_SHARED_LIBRARY) + + +$(call import-module,scripting/js-bindings/proj.android) +$(call import-module,tools/simulator/libsimulator/proj.android) diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Application.mk b/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Application.mk new file mode 100644 index 0000000000..c36a5d06ec --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/Application.mk @@ -0,0 +1,16 @@ +APP_STL := gnustl_static + +# Uncomment this line to compile to armeabi-v7a, your application will run faster but support less devices +#APP_ABI := armeabi-v7a + +APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char +APP_LDFLAGS := -latomic + +ifeq ($(NDK_DEBUG),1) + APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 + APP_OPTIM := debug +else + APP_CPPFLAGS += -DNDEBUG + APP_OPTIM := release +endif + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/hellojavascript/main.cpp b/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/hellojavascript/main.cpp new file mode 100644 index 0000000000..bb3ea221bc --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/jni/hellojavascript/main.cpp @@ -0,0 +1,34 @@ +#include "AppDelegate.h" +#include "cocos2d.h" +#include "platform/android/jni/JniHelper.h" +#include +#include +#include "ide-support/SimpleConfigParser.h" + +#define LOG_TAG "main" +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) + +using namespace cocos2d; + +void cocos_android_app_init (JNIEnv* env, jobject thiz) { + LOGD("cocos_android_app_init"); + AppDelegate *pAppDelegate = new AppDelegate(); +} + + +extern "C" +{ + bool Java_org_cocos2dx_javascript_AppActivity_nativeIsLandScape(JNIEnv *env, jobject thisz) + { + return SimpleConfigParser::getInstance()->isLanscape(); + } + + bool Java_org_cocos2dx_javascript_AppActivity_nativeIsDebug(JNIEnv *env, jobject thisz) + { +#if (COCOS2D_DEBUG > 0) + return true; +#else + return false; +#endif + } +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/proguard-project.txt b/templates/js-template-runtime/frameworks/runtime-src/proj.android/proguard-project.txt new file mode 100644 index 0000000000..f2fe1559a2 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/project.properties b/templates/js-template-runtime/frameworks/runtime-src/proj.android/project.properties new file mode 100644 index 0000000000..8e5895514b --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/project.properties @@ -0,0 +1,13 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 + +android.library.reference.1=../../cocos2d-x/cocos/platform/android/java diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-hdpi/icon.png b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-hdpi/icon.png new file mode 100644 index 0000000000..8aa4767c2f Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-hdpi/icon.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-ldpi/icon.png b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-ldpi/icon.png new file mode 100644 index 0000000000..17ce11a085 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-ldpi/icon.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-mdpi/icon.png b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-mdpi/icon.png new file mode 100644 index 0000000000..3780aac46c Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/drawable-mdpi/icon.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/values/strings.xml b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/values/strings.xml new file mode 100644 index 0000000000..c847de2851 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/res/values/strings.xml @@ -0,0 +1,4 @@ + + + HelloJavascript + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/javascript/AppActivity.java b/templates/js-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/javascript/AppActivity.java new file mode 100644 index 0000000000..c1ec91b5eb --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/javascript/AppActivity.java @@ -0,0 +1,83 @@ +/**************************************************************************** +Copyright (c) 2008-2010 Ricardo Quesada +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2011 Zynga Inc. +Copyright (c) 2013-2014 Chukong Technologies Inc. + +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. +****************************************************************************/ +package org.cocos2dx.javascript; + +import org.cocos2dx.lib.Cocos2dxActivity; +import org.cocos2dx.lib.Cocos2dxGLSurfaceView; +import android.content.pm.ActivityInfo; +import android.net.wifi.WifiInfo; +import android.net.wifi.WifiManager; +import android.os.Bundle; +import android.view.WindowManager; + + +// The name of .so is specified in AndroidMenifest.xml. NativityActivity will load it automatically for you. +// You can use "System.loadLibrary()" to load other .so files. + +public class AppActivity extends Cocos2dxActivity{ + + static String hostIPAdress = "0.0.0.0"; + @Override + protected void onCreate(Bundle savedInstanceState) { + // TODO Auto-generated method stub + super.onCreate(savedInstanceState); + + if(nativeIsLandScape()) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); + } else { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); + } + if(nativeIsDebug()){ + getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + } + hostIPAdress = getHostIpAddress(); + } + + @Override + public Cocos2dxGLSurfaceView onCreateView() { + Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); + // TestCpp should create stencil buffer + glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8); + + return glSurfaceView; + } + + public String getHostIpAddress() { + WifiManager wifiMgr = (WifiManager) getSystemService(WIFI_SERVICE); + WifiInfo wifiInfo = wifiMgr.getConnectionInfo(); + int ip = wifiInfo.getIpAddress(); + return ((ip & 0xFF) + "." + ((ip >>>= 8) & 0xFF) + "." + ((ip >>>= 8) & 0xFF) + "." + ((ip >>>= 8) & 0xFF)); + } + + public static String getLocalIpAddress() { + return hostIPAdress; + } + + private static native boolean nativeIsLandScape(); + private static native boolean nativeIsDebug(); + +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..3c49e23c65 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj @@ -0,0 +1,1224 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1A67682A180E9C060076BC67 /* libcocos2dx Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */; }; + 1A676839180E9C1E0076BC67 /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */; }; + 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; + 1AC22EDE18CA0E11007112B9 /* project.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A1A081B18C9DF05005C6854 /* project.json */; }; + 1AD7E0A818C9DB93004817A6 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6BF21418C9DB5900FB0E1C /* main.js */; }; + 1AD7E0A918C9DBE3004817A6 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6BF21418C9DB5900FB0E1C /* main.js */; }; + 1AE159EC18C9DF3600FCA372 /* project.json in Resources */ = {isa = PBXBuildFile; fileRef = 1A1A081B18C9DF05005C6854 /* project.json */; }; + 3E12D1A51957FA03002FF0FD /* script in Resources */ = {isa = PBXBuildFile; fileRef = 3E12D1A41957FA03002FF0FD /* script */; }; + 3E12D1A61957FA03002FF0FD /* script in Resources */ = {isa = PBXBuildFile; fileRef = 3E12D1A41957FA03002FF0FD /* script */; }; + 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 502380DB17EBB88200990C9B /* libcurl.dylib */; }; + 5091731A17ECDF7A00D62437 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731417ECDF7A00D62437 /* Icon-29.png */; }; + 5091731B17ECDF7A00D62437 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731517ECDF7A00D62437 /* Icon-40.png */; }; + 5091731C17ECDF7A00D62437 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731617ECDF7A00D62437 /* Icon-50.png */; }; + 5091731D17ECDF7A00D62437 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731717ECDF7A00D62437 /* Icon-58.png */; }; + 5091731E17ECDF7A00D62437 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731817ECDF7A00D62437 /* Icon-80.png */; }; + 5091731F17ECDF7A00D62437 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731917ECDF7A00D62437 /* Icon-100.png */; }; + 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; + 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; + 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; + 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; + 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; + 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; }; + 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; }; + 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; }; + 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AAC17EBB2AB00697056 /* AppController.mm */; }; + 509D4ABD17EBB2AB00697056 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */; }; + 509D4ABE17EBB2AB00697056 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAE17EBB2AB00697056 /* Default.png */; }; + 509D4ABF17EBB2AB00697056 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAF17EBB2AB00697056 /* Default@2x.png */; }; + 509D4AC017EBB2AB00697056 /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB017EBB2AB00697056 /* Icon-57.png */; }; + 509D4AC117EBB2AB00697056 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB117EBB2AB00697056 /* Icon-72.png */; }; + 509D4AC217EBB2AB00697056 /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB217EBB2AB00697056 /* Icon-76.png */; }; + 509D4AC317EBB2AB00697056 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB317EBB2AB00697056 /* Icon-114.png */; }; + 509D4AC417EBB2AB00697056 /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB417EBB2AB00697056 /* Icon-120.png */; }; + 509D4AC517EBB2AB00697056 /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB517EBB2AB00697056 /* Icon-144.png */; }; + 509D4AC617EBB2AB00697056 /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB617EBB2AB00697056 /* Icon-152.png */; }; + 509D4AC817EBB2AB00697056 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AB817EBB2AB00697056 /* main.m */; }; + 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4ABB17EBB2AB00697056 /* RootViewController.mm */; }; + 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 509D4ACB17EBB2BE00697056 /* Icon.icns */; }; + 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE617EBB81800697056 /* OpenGL.framework */; }; + 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE817EBB82000697056 /* AppKit.framework */; }; + 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AEA17EBB82600697056 /* IOKit.framework */; }; + 87D4C4451AB2187000F68C44 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87D4C4441AB2187000F68C44 /* Security.framework */; }; + 9F20C9E61A5BD38A006FB50B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F20C9E11A5BBE85006FB50B /* Security.framework */; }; + 9FD1E6B11A51361B0009A6C5 /* ConsoleWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD1E69E1A51361B0009A6C5 /* ConsoleWindow.xib */; }; + 9FD1E6B21A51361B0009A6C5 /* ConsoleWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6A01A51361B0009A6C5 /* ConsoleWindowController.m */; }; + 9FD1E6B31A51361B0009A6C5 /* DeviceEx-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6A11A51361B0009A6C5 /* DeviceEx-mac.mm */; }; + 9FD1E6B41A51361B0009A6C5 /* OpenUDIDMac.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6A41A51361B0009A6C5 /* OpenUDIDMac.m */; }; + 9FD1E6B51A51361B0009A6C5 /* PlayerEditBoxServiceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6A61A51361B0009A6C5 /* PlayerEditBoxServiceMac.mm */; }; + 9FD1E6B61A51361B0009A6C5 /* PlayerFileDialogServiceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6A81A51361B0009A6C5 /* PlayerFileDialogServiceMac.mm */; }; + 9FD1E6B71A51361B0009A6C5 /* PlayerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6AA1A51361B0009A6C5 /* PlayerMac.mm */; }; + 9FD1E6B81A51361B0009A6C5 /* PlayerMenuServiceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6AC1A51361B0009A6C5 /* PlayerMenuServiceMac.mm */; }; + 9FD1E6B91A51361B0009A6C5 /* PlayerMessageBoxServiceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6AE1A51361B0009A6C5 /* PlayerMessageBoxServiceMac.mm */; }; + 9FD1E6BA1A51361B0009A6C5 /* PlayerTaskServiceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FD1E6B01A51361B0009A6C5 /* PlayerTaskServiceMac.mm */; }; + 9FD1E6BD1A51362E0009A6C5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9FD1E6BB1A51362E0009A6C5 /* MainMenu.xib */; }; + 9FFEB9A91A6AB7F70095C43A /* lang in Resources */ = {isa = PBXBuildFile; fileRef = 9FFEB9A01A6AB7F70095C43A /* lang */; }; + 9FFEB9AC1A6AB7F70095C43A /* RuntimeJsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FFEB9A31A6AB7F70095C43A /* RuntimeJsImpl.cpp */; }; + 9FFEB9AD1A6AB7F70095C43A /* RuntimeJsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FFEB9A31A6AB7F70095C43A /* RuntimeJsImpl.cpp */; }; + 9FFEB9BF1A6ABE9C0095C43A /* libsimulator Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FFEB9B81A6AB8810095C43A /* libsimulator Mac.a */; }; + 9FFEB9C21A6B86360095C43A /* SimpleConfigParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FFEB9C01A6B86360095C43A /* SimpleConfigParser.cpp */; }; + 9FFEB9C31A6B87420095C43A /* libsimulator iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FFEB9BA1A6AB8810095C43A /* libsimulator iOS.a */; }; + A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; + A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275431517C094001B78AA /* OpenGLES.framework */; }; + A92275461517C094001B78AA /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; + A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; }; + A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275491517C094001B78AA /* AVFoundation.framework */; }; + A922754C1517C094001B78AA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754B1517C094001B78AA /* UIKit.framework */; }; + A922754E1517C094001B78AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; }; + A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; }; + BA4E718719EB6E7900932425 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA4E718619EB6E7900932425 /* MediaPlayer.framework */; }; + C03780EB18BEE0E400FE4F13 /* src in Resources */ = {isa = PBXBuildFile; fileRef = C03780EA18BEE0E400FE4F13 /* src */; }; + C03780EC18BEE0E400FE4F13 /* src in Resources */ = {isa = PBXBuildFile; fileRef = C03780EA18BEE0E400FE4F13 /* src */; }; + C037820C18BF77C500FE4F13 /* libjscocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C037820918BF76AF00FE4F13 /* libjscocos2d iOS.a */; }; + C037820F18BF77DE00FE4F13 /* libjscocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C037820718BF76AF00FE4F13 /* libjscocos2d Mac.a */; }; + C03C8B4B18A770DD00723415 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C03C8B4818A770DD00723415 /* main.m */; }; + C05D1C171923467600B808A4 /* config.json in Resources */ = {isa = PBXBuildFile; fileRef = C05D1C161923467600B808A4 /* config.json */; }; + C05D1C181923467600B808A4 /* config.json in Resources */ = {isa = PBXBuildFile; fileRef = C05D1C161923467600B808A4 /* config.json */; }; + C0799CB918BAE62000E9C828 /* res in Resources */ = {isa = PBXBuildFile; fileRef = C0799CB518BAE62000E9C828 /* res */; }; + C0799CBA18BAE62000E9C828 /* res in Resources */ = {isa = PBXBuildFile; fileRef = C0799CB518BAE62000E9C828 /* res */; }; + C0C2F37418AA0C66003976DA /* SimulatorApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C2F37318AA0C66003976DA /* SimulatorApp.mm */; }; + D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; + D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; + D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B061231803AB9F0077942B /* CoreMotion.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1A67681F180E9BF70076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1A676821180E9BF70076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2FC117814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1A676823180E9BF70076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2B781780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1A676825180E9BF70076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F2E9817814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1A67682E180E9C110076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4C241783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 1A676830180E9C110076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4E111783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1A676832180E9C110076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4EFD178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1A676834180E9C110076BC67 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4F9F178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; + 1AC6FB47180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = "cocos2dx Mac"; + }; + 1AC6FB49180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2FD617814595006731B9; + remoteInfo = "cocos2dx-extensions Mac"; + }; + 1AC6FB4B180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2CB81780BD04006731B9; + remoteInfo = "chipmunk Mac"; + }; + 1AC6FB4D180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2D9B1780BDF7006731B9; + remoteInfo = "box2d Mac"; + }; + 1AC6FB4F180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A03F2ED617814268006731B9; + remoteInfo = "CocosDenshion Mac"; + }; + 1AC6FB55180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4D641783777C0073F6A7; + remoteInfo = "cocos2dx iOS"; + }; + 9FFEB9B71A6AB8810095C43A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FFEB9B21A6AB8810095C43A /* libsimulator.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9F7214351A5C271F00DAED06; + remoteInfo = "libsimulator Mac"; + }; + 9FFEB9B91A6AB8810095C43A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FFEB9B21A6AB8810095C43A /* libsimulator.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9F7214851A5C28BA00DAED06; + remoteInfo = "libsimulator iOS"; + }; + 9FFEB9BB1A6AB8940095C43A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FFEB9B21A6AB8810095C43A /* libsimulator.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 9F7214341A5C271F00DAED06; + remoteInfo = "libsimulator Mac"; + }; + 9FFEB9BD1A6AB89B0095C43A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9FFEB9B21A6AB8810095C43A /* libsimulator.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 9F7214841A5C28BA00DAED06; + remoteInfo = "libsimulator iOS"; + }; + 1AC6FB57180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4EFC1783867C0073F6A7; + remoteInfo = "cocos2dx-extensions iOS"; + }; + 1AC6FB59180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F3B178387670073F6A7; + remoteInfo = "chipmunk iOS"; + }; + 1AC6FB5B180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4F9E1783876B0073F6A7; + remoteInfo = "box2d iOS"; + }; + 1AC6FB5D180E9ACB004C840B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = A07A4FB4178387730073F6A7; + remoteInfo = "CocosDenshion iOS"; + }; + C037820618BF76AF00FE4F13 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C037820118BF76AF00FE4F13 /* cocos2d_js_bindings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1A5410A418B785A10016A3AF; + remoteInfo = "jsbindings Mac"; + }; + C037820818BF76AF00FE4F13 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C037820118BF76AF00FE4F13 /* cocos2d_js_bindings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1A5410A518B785A10016A3AF; + remoteInfo = "jsbindings iOS"; + }; + C037820A18BF77BC00FE4F13 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C037820118BF76AF00FE4F13 /* cocos2d_js_bindings.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A07A4FB5178387750073F6A7; + remoteInfo = "jsbindings iOS"; + }; + C037820D18BF77D100FE4F13 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C037820118BF76AF00FE4F13 /* cocos2d_js_bindings.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = A03F31E81781479B006731B9; + remoteInfo = "jsbindings Mac"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1A1A081B18C9DF05005C6854 /* project.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = project.json; path = ../../../project.json; sourceTree = ""; }; + 1A6BF21418C9DB5900FB0E1C /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../../main.js; sourceTree = ""; }; + 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + 1A96A4F2174A3432008653A9 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = "../../cocos2d-x/cocos2dx/platform/third_party/ios/libraries/libcurl.a"; sourceTree = ""; }; + 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = "../../cocos2d-x/build/cocos2d_libs.xcodeproj"; sourceTree = ""; }; + 3E12D1A41957FA03002FF0FD /* script */ = {isa = PBXFileReference; lastKnownFileType = folder; name = script; path = "../../cocos2d-x/cocos/scripting/js-bindings/script"; sourceTree = ""; }; + 502380DB17EBB88200990C9B /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; + 5091731417ECDF7A00D62437 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-29.png"; path = "ios/Icon-29.png"; sourceTree = ""; }; + 5091731517ECDF7A00D62437 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-40.png"; path = "ios/Icon-40.png"; sourceTree = ""; }; + 5091731617ECDF7A00D62437 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-50.png"; path = "ios/Icon-50.png"; sourceTree = ""; }; + 5091731717ECDF7A00D62437 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-58.png"; path = "ios/Icon-58.png"; sourceTree = ""; }; + 5091731817ECDF7A00D62437 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-80.png"; path = "ios/Icon-80.png"; sourceTree = ""; }; + 5091731917ECDF7A00D62437 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-100.png"; path = "ios/Icon-100.png"; sourceTree = ""; }; + 509D4AAA17EBB24E00697056 /* HelloJavascript-desktop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloJavascript-desktop.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 509D4AAB17EBB2AB00697056 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = ""; }; + 509D4AAC17EBB2AB00697056 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = ""; }; + 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "ios/Default-568h@2x.png"; sourceTree = ""; }; + 509D4AAE17EBB2AB00697056 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ios/Default.png; sourceTree = ""; }; + 509D4AAF17EBB2AB00697056 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "ios/Default@2x.png"; sourceTree = ""; }; + 509D4AB017EBB2AB00697056 /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-57.png"; path = "ios/Icon-57.png"; sourceTree = ""; }; + 509D4AB117EBB2AB00697056 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "ios/Icon-72.png"; sourceTree = ""; }; + 509D4AB217EBB2AB00697056 /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-76.png"; path = "ios/Icon-76.png"; sourceTree = ""; }; + 509D4AB317EBB2AB00697056 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-114.png"; path = "ios/Icon-114.png"; sourceTree = ""; }; + 509D4AB417EBB2AB00697056 /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-120.png"; path = "ios/Icon-120.png"; sourceTree = ""; }; + 509D4AB517EBB2AB00697056 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-144.png"; path = "ios/Icon-144.png"; sourceTree = ""; }; + 509D4AB617EBB2AB00697056 /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-152.png"; path = "ios/Icon-152.png"; sourceTree = ""; }; + 509D4AB717EBB2AB00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ios/Info.plist; sourceTree = ""; }; + 509D4AB817EBB2AB00697056 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ios/main.m; sourceTree = ""; }; + 509D4AB917EBB2AB00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = ios/Prefix.pch; sourceTree = ""; }; + 509D4ABA17EBB2AB00697056 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = ios/RootViewController.h; sourceTree = ""; }; + 509D4ABB17EBB2AB00697056 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RootViewController.mm; path = ios/RootViewController.mm; sourceTree = ""; }; + 509D4ACB17EBB2BE00697056 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; + 509D4ACC17EBB2BE00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 509D4ACE17EBB2BE00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; + 509D4AE617EBB81800697056 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + 509D4AE817EBB82000697056 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 509D4AEA17EBB82600697056 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 87D4C4441AB2187000F68C44 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + 9F20C9E11A5BBE85006FB50B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; + 9FD1E69E1A51361B0009A6C5 /* ConsoleWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConsoleWindow.xib; sourceTree = ""; }; + 9FD1E69F1A51361B0009A6C5 /* ConsoleWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleWindowController.h; sourceTree = ""; }; + 9FD1E6A01A51361B0009A6C5 /* ConsoleWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConsoleWindowController.m; sourceTree = ""; }; + 9FD1E6A11A51361B0009A6C5 /* DeviceEx-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "DeviceEx-mac.mm"; sourceTree = ""; }; + 9FD1E6A31A51361B0009A6C5 /* OpenUDIDMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenUDIDMac.h; sourceTree = ""; }; + 9FD1E6A41A51361B0009A6C5 /* OpenUDIDMac.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpenUDIDMac.m; sourceTree = ""; }; + 9FD1E6A51A51361B0009A6C5 /* PlayerEditBoxServiceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerEditBoxServiceMac.h; sourceTree = ""; }; + 9FD1E6A61A51361B0009A6C5 /* PlayerEditBoxServiceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlayerEditBoxServiceMac.mm; sourceTree = ""; }; + 9FD1E6A71A51361B0009A6C5 /* PlayerFileDialogServiceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerFileDialogServiceMac.h; sourceTree = ""; }; + 9FD1E6A81A51361B0009A6C5 /* PlayerFileDialogServiceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlayerFileDialogServiceMac.mm; sourceTree = ""; }; + 9FD1E6A91A51361B0009A6C5 /* PlayerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerMac.h; sourceTree = ""; }; + 9FD1E6AA1A51361B0009A6C5 /* PlayerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlayerMac.mm; sourceTree = ""; }; + 9FD1E6AB1A51361B0009A6C5 /* PlayerMenuServiceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerMenuServiceMac.h; sourceTree = ""; }; + 9FD1E6AC1A51361B0009A6C5 /* PlayerMenuServiceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlayerMenuServiceMac.mm; sourceTree = ""; }; + 9FD1E6AD1A51361B0009A6C5 /* PlayerMessageBoxServiceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerMessageBoxServiceMac.h; sourceTree = ""; }; + 9FD1E6AE1A51361B0009A6C5 /* PlayerMessageBoxServiceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlayerMessageBoxServiceMac.mm; sourceTree = ""; }; + 9FD1E6AF1A51361B0009A6C5 /* PlayerTaskServiceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerTaskServiceMac.h; sourceTree = ""; }; + 9FD1E6B01A51361B0009A6C5 /* PlayerTaskServiceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlayerTaskServiceMac.mm; sourceTree = ""; }; + 9FD1E6BC1A51362E0009A6C5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 9FD1E6BE1A5136370009A6C5 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "zh-Hans"; path = "zh-Hans.lproj/MainMenu.xib"; sourceTree = ""; }; + 9FFEB99F1A6AB7F70095C43A /* CodeIDESupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeIDESupport.h; sourceTree = ""; }; + 9FFEB9A01A6AB7F70095C43A /* lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lang; sourceTree = ""; }; + 9FFEB9A31A6AB7F70095C43A /* RuntimeJsImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeJsImpl.cpp; sourceTree = ""; }; + 9FFEB9A41A6AB7F70095C43A /* RuntimeJsImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeJsImpl.h; sourceTree = ""; }; + 9FFEB9A71A6AB7F70095C43A /* js_module_register.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_module_register.h; sourceTree = ""; }; + 9FFEB9B21A6AB8810095C43A /* libsimulator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libsimulator.xcodeproj; path = "../../cocos2d-x/tools/simulator/libsimulator/proj.ios_mac/libsimulator.xcodeproj"; sourceTree = ""; }; + 9FFEB9C01A6B86360095C43A /* SimpleConfigParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleConfigParser.cpp; sourceTree = ""; }; + 9FFEB9C11A6B86360095C43A /* SimpleConfigParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleConfigParser.h; sourceTree = ""; }; + A922753D1517C094001B78AA /* HelloJavascript-mobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloJavascript-mobile.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + A92275411517C094001B78AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + A92275431517C094001B78AA /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + A92275451517C094001B78AA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + A92275471517C094001B78AA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + A92275491517C094001B78AA /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + A922754B1517C094001B78AA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + A922754D1517C094001B78AA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + A922754F1517C094001B78AA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + BA4E718619EB6E7900932425 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/MediaPlayer.framework; sourceTree = DEVELOPER_DIR; }; + C03780EA18BEE0E400FE4F13 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../../../src; sourceTree = ""; }; + C037820118BF76AF00FE4F13 /* cocos2d_js_bindings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_js_bindings.xcodeproj; path = "../../cocos2d-x/cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj"; sourceTree = ""; }; + C03C8B4818A770DD00723415 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + C05D1C161923467600B808A4 /* config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = config.json; path = ../../../config.json; sourceTree = ""; }; + C0799CB518BAE62000E9C828 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../../../res; sourceTree = ""; }; + C0C2F37218AA0C66003976DA /* SimulatorApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatorApp.h; sourceTree = ""; }; + C0C2F37318AA0C66003976DA /* SimulatorApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimulatorApp.mm; sourceTree = ""; }; + D454520B156E22BD00887EB5 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + D4545215156E28EF00887EB5 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; + D4545216156E28EF00887EB5 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + D6B061231803AB9F0077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 509D4A8217EBB24E00697056 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 87D4C4451AB2187000F68C44 /* Security.framework in Frameworks */, + 9FFEB9BF1A6ABE9C0095C43A /* libsimulator Mac.a in Frameworks */, + C037820F18BF77DE00FE4F13 /* libjscocos2d Mac.a in Frameworks */, + 1A67682A180E9C060076BC67 /* libcocos2dx Mac.a in Frameworks */, + 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */, + 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */, + 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */, + 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */, + 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */, + 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */, + 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */, + 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */, + 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */, + 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */, + 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A922753A1517C094001B78AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9FFEB9C31A6B87420095C43A /* libsimulator iOS.a in Frameworks */, + 9F20C9E61A5BD38A006FB50B /* Security.framework in Frameworks */, + BA4E718719EB6E7900932425 /* MediaPlayer.framework in Frameworks */, + C037820C18BF77C500FE4F13 /* libjscocos2d iOS.a in Frameworks */, + 1A676839180E9C1E0076BC67 /* libcocos2dx iOS.a in Frameworks */, + D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */, + 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */, + D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */, + A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */, + A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */, + A92275461517C094001B78AA /* OpenAL.framework in Frameworks */, + A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */, + A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */, + A922754C1517C094001B78AA /* UIKit.framework in Frameworks */, + A922754E1517C094001B78AA /* Foundation.framework in Frameworks */, + A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 15628F5B15F0F5C2000CF24B /* Resources */ = { + isa = PBXGroup; + children = ( + C05D1C161923467600B808A4 /* config.json */, + 1A1A081B18C9DF05005C6854 /* project.json */, + 1A6BF21418C9DB5900FB0E1C /* main.js */, + C0799CB518BAE62000E9C828 /* res */, + C03780EA18BEE0E400FE4F13 /* src */, + ); + name = Resources; + sourceTree = ""; + }; + 1AC6FB35180E9ACB004C840B /* Products */ = { + isa = PBXGroup; + children = ( + 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */, + 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */, + 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */, + 1AC6FB4E180E9ACB004C840B /* libbox2d Mac.a */, + 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */, + 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */, + 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */, + 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */, + 1AC6FB5C180E9ACB004C840B /* libbox2d iOS.a */, + 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 5091732E17ECDF8A00D62437 /* Icons */ = { + isa = PBXGroup; + children = ( + 5091731417ECDF7A00D62437 /* Icon-29.png */, + 5091731517ECDF7A00D62437 /* Icon-40.png */, + 5091731617ECDF7A00D62437 /* Icon-50.png */, + 5091731717ECDF7A00D62437 /* Icon-58.png */, + 5091731817ECDF7A00D62437 /* Icon-80.png */, + 5091731917ECDF7A00D62437 /* Icon-100.png */, + 509D4AB017EBB2AB00697056 /* Icon-57.png */, + 509D4AB117EBB2AB00697056 /* Icon-72.png */, + 509D4AB217EBB2AB00697056 /* Icon-76.png */, + 509D4AB317EBB2AB00697056 /* Icon-114.png */, + 509D4AB417EBB2AB00697056 /* Icon-120.png */, + 509D4AB517EBB2AB00697056 /* Icon-144.png */, + 509D4AB617EBB2AB00697056 /* Icon-152.png */, + ); + name = Icons; + sourceTree = ""; + }; + 509D4ACA17EBB2BE00697056 /* mac */ = { + isa = PBXGroup; + children = ( + 9FD1E69D1A51361B0009A6C5 /* service */, + C0C2F37218AA0C66003976DA /* SimulatorApp.h */, + C0C2F37318AA0C66003976DA /* SimulatorApp.mm */, + C03C8B4818A770DD00723415 /* main.m */, + 9FD1E6BB1A51362E0009A6C5 /* MainMenu.xib */, + 509D4ACB17EBB2BE00697056 /* Icon.icns */, + 509D4ACC17EBB2BE00697056 /* Info.plist */, + 509D4ACE17EBB2BE00697056 /* Prefix.pch */, + ); + path = mac; + sourceTree = ""; + }; + 9FD1E69D1A51361B0009A6C5 /* service */ = { + isa = PBXGroup; + children = ( + 9FD1E69E1A51361B0009A6C5 /* ConsoleWindow.xib */, + 9FD1E69F1A51361B0009A6C5 /* ConsoleWindowController.h */, + 9FD1E6A01A51361B0009A6C5 /* ConsoleWindowController.m */, + 9FD1E6A11A51361B0009A6C5 /* DeviceEx-mac.mm */, + 9FD1E6A21A51361B0009A6C5 /* openudid */, + 9FD1E6A51A51361B0009A6C5 /* PlayerEditBoxServiceMac.h */, + 9FD1E6A61A51361B0009A6C5 /* PlayerEditBoxServiceMac.mm */, + 9FD1E6A71A51361B0009A6C5 /* PlayerFileDialogServiceMac.h */, + 9FD1E6A81A51361B0009A6C5 /* PlayerFileDialogServiceMac.mm */, + 9FD1E6A91A51361B0009A6C5 /* PlayerMac.h */, + 9FD1E6AA1A51361B0009A6C5 /* PlayerMac.mm */, + 9FD1E6AB1A51361B0009A6C5 /* PlayerMenuServiceMac.h */, + 9FD1E6AC1A51361B0009A6C5 /* PlayerMenuServiceMac.mm */, + 9FD1E6AD1A51361B0009A6C5 /* PlayerMessageBoxServiceMac.h */, + 9FD1E6AE1A51361B0009A6C5 /* PlayerMessageBoxServiceMac.mm */, + 9FD1E6AF1A51361B0009A6C5 /* PlayerTaskServiceMac.h */, + 9FD1E6B01A51361B0009A6C5 /* PlayerTaskServiceMac.mm */, + ); + path = service; + sourceTree = ""; + }; + 9FD1E6A21A51361B0009A6C5 /* openudid */ = { + isa = PBXGroup; + children = ( + 9FD1E6A31A51361B0009A6C5 /* OpenUDIDMac.h */, + 9FD1E6A41A51361B0009A6C5 /* OpenUDIDMac.m */, + ); + path = openudid; + sourceTree = ""; + }; + 9FFEB99E1A6AB7F70095C43A /* ide-support */ = { + isa = PBXGroup; + children = ( + 9FFEB9C01A6B86360095C43A /* SimpleConfigParser.cpp */, + 9FFEB9C11A6B86360095C43A /* SimpleConfigParser.h */, + 9FFEB99F1A6AB7F70095C43A /* CodeIDESupport.h */, + 9FFEB9A01A6AB7F70095C43A /* lang */, + 9FFEB9A31A6AB7F70095C43A /* RuntimeJsImpl.cpp */, + 9FFEB9A41A6AB7F70095C43A /* RuntimeJsImpl.h */, + ); + path = "ide-support"; + sourceTree = ""; + }; + 9FFEB9B31A6AB8810095C43A /* Products */ = { + isa = PBXGroup; + children = ( + 9FFEB9B81A6AB8810095C43A /* libsimulator Mac.a */, + 9FFEB9BA1A6AB8810095C43A /* libsimulator iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + A92275321517C094001B78AA = { + isa = PBXGroup; + children = ( + 9FFEB9B21A6AB8810095C43A /* libsimulator.xcodeproj */, + C037820118BF76AF00FE4F13 /* cocos2d_js_bindings.xcodeproj */, + 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */, + C06D18B718C02D4A003D1A65 /* JS Common */, + D4545214156E28EF00887EB5 /* Classes */, + A92275401517C094001B78AA /* Frameworks */, + D45446CC156DE73F00887EB5 /* ios */, + 509D4ACA17EBB2BE00697056 /* mac */, + A922753E1517C094001B78AA /* Products */, + 15628F5B15F0F5C2000CF24B /* Resources */, + ); + sourceTree = ""; + }; + A922753E1517C094001B78AA /* Products */ = { + isa = PBXGroup; + children = ( + A922753D1517C094001B78AA /* HelloJavascript-mobile.app */, + 509D4AAA17EBB24E00697056 /* HelloJavascript-desktop.app */, + ); + name = Products; + sourceTree = ""; + }; + A92275401517C094001B78AA /* Frameworks */ = { + isa = PBXGroup; + children = ( + BA4E718219EB6E4600932425 /* GameController.framework */, + BA4E718019EB6E3E00932425 /* MediaPlayer.framework */, + 87D4C4441AB2187000F68C44 /* Security.framework */, + 9F20C9E11A5BBE85006FB50B /* Security.framework */, + D6B061231803AB9F0077942B /* CoreMotion.framework */, + 502380DB17EBB88200990C9B /* libcurl.dylib */, + 509D4AEA17EBB82600697056 /* IOKit.framework */, + 509D4AE817EBB82000697056 /* AppKit.framework */, + 509D4AE617EBB81800697056 /* OpenGL.framework */, + 1A96A4F2174A3432008653A9 /* libcurl.a */, + 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */, + D454520B156E22BD00887EB5 /* libz.dylib */, + A92275411517C094001B78AA /* QuartzCore.framework */, + A92275431517C094001B78AA /* OpenGLES.framework */, + A92275451517C094001B78AA /* OpenAL.framework */, + A92275471517C094001B78AA /* AudioToolbox.framework */, + A92275491517C094001B78AA /* AVFoundation.framework */, + A922754B1517C094001B78AA /* UIKit.framework */, + A922754D1517C094001B78AA /* Foundation.framework */, + A922754F1517C094001B78AA /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + C037820218BF76AF00FE4F13 /* Products */ = { + isa = PBXGroup; + children = ( + C037820718BF76AF00FE4F13 /* libjscocos2d Mac.a */, + C037820918BF76AF00FE4F13 /* libjscocos2d iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + C06D18B718C02D4A003D1A65 /* JS Common */ = { + isa = PBXGroup; + children = ( + 3E12D1A41957FA03002FF0FD /* script */, + ); + name = "JS Common"; + sourceTree = ""; + }; + D45446CC156DE73F00887EB5 /* ios */ = { + isa = PBXGroup; + children = ( + 509D4AAB17EBB2AB00697056 /* AppController.h */, + 509D4AAC17EBB2AB00697056 /* AppController.mm */, + 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */, + 509D4AAE17EBB2AB00697056 /* Default.png */, + 509D4AAF17EBB2AB00697056 /* Default@2x.png */, + 5091732E17ECDF8A00D62437 /* Icons */, + 509D4AB717EBB2AB00697056 /* Info.plist */, + 509D4AB817EBB2AB00697056 /* main.m */, + 509D4AB917EBB2AB00697056 /* Prefix.pch */, + 509D4ABA17EBB2AB00697056 /* RootViewController.h */, + 509D4ABB17EBB2AB00697056 /* RootViewController.mm */, + ); + name = ios; + sourceTree = ""; + }; + D4545214156E28EF00887EB5 /* Classes */ = { + isa = PBXGroup; + children = ( + 9FFEB99E1A6AB7F70095C43A /* ide-support */, + 9FFEB9A71A6AB7F70095C43A /* js_module_register.h */, + D4545215156E28EF00887EB5 /* AppDelegate.cpp */, + D4545216156E28EF00887EB5 /* AppDelegate.h */, + ); + name = Classes; + path = ../Classes; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 509D4A7517EBB24E00697056 /* HelloJavascript-desktop */ = { + isa = PBXNativeTarget; + buildConfigurationList = 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript-desktop" */; + buildPhases = ( + 509D4A8017EBB24E00697056 /* Sources */, + 509D4A9317EBB24E00697056 /* Resources */, + 509D4A8217EBB24E00697056 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 9FFEB9BC1A6AB8940095C43A /* PBXTargetDependency */, + C037820E18BF77D100FE4F13 /* PBXTargetDependency */, + 1A676820180E9BF70076BC67 /* PBXTargetDependency */, + 1A676822180E9BF70076BC67 /* PBXTargetDependency */, + 1A676824180E9BF70076BC67 /* PBXTargetDependency */, + 1A676826180E9BF70076BC67 /* PBXTargetDependency */, + ); + name = "HelloJavascript-desktop"; + productName = HelloJavascript; + productReference = 509D4AAA17EBB24E00697056 /* HelloJavascript-desktop.app */; + productType = "com.apple.product-type.application"; + }; + A922753C1517C094001B78AA /* HelloJavascript-mobile */ = { + isa = PBXNativeTarget; + buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript-mobile" */; + buildPhases = ( + A92275391517C094001B78AA /* Sources */, + A922753A1517C094001B78AA /* Frameworks */, + A922753B1517C094001B78AA /* Resources */, + 3EC03834196541CD00D72B70 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 9FFEB9BE1A6AB89B0095C43A /* PBXTargetDependency */, + C037820B18BF77BC00FE4F13 /* PBXTargetDependency */, + 1A67682F180E9C110076BC67 /* PBXTargetDependency */, + 1A676831180E9C110076BC67 /* PBXTargetDependency */, + 1A676833180E9C110076BC67 /* PBXTargetDependency */, + 1A676835180E9C110076BC67 /* PBXTargetDependency */, + ); + name = "HelloJavascript-mobile"; + productName = HelloJavascript; + productReference = A922753D1517C094001B78AA /* HelloJavascript-mobile.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A92275341517C094001B78AA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + TargetAttributes = { + A922753C1517C094001B78AA = { + DevelopmentTeam = MDDB52YB8L; + }; + }; + }; + buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "HelloJavascript" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + "zh-Hans", + ); + mainGroup = A92275321517C094001B78AA; + productRefGroup = A922753E1517C094001B78AA /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = C037820218BF76AF00FE4F13 /* Products */; + ProjectRef = C037820118BF76AF00FE4F13 /* cocos2d_js_bindings.xcodeproj */; + }, + { + ProductGroup = 1AC6FB35180E9ACB004C840B /* Products */; + ProjectRef = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; + }, + { + ProductGroup = 9FFEB9B31A6AB8810095C43A /* Products */; + ProjectRef = 9FFEB9B21A6AB8810095C43A /* libsimulator.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + A922753C1517C094001B78AA /* HelloJavascript-mobile */, + 509D4A7517EBB24E00697056 /* HelloJavascript-desktop */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx Mac.a"; + remoteRef = 1AC6FB47180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions Mac.a"; + remoteRef = 1AC6FB49180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk Mac.a"; + remoteRef = 1AC6FB4B180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB4E180E9ACB004C840B /* libbox2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d Mac.a"; + remoteRef = 1AC6FB4D180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion Mac.a"; + remoteRef = 1AC6FB4F180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx iOS.a"; + remoteRef = 1AC6FB55180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2dx-extensions iOS.a"; + remoteRef = 1AC6FB57180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9FFEB9B81A6AB8810095C43A /* libsimulator Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libsimulator Mac.a"; + remoteRef = 9FFEB9B71A6AB8810095C43A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 9FFEB9BA1A6AB8810095C43A /* libsimulator iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libsimulator iOS.a"; + remoteRef = 9FFEB9B91A6AB8810095C43A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libchipmunk iOS.a"; + remoteRef = 1AC6FB59180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB5C180E9ACB004C840B /* libbox2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libbox2d iOS.a"; + remoteRef = 1AC6FB5B180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libCocosDenshion iOS.a"; + remoteRef = 1AC6FB5D180E9ACB004C840B /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + C037820718BF76AF00FE4F13 /* libjscocos2d Mac.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libjscocos2d Mac.a"; + remoteRef = C037820618BF76AF00FE4F13 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + C037820918BF76AF00FE4F13 /* libjscocos2d iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libjscocos2d iOS.a"; + remoteRef = C037820818BF76AF00FE4F13 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 509D4A9317EBB24E00697056 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AC22EDE18CA0E11007112B9 /* project.json in Resources */, + 9FD1E6B11A51361B0009A6C5 /* ConsoleWindow.xib in Resources */, + 1AD7E0A918C9DBE3004817A6 /* main.js in Resources */, + C05D1C181923467600B808A4 /* config.json in Resources */, + 3E12D1A61957FA03002FF0FD /* script in Resources */, + C0799CBA18BAE62000E9C828 /* res in Resources */, + 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */, + 9FFEB9A91A6AB7F70095C43A /* lang in Resources */, + C03780EC18BEE0E400FE4F13 /* src in Resources */, + 9FD1E6BD1A51362E0009A6C5 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A922753B1517C094001B78AA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1AE159EC18C9DF3600FCA372 /* project.json in Resources */, + 1AD7E0A818C9DB93004817A6 /* main.js in Resources */, + 509D4ABE17EBB2AB00697056 /* Default.png in Resources */, + C05D1C171923467600B808A4 /* config.json in Resources */, + 5091731E17ECDF7A00D62437 /* Icon-80.png in Resources */, + 5091731F17ECDF7A00D62437 /* Icon-100.png in Resources */, + 509D4AC117EBB2AB00697056 /* Icon-72.png in Resources */, + 509D4AC017EBB2AB00697056 /* Icon-57.png in Resources */, + 5091731A17ECDF7A00D62437 /* Icon-29.png in Resources */, + C03780EB18BEE0E400FE4F13 /* src in Resources */, + 509D4AC617EBB2AB00697056 /* Icon-152.png in Resources */, + 3E12D1A51957FA03002FF0FD /* script in Resources */, + C0799CB918BAE62000E9C828 /* res in Resources */, + 509D4AC517EBB2AB00697056 /* Icon-144.png in Resources */, + 509D4AC317EBB2AB00697056 /* Icon-114.png in Resources */, + 509D4ABD17EBB2AB00697056 /* Default-568h@2x.png in Resources */, + 509D4ABF17EBB2AB00697056 /* Default@2x.png in Resources */, + 509D4AC217EBB2AB00697056 /* Icon-76.png in Resources */, + 5091731B17ECDF7A00D62437 /* Icon-40.png in Resources */, + 5091731C17ECDF7A00D62437 /* Icon-50.png in Resources */, + 509D4AC417EBB2AB00697056 /* Icon-120.png in Resources */, + 5091731D17ECDF7A00D62437 /* Icon-58.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3EC03834196541CD00D72B70 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "find ${SRCROOT}/../../../src/ -name \"*\" -exec touch -cm {} \\;\nfind ${SRCROOT}/../../../res/ -name \"*\" -exec touch -cm {} \\;"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 509D4A8017EBB24E00697056 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9FD1E6B61A51361B0009A6C5 /* PlayerFileDialogServiceMac.mm in Sources */, + 3E12D1E61957FB18002FF0FD /* common.cc in Sources */, + 9FD1E6B51A51361B0009A6C5 /* PlayerEditBoxServiceMac.mm in Sources */, + 9FD1E6EE1A5169230009A6C5 /* AppLang.cpp in Sources */, + 9FD1E6B21A51361B0009A6C5 /* ConsoleWindowController.m in Sources */, + 3E12D1E81957FB18002FF0FD /* once.cc in Sources */, + 9FD1E6ED1A5169230009A6C5 /* AppEvent.cpp in Sources */, + 3E12D1E01957FB18002FF0FD /* message_lite.cc in Sources */, + 3E12D1D61957FB18002FF0FD /* extension_set.cc in Sources */, + C00FD4B51938628E00C6382D /* PlayDisable_png.cpp in Sources */, + AB9079D519E931D80033128B /* ConsoleCommand.cpp in Sources */, + 3E12D1EA1957FB18002FF0FD /* stringprintf.cc in Sources */, + C06C37891918E81100617BED /* ConfigParser.cpp in Sources */, + 9FD1E6B71A51361B0009A6C5 /* PlayerMac.mm in Sources */, + 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */, + 9FD1E6BA1A51361B0009A6C5 /* PlayerTaskServiceMac.mm in Sources */, + C0C2F37418AA0C66003976DA /* SimulatorApp.mm in Sources */, + 9FD1E6B41A51361B0009A6C5 /* OpenUDIDMac.m in Sources */, + 9FD1E6B91A51361B0009A6C5 /* PlayerMessageBoxServiceMac.mm in Sources */, + 9FD1E6B31A51361B0009A6C5 /* DeviceEx-mac.mm in Sources */, + C03C8B4B18A770DD00723415 /* main.m in Sources */, + 9FD1E6B81A51361B0009A6C5 /* PlayerMenuServiceMac.mm in Sources */, + 9FFEB9AD1A6AB7F70095C43A /* RuntimeJsImpl.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A92275391517C094001B78AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */, + 9FFEB9AC1A6AB7F70095C43A /* RuntimeJsImpl.cpp in Sources */, + D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */, + 509D4AC817EBB2AB00697056 /* main.m in Sources */, + 9FFEB9C21A6B86360095C43A /* SimpleConfigParser.cpp in Sources */, + 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1A676820180E9BF70076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx Mac"; + targetProxy = 1A67681F180E9BF70076BC67 /* PBXContainerItemProxy */; + }; + 1A676822180E9BF70076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions Mac"; + targetProxy = 1A676821180E9BF70076BC67 /* PBXContainerItemProxy */; + }; + 1A676824180E9BF70076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk Mac"; + targetProxy = 1A676823180E9BF70076BC67 /* PBXContainerItemProxy */; + }; + 1A676826180E9BF70076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion Mac"; + targetProxy = 1A676825180E9BF70076BC67 /* PBXContainerItemProxy */; + }; + 1A67682F180E9C110076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx iOS"; + targetProxy = 1A67682E180E9C110076BC67 /* PBXContainerItemProxy */; + }; + 9FFEB9BC1A6AB8940095C43A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libsimulator Mac"; + targetProxy = 9FFEB9BB1A6AB8940095C43A /* PBXContainerItemProxy */; + }; + 9FFEB9BE1A6AB89B0095C43A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libsimulator iOS"; + targetProxy = 9FFEB9BD1A6AB89B0095C43A /* PBXContainerItemProxy */; + }; + 1A676831180E9C110076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "cocos2dx-extensions iOS"; + targetProxy = 1A676830180E9C110076BC67 /* PBXContainerItemProxy */; + }; + 1A676833180E9C110076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "chipmunk iOS"; + targetProxy = 1A676832180E9C110076BC67 /* PBXContainerItemProxy */; + }; + 1A676835180E9C110076BC67 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "CocosDenshion iOS"; + targetProxy = 1A676834180E9C110076BC67 /* PBXContainerItemProxy */; + }; + C037820B18BF77BC00FE4F13 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "jsbindings iOS"; + targetProxy = C037820A18BF77BC00FE4F13 /* PBXContainerItemProxy */; + }; + C037820E18BF77D100FE4F13 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "jsbindings Mac"; + targetProxy = C037820D18BF77D100FE4F13 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 9FD1E6BB1A51362E0009A6C5 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 9FD1E6BC1A51362E0009A6C5 /* Base */, + 9FD1E6BE1A5136370009A6C5 /* zh-Hans */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 509D4AA817EBB24E00697056 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + CONFIGURATION_BUILD_DIR = ../../../runtime/mac; + DEAD_CODE_STRIPPING = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + GLFW_EXPOSE_NATIVE_COCOA, + GLFW_EXPOSE_NATIVE_NSGL, + CC_TARGET_OS_MAC, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/", + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.8; + OTHER_LDFLAGS = ""; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos/platform/mac $(SRCROOT)/../../cocos2d-x/external/glfw3/include/mac $(SRCROOT)/../../cocos2d-x/external/spidermonkey/include/mac"; + }; + name = Debug; + }; + 509D4AA917EBB24E00697056 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = mac/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + GLFW_EXPOSE_NATIVE_COCOA, + GLFW_EXPOSE_NATIVE_NSGL, + CC_TARGET_OS_MAC, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/", + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = mac/Info.plist; + LIBRARY_SEARCH_PATHS = ""; + MACOSX_DEPLOYMENT_TARGET = 10.8; + OTHER_LDFLAGS = ""; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos/platform/mac $(SRCROOT)/../../cocos2d-x/external/glfw3/include/mac $(SRCROOT)/../../cocos2d-x/external/spidermonkey/include/mac"; + }; + name = Release; + }; + A92276FE1517C097001B78AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "COCOS2D_DEBUG=1", + USE_FILE32API, + COCOS2D_JAVASCRIPT, + CC_ENABLE_CHIPMUNK_INTEGRATION, + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/cocos/base $(SRCROOT)/../../cocos2d-x/cocos/physics $(SRCROOT)/../../cocos2d-x/cocos/math/kazmath $(SRCROOT)/../../cocos2d-x/cocos/2d $(SRCROOT)/../../cocos2d-x/cocos/gui $(SRCROOT)/../../cocos2d-x/cocos/network $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos/editor-support $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/auto $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/manual"; + }; + name = Debug; + }; + A92276FF1517C097001B78AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = ( + NDEBUG, + USE_FILE32API, + COCOS2D_JAVASCRIPT, + CC_ENABLE_CHIPMUNK_INTEGRATION, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../cocos2d-x $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/cocos/base $(SRCROOT)/../../cocos2d-x/cocos/physics $(SRCROOT)/../../cocos2d-x/cocos/math/kazmath $(SRCROOT)/../../cocos2d-x/cocos/2d $(SRCROOT)/../../cocos2d-x/cocos/gui $(SRCROOT)/../../cocos2d-x/cocos/network $(SRCROOT)/../../cocos2d-x/cocos/audio/include $(SRCROOT)/../../cocos2d-x/cocos/editor-support $(SRCROOT)/../../cocos2d-x/extensions $(SRCROOT)/../../cocos2d-x/external $(SRCROOT)/../../cocos2d-x/external/chipmunk/include/chipmunk $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/auto $(SRCROOT)/../../cocos2d-x/cocos/scripting/js-bindings/manual"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A92277011517C097001B78AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + CC_TARGET_OS_IPHONE, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../Classes", + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/", + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + OTHER_LDFLAGS = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/cocos/platform/ios $(SRCROOT)/../../cocos2d-x/external/spidermonkey/include/ios $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/manual $(SRCROOT)/../../cocos2d-x/external/curl/include/ios"; + VALID_ARCHS = "arm64 armv7"; + }; + name = Debug; + }; + A92277021517C097001B78AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ios/Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + CC_TARGET_OS_IPHONE, + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../Classes", + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/", + "$(SRCROOT)/../../cocos2d-x/tools/simulator/libsimulator/lib/protobuf-lite", + ); + INFOPLIST_FILE = ios/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + LIBRARY_SEARCH_PATHS = ""; + OTHER_LDFLAGS = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../cocos2d-x/cocos $(SRCROOT)/../../cocos2d-x/cocos/platform/ios $(SRCROOT)/../../cocos2d-x/external/spidermonkey/include/ios $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../cocos2d-x/plugin/jsbindings/manual $(SRCROOT)/../../cocos2d-x/external/curl/include/ios"; + VALID_ARCHS = "arm64 armv7"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript-desktop" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 509D4AA817EBB24E00697056 /* Debug */, + 509D4AA917EBB24E00697056 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A92275371517C094001B78AA /* Build configuration list for PBXProject "HelloJavascript" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92276FE1517C097001B78AA /* Debug */, + A92276FF1517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript-mobile" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92277011517C097001B78AA /* Debug */, + A92277021517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A92275341517C094001B78AA /* Project object */; +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/AppController.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/AppController.h new file mode 100644 index 0000000000..2e8186124e --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/AppController.h @@ -0,0 +1,35 @@ +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + 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. + ****************************************************************************/ + +@class RootViewController; + +@interface AppController : NSObject +{ + UIWindow *window; + RootViewController *viewController; +} + +@end + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm new file mode 100644 index 0000000000..81f19ebcdd --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm @@ -0,0 +1,144 @@ +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + 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. + ****************************************************************************/ + +#import +#import "cocos2d.h" + +#import "AppController.h" +#import "AppDelegate.h" +#import "RootViewController.h" +#import "platform/ios/CCEAGLView-ios.h" + +@implementation AppController + +#pragma mark - +#pragma mark Application lifecycle + +// cocos2d application instance +static AppDelegate s_sharedApplication; + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + + // Override point for customization after application launch. + + // Add the view controller's view to the window and display. + window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] + pixelFormat: kEAGLColorFormatRGBA8 + depthFormat: GL_DEPTH24_STENCIL8_OES + preserveBackbuffer: NO + sharegroup: nil + multiSampling: NO + numberOfSamples: 0 ]; + + [eaglView setMultipleTouchEnabled:YES]; + + // Use RootViewController manage CCEAGLView + viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; + viewController.wantsFullScreenLayout = YES; + viewController.view = eaglView; + + // Set RootViewController to window + if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) + { + // warning: addSubView doesn't work on iOS6 + [window addSubview: viewController.view]; + } + else + { + // use this method on ios6 + [window setRootViewController:viewController]; + } + + [window makeKeyAndVisible]; + + [[UIApplication sharedApplication] setStatusBarHidden: YES]; + + // IMPORTANT: Setting the GLView should be done after creating the RootViewController + cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); + cocos2d::Director::getInstance()->setOpenGLView(glview); + + cocos2d::Application::getInstance()->run(); + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ + cocos2d::Director::getInstance()->pause(); +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + */ + cocos2d::Director::getInstance()->resume(); +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + If your application supports background execution, called instead of applicationWillTerminate: when the user quits. + */ + cocos2d::Application::getInstance()->applicationDidEnterBackground(); +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. + */ + cocos2d::Application::getInstance()->applicationWillEnterForeground(); +} + +- (void)applicationWillTerminate:(UIApplication *)application { + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. + */ + cocos2d::Director::getInstance()->purgeCachedData(); +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png new file mode 100644 index 0000000000..66c6d1cead Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default-568h@2x.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default.png new file mode 100644 index 0000000000..dcb80725de Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png new file mode 100644 index 0000000000..84689888a1 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Default@2x.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-100.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-100.png new file mode 100644 index 0000000000..ef38d4500a Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-100.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-114.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-114.png new file mode 100644 index 0000000000..c3807861ad Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-114.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-120.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-120.png new file mode 100644 index 0000000000..a5b49ccbb1 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-120.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-144.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-144.png new file mode 100644 index 0000000000..1526615c02 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-144.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-152.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-152.png new file mode 100644 index 0000000000..8aa82506d0 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-152.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-29.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-29.png new file mode 100644 index 0000000000..0500184c86 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-29.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-40.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-40.png new file mode 100644 index 0000000000..775685daca Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-40.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-50.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-50.png new file mode 100644 index 0000000000..ac381bc20e Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-50.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-57.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-57.png new file mode 100644 index 0000000000..4fcc6fddff Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-57.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-58.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-58.png new file mode 100644 index 0000000000..f0f8b7fe98 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-58.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-72.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-72.png new file mode 100644 index 0000000000..2c573c8df4 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-72.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-76.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-76.png new file mode 100644 index 0000000000..8a1fa1850c Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-76.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-80.png b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-80.png new file mode 100644 index 0000000000..d9c7ab446b Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Icon-80.png differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Info.plist b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Info.plist new file mode 100644 index 0000000000..59405f5dce --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Info.plist @@ -0,0 +1,98 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFiles + + Icon.png + Icon@2x.png + Icon-72.png + Icon-144.png + Icon-57.png + Icon-114.png + + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + Icon-80 + Icon-58 + Icon-29 + Icon-120 + Icon-72.png + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-144.png + + UIPrerenderedIcon + + + + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + Icon-58 + Icon-29 + Icon-80 + Icon-40 + Icon-100 + Icon-50 + Icon-152 + Icon-76 + Icon-120 + Icon-72.png + Icon.png + Icon@2x.png + Icon-57.png + Icon-114.png + Icon-144.png + + UIPrerenderedIcon + + + + CFBundleIdentifier + org.cocos2dx.hellojavascript + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIPrerenderedIcon + + UIRequiredDeviceCapabilities + + accelerometer + + opengles-1 + + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch new file mode 100644 index 0000000000..168ddec406 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'HelloJavascript' target in the 'HelloJavascript' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h new file mode 100644 index 0000000000..11dfc4bf88 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.h @@ -0,0 +1,33 @@ +/**************************************************************************** + Copyright (c) 2010-2011 cocos2d-x.org + Copyright (c) 2010 Ricardo Quesada + + 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. + ****************************************************************************/ + +#import + + +@interface RootViewController : UIViewController { + +} +- (BOOL)prefersStatusBarHidden; +@end diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm new file mode 100644 index 0000000000..a43163a2f1 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm @@ -0,0 +1,129 @@ +/**************************************************************************** + Copyright (c) 2010-2011 cocos2d-x.org + Copyright (c) 2010 Ricardo Quesada + + 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. + ****************************************************************************/ + +#import "RootViewController.h" +#import "cocos2d.h" +#import "platform/ios/CCEAGLView-ios.h" +#include "ide-support/SimpleConfigParser.h" + +@implementation RootViewController + +/* + // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} +*/ + +/* +// Implement loadView to create a view hierarchy programmatically, without using a nib. +- (void)loadView { +} +*/ + +/* +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad { + [super viewDidLoad]; +} + +*/ +// Override to allow orientations other than the default portrait orientation. +// This method is deprecated on ios6 +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + + if (SimpleConfigParser::getInstance()->isLanscape()) { + return UIInterfaceOrientationIsLandscape( interfaceOrientation ); + }else{ + return UIInterfaceOrientationIsPortrait( interfaceOrientation ); + } + +} + +// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead +- (NSUInteger) supportedInterfaceOrientations{ +#ifdef __IPHONE_6_0 + if (SimpleConfigParser::getInstance()->isLanscape()) { + return UIInterfaceOrientationMaskLandscape; + }else{ + return UIInterfaceOrientationMaskPortrait; + } +#endif +} + +- (BOOL) shouldAutorotate { + if (SimpleConfigParser::getInstance()->isLanscape()) { + return YES; + }else{ + return NO; + } +} + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + + cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); + + if (glview) + { + cocos2d::CCEGLView *eaglview = (cocos2d::CCEGLView*) glview->getEAGLView(); + + if (eaglview) + { + CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); + cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); + } + } +} + +//fix not hide status on ios7 +- (BOOL)prefersStatusBarHidden +{ + return YES; +} + +- (void)didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +- (void)viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/build-cfg.json b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/build-cfg.json new file mode 100644 index 0000000000..94e1ccd1f4 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/build-cfg.json @@ -0,0 +1,7 @@ +{ + "remove_res" : [ + "src", + "res", + "main.js" + ] +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/main.m b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/main.m new file mode 100644 index 0000000000..b1286e31be --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/ios/main.m @@ -0,0 +1,11 @@ + + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); + [pool release]; + return retVal; +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/MainMenu.xib b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/MainMenu.xib new file mode 100644 index 0000000000..95349511fa --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Base.lproj/MainMenu.xib @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns new file mode 100644 index 0000000000..2040fc6fe6 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Icon.icns differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Info.plist b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Info.plist new file mode 100644 index 0000000000..aa22263424 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon + CFBundleIdentifier + org.cocos2dx.hellojavascript + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.games + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2013. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch new file mode 100644 index 0000000000..46c36a7e99 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.h new file mode 100644 index 0000000000..4652e58184 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.h @@ -0,0 +1,56 @@ +/**************************************************************************** + Copyright (c) 2010 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 +#import + +#import "ConsoleWindowController.h" +#include "ProjectConfig/ProjectConfig.h" +#include "ProjectConfig/SimulatorConfig.h" +#include "AppDelegate.h" + +@interface AppController : NSObject +{ + NSWindow *_window; + NSMenu *menu; + + AppDelegate *_app; + ProjectConfig _project; + int _debugLogFile; + + //log file + ConsoleWindowController *_consoleController; + NSFileHandle *_fileHandle; + + //console pipe + NSPipe *_pipe; + NSFileHandle *_pipeReadHandle; +} + +@property (nonatomic, assign) IBOutlet NSMenu* menu; + +-(IBAction)onFileClose:(id)sender; +-(IBAction)onWindowAlwaysOnTop:(id)sender; +@end diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm new file mode 100644 index 0000000000..9d646cde28 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm @@ -0,0 +1,608 @@ +/**************************************************************************** + Copyright (c) 2010 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 +#include +#include +#include +#include + +#import "SimulatorApp.h" +#include "AppDelegate.h" +#include "glfw3.h" +#include "glfw3native.h" +#include "runtime/Runtime.h" +#include "runtime/ConfigParser.h" + +#include "cocos2d.h" +#include "CodeIDESupport.h" + +#include "platform/mac/PlayerMac.h" +#include "AppEvent.h" +#include "AppLang.h" + + +#if (GLFW_VERSION_MAJOR >= 3) && (GLFW_VERSION_MINOR >= 1) +#define PLAYER_SUPPORT_DROP 1 +#else +#define PLAYER_SUPPORT_DROP 0 +#endif + +using namespace std; +using namespace cocos2d; + +static id SIMULATOR = nullptr; +@implementation AppController + +@synthesize menu; + +std::string getCurAppPath(void) +{ + return [[[NSBundle mainBundle] bundlePath] UTF8String]; +} + +std::string getCurAppName(void) +{ + string appName = [[[NSProcessInfo processInfo] processName] UTF8String]; + int found = appName.find(" "); + if (found!=std::string::npos) + appName = appName.substr(0,found); + + return appName; +} + +#if (PLAYER_SUPPORT_DROP > 0) +static void glfwDropFunc(GLFWwindow *window, int count, const char **files) +{ + AppEvent forwardEvent(kAppEventDropName, APP_EVENT_DROP); + std::string firstFile(files[0]); + forwardEvent.setDataString(firstFile); + + Director::getInstance()->getEventDispatcher()->dispatchEvent(&forwardEvent); +} +#endif + +-(void) dealloc +{ + Director::getInstance()->end(); + player::PlayerProtocol::getInstance()->purgeInstance(); + [super dealloc]; +} + +#pragma mark - +#pragma delegates + +- (void) applicationDidFinishLaunching:(NSNotification *)aNotification +{ + SIMULATOR = self; + player::PlayerMac::create(); + + _debugLogFile = 0; + + [self parseCocosProjectConfig:&_project]; + [self updateProjectFromCommandLineArgs:&_project]; + [self createWindowAndGLView]; + [self startup]; +} + + +#pragma mark - +#pragma mark functions + +- (BOOL) windowShouldClose:(id)sender +{ + return YES; +} + +- (void) windowWillClose:(NSNotification *)notification +{ + [[NSRunningApplication currentApplication] terminate]; +} + +- (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication +{ + return YES; +} + +- (NSMutableArray*) makeCommandLineArgsFromProjectConfig +{ + return [self makeCommandLineArgsFromProjectConfig:kProjectConfigAll]; +} + +- (NSMutableArray*) makeCommandLineArgsFromProjectConfig:(unsigned int)mask +{ + _project.setWindowOffset(Vec2(_window.frame.origin.x, _window.frame.origin.y)); + vector args = _project.makeCommandLineVector(); + NSMutableArray *commandArray = [NSMutableArray arrayWithCapacity:args.size()]; + for (auto &path : args) + { + [commandArray addObject:[NSString stringWithUTF8String:path.c_str()]]; + } + return commandArray; +} + +- (void) parseCocosProjectConfig:(ProjectConfig*)config +{ + // get project directory + ProjectConfig tmpConfig; + NSArray *nsargs = [[NSProcessInfo processInfo] arguments]; + long n = [nsargs count]; + if (n >= 2) + { + vector args; + for (int i = 0; i < [nsargs count]; ++i) + { + string arg = [[nsargs objectAtIndex:i] cStringUsingEncoding:NSUTF8StringEncoding]; + if (arg.length()) args.push_back(arg); + } + + if (args.size() && args.at(1).at(0) == '/') + { + // FIXME: + // for Code IDE before RC2 + tmpConfig.setProjectDir(args.at(1)); + } + + tmpConfig.parseCommandLine(args); + } + + // set project directory as search root path + FileUtils::getInstance()->setDefaultResourceRootPath(tmpConfig.getProjectDir()); + + // parse config.json + auto parser = ConfigParser::getInstance(); + auto configPath = tmpConfig.getProjectDir().append(CONFIG_FILE); + parser->readConfig(configPath); + + // set information + config->setConsolePort(parser->getConsolePort()); + config->setFileUploadPort(parser->getUploadPort()); + config->setFrameSize(parser->getInitViewSize()); + if (parser->isLanscape()) + { + config->changeFrameOrientationToLandscape(); + } + else + { + config->changeFrameOrientationToPortait(); + } + config->setScriptFile(parser->getEntryFile()); +} + +- (void) updateProjectFromCommandLineArgs:(ProjectConfig*)config +{ + NSArray *nsargs = [[NSProcessInfo processInfo] arguments]; + long n = [nsargs count]; + if (n >= 2) + { + vector args; + for (int i = 0; i < [nsargs count]; ++i) + { + string arg = [[nsargs objectAtIndex:i] cStringUsingEncoding:NSUTF8StringEncoding]; + if (arg.length()) args.push_back(arg); + } + + if (args.size() && args.at(1).at(0) == '/') + { + // for Code IDE before RC2 + config->setProjectDir(args.at(1)); + config->setDebuggerType(kCCRuntimeDebuggerCodeIDE); + } + config->parseCommandLine(args); + } +} + +- (bool) launch:(NSArray*)args +{ + NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]; + NSMutableDictionary *configuration = [NSMutableDictionary dictionaryWithObject:args forKey:NSWorkspaceLaunchConfigurationArguments]; + NSError *error = [[[NSError alloc] init] autorelease]; + [[NSWorkspace sharedWorkspace] launchApplicationAtURL:url + options:NSWorkspaceLaunchNewInstance + configuration:configuration + error:&error]; + + if (error.code != 0) + { + NSLog(@"Failed to launch app: %@", [error localizedDescription]); + } + return (error.code==0); +} + +- (void) relaunch:(NSArray*)args +{ + if ([self launch:args]) + { + [[NSApplication sharedApplication] terminate:self]; + } + else + { + NSLog(@"RELAUNCH: %@", args); + } +} + +- (void) relaunch +{ + [self relaunch:[self makeCommandLineArgsFromProjectConfig]]; +} + +- (void) createWindowAndGLView +{ + GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8}; + GLView::setGLContextAttrs(glContextAttrs); + + // create console window **MUST** before create opengl view + if (_project.isShowConsole()) + { + [self openConsoleWindow]; + CCLOG("%s\n",Configuration::getInstance()->getInfo().c_str()); + } + + float frameScale = _project.getFrameScale(); + + // create opengl view + cocos2d::Size frameSize = _project.getFrameSize(); + ConfigParser::getInstance()->setInitViewSize(frameSize); + + const cocos2d::Rect frameRect = cocos2d::Rect(0, 0, frameSize.width, frameSize.height); + std::stringstream title; + title << "Cocos Simulator - " << ConfigParser::getInstance()->getInitViewName(); + GLViewImpl *eglView = GLViewImpl::createWithRect(title.str(), frameRect, frameScale); + + auto director = Director::getInstance(); + director->setOpenGLView(eglView); + + _window = eglView->getCocoaWindow(); + [[NSApplication sharedApplication] setDelegate: self]; + [_window center]; + + [self setZoom:_project.getFrameScale()]; + Vec2 pos = _project.getWindowOffset(); + if (pos.x != 0 && pos.y != 0) + { + [_window setFrameOrigin:NSMakePoint(pos.x, pos.y)]; + } + +#if (PLAYER_SUPPORT_DROP > 0) + glfwSetDropCallback(eglView->getWindow(), glfwDropFunc); +#endif +} + +- (void) adjustEditMenuIndex +{ + NSApplication *thisApp = [NSApplication sharedApplication]; + NSMenu *mainMenu = [thisApp mainMenu]; + + NSMenuItem *editMenuItem = [mainMenu itemWithTitle:@"Edit"]; + if (editMenuItem) + { + NSUInteger index = 2; + if (index > [mainMenu itemArray].count) + index = [mainMenu itemArray].count; + [[editMenuItem menu] removeItem:editMenuItem]; + [mainMenu insertItem:editMenuItem atIndex:index]; + } +} +- (void) startup +{ + FileUtils::getInstance()->setPopupNotify(false); + + _project.dump(); + + const string projectDir = _project.getProjectDir(); + if (projectDir.length()) + { + FileUtils::getInstance()->setDefaultResourceRootPath(projectDir); + if (_project.isWriteDebugLogToFile()) + { + [self writeDebugLogToFile:_project.getDebugLogFilePath()]; + } + } + + const string writablePath = _project.getWritableRealPath(); + if (writablePath.length()) + { + FileUtils::getInstance()->setWritablePath(writablePath.c_str()); + } + + // path for looking Lang file, Studio Default images + NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; + FileUtils::getInstance()->addSearchPath(resourcePath.UTF8String); + + // app + _app = new AppDelegate(); + + [self setupUI]; + [self adjustEditMenuIndex]; + + RuntimeEngine::getInstance()->setProjectConfig(_project); + Application::getInstance()->run(); + // After run, application needs to be terminated immediately. + [NSApp terminate: self]; +} + +- (void) setupUI +{ + auto menuBar = player::PlayerProtocol::getInstance()->getMenuService(); + + // VIEW + menuBar->addItem("VIEW_MENU", tr("View")); + SimulatorConfig *config = SimulatorConfig::getInstance(); + int current = config->checkScreenSize(_project.getFrameSize()); + for (int i = 0; i < config->getScreenSizeCount(); i++) + { + SimulatorScreenSize size = config->getScreenSize(i); + std::stringstream menuId; + menuId << "VIEWSIZE_ITEM_MENU_" << i; + auto menuItem = menuBar->addItem(menuId.str(), size.title.c_str(), "VIEW_MENU"); + + if (i == current) + { + menuItem->setChecked(true); + } + } + + menuBar->addItem("DIRECTION_MENU_SEP", "-", "VIEW_MENU"); + menuBar->addItem("DIRECTION_PORTRAIT_MENU", tr("Portrait"), "VIEW_MENU") + ->setChecked(_project.isPortraitFrame()); + menuBar->addItem("DIRECTION_LANDSCAPE_MENU", tr("Landscape"), "VIEW_MENU") + ->setChecked(_project.isLandscapeFrame()); + + menuBar->addItem("VIEW_SCALE_MENU_SEP", "-", "VIEW_MENU"); + + std::vector scaleMenuVector; + auto scale100Menu = menuBar->addItem("VIEW_SCALE_MENU_100", tr("Zoom Out").append(" (100%)"), "VIEW_MENU"); + scale100Menu->setShortcut("super+0"); + + auto scale75Menu = menuBar->addItem("VIEW_SCALE_MENU_75", tr("Zoom Out").append(" (75%)"), "VIEW_MENU"); + scale75Menu->setShortcut("super+7"); + + auto scale50Menu = menuBar->addItem("VIEW_SCALE_MENU_50", tr("Zoom Out").append(" (50%)"), "VIEW_MENU"); + scale50Menu->setShortcut("super+6"); + + auto scale25Menu = menuBar->addItem("VIEW_SCALE_MENU_25", tr("Zoom Out").append(" (25%)"), "VIEW_MENU"); + scale25Menu->setShortcut("super+5"); + + int frameScale = int(_project.getFrameScale() * 100); + if (frameScale == 100) + { + scale100Menu->setChecked(true); + } + else if (frameScale == 75) + { + scale75Menu->setChecked(true); + } + else if (frameScale == 50) + { + scale50Menu->setChecked(true); + } + else if (frameScale == 25) + { + scale25Menu->setChecked(true); + } + else + { + scale100Menu->setChecked(true); + } + + scaleMenuVector.push_back(scale100Menu); + scaleMenuVector.push_back(scale75Menu); + scaleMenuVector.push_back(scale50Menu); + scaleMenuVector.push_back(scale25Menu); + + menuBar->addItem("REFRESH_MENU_SEP", "-", "VIEW_MENU"); + menuBar->addItem("REFRESH_MENU", tr("Refresh"), "VIEW_MENU")->setShortcut("super+r"); + + ProjectConfig &project = _project; + auto dispatcher = Director::getInstance()->getEventDispatcher(); + dispatcher->addEventListenerWithFixedPriority(EventListenerCustom::create(kAppEventName, [&project, scaleMenuVector](EventCustom* event){ + auto menuEvent = dynamic_cast(event); + if (menuEvent) + { + rapidjson::Document dArgParse; + dArgParse.Parse<0>(menuEvent->getDataString().c_str()); + if (dArgParse.HasMember("name")) + { + string strcmd = dArgParse["name"].GetString(); + + if (strcmd == "menuClicked") + { + player::PlayerMenuItem *menuItem = static_cast(menuEvent->getUserData()); + if (menuItem) + { + if (menuItem->isChecked()) + { + return ; + } + + string data = dArgParse["data"].GetString(); + if ((data == "CLOSE_MENU") || (data == "EXIT_MENU")) + { + Director::getInstance()->end(); + } + else if (data == "REFRESH_MENU") + { + [SIMULATOR relaunch]; + } + else if (data.find("VIEW_SCALE_MENU_") == 0) // begin with VIEW_SCALE_MENU_ + { + string tmp = data.erase(0, strlen("VIEW_SCALE_MENU_")); + float scale = atof(tmp.c_str()) / 100.0f; + project.setFrameScale(scale); + + auto glview = static_cast(Director::getInstance()->getOpenGLView()); + glview->setFrameZoomFactor(scale); + + // update scale menu state + for (auto &it : scaleMenuVector) + { + it->setChecked(false); + } + menuItem->setChecked(true); + } + else if (data.find("VIEWSIZE_ITEM_MENU_") == 0) // begin with VIEWSIZE_ITEM_MENU_ + { + string tmp = data.erase(0, strlen("VIEWSIZE_ITEM_MENU_")); + int index = atoi(tmp.c_str()); + SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(index); + + if (project.isLandscapeFrame()) + { + std::swap(size.width, size.height); + } + + project.setFrameSize(cocos2d::Size(size.width, size.height)); + [SIMULATOR relaunch]; + } + else if (data == "DIRECTION_PORTRAIT_MENU") + { + project.changeFrameOrientationToPortait(); + [SIMULATOR relaunch]; + } + else if (data == "DIRECTION_LANDSCAPE_MENU") + { + project.changeFrameOrientationToLandscape(); + [SIMULATOR relaunch]; + } + } + } + } + } + }), 1); + + // drop + AppDelegate *app = _app; + auto listener = EventListenerCustom::create(kAppEventDropName, [&project, app](EventCustom* event) + { + AppEvent *dropEvent = dynamic_cast(event); + if (dropEvent) + { + string dirPath = dropEvent->getDataString() + "/"; + string configFilePath = dirPath + CONFIG_FILE; + + if (FileUtils::getInstance()->isDirectoryExist(dirPath) && + FileUtils::getInstance()->isFileExist(configFilePath)) + { + // parse config.json + ConfigParser::getInstance()->readConfig(configFilePath); + + project.setProjectDir(dirPath); + project.setScriptFile(ConfigParser::getInstance()->getEntryFile()); + project.setWritablePath(dirPath); + + RuntimeEngine::getInstance()->setProjectConfig(project); +// app->setProjectConfig(project); +// app->reopenProject(); + } + } + }); + dispatcher->addEventListenerWithFixedPriority(listener, 1); +} + +- (void) openConsoleWindow +{ + if (!_consoleController) + { + _consoleController = [[ConsoleWindowController alloc] initWithWindowNibName:@"ConsoleWindow"]; + } + [_consoleController.window orderFrontRegardless]; + + //set console pipe + _pipe = [NSPipe pipe] ; + _pipeReadHandle = [_pipe fileHandleForReading] ; + + int outfd = [[_pipe fileHandleForWriting] fileDescriptor]; + if (dup2(outfd, fileno(stderr)) != fileno(stderr) || dup2(outfd, fileno(stdout)) != fileno(stdout)) + { + perror("Unable to redirect output"); + // [self showAlert:@"Unable to redirect output to console!" withTitle:@"player error"]; + } + else + { + [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(handleNotification:) name: NSFileHandleReadCompletionNotification object: _pipeReadHandle] ; + [_pipeReadHandle readInBackgroundAndNotify] ; + } +} + +- (bool) writeDebugLogToFile:(const string)path +{ + if (_debugLogFile) return true; + //log to file + if(_fileHandle) return true; + NSString *fPath = [NSString stringWithCString:path.c_str() encoding:[NSString defaultCStringEncoding]]; + [[NSFileManager defaultManager] createFileAtPath:fPath contents:nil attributes:nil] ; + _fileHandle = [NSFileHandle fileHandleForWritingAtPath:fPath]; + [_fileHandle retain]; + return true; +} + +- (void)handleNotification:(NSNotification *)note +{ + //NSLog(@"Received notification: %@", note); + [_pipeReadHandle readInBackgroundAndNotify] ; + NSData *data = [[note userInfo] objectForKey:NSFileHandleNotificationDataItem]; + NSString *str = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; + + //show log to console + [_consoleController trace:str]; + if(_fileHandle!=nil){ + [_fileHandle writeData:[str dataUsingEncoding:NSUTF8StringEncoding]]; + } + +} + +- (void) setZoom:(float)scale +{ + Director::getInstance()->getOpenGLView()->setFrameZoomFactor(scale); + _project.setFrameScale(scale); +} + +- (BOOL) applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag +{ + return NO; +} + +#pragma mark - + +-(IBAction)onFileClose:(id)sender +{ + [[NSApplication sharedApplication] terminate:self]; +} + +-(IBAction)onWindowAlwaysOnTop:(id)sender +{ + NSInteger state = [sender state]; + + if (state == NSOffState) + { + [_window setLevel:NSFloatingWindowLevel]; + [sender setState:NSOnState]; + } + else + { + [_window setLevel:NSNormalWindowLevel]; + [sender setState:NSOffState]; + } +} +@end diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json new file mode 100644 index 0000000000..58ff86e820 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/build-cfg.json @@ -0,0 +1,9 @@ +{ + "remove_res" : [ + "src", + "res", + "main.js", + "project.json", + "config.json" + ] +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/main.m b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/main.m new file mode 100644 index 0000000000..658f0c14ee --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/main.m @@ -0,0 +1,7 @@ + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindow.xib b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindow.xib new file mode 100644 index 0000000000..1cc9932310 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindow.xib @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindowController.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindowController.h new file mode 100644 index 0000000000..7b1c06d215 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindowController.h @@ -0,0 +1,23 @@ + +#import + +@interface ConsoleWindowController : NSWindowController +{ + NSTextView *textView; + IBOutlet NSButton *checkScroll; + IBOutlet NSButton *topCheckBox; + NSMutableArray *linesCount; + NSUInteger traceCount; +} + +@property (assign) IBOutlet NSTextView *textView; + +- (void) trace:(NSString*)msg; +- (IBAction)onClear:(id)sender; +- (IBAction)onScrollChange:(id)sender; +- (IBAction)onTopChange:(id)sender; + +@end + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindowController.m b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindowController.m new file mode 100644 index 0000000000..aa56938433 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/ConsoleWindowController.m @@ -0,0 +1,100 @@ + +#import "ConsoleWindowController.h" + +@interface ConsoleWindowController () + +@end + +#define SKIP_LINES_COUNT 3 +#define MAX_LINE_LEN 4096 +#define MAX_LINES_COUNT 200 + +@implementation ConsoleWindowController +@synthesize textView; + +- (id)initWithWindow:(NSWindow *)window +{ + self = [super initWithWindow:window]; + if (self) + { + // Initialization code here. + linesCount = [[NSMutableArray arrayWithCapacity:MAX_LINES_COUNT + 1] retain]; + } + + return self; +} + +- (void)dealloc +{ + [linesCount release]; + [super dealloc]; +} + +- (void)windowDidLoad +{ + [super windowDidLoad]; + // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. +} + +- (void) trace:(NSString*)msg +{ + if (traceCount >= SKIP_LINES_COUNT && [msg length] > MAX_LINE_LEN) + { + msg = [NSString stringWithFormat:@"%@ ...", [msg substringToIndex:MAX_LINE_LEN - 4]]; + } + traceCount++; + NSFont *font = [NSFont fontWithName:@"Monaco" size:12.0]; + NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]; + NSAttributedString *string = [[NSAttributedString alloc] initWithString:msg attributes:attrsDictionary]; + NSNumber *len = [NSNumber numberWithUnsignedInteger:[string length]]; + [linesCount addObject:len]; + + NSTextStorage *storage = [textView textStorage]; + [storage beginEditing]; + [storage appendAttributedString:string]; + + if ([linesCount count] >= MAX_LINES_COUNT) + { + len = [linesCount objectAtIndex:0]; + [storage deleteCharactersInRange:NSMakeRange(0, [len unsignedIntegerValue])]; + [linesCount removeObjectAtIndex:0]; + } + + [storage endEditing]; + [self changeScroll]; +} + +- (void) changeScroll +{ + BOOL scroll = [checkScroll state] == NSOnState; + if(scroll) + { + [self.textView scrollRangeToVisible: NSMakeRange(self.textView.string.length, 0)]; + } +} + +- (IBAction)onClear:(id)sender +{ + NSTextStorage *storage = [textView textStorage]; + [storage setAttributedString:[[[NSAttributedString alloc] initWithString:@""] autorelease]]; +} + +- (IBAction)onScrollChange:(id)sender +{ + [self changeScroll]; +} + +- (IBAction)onTopChange:(id)sender +{ + BOOL isTop = [topCheckBox state] == NSOnState; + if(isTop) + { + [self.window setLevel:NSFloatingWindowLevel]; + } + else + { + [self.window setLevel:NSNormalWindowLevel]; + } +} + +@end diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/DeviceEx-mac.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/DeviceEx-mac.mm new file mode 100644 index 0000000000..afae0e88c7 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/DeviceEx-mac.mm @@ -0,0 +1,70 @@ +#include "DeviceEx.h" + +#import "openudid/OpenUDIDMac.h" + +using namespace std; +PLAYER_NS_BEGIN + +DeviceEx *DeviceEx::getInstance() +{ + static DeviceEx *instance = NULL; + if (!instance) + { + instance = new DeviceEx(); + instance->init(); + } + return instance; +} + +std::string DeviceEx::getCurrentUILangName() +{ + return _uiLangName; +} + +std::string DeviceEx::getUserGUID() +{ + return _userGUID; +} + + +////////// private ////////// + +DeviceEx::DeviceEx() + : _uiLangName("en") +{ + +} + +void DeviceEx::init() +{ + makeUILangName(); + makeUserGUID(); +} + +void DeviceEx::makeUILangName() +{ + NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; + NSArray *languages = [defs objectForKey:@"AppleLanguages"]; + if ([languages count] > 0) + { + NSString *lang = [languages objectAtIndex:0]; + _uiLangName = lang.UTF8String; + } +} + +std::string DeviceEx::makeUserGUID() +{ + if (_userGUID.length() <= 0) + { + _userGUID = string([[OpenUDIDMac value] cStringUsingEncoding:NSUTF8StringEncoding]); + + if (_userGUID.length() <= 0) + { + _userGUID = "guid-fixed-1234567890"; + } + } + + return _userGUID; +} + +PLAYER_NS_END diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerEditBoxServiceMac.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerEditBoxServiceMac.h new file mode 100644 index 0000000000..1feb536ed7 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerEditBoxServiceMac.h @@ -0,0 +1,62 @@ +// +// EditBoxServiceMac.h +// player +// + +#ifndef __player__EditBoxServiceMac__ +#define __player__EditBoxServiceMac__ + +#include "PlayerEditBoxServiceProtocol.h" + + +@interface EditBoxServiceImplMac : NSObject +{ + NSTextField* textField_; + void* editBox_; + BOOL editState_; + NSMutableDictionary* placeholderAttributes_; +} + +@property(nonatomic, retain) NSTextField* textField; +@property(nonatomic, retain) NSMutableDictionary* placeholderAttributes; +@property(nonatomic, readonly, getter = isEditState) BOOL editState; +@property(nonatomic, assign) void* editBox; + +-(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox; +-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance; +-(void) setPosition:(NSPoint) pos; +-(void) setContentSize:(NSSize) size; +-(void) visit; +-(void) openKeyboard; +-(void) closeKeyboard; + +@end + + +PLAYER_NS_BEGIN +class PlayerEditBoxServiceMac : public PlayerEditBoxServiceProtocol +{ +public: + PlayerEditBoxServiceMac(); + virtual ~PlayerEditBoxServiceMac(); + + // overwrite + virtual void showSingleLineEditBox(const cocos2d::Rect &rect) ; + virtual void showMultiLineEditBox(const cocos2d::Rect &rect) ; + virtual void hide() ; + + virtual void setText(const std::string &text); + virtual void setFont(const std::string &name, int size); + virtual void setFontColor(const cocos2d::Color3B &color); + + virtual void setFormator(int formator); +private: + void show(); + +private: + EditBoxServiceImplMac* _sysEdit; +}; + +PLAYER_NS_END + +#endif diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerEditBoxServiceMac.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerEditBoxServiceMac.mm new file mode 100644 index 0000000000..4be9bb1654 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerEditBoxServiceMac.mm @@ -0,0 +1,219 @@ + +#include "PlayerEditBoxServiceMac.h" + +#include "cocos2d.h" +#include "glfw3native.h" + +// internal + +@implementation EditBoxServiceImplMac + +@synthesize textField = textField_; +@synthesize placeholderAttributes = placeholderAttributes_; +@synthesize editState = editState_; +@synthesize editBox = editBox_; + +- (id) getNSWindow +{ + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + return glview->getCocoaWindow(); +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [textField_ removeFromSuperview]; + [textField_ release]; + + [placeholderAttributes_ release]; + [super dealloc]; +} + +-(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox +{ + self = [super init]; + + if (self) + { + editState_ = NO; + self.textField = [[[NSTextField alloc] initWithFrame:frameRect] autorelease]; + + NSColor *newColor = [NSColor colorWithCalibratedRed:255 / 255.0f green:0 blue:0 alpha:1.0f]; + self.textField.textColor = newColor; + + NSFont *font = [NSFont systemFontOfSize:10]; //TODO need to delete hard code here. + textField_.font = font; + + [self setupTextField:textField_]; + + self.editBox = editBox; + self.placeholderAttributes = [NSMutableDictionary dictionaryWithObjectsAndKeys: + font, NSFontAttributeName, + [NSColor grayColor], NSForegroundColorAttributeName, + nil]; + + [[[self getNSWindow] contentView] addSubview:textField_]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(onTextDidChanged:) + name:NSControlTextDidEndEditingNotification + object:nil]; + } + + return self; +} + +- (void)onTextDidChanged:(NSNotification *) notification +{ + // hide first + [self.textField setHidden:YES]; +} + +- (void)setupTextField:(NSTextField *)textField +{ + [textField setTextColor:[NSColor whiteColor]]; + [textField setBackgroundColor:[NSColor clearColor]]; + [textField setBordered:NO]; + [textField setHidden:NO]; + [textField setWantsLayer:YES]; + [textField setDelegate:self]; +} + +-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance +{ + [[[self getNSWindow] contentView] doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; +} + +-(void) setPosition:(NSPoint) pos +{ + NSRect frame = [textField_ frame]; + frame.origin = pos; + [textField_ setFrame:frame]; +} + +-(void) setContentSize:(NSSize) size +{ + [self.textField setFrameSize:size]; +} + +-(void) visit +{ + +} + +-(void) openKeyboard +{ + if ([textField_ superview]) { + [textField_ becomeFirstResponder]; + } +} + +-(void) closeKeyboard +{ + if ([textField_ superview]) { + [textField_ resignFirstResponder]; + } +} + +- (BOOL)textFieldShouldReturn:(NSTextField *)sender +{ + if (sender == textField_) { + [sender resignFirstResponder]; + } + return NO; +} + +-(void)animationSelector +{ +} + +- (BOOL) control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector +{ + return NO; +} + +@end + + + +PLAYER_NS_BEGIN; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +PlayerEditBoxServiceMac::PlayerEditBoxServiceMac() +{ + _handler = 0; + NSRect rect = NSMakeRect(0, 0, 100, 20); + _sysEdit = [[EditBoxServiceImplMac alloc] initWithFrame:rect editBox:this]; +} + +PlayerEditBoxServiceMac::~PlayerEditBoxServiceMac() +{ + [_sysEdit release]; +} + +void PlayerEditBoxServiceMac::showSingleLineEditBox(const cocos2d::Rect &rect) +{ + [[_sysEdit.textField cell] setLineBreakMode:NSLineBreakByTruncatingTail]; + [[_sysEdit.textField cell] setTruncatesLastVisibleLine:YES]; + + [_sysEdit setPosition:NSMakePoint(rect.origin.x, rect.origin.y)]; + [_sysEdit setContentSize:NSMakeSize(rect.size.width, rect.size.height)]; + + show(); +} + +void PlayerEditBoxServiceMac::showMultiLineEditBox(const cocos2d::Rect &rect) +{ + [[_sysEdit.textField cell] setLineBreakMode:NSLineBreakByCharWrapping]; + [[_sysEdit.textField cell] setTruncatesLastVisibleLine:NO]; + + [_sysEdit setPosition:NSMakePoint(rect.origin.x, rect.origin.y)]; + [_sysEdit setContentSize:NSMakeSize(rect.size.width, rect.size.height)]; + + show(); +} + +void PlayerEditBoxServiceMac::setText(const std::string &text) +{ + _sysEdit.textField.stringValue = [NSString stringWithUTF8String:text.c_str()]; +} + +void PlayerEditBoxServiceMac::setFont(const std::string &name, int size) +{ + NSString *fntName = [NSString stringWithUTF8String:name.c_str()]; + NSFont *textFont = [NSFont fontWithName:fntName size:size]; + if (textFont != nil) + { + [_sysEdit.textField setFont:textFont]; + } +} + +void PlayerEditBoxServiceMac::setFontColor(const cocos2d::Color3B &color) +{ + NSColor *textColor = [NSColor colorWithCalibratedRed:color.r / 255.0f green:color.g / 255.0f blue:color.b / 255.0f alpha:1.0f]; + _sysEdit.textField.textColor = textColor; +} + +// hide editbox +void PlayerEditBoxServiceMac::hide() +{ + [_sysEdit.textField setHidden:YES]; + [_sysEdit closeKeyboard]; +} + +void PlayerEditBoxServiceMac::show() +{ + [_sysEdit.textField setHidden:NO]; + [_sysEdit openKeyboard]; +} + +void PlayerEditBoxServiceMac::setFormator(int formator) +{ + CCLOG("Not support yet."); +} + +PLAYER_NS_END; \ No newline at end of file diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerFileDialogServiceMac.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerFileDialogServiceMac.h new file mode 100644 index 0000000000..49ed2c2a94 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerFileDialogServiceMac.h @@ -0,0 +1,29 @@ +#ifndef __PLAY_FILE_DIALOG_SERVICE_MAC_H +#define __PLAY_FILE_DIALOG_SERVICE_MAC_H + +#include "PlayerMacros.h" +#include "PlayerFileDialogServiceProtocol.h" + +PLAYER_NS_BEGIN + +class PlayerFileDialogServiceMac : public PlayerFileDialogServiceProtocol +{ +public: + virtual std::string openFile(const std::string &title, + const std::string &directory, + const std::string &extensions) const; + + virtual std::vector openMultiple(const std::string &title, + const std::string &directory, + const std::string &extensions) const; + + virtual std::string saveFile(const std::string &title, + const std::string &path) const; + + virtual std::string openDirectory(const std::string &title, + const std::string &directory)const; +}; + +PLAYER_NS_END + +#endif // __PLAY_FILE_DIALOG_SERVICE_MAC_H \ No newline at end of file diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerFileDialogServiceMac.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerFileDialogServiceMac.mm new file mode 100644 index 0000000000..413452bf9a --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerFileDialogServiceMac.mm @@ -0,0 +1,174 @@ + +#include "PlayerFileDialogServiceMac.h" + +#include "glfw3.h" +#include "glfw3native.h" + +#define VALIDATE_FRAMEBUFFER { \ +NSOpenGLContext *__context = glfwGetNSGLContext(glfwGetCurrentContext()); \ +[__context makeCurrentContext]; \ +} + +PLAYER_NS_BEGIN + +std::string PlayerFileDialogServiceMac::openFile(const std::string &title, + const std::string &directory, + const std::string &extensions) const +{ + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + [openDlg setTitle:[NSString stringWithUTF8String:title.c_str()]]; + [openDlg setCanChooseDirectories:NO]; + [openDlg setCanChooseFiles:YES]; + [openDlg setCanHide:YES]; + [openDlg setCanCreateDirectories:NO]; + [openDlg setCanSelectHiddenExtension:NO]; + [openDlg setAllowsMultipleSelection:NO]; + + if (directory.length()) { + [openDlg setDirectoryURL:[NSURL fileURLWithPath:[NSString stringWithUTF8String:directory.c_str()]]]; + } + + if (extensions.length()) + { + NSMutableArray *fileTypes = [NSMutableArray array]; + + NSString *buff = [NSString stringWithUTF8String:extensions.c_str()]; + NSArray *extensionArray = [buff componentsSeparatedByString:@";"]; + + for (NSString *oneExtension in extensionArray) { + NSArray *tmpData = [oneExtension componentsSeparatedByString:@"|"]; + if ([tmpData count] > 1) + { + NSString *suffixString = [tmpData objectAtIndex:1]; + suffixString = [suffixString stringByReplacingOccurrencesOfString:@"*." withString:@""]; + [fileTypes addObjectsFromArray:[suffixString componentsSeparatedByString:@","]]; + } + } + + [openDlg setAllowedFileTypes:fileTypes]; + } + + std::string filePath; + if ([openDlg runModal] == NSFileHandlingPanelOKButton) + { + NSURL *url = [openDlg.URLs objectAtIndex:0]; + filePath = [[url path] UTF8String]; + } + + [openDlg close]; + VALIDATE_FRAMEBUFFER + return filePath; +} + +std::string PlayerFileDialogServiceMac::openDirectory( const std::string &title, + const std::string &directory) const +{ + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + [openDlg setTitle:[NSString stringWithUTF8String:title.c_str()]]; + [openDlg setCanChooseDirectories:YES]; + [openDlg setCanChooseFiles:NO]; + [openDlg setCanHide:YES]; + [openDlg setCanCreateDirectories:NO]; + [openDlg setCanSelectHiddenExtension:NO]; + [openDlg setAllowsMultipleSelection:NO]; + + if (directory.length()) { + [openDlg setDirectoryURL:[NSURL fileURLWithPath:[NSString stringWithUTF8String:directory.c_str()]]]; + } + + std::string path; + if ([openDlg runModal] == NSFileHandlingPanelOKButton) + { + NSURL *url = [openDlg.URLs objectAtIndex:0]; + path = [[url path] UTF8String]; + } + + [openDlg close]; + VALIDATE_FRAMEBUFFER + return path; +} + +std::vector PlayerFileDialogServiceMac::openMultiple( const std::string &title, + const std::string &directory, + const std::string &extensions) const +{ + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + [openDlg setTitle:[NSString stringWithUTF8String:title.c_str()]]; + [openDlg setCanChooseDirectories:YES]; + [openDlg setCanChooseFiles:YES]; + [openDlg setCanHide:YES]; + [openDlg setCanCreateDirectories:NO]; + [openDlg setCanSelectHiddenExtension:NO]; + [openDlg setAllowsMultipleSelection:YES]; + + if (directory.length()) { + [openDlg setDirectoryURL:[NSURL fileURLWithPath:[NSString stringWithUTF8String:directory.c_str()]]]; + } + + if (extensions.length()) + { + NSMutableArray *fileTypes = [NSMutableArray array]; + + NSString *buff = [NSString stringWithUTF8String:extensions.c_str()]; + NSArray *extensionArray = [buff componentsSeparatedByString:@";"]; + + for (NSString *oneExtension in extensionArray) { + NSArray *tmpData = [oneExtension componentsSeparatedByString:@"|"]; + if ([tmpData count] > 1) + { + NSString *suffixString = [tmpData objectAtIndex:1]; + suffixString = [suffixString stringByReplacingOccurrencesOfString:@"*." withString:@""]; + [fileTypes addObjectsFromArray:[suffixString componentsSeparatedByString:@","]]; + } + } + + [openDlg setAllowedFileTypes:fileTypes]; + } + + std::vector pathes; + if ([openDlg runModal] == NSFileHandlingPanelOKButton) + { + for (NSURL *url in openDlg.URLs) { + pathes.push_back([[url path] UTF8String]); + } + } + + [openDlg close]; + VALIDATE_FRAMEBUFFER + return pathes; +} + +std::string PlayerFileDialogServiceMac::saveFile(const std::string &title, + const std::string &path) const +{ + NSSavePanel* saveDlg = [NSSavePanel savePanel]; + [saveDlg setTitle:[NSString stringWithUTF8String:title.c_str()]]; + [saveDlg setCanHide:YES]; + [saveDlg setCanCreateDirectories:NO]; + [saveDlg setCanSelectHiddenExtension:NO]; + + + // set directory + NSString *tempPath = [NSString stringWithUTF8String:path.c_str()]; + NSString *directory = [tempPath stringByDeletingLastPathComponent]; + if (directory) + { + [saveDlg setDirectoryURL:[NSURL fileURLWithPath:directory]]; + } + + // set filename + [saveDlg setNameFieldStringValue:[tempPath lastPathComponent]]; + + std::string filePath; + if ([saveDlg runModal] == NSFileHandlingPanelOKButton) + { + NSURL *url = saveDlg.URL; + filePath = [[url path] UTF8String]; + } + + [saveDlg close]; + VALIDATE_FRAMEBUFFER + return filePath; +} + +PLAYER_NS_END diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMac.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMac.h new file mode 100644 index 0000000000..971ada3630 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMac.h @@ -0,0 +1,52 @@ + +#ifndef __PLAYER_MAC_H_ +#define __PLAYER_MAC_H_ + +#include "PlayerProtocol.h" + +#include "PlayerEditBoxServiceMac.h" +#include "PlayerFileDialogServiceMac.h" +#include "PlayerMenuServiceMac.h" +#include "PlayerMessageBoxServiceMac.h" +#include "PlayerTaskServiceMac.h" + +#include "PlayerUtils.h" + +#include "ProjectConfig/ProjectConfig.h" +PLAYER_NS_BEGIN + +class PlayerMac : public PlayerProtocol +{ +public: + static PlayerMac *create(); + virtual ~PlayerMac(); + + virtual PlayerFileDialogServiceProtocol *getFileDialogService(); + virtual PlayerMessageBoxServiceProtocol *getMessageBoxService(); + virtual PlayerMenuServiceProtocol *getMenuService(); + virtual PlayerEditBoxServiceProtocol *getEditBoxService(); + virtual PlayerTaskServiceProtocol *getTaskService(); + + void quit(); + void relaunch(); + void openNewPlayer(); + void openNewPlayerWithProjectConfig(const ProjectConfig& config); + void openProjectWithProjectConfig(const ProjectConfig& config); + + void setController(id controller); + int getPositionX(); + int getPositionY(); +protected: + PlayerMac(); + + PlayerMenuServiceMac *_menuService; + PlayerMessageBoxServiceMac *_messageBoxService; + PlayerFileDialogServiceMac *_fileDialogService; + PlayerEditBoxServiceMac *_editBoxService; + PlayerTaskServiceMac *_taskService; + id _appController; +}; + +PLAYER_NS_END + +#endif // __PLAYER_MAC_H_ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMac.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMac.mm new file mode 100644 index 0000000000..7bebdfeb04 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMac.mm @@ -0,0 +1,135 @@ + + +#include "PlayerMac.h" + + +PLAYER_NS_BEGIN +using namespace cocos2d; + +PlayerMac* PlayerMac::create() +{ + return new PlayerMac(); +} + + +PlayerMac::PlayerMac() +: PlayerProtocol() +, _fileDialogService(nullptr) +, _messageBoxService(nullptr) +, _menuService(nullptr) +, _editBoxService(nullptr) +, _appController(nullptr) +, _taskService(nullptr) +{ +} + + +PlayerMac::~PlayerMac() +{ + CC_SAFE_DELETE(_fileDialogService); + CC_SAFE_DELETE(_fileDialogService); + CC_SAFE_DELETE(_messageBoxService); + CC_SAFE_DELETE(_menuService); + CC_SAFE_DELETE(_editBoxService); + CC_SAFE_DELETE(_taskService); +} + +PlayerFileDialogServiceProtocol *PlayerMac::getFileDialogService() +{ + if (!_fileDialogService) + { + _fileDialogService = new PlayerFileDialogServiceMac(); + } + return _fileDialogService; +} + +PlayerMessageBoxServiceProtocol *PlayerMac::getMessageBoxService() +{ + if (!_messageBoxService) + { + _messageBoxService = new PlayerMessageBoxServiceMac(); + } + return _messageBoxService; +} + +PlayerMenuServiceProtocol *PlayerMac::getMenuService() +{ + if (!_menuService) + { + _menuService = new PlayerMenuServiceMac(); + } + return _menuService; +} + +PlayerEditBoxServiceProtocol *PlayerMac::getEditBoxService() +{ + if (!_editBoxService) + { + _editBoxService = new PlayerEditBoxServiceMac(); + } + return _editBoxService; +} + +PlayerTaskServiceProtocol *PlayerMac::getTaskService() +{ + + if (!_taskService) + { + _taskService = new PlayerTaskServiceMac(); + } + return _taskService; +} + +void PlayerMac::quit() +{ + cocos2d::Director::getInstance()->end(); +} + +void PlayerMac::relaunch() +{ + if (_appController && [_appController respondsToSelector:NSSelectorFromString(@"relaunch")]) + { + [_appController performSelector:NSSelectorFromString(@"relaunch")]; + } +} + +void PlayerMac::openNewPlayer() +{ +} + +void PlayerMac::openNewPlayerWithProjectConfig(const ProjectConfig& config) +{ + if (_appController && [_appController respondsToSelector:NSSelectorFromString(@"launch:")]) + { + NSString *commandLine = [NSString stringWithCString:config.makeCommandLine().c_str() + encoding:NSUTF8StringEncoding]; + NSArray *arguments = [NSMutableArray arrayWithArray:[commandLine componentsSeparatedByString:@" "]]; + + [_appController performSelector:NSSelectorFromString(@"launch:") withObject:arguments]; + } +} + +void PlayerMac::openProjectWithProjectConfig(const ProjectConfig& config) +{ + this->openNewPlayerWithProjectConfig(config); + this->quit(); +} + +void PlayerMac::setController(id controller) +{ + _appController = controller; +} + +int PlayerMac::getPositionX() +{ + NSWindow *window = dynamic_cast(Director::getInstance()->getOpenGLView())->getCocoaWindow(); + return window.frame.origin.x; +} + +int PlayerMac::getPositionY() +{ + NSWindow *window = dynamic_cast(Director::getInstance()->getOpenGLView())->getCocoaWindow(); + return window.frame.origin.y; +} + +PLAYER_NS_END diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMenuServiceMac.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMenuServiceMac.h new file mode 100644 index 0000000000..3697c5258f --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMenuServiceMac.h @@ -0,0 +1,82 @@ + +#ifndef __PLAYER_MENU_SERVICE_MAC_H_ +#define __PLAYER_MENU_SERVICE_MAC_H_ + +#include + +#include "cocos2d.h" +#include "PlayerMacros.h" +#include "PlayerMenuServiceProtocol.h" + +// +// Menu item Helper +// + +PLAYER_NS_BEGIN +class PlayerMenuItemMac; +PLAYER_NS_END + +@interface NNMenuItem : NSMenuItem +{ + int scriptHandler; + player::PlayerMenuItemMac *macMenuItem; +} +@property (nonatomic) int scriptHandler; +@property (nonatomic) const player::PlayerMenuItemMac *macMenuItem; + ++(id) createMenuItem:(const player::PlayerMenuItemMac *) macMenuItem; +@end + + +// +// PlayerMenuItemMac +// + +PLAYER_NS_BEGIN + +class PlayerMenuItemMac : public PlayerMenuItem +{ +public: + static PlayerMenuItemMac *create(const std::string &menuId, const std::string &title); + virtual ~PlayerMenuItemMac(); + + virtual void setTitle(const std::string &title); + virtual void setEnabled(bool enabled); + virtual void setChecked(bool checked); + virtual void setShortcut(const std::string &shortcut); + +protected: + PlayerMenuItemMac(); + + PlayerMenuItemMac *_parent; + NNMenuItem *_menuItem; + NSMenu *_menu; + cocos2d::Vector _children; + + friend class PlayerMenuServiceMac; +}; + +class PlayerMenuServiceMac : public PlayerMenuServiceProtocol +{ +public: + PlayerMenuServiceMac(); + virtual ~PlayerMenuServiceMac(); + + virtual PlayerMenuItem *addItem(const std::string &menuId, const std::string &title, const std::string &parentId, int order = MAX_ORDER); + virtual PlayerMenuItem *addItem(const std::string &menuId, const std::string &title); + virtual PlayerMenuItem *getItem(const std::string &menuId); + virtual bool removeItem(const std::string &menuId); + virtual void setMenuBarEnabled(bool enabled); + +private: + bool removeItemInternal(const std::string &menuId, bool isUpdateChildrenOrder); + void updateChildrenOrder(PlayerMenuItemMac *parent); + +private: + PlayerMenuItemMac _root; + std::unordered_map _items; +}; + +PLAYER_NS_END + +#endif // __PLAYER_MENU_SERVICE_MAC_H_ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMenuServiceMac.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMenuServiceMac.mm new file mode 100644 index 0000000000..eed14debcd --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMenuServiceMac.mm @@ -0,0 +1,370 @@ + +#include "PlayerMenuServiceMac.h" +#include "PlayerUtils.h" + +#include "cocos2d.h" +#include "AppEvent.h" + +USING_NS_CC; + +/////////////////////////////////////// menu helper ////////////////////////////////////////////// +static bool __G_IS_MENUBAR_ENABLED__ = true; // WTF + +@implementation NNMenuItem +@synthesize scriptHandler; +@synthesize macMenuItem; + ++(id) createMenuItem:(const player::PlayerMenuItemMac *) macMenuItem +{ + if (macMenuItem->getTitle().compare("-") == 0) + { + return [NSMenuItem separatorItem]; + } + else + { + return [[[NNMenuItem alloc] initWithMenuItem:macMenuItem] autorelease]; + } + + return NULL; +} + +-(id) initWithMenuItem:(const player::PlayerMenuItemMac *) menuItem +{ + NSString *title = [NSString stringWithUTF8String:menuItem->getTitle().c_str()]; + title = [title stringByReplacingOccurrencesOfString:@"&" withString:@""]; + if ([super initWithTitle:title action:@selector(onClicked:) keyEquivalent:@""]) + { + self.target = self; + } + + self.macMenuItem = menuItem; + + return self; +} + +-(void) setShortcut:(std::string) shortcut +{ + std::vector fields = player::splitString(shortcut, std::string("+")); + + NSUInteger mask = [self keyEquivalentModifierMask]; + for (auto cut : fields) + { + if (cut == kPlayerSuperModifyKey) + { + mask |= NSCommandKeyMask; + } + else if (cut == kPlayerShiftModifyKey) + { + mask |= NSShiftKeyMask; + } + else if (cut == kPlayerCtrlModifyKey) + { + mask |= NSControlKeyMask; + } + else if (cut == kPlayerAltModifyKey) + { + mask |= NSAlternateKeyMask; + } + else + { + if (cut.length() == 1) + { + [self setKeyEquivalent:[NSString stringWithUTF8String:cut.c_str()]]; + } + else + { + CCLOG("[modifyItem] shortcut (%s) is invalid.", shortcut.c_str()); + } + } + } + + if (mask != 0) + { + [self setKeyEquivalentModifierMask:mask]; + } +} + +-(void) onClicked:(id)sender +{ + AppEvent event(kAppEventName, APP_EVENT_MENU); + + std::stringstream buf; + buf << "{\"data\":\"" << self.macMenuItem->getMenuId().c_str() << "\""; + buf << ",\"name\":" << "\"menuClicked\"" << "}"; + event.setDataString(buf.str()); + event.setUserData((void*)self.macMenuItem); + Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); +} + +-(BOOL) validateMenuItem:(NSMenuItem *)menuItem +{ + return __G_IS_MENUBAR_ENABLED__; +} + +@end + + + +PLAYER_NS_BEGIN + +// + +PlayerMenuItemMac *PlayerMenuItemMac::create(const std::string &menuId, const std::string &title) +{ + PlayerMenuItemMac *item = new PlayerMenuItemMac(); + item->_menuId = menuId; + item->_title = title; + item->autorelease(); + return item; +} + +PlayerMenuItemMac::PlayerMenuItemMac() + : _parent(nullptr) + , _menuItem(nullptr) + , _menu(nullptr) +{ +} + +PlayerMenuItemMac::~PlayerMenuItemMac() +{ + CC_SAFE_RELEASE(_parent); + if (_menuItem) + { + [_parent->_menu removeItem:_menuItem]; + } + + CCLOG("PlayerMenuItemWin::~PlayerMenuItemWin() - %s", _menuId.c_str()); +} + +void PlayerMenuItemMac::setTitle(const std::string &title) +{ + if (title.length() == 0) + { + CCLOG("MenuServiceWin::setTitle() - can not set menu title to empty, menu id (%s)", _menuId.c_str()); + return; + } + + _menuItem.title = [NSString stringWithUTF8String:title.c_str()]; + if (_menu) + { + _menu.title = _menuItem.title; + } + + _title = title; +} + +void PlayerMenuItemMac::setEnabled(bool enabled) +{ + _isEnabled = enabled; + + if (enabled) + { + [_menuItem setAction:@selector(onClicked:)]; + } + else + { + [_menuItem setAction:nil]; + } +} + +void PlayerMenuItemMac::setChecked(bool checked) +{ + _isChecked = checked; + [_menuItem setState:checked ? NSOnState : NSOffState]; +} + +void PlayerMenuItemMac::setShortcut(const std::string &shortcut) +{ + _shortcut = shortcut; + [_menuItem setShortcut:shortcut]; +} + + + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +PlayerMenuServiceMac::PlayerMenuServiceMac() +{ + // @TODO: build menu with **EDIT** menu + + NSApplication *thisApp = [NSApplication sharedApplication]; + _root._menu = [thisApp mainMenu]; +} + +PlayerMenuServiceMac::~PlayerMenuServiceMac() +{ + log("~PlayerMenuServiceMac"); + _items.clear(); +} + +PlayerMenuItem* PlayerMenuServiceMac::addItem(const std::string &menuId, const std::string &title, + const std::string &parentId, int order) +{ + if (menuId.length() == 0 || title.length() == 0) + { + CCLOG("PlayerMenuServiceMac::addItem() - menuId and title must is non-empty"); + return nullptr; + } + + // check menu id is exists + if (_items.find(menuId) != _items.end()) + { + CCLOG("PlayerMenuServiceMac::addItem() - menu id (%s) is exists", menuId.c_str()); + return nullptr; + } + + // set parent + PlayerMenuItemMac *parent = &_root; + if (parentId.length()) + { + // query parent menu + auto it = _items.find(parentId); + if (it != _items.end()) + { + parent = it->second; + } + } + + if (!parent->_menu) + { + NSMenu *nsmenu = [[NSMenu alloc] initWithTitle:[parent->_menuItem title]]; + [parent->_parent->_menu setSubmenu:nsmenu forItem:parent->_menuItem]; + parent->_menu = nsmenu; + parent->_isGroup = true; + } + + + // create new menu item + PlayerMenuItemMac *item = PlayerMenuItemMac::create(menuId, title); + item->_parent = parent; + item->_parent->retain(); + + // check new menu item position + int childSize = (int) [parent->_menu itemArray].count; + childSize = (int) parent->_children.size(); + if (order > childSize) + { + order = childSize; + } + else if (order < 0) + { + order = 0; + } + + + // add menu item to menu bar + int newIndex = order; + if (parent == &_root) + { + newIndex += 1; + } + NNMenuItem *newItem = [NNMenuItem createMenuItem:item]; + [parent->_menu insertItem:newItem atIndex:newIndex]; + item->_menuItem = newItem; + + + // update menu state + parent->_children.insert(order, item); + _items[item->_menuId] = item; + updateChildrenOrder(parent); + + return item; +} + +PlayerMenuItem* PlayerMenuServiceMac::addItem(const std::string &menuId, const std::string &title) +{ + return addItem(menuId, title, ""); +} + +PlayerMenuItem* PlayerMenuServiceMac::getItem(const std::string &menuId) +{ + auto it = _items.find(menuId); + if (it == _items.end()) + { + CCLOG("MenuServiceWin::getItem() - Invalid menu id (%s)", menuId.c_str()); + return nullptr; + } + + return it->second; +} + +bool PlayerMenuServiceMac::removeItem(const std::string &menuId) +{ + return removeItemInternal(menuId, true);; +} + +void PlayerMenuServiceMac::setMenuBarEnabled(bool enabled) +{ + __G_IS_MENUBAR_ENABLED__ = enabled; +} + +#pragma mark - private - + +bool PlayerMenuServiceMac::removeItemInternal(const std::string &menuId, bool isUpdateChildrenOrder) +{ + auto it = _items.find(menuId); + if (it == _items.end()) + { + CCLOG("MenuServiceWin::removeItem() - Invalid menu id (%s)", menuId.c_str()); + return false; + } + + PlayerMenuItemMac *item = it->second; + if (item->_children.size() == 0) + { + // remove item from parent + bool removed = false; + auto *theChildren = &item->_parent->_children; + for (auto it = theChildren->begin(); it != theChildren->end(); ++it) + { + if ((*it)->_menuItem == item->_menuItem) + { + theChildren->erase(it); + removed = true; + break; + } + } + + if (!removed) + { + CCLOG("MenuServiceWin::removeItem() - remove menu item (%s) failed, not found command id from parent->children", item->_menuId.c_str()); + } + + // remove menu id mapping + _items.erase(menuId); + if (isUpdateChildrenOrder) + { + updateChildrenOrder(item->_parent); + } + return true; + } + else + { + // remove all children + while (item->_children.size() != 0) + { + PlayerMenuItemMac *child = *item->_children.begin(); + if (!removeItemInternal(child->_menuId.c_str(), false)) + { + break; + return false; + } + } + return removeItemInternal(menuId, true); + } + + return false; +} + +void PlayerMenuServiceMac::updateChildrenOrder(PlayerMenuItemMac *parent) +{ + auto *children = &parent->_children; + int order = 0; + for (auto it = children->begin(); it != children->end(); ++it) + { + (*it)->_order = order; + order++; + } +} + +PLAYER_NS_END \ No newline at end of file diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMessageBoxServiceMac.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMessageBoxServiceMac.h new file mode 100644 index 0000000000..0aec41fae5 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMessageBoxServiceMac.h @@ -0,0 +1,29 @@ + +#ifndef __PLAYER_MessageBoxServiceMac_h +#define __PLAYER_MessageBoxServiceMac_h + +#include + +#include "PlayerMacros.h" +#include "PlayerMessageBoxServiceProtocol.h" + +PLAYER_NS_BEGIN + +class PlayerMessageBoxServiceMac : public PlayerMessageBoxServiceProtocol +{ +public: + virtual int showMessageBox(const std::string &title, + const std::string &message, + int buttonsType = BUTTONS_OK); +protected: + struct MessageBoxInfo + { + std::string title; + const int buttonId; + }; + std::vector getTitles(int buttons); +}; + +PLAYER_NS_END + +#endif // __PLAYER_MessageBoxServiceMac_h diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMessageBoxServiceMac.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMessageBoxServiceMac.mm new file mode 100644 index 0000000000..fe3f77b5ad --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerMessageBoxServiceMac.mm @@ -0,0 +1,58 @@ + +#include "PlayerMessageBoxServiceMac.h" + +PLAYER_NS_BEGIN + +int PlayerMessageBoxServiceMac::showMessageBox(const std::string &title, + const std::string &message, + int buttonsType) +{ + NSAlert *alert = [[NSAlert alloc] init]; + + auto titles = getTitles(buttonsType); + for (auto& title : titles) + { + [alert addButtonWithTitle:[NSString stringWithUTF8String:title.title.c_str()]]; + } + + [alert setMessageText:[NSString stringWithUTF8String:title.c_str()]]; + [alert setInformativeText:[NSString stringWithUTF8String:message.c_str()]]; + [alert setAlertStyle:NSWarningAlertStyle]; + + int index = (int)[alert runModal] - NSAlertFirstButtonReturn; + return titles.at(index).buttonId; +} + +std::vector PlayerMessageBoxServiceMac::getTitles(int buttons) +{ + std::vector titles; + + switch (buttons) { + case BUTTONS_OK: + titles.push_back({"OK", BUTTON_OK}); + break; + + case BUTTONS_OK_CANCEL: + titles.push_back({"OK", BUTTON_OK}); + titles.push_back({"Cancel", BUTTON_CANCEL}); + break; + + case BUTTONS_YES_NO: + titles.push_back({"Yes", BUTTON_YES}); + titles.push_back({"No", BUTTON_NO}); + break; + + case BUTTONS_YES_NO_CANCEL: + titles.push_back({"Yes", BUTTON_YES}); + titles.push_back({"No", BUTTON_NO}); + titles.push_back({"Cancel", BUTTON_CANCEL}); + break; + + default: + break; + } + + return titles; +} + +PLAYER_NS_END \ No newline at end of file diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerTaskServiceMac.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerTaskServiceMac.h new file mode 100644 index 0000000000..67155e0b09 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerTaskServiceMac.h @@ -0,0 +1,81 @@ + +#ifndef __PLAYER_TASK_SERVICE_MAC_H_ +#define __PLAYER_TASK_SERVICE_MAC_H_ + +#include + +#include "PlayerTaskServiceProtocol.h" + +PLAYER_NS_BEGIN +class PlayerTaskMac; +PLAYER_NS_END + +@interface PlayerTaskPrivate : NSObject +{ + NSFileHandle *fileHandle; + + // compatible code + NSTask *_buildTask; + BOOL _isRunning; + int _exitCode; + NSString *_output; +} + +@property (assign) NSTask *buildTask; +@property (assign) BOOL isRunning; +@property (assign) int exitCode; +@property (retain) NSString *output; + +- (void) runScriptAsyn:(NSString *)absScriptPath withArguments:(NSArray *) arguments; +@end + +PLAYER_NS_BEGIN + +class PlayerTaskMac : public PlayerTask +{ +public: + static PlayerTaskMac *create(const std::string &name, + const std::string &executePath, + const std::string &commandLineArguments); + + virtual ~PlayerTaskMac(); + + virtual bool run(); + virtual void stop(); + virtual void runInTerminal(); + + // check task status + virtual void update(float dt); + + void appendOutput(const char *data); +protected: + PlayerTaskMac(const std::string &name, + const std::string &executePath, + const std::string &commandLineArguments); + + void cleanup(); + std::u16string makeCommandLine() const; + + PlayerTaskPrivate *_taskPrivate; +}; + +class PlayerTaskServiceMac : public PlayerTaskServiceProtocol +{ +public: + PlayerTaskServiceMac(); + virtual ~PlayerTaskServiceMac(); + + virtual PlayerTask *createTask(const std::string &name, + const std::string &executePath, + const std::string &commandLineArguments); + virtual PlayerTask *getTask(const std::string &name); + virtual void removeTask(const std::string &name); + +protected: + cocos2d::Map _tasks; +}; + +PLAYER_NS_END + + +#endif // __PLAYER_TASK_SERVICE_MAC_H_ \ No newline at end of file diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerTaskServiceMac.mm b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerTaskServiceMac.mm new file mode 100644 index 0000000000..d4e79635db --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/PlayerTaskServiceMac.mm @@ -0,0 +1,246 @@ + +#include "PlayerTaskServiceMac.h" + +@implementation PlayerTaskPrivate + +@synthesize buildTask = _buildTask; +@synthesize isRunning = _isRunning; +@synthesize exitCode = _exitCode; +@synthesize output = _output; + +-(id) init +{ + if ((self = [super init])) { + _isRunning = NO; + _exitCode = 0; + } + + return self; +} + +-(void) dealloc +{ + [_output release]; + [super dealloc]; +} + +-(void)performSelectorInBackground:(SEL)selector withObjects:(id)object, ... +{ + NSMethodSignature *signature = [self methodSignatureForSelector:selector]; + + // setup the invocation + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.target = self; + invocation.selector = selector; + + // associate the arguments + va_list objects; + va_start(objects, object); + unsigned int objectCounter = 2; + for (id obj = object; obj != nil; obj = va_arg(objects, id)) + { + [invocation setArgument:&obj atIndex:objectCounter++]; + } + va_end(objects); + + // make sure to invoke on a background queue + NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithInvocation:invocation]; + NSOperationQueue *backgroundQueue = [[NSOperationQueue alloc] init]; + [backgroundQueue addOperation:operation]; +} + +- (void) runScriptAsyn:(NSString *)absScriptPath withArguments:(NSArray *) arguments +{ + _isRunning = YES; + [self performSelectorInBackground:@selector(runScriptSync:withArguments:) + withObjects:absScriptPath, arguments, nil]; +} + +- (void) runScriptSync:(NSString *)absScriptPath withArguments:(NSArray *)arguments +{ + if (!absScriptPath) + { + CCLOG("Please check your script (%s)", absScriptPath.UTF8String); + return ; + } + + _buildTask = [[NSTask alloc] init]; + [_buildTask setLaunchPath:absScriptPath]; + + if (!arguments) + { + arguments = [NSArray array]; + } + [_buildTask setArguments:arguments]; + + // + NSPipe *pipe; + pipe = [NSPipe pipe]; + [_buildTask setStandardOutput: pipe]; + + fileHandle = [pipe fileHandleForReading]; + + // + [_buildTask launch]; + [_buildTask waitUntilExit]; + + NSData *data; + data = [fileHandle readDataToEndOfFile]; + + _output = [[NSString alloc] initWithData: data + encoding: NSUTF8StringEncoding]; + _isRunning = NO; + _exitCode = [_buildTask terminationStatus]; + + [fileHandle closeFile]; + [_buildTask release]; + _buildTask = nil; +} + +@end + +PLAYER_NS_BEGIN + +PlayerTaskMac *PlayerTaskMac::create(const std::string &name, const std::string &executePath, const std::string &commandLineArguments) +{ + PlayerTaskMac *task = new PlayerTaskMac(name, executePath, commandLineArguments); + task->autorelease(); + return task; +} + +PlayerTaskMac::PlayerTaskMac(const std::string &name, + const std::string &executePath, + const std::string &commandLineArguments) +: PlayerTask(name, executePath, commandLineArguments) +{ + _taskPrivate = [[PlayerTaskPrivate alloc] init]; +} + +PlayerTaskMac::~PlayerTaskMac() +{ + cleanup(); +} + +bool PlayerTaskMac::run() +{ + if (!isIdle()) + { + CCLOG("PlayerTaskMac::run() - task is not idle"); + return false; + } + + NSString *commandLine = [NSString stringWithCString:_commandLineArguments.c_str() + encoding:NSUTF8StringEncoding]; + [_taskPrivate runScriptAsyn:[NSString stringWithUTF8String:_executePath.data()] + withArguments:[NSMutableArray arrayWithArray:[commandLine componentsSeparatedByString:@" "]]]; + _state = STATE_RUNNING; + + cocos2d::Director::getInstance()->getScheduler()->scheduleUpdate(this, 0, false); + return true; +} + +void PlayerTaskMac::runInTerminal() +{ + NSString *s = [NSString stringWithFormat: + @"tell application \"Terminal\" to do script \"%s %s\"", _executePath.c_str(), _commandLineArguments.c_str()]; + + NSAppleScript *as = [[NSAppleScript alloc] initWithSource: s]; + [as executeAndReturnError:nil]; +} + +void PlayerTaskMac::stop() +{ + cleanup(); +} + +void PlayerTaskMac::update(float dt) +{ + _lifetime += dt; + + if (_taskPrivate.isRunning) + { + return ; + } + + cocos2d::Director::getInstance()->getScheduler()->unscheduleAllForTarget(this); + cleanup(); +} + +void PlayerTaskMac::appendOutput(const char *data) +{ + _output.append(data); +} + +void PlayerTaskMac::cleanup() +{ + + _state = STATE_COMPLETED; + + [NSObject cancelPreviousPerformRequestsWithTarget:_taskPrivate]; + [_taskPrivate.buildTask interrupt]; + + _resultCode = _taskPrivate.exitCode; + _output.append(_taskPrivate.output.UTF8String); + + [_taskPrivate release]; + _taskPrivate = nil; + CCLOG("\nCMD: (exit code: %d) %s", _resultCode, _output.c_str()); + + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchCustomEvent(_name); +} + +std::u16string PlayerTaskMac::makeCommandLine() const +{ + std::stringstream buf; + buf << "\""; + buf << _executePath; + buf << "\" "; + buf << _commandLineArguments; + + std::u16string u16command; + cocos2d::StringUtils::UTF8ToUTF16(buf.str(), u16command); + return u16command; +} + +PlayerTaskServiceMac::PlayerTaskServiceMac() +{ +} + +PlayerTaskServiceMac::~PlayerTaskServiceMac() +{ + for (auto it = _tasks.begin(); it != _tasks.end(); ++it) + { + it->second->stop(); + } +} + +PlayerTask *PlayerTaskServiceMac::createTask(const std::string &name, + const std::string &executePath, + const std::string &commandLineArguments) +{ + CCASSERT(_tasks.find(name) == _tasks.end(), "Task already exists."); + PlayerTaskMac *task = PlayerTaskMac::create(name, executePath, commandLineArguments); + _tasks.insert(name, task); + return task; +} + +PlayerTask *PlayerTaskServiceMac::getTask(const std::string &name) +{ + auto it = _tasks.find(name); + return it != _tasks.end() ? it->second : nullptr; +} + +void PlayerTaskServiceMac::removeTask(const std::string &name) +{ + auto it = _tasks.find(name); + if (it != _tasks.end()) + { + if (!it->second->isCompleted()) + { + it->second->stop(); + } + _tasks.erase(it); + } +} + +PLAYER_NS_END diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/openudid/OpenUDIDMac.h b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/openudid/OpenUDIDMac.h new file mode 100644 index 0000000000..57d5d115bd --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/openudid/OpenUDIDMac.h @@ -0,0 +1,65 @@ +// +// OpenUDID.h +// openudid +// +// initiated by Yann Lechelle (cofounder @Appsfire) on 8/28/11. +// Copyright 2011 OpenUDID.org +// +// Main branches +// iOS code: https://github.com/ylechelle/OpenUDID +// + +/* + !!! IMPORTANT !!! + + IF YOU ARE GOING TO INTEGRATE OpenUDID INSIDE A (STATIC) LIBRARY, + PLEASE MAKE SURE YOU REFACTOR THE OpenUDID CLASS WITH A PREFIX OF YOUR OWN, + E.G. ACME_OpenUDID. THIS WILL AVOID CONFUSION BY DEVELOPERS WHO ARE ALSO + USING OpenUDID IN THEIR OWN CODE. + + !!! IMPORTANT !!! + +*/ + +/* + http://en.wikipedia.org/wiki/Zlib_License + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#import + +// +// Usage: +// #include "OpenUDID.h" +// NSString* openUDID = [OpenUDID value]; +// + +#define kOpenUDIDErrorNone 0 +#define kOpenUDIDErrorOptedOut 1 +#define kOpenUDIDErrorCompromised 2 + +@interface OpenUDIDMac : NSObject { +} ++ (NSString*) value; ++ (NSString*) valueWithError:(NSError**)error; ++ (void) setOptOut:(BOOL)optOutValue; + +@end diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/openudid/OpenUDIDMac.m b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/openudid/OpenUDIDMac.m new file mode 100644 index 0000000000..9e9026cabb --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/service/openudid/OpenUDIDMac.m @@ -0,0 +1,383 @@ +// +// OpenUDIDMac.m +// openudid +// +// initiated by Yann Lechelle (cofounder @Appsfire) on 8/28/11. +// Copyright 2011 OpenUDID.org +// +// Initiators/root branches +// iOS code: https://github.com/ylechelle/OpenUDID +// Android code: https://github.com/vieux/OpenUDID +// +// Contributors: +// https://github.com/ylechelle/OpenUDID/contributors +// + +/* + http://en.wikipedia.org/wiki/Zlib_License + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#if __has_feature(objc_arc) +#error This file uses the classic non-ARC retain/release model; hints below... + // to selectively compile this file as non-ARC, do as follows: + // https://img.skitch.com/20120717-g3ag5h9a6ehkgpmpjiuen3qpwp.png +#endif + +#import "OpenUDIDMac.h" +#import // Need to import for CC_MD5 access +#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR +#import +#import +#else +#import +#endif + +#define OpenUDIDLog(fmt, ...) +//#define OpenUDIDLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); +//#define OpenUDIDLog(fmt, ...) NSLog((@"[Line %d] " fmt), __LINE__, ##__VA_ARGS__); + +static NSString * kOpenUDIDSessionCache = nil; +static NSString * const kOpenUDIDKey = @"OpenUDID"; +static NSString * const kOpenUDIDSlotKey = @"OpenUDID_slot"; +static NSString * const kOpenUDIDAppUIDKey = @"OpenUDID_appUID"; +static NSString * const kOpenUDIDTSKey = @"OpenUDID_createdTS"; +static NSString * const kOpenUDIDOOTSKey = @"OpenUDID_optOutTS"; +static NSString * const kOpenUDIDDomain = @"org.OpenUDID"; +static NSString * const kOpenUDIDSlotPBPrefix = @"org.OpenUDID.slot."; +static int const kOpenUDIDRedundancySlots = 100; + +@interface OpenUDIDMac (Private) ++ (void) _setDict:(id)dict forPasteboard:(id)pboard; ++ (NSMutableDictionary*) _getDictFromPasteboard:(id)pboard; ++ (NSString*) _generateFreshOpenUDID; +@end + +@implementation OpenUDIDMac + +// Archive a NSDictionary inside a pasteboard of a given type +// Convenience method to support iOS & Mac OS X +// ++ (void) _setDict:(id)dict forPasteboard:(id)pboard { +#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR + [pboard setData:[NSKeyedArchiver archivedDataWithRootObject:dict] forPasteboardType:kOpenUDIDDomain]; +#else + [pboard setData:[NSKeyedArchiver archivedDataWithRootObject:dict] forType:kOpenUDIDDomain]; +#endif +} + +// Retrieve an NSDictionary from a pasteboard of a given type +// Convenience method to support iOS & Mac OS X +// ++ (NSMutableDictionary*) _getDictFromPasteboard:(id)pboard { +#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR + id item = [pboard dataForPasteboardType:kOpenUDIDDomain]; +#else + id item = [pboard dataForType:kOpenUDIDDomain]; +#endif + if (item) { + @try{ + item = [NSKeyedUnarchiver unarchiveObjectWithData:item]; + } @catch(NSException* e) { + OpenUDIDLog(@"Unable to unarchive item %@ on pasteboard!", [pboard name]); + item = nil; + } + } + + // return an instance of a MutableDictionary + return [NSMutableDictionary dictionaryWithDictionary:(item == nil || [item isKindOfClass:[NSDictionary class]]) ? item : nil]; +} + +// Private method to create and return a new OpenUDID +// Theoretically, this function is called once ever per application when calling [OpenUDID value] for the first time. +// After that, the caching/pasteboard/redundancy mechanism inside [OpenUDID value] returns a persistent and cross application OpenUDID +// ++ (NSString*) _generateFreshOpenUDID { + + NSString* _openUDID = nil; + + // August 2011: One day, this may no longer be allowed in iOS. When that is, just comment this line out. + // March 25th 2012: this day has come, let's remove this "outlawed" call... +#if TARGET_OS_IPHONE +// if([UIDevice instancesRespondToSelector:@selector(uniqueIdentifier)]){ +// _openUDID = [[UIDevice currentDevice] uniqueIdentifier]; +// } +#endif + // Next we generate a UUID. + // UUIDs (Universally Unique Identifiers), also known as GUIDs (Globally Unique Identifiers) or IIDs + // (Interface Identifiers), are 128-bit values guaranteed to be unique. A UUID is made unique over + // both space and time by combining a value unique to the computer on which it was generated—usually the + // Ethernet hardware address—and a value representing the number of 100-nanosecond intervals since + // October 15, 1582 at 00:00:00. + // We then hash this UUID with md5 to get 32 bytes, and then add 4 extra random bytes + // Collision is possible of course, but unlikely and suitable for most industry needs (e.g. aggregate tracking) + // + if (_openUDID==nil) { + CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); + CFStringRef cfstring = CFUUIDCreateString(kCFAllocatorDefault, uuid); + const char *cStr = CFStringGetCStringPtr(cfstring,CFStringGetFastestEncoding(cfstring)); + unsigned char result[16]; + CC_MD5( cStr, (unsigned int)strlen(cStr), result ); + CFRelease(uuid); + + _openUDID = [NSString stringWithFormat: + @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%08x", + result[0], result[1], result[2], result[3], + result[4], result[5], result[6], result[7], + result[8], result[9], result[10], result[11], + result[12], result[13], result[14], result[15], + (unsigned int)(arc4random() % NSUIntegerMax)]; + } + + // Call to other developers in the Open Source community: + // + // feel free to suggest better or alternative "UDID" generation code above. + // NOTE that the goal is NOT to find a better hash method, but rather, find a decentralized (i.e. not web-based) + // 160 bits / 20 bytes random string generator with the fewest possible collisions. + // + + return _openUDID; +} + + +// Main public method that returns the OpenUDID +// This method will generate and store the OpenUDID if it doesn't exist, typically the first time it is called +// It will return the null udid (forty zeros) if the user has somehow opted this app out (this is subject to 3rd party implementation) +// Otherwise, it will register the current app and return the OpenUDID +// ++ (NSString*) value { + return [OpenUDIDMac valueWithError:nil]; +} + ++ (NSString*) valueWithError:(NSError **)error { + + if (kOpenUDIDSessionCache!=nil) { + if (error!=nil) + *error = [NSError errorWithDomain:kOpenUDIDDomain + code:kOpenUDIDErrorNone + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"OpenUDID in cache from first call",@"description", nil]]; + return kOpenUDIDSessionCache; + } + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + // The AppUID will uniquely identify this app within the pastebins + // + NSString * appUID = (NSString *) [defaults objectForKey:kOpenUDIDAppUIDKey]; + if(appUID == nil) + { + // generate a new uuid and store it in user defaults + CFUUIDRef uuid = CFUUIDCreate(NULL); + appUID = (NSString *) CFUUIDCreateString(NULL, uuid); + CFRelease(uuid); + } + + NSString* openUDID = nil; + NSString* myRedundancySlotPBid = nil; + NSDate* optedOutDate = nil; + BOOL optedOut = NO; + BOOL saveLocalDictToDefaults = NO; + BOOL isCompromised = NO; + + // Do we have a local copy of the OpenUDID dictionary? + // This local copy contains a copy of the openUDID, myRedundancySlotPBid (and unused in this block, the local bundleid, and the timestamp) + // + id localDict = [defaults objectForKey:kOpenUDIDKey]; + if ([localDict isKindOfClass:[NSDictionary class]]) { + localDict = [NSMutableDictionary dictionaryWithDictionary:localDict]; // we might need to set/overwrite the redundancy slot + openUDID = [localDict objectForKey:kOpenUDIDKey]; + myRedundancySlotPBid = [localDict objectForKey:kOpenUDIDSlotKey]; + optedOutDate = [localDict objectForKey:kOpenUDIDOOTSKey]; + optedOut = optedOutDate!=nil; + OpenUDIDLog(@"localDict = %@",localDict); + } + + // Here we go through a sequence of slots, each of which being a UIPasteboard created by each participating app + // The idea behind this is to both multiple and redundant representations of OpenUDIDs, as well as serve as placeholder for potential opt-out + // + NSString* availableSlotPBid = nil; + NSMutableDictionary* frequencyDict = [NSMutableDictionary dictionaryWithCapacity:kOpenUDIDRedundancySlots]; + for (int n=0; n0)? [arrayOfUDIDs lastObject] : nil; + OpenUDIDLog(@"Freq Dict = %@\nMost reliable %@",frequencyDict,mostReliableOpenUDID); + + // if openUDID was not retrieved from the local preferences, then let's try to get it from the frequency dictionary above + // + if (openUDID==nil) { + if (mostReliableOpenUDID==nil) { + // this is the case where this app instance is likely to be the first one to use OpenUDID on this device + // we create the OpenUDID, legacy or semi-random (i.e. most certainly unique) + // + openUDID = [OpenUDIDMac _generateFreshOpenUDID]; + } else { + // or we leverage the OpenUDID shared by other apps that have already gone through the process + // + openUDID = mostReliableOpenUDID; + } + // then we create a local representation + // + if (localDict==nil) { + localDict = [NSMutableDictionary dictionaryWithCapacity:4]; + [localDict setObject:openUDID forKey:kOpenUDIDKey]; + [localDict setObject:appUID forKey:kOpenUDIDAppUIDKey]; + [localDict setObject:[NSDate date] forKey:kOpenUDIDTSKey]; + if (optedOut) [localDict setObject:optedOutDate forKey:kOpenUDIDTSKey]; + saveLocalDictToDefaults = YES; + } + } + else { + // Sanity/tampering check + // + if (mostReliableOpenUDID!=nil && ![mostReliableOpenUDID isEqualToString:openUDID]) + isCompromised = YES; + } + + // Here we store in the available PB slot, if applicable + // + OpenUDIDLog(@"Available Slot %@ Existing Slot %@",availableSlotPBid,myRedundancySlotPBid); + if (availableSlotPBid!=nil && (myRedundancySlotPBid==nil || [availableSlotPBid isEqualToString:myRedundancySlotPBid])) { +#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR + UIPasteboard* slotPB = [UIPasteboard pasteboardWithName:availableSlotPBid create:YES]; + [slotPB setPersistent:YES]; +#else + NSPasteboard* slotPB = [NSPasteboard pasteboardWithName:availableSlotPBid]; +#endif + + // save slotPBid to the defaults, and remember to save later + // + if (localDict) { + [localDict setObject:availableSlotPBid forKey:kOpenUDIDSlotKey]; + saveLocalDictToDefaults = YES; + } + + // Save the local dictionary to the corresponding UIPasteboard slot + // + if (openUDID && localDict) + [OpenUDIDMac _setDict:localDict forPasteboard:slotPB]; + } + + // Save the dictionary locally if applicable + // + if (localDict && saveLocalDictToDefaults) + [defaults setObject:localDict forKey:kOpenUDIDKey]; + + // If the UIPasteboard external representation marks this app as opted-out, then to respect privacy, we return the ZERO OpenUDID, a sequence of 40 zeros... + // This is a *new* case that developers have to deal with. Unlikely, statistically low, but still. + // To circumvent this and maintain good tracking (conversion ratios, etc.), developers are invited to calculate how many of their users have opted-out from the full set of users. + // This ratio will let them extrapolate convertion ratios more accurately. + // + if (optedOut) { + if (error!=nil) *error = [NSError errorWithDomain:kOpenUDIDDomain + code:kOpenUDIDErrorOptedOut + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Application with unique id %@ is opted-out from OpenUDID as of %@",appUID,optedOutDate],@"description", nil]]; + + kOpenUDIDSessionCache = [[NSString stringWithFormat:@"%040x",0] retain]; + return kOpenUDIDSessionCache; + } + + // return the well earned openUDID! + // + if (error!=nil) { + if (isCompromised) + *error = [NSError errorWithDomain:kOpenUDIDDomain + code:kOpenUDIDErrorCompromised + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Found a discrepancy between stored OpenUDID (reliable) and redundant copies; one of the apps on the device is most likely corrupting the OpenUDID protocol",@"description", nil]]; + else + *error = [NSError errorWithDomain:kOpenUDIDDomain + code:kOpenUDIDErrorNone + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"OpenUDID succesfully retrieved",@"description", nil]]; + } + kOpenUDIDSessionCache = [openUDID retain]; + return kOpenUDIDSessionCache; +} + ++ (void) setOptOut:(BOOL)optOutValue { + + // init call + [OpenUDIDMac value]; + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + // load the dictionary from local cache or create one + id dict = [defaults objectForKey:kOpenUDIDKey]; + if ([dict isKindOfClass:[NSDictionary class]]) { + dict = [NSMutableDictionary dictionaryWithDictionary:dict]; + } else { + dict = [NSMutableDictionary dictionaryWithCapacity:2]; + } + + // set the opt-out date or remove key, according to parameter + if (optOutValue) + [dict setObject:[NSDate date] forKey:kOpenUDIDOOTSKey]; + else + [dict removeObjectForKey:kOpenUDIDOOTSKey]; + + // store the dictionary locally + [defaults setObject:dict forKey:kOpenUDIDKey]; + + OpenUDIDLog(@"Local dict after opt-out = %@",dict); + + // reset memory cache + kOpenUDIDSessionCache = nil; + +} + +@end diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/MainMenu.xib b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/MainMenu.xib new file mode 100644 index 0000000000..8b6ba8420f --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/zh-Hans.lproj/MainMenu.xib @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.sln b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.sln new file mode 100644 index 0000000000..c44446e92e --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.sln @@ -0,0 +1,62 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloJavascript", "HelloJavascript.vcxproj", "{3B0B58B1-2734-488E-A542-ECEC11EB2455}" + ProjectSection(ProjectDependencies) = postProject + {39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD} + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{8C6B0381-B325-4D7F-B1BB-474ABACE46AC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\..\cocos2d-x\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\..\cocos2d-x\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\cocos2d-x\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\..\cocos2d-x\cocos\scripting\js-bindings\proj.win32\libjscocos2d.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsimulator", "..\..\cocos2d-x\tools\simulator\libsimulator\proj.win32\libsimulator.vcxproj", "{001B324A-BB91-4E83-875C-C92F75C40857}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\..\cocos2d-x\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Debug|Win32.Build.0 = Debug|Win32 + {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Release|Win32.ActiveCfg = Release|Win32 + {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Release|Win32.Build.0 = Release|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32 + {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32 + {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32 + {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32 + {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32 + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32 + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 + {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 + {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32 + {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32 + {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32 + {001B324A-BB91-4E83-875C-C92F75C40857}.Debug|Win32.ActiveCfg = Debug|Win32 + {001B324A-BB91-4E83-875C-C92F75C40857}.Debug|Win32.Build.0 = Debug|Win32 + {001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.ActiveCfg = Release|Win32 + {001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {8C6B0381-B325-4D7F-B1BB-474ABACE46AC} + {929480E7-23C0-4DF6-8456-096D71547116} = {8C6B0381-B325-4D7F-B1BB-474ABACE46AC} + EndGlobalSection +EndGlobal diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj new file mode 100644 index 0000000000..8a8e2c64e6 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj @@ -0,0 +1,221 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3B0B58B1-2734-488E-A542-ECEC11EB2455} + HelloJavascript + + + + Application + Unicode + v100 + v110 + v110_xp + v120 + v120_xp + + + Application + Unicode + v100 + v110 + v110_xp + v120 + v120_xp + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + + _DEBUG;%(PreprocessorDefinitions) + false + Win32 + true + $(IntDir)game.tlb + game.h + + + game_i.c + game_p.c + + + Disabled + $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\service;$(EngineRoot)tools\simulator\libsimulator\lib\runtime;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)tools\simulator\libsimulator\proj.win32;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)external;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + 4267;4251;4244;4800;4099;%(DisableSpecificWarnings) + true + $(IntDir)vc$(PlatformToolsetVersion).pdb + algorithm + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) + + + if not exist "$(OutDir)" mkdir "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\debug-build\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)" + + + libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) + $(ProjectDir)../../../runtime/win32/$(TargetName).pdb + + + xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(OutDir)\script" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\res" /D /E /I /F /Y +copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y +copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y + + + Copy js and resource files. + + + xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32\" +xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(ProjectDir)..\..\..\runtime\win32\" + + + + + NDEBUG;%(PreprocessorDefinitions) + false + Win32 + true + $(IntDir)game.tlb + game.h + + + game_i.c + game_p.c + + + $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\service;$(EngineRoot)tools\simulator\libsimulator\lib\runtime;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)tools\simulator\libsimulator\proj.win32;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)external;$(EngineRoot)cocos\storage;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) + + + MultiThreadedDLL + + + Level3 + + + 4267;4251;4244;4800;%(DisableSpecificWarnings) + true + algorithm + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) + + + if not exist "$(OutDir)" mkdir "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\release-build\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)" + + + libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + Windows + MachineX86 + true + + + xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(OutDir)\script" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\res" /D /E /I /F /Y +copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y +copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y + Copy js and resource files. + + + + + + + + + + + + + + + + + + + + + + + + {39379840-825a-45a0-b363-c09ffef864bd} + + + {001b324a-bb91-4e83-875c-c92f75c40857} + + + + + + + + + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj.filters b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj.filters new file mode 100644 index 0000000000..92fd39588d --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj.filters @@ -0,0 +1,66 @@ + + + + + {ca9c9e15-d942-43a1-aa7a-5f0b74ca1afd} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest + + + {ccb2323b-1cfa-41ea-bcf4-ba5f07309396} + + + {e93a77e1-af1e-4400-87d3-504b62ebdbb0} + + + {5bec5a39-9bec-42e8-a3e4-823d4eacec56} + + + + + win32 + + + Classes + + + Classes\ide-support + + + Classes\ide-support + + + win32 + + + + + Classes + + + win32 + + + + Classes\ide-support + + + Classes\ide-support + + + Classes\ide-support + + + win32 + + + + + resource + + + + + resource + + + \ No newline at end of file diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj.user b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj.user new file mode 100644 index 0000000000..a91e275b00 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj.user @@ -0,0 +1,13 @@ + + + + $(OutDir)../../../../runtime/win32/ + WindowsLocalDebugger + $(OutDir)../../../../runtime/win32/$(TargetFileName) + -workdir $(ProjectDir)../../../ + + + $(OutDir)\Resource + WindowsLocalDebugger + + \ No newline at end of file diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/build-cfg.json b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/build-cfg.json new file mode 100644 index 0000000000..09470485f6 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/build-cfg.json @@ -0,0 +1,30 @@ +{ + "copy_resources": [ + { + "from": "../../../src", + "to": "src" + }, + { + "from": "../../../res", + "to": "res" + }, + { + "from": "../../../main.js", + "to": "" + }, + { + "from": "../../../project.json", + "to": "" + }, + { + "from": "../../../config.json", + "to": "" + } + ], + "must_copy_resources": [ + { + "from": "../../cocos2d-x/cocos/scripting/js-bindings/script", + "to": "script" + } + ] +} diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/game.rc b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/game.rc new file mode 100644 index 0000000000..31e9582f75 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/game.rc @@ -0,0 +1,199 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Chinese (Simplified, PRC) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +#pragma code_page(936) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU_COCOS MENU +BEGIN + POPUP "帮助(&H)" + BEGIN + MENUITEM "关于(&A)", ID_HELP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 243, 94 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Simulator" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,173,69,63,18 + CTEXT "Cocos Simulator",IDC_STATIC,28,23,173,17 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DIALOG_ABOUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 236 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END +END +#endif // APSTUDIO_INVOKED + +#endif // Chinese (Simplified, PRC) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU_COCOS MENU +BEGIN + POPUP "&Help" + BEGIN + MENUITEM "&About ...", ID_HELP_ABOUT + END +END + +#endif // English resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +GLFW_ICON ICON "res\\game.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "FileDescription", "game Module" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "game" + VALUE "LegalCopyright", "Copyright " + VALUE "OriginalFilename", "game.exe" + VALUE "ProductName", "game Module" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/res/game.ico b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/res/game.ico new file mode 100644 index 0000000000..feaf932a74 Binary files /dev/null and b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/res/game.ico differ diff --git a/templates/js-template-runtime/frameworks/runtime-src/proj.win32/resource.h b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/resource.h new file mode 100644 index 0000000000..ba8936c684 --- /dev/null +++ b/templates/js-template-runtime/frameworks/runtime-src/proj.win32/resource.h @@ -0,0 +1,38 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by game.rc +// +#define IDS_PROJNAME 100 +#define IDR_TESTJS 100 +#define IDR_MENU_COCOS 201 +#define IDD_DIALOG1 202 +#define IDD_DIALOG_ABOUT 202 +#define IDC_EDIT2 1001 +#define ID_VIEW_SIZE 30001 +#define ID_FILE_NEW_WINDOW 32771 +#define ID_VIEW_PORTRAIT 32775 +#define ID_VIEW_LANDSCAPE 32776 +#define ID_VIEW_CUSTOM 32777 +#define ID_HELP_ABOUT 32778 +#define ID_FILE_EXIT 32779 +#define ID_Menu 32780 +#define ID_Menu32781 32781 +#define ID_TEST_RESET 32782 +#define ID_CONTROL 32783 +#define ID_CONTROL_RELOAD 32784 +#define ID_VIEW_ZOOMOUT100 32785 +#define ID_VIEW_ZOOMOUT75 32786 +#define ID_VIEW_ZOOMOUT50 32787 +#define ID_VIEW_ZOOMOUT25 32788 +#define ID_CONTROL_TOP 32793 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 204 +#define _APS_NEXT_COMMAND_VALUE 32785 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/templates/js-template-runtime/main.js b/templates/js-template-runtime/main.js new file mode 100644 index 0000000000..95f14b8224 --- /dev/null +++ b/templates/js-template-runtime/main.js @@ -0,0 +1,67 @@ +/** + * A brief explanation for "project.json": + * Here is the content of project.json file, this is the global configuration for your game, you can modify it to customize some behavior. + * The detail of each field is under it. + { + "project_type": "javascript", + // "project_type" indicate the program language of your project, you can ignore this field + + "debugMode" : 1, + // "debugMode" possible values : + // 0 - No message will be printed. + // 1 - cc.error, cc.assert, cc.warn, cc.log will print in console. + // 2 - cc.error, cc.assert, cc.warn will print in console. + // 3 - cc.error, cc.assert will print in console. + // 4 - cc.error, cc.assert, cc.warn, cc.log will print on canvas, available only on web. + // 5 - cc.error, cc.assert, cc.warn will print on canvas, available only on web. + // 6 - cc.error, cc.assert will print on canvas, available only on web. + + "showFPS" : true, + // Left bottom corner fps information will show when "showFPS" equals true, otherwise it will be hide. + + "frameRate" : 60, + // "frameRate" set the wanted frame rate for your game, but the real fps depends on your game implementation and the running environment. + + "id" : "gameCanvas", + // "gameCanvas" sets the id of your canvas element on the web page, it's useful only on web. + + "renderMode" : 0, + // "renderMode" sets the renderer type, only useful on web : + // 0 - Automatically chosen by engine + // 1 - Forced to use canvas renderer + // 2 - Forced to use WebGL renderer, but this will be ignored on mobile browsers + + "engineDir" : "frameworks/cocos2d-html5/", + // In debug mode, if you use the whole engine to develop your game, you should specify its relative path with "engineDir", + // but if you are using a single engine file, you can ignore it. + + "modules" : ["cocos2d"], + // "modules" defines which modules you will need in your game, it's useful only on web, + // using this can greatly reduce your game's resource size, and the cocos console tool can package your game with only the modules you set. + // For details about modules definitions, you can refer to "../../frameworks/cocos2d-html5/modulesConfig.json". + + "jsList" : [ + ] + // "jsList" sets the list of js files in your game. + } + * + */ + +cc.game.onStart = function(){ + if(!cc.sys.isNative && document.getElementById("cocosLoading")) //If referenced loading.js, please remove it + document.body.removeChild(document.getElementById("cocosLoading")); + + // Pass true to enable retina display, disabled by default to improve performance + cc.view.enableRetina(false); + // Adjust viewport meta + cc.view.adjustViewPort(true); + // Setup the resolution policy and design resolution size + cc.view.setDesignResolutionSize(800, 450, cc.ResolutionPolicy.SHOW_ALL); + // The game will be resized when browser size change + cc.view.resizeWithBrowserSize(true); + //load resources + cc.LoaderScene.preload(g_resources, function () { + cc.director.runScene(new HelloWorldScene()); + }, this); +}; +cc.game.run(); \ No newline at end of file diff --git a/templates/js-template-runtime/manifest.webapp b/templates/js-template-runtime/manifest.webapp new file mode 100644 index 0000000000..e9ecf73f0b --- /dev/null +++ b/templates/js-template-runtime/manifest.webapp @@ -0,0 +1,19 @@ +{ + "version": "1.0", + "name": "HelloJavascript", + "description": "HelloJavascript", + "launch_path": "/index.html", + "icons": { + "128": "/res/icon.png" + }, + "developer": { + "name": "Cocos2d-html5", + "url": "http://cocos2d-x.org/" + }, + "default_locale": "en", + "installs_allowed_from": [ + "*" + ], + "orientation": "portrait-primary", + "fullscreen": "true" +} diff --git a/templates/js-template-runtime/project.json b/templates/js-template-runtime/project.json new file mode 100644 index 0000000000..e54f870660 --- /dev/null +++ b/templates/js-template-runtime/project.json @@ -0,0 +1,17 @@ +{ + "project_type": "javascript", + + "debugMode" : 1, + "showFPS" : true, + "frameRate" : 60, + "id" : "gameCanvas", + "renderMode" : 0, + "engineDir":"frameworks/cocos2d-html5", + + "modules" : ["cocos2d"], + + "jsList" : [ + "src/resource.js", + "src/app.js" + ] +} diff --git a/templates/js-template-runtime/res/CloseNormal.png b/templates/js-template-runtime/res/CloseNormal.png new file mode 100644 index 0000000000..5657a13b58 Binary files /dev/null and b/templates/js-template-runtime/res/CloseNormal.png differ diff --git a/templates/js-template-runtime/res/CloseSelected.png b/templates/js-template-runtime/res/CloseSelected.png new file mode 100644 index 0000000000..e4c82da775 Binary files /dev/null and b/templates/js-template-runtime/res/CloseSelected.png differ diff --git a/templates/js-template-runtime/res/HelloWorld.png b/templates/js-template-runtime/res/HelloWorld.png new file mode 100644 index 0000000000..3a20f2538a Binary files /dev/null and b/templates/js-template-runtime/res/HelloWorld.png differ diff --git a/templates/js-template-runtime/res/favicon.ico b/templates/js-template-runtime/res/favicon.ico new file mode 100644 index 0000000000..1ad6a0907b Binary files /dev/null and b/templates/js-template-runtime/res/favicon.ico differ diff --git a/templates/js-template-runtime/runtime/config.json b/templates/js-template-runtime/runtime/config.json new file mode 100644 index 0000000000..1449e545c1 --- /dev/null +++ b/templates/js-template-runtime/runtime/config.json @@ -0,0 +1,6 @@ +{ + "version":"v4-js-runtime-1.0", + "zip_file_size":"43441816", + "repo_name":"cocos-runtime-bin", + "repo_parent":"https://github.com/natural-law/" +} diff --git a/templates/js-template-runtime/src/app.js b/templates/js-template-runtime/src/app.js new file mode 100644 index 0000000000..8df4e42ce8 --- /dev/null +++ b/templates/js-template-runtime/src/app.js @@ -0,0 +1,78 @@ + +var HelloWorldLayer = cc.Layer.extend({ + sprite:null, + ctor:function () { + ////////////////////////////// + // 1. super init first + this._super(); + + ///////////////////////////// + // 2. add a menu item with "X" image, which is clicked to quit the program + // you may modify it. + // ask the window size + var size = cc.winSize; + + // add a "close" icon to exit the progress. it's an autorelease object + var closeItem = new cc.MenuItemImage( + res.CloseNormal_png, + res.CloseSelected_png, + function () { + cc.log("Menu is clicked!"); + }, this); + closeItem.attr({ + x: size.width - 20, + y: 20, + anchorX: 0.5, + anchorY: 0.5 + }); + + var menu = new cc.Menu(closeItem); + menu.x = 0; + menu.y = 0; + this.addChild(menu, 1); + + ///////////////////////////// + // 3. add your codes below... + // add a label shows "Hello World" + // create and initialize a label + var helloLabel = new cc.LabelTTF("Hello World", "Arial", 38); + // position the label on the center of the screen + helloLabel.x = size.width / 2; + helloLabel.y = 0; + // add the label as a child to this layer + this.addChild(helloLabel, 5); + + // add "HelloWorld" splash screen" + this.sprite = new cc.Sprite(res.HelloWorld_png); + this.sprite.attr({ + x: size.width / 2, + y: size.height / 2, + scale: 0.5, + rotation: 180 + }); + this.addChild(this.sprite, 0); + + this.sprite.runAction( + cc.sequence( + cc.rotateTo(2, 0), + cc.scaleTo(2, 1, 1) + ) + ); + helloLabel.runAction( + cc.spawn( + cc.moveBy(2.5, cc.p(0, size.height - 40)), + cc.tintTo(2.5,255,125,0) + ) + ); + return true; + } +}); + +var HelloWorldScene = cc.Scene.extend({ + onEnter:function () { + this._super(); + var layer = new HelloWorldLayer(); + this.addChild(layer); + } +}); + diff --git a/templates/js-template-runtime/src/resource.js b/templates/js-template-runtime/src/resource.js new file mode 100644 index 0000000000..4438ab1b86 --- /dev/null +++ b/templates/js-template-runtime/src/resource.js @@ -0,0 +1,10 @@ +var res = { + HelloWorld_png : "res/HelloWorld.png", + CloseNormal_png : "res/CloseNormal.png", + CloseSelected_png : "res/CloseSelected.png" +}; + +var g_resources = []; +for (var i in res) { + g_resources.push(res[i]); +} \ No newline at end of file diff --git a/templates/lua-template-default/cocos-project-template.json b/templates/lua-template-default/cocos-project-template.json index 303c2e6f95..f5029e6b21 100644 --- a/templates/lua-template-default/cocos-project-template.json +++ b/templates/lua-template-default/cocos-project-template.json @@ -135,6 +135,18 @@ "proj.win32/Debug", "proj.win32/Release" ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/Classes/ide-support", + "to": "frameworks/runtime-src/Classes/ide-support", + "exclude": [ + "RuntimeJsImpl.h", + "RuntimeJsImpl.cpp" + ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h", + "to": "frameworks/runtime-src/Classes/" } ], "project_rename": { @@ -161,6 +173,7 @@ "frameworks/runtime-src/proj.android/AndroidManifest.xml", "frameworks/runtime-src/proj.android/build.xml", "frameworks/runtime-src/proj.android/res/values/strings.xml", + "frameworks/runtime-src/proj.android-studio/settings.gradle", "frameworks/runtime-src/proj.ios_mac/ios/main.m", "frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch", "frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm", @@ -170,7 +183,9 @@ "project_replace_package_name": { "src_package_name": "org.cocos2dx.hellolua", "files": [ - "frameworks/runtime-src/proj.android/AndroidManifest.xml" + "frameworks/runtime-src/proj.android/AndroidManifest.xml", + "frameworks/runtime-src/proj.android-studio/app/build.gradle", + "frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml" ] }, "project_replace_mac_bundleid": { diff --git a/templates/lua-template-default/frameworks/CMakeLists.txt b/templates/lua-template-default/frameworks/CMakeLists.txt index 9e0621aba5..eb5755c7ed 100644 --- a/templates/lua-template-default/frameworks/CMakeLists.txt +++ b/templates/lua-template-default/frameworks/CMakeLists.txt @@ -34,6 +34,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${COCOS2D_ROOT}/cmake/Modules/") include(CocosBuildHelpers) option(DEBUG_MODE "Debug or release?" ON) +option(USE_BULLET "Use bullet for physics3d library" ON) if(DEBUG_MODE) set(CMAKE_BUILD_TYPE DEBUG) @@ -41,6 +42,11 @@ else(DEBUG_MODE) set(CMAKE_BUILD_TYPE RELEASE) endif(DEBUG_MODE) +if(USE_BULLET) + add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=1) + add_definitions(-DCC_USE_PHYSICS=1) +endif(USE_BULLET) + # libcocos2d set(BUILD_CPP_TESTS OFF CACHE BOOL "turn off build cpp-tests") @@ -129,5 +135,7 @@ pre_build(${APP_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${COCOS2D_ROOT}/cocos/scripting/lua-bindings/script/extension ${APP_BIN_DIR}/Resources COMMAND ${CMAKE_COMMAND} -E copy_directory ${COCOS2D_ROOT}/cocos/scripting/lua-bindings/script/network ${APP_BIN_DIR}/Resources COMMAND ${CMAKE_COMMAND} -E copy_directory ${COCOS2D_ROOT}/cocos/scripting/lua-bindings/script/ui ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${COCOS2D_ROOT}/cocos/scripting/lua-bindings/script/3d ${APP_BIN_DIR}/Resources + COMMAND ${CMAKE_COMMAND} -E copy_directory ${COCOS2D_ROOT}/cocos/scripting/lua-bindings/script/physics3d ${APP_BIN_DIR}/Resources ) diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp deleted file mode 100644 index 9b07cc7b96..0000000000 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp +++ /dev/null @@ -1,342 +0,0 @@ -// -// RuntimeLuaImpl.cpp -// Simulator -// -// - -#include "RuntimeLuaImpl.h" - -#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) - -#include -#include - -#include "lua_debugger.h" -#include "CCLuaEngine.h" -#include "LuaBasicConversions.h" -#include "lua_module_register.h" - -#include "runtime/Runtime.h" -#include "runtime/ConfigParser.h" -#include "runtime/FileServer.h" - -extern std::string g_projectPath; // Runtime.cpp - -USING_NS_CC; -using namespace std; - -static void resetLuaModule(const string& fileName) -{ - if (fileName.empty()) - { - return; - } - auto engine = LuaEngine::getInstance(); - LuaStack* luaStack = engine->getLuaStack(); - lua_State* stack = luaStack->getLuaState(); - lua_getglobal(stack, "package"); /* L: package */ - lua_getfield(stack, -1, "loaded"); /* L: package loaded */ - lua_pushnil(stack); /* L: lotable ?-.. nil */ - while (0 != lua_next(stack, -2)) /* L: lotable ?-.. key value */ - { - //CCLOG("%s - %s \n", tolua_tostring(stack, -2, ""), lua_typename(stack, lua_type(stack, -1))); - std::string key = tolua_tostring(stack, -2, ""); - std::string tableKey = key; - size_t found = tableKey.rfind(".lua"); - if (found != std::string::npos) - tableKey = tableKey.substr(0, found); - tableKey = replaceAll(tableKey, ".", "/"); - tableKey = replaceAll(tableKey, "\\", "/"); - tableKey.append(".lua"); - found = fileName.rfind(tableKey); - if (0 == found || (found != std::string::npos && fileName.at(found - 1) == '/')) - { - lua_pushstring(stack, key.c_str()); - lua_pushnil(stack); - if (lua_istable(stack, -5)) - { - lua_settable(stack, -5); - } - } - lua_pop(stack, 1); - } - lua_pop(stack, 2); -} - -bool reloadScript(const string& file) -{ - auto director = Director::getInstance(); - FontFNT::purgeCachedData(); - if (director->getOpenGLView()) - { - SpriteFrameCache::getInstance()->removeSpriteFrames(); - director->getTextureCache()->removeAllTextures(); - } - FileUtils::getInstance()->purgeCachedEntries(); - string modulefile = file; - - if (! modulefile.empty()) - { - resetLuaModule(modulefile); - } - else - { - modulefile = ConfigParser::getInstance()->getEntryFile().c_str(); - } - - auto engine = LuaEngine::getInstance(); - LuaStack* luaStack = engine->getLuaStack(); - std::string require = "require \'" + modulefile + "\'"; - return luaStack->executeString(require.c_str()); -} - -int lua_cocos2dx_runtime_addSearchPath(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::FileUtils* 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.FileUtils",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::FileUtils*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_addSearchPath'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1 || argc == 2) - { - std::string arg0; - bool arg1 = false; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0); - - if (argc == 2) - { - ok &= luaval_to_boolean(tolua_S, 3, &arg1); - } - - if(!ok) - return 0; - - if (! FileUtils::getInstance()->isAbsolutePath(arg0)) - { - // add write path to search path - if (FileServer::getShareInstance()->getIsUsingWritePath()) - { - cobj->addSearchPath(FileServer::getShareInstance()->getWritePath() + arg0, arg1); - } else - { - cobj->addSearchPath(arg0, arg1); - } - -#if(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - // add project path to search path - cobj->addSearchPath(g_projectPath + arg0, arg1); -#endif - } - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "addSearchPath",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FileUtils_addSearchPath'.",&tolua_err); -#endif - - return 0; -} - -int lua_cocos2dx_runtime_setSearchPaths(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::FileUtils* 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.FileUtils",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::FileUtils*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_runtime_setSearchPaths'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::vector vecPaths, writePaths; - - ok &= luaval_to_std_vector_string(tolua_S, 2, &vecPaths); - if(!ok) - return 0; - std::vector originPath; // for IOS platform. - std::vector projPath; // for Desktop platform. - for (size_t i = 0; i < vecPaths.size(); i++) - { - if (!FileUtils::getInstance()->isAbsolutePath(vecPaths[i])) - { - originPath.push_back(vecPaths[i]); // for IOS platform. - projPath.push_back(g_projectPath + vecPaths[i]); //for Desktop platform. - writePaths.push_back(FileServer::getShareInstance()->getWritePath() + vecPaths[i]); - } - } - -#if(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - vecPaths.insert(vecPaths.end(), projPath.begin(), projPath.end()); -#endif - if (FileServer::getShareInstance()->getIsUsingWritePath()) - { - vecPaths.insert(vecPaths.end(), writePaths.begin(), writePaths.end()); - } else - { - vecPaths.insert(vecPaths.end(), originPath.begin(), originPath.end()); - } - - cobj->setSearchPaths(vecPaths); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setSearchPaths",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_runtime_setSearchPaths'.",&tolua_err); -#endif - - return 0; -} - -static void register_runtime_override_function(lua_State* tolua_S) -{ - lua_pushstring(tolua_S, "cc.FileUtils"); - lua_rawget(tolua_S, LUA_REGISTRYINDEX); - if (lua_istable(tolua_S,-1)){ - tolua_function(tolua_S,"addSearchPath",lua_cocos2dx_runtime_addSearchPath); - tolua_function(tolua_S,"setSearchPaths",lua_cocos2dx_runtime_setSearchPaths); - } - lua_pop(tolua_S, 1); -} - -static void luaScriptLoader(std::string strDebugArg) -{ - -} - -//////////////////////////////////////// - -RuntimeLuaImpl *RuntimeLuaImpl::create() -{ - auto instance = new RuntimeLuaImpl(); - return instance; -} - -void RuntimeLuaImpl::onStartDebuger(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse) -{ - // Lua - char szDebugArg[1024] = {0}; - sprintf(szDebugArg, "require('debugger')(%s,'%s')",dArgParse["debugcfg"].GetString(), ""); - startScript(szDebugArg); - dReplyParse.AddMember("code", 0, dReplyParse.GetAllocator()); -} - -void RuntimeLuaImpl::onReload(const rapidjson::Document &dArgParse, rapidjson::Document &dReplyParse) -{ - // lua - if (dArgParse.HasMember("modulefiles")) - { - rapidjson::Value bodyvalue(rapidjson::kObjectType); - const rapidjson::Value& objectfiles = dArgParse["modulefiles"]; - for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) - { - if (!reloadScript(objectfiles[i].GetString())) - { - bodyvalue.AddMember(objectfiles[i].GetString(), 1, dReplyParse.GetAllocator()); - } - } - if (0 == objectfiles.Size()) - { - reloadScript(""); - } - dReplyParse.AddMember("body", bodyvalue, dReplyParse.GetAllocator()); - } - - dReplyParse.AddMember("code", 0, dReplyParse.GetAllocator()); -} - -void RuntimeLuaImpl::startScript(const std::string& strDebugArg) -{ - init(); - auto engine = LuaEngine::getInstance(); - auto stack = engine->getLuaStack(); - - const ProjectConfig &project = RuntimeEngine::getInstance()->getProjectConfig(); - - // set search path - stack->addSearchPath(project.getProjectDir().c_str()); - string path = FileUtils::getInstance()->fullPathForFilename(project.getScriptFileRealPath().c_str()); - size_t pos; - while ((pos = path.find_first_of("\\")) != std::string::npos) - { - path.replace(pos, 1, "/"); - } - size_t p = path.find_last_of("/"); - string workdir; - if (p != path.npos) - { - workdir = path.substr(0, p); - stack->addSearchPath(workdir.c_str()); - FileUtils::getInstance()->addSearchPath(workdir); - } - - // register lua engine - if (!strDebugArg.empty()) - { - // open debugger.lua module - cocos2d::log("debug args = %s", strDebugArg.c_str()); - luaopen_lua_debugger(engine->getLuaStack()->getLuaState()); - engine->executeString(strDebugArg.c_str()); - } - std::string code("require \""); - code.append(ConfigParser::getInstance()->getEntryFile().c_str()); - code.append("\""); - engine->executeString(code.c_str()); -} - -// -// private -// - -void RuntimeLuaImpl::init() -{ - auto engine = LuaEngine::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - lua_module_register(engine->getLuaStack()->getLuaState()); - register_runtime_override_function(engine->getLuaStack()->getLuaState()); - engine->getLuaStack()->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA")); -} - -#endif // (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h deleted file mode 100644 index d67c923669..0000000000 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// RuntimeLuaImpl.h -// Simulator -// -// - -#ifndef __Simulator__RuntimeLuaImpl__ -#define __Simulator__RuntimeLuaImpl__ - -#include "CodeIDESupport.h" -#include "cocos2d.h" - -#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) - -#include "runtime/RuntimeProtocol.h" - -class RuntimeLuaImpl : public RuntimeProtocol -{ -public: - static RuntimeLuaImpl *create(); - - void onStartDebuger(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse); - void onReload(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse); - void startScript(const std::string& strDebugArg); - -private: - void init(); -}; - -#endif // (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) - -#endif /* defined(__Simulator__RuntimeLua__) */ diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp index 54519e75df..af4e6fff18 100644 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp +++ b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp @@ -37,7 +37,7 @@ void SimpleConfigParser::readConfig(const string &filepath) return; if (_docRootjson.Parse<0>(fileContent.c_str()).HasParseError()) { - cocos2d::log("read json file %s failed because of %s", fullPathFile.c_str(), _docRootjson.GetParseError()); + cocos2d::log("read json file %s failed because of %d", fullPathFile.c_str(), _docRootjson.GetParseError()); return; } diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lang b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lang deleted file mode 100644 index 1c13dacd89..0000000000 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lang +++ /dev/null @@ -1,29 +0,0 @@ -{ - "zh-CN": { - "View": "视图(&V)", - "Exit": "退出(&X)", - "File": "文件(&F)", - "Portrait": "竖屏", - "Landscape": "横屏", - "Refresh": "刷新(重启)", - "Zoom Out": "缩放", - "Simulator": "模拟器", - "Open File": "打开文件", - "Open Project": "打开工程", - "Error": "错误", - "Help": "帮助(&H)", - "About": "关于(&A)" - }, - "zh-Hans": { - "View": "视图", - "Exit": "退出", - "File": "文件", - "Portrait": "竖屏", - "Landscape": "横屏", - "Refresh": "刷新(重启)", - "Zoom Out": "缩放", - "Simulator": "模拟器", - "Help": "帮助(&H)", - "About": "关于(&A)" - } -} \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lua_debugger.c b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lua_debugger.c deleted file mode 100644 index 2b695a1349..0000000000 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lua_debugger.c +++ /dev/null @@ -1,8673 +0,0 @@ - -/* lua_debugger.c */ - -#if __cplusplus -extern "C" { -#endif - -#include "lua.h" -#include "lauxlib.h" -#include "lua_debugger.h" - -/* debugger */ -static const char lua_m_debugger[] = { - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a, - 0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29, - 0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72, - 0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f, - 0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69, - 0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54, - 0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20, - 0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67, - 0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72, - 0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65, - 0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73, - 0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20, - 0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76, - 0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63, - 0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69, - 0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20, - 0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a, - 0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63, - 0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f, - 0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a, - 0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a, - 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57, - 0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61, - 0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d, - 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x62,0x75, - 0x67,0x67,0x65,0x72,0x20,0x75,0x73,0x69,0x6e,0x67,0x20,0x44,0x42,0x47,0x70,0x20, - 0x70,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65, - 0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x73,0x20, - 0x61,0x20,0x73,0x69,0x6e,0x67,0x6c,0x65,0x20,0x69,0x6e,0x69,0x74,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x74,0x61,0x6b, - 0x65,0x73,0x20,0x36,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x73,0x20, - 0x28,0x49,0x44,0x45,0x48,0x4f,0x53,0x54,0x2c,0x20,0x49,0x44,0x45,0x50,0x4f,0x52, - 0x54,0x2c,0x20,0x49,0x44,0x45,0x4b,0x45,0x59,0x2c,0x20,0x54,0x52,0x41,0x4e,0x53, - 0x50,0x4f,0x52,0x54,0x2c,0x20,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52,0x4d,0x2c,0x20, - 0x57,0x4f,0x52,0x4b,0x49,0x4e,0x47,0x44,0x49,0x52,0x29,0x2e,0x0a,0x2d,0x2d,0x0a, - 0x2d,0x2d,0x20,0x49,0x44,0x45,0x48,0x4f,0x53,0x54,0x3a,0x20,0x74,0x68,0x65,0x20, - 0x68,0x6f,0x73,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x6f,0x72,0x20,0x74,0x68,0x65, - 0x20,0x69,0x70,0x20,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x20,0x6f,0x66,0x20,0x74, - 0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x20,0x28, - 0x73,0x6f,0x20,0x79,0x6f,0x75,0x72,0x20,0x69,0x64,0x65,0x29,0x0a,0x2d,0x2d,0x20, - 0x69,0x66,0x20,0x48,0x4f,0x53,0x54,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20, - 0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x49,0x44,0x45,0x48,0x4f,0x53,0x54, - 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64, - 0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x20, - 0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20, - 0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x27,0x31, - 0x32,0x37,0x2e,0x30,0x2e,0x30,0x2e,0x31,0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65, - 0x64,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x44,0x45,0x50,0x4f,0x52,0x54, - 0x3a,0x20,0x74,0x68,0x65,0x20,0x70,0x6f,0x72,0x74,0x20,0x6f,0x66,0x20,0x74,0x68, - 0x65,0x20,0x44,0x42,0x47,0x50,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x20,0x28,0x6d, - 0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x63,0x6f,0x6e,0x66,0x69,0x67,0x75,0x72,0x65, - 0x20,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x49,0x44,0x45,0x29,0x0a,0x2d,0x2d,0x20, - 0x69,0x66,0x20,0x50,0x4f,0x52,0x54,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20, - 0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x49,0x44,0x45,0x50,0x4f,0x52,0x54, - 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64, - 0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x20, - 0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20, - 0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x27,0x31, - 0x30,0x30,0x30,0x30,0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x44,0x45,0x49,0x44,0x45,0x4b,0x45,0x59,0x3a,0x20, - 0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69, - 0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x73,0x65,0x73,0x73,0x69,0x6f, - 0x6e,0x20,0x6b,0x65,0x79,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x49,0x44,0x45,0x4b, - 0x45,0x59,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44, - 0x42,0x47,0x50,0x5f,0x49,0x44,0x45,0x4b,0x45,0x59,0x20,0x65,0x6e,0x76,0x20,0x76, - 0x61,0x72,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69, - 0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73, - 0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75,0x6c, - 0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x27,0x6c,0x75,0x61,0x69,0x64,0x65,0x6b, - 0x65,0x79,0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x0a, - 0x2d,0x2d,0x20,0x54,0x52,0x41,0x4e,0x53,0x50,0x4f,0x52,0x54,0x3a,0x20,0x28,0x61, - 0x64,0x76,0x61,0x6e,0x63,0x65,0x64,0x20,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c, - 0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x29,0x20,0x74,0x68,0x65,0x20, - 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x6f,0x66,0x20,0x77, - 0x68,0x69,0x63,0x68,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x20,0x74, - 0x68,0x65,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x20,0x69,0x6e,0x74, - 0x65,0x72,0x66,0x61,0x63,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x64, - 0x6f,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x73,0x65,0x72,0x76,0x65,0x72, - 0x2e,0x0a,0x2d,0x2d,0x20,0x62,0x79,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20, - 0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x75,0x73,0x65, - 0x20,0x61,0x6e,0x20,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x69,0x6d, - 0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x62,0x61,0x73, - 0x65,0x64,0x20,0x6f,0x6e,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2c, - 0x20,0x62,0x75,0x74,0x20,0x69,0x66,0x20,0x63,0x61,0x6e,0x20,0x6e,0x6f,0x74,0x20, - 0x75,0x73,0x65,0x20,0x69,0x74,0x2c,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f,0x75,0x6c, - 0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x20,0x6f,0x72,0x20,0x75, - 0x73,0x65,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x72,0x61,0x6e,0x73, - 0x70,0x6f,0x72,0x74,0x20,0x6c,0x61,0x79,0x65,0x72,0x20,0x69,0x6d,0x70,0x6c,0x65, - 0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66, - 0x20,0x54,0x52,0x41,0x4e,0x53,0x50,0x4f,0x52,0x54,0x20,0x69,0x73,0x20,0x6e,0x69, - 0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x54,0x52,0x41,0x4e, - 0x53,0x50,0x4f,0x52,0x54,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73, - 0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65, - 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c, - 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c, - 0x75,0x65,0x20,0x27,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61, - 0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74, - 0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x3a,0x20,0x74,0x68,0x69,0x73, - 0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20, - 0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x62, - 0x61,0x73,0x65,0x64,0x20,0x6f,0x6e,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65, - 0x74,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52, - 0x4d,0x3a,0x20,0x28,0x61,0x64,0x76,0x61,0x6e,0x63,0x65,0x64,0x20,0x6f,0x70,0x74, - 0x69,0x6f,0x6e,0x61,0x6c,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x29, - 0x20,0x27,0x75,0x6e,0x69,0x78,0x27,0x20,0x6f,0x72,0x20,0x27,0x77,0x69,0x6e,0x33, - 0x32,0x27,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x77,0x68,0x69,0x63,0x68,0x20, - 0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x20,0x6b,0x69,0x6e,0x64,0x20, - 0x6f,0x66,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x6f,0x6e,0x20,0x77, - 0x68,0x69,0x63,0x68,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d, - 0x20,0x74,0x6f,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x69,0x73,0x20,0x65,0x78,0x65, - 0x63,0x75,0x74,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x62,0x79,0x20,0x64,0x65,0x66, - 0x61,0x75,0x6c,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x20,0x77,0x69,0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75, - 0x65,0x73,0x73,0x20,0x69,0x74,0x20,0x61,0x6e,0x64,0x20,0x73,0x75,0x72,0x65,0x6c, - 0x79,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x69,0x66,0x20,0x66,0x6f, - 0x72,0x20,0x73,0x6f,0x6d,0x65,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x73,0x20,0x69, - 0x74,0x20,0x66,0x61,0x69,0x6c,0x73,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f,0x75,0x6c, - 0x64,0x20,0x68,0x65,0x6c,0x70,0x20,0x69,0x74,0x20,0x62,0x79,0x20,0x70,0x72,0x65, - 0x63,0x69,0x73,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69, - 0x6f,0x6e,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x0a,0x2d,0x2d,0x20, - 0x69,0x66,0x20,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52,0x4d,0x20,0x69,0x73,0x20,0x6e, - 0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x50,0x4c,0x41, - 0x54,0x46,0x4f,0x52,0x4d,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73, - 0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65, - 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c, - 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69, - 0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73,0x73,0x20, - 0x69,0x74,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x57,0x4f,0x52,0x4b,0x49,0x4e, - 0x47,0x44,0x49,0x52,0x3a,0x20,0x28,0x61,0x64,0x76,0x61,0x6e,0x63,0x65,0x64,0x20, - 0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74, - 0x65,0x72,0x29,0x20,0x74,0x68,0x65,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20, - 0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x69,0x6e,0x20,0x77,0x68,0x69, - 0x63,0x68,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x74, - 0x6f,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x69,0x73,0x20,0x65,0x78,0x65,0x63,0x75, - 0x74,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x62,0x79,0x20,0x64,0x65,0x66,0x61,0x75, - 0x6c,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20, - 0x77,0x69,0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73, - 0x73,0x20,0x69,0x74,0x20,0x61,0x6e,0x64,0x20,0x73,0x75,0x72,0x65,0x6c,0x79,0x20, - 0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x69,0x66,0x20,0x66,0x6f,0x72,0x20, - 0x73,0x6f,0x6d,0x65,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x73,0x20,0x69,0x74,0x20, - 0x66,0x61,0x69,0x6c,0x73,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20, - 0x68,0x65,0x6c,0x70,0x20,0x69,0x74,0x20,0x62,0x79,0x20,0x70,0x72,0x65,0x63,0x69, - 0x73,0x65,0x20,0x74,0x68,0x65,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20,0x64, - 0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20, - 0x57,0x4f,0x52,0x4b,0x49,0x4e,0x47,0x44,0x49,0x52,0x20,0x69,0x73,0x20,0x6e,0x69, - 0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x57,0x4f,0x52,0x4b, - 0x49,0x4e,0x47,0x44,0x49,0x52,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69, - 0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68, - 0x65,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c, - 0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77, - 0x69,0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73,0x73, - 0x20,0x69,0x74,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4b,0x6e,0x6f,0x77,0x6e, - 0x20,0x49,0x73,0x73,0x75,0x65,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20, - 0x46,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74, - 0x20,0x62,0x65,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x75,0x73,0x69,0x6e, - 0x67,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x61, - 0x6e,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x69, - 0x6e,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x62,0x65,0x63,0x61,0x75,0x73, - 0x65,0x20,0x74,0x68,0x65,0x69,0x72,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d, - 0x65,0x6e,0x74,0x20,0x69,0x73,0x20,0x6d,0x61,0x70,0x70,0x65,0x64,0x20,0x64,0x69, - 0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x74,0x6f,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20, - 0x20,0x61,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x69,0x6e,0x74,0x65, - 0x72,0x6e,0x61,0x6c,0x20,0x73,0x74,0x72,0x75,0x63,0x74,0x75,0x72,0x65,0x20,0x77, - 0x68,0x69,0x63,0x68,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x70, - 0x65,0x72,0x73,0x69,0x73,0x74,0x65,0x64,0x20,0x28,0x69,0x2e,0x65,0x2e,0x20,0x75, - 0x73,0x65,0x64,0x20,0x6f,0x75,0x74,0x73,0x69,0x64,0x65,0x20,0x6f,0x66,0x20,0x74, - 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x5f,0x68,0x6f,0x6f,0x6b,0x29,0x2e,0x0a, - 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x54,0x68,0x65,0x20,0x44,0x4c,0x54,0x4b,0x20, - 0x63,0x6c,0x69,0x65,0x6e,0x74,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, - 0x61,0x74,0x69,0x6f,0x6e,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x68, - 0x61,0x6e,0x64,0x6c,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x66,0x6f, - 0x72,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x2e,0x20,0x41,0x73, - 0x20,0x61,0x20,0x77,0x6f,0x72,0x6b,0x61,0x72,0x6f,0x75,0x6e,0x64,0x2c,0x20,0x74, - 0x68,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x73,0x20,0x65,0x6e, - 0x63,0x6f,0x64,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x74,0x68,0x65,0x0a,0x2d, - 0x2d,0x20,0x20,0x20,0x20,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x61, - 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x20,0x6f,0x66,0x20,0x65,0x61,0x63,0x68, - 0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x61,0x6e,0x64,0x20,0x69,0x73, - 0x20,0x75,0x73,0x65,0x64,0x20,0x6c,0x69,0x6b,0x65,0x77,0x69,0x73,0x65,0x20,0x69, - 0x6e,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x67,0x65,0x74,0x20,0x63, - 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2e,0x20,0x54,0x68,0x65,0x20,0x73,0x79,0x6e, - 0x74,0x61,0x78,0x20,0x69,0x73,0x20,0x22,0x3c,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74, - 0x20,0x49,0x44,0x3e,0x7c,0x3c,0x66,0x75,0x6c,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x3e, - 0x22,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x44,0x79,0x6e,0x61,0x6d,0x69,0x63, - 0x20,0x63,0x6f,0x64,0x65,0x20,0x28,0x63,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x64,0x20, - 0x77,0x69,0x74,0x68,0x20,0x6c,0x6f,0x61,0x64,0x20,0x6f,0x72,0x20,0x6c,0x6f,0x61, - 0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20, - 0x68,0x61,0x6e,0x64,0x6c,0x65,0x64,0x20,0x28,0x74,0x68,0x65,0x20,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69,0x6c,0x6c,0x20,0x73,0x74,0x65,0x70,0x20, - 0x6f,0x76,0x65,0x72,0x20,0x69,0x74,0x2c,0x20,0x6c,0x69,0x6b,0x65,0x20,0x43,0x20, - 0x63,0x6f,0x64,0x65,0x29,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x73,0x69,0x67,0x6e,0x20, - 0x6e,0x6f,0x74,0x65,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x54,0x68, - 0x65,0x20,0x77,0x68,0x6f,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x69,0x73,0x20,0x6b,0x65,0x70,0x74,0x20,0x69, - 0x6e,0x20,0x61,0x20,0x28,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x79,0x29,0x20, - 0x75,0x6e,0x69,0x71,0x75,0x65,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74, - 0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x20,0x6f,0x72,0x64,0x65,0x72,0x20,0x74,0x6f, - 0x20,0x65,0x61,0x73,0x65,0x20,0x65,0x76,0x65,0x6e,0x74,0x75,0x61,0x6c,0x20,0x61, - 0x64,0x61,0x70,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x61,0x20,0x6d, - 0x75,0x6c,0x74,0x69,0x2d,0x74,0x68,0x72,0x65,0x61,0x64,0x65,0x64,0x0a,0x2d,0x2d, - 0x20,0x20,0x20,0x20,0x20,0x6d,0x6f,0x64,0x65,0x6c,0x2c,0x20,0x61,0x73,0x20,0x44, - 0x42,0x47,0x70,0x20,0x6e,0x65,0x65,0x64,0x73,0x20,0x6f,0x6e,0x65,0x20,0x63,0x6f, - 0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x65,0x72,0x20,0x74,0x68,0x72, - 0x65,0x61,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x46,0x75,0x6c,0x6c, - 0x20,0x6e,0x61,0x6d,0x65,0x73,0x20,0x6f,0x66,0x20,0x70,0x72,0x6f,0x70,0x65,0x72, - 0x74,0x69,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20, - 0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x62,0x65,0x63,0x61,0x75,0x73,0x65,0x20, - 0x74,0x68,0x65,0x79,0x20,0x63,0x61,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e, - 0x20,0x61,0x72,0x62,0x69,0x74,0x72,0x61,0x72,0x79,0x20,0x64,0x61,0x74,0x61,0x20, - 0x28,0x73,0x70,0x61,0x63,0x65,0x73,0x2c,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x20, - 0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29, - 0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x6d,0x61,0x6b,0x65,0x73,0x0a,0x2d,0x2d,0x20, - 0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x70,0x61,0x72,0x73, - 0x69,0x6e,0x67,0x20,0x6d,0x75,0x6e,0x63,0x68,0x20,0x65,0x61,0x73,0x69,0x65,0x72, - 0x20,0x61,0x6e,0x64,0x20,0x66,0x61,0x73,0x74,0x65,0x72,0x0a,0x2d,0x2d,0x20,0x20, - 0x20,0x2a,0x20,0x54,0x68,0x69,0x73,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x73,0x20,0x61,0x73,0x79,0x6e,0x63,0x68, - 0x72,0x6f,0x6e,0x6f,0x75,0x73,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x3a, - 0x20,0x61,0x6e,0x79,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x63,0x61,0x6e, - 0x20,0x62,0x65,0x20,0x64,0x6f,0x6e,0x65,0x20,0x61,0x74,0x20,0x61,0x6e,0x79,0x20, - 0x74,0x69,0x6d,0x65,0x2c,0x20,0x62,0x75,0x74,0x20,0x73,0x6f,0x6d,0x65,0x20,0x6f, - 0x66,0x20,0x74,0x68,0x65,0x6d,0x20,0x28,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x61, - 0x74,0x69,0x6f,0x6e,0x73,0x29,0x20,0x63,0x61,0x6e,0x20,0x6c,0x65,0x61,0x64,0x20, - 0x74,0x6f,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x63,0x6f,0x6e,0x73, - 0x69,0x73,0x74,0x65,0x6e,0x74,0x20,0x73,0x74,0x61,0x74,0x65,0x73,0x2e,0x20,0x49, - 0x6e,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x74,0x68,0x69,0x73, - 0x20,0x68,0x61,0x76,0x65,0x20,0x61,0x20,0x71,0x75,0x69,0x74,0x65,0x20,0x62,0x69, - 0x67,0x20,0x6f,0x76,0x65,0x72,0x68,0x65,0x61,0x64,0x20,0x28,0x7e,0x36,0x36,0x25, - 0x29,0x2c,0x20,0x69,0x66,0x20,0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63, - 0x65,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x69,0x73,0x73,0x75,0x65,0x2c,0x20,0x61, - 0x20,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20, - 0x74,0x6f,0x20,0x64,0x69,0x73,0x61,0x62,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x20,0x20, - 0x20,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64,0x65,0x20,0x63,0x6f,0x75, - 0x6c,0x64,0x20,0x62,0x65,0x20,0x64,0x6f,0x6e,0x65,0x2e,0x0a,0x2d,0x2d,0x20,0x20, - 0x20,0x2a,0x20,0x41,0x6c,0x6c,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20, - 0x61,0x72,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x65,0x64,0x20, - 0x69,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64, - 0x73,0x2c,0x20,0x73,0x65,0x65,0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x6f,0x6d,0x6d, - 0x65,0x6e,0x74,0x73,0x20,0x6f,0x6e,0x20,0x74,0x68,0x69,0x73,0x20,0x74,0x61,0x62, - 0x6c,0x65,0x20,0x74,0x6f,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c, - 0x20,0x64,0x65,0x74,0x61,0x69,0x6c,0x73,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x63, - 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e, - 0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x54,0x68, - 0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x73,0x20,0x69, - 0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x72,0x65,0x20,0x65,0x76,0x61,0x6c, - 0x75,0x61,0x74,0x65,0x64,0x20,0x75,0x73,0x65,0x72,0x20,0x63,0x6f,0x64,0x65,0x20, - 0x28,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x20,0x61,0x6e,0x64,0x20, - 0x65,0x76,0x61,0x6c,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2c,0x20,0x63, - 0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x62,0x72,0x65,0x61,0x6b, - 0x70,0x6f,0x69,0x6e,0x74,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x69,0x73,0x20, - 0x61,0x20,0x72,0x65,0x61,0x64,0x2f,0x77,0x72,0x69,0x74,0x65,0x0a,0x2d,0x2d,0x20, - 0x20,0x20,0x20,0x20,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x6f,0x66,0x20,0x74, - 0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e, - 0x6d,0x65,0x6e,0x74,0x20,0x6f,0x66,0x20,0x61,0x20,0x67,0x69,0x76,0x65,0x6e,0x20, - 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x28,0x63,0x61,0x6e, - 0x20,0x62,0x65,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x65,0x64,0x20,0x77,0x69,0x74, - 0x68,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x73, - 0x29,0x2e,0x20,0x53,0x65,0x65,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x66, - 0x6f,0x72,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x64,0x65, - 0x74,0x61,0x69,0x6c,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x43,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x74, - 0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x70,0x6f,0x6f,0x6c,0x65,0x64,0x20,0x69,0x6e, - 0x73,0x69,0x64,0x65,0x20,0x61,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x69,0x6e,0x67, - 0x20,0x6c,0x6f,0x6f,0x70,0x20,0x77,0x69,0x74,0x68,0x20,0x43,0x6f,0x6e,0x74,0x65, - 0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x20,0x28,0x65,0x61,0x63,0x68,0x20, - 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x69,0x73,0x20,0x69, - 0x6e,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x74,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79, - 0x20,0x6f,0x6e,0x63,0x65,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x4f, - 0x75,0x74,0x70,0x75,0x74,0x20,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x69,0x73,0x20,0x64,0x6f,0x6e,0x65,0x20,0x62,0x79,0x20,0x72,0x65,0x64, - 0x65,0x66,0x69,0x6e,0x69,0x6e,0x67,0x20,0x70,0x72,0x69,0x6e,0x74,0x20,0x61,0x6e, - 0x64,0x20,0x73,0x6f,0x6d,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x69,0x6e, - 0x73,0x69,0x64,0x65,0x20,0x74,0x68,0x65,0x20,0x69,0x6f,0x20,0x74,0x61,0x62,0x6c, - 0x65,0x2e,0x20,0x53,0x65,0x65,0x20,0x22,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x72, - 0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68,0x61,0x6e,0x64,0x6c, - 0x69,0x6e,0x67,0x22,0x20,0x66,0x6f,0x72,0x20,0x64,0x65,0x74,0x61,0x69,0x6c,0x73, - 0x2e,0x0a,0x2d,0x2d,0x20,0x54,0x6f,0x64,0x6f,0x20,0x6c,0x69,0x73,0x74,0x3a,0x0a, - 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x4f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x20, - 0x49,0x2f,0x4f,0x20,0x69,0x6e,0x20,0x69,0x6e,0x69,0x74,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x69,0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20, - 0x6f,0x6e,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x6c,0x6f,0x61,0x64,0x69,0x6e, - 0x67,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x41,0x6c,0x6c,0x6f,0x77,0x20, - 0x74,0x6f,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d, - 0x61,0x74,0x69,0x63,0x61,0x6c,0x6c,0x79,0x20,0x28,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x2e,0x62,0x72,0x65,0x61,0x6b,0x28,0x29,0x29,0x2e,0x0a,0x2d,0x2d,0x20, - 0x20,0x20,0x2a,0x20,0x42,0x72,0x65,0x61,0x6b,0x2d,0x6f,0x6e,0x2d,0x65,0x72,0x72, - 0x6f,0x72,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x28,0x62,0x72,0x65,0x61, - 0x6b,0x20,0x69,0x66,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x69,0x73, - 0x20,0x74,0x68,0x72,0x6f,0x77,0x6e,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x72, - 0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x70,0x63,0x61,0x6c,0x6c,0x20,0x69,0x6e, - 0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x74,0x6f,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65, - 0x20,0x69,0x74,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x55,0x73,0x65, - 0x20,0x6e,0x65,0x77,0x20,0x35,0x2e,0x32,0x20,0x66,0x61,0x63,0x69,0x6c,0x69,0x74, - 0x69,0x65,0x73,0x20,0x74,0x6f,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x20,0x69, - 0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x61,0x62,0x6f,0x75, - 0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x61,0x72,0x67,0x75, - 0x6d,0x65,0x6e,0x74,0x73,0x20,0x6e,0x61,0x6d,0x65,0x73,0x2c,0x20,0x76,0x61,0x72, - 0x61,0x72,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a, - 0x20,0x41,0x6c,0x6c,0x6f,0x77,0x20,0x74,0x6f,0x20,0x73,0x65,0x65,0x20,0x2e,0x2e, - 0x2e,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x20,0x66,0x6f,0x72,0x20,0x76,0x61, - 0x72,0x61,0x72,0x67,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x28, - 0x35,0x2e,0x32,0x20,0x6f,0x6e,0x6c,0x79,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a, - 0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x4c,0x75,0x61,0x4a,0x49,0x54,0x20, - 0x43,0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c, - 0x75,0x61,0x2d,0x75,0x73,0x65,0x72,0x73,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x69,0x73, - 0x74,0x73,0x2f,0x6c,0x75,0x61,0x2d,0x6c,0x2f,0x32,0x30,0x31,0x31,0x2d,0x30,0x32, - 0x2f,0x6d,0x73,0x67,0x30,0x31,0x30,0x31,0x32,0x2e,0x68,0x74,0x6d,0x6c,0x29,0x2d, - 0x2d,0x20,0x2f,0x21,0x5c,0x20,0x54,0x68,0x69,0x73,0x20,0x66,0x69,0x6c,0x65,0x20, - 0x69,0x73,0x20,0x61,0x75,0x74,0x6f,0x2d,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65, - 0x64,0x2e,0x20,0x44,0x6f,0x20,0x6e,0x6f,0x74,0x20,0x61,0x6c,0x74,0x65,0x72,0x20, - 0x6d,0x61,0x6e,0x75,0x61,0x6c,0x6c,0x79,0x20,0x2f,0x21,0x5c,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d, - 0x2d,0x20,0x20,0x53,0x75,0x62,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x73,0x20,0x62,0x6f, - 0x64,0x79,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f, - 0x72,0x74,0x2e,0x61,0x70,0x72,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70, - 0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x61,0x70,0x72,0x22,0x5d, - 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63, - 0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72, - 0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20, - 0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72, - 0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20, - 0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64, - 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e, - 0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61, - 0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c, - 0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d, - 0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65, - 0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20, - 0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63, - 0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64, - 0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64, - 0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74, - 0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65, - 0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c, - 0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73, - 0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20, - 0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69, - 0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65, - 0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x41,0x70,0x61, - 0x63,0x68,0x65,0x20,0x50,0x6f,0x72,0x74,0x61,0x62,0x6c,0x65,0x20,0x52,0x75,0x6e, - 0x74,0x69,0x6d,0x65,0x20,0x62,0x61,0x63,0x6b,0x65,0x6e,0x64,0x20,0x66,0x6f,0x72, - 0x20,0x44,0x42,0x47,0x50,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x70,0x72,0x20,0x3d,0x20,0x72,0x65,0x71, - 0x75,0x69,0x72,0x65,0x20,0x22,0x61,0x70,0x72,0x22,0x0a,0x0a,0x2d,0x2d,0x20,0x62, - 0x61,0x73,0x65,0x20,0x36,0x34,0x20,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x0a, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x62,0x36,0x34,0x5f,0x77,0x72,0x61, - 0x70,0x28,0x73,0x72,0x63,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74, - 0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x36, - 0x34,0x5f,0x73,0x72,0x63,0x20,0x3d,0x20,0x6d,0x69,0x6d,0x65,0x2e,0x62,0x36,0x34, - 0x28,0x73,0x72,0x63,0x29,0x0a,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c, - 0x20,0x23,0x62,0x36,0x34,0x5f,0x73,0x72,0x63,0x2c,0x20,0x37,0x36,0x20,0x64,0x6f, - 0x20,0x74,0x5b,0x23,0x74,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x62,0x36,0x34,0x5f,0x73, - 0x72,0x63,0x3a,0x73,0x75,0x62,0x28,0x69,0x2c,0x20,0x69,0x2b,0x37,0x35,0x29,0x2e, - 0x2e,0x22,0x5c,0x72,0x5c,0x6e,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61, - 0x74,0x28,0x74,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x69,0x6d,0x70, - 0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x20,0x73,0x75,0x62,0x73,0x65,0x74, - 0x20,0x6f,0x66,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x41,0x50, - 0x49,0x20,0x75,0x73,0x69,0x6e,0x67,0x20,0x41,0x50,0x52,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54,0x20,0x3d,0x20,0x7b,0x0a, - 0x20,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x64,0x64,0x72,0x65, - 0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x63,0x6f,0x6e,0x6e,0x65,0x63, - 0x74,0x28,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29, - 0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x20, - 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c, - 0x20,0x6e,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a, - 0x72,0x65,0x61,0x64,0x28,0x6e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x20,0x2d,0x2d,0x20, - 0x6f,0x6e,0x6c,0x79,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x20,0x72,0x65,0x61, - 0x64,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x0a,0x20,0x20,0x73,0x65,0x6e,0x64, - 0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73, - 0x65,0x6c,0x66,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e, - 0x73,0x6b,0x74,0x3a,0x77,0x72,0x69,0x74,0x65,0x28,0x64,0x61,0x74,0x61,0x29,0x20, - 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x63,0x6c,0x6f,0x73,0x65,0x20,0x20,0x20,0x3d, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x29,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x63, - 0x6c,0x6f,0x73,0x65,0x28,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x73,0x65, - 0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x73,0x65,0x63,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x63,0x20,0x3d,0x3d, - 0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73, - 0x6b,0x74,0x3a,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x5f,0x73,0x65,0x74,0x28,0x74, - 0x72,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20, - 0x73,0x65,0x63,0x20,0x3d,0x3d,0x20,0x30,0x20,0x20,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74, - 0x5f,0x73,0x65,0x74,0x28,0x66,0x61,0x6c,0x73,0x65,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a, - 0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x5f,0x73,0x65,0x74,0x28,0x6d,0x61,0x74,0x68, - 0x2e,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x73,0x65,0x63,0x20,0x2a,0x20,0x31,0x30,0x30, - 0x30,0x30,0x30,0x30,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x7d,0x0a,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54,0x2e,0x5f,0x5f,0x69, - 0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54, - 0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x63, - 0x72,0x65,0x61,0x74,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73, - 0x6b,0x74,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x61,0x70,0x72,0x2e,0x73,0x6f, - 0x63,0x6b,0x65,0x74,0x5f,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x27,0x74,0x63,0x70, - 0x27,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x73,0x6b,0x74,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x6e,0x69,0x6c,0x2c,0x20,0x65,0x72,0x72,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6d,0x65,0x74, - 0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x73,0x6b,0x74,0x20,0x3d,0x20,0x73,0x6b, - 0x74,0x7d,0x2c,0x20,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x6c,0x65,0x65, - 0x70,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x61,0x70,0x72,0x2e,0x73,0x6c,0x65, - 0x65,0x70,0x2c,0x20,0x2d,0x2d,0x20,0x65,0x78,0x61,0x63,0x74,0x20,0x73,0x61,0x6d, - 0x65,0x20,0x41,0x50,0x49,0x20,0x61,0x73,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b, - 0x65,0x74,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x42,0x61,0x73,0x65,0x36, - 0x34,0x20,0x72,0x65,0x6c,0x61,0x74,0x65,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f, - 0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74, - 0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x77,0x69,0x74,0x68,0x20,0x6c,0x69, - 0x6e,0x65,0x20,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74,0x61,0x20,0x74,0x6f,0x20, - 0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63, - 0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20, - 0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64, - 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d, - 0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x62,0x36,0x34,0x5f,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x61,0x70,0x72, - 0x2e,0x62,0x61,0x73,0x65,0x36,0x34,0x5f,0x65,0x6e,0x63,0x6f,0x64,0x65,0x28,0x64, - 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72, - 0x20,0x69,0x3d,0x31,0x2c,0x20,0x23,0x62,0x36,0x34,0x5f,0x64,0x61,0x74,0x61,0x2c, - 0x20,0x37,0x36,0x20,0x64,0x6f,0x20,0x74,0x5b,0x23,0x74,0x2b,0x31,0x5d,0x20,0x3d, - 0x20,0x62,0x36,0x34,0x5f,0x64,0x61,0x74,0x61,0x3a,0x73,0x75,0x62,0x28,0x69,0x2c, - 0x20,0x69,0x2b,0x37,0x35,0x29,0x2e,0x2e,0x22,0x5c,0x72,0x5c,0x6e,0x22,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x74, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34, - 0x2c,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x79,0x20,0x65,0x78, - 0x74,0x72,0x61,0x20,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x20,0x28,0x77,0x72,0x61, - 0x70,0x70,0x69,0x6e,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74,0x61,0x20,0x74,0x6f,0x20, - 0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x72,0x61,0x77,0x62,0x36,0x34,0x20, - 0x3d,0x20,0x61,0x70,0x72,0x2e,0x62,0x61,0x73,0x65,0x36,0x34,0x5f,0x65,0x6e,0x63, - 0x6f,0x64,0x65,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x44,0x65, - 0x63,0x6f,0x64,0x65,0x73,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x64,0x61,0x74, - 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20, - 0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x62,0x61, - 0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x64,0x61,0x74, - 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a, - 0x20,0x20,0x20,0x20,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d,0x20,0x61,0x70,0x72,0x2e, - 0x62,0x61,0x73,0x65,0x36,0x34,0x5f,0x64,0x65,0x63,0x6f,0x64,0x65,0x2c,0x0a,0x7d, - 0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66, - 0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e, - 0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x61,0x70,0x72,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75, - 0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c, - 0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65, - 0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61, - 0x73,0x6f,0x63,0x6b,0x65,0x74,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79, - 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32, - 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c, - 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a, - 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65, - 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f, - 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63, - 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69, - 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20, - 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20, - 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, - 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20, - 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20, - 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65, - 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74, - 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69, - 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70, - 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f, - 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30, - 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74, - 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20, - 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73, - 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61, - 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f, - 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x62, - 0x61,0x63,0x6b,0x65,0x6e,0x64,0x20,0x66,0x6f,0x72,0x20,0x44,0x42,0x47,0x50,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x20,0x69,0x6e, - 0x20,0x6f,0x72,0x64,0x65,0x72,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x61,0x73,0x20, - 0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x61,0x73,0x20,0x70, - 0x6f,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x4c,0x75,0x61, - 0x73,0x6f,0x63,0x6b,0x65,0x74,0x2c,0x20,0x63,0x6f,0x72,0x65,0x20,0x41,0x50,0x49, - 0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x64,0x69,0x72,0x65, - 0x63,0x74,0x6c,0x79,0x20,0x28,0x74,0x6f,0x20,0x6e,0x6f,0x20,0x61,0x64,0x64,0x20, - 0x79,0x65,0x74,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x6c,0x61,0x79,0x65, - 0x72,0x29,0x0a,0x0a,0x2d,0x2d,0x46,0x49,0x58,0x4d,0x45,0x3a,0x20,0x72,0x65,0x6d, - 0x6f,0x76,0x65,0x20,0x74,0x68,0x69,0x73,0x20,0x68,0x61,0x63,0x6b,0x20,0x61,0x73, - 0x20,0x73,0x6f,0x6f,0x6e,0x20,0x61,0x73,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b, - 0x65,0x74,0x20,0x6f,0x66,0x66,0x69,0x63,0x69,0x61,0x6c,0x6c,0x79,0x20,0x73,0x75, - 0x70,0x70,0x6f,0x72,0x74,0x20,0x35,0x2e,0x32,0x0a,0x69,0x66,0x20,0x5f,0x56,0x45, - 0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e, - 0x32,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e, - 0x67,0x65,0x74,0x6e,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x20,0x61,0x6e,0x64,0x20, - 0x23,0x74,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69, - 0x72,0x65,0x20,0x22,0x73,0x6f,0x63,0x6b,0x65,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x6d,0x69,0x6d,0x65,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69, - 0x72,0x65,0x20,0x22,0x6d,0x69,0x6d,0x65,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x6c,0x74,0x6e,0x31,0x32,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65, - 0x20,0x22,0x6c,0x74,0x6e,0x31,0x32,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72, - 0x65,0x67,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x72,0x65, - 0x67,0x69,0x73,0x74,0x72,0x79,0x28,0x29,0x0a,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x20,0x3d, - 0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2e,0x74,0x63,0x70,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x73,0x6c,0x65,0x65,0x70,0x20,0x20,0x3d,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74, - 0x2e,0x73,0x6c,0x65,0x65,0x70,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x72,0x65,0x6c,0x61,0x74,0x65,0x64,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d, - 0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e, - 0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x77,0x69, - 0x74,0x68,0x20,0x6c,0x69,0x6e,0x65,0x20,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64, - 0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74, - 0x61,0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61,0x73,0x65,0x36, - 0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67, - 0x0a,0x20,0x20,0x20,0x20,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x74,0x65,0x72,0x20,0x3d, - 0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x66,0x69,0x6c,0x74,0x65,0x72,0x2e,0x63,0x68, - 0x61,0x69,0x6e,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x65,0x6e,0x63,0x6f,0x64,0x65,0x28, - 0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x29,0x2c,0x20,0x6d,0x69,0x6d,0x65,0x2e, - 0x77,0x72,0x61,0x70,0x28,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x29,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69, - 0x6e,0x6b,0x2c,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x3d,0x20,0x6c,0x74,0x6e, - 0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e,0x74,0x61,0x62,0x6c,0x65,0x28,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x70,0x75, - 0x6d,0x70,0x2e,0x61,0x6c,0x6c,0x28,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x6f,0x75, - 0x72,0x63,0x65,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x64,0x61,0x74,0x61,0x29, - 0x2c,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e,0x63,0x68,0x61, - 0x69,0x6e,0x28,0x66,0x69,0x6c,0x74,0x65,0x72,0x2c,0x20,0x73,0x69,0x6e,0x6b,0x29, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x6f,0x75, - 0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20, - 0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61, - 0x73,0x65,0x36,0x34,0x2c,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e, - 0x79,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x20, - 0x28,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64,0x61, - 0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74,0x61, - 0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x63,0x6f,0x64,0x65, - 0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x72,0x61,0x77, - 0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64, - 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x62,0x36,0x34,0x28,0x64,0x61, - 0x74,0x61,0x29,0x29,0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65, - 0x73,0x75,0x6c,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x6f,0x77,0x2d, - 0x6c,0x65,0x76,0x65,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69, - 0x73,0x20,0x66,0x69,0x6e,0x65,0x20,0x68,0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x44,0x65, - 0x63,0x6f,0x64,0x65,0x73,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x64,0x61,0x74, - 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20, - 0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x62,0x61, - 0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x64,0x61,0x74, - 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a, - 0x20,0x20,0x20,0x20,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x6d,0x69,0x6d,0x65,0x2e, - 0x75,0x6e,0x62,0x36,0x34,0x28,0x64,0x61,0x74,0x61,0x29,0x29,0x20,0x2d,0x2d,0x20, - 0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x6f,0x66,0x20, - 0x74,0x68,0x65,0x20,0x6c,0x6f,0x77,0x2d,0x6c,0x65,0x76,0x65,0x6c,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x66,0x69,0x6e,0x65,0x20,0x68, - 0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,0x0a, - 0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d, - 0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72, - 0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65, - 0x74,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f, - 0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x5f,0x73,0x63,0x68, - 0x65,0x64,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f, - 0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61, - 0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74, - 0x5f,0x73,0x63,0x68,0x65,0x64,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79, - 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32, - 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c, - 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a, - 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65, - 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f, - 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63, - 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69, - 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20, - 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20, - 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, - 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20, - 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20, - 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65, - 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74, - 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69, - 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70, - 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f, - 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30, - 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74, - 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20, - 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73, - 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61, - 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f, - 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x77, - 0x69,0x74,0x68,0x20,0x4c,0x75,0x61,0x53,0x63,0x68,0x65,0x64,0x20,0x62,0x61,0x63, - 0x6b,0x65,0x6e,0x64,0x20,0x66,0x6f,0x72,0x20,0x44,0x42,0x47,0x50,0x20,0x64,0x65, - 0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x20,0x41,0x73,0x20,0x4c, - 0x75,0x61,0x53,0x68,0x65,0x64,0x20,0x74,0x6f,0x74,0x61,0x6c,0x6c,0x79,0x20,0x68, - 0x69,0x64,0x65,0x73,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x6d,0x6f, - 0x64,0x75,0x6c,0x65,0x20,0x4d,0x55,0x53,0x54,0x20,0x62,0x65,0x20,0x6c,0x6f,0x61, - 0x64,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x76,0x65,0x72,0x79,0x20, - 0x73,0x74,0x61,0x72,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f, - 0x67,0x72,0x61,0x6d,0x0a,0x2d,0x2d,0x20,0x28,0x62,0x65,0x66,0x6f,0x72,0x65,0x20, - 0x6c,0x6f,0x61,0x64,0x69,0x6e,0x67,0x20,0x73,0x63,0x68,0x65,0x64,0x29,0x20,0x74, - 0x6f,0x20,0x63,0x61,0x74,0x63,0x68,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63, - 0x65,0x73,0x20,0x74,0x6f,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x63,0x6f,0x72,0x65,0x20,0x3d,0x20,0x72,0x65, - 0x71,0x75,0x69,0x72,0x65,0x22,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2e,0x63,0x6f,0x72, - 0x65,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x20, - 0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64, - 0x65,0x62,0x75,0x67,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x67,0x20, - 0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x72,0x65,0x67,0x69,0x73, - 0x74,0x72,0x79,0x28,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f, - 0x63,0x6b,0x69,0x6e,0x67,0x63,0x72,0x65,0x61,0x74,0x65,0x20,0x20,0x3d,0x20,0x73, - 0x6f,0x63,0x6b,0x65,0x74,0x63,0x6f,0x72,0x65,0x2e,0x74,0x63,0x70,0x0a,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73,0x6c,0x65,0x65, - 0x70,0x20,0x20,0x20,0x3d,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x63,0x6f,0x72,0x65, - 0x2e,0x73,0x6c,0x65,0x65,0x70,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c, - 0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x20,0x20, - 0x20,0x3d,0x20,0x72,0x65,0x67,0x5b,0x22,0x74,0x63,0x70,0x7b,0x6d,0x61,0x73,0x74, - 0x65,0x72,0x7d,0x22,0x5d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x63,0x6f, - 0x6e,0x6e,0x65,0x63,0x74,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63, - 0x6b,0x69,0x6e,0x67,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x20,0x20,0x20,0x20,0x3d, - 0x20,0x72,0x65,0x67,0x5b,0x22,0x74,0x63,0x70,0x7b,0x63,0x6c,0x69,0x65,0x6e,0x74, - 0x7d,0x22,0x5d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x72,0x65,0x63,0x65, - 0x69,0x76,0x65,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69, - 0x6e,0x67,0x73,0x65,0x6e,0x64,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x72, - 0x65,0x67,0x5b,0x22,0x74,0x63,0x70,0x7b,0x63,0x6c,0x69,0x65,0x6e,0x74,0x7d,0x22, - 0x5d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x73,0x65,0x6e,0x64,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73,0x65,0x74, - 0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x20,0x3d,0x20,0x72,0x65,0x67,0x5b,0x22,0x74, - 0x63,0x70,0x7b,0x6d,0x61,0x73,0x74,0x65,0x72,0x7d,0x22,0x5d,0x2e,0x5f,0x5f,0x69, - 0x6e,0x64,0x65,0x78,0x2e,0x73,0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x6c, - 0x6f,0x73,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x67,0x5b,0x22, - 0x74,0x63,0x70,0x7b,0x6d,0x61,0x73,0x74,0x65,0x72,0x7d,0x22,0x5d,0x2e,0x5f,0x5f, - 0x69,0x6e,0x64,0x65,0x78,0x2e,0x63,0x6c,0x6f,0x73,0x65,0x0a,0x0a,0x2d,0x2d,0x20, - 0x77,0x65,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x73,0x65,0x74,0x20,0x61,0x20, - 0x6e,0x65,0x77,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x64,0x69, - 0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x6f,0x6e,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74, - 0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x2c,0x20,0x73,0x6f,0x20,0x77,0x72,0x61,0x70, - 0x20,0x69,0x74,0x20,0x69,0x6e,0x74,0x6f,0x20,0x61,0x20,0x6e,0x65,0x77,0x20,0x74, - 0x61,0x62,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x66,0x6f,0x72,0x77, - 0x61,0x72,0x64,0x20,0x61,0x6c,0x6c,0x20,0x63,0x61,0x6c,0x6c,0x73,0x2e,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x74,0x63,0x70, - 0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x20, - 0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c, - 0x66,0x2c,0x20,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74, - 0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e, - 0x67,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b, - 0x74,0x2c,0x20,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74, - 0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x72,0x65,0x63,0x65,0x69,0x76,0x65, - 0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73, - 0x65,0x6c,0x66,0x2c,0x20,0x6e,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b, - 0x69,0x6e,0x67,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x28,0x73,0x65,0x6c,0x66,0x2e, - 0x73,0x6b,0x74,0x2c,0x20,0x6e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x73, - 0x65,0x6e,0x64,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x64,0x61,0x74,0x61,0x29, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73,0x65,0x6e,0x64,0x28,0x73,0x65, - 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x20,0x65,0x6e, - 0x64,0x2c,0x0a,0x20,0x20,0x73,0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x20, - 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c, - 0x20,0x73,0x65,0x63,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73, - 0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73, - 0x6b,0x74,0x2c,0x20,0x73,0x65,0x63,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20, - 0x63,0x6c,0x6f,0x73,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x29,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x6c,0x6f,0x73,0x65,0x28, - 0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d, - 0x0a,0x0a,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x74,0x63,0x70,0x2e,0x5f,0x5f, - 0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67, - 0x74,0x63,0x70,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x69,0x6d,0x65,0x20, - 0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x6d,0x69,0x6d,0x65, - 0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x74,0x6e,0x31,0x32,0x20,0x3d,0x20, - 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x6c,0x74,0x6e,0x31,0x32,0x22,0x0a, - 0x0a,0x2d,0x2d,0x20,0x76,0x65,0x72,0x69,0x66,0x79,0x20,0x74,0x68,0x61,0x74,0x20, - 0x74,0x68,0x65,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x61,0x72,0x65,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x61,0x6c, - 0x20,0x6f,0x6e,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x73,0x63, - 0x68,0x65,0x64,0x20,0x6e,0x6f,0x74,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67, - 0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x73,0x0a,0x61,0x73,0x73,0x65,0x72,0x74, - 0x28,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x62, - 0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x22, - 0x53,0x22,0x29,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x43,0x22,0x2c, - 0x20,0x22,0x54,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6e, - 0x65,0x65,0x64,0x73,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x61,0x6c,0x20,0x73,0x6f, - 0x63,0x6b,0x65,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x21, - 0x22,0x29,0x0a,0x2d,0x2d,0x20,0x63,0x6c,0x65,0x61,0x6e,0x75,0x70,0x20,0x74,0x68, - 0x65,0x20,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x6c,0x6f,0x61,0x64,0x65,0x64, - 0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x28,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2e,0x63, - 0x6f,0x72,0x65,0x20,0x61,0x64,0x64,0x73,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20, - 0x66,0x69,0x65,0x6c,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x69,0x74,0x29,0x0a,0x70, - 0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x6c,0x6f,0x61,0x64,0x65,0x64,0x2e,0x73,0x6f, - 0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x20, - 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65, - 0x28,0x7b,0x20,0x73,0x6b,0x74,0x20,0x3d,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e, - 0x67,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x29,0x20,0x7d,0x2c,0x20,0x62,0x6c,0x6f, - 0x63,0x6b,0x69,0x6e,0x67,0x74,0x63,0x70,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x73,0x6c,0x65,0x65,0x70,0x20,0x20,0x3d,0x20,0x62,0x6c,0x6f,0x63, - 0x6b,0x69,0x6e,0x67,0x73,0x6c,0x65,0x65,0x70,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x72,0x65,0x6c,0x61,0x74,0x65, - 0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34, - 0x20,0x77,0x69,0x74,0x68,0x20,0x6c,0x69,0x6e,0x65,0x20,0x77,0x72,0x61,0x70,0x70, - 0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61, - 0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20, - 0x64,0x61,0x74,0x61,0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61, - 0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x74,0x65, - 0x72,0x20,0x3d,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x66,0x69,0x6c,0x74,0x65,0x72, - 0x2e,0x63,0x68,0x61,0x69,0x6e,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x65,0x6e,0x63,0x6f, - 0x64,0x65,0x28,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x29,0x2c,0x20,0x6d,0x69, - 0x6d,0x65,0x2e,0x77,0x72,0x61,0x70,0x28,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22, - 0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x73,0x69,0x6e,0x6b,0x2c,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x3d,0x20, - 0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e,0x74,0x61,0x62,0x6c,0x65, - 0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x74,0x6e,0x31,0x32, - 0x2e,0x70,0x75,0x6d,0x70,0x2e,0x61,0x6c,0x6c,0x28,0x6c,0x74,0x6e,0x31,0x32,0x2e, - 0x73,0x6f,0x75,0x72,0x63,0x65,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x64,0x61, - 0x74,0x61,0x29,0x2c,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e, - 0x63,0x68,0x61,0x69,0x6e,0x28,0x66,0x69,0x6c,0x74,0x65,0x72,0x2c,0x20,0x73,0x69, - 0x6e,0x6b,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74, - 0x28,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64, - 0x65,0x73,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f, - 0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x2c,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74, - 0x20,0x61,0x6e,0x79,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x70,0x61,0x72,0x73,0x69, - 0x6e,0x67,0x20,0x28,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x2c,0x20,0x2e,0x2e, - 0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d, - 0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64, - 0x61,0x74,0x61,0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x63, - 0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20, - 0x72,0x61,0x77,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x62,0x36,0x34, - 0x28,0x64,0x61,0x74,0x61,0x29,0x29,0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74, - 0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c, - 0x6f,0x77,0x2d,0x6c,0x65,0x76,0x65,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x69,0x73,0x20,0x66,0x69,0x6e,0x65,0x20,0x68,0x65,0x72,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d, - 0x20,0x44,0x65,0x63,0x6f,0x64,0x65,0x73,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20, - 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29, - 0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20, - 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x6d,0x69, - 0x6d,0x65,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28,0x64,0x61,0x74,0x61,0x29,0x29,0x20, - 0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20, - 0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x6f,0x77,0x2d,0x6c,0x65,0x76,0x65,0x6c, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x66,0x69,0x6e, - 0x65,0x20,0x68,0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a, - 0x7d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f, - 0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f, - 0x63,0x6b,0x65,0x74,0x5f,0x73,0x63,0x68,0x65,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d, - 0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x0a,0x70,0x61,0x63,0x6b,0x61, - 0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75, - 0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x22,0x5d,0x20, - 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a, - 0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29, - 0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72, - 0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f, - 0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69, - 0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54, - 0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20, - 0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67, - 0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72, - 0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65, - 0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73, - 0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20, - 0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76, - 0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63, - 0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69, - 0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20, - 0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a, - 0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63, - 0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f, - 0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a, - 0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a, - 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57, - 0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61, - 0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d, - 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6d,0x6d, - 0x61,0x6e,0x64,0x73,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x73,0x20,0x66,0x6f, - 0x72,0x20,0x44,0x42,0x47,0x70,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x2e, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x63,0x6f,0x6d, - 0x6d,0x61,0x6e,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x20, - 0x45,0x61,0x63,0x68,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68,0x61, - 0x6e,0x64,0x6c,0x65,0x20,0x61,0x20,0x64,0x69,0x66,0x66,0x65,0x72,0x65,0x6e,0x74, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x20,0x63, - 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x69,0x73,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x33, - 0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20, - 0x31,0x2e,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x73,0x65,0x73, - 0x73,0x69,0x6f,0x6e,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x0a,0x2d,0x2d, - 0x20,0x20,0x20,0x32,0x2e,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e, - 0x64,0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x73,0x20,0x74, - 0x61,0x62,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x33,0x2e,0x20,0x74,0x68,0x65, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x64,0x61,0x74,0x61,0x2c,0x20,0x69, - 0x66,0x20,0x61,0x6e,0x79,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65,0x20,0x72,0x65,0x73, - 0x75,0x6c,0x74,0x20,0x69,0x73,0x20,0x65,0x69,0x74,0x68,0x65,0x72,0x20,0x3a,0x0a, - 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x74,0x72,0x75,0x65,0x20,0x28,0x6f,0x72,0x20, - 0x61,0x6e,0x79,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x65,0x76,0x61,0x6c,0x75,0x61, - 0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x72,0x75,0x65,0x29,0x20,0x3a,0x20,0x74, - 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69,0x6c,0x6c, - 0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x65,0x63, - 0x75,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x61,0x70,0x70, - 0x6c,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x28,0x63,0x6f,0x6e,0x74,0x69,0x6e, - 0x75,0x61,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x29,0x0a, - 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x66,0x61,0x6c,0x73,0x65,0x20,0x3a,0x20,0x6f, - 0x6e,0x6c,0x79,0x20,0x69,0x6e,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64, - 0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20, - 0x57,0x49,0x4c,0x4c,0x20,0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72,0x20,0x66,0x75, - 0x72,0x74,0x68,0x65,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x69, - 0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e, - 0x75,0x69,0x6e,0x67,0x20,0x28,0x74,0x79,0x70,0x69,0x63,0x61,0x6c,0x6c,0x79,0x2c, - 0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x29,0x0a, - 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x6e,0x69,0x6c,0x2f,0x6e,0x6f,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x3a,0x20,0x69,0x6e,0x20,0x73,0x79,0x6e,0x63,0x20,0x6d, - 0x6f,0x64,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x20,0x77,0x69,0x6c,0x6c,0x20,0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72,0x20, - 0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x2e, - 0x20,0x49,0x6e,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64,0x65,0x20,0x74, - 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69,0x6c,0x6c, - 0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78, - 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63, - 0x6f,0x77,0x72,0x61,0x70,0x2c,0x20,0x63,0x6f,0x79,0x69,0x65,0x6c,0x64,0x20,0x3d, - 0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x2c, - 0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x79,0x69,0x65,0x6c,0x64, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x3d,0x20,0x72, - 0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x22,0x0a,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x65,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64, - 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x72,0x65,0x22,0x0a,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x64,0x62,0x67,0x70,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x2e,0x64,0x62,0x67,0x70,0x22,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20, - 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x22,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f, - 0x6e,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65, - 0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65, - 0x78,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x67,0x20,0x3d,0x20, - 0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x67,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x6d,0x6d,0x61, - 0x6e,0x64,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x73,0x20,0x74,0x61,0x62,0x6c, - 0x65,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x47,0x65,0x74,0x73,0x20,0x74,0x68,0x65,0x20, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x62,0x65,0x68,0x69,0x6e,0x64, - 0x20,0x61,0x6e,0x20,0x69,0x64,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x72,0x6f,0x77,0x73, - 0x20,0x65,0x72,0x72,0x6f,0x72,0x73,0x20,0x6f,0x6e,0x20,0x75,0x6e,0x6b,0x6e,0x6f, - 0x77,0x6e,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x69,0x65,0x72,0x73,0x0a,0x2d, - 0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x20,0x63,0x6f,0x72,0x6f,0x5f,0x69, - 0x64,0x20,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x6f,0x72,0x20,0x6e,0x69, - 0x6c,0x29,0x20,0x43,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x64,0x65, - 0x6e,0x74,0x69,0x66,0x69,0x65,0x72,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x28, - 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x43,0x6f, - 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65, - 0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x28,0x69,0x66,0x20,0x63,0x6f,0x72,0x6f, - 0x5f,0x69,0x64,0x20,0x77,0x61,0x73,0x20,0x6e,0x69,0x6c,0x20,0x6f,0x72,0x20,0x69, - 0x66,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x73,0x20,0x74, - 0x68,0x65,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x63,0x6f,0x72,0x6f,0x75, - 0x74,0x69,0x6e,0x65,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69, - 0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e, - 0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x33,0x39,0x39,0x2c,0x20,0x63,0x6f,0x72,0x65, - 0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x5b,0x74,0x6f,0x6e,0x75,0x6d, - 0x62,0x65,0x72,0x28,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64,0x29,0x5d,0x2c,0x20,0x22, - 0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70, - 0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x33,0x39,0x39,0x2c,0x20,0x63,0x6f,0x72, - 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x28,0x63,0x6f, - 0x72,0x6f,0x29,0x20,0x7e,0x3d,0x20,0x22,0x64,0x65,0x61,0x64,0x22,0x2c,0x20,0x22, - 0x43,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x73,0x20,0x64,0x65,0x61, - 0x64,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63, - 0x6f,0x72,0x6f,0x20,0x7e,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f, - 0x5b,0x31,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x75,0x74,0x69,0x6c,0x2e,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72,0x65, - 0x61,0x64,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x73,0x65,0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d, - 0x5b,0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x74,0x65,0x20, - 0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x73,0x65,0x6e,0x64,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x74, - 0x6f,0x20,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x20,0x63,0x6f,0x6d,0x6d,0x61, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76, - 0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x73,0x70, - 0x6f,0x6e,0x73,0x65,0x20,0x74,0x6f,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x63,0x6f, - 0x6d,0x6d,0x61,0x6e,0x64,0x20,0x69,0x74,0x73,0x65,0x6c,0x66,0x0a,0x20,0x20,0x20, - 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73, - 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d, - 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74, - 0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20, - 0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63, - 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69, - 0x2c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x20,0x7d,0x20, - 0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66, - 0x61,0x6c,0x73,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x28,0x73,0x65,0x6c,0x66, - 0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70, - 0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73, - 0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64, - 0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x74,0x75,0x73,0x22,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x20,0x3d,0x20,0x22,0x6f, - 0x6b,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x74, - 0x75,0x73,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x74,0x65,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63, - 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69, - 0x20,0x7d,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x6f,0x70,0x28,0x73,0x65,0x6c,0x66, - 0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70, - 0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73, - 0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64, - 0x20,0x3d,0x20,0x22,0x73,0x74,0x6f,0x70,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x20,0x3d,0x20,0x22,0x6f,0x6b,0x22, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x74,0x75,0x73, - 0x20,0x3d,0x20,0x22,0x73,0x74,0x6f,0x70,0x70,0x65,0x64,0x22,0x2c,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f, - 0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20, - 0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74, - 0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x6f,0x73,0x2e, - 0x65,0x78,0x69,0x74,0x28,0x31,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f, - 0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d, - 0x20,0x61,0x72,0x67,0x73,0x2e,0x6e,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x3d,0x20,0x75,0x74,0x69, - 0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d, - 0x20,0x6f,0x72,0x20,0x28,0x6e,0x6f,0x74,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x5b,0x6e, - 0x61,0x6d,0x65,0x5d,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73, - 0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74, - 0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f, - 0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64, - 0x20,0x3d,0x20,0x22,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f,0x67,0x65,0x74,0x22, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x65,0x61,0x74, - 0x75,0x72,0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x70,0x70,0x6f, - 0x72,0x74,0x65,0x64,0x20,0x3d,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20, - 0x61,0x6e,0x64,0x20,0x22,0x31,0x22,0x20,0x6f,0x72,0x20,0x22,0x30,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61, - 0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e, - 0x69,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x6f,0x73, - 0x74,0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x29,0x20, - 0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x4d,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f,0x73,0x65,0x74,0x28, - 0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x6e,0x2c,0x20,0x61,0x72,0x67,0x73, - 0x2e,0x76,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x75,0x63, - 0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x70,0x63,0x61,0x6c,0x6c,0x28,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61, - 0x74,0x75,0x72,0x65,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67, - 0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e, - 0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65, - 0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20, - 0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e, - 0x64,0x20,0x3d,0x20,0x22,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f,0x73,0x65,0x74, - 0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x65,0x61,0x74,0x75, - 0x72,0x65,0x20,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x73,0x75,0x63, - 0x63,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x31,0x20,0x6f,0x72,0x20,0x30,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63, - 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69, - 0x0a,0x20,0x20,0x20,0x20,0x7d,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x74,0x79,0x70,0x65,0x6d, - 0x61,0x70,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67, - 0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x6e,0x61, - 0x6d,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x78,0x73,0x64,0x74,0x79,0x70, - 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x6d,0x61,0x70,0x22,0x2c, - 0x20,0x61,0x74,0x74,0x73,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d, - 0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x79, - 0x70,0x65,0x2c,0x20,0x5b,0x22,0x78,0x73,0x69,0x3a,0x74,0x79,0x70,0x65,0x22,0x5d, - 0x20,0x3d,0x20,0x78,0x73,0x64,0x74,0x79,0x70,0x65,0x20,0x7d,0x20,0x7d,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70, - 0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73, - 0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d, - 0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x74,0x79,0x70,0x65,0x6d,0x61,0x70,0x5f, - 0x67,0x65,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64, - 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x22,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78, - 0x73,0x69,0x22,0x5d,0x20,0x3d,0x20,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77, - 0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x32,0x30,0x30,0x31,0x2f,0x58, - 0x4d,0x4c,0x53,0x63,0x68,0x65,0x6d,0x61,0x2d,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63, - 0x65,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x5b,0x22,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x73,0x64,0x22,0x5d,0x20,0x3d,0x20, - 0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f, - 0x72,0x67,0x2f,0x32,0x30,0x30,0x31,0x2f,0x58,0x4d,0x4c,0x53,0x63,0x68,0x65,0x6d, - 0x61,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22, - 0x6e,0x69,0x6c,0x22,0x2c,0x20,0x22,0x6e,0x75,0x6c,0x6c,0x22,0x29,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22, - 0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x22,0x2c,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22, - 0x2c,0x20,0x22,0x78,0x73,0x64,0x3a,0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x22,0x29, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70, - 0x65,0x28,0x22,0x6e,0x75,0x6d,0x62,0x65,0x72,0x22,0x2c,0x20,0x22,0x66,0x6c,0x6f, - 0x61,0x74,0x22,0x2c,0x20,0x22,0x78,0x73,0x64,0x3a,0x66,0x6c,0x6f,0x61,0x74,0x22, - 0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79, - 0x70,0x65,0x28,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x2c,0x20,0x22,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x22,0x2c,0x20,0x22,0x78,0x73,0x64,0x3a,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x22,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65, - 0x6e,0x74,0x79,0x70,0x65,0x28,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x22, - 0x2c,0x20,0x22,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x22,0x29,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22, - 0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61,0x22,0x2c,0x20,0x22,0x72,0x65,0x73,0x6f, - 0x75,0x72,0x63,0x65,0x22,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,0x74,0x68,0x72,0x65,0x61,0x64,0x22, - 0x2c,0x20,0x22,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x22,0x29,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22, - 0x74,0x61,0x62,0x6c,0x65,0x22,0x2c,0x20,0x22,0x68,0x61,0x73,0x68,0x22,0x29,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65, - 0x28,0x22,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x22,0x2c,0x20,0x22,0x61,0x72, - 0x72,0x61,0x79,0x22,0x29,0x2c,0x20,0x2d,0x2d,0x20,0x61,0x72,0x74,0x69,0x66,0x69, - 0x63,0x69,0x61,0x6c,0x20,0x74,0x79,0x70,0x65,0x20,0x74,0x6f,0x20,0x72,0x65,0x70, - 0x72,0x65,0x73,0x65,0x6e,0x74,0x20,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x73, - 0x20,0x28,0x31,0x2d,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x6f,0x75,0x73, - 0x20,0x69,0x6e,0x64,0x65,0x78,0x65,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,0x6d,0x75,0x6c,0x74,0x69, - 0x76,0x61,0x6c,0x22,0x2c,0x20,0x22,0x61,0x72,0x72,0x61,0x79,0x22,0x29,0x2c,0x20, - 0x2d,0x2d,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x72,0x65,0x70,0x72,0x65, - 0x73,0x65,0x6e,0x74,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x72,0x75,0x6e,0x28,0x73, - 0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72, - 0x65,0x76,0x5f,0x62,0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20, - 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74, - 0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x4d,0x2e,0x73,0x74,0x65,0x70,0x5f,0x6f,0x76,0x65,0x72,0x28,0x73,0x65, - 0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65, - 0x6e,0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x22,0x6f,0x76, - 0x65,0x72,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x74,0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x65,0x70,0x5f,0x6f,0x75,0x74,0x28,0x73,0x65, - 0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65, - 0x6e,0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x22,0x6f,0x75, - 0x74,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74, - 0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x4d,0x2e,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x28,0x73,0x65, - 0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65, - 0x6e,0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x22,0x69,0x6e, - 0x74,0x6f,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x74,0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x4d,0x2e,0x65,0x76,0x61,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20, - 0x61,0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x67,0x28,0x22,0x44,0x45,0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x47,0x6f, - 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x65,0x76,0x61,0x6c,0x20,0x22,0x2e,0x2e,0x64, - 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72, - 0x65,0x73,0x75,0x6c,0x74,0x2c,0x20,0x65,0x72,0x72,0x2c,0x20,0x73,0x75,0x63,0x63, - 0x65,0x73,0x73,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6e, - 0x76,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63,0x6b,0x28,0x73, - 0x65,0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x30,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,0x2c,0x20,0x74,0x72,0x79,0x20,0x74, - 0x6f,0x20,0x6c,0x6f,0x61,0x64,0x20,0x61,0x73,0x20,0x65,0x78,0x70,0x72,0x65,0x73, - 0x73,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x44,0x42,0x47,0x70, - 0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x70,0x70,0x6f,0x72, - 0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x68,0x65, - 0x72,0x65,0x2c,0x20,0x73,0x65,0x65,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x62, - 0x75,0x67,0x73,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x73,0x74,0x61,0x74,0x65,0x2e, - 0x63,0x6f,0x6d,0x2f,0x73,0x68,0x6f,0x77,0x5f,0x62,0x75,0x67,0x2e,0x63,0x67,0x69, - 0x3f,0x69,0x64,0x3d,0x38,0x31,0x31,0x37,0x38,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20, - 0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x22,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x22,0x2e,0x2e,0x64,0x61,0x74,0x61,0x2c,0x20,0x65,0x6e,0x76, - 0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x66,0x20,0x69,0x74,0x20, - 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x61,0x6e,0x20,0x65,0x78,0x70,0x72,0x65,0x73, - 0x73,0x69,0x6f,0x6e,0x2c,0x20,0x74,0x72,0x79,0x20,0x61,0x73,0x20,0x73,0x74,0x61, - 0x74,0x65,0x6d,0x65,0x6e,0x74,0x20,0x28,0x61,0x73,0x73,0x69,0x67,0x6e,0x6d,0x65, - 0x6e,0x74,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6e,0x6f,0x74,0x20,0x66,0x75,0x6e,0x63,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x2c,0x20,0x65,0x72,0x72,0x20, - 0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x64,0x61, - 0x74,0x61,0x2c,0x20,0x65,0x6e,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x75,0x6e,0x63,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x63,0x63,0x65, - 0x73,0x73,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x70,0x63,0x61, - 0x6c,0x6c,0x28,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69, - 0x6f,0x6e,0x2e,0x4d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x28,0x66,0x75,0x6e,0x63, - 0x28,0x29,0x29,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x72,0x65,0x73,0x75,0x6c, - 0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73, - 0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x65,0x76,0x61,0x6c, - 0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69, - 0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x65,0x72,0x72,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x6e,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x3d,0x20,0x72,0x65,0x73,0x75, - 0x6c,0x74,0x2e,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6e,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x3d,0x3d,0x20,0x31,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x72,0x65,0x73,0x75, - 0x6c,0x74,0x5b,0x31,0x5d,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x74,0x6f,0x72,0x65,0x20,0x72,0x65,0x73,0x75, - 0x6c,0x74,0x20,0x66,0x6f,0x72,0x20,0x66,0x75,0x72,0x74,0x68,0x65,0x72,0x20,0x75, - 0x73,0x65,0x20,0x28,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a, - 0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x6f, - 0x70,0x74,0x69,0x6d,0x69,0x7a,0x65,0x64,0x3a,0x20,0x74,0x68,0x69,0x73,0x20,0x69, - 0x73,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x75,0x73,0x65,0x64,0x20,0x66,0x6f,0x72,0x20, - 0x45,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x20,0x76,0x69,0x65,0x77, - 0x20,0x61,0x6e,0x64,0x20,0x74,0x6f,0x74,0x61,0x6c,0x6c,0x79,0x20,0x75,0x73,0x65, - 0x6c,0x65,0x73,0x73,0x20,0x66,0x6f,0x72,0x20,0x69,0x6e,0x74,0x65,0x72,0x61,0x63, - 0x74,0x69,0x76,0x65,0x20,0x63,0x6f,0x6e,0x73,0x6f,0x6c,0x65,0x2c,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73, - 0x6f,0x20,0x73,0x74,0x6f,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x73,0x75,0x6c,0x74, - 0x20,0x6f,0x72,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65, - 0x20,0x73,0x65,0x74,0x20,0x62,0x79,0x20,0x61,0x6e,0x20,0x61,0x72,0x67,0x75,0x6d, - 0x65,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x69,0x64,0x78,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x6e,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x3e,0x20,0x30,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x3d,0x20,0x65,0x6e,0x76, - 0x5b,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74, - 0x5b,0x2d,0x31,0x5d,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x64,0x78,0x20,0x3d,0x20,0x23,0x63,0x61,0x63,0x68,0x65,0x20,0x2b, - 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63, - 0x61,0x63,0x68,0x65,0x5b,0x69,0x64,0x78,0x5d,0x20,0x3d,0x20,0x72,0x65,0x73,0x75, - 0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x41,0x73,0x20,0x6f,0x66, - 0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x2c,0x20,0x74,0x68,0x65,0x20,0x6d,0x61, - 0x78,0x69,0x6d,0x75,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x73,0x69,0x7a,0x65, - 0x20,0x28,0x61,0x6e,0x64,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x63,0x6f,0x75, - 0x6e,0x74,0x29,0x20,0x69,0x73,0x20,0x38,0x30,0x30,0x30,0x2c,0x20,0x74,0x68,0x69, - 0x73,0x20,0x6c,0x69,0x6d,0x69,0x74,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20, - 0x74,0x6f,0x20,0x66,0x69,0x74,0x20,0x61,0x6c,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c, - 0x74,0x73,0x20,0x69,0x6e,0x20,0x6f,0x6e,0x65,0x20,0x70,0x61,0x67,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x5b, - 0x31,0x5d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69, - 0x6f,0x6e,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79, - 0x28,0x2d,0x31,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x2c,0x20,0x69,0x64,0x78, - 0x20,0x6f,0x72,0x20,0x22,0x22,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x31,0x2c,0x20, - 0x38,0x30,0x30,0x30,0x2c,0x20,0x30,0x2c,0x20,0x6e,0x69,0x6c,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61, - 0x74,0x74,0x72,0x2e,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x0a, - 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x73, - 0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x5b,0x31,0x5d,0x20,0x3d, - 0x20,0x64,0x62,0x67,0x70,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f,0x72, - 0x28,0x32,0x30,0x36,0x2c,0x20,0x65,0x72,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64, - 0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x72, - 0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f, - 0x69,0x6e,0x74,0x5f,0x73,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72, - 0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20, - 0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73, - 0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x73,0x5b, - 0x61,0x72,0x67,0x73,0x2e,0x6f,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67, - 0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x32,0x30,0x30,0x2c,0x20,0x22,0x49,0x6e, - 0x76,0x61,0x6c,0x69,0x64,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74, - 0x69,0x6f,0x6e,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x3a,0x20,0x22,0x2e, - 0x2e,0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x2c, - 0x20,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x66, - 0x2c,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e, - 0x6e,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x69,0x66,0x20,0x69,0x74,0x20,0x69, - 0x73,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74, - 0x20,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x20,0x70,0x61,0x74,0x68,0x2c,0x20,0x69, - 0x67,0x6e,0x6f,0x72,0x65,0x20,0x74,0x68,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70, - 0x6f,0x69,0x6e,0x74,0x5f,0x73,0x65,0x74,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64, - 0x2c,0x20,0x73,0x65,0x6e,0x64,0x20,0x65,0x6d,0x70,0x74,0x79,0x20,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x20,0x74,0x6f,0x20,0x61,0x76,0x6f,0x69,0x64,0x20,0x62, - 0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x20,0x28,0x61,0x64,0x64,0x20,0x62,0x79,0x20, - 0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e, - 0x6f,0x74,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x3a,0x66,0x69,0x6e,0x64, - 0x28,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64, - 0x69,0x72,0x2c,0x31,0x2c,0x74,0x72,0x75,0x65,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e, - 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20, - 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73, - 0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d, - 0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69, - 0x6e,0x74,0x5f,0x73,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63, - 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69, - 0x7d,0x20,0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d, - 0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x79,0x70,0x65,0x20, - 0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x74,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x73, - 0x20,0x6f,0x72,0x20,0x22,0x65,0x6e,0x61,0x62,0x6c,0x65,0x64,0x22,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x65,0x6d,0x70,0x6f,0x72,0x61,0x72,0x79, - 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x72,0x20,0x3d,0x3d,0x20,0x22,0x31,0x22, - 0x2c,0x20,0x2d,0x2d,0x20,0x22,0x30,0x22,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20, - 0x6d,0x61,0x6b,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x70,0x65, - 0x72,0x74,0x79,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x20,0x3d,0x20,0x30,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d, - 0x65,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x2c,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x6c, - 0x69,0x6e,0x65,0x6e,0x6f,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68, - 0x69,0x74,0x5f,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d, - 0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x68,0x20,0x6f,0x72,0x20,0x30,0x29, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f, - 0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f, - 0x20,0x6f,0x72,0x20,0x22,0x3e,0x3d,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,0x73,0x2e,0x74,0x20,0x3d, - 0x3d,0x20,0x22,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x22,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e, - 0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x64,0x61,0x74, - 0x61,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65, - 0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x63, - 0x6f,0x6d,0x70,0x69,0x6c,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x6f,0x6e,0x63, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e,0x63,0x6f,0x6e, - 0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e,0x61,0x73, - 0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x37,0x2c,0x20,0x6c,0x6f,0x61,0x64,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x28,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x22,0x20, - 0x2e,0x2e,0x20,0x64,0x61,0x74,0x61,0x20,0x2e,0x2e,0x20,0x22,0x29,0x22,0x29,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x61,0x72,0x67,0x73, - 0x2e,0x74,0x20,0x7e,0x3d,0x20,0x22,0x6c,0x69,0x6e,0x65,0x22,0x20,0x74,0x68,0x65, - 0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x32,0x30,0x31, - 0x2c,0x20,0x22,0x42,0x50,0x20,0x74,0x79,0x70,0x65,0x20,0x22,0x20,0x2e,0x2e,0x20, - 0x61,0x72,0x67,0x73,0x2e,0x74,0x20,0x2e,0x2e,0x20,0x22,0x20,0x6e,0x6f,0x74,0x20, - 0x79,0x65,0x74,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x65,0x64,0x22,0x29,0x20, - 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62, - 0x70,0x69,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b, - 0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x62,0x70, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f, - 0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20, - 0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22, - 0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61, - 0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74, - 0x5f,0x73,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69, - 0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x20, - 0x73,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x62,0x70,0x2e,0x73,0x74,0x61,0x74,0x65, - 0x2c,0x20,0x69,0x64,0x20,0x3d,0x20,0x62,0x70,0x69,0x64,0x20,0x7d,0x20,0x7d,0x20, - 0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x67,0x65,0x74, - 0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73, - 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d, - 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x20, - 0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62, - 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x67,0x65,0x74,0x22,0x2c,0x20, - 0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d, - 0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x61,0x73, - 0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x35,0x2c,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62, - 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x65,0x74,0x5f,0x78, - 0x6d,0x6c,0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73, - 0x2e,0x64,0x29,0x29,0x29,0x20,0x7d,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f, - 0x69,0x6e,0x74,0x5f,0x6c,0x69,0x73,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61, - 0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62, - 0x70,0x73,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65, - 0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20, - 0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65, - 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x6c,0x69,0x73,0x74,0x22,0x2c,0x20,0x74, - 0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20, - 0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66, - 0x6f,0x72,0x20,0x69,0x64,0x2c,0x20,0x62,0x70,0x20,0x69,0x6e,0x20,0x70,0x61,0x69, - 0x72,0x73,0x28,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69, - 0x6e,0x74,0x73,0x2e,0x67,0x65,0x74,0x28,0x29,0x29,0x20,0x64,0x6f,0x20,0x62,0x70, - 0x73,0x5b,0x23,0x62,0x70,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x63,0x6f, - 0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67, - 0x65,0x74,0x5f,0x78,0x6d,0x6c,0x28,0x69,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c, - 0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x62,0x70,0x73,0x29,0x0a, - 0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e, - 0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x75,0x70,0x64,0x61,0x74, - 0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d,0x20,0x63,0x6f,0x72, - 0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x65, - 0x74,0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e, - 0x64,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x62, - 0x70,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f, - 0x72,0x28,0x32,0x30,0x35,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20, - 0x62,0x72,0x65,0x61,0x6b,0x70,0x69,0x6e,0x74,0x20,0x22,0x2e,0x2e,0x61,0x72,0x67, - 0x73,0x2e,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x61,0x72,0x67,0x73,0x2e,0x6f,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x63, - 0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e, - 0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x73,0x5b,0x61, - 0x72,0x67,0x73,0x2e,0x6f,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70, - 0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x32,0x30,0x30,0x2c,0x20,0x22,0x49,0x6e,0x76, - 0x61,0x6c,0x69,0x64,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69, - 0x6f,0x6e,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x3a,0x20,0x22,0x2e,0x2e, - 0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x3d, - 0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e, - 0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f, - 0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f, - 0x69,0x6e,0x74,0x5f,0x75,0x70,0x64,0x61,0x74,0x65,0x22,0x2c,0x20,0x74,0x72,0x61, - 0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72, - 0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x6e,0x65,0x65,0x64,0x55,0x70,0x64,0x61,0x74,0x65,0x20,0x3d,0x20, - 0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x62,0x70,0x2e,0x6c,0x69,0x6e, - 0x65,0x6e,0x6f,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x6f,0x6e,0x75,0x6d, - 0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x6e,0x29,0x20,0x7e,0x3d,0x20,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x62,0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e, - 0x6f,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6e,0x65,0x65,0x64,0x55,0x70,0x64,0x61,0x74,0x65,0x20,0x3d,0x20,0x74,0x72,0x75, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x62,0x70, - 0x2e,0x73,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x73,0x20, - 0x6f,0x72,0x20,0x62,0x70,0x2e,0x73,0x74,0x61,0x74,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x62,0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75, - 0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x6e,0x20,0x6f,0x72,0x20,0x62, - 0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x62,0x70, - 0x2e,0x68,0x69,0x74,0x5f,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x74,0x6f,0x6e, - 0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x68,0x20,0x6f,0x72,0x20, - 0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69, - 0x6f,0x6e,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,0x20,0x6f,0x72,0x20,0x62, - 0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x65,0x65,0x64,0x55,0x70,0x64,0x61,0x74, - 0x65,0x20,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73, - 0x2e,0x75,0x70,0x64,0x61,0x74,0x65,0x28,0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65,0x2c, - 0x20,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73, - 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73, - 0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x72,0x65, - 0x6d,0x6f,0x76,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f, - 0x6e,0x73,0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72, - 0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d, - 0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72, - 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x72,0x65,0x6d,0x6f,0x76,0x65,0x22, - 0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64, - 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x61,0x72,0x67,0x73,0x2e,0x64,0x20,0x6d,0x61,0x79,0x20, - 0x62,0x65,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x62,0x65,0x63,0x61,0x75,0x73,0x65,0x20, - 0x74,0x68,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x64, - 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x6c,0x6f,0x6e,0x67,0x20,0x74, - 0x6f,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x70,0x72,0x6f,0x6a,0x65,0x63, - 0x74,0x20,0x28,0x61,0x64,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,0x73,0x2e,0x64,0x20, - 0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65, - 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28, - 0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x64,0x29, - 0x29,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f, - 0x72,0x28,0x32,0x30,0x35,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20, - 0x62,0x72,0x65,0x61,0x6b,0x70,0x69,0x6e,0x74,0x20,0x22,0x2e,0x2e,0x61,0x72,0x67, - 0x73,0x2e,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67, - 0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e, - 0x73,0x6b,0x74,0x2c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x29,0x0a,0x65, - 0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x73, - 0x74,0x61,0x63,0x6b,0x5f,0x64,0x65,0x70,0x74,0x68,0x28,0x73,0x65,0x6c,0x66,0x2c, - 0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20, - 0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20, - 0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x30,0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e, - 0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72, - 0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x6c,0x65,0x76,0x65,0x6c,0x2c, - 0x20,0x22,0x53,0x74,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x65,0x6e,0x64, - 0x20,0x6f,0x66,0x20,0x73,0x74,0x61,0x63,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65,0x70,0x74,0x68,0x20, - 0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69, - 0x6e,0x66,0x6f,0x2e,0x69,0x73,0x74,0x61,0x69,0x6c,0x63,0x61,0x6c,0x6c,0x20,0x74, - 0x68,0x65,0x6e,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65,0x70,0x74, - 0x68,0x20,0x2b,0x20,0x31,0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x61,0x20,0x27, - 0x66,0x61,0x6b,0x65,0x27,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x69,0x73,0x20,0x61, - 0x64,0x64,0x65,0x64,0x20,0x69,0x6e,0x20,0x74,0x68,0x61,0x74,0x20,0x63,0x61,0x73, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66, - 0x6f,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22, - 0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x20, - 0x2d,0x2d,0x20,0x6c,0x65,0x76,0x65,0x6c,0x73,0x20,0x62,0x65,0x6c,0x6f,0x77,0x20, - 0x6d,0x61,0x69,0x6e,0x20,0x63,0x68,0x75,0x6e,0x6b,0x20,0x61,0x72,0x65,0x20,0x6e, - 0x6f,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x69,0x6e,0x67,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e, - 0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b, - 0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70, - 0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20, - 0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x63,0x6b, - 0x5f,0x64,0x65,0x70,0x74,0x68,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63, - 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69, - 0x2c,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65,0x70,0x74,0x68,0x7d, - 0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x61,0x63,0x6b,0x5f,0x67,0x65,0x74,0x28,0x73, - 0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x20,0x2d,0x2d,0x20,0x54,0x4f, - 0x44,0x4f,0x3a,0x20,0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x63,0x6f,0x64,0x65, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x20, - 0x55,0x52,0x49,0x73,0x20,0x74,0x6f,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x79, - 0x20,0x75,0x6e,0x72,0x65,0x61,0x63,0x68,0x61,0x62,0x6c,0x65,0x20,0x73,0x74,0x61, - 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x73,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x77,0x68,0x61,0x74,0x32,0x75,0x72,0x69,0x20,0x3d,0x20,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x69,0x6c,0x20,0x3d,0x20, - 0x22,0x74,0x61,0x69,0x6c,0x72,0x65,0x74,0x75,0x72,0x6e,0x3a,0x2f,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x43,0x20,0x20,0x20,0x20,0x3d,0x20,0x22, - 0x63,0x63,0x6f,0x64,0x65,0x3a,0x2f,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x69, - 0x6e,0x66,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d, - 0x20,0x7b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x6c,0x65,0x76,0x65,0x6c, - 0x2c,0x20,0x77,0x68,0x65,0x72,0x65,0x20,0x3d,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x6e, - 0x61,0x6d,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x66,0x69,0x6c,0x65,0x22, - 0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e, - 0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75, - 0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x75,0x72,0x69,0x20,0x61,0x6e,0x64,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x63,0x75,0x72, - 0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d, - 0x20,0x72,0x65,0x61,0x63,0x68,0x61,0x62,0x6c,0x65,0x20,0x6c,0x65,0x76,0x65,0x6c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74, - 0x72,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x75,0x72,0x69, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74, - 0x72,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x69,0x6e,0x66,0x6f,0x2e, - 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61, - 0x6d,0x65,0x20,0x3d,0x20,0x77,0x68,0x61,0x74,0x32,0x75,0x72,0x69,0x5b,0x69,0x6e, - 0x66,0x6f,0x2e,0x77,0x68,0x61,0x74,0x5d,0x20,0x6f,0x72,0x20,0x22,0x75,0x6e,0x6b, - 0x6e,0x6f,0x77,0x6e,0x3a,0x2f,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20, - 0x3d,0x20,0x2d,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x63,0x6b,0x22,0x2c, - 0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x20,0x7d,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x6e,0x6f,0x64,0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d, - 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74, - 0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20, - 0x22,0x73,0x74,0x61,0x63,0x6b,0x5f,0x67,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x61, - 0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72, - 0x67,0x73,0x2e,0x69,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72, - 0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67, - 0x73,0x2e,0x6f,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67, - 0x73,0x2e,0x64,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76, - 0x65,0x6c,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72, - 0x67,0x73,0x2e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6e,0x6f, - 0x64,0x65,0x5b,0x23,0x6e,0x6f,0x64,0x65,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x6d,0x61, - 0x6b,0x65,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65, - 0x74,0x69,0x6e,0x66,0x6f,0x28,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65, - 0x6c,0x2c,0x20,0x22,0x6e,0x53,0x6c,0x22,0x29,0x2c,0x20,0x73,0x74,0x61,0x63,0x6b, - 0x5f,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x30, - 0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74, - 0x69,0x6e,0x66,0x6f,0x28,0x69,0x2c,0x20,0x22,0x6e,0x53,0x6c,0x74,0x22,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e, - 0x6f,0x74,0x20,0x69,0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65, - 0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6e,0x6f,0x64,0x65,0x5b,0x23,0x6e,0x6f,0x64,0x65,0x2b,0x31,0x5d, - 0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x69,0x6e, - 0x66,0x6f,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x64,0x64,0x20,0x61,0x20,0x66,0x61,0x6b,0x65, - 0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x6f,0x66,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, - 0x66,0x6f,0x72,0x20,0x74,0x61,0x69,0x6c,0x20,0x63,0x61,0x6c,0x6c,0x73,0x20,0x28, - 0x74,0x65,0x6c,0x6c,0x73,0x20,0x75,0x73,0x65,0x72,0x20,0x74,0x68,0x61,0x74,0x20, - 0x74,0x68,0x65,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68,0x61,0x73, - 0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x65,0x6e,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64, - 0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6c,0x79,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x69, - 0x73,0x74,0x61,0x69,0x6c,0x63,0x61,0x6c,0x6c,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6e, - 0x6f,0x64,0x65,0x5b,0x23,0x6e,0x6f,0x64,0x65,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x7b, - 0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x63,0x6b,0x22,0x2c,0x20, - 0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3d,0x69, - 0x2c,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x66,0x69,0x6c,0x65,0x22,0x2c,0x20,0x66, - 0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x74,0x61,0x69,0x6c,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x3a,0x2f,0x22,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x3d,0x2d, - 0x31,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d, - 0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72, - 0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x6c,0x65,0x76,0x65,0x6c, - 0x73,0x20,0x62,0x65,0x6c,0x6f,0x77,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x68,0x75, - 0x6e,0x6b,0x20,0x61,0x72,0x65,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x74,0x65,0x72, - 0x65,0x73,0x74,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65, - 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x6e,0x6f,0x64,0x65,0x29,0x0a,0x65,0x6e, - 0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x4c,0x69,0x73,0x74,0x73,0x20,0x61,0x6c,0x6c, - 0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61, - 0x20,0x6c,0x69,0x73,0x74,0x20,0x6f,0x66,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x20, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x77,0x69,0x74,0x68,0x20, - 0x74,0x68,0x65,0x69,0x72,0x20,0x69,0x64,0x20,0x28,0x61,0x6e,0x20,0x61,0x72,0x62, - 0x69,0x74,0x72,0x61,0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x74, - 0x6f,0x20,0x71,0x75,0x65,0x72,0x79,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x61,0x6e, - 0x64,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x2e,0x20,0x54,0x68, - 0x65,0x20,0x69,0x64,0x20,0x69,0x73,0x0a,0x2d,0x2d,0x20,0x67,0x75,0x61,0x72,0x61, - 0x6e,0x74,0x65,0x65,0x64,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x75,0x6e,0x69,0x71, - 0x75,0x65,0x20,0x61,0x6e,0x64,0x20,0x73,0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f, - 0x72,0x20,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20, - 0x6c,0x69,0x66,0x65,0x20,0x28,0x74,0x68,0x65,0x79,0x20,0x63,0x61,0x6e,0x20,0x62, - 0x65,0x20,0x72,0x65,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x6c,0x6f,0x6e,0x67, - 0x20,0x61,0x73,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x65,0x78, - 0x69,0x73,0x74,0x73,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x4f,0x74,0x68,0x65,0x72,0x73, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x73,0x75,0x63,0x68,0x20,0x61, - 0x73,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x67,0x65,0x74,0x20,0x6f,0x72,0x20,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e, - 0x64,0x73,0x20,0x74,0x61,0x6b,0x65,0x73,0x20,0x61,0x6e,0x20,0x61,0x64,0x64,0x69, - 0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x2d,0x6f,0x20,0x73,0x77,0x69,0x74,0x63,0x68, - 0x20,0x74,0x6f,0x20,0x71,0x75,0x65,0x72,0x79,0x20,0x61,0x20,0x70,0x61,0x72,0x74, - 0x69,0x63,0x75,0x6c,0x61,0x72,0x20,0x63,0x4f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x66,0x20,0x74,0x68,0x65,0x20,0x73,0x77,0x69,0x74, - 0x63,0x68,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x67,0x69,0x76,0x65,0x6e,0x2c, - 0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69, - 0x6e,0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x2e, - 0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x20,0x63,0x61,0x73,0x65,0x20,0x6f,0x66,0x20,0x65, - 0x72,0x72,0x6f,0x72,0x20,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x73,0x20,0x28,0x6d,0x6f,0x73,0x74,0x20,0x6c,0x69,0x6b,0x65,0x6c,0x79,0x20, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f, - 0x75,0x6e,0x64,0x20,0x6f,0x72,0x20,0x64,0x65,0x61,0x64,0x29,0x2c,0x20,0x61,0x6e, - 0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x33,0x39,0x39,0x20,0x69,0x73,0x20,0x74,0x68, - 0x72,0x6f,0x77,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x4e,0x6f,0x74,0x65,0x20,0x74,0x68, - 0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x69,0x6d,0x70,0x6f,0x72,0x74, - 0x61,0x6e,0x74,0x20,0x6c,0x69,0x6d,0x69,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x64, - 0x75,0x65,0x20,0x74,0x6f,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20,0x63,0x6f, - 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e, - 0x74,0x61,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x79,0x6f,0x75,0x20,0x63,0x61,0x6e,0x6e, - 0x6f,0x74,0x20,0x71,0x75,0x65,0x72,0x79,0x20,0x6d,0x61,0x69,0x6e,0x20,0x22,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x22,0x20,0x66,0x72,0x6f,0x6d,0x0a,0x2d, - 0x2d,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x6f,0x6e,0x65,0x2c,0x20,0x73, - 0x6f,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x65,0x64,0x20,0x6c,0x69,0x73,0x74,0x20,0x28,0x74,0x68,0x69,0x73,0x20,0x77, - 0x69,0x6c,0x6c,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x20,0x77,0x69,0x74,0x68,0x20, - 0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x29,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20, - 0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x20,0x6e,0x6f,0x6e,0x2d,0x73,0x74, - 0x61,0x6e,0x64,0x61,0x72,0x64,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x2e,0x20, - 0x54,0x68,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x65,0x64,0x20,0x58,0x4d,0x4c, - 0x20,0x68,0x61,0x73,0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x69, - 0x6e,0x67,0x20,0x73,0x74,0x72,0x75,0x63,0x75,0x74,0x75,0x72,0x65,0x3a,0x0a,0x2d, - 0x2d,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20, - 0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x3d,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69, - 0x6e,0x65,0x5f,0x6c,0x69,0x73,0x74,0x22,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63, - 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x3d,0x22,0x30,0x22,0x3e,0x0a,0x2d,0x2d,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x3c,0x73,0x6f,0x6d,0x65,0x20,0x70,0x72,0x69, - 0x6e,0x74,0x74,0x61,0x62,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x3e,0x22,0x20,0x69, - 0x64,0x3d,0x22,0x3c,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x64, - 0x3e,0x22,0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x3d,0x22,0x30,0x7c,0x31,0x22, - 0x20,0x2f,0x3e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2e,0x2e,0x2e, - 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x65,0x73,0x70,0x6f,0x6e, - 0x73,0x65,0x3e,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x5f,0x6c,0x69,0x73,0x74,0x28,0x73,0x65, - 0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x3d,0x20,0x73,0x65, - 0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d,0x0a,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20, - 0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f, - 0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63, - 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74, - 0x69,0x6e,0x65,0x5f,0x6c,0x69,0x73,0x74,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73, - 0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73, - 0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x73, - 0x20,0x61,0x6e,0x79,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f, - 0x6e,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x20,0x77,0x69,0x6c,0x6c,0x20,0x66,0x61,0x69,0x6c,0x2c,0x20,0x69,0x74,0x20,0x69, - 0x73,0x20,0x6e,0x6f,0x74,0x20,0x79,0x65,0x74,0x20,0x6c,0x69,0x73,0x74,0x65,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x73,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d, - 0x20,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x22,0x2c,0x20,0x61,0x74, - 0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x69,0x64,0x20,0x3d,0x20,0x30,0x2c,0x20,0x6e, - 0x61,0x6d,0x65,0x20,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x2c,0x20,0x72,0x75, - 0x6e,0x6e,0x69,0x6e,0x67,0x20,0x3d,0x20,0x28,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67, - 0x20,0x3d,0x3d,0x20,0x6e,0x69,0x6c,0x29,0x20,0x61,0x6e,0x64,0x20,0x22,0x31,0x22, - 0x20,0x6f,0x72,0x20,0x22,0x30,0x22,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20, - 0x66,0x6f,0x72,0x20,0x69,0x64,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x69,0x6e,0x20, - 0x70,0x61,0x69,0x72,0x73,0x28,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76, - 0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f, - 0x6d,0x5f,0x69,0x64,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x69,0x64,0x20,0x7e,0x3d,0x20,0x22,0x6e,0x22,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x5b,0x23,0x63,0x6f,0x72,0x6f,0x75, - 0x74,0x69,0x6e,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x74, - 0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x22, - 0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x69,0x64,0x20,0x3d,0x20, - 0x69,0x64,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x63,0x6f,0x72,0x6f,0x29,0x2c,0x20,0x72,0x75,0x6e,0x6e,0x69, - 0x6e,0x67,0x20,0x3d,0x20,0x28,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x3d,0x20,0x72,0x75, - 0x6e,0x6e,0x69,0x6e,0x67,0x29,0x20,0x61,0x6e,0x64,0x20,0x22,0x31,0x22,0x20,0x6f, - 0x72,0x20,0x22,0x30,0x22,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28, - 0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74, - 0x69,0x6e,0x65,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x6e,0x61, - 0x6d,0x65,0x73,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d, - 0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73, - 0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x64,0x20,0x6f, - 0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69, - 0x6e,0x66,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e, - 0x66,0x6f,0x28,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x22,0x66,0x22,0x29,0x20,0x6f, - 0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x33,0x30,0x31, - 0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x73,0x74,0x61,0x63,0x6b, - 0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x20, - 0x61,0x72,0x65,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x70,0x61,0x73,0x73,0x65, - 0x64,0x2c,0x20,0x65,0x76,0x65,0x6e,0x20,0x69,0x66,0x20,0x65,0x6d,0x70,0x74,0x79, - 0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x68,0x6f,0x77,0x20,0x44,0x4c, - 0x54,0x4b,0x20,0x65,0x78,0x70,0x65,0x63,0x74,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78, - 0x74,0x2c,0x20,0x77,0x68,0x61,0x74,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6f,0x74, - 0x68,0x65,0x72,0x73,0x20,0x3f,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74, - 0x65,0x78,0x74,0x5f,0x6e,0x61,0x6d,0x65,0x73,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e, - 0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67, - 0x73,0x2e,0x69,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b, - 0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x22, - 0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d,0x65,0x20, - 0x3d,0x20,0x22,0x4c,0x6f,0x63,0x61,0x6c,0x22,0x2c,0x20,0x20,0x20,0x69,0x64,0x20, - 0x3d,0x20,0x30,0x20,0x7d,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74,0x65,0x78, - 0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d, - 0x65,0x20,0x3d,0x20,0x22,0x55,0x70,0x76,0x61,0x6c,0x75,0x65,0x22,0x2c,0x20,0x69, - 0x64,0x20,0x3d,0x20,0x32,0x20,0x7d,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74, - 0x65,0x78,0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6e, - 0x61,0x6d,0x65,0x20,0x3d,0x20,0x22,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x22,0x2c,0x20, - 0x20,0x69,0x64,0x20,0x3d,0x20,0x31,0x20,0x7d,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x7d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e, - 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20, - 0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78, - 0x74,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f, - 0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61, - 0x72,0x67,0x73,0x2e,0x63,0x20,0x6f,0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63, - 0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5b,0x63, - 0x78,0x74,0x5f,0x6e,0x75,0x6d,0x5d,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e, - 0x65,0x72,0x72,0x6f,0x72,0x28,0x33,0x30,0x32,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73, - 0x75,0x63,0x68,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x3a,0x20,0x22,0x2e,0x2e, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d, - 0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76, - 0x65,0x6c,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72, - 0x67,0x73,0x2e,0x64,0x20,0x6f,0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20, - 0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x63,0x78,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61, - 0x63,0x6b,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x65, - 0x72,0x74,0x69,0x65,0x73,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20, - 0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72, - 0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22, - 0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x67,0x65,0x74,0x22,0x2c,0x20,0x74,0x72, - 0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61, - 0x72,0x67,0x73,0x2e,0x69,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d, - 0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x69,0x74,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x76,0x65, - 0x72,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x69,0x73,0x20,0x64,0x69,0x66,0x66, - 0x65,0x72,0x65,0x6e,0x74,0x20,0x28,0x74,0x68,0x69,0x73,0x20,0x63,0x6f,0x75,0x6c, - 0x64,0x20,0x62,0x65,0x20,0x75,0x6e,0x69,0x66,0x69,0x65,0x64,0x20,0x69,0x6e,0x20, - 0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x20,0x74,0x68,0x61,0x6e,0x6b,0x73,0x20,0x74, - 0x6f,0x20,0x5f,0x5f,0x70,0x61,0x69,0x72,0x73,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65, - 0x74,0x68,0x6f,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6e,0x61, - 0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x20,0x69,0x6e,0x20,0x28,0x63,0x78,0x74,0x5f, - 0x6e,0x75,0x6d,0x20,0x3d,0x3d,0x20,0x31,0x20,0x61,0x6e,0x64,0x20,0x6e,0x65,0x78, - 0x74,0x20,0x6f,0x72,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c, - 0x65,0x28,0x63,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f,0x69,0x64,0x5d,0x29,0x2e,0x69, - 0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x29,0x2c,0x20,0x63,0x78,0x74,0x5b,0x63,0x78, - 0x74,0x5f,0x69,0x64,0x5d,0x2c,0x20,0x6e,0x69,0x6c,0x20,0x64,0x6f,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47, - 0x70,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20, - 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6c,0x65,0x61,0x72,0x20,0x61,0x62,0x6f, - 0x75,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x6f,0x66,0x20, - 0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x67,0x65,0x74,0x2c,0x20,0x62, - 0x75,0x74,0x20,0x61,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x76,0x65,0x20,0x67, - 0x65,0x74,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x2a,0x72,0x65,0x61, - 0x6c,0x6c,0x79,0x2a,0x20,0x73,0x6c,0x6f,0x77,0x20,0x69,0x6e,0x20,0x4c,0x75,0x61, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x69,0x65,0x73,0x5b,0x23,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x20, - 0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63, - 0x74,0x69,0x6f,0x6e,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72,0x6f,0x70,0x65,0x72, - 0x74,0x79,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x2c,0x20,0x76,0x61,0x6c,0x2c, - 0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x30,0x2c,0x20,0x75, - 0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x2e,0x6d,0x61,0x78, - 0x5f,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x2c,0x20,0x30,0x2c,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x2e, - 0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x2c,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75, - 0x6d,0x20,0x7e,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78, - 0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x70,0x72,0x6f, - 0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d, - 0x20,0x20,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x20,0x63,0x6f,0x6d, - 0x6d,0x61,0x6e,0x64,0x73,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x69,0x73,0x20,0x69,0x6e, - 0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74, - 0x20,0x69,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x70,0x72,0x6f,0x70,0x65,0x72, - 0x74,0x69,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x67,0x65,0x74,0x20,0x6f,0x72,0x20, - 0x73,0x65,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x74,0x20,0x6e,0x6f,0x74,0x61,0x62, - 0x6c,0x79,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x20,0x61,0x20,0x63,0x6f,0x6c, - 0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x70,0x72,0x6f,0x78,0x79, - 0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x68,0x61,0x6e, - 0x64,0x6c,0x65,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x65, - 0x6c,0x79,0x20,0x67,0x65,0x74,0x2f,0x73,0x65,0x74,0x20,0x6f,0x70,0x65,0x72,0x61, - 0x74,0x69,0x6f,0x6e,0x73,0x20,0x6f,0x6e,0x20,0x73,0x70,0x65,0x63,0x69,0x61,0x6c, - 0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x74, - 0x68,0x65,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x6f,0x66,0x20,0x63,0x6f,0x6d,0x70, - 0x6c,0x65,0x78,0x20,0x6b,0x65,0x79,0x73,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61,0x74, - 0x69,0x6f,0x6e,0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20, - 0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68, - 0x65,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f, - 0x6e,0x2e,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x73,0x65,0x74, - 0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78, - 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66, - 0x2c,0x20,0x74,0x62,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65, - 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x74,0x62,0x6c,0x29,0x20, - 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x6e, - 0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x74,0x62,0x6c,0x2c,0x20,0x6d,0x74, - 0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61, - 0x74,0x61,0x62,0x6c,0x65,0x28,0x74,0x62,0x6c,0x2c,0x20,0x6d,0x74,0x29,0x20,0x65, - 0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x75,0x74, - 0x69,0x6c,0x2e,0x65,0x76,0x61,0x6c,0x5f,0x65,0x6e,0x76,0x2c,0x0a,0x7d,0x0a,0x2d, - 0x2d,0x20,0x74,0x6f,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x74,0x6f,0x20,0x62, - 0x65,0x20,0x73,0x65,0x74,0x20,0x61,0x73,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62, - 0x6c,0x65,0x0a,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c, - 0x75,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65, - 0x6e,0x74,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x70,0x72,0x6f, - 0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e, - 0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x0a,0x0a,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x79,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x54,0x4f,0x44,0x4f,0x20,0x42,0x55,0x47, - 0x20,0x45,0x43,0x4c,0x49,0x50,0x53,0x45,0x20,0x54,0x4f,0x4f,0x4c,0x53,0x4c,0x49, - 0x4e,0x55,0x58,0x2d,0x39,0x39,0x20,0x33,0x35,0x32,0x33,0x31,0x36,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x2c, - 0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x75, - 0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28,0x61,0x72,0x67,0x73,0x2e,0x6e, - 0x29,0x3a,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x28,0x25,0x2d,0x3f,0x25,0x64, - 0x2b,0x29,0x7c,0x28,0x2e,0x2a,0x29,0x24,0x22,0x29,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62, - 0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x63,0x20,0x6f,0x72,0x20,0x63,0x78,0x74, - 0x5f,0x6e,0x75,0x6d,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x63,0x78,0x74,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74, - 0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d, - 0x5d,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28, - 0x33,0x30,0x32,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x63,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x3a,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x29,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x64,0x20,0x6f, - 0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63, - 0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74, - 0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69,0x7a,0x65, - 0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73, - 0x2e,0x6d,0x20,0x6f,0x72,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75, - 0x72,0x65,0x73,0x2e,0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x73,0x69,0x7a,0x65,0x20,0x3c,0x20,0x30,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e, - 0x64,0x20,0x2d,0x2d,0x20,0x63,0x61,0x6c,0x6c,0x20,0x66,0x72,0x6f,0x6d,0x20,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x67,0x65,0x20,0x3d,0x20,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x70,0x20,0x6f, - 0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63, - 0x78,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63,0x6b,0x28, - 0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x68,0x75,0x6e,0x6b,0x20,0x3d,0x20,0x64, - 0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c,0x20, - 0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x22,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x22,0x2e,0x2e,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x70,0x72,0x6f, - 0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e, - 0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x29,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20, - 0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x64,0x62,0x67,0x70,0x2e,0x61, - 0x73,0x73,0x65,0x72,0x74,0x28,0x33,0x30,0x30,0x2c,0x20,0x70,0x63,0x61,0x6c,0x6c, - 0x28,0x63,0x68,0x75,0x6e,0x6b,0x2c,0x20,0x63,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f, - 0x69,0x64,0x5d,0x29,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72, - 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x2c, - 0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6e,0x61,0x6d, - 0x65,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73, - 0x2e,0x6d,0x61,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x75,0x74,0x69,0x6c, - 0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x2e,0x6d,0x61,0x78,0x5f,0x63,0x68, - 0x69,0x6c,0x64,0x72,0x65,0x6e,0x2c,0x20,0x70,0x61,0x67,0x65,0x2c,0x20,0x73,0x69, - 0x7a,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6d,0x61,0x6b,0x65,0x5f, - 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20, - 0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x66,0x6c,0x61,0x67,0x20,0x73,0x70,0x65, - 0x63,0x69,0x61,0x6c,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x20,0x61, - 0x73,0x20,0x73,0x75,0x63,0x68,0x20,0x77,0x68,0x65,0x6e,0x20,0x74,0x68,0x65,0x79, - 0x20,0x61,0x72,0x65,0x20,0x61,0x74,0x20,0x72,0x6f,0x6f,0x74,0x20,0x6f,0x66,0x20, - 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65, - 0x73,0x20,0x71,0x75,0x65,0x72,0x69,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x69,0x6e, - 0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x72,0x6d,0x20,0x22,0x3c,0x70,0x72,0x6f,0x78, - 0x79,0x20,0x6e,0x61,0x6d,0x65,0x3e,0x5b,0x28,0x2e,0x2e,0x2e,0x29,0x5b,0x61,0x5d, - 0x5b,0x62,0x5d,0x3c,0x2e,0x2e,0x2e,0x3e,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x73,0x75,0x63,0x68,0x20,0x70,0x61,0x72, - 0x73,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x66,0x61,0x72,0x20,0x66,0x72,0x6f,0x6d, - 0x20,0x70,0x65,0x72,0x66,0x65,0x63,0x74,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6e,0x61,0x6d,0x65,0x3a,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x5b,0x25,0x77, - 0x5f,0x5d,0x2b,0x25,0x5b,0x2e,0x2d,0x25,0x62,0x5b,0x5d,0x25,0x5d,0x24,0x22,0x29, - 0x20,0x3d,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65, - 0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x74,0x79,0x70,0x65, - 0x20,0x3d,0x20,0x22,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x22,0x20,0x65,0x6e,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78, - 0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74, - 0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61, - 0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20, - 0x3d,0x20,0x22,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x67,0x65,0x74,0x22, - 0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64, - 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x65, - 0x78,0x74,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x7d,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73, - 0x70,0x6f,0x6e,0x73,0x65,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72, - 0x74,0x79,0x5f,0x76,0x61,0x6c,0x75,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61, - 0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x61,0x72,0x67,0x73,0x2e,0x6d,0x20, - 0x3d,0x20,0x2d,0x31,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65, - 0x72,0x74,0x79,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72, - 0x67,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x73,0x65,0x74, - 0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74, - 0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74, - 0x5f,0x6e,0x75,0x6d,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x61,0x73,0x73, - 0x65,0x72,0x74,0x28,0x75,0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28,0x61, - 0x72,0x67,0x73,0x2e,0x6e,0x29,0x3a,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x28, - 0x25,0x2d,0x3f,0x25,0x64,0x2b,0x29,0x7c,0x28,0x2e,0x2a,0x29,0x24,0x22,0x29,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x63,0x20,0x6f, - 0x72,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5b,0x63,0x78, - 0x74,0x5f,0x6e,0x75,0x6d,0x5d,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65, - 0x72,0x72,0x6f,0x72,0x28,0x33,0x30,0x32,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75, - 0x63,0x68,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x3a,0x20,0x22,0x2e,0x2e,0x74, - 0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x29, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65, - 0x6c,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67, - 0x73,0x2e,0x64,0x20,0x6f,0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61, - 0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x63,0x78,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63, - 0x6b,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x65,0x20, - 0x74,0x68,0x65,0x20,0x6e,0x65,0x77,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x69,0x6e, - 0x20,0x74,0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65, - 0x78,0x74,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x76,0x61,0x6c, - 0x75,0x65,0x20,0x3d,0x20,0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x64, - 0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c,0x20, - 0x70,0x63,0x61,0x6c,0x6c,0x28,0x64,0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72, - 0x74,0x28,0x32,0x30,0x36,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64, - 0x69,0x6e,0x28,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x2e,0x2e,0x64,0x61, - 0x74,0x61,0x2c,0x20,0x63,0x78,0x74,0x29,0x29,0x29,0x29,0x29,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x68,0x75,0x6e,0x6b,0x20,0x3d,0x20, - 0x64,0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c, - 0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x6e,0x61,0x6d, - 0x65,0x20,0x2e,0x2e,0x20,0x22,0x20,0x3d,0x20,0x76,0x61,0x6c,0x75,0x65,0x22,0x2c, - 0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20, - 0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x7d,0x2c, - 0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61, - 0x74,0x69,0x6f,0x6e,0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74, - 0x29,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x61,0x73,0x73, - 0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c,0x20,0x70,0x63,0x61,0x6c,0x6c,0x28,0x63, - 0x68,0x75,0x6e,0x6b,0x2c,0x20,0x63,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f,0x69,0x64, - 0x5d,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e, - 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20, - 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73, - 0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x73,0x75,0x63, - 0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61, - 0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e, - 0x69,0x20,0x7d,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x54, - 0x4f,0x44,0x4f,0x20,0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x63,0x6f,0x64,0x65, - 0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65, - 0x20,0x44,0x42,0x47,0x70,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x61,0x74, - 0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6c,0x65,0x61,0x72, - 0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x6e,0x65,0x20, - 0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x6d,0x65,0x61,0x6e,0x69,0x6e,0x67,0x2c,0x20, - 0x74,0x68,0x69,0x73,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74, - 0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x31,0x2d,0x62,0x61,0x73,0x65,0x64,0x20,0x61, - 0x6e,0x64,0x20,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0x20,0x61,0x72,0x65,0x20,0x69, - 0x6e,0x63,0x6c,0x75,0x73,0x69,0x76,0x65,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x4d,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c, - 0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x70,0x61,0x74,0x68,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67, - 0x73,0x2e,0x66,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d, - 0x2e,0x67,0x65,0x74,0x5f,0x70,0x61,0x74,0x68,0x28,0x61,0x72,0x67,0x73,0x2e,0x66, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x63, - 0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x30,0x2c,0x20,0x22, - 0x53,0x22,0x29,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x70,0x61,0x74,0x68,0x3a,0x73, - 0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70, - 0x61,0x74,0x68,0x3a,0x73,0x75,0x62,0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c, - 0x65,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x6f,0x70,0x65,0x6e, - 0x28,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f, - 0x74,0x20,0x66,0x69,0x6c,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70, - 0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x31,0x30,0x30,0x2c,0x20,0x65,0x72,0x72,0x2c, - 0x20,0x7b,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x30,0x20,0x7d, - 0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x72,0x79, - 0x20,0x74,0x6f,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x79,0x20,0x63,0x6f,0x6d, - 0x70,0x69,0x6c,0x65,0x64,0x20,0x66,0x69,0x6c,0x65,0x73,0x0a,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x66,0x69,0x6c,0x65,0x3a,0x72,0x65,0x61,0x64,0x28,0x31,0x29,0x20, - 0x3d,0x3d,0x20,0x22,0x5c,0x30,0x33,0x33,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x64, - 0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x31,0x30,0x30,0x2c,0x20,0x61, - 0x72,0x67,0x73,0x2e,0x66,0x2e,0x2e,0x22,0x20,0x69,0x73,0x20,0x62,0x79,0x74,0x65, - 0x63,0x6f,0x64,0x65,0x22,0x2c,0x20,0x7b,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73, - 0x20,0x3d,0x20,0x30,0x20,0x7d,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x66,0x69,0x6c,0x65,0x3a,0x73,0x65,0x65,0x6b,0x28,0x22,0x73,0x65,0x74,0x22,0x2c, - 0x20,0x30,0x29,0x0a,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x65,0x67,0x69,0x6e,0x6c,0x69, - 0x6e,0x65,0x2c,0x20,0x65,0x6e,0x64,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x63,0x75,0x72, - 0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d, - 0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x62,0x20,0x6f,0x72,0x20,0x30,0x29, - 0x2c,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e, - 0x65,0x20,0x6f,0x72,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x29,0x2c, - 0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6c,0x69,0x6e,0x65,0x20, - 0x69,0x6e,0x20,0x66,0x69,0x6c,0x65,0x3a,0x6c,0x69,0x6e,0x65,0x73,0x28,0x29,0x20, - 0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x75,0x72,0x72,0x65, - 0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74, - 0x6c,0x69,0x6e,0x65,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20, - 0x3e,0x3d,0x20,0x62,0x65,0x67,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x61,0x6e,0x64, - 0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x3c,0x3d,0x20, - 0x65,0x6e,0x64,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65, - 0x73,0x5b,0x23,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d, - 0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69, - 0x6e,0x65,0x20,0x3e,0x3d,0x20,0x65,0x6e,0x64,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x3a,0x63,0x6c, - 0x6f,0x73,0x65,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x6c,0x69,0x6e, - 0x65,0x73,0x5b,0x23,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x20,0x2b,0x20,0x31, - 0x5d,0x20,0x3d,0x20,0x22,0x22,0x20,0x2d,0x2d,0x20,0x74,0x6f,0x20,0x61,0x64,0x64, - 0x20,0x61,0x20,0x74,0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x20,0x5c,0x6e,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d, - 0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61, - 0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74, - 0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d, - 0x20,0x22,0x73,0x6f,0x75,0x72,0x63,0x65,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73, - 0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73, - 0x2e,0x69,0x2c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x7d, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x75,0x74,0x69,0x6c,0x2e,0x62,0x36,0x34,0x28,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63, - 0x6f,0x6e,0x63,0x61,0x74,0x28,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x2c,0x20, - 0x22,0x5c,0x6e,0x22,0x29,0x29,0x20,0x7d,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d, - 0x2d,0x20,0x46,0x61,0x63,0x74,0x6f,0x72,0x79,0x20,0x66,0x6f,0x72,0x20,0x62,0x6f, - 0x74,0x68,0x20,0x73,0x74,0x64,0x6f,0x75,0x74,0x20,0x61,0x6e,0x64,0x20,0x73,0x74, - 0x64,0x65,0x72,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2c,0x20,0x63, - 0x68,0x61,0x6e,0x67,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x64,0x65,0x73,0x63,0x72, - 0x69,0x70,0x74,0x6f,0x72,0x20,0x69,0x6e,0x20,0x69,0x6f,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x75,0x74,0x70,0x75, - 0x74,0x5f,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65, - 0x72,0x5f,0x66,0x61,0x63,0x74,0x6f,0x72,0x79,0x28,0x6d,0x6f,0x64,0x65,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,0x73,0x2e, - 0x63,0x20,0x3d,0x3d,0x20,0x22,0x30,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d, - 0x20,0x64,0x69,0x73,0x61,0x62,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x6f,0x5b,0x6d,0x6f,0x64,0x65,0x5d,0x20,0x3d,0x20, - 0x69,0x6f,0x2e,0x62,0x61,0x73,0x65,0x5b,0x6d,0x6f,0x64,0x65,0x5d,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6f,0x5b,0x6d,0x6f,0x64,0x65,0x5d,0x20, - 0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b, - 0x20,0x73,0x6b,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c, - 0x20,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x6d,0x6f,0x64,0x65,0x20,0x7d,0x2c,0x20, - 0x61,0x72,0x67,0x73,0x2e,0x63,0x20,0x3d,0x3d,0x20,0x22,0x31,0x22,0x20,0x61,0x6e, - 0x64,0x20,0x63,0x6f,0x72,0x65,0x2e,0x63,0x6f,0x70,0x79,0x5f,0x6f,0x75,0x74,0x70, - 0x75,0x74,0x20,0x6f,0x72,0x20,0x63,0x6f,0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72, - 0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65, - 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20, - 0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72, - 0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x6d, - 0x6f,0x64,0x65,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e, - 0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x20,0x73,0x75, - 0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x22,0x31,0x22,0x20,0x7d,0x20,0x7d,0x20, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d, - 0x2e,0x73,0x74,0x64,0x6f,0x75,0x74,0x20,0x3d,0x20,0x6f,0x75,0x74,0x70,0x75,0x74, - 0x5f,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72, - 0x5f,0x66,0x61,0x63,0x74,0x6f,0x72,0x79,0x28,0x22,0x73,0x74,0x64,0x6f,0x75,0x74, - 0x22,0x29,0x0a,0x4d,0x2e,0x73,0x74,0x64,0x65,0x72,0x72,0x20,0x3d,0x20,0x6f,0x75, - 0x74,0x70,0x75,0x74,0x5f,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x5f,0x68,0x61,0x6e, - 0x64,0x6c,0x65,0x72,0x5f,0x66,0x61,0x63,0x74,0x6f,0x72,0x79,0x28,0x22,0x73,0x74, - 0x64,0x65,0x72,0x72,0x22,0x29,0x0a,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f, - 0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20, - 0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65, - 0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x22,0x5d,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20, - 0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30, - 0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57, - 0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65, - 0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74, - 0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73, - 0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65, - 0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61, - 0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d, - 0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e, - 0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66, - 0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62, - 0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30, - 0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70, - 0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72, - 0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20, - 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20, - 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70, - 0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c, - 0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20, - 0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d, - 0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65, - 0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41, - 0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, - 0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78, - 0x74,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x3a,0x20,0x61,0x6c,0x6c,0x6f, - 0x77,0x73,0x20,0x74,0x6f,0x20,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x65,0x20,0x63, - 0x6f,0x64,0x65,0x20,0x73,0x6e,0x69,0x70,0x70,0x65,0x74,0x73,0x20,0x69,0x6e,0x20, - 0x74,0x68,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x6f,0x66,0x20,0x61, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x64,0x62,0x67,0x70,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x64,0x62,0x67,0x70,0x22,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75, - 0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74, - 0x69,0x6c,0x22,0x0a,0x0a,0x2d,0x2d,0x20,0x6d,0x61,0x6b,0x65,0x20,0x75,0x6e,0x69, - 0x71,0x75,0x65,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x61,0x63, - 0x63,0x65,0x73,0x73,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x0a,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x4c,0x4f,0x43,0x41,0x4c,0x2c,0x20,0x55,0x50,0x56,0x41,0x4c, - 0x2c,0x20,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x2c,0x20,0x45,0x56,0x41,0x4c,0x2c,0x20, - 0x53,0x54,0x4f,0x52,0x45,0x2c,0x20,0x48,0x41,0x4e,0x44,0x4c,0x45,0x20,0x3d,0x20, - 0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x2c,0x20, - 0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x67,0x65, - 0x74,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x0a,0x69,0x66,0x20,0x5f,0x56,0x45,0x52, - 0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31, - 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x67,0x6c, - 0x6f,0x62,0x61,0x6c,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x66,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x66,0x65, - 0x6e,0x76,0x28,0x66,0x29,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6c,0x73,0x65,0x69,0x66, - 0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75, - 0x61,0x20,0x35,0x2e,0x32,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x67,0x65,0x74,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x66,0x2c,0x20,0x63,0x78,0x74,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x27,0x67,0x6c,0x6f,0x62,0x61,0x6c, - 0x27,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x3a,0x20,0x74, - 0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x65,0x69,0x74,0x68,0x65,0x72,0x20,0x74,0x68, - 0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x5f,0x45,0x4e,0x56,0x20,0x6f,0x72,0x20, - 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x20,0x5f,0x45,0x4e,0x56,0x2e,0x20,0x41,0x20, - 0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x20,0x63,0x61,0x73,0x65,0x20,0x68,0x61,0x70, - 0x70,0x65,0x6e,0x20,0x77,0x68,0x65,0x6e,0x20,0x61,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x64, - 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63, - 0x65,0x20,0x61,0x6e,0x79,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x76,0x61,0x72, - 0x69,0x61,0x62,0x6c,0x65,0x3a,0x20,0x74,0x68,0x65,0x20,0x75,0x70,0x76,0x61,0x6c, - 0x75,0x65,0x20,0x5f,0x45,0x4e,0x56,0x20,0x6d,0x61,0x79,0x20,0x6e,0x6f,0x74,0x20, - 0x65,0x78,0x69,0x73,0x74,0x20,0x61,0x74,0x20,0x61,0x6c,0x6c,0x2e,0x20,0x49,0x6e, - 0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x61,0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x65,0x6e, - 0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74, - 0x20,0x72,0x65,0x6c,0x65,0x76,0x61,0x6e,0x74,0x20,0x73,0x6f,0x20,0x69,0x74,0x20, - 0x69,0x73,0x20,0x66,0x69,0x78,0x65,0x64,0x20,0x74,0x6f,0x20,0x61,0x6e,0x20,0x65, - 0x6d,0x70,0x74,0x79,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x20,0x41,0x6e,0x6f,0x74, - 0x68,0x65,0x72,0x20,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x20,0x77,0x6f,0x75, - 0x6c,0x64,0x20,0x62,0x65,0x20,0x74,0x6f,0x20,0x73,0x65,0x74,0x20,0x69,0x74,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x6f,0x20,0x74,0x68, - 0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x66,0x72, - 0x6f,0x6d,0x20,0x61,0x62,0x6f,0x76,0x65,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c, - 0x65,0x76,0x65,0x6c,0x20,0x62,0x75,0x74,0x20,0x69,0x74,0x20,0x77,0x6f,0x75,0x6c, - 0x64,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x73,0x6f,0x6d,0x65,0x20,0x6f, - 0x76,0x65,0x72,0x68,0x65,0x61,0x64,0x20,0x28,0x65,0x73,0x70,0x65,0x63,0x69,0x61, - 0x6c,0x6c,0x79,0x20,0x69,0x66,0x20,0x6d,0x75,0x6c,0x74,0x69,0x70,0x6c,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6c,0x65,0x76,0x65,0x6c, - 0x73,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e, - 0x74,0x69,0x61,0x74,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x63,0x78,0x74,0x5b,0x4c,0x4f,0x43,0x41,0x4c, - 0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d, - 0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x78,0x74, - 0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x63, - 0x78,0x74,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d, - 0x5b,0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x63,0x78,0x74,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b, - 0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x7b,0x20,0x7d,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x20,0x43,0x61,0x70,0x74,0x75,0x72,0x65,0x73,0x20,0x76,0x61, - 0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x20,0x66,0x6f,0x72,0x20,0x67,0x69,0x76,0x65, - 0x6e,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2e,0x20,0x54, - 0x68,0x65,0x20,0x63,0x61,0x70,0x74,0x75,0x72,0x65,0x20,0x63,0x6f,0x6e,0x74,0x61, - 0x69,0x6e,0x73,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x2c,0x20,0x75,0x70,0x76,0x61,0x6c, - 0x75,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x76, - 0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65, - 0x20,0x63,0x61,0x70,0x74,0x75,0x72,0x65,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20, - 0x73,0x65,0x65,0x6e,0x20,0x61,0x73,0x20,0x61,0x20,0x70,0x72,0x6f,0x78,0x79,0x20, - 0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x61, - 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3a,0x20,0x61,0x6e,0x79,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x71,0x75,0x65,0x72,0x69, - 0x65,0x64,0x20,0x6f,0x72,0x20,0x73,0x65,0x74,0x20,0x6e,0x6f,0x20,0x6d,0x61,0x74, - 0x74,0x65,0x72,0x0a,0x2d,0x2d,0x20,0x69,0x74,0x20,0x69,0x73,0x20,0x61,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x6f,0x72,0x20,0x61,0x6e,0x20,0x75,0x70,0x76,0x61,0x6c, - 0x75,0x65,0x2e,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65,0x20,0x69,0x6e,0x64,0x69,0x76, - 0x69,0x64,0x75,0x61,0x6c,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x6e,0x64,0x20, - 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74, - 0x20,0x61,0x72,0x65,0x20,0x61,0x6c,0x73,0x6f,0x20,0x61,0x76,0x61,0x69,0x6c,0x61, - 0x62,0x6c,0x65,0x20,0x61,0x6e,0x64,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x71, - 0x75,0x65,0x72,0x69,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,0x6d,0x6f,0x64,0x69,0x66, - 0x69,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x69,0x6e,0x64,0x65,0x78,0x65,0x64, - 0x20,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x6f,0x2e,0x0a,0x2d, - 0x2d,0x20,0x54,0x68,0x65,0x73,0x65,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x73,0x20, - 0x61,0x72,0x65,0x20,0x4e,0x4f,0x54,0x20,0x70,0x65,0x72,0x73,0x69,0x73,0x74,0x61, - 0x6e,0x74,0x20,0x61,0x6e,0x64,0x20,0x6d,0x75,0x73,0x74,0x20,0x6e,0x6f,0x74,0x20, - 0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x6f,0x75,0x74,0x73,0x69,0x64,0x65,0x20, - 0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f, - 0x70,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x69, - 0x61,0x74,0x65,0x64,0x20,0x74,0x68,0x65,0x6d,0x20,0x21,0x0a,0x4d,0x2e,0x43,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66, - 0x69,0x65,0x72,0x73,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x61,0x63,0x63,0x65, - 0x73,0x73,0x65,0x64,0x20,0x62,0x79,0x20,0x74,0x68,0x65,0x69,0x72,0x20,0x44,0x42, - 0x47,0x70,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x49,0x44,0x0a,0x20,0x20, - 0x20,0x20,0x5b,0x30,0x5d,0x20,0x3d,0x20,0x4c,0x4f,0x43,0x41,0x4c,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x2c, - 0x20,0x2d,0x2d,0x20,0x44,0x4c,0x54,0x4b,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61, - 0x6c,0x20,0x49,0x44,0x20,0x66,0x6f,0x72,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73, - 0x20,0x69,0x73,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x5b,0x32,0x5d,0x20,0x3d,0x20, - 0x55,0x50,0x56,0x41,0x4c,0x2c,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x45,0x56, - 0x41,0x4c,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6b,0x65, - 0x65,0x70,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x66,0x72,0x6f,0x6d,0x20, - 0x65,0x76,0x61,0x6c,0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x69,0x6e, - 0x20,0x6f,0x72,0x64,0x65,0x72,0x20,0x74,0x6f,0x20,0x62,0x72,0x6f,0x77,0x73,0x65, - 0x20,0x6f,0x72,0x20,0x6d,0x6f,0x64,0x69,0x66,0x79,0x20,0x74,0x68,0x65,0x6d,0x2c, - 0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x61,0x72,0x65,0x20,0x73,0x74,0x6f, - 0x72,0x65,0x64,0x20,0x61,0x73,0x20,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x5b,0x2d,0x31,0x5d,0x20,0x3d,0x20,0x45,0x56,0x41,0x4c,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x53,0x54,0x4f,0x52,0x45,0x20,0x3d,0x20,0x53,0x54,0x4f, - 0x52,0x45,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x73, - 0x20,0x61,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x20,0x62,0x79,0x20,0x6e, - 0x61,0x6d,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x63,0x6f,0x72,0x72,0x65,0x63,0x74, - 0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x20,0x6f,0x66,0x20,0x4c,0x75,0x61, - 0x20,0x73,0x63,0x6f,0x70,0x65,0x20,0x63,0x68,0x61,0x69,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x6f,0x72,0x20,0x63,0x68,0x61,0x69,0x6e, - 0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x77,0x6f,0x72,0x6b,0x20,0x68, - 0x65,0x72,0x65,0x20,0x62,0x65,0x61,0x63,0x61,0x75,0x73,0x65,0x20,0x5f,0x5f,0x69, - 0x6e,0x64,0x65,0x78,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20, - 0x77,0x6f,0x75,0x6c,0x64,0x20,0x72,0x61,0x69,0x73,0x65,0x20,0x61,0x6e,0x20,0x65, - 0x72,0x72,0x6f,0x72,0x20,0x69,0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x69,0x6e,0x67,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20, - 0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c, - 0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b, - 0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73, - 0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x73,0x65,0x6c, - 0x66,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b, - 0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73, - 0x65,0x6c,0x66,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x73,0x65,0x6c,0x66,0x5b,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x5d,0x5b,0x6b, - 0x5d,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b, - 0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b, - 0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x73, - 0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x20,0x3d,0x20, - 0x76,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66, - 0x20,0x73,0x65,0x6c,0x66,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f, - 0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x65,0x6c,0x66, - 0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x76,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x73,0x65,0x6c,0x66, - 0x5b,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x76,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6f,0x6e,0x6c,0x79,0x20, - 0x21,0x21,0x0a,0x20,0x20,0x20,0x20,0x5f,0x5f,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e, - 0x67,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c, - 0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x62,0x75,0x66,0x20,0x3d,0x20,0x7b,0x20,0x22,0x4c,0x6f,0x63,0x61,0x6c,0x73, - 0x3a,0x20,0x5c,0x6e,0x22,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73, - 0x28,0x73,0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f, - 0x52,0x45,0x5d,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x62,0x75,0x66,0x5b,0x23,0x62,0x75,0x66,0x2b,0x31,0x5d,0x20, - 0x3d,0x20,0x22,0x5c,0x74,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67, - 0x28,0x6b,0x29,0x2e,0x2e,0x22,0x28,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x28,0x76,0x29,0x2e,0x2e,0x22,0x29,0x3d,0x22,0x2e,0x2e,0x74,0x6f,0x73, - 0x74,0x72,0x69,0x6e,0x67,0x28,0x73,0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c, - 0x5d,0x5b,0x6b,0x5d,0x29,0x2e,0x2e,0x22,0x5c,0x6e,0x22,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x62,0x75,0x66,0x5b,0x23,0x62,0x75,0x66,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x55, - 0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x3a,0x20,0x5c,0x6e,0x22,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20, - 0x70,0x61,0x69,0x72,0x73,0x28,0x73,0x65,0x6c,0x66,0x5b,0x55,0x50,0x56,0x41,0x4c, - 0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x75,0x66,0x5b,0x23,0x62,0x75, - 0x66,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x5c,0x74,0x22,0x2e,0x2e,0x74,0x6f,0x73, - 0x74,0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x2e,0x2e,0x22,0x28,0x22,0x2e,0x2e,0x74, - 0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x29,0x2e,0x2e,0x22,0x29,0x3d,0x22, - 0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x73,0x65,0x6c,0x66,0x5b, - 0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x29,0x2e,0x2e,0x22,0x5c,0x6e,0x22, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c, - 0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x62,0x75,0x66,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x4c,0x6f,0x63,0x61, - 0x6c,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b, - 0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x64, - 0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54, - 0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x2e,0x2e,0x22,0x20,0x64,0x6f,0x65,0x73,0x20, - 0x6e,0x6f,0x74,0x20,0x65,0x78,0x69,0x73,0x74,0x73,0x2e,0x22,0x29,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x20,0x3d,0x20,0x73,0x65,0x6c, - 0x66,0x5b,0x48,0x41,0x4e,0x44,0x4c,0x45,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c, - 0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x2e,0x63,0x6f, - 0x72,0x6f,0x3a,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x68,0x61,0x6e,0x64, - 0x6c,0x65,0x2e,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x29, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65, - 0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c, - 0x66,0x2c,0x20,0x6b,0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78, - 0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b, - 0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b, - 0x48,0x41,0x4e,0x44,0x4c,0x45,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x2e,0x63, - 0x6f,0x72,0x6f,0x3a,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x68,0x61,0x6e, - 0x64,0x6c,0x65,0x2e,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78, - 0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6c,0x73,0x65,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x43,0x61,0x6e, - 0x6e,0x6f,0x74,0x20,0x73,0x65,0x74,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x22,0x20, - 0x2e,0x2e,0x20,0x6b,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x20,0x72,0x65,0x61,0x64,0x79,0x20, - 0x3a,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x5f,0x5f,0x70, - 0x61,0x69,0x72,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x73,0x65,0x6c,0x66,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74, - 0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x2e, - 0x69,0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x2c,0x20,0x73,0x65,0x6c,0x66,0x2c,0x20, - 0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x70,0x72,0x65,0x76,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x6b,0x65,0x79,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20, - 0x6e,0x65,0x78,0x74,0x28,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d, - 0x2c,0x20,0x70,0x72,0x65,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6b,0x65,0x79,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6b,0x65,0x79,0x2c,0x20,0x73,0x65,0x6c,0x66, - 0x5b,0x6b,0x65,0x79,0x5d,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x0a,0x20, - 0x20,0x20,0x20,0x55,0x70,0x76,0x61,0x6c,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20, - 0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e, - 0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73, - 0x65,0x6c,0x66,0x2c,0x20,0x6b,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20, - 0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6e,0x6f,0x74,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x20,0x65, - 0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x2e,0x2e, - 0x22,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x65,0x78,0x69,0x74,0x73, - 0x74,0x73,0x2e,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c, - 0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74, - 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x73,0x65,0x6c,0x66,0x5b,0x48,0x41,0x4e, - 0x44,0x4c,0x45,0x5d,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x29,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b, - 0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x73, - 0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x64, - 0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65, - 0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x73,0x65,0x6c,0x66,0x5b,0x48,0x41, - 0x4e,0x44,0x4c,0x45,0x5d,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x2c,0x20,0x76,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73, - 0x65,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x43,0x61,0x6e,0x6e,0x6f,0x74,0x20, - 0x73,0x65,0x74,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x20,0x22,0x20,0x2e,0x2e, - 0x20,0x6b,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x20,0x72,0x65,0x61,0x64,0x79,0x20,0x3a,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x5f,0x5f,0x70,0x61, - 0x69,0x72,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73, - 0x65,0x6c,0x66,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6d, - 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x2e,0x69, - 0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x2c,0x20,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6e, - 0x69,0x6c,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x70,0x72,0x65,0x76,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x6b,0x65,0x79,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x6e, - 0x65,0x78,0x74,0x28,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x2c, - 0x20,0x70,0x72,0x65,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x6b,0x65,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x6b,0x65,0x79,0x2c,0x20,0x73,0x65,0x6c,0x66,0x5b, - 0x6b,0x65,0x79,0x5d,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x63,0x6f, - 0x6e,0x73,0x74,0x72,0x75,0x63,0x74,0x6f,0x72,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x63,0x6f,0x72,0x6f,0x20,0x20,0x28,0x75, - 0x74,0x69,0x6c,0x2e,0x2a,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x6e,0x73,0x74, - 0x61,0x6e,0x63,0x65,0x29,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20, - 0x74,0x6f,0x20,0x6d,0x61,0x70,0x20,0x74,0x6f,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x28,0x6e, - 0x75,0x6d,0x62,0x65,0x72,0x29,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76, - 0x65,0x6c,0x20,0x64,0x6f,0x20,0x64,0x75,0x6d,0x70,0x20,0x28,0x73,0x63,0x72,0x69, - 0x70,0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x6e,0x65,0x77,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x28,0x63,0x6c,0x73,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65, - 0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x2c,0x20,0x75,0x70,0x76,0x61,0x6c, - 0x75,0x65,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3c,0x20, - 0x30,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f, - 0x72,0x28,0x33,0x30,0x31,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20, - 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3a,0x20,0x22,0x2e,0x2e, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x29, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x20,0x3d,0x20,0x28,0x63,0x6f,0x72,0x6f,0x3a, - 0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x22, - 0x66,0x22,0x29,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f, - 0x72,0x28,0x33,0x30,0x31,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20, - 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3a,0x20,0x22,0x2e,0x2e, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x29, - 0x29,0x2e,0x66,0x75,0x6e,0x63,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c, - 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69, - 0x3d,0x31,0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x20,0x3d,0x20,0x63, - 0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x6c,0x65,0x76, - 0x65,0x6c,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74, - 0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x6e,0x61,0x6d, - 0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x7e,0x3d,0x20,0x22,0x28, - 0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x73,0x6b,0x69,0x70,0x20,0x69, - 0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x69,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31, - 0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x20,0x3d,0x20,0x64,0x65,0x62, - 0x75,0x67,0x2e,0x67,0x65,0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x66,0x75, - 0x6e,0x63,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74, - 0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x70,0x76,0x61,0x6c,0x75, - 0x65,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x69,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65, - 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x5b,0x53,0x54,0x4f,0x52,0x45, - 0x5d,0x20,0x3d,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x2c,0x20,0x5b,0x48,0x41,0x4e, - 0x44,0x4c,0x45,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d, - 0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x63, - 0x6f,0x72,0x6f,0x20,0x7d,0x20,0x7d,0x2c,0x20,0x63,0x6c,0x73,0x2e,0x4c,0x6f,0x63, - 0x61,0x6c,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x3d,0x20,0x73,0x65, - 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x5b,0x53,0x54, - 0x4f,0x52,0x45,0x5d,0x20,0x3d,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x2c, - 0x20,0x5b,0x48,0x41,0x4e,0x44,0x4c,0x45,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x20,0x7d,0x2c,0x20,0x63,0x6c,0x73,0x2e,0x55,0x70,0x76,0x61,0x6c,0x43,0x6f,0x6e, - 0x74,0x65,0x78,0x74,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x73,0x65, - 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x5b,0x4c,0x4f, - 0x43,0x41,0x4c,0x5d,0x20,0x3d,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x2c,0x20,0x5b, - 0x55,0x50,0x56,0x41,0x4c,0x5d,0x20,0x3d,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65, - 0x73,0x2c,0x20,0x5b,0x45,0x56,0x41,0x4c,0x5d,0x20,0x3d,0x20,0x7b,0x7d,0x20,0x7d, - 0x2c,0x20,0x63,0x6c,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72, - 0x61,0x77,0x73,0x65,0x74,0x28,0x72,0x65,0x73,0x75,0x6c,0x74,0x2c,0x20,0x47,0x4c, - 0x4f,0x42,0x41,0x4c,0x2c,0x20,0x67,0x65,0x74,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73, - 0x28,0x66,0x75,0x6e,0x63,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x29,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72, - 0x65,0x73,0x75,0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d, - 0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x48,0x61,0x6e,0x64,0x6c,0x65,0x20,0x63,0x61,0x63, - 0x68,0x69,0x6e,0x67,0x20,0x6f,0x66,0x20,0x61,0x6c,0x6c,0x20,0x69,0x6e,0x73,0x74, - 0x61,0x6e,0x74,0x69,0x61,0x74,0x65,0x64,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74, - 0x2e,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x74,0x61, - 0x6b,0x65,0x73,0x20,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x73, - 0x3a,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x61,0x6e,0x64,0x20,0x73,0x74,0x61, - 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x73,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70, - 0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x20, - 0x49,0x66,0x20,0x74,0x68,0x69,0x73,0x0a,0x2d,0x2d,0x20,0x63,0x6f,0x6e,0x74,0x65, - 0x78,0x74,0x20,0x68,0x61,0x73,0x20,0x62,0x65,0x65,0x6e,0x20,0x61,0x6c,0x72,0x65, - 0x61,0x64,0x79,0x20,0x71,0x75,0x65,0x72,0x69,0x65,0x64,0x20,0x74,0x68,0x65,0x72, - 0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x6e,0x65,0x77,0x20,0x69,0x6e,0x73,0x74, - 0x61,0x6e,0x74,0x69,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x20,0x41,0x20,0x43,0x6f,0x6e, - 0x74,0x65,0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x20,0x69,0x73,0x20,0x76, - 0x61,0x6c,0x69,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x64,0x75,0x72,0x69,0x6e,0x67, - 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x0a, - 0x2d,0x2d,0x20,0x6f,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69,0x74,0x20,0x68, - 0x61,0x73,0x20,0x62,0x65,0x65,0x6e,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x74,0x69, - 0x61,0x74,0x65,0x64,0x2e,0x20,0x52,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73, - 0x20,0x74,0x6f,0x20,0x61,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x4d,0x61,0x6e, - 0x61,0x67,0x65,0x72,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x6c,0x6f,0x73, - 0x74,0x20,0x61,0x66,0x74,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x64,0x20, - 0x6f,0x66,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x28,0x73, - 0x6f,0x0a,0x2d,0x2d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x73,0x20,0x63,0x61,0x6e, - 0x20,0x62,0x65,0x20,0x63,0x6f,0x6c,0x6c,0x65,0x63,0x74,0x65,0x64,0x29,0x2e,0x0a, - 0x2d,0x2d,0x20,0x49,0x66,0x20,0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20, - 0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e, - 0x74,0x69,0x61,0x74,0x65,0x64,0x2c,0x20,0x61,0x6e,0x20,0x33,0x30,0x31,0x20,0x44, - 0x42,0x47,0x50,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x69,0x73,0x20,0x74,0x68,0x72, - 0x6f,0x77,0x6e,0x2e,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e, - 0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x28,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x61,0x63,0x68,0x65, - 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x74,0x68,0x72,0x65,0x61, - 0x64,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x61,0x6c,0x20,0x63,0x6f, - 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20, - 0x61,0x73,0x20,0x6b,0x65,0x79,0x20,0x28,0x6e,0x6f,0x74,0x20,0x74,0x68,0x65,0x20, - 0x77,0x72,0x61,0x70,0x70,0x65,0x64,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65, - 0x20,0x61,0x73,0x20,0x69,0x74,0x73,0x20,0x75,0x6e,0x69,0x63,0x69,0x74,0x79,0x20, - 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x67,0x75,0x61,0x72,0x61,0x6e,0x74,0x65,0x65, - 0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6f,0x74, - 0x68,0x65,0x72,0x77,0x69,0x73,0x65,0x2c,0x20,0x74,0x72,0x75,0x65,0x20,0x69,0x73, - 0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66, - 0x79,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64, - 0x20,0x28,0x61,0x73,0x20,0x6e,0x69,0x6c,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20, - 0x61,0x20,0x76,0x61,0x6c,0x69,0x64,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6b,0x65, - 0x79,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x6b,0x65,0x79,0x20,0x3d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5b,0x31,0x5d, - 0x20,0x6f,0x72,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x73,0x20,0x3d,0x20,0x63,0x61,0x63,0x68,0x65,0x5b,0x6b, - 0x65,0x79,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e, - 0x6f,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78, - 0x74,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f,0x6e,0x74,0x65, - 0x78,0x74,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x63,0x68,0x65,0x5b,0x6b,0x65,0x79,0x5d, - 0x20,0x3d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78, - 0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63, - 0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x5b,0x6c,0x65,0x76,0x65,0x6c,0x5d,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d, - 0x20,0x4d,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x3a,0x6e,0x65,0x77,0x28,0x74, - 0x68,0x72,0x65,0x61,0x64,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64, - 0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x5b,0x6c,0x65,0x76,0x65,0x6c,0x5d, - 0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e, - 0x64,0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d, - 0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x2e,0x64,0x62,0x67,0x70,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e, - 0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x2e,0x64,0x62,0x67,0x70,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79, - 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32, - 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c, - 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a, - 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65, - 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f, - 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63, - 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69, - 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20, - 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20, - 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, - 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20, - 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20, - 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65, - 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74, - 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69, - 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70, - 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f, - 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30, - 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74, - 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20, - 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73, - 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61, - 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f, - 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x44,0x42,0x47,0x70,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63, - 0x6f,0x6c,0x20,0x75,0x74,0x69,0x6c,0x69,0x74,0x79,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x28,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x2c,0x20,0x65,0x72, - 0x72,0x6f,0x72,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x2c,0x20,0x58,0x4d, - 0x4c,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x29,0x2e,0x0a,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71, - 0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75, - 0x74,0x69,0x6c,0x22,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x72,0x72,0x6f, - 0x72,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x2c, - 0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x70,0x61,0x69,0x72,0x73,0x2c,0x20,0x69,0x70, - 0x61,0x69,0x72,0x73,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20, - 0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x20,0x3d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x72,0x72,0x6f,0x72,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61, - 0x62,0x6c,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x70,0x61,0x69,0x72,0x73, - 0x2c,0x20,0x69,0x70,0x61,0x69,0x72,0x73,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2c,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74, - 0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x20,0x50,0x61,0x72,0x73,0x65,0x73,0x20,0x74,0x68,0x65,0x20, - 0x44,0x42,0x47,0x70,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x61,0x72,0x67, - 0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x73,0x20,0x69,0x74,0x20,0x61,0x73,0x20,0x61,0x20,0x4c,0x75,0x61,0x20,0x74, - 0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x6b,0x65,0x79,0x2f,0x76,0x61, - 0x6c,0x75,0x65,0x20,0x70,0x61,0x69,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x46,0x6f, - 0x72,0x20,0x65,0x78,0x61,0x6d,0x70,0x6c,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x73, - 0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x20,0x3c,0x63,0x6f,0x64,0x65,0x3e,0x2d,0x69, - 0x20,0x35,0x20,0x2d,0x6a,0x20,0x66,0x6f,0x6f,0x3c,0x2f,0x63,0x6f,0x64,0x65,0x3e, - 0x20,0x77,0x69,0x6c,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x20, - 0x3c,0x63,0x6f,0x64,0x65,0x3e,0x7b,0x69,0x3d,0x35,0x2c,0x20,0x6a,0x3d,0x66,0x6f, - 0x6f,0x7d,0x3c,0x2f,0x63,0x6f,0x64,0x65,0x3e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61, - 0x72,0x61,0x6d,0x20,0x63,0x6d,0x64,0x5f,0x61,0x72,0x67,0x73,0x20,0x28,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x29,0x20,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x20,0x6f, - 0x66,0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x40, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x64,0x65,0x73, - 0x63,0x72,0x69,0x62,0x65,0x64,0x20,0x61,0x62,0x6f,0x76,0x65,0x0a,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x61,0x72,0x67,0x5f,0x70,0x61,0x72,0x73, - 0x65,0x28,0x63,0x6d,0x64,0x5f,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x72,0x67,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a, - 0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x67,0x2c,0x20,0x76,0x61,0x6c, - 0x20,0x69,0x6e,0x20,0x63,0x6d,0x64,0x5f,0x61,0x72,0x67,0x73,0x3a,0x67,0x6d,0x61, - 0x74,0x63,0x68,0x28,0x22,0x25,0x2d,0x28,0x25,0x77,0x29,0x20,0x28,0x25,0x53,0x2b, - 0x29,0x22,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61, - 0x72,0x67,0x73,0x5b,0x61,0x72,0x67,0x5d,0x20,0x3d,0x20,0x76,0x61,0x6c,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x61,0x72,0x67,0x73,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20, - 0x50,0x61,0x72,0x73,0x65,0x73,0x20,0x61,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64, - 0x20,0x6c,0x69,0x6e,0x65,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x28, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x72, - 0x75,0x6e,0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x28,0x74,0x61, - 0x62,0x6c,0x65,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x6f,0x70, - 0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x4d,0x2e,0x63,0x6d,0x64,0x5f,0x70,0x61,0x72,0x73,0x65,0x28,0x63,0x6d,0x64, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6d,0x64,0x5f, - 0x6e,0x61,0x6d,0x65,0x2c,0x20,0x61,0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61, - 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6d,0x64,0x3a,0x66,0x69,0x6e,0x64, - 0x28,0x22,0x2d,0x2d,0x22,0x2c,0x20,0x31,0x2c,0x20,0x74,0x72,0x75,0x65,0x29,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73, - 0x20,0x61,0x20,0x64,0x61,0x74,0x61,0x20,0x70,0x61,0x72,0x74,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x63,0x6d,0x64,0x5f,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x61, - 0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x63,0x6d,0x64,0x3a, - 0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x28,0x25,0x53,0x2b,0x29,0x25,0x73,0x2b, - 0x28,0x2e,0x2a,0x29,0x25,0x73,0x2b,0x25,0x2d,0x25,0x2d,0x25,0x73,0x2a,0x28,0x2e, - 0x2a,0x29,0x24,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x61, - 0x74,0x61,0x20,0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28, - 0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6d,0x64,0x5f,0x6e,0x61,0x6d,0x65,0x2c, - 0x20,0x61,0x72,0x67,0x73,0x20,0x3d,0x20,0x63,0x6d,0x64,0x3a,0x6d,0x61,0x74,0x63, - 0x68,0x28,0x22,0x5e,0x28,0x25,0x53,0x2b,0x29,0x25,0x73,0x2b,0x28,0x2e,0x2a,0x29, - 0x24,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x6d,0x64,0x5f,0x6e,0x61,0x6d,0x65,0x2c, - 0x20,0x4d,0x2e,0x61,0x72,0x67,0x5f,0x70,0x61,0x72,0x73,0x65,0x28,0x61,0x72,0x67, - 0x73,0x29,0x2c,0x20,0x64,0x61,0x74,0x61,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x74,0x68,0x65,0x20,0x70,0x61, - 0x63,0x6b,0x65,0x74,0x20,0x72,0x65,0x61,0x64,0x20,0x66,0x72,0x6f,0x6d,0x20,0x73, - 0x6f,0x63,0x6b,0x65,0x74,0x2c,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x66,0x6f, - 0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x6e,0x20,0x65,0x72,0x72, - 0x6f,0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x6f,0x6e,0x20,0x65,0x72, - 0x72,0x6f,0x72,0x73,0x2e,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d, - 0x2e,0x72,0x65,0x61,0x64,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x28,0x73,0x6b,0x74, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69,0x7a,0x65, - 0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20, - 0x74,0x72,0x75,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x79,0x74,0x65,0x2c,0x20,0x65,0x72,0x72,0x20, - 0x3d,0x20,0x73,0x6b,0x74,0x3a,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x28,0x31,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x62,0x79,0x74,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x6e,0x69,0x6c,0x2c,0x20,0x65,0x72,0x72,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x79,0x74,0x65,0x20,0x3d,0x3d, - 0x20,0x22,0x5c,0x30,0x30,0x30,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65, - 0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73, - 0x69,0x7a,0x65,0x5b,0x23,0x73,0x69,0x7a,0x65,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x62, - 0x79,0x74,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x73, - 0x69,0x7a,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x44,0x42,0x47,0x50, - 0x5f,0x45,0x52,0x52,0x5f,0x4d,0x45,0x54,0x41,0x54,0x41,0x42,0x4c,0x45,0x20,0x3d, - 0x20,0x7b,0x7d,0x20,0x2d,0x2d,0x20,0x75,0x6e,0x69,0x71,0x75,0x65,0x20,0x6f,0x62, - 0x6a,0x65,0x63,0x74,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x69,0x64,0x65, - 0x6e,0x74,0x69,0x66,0x79,0x20,0x44,0x42,0x47,0x70,0x20,0x65,0x72,0x72,0x6f,0x72, - 0x73,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x54,0x68,0x72,0x6f,0x77,0x73,0x20,0x61,0x20, - 0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x20,0x44,0x42,0x47,0x70,0x20,0x65,0x72,0x72, - 0x6f,0x72,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20, - 0x69,0x6e,0x20,0x61,0x20,0x66,0x69,0x6e,0x65,0x20,0x74,0x75,0x6e,0x65,0x64,0x20, - 0x65,0x72,0x72,0x6f,0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x74,0x6f, - 0x20,0x74,0x68,0x65,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x20, - 0x49,0x74,0x20,0x69,0x73,0x20,0x69,0x6e,0x74,0x65,0x6e,0x64,0x65,0x64,0x20,0x74, - 0x6f,0x20,0x62,0x65,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f, - 0x20,0x61,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x74,0x6f,0x20,0x6d,0x61, - 0x6b,0x65,0x20,0x61,0x20,0x75,0x73,0x65,0x66,0x75,0x6c,0x20,0x65,0x72,0x72,0x6f, - 0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c,0x20,0x61,0x20,0x73,0x74,0x61, - 0x6e,0x64,0x61,0x72,0x64,0x20,0x4c,0x75,0x61,0x20,0x65,0x72,0x72,0x6f,0x72,0x0a, - 0x2d,0x2d,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x20,0x61,0x20,0x63, - 0x6f,0x64,0x65,0x20,0x39,0x39,0x38,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x28,0x69, - 0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x20,0x65,0x72,0x72,0x6f,0x72,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x63,0x6f,0x64,0x65,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x61, - 0x6c,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x63,0x6f,0x64,0x65,0x0a,0x2d,0x2d,0x20, - 0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x6d, - 0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x28,0x6f, - 0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x61,0x74,0x74,0x72,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x61,0x74, - 0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x74,0x6f,0x20,0x61,0x64,0x64,0x20, - 0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20, - 0x74,0x61,0x67,0x20,0x28,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x0a,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28, - 0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c,0x20,0x61, - 0x74,0x74,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x73, - 0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x63,0x6f, - 0x64,0x65,0x20,0x3d,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x65,0x73,0x73,0x61, - 0x67,0x65,0x20,0x3d,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c,0x20,0x61,0x74, - 0x74,0x72,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x20,0x6f,0x72,0x20,0x7b,0x7d,0x20, - 0x7d,0x2c,0x20,0x4d,0x2e,0x44,0x42,0x47,0x50,0x5f,0x45,0x52,0x52,0x5f,0x4d,0x45, - 0x54,0x41,0x54,0x41,0x42,0x4c,0x45,0x29,0x2c,0x20,0x32,0x29,0x0a,0x65,0x6e,0x64, - 0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x4c,0x69,0x6b,0x65,0x20,0x63,0x6f,0x72,0x65,0x20, - 0x61,0x73,0x73,0x65,0x72,0x74,0x20,0x62,0x75,0x74,0x20,0x74,0x68,0x72,0x6f,0x77, - 0x73,0x20,0x61,0x20,0x44,0x42,0x47,0x70,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x69, - 0x66,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x6e, - 0x6f,0x74,0x20,0x6d,0x65,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61, - 0x6d,0x20,0x63,0x6f,0x64,0x65,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x61,0x6c, - 0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x63,0x6f,0x64,0x65,0x20,0x74,0x68,0x72,0x6f, - 0x77,0x6e,0x20,0x69,0x66,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20, - 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x6d,0x65,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x40, - 0x70,0x61,0x72,0x61,0x6d,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x63,0x6f, - 0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x74,0x65,0x73,0x74,0x0a, - 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x2e,0x2e,0x2e,0x20,0x77,0x69, - 0x6c,0x6c,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x65,0x72, - 0x72,0x6f,0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x69,0x66,0x20,0x74, - 0x65,0x73,0x74,0x20,0x66,0x61,0x69,0x6c,0x73,0x2e,0x0a,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x63,0x6f,0x64, - 0x65,0x2c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63, - 0x65,0x73,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x4d,0x2e,0x65,0x72,0x72,0x6f,0x72, - 0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x28,0x2e,0x2e,0x2e,0x29,0x29,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x75,0x63, - 0x63,0x65,0x73,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d, - 0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4f,0x75,0x74,0x67,0x6f,0x69,0x6e,0x67,0x20, - 0x64,0x61,0x74,0x61,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x78,0x6d,0x6c,0x61,0x74,0x74,0x72,0x5f,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x63, - 0x68,0x61,0x72,0x73,0x20,0x3d,0x20,0x7b,0x20,0x5b,0x27,0x22,0x27,0x5d,0x20,0x3d, - 0x20,0x22,0x26,0x71,0x75,0x6f,0x74,0x3b,0x22,0x2c,0x20,0x5b,0x22,0x3c,0x22,0x5d, - 0x20,0x3d,0x20,0x22,0x26,0x6c,0x74,0x3b,0x22,0x2c,0x20,0x5b,0x22,0x26,0x22,0x5d, - 0x20,0x3d,0x20,0x22,0x26,0x61,0x6d,0x70,0x3b,0x22,0x20,0x7d,0x0a,0x2d,0x2d,0x2d, - 0x20,0x56,0x65,0x72,0x79,0x20,0x62,0x61,0x73,0x69,0x63,0x20,0x58,0x4d,0x4c,0x20, - 0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x6f,0x72,0x0a,0x2d,0x2d,0x20,0x47,0x65,0x6e, - 0x65,0x72,0x61,0x74,0x65,0x73,0x20,0x61,0x20,0x58,0x4d,0x4c,0x20,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x20,0x66,0x72,0x6f,0x6d,0x20,0x61,0x20,0x4c,0x75,0x61,0x20,0x4f, - 0x62,0x6a,0x65,0x63,0x74,0x20,0x4d,0x6f,0x64,0x65,0x6c,0x20,0x28,0x4c,0x4f,0x4d, - 0x29,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x0a,0x2d,0x2d,0x20,0x53,0x65,0x65,0x20, - 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6d,0x61,0x74,0x74,0x68,0x65,0x77,0x77,0x69, - 0x6c,0x64,0x2e,0x63,0x6f,0x2e,0x75,0x6b,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74, - 0x73,0x2f,0x6c,0x75,0x61,0x65,0x78,0x70,0x61,0x74,0x2f,0x6c,0x6f,0x6d,0x2e,0x68, - 0x74,0x6d,0x6c,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c, - 0x6f,0x6d,0x32,0x73,0x74,0x72,0x28,0x78,0x6d,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x3d,0x20,0x7b, - 0x20,0x7d,0x20,0x2d,0x2d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x62,0x75,0x66, - 0x66,0x65,0x72,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65, - 0x28,0x6e,0x6f,0x64,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70, - 0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20, - 0x31,0x5d,0x20,0x3d,0x20,0x22,0x3c,0x22,0x2e,0x2e,0x6e,0x6f,0x64,0x65,0x2e,0x74, - 0x61,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65, - 0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d, - 0x20,0x22,0x20,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x20,0x6f,0x72,0x64,0x65,0x72,0x69, - 0x6e,0x67,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x68,0x6f,0x6e,0x6f,0x72,0x65, - 0x64,0x20,0x68,0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66, - 0x6f,0x72,0x20,0x61,0x74,0x74,0x72,0x2c,0x20,0x76,0x61,0x6c,0x20,0x69,0x6e,0x20, - 0x70,0x61,0x69,0x72,0x73,0x28,0x6e,0x6f,0x64,0x65,0x2e,0x61,0x74,0x74,0x72,0x20, - 0x6f,0x72,0x20,0x7b,0x7d,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70,0x65,0x28,0x61,0x74, - 0x74,0x72,0x29,0x20,0x3d,0x3d,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65, - 0x63,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x20, - 0x2e,0x2e,0x20,0x27,0x3d,0x22,0x27,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x29,0x3a,0x67,0x73,0x75,0x62,0x28,0x27,0x5b, - 0x22,0x26,0x3c,0x5d,0x27,0x2c,0x20,0x78,0x6d,0x6c,0x61,0x74,0x74,0x72,0x5f,0x73, - 0x70,0x65,0x63,0x69,0x61,0x6c,0x63,0x68,0x61,0x72,0x73,0x29,0x20,0x2e,0x2e,0x20, - 0x27,0x22,0x27,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63, - 0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x22,0x20,0x22,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73, - 0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x72,0x65,0x6d,0x6f,0x76, - 0x65,0x20,0x74,0x68,0x65,0x20,0x6c,0x61,0x73,0x74,0x20,0x73,0x65,0x70,0x61,0x72, - 0x61,0x74,0x6f,0x72,0x20,0x28,0x75,0x73,0x65,0x6c,0x65,0x73,0x73,0x29,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x64,0x65,0x5b, - 0x31,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63, - 0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x22,0x3e,0x22,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x5f,0x2c, - 0x20,0x63,0x68,0x69,0x6c,0x64,0x20,0x69,0x6e,0x20,0x69,0x70,0x61,0x69,0x72,0x73, - 0x28,0x6e,0x6f,0x64,0x65,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70, - 0x65,0x28,0x63,0x68,0x69,0x6c,0x64,0x29,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x62, - 0x6c,0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74, - 0x65,0x28,0x63,0x68,0x69,0x6c,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x70,0x69, - 0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20,0x31, - 0x5d,0x20,0x3d,0x20,0x22,0x3c,0x21,0x5b,0x43,0x44,0x41,0x54,0x41,0x5b,0x22,0x20, - 0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x68,0x69,0x6c, - 0x64,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,0x5d,0x3e,0x22,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63, - 0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20, - 0x3d,0x20,0x22,0x3c,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x6e,0x6f,0x64,0x65,0x2e,0x74, - 0x61,0x67,0x20,0x2e,0x2e,0x20,0x22,0x3e,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65, - 0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x22,0x2f,0x3e,0x22,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x28, - 0x78,0x6d,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x70,0x69,0x65,0x63,0x65,0x73,0x29,0x0a, - 0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e, - 0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x6b,0x74,0x2c,0x20,0x72,0x65, - 0x73,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72, - 0x65,0x73,0x70,0x2e,0x61,0x74,0x74,0x72,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65, - 0x73,0x70,0x2e,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x7d,0x20,0x65,0x6e,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x78, - 0x6d,0x6c,0x6e,0x73,0x20,0x3d,0x20,0x22,0x75,0x72,0x6e,0x3a,0x64,0x65,0x62,0x75, - 0x67,0x67,0x65,0x72,0x5f,0x70,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x5f,0x76,0x31, - 0x22,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x61,0x74, - 0x61,0x20,0x3d,0x20,0x27,0x3c,0x3f,0x78,0x6d,0x6c,0x20,0x76,0x65,0x72,0x73,0x69, - 0x6f,0x6e,0x3d,0x22,0x31,0x2e,0x30,0x22,0x20,0x65,0x6e,0x63,0x6f,0x64,0x69,0x6e, - 0x67,0x3d,0x22,0x55,0x54,0x46,0x2d,0x38,0x22,0x20,0x3f,0x3e,0x5c,0x6e,0x27,0x2e, - 0x2e,0x4d,0x2e,0x6c,0x6f,0x6d,0x32,0x73,0x74,0x72,0x28,0x72,0x65,0x73,0x70,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x67,0x28,0x22,0x44, - 0x45,0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x53,0x65,0x6e,0x64,0x20,0x22,0x20,0x2e, - 0x2e,0x20,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x73,0x6b,0x74,0x3a, - 0x73,0x65,0x6e,0x64,0x28,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x23,0x64, - 0x61,0x74,0x61,0x29,0x2e,0x2e,0x22,0x5c,0x30,0x30,0x30,0x22,0x2e,0x2e,0x64,0x61, - 0x74,0x61,0x2e,0x2e,0x22,0x5c,0x30,0x30,0x30,0x22,0x29,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x6e,0x20,0x58, - 0x4d,0x4c,0x20,0x74,0x61,0x67,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62,0x69,0x6e, - 0x67,0x20,0x61,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x65,0x72,0x72, - 0x6f,0x72,0x2c,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6e,0x20,0x6f,0x70,0x74,0x69, - 0x6f,0x6e,0x61,0x6c,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x0a,0x2d,0x2d,0x20, - 0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x63,0x6f,0x64,0x65,0x20,0x28,0x6e,0x75,0x6d, - 0x62,0x65,0x72,0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x63,0x6f,0x64,0x65,0x20, - 0x28,0x73,0x65,0x65,0x20,0x44,0x42,0x47,0x70,0x20,0x73,0x70,0x65,0x63,0x69,0x66, - 0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x6d,0x73,0x67,0x20,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c, - 0x20,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x20,0x74,0x65,0x78,0x74,0x75, - 0x61,0x6c,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x6f, - 0x66,0x20,0x65,0x72,0x72,0x6f,0x72,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2c,0x20,0x73,0x75,0x69,0x74,0x61,0x62, - 0x6c,0x65,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74, - 0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x58,0x4d,0x4c,0x0a,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f, - 0x72,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6c,0x65,0x6d,0x20,0x3d,0x20,0x7b,0x20, - 0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x65,0x72,0x72,0x6f,0x72,0x22,0x2c,0x20,0x61, - 0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x64,0x65,0x20,0x3d,0x20,0x63, - 0x6f,0x64,0x65,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6d, - 0x73,0x67,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x65,0x6d,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x74,0x6f,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x28,0x6d,0x73,0x67,0x29,0x2c,0x20,0x74,0x61,0x67,0x20,0x3d, - 0x20,0x22,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x22,0x20,0x7d,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x65,0x6c,0x65,0x6d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20, - 0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x2e,0x64,0x62,0x67,0x70,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f, - 0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e, - 0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x70,0x61,0x63,0x6b, - 0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74, - 0x69,0x6f,0x6e,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67, - 0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32, - 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73, - 0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20, - 0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72, - 0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61, - 0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70, - 0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73, - 0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61, - 0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65, - 0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63, - 0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63, - 0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69, - 0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74, - 0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e, - 0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62, - 0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, - 0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f, - 0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74, - 0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62, - 0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x4a,0x75, - 0x6c,0x69,0x65,0x6e,0x20,0x44,0x65,0x73,0x67,0x61,0x74,0x73,0x20,0x2d,0x20,0x69, - 0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69, - 0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d, - 0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d, - 0x20,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x20,0x67,0x65,0x6e,0x65, - 0x72,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,0x65, - 0x20,0x61,0x20,0x4c,0x4f,0x4d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74, - 0x68,0x20,0x64,0x61,0x74,0x61,0x20,0x66,0x72,0x6f,0x6d,0x20,0x69,0x6e,0x74,0x72, - 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72, - 0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69, - 0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x61, - 0x74,0x66,0x6f,0x72,0x6d,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69, - 0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x0a,0x0a,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x74,0x79,0x70, - 0x65,0x2c,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x6e,0x65,0x78,0x74,0x2c, - 0x20,0x72,0x61,0x77,0x67,0x65,0x74,0x2c,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61, - 0x74,0x61,0x62,0x6c,0x65,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61, - 0x62,0x6c,0x65,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x73,0x65, - 0x6c,0x65,0x63,0x74,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f, - 0x79,0x69,0x65,0x6c,0x64,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63, - 0x6f,0x63,0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x63,0x6f,0x73,0x74,0x61,0x74,0x75,0x73,0x2c,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x20,0x20,0x20,0x20, - 0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x20,0x3d,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c, - 0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x6e,0x65,0x78,0x74,0x2c,0x20,0x72, - 0x61,0x77,0x67,0x65,0x74,0x2c,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61, - 0x62,0x6c,0x65,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c, - 0x65,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x73,0x65,0x6c,0x65, - 0x63,0x74,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x79,0x69, - 0x65,0x6c,0x64,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63, - 0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69, - 0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x73,0x74,0x72,0x69,0x6e, - 0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e, - 0x63,0x6f,0x6e,0x63,0x61,0x74,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,0x55, - 0x4c,0x54,0x49,0x56,0x41,0x4c,0x5f,0x4d,0x54,0x20,0x3d,0x20,0x7b,0x20,0x5f,0x5f, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20, - 0x65,0x6e,0x64,0x20,0x7d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x62, - 0x65,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x50,0x75, - 0x62,0x6c,0x69,0x63,0x20,0x41,0x50,0x49,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x6c,0x6f,0x67,0x69,0x63,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x6d, - 0x6f,0x64,0x75,0x6c,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73, - 0x20,0x4c,0x75,0x61,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x73,0x20,0x69,0x6e,0x74, - 0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x0a,0x2d, - 0x2d,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x73,0x20,0x61,0x20,0x5b,0x44, - 0x42,0x47,0x50,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x78,0x64,0x65,0x62, - 0x75,0x67,0x2e,0x6f,0x72,0x67,0x2f,0x64,0x6f,0x63,0x73,0x2d,0x64,0x62,0x67,0x70, - 0x2e,0x70,0x68,0x70,0x29,0x20,0x63,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x6c,0x65, - 0x0a,0x2d,0x2d,0x20,0x5b,0x4c,0x4f,0x4d,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f, - 0x2f,0x6d,0x61,0x74,0x74,0x68,0x65,0x77,0x77,0x69,0x6c,0x64,0x2e,0x63,0x6f,0x2e, - 0x75,0x6b,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x75,0x61,0x65, - 0x78,0x70,0x61,0x74,0x2f,0x6c,0x6f,0x6d,0x2e,0x68,0x74,0x6d,0x6c,0x29,0x20,0x64, - 0x61,0x74,0x61,0x20,0x73,0x63,0x72,0x75,0x63,0x74,0x75,0x72,0x65,0x2e,0x0a,0x2d, - 0x2d,0x20,0x40,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a, - 0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74, - 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x64,0x61,0x74,0x61, - 0x20,0x74,0x6f,0x20,0x73,0x65,0x6e,0x64,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x20,0x46,0x75,0x6c, - 0x6c,0x20,0x58,0x4d,0x4c,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x61,0x74, - 0x69,0x6f,0x6e,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64, - 0x20,0x69,0x6e,0x20,0x5b,0x44,0x42,0x47,0x50,0x20,0x73,0x70,0x65,0x63,0x69,0x66, - 0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, - 0x78,0x64,0x65,0x62,0x75,0x67,0x2e,0x6f,0x72,0x67,0x2f,0x64,0x6f,0x63,0x73,0x2d, - 0x64,0x62,0x67,0x70,0x2e,0x70,0x68,0x70,0x23,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x69,0x65,0x73,0x2d,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x2d,0x61,0x6e, - 0x64,0x2d,0x76,0x61,0x6c,0x75,0x65,0x73,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x4d,0x6f, - 0x64,0x69,0x66,0x79,0x69,0x6e,0x67,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69, - 0x65,0x73,0x20,0x61,0x66,0x74,0x65,0x72,0x20,0x74,0x68,0x65,0x69,0x72,0x20,0x67, - 0x65,0x6e,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x70,0x6f,0x73, - 0x73,0x69,0x62,0x6c,0x65,0x20,0x28,0x61,0x73,0x20,0x61,0x63,0x74,0x75,0x61,0x6c, - 0x20,0x64,0x61,0x74,0x61,0x20,0x73,0x65,0x72,0x69,0x61,0x6c,0x69,0x7a,0x61,0x74, - 0x69,0x6f,0x6e,0x2f,0x73,0x65,0x6e,0x64,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x64, - 0x65,0x6c,0x61,0x79,0x65,0x64,0x29,0x0a,0x2d,0x2d,0x20,0x62,0x75,0x74,0x20,0x73, - 0x68,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x77,0x69, - 0x74,0x68,0x20,0x63,0x61,0x72,0x65,0x2e,0x20,0x54,0x68,0x65,0x20,0x58,0x4d,0x4c, - 0x20,0x73,0x74,0x72,0x75,0x63,0x74,0x75,0x72,0x65,0x20,0x75,0x73,0x65,0x73,0x20, - 0x74,0x68,0x65,0x20,0x5b,0x4c,0x4f,0x4d,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f, - 0x2f,0x6d,0x61,0x74,0x74,0x68,0x65,0x77,0x77,0x69,0x6c,0x64,0x2e,0x63,0x6f,0x2e, - 0x75,0x6b,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x75,0x61,0x65, - 0x78,0x70,0x61,0x74,0x2f,0x6c,0x6f,0x6d,0x2e,0x68,0x74,0x6d,0x6c,0x29,0x0a,0x2d, - 0x2d,0x20,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x72,0x65,0x66,0x65,0x72,0x20, - 0x74,0x6f,0x20,0x74,0x68,0x65,0x73,0x65,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,0x6e, - 0x74,0x73,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x6d,0x6f,0x72,0x65,0x20,0x69, - 0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x61,0x62,0x6f,0x75, - 0x74,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20, - 0x49,0x6e,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x74, - 0x61,0x62,0x6c,0x65,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c,0x20,0x69,0x74,0x20, - 0x68,0x61,0x73,0x20,0x61,0x6e,0x20,0x61,0x72,0x72,0x61,0x79,0x20,0x70,0x61,0x72, - 0x74,0x2c,0x20,0x60,0x5b,0x31,0x5d,0x60,0x20,0x62,0x65,0x69,0x6e,0x67,0x20,0x74, - 0x68,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x70,0x72,0x65,0x73, - 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x28,0x62,0x61,0x73,0x65,0x36,0x34, - 0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x29,0x2c,0x0a,0x2d,0x2d,0x20,0x70,0x6f, - 0x73,0x73,0x69,0x62,0x6c,0x79,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20, - 0x62,0x79,0x20,0x63,0x68,0x6c,0x69,0x64,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x69,0x65,0x73,0x20,0x28,0x40,0x7b,0x23,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70, - 0x65,0x72,0x74,0x79,0x7d,0x20,0x74,0x68,0x65,0x6d,0x73,0x65,0x6c,0x76,0x65,0x73, - 0x29,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x69,0x65,0x6c,0x64,0x20,0x23, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x74,0x61,0x67,0x20,0x41,0x6c,0x77,0x61,0x79, - 0x73,0x20,0x22,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x22,0x0a,0x2d,0x2d,0x20, - 0x40,0x66,0x69,0x65,0x6c,0x64,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x61,0x74, - 0x74,0x72,0x20,0x58,0x4d,0x4c,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65, - 0x73,0x2c,0x20,0x73,0x65,0x65,0x20,0x44,0x42,0x47,0x50,0x20,0x73,0x70,0x65,0x63, - 0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x40,0x74,0x79, - 0x70,0x65,0x20,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x65,0x63,0x74,0x6f,0x72, - 0x73,0x20,0x74,0x61,0x62,0x6c,0x65,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e, - 0x20,0x61,0x6c,0x6c,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x4b,0x65,0x79, - 0x73,0x20,0x61,0x72,0x65,0x20,0x65,0x69,0x74,0x68,0x65,0x72,0x20,0x74,0x79,0x70, - 0x65,0x20,0x6e,0x61,0x6d,0x65,0x73,0x20,0x28,0x60,0x73,0x74,0x72,0x69,0x6e,0x67, - 0x60,0x2c,0x20,0x60,0x6e,0x75,0x6d,0x62,0x65,0x72,0x60,0x2c,0x20,0x2e,0x2e,0x2e, - 0x29,0x20,0x6f,0x72,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x0a, - 0x2d,0x2d,0x20,0x74,0x68,0x61,0x74,0x20,0x68,0x61,0x76,0x65,0x20,0x61,0x20,0x63, - 0x75,0x73,0x74,0x6f,0x6d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20, - 0x61,0x74,0x74,0x61,0x63,0x68,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x69, - 0x65,0x6c,0x64,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74, - 0x69,0x6f,0x6e,0x5d,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x73,0x70, - 0x65,0x63,0x74,0x6f,0x72,0x73,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x6f,0x72,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x2d,0x0a,0x2d, - 0x2d,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x61,0x20,0x44,0x42,0x47, - 0x50,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x69,0x66,0x20,0x6e,0x65, - 0x65,0x64,0x65,0x64,0x2e,0x20,0x49,0x66,0x20,0x64,0x61,0x74,0x61,0x20,0x69,0x73, - 0x20,0x69,0x6e,0x20,0x64,0x61,0x74,0x61,0x20,0x70,0x61,0x67,0x69,0x6e,0x61,0x74, - 0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x6f, - 0x6e,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x72,0x61,0x6e,0x67,0x65,0x73,0x2c,0x0a, - 0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x73,0x65,0x6e,0x64,0x20,0x61,0x20,0x70,0x72, - 0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x64,0x65, - 0x62,0x75,0x67,0x67,0x65,0x72,0x2c,0x20,0x6f,0x74,0x68,0x65,0x72,0x77,0x69,0x73, - 0x65,0x20,0x64,0x72,0x6f,0x70,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x20, - 0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x6e,0x61,0x6d,0x65,0x20,0x28,0x64, - 0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64,0x20,0x69,0x6e,0x20,0x49,0x44,0x45,0x29, - 0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x20,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,0x79,0x70,0x65, - 0x20,0x6e,0x61,0x6d,0x65,0x20,0x28,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64, - 0x20,0x69,0x6e,0x20,0x49,0x44,0x45,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x70,0x72,0x20, - 0x56,0x61,0x6c,0x75,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x70, - 0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x40, - 0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70,0x65, - 0x72,0x74,0x79,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x50,0x61,0x72,0x65,0x6e, - 0x74,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x20,0x40,0x70, - 0x61,0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x20,0x4c,0x75,0x61,0x20,0x65,0x78,0x70,0x72,0x65,0x73, - 0x73,0x69,0x6f,0x6e,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x67,0x65,0x74, - 0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x62,0x61,0x63,0x6b,0x20,0x69,0x6e,0x20,0x66, - 0x75,0x72,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6c,0x6c,0x73,0x0a,0x2d,0x2d,0x20, - 0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x64, - 0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x40,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d, - 0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73, - 0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x79,0x0a,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x3d,0x20,0x63, - 0x6f,0x79,0x69,0x65,0x6c,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x41, - 0x64,0x64,0x73,0x20,0x61,0x20,0x70,0x72,0x6f,0x62,0x65,0x20,0x74,0x68,0x61,0x74, - 0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20, - 0x66,0x6f,0x72,0x20,0x65,0x76,0x65,0x72,0x79,0x20,0x75,0x6e,0x6b,0x6e,0x6f,0x77, - 0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2f,0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61, - 0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x72,0x6f,0x62,0x65,0x20,0x49,0x6e,0x73,0x70, - 0x65,0x63,0x74,0x6f,0x72,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x74, - 0x6f,0x20,0x63,0x61,0x6c,0x6c,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65, - 0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63, - 0x74,0x69,0x6f,0x6e,0x5d,0x20,0x61,0x64,0x64,0x5f,0x70,0x72,0x6f,0x62,0x65,0x0a, - 0x4d,0x2e,0x61,0x64,0x64,0x5f,0x70,0x72,0x6f,0x62,0x65,0x20,0x3d,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x70,0x72,0x6f,0x62,0x65,0x29,0x20,0x70,0x72, - 0x6f,0x62,0x65,0x73,0x5b,0x23,0x70,0x72,0x6f,0x62,0x65,0x73,0x20,0x2b,0x20,0x31, - 0x5d,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,0x65,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x2d, - 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x73,0x20,0x61, - 0x20,0x4c,0x75,0x61,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x62,0x79,0x20,0x64,0x69, - 0x73,0x70,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x69,0x74,0x20,0x74,0x6f,0x20, - 0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f, - 0x72,0x2e,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x68,0x65,0x20, - 0x73,0x61,0x6d,0x65,0x20,0x41,0x50,0x49,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61, - 0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65, - 0x20,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x6e,0x61,0x6d,0x65,0x20,0x28, - 0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65, - 0x64,0x20,0x62,0x79,0x20,0x49,0x44,0x45,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61, - 0x72,0x61,0x6d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x56,0x61,0x6c,0x75,0x65,0x20, - 0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x0a,0x2d,0x2d,0x20,0x40,0x70, - 0x61,0x72,0x61,0x6d,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x70,0x61,0x72,0x65, - 0x6e,0x74,0x20,0x50,0x61,0x72,0x65,0x6e,0x74,0x20,0x70,0x72,0x6f,0x70,0x65,0x72, - 0x74,0x79,0x20,0x28,0x4c,0x4f,0x4d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6f,0x66, - 0x20,0x74,0x68,0x65,0x20,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d, - 0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d, - 0x65,0x20,0x45,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x75,0x73,0x65, - 0x64,0x20,0x74,0x6f,0x20,0x72,0x65,0x74,0x72,0x69,0x65,0x76,0x65,0x20,0x60,0x76, - 0x61,0x6c,0x75,0x65,0x60,0x20,0x66,0x6f,0x72,0x20,0x66,0x75,0x72,0x74,0x68,0x65, - 0x72,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x63,0x61,0x6c,0x6c,0x73, - 0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x44,0x42,0x47, - 0x50,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x54,0x68,0x65,0x20,0x69,0x6e, - 0x73,0x70,0x65,0x63,0x74,0x65,0x64,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x61,0x73, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x65,0x64,0x20,0x62,0x79,0x20,0x40,0x7b,0x64, - 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65, - 0x63,0x74,0x69,0x6f,0x6e,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69, - 0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,0x72,0x6f, - 0x70,0x65,0x72,0x74,0x79,0x7d,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x23,0x6e,0x69,0x6c,0x20,0x49,0x66,0x20,0x74,0x68,0x65,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x20,0x68,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x65, - 0x6e,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x40, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74, - 0x3d,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f, - 0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63, - 0x74,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x3d,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c, - 0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c, - 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x28,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x74, - 0x79,0x70,0x65,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x5d,0x20,0x6f,0x72,0x20,0x4d, - 0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x64,0x65,0x66,0x61, - 0x75,0x6c,0x74,0x29,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65, - 0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61, - 0x6d,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x55,0x74,0x69,0x6c,0x69,0x74,0x79,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x73,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d, - 0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x6f,0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20, - 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x79, - 0x70,0x65,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65, - 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x65,0x6e, - 0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x73,0x20,0x74, - 0x79,0x70,0x65,0x73,0x20,0x74,0x68,0x61,0x74,0x20,0x63,0x61,0x6e,0x20,0x68,0x61, - 0x76,0x65,0x20,0x61,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x28, - 0x74,0x61,0x62,0x6c,0x65,0x20,0x61,0x6e,0x64,0x20,0x75,0x73,0x65,0x72,0x64,0x61, - 0x74,0x61,0x29,0x2e,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20, - 0x20,0x20,0x31,0x29,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x64,0x20,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x32,0x29,0x20, - 0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x20,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x69, - 0x6e,0x67,0x20,0x77,0x68,0x65,0x74,0x68,0x65,0x72,0x20,0x61,0x20,0x63,0x75,0x73, - 0x74,0x6f,0x6d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x68,0x61, - 0x73,0x20,0x62,0x65,0x65,0x6e,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x28,0x69, - 0x6e,0x20,0x74,0x68,0x61,0x74,0x20,0x63,0x61,0x73,0x65,0x2c,0x20,0x64,0x6f,0x20, - 0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x63,0x65,0x73,0x73,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x20,0x61,0x6e,0x79,0x20,0x66,0x75,0x72,0x74,0x68,0x65,0x72,0x29,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x65, - 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f, - 0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70, - 0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x74,0x20,0x3d,0x20, - 0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x76,0x61,0x6c, - 0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x69,0x6e,0x64,0x20,0x20,0x62,0x79,0x20,0x6d, - 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x3d,0x20, - 0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x6d,0x74,0x5d, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x75,0x73,0x74, - 0x6f,0x6d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63, - 0x75,0x73,0x74,0x6f,0x6d,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e, - 0x61,0x6d,0x65,0x29,0x2c,0x20,0x74,0x72,0x75,0x65,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6f,0x72,0x20,0x65,0x6c,0x73, - 0x65,0x20,0x63,0x61,0x6c,0x6c,0x20,0x70,0x72,0x6f,0x62,0x65,0x73,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x23, - 0x70,0x72,0x6f,0x62,0x65,0x73,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d, - 0x20,0x70,0x72,0x6f,0x62,0x65,0x73,0x5b,0x69,0x5d,0x28,0x6e,0x61,0x6d,0x65,0x2c, - 0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20, - 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x74,0x72, - 0x75,0x65,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x64,0x65,0x66, - 0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x28,0x6e, - 0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65, - 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x6d,0x74,0x20,0x61,0x6e,0x64,0x20,0x70,0x72,0x6f,0x70, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x6d,0x74,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x4d,0x2e,0x69, - 0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x22,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c, - 0x65,0x22,0x2c,0x20,0x6d,0x74,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x22,0x6d, - 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5b,0x22,0x2e,0x2e,0x70,0x72,0x6f,0x70, - 0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2e,0x2e, - 0x22,0x5d,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6d,0x74,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x20,0x6d,0x74,0x70,0x72, - 0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x22, - 0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x70,0x72,0x6f,0x70,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x66,0x61,0x6e,0x63,0x79,0x5f,0x66,0x75,0x6e,0x63,0x5f,0x72,0x65,0x70,0x72,0x28, - 0x66,0x2c,0x20,0x69,0x6e,0x66,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x61,0x72,0x67,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20, - 0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x6e, - 0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x61,0x72,0x67,0x73,0x5b,0x69,0x5d,0x20,0x3d,0x20,0x64,0x65,0x62,0x75, - 0x67,0x2e,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x66,0x2c,0x20,0x69,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x69,0x6e,0x66,0x6f,0x2e,0x69,0x73,0x76,0x61,0x72,0x61,0x72,0x67,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x72,0x67,0x73, - 0x5b,0x23,0x61,0x72,0x67,0x73,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x2e,0x2e,0x2e, - 0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x22,0x20,0x2e,0x2e,0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x61,0x72,0x67, - 0x73,0x2c,0x20,0x22,0x2c,0x20,0x22,0x29,0x20,0x2e,0x2e,0x20,0x22,0x29,0x22,0x0a, - 0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74, - 0x65,0x20,0x61,0x20,0x6e,0x61,0x6d,0x65,0x20,0x73,0x69,0x75,0x74,0x61,0x62,0x6c, - 0x65,0x20,0x66,0x6f,0x72,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x64,0x65, - 0x78,0x20,0x73,0x79,0x6e,0x74,0x61,0x78,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x6e,0x61,0x6d,0x65,0x20,0x4b,0x65,0x79,0x20,0x6e,0x61,0x6d,0x65, - 0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x20,0x41,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x64,0x65, - 0x78,0x20,0x73,0x74,0x79,0x6c,0x65,0x20,0x69,0x6e,0x64,0x65,0x78,0x0a,0x2d,0x2d, - 0x20,0x40,0x75,0x73,0x61,0x67,0x65,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65, - 0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28,0x27, - 0x66,0x6f,0x6f,0x27,0x29,0x20,0x3d,0x3e,0x20,0x27,0x5b,0x22,0x66,0x6f,0x6f,0x22, - 0x5d,0x27,0x0a,0x2d,0x2d,0x20,0x40,0x75,0x73,0x61,0x67,0x65,0x20,0x67,0x65,0x6e, - 0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f, - 0x6b,0x65,0x79,0x28,0x31,0x32,0x29,0x20,0x20,0x20,0x20,0x3d,0x3e,0x20,0x27,0x5b, - 0x31,0x32,0x5d,0x27,0x0a,0x2d,0x2d,0x20,0x40,0x75,0x73,0x61,0x67,0x65,0x20,0x67, - 0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c, - 0x65,0x5f,0x6b,0x65,0x79,0x28,0x7b,0x7d,0x29,0x20,0x20,0x20,0x20,0x3d,0x3e,0x20, - 0x27,0x5b,0x74,0x61,0x62,0x6c,0x65,0x3a,0x20,0x30,0x78,0x31,0x32,0x33,0x34,0x35, - 0x36,0x37,0x38,0x5d,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f, - 0x6e,0x5d,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e, - 0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74, - 0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28, - 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x22,0x5b,0x22,0x20,0x2e,0x2e,0x20,0x28,0x74,0x79,0x70,0x65,0x28,0x6e,0x61, - 0x6d,0x65,0x29,0x20,0x3d,0x3d,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x20, - 0x61,0x6e,0x64,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x25,0x71,0x22, - 0x2c,0x20,0x6e,0x61,0x6d,0x65,0x29,0x20,0x6f,0x72,0x20,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x6e,0x61,0x6d,0x65,0x29,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d, - 0x22,0x0a,0x65,0x6e,0x64,0x0a,0x4d,0x2e,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65, - 0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x20,0x3d, - 0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61, - 0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x0a,0x0a,0x2d,0x2d,0x20,0x55,0x73,0x65,0x64, - 0x20,0x74,0x6f,0x20,0x73,0x74,0x6f,0x72,0x65,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65, - 0x78,0x20,0x6b,0x65,0x79,0x73,0x20,0x28,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x68, - 0x61,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x61,0x6e,0x64,0x20,0x6e,0x75, - 0x6d,0x62,0x65,0x72,0x29,0x20,0x61,0x73,0x20,0x74,0x68,0x65,0x79,0x20,0x63,0x61, - 0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x70,0x61,0x73,0x73,0x65,0x64,0x20,0x69, - 0x6e,0x20,0x74,0x65,0x78,0x74,0x0a,0x2d,0x2d,0x20,0x46,0x6f,0x72,0x20,0x74,0x68, - 0x65,0x73,0x65,0x20,0x6b,0x65,0x79,0x73,0x2c,0x20,0x74,0x68,0x65,0x20,0x72,0x65, - 0x73,0x75,0x6c,0x74,0x69,0x6e,0x67,0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69, - 0x6f,0x6e,0x20,0x77,0x69,0x6c,0x6c,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x74, - 0x68,0x65,0x20,0x6b,0x65,0x79,0x20,0x69,0x74,0x73,0x65,0x6c,0x66,0x20,0x62,0x75, - 0x74,0x20,0x22,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x5b,0x2e,0x2e,0x2e, - 0x5d,0x22,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x65,0x72,0x65,0x20,0x6b,0x65,0x79,0x5f, - 0x63,0x61,0x63,0x68,0x65,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x6d,0x61, - 0x70,0x70,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x74,0x61,0x62, - 0x6c,0x65,0x20,0x74,0x6f,0x20,0x72,0x65,0x73,0x6f,0x6c,0x76,0x65,0x20,0x6b,0x65, - 0x79,0x20,0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x6c,0x79,0x2e,0x0a,0x4d,0x2e,0x6b, - 0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65, - 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x6e,0x3d,0x30,0x20,0x7d,0x2c, - 0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x22,0x76,0x22,0x20, - 0x7d,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x6b,0x65,0x79,0x28, - 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x74,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x74,0x79,0x70,0x65,0x28,0x6e,0x61,0x6d, - 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x6e,0x61,0x6d,0x65,0x20, - 0x3d,0x3d,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28, - 0x22,0x25,0x71,0x22,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x3d,0x20, - 0x22,0x6e,0x75,0x6d,0x62,0x65,0x72,0x22,0x20,0x6f,0x72,0x20,0x74,0x6e,0x61,0x6d, - 0x65,0x20,0x3d,0x3d,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x22,0x20,0x74, - 0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c, - 0x73,0x65,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x78,0x20,0x6b,0x65, - 0x79,0x2c,0x20,0x75,0x73,0x65,0x20,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65, - 0x20,0x66,0x6f,0x72,0x20,0x6c,0x6f,0x6f,0x6b,0x75,0x70,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x20,0x3d,0x20,0x4d,0x2e, - 0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x2e,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x4d,0x2e,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x5b, - 0x69,0x5d,0x20,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x4d,0x2e,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x2e,0x6e,0x20, - 0x3d,0x20,0x69,0x2b,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x22,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x5b, - 0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x69,0x29,0x2e,0x2e, - 0x22,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x61,0x20, - 0x75,0x73,0x61,0x62,0x6c,0x65,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x20,0x76,0x61,0x6c,0x75,0x65,0x2e,0x0a,0x2d,0x2d,0x20, - 0x42,0x61,0x73,0x65,0x64,0x20,0x6f,0x6e,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20, - 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x61,0x6e,0x64,0x20,0x6b,0x65,0x79, - 0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61, - 0x20,0x76,0x61,0x6c,0x69,0x64,0x20,0x4c,0x75,0x61,0x20,0x65,0x78,0x70,0x72,0x65, - 0x73,0x73,0x69,0x6f,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x4b,0x65,0x79,0x20,0x63,0x61, - 0x6e,0x20,0x62,0x65,0x20,0x61,0x6e,0x79,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x28, - 0x61,0x73,0x20,0x61,0x6e,0x79,0x74,0x68,0x69,0x6e,0x67,0x20,0x63,0x61,0x6e,0x20, - 0x61,0x63,0x74,0x20,0x61,0x73,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6b,0x65,0x79, - 0x29,0x2e,0x20,0x49,0x66,0x20,0x69,0x74,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,0x0a, - 0x2d,0x2d,0x20,0x62,0x65,0x20,0x73,0x65,0x72,0x69,0x61,0x6c,0x69,0x7a,0x65,0x64, - 0x20,0x28,0x6f,0x6e,0x6c,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x6e, - 0x75,0x6d,0x62,0x65,0x72,0x20,0x61,0x6e,0x64,0x20,0x62,0x6f,0x6f,0x6c,0x65,0x61, - 0x6e,0x20,0x63,0x61,0x6e,0x29,0x2c,0x20,0x69,0x74,0x20,0x77,0x69,0x6c,0x6c,0x20, - 0x62,0x65,0x20,0x74,0x65,0x6d,0x70,0x6f,0x72,0x61,0x72,0x6c,0x79,0x0a,0x2d,0x2d, - 0x20,0x73,0x74,0x6f,0x72,0x65,0x64,0x20,0x69,0x6e,0x20,0x61,0x6e,0x20,0x69,0x6e, - 0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x74,0x6f,0x20, - 0x62,0x65,0x20,0x72,0x65,0x74,0x72,0x69,0x65,0x76,0x65,0x64,0x20,0x6c,0x61,0x74, - 0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x73, - 0x74,0x72,0x69,0x6e,0x67,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x50,0x61,0x72, - 0x65,0x6e,0x74,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x0a,0x2d,0x2d,0x20, - 0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6b,0x65,0x79,0x20,0x54,0x68,0x65,0x20,0x63, - 0x68,0x69,0x6c,0x64,0x20,0x6b,0x65,0x79,0x20,0x74,0x6f,0x20,0x67,0x65,0x6e,0x65, - 0x72,0x61,0x74,0x65,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x66,0x6f, - 0x72,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x20,0x41,0x20,0x76,0x61,0x6c,0x69,0x64,0x20,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e, - 0x0a,0x2d,0x2d,0x20,0x40,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70, - 0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e, - 0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x6d, - 0x61,0x6b,0x65,0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x0a,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x61,0x6b,0x65, - 0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x28,0x70,0x61,0x72,0x65,0x6e,0x74, - 0x2c,0x20,0x6b,0x65,0x79,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x2e,0x2e,0x20,0x22,0x5b,0x22,0x20, - 0x2e,0x2e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x6b,0x65,0x79,0x28, - 0x6b,0x65,0x79,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,0x22,0x0a,0x65,0x6e,0x64,0x0a, - 0x4d,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20, - 0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x0a, - 0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x20, - 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x20,0x2d,0x2d,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72, - 0x73,0x2e,0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x20,0x20,0x3d,0x20,0x64,0x65,0x66, - 0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d, - 0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x62,0x6f,0x6f,0x6c, - 0x65,0x61,0x6e,0x20,0x20,0x3d,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69, - 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65, - 0x63,0x74,0x6f,0x72,0x73,0x5b,0x22,0x6e,0x69,0x6c,0x22,0x5d,0x20,0x20,0x20,0x3d, - 0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x6f,0x72,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e, - 0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x64,0x65,0x66,0x61,0x75, - 0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d,0x2e,0x69, - 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x74,0x68,0x72,0x65,0x61,0x64, - 0x20,0x20,0x20,0x3d,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73, - 0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x6f,0x72,0x73,0x2e,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x20,0x3d,0x20,0x64, - 0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72, - 0x20,0x2d,0x2d,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x33,0x72,0x64,0x20,0x70, - 0x61,0x72,0x74,0x79,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x20, - 0x74,0x6f,0x20,0x75,0x73,0x65,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75, - 0x6c,0x74,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x69,0x66,0x20, - 0x6e,0x65,0x65,0x64,0x65,0x64,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63, - 0x74,0x6f,0x72,0x73,0x2e,0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x28,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5f,0x69,0x6e, - 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x29,0x20,0x2d,0x2d,0x20,0x64,0x72,0x6f,0x70,0x20, - 0x73,0x65,0x63,0x6f,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65, - 0x63,0x74,0x6f,0x72,0x73,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x65,0x73, - 0x63,0x61,0x70,0x65,0x20,0x6c,0x69,0x6e,0x65,0x62,0x72,0x65,0x61,0x6b,0x73,0x20, - 0x61,0x73,0x20,0x5c,0x6e,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x61,0x73, - 0x20,0x5c,0x3c,0x30,0x78,0x30,0x41,0x3e,0x20,0x6c,0x69,0x6b,0x65,0x20,0x25,0x71, - 0x20,0x64,0x6f,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65, - 0x2c,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x2c,0x20,0x73,0x66,0x6f,0x72, - 0x6d,0x61,0x74,0x28,0x22,0x25,0x71,0x22,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x29, - 0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5c,0x5c,0x5c,0x6e,0x22,0x2c,0x20,0x22,0x5c, - 0x5c,0x6e,0x22,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x69, - 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x22,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61, - 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d, - 0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x76, - 0x61,0x6c,0x75,0x65,0x2c,0x20,0x22,0x6e,0x53,0x66,0x6c,0x75,0x22,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x77,0x68,0x61,0x74,0x20,0x7e, - 0x3d,0x20,0x22,0x43,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x63,0x72,0x65, - 0x61,0x74,0x65,0x20,0x61,0x20,0x66,0x61,0x6e,0x63,0x79,0x20,0x72,0x65,0x70,0x72, - 0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x66,0x20,0x70,0x6f, - 0x73,0x73,0x69,0x62,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x69,0x6e,0x66,0x6f, - 0x2e,0x6e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x66,0x61,0x6e, - 0x63,0x79,0x5f,0x66,0x75,0x6e,0x63,0x5f,0x72,0x65,0x70,0x72,0x28,0x76,0x61,0x6c, - 0x75,0x65,0x2c,0x20,0x69,0x6e,0x66,0x6f,0x29,0x20,0x6f,0x72,0x20,0x74,0x6f,0x73, - 0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75, - 0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20, - 0x22,0x40,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x72,0x65,0x70,0x72, - 0x20,0x2e,0x2e,0x20,0x22,0x5c,0x6e,0x22,0x20,0x2e,0x2e,0x20,0x70,0x6c,0x61,0x74, - 0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x28,0x22,0x40,0x22, - 0x20,0x2e,0x2e,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29, - 0x20,0x2e,0x2e,0x20,0x22,0x5c,0x6e,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x6c,0x69,0x6e,0x65,0x64,0x65, - 0x66,0x69,0x6e,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x20, - 0x3d,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d, - 0x65,0x2c,0x20,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x4c,0x75, - 0x61,0x29,0x22,0x2c,0x20,0x72,0x65,0x70,0x72,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e, - 0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72, - 0x6f,0x70,0x20,0x3d,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28, - 0x6e,0x61,0x6d,0x65,0x2c,0x20,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x22, - 0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65, - 0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e, - 0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65, - 0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64, - 0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x28,0x35,0x2e,0x31,0x20,0x6f,0x6e, - 0x6c,0x79,0x29,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20, - 0x69,0x73,0x20,0x64,0x75,0x6d,0x70,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x69, - 0x66,0x20,0x69,0x74,0x20,0x69,0x73,0x20,0x64,0x69,0x66,0x66,0x65,0x72,0x65,0x6e, - 0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x65,0x6e, - 0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x6e, - 0x6f,0x74,0x20,0x61,0x20,0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x20,0x62,0x65,0x68, - 0x61,0x76,0x69,0x6f,0x72,0x3a,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65, - 0x6e,0x74,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x64,0x75,0x6d, - 0x70,0x65,0x64,0x20,0x69,0x66,0x20,0x69,0x73,0x20,0x64,0x69,0x66,0x66,0x65,0x72, - 0x65,0x6e,0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74, - 0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x6f,0x6e,0x65, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x65,0x6e,0x76,0x20, - 0x3d,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x20,0x61,0x6e,0x64,0x20,0x67,0x65, - 0x74,0x66,0x65,0x6e,0x76,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x66,0x65,0x6e,0x76,0x20,0x61,0x6e,0x64,0x20,0x66,0x65,0x6e, - 0x76,0x20,0x7e,0x3d,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x28,0x30,0x29,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x66,0x65,0x6e,0x76,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x4d,0x2e, - 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x22,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e, - 0x6d,0x65,0x6e,0x74,0x22,0x2c,0x20,0x66,0x65,0x6e,0x76,0x2c,0x20,0x70,0x72,0x6f, - 0x70,0x2c,0x20,0x22,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x5b, - 0x22,0x2e,0x2e,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x2e,0x2e,0x22,0x5d,0x22,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x65,0x6e,0x76,0x70,0x72,0x6f,0x70,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x66,0x65,0x6e,0x76,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74, - 0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x22,0x73,0x70,0x65,0x63,0x69, - 0x61,0x6c,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70, - 0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x6f,0x72,0x73,0x2e,0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65, - 0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61, - 0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72, - 0x6f,0x70,0x2c,0x20,0x69,0x73,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x3d,0x20,0x6d, - 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x6f,0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20, - 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f, - 0x70,0x20,0x6f,0x72,0x20,0x69,0x73,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x20,0x65, - 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x74,0x65,0x72,0x61, - 0x74,0x65,0x20,0x6f,0x76,0x65,0x72,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x64,0x65,0x74,0x65,0x63,0x74,0x20, - 0x61,0x72,0x72,0x61,0x79,0x73,0x20,0x61,0x74,0x20,0x74,0x68,0x65,0x20,0x73,0x61, - 0x6d,0x65,0x20,0x74,0x69,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6e, - 0x65,0x78,0x74,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x63, - 0x69,0x72,0x63,0x75,0x6d,0x76,0x65,0x6e,0x74,0x20,0x5f,0x5f,0x70,0x61,0x69,0x72, - 0x73,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20,0x69,0x6e,0x20, - 0x35,0x2e,0x32,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x73, - 0x61,0x72,0x72,0x61,0x79,0x2c,0x20,0x69,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c, - 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69, - 0x6e,0x20,0x6e,0x65,0x78,0x74,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x6e, - 0x69,0x6c,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e, - 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65, - 0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28,0x6b, - 0x29,0x2c,0x20,0x76,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x6d,0x61,0x6b,0x65, - 0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x28,0x66,0x75,0x6c,0x6c,0x6e,0x61, - 0x6d,0x65,0x2c,0x20,0x6b,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x61,0x72,0x72,0x61,0x79,0x20,0x64,0x65,0x74,0x65,0x63,0x74,0x69, - 0x6f,0x6e,0x3a,0x20,0x6b,0x65,0x79,0x73,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20, - 0x62,0x65,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x62,0x79, - 0x20,0x31,0x2e,0x2e,0x6e,0x20,0x6b,0x65,0x79,0x73,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x73,0x61,0x72,0x72,0x61,0x79,0x20,0x3d,0x20,0x69,0x73,0x61, - 0x72,0x72,0x61,0x79,0x20,0x61,0x6e,0x64,0x20,0x72,0x61,0x77,0x67,0x65,0x74,0x28, - 0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x69,0x29,0x20,0x7e,0x3d,0x20,0x6e,0x69,0x6c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x20,0x3d,0x20,0x69,0x20,0x2b, - 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x65,0x6d,0x70,0x74,0x79,0x20,0x74,0x61,0x62,0x6c,0x65,0x73,0x20,0x61, - 0x72,0x65,0x20,0x63,0x6f,0x6e,0x73,0x69,0x64,0x65,0x72,0x65,0x64,0x20,0x61,0x73, - 0x20,0x74,0x61,0x62,0x6c,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69, - 0x73,0x61,0x72,0x72,0x61,0x79,0x20,0x61,0x6e,0x64,0x20,0x69,0x20,0x3e,0x20,0x31, - 0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e, - 0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x22,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65, - 0x22,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x69,0x6e, - 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x4d,0x55,0x4c,0x54,0x49,0x56,0x41, - 0x4c,0x5f,0x4d,0x54,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61, - 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x76,0x61,0x6c,0x75,0x65,0x2e,0x6e,0x20,0x3d, - 0x3d,0x20,0x31,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x69,0x72,0x65,0x63, - 0x74,0x6c,0x79,0x20,0x74,0x68,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x61,0x73, - 0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x5b,0x31,0x5d,0x2c, - 0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d, - 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x72,0x61,0x70,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x73,0x20,0x69,0x6e,0x73,0x69,0x64,0x65,0x20,0x61,0x20,0x6d,0x75,0x6c,0x74, - 0x69,0x76,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x65,0x72,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f, - 0x70,0x20,0x3d,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e, - 0x61,0x6d,0x65,0x2c,0x20,0x22,0x6d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x22,0x2c, - 0x20,0x22,0x22,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20, - 0x76,0x61,0x6c,0x75,0x65,0x2e,0x6e,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x28,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61, - 0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28,0x69,0x29,0x2c,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x5b,0x69,0x5d,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x66,0x75,0x6c,0x6c, - 0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x22,0x5b,0x22,0x20,0x2e,0x2e,0x20,0x69, - 0x20,0x2e,0x2e,0x20,0x22,0x5d,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65, - 0x72,0x6e,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x0a, - 0x2d,0x2d,0x20,0x55,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65, - 0x63,0x74,0x20,0x22,0x6d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x22,0x20,0x6f,0x72, - 0x20,0x22,0x76,0x61,0x72,0x61,0x72,0x67,0x22,0x20,0x76,0x61,0x6c,0x75,0x65,0x73, - 0x2e,0x20,0x54,0x68,0x65,0x20,0x74,0x79,0x70,0x69,0x63,0x61,0x6c,0x20,0x75,0x73, - 0x65,0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x70,0x61,0x63,0x6b,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x28,0x73,0x29,0x20, - 0x69,0x6e,0x20,0x61,0x20,0x73,0x69,0x6e,0x67,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x20,0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x2e, - 0x20,0x54,0x68,0x65,0x20,0x4d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x20,0x69,0x6e, - 0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x70, - 0x61,0x73,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72, - 0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x61,0x73,0x20,0x61,0x20,0x73,0x69,0x6e,0x67, - 0x6c,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x74,0x68,0x65,0x79,0x20,0x77, - 0x69,0x6c,0x6c,0x20,0x62,0x65,0x0a,0x2d,0x2d,0x20,0x63,0x6f,0x72,0x72,0x65,0x63, - 0x74,0x6c,0x79,0x20,0x72,0x65,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x4d,0x2e,0x4d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x28,0x2e,0x2e,0x2e, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74, - 0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x6e,0x3d,0x73,0x65, - 0x6c,0x65,0x63,0x74,0x28,0x22,0x23,0x22,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x2c,0x20, - 0x2e,0x2e,0x2e,0x20,0x7d,0x2c,0x20,0x4d,0x55,0x4c,0x54,0x49,0x56,0x41,0x4c,0x5f, - 0x4d,0x54,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x4d,0x61,0x6b, - 0x65,0x73,0x20,0x61,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x66,0x6f, - 0x72,0x6d,0x20,0x61,0x20,0x6e,0x61,0x6d,0x65,0x2f,0x76,0x61,0x6c,0x75,0x65,0x20, - 0x70,0x61,0x69,0x72,0x20,0x28,0x61,0x6e,0x64,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61, - 0x6d,0x65,0x29,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x6e,0x20, - 0x2a,0x2a,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x2a,0x2a,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x73,0x68,0x6f,0x75,0x6c, - 0x64,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x62,0x79, - 0x20,0x33,0x72,0x64,0x20,0x70,0x61,0x72,0x74,0x79,0x20,0x69,0x6e,0x73,0x70,0x65, - 0x63,0x74,0x6f,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d, - 0x20,0x23,0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x63,0x78,0x74,0x5f,0x69,0x64,0x20, - 0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x49,0x44,0x20,0x69,0x6e,0x20,0x77,0x68, - 0x69,0x63,0x68,0x20,0x74,0x68,0x69,0x73,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x72, - 0x65,0x73,0x69,0x64,0x65,0x73,0x20,0x28,0x77,0x6f,0x72,0x6b,0x61,0x72,0x6f,0x75, - 0x6e,0x64,0x20,0x62,0x75,0x67,0x20,0x33,0x35,0x32,0x33,0x31,0x36,0x29,0x0a,0x2d, - 0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x54, - 0x68,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x74,0x6f,0x20,0x64,0x65,0x62,0x75, - 0x67,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6e,0x61,0x6d,0x65, - 0x20,0x54,0x68,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x61,0x73,0x73,0x6f,0x63,0x69, - 0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c, - 0x20,0x70,0x61,0x73,0x73,0x65,0x64,0x20,0x74,0x68,0x72,0x6f,0x75,0x67,0x68,0x20, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x73,0x6f,0x20,0x69,0x74,0x20, - 0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x61,0x6e,0x79,0x74,0x68,0x69,0x6e,0x67,0x0a, - 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e, - 0x67,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x41,0x20,0x4c,0x75,0x61, - 0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x65, - 0x76,0x61,0x6c,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x61,0x74,0x20, - 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x61,0x67,0x61,0x69,0x6e,0x20,0x28, - 0x69,0x66,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65,0x64, - 0x20,0x61,0x75,0x74,0x6f,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x6c,0x79,0x29,0x0a, - 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x6e,0x75,0x6d,0x62,0x65, - 0x72,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x54,0x68,0x65,0x20,0x6d,0x61,0x78,0x69, - 0x6d,0x75,0x6d,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x64,0x65,0x70, - 0x74,0x68,0x20,0x28,0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x76,0x65,0x20,0x63,0x61, - 0x6c,0x6c,0x73,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23, - 0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20, - 0x6d,0x61,0x78,0x69,0x6d,0x75,0x6d,0x20,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e, - 0x20,0x74,0x6f,0x20,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x0a,0x2d,0x2d,0x20,0x40, - 0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x70,0x61, - 0x67,0x65,0x20,0x54,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x74,0x6f,0x20,0x67, - 0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x28,0x30,0x20,0x62,0x61,0x73,0x65,0x64, - 0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x6e,0x75,0x6d, - 0x62,0x65,0x72,0x20,0x73,0x69,0x7a,0x65,0x5f,0x6c,0x69,0x6d,0x69,0x74,0x20,0x4f, - 0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2c,0x20,0x69,0x66,0x20,0x73,0x65,0x74,0x2c, - 0x20,0x74,0x68,0x65,0x20,0x6d,0x61,0x78,0x69,0x6d,0x75,0x6d,0x20,0x73,0x69,0x7a, - 0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20, - 0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x28, - 0x69,0x6e,0x20,0x62,0x79,0x74,0x65,0x73,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61, - 0x72,0x61,0x6d,0x20,0x23,0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x20,0x73,0x61,0x66, - 0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x49,0x66,0x20,0x74,0x72,0x75,0x65,0x2c,0x20, - 0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x20, - 0x74,0x68,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x61,0x73,0x20,0x74,0x61,0x62,0x6c, - 0x65,0x20,0x6b,0x65,0x79,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x23,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x72, - 0x6f,0x6f,0x74,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x20, - 0x40,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e, - 0x74,0x3d,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72, - 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x6d,0x61,0x6b,0x65,0x5f, - 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x54,0x4f,0x44,0x4f,0x20, - 0x42,0x55,0x47,0x20,0x45,0x43,0x4c,0x49,0x50,0x53,0x45,0x20,0x54,0x4f,0x4f,0x4c, - 0x53,0x4c,0x49,0x4e,0x55,0x58,0x2d,0x39,0x39,0x20,0x33,0x35,0x32,0x33,0x31,0x36, - 0x20,0x3a,0x20,0x61,0x73,0x20,0x61,0x20,0x77,0x6f,0x72,0x6b,0x61,0x72,0x6f,0x75, - 0x6e,0x64,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x73,0x20,0x65, - 0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x74,0x68,0x65,0x20, - 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x79,0x0a,0x4d,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x79,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x63,0x78,0x74, - 0x5f,0x69,0x64,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x6e,0x61,0x6d,0x65, - 0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x64,0x65,0x70,0x74, - 0x68,0x2c,0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x2c,0x20,0x70,0x61,0x67, - 0x65,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x6c,0x69,0x6d,0x69,0x74,0x2c,0x20,0x73, - 0x61,0x66,0x65,0x5f,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d, - 0x65,0x20,0x6f,0x72,0x20,0x22,0x28,0x2e,0x2e,0x2e,0x29,0x5b,0x22,0x20,0x2e,0x2e, - 0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x6b,0x65,0x79,0x28,0x6e,0x61, - 0x6d,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x61,0x66,0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x67,0x65,0x6e,0x65, - 0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b, - 0x65,0x79,0x28,0x6e,0x61,0x6d,0x65,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x6f, - 0x72,0x20,0x3d,0x20,0x63,0x6f,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d, - 0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e, - 0x61,0x6d,0x65,0x29,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x3d,0x20, - 0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x6f, - 0x6f,0x74,0x6e,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x3d,0x20,0x74,0x72,0x75, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x6f,0x64,0x65, - 0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20,0x3d,0x20,0x70,0x61,0x67,0x65,0x20,0x2a, - 0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x64, - 0x65,0x73,0x20,0x74,0x6f,0x20,0x73,0x6b,0x69,0x70,0x20,0x61,0x74,0x20,0x72,0x6f, - 0x6f,0x74,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x74,0x6f,0x20,0x72,0x65,0x73,0x70, - 0x65,0x63,0x74,0x20,0x70,0x61,0x67,0x69,0x6e,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d, - 0x65,0x5f,0x70,0x72,0x65,0x66,0x69,0x78,0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x69,0x64,0x29,0x2e,0x2e,0x22,0x7c,0x22, - 0x0a,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x74,0x72,0x75,0x65, - 0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20, - 0x64,0x61,0x74,0x61,0x74,0x79,0x70,0x65,0x2c,0x20,0x72,0x65,0x70,0x72,0x2c,0x20, - 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65, - 0x20,0x3d,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x63,0x6f,0x72,0x65,0x73,0x75, - 0x6d,0x65,0x28,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x6f,0x72,0x2c,0x20,0x63,0x61, - 0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x61,0x6e,0x64,0x20,0x70,0x72,0x6f,0x70, - 0x73,0x74,0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b, - 0x5d,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x69,0x6e,0x61,0x6c,0x69,0x7a,0x65,0x20,0x61, - 0x6e,0x64,0x20,0x70,0x6f,0x70,0x20,0x61,0x6c,0x6c,0x20,0x66,0x69,0x6e,0x69,0x73, - 0x68,0x65,0x64,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x70,0x72,0x6f, - 0x70,0x73,0x74,0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63, - 0x6b,0x5d,0x20,0x7e,0x3d,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x64,0x6f,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x74,0x6f,0x70,0x6f,0x70,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x73,0x74, - 0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x5d,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x6f,0x70,0x6f, - 0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20, - 0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x72,0x61,0x77,0x62,0x36,0x34,0x28,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x5f,0x70,0x72,0x65,0x66,0x69,0x78,0x20,0x2e,0x2e, - 0x20,0x74,0x6f,0x70,0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c,0x6c, - 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f, - 0x70,0x73,0x74,0x61,0x63,0x6b,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x73,0x74,0x61,0x74,0x75,0x73,0x28,0x67,0x65, - 0x6e,0x65,0x72,0x61,0x74,0x6f,0x72,0x29,0x20,0x3d,0x3d,0x20,0x22,0x64,0x65,0x61, - 0x64,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e, - 0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x70,0x72,0x6f,0x70,0x65, - 0x72,0x74,0x79,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20, - 0x30,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70, - 0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x70,0x61,0x67,0x65,0x73,0x69, - 0x7a,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x70,0x61,0x67,0x65,0x20,0x3d,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x61,0x6e, - 0x64,0x20,0x30,0x20,0x6f,0x72,0x20,0x70,0x61,0x67,0x65,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x79,0x70,0x65,0x20,0x3d,0x20, - 0x64,0x61,0x74,0x61,0x74,0x79,0x70,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6e,0x61,0x6d, - 0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66, - 0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61, - 0x6d,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x63,0x6f,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x22,0x62,0x61,0x73,0x65, - 0x36,0x34,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x23,0x72,0x65,0x70,0x72,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x62,0x36,0x34,0x28,0x73, - 0x69,0x7a,0x65,0x5f,0x6c,0x69,0x6d,0x69,0x74,0x20,0x61,0x6e,0x64,0x20,0x72,0x65, - 0x70,0x72,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x6c, - 0x69,0x6d,0x69,0x74,0x29,0x20,0x6f,0x72,0x20,0x72,0x65,0x70,0x72,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72, - 0x65,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x2e,0x63,0x68,0x69,0x6c,0x64,0x72,0x65, - 0x6e,0x20,0x3d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x2e,0x6e,0x75, - 0x6d,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20,0x28,0x70,0x61,0x72, - 0x65,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x2e,0x6e,0x75,0x6d,0x63,0x68,0x69,0x6c, - 0x64,0x72,0x65,0x6e,0x20,0x6f,0x72,0x20,0x30,0x29,0x20,0x2b,0x20,0x31,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x61, - 0x6b,0x65,0x20,0x70,0x61,0x67,0x69,0x6e,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x6e, - 0x74,0x6f,0x20,0x61,0x63,0x63,0x6f,0x6e,0x74,0x20,0x74,0x6f,0x20,0x6b,0x6e,0x6f, - 0x77,0x20,0x69,0x66,0x20,0x6e,0x6f,0x64,0x65,0x20,0x6e,0x65,0x65,0x64,0x73,0x20, - 0x74,0x6f,0x20,0x62,0x65,0x20,0x63,0x61,0x74,0x63,0x68,0x65,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x74,0x63,0x68,0x74, - 0x68,0x69,0x73,0x20,0x3d,0x20,0x23,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x3c,0x3d, - 0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20,0x61,0x6e,0x64,0x20,0x23,0x70, - 0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x3c,0x3d,0x20,0x64,0x65,0x70,0x74, - 0x68,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x72,0x6f,0x6f,0x74,0x6e, - 0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68, - 0x69,0x73,0x20,0x3d,0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x61, - 0x6e,0x64,0x20,0x6e,0x6f,0x64,0x65,0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20,0x3c, - 0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6e,0x6f,0x64,0x65,0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20, - 0x3d,0x20,0x6e,0x6f,0x64,0x65,0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20,0x2d,0x20, - 0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x61,0x64,0x64,0x20,0x6e,0x6f,0x64,0x65,0x20,0x74,0x6f,0x20,0x74,0x72,0x65, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61, - 0x72,0x65,0x6e,0x74,0x5b,0x23,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x2b,0x20,0x31, - 0x5d,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b, - 0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x2b,0x20,0x31,0x5d, - 0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x6f,0x6f,0x74,0x6e,0x6f,0x64,0x65,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x74, - 0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x73,0x74, - 0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x2b, - 0x20,0x31,0x5d,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x6f,0x6f,0x74,0x6e, - 0x6f,0x64,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f, - 0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66, - 0x69,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61, - 0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x75,0x67, - 0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70, - 0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x32,0x2d, - 0x32,0x30,0x31,0x33,0x20,0x4a,0x75,0x6c,0x69,0x65,0x6e,0x20,0x44,0x65,0x73,0x67, - 0x61,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74, - 0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73, - 0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65, - 0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61, - 0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d, - 0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e, - 0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66, - 0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62, - 0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30, - 0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70, - 0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72, - 0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20, - 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20, - 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70, - 0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c, - 0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20, - 0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d, - 0x20,0x20,0x20,0x20,0x20,0x4a,0x75,0x6c,0x69,0x65,0x6e,0x20,0x44,0x65,0x73,0x67, - 0x61,0x74,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50, - 0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61, - 0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4c,0x75,0x61,0x4a,0x49,0x54,0x20,0x63, - 0x64,0x61,0x74,0x61,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x6c,0x69,0x62,0x72,0x61,0x72,0x79,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x20, - 0x6b,0x6e,0x6f,0x77,0x6e,0x20,0x69,0x73,0x73,0x75,0x65,0x73,0x3a,0x0a,0x2d,0x2d, - 0x20,0x20,0x2a,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x61, - 0x72,0x65,0x20,0x64,0x65,0x2d,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x64, - 0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x69,0x66,0x20,0x69,0x6e,0x73,0x70,0x65,0x63, - 0x74,0x5f,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x69,0x73,0x20, - 0x75,0x6e,0x73,0x65,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x2a,0x20,0x69,0x73,0x20,0x61, - 0x75,0x74,0x6f,0x6d,0x61,0x74,0x69,0x63,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72, - 0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x20,0x64, - 0x65,0x2d,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x69,0x6e,0x67,0x20,0x69,0x73, - 0x20,0x70,0x6f,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x3f,0x0a,0x2d,0x2d,0x20,0x20, - 0x20,0x20,0x28,0x6f,0x6e,0x6c,0x79,0x20,0x66,0x6f,0x72,0x20,0x66,0x69,0x72,0x73, - 0x74,0x20,0x69,0x74,0x65,0x6d,0x20,0x69,0x6e,0x20,0x63,0x61,0x73,0x65,0x20,0x6f, - 0x66,0x20,0x61,0x72,0x72,0x61,0x79,0x73,0x29,0x2e,0x20,0x50,0x6f,0x73,0x73,0x69, - 0x62,0x6c,0x65,0x20,0x6c,0x65,0x61,0x64,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20, - 0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x74,0x61,0x63,0x6b,0x6f,0x76,0x65, - 0x72,0x66,0x6c,0x6f,0x77,0x2e,0x63,0x6f,0x6d,0x2f,0x71,0x75,0x65,0x73,0x74,0x69, - 0x6f,0x6e,0x73,0x2f,0x37,0x31,0x33,0x34,0x35,0x39,0x30,0x2f,0x68,0x6f,0x77,0x2d, - 0x74,0x6f,0x2d,0x74,0x65,0x73,0x74,0x2d,0x69,0x66,0x2d,0x61,0x6e,0x2d,0x61,0x64, - 0x64,0x72,0x65,0x73,0x73,0x2d,0x69,0x73,0x2d,0x72,0x65,0x61,0x64,0x61,0x62,0x6c, - 0x65,0x2d,0x69,0x6e,0x2d,0x6c,0x69,0x6e,0x75,0x78,0x2d,0x75,0x73,0x65,0x72,0x73, - 0x70,0x61,0x63,0x65,0x2d,0x61,0x70,0x70,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x68, - 0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x6f,0x66,0x74,0x77,0x61, - 0x72,0x65,0x76,0x65,0x72,0x69,0x66,0x79,0x2e,0x63,0x6f,0x6d,0x2f,0x62,0x6c,0x6f, - 0x67,0x2f,0x3f,0x70,0x3d,0x33,0x31,0x39,0x0a,0x2d,0x2d,0x20,0x20,0x2a,0x20,0x77, - 0x68,0x65,0x6e,0x20,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x20,0x61,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x20,0x66,0x72,0x6f,0x6d,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65, - 0x2c,0x20,0x74,0x68,0x65,0x20,0x74,0x79,0x70,0x65,0x20,0x69,0x73,0x20,0x73,0x6f, - 0x6d,0x65,0x74,0x69,0x6d,0x65,0x73,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x64,0x20, - 0x28,0x65,0x2e,0x67,0x2e,0x20,0x69,0x6e,0x74,0x20,0x3d,0x3e,0x20,0x6e,0x75,0x6d, - 0x62,0x65,0x72,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x74,0x72, - 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x72,0x65,0x71,0x75, - 0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e, - 0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x22,0x0a,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x71, - 0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70, - 0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66,0x6c,0x65, - 0x63,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x66,0x69,0x20,0x3d,0x20, - 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x66,0x66,0x69,0x22,0x0a,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x61, - 0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20, - 0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2c,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x20,0x74,0x79, - 0x70,0x65,0x2c,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x74,0x61,0x62,0x6c,0x65, - 0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d, - 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x57,0x68,0x65,0x74, - 0x68,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63, - 0x65,0x20,0x74,0x79,0x70,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x69,0x6e,0x73,0x70, - 0x65,0x63,0x74,0x65,0x64,0x2e,0x20,0x55,0x73,0x75,0x61,0x6c,0x6c,0x79,0x20,0x72, - 0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64, - 0x20,0x62,0x65,0x20,0x73,0x61,0x66,0x65,0x20,0x28,0x61,0x74,0x20,0x6c,0x65,0x61, - 0x73,0x74,0x20,0x61,0x20,0x62,0x69,0x74,0x0a,0x2d,0x2d,0x20,0x73,0x61,0x66,0x65, - 0x72,0x20,0x74,0x68,0x61,0x6e,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x73,0x29, - 0x20,0x73,0x6f,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x72,0x65,0x20,0x69,0x6e,0x73, - 0x70,0x65,0x63,0x74,0x65,0x64,0x2e,0x20,0x49,0x66,0x20,0x61,0x20,0x72,0x65,0x66, - 0x65,0x72,0x65,0x6e,0x63,0x65,0x20,0x70,0x6f,0x69,0x6e,0x74,0x73,0x20,0x74,0x6f, - 0x20,0x75,0x6e,0x73,0x61,0x66,0x65,0x20,0x6d,0x65,0x6d,0x6f,0x72,0x79,0x2c,0x20, - 0x74,0x68,0x65,0x20,0x77,0x68,0x6f,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x70,0x72,0x6f, - 0x67,0x72,0x61,0x6d,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x63,0x72,0x61,0x73,0x68, - 0x20,0x21,0x0a,0x2d,0x2d,0x20,0x49,0x66,0x20,0x74,0x68,0x69,0x73,0x20,0x66,0x65, - 0x61,0x74,0x75,0x72,0x65,0x20,0x69,0x73,0x20,0x64,0x69,0x73,0x61,0x62,0x6c,0x65, - 0x64,0x2c,0x20,0x64,0x65,0x65,0x70,0x6c,0x79,0x20,0x6e,0x65,0x73,0x74,0x65,0x64, - 0x20,0x43,0x20,0x74,0x79,0x70,0x65,0x73,0x20,0x77,0x69,0x6c,0x6c,0x20,0x6e,0x6f, - 0x74,0x20,0x62,0x65,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64,0x20,0x63, - 0x6f,0x72,0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x61,0x73,0x20,0x65,0x76,0x61,0x6c, - 0x75,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x68,0x61,0x73,0x20,0x61,0x20, - 0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x6f,0x6e,0x20,0x6c,0x69,0x6d,0x69,0x74,0x2c, - 0x20,0x61,0x6e,0x79,0x20,0x66,0x75,0x72,0x74,0x68,0x65,0x72,0x20,0x65,0x76,0x61, - 0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x64,0x6f,0x6e,0x65,0x20, - 0x74,0x68,0x72,0x6f,0x75,0x67,0x68,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63, - 0x65,0x73,0x2e,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x5f,0x72,0x65, - 0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65, - 0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74, - 0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68,0x61,0x74,0x0a,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6e,0x74,0x22,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x72,0x65,0x66,0x63,0x74,0x2e,0x62,0x6f,0x6f,0x6c,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x74,0x20,0x3d,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x20,0x43,0x39,0x39,0x20,0x74, - 0x79,0x70,0x65,0x20,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20, - 0x67,0x69,0x76,0x65,0x20,0x6d,0x6f,0x72,0x65,0x20,0x64,0x65,0x74,0x61,0x69,0x6c, - 0x73,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x61,0x63,0x75,0x74,0x61,0x6c,0x20,0x74, - 0x79,0x70,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x74,0x20,0x3d,0x20,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x75,0x6e,0x73,0x69,0x67, - 0x6e,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,0x22,0x75,0x69,0x6e,0x74,0x22,0x20,0x6f, - 0x72,0x20,0x22,0x69,0x6e,0x74,0x22,0x29,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20, - 0x2a,0x20,0x38,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5f,0x74,0x22,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73, - 0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,0x66,0x6c,0x6f,0x61,0x74,0x22, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x61,0x73,0x73,0x75,0x6d,0x65,0x20,0x49,0x45,0x45,0x45,0x37,0x35,0x34,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,0x3d,0x3d,0x20,0x20,0x38,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x74,0x20,0x3d,0x20,0x22,0x64,0x6f,0x75,0x62,0x6c,0x65, - 0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66, - 0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,0x3d,0x3d,0x20,0x31, - 0x36,0x20,0x74,0x68,0x65,0x6e,0x20,0x74,0x20,0x3d,0x20,0x22,0x6c,0x6f,0x6e,0x67, - 0x20,0x64,0x6f,0x75,0x62,0x6c,0x65,0x22,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x74,0x20, - 0x72,0x65,0x61,0x6c,0x6c,0x79,0x20,0x73,0x75,0x72,0x65,0x20,0x74,0x68,0x69,0x73, - 0x20,0x6f,0x6e,0x65,0x20,0x69,0x73,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x74, - 0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20, - 0x22,0x73,0x74,0x72,0x75,0x63,0x74,0x22,0x20,0x6f,0x72,0x20,0x74,0x20,0x3d,0x3d, - 0x20,0x22,0x65,0x6e,0x75,0x6d,0x22,0x20,0x6f,0x72,0x20,0x74,0x20,0x3d,0x3d,0x20, - 0x22,0x75,0x6e,0x69,0x6f,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6e, - 0x61,0x6d,0x65,0x20,0x61,0x6e,0x64,0x20,0x28,0x74,0x20,0x2e,0x2e,0x20,0x22,0x20, - 0x22,0x20,0x2e,0x2e,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6e,0x61,0x6d,0x65,0x29, - 0x20,0x6f,0x72,0x20,0x28,0x22,0x61,0x6e,0x6f,0x6e,0x79,0x6d,0x6f,0x75,0x73,0x20, - 0x22,0x2e,0x2e,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66, - 0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,0x66,0x75,0x6e,0x63,0x22,0x20,0x74,0x68,0x65, - 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d,0x20,0x22,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x46,0x46,0x49,0x29,0x22,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22, - 0x70,0x74,0x72,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x74,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e, - 0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65,0x6e, - 0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x2a,0x22,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22, - 0x72,0x65,0x66,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x74,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e, - 0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65,0x6e, - 0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x26,0x22,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22, - 0x66,0x69,0x65,0x6c,0x64,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x6b,0x65,0x5f, - 0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x74, - 0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20, - 0x74,0x20,0x3d,0x3d,0x20,0x22,0x62,0x69,0x74,0x66,0x69,0x65,0x6c,0x64,0x22,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d, - 0x20,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x2e,0x75,0x6e,0x73, - 0x69,0x67,0x6e,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,0x22,0x75,0x6e,0x73,0x69,0x67, - 0x6e,0x65,0x64,0x22,0x20,0x6f,0x72,0x20,0x22,0x73,0x69,0x67,0x6e,0x65,0x64,0x22, - 0x29,0x20,0x2e,0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20, - 0x2a,0x20,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66, - 0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x72,0x65,0x66,0x63,0x74,0x2e,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x74,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x20,0x22,0x20,0x2e,0x2e, - 0x20,0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x72,0x65, - 0x66,0x63,0x74,0x2e,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x20,0x74,0x68,0x65, - 0x6e,0x20,0x74,0x20,0x3d,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x20, - 0x22,0x20,0x2e,0x2e,0x20,0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20, - 0x69,0x66,0x20,0x63,0x64,0x61,0x74,0x61,0x6b,0x69,0x6e,0x64,0x20,0x69,0x73,0x20, - 0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x6f,0x6e, - 0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69, - 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f, - 0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x6f,0x72,0x73,0x2e,0x6e,0x75,0x6d,0x62,0x65,0x72,0x0a,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x0a,0x0a,0x2d,0x2d,0x20,0x72,0x65,0x63, - 0x75,0x72,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x68, - 0x61,0x6e,0x64,0x6c,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x73,0x6f,0x6d,0x65, - 0x20,0x63,0x61,0x72,0x65,0x3a,0x20,0x69,0x66,0x20,0x77,0x65,0x20,0x63,0x61,0x6c, - 0x6c,0x20,0x72,0x65,0x67,0x75,0x6c,0x61,0x72,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73, - 0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x0a, - 0x2d,0x2d,0x20,0x77,0x65,0x20,0x6d,0x61,0x79,0x20,0x63,0x72,0x65,0x61,0x74,0x65, - 0x20,0x62,0x6f,0x78,0x65,0x64,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65, - 0x73,0x20,0x6f,0x72,0x20,0x4c,0x75,0x61,0x20,0x6e,0x61,0x74,0x69,0x76,0x65,0x20, - 0x6f,0x62,0x6a,0x65,0x63,0x74,0x73,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x77,0x69, - 0x6c,0x6c,0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x65,0x64,0x20, - 0x61,0x73,0x20,0x73,0x75,0x63,0x68,0x0a,0x2d,0x2d,0x20,0x28,0x6c,0x65,0x61,0x64, - 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x77,0x72,0x6f,0x6e,0x67,0x20,0x74,0x79,0x70, - 0x65,0x20,0x6e,0x61,0x6d,0x65,0x73,0x29,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x65, - 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61, - 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20, - 0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79, - 0x70,0x65,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x20,0x3d,0x3d,0x20,0x22,0x63,0x64, - 0x61,0x74,0x61,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74, - 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61, - 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20, - 0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72, - 0x6f,0x70,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69, - 0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x6e,0x61,0x6d,0x65,0x2c, - 0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20, - 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x2e, - 0x61,0x74,0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65, - 0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x20,0x63,0x64,0x61,0x74,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x20, - 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x0a,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x20,0x3d,0x20,0x7b,0x0a, - 0x20,0x20,0x20,0x20,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e, - 0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d, - 0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6d,0x61, - 0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63, - 0x74,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c, - 0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x63,0x68,0x69,0x6c,0x64, - 0x72,0x65,0x6e,0x2c,0x20,0x69,0x66,0x20,0x6e,0x65,0x65,0x64,0x65,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x66,0x6f,0x72,0x20,0x6d,0x65,0x6d,0x62,0x65,0x72,0x20,0x69,0x6e,0x20,0x72,0x65, - 0x66,0x63,0x74,0x3a,0x6d,0x65,0x6d,0x62,0x65,0x72,0x73,0x28,0x29,0x20,0x64,0x6f, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6d, - 0x65,0x6d,0x62,0x65,0x72,0x2e,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x63,0x75,0x72, - 0x73,0x65,0x28,0x6d,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x5b, - 0x6d,0x6e,0x61,0x6d,0x65,0x5d,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61, - 0x74,0x28,0x27,0x5b,0x25,0x71,0x5d,0x27,0x2c,0x20,0x6d,0x6e,0x61,0x6d,0x65,0x29, - 0x2c,0x20,0x6d,0x65,0x6d,0x62,0x65,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x61,0x72,0x72,0x61,0x79,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x74,0x79, - 0x70,0x65,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65, - 0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x66,0x6f,0x72,0x20,0x56,0x4c,0x41,0x73,0x2c,0x20,0x72,0x65,0x66, - 0x6c,0x65,0x63,0x74,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x67,0x69, - 0x76,0x65,0x20,0x73,0x69,0x7a,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x72,0x65,0x66, - 0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,0x7e,0x3d,0x20,0x22,0x6e,0x6f,0x6e,0x65, - 0x22,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65, - 0x20,0x6f,0x72,0x20,0x66,0x66,0x69,0x2e,0x73,0x69,0x7a,0x65,0x6f,0x66,0x28,0x76, - 0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x69, - 0x7a,0x65,0x20,0x3d,0x20,0x73,0x69,0x7a,0x65,0x20,0x61,0x6e,0x64,0x20,0x28,0x73, - 0x69,0x7a,0x65,0x20,0x2f,0x20,0x65,0x74,0x79,0x70,0x65,0x2e,0x73,0x69,0x7a,0x65, - 0x29,0x20,0x2d,0x2d,0x20,0x77,0x65,0x27,0x76,0x65,0x20,0x67,0x6f,0x74,0x20,0x74, - 0x68,0x65,0x20,0x62,0x79,0x74,0x65,0x20,0x73,0x69,0x7a,0x65,0x2c,0x20,0x6e,0x6f, - 0x74,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x20,0x63,0x6f,0x75,0x6e,0x74,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74, - 0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74, - 0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x65,0x74,0x79,0x70,0x65,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f, - 0x70,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f, - 0x6e,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c, - 0x20,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x22,0x5b,0x22, - 0x20,0x2e,0x2e,0x20,0x28,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x73,0x69, - 0x7a,0x65,0x29,0x20,0x6f,0x72,0x20,0x22,0x22,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d, - 0x22,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75, - 0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c, - 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x61,0x6e,0x64,0x20,0x73,0x69,0x7a,0x65,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x30,0x2c,0x20,0x73,0x69,0x7a,0x65,0x2d,0x31, - 0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x64,0x78,0x20,0x3d,0x20, - 0x22,0x5b,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x69,0x29, - 0x2e,0x2e,0x22,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x65,0x28,0x69,0x64, - 0x78,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x5b,0x69,0x5d,0x2c,0x20,0x70,0x72,0x6f, - 0x70,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x69, - 0x64,0x78,0x2c,0x20,0x65,0x74,0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x72,0x67, - 0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x66,0x6f,0x72,0x20,0x61,0x72,0x67,0x20,0x69,0x6e,0x20,0x72,0x65,0x66,0x63,0x74, - 0x3a,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x28,0x29,0x20,0x64,0x6f,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x72,0x67,0x73, - 0x5b,0x23,0x61,0x72,0x67,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x6d,0x61, - 0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x61,0x72,0x67,0x2e, - 0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x20,0x22,0x20,0x2e,0x2e,0x20, - 0x61,0x72,0x67,0x2e,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x76,0x61,0x72,0x61,0x72,0x67,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61, - 0x72,0x67,0x73,0x5b,0x23,0x61,0x72,0x67,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d, - 0x20,0x22,0x2e,0x2e,0x2e,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79, - 0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x5f,0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x20,0x22, - 0x20,0x2e,0x2e,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6e,0x61,0x6d,0x65,0x20,0x2e, - 0x2e,0x20,0x22,0x28,0x22,0x20,0x2e,0x2e,0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74, - 0x28,0x61,0x72,0x67,0x73,0x2c,0x20,0x22,0x2c,0x20,0x22,0x29,0x20,0x2e,0x2e,0x20, - 0x22,0x29,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e, - 0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20, - 0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65, - 0x66,0x63,0x74,0x29,0x2c,0x20,0x72,0x65,0x70,0x72,0x2c,0x20,0x70,0x61,0x72,0x65, - 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x75,0x6d, - 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65, - 0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c, - 0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28, - 0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74, - 0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x69, - 0x6e,0x74,0x6f,0x20,0x65,0x6e,0x75,0x6d,0x20,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x69,0x73, - 0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x61,0x20,0x66,0x61,0x73,0x74,0x65,0x72,0x20, - 0x6d,0x65,0x74,0x68,0x6f,0x64,0x20,0x74,0x6f,0x20,0x6d,0x61,0x6b,0x65,0x20,0x69, - 0x74,0x20,0x3f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20, - 0x76,0x61,0x6c,0x20,0x69,0x6e,0x20,0x72,0x65,0x66,0x63,0x74,0x3a,0x76,0x61,0x6c, - 0x75,0x65,0x73,0x28,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x76,0x61,0x6c,0x2e,0x76,0x61,0x6c,0x75, - 0x65,0x20,0x3d,0x3d,0x20,0x72,0x65,0x70,0x72,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x70,0x72,0x20,0x3d,0x20,0x76,0x61,0x6c,0x2e,0x6e,0x61,0x6d,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62, - 0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6d,0x61, - 0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63, - 0x74,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x70, - 0x72,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c, - 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20, - 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65, - 0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x74,0x68,0x69,0x73,0x20,0x6d,0x61,0x79,0x20,0x62,0x65,0x20, - 0x75,0x6e,0x73,0x61,0x66,0x65,0x2c,0x20,0x73,0x65,0x65,0x20,0x69,0x6e,0x73,0x70, - 0x65,0x63,0x74,0x5f,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x73, - 0x65,0x74,0x74,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20, - 0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65, - 0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6e,0x6f,0x74,0x20,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x5f,0x72,0x65, - 0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x79, - 0x70,0x65,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67, - 0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c, - 0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x72,0x65,0x63, - 0x75,0x72,0x73,0x65,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65, - 0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61, - 0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65,0x6e, - 0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74, - 0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x79,0x70,0x65,0x6e,0x61, - 0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72, - 0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x69,0x6e,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72, - 0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72, - 0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69, - 0x6f,0x6e,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65, - 0x2c,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28, - 0x72,0x65,0x66,0x63,0x74,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67, - 0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x76,0x61,0x6c,0x75,0x65,0x29, - 0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e, - 0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x73,0x20,0x61, - 0x72,0x65,0x20,0x74,0x6f,0x6f,0x20,0x75,0x6e,0x73,0x61,0x66,0x65,0x2c,0x20,0x64, - 0x6f,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x74,0x68, - 0x65,0x6d,0x0a,0x20,0x20,0x20,0x20,0x70,0x74,0x72,0x20,0x3d,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e, - 0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f, - 0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70, - 0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x29,0x2c,0x20,0x74,0x6f, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x70, - 0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,0x0a,0x69,0x6e,0x73, - 0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x75,0x6e,0x69,0x6f,0x6e,0x20,0x3d,0x20, - 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x73,0x74,0x72,0x75,0x63, - 0x74,0x0a,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x66,0x6c,0x6f, - 0x61,0x74,0x20,0x3d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e, - 0x69,0x6e,0x74,0x0a,0x0a,0x2d,0x2d,0x20,0x66,0x6f,0x72,0x20,0x73,0x74,0x72,0x75, - 0x63,0x74,0x2f,0x75,0x6e,0x69,0x6f,0x6e,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c, - 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x74,0x79,0x70,0x65, - 0x20,0x69,0x73,0x20,0x6e,0x65,0x73,0x74,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20, - 0x74,0x68,0x65,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x69,0x6e,0x73,0x70,0x65,0x63, - 0x74,0x6f,0x72,0x73,0x2e,0x66,0x69,0x65,0x6c,0x64,0x20,0x3d,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75, - 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e, - 0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x6e, - 0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65, - 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65, - 0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x69,0x6e, - 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x62,0x69,0x74,0x66,0x69,0x65,0x6c, - 0x64,0x20,0x3d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x66, - 0x69,0x65,0x6c,0x64,0x0a,0x0a,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x6f,0x6e, - 0x6c,0x79,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x2c,0x20,0x6e,0x6f,0x74,0x20,0x63, - 0x74,0x79,0x70,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x46,0x49,0x58,0x4d, - 0x45,0x3a,0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x61,0x75,0x73,0x65,0x20,0x72,0x65, - 0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x64, - 0x65,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x64,0x20,0x61,0x6e,0x64,0x20, - 0x63,0x72,0x61,0x73,0x68,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x63,0x65,0x73, - 0x73,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x72,0x65,0x20,0x77,0x72, - 0x6f,0x6e,0x67,0x20,0x21,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x66,0x69, - 0x2e,0x74,0x79,0x70,0x65,0x6f,0x66,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x20,0x7e, - 0x3d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66, - 0x63,0x74,0x20,0x6f,0x72,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x74,0x79, - 0x70,0x65,0x6f,0x66,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x69,0x6e,0x73,0x70, - 0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68,0x61, - 0x74,0x5d,0x20,0x6f,0x72,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e, - 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x29,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75, - 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20,0x70, - 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x66,0x6f,0x72,0x20,0x63,0x74,0x79,0x70, - 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e, - 0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,0x72,0x6f,0x70, - 0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x22,0x63,0x74,0x79,0x70, - 0x65,0x22,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c, - 0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c, - 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x69,0x6e,0x74,0x72, - 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63, - 0x74,0x6f,0x72,0x73,0x2e,0x63,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x69,0x6e,0x73, - 0x70,0x65,0x63,0x74,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x0a,0x0a, - 0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d, - 0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c, - 0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20, - 0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x2e,0x70,0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66, - 0x6c,0x65,0x63,0x74,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65, - 0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70, - 0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66,0x6c,0x65, - 0x63,0x74,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x5b,0x5b,0x20,0x4c,0x75,0x61,0x4a,0x49,0x54, - 0x20,0x46,0x46,0x49,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x4c,0x69,0x62,0x72,0x61,0x72,0x79,0x20,0x5d,0x5d,0x2d,0x2d,0x0a,0x2d,0x2d,0x5b, - 0x5b,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x43,0x29,0x20, - 0x32,0x30,0x31,0x33,0x20,0x50,0x65,0x74,0x65,0x72,0x20,0x43,0x61,0x77,0x6c,0x65, - 0x79,0x20,0x3c,0x6c,0x75,0x61,0x40,0x63,0x6f,0x72,0x73,0x69,0x78,0x2e,0x6f,0x72, - 0x67,0x3e,0x2e,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72, - 0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x0a,0x0a,0x50,0x65,0x72,0x6d,0x69,0x73, - 0x73,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x68,0x65,0x72,0x65,0x62,0x79,0x20,0x67, - 0x72,0x61,0x6e,0x74,0x65,0x64,0x2c,0x20,0x66,0x72,0x65,0x65,0x20,0x6f,0x66,0x20, - 0x63,0x68,0x61,0x72,0x67,0x65,0x2c,0x20,0x74,0x6f,0x20,0x61,0x6e,0x79,0x20,0x70, - 0x65,0x72,0x73,0x6f,0x6e,0x20,0x6f,0x62,0x74,0x61,0x69,0x6e,0x69,0x6e,0x67,0x20, - 0x61,0x20,0x63,0x6f,0x70,0x79,0x0a,0x6f,0x66,0x20,0x74,0x68,0x69,0x73,0x20,0x73, - 0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x61,0x6e,0x64,0x20,0x61,0x73,0x73,0x6f, - 0x63,0x69,0x61,0x74,0x65,0x64,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x61, - 0x74,0x69,0x6f,0x6e,0x20,0x66,0x69,0x6c,0x65,0x73,0x20,0x28,0x74,0x68,0x65,0x20, - 0x22,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x22,0x29,0x2c,0x20,0x74,0x6f,0x20, - 0x64,0x65,0x61,0x6c,0x0a,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x53,0x6f,0x66,0x74, - 0x77,0x61,0x72,0x65,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x72,0x65,0x73, - 0x74,0x72,0x69,0x63,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x69,0x6e,0x63,0x6c,0x75,0x64, - 0x69,0x6e,0x67,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x6c,0x69,0x6d,0x69, - 0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x72,0x69,0x67,0x68,0x74, - 0x73,0x0a,0x74,0x6f,0x20,0x75,0x73,0x65,0x2c,0x20,0x63,0x6f,0x70,0x79,0x2c,0x20, - 0x6d,0x6f,0x64,0x69,0x66,0x79,0x2c,0x20,0x6d,0x65,0x72,0x67,0x65,0x2c,0x20,0x70, - 0x75,0x62,0x6c,0x69,0x73,0x68,0x2c,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75, - 0x74,0x65,0x2c,0x20,0x73,0x75,0x62,0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x2c,0x20, - 0x61,0x6e,0x64,0x2f,0x6f,0x72,0x20,0x73,0x65,0x6c,0x6c,0x0a,0x63,0x6f,0x70,0x69, - 0x65,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x53,0x6f,0x66,0x74,0x77,0x61, - 0x72,0x65,0x2c,0x20,0x61,0x6e,0x64,0x20,0x74,0x6f,0x20,0x70,0x65,0x72,0x6d,0x69, - 0x74,0x20,0x70,0x65,0x72,0x73,0x6f,0x6e,0x73,0x20,0x74,0x6f,0x20,0x77,0x68,0x6f, - 0x6d,0x20,0x74,0x68,0x65,0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x69, - 0x73,0x0a,0x66,0x75,0x72,0x6e,0x69,0x73,0x68,0x65,0x64,0x20,0x74,0x6f,0x20,0x64, - 0x6f,0x20,0x73,0x6f,0x2c,0x20,0x73,0x75,0x62,0x6a,0x65,0x63,0x74,0x20,0x74,0x6f, - 0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20,0x63, - 0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x73,0x3a,0x0a,0x0a,0x54,0x68,0x65,0x20, - 0x61,0x62,0x6f,0x76,0x65,0x20,0x63,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20, - 0x6e,0x6f,0x74,0x69,0x63,0x65,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x69,0x73,0x20, - 0x70,0x65,0x72,0x6d,0x69,0x73,0x73,0x69,0x6f,0x6e,0x20,0x6e,0x6f,0x74,0x69,0x63, - 0x65,0x20,0x73,0x68,0x61,0x6c,0x6c,0x20,0x62,0x65,0x20,0x69,0x6e,0x63,0x6c,0x75, - 0x64,0x65,0x64,0x20,0x69,0x6e,0x0a,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x70,0x69,0x65, - 0x73,0x20,0x6f,0x72,0x20,0x73,0x75,0x62,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x6c, - 0x20,0x70,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, - 0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x2e,0x0a,0x0a,0x54,0x48,0x45,0x20, - 0x53,0x4f,0x46,0x54,0x57,0x41,0x52,0x45,0x20,0x49,0x53,0x20,0x50,0x52,0x4f,0x56, - 0x49,0x44,0x45,0x44,0x20,0x22,0x41,0x53,0x20,0x49,0x53,0x22,0x2c,0x20,0x57,0x49, - 0x54,0x48,0x4f,0x55,0x54,0x20,0x57,0x41,0x52,0x52,0x41,0x4e,0x54,0x59,0x20,0x4f, - 0x46,0x20,0x41,0x4e,0x59,0x20,0x4b,0x49,0x4e,0x44,0x2c,0x20,0x45,0x58,0x50,0x52, - 0x45,0x53,0x53,0x20,0x4f,0x52,0x0a,0x49,0x4d,0x50,0x4c,0x49,0x45,0x44,0x2c,0x20, - 0x49,0x4e,0x43,0x4c,0x55,0x44,0x49,0x4e,0x47,0x20,0x42,0x55,0x54,0x20,0x4e,0x4f, - 0x54,0x20,0x4c,0x49,0x4d,0x49,0x54,0x45,0x44,0x20,0x54,0x4f,0x20,0x54,0x48,0x45, - 0x20,0x57,0x41,0x52,0x52,0x41,0x4e,0x54,0x49,0x45,0x53,0x20,0x4f,0x46,0x20,0x4d, - 0x45,0x52,0x43,0x48,0x41,0x4e,0x54,0x41,0x42,0x49,0x4c,0x49,0x54,0x59,0x2c,0x0a, - 0x46,0x49,0x54,0x4e,0x45,0x53,0x53,0x20,0x46,0x4f,0x52,0x20,0x41,0x20,0x50,0x41, - 0x52,0x54,0x49,0x43,0x55,0x4c,0x41,0x52,0x20,0x50,0x55,0x52,0x50,0x4f,0x53,0x45, - 0x20,0x41,0x4e,0x44,0x20,0x4e,0x4f,0x4e,0x49,0x4e,0x46,0x52,0x49,0x4e,0x47,0x45, - 0x4d,0x45,0x4e,0x54,0x2e,0x20,0x20,0x49,0x4e,0x20,0x4e,0x4f,0x20,0x45,0x56,0x45, - 0x4e,0x54,0x20,0x53,0x48,0x41,0x4c,0x4c,0x20,0x54,0x48,0x45,0x0a,0x41,0x55,0x54, - 0x48,0x4f,0x52,0x53,0x20,0x4f,0x52,0x20,0x43,0x4f,0x50,0x59,0x52,0x49,0x47,0x48, - 0x54,0x20,0x48,0x4f,0x4c,0x44,0x45,0x52,0x53,0x20,0x42,0x45,0x20,0x4c,0x49,0x41, - 0x42,0x4c,0x45,0x20,0x46,0x4f,0x52,0x20,0x41,0x4e,0x59,0x20,0x43,0x4c,0x41,0x49, - 0x4d,0x2c,0x20,0x44,0x41,0x4d,0x41,0x47,0x45,0x53,0x20,0x4f,0x52,0x20,0x4f,0x54, - 0x48,0x45,0x52,0x0a,0x4c,0x49,0x41,0x42,0x49,0x4c,0x49,0x54,0x59,0x2c,0x20,0x57, - 0x48,0x45,0x54,0x48,0x45,0x52,0x20,0x49,0x4e,0x20,0x41,0x4e,0x20,0x41,0x43,0x54, - 0x49,0x4f,0x4e,0x20,0x4f,0x46,0x20,0x43,0x4f,0x4e,0x54,0x52,0x41,0x43,0x54,0x2c, - 0x20,0x54,0x4f,0x52,0x54,0x20,0x4f,0x52,0x20,0x4f,0x54,0x48,0x45,0x52,0x57,0x49, - 0x53,0x45,0x2c,0x20,0x41,0x52,0x49,0x53,0x49,0x4e,0x47,0x20,0x46,0x52,0x4f,0x4d, - 0x2c,0x0a,0x4f,0x55,0x54,0x20,0x4f,0x46,0x20,0x4f,0x52,0x20,0x49,0x4e,0x20,0x43, - 0x4f,0x4e,0x4e,0x45,0x43,0x54,0x49,0x4f,0x4e,0x20,0x57,0x49,0x54,0x48,0x20,0x54, - 0x48,0x45,0x20,0x53,0x4f,0x46,0x54,0x57,0x41,0x52,0x45,0x20,0x4f,0x52,0x20,0x54, - 0x48,0x45,0x20,0x55,0x53,0x45,0x20,0x4f,0x52,0x20,0x4f,0x54,0x48,0x45,0x52,0x20, - 0x44,0x45,0x41,0x4c,0x49,0x4e,0x47,0x53,0x20,0x49,0x4e,0x0a,0x54,0x48,0x45,0x20, - 0x53,0x4f,0x46,0x54,0x57,0x41,0x52,0x45,0x2e,0x0a,0x2d,0x2d,0x5d,0x5d,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x66,0x66,0x69,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69, - 0x72,0x65,0x20,0x22,0x66,0x66,0x69,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62, - 0x69,0x74,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x62,0x69, - 0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74, - 0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x6c,0x65,0x76,0x61, - 0x6e,0x74,0x20,0x6d,0x69,0x6e,0x69,0x6d,0x61,0x6c,0x20,0x64,0x65,0x66,0x69,0x6e, - 0x69,0x74,0x69,0x6f,0x6e,0x73,0x20,0x66,0x72,0x6f,0x6d,0x20,0x6c,0x6a,0x5f,0x63, - 0x74,0x79,0x70,0x65,0x2e,0x68,0x0a,0x66,0x66,0x69,0x2e,0x63,0x64,0x65,0x66,0x20, - 0x5b,0x5b,0x0a,0x20,0x20,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20,0x73,0x74,0x72, - 0x75,0x63,0x74,0x20,0x43,0x54,0x79,0x70,0x65,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20, - 0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20,0x69,0x6e,0x66,0x6f,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20,0x73,0x69,0x7a,0x65, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x31,0x36,0x5f,0x74,0x20,0x73, - 0x69,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x31,0x36,0x5f,0x74, - 0x20,0x6e,0x65,0x78,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33, - 0x32,0x5f,0x74,0x20,0x6e,0x61,0x6d,0x65,0x3b,0x0a,0x20,0x20,0x7d,0x20,0x43,0x54, - 0x79,0x70,0x65,0x3b,0x0a,0x0a,0x20,0x20,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20, - 0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x20,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x43,0x54,0x79,0x70,0x65,0x20,0x2a,0x74,0x61,0x62,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20,0x74,0x6f, - 0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20, - 0x73,0x69,0x7a,0x65,0x74,0x61,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69, - 0x64,0x20,0x2a,0x4c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69,0x64,0x20,0x2a, - 0x67,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69,0x64,0x20,0x2a,0x66,0x69,0x6e, - 0x61,0x6c,0x69,0x7a,0x65,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69,0x64, - 0x20,0x2a,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x3b,0x0a,0x20,0x20,0x7d,0x20,0x43, - 0x54,0x53,0x74,0x61,0x74,0x65,0x3b,0x0a,0x5d,0x5d,0x0a,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x63,0x5f,0x73,0x74, - 0x72,0x28,0x67,0x63,0x72,0x65,0x66,0x29,0x20,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x76, - 0x65,0x72,0x74,0x20,0x61,0x20,0x47,0x43,0x72,0x65,0x66,0x20,0x28,0x74,0x6f,0x20, - 0x61,0x20,0x47,0x43,0x73,0x74,0x72,0x29,0x20,0x69,0x6e,0x74,0x6f,0x20,0x61,0x20, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x69,0x66,0x20,0x67,0x63,0x72,0x65, - 0x66,0x20,0x7e,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x73,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63, - 0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x2a,0x22,0x2c, - 0x20,0x67,0x63,0x72,0x65,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x66,0x66,0x69,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x73, - 0x20,0x2b,0x20,0x34,0x2c,0x20,0x74,0x73,0x5b,0x33,0x5d,0x29,0x0a,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x6d,0x70,0x74,0x72,0x28,0x67,0x63, - 0x6f,0x62,0x6a,0x29,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x6f, - 0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28, - 0x67,0x63,0x6f,0x62,0x6a,0x29,0x3a,0x6d,0x61,0x74,0x63,0x68,0x22,0x25,0x78,0x2a, - 0x24,0x22,0x2c,0x20,0x31,0x36,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20, - 0x41,0x63,0x71,0x75,0x69,0x72,0x65,0x20,0x61,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65, - 0x72,0x20,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x4c,0x75,0x61,0x20,0x75,0x6e, - 0x69,0x76,0x65,0x72,0x73,0x65,0x27,0x73,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x20,0x64, - 0x6f,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x20,0x3d,0x20,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63,0x72,0x65,0x61,0x74,0x65,0x28, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x65,0x6e,0x64,0x29,0x20,0x2d, - 0x2d,0x20,0x41,0x6e,0x79,0x20,0x6c,0x69,0x76,0x65,0x20,0x63,0x6f,0x72,0x6f,0x75, - 0x74,0x69,0x6e,0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x64,0x6f,0x2e,0x0a,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72, - 0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x74,0x79,0x70,0x65,0x6f,0x66,0x28,0x22,0x75, - 0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x2a,0x22,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x47,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73,0x74,0x28, - 0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72,0x2c,0x20,0x66,0x66,0x69,0x2e, - 0x63,0x61,0x73,0x74,0x28,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72,0x2c, - 0x20,0x6d,0x65,0x6d,0x70,0x74,0x72,0x28,0x63,0x6f,0x29,0x29,0x5b,0x32,0x5d,0x29, - 0x0a,0x20,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f, - 0x53,0x74,0x61,0x74,0x65,0x2c,0x20,0x60,0x4d,0x52,0x65,0x66,0x20,0x63,0x74,0x79, - 0x70,0x65,0x5f,0x73,0x74,0x61,0x74,0x65,0x60,0x20,0x69,0x73,0x20,0x69,0x6d,0x6d, - 0x65,0x64,0x69,0x61,0x74,0x65,0x6c,0x79,0x20,0x62,0x65,0x66,0x6f,0x72,0x65,0x20, - 0x60,0x47,0x43,0x52,0x65,0x66,0x20,0x67,0x63,0x72,0x6f,0x6f,0x74,0x5b,0x47,0x43, - 0x52,0x4f,0x4f,0x54,0x5f,0x4d,0x41,0x58,0x5d,0x60,0x2e,0x0a,0x20,0x20,0x2d,0x2d, - 0x20,0x57,0x65,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x66,0x69,0x6e,0x64,0x20,0x28, - 0x61,0x6e,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x69,0x6e,0x29,0x20,0x67,0x63,0x72, - 0x6f,0x6f,0x74,0x20,0x62,0x79,0x20,0x6c,0x6f,0x6f,0x6b,0x69,0x6e,0x67,0x20,0x66, - 0x6f,0x72,0x20,0x61,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20, - 0x6e,0x61,0x6d,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x0a,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x20,0x3d,0x20,0x66,0x66, - 0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74, - 0x22,0x2c,0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x63,0x6f,0x6e, - 0x73,0x74,0x20,0x63,0x68,0x61,0x72,0x2a,0x22,0x2c,0x20,0x22,0x5f,0x5f,0x69,0x6e, - 0x64,0x65,0x78,0x22,0x29,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69, - 0x20,0x3d,0x20,0x30,0x0a,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x6d,0x61,0x74, - 0x68,0x2e,0x61,0x62,0x73,0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x47, - 0x5b,0x69,0x5d,0x20,0x2d,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x29,0x29,0x20,0x3e, - 0x20,0x36,0x34,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x69,0x20,0x3d,0x20,0x69, - 0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x2d,0x2d,0x20, - 0x57,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x77,0x6f,0x72,0x6b,0x20,0x62,0x61,0x63, - 0x6b,0x77,0x61,0x72,0x64,0x73,0x20,0x6c,0x6f,0x6f,0x6b,0x69,0x6e,0x67,0x20,0x66, - 0x6f,0x72,0x20,0x73,0x6f,0x6d,0x65,0x74,0x68,0x69,0x6e,0x67,0x20,0x72,0x65,0x73, - 0x65,0x6d,0x62,0x6c,0x69,0x6e,0x67,0x20,0x63,0x74,0x79,0x70,0x65,0x5f,0x73,0x74, - 0x61,0x74,0x65,0x2e,0x0a,0x20,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x0a,0x20,0x20, - 0x20,0x20,0x69,0x20,0x3d,0x20,0x69,0x20,0x2d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20, - 0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,0x61, - 0x73,0x74,0x28,0x22,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2a,0x22,0x2c,0x20,0x47, - 0x5b,0x69,0x5d,0x29,0x0a,0x20,0x20,0x75,0x6e,0x74,0x69,0x6c,0x20,0x66,0x66,0x69, - 0x2e,0x63,0x61,0x73,0x74,0x28,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72, - 0x2c,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x67,0x29,0x20,0x3d,0x3d,0x20, - 0x47,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x41,0x63,0x71,0x75,0x69,0x72, - 0x65,0x20,0x74,0x68,0x65,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x27,0x73,0x20, - 0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x61,0x73, - 0x20,0x61,0x20,0x4c,0x75,0x61,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x20,0x64,0x6f, - 0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b, - 0x20,0x74,0x5b,0x30,0x5d,0x20,0x3d,0x20,0x74,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x74,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63, - 0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x2a,0x22,0x2c, - 0x20,0x6d,0x65,0x6d,0x70,0x74,0x72,0x28,0x74,0x29,0x29,0x5b,0x32,0x5d,0x0a,0x20, - 0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33, - 0x32,0x5f,0x74,0x2a,0x22,0x2c,0x20,0x74,0x76,0x61,0x6c,0x75,0x65,0x29,0x5b,0x66, - 0x66,0x69,0x2e,0x61,0x62,0x69,0x22,0x6c,0x65,0x22,0x20,0x61,0x6e,0x64,0x20,0x30, - 0x20,0x6f,0x72,0x20,0x31,0x5d,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73, - 0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x22,0x2c,0x20,0x66,0x66, - 0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x70,0x74,0x72,0x5f, - 0x74,0x22,0x2c,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x6d,0x69,0x73,0x63, - 0x6d,0x61,0x70,0x29,0x29,0x0a,0x20,0x20,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x20, - 0x3d,0x20,0x74,0x5b,0x30,0x5d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x49, - 0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x6f,0x72,0x20,0x75, - 0x6e,0x70,0x61,0x63,0x6b,0x69,0x6e,0x67,0x20,0x61,0x20,0x60,0x73,0x74,0x72,0x75, - 0x63,0x74,0x20,0x43,0x54,0x79,0x70,0x65,0x60,0x2e,0x0a,0x2d,0x2d,0x20,0x4f,0x6e, - 0x65,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x70,0x65,0x72,0x20,0x43,0x54,0x5f,0x2a, - 0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x61, - 0x69,0x6e,0x69,0x6e,0x67,0x3a,0x0a,0x2d,0x2d,0x20,0x2a,0x20,0x41,0x20,0x6e,0x61, - 0x6d,0x65,0x20,0x66,0x6f,0x72,0x20,0x74,0x68,0x61,0x74,0x20,0x43,0x54,0x5f,0x0a, - 0x2d,0x2d,0x20,0x2a,0x20,0x52,0x6f,0x6c,0x65,0x73,0x20,0x6f,0x66,0x20,0x74,0x68, - 0x65,0x20,0x63,0x69,0x64,0x20,0x61,0x6e,0x64,0x20,0x73,0x69,0x7a,0x65,0x20,0x66, - 0x69,0x65,0x6c,0x64,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x2a,0x20,0x57,0x68,0x65,0x74, - 0x68,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x69,0x62,0x20,0x66,0x69,0x65,0x6c, - 0x64,0x20,0x69,0x73,0x20,0x6d,0x65,0x61,0x6e,0x69,0x6e,0x67,0x66,0x75,0x6c,0x2e, - 0x0a,0x2d,0x2d,0x20,0x2a,0x20,0x5a,0x65,0x72,0x6f,0x20,0x6f,0x72,0x20,0x6d,0x6f, - 0x72,0x65,0x20,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65,0x20,0x62,0x6f, - 0x6f,0x6c,0x65,0x61,0x6e,0x20,0x66,0x6c,0x61,0x67,0x73,0x2e,0x0a,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x43,0x54,0x73,0x20,0x3d,0x20,0x7b,0x5b,0x30,0x5d,0x20,0x3d,0x0a, - 0x20,0x20,0x7b,0x22,0x69,0x6e,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x22, - 0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30, - 0x2c,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b, - 0x30,0x78,0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x66,0x6c,0x6f, - 0x61,0x74,0x22,0x2c,0x20,0x22,0x73,0x75,0x62,0x77,0x68,0x61,0x74,0x22,0x7d,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30,0x30, - 0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6f, - 0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30, - 0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x75,0x6e,0x73,0x69, - 0x67,0x6e,0x65,0x64,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30, - 0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x6c,0x6f,0x6e,0x67,0x22,0x7d, - 0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x73,0x74,0x72,0x75,0x63, - 0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a, - 0x65,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30, - 0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73, - 0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30, - 0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22, - 0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30, - 0x30,0x30,0x2c,0x20,0x22,0x75,0x6e,0x69,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x73,0x75, - 0x62,0x77,0x68,0x61,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78, - 0x30,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6c,0x61,0x22,0x7d, - 0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x70,0x74,0x72,0x22,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x22,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74,0x79, - 0x70,0x65,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20,0x66,0x61,0x6c, - 0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30, - 0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20, - 0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x7b,0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x72, - 0x65,0x66,0x22,0x2c,0x20,0x22,0x73,0x75,0x62,0x77,0x68,0x61,0x74,0x22,0x7d,0x2c, - 0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x61,0x72,0x72,0x61,0x79,0x22, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74, - 0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20,0x66,0x61, - 0x6c,0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x38,0x30,0x30, - 0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x65,0x63,0x74,0x6f,0x72,0x22,0x7d,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x30, - 0x2c,0x20,0x22,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x78,0x22,0x7d,0x2c,0x0a,0x20,0x20, - 0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22, - 0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78, - 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74, - 0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x30, - 0x31,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6c,0x61,0x22,0x7d,0x2c,0x0a, - 0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x76,0x6f,0x69,0x64,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x22,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20, - 0x66,0x61,0x6c,0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32, - 0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30, - 0x30,0x2c,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a, - 0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x65,0x6e,0x75,0x6d,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a, - 0x65,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20, - 0x20,0x7b,0x22,0x66,0x75,0x6e,0x63,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x5f,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x6e,0x61, - 0x72,0x67,0x73,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x7b,0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x61, - 0x72,0x61,0x72,0x67,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30, - 0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x73,0x73,0x65,0x5f,0x72,0x65, - 0x67,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x7d,0x2c, - 0x0a,0x20,0x20,0x7b,0x22,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x22,0x2c,0x20,0x2d, - 0x2d,0x20,0x4e,0x6f,0x74,0x20,0x73,0x65,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x22, - 0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22, - 0x22,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20, - 0x20,0x7b,0x22,0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x4f, - 0x6e,0x6c,0x79,0x20,0x73,0x65,0x65,0x6e,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61, - 0x6c,0x6c,0x79,0x0a,0x20,0x20,0x20,0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20, - 0x22,0x76,0x61,0x6c,0x75,0x65,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20, - 0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x66,0x69,0x65,0x6c,0x64,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x6f,0x66,0x66, - 0x73,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c, - 0x0a,0x20,0x20,0x7b,0x22,0x62,0x69,0x74,0x66,0x69,0x65,0x6c,0x64,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x22,0x22,0x2c,0x20,0x22,0x6f,0x66,0x66,0x73,0x65,0x74,0x22, - 0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30, - 0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22,0x7d, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30, - 0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76, - 0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b, - 0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x75,0x6e,0x73, - 0x69,0x67,0x6e,0x65,0x64,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20, - 0x7b,0x22,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x76,0x61,0x6c,0x75,0x65,0x22, - 0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30, - 0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22, - 0x7d,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x65,0x78,0x74,0x65, - 0x72,0x6e,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x4e,0x6f,0x74,0x20,0x73,0x65,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x22,0x43,0x49,0x44,0x22,0x2c,0x20,0x22,0x22,0x2c,0x20, - 0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x6b, - 0x77,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x4e,0x6f,0x74,0x20,0x73,0x65,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x22,0x54,0x4f,0x4b,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65, - 0x22,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x53,0x65, - 0x74,0x20,0x6f,0x66,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x63,0x69,0x64,0x20, - 0x72,0x6f,0x6c,0x65,0x73,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x72,0x65,0x20, - 0x61,0x20,0x43,0x54,0x79,0x70,0x65,0x49,0x44,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x74,0x79,0x70,0x65,0x5f,0x6b,0x65,0x79,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x20, - 0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x20,0x3d,0x20, - 0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x5f,0x74, - 0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x76,0x61, - 0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c, - 0x0a,0x20,0x20,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a, - 0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x43,0x72,0x65,0x61,0x74,0x65,0x20,0x61,0x20,0x6d, - 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x65,0x61,0x63, - 0x68,0x20,0x43,0x54,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x65,0x74,0x61, - 0x74,0x61,0x62,0x6c,0x65,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x7d,0x0a,0x66,0x6f,0x72, - 0x20,0x5f,0x2c,0x20,0x43,0x54,0x20,0x69,0x6e,0x20,0x69,0x70,0x61,0x69,0x72,0x73, - 0x28,0x43,0x54,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x43,0x54,0x5b,0x31,0x5d,0x0a,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x74,0x20,0x3d,0x20,0x7b,0x5f,0x5f,0x69,0x6e, - 0x64,0x65,0x78,0x20,0x3d,0x20,0x7b,0x7d,0x7d,0x0a,0x20,0x20,0x6d,0x65,0x74,0x61, - 0x74,0x61,0x62,0x6c,0x65,0x73,0x5b,0x77,0x68,0x61,0x74,0x5d,0x20,0x3d,0x20,0x6d, - 0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x4c,0x6f,0x67,0x69,0x63,0x20, - 0x66,0x6f,0x72,0x20,0x6d,0x65,0x72,0x67,0x69,0x6e,0x67,0x20,0x61,0x6e,0x20,0x61, - 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x20,0x6f, - 0x6e,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x61,0x6e,0x6e,0x6f,0x74,0x61,0x74,0x65, - 0x64,0x20,0x43,0x54,0x79,0x70,0x65,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43, - 0x54,0x41,0x73,0x20,0x3d,0x20,0x7b,0x5b,0x30,0x5d,0x20,0x3d,0x0a,0x20,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74, - 0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x43, - 0x54,0x41,0x5f,0x4e,0x4f,0x4e,0x45,0x22,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66, - 0x63,0x74,0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x4f,0x44,0x4f,0x3a, - 0x20,0x43,0x54,0x41,0x5f,0x51,0x55,0x41,0x4c,0x22,0x29,0x20,0x65,0x6e,0x64,0x2c, - 0x0a,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72, - 0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x61,0x20,0x3d,0x20,0x32,0x5e, - 0x61,0x2e,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63, - 0x74,0x2e,0x61,0x6c,0x69,0x67,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x61,0x0a, - 0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x61,0x74,0x74,0x72,0x69,0x62, - 0x75,0x74,0x65,0x73,0x2e,0x61,0x6c,0x69,0x67,0x6e,0x20,0x3d,0x20,0x61,0x0a,0x20, - 0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x72, - 0x65,0x66,0x63,0x74,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74, - 0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63, - 0x74,0x2e,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x2e,0x73,0x75,0x62, - 0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70, - 0x65,0x69,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x20, - 0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x79,0x6d,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x3d, - 0x20,0x61,0x2e,0x6e,0x61,0x6d,0x65,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74, - 0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x43, - 0x54,0x41,0x5f,0x42,0x41,0x44,0x22,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a, - 0x0a,0x2d,0x2d,0x20,0x43,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63, - 0x61,0x6c,0x6c,0x69,0x6e,0x67,0x20,0x63,0x6f,0x6e,0x76,0x65,0x6e,0x74,0x69,0x6f, - 0x6e,0x73,0x20,0x28,0x43,0x54,0x43,0x43,0x5f,0x2a,0x20,0x63,0x6f,0x6e,0x73,0x74, - 0x61,0x6e,0x74,0x73,0x20,0x69,0x6e,0x20,0x6c,0x6a,0x5f,0x72,0x65,0x66,0x63,0x74, - 0x2e,0x68,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x43,0x43,0x73,0x20, - 0x3d,0x20,0x7b,0x5b,0x30,0x5d,0x20,0x3d,0x0a,0x20,0x20,0x22,0x63,0x64,0x65,0x63, - 0x6c,0x22,0x2c,0x0a,0x20,0x20,0x22,0x74,0x68,0x69,0x73,0x63,0x61,0x6c,0x6c,0x22, - 0x2c,0x0a,0x20,0x20,0x22,0x66,0x61,0x73,0x74,0x63,0x61,0x6c,0x6c,0x22,0x2c,0x0a, - 0x20,0x20,0x22,0x73,0x74,0x64,0x63,0x61,0x6c,0x6c,0x22,0x2c,0x0a,0x7d,0x0a,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x72, - 0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x69,0x64,0x29, - 0x20,0x2d,0x2d,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63, - 0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x43,0x54,0x79,0x70,0x65,0x49, - 0x44,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x74,0x79,0x70,0x65, - 0x20,0x3d,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x74,0x61,0x62,0x5b,0x69, - 0x64,0x5d,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x5f,0x63,0x6f, - 0x64,0x65,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28, - 0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x32,0x38,0x29,0x0a, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x20,0x3d,0x20,0x43,0x54,0x73, - 0x5b,0x43,0x54,0x5f,0x63,0x6f,0x64,0x65,0x5d,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x43,0x54,0x5b,0x31,0x5d,0x0a,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x73, - 0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x0a,0x20,0x20, - 0x20,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x77,0x68,0x61,0x74,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x74,0x79,0x70,0x65,0x69,0x64,0x20,0x3d,0x20,0x69,0x64,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x67,0x63,0x5f,0x73,0x74, - 0x72,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x6e,0x61,0x6d,0x65,0x29,0x2c,0x0a,0x20, - 0x20,0x7d,0x2c,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x5b,0x77, - 0x68,0x61,0x74,0x5d,0x29,0x0a,0x0a,0x20,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65, - 0x72,0x70,0x72,0x65,0x74,0x20,0x28,0x6d,0x6f,0x73,0x74,0x20,0x6f,0x66,0x29,0x20, - 0x74,0x68,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x69,0x6e,0x66,0x6f,0x20, - 0x66,0x69,0x65,0x6c,0x64,0x0a,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x20,0x3d,0x20, - 0x35,0x2c,0x20,0x23,0x43,0x54,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e, - 0x69,0x6e,0x66,0x6f,0x2c,0x20,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x31,0x5d,0x29,0x20, - 0x7e,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x33,0x5d,0x20,0x3d,0x3d,0x20,0x22, - 0x73,0x75,0x62,0x77,0x68,0x61,0x74,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68,0x61,0x74, - 0x20,0x3d,0x20,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x32,0x5d,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x66,0x63,0x74,0x5b,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x32,0x5d,0x5d,0x20,0x3d, - 0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x69,0x66,0x20,0x43,0x54,0x5f,0x63,0x6f,0x64,0x65,0x20,0x3c,0x3d,0x20,0x35,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x61, - 0x6c,0x69,0x67,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x6c, - 0x73,0x68,0x69,0x66,0x74,0x28,0x31,0x2c,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e, - 0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79, - 0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x36,0x29,0x2c,0x20,0x31,0x35, - 0x29,0x29,0x0a,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x77,0x68,0x61,0x74, - 0x20,0x3d,0x3d,0x20,0x22,0x66,0x75,0x6e,0x63,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x63,0x6f,0x6e,0x76,0x65,0x6e, - 0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x43,0x54,0x43,0x43,0x73,0x5b,0x62,0x69,0x74, - 0x2e,0x62,0x61,0x6e,0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74, - 0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x36,0x29, - 0x2c,0x20,0x33,0x29,0x5d,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x69, - 0x66,0x20,0x43,0x54,0x5b,0x32,0x5d,0x20,0x7e,0x3d,0x20,0x22,0x22,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65,0x72,0x70,0x72,0x65,0x74,0x20, - 0x74,0x68,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x63,0x69,0x64,0x20,0x66, - 0x69,0x65,0x6c,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6b, - 0x20,0x3d,0x20,0x43,0x54,0x5b,0x32,0x5d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x63,0x69,0x64,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e, - 0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x30,0x78, - 0x66,0x66,0x66,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70, - 0x65,0x5f,0x6b,0x65,0x79,0x73,0x5b,0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x69,0x64,0x20,0x3d,0x3d,0x20,0x30, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x69, - 0x64,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c, - 0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x69,0x64,0x20,0x3d, - 0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x63, - 0x69,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x5b, - 0x6b,0x5d,0x20,0x3d,0x20,0x63,0x69,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a, - 0x20,0x20,0x69,0x66,0x20,0x43,0x54,0x5b,0x33,0x5d,0x20,0x7e,0x3d,0x20,0x22,0x22, - 0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65,0x72,0x70,0x72, - 0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x73,0x69, - 0x7a,0x65,0x20,0x66,0x69,0x65,0x6c,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x6b,0x20,0x3d,0x20,0x43,0x54,0x5b,0x33,0x5d,0x0a,0x20,0x20,0x20, - 0x20,0x72,0x65,0x66,0x63,0x74,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x63,0x74,0x79,0x70, - 0x65,0x2e,0x73,0x69,0x7a,0x65,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6b,0x20, - 0x3d,0x3d,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x20,0x61,0x6e,0x64,0x20,0x62,0x69, - 0x74,0x2e,0x62,0x6e,0x6f,0x74,0x28,0x72,0x65,0x66,0x63,0x74,0x5b,0x6b,0x5d,0x29, - 0x20,0x3d,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x66,0x63,0x74,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x22,0x6e,0x6f,0x6e, - 0x65,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x0a,0x20,0x20,0x69,0x66,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22, - 0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x4d,0x65,0x72,0x67,0x65,0x20,0x6c,0x65,0x61,0x64,0x69,0x6e, - 0x67,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x6f,0x6e,0x74, - 0x6f,0x20,0x74,0x68,0x65,0x20,0x74,0x79,0x70,0x65,0x20,0x62,0x65,0x69,0x6e,0x67, - 0x20,0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65,0x64,0x2e,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x41,0x20,0x3d,0x20,0x43,0x54,0x41,0x73, - 0x5b,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73, - 0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c, - 0x20,0x31,0x36,0x29,0x2c,0x20,0x30,0x78,0x66,0x66,0x29,0x5d,0x0a,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x74,0x2e,0x61,0x74,0x74,0x72,0x69,0x62,0x75, - 0x74,0x65,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x43, - 0x54,0x41,0x28,0x72,0x65,0x66,0x63,0x74,0x2c,0x20,0x63,0x74,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x69,0x64,0x20,0x3d,0x20, - 0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x69,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x63,0x74,0x0a,0x20,0x20, - 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66, - 0x63,0x74,0x2e,0x43,0x54,0x41,0x20,0x3d,0x20,0x43,0x54,0x41,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x77,0x68, - 0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x62,0x69,0x74,0x66,0x69,0x65,0x6c,0x64,0x22, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x44,0x65,0x63, - 0x6f,0x64,0x65,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x62,0x69,0x74,0x66,0x69,0x65, - 0x6c,0x64,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c,0x20,0x61,0x6e,0x64,0x20,0x6d, - 0x61,0x6b,0x65,0x20,0x69,0x74,0x20,0x6c,0x6f,0x6f,0x6b,0x20,0x6c,0x69,0x6b,0x65, - 0x20,0x61,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x66,0x69,0x65,0x6c,0x64,0x2e, - 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6f,0x66,0x66,0x73,0x65, - 0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74, - 0x20,0x2b,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x63,0x74,0x79,0x70, - 0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x32,0x37,0x29,0x20,0x2f,0x20,0x38, - 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20, - 0x3d,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x62,0x69,0x74,0x2e,0x72, - 0x73,0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f, - 0x2c,0x20,0x38,0x29,0x2c,0x20,0x31,0x32,0x37,0x29,0x20,0x2f,0x20,0x38,0x0a,0x20, - 0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20, - 0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x22, - 0x69,0x6e,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c, - 0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x62,0x6f,0x6f,0x6c,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x3d,0x20,0x72,0x65,0x66, - 0x63,0x74,0x2e,0x63,0x6f,0x6e,0x73,0x74,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74, - 0x2e,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x3d,0x20,0x72,0x65,0x66,0x63, - 0x74,0x2e,0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e, - 0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79, - 0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x36,0x29,0x2c,0x20,0x31,0x32, - 0x37,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65, - 0x66,0x63,0x74,0x2e,0x62,0x6f,0x6f,0x6c,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e, - 0x63,0x6f,0x6e,0x73,0x74,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x76,0x6f,0x6c, - 0x61,0x74,0x69,0x6c,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x75,0x6e,0x73, - 0x69,0x67,0x6e,0x65,0x64,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x0a,0x20,0x20,0x69,0x66,0x20,0x43,0x54,0x5b,0x34,0x5d,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x2d,0x2d,0x20,0x4d,0x65,0x72,0x67,0x65,0x20,0x73,0x69,0x62,0x6c, - 0x69,0x6e,0x67,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x6f, - 0x6e,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x74,0x79,0x70,0x65,0x2e,0x0a,0x20, - 0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x63,0x74,0x79,0x70,0x65,0x2e,0x73, - 0x69,0x62,0x20,0x7e,0x3d,0x20,0x30,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x3d,0x20,0x43, - 0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x74,0x61,0x62,0x5b,0x63,0x74,0x79,0x70,0x65, - 0x2e,0x73,0x69,0x62,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x43, - 0x54,0x73,0x5b,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28,0x65,0x6e, - 0x74,0x72,0x79,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x32,0x38,0x29,0x5d,0x5b,0x31, - 0x5d,0x20,0x7e,0x3d,0x20,0x22,0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x65, - 0x6e,0x74,0x72,0x79,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x30,0x78,0x66,0x66,0x66, - 0x66,0x29,0x20,0x7e,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65, - 0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x73,0x69,0x62,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66, - 0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x73,0x69,0x62, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x69,0x62,0x3a,0x43,0x54,0x41,0x28, - 0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x74,0x79, - 0x70,0x65,0x20,0x3d,0x20,0x65,0x6e,0x74,0x72,0x79,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x73,0x69,0x62, - 0x5f,0x69,0x74,0x65,0x72,0x28,0x73,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a, - 0x20,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x63,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x43,0x54,0x53,0x74,0x61, - 0x74,0x65,0x2e,0x74,0x61,0x62,0x5b,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70, - 0x65,0x69,0x64,0x5d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x74,0x79,0x70, - 0x65,0x2e,0x73,0x69,0x62,0x20,0x3d,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72, - 0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f, - 0x6d,0x5f,0x69,0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x73,0x69,0x62,0x29,0x0a, - 0x20,0x20,0x75,0x6e,0x74,0x69,0x6c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68, - 0x61,0x74,0x20,0x7e,0x3d,0x20,0x22,0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x20,0x2d, - 0x2d,0x20,0x50,0x75,0x72,0x65,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x73,0x20,0x61, - 0x72,0x65,0x20,0x73,0x6b,0x69,0x70,0x70,0x65,0x64,0x2e,0x0a,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x73, - 0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x28,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20, - 0x20,0x2d,0x2d,0x20,0x46,0x6f,0x6c,0x6c,0x6f,0x77,0x20,0x74,0x6f,0x20,0x74,0x68, - 0x65,0x20,0x65,0x6e,0x64,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x61,0x74,0x74, - 0x72,0x69,0x62,0x20,0x63,0x68,0x61,0x69,0x6e,0x2c,0x20,0x69,0x66,0x20,0x61,0x6e, - 0x79,0x2e,0x0a,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x72,0x65,0x66,0x63,0x74, - 0x2e,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x64,0x6f,0x0a,0x20, - 0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74, - 0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x61, - 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x2e,0x73,0x75,0x62,0x74,0x79,0x70, - 0x65,0x20,0x6f,0x72,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x74,0x61,0x62, - 0x5b,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x69,0x64,0x5d,0x2e,0x73, - 0x69,0x62,0x29,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x73,0x69,0x62,0x5f,0x69,0x74,0x65,0x72,0x2c,0x20,0x6e,0x69, - 0x6c,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6d,0x65, - 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x73,0x74,0x72,0x75,0x63,0x74,0x2e, - 0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x6d,0x65,0x6d,0x62,0x65,0x72,0x73,0x20, - 0x3d,0x20,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x0a,0x6d,0x65,0x74,0x61,0x74, - 0x61,0x62,0x6c,0x65,0x73,0x2e,0x66,0x75,0x6e,0x63,0x2e,0x5f,0x5f,0x69,0x6e,0x64, - 0x65,0x78,0x2e,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x3d,0x20,0x73, - 0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c, - 0x65,0x73,0x2e,0x65,0x6e,0x75,0x6d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e, - 0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x3d,0x20,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67, - 0x73,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x28,0x72, - 0x65,0x66,0x63,0x74,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62, - 0x65,0x72,0x28,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x69,0x66,0x20,0x6e,0x75, - 0x6d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x73, - 0x69,0x62,0x20,0x69,0x6e,0x20,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x28,0x72, - 0x65,0x66,0x63,0x74,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x6e,0x75,0x6d,0x20,0x3d,0x3d,0x20,0x31,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73, - 0x69,0x62,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x6e,0x75,0x6d,0x20,0x2d,0x20,0x31, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x73,0x69,0x62,0x20,0x69,0x6e,0x20,0x73, - 0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x28,0x72,0x65,0x66,0x63,0x74,0x29,0x20,0x64, - 0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x69,0x62,0x2e,0x6e, - 0x61,0x6d,0x65,0x20,0x3d,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x73,0x69,0x62,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x73,0x74,0x72,0x75, - 0x63,0x74,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x6d,0x65,0x6d,0x62,0x65, - 0x72,0x20,0x3d,0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67, - 0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x66,0x75,0x6e,0x63, - 0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e, - 0x74,0x20,0x3d,0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67, - 0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x65,0x6e,0x75,0x6d, - 0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d, - 0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x0a,0x0a,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e, - 0x74,0x79,0x70,0x65,0x6f,0x66,0x28,0x78,0x29,0x20,0x2d,0x2d,0x20,0x72,0x65,0x66, - 0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x74,0x79,0x70, - 0x65,0x6f,0x66,0x28,0x63,0x74,0x29,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x66,0x66,0x69,0x2e,0x74,0x79,0x70,0x65, - 0x6f,0x66,0x28,0x78,0x29,0x29,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x67,0x65, - 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x78,0x29,0x20,0x2d,0x2d, - 0x20,0x6d,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x67,0x65, - 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x63,0x74,0x29,0x0a,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x5b, - 0x2d,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x66,0x66,0x69,0x2e,0x74,0x79, - 0x70,0x65,0x6f,0x66,0x28,0x78,0x29,0x29,0x5d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x0a,0x65,0x6e, - 0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64, - 0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x75,0x67, - 0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x0a, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65, - 0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a, - 0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b, - 0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f, - 0x72,0x6d,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68, - 0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20, - 0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20, - 0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41, - 0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76, - 0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d, - 0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61, - 0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a, - 0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69, - 0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20, - 0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c, - 0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65, - 0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63, - 0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68, - 0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c, - 0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c, - 0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77, - 0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c, - 0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d, - 0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75, - 0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65, - 0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69, - 0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69, - 0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d, - 0x20,0x50,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2f,0x4f,0x53,0x20,0x73,0x70,0x65, - 0x63,0x69,0x66,0x69,0x63,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x20,0x61, - 0x6e,0x64,0x20,0x70,0x61,0x74,0x68,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67, - 0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x72, - 0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x2e,0x75,0x72,0x6c,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69,0x6c, - 0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75, - 0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x0a,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x45,0x78, - 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x20,0x70,0x6c,0x61,0x66,0x6f,0x72,0x6d,0x20, - 0x28,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x77,0x69,0x6e,0x20,0x6f,0x72, - 0x20,0x75,0x6e,0x69,0x78,0x29,0x0a,0x2d,0x2d,0x20,0x55,0x73,0x65,0x64,0x20,0x74, - 0x6f,0x20,0x6d,0x61,0x6e,0x61,0x67,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x70,0x61, - 0x74,0x68,0x20,0x64,0x69,0x66,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x20,0x62,0x65, - 0x74,0x77,0x65,0x65,0x6e,0x20,0x74,0x68,0x65,0x20,0x32,0x20,0x70,0x6c,0x61,0x74, - 0x66,0x6f,0x72,0x6d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x6c,0x61,0x74,0x66, - 0x6f,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x2d,0x2d,0x20,0x6b,0x65, - 0x65,0x70,0x20,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65,0x64,0x20, - 0x55,0x52,0x49,0x73,0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x28,0x61, - 0x73,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x72,0x65,0x20,0x71,0x75,0x69,0x74,0x65, - 0x20,0x6c,0x6f,0x6e,0x67,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65, - 0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68, - 0x65,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x70,0x61,0x72,0x73, - 0x65,0x20,0x61,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x20,0x70, - 0x61,0x74,0x68,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61, - 0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6f,0x66,0x20,0x65,0x61,0x63,0x68,0x20,0x73, - 0x65,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f, - 0x75,0x6c,0x64,0x20,0x70,0x72,0x65,0x63,0x69,0x73,0x65,0x20,0x74,0x68,0x65,0x20, - 0x70,0x61,0x74,0x68,0x20,0x73,0x65,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x2e,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x73, - 0x70,0x6c,0x69,0x74,0x28,0x70,0x61,0x74,0x68,0x2c,0x73,0x65,0x70,0x29,0x0a,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20, - 0x66,0x6f,0x72,0x20,0x77,0x20,0x69,0x6e,0x20,0x70,0x61,0x74,0x68,0x3a,0x67,0x6d, - 0x61,0x74,0x63,0x68,0x28,0x22,0x5b,0x5e,0x22,0x2e,0x2e,0x28,0x73,0x65,0x70,0x20, - 0x6f,0x72,0x20,0x22,0x2f,0x22,0x29,0x2e,0x2e,0x22,0x5d,0x2b,0x22,0x29,0x64,0x6f, - 0x0a,0x20,0x20,0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65,0x72, - 0x74,0x28,0x74,0x2c,0x20,0x77,0x29,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x74,0x61,0x62,0x6c,0x65,0x3a, - 0x20,0x6b,0x65,0x79,0x3d,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x6e, - 0x61,0x6d,0x65,0x2c,0x76,0x61,0x6c,0x75,0x65,0x3d,0x74,0x72,0x75,0x65,0x20,0x28, - 0x61,0x64,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f, - 0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x73,0x65,0x61,0x72,0x63,0x68,0x5f, - 0x70,0x61,0x74,0x68,0x73,0x28,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68, - 0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x20,0x3d, - 0x20,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x77,0x20,0x69, - 0x6e,0x20,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x3a,0x67,0x6d, - 0x61,0x74,0x63,0x68,0x28,0x22,0x5b,0x5e,0x3b,0x5d,0x2b,0x22,0x29,0x20,0x64,0x6f, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x5b,0x77,0x5d,0x20,0x3d,0x20, - 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x3b,0x0a,0x65,0x6e,0x64,0x0a,0x0a, - 0x2d,0x2d,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x72,0x65,0x6c,0x61, - 0x74,0x69,0x76,0x65,0x20,0x75,0x72,0x69,0x20,0x74,0x6f,0x20,0x4d,0x2e,0x62,0x61, - 0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x66,0x6f,0x72,0x20,0x61,0x20,0x67,0x69,0x76, - 0x65,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x66,0x6f,0x72,0x20,0x61, - 0x6e,0x64,0x72,0x6f,0x69,0x64,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,0x28,0x61, - 0x64,0x64,0x65,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63, - 0x6f,0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x61,0x6e,0x64,0x72,0x6f,0x69, - 0x64,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63, - 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x6f,0x75,0x72,0x63,0x65, - 0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x36,0x29,0x20,0x3d,0x3d,0x20,0x22,0x61,0x73, - 0x73,0x65,0x74,0x73,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x72,0x65, - 0x70,0x6c,0x61,0x63,0x65,0x20,0x61,0x73,0x73,0x65,0x74,0x73,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x73,0x6f, - 0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x38,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68,0x5f, - 0x70,0x61,0x74,0x68,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x72,0x65,0x70,0x6c,0x61,0x63,0x65,0x20,0x2f,0x6d,0x6e,0x74,0x2f,0x73,0x64,0x63, - 0x61,0x72,0x64,0x2f,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x6e,0x61,0x6d,0x65,0x2f, - 0x20,0x77,0x69,0x74,0x68,0x20,0x65,0x6d,0x70,0x74,0x79,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b, - 0x2c,0x20,0x76,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x4d,0x2e,0x73, - 0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x64,0x6f,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x23, - 0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3e,0x20,0x23,0x6b,0x20,0x61,0x6e,0x64,0x20, - 0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x5b,0x73, - 0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x23,0x6b,0x29,0x5d, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x73, - 0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x23,0x6b,0x2b,0x31,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x2d,0x2d,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x72,0x65,0x6c, - 0x61,0x74,0x69,0x76,0x65,0x20,0x75,0x72,0x69,0x20,0x74,0x6f,0x20,0x4d,0x2e,0x62, - 0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x66,0x6f,0x72,0x20,0x61,0x20,0x67,0x69, - 0x76,0x65,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x2c,0x20,0x66,0x6f, - 0x72,0x20,0x69,0x6f,0x73,0x20,0x73,0x69,0x6d,0x75,0x6c,0x61,0x74,0x6f,0x72,0x2f, - 0x64,0x65,0x76,0x69,0x63,0x65,0x3f,0x20,0x28,0x61,0x64,0x64,0x65,0x64,0x20,0x62, - 0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x5f, - 0x74,0x6f,0x5f,0x69,0x6f,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28, - 0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x69,0x66,0x20,0x4d,0x2e, - 0x73,0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x20,0x74,0x68,0x65, - 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x20,0x76, - 0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x4d,0x2e,0x73,0x65,0x61,0x72, - 0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x23,0x73,0x6f,0x75,0x72,0x63, - 0x65,0x20,0x3e,0x20,0x23,0x6b,0x20,0x61,0x6e,0x64,0x20,0x4d,0x2e,0x73,0x65,0x61, - 0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65, - 0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x23,0x6b,0x29,0x5d,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73, - 0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73, - 0x75,0x62,0x28,0x23,0x6b,0x2b,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x72,0x65,0x6c,0x61,0x74, - 0x69,0x76,0x65,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75, - 0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x69,0x66,0x20,0x4d,0x2e,0x73,0x65,0x61, - 0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x20,0x76,0x20,0x69,0x6e, - 0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68,0x5f, - 0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x23,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3e, - 0x20,0x23,0x6b,0x20,0x61,0x6e,0x64,0x20,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68, - 0x5f,0x70,0x61,0x74,0x68,0x73,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75, - 0x62,0x28,0x31,0x2c,0x23,0x6b,0x29,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72, - 0x63,0x65,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28, - 0x23,0x6b,0x2b,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x20,0x52,0x46,0x43,0x32, - 0x33,0x39,0x36,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x69,0x61,0x6e,0x74,0x20,0x55,0x52, - 0x49,0x20,0x66,0x6f,0x72,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,0x73,0x6f,0x75,0x72, - 0x63,0x65,0x2c,0x20,0x6f,0x72,0x20,0x66,0x61,0x6c,0x73,0x65,0x20,0x69,0x66,0x20, - 0x74,0x68,0x65,0x20,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x66,0x61,0x69,0x6c, - 0x65,0x64,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x67,0x65,0x74,0x5f,0x61,0x62,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75, - 0x72,0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29, - 0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20, - 0x72,0x65,0x61,0x6c,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73, - 0x6f,0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72, - 0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x63,0x6f, - 0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x72,0x65,0x6c,0x61,0x74,0x69,0x76, - 0x65,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63, - 0x65,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x20, - 0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x73,0x6f, - 0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x2e,0x69,0x73,0x5f, - 0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x6e,0x6f, - 0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x29,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x20, - 0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x4d,0x2e, - 0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x20, - 0x2e,0x2e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74, - 0x68,0x29,0x2d,0x2d,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x2e, - 0x2e,0x20,0x22,0x2f,0x73,0x72,0x63,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x6e,0x6f,0x72, - 0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66,0x69, - 0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65, - 0x64,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69, - 0x66,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x23,0x73,0x6f, - 0x75,0x72,0x63,0x65,0x2d,0x33,0x2c,0x2d,0x31,0x29,0x3a,0x6c,0x6f,0x77,0x65,0x72, - 0x28,0x29,0x20,0x3d,0x3d,0x20,0x22,0x2e,0x6c,0x75,0x61,0x22,0x20,0x74,0x68,0x65, - 0x6e,0x20,0x2d,0x2d,0x20,0x6c,0x6f,0x61,0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x20, - 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x6f, - 0x75,0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x28,0x61,0x64,0x64,0x65,0x64, - 0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f, - 0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x22,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72, - 0x74,0x5f,0x74,0x6f,0x5f,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x5f,0x66,0x69,0x6c, - 0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6f,0x73,0x20,0x3f,0x3f,0x3f, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20, - 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6f,0x73, - 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x76, - 0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x69,0x6f,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f, - 0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64, - 0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69, - 0x7a,0x65,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x2e,0x69,0x73, - 0x5f,0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x6e, - 0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x29,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68, - 0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x4d, - 0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22, - 0x20,0x2e,0x2e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61, - 0x74,0x68,0x29,0x2d,0x2d,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20, - 0x2e,0x2e,0x20,0x22,0x2f,0x73,0x72,0x63,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x6e,0x6f, - 0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66, - 0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a, - 0x65,0x64,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65, - 0x20,0x2d,0x2d,0x20,0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x63,0x6f,0x64,0x65, - 0x2c,0x20,0x73,0x74,0x72,0x69,0x70,0x70,0x65,0x64,0x20,0x62,0x79,0x74,0x65,0x63, - 0x6f,0x64,0x65,0x2c,0x20,0x74,0x61,0x69,0x6c,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x2c,0x20,0x2e,0x2e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x46,0x49,0x58,0x4d,0x45,0x3a, - 0x20,0x61,0x73,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x73,0x20,0x63,0x61, - 0x63,0x68,0x65,0x64,0x2c,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x73,0x20,0x69,0x6e, - 0x20,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x61,0x74,0x68,0x20,0x74,0x68, - 0x61,0x74,0x20,0x6d,0x6f,0x64,0x69,0x66,0x79,0x20,0x74,0x68,0x65,0x20,0x6d,0x6f, - 0x64,0x75,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x61,0x72,0x65,0x20,0x6d,0x69, - 0x73,0x73,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x28,0x6d,0x6f,0x73,0x74,0x6c,0x79,0x20, - 0x61,0x66,0x66,0x65,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x20,0x6d,0x6f,0x64,0x75, - 0x6c,0x65,0x20,0x77,0x68,0x65,0x6e,0x20,0x4c,0x75,0x61,0x20,0x69,0x6e,0x74,0x65, - 0x72,0x70,0x72,0x65,0x74,0x65,0x72,0x20,0x69,0x73,0x20,0x6c,0x61,0x75,0x6e,0x63, - 0x68,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6e,0x20,0x61,0x62,0x73,0x6f, - 0x6c,0x75,0x74,0x65,0x20,0x70,0x61,0x74,0x68,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74,0x5f,0x6d,0x6f, - 0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a, - 0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x72,0x65,0x61,0x6c,0x20,0x73,0x6f,0x75, - 0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x70, - 0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62, - 0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68, - 0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x73, - 0x6f,0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x75,0x61,0x70,0x61,0x74,0x68, - 0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x73,0x70,0x6c,0x69,0x74,0x20,0x28,0x70, - 0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x61,0x74,0x68,0x2c,0x20,0x22,0x3b,0x22, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x69,0x73,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75, - 0x74,0x65,0x20,0x3d,0x20,0x4d,0x2e,0x69,0x73,0x5f,0x70,0x61,0x74,0x68,0x5f,0x61, - 0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x70,0x61, - 0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77, - 0x6f,0x72,0x6b,0x61,0x72,0x72,0x6f,0x75,0x6e,0x64,0x20,0x3a,0x20,0x41,0x64,0x64, - 0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x74,0x68,0x65,0x20,0x3f,0x2e,0x6c,0x75, - 0x61,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x73,0x75,0x70,0x70,0x6f, - 0x72,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68, - 0x65,0x20,0x63,0x61,0x73,0x65,0x20,0x77,0x68,0x65,0x72,0x65,0x20,0x66,0x69,0x6c, - 0x65,0x20,0x77,0x61,0x73,0x20,0x6c,0x6f,0x61,0x64,0x65,0x64,0x20,0x62,0x79,0x20, - 0x3a,0x20,0x22,0x6c,0x75,0x61,0x20,0x6d,0x79,0x66,0x69,0x6c,0x65,0x2e,0x6c,0x75, - 0x61,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x62,0x6c,0x65, - 0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x6c,0x75,0x61,0x70,0x61,0x74,0x68,0x74, - 0x61,0x62,0x6c,0x65,0x2c,0x22,0x3f,0x2e,0x6c,0x75,0x61,0x22,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x2c,0x76,0x61,0x72,0x20, - 0x69,0x6e,0x20,0x69,0x70,0x61,0x69,0x72,0x73,0x28,0x6c,0x75,0x61,0x70,0x61,0x74, - 0x68,0x74,0x61,0x62,0x6c,0x65,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x76,0x6f,0x69,0x64,0x20, - 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74,0x74,0x65,0x72,0x6e, - 0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x61,0x62,0x73,0x6f,0x6c, - 0x75,0x74,0x65,0x20,0x6f,0x6e,0x65,0x73,0x20,0x28,0x65,0x2e,0x67,0x2e,0x20,0x3f, - 0x2e,0x6c,0x75,0x61,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x73,0x20,0x61,0x6e,0x79, - 0x74,0x68,0x69,0x6e,0x67,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x4d,0x2e,0x69,0x73,0x5f,0x70,0x61,0x74,0x68,0x5f, - 0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x76,0x61,0x72,0x29,0x20,0x3d,0x3d, - 0x20,0x69,0x73,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x61,0x62,0x73,0x6f,0x6c, - 0x75,0x74,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65, - 0x73,0x63,0x61,0x70,0x65,0x64,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e, - 0x67,0x73,0x75,0x62,0x28,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65, - 0x28,0x76,0x61,0x72,0x29,0x2c,0x22,0x5b,0x25,0x5e,0x25,0x24,0x25,0x28,0x25,0x29, - 0x25,0x25,0x25,0x2e,0x25,0x5b,0x25,0x5d,0x25,0x2a,0x25,0x2b,0x25,0x2d,0x25,0x3f, - 0x5d,0x22,0x2c,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x63,0x29,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x25,0x22,0x2e,0x2e,0x63,0x20,0x65,0x6e,0x64, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x20, - 0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x65,0x73, - 0x63,0x61,0x70,0x65,0x64,0x2c,0x22,0x25,0x25,0x25,0x3f,0x22,0x2c,0x22,0x28,0x2e, - 0x2b,0x29,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x6f,0x64,0x75,0x6c, - 0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x6d, - 0x61,0x74,0x63,0x68,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70, - 0x61,0x74,0x68,0x2c,0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d, - 0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x6d,0x6f,0x64, - 0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x2c,0x22,0x2f,0x22,0x2c,0x22,0x2e,0x22,0x29, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x66,0x20,0x77,0x65,0x20,0x66, - 0x69,0x6e,0x64,0x20,0x6d,0x6f,0x72,0x65,0x20,0x74,0x68,0x61,0x6e,0x20,0x31,0x20, - 0x70,0x6f,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e, - 0x61,0x6d,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x68,0x65,0x20,0x73, - 0x68,0x6f,0x72,0x74,0x65,0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f, - 0x74,0x20,0x75,0x72,0x69,0x20,0x6f,0x72,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e, - 0x6c,0x65,0x6e,0x28,0x75,0x72,0x69,0x29,0x3e,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e, - 0x6c,0x65,0x6e,0x28,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x29,0x20, - 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x72,0x69, - 0x20,0x3d,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x75,0x72,0x69,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x22,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x3a,0x2f,0x2f,0x2f,0x22,0x2e,0x2e,0x75, - 0x72,0x69,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a, - 0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e, - 0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x65,0x61,0x72,0x63,0x68,0x20,0x69, - 0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68, - 0x65,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x75,0x72,0x69,0x20,0x7e,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x69,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e, - 0x64,0x2c,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x20,0x75,0x72,0x69,0x0a,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72, - 0x65,0x73,0x2e,0x75,0x72,0x69,0x20,0x3d,0x3d,0x20,0x22,0x6d,0x6f,0x64,0x75,0x6c, - 0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x75,0x72,0x69,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x6d,0x6f,0x64,0x75,0x6c,0x65, - 0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x75,0x72,0x69,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x61, - 0x62,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x28,0x73,0x6f,0x75, - 0x72,0x63,0x65,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x72,0x69,0x20,0x3d,0x20, - 0x20,0x67,0x65,0x74,0x5f,0x61,0x62,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72, - 0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68, - 0x65,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65,0x5d,0x20,0x3d,0x20,0x75,0x72,0x69,0x0a, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x69,0x0a,0x65, - 0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x70,0x61,0x74,0x68,0x20, - 0x66,0x69,0x6c,0x65,0x20,0x66,0x72,0x6f,0x6d,0x20,0x75,0x72,0x69,0x0a,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x67,0x65,0x74,0x5f,0x70,0x61,0x74, - 0x68,0x20,0x28,0x75,0x72,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x5f,0x70,0x61,0x74,0x68,0x20,0x3d,0x20, - 0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x75,0x72,0x6c,0x2e,0x70,0x61,0x72,0x73,0x65, - 0x28,0x75,0x72,0x69,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61, - 0x72,0x73,0x65,0x64,0x5f,0x70,0x61,0x74,0x68,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65, - 0x20,0x3d,0x3d,0x20,0x22,0x66,0x69,0x6c,0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d, - 0x2e,0x74,0x6f,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5f, - 0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x65,0x61,0x72,0x63,0x68, - 0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x77,0x65,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x73, - 0x75,0x72,0x65,0x6c,0x79,0x20,0x63,0x61,0x6c,0x63,0x75,0x6c,0x61,0x74,0x65,0x20, - 0x69,0x74,0x20,0x69,0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20,0x66,0x69, - 0x6e,0x64,0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20,0x70, - 0x61,0x69,0x72,0x73,0x28,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68,0x65,0x29,0x64, - 0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x76,0x20,0x3d,0x3d,0x20,0x75,0x72,0x69,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61, - 0x73,0x73,0x65,0x72,0x74,0x28,0x6b,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29, - 0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x6b,0x3a,0x73,0x75,0x62,0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64, - 0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6e,0x6f,0x72, - 0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x72,0x74,0x73,0x20,0x3d,0x20,0x7b, - 0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x77,0x20,0x69,0x6e,0x20, - 0x70,0x61,0x74,0x68,0x3a,0x67,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5b,0x5e,0x2f, - 0x5d,0x2b,0x22,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x77,0x20,0x3d,0x3d,0x20,0x22,0x2e,0x2e,0x22, - 0x20,0x61,0x6e,0x64,0x20,0x23,0x70,0x61,0x72,0x74,0x73,0x20,0x7e,0x3d,0x30,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x72,0x65,0x6d,0x6f,0x76, - 0x65,0x28,0x70,0x61,0x72,0x74,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x77,0x20,0x7e,0x3d,0x20,0x22,0x2e,0x22, - 0x20,0x20,0x74,0x68,0x65,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73, - 0x65,0x72,0x74,0x28,0x70,0x61,0x72,0x74,0x73,0x2c,0x20,0x77,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x70,0x61, - 0x74,0x68,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22, - 0x2f,0x22,0x20,0x61,0x6e,0x64,0x20,0x22,0x2f,0x22,0x20,0x6f,0x72,0x20,0x22,0x22, - 0x29,0x20,0x2e,0x2e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61, - 0x74,0x28,0x70,0x61,0x72,0x74,0x73,0x2c,0x20,0x22,0x2f,0x22,0x29,0x0a,0x65,0x6e, - 0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x69,0x6e, - 0x69,0x74,0x28,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74, - 0x66,0x6f,0x72,0x6d,0x2c,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65, - 0x63,0x74,0x6f,0x72,0x79,0x2c,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68, - 0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x66,0x69,0x6e,0x65,0x20, - 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x68,0x65,0x63,0x6b,0x20,0x70,0x61,0x72, - 0x61,0x6d,0x65,0x74,0x65,0x72,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x78, - 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20, - 0x61,0x6e,0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61, - 0x74,0x66,0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x20,0x22,0x75,0x6e,0x69,0x78,0x22,0x20, - 0x61,0x6e,0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61, - 0x74,0x66,0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x22,0x77,0x69,0x6e,0x22,0x20,0x61,0x6e, - 0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66, - 0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x22,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x22,0x20, - 0x61,0x6e,0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61, - 0x74,0x66,0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x22,0x69,0x6f,0x73,0x22,0x74,0x68,0x65, - 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x72,0x72,0x6f,0x72,0x28, - 0x22,0x55,0x6e,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x69,0x6e,0x69,0x74,0x69, - 0x61,0x6c,0x69,0x7a,0x65,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x6d, - 0x6f,0x64,0x75,0x6c,0x65,0x20,0x3a,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f, - 0x6e,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x73,0x68,0x6f,0x75,0x6c, - 0x64,0x20,0x62,0x65,0x20,0x27,0x75,0x6e,0x69,0x78,0x27,0x20,0x6f,0x72,0x20,0x27, - 0x77,0x69,0x6e,0x27,0x2e,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x20,0x70,0x61,0x72,0x61, - 0x6d,0x65,0x74,0x65,0x72,0x20,0x61,0x73,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74, - 0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f, - 0x72,0x6d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x20,0x65,0x78,0x65,0x63,0x75, - 0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x74,0x72, - 0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73,0x73,0x20,0x69,0x74,0x2e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x28, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x70,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x70,0x6f,0x70,0x65,0x6e, - 0x28,0x22,0x65,0x63,0x68,0x6f,0x20,0x25,0x6f,0x73,0x25,0x22,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74, - 0x20,0x3d,0x70,0x3a,0x72,0x65,0x61,0x64,0x28,0x22,0x2a,0x6c,0x22,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70, - 0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x3d,0x20,0x22,0x57,0x69,0x6e,0x64,0x6f, - 0x77,0x73,0x5f,0x4e,0x54,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x74,0x61,0x74,0x75, - 0x73,0x2c,0x20,0x69,0x73,0x77,0x69,0x6e,0x20,0x3d,0x20,0x70,0x63,0x61,0x6c,0x6c, - 0x28,0x69,0x73,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x61,0x6e, - 0x64,0x20,0x69,0x73,0x77,0x69,0x6e,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72, - 0x6d,0x20,0x3d,0x20,0x22,0x77,0x69,0x6e,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x20,0x22,0x75, - 0x6e,0x69,0x78,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x64,0x65,0x70,0x65,0x6e,0x64,0x65, - 0x6e,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x75, - 0x6e,0x69,0x78,0x22,0x20,0x6f,0x72,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d, - 0x20,0x3d,0x3d,0x20,0x22,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x22,0x20,0x6f,0x72, - 0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6f, - 0x73,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x54,0x68,0x65,0x20,0x50,0x61,0x74,0x68,0x20,0x73,0x65,0x70,0x61, - 0x72,0x61,0x74,0x6f,0x72,0x20,0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x70,0x61,0x74,0x68,0x5f,0x73, - 0x65,0x70,0x20,0x3d,0x20,0x22,0x2f,0x22,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x20,0x74,0x68,0x65,0x20,0x77,0x61, - 0x79,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x61,0x62,0x73, - 0x6f,0x6c,0x75,0x74,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x63,0x61,0x6e,0x20,0x62, - 0x65,0x20,0x77,0x72,0x6f,0x6e,0x67,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x70, - 0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x6c,0x6f,0x61,0x64,0x73,0x20,0x6e,0x65,0x77, - 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65,0x73,0x20,0x62,0x79, - 0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x61, - 0x66,0x74,0x65,0x72,0x20,0x61,0x20,0x63,0x64,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x79,0x2c, - 0x20,0x74,0x68,0x65,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x69, - 0x73,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x65,0x64,0x20,0x6f,0x6e,0x20, - 0x73,0x74,0x61,0x72,0x74,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x61,0x6c,0x6c,0x6f, - 0x77,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x74,0x6f,0x20,0x6c,0x6f, - 0x61,0x64,0x20,0x61,0x6e,0x79,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x66,0x69, - 0x6c,0x65,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x63,0x68,0x61,0x6e, - 0x67,0x65,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20,0x64,0x69,0x72,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68, - 0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x6d,0x6f,0x73,0x74,0x20,0x63,0x6f,0x6d, - 0x6d,0x6f,0x6e,0x20,0x75,0x73,0x65,0x20,0x63,0x61,0x73,0x65,0x2e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72, - 0x20,0x3d,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74, - 0x6f,0x72,0x79,0x20,0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76, - 0x28,0x22,0x50,0x57,0x44,0x22,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x20,0x70,0x61,0x72,0x73, - 0x65,0x64,0x20,0x55,0x52,0x4c,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20, - 0x66,0x69,0x6c,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x20,0x66,0x6f,0x72,0x20,0x74, - 0x68,0x65,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x4f,0x53,0x20,0x28,0x73, - 0x65,0x65,0x20,0x75,0x72,0x6c,0x2e,0x70,0x61,0x72,0x73,0x65,0x20,0x66,0x72,0x6f, - 0x6d,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75, - 0x72,0x69,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x70, - 0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x69,0x6e,0x64,0x28, - 0x70,0x61,0x74,0x68,0x2c,0x22,0x2f,0x22,0x29,0x20,0x7e,0x3d,0x20,0x31,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x3d,0x22,0x2f,0x22,0x2e,0x2e,0x70,0x61, - 0x74,0x68,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x6c,0x2e,0x62,0x75,0x69,0x6c,0x64,0x7b, - 0x73,0x63,0x68,0x65,0x6d,0x65,0x3d,0x22,0x66,0x69,0x6c,0x65,0x22,0x2c,0x61,0x75, - 0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x3d,0x22,0x22,0x2c,0x20,0x70,0x61,0x74,0x68, - 0x3d,0x70,0x61,0x74,0x68,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x72,0x75,0x65,0x20,0x69,0x73,0x20,0x74,0x68, - 0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x73,0x20,0x61,0x62,0x73,0x6f,0x6c,0x75, - 0x74,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68, - 0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x6e, - 0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x4d,0x2e,0x69,0x73,0x5f,0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f, - 0x6c,0x75,0x74,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x28,0x70,0x61,0x74,0x68,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61, - 0x74,0x68,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22, - 0x2f,0x22,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x20,0x61,0x62,0x73,0x6f,0x6c, - 0x75,0x74,0x65,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x20,0x70, - 0x61,0x74,0x68,0x20,0x66,0x69,0x6c,0x65,0x20,0x74,0x6f,0x20,0x75,0x72,0x69,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x70,0x61,0x74, - 0x68,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x70,0x61, - 0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x75,0x72,0x6c,0x2e,0x75,0x6e,0x65,0x73,0x63,0x61,0x70,0x65,0x28,0x70,0x61, - 0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c,0x2e,0x70,0x61,0x74,0x68,0x29,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x49,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, - 0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x66,0x6f,0x72,0x20,0x57,0x69,0x6e,0x64,0x6f, - 0x77,0x73,0x2c,0x20,0x73,0x65,0x65,0x20,0x55,0x4e,0x49,0x58,0x20,0x76,0x65,0x72, - 0x73,0x69,0x6f,0x6e,0x73,0x20,0x66,0x6f,0x72,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65, - 0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x4d,0x2e,0x70,0x61,0x74,0x68,0x5f,0x73,0x65,0x70,0x20,0x3d,0x20,0x22,0x5c, - 0x5c,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x69,0x73,0x5f, - 0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x70,0x61,0x74,0x68,0x29,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x74,0x68,0x3a,0x6d,0x61,0x74,0x63, - 0x68,0x28,0x22,0x5e,0x25,0x61,0x3a,0x2f,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66,0x69,0x6c,0x65, - 0x5f,0x75,0x72,0x69,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x28,0x70,0x61,0x74,0x68,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72, - 0x6c,0x2e,0x62,0x75,0x69,0x6c,0x64,0x7b,0x73,0x63,0x68,0x65,0x6d,0x65,0x3d,0x22, - 0x66,0x69,0x6c,0x65,0x22,0x2c,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x3d, - 0x22,0x22,0x2c,0x20,0x70,0x61,0x74,0x68,0x3d,0x22,0x2f,0x22,0x2e,0x2e,0x70,0x61, - 0x74,0x68,0x7d,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x4d,0x2e,0x74,0x6f,0x5f,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c, - 0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x6c,0x2e,0x75,0x6e,0x65, - 0x73,0x63,0x61,0x70,0x65,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c, - 0x2e,0x70,0x61,0x74,0x68,0x29,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5e,0x2f,0x22, - 0x2c,0x20,0x22,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x6e,0x69,0x78,0x6e,0x6f,0x72, - 0x6d,0x61,0x6c,0x69,0x7a,0x65,0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61, - 0x6c,0x69,0x7a,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x6e, - 0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x70,0x61,0x74,0x68,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x75,0x6e,0x69,0x78,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x70, - 0x61,0x74,0x68,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5c,0x5c,0x22,0x2c,0x22,0x2f, - 0x22,0x29,0x3a,0x6c,0x6f,0x77,0x65,0x72,0x28,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x74,0x65, - 0x72,0x6d,0x69,0x6e,0x65,0x20,0x62,0x61,0x73,0x65,0x20,0x64,0x69,0x72,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67, - 0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x28,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x20, - 0x3d,0x20,0x69,0x6f,0x2e,0x70,0x6f,0x70,0x65,0x6e,0x28,0x22,0x65,0x63,0x68,0x6f, - 0x20,0x25,0x63,0x64,0x25,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x20,0x3d,0x20,0x70,0x3a,0x72,0x65,0x61,0x64, - 0x28,0x22,0x2a,0x6c,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c, - 0x69,0x7a,0x65,0x28,0x72,0x65,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x62, - 0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x3d,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e, - 0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x6f,0x72,0x20,0x67,0x65, - 0x74,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72, - 0x79,0x28,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x66,0x69,0x78,0x20,0x62,0x75,0x67,0x3a,0x20,0x63,0x61,0x6e,0x20, - 0x6e,0x6f,0x74,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x77,0x68,0x65,0x6e,0x20,0x70, - 0x72,0x6f,0x6a,0x65,0x63,0x74,0x20,0x70,0x61,0x74,0x68,0x20,0x63,0x6f,0x6e,0x74, - 0x61,0x69,0x6e,0x73,0x20,0x62,0x6c,0x61,0x6e,0x6b,0x0a,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x72,0x65,0x70,0x6c,0x61,0x63,0x65,0x20,0x62,0x6c,0x61,0x6e,0x6b,0x20,0x77, - 0x69,0x74,0x68,0x20,0x25,0x32,0x30,0x20,0x28,0x61,0x64,0x64,0x20,0x62,0x79,0x20, - 0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x62,0x61, - 0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x3d,0x20,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f, - 0x64,0x69,0x72,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x20,0x22,0x2c,0x22,0x25,0x25, - 0x32,0x30,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20, - 0x6a,0x73,0x2f,0x6c,0x75,0x61,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x73,0x65, - 0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x20,0x69,0x66,0x20,0x68,0x61,0x73,0x20, - 0x6d,0x6f,0x72,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x6f,0x6e,0x65,0x2c,0x20,0x73, - 0x70,0x6c,0x69,0x74,0x20,0x74,0x68,0x65,0x6d,0x20,0x77,0x69,0x74,0x68,0x20,0x61, - 0x20,0x73,0x65,0x6d,0x69,0x63,0x6f,0x6c,0x6f,0x6e,0x20,0x22,0x3b,0x22,0x20,0x28, - 0x61,0x64,0x64,0x65,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61, - 0x74,0x68,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63, - 0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72, - 0x74,0x5f,0x74,0x6f,0x5f,0x73,0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68, - 0x73,0x28,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x2e, - 0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x74,0x68,0x65,0x6e,0x20,0x65,0x72, - 0x72,0x6f,0x72,0x28,0x22,0x55,0x6e,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x64, - 0x65,0x74,0x65,0x72,0x6d,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x20,0x77,0x6f,0x72, - 0x6b,0x69,0x6e,0x67,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x2e,0x22, - 0x29,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64, - 0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d, - 0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e, - 0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79, - 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32, - 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c, - 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a, - 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65, - 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f, - 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63, - 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69, - 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20, - 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20, - 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65, - 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20, - 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20, - 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65, - 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74, - 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69, - 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70, - 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f, - 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30, - 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74, - 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20, - 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73, - 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61, - 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f, - 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x55,0x74,0x69,0x6c,0x69,0x74,0x79,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d, - 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x6c,0x6f,0x67,0x20,0x73, - 0x79,0x73,0x74,0x65,0x6d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4c,0x45,0x56,0x45, - 0x4c,0x53,0x20,0x3d,0x20,0x7b,0x20,0x45,0x52,0x52,0x4f,0x52,0x20,0x3d,0x20,0x30, - 0x2c,0x20,0x57,0x41,0x52,0x4e,0x49,0x4e,0x47,0x20,0x3d,0x20,0x31,0x2c,0x20,0x49, - 0x4e,0x46,0x4f,0x20,0x3d,0x20,0x32,0x2c,0x20,0x44,0x45,0x54,0x41,0x49,0x4c,0x20, - 0x3d,0x20,0x33,0x2c,0x20,0x44,0x45,0x42,0x55,0x47,0x20,0x3d,0x20,0x34,0x20,0x7d, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4c,0x4f,0x47,0x5f,0x4c,0x45,0x56,0x45,0x4c, - 0x20,0x3d,0x20,0x4c,0x45,0x56,0x45,0x4c,0x53,0x2e,0x57,0x41,0x52,0x4e,0x49,0x4e, - 0x47,0x0a,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x66, - 0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67, - 0x2e,0x20,0x41,0x6e,0x79,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x63,0x61, - 0x6e,0x20,0x62,0x65,0x20,0x67,0x65,0x74,0x20,0x6c,0x69,0x6b,0x65,0x20,0x61,0x6e, - 0x79,0x20,0x72,0x65,0x67,0x75,0x6c,0x61,0x72,0x20,0x74,0x61,0x62,0x6c,0x65,0x2c, - 0x20,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65, - 0x73,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x0a,0x2d,0x2d,0x20,0x65, - 0x72,0x72,0x6f,0x72,0x20,0x66,0x6f,0x72,0x20,0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e, - 0x20,0x6f,0x72,0x20,0x72,0x65,0x61,0x64,0x2d,0x6f,0x6e,0x6c,0x79,0x20,0x66,0x65, - 0x61,0x74,0x75,0x72,0x65,0x73,0x2e,0x0a,0x4d,0x2e,0x66,0x65,0x61,0x74,0x75,0x72, - 0x65,0x73,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c, - 0x65,0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x74,0x68,0x61,0x74,0x20,0x66, - 0x6f,0x72,0x6d,0x61,0x74,0x2f,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x65,0x20,0x64, - 0x61,0x74,0x61,0x2e,0x20,0x49,0x66,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x64, - 0x2c,0x20,0x74,0x68,0x65,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x63,0x61, - 0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x6d,0x6f,0x64,0x69,0x66,0x69,0x65,0x64, - 0x2e,0x0a,0x20,0x20,0x20,0x20,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x73, - 0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x75,0x6c, - 0x74,0x69,0x70,0x6c,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x20,0x3d, - 0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x63,0x6f,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x74,0x6f, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6d,0x61,0x78,0x5f,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20,0x74, - 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75, - 0x6d,0x62,0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61, - 0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62, - 0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x68,0x6f,0x77, - 0x5f,0x68,0x69,0x64,0x64,0x65,0x6e,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62, - 0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x72,0x69,0x20, - 0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6c,0x65,0x76,0x65,0x6c,0x5f,0x6e, - 0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x61, - 0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x69,0x6e,0x20,0x69,0x6e,0x74,0x65,0x72, - 0x6e,0x61,0x6c,0x20,0x76,0x61,0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x4c,0x4f,0x47,0x5f,0x4c,0x45,0x56,0x45,0x4c,0x20,0x3d,0x20, - 0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x4c,0x45,0x56,0x45,0x4c,0x53,0x5b,0x6c,0x65, - 0x76,0x65,0x6c,0x5f,0x6e,0x61,0x6d,0x65,0x5d,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73, - 0x75,0x63,0x68,0x20,0x6c,0x65,0x76,0x65,0x6c,0x22,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6c, - 0x65,0x76,0x65,0x6c,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65, - 0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64,0x20,0x6c,0x65,0x76,0x65,0x6c, - 0x20,0x69,0x73,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x74,0x68,0x65,0x20,0x6e,0x61, - 0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64, - 0x65,0x78,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d, - 0x75,0x6c,0x74,0x69,0x70,0x6c,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73, - 0x20,0x3d,0x20,0x30,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x63,0x6f,0x64,0x69,0x6e,0x67,0x20,0x3d,0x22,0x55,0x54,0x46,0x2d,0x38,0x22,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x78,0x5f,0x63,0x68,0x69, - 0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20,0x33,0x32,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x30, - 0x78,0x46,0x46,0x46,0x46,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d, - 0x61,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x31,0x2c,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x68,0x6f,0x77,0x5f,0x68,0x69,0x64,0x64,0x65, - 0x6e,0x20,0x3d,0x20,0x31,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75, - 0x72,0x69,0x20,0x3d,0x20,0x22,0x66,0x69,0x6c,0x65,0x22,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d, - 0x20,0x22,0x57,0x41,0x52,0x4e,0x49,0x4e,0x47,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,0x65,0x61,0x64,0x20,0x6f,0x6e,0x6c,0x79, - 0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x5f,0x73,0x75,0x70,0x70,0x6f, - 0x72,0x74,0x73,0x5f,0x74,0x68,0x72,0x65,0x61,0x64,0x73,0x20,0x3d,0x20,0x30,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67, - 0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x22,0x4c,0x75,0x61,0x22,0x2c,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65, - 0x5f,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x56,0x45,0x52,0x53, - 0x49,0x4f,0x4e,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f, - 0x74,0x6f,0x63,0x6f,0x6c,0x5f,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20, - 0x31,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x70,0x70,0x6f, - 0x72,0x74,0x73,0x5f,0x61,0x73,0x79,0x6e,0x63,0x20,0x3d,0x20,0x31,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x61,0x74,0x61,0x5f,0x65,0x6e,0x63,0x6f, - 0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f, - 0x69,0x6e,0x74,0x5f,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x73,0x20,0x3d,0x20, - 0x22,0x4c,0x75,0x61,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62, - 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x73,0x20, - 0x3d,0x20,0x22,0x6c,0x69,0x6e,0x65,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f, - 0x6e,0x61,0x6c,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,0x2c,0x20, - 0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x6d,0x74,0x20,0x3d,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62, - 0x6c,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x2c,0x20,0x76, - 0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x20,0x3d,0x20,0x6d,0x74,0x2e,0x5f,0x5f, - 0x69,0x6e,0x64,0x65,0x78,0x2c,0x20,0x6d,0x74,0x2e,0x76,0x61,0x6c,0x69,0x64,0x61, - 0x74,0x6f,0x72,0x73,0x5b,0x6b,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x5b,0x6b,0x5d,0x20,0x3d,0x3d,0x20, - 0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22, - 0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20, - 0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6b,0x29, - 0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66, - 0x20,0x6e,0x6f,0x74,0x20,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x20,0x74, - 0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x68,0x65,0x20,0x66, - 0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x20,0x2e,0x2e,0x20,0x22,0x20,0x69,0x73,0x20, - 0x72,0x65,0x61,0x64,0x2d,0x6f,0x6e,0x6c,0x79,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x20,0x3d,0x20,0x61,0x73,0x73,0x65, - 0x72,0x74,0x28,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x28,0x76,0x29,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x5b, - 0x6b,0x5d,0x20,0x3d,0x20,0x76,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a, - 0x7d,0x29,0x0a,0x0a,0x2d,0x2d,0x20,0x57,0x72,0x61,0x70,0x73,0x20,0x64,0x65,0x62, - 0x75,0x67,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20, - 0x61,0x6e,0x20,0x61,0x74,0x74,0x61,0x63,0x68,0x65,0x64,0x20,0x74,0x68,0x72,0x65, - 0x61,0x64,0x0a,0x2d,0x2d,0x20,0x61,0x6c,0x73,0x6f,0x20,0x68,0x61,0x6e,0x64,0x6c, - 0x65,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x26,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74, - 0x69,0x6e,0x65,0x20,0x6d,0x61,0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x20,0x64, - 0x69,0x66,0x66,0x65,0x72,0x65,0x6e,0x63,0x69,0x65,0x73,0x20,0x62,0x65,0x74,0x77, - 0x65,0x65,0x6e,0x20,0x4c,0x75,0x61,0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x73, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x2c,0x20, - 0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x2c,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e, - 0x66,0x6f,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x6c,0x6f,0x63, - 0x61,0x6c,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65,0x74,0x6c,0x6f,0x63, - 0x61,0x6c,0x0a,0x0a,0x2d,0x2d,0x20,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x20,0x74, - 0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f, - 0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x70,0x61,0x75,0x73,0x65,0x64,0x20,0x74,0x68, - 0x72,0x65,0x61,0x64,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x46,0x6f,0x72,0x65,0x69, - 0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x20,0x3d,0x20,0x7b,0x0a,0x20, - 0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x20,0x3d,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76, - 0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x73,0x65,0x6c, - 0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61, - 0x74,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78, - 0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65, - 0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20, - 0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x65,0x6e,0x64,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c, - 0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28, - 0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20, - 0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d, - 0x0a,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54, - 0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x46,0x6f,0x72,0x65,0x69, - 0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x0a,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72, - 0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20, - 0x63,0x6f,0x72,0x6f,0x20,0x7d,0x2c,0x20,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54, - 0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x20,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20, - 0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x64,0x65,0x62,0x75,0x67, - 0x20,0x74,0x68,0x65,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x74,0x68,0x61,0x74, - 0x20,0x63,0x61,0x75,0x73,0x65,0x64,0x20,0x74,0x68,0x65,0x20,0x68,0x6f,0x6f,0x6b, - 0x0a,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x6e,0x64,0x65,0x64,0x20,0x74,0x6f,0x20, - 0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x2a,0x4f,0x4e,0x4c,0x59,0x2a,0x20,0x69, - 0x6e,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x28,0x65,0x78, - 0x65,0x63,0x75,0x74,0x65,0x64,0x20,0x69,0x6e,0x20,0x61,0x20,0x6e,0x65,0x77,0x20, - 0x74,0x68,0x72,0x65,0x61,0x64,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x75, - 0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x20,0x3d,0x20, - 0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x20,0x3d, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20, - 0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28, - 0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b, - 0x20,0x32,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76, - 0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x73,0x65, - 0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b,0x20,0x32, - 0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c, - 0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x73,0x65,0x6c,0x66,0x5b, - 0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b,0x20,0x32,0x2c,0x20,0x69, - 0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a, - 0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x2e, - 0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x43,0x75,0x72,0x72,0x65,0x6e, - 0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x4d,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65, - 0x61,0x64,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x63, - 0x6f,0x72,0x6f,0x20,0x7d,0x2c,0x20,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68, - 0x72,0x65,0x61,0x64,0x4d,0x54,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x0a,0x2d,0x2d, - 0x20,0x53,0x6f,0x6d,0x65,0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x64,0x65, - 0x70,0x65,0x6e,0x64,0x61,0x6e,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x73,0x0a,0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d, - 0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x61,0x64,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x73, - 0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x5f,0x67,0x65, - 0x74,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x4d,0x61,0x69,0x6e,0x54,0x68,0x72,0x65,0x61, - 0x64,0x20,0x3d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x61,0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e, - 0x76,0x2c,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x64,0x65,0x62,0x75, - 0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x6e,0x69,0x6c,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x20,0x35,0x2e,0x31,0x20,0x22,0x74, - 0x22,0x20,0x66,0x6c,0x61,0x67,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20, - 0x65,0x78,0x69,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x74,0x72,0x69,0x67,0x67,0x65, - 0x72,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x73,0x6f,0x20,0x72,0x65, - 0x6d,0x6f,0x76,0x65,0x20,0x69,0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x77,0x68,0x61, - 0x74,0x0a,0x20,0x20,0x20,0x20,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72, - 0x65,0x61,0x64,0x4d,0x54,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c, - 0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x73,0x65,0x6c,0x66,0x5b, - 0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b,0x20,0x32,0x2c,0x20,0x77, - 0x68,0x61,0x74,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22,0x2c,0x20,0x22,0x22, - 0x2c,0x20,0x31,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x46,0x6f, - 0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x2e,0x67,0x65, - 0x74,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68, - 0x61,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e, - 0x66,0x6f,0x28,0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65, - 0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22, - 0x2c,0x20,0x22,0x22,0x2c,0x20,0x31,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x68,0x65,0x6e,0x20,0x77,0x65,0x27,0x72,0x65, - 0x20,0x66,0x6f,0x72,0x63,0x65,0x64,0x20,0x74,0x6f,0x20,0x73,0x74,0x61,0x72,0x74, - 0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x6f,0x6e,0x20,0x74, - 0x6f,0x70,0x20,0x6f,0x66,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x73,0x74, - 0x61,0x63,0x6b,0x20,0x28,0x77,0x68,0x65,0x6e,0x20,0x6f,0x6e,0x20,0x6d,0x61,0x69, - 0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x74,0x68,0x69,0x73,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65, - 0x73,0x20,0x73,0x6f,0x6d,0x65,0x20,0x68,0x61,0x63,0x6b,0x65,0x72,0x79,0x20,0x74, - 0x6f,0x20,0x67,0x65,0x74,0x20,0x72,0x69,0x67,0x68,0x74,0x20,0x73,0x74,0x61,0x63, - 0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x46,0x61,0x6c,0x6c,0x62,0x61,0x63,0x6b,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20, - 0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x72,0x75,0x6e,0x6e,0x69, - 0x6e,0x67,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x28,0x6f,0x6e,0x6c,0x79,0x20, - 0x66,0x6f,0x72,0x20,0x6d,0x61,0x69,0x6e,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20, - 0x69,0x6e,0x20,0x35,0x2e,0x31,0x20,0x6f,0x72,0x20,0x66,0x6f,0x72,0x20,0x63,0x6f, - 0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x62,0x72,0x65,0x61,0x6b,0x70, - 0x6f,0x69,0x6e,0x74,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x47, - 0x65,0x74,0x73,0x20,0x61,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x73,0x74,0x61, - 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x64, - 0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x20,0x6c,0x6f,0x67,0x69,0x63,0x20,0x61,0x64,0x64,0x65,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6c,0x20,0x28,0x6e, - 0x75,0x6d,0x62,0x65,0x72,0x29,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76, - 0x65,0x6c,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x66,0x6f,0x72,0x20,0x64,0x65, - 0x62,0x75,0x67,0x67,0x65,0x64,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x28,0x30, - 0x20,0x62,0x61,0x73,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x61,0x6c,0x20,0x4c,0x75,0x61,0x20, - 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x73,0x75,0x69,0x74, - 0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x70,0x61,0x73,0x73,0x65, - 0x64,0x20,0x74,0x68,0x72,0x6f,0x75,0x67,0x68,0x20,0x64,0x65,0x75,0x62,0x67,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74, - 0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x68, - 0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x68, - 0x6f,0x6f,0x6b,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f, - 0x72,0x20,0x69,0x3d,0x32,0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65, - 0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x64,0x65,0x62,0x75,0x67,0x2e, - 0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x69,0x2c,0x20,0x22,0x66,0x22,0x29,0x29, - 0x2e,0x66,0x75,0x6e,0x63,0x20,0x3d,0x3d,0x20,0x68,0x6f,0x6f,0x6b,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x20,0x2b,0x20,0x6c,0x20, - 0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x74,0x6f, - 0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x69,0x73,0x20,0x6a,0x75,0x73,0x74,0x20,0x62, - 0x65,0x6c,0x6f,0x77,0x2c,0x20,0x62,0x75,0x74,0x20,0x62,0x65,0x63,0x61,0x75,0x73, - 0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x63, - 0x61,0x6c,0x6c,0x20,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x2c,0x20,0x74,0x68,0x65,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20, - 0x69,0x73,0x20,0x6f,0x6b,0x20,0x66,0x6f,0x72,0x20,0x63,0x61,0x6c,0x6c,0x65,0x65, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x72,0x61,0x77, - 0x67,0x65,0x74,0x28,0x5f,0x47,0x2c,0x20,0x22,0x6a,0x69,0x74,0x22,0x29,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x61,0x69,0x6e, - 0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x6d,0x61, - 0x69,0x6e,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x61,0x73,0x20,0x74,0x68,0x65,0x20,0x72, - 0x61,0x77,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74, - 0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x74,0x61,0x62,0x6c, - 0x65,0x20,0x6b,0x65,0x79,0x73,0x2c,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x20, - 0x61,0x20,0x72,0x65,0x70,0x6c,0x61,0x63,0x65,0x6d,0x65,0x6e,0x74,0x2e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x4c,0x75, - 0x61,0x4a,0x49,0x54,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x74,0x65,0x6c,0x79,0x20, - 0x65,0x6c,0x69,0x6d,0x69,0x6e,0x61,0x74,0x65,0x73,0x20,0x74,0x61,0x69,0x6c,0x20, - 0x63,0x61,0x6c,0x6c,0x73,0x20,0x66,0x72,0x6f,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b, - 0x2c,0x20,0x73,0x6f,0x20,0x67,0x65,0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f, - 0x6c,0x65,0x76,0x65,0x6c,0x20,0x72,0x65,0x74,0x75,0x6e,0x72,0x73,0x20,0x77,0x72, - 0x6f,0x6e,0x67,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x20,0x74,0x68, - 0x69,0x73,0x20,0x63,0x61,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65, - 0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x67,0x65, - 0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c, - 0x65,0x76,0x65,0x6c,0x29,0x20,0x2d,0x20,0x31,0x2c,0x20,0x77,0x68,0x61,0x74,0x3a, - 0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22,0x2c,0x20,0x22,0x22,0x2c,0x20,0x31,0x29, - 0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76, - 0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67,0x65, - 0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c, - 0x65,0x76,0x65,0x6c,0x29,0x20,0x2d,0x20,0x31,0x2c,0x20,0x69,0x64,0x78,0x29,0x20, - 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c, - 0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67,0x65,0x74,0x5f, - 0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,0x65,0x76, - 0x65,0x6c,0x29,0x20,0x2d,0x20,0x31,0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61, - 0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x4d,0x61,0x69,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20, - 0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x31, - 0x5d,0x20,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20, - 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66, - 0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66, - 0x6f,0x28,0x67,0x65,0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76, - 0x65,0x6c,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x20,0x2c,0x20,0x77,0x68,0x61,0x74, - 0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22,0x2c,0x20,0x22,0x22,0x2c,0x20,0x31, - 0x29,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65, - 0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67, - 0x65,0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28, - 0x6c,0x65,0x76,0x65,0x6c,0x29,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x65,0x6e,0x64, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65, - 0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69, - 0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67,0x65,0x74,0x5f,0x73,0x63,0x72, - 0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29, - 0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x0a,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x49,0x66,0x20, - 0x74,0x68,0x65,0x20,0x56,0x4d,0x20,0x69,0x73,0x20,0x76,0x61,0x6e,0x69,0x6c,0x6c, - 0x61,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20,0x6f,0x72,0x20,0x4c,0x75,0x61, - 0x4a,0x49,0x54,0x20,0x32,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x35,0x2e, - 0x32,0x20,0x63,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69,0x74,0x79,0x2c, - 0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x77,0x61,0x79, - 0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x61,0x20,0x72,0x65,0x66,0x65,0x72,0x65, - 0x6e,0x63,0x65,0x20,0x74,0x6f,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68, - 0x65,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x2c,0x20,0x73,0x6f,0x20,0x66,0x61,0x6c,0x6c,0x20,0x62,0x61,0x63,0x6b,0x20,0x74, - 0x6f,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x20,0x6d,0x6f,0x64,0x65,0x3a,0x20,0x74, - 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70, - 0x20,0x69,0x73,0x20,0x73,0x74,0x61,0x72,0x74,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74, - 0x68,0x65,0x20,0x74,0x6f,0x70,0x20,0x6f,0x66,0x20,0x6d,0x61,0x69,0x6e,0x20,0x74, - 0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x6e,0x64, - 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65, - 0x6c,0x20,0x69,0x73,0x20,0x72,0x65,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65,0x64,0x20, - 0x65,0x61,0x63,0x68,0x20,0x74,0x69,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x6f,0x6c,0x64,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68, - 0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x4d,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74, - 0x54,0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x43,0x75,0x72, - 0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x20,0x61,0x6e,0x64,0x20,0x6f,0x6c,0x64,0x43, - 0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72, - 0x6f,0x29,0x20,0x6f,0x72,0x20,0x4d,0x61,0x69,0x6e,0x54,0x68,0x72,0x65,0x61,0x64, - 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6c,0x6f,0x61, - 0x64,0x20,0x61,0x20,0x70,0x69,0x65,0x63,0x65,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64, - 0x65,0x20,0x61,0x6c,0x6f,0x67,0x20,0x77,0x69,0x74,0x68,0x20,0x69,0x74,0x73,0x20, - 0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c,0x6f,0x61,0x64,0x69, - 0x6e,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x65,0x6e,0x76,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x2c,0x65,0x72,0x72,0x20,0x3d, - 0x20,0x6c,0x6f,0x61,0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x6f,0x64,0x65, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x66, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x65,0x72,0x72,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x20,0x61,0x6e,0x64,0x20,0x73,0x65, - 0x74,0x66,0x65,0x6e,0x76,0x28,0x66,0x2c,0x20,0x65,0x6e,0x76,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x68, - 0x61,0x74,0x20,0x6d,0x61,0x70,0x73,0x20,0x5b,0x67,0x73,0x5d,0x65,0x74,0x20,0x65, - 0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x74,0x6f,0x20,0x69,0x6e, - 0x64,0x65,0x78,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x65,0x76,0x61,0x6c,0x5f,0x65, - 0x6e,0x76,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c, - 0x65,0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x66,0x75,0x6e,0x63,0x29,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x28,0x66, - 0x75,0x6e,0x63,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x66,0x75, - 0x6e,0x63,0x2c,0x20,0x65,0x6e,0x76,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x28,0x66,0x75,0x6e,0x63,0x2c,0x20,0x65,0x6e, - 0x76,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x29,0x0a,0x65, - 0x6c,0x73,0x65,0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d, - 0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x22,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x61,0x64,0x2c, - 0x20,0x64,0x65,0x62,0x75,0x67,0x5f,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x3d, - 0x20,0x6c,0x6f,0x61,0x64,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74, - 0x69,0x6e,0x66,0x6f,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x4d,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x63,0x6f,0x72,0x6f, - 0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x72,0x6f,0x20,0x74, - 0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x62,0x75,0x67, - 0x5f,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c, - 0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x64,0x65,0x62,0x75,0x67,0x5f,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x6c,0x65, - 0x76,0x65,0x6c,0x20,0x2b,0x20,0x31,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c,0x6f,0x61,0x64,0x69, - 0x6e,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x65,0x6e,0x76,0x29,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x6c,0x6f,0x61,0x64,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6e, - 0x69,0x6c,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x65,0x6e,0x76,0x29,0x20,0x65,0x6e, - 0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x20,0x65,0x76,0x61, - 0x6c,0x5f,0x65,0x6e,0x76,0x20,0x66,0x6f,0x72,0x20,0x35,0x2e,0x32,0x20,0x61,0x73, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x64,0x6f,0x65,0x73,0x20, - 0x6e,0x6f,0x74,0x20,0x68,0x61,0x76,0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e, - 0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x6e,0x79,0x6d,0x6f,0x72,0x65,0x0a,0x65,0x6e, - 0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42,0x61,0x72,0x65,0x20,0x6d,0x69,0x6e,0x69,0x6d, - 0x61,0x6c,0x20,0x6c,0x6f,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x2e,0x0a,0x2d, - 0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c,0x6f,0x67,0x28,0x6c,0x65, - 0x76,0x65,0x6c,0x2c,0x20,0x6d,0x73,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x4c,0x45,0x56,0x45,0x4c,0x53,0x5b,0x6c,0x65, - 0x76,0x65,0x6c,0x5d,0x20,0x6f,0x72,0x20,0x2d,0x31,0x29,0x20,0x3e,0x20,0x4c,0x4f, - 0x47,0x5f,0x4c,0x45,0x56,0x45,0x4c,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73, - 0x65,0x6c,0x65,0x63,0x74,0x28,0x22,0x23,0x22,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20, - 0x3e,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x20,0x6d,0x73,0x67,0x20,0x3d,0x20,0x6d, - 0x73,0x67,0x3a,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x2e,0x2e,0x2e,0x29,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x6f,0x2e,0x62,0x61,0x73,0x65,0x2e,0x73, - 0x74,0x64,0x65,0x72,0x72,0x3a,0x77,0x72,0x69,0x74,0x65,0x28,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x45,0x42,0x55,0x47, - 0x47,0x45,0x52,0x5c,0x74,0x25,0x73,0x5c,0x74,0x25,0x73,0x5c,0x6e,0x22,0x2c,0x20, - 0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x6d,0x73,0x67,0x29,0x29,0x0a,0x65,0x6e,0x64, - 0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c, - 0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x0a,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x72,0x6c,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67, - 0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x2e,0x75,0x72,0x6c,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x55,0x52,0x49,0x20,0x70, - 0x61,0x72,0x73,0x69,0x6e,0x67,0x2c,0x20,0x63,0x6f,0x6d,0x70,0x6f,0x73,0x69,0x74, - 0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65, - 0x20,0x55,0x52,0x4c,0x20,0x72,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x0a, - 0x2d,0x2d,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x74,0x6f,0x6f, - 0x6c,0x6b,0x69,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x3a, - 0x20,0x44,0x69,0x65,0x67,0x6f,0x20,0x4e,0x65,0x68,0x61,0x62,0x0a,0x2d,0x2d,0x20, - 0x52,0x43,0x53,0x20,0x49,0x44,0x3a,0x20,0x24,0x49,0x64,0x3a,0x20,0x75,0x72,0x6c, - 0x2e,0x6c,0x75,0x61,0x2c,0x76,0x20,0x31,0x2e,0x33,0x38,0x20,0x32,0x30,0x30,0x36, - 0x2f,0x30,0x34,0x2f,0x30,0x33,0x20,0x30,0x34,0x3a,0x34,0x35,0x3a,0x34,0x32,0x20, - 0x64,0x69,0x65,0x67,0x6f,0x20,0x45,0x78,0x70,0x20,0x24,0x0a,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x63,0x6c, - 0x61,0x72,0x65,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73, - 0x74,0x72,0x69,0x6e,0x67,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x28, - 0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x5f,0x47,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x28, - 0x22,0x74,0x61,0x62,0x6c,0x65,0x22,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x5f,0x45,0x4e,0x56,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x69,0x66,0x20,0x73,0x65, - 0x74,0x66,0x65,0x6e,0x76,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x65,0x74,0x66,0x65, - 0x6e,0x76,0x28,0x31,0x2c,0x20,0x5f,0x45,0x4e,0x56,0x29,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d, - 0x2d,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x5f, - 0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x20,0x22,0x55,0x52,0x4c,0x20,0x31, - 0x2e,0x30,0x2e,0x31,0x22,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20, - 0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x69,0x74, - 0x73,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x20,0x68,0x65,0x78,0x61,0x64,0x65, - 0x63,0x69,0x6d,0x61,0x6c,0x20,0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61, - 0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d, - 0x20,0x20,0x20,0x73,0x3a,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x20,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65, - 0x64,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20, - 0x20,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x20,0x72,0x65,0x70,0x72,0x65,0x73, - 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75, - 0x62,0x28,0x73,0x2c,0x20,0x22,0x28,0x5b,0x5e,0x41,0x2d,0x5a,0x61,0x2d,0x7a,0x30, - 0x2d,0x39,0x5f,0x5d,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x63,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74, - 0x28,0x22,0x25,0x25,0x25,0x30,0x32,0x78,0x22,0x2c,0x20,0x73,0x74,0x72,0x69,0x6e, - 0x67,0x2e,0x62,0x79,0x74,0x65,0x28,0x63,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x50,0x72,0x6f,0x74,0x65,0x63, - 0x74,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e, - 0x74,0x2c,0x20,0x74,0x6f,0x20,0x70,0x72,0x65,0x76,0x65,0x6e,0x74,0x20,0x69,0x74, - 0x20,0x66,0x72,0x6f,0x6d,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x65,0x72,0x69,0x6e, - 0x67,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x0a,0x2d,0x2d,0x20,0x75,0x72, - 0x6c,0x20,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x6e, - 0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x73,0x3a,0x20,0x62,0x69,0x6e,0x61, - 0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x62,0x65,0x20, - 0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72, - 0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x20, - 0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f, - 0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x0a, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x61,0x6b, - 0x65,0x5f,0x73,0x65,0x74,0x28,0x74,0x29,0x0a,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x09,0x66,0x6f,0x72,0x20,0x69,0x2c,0x76,0x20, - 0x69,0x6e,0x20,0x62,0x61,0x73,0x65,0x2e,0x69,0x70,0x61,0x69,0x72,0x73,0x28,0x74, - 0x29,0x20,0x64,0x6f,0x0a,0x09,0x09,0x73,0x5b,0x74,0x5b,0x69,0x5d,0x5d,0x20,0x3d, - 0x20,0x31,0x0a,0x09,0x65,0x6e,0x64,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x73,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x74,0x68,0x65,0x73,0x65,0x20, - 0x61,0x72,0x65,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,0x77,0x69,0x74,0x68, - 0x69,0x6e,0x67,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x65,0x67,0x6d,0x65, - 0x6e,0x74,0x2c,0x20,0x61,0x6c,0x6f,0x6e,0x67,0x20,0x77,0x69,0x74,0x68,0x20,0x61, - 0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0x0a,0x2d,0x2d,0x20,0x6f,0x74,0x68,0x65,0x72, - 0x20,0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x20,0x6d,0x75,0x73,0x74, - 0x20,0x62,0x65,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x73,0x65,0x74,0x20,0x3d,0x20, - 0x6d,0x61,0x6b,0x65,0x5f,0x73,0x65,0x74,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x22, - 0x2d,0x22,0x2c,0x20,0x22,0x5f,0x22,0x2c,0x20,0x22,0x2e,0x22,0x2c,0x20,0x22,0x21, - 0x22,0x2c,0x20,0x22,0x7e,0x22,0x2c,0x20,0x22,0x2a,0x22,0x2c,0x20,0x22,0x27,0x22, - 0x2c,0x20,0x22,0x28,0x22,0x2c,0x0a,0x09,0x22,0x29,0x22,0x2c,0x20,0x22,0x3a,0x22, - 0x2c,0x20,0x22,0x40,0x22,0x2c,0x20,0x22,0x26,0x22,0x2c,0x20,0x22,0x3d,0x22,0x2c, - 0x20,0x22,0x2b,0x22,0x2c,0x20,0x22,0x24,0x22,0x2c,0x20,0x22,0x2c,0x22,0x2c,0x0a, - 0x7d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e, - 0x74,0x28,0x73,0x29,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x73,0x2c,0x20,0x22,0x28,0x5b,0x5e, - 0x41,0x2d,0x5a,0x61,0x2d,0x7a,0x30,0x2d,0x39,0x5f,0x5d,0x29,0x22,0x2c,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x63,0x29,0x0a,0x09,0x09,0x69,0x66, - 0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x73,0x65,0x74,0x5b,0x63,0x5d,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x0a,0x09,0x09, - 0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x25,0x25,0x25,0x30,0x32, - 0x78,0x22,0x2c,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x62,0x79,0x74,0x65,0x28, - 0x63,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x09,0x65,0x6e,0x64,0x29,0x0a,0x65,0x6e, - 0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x69,0x74,0x73,0x20,0x65,0x73, - 0x63,0x61,0x70,0x65,0x64,0x20,0x68,0x65,0x78,0x61,0x64,0x65,0x63,0x69,0x6d,0x61, - 0x6c,0x20,0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e, - 0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x73, - 0x3a,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20, - 0x74,0x6f,0x20,0x62,0x65,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x0a,0x2d,0x2d, - 0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x65,0x73, - 0x63,0x61,0x70,0x65,0x64,0x20,0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61, - 0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x62, - 0x69,0x6e,0x61,0x72,0x79,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x75,0x6e,0x65, - 0x73,0x63,0x61,0x70,0x65,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28, - 0x73,0x2c,0x20,0x22,0x25,0x25,0x28,0x25,0x78,0x25,0x78,0x29,0x22,0x2c,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x68,0x65,0x78,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x63,0x68,0x61,0x72,0x28,0x62,0x61,0x73,0x65,0x2e,0x74,0x6f,0x6e, - 0x75,0x6d,0x62,0x65,0x72,0x28,0x68,0x65,0x78,0x2c,0x20,0x31,0x36,0x29,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42, - 0x75,0x69,0x6c,0x64,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x66,0x72,0x6f, - 0x6d,0x20,0x61,0x20,0x62,0x61,0x73,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x61,0x6e, - 0x64,0x20,0x61,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74, - 0x68,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20, - 0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x72, - 0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20, - 0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x63,0x6f,0x72, - 0x72,0x65,0x73,0x70,0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x61,0x62,0x73,0x6f,0x6c, - 0x75,0x74,0x65,0x20,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x5f,0x70, - 0x61,0x74,0x68,0x28,0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x2c,0x20,0x72, - 0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x73,0x75,0x62,0x28, - 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68,0x2c,0x20,0x31, - 0x2c,0x20,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,0x2f,0x22,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65, - 0x5f,0x70,0x61,0x74,0x68,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e, - 0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x74,0x68, - 0x2c,0x20,0x22,0x5b,0x5e,0x2f,0x5d,0x2a,0x24,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20, - 0x2e,0x2e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68, - 0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70,0x61,0x74,0x68,0x2c,0x20,0x22,0x28, - 0x5b,0x5e,0x2f,0x5d,0x2a,0x25,0x2e,0x2f,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x73,0x20,0x7e,0x3d,0x20,0x22,0x2e,0x2f,0x22,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x20,0x65,0x6c,0x73,0x65, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68, - 0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70, - 0x61,0x74,0x68,0x2c,0x20,0x22,0x2f,0x25,0x2e,0x24,0x22,0x2c,0x20,0x22,0x2f,0x22, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x64,0x75, - 0x63,0x65,0x64,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x72,0x65, - 0x64,0x75,0x63,0x65,0x64,0x20,0x7e,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x64,0x6f, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x64, - 0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73, - 0x75,0x62,0x28,0x72,0x65,0x64,0x75,0x63,0x65,0x64,0x2c,0x20,0x22,0x28,0x5b,0x5e, - 0x2f,0x5d,0x2a,0x2f,0x25,0x2e,0x25,0x2e,0x2f,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x20,0x7e,0x3d,0x20,0x22,0x2e, - 0x2e,0x2f,0x2e,0x2e,0x2f,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x73,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67, - 0x73,0x75,0x62,0x28,0x72,0x65,0x64,0x75,0x63,0x65,0x64,0x2c,0x20,0x22,0x28,0x5b, - 0x5e,0x2f,0x5d,0x2a,0x2f,0x25,0x2e,0x25,0x2e,0x29,0x24,0x22,0x2c,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x20,0x7e,0x3d,0x20,0x22,0x2e,0x2e,0x2f,0x2e, - 0x2e,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22, - 0x22,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x74,0x68,0x0a,0x65,0x6e,0x64, - 0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a, - 0x2d,0x2d,0x20,0x50,0x61,0x72,0x73,0x65,0x73,0x20,0x61,0x20,0x75,0x72,0x6c,0x20, - 0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x20,0x74,0x61, - 0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6c,0x6c,0x20,0x69,0x74,0x73, - 0x20,0x70,0x61,0x72,0x74,0x73,0x20,0x61,0x63,0x63,0x6f,0x72,0x64,0x69,0x6e,0x67, - 0x20,0x74,0x6f,0x20,0x52,0x46,0x43,0x20,0x32,0x33,0x39,0x36,0x0a,0x2d,0x2d,0x20, - 0x54,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20,0x67,0x72, - 0x61,0x6d,0x6d,0x61,0x72,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62,0x65,0x73,0x20, - 0x74,0x68,0x65,0x20,0x6e,0x61,0x6d,0x65,0x73,0x20,0x67,0x69,0x76,0x65,0x6e,0x20, - 0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x55,0x52,0x4c,0x20,0x70,0x61,0x72,0x74,0x73, - 0x0a,0x2d,0x2d,0x20,0x3c,0x75,0x72,0x6c,0x3e,0x20,0x3a,0x3a,0x3d,0x20,0x3c,0x73, - 0x63,0x68,0x65,0x6d,0x65,0x3e,0x3a,0x2f,0x2f,0x3c,0x61,0x75,0x74,0x68,0x6f,0x72, - 0x69,0x74,0x79,0x3e,0x2f,0x3c,0x70,0x61,0x74,0x68,0x3e,0x3b,0x3c,0x70,0x61,0x72, - 0x61,0x6d,0x73,0x3e,0x3f,0x3c,0x71,0x75,0x65,0x72,0x79,0x3e,0x23,0x3c,0x66,0x72, - 0x61,0x67,0x6d,0x65,0x6e,0x74,0x3e,0x0a,0x2d,0x2d,0x20,0x3c,0x61,0x75,0x74,0x68, - 0x6f,0x72,0x69,0x74,0x79,0x3e,0x20,0x3a,0x3a,0x3d,0x20,0x3c,0x75,0x73,0x65,0x72, - 0x69,0x6e,0x66,0x6f,0x3e,0x40,0x3c,0x68,0x6f,0x73,0x74,0x3e,0x3a,0x3c,0x70,0x6f, - 0x72,0x74,0x3e,0x0a,0x2d,0x2d,0x20,0x3c,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f, - 0x3e,0x20,0x3a,0x3a,0x3d,0x20,0x3c,0x75,0x73,0x65,0x72,0x3e,0x5b,0x3a,0x3c,0x70, - 0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x3e,0x5d,0x0a,0x2d,0x2d,0x20,0x3c,0x70,0x61, - 0x74,0x68,0x3e,0x20,0x3a,0x3a,0x20,0x3d,0x20,0x7b,0x3c,0x73,0x65,0x67,0x6d,0x65, - 0x6e,0x74,0x3e,0x2f,0x7d,0x3c,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x3e,0x0a,0x2d, - 0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x75,0x72,0x6c, - 0x3a,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x72,0x65,0x73,0x6f,0x75,0x72, - 0x63,0x65,0x20,0x6c,0x6f,0x63,0x61,0x74,0x6f,0x72,0x20,0x6f,0x66,0x20,0x72,0x65, - 0x71,0x75,0x65,0x73,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x64,0x65,0x66,0x61,0x75, - 0x6c,0x74,0x3a,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x64, - 0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x66,0x6f, - 0x72,0x20,0x65,0x61,0x63,0x68,0x20,0x66,0x69,0x65,0x6c,0x64,0x0a,0x2d,0x2d,0x20, - 0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x74,0x61,0x62, - 0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c, - 0x6f,0x77,0x69,0x6e,0x67,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c,0x20,0x77,0x68, - 0x65,0x72,0x65,0x20,0x52,0x46,0x43,0x20,0x6e,0x61,0x6d,0x69,0x6e,0x67,0x20,0x63, - 0x6f,0x6e,0x76,0x65,0x6e,0x74,0x69,0x6f,0x6e,0x73,0x20,0x68,0x61,0x76,0x65,0x0a, - 0x2d,0x2d,0x20,0x20,0x20,0x62,0x65,0x65,0x6e,0x20,0x70,0x72,0x65,0x73,0x65,0x72, - 0x76,0x65,0x64,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x73,0x63,0x68,0x65, - 0x6d,0x65,0x2c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x2c,0x20,0x75, - 0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x75,0x73,0x65,0x72,0x2c,0x20,0x70, - 0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70, - 0x6f,0x72,0x74,0x2c,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68, - 0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x73,0x2c,0x20,0x71,0x75,0x65,0x72,0x79,0x2c, - 0x20,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x20,0x4f,0x62,0x73, - 0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x6c,0x65,0x61,0x64,0x69, - 0x6e,0x67,0x20,0x27,0x2f,0x27,0x20,0x69,0x6e,0x20,0x7b,0x2f,0x3c,0x70,0x61,0x74, - 0x68,0x3e,0x7d,0x20,0x69,0x73,0x20,0x63,0x6f,0x6e,0x73,0x69,0x64,0x65,0x72,0x65, - 0x64,0x20,0x70,0x61,0x72,0x74,0x20,0x6f,0x66,0x20,0x3c,0x70,0x61,0x74,0x68,0x3e, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x28,0x75,0x72, - 0x6c,0x2c,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x69,0x7a,0x65,0x20,0x64,0x65, - 0x66,0x61,0x75,0x6c,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x73, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x72,0x73,0x65, - 0x64,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69, - 0x2c,0x76,0x20,0x69,0x6e,0x20,0x62,0x61,0x73,0x65,0x2e,0x70,0x61,0x69,0x72,0x73, - 0x28,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x6f,0x72,0x20,0x70,0x61,0x72,0x73, - 0x65,0x64,0x29,0x20,0x64,0x6f,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x69,0x5d, - 0x20,0x3d,0x20,0x76,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x65,0x6d,0x70,0x74,0x79,0x20,0x75,0x72,0x6c,0x20,0x69,0x73,0x20,0x70,0x61,0x72, - 0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x6e,0x6f,0x74,0x20,0x75,0x72,0x6c,0x20,0x6f,0x72,0x20,0x75,0x72,0x6c, - 0x20,0x3d,0x3d,0x20,0x22,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x22,0x69,0x6e,0x76,0x61,0x6c,0x69,0x64, - 0x20,0x75,0x72,0x6c,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x20,0x77,0x68,0x69,0x74,0x65,0x73,0x70,0x61, - 0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c, - 0x20,0x22,0x25,0x73,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x67,0x65,0x74,0x20,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x20, - 0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e, - 0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c,0x20,0x22,0x23,0x28,0x2e,0x2a,0x29, - 0x24,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x66,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x66, - 0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x66,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x0a,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65, - 0x74,0x20,0x73,0x63,0x68,0x65,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x6c, - 0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75, - 0x72,0x6c,0x2c,0x20,0x22,0x5e,0x28,0x5b,0x25,0x77,0x5d,0x5b,0x25,0x77,0x25,0x2b, - 0x25,0x2d,0x25,0x2e,0x5d,0x2a,0x29,0x25,0x3a,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x29,0x20, - 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x3d,0x20, - 0x73,0x3b,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x61,0x75,0x74, - 0x68,0x6f,0x72,0x69,0x74,0x79,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d, - 0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c, - 0x2c,0x20,0x22,0x5e,0x2f,0x2f,0x28,0x5b,0x5e,0x2f,0x5d,0x2a,0x29,0x22,0x2c,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f, - 0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x71, - 0x75,0x65,0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x69,0x6e,0x67,0x0a,0x20, - 0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e, - 0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c,0x20,0x22,0x25,0x3f,0x28,0x2e,0x2a, - 0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x71,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x71, - 0x75,0x65,0x72,0x79,0x20,0x3d,0x20,0x71,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x70, - 0x61,0x72,0x61,0x6d,0x73,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c, - 0x20,0x22,0x25,0x3b,0x28,0x2e,0x2a,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70, - 0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x3d,0x20,0x70, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x22,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x73,0x20,0x77,0x68,0x61,0x74,0x65, - 0x76,0x65,0x72,0x20,0x77,0x61,0x73,0x20,0x6c,0x65,0x66,0x74,0x0a,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x75,0x72,0x6c,0x20,0x7e,0x3d,0x20,0x22,0x22,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x3d, - 0x20,0x75,0x72,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x70, - 0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x0a, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x61,0x75,0x74,0x68,0x6f, - 0x72,0x69,0x74,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74, - 0x79,0x2c,0x22,0x5e,0x28,0x5b,0x5e,0x40,0x5d,0x2a,0x29,0x40,0x22,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x75,0x29,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x69,0x6e, - 0x66,0x6f,0x20,0x3d,0x20,0x75,0x3b,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22, - 0x22,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x61,0x75,0x74,0x68,0x6f, - 0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73, - 0x75,0x62,0x28,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x2c,0x20,0x22,0x3a, - 0x28,0x5b,0x5e,0x3a,0x5d,0x2a,0x29,0x24,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x70,0x29,0x20,0x70, - 0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x6f,0x72,0x74,0x20,0x3d,0x20,0x70,0x3b,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20, - 0x7e,0x3d,0x20,0x22,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x72,0x73,0x65, - 0x64,0x2e,0x68,0x6f,0x73,0x74,0x20,0x3d,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69, - 0x74,0x79,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x70,0x61,0x72,0x73, - 0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x0a,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x72,0x73, - 0x65,0x64,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x75,0x73,0x65,0x72,0x69, - 0x6e,0x66,0x6f,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75, - 0x62,0x28,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x22,0x3a,0x28,0x5b, - 0x5e,0x3a,0x5d,0x2a,0x29,0x24,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x70,0x29,0x20,0x70,0x61,0x72, - 0x73,0x65,0x64,0x2e,0x70,0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x20,0x3d,0x20,0x70, - 0x3b,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72, - 0x20,0x3d,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x0a,0x20,0x20,0x20,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x0a,0x65,0x6e, - 0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x52,0x65,0x62,0x75,0x69,0x6c,0x64,0x73,0x20,0x61,0x20,0x70, - 0x61,0x72,0x73,0x65,0x64,0x20,0x55,0x52,0x4c,0x20,0x66,0x72,0x6f,0x6d,0x20,0x69, - 0x74,0x73,0x20,0x63,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0x2e,0x0a,0x2d, - 0x2d,0x20,0x43,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0x20,0x61,0x72,0x65, - 0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,0x20,0x69,0x66,0x20,0x61,0x6e, - 0x79,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x20,0x6f,0x72,0x20,0x75,0x6e, - 0x61,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65, - 0x72,0x73,0x20,0x61,0x72,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0a,0x2d,0x2d,0x20, - 0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65, - 0x64,0x3a,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x55,0x52,0x4c,0x2c,0x20,0x61, - 0x73,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x65,0x64,0x20,0x62,0x79,0x20,0x70,0x61, - 0x72,0x73,0x65,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d, - 0x2d,0x20,0x20,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x69,0x6e,0x67,0x20, - 0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70, - 0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x55,0x52,0x4c,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x62,0x75,0x69,0x6c,0x64,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x70,0x61,0x74,0x68,0x20, - 0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x72, - 0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x6f,0x72,0x20,0x22,0x22,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20, - 0x62,0x75,0x69,0x6c,0x64,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x70,0x61,0x74,0x68, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e, - 0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x75,0x72,0x6c,0x20, - 0x3d,0x20,0x75,0x72,0x6c,0x20,0x2e,0x2e,0x20,0x22,0x3b,0x22,0x20,0x2e,0x2e,0x20, - 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e, - 0x71,0x75,0x65,0x72,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x75,0x72,0x6c,0x20,0x3d, - 0x20,0x75,0x72,0x6c,0x20,0x2e,0x2e,0x20,0x22,0x3f,0x22,0x20,0x2e,0x2e,0x20,0x70, - 0x61,0x72,0x73,0x65,0x64,0x2e,0x71,0x75,0x65,0x72,0x79,0x20,0x65,0x6e,0x64,0x0a, - 0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79, - 0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f,0x72, - 0x69,0x74,0x79,0x0a,0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x68, - 0x6f,0x73,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x61,0x75,0x74,0x68,0x6f, - 0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x68,0x6f, - 0x73,0x74,0x0a,0x09,0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70, - 0x6f,0x72,0x74,0x20,0x74,0x68,0x65,0x6e,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69, - 0x74,0x79,0x20,0x3d,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x2e, - 0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e, - 0x70,0x6f,0x72,0x74,0x20,0x65,0x6e,0x64,0x0a,0x09,0x09,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x70,0x61,0x72,0x73, - 0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x0a,0x09,0x09,0x69,0x66, - 0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x20,0x74,0x68,0x65, - 0x6e,0x0a,0x09,0x09,0x09,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20, - 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x0a,0x09,0x09,0x09,0x69, - 0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x73,0x73,0x77,0x6f,0x72, - 0x64,0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x09,0x09,0x75,0x73,0x65,0x72,0x69, - 0x6e,0x66,0x6f,0x20,0x3d,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x2e, - 0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e, - 0x70,0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x0a,0x09,0x09,0x09,0x65,0x6e,0x64,0x0a, - 0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x09,0x69,0x66,0x20,0x75,0x73,0x65,0x72,0x69, - 0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69, - 0x74,0x79,0x20,0x3d,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x2e,0x2e, - 0x20,0x22,0x40,0x22,0x20,0x2e,0x2e,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74, - 0x79,0x20,0x65,0x6e,0x64,0x0a,0x09,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x22,0x2f,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x61, - 0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x2e,0x2e,0x20,0x75,0x72,0x6c,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65, - 0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x75,0x72, - 0x6c,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d, - 0x65,0x20,0x2e,0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x75,0x72,0x6c,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65, - 0x64,0x2e,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x75,0x72,0x6c,0x20,0x3d,0x20,0x75,0x72,0x6c,0x20,0x2e,0x2e,0x20,0x22,0x23,0x22, - 0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x66,0x72,0x61,0x67,0x6d, - 0x65,0x6e,0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75, - 0x72,0x6c,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62, - 0x28,0x75,0x72,0x6c,0x2c,0x20,0x22,0x25,0x73,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x6c,0x0a,0x65, - 0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x2d,0x2d,0x20,0x42,0x75,0x69,0x6c,0x64,0x73,0x20,0x61,0x20,0x61,0x62, - 0x73,0x6f,0x6c,0x75,0x74,0x65,0x20,0x55,0x52,0x4c,0x20,0x66,0x72,0x6f,0x6d,0x20, - 0x61,0x20,0x62,0x61,0x73,0x65,0x20,0x61,0x6e,0x64,0x20,0x61,0x20,0x72,0x65,0x6c, - 0x61,0x74,0x69,0x76,0x65,0x20,0x55,0x52,0x4c,0x20,0x61,0x63,0x63,0x6f,0x72,0x64, - 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x52,0x46,0x43,0x20,0x32,0x33,0x39,0x36,0x0a, - 0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x62,0x61, - 0x73,0x65,0x5f,0x75,0x72,0x6c,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x72,0x65,0x6c,0x61, - 0x74,0x69,0x76,0x65,0x5f,0x75,0x72,0x6c,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75, - 0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70, - 0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x20, - 0x75,0x72,0x6c,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x73,0x6f,0x6c, - 0x75,0x74,0x65,0x28,0x62,0x61,0x73,0x65,0x5f,0x75,0x72,0x6c,0x2c,0x20,0x72,0x65, - 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x72,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x62,0x61,0x73,0x65,0x2e,0x74,0x79,0x70,0x65,0x28,0x62,0x61,0x73, - 0x65,0x5f,0x75,0x72,0x6c,0x29,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x62,0x6c,0x65, - 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62, - 0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x62,0x61,0x73, - 0x65,0x5f,0x75,0x72,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61, - 0x73,0x65,0x5f,0x75,0x72,0x6c,0x20,0x3d,0x20,0x62,0x75,0x69,0x6c,0x64,0x28,0x62, - 0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73, - 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65, - 0x28,0x62,0x61,0x73,0x65,0x5f,0x75,0x72,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x6c, - 0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x70, - 0x61,0x72,0x73,0x65,0x28,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x72, - 0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x62,0x61, - 0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x72, - 0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75, - 0x72,0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x6e,0x6f, - 0x74,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65, - 0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61, - 0x73,0x65,0x5f,0x75,0x72,0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69, - 0x66,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65, - 0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x72, - 0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73, - 0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x3d,0x20,0x62,0x61,0x73,0x65, - 0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65, - 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75, - 0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76, - 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f,0x72,0x69, - 0x74,0x79,0x20,0x3d,0x20,0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64, - 0x2e,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65, - 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61, - 0x74,0x68,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65, - 0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x62, - 0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f, - 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f, - 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x3d,0x20, - 0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61, - 0x6d,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65, - 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x71,0x75, - 0x65,0x72,0x79,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64, - 0x2e,0x71,0x75,0x65,0x72,0x79,0x20,0x3d,0x20,0x62,0x61,0x73,0x65,0x5f,0x70,0x61, - 0x72,0x73,0x65,0x64,0x2e,0x71,0x75,0x65,0x72,0x79,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65, - 0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x61, - 0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x5f,0x70,0x61,0x74,0x68,0x28,0x62,0x61,0x73, - 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x6f,0x72, - 0x20,0x22,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76, - 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x75,0x69,0x6c,0x64,0x28, - 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42, - 0x72,0x65,0x61,0x6b,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x6e,0x74, - 0x6f,0x20,0x69,0x74,0x73,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x2c,0x20, - 0x75,0x6e,0x65,0x73,0x63,0x61,0x70,0x69,0x6e,0x67,0x20,0x74,0x68,0x65,0x20,0x73, - 0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74, - 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,0x52,0x65, - 0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x73,0x65,0x67,0x6d,0x65, - 0x6e,0x74,0x3a,0x20,0x61,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68, - 0x20,0x6f,0x6e,0x65,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x70,0x65,0x72,0x20,0x73, - 0x65,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x61, - 0x72,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x74,0x68,0x29,0x0a,0x09, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x7b, - 0x7d,0x0a,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x6f, - 0x72,0x20,0x22,0x22,0x0a,0x09,0x2d,0x2d,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73, - 0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70,0x61,0x74,0x68,0x2c, - 0x20,0x22,0x25,0x73,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a,0x09,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70,0x61,0x74,0x68,0x2c,0x20,0x22,0x28, - 0x5b,0x5e,0x2f,0x5d,0x2b,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x28,0x73,0x29,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65, - 0x72,0x74,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x2c,0x20,0x73,0x29,0x20,0x65,0x6e, - 0x64,0x29,0x0a,0x09,0x66,0x6f,0x72,0x20,0x69,0x20,0x3d,0x20,0x31,0x2c,0x20,0x23, - 0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x64,0x6f,0x0a,0x09,0x09,0x70,0x61,0x72,0x73, - 0x65,0x64,0x5b,0x69,0x5d,0x20,0x3d,0x20,0x75,0x6e,0x65,0x73,0x63,0x61,0x70,0x65, - 0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x69,0x5d,0x29,0x0a,0x09,0x65,0x6e,0x64, - 0x0a,0x09,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x73,0x75,0x62,0x28, - 0x70,0x61,0x74,0x68,0x2c,0x20,0x31,0x2c,0x20,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22, - 0x2f,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69, - 0x73,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x20,0x3d,0x20,0x31,0x20,0x65, - 0x6e,0x64,0x0a,0x09,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x73,0x75, - 0x62,0x28,0x70,0x61,0x74,0x68,0x2c,0x20,0x2d,0x31,0x2c,0x20,0x2d,0x31,0x29,0x20, - 0x3d,0x3d,0x20,0x22,0x2f,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x72,0x73, - 0x65,0x64,0x2e,0x69,0x73,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20, - 0x3d,0x20,0x31,0x20,0x65,0x6e,0x64,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x70,0x61,0x72,0x73,0x65,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42,0x75,0x69, - 0x6c,0x64,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x63,0x6f,0x6d,0x70,0x6f, - 0x6e,0x65,0x6e,0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x69,0x74,0x73,0x20,0x73,0x65, - 0x67,0x6d,0x65,0x6e,0x74,0x73,0x2c,0x20,0x65,0x73,0x63,0x61,0x70,0x69,0x6e,0x67, - 0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x61, - 0x63,0x74,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a, - 0x2d,0x2d,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x3a,0x20,0x70,0x61,0x74, - 0x68,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20, - 0x75,0x6e,0x73,0x61,0x66,0x65,0x3a,0x20,0x69,0x66,0x20,0x74,0x72,0x75,0x65,0x2c, - 0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x72,0x65,0x20,0x6e,0x6f, - 0x74,0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,0x20,0x62,0x65,0x66,0x6f, - 0x72,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x73,0x20,0x62,0x75,0x69,0x6c,0x74, - 0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20, - 0x20,0x70,0x61,0x74,0x68,0x3a,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70,0x6f,0x6e, - 0x64,0x69,0x6e,0x67,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x74,0x72,0x69,0x6e,0x67, - 0x69,0x6e,0x67,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x62,0x75,0x69,0x6c,0x64, - 0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x2c,0x20,0x75,0x6e, - 0x73,0x61,0x66,0x65,0x29,0x0a,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x74, - 0x68,0x20,0x3d,0x20,0x22,0x22,0x0a,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x20, - 0x3d,0x20,0x23,0x70,0x61,0x72,0x73,0x65,0x64,0x0a,0x09,0x69,0x66,0x20,0x75,0x6e, - 0x73,0x61,0x66,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x66,0x6f,0x72,0x20, - 0x69,0x20,0x3d,0x20,0x31,0x2c,0x20,0x6e,0x2d,0x31,0x20,0x64,0x6f,0x0a,0x09,0x09, - 0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20, - 0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x69,0x5d,0x0a,0x09,0x09,0x09,0x70,0x61,0x74, - 0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x0a, - 0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x09,0x69,0x66,0x20,0x6e,0x20,0x3e,0x20,0x30, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20, - 0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x6e, - 0x5d,0x0a,0x09,0x09,0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69, - 0x73,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20, - 0x22,0x2f,0x22,0x20,0x65,0x6e,0x64,0x0a,0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x65, - 0x6c,0x73,0x65,0x0a,0x09,0x09,0x66,0x6f,0x72,0x20,0x69,0x20,0x3d,0x20,0x31,0x2c, - 0x20,0x6e,0x2d,0x31,0x20,0x64,0x6f,0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20, - 0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x70,0x72,0x6f,0x74,0x65,0x63, - 0x74,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x28,0x70,0x61,0x72,0x73,0x65,0x64, - 0x5b,0x69,0x5d,0x29,0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70, - 0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x0a,0x09,0x09,0x65,0x6e,0x64, - 0x0a,0x09,0x09,0x69,0x66,0x20,0x6e,0x20,0x3e,0x20,0x30,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20, - 0x2e,0x2e,0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x5f,0x73,0x65,0x67,0x6d,0x65, - 0x6e,0x74,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x6e,0x5d,0x29,0x0a,0x09,0x09, - 0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69,0x73,0x5f,0x64,0x69, - 0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x74, - 0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x20, - 0x65,0x6e,0x64,0x0a,0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x65,0x6e,0x64,0x0a,0x09, - 0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69,0x73,0x5f,0x61,0x62,0x73, - 0x6f,0x6c,0x75,0x74,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x74,0x68,0x20, - 0x3d,0x20,0x22,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x70,0x61,0x74,0x68,0x20,0x65,0x6e, - 0x64,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x74,0x68,0x0a,0x65, - 0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x45,0x4e,0x56,0x0a, - 0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20, - 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75, - 0x72,0x6c,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x0a,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x61,0x69,0x6e,0x20, - 0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70, - 0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d, - 0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65, - 0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e, - 0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72, - 0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72, - 0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63, - 0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72, - 0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65, - 0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72, - 0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68, - 0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63, - 0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d, - 0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69, - 0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75, - 0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61, - 0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74, - 0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e, - 0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31, - 0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e, - 0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20, - 0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73, - 0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20, - 0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69, - 0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x44,0x42,0x47,0x50,0x5f,0x43, - 0x4c,0x49,0x45,0x4e,0x54,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x20, - 0x22,0x31,0x2e,0x31,0x2e,0x30,0x22,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64, - 0x65,0x62,0x75,0x67,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22, - 0x64,0x65,0x62,0x75,0x67,0x22,0x0a,0x0a,0x2d,0x2d,0x20,0x54,0x6f,0x20,0x61,0x76, - 0x6f,0x69,0x64,0x20,0x63,0x79,0x63,0x6c,0x69,0x63,0x20,0x64,0x65,0x70,0x65,0x6e, - 0x64,0x65,0x6e,0x63,0x79,0x2c,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20, - 0x73,0x74,0x61,0x74,0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x20,0x74,0x68,0x61,0x74,0x20,0x6d,0x75,0x73,0x74,0x20, - 0x62,0x65,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x65, - 0x6c,0x73,0x65,0x77,0x68,0x65,0x72,0x65,0x20,0x28,0x69,0x6e,0x20,0x63,0x6f,0x6d, - 0x6d,0x61,0x6e,0x64,0x73,0x20,0x6d,0x6f,0x73,0x74,0x20,0x6c,0x69,0x6b,0x65,0x6c, - 0x79,0x29,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x73,0x74,0x6f,0x72,0x65, - 0x64,0x20,0x69,0x6e,0x20,0x61,0x20,0x66,0x61,0x6b,0x65,0x20,0x6d,0x6f,0x64,0x75, - 0x6c,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x72, - 0x65,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x65,0x20,0x3d,0x20, - 0x7b,0x20,0x7d,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x6c,0x6f,0x61,0x64, - 0x65,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x72, - 0x65,0x22,0x5d,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x0a,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65, - 0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20, - 0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x22,0x0a,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x64,0x62,0x67,0x70,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69, - 0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x64,0x62,0x67, - 0x70,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64, - 0x73,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x22,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20, - 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65, - 0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x72,0x6c,0x22,0x0a,0x0a,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x67,0x20,0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e, - 0x6c,0x6f,0x67,0x0a,0x0a,0x0a,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x20,0x63,0x6f, - 0x6d,0x70,0x6c,0x65,0x74,0x65,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x64,0x6c,0x69, - 0x62,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63, - 0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x2c,0x20,0x63,0x6f,0x63,0x72,0x65,0x61, - 0x74,0x65,0x2c,0x20,0x63,0x6f,0x77,0x72,0x61,0x70,0x2c,0x20,0x63,0x6f,0x79,0x69, - 0x65,0x6c,0x64,0x2c,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x63, - 0x6f,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74, - 0x69,0x6e,0x65,0x2e,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x2c,0x20,0x63,0x6f,0x72, - 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63,0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x2c,0x20,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x79,0x69,0x65,0x6c,0x64,0x2c,0x20, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65, - 0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x73,0x74,0x61,0x74, - 0x75,0x73,0x0a,0x0a,0x0a,0x2d,0x2d,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72, - 0x20,0x74,0x68,0x65,0x20,0x55,0x52,0x49,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2c,0x20,0x74,0x6f,0x20,0x6e,0x6f,0x74, - 0x20,0x6a,0x75,0x6d,0x70,0x20,0x69,0x6e,0x74,0x6f,0x20,0x77,0x69,0x74,0x68,0x20, - 0x72,0x65,0x64,0x65,0x66,0x69,0x6e,0x65,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x20,0x6f,0x72,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20, - 0x62,0x6f,0x6f,0x74,0x73,0x74,0x72,0x61,0x70,0x20,0x73,0x74,0x75,0x66,0x66,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x75, - 0x72,0x69,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20, - 0x69,0x6e,0x20,0x69,0x6e,0x69,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74, - 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x3d,0x20,0x6e,0x69,0x6c, - 0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,0x69,0x6e,0x20,0x69,0x6e,0x69,0x74,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x0a,0x2d,0x2d,0x20,0x77,0x69,0x6c, - 0x6c,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x73,0x65, - 0x73,0x73,0x69,0x6f,0x6e,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x2c,0x20,0x61,0x6e, - 0x64,0x20,0x70,0x6f,0x73,0x73,0x69,0x62,0x6c,0x79,0x20,0x61,0x20,0x6c,0x69,0x73, - 0x74,0x20,0x6f,0x66,0x20,0x61,0x6c,0x6c,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e, - 0x73,0x20,0x69,0x66,0x20,0x61,0x20,0x6d,0x75,0x6c,0x74,0x69,0x2d,0x74,0x68,0x72, - 0x65,0x61,0x64,0x65,0x64,0x20,0x6d,0x6f,0x64,0x65,0x6c,0x20,0x69,0x73,0x20,0x61, - 0x64,0x6f,0x70,0x74,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x74,0x68,0x69,0x73,0x20,0x69, - 0x73,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x75,0x73,0x65,0x64,0x20,0x66,0x6f,0x72,0x20, - 0x61,0x73,0x79,0x6e,0x63,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2e,0x0a, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73, - 0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x2d,0x2d,0x20,0x74, - 0x72,0x61,0x63,0x6b,0x73,0x20,0x61,0x6c,0x6c,0x20,0x61,0x63,0x74,0x69,0x76,0x65, - 0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x61,0x6e,0x64,0x20, - 0x61,0x73,0x73,0x6f,0x63,0x69,0x61,0x74,0x65,0x20,0x61,0x6e,0x20,0x69,0x64,0x20, - 0x74,0x6f,0x20,0x74,0x68,0x65,0x6d,0x2c,0x20,0x74,0x68,0x65,0x20,0x74,0x61,0x62, - 0x6c,0x65,0x20,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x20,0x69,0x73,0x20,0x74,0x68, - 0x65,0x20,0x69,0x64,0x3d,0x3e,0x63,0x6f,0x72,0x6f,0x20,0x6d,0x61,0x70,0x70,0x69, - 0x6e,0x67,0x2c,0x20,0x74,0x68,0x65,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x72, - 0x6f,0x6d,0x5f,0x63,0x6f,0x72,0x6f,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x72, - 0x65,0x76,0x65,0x72,0x73,0x65,0x0a,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69, - 0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x3d,0x20, - 0x7b,0x20,0x6e,0x20,0x3d,0x20,0x30,0x2c,0x20,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64, - 0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28, - 0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20, - 0x22,0x76,0x22,0x20,0x7d,0x29,0x2c,0x20,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f,0x72, - 0x6f,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65, - 0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d, - 0x20,0x22,0x6b,0x22,0x20,0x7d,0x29,0x20,0x7d,0x0a,0x0a,0x63,0x6f,0x72,0x65,0x2e, - 0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20, - 0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,0x69,0x6e,0x20, - 0x6c,0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x0a,0x0a,0x2d,0x2d,0x20,0x22,0x42,0x45,0x47,0x49,0x4e,0x20,0x56,0x45, - 0x52,0x53,0x49,0x4f,0x4e,0x20,0x44,0x45,0x50,0x45,0x4e,0x44,0x45,0x4e,0x54,0x20, - 0x43,0x4f,0x44,0x45,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x74,0x62, - 0x70,0x65,0x6e,0x76,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20, - 0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x6f,0x66,0x20,0x61, - 0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x28,0x63,0x6f,0x6d, - 0x70,0x69,0x6c,0x65,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x29,0x0a, - 0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22, - 0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x20, - 0x3d,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x0a,0x20,0x20,0x20,0x20,0x73,0x65, - 0x74,0x62,0x70,0x65,0x6e,0x76,0x20,0x3d,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76, - 0x0a,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e, - 0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x22,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x74, - 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e, - 0x73,0x65,0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x5f,0x45,0x4e,0x56,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x66,0x69, - 0x72,0x73,0x74,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20,0x20,0x20, - 0x73,0x65,0x74,0x62,0x70,0x65,0x6e,0x76,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x66,0x2c,0x20,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x20,0x73,0x65,0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x66,0x2c,0x20,0x31, - 0x2c,0x20,0x74,0x29,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6c,0x73,0x65,0x20,0x65,0x72, - 0x72,0x6f,0x72,0x28,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x2e,0x2e,0x20, - 0x22,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x65, - 0x64,0x2e,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x20,0x22,0x45,0x4e,0x44, - 0x20,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x44,0x45,0x50,0x45,0x4e,0x44,0x45, - 0x4e,0x54,0x20,0x43,0x4f,0x44,0x45,0x22,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4f,0x75, - 0x74,0x70,0x75,0x74,0x20,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4f,0x76,0x65, - 0x72,0x72,0x69,0x64,0x65,0x20,0x73,0x74,0x61,0x6e,0x64,0x61,0x72,0x64,0x20,0x6f, - 0x75,0x74,0x70,0x75,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20, - 0x26,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x73,0x20,0x74,0x6f,0x20,0x72, - 0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x20,0x64,0x61,0x74,0x61,0x20,0x77,0x72,0x69, - 0x74,0x74,0x65,0x6e,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x73,0x65,0x20,0x66,0x69, - 0x6c,0x65,0x73,0x20,0x74,0x6f,0x20,0x49,0x44,0x45,0x20,0x74,0x6f,0x6f,0x2e,0x0a, - 0x2d,0x2d,0x20,0x54,0x68,0x69,0x73,0x20,0x77,0x6f,0x72,0x6b,0x73,0x20,0x6f,0x6e, - 0x6c,0x79,0x20,0x66,0x6f,0x72,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x64,0x6f, - 0x6e,0x65,0x20,0x69,0x6e,0x20,0x4c,0x75,0x61,0x2c,0x20,0x6f,0x75,0x74,0x70,0x75, - 0x74,0x20,0x77,0x72,0x69,0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x43,0x20,0x65, - 0x78,0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0x20,0x69,0x73,0x20,0x73,0x74,0x69, - 0x6c,0x6c,0x20,0x67,0x6f,0x20,0x74,0x6f,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x20, - 0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x66,0x69,0x6c,0x65,0x2e,0x0a,0x0a,0x2d,0x2d, - 0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x74,0x6f,0x20,0x6e, - 0x61,0x74,0x69,0x76,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x0a,0x69,0x6f,0x2e, - 0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x7b,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20, - 0x3d,0x20,0x69,0x6f,0x2e,0x6f,0x75,0x74,0x70,0x75,0x74,0x2c,0x20,0x73,0x74,0x64, - 0x69,0x6e,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x69,0x6e,0x2c,0x20,0x73, - 0x74,0x64,0x6f,0x75,0x74,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x6f,0x75, - 0x74,0x2c,0x20,0x73,0x74,0x64,0x65,0x72,0x72,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x73, - 0x74,0x64,0x65,0x72,0x72,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x63,0x6f,0x6d,0x6d, - 0x65,0x6e,0x74,0x20,0x6f,0x75,0x74,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79, - 0x75,0x5f,0x79,0x61,0x6e,0x2c,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x64,0x69,0x72, - 0x65,0x63,0x74,0x20,0x69,0x6f,0x2e,0x0a,0x2d,0x2d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d, - 0x2d,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x75,0x66,0x20, - 0x3d,0x20,0x7b,0x2e,0x2e,0x2e,0x7d,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x66, - 0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x22, - 0x23,0x22,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x64,0x6f,0x0a,0x2d,0x2d,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x75,0x66,0x5b,0x69,0x5d,0x20,0x3d,0x20, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x62,0x75,0x66,0x5b,0x69,0x5d,0x29, - 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x20,0x20, - 0x20,0x20,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x6f,0x75,0x74,0x3a,0x77,0x72,0x69, - 0x74,0x65,0x28,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28, - 0x62,0x75,0x66,0x2c,0x20,0x22,0x5c,0x74,0x22,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5c, - 0x6e,0x22,0x29,0x0a,0x2d,0x2d,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x41, - 0x63,0x74,0x75,0x61,0x6c,0x6c,0x79,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x20,0x73, - 0x74,0x61,0x6e,0x64,0x61,0x72,0x64,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x66, - 0x69,0x6c,0x65,0x20,0x62,0x75,0x74,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x74,0x68,0x65,0x20,0x22,0x66,0x61,0x6b,0x65,0x22,0x20, - 0x73,0x74,0x64,0x6f,0x75,0x74,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x69,0x6f,0x2e,0x6f,0x75,0x74,0x70,0x75,0x74,0x28,0x6f,0x75,0x74,0x70,0x75,0x74, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x6f,0x2e,0x62,0x61,0x73,0x65,0x2e,0x6f,0x75, - 0x74,0x70,0x75,0x74,0x28,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x6f,0x75, - 0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x75,0x6d, - 0x6d,0x79,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20, - 0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c, - 0x65,0x20,0x66,0x6f,0x72,0x20,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6e, - 0x67,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x28,0x6e,0x6f,0x74,0x20,0x70,0x72, - 0x69,0x6e,0x74,0x65,0x64,0x20,0x61,0x74,0x20,0x61,0x6c,0x6c,0x20,0x69,0x6e,0x20, - 0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x63, - 0x6f,0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74, - 0x70,0x75,0x74,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74, - 0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c, - 0x66,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x75,0x66,0x20,0x3d,0x20,0x7b,0x2e,0x2e,0x2e, - 0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d, - 0x31,0x2c,0x20,0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x22,0x23,0x22,0x2c,0x20,0x2e, - 0x2e,0x2e,0x29,0x20,0x64,0x6f,0x20,0x62,0x75,0x66,0x5b,0x69,0x5d,0x20,0x3d,0x20, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x62,0x75,0x66,0x5b,0x69,0x5d,0x29, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x75,0x66, - 0x20,0x3d,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28, - 0x62,0x75,0x66,0x29,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5c,0x6e,0x22,0x2c,0x20, - 0x22,0x5c,0x72,0x5c,0x6e,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65, - 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20, - 0x22,0x73,0x74,0x72,0x65,0x61,0x6d,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d, - 0x20,0x7b,0x20,0x74,0x79,0x70,0x65,0x3d,0x73,0x65,0x6c,0x66,0x2e,0x6d,0x6f,0x64, - 0x65,0x20,0x7d,0x2c,0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x62,0x36,0x34,0x28,0x62, - 0x75,0x66,0x29,0x20,0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x75,0x73,0x68,0x20,0x3d,0x20,0x64,0x75,0x6d, - 0x6d,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20,0x63,0x6c,0x6f,0x73,0x65,0x20,0x3d,0x20, - 0x64,0x75,0x6d,0x6d,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x74,0x76,0x62, - 0x75,0x66,0x20,0x3d,0x20,0x64,0x75,0x6d,0x6d,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x73,0x65,0x65,0x6b,0x20,0x3d,0x20,0x64,0x75,0x6d,0x6d,0x79,0x0a,0x7d,0x0a,0x63, - 0x6f,0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74, - 0x70,0x75,0x74,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x63,0x6f, - 0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,0x70, - 0x75,0x74,0x0a,0x0a,0x2d,0x2d,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65, - 0x20,0x66,0x6f,0x72,0x20,0x63,0x6c,0x6f,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x75,0x74, - 0x70,0x75,0x74,0x20,0x28,0x6f,0x75,0x74,0x70,0x75,0x74,0x73,0x20,0x74,0x6f,0x20, - 0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x20,0x61,0x6e, - 0x64,0x20,0x73,0x65,0x6e,0x64,0x20,0x74,0x6f,0x20,0x49,0x44,0x45,0x29,0x0a,0x63, - 0x6f,0x72,0x65,0x2e,0x63,0x6f,0x70,0x79,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x20, - 0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e, - 0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65, - 0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74, - 0x2e,0x77,0x72,0x69,0x74,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e,0x2e,0x2e, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6f,0x2e,0x62,0x61,0x73, - 0x65,0x5b,0x73,0x65,0x6c,0x66,0x2e,0x6d,0x6f,0x64,0x65,0x5d,0x3a,0x77,0x72,0x69, - 0x74,0x65,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x75,0x73,0x68,0x20,0x20,0x20,0x3d,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e,0x2e, - 0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x6f, - 0x75,0x74,0x3a,0x66,0x6c,0x75,0x73,0x68,0x28,0x2e,0x2e,0x2e,0x29,0x20,0x65,0x6e, - 0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x63,0x6c,0x6f,0x73,0x65,0x20,0x20,0x20,0x3d, - 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20, - 0x2e,0x2e,0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66, - 0x2e,0x6f,0x75,0x74,0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x2e,0x2e,0x2e,0x29,0x20, - 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x74,0x76,0x62,0x75,0x66, - 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66, - 0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65, - 0x6c,0x66,0x2e,0x6f,0x75,0x74,0x3a,0x73,0x65,0x74,0x76,0x62,0x75,0x66,0x28,0x2e, - 0x2e,0x2e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x65, - 0x6b,0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28, - 0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x6f,0x75,0x74,0x3a,0x73,0x65,0x65,0x6b,0x28, - 0x2e,0x2e,0x2e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,0x63,0x6f,0x72,0x65, - 0x2e,0x63,0x6f,0x70,0x79,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x5f,0x5f,0x69, - 0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x63,0x6f,0x70,0x79, - 0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x42,0x72,0x65, - 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x72,0x79, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x52,0x65,0x67,0x69,0x73,0x74,0x72,0x79,0x20,0x6f,0x66,0x20, - 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65, - 0x76,0x65,0x6c,0x73,0x20,0x6f,0x66,0x20,0x61,0x6c,0x6c,0x20,0x72,0x75,0x6e,0x6e, - 0x69,0x6e,0x67,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x73,0x0a,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x20,0x3d, - 0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x20,0x7b, - 0x20,0x7d,0x2c,0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x22, - 0x6b,0x22,0x20,0x7d,0x20,0x29,0x0a,0x0a,0x2d,0x2d,0x20,0x46,0x69,0x6c,0x65,0x2f, - 0x6c,0x69,0x6e,0x65,0x20,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x66,0x6f,0x72, - 0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x20,0x28,0x42,0x50, - 0x29,0x2e,0x20,0x46,0x6f,0x72,0x20,0x61,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,0x66, - 0x69,0x6c,0x65,0x2f,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x61,0x20,0x6c,0x69,0x73,0x74, - 0x20,0x6f,0x66,0x20,0x42,0x50,0x20,0x69,0x73,0x20,0x61,0x73,0x73,0x6f,0x63,0x69, - 0x61,0x74,0x65,0x64,0x20,0x28,0x44,0x42,0x47,0x70,0x20,0x73,0x70,0x65,0x63,0x69, - 0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x73,0x65,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x37,0x2e,0x36,0x2e,0x31,0x0a,0x2d,0x2d,0x20,0x72,0x65,0x71,0x75,0x69,0x72, - 0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x6d,0x75,0x6c,0x74,0x69,0x70,0x6c,0x65,0x20, - 0x42,0x50,0x20,0x61,0x74,0x20,0x73,0x61,0x6d,0x65,0x20,0x70,0x6c,0x61,0x63,0x65, - 0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x64, - 0x29,0x0a,0x2d,0x2d,0x20,0x41,0x20,0x42,0x50,0x20,0x69,0x73,0x20,0x61,0x20,0x74, - 0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6c,0x6c,0x20,0x61,0x64, - 0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74, - 0x69,0x65,0x73,0x20,0x28,0x74,0x79,0x70,0x65,0x2c,0x20,0x63,0x6f,0x6e,0x64,0x69, - 0x74,0x69,0x6f,0x6e,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x74,0x68,0x65,0x20,0x69, - 0x64,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20, - 0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f, - 0x66,0x20,0x74,0x68,0x65,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x0a,0x63,0x6f,0x72, - 0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x20,0x3d,0x20, - 0x7b,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x73,0x20,0x74,0x6f,0x20,0x63,0x61,0x6c,0x6c,0x20,0x74,0x6f,0x20,0x6d,0x61, - 0x74,0x63,0x68,0x20,0x68,0x69,0x74,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f, - 0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69, - 0x74,0x69,0x6f,0x6e,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x5b,0x22,0x3e,0x3d,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x28,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x74,0x61,0x72,0x67,0x65, - 0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61,0x6c,0x75,0x65,0x20, - 0x3e,0x3d,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x22,0x3d,0x3d,0x22,0x5d,0x20,0x3d,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20, - 0x74,0x61,0x72,0x67,0x65,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76, - 0x61,0x6c,0x75,0x65,0x20,0x3d,0x3d,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x20,0x65, - 0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x22,0x25,0x22, - 0x5d,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x76,0x61, - 0x6c,0x75,0x65,0x2c,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x29,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x28,0x76,0x61,0x6c,0x75,0x65,0x20,0x25,0x20,0x74,0x61,0x72, - 0x67,0x65,0x74,0x29,0x20,0x3d,0x3d,0x20,0x30,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20, - 0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x74,0x72,0x61,0x63,0x6b, - 0x73,0x20,0x65,0x76,0x65,0x6e,0x74,0x73,0x20,0x73,0x75,0x63,0x68,0x20,0x61,0x73, - 0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x6f,0x72,0x20,0x73,0x74, - 0x65,0x70,0x5f,0x6f,0x76,0x65,0x72,0x0a,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65, - 0x6e,0x74,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x64,0x6f,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70, - 0x70,0x69,0x6e,0x67,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20, - 0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x77,0x61,0x69,0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73, - 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x20,0x2d,0x2d,0x20,0x73,0x65,0x73,0x73,0x69,0x6f, - 0x6e,0x73,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72, - 0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x28,0x6f,0x76,0x65,0x72,0x2c, - 0x20,0x69,0x6e,0x74,0x6f,0x2c,0x20,0x6f,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20, - 0x3d,0x20,0x6e,0x69,0x6c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74,0x68,0x61,0x74,0x20,0x72,0x65,0x67, - 0x69,0x73,0x74,0x65,0x72,0x65,0x64,0x20,0x61,0x20,0x73,0x74,0x65,0x70,0x5f,0x69, - 0x6e,0x74,0x6f,0x20,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20,0x69,0x66,0x20,0x61,0x6e, - 0x79,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x71,0x75, - 0x65,0x6e,0x63,0x65,0x20,0x3d,0x20,0x30,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x64, - 0x20,0x74,0x6f,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x62,0x72,0x65, - 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x49,0x44,0x73,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69, - 0x6e,0x67,0x20,0x3d,0x20,0x7b,0x7d,0x20,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x20, - 0x74,0x6f,0x20,0x72,0x65,0x63,0x6f,0x72,0x64,0x20,0x74,0x68,0x65,0x20,0x6c,0x69, - 0x6e,0x65,0x20,0x6f,0x66,0x20,0x62,0x70,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x6e,0x73, - 0x65,0x72,0x74,0x5f,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67, - 0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69, - 0x66,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c, - 0x69,0x6e,0x65,0x5d,0x20,0x3d,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e, - 0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20, - 0x3d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e, - 0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20, - 0x3d,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c, - 0x69,0x6e,0x65,0x5d,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70, - 0x70,0x69,0x6e,0x67,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d, - 0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20,0x61,0x6e,0x64, - 0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69, - 0x6e,0x65,0x5d,0x20,0x3e,0x20,0x31,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61, - 0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20,0x3d,0x20,0x6c,0x69, - 0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d, - 0x20,0x2d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69, - 0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d, - 0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72, - 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x75,0x65,0x73,0x73,0x28, - 0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e, - 0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f, - 0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x75, - 0x70,0x64,0x61,0x74,0x65,0x28,0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65,0x2c,0x6e,0x65, - 0x77,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x20,0x3d,0x20,0x6e,0x65,0x77,0x62,0x70,0x2e, - 0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x6f,0x6c, - 0x64,0x6c,0x69,0x6e,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x66,0x69, - 0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x66,0x69,0x6c,0x65,0x5d, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65, - 0x67,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x5b,0x6c,0x69,0x6e,0x65, - 0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74, - 0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x6c,0x69,0x6e,0x65, - 0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d, - 0x31,0x2c,0x20,0x23,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x64,0x6f,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6c,0x69, - 0x6e,0x65,0x72,0x65,0x67,0x5b,0x69,0x5d,0x2e,0x69,0x64,0x20,0x3d,0x3d,0x20,0x6e, - 0x65,0x77,0x62,0x70,0x2e,0x69,0x64,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x62, - 0x6c,0x65,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,0x6c,0x69,0x6e,0x65,0x72,0x65, - 0x67,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x73,0x65,0x72,0x74,0x5f,0x6c,0x69,0x6e,0x65, - 0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x6e,0x65,0x77,0x62,0x70,0x2e,0x6c, - 0x69,0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74, - 0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x6c,0x69,0x6e,0x65, - 0x72,0x65,0x67,0x2c,0x20,0x6e,0x65,0x77,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x5b,0x6e,0x65,0x77,0x62, - 0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x5d,0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65, - 0x72,0x65,0x67,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x65,0x72,0x74,0x73,0x20,0x61,0x20,0x6e, - 0x65,0x77,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x69,0x6e, - 0x74,0x6f,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x72,0x79,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x62,0x70,0x20,0x28,0x74,0x61, - 0x62,0x6c,0x65,0x29,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20, - 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72, - 0x61,0x6d,0x20,0x75,0x72,0x69,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20, - 0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x20,0x41,0x62,0x73,0x6f,0x6c,0x75, - 0x74,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x55,0x52,0x49,0x2c,0x20,0x66,0x6f,0x72, - 0x20,0x6c,0x69,0x6e,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74, - 0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20, - 0x6c,0x69,0x6e,0x65,0x20,0x28,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x20,0x6f,0x70, - 0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x20,0x4c,0x69,0x6e,0x65,0x20,0x77,0x68,0x65, - 0x72,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x73,0x74, - 0x6f,0x70,0x73,0x2c,0x20,0x66,0x6f,0x72,0x20,0x6c,0x69,0x6e,0x65,0x20,0x62,0x72, - 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f, - 0x69,0x6e,0x74,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x69,0x65,0x72,0x0a,0x20, - 0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65, - 0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x69,0x6e,0x73, - 0x65,0x72,0x74,0x28,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x69,0x64,0x20,0x3d,0x20,0x73,0x65,0x71, - 0x75,0x65,0x6e,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65, - 0x71,0x75,0x65,0x6e,0x63,0x65,0x20,0x3d,0x20,0x62,0x70,0x69,0x64,0x20,0x2b,0x20, - 0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e,0x69,0x64,0x20, - 0x3d,0x20,0x62,0x70,0x69,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x72,0x65,0x2d,0x65,0x6e,0x63,0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x20, - 0x55,0x52,0x49,0x20,0x74,0x6f,0x20,0x61,0x76,0x6f,0x69,0x64,0x20,0x61,0x6e,0x79, - 0x20,0x6d,0x69,0x73,0x6d,0x61,0x74,0x63,0x68,0x20,0x28,0x77,0x69,0x74,0x68,0x20, - 0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x66,0x6f,0x72,0x20,0x65,0x78, - 0x61,0x6d,0x70,0x6c,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c, - 0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x75,0x72,0x6c,0x2e,0x70, - 0x61,0x72,0x73,0x65,0x28,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e,0x66,0x69,0x6c, - 0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x75,0x72,0x6c,0x2e,0x62,0x75,0x69,0x6c, - 0x64,0x7b,0x20,0x73,0x63,0x68,0x65,0x6d,0x65,0x3d,0x75,0x72,0x69,0x2e,0x73,0x63, - 0x68,0x65,0x6d,0x65,0x2c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x3d, - 0x22,0x22,0x2c,0x20,0x70,0x61,0x74,0x68,0x3d,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72, - 0x6d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x75,0x72,0x69,0x2e, - 0x70,0x61,0x74,0x68,0x29,0x7d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x3d,0x20, - 0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e, - 0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65, - 0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65, - 0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x72, - 0x65,0x67,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x5b,0x62,0x70,0x2e, - 0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67, - 0x5b,0x62,0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x5d,0x20,0x3d,0x20,0x6c,0x69, - 0x6e,0x65,0x72,0x65,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x73,0x65,0x72,0x74, - 0x5f,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x62,0x70, - 0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x6c, - 0x69,0x6e,0x65,0x72,0x65,0x67,0x2c,0x20,0x62,0x70,0x29,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b, - 0x62,0x70,0x69,0x64,0x5d,0x20,0x3d,0x20,0x62,0x70,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x70,0x69,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20, - 0x49,0x66,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x28,0x73,0x29, - 0x20,0x65,0x78,0x69,0x73,0x74,0x73,0x20,0x66,0x6f,0x72,0x20,0x67,0x69,0x76,0x65, - 0x6e,0x20,0x66,0x69,0x6c,0x65,0x2f,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x75,0x70,0x74, - 0x61,0x74,0x65,0x73,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20, - 0x63,0x6f,0x75,0x6e,0x74,0x65,0x72,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x77,0x68,0x65,0x74, - 0x68,0x65,0x72,0x20,0x61,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74, - 0x20,0x68,0x61,0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x64,0x20,0x28,0x62,0x6f, - 0x6f,0x6c,0x65,0x61,0x6e,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f, - 0x69,0x6e,0x74,0x73,0x2e,0x61,0x74,0x28,0x66,0x69,0x6c,0x65,0x2c,0x20,0x6c,0x69, - 0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x74,0x65,0x6d,0x70,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x3a,0x73,0x75, - 0x62,0x28,0x23,0x22,0x66,0x69,0x6c,0x65,0x3a,0x2f,0x2f,0x22,0x2b,0x31,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x20,0x5f, - 0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x66,0x69,0x6c,0x65,0x5f,0x6d, - 0x61,0x70,0x70,0x69,0x6e,0x67,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x2c,0x6a,0x20,0x3d, - 0x20,0x6b,0x3a,0x66,0x69,0x6e,0x64,0x28,0x74,0x65,0x6d,0x70,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x28,0x6a,0x20,0x3d,0x3d,0x20, - 0x23,0x6b,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x20,0x3d,0x20,0x6b,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72, - 0x65,0x61,0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x73, - 0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b, - 0x66,0x69,0x6c,0x65,0x5d,0x20,0x61,0x6e,0x64,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d, - 0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x66,0x69,0x6c,0x65,0x5d,0x5b,0x6c,0x69,0x6e, - 0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f, - 0x74,0x20,0x62,0x70,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61, - 0x6b,0x20,0x3d,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x66,0x6f,0x72,0x20,0x5f,0x2c,0x20,0x62,0x70,0x20,0x69,0x6e,0x20,0x70, - 0x61,0x69,0x72,0x73,0x28,0x62,0x70,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x2e,0x73, - 0x74,0x61,0x74,0x65,0x20,0x3d,0x3d,0x20,0x22,0x65,0x6e,0x61,0x62,0x6c,0x65,0x64, - 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x61,0x74, - 0x63,0x68,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x2e, - 0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x74,0x68,0x69,0x73, - 0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x74,0x68,0x65,0x20,0x6f,0x70,0x74,0x69, - 0x6d,0x61,0x6c,0x20,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x20,0x62,0x65,0x63, - 0x61,0x75,0x73,0x65,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x63,0x61,0x6e, - 0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x74,0x65,0x64, - 0x20,0x74,0x77,0x69,0x63,0x65,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x62,0x72, - 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x73, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x20,0x3d, - 0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74, - 0x3a,0x6e,0x65,0x77,0x28,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73, - 0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x30,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x73,0x65,0x74,0x62,0x70,0x65,0x6e,0x76,0x28,0x62,0x70,0x2e,0x63,0x6f,0x6e, - 0x64,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x63,0x78,0x74,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20, - 0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x70,0x63,0x61,0x6c,0x6c,0x28,0x62, - 0x70,0x2e,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x6c,0x6f,0x67,0x28,0x22,0x45,0x52,0x52,0x4f,0x52,0x22, - 0x2c,0x20,0x22,0x43,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x65,0x76,0x61, - 0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x61,0x69,0x6c,0x65,0x64,0x20,0x66, - 0x6f,0x72,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x61,0x74, - 0x20,0x25,0x73,0x3a,0x25,0x64,0x3a,0x20,0x25,0x73,0x22,0x2c,0x20,0x66,0x69,0x6c, - 0x65,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x29, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x62,0x75, - 0x67,0x67,0x65,0x72,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x73,0x74,0x6f,0x70, - 0x73,0x20,0x69,0x66,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x6f,0x63, - 0x63,0x75,0x72,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x63,0x68,0x20,0x3d, - 0x20,0x28,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x29,0x20,0x6f, - 0x72,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6d,0x61,0x74,0x63,0x68,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62, - 0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x20,0x3d,0x20,0x62,0x70, - 0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x20,0x2b,0x20,0x31,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b, - 0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69, - 0x74,0x69,0x6f,0x6e,0x73,0x5b,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e, - 0x64,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x28,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x63, - 0x6f,0x75,0x6e,0x74,0x2c,0x20,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x76,0x61,0x6c, - 0x75,0x65,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x62,0x70,0x2e,0x74,0x65,0x6d,0x70,0x6f,0x72,0x61,0x72,0x79, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e, - 0x74,0x73,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,0x62,0x70,0x2e,0x69,0x64,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x3d,0x20, - 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x62,0x72,0x65,0x61, - 0x6b,0x20,0x74,0x6f,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x20,0x6d,0x75,0x6c,0x74, - 0x69,0x70,0x6c,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73, - 0x3a,0x20,0x61,0x6c,0x6c,0x20,0x68,0x69,0x74,0x20,0x63,0x6f,0x75,0x6e,0x74,0x73, - 0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x75,0x70,0x64,0x61,0x74,0x65,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b, - 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61, - 0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x65,0x74,0x28,0x69,0x64,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x64,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x64,0x5f,0x6d,0x61,0x70, - 0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x64,0x5f, - 0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e, - 0x74,0x73,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,0x69,0x64,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d, - 0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x20,0x74,0x68, - 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69, - 0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x20,0x3d,0x20, - 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x3d,0x20, - 0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e, - 0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x5d,0x5b,0x62,0x70,0x2e,0x6c,0x69,0x6e, - 0x65,0x6e,0x6f,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x23,0x6c,0x69,0x6e,0x65,0x72, - 0x65,0x67,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67, - 0x5b,0x69,0x5d,0x20,0x3d,0x3d,0x20,0x62,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28, - 0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x6c,0x69, - 0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x62,0x70,0x2e,0x6c,0x69, - 0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6c,0x65,0x61,0x6e,0x75,0x70,0x20,0x66,0x69, - 0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6e,0x65, - 0x78,0x74,0x28,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x29,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70, - 0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x5d,0x5b,0x62,0x70,0x2e,0x6c,0x69, - 0x6e,0x65,0x6e,0x6f,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e, - 0x6f,0x74,0x20,0x6e,0x65,0x78,0x74,0x28,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70, - 0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65, - 0x5d,0x29,0x20,0x74,0x68,0x65,0x6e,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70, - 0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65, - 0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74, - 0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66, - 0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x6e, - 0x20,0x58,0x4d,0x4c,0x20,0x64,0x61,0x74,0x61,0x20,0x73,0x74,0x72,0x75,0x63,0x74, - 0x75,0x72,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62, - 0x65,0x73,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f, - 0x69,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61, - 0x6d,0x20,0x69,0x64,0x20,0x28,0x6e,0x75,0x6d,0x62,0x65,0x72,0x29,0x20,0x62,0x72, - 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x49,0x44,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x54,0x61,0x62,0x6c,0x65, - 0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62,0x69,0x6e,0x67,0x20,0x61,0x20,0x3c,0x62, - 0x72,0x65,0x61,0x6b,0x70,0x6f,0x6f,0x69,0x6e,0x74,0x3e,0x20,0x74,0x61,0x67,0x20, - 0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20, - 0x62,0x79,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x6d,0x65,0x73,0x73, - 0x61,0x67,0x65,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74, - 0x73,0x2e,0x67,0x65,0x74,0x5f,0x78,0x6d,0x6c,0x28,0x69,0x64,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d, - 0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x62, - 0x70,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6e,0x69, - 0x6c,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x62,0x72,0x65,0x61, - 0x6b,0x70,0x6f,0x69,0x6e,0x74,0x3a,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x69,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f, - 0x6e,0x73,0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x62, - 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72, - 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72, - 0x73,0x28,0x62,0x70,0x29,0x20,0x64,0x6f,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73, - 0x65,0x2e,0x61,0x74,0x74,0x72,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x76,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x2e, - 0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74,0x68,0x65,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70, - 0x6f,0x6e,0x73,0x65,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20, - 0x3d,0x20,0x22,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x22,0x2c,0x20, - 0x20,0x62,0x70,0x2e,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x7d, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61, - 0x6c,0x20,0x75,0x73,0x65,0x20,0x6f,0x6e,0x6c,0x79,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72, - 0x2e,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6e,0x69, - 0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e, - 0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f, - 0x6e,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x74,0x65, - 0x6d,0x70,0x6f,0x72,0x61,0x72,0x79,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d, - 0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x74,0x68,0x65,0x20,0x73,0x70,0x65,0x63,0x69, - 0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20, - 0x63,0x6c,0x65,0x61,0x72,0x20,0x77,0x68,0x65,0x74,0x68,0x65,0x72,0x20,0x74,0x68, - 0x69,0x73,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x70,0x72,0x6f, - 0x76,0x69,0x64,0x65,0x64,0x2c,0x20,0x73,0x65,0x65,0x20,0x6f,0x74,0x68,0x65,0x72, - 0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x73, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x67,0x69,0x73,0x74, - 0x65,0x72,0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x74,0x6f,0x20,0x62, - 0x65,0x20,0x74,0x72,0x69,0x67,0x67,0x65,0x72,0x65,0x64,0x2e,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x65,0x76,0x65,0x6e,0x74, - 0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,0x6f,0x20,0x72, - 0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x20,0x28,0x6d,0x75,0x73,0x74,0x20,0x62,0x65, - 0x20,0x22,0x6f,0x76,0x65,0x72,0x22,0x2c,0x20,0x22,0x6f,0x75,0x74,0x22,0x20,0x6f, - 0x72,0x20,0x22,0x69,0x6e,0x74,0x6f,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75, - 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e, - 0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x65,0x76,0x65,0x6e, - 0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x61,0x63,0x74,0x69,0x76,0x65, - 0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x44,0x45, - 0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x52,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x65, - 0x64,0x20,0x25,0x73,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x66,0x6f,0x72,0x20,0x25, - 0x73,0x20,0x28,0x25,0x64,0x29,0x22,0x2c,0x20,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x29, - 0x2c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74, - 0x68,0x72,0x65,0x61,0x64,0x5d,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6e,0x74, - 0x6f,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x3d,0x20, - 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x61, - 0x69,0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x5b,0x74, - 0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x65,0x76,0x65,0x6e,0x74, - 0x2c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74, - 0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x69,0x66, - 0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x28,0x73,0x74,0x65,0x70,0x20, - 0x69,0x6e,0x74,0x6f,0x2c,0x20,0x6f,0x76,0x65,0x72,0x2c,0x20,0x6f,0x75,0x74,0x29, - 0x20,0x69,0x73,0x20,0x74,0x72,0x69,0x67,0x67,0x65,0x72,0x65,0x64,0x2e,0x0a,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x44,0x6f,0x65,0x73,0x20,0x2a,0x6e,0x6f,0x74,0x2a, - 0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x20,0x65,0x76,0x65,0x6e,0x74,0x73,0x20, - 0x28,0x65,0x76,0x65,0x6e,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x79,0x20,0x6d,0x61, - 0x74,0x63,0x68,0x29,0x20,0x61,0x73,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x6d,0x75, - 0x73,0x74,0x20,0x62,0x65,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x65,0x64,0x20, - 0x6d,0x61,0x6e,0x75,0x61,0x6c,0x6c,0x79,0x20,0x69,0x66,0x20,0x61,0x20,0x62,0x72, - 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x6d,0x61,0x74,0x63,0x68,0x20,0x62, - 0x65,0x66,0x6f,0x72,0x65,0x20,0x61,0x6e,0x79,0x77,0x61,0x79,0x2e,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x72,0x75, - 0x65,0x20,0x69,0x66,0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x68,0x61, - 0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x64,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65, - 0x20,0x6f,0x74,0x68,0x65,0x72,0x77,0x69,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x66, - 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65, - 0x6e,0x74,0x73,0x2e,0x64,0x6f,0x65,0x73,0x5f,0x6d,0x61,0x74,0x63,0x68,0x28,0x6c, - 0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x61,0x6e,0x64,0x20,0x63,0x6f, - 0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69, - 0x6e,0x65,0x20,0x7e,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x72,0x75,0x65,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74, - 0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73, - 0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x76,0x65, - 0x6e,0x74,0x20,0x3d,0x20,0x77,0x61,0x69,0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73, - 0x73,0x69,0x6f,0x6e,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x76,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65, - 0x2c,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d, - 0x20,0x75,0x6e,0x70,0x61,0x63,0x6b,0x28,0x65,0x76,0x65,0x6e,0x74,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c, - 0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d, - 0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68, - 0x72,0x65,0x61,0x64,0x5d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x65,0x76,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70, - 0x65,0x20,0x3d,0x3d,0x20,0x22,0x6f,0x76,0x65,0x72,0x22,0x20,0x61,0x6e,0x64,0x20, - 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3c,0x3d, - 0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x61,0x6e, - 0x64,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65,0x61, - 0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x7e,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x29,0x20, - 0x6f,0x72,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x74,0x65,0x70,0x20,0x6f,0x76,0x65, - 0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x28,0x65,0x76,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x20,0x3d,0x3d,0x20, - 0x22,0x6f,0x75,0x74,0x22,0x20,0x20,0x61,0x6e,0x64,0x20,0x63,0x75,0x72,0x72,0x65, - 0x6e,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3c,0x20,0x20,0x74,0x61,0x72,0x67, - 0x65,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x29,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d, - 0x2d,0x20,0x73,0x74,0x65,0x70,0x20,0x6f,0x75,0x74,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22, - 0x44,0x45,0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x45,0x76,0x65,0x6e,0x74,0x20,0x25, - 0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x64,0x21,0x22,0x2c,0x20,0x65,0x76,0x65, - 0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x44,0x69,0x73,0x63,0x61,0x72,0x64,0x73,0x20, - 0x65,0x76,0x65,0x6e,0x74,0x20,0x66,0x6f,0x72,0x20,0x63,0x75,0x72,0x72,0x65,0x6e, - 0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x28,0x69,0x66,0x20,0x61,0x6e,0x79, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63, - 0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e,0x74,0x73,0x2e,0x64,0x69,0x73,0x63,0x61, - 0x72,0x64,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x61,0x69, - 0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x5b,0x61,0x63, - 0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72, - 0x6f,0x5b,0x31,0x5d,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x3d,0x20, - 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a, - 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x0a,0x2d,0x2d,0x20,0x20,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6d,0x61, - 0x69,0x6e,0x20,0x6c,0x6f,0x6f,0x70,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d, - 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x53,0x65,0x6e, - 0x64,0x20,0x74,0x68,0x65,0x20,0x58,0x4d,0x4c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e, - 0x73,0x65,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x65,0x76,0x69,0x6f, - 0x75,0x73,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x61,0x74,0x69,0x6f,0x6e,0x20, - 0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x61,0x6e,0x64,0x20,0x63,0x6c,0x65,0x61, - 0x72,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x20,0x63, - 0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f, - 0x6e,0x74,0x65,0x78,0x74,0x5f,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x28,0x73, - 0x65,0x6c,0x66,0x2c,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63, - 0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x3d,0x20, - 0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x74,0x65,0x0a,0x20,0x20,0x20,0x20,0x73, - 0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e, - 0x74,0x65,0x78,0x74,0x2e,0x72,0x65,0x61,0x73,0x6f,0x6e,0x20,0x3d,0x20,0x72,0x65, - 0x61,0x73,0x6f,0x6e,0x20,0x6f,0x72,0x20,0x22,0x6f,0x6b,0x22,0x0a,0x20,0x20,0x20, - 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73, - 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d, - 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74, - 0x72,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75, - 0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x7d,0x20,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f, - 0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x65,0x6e, - 0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f, - 0x6e,0x20,0x63,0x6c,0x65,0x61,0x6e,0x75,0x70,0x28,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65, - 0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70, - 0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x63,0x6f,0x77, - 0x72,0x61,0x70,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x5f,0x2c,0x20,0x63, - 0x6f,0x72,0x6f,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x63,0x6f,0x72, - 0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69, - 0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x29,0x20,0x64,0x6f,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65, - 0x74,0x68,0x6f,0x6f,0x6b,0x28,0x63,0x6f,0x72,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x6f,0x20,0x72,0x65, - 0x6d,0x6f,0x76,0x65,0x20,0x68,0x6f,0x6f,0x6b,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65, - 0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2c, - 0x20,0x69,0x74,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x74,0x68,0x65,0x20, - 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x6f,0x6e,0x65,0x20,0x28,0x6f,0x74,0x68, - 0x65,0x72,0x77,0x69,0x73,0x65,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20, - 0x61,0x20,0x6e,0x6f,0x2d,0x6f,0x70,0x29,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x69, - 0x73,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x63,0x61,0x6c, - 0x6c,0x65,0x64,0x20,0x61,0x64,0x61,0x69,0x6e,0x20,0x6c,0x61,0x74,0x65,0x72,0x20, - 0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x6d,0x61,0x69,0x6e,0x20,0x74,0x68,0x72,0x65, - 0x61,0x64,0x20,0x74,0x6f,0x20,0x66,0x69,0x6e,0x69,0x73,0x68,0x20,0x63,0x6c,0x65, - 0x61,0x75,0x70,0x0a,0x20,0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65, - 0x74,0x68,0x6f,0x6f,0x6b,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65, - 0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x2c,0x20,0x63,0x6f,0x72,0x65, - 0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x7b, - 0x20,0x7d,0x2c,0x20,0x7b,0x20,0x7d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d, - 0x20,0x54,0x68,0x69,0x73,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68, - 0x61,0x6e,0x64,0x6c,0x65,0x73,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x77,0x68,0x69, - 0x6c,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e, - 0x20,0x69,0x73,0x20,0x70,0x61,0x75,0x73,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73, - 0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x75,0x73,0x65,0x20,0x63,0x6f, - 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x62,0x65,0x63,0x61,0x75,0x73,0x65, - 0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x0a,0x2d,0x2d,0x20, - 0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x6d,0x61,0x69,0x6e,0x20, - 0x63,0x6f,0x72,0x6f,0x20,0x69,0x6e,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20, - 0x28,0x6f,0x6e,0x6c,0x79,0x20,0x69,0x6e,0x20,0x35,0x2e,0x32,0x29,0x0a,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x5f,0x6c,0x6f,0x6f,0x70,0x28,0x73,0x65,0x6c,0x66,0x2c, - 0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x73,0x65,0x74,0x74, - 0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x6e,0x69,0x6c,0x29,0x20,0x2d,0x2d,0x20,0x73, - 0x65,0x74,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69, - 0x6e,0x67,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x20,0x61,0x73, - 0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65, - 0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20, - 0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x62,0x65,0x66,0x6f,0x72,0x65,0x20, - 0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x69,0x6e,0x67,0x20,0x61,0x6e,0x64,0x20,0x64, - 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x6d,0x6f,0x64,0x69,0x66,0x79,0x20,0x70, - 0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f, - 0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x70,0x61,0x63, - 0x6b,0x65,0x74,0x20,0x7e,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73, - 0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74, - 0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74, - 0x61,0x74,0x65,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x69, - 0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x72,0x65,0x73,0x70, - 0x6f,0x6e,0x73,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63, - 0x6b,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74, - 0x65,0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x28,0x73,0x65,0x6c,0x66,0x2e, - 0x63,0x6f,0x72,0x6f,0x29,0x20,0x2d,0x2d,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65, - 0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6d,0x75,0x74,0x75,0x61,0x6c,0x69, - 0x7a,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x61,0x6c,0x6c,0x6f,0x63, - 0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x6f,0x72,0x20,0x65,0x61,0x63,0x68,0x20,0x6c, - 0x6f,0x6f,0x70,0x0a,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x74, - 0x72,0x75,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x72,0x65,0x61,0x64,0x73,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x63, - 0x6b,0x65,0x74,0x20,0x3d,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x70,0x61,0x63,0x6b, - 0x65,0x74,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x72,0x65,0x61,0x64,0x5f, - 0x70,0x61,0x63,0x6b,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x70,0x61,0x63,0x6b,0x65,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x57,0x41,0x52,0x4e,0x49, - 0x4e,0x47,0x22,0x2c,0x20,0x22,0x6c,0x6f,0x73,0x74,0x20,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x22,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6c,0x65,0x61,0x6e, - 0x75,0x70,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62, - 0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f, - 0x70,0x61,0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x44,0x45,0x42,0x55,0x47,0x22, - 0x2c,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6d,0x64,0x2c,0x20,0x61,0x72,0x67, - 0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e,0x63, - 0x6d,0x64,0x5f,0x70,0x61,0x72,0x73,0x65,0x28,0x70,0x61,0x63,0x6b,0x65,0x74,0x29, - 0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x46,0x49,0x58, - 0x4d,0x45,0x3a,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x73,0x75,0x63,0x68, - 0x20,0x61,0x73,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x61,0x74,0x69,0x6f,0x6e, - 0x73,0x20,0x73,0x65,0x6e,0x74,0x20,0x69,0x6e,0x20,0x61,0x73,0x79,0x6e,0x63,0x20, - 0x6d,0x6f,0x64,0x65,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x6c,0x65,0x61,0x64,0x20, - 0x62,0x6f,0x74,0x68,0x20,0x65,0x6e,0x67,0x69,0x6e,0x65,0x20,0x61,0x6e,0x64,0x20, - 0x49,0x44,0x45,0x20,0x69,0x6e,0x20,0x69,0x6e,0x63,0x6f,0x6e,0x73,0x69,0x73,0x74, - 0x65,0x6e,0x74,0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x3a,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61, - 0x6b,0x65,0x20,0x61,0x20,0x62,0x6c,0x61,0x63,0x6b,0x6c,0x69,0x73,0x74,0x2f,0x77, - 0x68,0x69,0x74,0x65,0x6c,0x69,0x73,0x74,0x20,0x6f,0x66,0x20,0x66,0x6f,0x72,0x62, - 0x69,0x64,0x64,0x65,0x6e,0x20,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x65,0x64, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x69,0x6e,0x20,0x61,0x73,0x79, - 0x6e,0x63,0x20,0x3f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x69,0x6e,0x76,0x6f,0x6b,0x65,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75, - 0x6e,0x63,0x20,0x3d,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x5b,0x63,0x6d, - 0x64,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x75, - 0x6e,0x63,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6f,0x6b,0x2c,0x20,0x63,0x6f, - 0x6e,0x74,0x20,0x3d,0x20,0x78,0x70,0x63,0x61,0x6c,0x6c,0x28,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x75, - 0x6e,0x63,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2c,0x20,0x64, - 0x61,0x74,0x61,0x29,0x20,0x65,0x6e,0x64,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e, - 0x74,0x72,0x61,0x63,0x65,0x62,0x61,0x63,0x6b,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6f,0x6b, - 0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61, - 0x6c,0x20,0x65,0x78,0x63,0x65,0x70,0x74,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61, - 0x6c,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x2c,0x20,0x61,0x74,0x74, - 0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70,0x65,0x28,0x63,0x6f,0x6e,0x74,0x29,0x20, - 0x3d,0x3d,0x20,0x22,0x74,0x61,0x62,0x6c,0x65,0x22,0x20,0x61,0x6e,0x64,0x20,0x67, - 0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x63,0x6f,0x6e,0x74, - 0x29,0x20,0x3d,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e,0x44,0x42,0x47,0x50,0x5f,0x45, - 0x52,0x52,0x5f,0x4d,0x45,0x54,0x41,0x54,0x41,0x42,0x4c,0x45,0x20,0x74,0x68,0x65, - 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x2c, - 0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x2e,0x63,0x6f,0x64, - 0x65,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x2e,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c, - 0x20,0x63,0x6f,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x2c,0x20,0x61, - 0x74,0x74,0x72,0x20,0x3d,0x20,0x39,0x39,0x38,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72, - 0x69,0x6e,0x67,0x28,0x63,0x6f,0x6e,0x74,0x29,0x2c,0x20,0x7b,0x20,0x7d,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65, - 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x45,0x52,0x52,0x4f,0x52,0x22,0x2c,0x20, - 0x22,0x43,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x25,0x73,0x20,0x63,0x61,0x75,0x73, - 0x65,0x64,0x3a,0x20,0x28,0x25,0x64,0x29,0x20,0x25,0x73,0x22,0x2c,0x20,0x63,0x6d, - 0x64,0x2c,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e, - 0x67,0x28,0x6d,0x73,0x67,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x2e,0x63,0x6f,0x6d, - 0x6d,0x61,0x6e,0x64,0x2c,0x20,0x61,0x74,0x74,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73, - 0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63,0x6d,0x64,0x2c, - 0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e, - 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20, - 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73, - 0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x2c, - 0x20,0x64,0x62,0x67,0x70,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f,0x72, - 0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x29,0x20,0x7d,0x20,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65, - 0x69,0x66,0x20,0x63,0x6f,0x6e,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c, - 0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65, - 0x78,0x74,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d, - 0x20,0x63,0x6d,0x64,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f, - 0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x63,0x6f,0x6e,0x74,0x20,0x3d,0x3d, - 0x20,0x6e,0x69,0x6c,0x20,0x61,0x6e,0x64,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x6d, - 0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69, - 0x66,0x20,0x63,0x6f,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x66,0x61,0x6c,0x73,0x65,0x20, - 0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x20,0x63,0x61,0x73,0x65,0x20, - 0x6f,0x66,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x74,0x68,0x61,0x74, - 0x20,0x66,0x75,0x6c,0x6c,0x79,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x73,0x20,0x64, - 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70,0x2c,0x20,0x74,0x68, - 0x65,0x20,0x6d,0x6f,0x64,0x65,0x20,0x69,0x73,0x20,0x73,0x79,0x6e,0x63,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61, - 0x73,0x79,0x6e,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x66,0x61,0x6c,0x73, - 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e, - 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22, - 0x47,0x6f,0x74,0x20,0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,0x20,0x63,0x6f,0x6d,0x6d, - 0x61,0x6e,0x64,0x3a,0x20,0x22,0x2e,0x2e,0x63,0x6d,0x64,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65, - 0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c, - 0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e, - 0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f, - 0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x63,0x6d,0x64,0x2c,0x20,0x74,0x72,0x61, - 0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72, - 0x67,0x73,0x2e,0x69,0x2c,0x20,0x7d,0x2c,0x20,0x64,0x62,0x67,0x70,0x2e,0x6d,0x61, - 0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f,0x72,0x28,0x34,0x29,0x20,0x7d,0x20,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74, - 0x61,0x63,0x6b,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x66,0x72,0x65, - 0x65,0x20,0x61,0x6c,0x6c,0x6f,0x63,0x61,0x74,0x65,0x64,0x20,0x63,0x6f,0x6e,0x74, - 0x65,0x78,0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74, - 0x61,0x74,0x65,0x20,0x3d,0x20,0x22,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x22,0x0a, - 0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x73,0x65,0x74, - 0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x30,0x29,0x20,0x2d,0x2d,0x20,0x72,0x65, - 0x73,0x65,0x74,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x74,0x6f,0x20,0x61,0x73, - 0x79,0x6e,0x63,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x53,0x74,0x61,0x63, - 0x6b,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x20,0x63,0x61,0x6e,0x20,0x62, - 0x65,0x20,0x70,0x72,0x65,0x74,0x74,0x79,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x78, - 0x20,0x73,0x6f,0x6d,0x65,0x74,0x69,0x6d,0x65,0x73,0x2c,0x20,0x65,0x73,0x70,0x65, - 0x63,0x69,0x61,0x6c,0x6c,0x79,0x20,0x77,0x69,0x74,0x68,0x20,0x4c,0x75,0x61,0x4a, - 0x49,0x54,0x20,0x28,0x61,0x73,0x20,0x74,0x61,0x69,0x6c,0x2d,0x63,0x61,0x6c,0x6c, - 0x20,0x6f,0x70,0x74,0x69,0x6d,0x69,0x7a,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x72, - 0x65,0x0a,0x2d,0x2d,0x20,0x6d,0x6f,0x72,0x65,0x20,0x61,0x67,0x67,0x72,0x65,0x73, - 0x73,0x69,0x76,0x65,0x20,0x61,0x73,0x20,0x73,0x74,0x6f,0x63,0x6b,0x20,0x4c,0x75, - 0x61,0x29,0x2e,0x20,0x53,0x6f,0x20,0x61,0x6c,0x6c,0x20,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x20,0x73,0x74,0x75,0x66,0x66,0x20,0x69,0x73,0x20,0x64,0x6f,0x6e, - 0x65,0x20,0x69,0x6e,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x6f,0x72, - 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2c,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x6c,0x65, - 0x61,0x76,0x65,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x0a, - 0x2d,0x2d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x69,0x6e,0x20,0x61,0x20,0x63,0x6c, - 0x65,0x61,0x6e,0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x61,0x6e,0x64,0x20,0x61,0x6c, - 0x6c,0x6f,0x77,0x20,0x66,0x61,0x73,0x74,0x65,0x72,0x20,0x61,0x6e,0x64,0x20,0x63, - 0x6c,0x65,0x61,0x72,0x65,0x72,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6f,0x70,0x65, - 0x72,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x28,0x6e,0x6f,0x20,0x6e,0x65,0x65,0x64, - 0x20,0x74,0x6f,0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x20,0x61,0x6c,0x6c,0x20,0x64, - 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x63,0x61,0x6c,0x6c,0x73,0x0a,0x2d,0x2d, - 0x20,0x66,0x72,0x6f,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x66,0x6f,0x72,0x20, - 0x65,0x61,0x63,0x68,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x29,0x2e, - 0x0a,0x2d,0x2d,0x20,0x48,0x6f,0x77,0x65,0x76,0x65,0x72,0x2c,0x20,0x74,0x68,0x69, - 0x73,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x61,0x6c,0x77,0x61,0x79, - 0x73,0x20,0x77,0x6f,0x72,0x6b,0x20,0x77,0x69,0x74,0x68,0x20,0x73,0x74,0x6f,0x63, - 0x6b,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20,0x61,0x73,0x20,0x74,0x68,0x65, - 0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20, - 0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65, - 0x6e,0x63,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x28,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69, - 0x6e,0x65,0x2e,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x29,0x2e,0x20,0x46,0x6f,0x72,0x20,0x74,0x68, - 0x69,0x73,0x20,0x70,0x61,0x72,0x74,0x69,0x63,0x75,0x6c,0x61,0x72,0x20,0x63,0x61, - 0x73,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72, - 0x20,0x6c,0x6f,0x6f,0x70,0x20,0x69,0x73,0x20,0x73,0x74,0x61,0x72,0x74,0x65,0x64, - 0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x74,0x6f,0x70,0x20,0x6f,0x66,0x0a,0x2d, - 0x2d,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, - 0x61,0x6e,0x64,0x20,0x65,0x76,0x65,0x72,0x79,0x20,0x73,0x74,0x61,0x63,0x6b,0x20, - 0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x72,0x65,0x6c, - 0x61,0x74,0x69,0x76,0x65,0x20,0x74,0x68,0x65,0x20,0x74,0x68,0x65,0x20,0x68,0x6f, - 0x6f,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x28,0x73,0x65,0x65,0x20,0x4d,0x61, - 0x69,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x6e,0x20,0x75,0x74,0x69,0x6c, - 0x2e,0x6c,0x75,0x61,0x29,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x28, - 0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x2c,0x20,0x70,0x61,0x63,0x6b,0x65,0x74, - 0x20,0x3d,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x28,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62, - 0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x7e,0x3d,0x20,0x6c,0x69,0x6e, - 0x65,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x69,0x66,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69, - 0x6e,0x74,0x73,0x2e,0x67,0x75,0x65,0x73,0x73,0x28,0x6c,0x69,0x6e,0x65,0x29,0x20, - 0x7e,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e, - 0x66,0x6f,0x20,0x3d,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73, - 0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f, - 0x28,0x30,0x2c,0x20,0x22,0x53,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x20,0x3d, - 0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f,0x75,0x72, - 0x69,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x75,0x72, - 0x69,0x20,0x61,0x6e,0x64,0x20,0x75,0x72,0x69,0x20,0x7e,0x3d,0x20,0x64,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x5f,0x75,0x72,0x69,0x20,0x61,0x6e,0x64,0x20,0x75,0x72, - 0x69,0x20,0x7e,0x3d,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x6d,0x6f, - 0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d, - 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x64,0x6f, - 0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x69,0x66,0x20, - 0x74,0x68,0x65,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f, - 0x74,0x20,0x6b,0x6e,0x6f,0x77,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b, - 0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69, - 0x6e,0x74,0x73,0x2e,0x61,0x74,0x28,0x75,0x72,0x69,0x2c,0x20,0x6c,0x69,0x6e,0x65, - 0x29,0x20,0x2d,0x2d,0x6f,0x72,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e, - 0x74,0x73,0x2e,0x64,0x6f,0x65,0x73,0x5f,0x6d,0x61,0x74,0x63,0x68,0x28,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x3d, - 0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e,0x74,0x73,0x2e,0x64,0x6f,0x65, - 0x73,0x5f,0x6d,0x61,0x74,0x63,0x68,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x64,0x6f,0x5f, - 0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65, - 0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e, - 0x74,0x73,0x2e,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x28,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x68,0x65,0x63, - 0x6b,0x20,0x66,0x6f,0x72,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x63,0x6f,0x6d,0x6d, - 0x61,0x6e,0x64,0x73,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x64, - 0x62,0x67,0x70,0x2e,0x72,0x65,0x61,0x64,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x28, - 0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x73, - 0x6b,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70, - 0x61,0x63,0x6b,0x65,0x74,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x6f,0x5f,0x62,0x72, - 0x65,0x61,0x6b,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x64,0x6f, - 0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72, - 0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x75, - 0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x70,0x63,0x61, - 0x6c,0x6c,0x28,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x6c,0x6f,0x6f,0x70, - 0x2c,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e, - 0x2c,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73, - 0x20,0x74,0x68,0x65,0x6e,0x20,0x6c,0x6f,0x67,0x28,0x22,0x45,0x52,0x52,0x4f,0x52, - 0x22,0x2c,0x20,0x22,0x45,0x72,0x72,0x6f,0x72,0x20,0x77,0x68,0x69,0x6c,0x65,0x20, - 0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x3a,0x20,0x22,0x2e,0x2e,0x65, - 0x72,0x72,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x5f, - 0x68,0x6f,0x6f,0x6b,0x5f,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x63,0x72, - 0x65,0x61,0x74,0x65,0x28,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6c,0x69, - 0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x74,0x72, - 0x75,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69, - 0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x63,0x6f,0x79, - 0x69,0x65,0x6c,0x64,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65, - 0x6e,0x64,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x68,0x6f,0x6f, - 0x6b,0x28,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20, - 0x3d,0x20,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x20,0x6f,0x72, - 0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65, - 0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x63,0x61,0x6c,0x6c,0x22,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63, - 0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d, - 0x20,0x3d,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b, - 0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20, - 0x22,0x74,0x61,0x69,0x6c,0x20,0x63,0x61,0x6c,0x6c,0x22,0x20,0x74,0x68,0x65,0x6e, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x61,0x69,0x6c, - 0x20,0x63,0x61,0x6c,0x6c,0x73,0x20,0x68,0x61,0x73,0x20,0x6e,0x6f,0x20,0x65,0x66, - 0x66,0x65,0x63,0x74,0x73,0x20,0x6f,0x6e,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x68, - 0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x3a,0x20,0x69,0x74,0x20,0x69,0x73,0x20,0x6f, - 0x6e,0x6c,0x79,0x20,0x75,0x73,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x66,0x6f, - 0x72,0x20,0x73,0x74,0x65,0x70,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20, - 0x62,0x75,0x74,0x20,0x61,0x20,0x73,0x75,0x63,0x68,0x20,0x65,0x76,0x65,0x6e,0x20, - 0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x65,0x72,0x65,0x20,0x77,0x69, - 0x74,0x68,0x20,0x61,0x6e,0x79,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x6d,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20, - 0x3d,0x3d,0x20,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x22,0x20,0x6f,0x72,0x20,0x65, - 0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x69,0x6c,0x20,0x72,0x65, - 0x74,0x75,0x72,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b, - 0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f, - 0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x2d, - 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x2d,0x2d,0x20,0x6c, - 0x69,0x6e,0x65,0x20,0x65,0x76,0x65,0x6e,0x74,0x3a,0x20,0x63,0x68,0x65,0x63,0x6b, - 0x20,0x66,0x6f,0x72,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73, - 0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x75,0x74, - 0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64, - 0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f, - 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d,0x20, - 0x3d,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x5f, - 0x68,0x6f,0x6f,0x6b,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,0x75,0x6e,0x20,0x74,0x68,0x65,0x20,0x64, - 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x69,0x6e,0x20, - 0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x6f, - 0x6e,0x20,0x74,0x68,0x65,0x20,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x73,0x65, - 0x73,0x20,0x28,0x73,0x69,0x6d,0x70,0x6c,0x69,0x66,0x69,0x65,0x73,0x20,0x73,0x74, - 0x61,0x63,0x6b,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x73,0x73,0x65,0x72,0x74, - 0x28,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x6c,0x69,0x6e,0x65,0x5f,0x68, - 0x6f,0x6f,0x6b,0x5f,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x29,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73, - 0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x69,0x66,0x20,0x72, - 0x61,0x77,0x67,0x65,0x74,0x28,0x5f,0x47,0x2c,0x20,0x22,0x6a,0x69,0x74,0x22,0x29, - 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x67, - 0x65,0x72,0x5f,0x68,0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69, - 0x6f,0x6e,0x28,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x68, - 0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67, - 0x28,0x29,0x20,0x6f,0x72,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d, - 0x20,0x22,0x63,0x61,0x6c,0x6c,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x64,0x65,0x62,0x75, - 0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x32,0x2c,0x20,0x22,0x53,0x22, - 0x29,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x43,0x22,0x20,0x74,0x68, - 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f, - 0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d, - 0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68, - 0x72,0x65,0x61,0x64,0x5d,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d, - 0x3d,0x20,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x22,0x20,0x6f,0x72,0x20,0x65,0x76, - 0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x69,0x6c,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x68,0x6f,0x6f,0x6b,0x73,0x20,0x61,0x72,0x65,0x20,0x6e,0x6f,0x74,0x20,0x63,0x61, - 0x6c,0x6c,0x65,0x64,0x20,0x66,0x6f,0x72,0x20,0x74,0x61,0x69,0x6c,0x20,0x63,0x61, - 0x6c,0x6c,0x73,0x20,0x69,0x6e,0x20,0x4a,0x49,0x54,0x20,0x28,0x62,0x75,0x74,0x20, - 0x75,0x6e,0x6c,0x69,0x6b,0x65,0x20,0x35,0x2e,0x32,0x20,0x74,0x68,0x65,0x72,0x65, - 0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x6b,0x6e, - 0x6f,0x77,0x20,0x77,0x68,0x65,0x74,0x68,0x65,0x72,0x20,0x61,0x20,0x63,0x61,0x6c, - 0x6c,0x20,0x69,0x73,0x20,0x74,0x61,0x69,0x6c,0x20,0x6f,0x72,0x20,0x6e,0x6f,0x74, - 0x29,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d, - 0x2d,0x20,0x53,0x6f,0x20,0x74,0x68,0x65,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x72,0x65, - 0x6c,0x69,0x61,0x62,0x6c,0x65,0x20,0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x6b,0x6e, - 0x6f,0x77,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x69, - 0x73,0x20,0x74,0x6f,0x20,0x77,0x61,0x6c,0x6b,0x20,0x69,0x74,0x2e,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x32,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x66, - 0x69,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x65,0x73,0x74,0x20, - 0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x63,0x61,0x6c,0x6c,0x20,0x67,0x65,0x74,0x69, - 0x6e,0x66,0x6f,0x20,0x28,0x27,0x77,0x68,0x61,0x74,0x27,0x20,0x70,0x61,0x72,0x61, - 0x6d,0x65,0x74,0x65,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67, - 0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x22,0x66, - 0x22,0x29,0x20,0x64,0x6f,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65, - 0x70,0x74,0x68,0x20,0x2b,0x20,0x31,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65, - 0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x64, - 0x65,0x70,0x74,0x68,0x20,0x2d,0x20,0x32,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d, - 0x20,0x22,0x6c,0x69,0x6e,0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f, - 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x75, - 0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61, - 0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x63, - 0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72, - 0x6f,0x5b,0x31,0x5d,0x20,0x3d,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x20,0x74, - 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x28,0x6c,0x69, - 0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,0x75,0x6e,0x20,0x74,0x68,0x65,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x69,0x6e, - 0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20, - 0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x73, - 0x65,0x73,0x20,0x28,0x73,0x69,0x6d,0x70,0x6c,0x69,0x66,0x69,0x65,0x73,0x20,0x73, - 0x74,0x61,0x63,0x6b,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x29,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61, - 0x73,0x73,0x65,0x72,0x74,0x28,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x6c, - 0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x5f,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c, - 0x69,0x6e,0x65,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e, - 0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74, - 0x69,0x6f,0x6e,0x20,0x69,0x6e,0x69,0x74,0x28,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70, - 0x6f,0x72,0x74,0x2c,0x20,0x69,0x64,0x65,0x6b,0x65,0x79,0x2c,0x20,0x74,0x72,0x61, - 0x6e,0x73,0x70,0x6f,0x72,0x74,0x2c,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f, - 0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2c,0x20,0x77,0x6f,0x72,0x6b,0x69, - 0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x2c,0x20,0x73,0x65,0x61, - 0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d, - 0x20,0x67,0x65,0x74,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20, - 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x68, - 0x6f,0x73,0x74,0x20,0x3d,0x20,0x68,0x6f,0x73,0x74,0x20,0x6f,0x72,0x20,0x6f,0x73, - 0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x20,0x22,0x44,0x42,0x47,0x50,0x5f,0x49,0x44, - 0x45,0x48,0x4f,0x53,0x54,0x22,0x20,0x6f,0x72,0x20,0x22,0x31,0x32,0x37,0x2e,0x30, - 0x2e,0x30,0x2e,0x31,0x22,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x70,0x6f,0x72,0x74,0x20,0x3d,0x20,0x70,0x6f,0x72,0x74,0x20,0x6f,0x72,0x20,0x6f, - 0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x20,0x22,0x44,0x42,0x47,0x50,0x5f,0x49, - 0x44,0x45,0x50,0x4f,0x52,0x54,0x22,0x20,0x6f,0x72,0x20,0x22,0x31,0x30,0x30,0x30, - 0x30,0x22,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x64,0x65, - 0x6b,0x65,0x79,0x20,0x3d,0x20,0x69,0x64,0x65,0x6b,0x65,0x79,0x20,0x6f,0x72,0x20, - 0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x28,0x22,0x44,0x42,0x47,0x50,0x5f, - 0x49,0x44,0x45,0x4b,0x45,0x59,0x22,0x29,0x20,0x6f,0x72,0x20,0x22,0x6c,0x75,0x61, - 0x69,0x64,0x65,0x6b,0x65,0x79,0x22,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20, - 0x69,0x6e,0x69,0x74,0x20,0x70,0x6c,0x61,0x66,0x6f,0x72,0x6d,0x20,0x6d,0x6f,0x64, - 0x75,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x78, - 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20, - 0x3d,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66, - 0x6f,0x72,0x6d,0x20,0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76, - 0x28,0x22,0x44,0x42,0x47,0x50,0x5f,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52,0x4d,0x22, - 0x29,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63, - 0x61,0x6c,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74, - 0x6f,0x72,0x79,0x20,0x3d,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72, - 0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74, - 0x65,0x6e,0x76,0x28,0x22,0x44,0x42,0x47,0x50,0x5f,0x57,0x4f,0x52,0x4b,0x49,0x4e, - 0x47,0x44,0x49,0x52,0x22,0x29,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20, - 0x20,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x69,0x6e,0x69,0x74,0x28, - 0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72, - 0x6d,0x2c,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f, - 0x72,0x79,0x2c,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x29,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x74,0x72,0x61,0x6e, - 0x73,0x70,0x6f,0x72,0x74,0x20,0x6c,0x61,0x79,0x65,0x72,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x70, - 0x61,0x74,0x68,0x20,0x3d,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x20, - 0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x28,0x22,0x44,0x42, - 0x47,0x50,0x5f,0x54,0x52,0x41,0x4e,0x53,0x50,0x4f,0x52,0x54,0x22,0x29,0x20,0x6f, - 0x72,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e, - 0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x22, - 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x72,0x61,0x6e,0x73, - 0x70,0x6f,0x72,0x74,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x28,0x74, - 0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x70,0x61,0x74,0x68,0x29,0x0a,0x0a,0x20, - 0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x73,0x74,0x61,0x6c,0x6c,0x20,0x62,0x61, - 0x73,0x65,0x36,0x34,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x69, - 0x6e,0x74,0x6f,0x20,0x75,0x74,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x75,0x74,0x69, - 0x6c,0x2e,0x62,0x36,0x34,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x72,0x61,0x77,0x62, - 0x36,0x34,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d, - 0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x62,0x36,0x34,0x2c,0x20, - 0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x72,0x61,0x77,0x62,0x36,0x34, - 0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x75,0x6e,0x62,0x36, - 0x34,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x6b,0x74, - 0x20,0x3d,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x74,0x72,0x61,0x6e,0x73,0x70, - 0x6f,0x72,0x74,0x2e,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x29,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x73,0x6b,0x74,0x3a,0x73,0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74, - 0x28,0x6e,0x69,0x6c,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x72, - 0x79,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x73,0x65,0x76, - 0x65,0x72,0x61,0x6c,0x20,0x74,0x69,0x6d,0x65,0x73,0x3a,0x20,0x69,0x66,0x20,0x49, - 0x44,0x45,0x20,0x6c,0x61,0x75,0x6e,0x63,0x68,0x65,0x73,0x20,0x62,0x6f,0x74,0x68, - 0x20,0x70,0x72,0x6f,0x63,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x73,0x65,0x72, - 0x76,0x65,0x72,0x20,0x61,0x74,0x20,0x73,0x61,0x6d,0x65,0x20,0x74,0x69,0x6d,0x65, - 0x2c,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20, - 0x61,0x74,0x74,0x65,0x6d,0x70,0x74,0x73,0x20,0x6d,0x61,0x79,0x20,0x66,0x61,0x69, - 0x6c,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6f,0x6b,0x2c,0x20, - 0x65,0x72,0x72,0x0a,0x20,0x20,0x20,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x73,0x74, - 0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x65,0x62, - 0x75,0x67,0x67,0x65,0x72,0x20,0x76,0x25,0x73,0x22,0x2c,0x20,0x44,0x42,0x47,0x50, - 0x5f,0x43,0x4c,0x49,0x45,0x4e,0x54,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x29, - 0x29,0x0a,0x20,0x20,0x20,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x73,0x74,0x72,0x69, - 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x3a,0x20,0x54,0x72,0x79,0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x63, - 0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x25,0x73,0x3a,0x25,0x73,0x20, - 0x2e,0x2e,0x2e,0x20,0x22,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72, - 0x74,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x6f,0x6b,0x2c,0x20,0x65,0x72,0x72,0x20, - 0x3d,0x20,0x73,0x6b,0x74,0x3a,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x28,0x68,0x6f, - 0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f, - 0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x34,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6f,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x22, - 0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x3a,0x20,0x43,0x6f,0x6e,0x6e,0x65,0x63, - 0x74,0x69,0x6f,0x6e,0x20,0x73,0x75,0x63,0x63,0x65,0x65,0x64,0x2e,0x22,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x61,0x69,0x74,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f, - 0x72,0x74,0x2e,0x73,0x6c,0x65,0x65,0x70,0x28,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x6e,0x20, - 0x72,0x65,0x74,0x72,0x79,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f, - 0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x3a,0x20, - 0x52,0x65,0x74,0x72,0x79,0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x6e, - 0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x25,0x73,0x3a,0x25,0x73,0x20,0x2e,0x2e,0x2e, - 0x20,0x22,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x6b,0x2c,0x20,0x65, - 0x72,0x72,0x20,0x3d,0x20,0x73,0x6b,0x74,0x3a,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74, - 0x28,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x72,0x72,0x20,0x74,0x68,0x65,0x6e, - 0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f, - 0x72,0x6d,0x61,0x74,0x28,0x22,0x43,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x63,0x6f,0x6e, - 0x6e,0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x25,0x73,0x3a,0x25,0x64,0x20,0x3a,0x20, - 0x25,0x73,0x22,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x2c, - 0x20,0x65,0x72,0x72,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67, - 0x67,0x65,0x72,0x20,0x61,0x6e,0x64,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72, - 0x74,0x20,0x6c,0x61,0x79,0x65,0x72,0x20,0x55,0x52,0x49,0x0a,0x20,0x20,0x20,0x20, - 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x75,0x72,0x69,0x20,0x3d,0x20,0x70, - 0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x28, - 0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x31,0x29, - 0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x74,0x72,0x61, - 0x6e,0x73,0x70,0x6f,0x72,0x74,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69, - 0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f, - 0x75,0x72,0x69,0x28,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66, - 0x6f,0x28,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x63,0x72,0x65,0x61, - 0x74,0x65,0x29,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x0a,0x20,0x20,0x20, - 0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x72,0x6f,0x6f,0x74, - 0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x70,0x61,0x74,0x68,0x20,0x28,0x74,0x68, - 0x65,0x20,0x68,0x69,0x67,0x68,0x65,0x73,0x74,0x20,0x70,0x6f,0x73,0x73,0x69,0x62, - 0x6c,0x65,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x6f,0x75,0x72,0x63,0x65, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x32,0x2c,0x20,0x6d,0x61, - 0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20, - 0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x69,0x29, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x69,0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72, - 0x63,0x65,0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65, - 0x74,0x5f,0x75,0x72,0x69,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,0x72,0x63, - 0x65,0x29,0x20,0x6f,0x72,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20, - 0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x6f,0x75,0x72, - 0x63,0x65,0x20,0x3d,0x20,0x22,0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,0x3a,0x2f,0x22, - 0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x77,0x68,0x65,0x6e,0x20,0x6c,0x6f,0x61, - 0x64,0x65,0x64,0x20,0x62,0x65,0x66,0x6f,0x72,0x65,0x20,0x61,0x63,0x74,0x75,0x61, - 0x6c,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x28,0x77,0x69,0x74,0x68,0x20,0x61, - 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x6c,0x69,0x6e,0x65,0x20,0x73,0x77, - 0x69,0x74,0x63,0x68,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65, - 0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x73,0x6f,0x6d,0x65,0x20,0x6b,0x69,0x6e,0x64, - 0x20,0x6f,0x66,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x64,0x65,0x6e,0x74, - 0x69,0x66,0x69,0x65,0x72,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20, - 0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69, - 0x6e,0x67,0x28,0x29,0x20,0x6f,0x72,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x0a,0x20, - 0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b, - 0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x31,0x20,0x2d,0x2d,0x20,0x74, - 0x68,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20, - 0x77,0x69,0x6c,0x6c,0x20,0x73,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x75, - 0x6e,0x74,0x65,0x72,0x20,0x74,0x6f,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f, - 0x63,0x61,0x6c,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x69,0x64,0x20,0x3d,0x20, - 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6f,0x73,0x2e,0x74,0x69,0x6d,0x65, - 0x28,0x29,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5f,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f, - 0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x29,0x0a,0x0a, - 0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d, - 0x6c,0x28,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22, - 0x69,0x6e,0x69,0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x70,0x70,0x69,0x64,0x20,0x3d,0x20, - 0x22,0x4c,0x75,0x61,0x20,0x44,0x42,0x47,0x70,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x69,0x64,0x65,0x6b,0x65,0x79,0x20,0x3d,0x20,0x69,0x64,0x65, - 0x6b,0x65,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x73, - 0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x69,0x64, - 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64, - 0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x68,0x72,0x65, - 0x61,0x64,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72, - 0x65,0x6e,0x74,0x20,0x3d,0x20,0x22,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x20,0x3d,0x20,0x22,0x4c,0x75, - 0x61,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74, - 0x6f,0x63,0x6f,0x6c,0x5f,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x22, - 0x31,0x2e,0x30,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69, - 0x6c,0x65,0x75,0x72,0x69,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x20, - 0x20,0x20,0x20,0x7d,0x20,0x7d,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x46, - 0x49,0x58,0x4d,0x45,0x20,0x75,0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e, - 0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e, - 0x67,0x29,0x20,0x3d,0x3e,0x20,0x75,0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65, - 0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69, - 0x6e,0x67,0x28,0x29,0x29,0x20,0x57,0x48,0x41,0x54,0x20,0x44,0x4f,0x45,0x53,0x20, - 0x49,0x54,0x20,0x46,0x49,0x58,0x45,0x53,0x20,0x3f,0x3f,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x73,0x73,0x20,0x3d,0x20,0x7b,0x20,0x73, - 0x6b,0x74,0x20,0x3d,0x20,0x73,0x6b,0x74,0x2c,0x20,0x73,0x74,0x61,0x74,0x65,0x20, - 0x3d,0x20,0x22,0x73,0x74,0x61,0x72,0x74,0x69,0x6e,0x67,0x22,0x2c,0x20,0x69,0x64, - 0x20,0x3d,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x69,0x64,0x2c,0x20,0x63,0x6f, - 0x72,0x6f,0x20,0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e, - 0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e, - 0x67,0x29,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f, - 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x73,0x65,0x73,0x73,0x0a,0x20, - 0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x6c,0x6f,0x6f,0x70, - 0x28,0x73,0x65,0x73,0x73,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73, - 0x65,0x74,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x68,0x6f,0x6f,0x6b,0x73,0x0a,0x20, - 0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65,0x74,0x68,0x6f,0x6f,0x6b, - 0x28,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x68,0x6f,0x6f,0x6b,0x2c,0x20, - 0x22,0x72,0x6c,0x63,0x22,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69, - 0x6e,0x73,0x74,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x20,0x63,0x6f,0x6c,0x6c,0x65,0x63,0x74,0x69,0x6e,0x67,0x20,0x66,0x75,0x6e,0x63, - 0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f, - 0x44,0x4f,0x3a,0x20,0x6d,0x61,0x69,0x6e,0x74,0x61,0x69,0x6e,0x20,0x61,0x20,0x6c, - 0x69,0x73,0x74,0x20,0x6f,0x66,0x20,0x2a,0x61,0x6c,0x6c,0x2a,0x20,0x63,0x6f,0x72, - 0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x6f, - 0x76,0x65,0x72,0x6b,0x69,0x6c,0x6c,0x20,0x28,0x66,0x6f,0x72,0x20,0x65,0x78,0x61, - 0x6d,0x70,0x6c,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x6f,0x6e,0x65,0x73,0x20,0x63, - 0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x62,0x79,0x20,0x63,0x6f,0x70,0x63,0x61,0x6c, - 0x6c,0x29,0x2c,0x20,0x6d,0x61,0x6b,0x65,0x20,0x61,0x20,0x65,0x78,0x74,0x65,0x6e, - 0x73,0x69,0x6f,0x6e,0x20,0x70,0x6f,0x69,0x6e,0x74,0x20,0x74,0x6f,0x0a,0x20,0x20, - 0x20,0x20,0x2d,0x2d,0x20,0x63,0x75,0x73,0x74,0x6f,0x6d,0x69,0x7a,0x65,0x20,0x64, - 0x65,0x62,0x75,0x67,0x67,0x65,0x64,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e, - 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74, - 0x69,0x6e,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e, - 0x63,0x65,0x64,0x20,0x64,0x75,0x72,0x69,0x6e,0x67,0x20,0x74,0x68,0x65,0x69,0x72, - 0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x20,0x28,0x73, - 0x6f,0x20,0x77,0x65,0x20,0x61,0x72,0x65,0x20,0x73,0x75,0x72,0x65,0x20,0x74,0x68, - 0x61,0x74,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x68, - 0x61,0x76,0x65,0x20,0x61,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x66,0x72,0x61,0x6d, - 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e, - 0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x5f,0x68,0x61,0x6e, - 0x64,0x6c,0x65,0x72,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x73,0x74,0x61, - 0x74,0x75,0x73,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x3d,0x3d,0x20,0x22,0x64,0x65, - 0x61,0x64,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x5f, - 0x69,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65, - 0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d, - 0x5f,0x63,0x6f,0x72,0x6f,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74, - 0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66, - 0x72,0x6f,0x6d,0x5f,0x69,0x64,0x5b,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64,0x5d,0x20, - 0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f, - 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f, - 0x72,0x6f,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b, - 0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x3d,0x20, - 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x2e, - 0x2e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20, - 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69, - 0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20, - 0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20, - 0x6e,0x6f,0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73, - 0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74, - 0x20,0x74,0x69,0x6d,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x64, - 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61, - 0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20, - 0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f, - 0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x6e,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e, - 0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65, - 0x73,0x2e,0x6e,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f, - 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f, - 0x69,0x64,0x5b,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63, - 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x6e,0x5d,0x20,0x3d,0x20,0x63, - 0x6f,0x72,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f, - 0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f,0x72,0x6f, - 0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63, - 0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e, - 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x65, - 0x62,0x75,0x67,0x2e,0x73,0x65,0x74,0x68,0x6f,0x6f,0x6b,0x28,0x63,0x6f,0x72,0x6f, - 0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x68,0x6f,0x6f,0x6b,0x2c, - 0x20,0x22,0x72,0x6c,0x63,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65, - 0x72,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65, - 0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x29,0x0a,0x20,0x20,0x20, - 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x72, - 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x20,0x75,0x73,0x65,0x73, - 0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x43,0x20,0x41,0x50,0x49,0x20, - 0x66,0x6f,0x72,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x61, - 0x6e,0x64,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x74,0x72,0x69,0x67, - 0x67,0x65,0x72,0x20,0x6f,0x75,0x72,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x64, - 0x65,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x72,0x65,0x73, - 0x75,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x6f,0x20,0x74,0x68, - 0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65, - 0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x77,0x72,0x61,0x70,0x20, - 0x69,0x6e,0x20,0x70,0x75,0x72,0x65,0x20,0x4c,0x75,0x61,0x0a,0x20,0x20,0x20,0x20, - 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x77, - 0x72,0x61,0x70,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x28,0x73,0x74,0x61,0x74, - 0x75,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x74, - 0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x28,0x2e,0x2e,0x2e,0x29,0x29, - 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x2e,0x2e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f, - 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x28,0x66,0x29,0x0a, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f, - 0x72,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63, - 0x72,0x65,0x61,0x74,0x65,0x28,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e, - 0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x77,0x72,0x61,0x70,0x5f,0x68,0x61, - 0x6e,0x64,0x6c,0x65,0x72,0x28,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e, - 0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x2e,0x2e,0x2e, - 0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20, - 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x73,0x65,0x73,0x73,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74, - 0x75,0x72,0x6e,0x20,0x69,0x6e,0x69,0x74,0x0a, -}; - - - -int luaopen_lua_m_debugger(lua_State *L) { - luaL_loadbuffer(L, - (const char*)lua_m_debugger, - sizeof(lua_m_debugger), - "debugger"); - return 1; -} - - -static luaL_Reg lua_debugger_modules[] = { - {"debugger", luaopen_lua_m_debugger}, - {NULL, NULL} -}; - -void luaopen_lua_debugger(lua_State* L) -{ - luaL_Reg* lib = lua_debugger_modules; - lua_getglobal(L, "package"); - lua_getfield(L, -1, "preload"); - for (; lib->func; lib++) - { - lib->func(L); - lua_setfield(L, -2, lib->name); - } - lua_pop(L, 2); -} - -#if __cplusplus -} -#endif diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lua_debugger.h b/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lua_debugger.h deleted file mode 100644 index 43c2c8ae35..0000000000 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/ide-support/lua_debugger.h +++ /dev/null @@ -1,23 +0,0 @@ - -/* lua_debugger.h.h */ - -#ifndef __LUA_MODULES_049C000C96FE547176CCBB7690BA01B6_H_ -#define __LUA_MODULES_049C000C96FE547176CCBB7690BA01B6_H_ - -#if __cplusplus -extern "C" { -#endif - -#include "lua.h" - -void luaopen_lua_debugger(lua_State* L); - -/* -int luaopen_lua_m_debugger(lua_State* L); -*/ - -#if __cplusplus -} -#endif - -#endif /* __LUA_MODULES_049C000C96FE547176CCBB7690BA01B6_H_ */ diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/lua_module_register.h b/templates/lua-template-default/frameworks/runtime-src/Classes/lua_module_register.h deleted file mode 100644 index 58977985e3..0000000000 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/lua_module_register.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __LUA_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_LUA_MODULE_REGISTER_H__ -#define __LUA_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_LUA_MODULE_REGISTER_H__ - -#include "cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h" -#include "network/lua_cocos2dx_network_manual.h" -#include "cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h" -#include "cocostudio/lua_cocos2dx_coco_studio_manual.hpp" -#include "extension/lua_cocos2dx_extension_manual.h" -#include "ui/lua_cocos2dx_ui_manual.hpp" -#include "spine/lua_cocos2dx_spine_manual.hpp" -#include "3d/lua_cocos2dx_3d_manual.h" -#include "audioengine/lua_cocos2dx_audioengine_manual.h" - -static int lua_module_register(lua_State* L) -{ - //Dont' change the module register order unless you know what your are doing - register_cocosdenshion_module(L); - register_network_module(L); - register_cocosbuilder_module(L); - register_cocostudio_module(L); - register_ui_moudle(L); - register_extension_module(L); - register_spine_module(L); - register_cocos3d_module(L); - register_audioengine_module(L); - return 1; -} - -#endif // __LUA_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_LUA_MODULE_REGISTER_H__ - diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml b/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml index 331146586c..c1b4d259ef 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml +++ b/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml @@ -14,7 +14,7 @@ android:value="cocos2dlua" /> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle b/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle index aa7d6ba93b..71d4b157a5 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle +++ b/templates/lua-template-default/frameworks/runtime-src/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../../cocos2d-x/cocos/platform/android/libcocos2dx') -include ':app' +include ':HelloLua' +project(':HelloLua').projectDir = new File(settingsDir, 'app') diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk b/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk index 07aa592b13..18444678c9 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk +++ b/templates/lua-template-default/frameworks/runtime-src/proj.android/jni/Application.mk @@ -1,6 +1,6 @@ APP_STL := gnustl_static -APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char +APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -DCC_ENABLE_BULLET_INTEGRATION=1 -std=c++11 -fsigned-char APP_LDFLAGS := -latomic diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index 7a7c05a379..a132ea77cd 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -830,6 +830,7 @@ USE_FILE32API, "CC_LUA_ENGINE_ENABLED=1", "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + "CC_ENABLE_BULLET_INTEGRATION=1", GLFW_EXPOSE_NATIVE_COCOA, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; @@ -853,6 +854,7 @@ USE_FILE32API, "CC_LUA_ENGINE_ENABLED=1", "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + "CC_ENABLE_BULLET_INTEGRATION=1", ); GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.vcxproj b/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.vcxproj index 12d7aafba4..7530caacf2 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.vcxproj +++ b/templates/lua-template-default/frameworks/runtime-src/proj.win32/HelloLua.vcxproj @@ -1,4 +1,4 @@ - + @@ -77,7 +77,7 @@ EditAndContinue EnableFastChecks Disabled - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;CC_ENABLE_BULLET_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) 4267;4251;4244;%(DisableSpecificWarnings) true $(IntDir)vc$(PlatformToolsetVersion).pdb @@ -89,7 +89,7 @@ MachineX86 true $(OutDir);%(AdditionalLibraryDirectories);$(_COCOS_LIB_PATH_WIN32_BEGIN);$(_COCOS_LIB_PATH_WIN32_END) - libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END) + libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END) $(ProjectDir)../../../runtime/win32/$(TargetName).pdb $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) @@ -125,6 +125,16 @@ xcopy "$(ProjectDir)..\..\..\res" "$(ProjectDir)..\..\..\runtime\win32\res" /D / xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D /E /I /F /Y + + + xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32\" +xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(ProjectDir)..\..\..\runtime\win32\" +xcopy "$(ProjectDir)..\..\..\res" "$(ProjectDir)..\..\..\runtime\win32\res" /D /E /I /F /Y +xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D /E /I /F /Y + $(TargetName).cab + $(TargetFileName) + + $(ProjectDir)..\Classes;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\curl\include\win32;$(EngineRoot);$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;%(AdditionalIncludeDirectories);$(_COCOS_HEADER_WIN32_BEGIN);$(_COCOS_HEADER_WIN32_END) @@ -135,7 +145,7 @@ xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D / ProgramDatabase - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;CC_ENABLE_BULLET_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) 4267;4251;4244;%(DisableSpecificWarnings) true $(IntDir)vc$(PlatformToolsetVersion).pdb @@ -146,7 +156,8 @@ xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D / Windows MachineX86 $(OutDir);%(AdditionalLibraryDirectories);$(_COCOS_LIB_PATH_WIN32_BEGIN);$(_COCOS_LIB_PATH_WIN32_END) - libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END) + libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END) + libcmt.lib true $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) diff --git a/templates/lua-template-runtime/cocos-project-template.json b/templates/lua-template-runtime/cocos-project-template.json index fa03afca47..3355b75772 100644 --- a/templates/lua-template-runtime/cocos-project-template.json +++ b/templates/lua-template-runtime/cocos-project-template.json @@ -135,6 +135,18 @@ "proj.win32/Debug", "proj.win32/Release" ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/Classes/ide-support", + "to": "frameworks/runtime-src/Classes/ide-support", + "exclude": [ + "RuntimeJsImpl.h", + "RuntimeJsImpl.cpp" + ] + }, + { + "from": "tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h", + "to": "frameworks/runtime-src/Classes/" } ], "project_rename": { @@ -161,6 +173,7 @@ "frameworks/runtime-src/proj.android/AndroidManifest.xml", "frameworks/runtime-src/proj.android/build.xml", "frameworks/runtime-src/proj.android/res/values/strings.xml", + "frameworks/runtime-src/proj.android-studio/settings.gradle", "frameworks/runtime-src/proj.ios_mac/ios/main.m", "frameworks/runtime-src/proj.ios_mac/ios/Prefix.pch", "frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm", @@ -170,7 +183,9 @@ "project_replace_package_name": { "src_package_name": "org.cocos2dx.hellolua", "files": [ - "frameworks/runtime-src/proj.android/AndroidManifest.xml" + "frameworks/runtime-src/proj.android/AndroidManifest.xml", + "frameworks/runtime-src/proj.android-studio/app/build.gradle", + "frameworks/runtime-src/proj.android-studio/app/AndroidManifest.xml" ] }, "project_replace_mac_bundleid": { diff --git a/tests/cpp-empty-test/.cocos-project.json b/tests/cpp-empty-test/.cocos-project.json index 97103e9e8f..bafca7169b 100644 --- a/tests/cpp-empty-test/.cocos-project.json +++ b/tests/cpp-empty-test/.cocos-project.json @@ -24,7 +24,8 @@ "target_name": "cpp-empty-test Mac" }, "android_cfg": { - "project_path": "proj.android" + "project_path": "proj.android", + "studio_proj_path" : "proj.android-studio" }, "wp8_1_cfg" : { "project_path": "../../build", diff --git a/tests/cpp-empty-test/proj.android-studio/app/build.gradle b/tests/cpp-empty-test/proj.android-studio/app/build.gradle index 8b80348200..d92c795996 100644 --- a/tests/cpp-empty-test/proj.android-studio/app/build.gradle +++ b/tests/cpp-empty-test/proj.android-studio/app/build.gradle @@ -20,17 +20,30 @@ android { assets.srcDir "assets" } + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' - compile 'com.android.support:support-v4:22.1.1' compile project(':libcocos2dx') } diff --git a/tests/cpp-empty-test/proj.android-studio/app/project.properties b/tests/cpp-empty-test/proj.android-studio/app/project.properties new file mode 100644 index 0000000000..f049142c17 --- /dev/null +++ b/tests/cpp-empty-test/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/tests/cpp-empty-test/proj.android-studio/build-cfg.json b/tests/cpp-empty-test/proj.android-studio/build-cfg.json new file mode 100644 index 0000000000..98dbc8533f --- /dev/null +++ b/tests/cpp-empty-test/proj.android-studio/build-cfg.json @@ -0,0 +1,16 @@ +{ + "ndk_module_path" :[ + "../../..", + "../../../cocos", + "../../../external" + ], + "copy_resources": [ + { + "from": "../Resources", + "to": "", + "exclude": [ + "*.gz" + ] + } + ] +} diff --git a/tests/cpp-empty-test/proj.android-studio/gradlew b/tests/cpp-empty-test/proj.android-studio/gradlew old mode 100644 new mode 100755 diff --git a/tests/cpp-empty-test/proj.android-studio/proj.android-studio.iml b/tests/cpp-empty-test/proj.android-studio/proj.android-studio.iml deleted file mode 100644 index 2f6243b627..0000000000 --- a/tests/cpp-empty-test/proj.android-studio/proj.android-studio.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.android-studio/settings.gradle b/tests/cpp-empty-test/proj.android-studio/settings.gradle index 25a3ed500d..6d8165edec 100644 --- a/tests/cpp-empty-test/proj.android-studio/settings.gradle +++ b/tests/cpp-empty-test/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../../../cocos/platform/android/libcocos2dx') -include ':app' +include ':CppEmptyTest' +project(':CppEmptyTest').projectDir = new File(settingsDir, 'app') diff --git a/tests/cpp-empty-test/proj.win10/App.xaml b/tests/cpp-empty-test/proj.win10/App.xaml new file mode 100644 index 0000000000..62de149dd6 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/tests/cpp-empty-test/proj.win10/App.xaml.cpp b/tests/cpp-empty-test/proj.win10/App.xaml.cpp new file mode 100644 index 0000000000..f702179939 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/App.xaml.cpp @@ -0,0 +1,21 @@ +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; + +App::App() +{ + InitializeComponent(); +} + +void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +{ + if (mPage == nullptr) + { + mPage = ref new OpenGLESPage(&mOpenGLES); + } + + // Place the page in the current window and ensure that it is active. + Windows::UI::Xaml::Window::Current->Content = mPage; + Windows::UI::Xaml::Window::Current->Activate(); +} diff --git a/tests/cpp-empty-test/proj.win10/App.xaml.h b/tests/cpp-empty-test/proj.win10/App.xaml.h new file mode 100644 index 0000000000..8697d3d824 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/App.xaml.h @@ -0,0 +1,19 @@ +#pragma once + +#include "app.g.h" +#include "OpenGLES.h" +#include "openglespage.xaml.h" + +namespace cocos2d +{ + ref class App sealed + { + public: + App(); + virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; + + private: + OpenGLESPage^ mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/tests/cpp-empty-test/proj.win10/Assets/Logo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/Logo.scale-100.png new file mode 100644 index 0000000000..e26771cb33 Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/Logo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/SmallLogo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/SmallLogo.scale-100.png new file mode 100644 index 0000000000..1eb0d9d528 Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/SmallLogo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/SplashScreen.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000000..c951e031bd Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/SplashScreen.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/StoreLogo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000000..dcb672712c Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/StoreLogo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/WideLogo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/WideLogo.scale-100.png new file mode 100644 index 0000000000..9dd94b628c Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/WideLogo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Package.appxmanifest b/tests/cpp-empty-test/proj.win10/Package.appxmanifest new file mode 100644 index 0000000000..ebbd470724 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/Package.appxmanifest @@ -0,0 +1,30 @@ + + + + + + cpp-empty-test + Microsoft Open Technologies, Inc. + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj new file mode 100644 index 0000000000..f042b8597e --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj @@ -0,0 +1,350 @@ + + + + {87ed86e7-a850-433f-88d5-d5f65cff7bf5} + cpp_empty_test + en-US + 14.0 + true + Windows Store + 8.2 + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + Application + true + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cpp-empty-test_TemporaryKey.pfx + False + x86 + + + false + + + false + + + false + + + false + + + false + + + false + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + ProgramDatabase + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + ProgramDatabase + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + ProgramDatabase + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + OldStyle + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + EditAndContinue + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + + + + + App.xaml + + + + + Designer + + + + + Designer + + + + + + + + + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + Create + Create + Create + Create + Create + Create + + + + + App.xaml + + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + + + {0c32d479-46d5-46c3-9aa9-0a8ff8320516} + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj.filters b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj.filters new file mode 100644 index 0000000000..61bd275564 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj.filters @@ -0,0 +1,75 @@ + + + + + 3d6eacf1-453c-497e-abc1-ba958539b0a5 + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Assets + + + Assets + + + Assets + + + Assets + + + {482632c3-0bc4-4037-b656-2646b14d761f} + + + + + + + + + Classes + + + Classes + + + + + + + + + + Classes + + + Classes + + + Classes + + + + + + + + + Assets + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.win10/cpp-empty-test_TemporaryKey.pfx b/tests/cpp-empty-test/proj.win10/cpp-empty-test_TemporaryKey.pfx new file mode 100644 index 0000000000..8eec023cfc Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/cpp-empty-test_TemporaryKey.pfx differ diff --git a/tests/cpp-empty-test/proj.win10/resources.props b/tests/cpp-empty-test/proj.win10/resources.props new file mode 100644 index 0000000000..27ed663949 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/resources.props @@ -0,0 +1,19 @@ + + + + + + <_CustomResource Include="..\Resources\**\*"> + Assets\Resources\%(RecursiveDir)%(FileName)%(Extension) + true + + + + + + + + + + + diff --git a/tests/cpp-tests/.cocos-project.json b/tests/cpp-tests/.cocos-project.json index 34e7c97a15..fa24c6e16e 100644 --- a/tests/cpp-tests/.cocos-project.json +++ b/tests/cpp-tests/.cocos-project.json @@ -24,7 +24,8 @@ "target_name": "cpp-tests Mac" }, "android_cfg": { - "project_path": "proj.android" + "project_path": "proj.android", + "studio_proj_path" : "proj.android-studio" }, "wp8_1_cfg" : { "project_path": "../../build", diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp index 21af5b7b5b..148a85afbb 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp @@ -35,7 +35,6 @@ USING_NS_CC; ActionsTests::ActionsTests() { - ADD_TEST_CASE(ActionManual); ADD_TEST_CASE(ActionMove); ADD_TEST_CASE(ActionMove3D); ADD_TEST_CASE(ActionRotate); @@ -62,11 +61,9 @@ ActionsTests::ActionsTests() ADD_TEST_CASE(ActionRepeat); ADD_TEST_CASE(ActionRepeatForever); ADD_TEST_CASE(ActionRotateToRepeat); - ADD_TEST_CASE(ActionRotateJerk); ADD_TEST_CASE(ActionCallFunction); ADD_TEST_CASE(ActionCallFuncN); ADD_TEST_CASE(ActionCallFuncND); - ADD_TEST_CASE(ActionCallFuncO); ADD_TEST_CASE(ActionReverseSequence); ADD_TEST_CASE(ActionReverseSequence2); ADD_TEST_CASE(ActionOrbit); @@ -180,35 +177,6 @@ void ActionsDemo::alignSpritesLeft(unsigned int numberOfSprites) } } -//------------------------------------------------------------------ -// -// ActionManual -// -//------------------------------------------------------------------ -void ActionManual::onEnter() -{ - ActionsDemo::onEnter(); - - auto s = Director::getInstance()->getWinSize(); - - _tamara->setScaleX( 2.5f); - _tamara->setScaleY( -1.0f); - _tamara->setPosition(100,70); - _tamara->setOpacity( 128); - - _grossini->setRotation( 120); - _grossini->setPosition(s.width/2, s.height/2); - _grossini->setColor( Color3B( 255,0,0)); - - _kathia->setPosition(s.width-100, s.height/2); - _kathia->setColor( Color3B::BLUE); -} - -std::string ActionManual::subtitle() const -{ - return "Manual Transformation"; -} - //------------------------------------------------------------------ // // ActionMove @@ -877,40 +845,6 @@ void ActionCallFuncND::doRemoveFromParentAndCleanup(Node* sender, bool cleanup) _grossini->removeFromParentAndCleanup(cleanup); } -//------------------------------------------------------------------ -// -// ActionCallFuncO -// CallFuncO is no longer needed. It can simulated with std::bind() -// -//------------------------------------------------------------------ -void ActionCallFuncO::onEnter() -{ - ActionsDemo::onEnter(); - - centerSprites(1); - - auto action = Sequence::create( - MoveBy::create(2.0f, Vec2(200,0)), - CallFunc::create( CC_CALLBACK_0(ActionCallFuncO::callback, this, _grossini, true)), - nullptr); - _grossini->runAction(action); -} - -std::string ActionCallFuncO::title() const -{ - return "CallFuncO + autoremove"; -} - -std::string ActionCallFuncO::subtitle() const -{ - return "simulates CallFuncO with std::bind()"; -} - -void ActionCallFuncO::callback(Node* node, bool cleanup) -{ - node->removeFromParentAndCleanup(cleanup); -} - //------------------------------------------------------------------ // // ActionCallFunction @@ -1072,35 +1006,6 @@ std::string ActionRotateToRepeat ::subtitle() const return "Repeat/RepeatForever + RotateTo"; } - -//------------------------------------------------------------------ -// -// ActionRotateJerk -// -//------------------------------------------------------------------ -void ActionRotateJerk::onEnter() -{ - ActionsDemo::onEnter(); - - centerSprites(2); - - auto seq = Sequence::create( - RotateTo::create(0.5f, -20), - RotateTo::create(0.5f, 20), - nullptr); - - auto rep1 = Repeat::create(seq, 10); - auto rep2 = RepeatForever::create( seq->clone() ); - - _tamara->runAction(rep1); - _kathia->runAction(rep2); -} - -std::string ActionRotateJerk::subtitle() const -{ - return "RepeatForever / Repeat + Rotate"; -} - //------------------------------------------------------------------ // // ActionReverse diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h index 2bd1e6a6f0..b5acaa5d07 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h @@ -46,15 +46,6 @@ public: virtual std::string title() const override; }; -class ActionManual : public ActionsDemo -{ -public: - CREATE_FUNC(ActionManual); - - virtual void onEnter() override; - virtual std::string subtitle() const override; -}; - class ActionMove : public ActionsDemo { public: @@ -310,15 +301,6 @@ public: virtual std::string subtitle() const override; }; -class ActionRotateJerk : public ActionsDemo -{ -public: - CREATE_FUNC(ActionRotateJerk); - - virtual void onEnter() override; - virtual std::string subtitle() const override; -}; - class ActionCallFuncN : public ActionsDemo { public: @@ -341,17 +323,6 @@ public: void doRemoveFromParentAndCleanup(Node* sender, bool cleanup); }; -class ActionCallFuncO : public ActionsDemo -{ -public: - CREATE_FUNC(ActionCallFuncO); - - virtual void onEnter() override; - virtual std::string title() const override; - virtual std::string subtitle() const override; - void callback(Node* object, bool cleanup); -}; - class ActionCallFunction : public ActionsDemo { public: diff --git a/tests/cpp-tests/Classes/BugsTest/Bug-Child.cpp b/tests/cpp-tests/Classes/BugsTest/Bug-Child.cpp index d8d894b3fd..0d2b6b4928 100644 --- a/tests/cpp-tests/Classes/BugsTest/Bug-Child.cpp +++ b/tests/cpp-tests/Classes/BugsTest/Bug-Child.cpp @@ -58,3 +58,66 @@ void BugChild::switchChild(Ref *sender) CCLOG("Child attached to parent1"); } } + +bool BugCameraMask::init() +{ + if (!BugsTestBase::init()) return false; + + auto size = Director::getInstance()->getWinSize(); + + auto node = Node::create(); + node->setPosition(size.width/4, size.height/3); + _sprite = Sprite::create("Images/grossini.png"); + node->addChild(_sprite); + node->setCameraMask((unsigned short)CameraFlag::USER1); + auto move = MoveBy::create(2, Vec2(200,0)); + + node->runAction(RepeatForever::create(Sequence::createWithTwoActions(move, move->reverse()))); + addChild(node); + + auto camera = Camera::create(); + camera->setCameraFlag(CameraFlag::USER1); + addChild(camera); + + + auto item1 = MenuItemFont::create("Switch Child", CC_CALLBACK_1(BugCameraMask::switchSpriteFlag, this)); + + auto menu = Menu::create(item1, nullptr); + + menu->alignItemsVertically(); + menu->setPosition(size.width/2, 100); + addChild(menu); + + _spriteMaskLabel = Label::create(); + _spriteMaskLabel->setPosition(size.width/2, 120); + addChild(_spriteMaskLabel); + updateSpriteMaskLabel(); + + auto label = Label::create(); + label->setPosition(size.width/2, size.height * 0.9); + label->setString("Sprite should always run action."); + addChild(label); + + return true; +} + +void BugCameraMask::switchSpriteFlag(Ref *sender) +{ + if((unsigned short) CameraFlag::USER1 == _sprite->getCameraMask()) + { + _sprite->setCameraMask((unsigned short)CameraFlag::DEFAULT); + } + else + { + _sprite->setCameraMask((unsigned short)CameraFlag::USER1); + } + + updateSpriteMaskLabel(); +} + +void BugCameraMask::updateSpriteMaskLabel() +{ + std::stringstream stream; + stream<<"The camera Mask is "<<(_sprite->getCameraMask() == 1 ? "CamereFlag::Default" : "CameraFlag::User1")<setString(stream.str()); +} diff --git a/tests/cpp-tests/Classes/BugsTest/Bug-Child.h b/tests/cpp-tests/Classes/BugsTest/Bug-Child.h index 0f1aaf4d23..c74213e80e 100644 --- a/tests/cpp-tests/Classes/BugsTest/Bug-Child.h +++ b/tests/cpp-tests/Classes/BugsTest/Bug-Child.h @@ -30,4 +30,17 @@ protected: cocos2d::Menu* menu; }; +class BugCameraMask : public BugsTestBase +{ +public: + CREATE_FUNC(BugCameraMask); + + virtual bool init() override; + + void switchSpriteFlag(cocos2d::Ref* sender); + void updateSpriteMaskLabel(); + Node* _sprite; + cocos2d::Label* _spriteMaskLabel; +}; + #endif /* defined(__Bug_Child__) */ diff --git a/tests/cpp-tests/Classes/BugsTest/BugsTest.cpp b/tests/cpp-tests/Classes/BugsTest/BugsTest.cpp index 3012dd1094..f2bfecc07a 100644 --- a/tests/cpp-tests/Classes/BugsTest/BugsTest.cpp +++ b/tests/cpp-tests/Classes/BugsTest/BugsTest.cpp @@ -22,4 +22,5 @@ BugsTests::BugsTests() ADD_TEST_CASE(Bug1159Layer); ADD_TEST_CASE(Bug1174Layer); ADD_TEST_CASE(BugChild); + ADD_TEST_CASE(BugCameraMask); } diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp index dd35fe5e95..e6b6e73279 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -1,6 +1,9 @@ #include "ExtensionsTest.h" #include "../testResource.h" +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) +// Window 10 UWP does not yet support CURL #include "AssetsManagerExTest/AssetsManagerExTest.h" +#endif #include "NotificationCenterTest/NotificationCenterTest.h" #include "ControlExtensionTest/CCControlSceneManager.h" #include "CocosBuilderTest/CocosBuilderTest.h" @@ -21,7 +24,10 @@ ExtensionsTests::ExtensionsTests() { +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) + // Window 10 UWP does not yet support CURL addTest("AssetsManagerExTest", [](){ return new (std::nothrow) AssetsManagerExTests; }); +#endif addTest("NotificationCenterTest", [](){ return new (std::nothrow) NotificationCenterTests; }); addTest("CCControlButtonTest", [](){ return new (std::nothrow) ControlTests; }); addTest("CocosBuilderTest", [](){ return new (std::nothrow) CocosBuilderTests; }); diff --git a/tests/cpp-tests/Classes/LayerTest/LayerTest.cpp b/tests/cpp-tests/Classes/LayerTest/LayerTest.cpp index 1c1c2f9bc3..4969db46c1 100644 --- a/tests/cpp-tests/Classes/LayerTest/LayerTest.cpp +++ b/tests/cpp-tests/Classes/LayerTest/LayerTest.cpp @@ -21,7 +21,6 @@ LayerTests::LayerTests() ADD_TEST_CASE(LayerTestBlend); ADD_TEST_CASE(LayerGradientTest); ADD_TEST_CASE(LayerGradientTest2); - ADD_TEST_CASE(LayerGradientTest3); ADD_TEST_CASE(LayerIgnoreAnchorPointPos); ADD_TEST_CASE(LayerIgnoreAnchorPointRot); ADD_TEST_CASE(LayerIgnoreAnchorPointScale); @@ -576,28 +575,6 @@ std::string LayerGradientTest2::subtitle() const return "You should see a gradient"; } - -//------------------------------------------------------------------ -// -// LayerGradientTest3 -// -//------------------------------------------------------------------ -LayerGradientTest3::LayerGradientTest3() -{ - auto layer1 = LayerGradient::create(Color4B(255,0,0,255), Color4B(255,255,0,255)); - addChild(layer1); -} - -std::string LayerGradientTest3::title() const -{ - return "LayerGradientTest 3"; -} - -std::string LayerGradientTest3::subtitle() const -{ - return "You should see a gradient"; -} - // LayerIgnoreAnchorPointPos #define kLayerIgnoreAnchorPoint 1000 diff --git a/tests/cpp-tests/Classes/LayerTest/LayerTest.h b/tests/cpp-tests/Classes/LayerTest/LayerTest.h index c529b74c01..e89912640f 100644 --- a/tests/cpp-tests/Classes/LayerTest/LayerTest.h +++ b/tests/cpp-tests/Classes/LayerTest/LayerTest.h @@ -116,15 +116,6 @@ public: virtual std::string subtitle() const override; }; -class LayerGradientTest3 : public LayerTest -{ -public: - CREATE_FUNC(LayerGradientTest3); - LayerGradientTest3(); - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - class LayerIgnoreAnchorPointPos : public LayerTest { public: diff --git a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp index 9679b9818b..bdac37c43a 100644 --- a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp +++ b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp @@ -111,7 +111,7 @@ void Material_2DEffects::onEnter() { MaterialSystemBaseTest::onEnter(); - auto properties = Properties::createWithoutAutorelease("Materials/2d_effects.material#sample"); + auto properties = Properties::createNonRefCounted("Materials/2d_effects.material#sample"); // Print the properties of every namespace within this one. printProperties(properties, 0); @@ -119,22 +119,22 @@ void Material_2DEffects::onEnter() Material *mat1 = Material::createWithProperties(properties); auto spriteBlur = Sprite::create("Images/grossini.png"); - spriteBlur->setNormalizedPosition(Vec2(0.2, 0.5)); + spriteBlur->setNormalizedPosition(Vec2(0.2f, 0.5f)); this->addChild(spriteBlur); spriteBlur->setGLProgramState(mat1->getTechniqueByName("blur")->getPassByIndex(0)->getGLProgramState()); auto spriteOutline = Sprite::create("Images/grossini.png"); - spriteOutline->setNormalizedPosition(Vec2(0.4, 0.5)); + spriteOutline->setNormalizedPosition(Vec2(0.4f, 0.5f)); this->addChild(spriteOutline); spriteOutline->setGLProgramState(mat1->getTechniqueByName("outline")->getPassByIndex(0)->getGLProgramState()); auto spriteNoise = Sprite::create("Images/grossini.png"); - spriteNoise->setNormalizedPosition(Vec2(0.6, 0.5)); + spriteNoise->setNormalizedPosition(Vec2(0.6f, 0.5f)); this->addChild(spriteNoise); spriteNoise->setGLProgramState(mat1->getTechniqueByName("noise")->getPassByIndex(0)->getGLProgramState()); auto spriteEdgeDetect = Sprite::create("Images/grossini.png"); - spriteEdgeDetect->setNormalizedPosition(Vec2(0.8, 0.5)); + spriteEdgeDetect->setNormalizedPosition(Vec2(0.8f, 0.5f)); this->addChild(spriteEdgeDetect); spriteEdgeDetect->setGLProgramState(mat1->getTechniqueByName("edge_detect")->getPassByIndex(0)->getGLProgramState()); diff --git a/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.cpp b/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.cpp index 3f794bd566..a506c286a5 100644 --- a/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.cpp +++ b/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ #include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "NewAudioEngineTest.h" #include "ui/CocosGUI.h" diff --git a/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h b/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h index 18dd00243c..033c901cc7 100644 --- a/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h +++ b/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h @@ -23,7 +23,7 @@ ****************************************************************************/ #include "platform/CCPlatformConfig.h" -#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #ifndef __NEWAUDIOENGINE_TEST_H_ #define __NEWAUDIOENGINE_TEST_H_ diff --git a/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp b/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp index 93a04b2f07..bdd532f22a 100644 --- a/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp +++ b/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -461,7 +461,7 @@ std::string LabelKeyboardEventTest::title() const std::string LabelKeyboardEventTest::subtitle() const { - return "Please click keyboard\n(Only available on Desktop and Android)"; + return "Please click keyboard\n(Only available on Desktop, Android\nand Windows Universal Apps)"; } // SpriteAccelerationEventTest diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp index a8a5bd624c..dec6214867 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -29,7 +29,6 @@ USING_NS_CC; NewRendererTests::NewRendererTests() { ADD_TEST_CASE(NewSpriteTest); - ADD_TEST_CASE(NewSpriteBatchTest); ADD_TEST_CASE(GroupCommandTest); ADD_TEST_CASE(NewClippingNodeTest); ADD_TEST_CASE(NewDrawNodeTest); @@ -189,76 +188,6 @@ std::string GroupCommandTest::subtitle() const return "GroupCommandTest: You should see a sprite"; } -//-------- New Sprite Batch Test - -NewSpriteBatchTest::NewSpriteBatchTest() -{ - auto touchListener = EventListenerTouchAllAtOnce::create(); - touchListener->onTouchesEnded = CC_CALLBACK_2(NewSpriteBatchTest::onTouchesEnded, this); - _eventDispatcher->addEventListenerWithSceneGraphPriority(touchListener, this); - - auto BatchNode = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 50); - addChild(BatchNode, 0, kTagSpriteBatchNode); -} - -NewSpriteBatchTest::~NewSpriteBatchTest() -{ - -} - -std::string NewSpriteBatchTest::title() const -{ - return "Renderer"; -} - -std::string NewSpriteBatchTest::subtitle() const -{ - return "SpriteBatchTest"; -} - -void NewSpriteBatchTest::onTouchesEnded(const std::vector &touches, Event *event) -{ - for (auto &touch : touches) - { - auto location = touch->getLocation(); - addNewSpriteWithCoords(location); - } -} - -void NewSpriteBatchTest::addNewSpriteWithCoords(Vec2 p) -{ - auto BatchNode = static_cast( getChildByTag(kTagSpriteBatchNode) ); - - int idx = (int) (CCRANDOM_0_1() * 1400 / 100); - int x = (idx%5) * 85; - int y = (idx/5) * 121; - - - auto sprite = Sprite::createWithTexture(BatchNode->getTexture(), Rect(x,y,85,121)); - BatchNode->addChild(sprite); - - sprite->setPosition( Vec2( p.x, p.y) ); - - ActionInterval* action; - float random = CCRANDOM_0_1(); - - if( random < 0.20 ) - action = ScaleBy::create(3, 2); - else if(random < 0.40) - action = RotateBy::create(3, 360); - else if( random < 0.60) - action = Blink::create(1, 3); - else if( random < 0.8 ) - action = TintBy::create(2, 0, -255, -255); - else - action = FadeOut::create(2); - - auto action_back = action->reverse(); - auto seq = Sequence::create(action, action_back, nullptr); - - sprite->runAction( RepeatForever::create(seq)); -} - NewClippingNodeTest::NewClippingNodeTest() { auto s = Director::getInstance()->getWinSize(); diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h index b2e372e26b..6c44044a14 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h @@ -50,22 +50,6 @@ protected: virtual ~GroupCommandTest(); }; -class NewSpriteBatchTest : public MultiSceneTest -{ -public: - - CREATE_FUNC(NewSpriteBatchTest); - virtual std::string title() const override; - virtual std::string subtitle() const override; - - void onTouchesEnded(const std::vector& touches, cocos2d::Event* event); - void addNewSpriteWithCoords(cocos2d::Vec2 p); - -protected: - NewSpriteBatchTest(); - virtual ~NewSpriteBatchTest(); -}; - class NewClippingNodeTest : public MultiSceneTest { public: diff --git a/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp b/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp index c599ff06af..c4441e7099 100644 --- a/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp +++ b/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp @@ -962,7 +962,7 @@ void PhysicsDemoPump::onEnter() bgearB->setCategoryBitmask(0x04); _world->addJoint(PhysicsJointPin::construct(bgearB, body, bgear->getPosition())); - _world->addJoint(PhysicsJointGear::construct(sgearB, bgearB, -M_PI_2, -2.0f)); + _world->addJoint(PhysicsJointGear::construct(sgearB, bgearB, (float)-M_PI_2, -2.0f)); // plugger Vec2 seg[] = {VisibleRect::leftTop() + Vec2(75, -120), VisibleRect::leftBottom() + Vec2(75, -100)}; diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp index 769f706afe..a2063e754a 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp @@ -101,8 +101,8 @@ public: } // normal effect: order == 0 - _quadCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, transform, flags); - renderer->addCommand(&_quadCommand); + _trianglesCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, getRenderedTriangles(), transform, flags); + renderer->addCommand(&_trianglesCommand); // postive effects: oder >= 0 for(auto it = std::begin(_effects)+idx; it != std::end(_effects); ++it) { @@ -227,7 +227,7 @@ public: bool init() { - initGLProgramState("Shaders/example_outline.fsh"); + initGLProgramState("Shaders/example_Outline.fsh"); Vec3 color(1.0f, 0.2f, 0.3f); GLfloat radius = 0.01f; @@ -267,7 +267,7 @@ public: protected: bool init() { - initGLProgramState("Shaders/example_edgeDetection.fsh"); + initGLProgramState("Shaders/example_EdgeDetection.fsh"); return true; } @@ -286,7 +286,7 @@ public: protected: bool init() { - initGLProgramState("Shaders/example_greyScale.fsh"); + initGLProgramState("Shaders/example_GreyScale.fsh"); return true; } }; @@ -299,7 +299,7 @@ public: protected: bool init() { - initGLProgramState("Shaders/example_sepia.fsh"); + initGLProgramState("Shaders/example_Sepia.fsh"); return true; } }; @@ -312,7 +312,7 @@ public: protected: bool init() { - initGLProgramState("Shaders/example_bloom.fsh"); + initGLProgramState("Shaders/example_Bloom.fsh"); return true; } @@ -331,7 +331,7 @@ public: protected: bool init() { - initGLProgramState("Shaders/example_celShading.fsh"); + initGLProgramState("Shaders/example_CelShading.fsh"); return true; } @@ -350,7 +350,7 @@ public: protected: bool init() { - initGLProgramState("Shaders/example_lensFlare.fsh"); + initGLProgramState("Shaders/example_LensFlare.fsh"); return true; } diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index ee81868699..0ba23eedba 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -2074,7 +2074,7 @@ void QuaternionTest::addNewSpriteWithCoords(Vec2 p) void QuaternionTest::update(float delta) { _accAngle += delta * _arcSpeed; - const float pi = M_PI; + const float pi = (float)M_PI; if (_accAngle >= 2 * pi) _accAngle -= 2 * pi; diff --git a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp index 5ebe990dee..0a225e5dd1 100644 --- a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp +++ b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp @@ -16,9 +16,9 @@ TerrainSimple::TerrainSimple() Size visibleSize = Director::getInstance()->getVisibleSize(); //use custom camera - _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1,800); + _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1f,800); _camera->setCameraFlag(CameraFlag::USER1); - _camera->setPosition3D(Vec3(-1,1.6,4)); + _camera->setPosition3D(Vec3(-1,1.6f,4)); addChild(_camera); Terrain::DetailMap r("TerrainTest/dirt.jpg"),g("TerrainTest/Grass2.jpg"),b("TerrainTest/road.jpg"),a("TerrainTest/GreenSkin.jpg"); @@ -26,7 +26,7 @@ TerrainSimple::TerrainSimple() Terrain::TerrainData data("TerrainTest/heightmap16.jpg","TerrainTest/alphamap.png",r,g,b,a); _terrain = Terrain::create(data,Terrain::CrackFixedType::SKIRT); - _terrain->setLODDistance(3.2,6.4,9.6); + _terrain->setLODDistance(3.2f,6.4f,9.6f); _terrain->setMaxDetailMapAmount(4); addChild(_terrain); _terrain->setCameraMask(2); @@ -95,7 +95,7 @@ TerrainWalkThru::TerrainWalkThru() Size visibleSize = Director::getInstance()->getVisibleSize(); //use custom camera - _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1,200); + _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1f,200); _camera->setCameraFlag(CameraFlag::USER1); addChild(_camera); @@ -111,7 +111,7 @@ TerrainWalkThru::TerrainWalkThru() _terrain->setLODDistance(64,128,192); _player = Player::create("Sprite3DTest/girl.c3b",_camera,_terrain); _player->setCameraMask(2); - _player->setScale(0.08); + _player->setScale(0.08f); _player->setPositionY(_terrain->getHeight(_player->getPositionX(),_player->getPositionZ())+PLAYER_HEIGHT); // add Particle3D for test blend @@ -246,12 +246,16 @@ void Player::update(float dt) default: break; } + // transform player position to world coord + auto playerPos = player->getPosition3D(); + auto playerModelMat = player->getParent()->getNodeToWorldTransform(); + playerModelMat.transformPoint(&playerPos); Vec3 Normal; - float player_h = _terrain->getHeight(player->getPositionX(),player->getPositionZ(),&Normal); + float player_h = _terrain->getHeight(playerPos.x, playerPos.z,&Normal); player->setPositionY(player_h+PLAYER_HEIGHT); Quaternion q2; - q2.createFromAxisAngle(Vec3(0,1,0),-M_PI,&q2); + q2.createFromAxisAngle(Vec3(0,1,0),(float)-M_PI,&q2); Quaternion headingQ; headingQ.createFromAxisAngle(_headingAxis,_headingAngle,&headingQ); diff --git a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp index 3000f80348..642ce3dbe7 100644 --- a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp +++ b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp @@ -37,8 +37,6 @@ enum { Texture2DTests::Texture2DTests() { - ADD_TEST_CASE(TexturePVRv3Premult); - ADD_TEST_CASE(TextureMipMap); ADD_TEST_CASE(TextureMemoryAlloc); ADD_TEST_CASE(TextureAlias); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp index 20300f6fd4..3db6191344 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp @@ -430,6 +430,13 @@ bool UIButtonTest_Title::init() text->setOpacity(50); text->setName("text"); + auto button2 = Button::create("cocosui/backtotopnormal.png", "cocosui/backtotoppressed.png"); + button2->setTitleFontName("fonts/helvetica-32.fnt"); + button2->setTitleText("BMFont"); + //the change of font size will take no effect. + button2->setTitleFontSize(30); + button2->setPosition(Vec2(button->getPosition() + Vec2(50,-80))); + this->addChild(button2); _uiLayer->addChild(text); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp index 84c99a8558..ba91c867db 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp @@ -523,7 +523,7 @@ void UILayoutComponentTest_Editor::onResizeContainer(Ref* sender) switchButton->setEnabled(true); switchButton->setBright(true); } - }, 0.025, 39, 0, "1"); + }, 0.025f, 39, 0, "1"); } else { @@ -539,6 +539,6 @@ void UILayoutComponentTest_Editor::onResizeContainer(Ref* sender) switchButton->setEnabled(true); switchButton->setBright(true); } - }, 0.025, 39, 0, "2"); + }, 0.025f, 39, 0, "2"); } } diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp index 76a6d7fad1..0218af0b1f 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp @@ -52,6 +52,7 @@ UIScale9SpriteTests::UIScale9SpriteTests() ADD_TEST_CASE(UIS9ZOrder); ADD_TEST_CASE(UIS9Flip); ADD_TEST_CASE(UIS9ChangeAnchorPoint); + ADD_TEST_CASE(UIS9NinePatchTest); } // UIScale9SpriteTest @@ -847,7 +848,54 @@ bool UIS9ChangeAnchorPoint::init() }); this->addChild(button2); - + + return true; + } + return false; +} + +bool UIS9NinePatchTest::init() +{ + if (UIScene::init()) { + SpriteFrameCache::getInstance()->addSpriteFramesWithFile("cocosui/android9patch.plist"); + + auto winSize = Director::getInstance()->getWinSize(); + float x = winSize.width / 2; + float y = 0 + (winSize.height / 2 + 50); + + auto preferedSize = Size(99,99); + + //9-patch sprite with filename + auto playerSprite = ui::Scale9Sprite::create("cocosui/player.9.png"); + playerSprite->setPosition(x, y); + playerSprite->setContentSize(preferedSize); + auto capInsets = playerSprite->getCapInsets(); + CCLOG("player sprite capInset = %f, %f %f, %f", capInsets.origin.x, + capInsets.origin.y, capInsets.size.width, capInsets.size.height); + this->addChild(playerSprite); + + auto animationBtnSprite = ui::Scale9Sprite::createWithSpriteFrameName("animationbuttonpressed.png"); + animationBtnSprite->setPosition(x-100, y-100); + capInsets = animationBtnSprite->getCapInsets(); + CCLOG("animationBtnSprite capInset = %f, %f %f, %f", capInsets.origin.x, + capInsets.origin.y, capInsets.size.width, capInsets.size.height); + this->addChild(animationBtnSprite); + + + auto monsterSprite = ui::Scale9Sprite::createWithSpriteFrameName("monster.9.png"); + monsterSprite->setPosition(x+100, y-100); + capInsets = monsterSprite->getCapInsets(); + monsterSprite->setContentSize(preferedSize); + CCLOG("monsterSprite capInset = %f, %f %f, %f", capInsets.origin.x, + capInsets.origin.y, capInsets.size.width, capInsets.size.height); + this->addChild(monsterSprite); + + auto spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName("buttonnormal.9.png"); + auto buttonScale9Sprite = Scale9Sprite::createWithSpriteFrame(spriteFrame); + buttonScale9Sprite->setContentSize(Size(150,80)); + buttonScale9Sprite->setPosition(Vec2(100,200)); + this->addChild(buttonScale9Sprite); + return true; } return false; diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.h index 3edba14cb4..4138593e26 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.h @@ -250,4 +250,12 @@ public: virtual bool init() override; }; +class UIS9NinePatchTest : public UIScene +{ +public: + CREATE_FUNC(UIS9NinePatchTest); + + virtual bool init() override; +}; + #endif /* defined(__cocos2d_tests__UIScale9SpriteTest__) */ diff --git a/tests/cpp-tests/Classes/UserDefaultTest/UserDefaultTest.cpp b/tests/cpp-tests/Classes/UserDefaultTest/UserDefaultTest.cpp index 12f28a324b..8891f5085a 100644 --- a/tests/cpp-tests/Classes/UserDefaultTest/UserDefaultTest.cpp +++ b/tests/cpp-tests/Classes/UserDefaultTest/UserDefaultTest.cpp @@ -1,12 +1,18 @@ #include "UserDefaultTest.h" #include "stdio.h" #include "stdlib.h" +#include +#include +#include + +using namespace std; USING_NS_CC; // enable log #define COCOS2D_DEBUG 1 + UserDefaultTests::UserDefaultTests() { ADD_TEST_CASE(UserDefaultTest); @@ -22,6 +28,51 @@ UserDefaultTest::UserDefaultTest() doTest(); } +template +void logData(const char* key) +{ + Data data = UserDefault::getInstance()->getDataForKey(key); + T* buffer = (T*) data.getBytes(); + ssize_t length = data.getSize() / sizeof(T); + + std::ostringstream ss; + ss << setprecision(2) << std::fixed; + for (int i = 0; i < length; i++) + { + ss << buffer[i] << " "; + } + + CCLOG("%s is %s", key, ss.str().c_str()); +} + +template +void setData(const char* key) +{ + Data data; + vector v; + + for (int i = 0; i <= 5; i++) + { + v.push_back(static_cast(i)); + } + data.copy((unsigned char*) v.data(), v.size() * sizeof(T)); + UserDefault::getInstance()->setDataForKey(key, data); +} + +template +void setData2(const char* key) +{ + Data data; + vector v; + + for (int i = 5; i >= 0; i--) + { + v.push_back(static_cast(i)); + } + data.copy((unsigned char*) v.data(), v.size() * sizeof(T)); + UserDefault::getInstance()->setDataForKey(key, data); +} + void UserDefaultTest::doTest() { CCLOG("********************** init value ***********************"); @@ -34,6 +85,11 @@ void UserDefaultTest::doTest() UserDefault::getInstance()->setDoubleForKey("double", 2.4); UserDefault::getInstance()->setBoolForKey("bool", true); + // test saving of Data buffers + setData("int_data"); + setData("float_data"); + setData("double_data"); + // print value std::string ret = UserDefault::getInstance()->getStringForKey("string"); @@ -57,7 +113,11 @@ void UserDefaultTest::doTest() { CCLOG("bool is false"); } - + + logData("int_data"); + logData("float_data"); + logData("double_data"); + //CCUserDefault::getInstance()->flush(); CCLOG("********************** after change value ***********************"); @@ -70,6 +130,10 @@ void UserDefaultTest::doTest() UserDefault::getInstance()->setDoubleForKey("double", 2.6); UserDefault::getInstance()->setBoolForKey("bool", false); + setData2("int_data"); + setData2("float_data"); + setData2("double_data"); + UserDefault::getInstance()->flush(); // print value @@ -95,6 +159,10 @@ void UserDefaultTest::doTest() { CCLOG("bool is false"); } + + logData("int_data"); + logData("float_data"); + logData("double_data"); } diff --git a/tests/cpp-tests/Classes/controller.cpp b/tests/cpp-tests/Classes/controller.cpp index 7a41b9fdb8..7502565af4 100644 --- a/tests/cpp-tests/Classes/controller.cpp +++ b/tests/cpp-tests/Classes/controller.cpp @@ -17,14 +17,13 @@ public: RootTests() { addTest("Node: Scene3D", [](){return new (std::nothrow) Scene3DTests(); }); - addTest("SpritePolygon", [](){return new (std::nothrow) SpritePolygonTest(); }); addTest("ActionManager", [](){return new (std::nothrow) ActionManagerTests(); }); addTest("Actions - Basic", [](){ return new (std::nothrow) ActionsTests(); }); addTest("Actions - Ease", [](){return new (std::nothrow) ActionsEaseTests(); }); addTest("Actions - Progress", [](){return new (std::nothrow) ActionsProgressTests(); }); addTest("Allocator - Basic", [](){return new (std::nothrow) AllocatorTests(); }); addTest("Audio - CocosDenshion", []() { return new (std::nothrow) CocosDenshionTests(); }); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) addTest("Audio - NewAudioEngine", []() { return new (std::nothrow) AudioEngineTests(); }); #endif #if CC_ENABLE_BOX2D_INTEGRATION @@ -36,7 +35,10 @@ public: addTest("Click and Move", [](){return new ClickAndMoveTest(); }); addTest("Configuration", []() { return new ConfigurationTests(); }); addTest("Console", []() { return new ConsoleTests(); }); +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) + // Window 10 UWP does not yet support CURL addTest("Curl", []() { return new CurlTests(); }); +#endif addTest("Current Language", []() { return new CurrentLanguageTests(); }); addTest("CocosStudio3D Test", []() { return new CocosStudio3DTests(); }); addTest("EventDispatcher", []() { return new EventDispatcherTests(); }); diff --git a/tests/cpp-tests/Classes/tests.h b/tests/cpp-tests/Classes/tests.h index b4fba11740..5a23eee399 100644 --- a/tests/cpp-tests/Classes/tests.h +++ b/tests/cpp-tests/Classes/tests.h @@ -41,7 +41,7 @@ #include "PerformanceTest/PerformanceTest.h" #include "ZwoptexTest/ZwoptexTest.h" #include "CocosDenshionTest/CocosDenshionTest.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #include "NewAudioEngineTest/NewAudioEngineTest.h" #endif #if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPEN) diff --git a/tests/cpp-tests/Resources/Images/BoilingFoam.plist b/tests/cpp-tests/Resources/Images/BoilingFoam.plist new file mode 100644 index 0000000000..2bf4b5cc16 --- /dev/null +++ b/tests/cpp-tests/Resources/Images/BoilingFoam.plist @@ -0,0 +1,96 @@ + + + + + angle + 90.099998474121094 + angleVariance + 32.049999237060547 + blendAdditive + 1 + blendFuncDestination + 1 + blendFuncSource + 770 + duration + -1 + emitterType + 0.0 + finishColorAlpha + 1 + finishColorBlue + 1 + finishColorGreen + 0.70999997854232788 + finishColorRed + 0.5899999737739563 + finishColorVarianceAlpha + 1 + finishColorVarianceBlue + 0.20999999344348907 + finishColorVarianceGreen + 0.0 + finishColorVarianceRed + 0.0 + finishParticleSize + 40.770000457763672 + finishParticleSizeVariance + 0.0 + gravityx + 0.0 + gravityy + 0.0 + maxParticles + 269 + maxRadius + 0.0 + maxRadiusVariance + 0.0 + minRadius + 0.0 + particleLifespan + 0.99000000953674316 + particleLifespanVariance + 0.12999999523162842 + rotatePerSecond + 0.0 + rotatePerSecondVariance + 0.0 + sourcePositionVariancex + 16.5 + sourcePositionVariancey + 34.799999237060547 + sourcePositionx + 162.83000183105469 + sourcePositiony + 194.32000732421875 + speed + 71 + speedVariance + 30 + startColorAlpha + 0.0 + startColorBlue + 0.0 + startColorGreen + 1 + startColorRed + 1 + startColorVarianceAlpha + 0.0 + startColorVarianceBlue + 0.34000000357627869 + startColorVarianceGreen + 0.0 + startColorVarianceRed + 0.0 + startParticleSize + 64 + startParticleSizeVariance + 5 + textureFileName + fire.png + textureImageData + H4sIAAAAAAAAA+1bB1RURxd+byu9g1RZpINUpVtoKoiKIqJYorisdESqLRINkihGjSHEFo0EC/ZoRCRWLMRoFHuPEIMlNizY4/5z3fvic7MrmJic84vr+Tjj7My997tt5i1L796UE0UFqlD/wUsqldJvgv/CJrTr35KrjBunGfyn/nib/FvIldsMmvXJWzOYejv8X8OZzYsnB74c5N9X5pO36od/wl8Jb3m+DD8BQtgMmHXyfpH3xVvxw9/h3wLe8nxVCFQRaiyoI9hzzDoVBf546354U/4t5M3mzPDUINAk0CLQVgItXKPB8ou8L17rh3+TvxLu8rwZzgxf4KVDoEugR6BPYEBgKAcDfE8P1+rgXsYfjC8U+eFv+6Al/BXkOzvminhrof16yMuIwJjAhMCUwIzAnMACYY5zprjGGPcYoAwdlKnID/K58Eb10Bz/FsRcRY63LsaR4WyGHC0JrAisCWwIbOVgg+9Z4VoL3Mv4Qh9ls/2g8k9zoYX8FXFnYq6OOarD4m2CMbVETsDPgcCJoD2BK4EbgTvCDefa4xoH3GONMsxRJuMHHdSpzsoFhT74J/ylf815ee4QB23MUUMWbxHG0wE5AT9PAi8CXwJ/ggA5+ON7XrjWDfc6oCwRyw+GqFMbbVDmg2ZzQBn/Zrgz+a7NirkZxgpsdSRwQR7eyK0LQRBBKEF3gjCCcEQYzoXimi64xxtluKBMG9RhxsoFxgdqf8cHivi3kDuT78YYF6hbe4wZ2OxD0JkgmKAHQQRBJEEUQTRBDMFARAzOReGaCNwTjDJ8UGZ71GGFOo2lL+vhb/ngNfzZNS+f82zu0KesMT5uGLNOBCEY20jkFkswjCCOQEwgIRiFkOBcHK6JxT2RKCMEZXqjDkfUaaHAB+xaaLYXyPNXEnuB9NV6Z7i3lcpyEnqWh1RWv4EYuz4EAwiGEowkSCBIJcggyCLIIchF5OBcBq5JwD1DUUYflBmIOjxQpw3awPiA3Q/YZ6PSHFDCX547nDPqctwtUL+zVJabUK+Qr5C7/QmGYEyTCcYgzwkE+QQfE0wlKERMxbl8XJOLe5JRxhCUGYE6/FGnM9rAzgNttJU5G1/xwev4K4g9u+bhvIGeC30Has8aYwB2QP+G3tVbKqvl4QSJGM+xyAs4FhHMIphDUExQgijGuVm4ZiruGYsyElFmDOoIRZ2eaIM12mSENmpKX+0FSnNAAX9leQ/1BecO9F7oP1CDHhgLsAdydJBUlrcpUllOT8L4zkSO8wkWEZQSlBEsRZTh3CJcU4x7ClFGDsociTr6oE5/tMERbTJDG9m94LU5wPBvJvZw54LcgrPXUirrwdCHoBaDMSZgF+RqOsZtCsYSuCxEfisIVhOsJ9hAsBGxAedW45pS3FOMMqagzHTUMQh1BqMNbmiTJdqojzY3mwNy/JXFHu6dTN5DvcE5BL0Y+hHUZAzGBuwbR1CA8ZtLsISgHPltIqgi2Eawg2AnYgfOVeGa9bhnCcqYiTLHoY6RqDMCbfBGm2ykL+tAtyU5oIS/stjDHQxyDeoOziPoydCXhktl+TkW7ZwtleUx5PUa5LSVYBfBPoL9BAcIDiIO4Nw+XLMV96xBGfNRZgHqSEGd/dGGTmiTI9rYbA6w+UtfzX12z2fqnh17uIvBfQTOZKhD6M3Qn6BGp2CswF6o63UElRjjGuRaS3CM4CTBKcRJnKvFNTW4pxJlLEWZM1FHDuocgjaEoE0ucjnA9AH2WfBKDbD4K8p9pufD2WIpld3Fwc9wJ4N7CZzNUI/Qo6FPQa3OxZiB3VsIqgl+Qm4nCM4QnCe4SFCHuIhzZ3BNLe6pRhnrUOZc1DEJdYrRhnC0yRNttESbmbNAaQ0o4M/OfThL4Rkc+iqcMUzdQ9+BuxncT+CMhpyEXg39Cmp2DcYO7IfcPkpwmuACQT3BbwSXCa4gLuNcPa45jXsOoIxKlLkEdRSizmS0IRJtYvqANdpsgByU1oAS/sx9h8l9uF/A8yj0WThzoObgfgp9CO4p+VJZbkLPhr4FtbsTYwg8zmKMgeNVgt8JbhDcRNzAuau45iLuOYoydqLMctQxE3WOQRui0SZ/tNEWbWZqgLkPNcdfUd+Xz314NoO+C3d0uKfCXW0qxgXOLejd0L+ghmsxlsCnATkC39sEdwjuIu7g3E1c04B7TqOMGpS5HnUUo85ctCEWbeoi/WsNKDoH2J8TKePP1D70UrhbwD0Lns3h+RTyDZ5T4K4O91WoSehPKzBO0MOhj0EtX8CYAq9byPUeQZMc7uF7t3Dtb7j3BMrahbJXoK4i1J2KtkSibV5oqxXarqgHyPNn9z75cw8+k2NqH+4acO+C51R4VoMelC+V3Vvh7gb3FzjD92HcoJ9BTV/F2AK/+wQPCB4SPEI8xLn7uOYm7qlHGbUoswp1LEKd+WhDHNoUijYyPcBU+tdzUP6ZSBl/du+DMwU+n4L6gs8poN6g98IzGzy3wN2dyX24x8BZDufZeenL2N/GGD9Azo8JniAe49wDXHNb+jIHzqOs/SibqYE5qDsLbYlG2/zRVhup4h74Ov7yvR/u0nCWMr0Pnjngsxq4e8EzO5zDTO3D+QT32B1SWd+GM/2iVNbbb2BcmzDWDPenCMYHD3HNHdxzGWWcRJk7UEeZ9GUPyEFbYtC2AOnLHmiOHJSeAUr4M8+6sJfp/e4oG85a+MwGPreA/gNnETzDwR0F7vLQq6Fe4V4DZzucb5DPd5HbIznubB88wjV3cc8VlHEKZe5EHUtRZyHaMAptCkcb3aUvzwCGv/p7/i3m31rzv7X3v9Z6/rX2+8/7++/755/3z7+t+/OPVvv5V2v//PP959/vf//R2n//9f73n6/NgVbx+28lOdCqvv8glwPydfDOf//lNTnQar7/9AY+eCe//9ZCH7zT33+U8wG7F8j74J39/quCHJD3wTv//Wc5H7BrgX02vrPff1fiB2W58E7+/UMLfKDID+/c378o8EFzfnjn/v7pDf3A+ELeH//Xf//WQj+wfcH2h7xf5HnK8+XKyXwrvFm2vw0xjCz6Nb5Q5BNFULSHftu8WTa/TXFsufK+eJ1PlHL9NzjL2flviZbXo8wf/ylfBXZRlBZRxyX/oalA8oNmjTkvxjyKCqyguThPFtMCHHPID114H2YpFVqPtcYQx+Rd2oglsw2zPpCizVnro1gy+/+pd/snWZSQojTCyHjfC5NV8B+N/8h7vZLSR3N0KCotPTszqkewaFDsYJHwEJGkSgkoD4qKE2dl9O7fPRq2h3cLEWWRRYwHZK5+cFI2OOYS1lckekMn6oozMrOJpL5k3CFekiUm4wIyTs3LzoD5RjI2GJkCYw5wN8gkBpKxMYwTZOP2L9bIxoEwjk9LjydjsDkjPi0exnvI+NPcHAkZc3uRcWFukiSPjI+TsU1qTloSGT+CvWmSuCziPg2Yz5aIE8nYnYw1MqOjQsi4E3GiRgJrPJI1zpaMzQZSIaMzxmUmJSRmixzEjiIPPz9fUZgkL1WSne3SN06cEpcZLwoZnZYRlz6OomScX7z0wLci4mRvDz9vbxdPVw+Wo177ZgtfEFvZ6F6/FzGjjQ6+nFO0bnQpRfk2Ed/Mfjk3ch5FbZ5KUcZnX87ZfENR2iRuFYdZfIwgXxKzszP83dzy8vJckyRiV3Don69mF7TgxdLnCuL+dI8oVDIqLic1WwR+E49OHZ2TKcrKiBNLRC6vJPE/2ajYjvZRklGSTEk62RFDsiwpPYGEOz0+KTtpdLooKV1ZEP/mNrmXLK/JS7/sOWUw3JXSOWxAcW8epHj66hR36CLyDv1n3HqpxlBQeQMtr8jy/sVLQQflzIIfWUkJL/aFREWLxDmZubL3oCwpPqVGaVMGlAnVlrKmHCgXypPyoQJIo+pG9aQiqWgqlvqAElOJVBqVSeVRE6nJVCFVRM2mvqTmU4upMqqcWkttoDZTW6ld1D7qAFVLnaDOUXVUA3WdaqQeUE9pmhbSmrQ+bUJb0ra0M+1J+9Jd6G50LzqKjqVH0Al0Op1DT6Q/povoOfR8egldTn9Hb6F30fvpI/QZup6+Rt+ln3C4HA2OAceCY8dx4/hygjgRnGjOME4CZwxnPKeAM5Mzl1PKWc2p4OziHOCc4NRxrnOaSANX5xpxrbguXF9uCDeSO5g7ipvJncSdzi3hlnLXcqu4Ndxj3DruDe5jnoCnzxPxXHgBvDDeAJ6YN4Y3iTeDN5+3glfB28M7xqvnNfKe8zX55nxnvj8/nD+In8DP4xfyS/jL+Jv4e/kn+A38BwKBwEhgL/ARhAliBcmCCYIZgq8F6wQ7BUcElwRNQqHQROgs7CyMFMYJs4WFwnnC1cIdwqPCBuEjFXUVSxVPle4qg1XSVaaolKisVNmuclTlispTVR1VW1V/1UjVeNVxqrNUy1SrVA+rNqg+VdNVs1frrBatlqw2WW2u2lq1vWrn1e6pq6u3U/dT76eepP6R+lz19eo/qterP9bQ03DSCNEYqpGjMVNjucZOjTMa9zQ1Ne00AzUHa2ZrztQs19yt+YvmIy19LVetcK14rXytBVoVWke1bmmrattqB2l/oD1eu0R7o/Zh7Rs6qjp2OiE6cTqTdBbobNE5pdOkq6/roRupm6Y7Q3el7n7dq3pCPTu9bnrxegV63+rt1rukz9W31g/RF+t/rF+mv1e/wUBgYG8QbpBsUGSwxuCQQaOhnmFHwxjDsYYLDLcZ1hlxjeyMwo1SjWYZbTA6afSkjUWboDaSNtParG1ztM1DYzPjQGOJ8XTjdcYnjJ+YiEy6maSYfG6y2eSCKc/UybSfaZ7pItO9pjfMDMwCzMRm0802mJ0155g7mUeZTzD/1vygeZNFW4seFhkW8yx2W9xoa9Q2sG1y2+K229tes9S37GKZZFlsucPyd5GhKEiUKpor2iNqtDK3CrPKsVpidcjqaTv7dgPaTWm3rt0FazVrX+tR1sXW1daNNpY2vW0m2qyyOWurautrm2j7lW2N7UM7e7uBdp/Ybba7am9sH24/3n6V/XkHTYeuDmMcSh2OOwocfR1THL92rHXiOHk5JTotcDrszHH2dk5y/tr5SHt+e7/26e1L259y0XAJcsl1WeVS72rk2st1iutm11tuNm6D3T53q3F77u7lnupe5n7OQ8+jp8cUjyqPu55OnmLPBZ7HO2h26N4hv0NlhzsdnTtKOi7qeNpL36u31yde1V5/ePt4Z3qv9b7mY+MzwmehzylfA9++vjN8f/Tj+wX75ftt9Xvs7+2f7b/B/3aAS0BKwMqAq53sO0k6lXW61Lld57jOSzrXdRF1GdHlmy51Xa26xnUt7fproHVgfOCywCtBjkHJQauDbgW7B2cGbwp+GOIf8mHIzlBuaI/Q6aGHuul1G9BtfrdfurfrntB9VffGHl49JvTYGcYPiwj7POxUuEW4OLw8vLGnT88Pe+6J0IjoHzE/4tdeTr0ye1X15vTu2fuL3uf72PZJ77M5kooMj/wi8kJf+75j+v7QT9Cvb78F/S5HeURNjKrpr99/eP+V/R9EB0fPij43wGFAzoDqGO2YoTHlMQ8Hhg6cM7BukNugDwcdiDWNTYqtHCwcHDN42eCmId2GfDmkYajX0MKhJ4fZDxs7bP8Hph+kfrBtuPbwuOEbR/BHDByxcsSzuMi40rimkeEjF45sFIeIvxJfjw+ML46/JuksmSO5MqrzqDmjriZ0Tvgi4Vpi18SSxBtJIUnzk+4khyUvTn6YEpmyPEWaOjB1XZpK2oi0Lel66Snpe0a3HT129JEM54zCjLox/mO+HNOYGZG5LIvOGpZVmW1ALlMHcxxypubU53bJXZD7KC8mb+NY3bHpYw+Ocxo3bdyV8d3HL53AmyCeUD3RauLkifUfBn24ZBI9aeSk6nzr/IL8ho96fLRistrklMk/T3GfMmfK/Y8HflxVYFHwUcGlqT2mrirUKswsPPVJwCeLP+V9mvTpoWkdps2b9nx6/PSfityLSoqezRDP+Okzj8/mfiadOWrmoVnesxbNFsxOn33y866fr5ijO2f8nEtf9P6iolhUPL34/pfDv9xf0rFk8VdqX+V8VTe319zKeTbzZs97Nj9x/okFwQvWLTRfOG3hw6/jvz66KHDR2sUWi4sWP/km6ZvTS3osqSi1Ky35VvBt7reXy2LKapb6Li1fZrqsaNkfy9OX162IWrGn3Ke8fKX5ylmrOKtyVl1bPXR17ZrQNZVrXdYuWWe0rmg9tT5n/e/fjfju5IaIDdUbfTeu/d72+4Wb9DdNr6ArxlU0bk7cXFcZW3lkS88t1VUBVZt+cP1h+VarrQu2GW6btV1te8F26Y7xO5p2Zuy8sSth16Xq4dXndg/afXxPvz2H9kbs/XFf9327a4JqdvzY+cet+/33b/nJ96fNB7wPVBz0OrjpZ6+fNx3yPlRx2OdwZa1fbdWRTke2H+16dNex0GP7jocfP3Ciz4kjJwecPH1q6Km60/Gnr55JPXPnbO7Zp+c+Os8/P/2CzoWSX8x/Kb3oeHFdnXfdtvrQ+oO/9v/13CXxpeu/Zf32rKHgsublkiuWV8qvel7deq37tdrfh/zecD3j+tMbhTd1by685XDr+9uBtw82DmpsuJN5R3p3xj2Te8vvd7xf3dS36ZcHaQ+ePpz+yOTRise+j2ueDHxy5WneM+GzuX84/lH1POL5eWmaVPo/LX7Mrg5NAAA= + + diff --git a/tests/cpp-tests/Resources/Images/arrows-hd.png b/tests/cpp-tests/Resources/Images/arrows-hd.png new file mode 100644 index 0000000000..1a24e6fdec Binary files /dev/null and b/tests/cpp-tests/Resources/Images/arrows-hd.png differ diff --git a/tests/cpp-tests/Resources/Images/arrowsBar-hd.png b/tests/cpp-tests/Resources/Images/arrowsBar-hd.png new file mode 100644 index 0000000000..694b4d9768 Binary files /dev/null and b/tests/cpp-tests/Resources/Images/arrowsBar-hd.png differ diff --git a/tests/cpp-tests/Resources/Images/cocos-html5.png b/tests/cpp-tests/Resources/Images/cocos-html5.png new file mode 100644 index 0000000000..ab7c7118e3 Binary files /dev/null and b/tests/cpp-tests/Resources/Images/cocos-html5.png differ diff --git a/tests/cpp-tests/Resources/Images/dot.png b/tests/cpp-tests/Resources/Images/dot.png new file mode 100644 index 0000000000..eb89425ece Binary files /dev/null and b/tests/cpp-tests/Resources/Images/dot.png differ diff --git a/tests/cpp-tests/Resources/Images/fps_images.png b/tests/cpp-tests/Resources/Images/fps_images.png new file mode 100644 index 0000000000..e91d0af540 Binary files /dev/null and b/tests/cpp-tests/Resources/Images/fps_images.png differ diff --git a/tests/cpp-tests/Resources/Images/lookup-desktop.plist b/tests/cpp-tests/Resources/Images/lookup-desktop.plist new file mode 100644 index 0000000000..f1d87ad789 --- /dev/null +++ b/tests/cpp-tests/Resources/Images/lookup-desktop.plist @@ -0,0 +1,16 @@ + + + + + metadata + + version + 1 + + filenames + + grossini.bmp + Images/grossini_pvr_rgba8888.pvr + + + diff --git a/tests/cpp-tests/Resources/Images/lookup-html5.plist b/tests/cpp-tests/Resources/Images/lookup-html5.plist new file mode 100644 index 0000000000..5299380bc0 --- /dev/null +++ b/tests/cpp-tests/Resources/Images/lookup-html5.plist @@ -0,0 +1,16 @@ + + + + + metadata + + version + 1 + + filenames + + grossini.bmp + Images/grossini.png + + + diff --git a/tests/cpp-tests/Resources/Images/lookup-mobile.plist b/tests/cpp-tests/Resources/Images/lookup-mobile.plist new file mode 100644 index 0000000000..f728bddfbe --- /dev/null +++ b/tests/cpp-tests/Resources/Images/lookup-mobile.plist @@ -0,0 +1,16 @@ + + + + + metadata + + version + 1 + + filenames + + grossini.bmp + Images/grossini_pvr_rgba4444.pvr + + + diff --git a/tests/cpp-tests/Resources/Images/movement.png b/tests/cpp-tests/Resources/Images/movement.png new file mode 100644 index 0000000000..5dd324c37c Binary files /dev/null and b/tests/cpp-tests/Resources/Images/movement.png differ diff --git a/tests/cpp-tests/Resources/Images/particles-hd.png b/tests/cpp-tests/Resources/Images/particles-hd.png new file mode 100644 index 0000000000..664a48e6d3 Binary files /dev/null and b/tests/cpp-tests/Resources/Images/particles-hd.png differ diff --git a/tests/cpp-tests/Resources/Images/shapemode.png b/tests/cpp-tests/Resources/Images/shapemode.png new file mode 100644 index 0000000000..ebba704154 Binary files /dev/null and b/tests/cpp-tests/Resources/Images/shapemode.png differ diff --git a/tests/cpp-tests/Resources/Images/texturemode.png b/tests/cpp-tests/Resources/Images/texturemode.png new file mode 100644 index 0000000000..0202080e9f Binary files /dev/null and b/tests/cpp-tests/Resources/Images/texturemode.png differ diff --git a/tests/cpp-tests/Resources/Images/wood.jpg b/tests/cpp-tests/Resources/Images/wood.jpg new file mode 100644 index 0000000000..c2f6fef756 Binary files /dev/null and b/tests/cpp-tests/Resources/Images/wood.jpg differ diff --git a/tests/cpp-tests/Resources/Materials/2d_effects.material b/tests/cpp-tests/Resources/Materials/2d_effects.material index 234be0af61..a98917fe58 100644 --- a/tests/cpp-tests/Resources/Materials/2d_effects.material +++ b/tests/cpp-tests/Resources/Materials/2d_effects.material @@ -7,7 +7,7 @@ material sample shader { defines = THIS_IS_AN_EXAMPLE 1;TOMORROW_IS_HOLIDAY 2 - vertexShader = Shaders/example_simple.vsh + vertexShader = Shaders/example_Simple.vsh fragmentShader = Shaders/example_Blur.fsh // Uniforms blurRadius = 3 @@ -22,8 +22,8 @@ material sample { shader { - vertexShader = Shaders/example_simple.vsh - fragmentShader = Shaders/example_outline.fsh + vertexShader = Shaders/example_Simple.vsh + fragmentShader = Shaders/example_Outline.fsh u_outlineColor = 0.1, 0.2, 0.3 u_radius = 0.01 u_threshold = 1.75 @@ -35,7 +35,7 @@ material sample { shader { - vertexShader = Shaders/example_simple.vsh + vertexShader = Shaders/example_Simple.vsh fragmentShader = Shaders/example_Noisy.fsh resolution = 100,100 } @@ -48,8 +48,8 @@ material sample shader { defines = - vertexShader = Shaders/example_simple.vsh - fragmentShader = Shaders/example_edgeDetection.fsh + vertexShader = Shaders/example_Simple.vsh + fragmentShader = Shaders/example_EdgeDetection.fsh resolution = 100, 100 } } diff --git a/tests/cpp-tests/Resources/Presentation/chipmunk_status.png b/tests/cpp-tests/Resources/Presentation/chipmunk_status.png new file mode 100644 index 0000000000..ce772e536c Binary files /dev/null and b/tests/cpp-tests/Resources/Presentation/chipmunk_status.png differ diff --git a/tests/cpp-tests/Resources/Presentation/cocos2d_status.png b/tests/cpp-tests/Resources/Presentation/cocos2d_status.png new file mode 100644 index 0000000000..f2eb13d498 Binary files /dev/null and b/tests/cpp-tests/Resources/Presentation/cocos2d_status.png differ diff --git a/tests/cpp-tests/Resources/Presentation/cocosbuilder_status.png b/tests/cpp-tests/Resources/Presentation/cocosbuilder_status.png new file mode 100644 index 0000000000..8589cd2575 Binary files /dev/null and b/tests/cpp-tests/Resources/Presentation/cocosbuilder_status.png differ diff --git a/tests/cpp-tests/Resources/Presentation/comparison.png b/tests/cpp-tests/Resources/Presentation/comparison.png new file mode 100644 index 0000000000..6f94a831b7 Binary files /dev/null and b/tests/cpp-tests/Resources/Presentation/comparison.png differ diff --git a/tests/cpp-tests/Resources/Presentation/gdkaccelerator.png b/tests/cpp-tests/Resources/Presentation/gdkaccelerator.png new file mode 100644 index 0000000000..2033340424 Binary files /dev/null and b/tests/cpp-tests/Resources/Presentation/gdkaccelerator.png differ diff --git a/tests/cpp-tests/Resources/Presentation/html5accelerator.png b/tests/cpp-tests/Resources/Presentation/html5accelerator.png new file mode 100644 index 0000000000..78b2934d1c Binary files /dev/null and b/tests/cpp-tests/Resources/Presentation/html5accelerator.png differ diff --git a/tests/cpp-tests/Resources/Presentation/proxy_model.png b/tests/cpp-tests/Resources/Presentation/proxy_model.png new file mode 100644 index 0000000000..2e32fd0f5e Binary files /dev/null and b/tests/cpp-tests/Resources/Presentation/proxy_model.png differ diff --git a/tests/cpp-tests/Resources/Presentation/stack.graffle b/tests/cpp-tests/Resources/Presentation/stack.graffle new file mode 100644 index 0000000000..77c44fcc02 --- /dev/null +++ b/tests/cpp-tests/Resources/Presentation/stack.graffle @@ -0,0 +1,1025 @@ + + + + + ApplicationVersion + + com.omnigroup.OmniGraffle.MacAppStore + 139.15 + + CreationDate + 2012-08-22 08:14:27 +0000 + Creator + Ricardo Quesada + GraphDocumentVersion + 8 + GuidesLocked + NO + GuidesVisible + YES + ImageCounter + 1 + LinksVisible + NO + MagnetsVisible + NO + MasterSheets + + ModificationDate + 2012-08-22 08:29:14 +0000 + Modifier + Ricardo Quesada + NotesVisible + NO + OriginVisible + NO + PageBreaks + YES + PrintInfo + + NSBottomMargin + + float + 41 + + NSHorizonalPagination + + coded + BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG + + NSLeftMargin + + float + 18 + + NSPaperSize + + size + {612, 792} + + NSPrintReverseOrientation + + int + 0 + + NSRightMargin + + float + 18 + + NSTopMargin + + float + 18 + + + ReadOnly + NO + Sheets + + + ActiveLayerIndex + 0 + AutoAdjust + + BackgroundGraphic + + Bounds + {{0, 0}, {576, 733}} + Class + SolidGraphic + ID + 2 + Style + + shadow + + Draws + NO + + stroke + + Draws + NO + + + + BaseZoom + 0 + CanvasOrigin + {0, 0} + ColumnAlign + 1 + ColumnSpacing + 36 + DisplayScale + 1 0/72 in = 1 0/72 in + GraphicsList + + + Bounds + {{157, 222}, {62, 32}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + ID + 19 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + CornerRadius + 9 + Draws + NO + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Native} + + Wrap + NO + + + Bounds + {{157, 179}, {32, 32}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + ID + 17 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + CornerRadius + 9 + Draws + NO + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 JS} + + Wrap + NO + + + Class + LineGraphic + ID + 15 + Points + + {157.00000000000023, 216} + {496.99999999999977, 216} + + Style + + stroke + + HeadArrow + 0 + Legacy + + TailArrow + 0 + + + + + Bounds + {{201, 152}, {118, 54}} + Class + ShapedGraphic + ID + 12 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Physics Engine (JS)} + + + + Bounds + {{330, 222}, {118, 42}} + Class + ShapedGraphic + ID + 11 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Canvas Accelerator} + + + + Bounds + {{201, 88}, {247, 48}} + Class + ShapedGraphic + ID + 10 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Game Logic (JS)} + + + + Bounds + {{330, 152}, {118, 54}} + Class + ShapedGraphic + ID + 4 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Game Engine (JS)} + + + + Bounds + {{134, 79}, {371.5, 209}} + Class + ShapedGraphic + FontInfo + + Color + + b + 0.2 + g + 0.2 + r + 0.2 + + Font + Verdana + NSKern + 0.0 + Size + 15 + + ID + 9 + Magnets + + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + Color + + a + 0 + b + 1 + g + 1 + r + 1 + + FillType + 2 + GradientAngle + 56 + GradientColor + + a + 0 + b + 0.901961 + g + 0.901961 + r + 0.901961 + + MiddleColor + + a + 0.9 + b + 1 + g + 1 + r + 1 + + MiddleFraction + 0.3125 + TrippleBlend + YES + + shadow + + Beneath + YES + Color + + a + 0.15 + b + 0 + g + 0 + r + 0 + + Fuzziness + 0.0 + ShadowVector + {2, 2} + + stroke + + Color + + b + 0.2 + g + 0.2 + r + 0.2 + + + + Text + + VerticalPad + 0 + + + + GridInfo + + HPages + 1 + KeepToScale + + Layers + + + Lock + NO + Name + Layer 1 + Print + YES + View + YES + + + LayoutInfo + + Animate + NO + circoMinDist + 18 + circoSeparation + 0.0 + layoutEngine + dot + neatoSeparation + 0.0 + twopiSeparation + 0.0 + + Orientation + 2 + PrintOnePage + + RowAlign + 1 + RowSpacing + 36 + SheetTitle + Canvas 1 + UniqueID + 1 + VPages + 1 + + + ActiveLayerIndex + 0 + AutoAdjust + + BackgroundGraphic + + Bounds + {{0, 0}, {576, 733}} + Class + SolidGraphic + ID + 2 + Style + + shadow + + Draws + NO + + stroke + + Draws + NO + + + + BaseZoom + 0 + CanvasOrigin + {0, 0} + ColumnAlign + 1 + ColumnSpacing + 36 + DisplayScale + 1 0/72 in = 1.0000 in + GraphicsList + + + Bounds + {{204, 141}, {118, 19}} + Class + ShapedGraphic + ID + 21 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Physics API} + + + + Bounds + {{330, 140}, {118, 19}} + Class + ShapedGraphic + ID + 20 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Game API} + + + + Bounds + {{128, 177}, {62, 32}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + ID + 19 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + CornerRadius + 9 + Draws + NO + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Native} + + Wrap + NO + + + Bounds + {{154.5, 111.5}, {32, 32}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + ID + 17 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + CornerRadius + 9 + Draws + NO + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 JS} + + Wrap + NO + + + Class + LineGraphic + ID + 15 + Points + + {154.50000000000023, 167.5} + {494.49999999999977, 167.5} + + Style + + stroke + + HeadArrow + 0 + Legacy + + TailArrow + 0 + + + + + Bounds + {{201, 176}, {118, 75}} + Class + ShapedGraphic + ID + 12 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Physics Engine} + + + + Bounds + {{201, 81.5}, {247, 48}} + Class + ShapedGraphic + ID + 10 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Game Logic (JS)} + + + + Bounds + {{330, 176}, {118, 75}} + Class + ShapedGraphic + ID + 4 + Shape + Rectangle + Style + + stroke + + CornerRadius + 9 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs36 \cf0 Game Engine} + + + + Bounds + {{122.99999999999977, 64}, {371.5, 209}} + Class + ShapedGraphic + FontInfo + + Color + + b + 0.2 + g + 0.2 + r + 0.2 + + Font + Verdana + NSKern + 0.0 + Size + 15 + + ID + 9 + Magnets + + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + Color + + a + 0 + b + 1 + g + 1 + r + 1 + + FillType + 2 + GradientAngle + 56 + GradientColor + + a + 0 + b + 0.901961 + g + 0.901961 + r + 0.901961 + + MiddleColor + + a + 0.9 + b + 1 + g + 1 + r + 1 + + MiddleFraction + 0.3125 + TrippleBlend + YES + + shadow + + Beneath + YES + Color + + a + 0.15 + b + 0 + g + 0 + r + 0 + + Fuzziness + 0.0 + ShadowVector + {2, 2} + + stroke + + Color + + b + 0.2 + g + 0.2 + r + 0.2 + + + + Text + + VerticalPad + 0 + + + + GridInfo + + HPages + 1 + KeepToScale + + Layers + + + Lock + NO + Name + Layer 1 + Print + YES + View + YES + + + LayoutInfo + + Animate + NO + circoMinDist + 18 + circoSeparation + 0.0 + layoutEngine + dot + neatoSeparation + 0.0 + twopiSeparation + 0.0 + + Orientation + 2 + PrintOnePage + + RowAlign + 1 + RowSpacing + 36 + SheetTitle + Canvas 2 + UniqueID + 2 + VPages + 1 + + + SmartAlignmentGuidesActive + YES + SmartDistanceGuidesActive + YES + UseEntirePage + + WindowInfo + + CurrentSheet + 0 + ExpandedCanvases + + + name + Canvas 1 + + + Frame + {{226, 131}, {1010, 878}} + ListView + + OutlineWidth + 142 + RightSidebar + + ShowRuler + + Sidebar + + SidebarWidth + 120 + VisibleRegion + {{-150, -3}, {875, 739}} + Zoom + 1 + ZoomValues + + + Canvas 1 + 1 + 1 + + + Canvas 2 + 1 + 1 + + + + + diff --git a/tests/cpp-tests/Resources/Shaders/example_bloom.fsh b/tests/cpp-tests/Resources/Shaders/example_Bloom.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_bloom.fsh rename to tests/cpp-tests/Resources/Shaders/example_Bloom.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_celShading.fsh b/tests/cpp-tests/Resources/Shaders/example_CelShading.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_celShading.fsh rename to tests/cpp-tests/Resources/Shaders/example_CelShading.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_edgeDetection.fsh b/tests/cpp-tests/Resources/Shaders/example_EdgeDetection.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_edgeDetection.fsh rename to tests/cpp-tests/Resources/Shaders/example_EdgeDetection.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_greyScale.fsh b/tests/cpp-tests/Resources/Shaders/example_GreyScale.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_greyScale.fsh rename to tests/cpp-tests/Resources/Shaders/example_GreyScale.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_lensFlare.fsh b/tests/cpp-tests/Resources/Shaders/example_LensFlare.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_lensFlare.fsh rename to tests/cpp-tests/Resources/Shaders/example_LensFlare.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_normal.fsh b/tests/cpp-tests/Resources/Shaders/example_Normal.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_normal.fsh rename to tests/cpp-tests/Resources/Shaders/example_Normal.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_outline.fsh b/tests/cpp-tests/Resources/Shaders/example_Outline.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_outline.fsh rename to tests/cpp-tests/Resources/Shaders/example_Outline.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_sepia.fsh b/tests/cpp-tests/Resources/Shaders/example_Sepia.fsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_sepia.fsh rename to tests/cpp-tests/Resources/Shaders/example_Sepia.fsh diff --git a/tests/cpp-tests/Resources/Shaders/example_simple.vsh b/tests/cpp-tests/Resources/Shaders/example_Simple.vsh similarity index 100% rename from tests/cpp-tests/Resources/Shaders/example_simple.vsh rename to tests/cpp-tests/Resources/Shaders/example_Simple.vsh diff --git a/tests/cpp-tests/Resources/TileMaps/orthogonal-test4-hd.tmx b/tests/cpp-tests/Resources/TileMaps/orthogonal-test4-hd.tmx new file mode 100644 index 0000000000..9a801785fe --- /dev/null +++ b/tests/cpp-tests/Resources/TileMaps/orthogonal-test4-hd.tmx @@ -0,0 +1,11 @@ + + + + + + + + H4sIAAAAAAAAA1NjYGCQIxFrQGlGIGYCYmYglgRiKSiWRpJjQlID088JxFxAzA3EikCsAsSqQKwMlRMBYiEgFoWqwaVPB4h1kfRxI6nDpw/dPmL1odsnA/WbLJo+Qaj7hYFYE4i1oFgbSU4ISQ1Ijz4Z8WAAxADxIVkbwAEAAA== + + + diff --git a/tests/cpp-tests/Resources/TileMaps/orthogonal-test6-hd.tmx b/tests/cpp-tests/Resources/TileMaps/orthogonal-test6-hd.tmx new file mode 100644 index 0000000000..39173e1a7b --- /dev/null +++ b/tests/cpp-tests/Resources/TileMaps/orthogonal-test6-hd.tmx @@ -0,0 +1,11 @@ + + + + + + + + H4sIAAAAAAAAA5NkYGCQIoClgViRgTBQpoM6JSimljpquw+XOk0g1iKAtYEYAF51CouQAQAA + + + diff --git a/tests/cpp-tests/Resources/TileMaps/tile_iso_offset.png b/tests/cpp-tests/Resources/TileMaps/tile_iso_offset.png new file mode 100644 index 0000000000..537ec4c9fa Binary files /dev/null and b/tests/cpp-tests/Resources/TileMaps/tile_iso_offset.png differ diff --git a/tests/cpp-tests/Resources/TileMaps/tile_iso_offset.tmx b/tests/cpp-tests/Resources/TileMaps/tile_iso_offset.tmx new file mode 100644 index 0000000000..f281df012f --- /dev/null +++ b/tests/cpp-tests/Resources/TileMaps/tile_iso_offset.tmx @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + eJxtkEEOwDAIwyDh/2/eDpsUWTlYSK0bCpoZBftygQr74fBc7lvmhktH0ZP5i+wr79Izzg+9jMp//hmcS8jNvXj6ng4OSfcBuQwA6g== + + + + diff --git a/tests/cpp-tests/Resources/TileMaps/tiles-hd.png b/tests/cpp-tests/Resources/TileMaps/tiles-hd.png new file mode 100644 index 0000000000..08cdb0f1e4 Binary files /dev/null and b/tests/cpp-tests/Resources/TileMaps/tiles-hd.png differ diff --git a/tests/cpp-tests/Resources/TileMaps/tmw_desert_spacing-hd.png b/tests/cpp-tests/Resources/TileMaps/tmw_desert_spacing-hd.png new file mode 100644 index 0000000000..ab9f840fae Binary files /dev/null and b/tests/cpp-tests/Resources/TileMaps/tmw_desert_spacing-hd.png differ diff --git a/tests/cpp-tests/Resources/animations/crystals.plist b/tests/cpp-tests/Resources/animations/crystals.plist new file mode 100644 index 0000000000..baa3fb48ff --- /dev/null +++ b/tests/cpp-tests/Resources/animations/crystals.plist @@ -0,0 +1,174 @@ + + + + + frames + + crystals/0.png + + frame + {{1, 167}, {39, 38}} + offset + {0, 0} + rotated + + sourceColorRect + {{1, 1}, {39, 38}} + sourceSize + {40, 40} + + crystals/1.png + + frame + {{41, 85}, {39, 38}} + offset + {0, 0} + rotated + + sourceColorRect + {{1, 1}, {39, 38}} + sourceSize + {40, 40} + + crystals/2.png + + frame + {{1, 85}, {39, 38}} + offset + {0, 0} + rotated + + sourceColorRect + {{1, 1}, {39, 38}} + sourceSize + {40, 40} + + crystals/3.png + + frame + {{1, 126}, {39, 38}} + offset + {0, 0} + rotated + + sourceColorRect + {{1, 1}, {39, 38}} + sourceSize + {40, 40} + + crystals/4.png + + frame + {{1, 208}, {39, 38}} + offset + {0, 0} + rotated + + sourceColorRect + {{1, 1}, {39, 38}} + sourceSize + {40, 40} + + crystals/bomb-explo-inner.png + + frame + {{41, 126}, {36, 34}} + offset + {0, 0} + rotated + + sourceColorRect + {{2, 3}, {36, 34}} + sourceSize + {40, 40} + + crystals/bomb-explo.png + + frame + {{43, 41}, {36, 37}} + offset + {0, 0} + rotated + + sourceColorRect + {{2, 1}, {36, 37}} + sourceSize + {40, 40} + + crystals/bomb-hi.png + + frame + {{41, 164}, {30, 29}} + offset + {0, 0} + rotated + + sourceColorRect + {{5, 6}, {30, 29}} + sourceSize + {40, 40} + + crystals/bomb-light.png + + frame + {{1, 43}, {40, 40}} + offset + {0, 0} + rotated + + sourceColorRect + {{0, 0}, {40, 40}} + sourceSize + {40, 40} + + crystals/bomb.png + + frame + {{43, 1}, {38, 38}} + offset + {0, 0} + rotated + + sourceColorRect + {{1, 1}, {38, 38}} + sourceSize + {40, 40} + + crystals/hint.png + + frame + {{1, 1}, {40, 40}} + offset + {0, 0} + rotated + + sourceColorRect + {{0, 0}, {40, 40}} + sourceSize + {40, 40} + + crystals/sparkle.png + + frame + {{41, 196}, {15, 15}} + offset + {0, 0} + rotated + + sourceColorRect + {{0, 0}, {15, 15}} + sourceSize + {16, 16} + + + metadata + + format + 2 + size + {256, 256} + textureFileName + crystals.png + + + diff --git a/tests/cpp-tests/Resources/animations/crystals.png b/tests/cpp-tests/Resources/animations/crystals.png new file mode 100644 index 0000000000..2c0a41da01 Binary files /dev/null and b/tests/cpp-tests/Resources/animations/crystals.png differ diff --git a/tests/cpp-tests/Resources/animations/dragon_animation-hd.png b/tests/cpp-tests/Resources/animations/dragon_animation-hd.png new file mode 100644 index 0000000000..8fbe949c1f Binary files /dev/null and b/tests/cpp-tests/Resources/animations/dragon_animation-hd.png differ diff --git a/tests/cpp-tests/Resources/animations/tcc_issue_1.plist b/tests/cpp-tests/Resources/animations/tcc_issue_1.plist new file mode 100644 index 0000000000..cb7e47fe8b --- /dev/null +++ b/tests/cpp-tests/Resources/animations/tcc_issue_1.plist @@ -0,0 +1,61 @@ + + + + + frames + + tcc_grossini_dance_01.png + + frame + {{2,79},{51,109}} + offset + {0,-1} + rotated + + sourceColorRect + {{17,7},{51,109}} + sourceSize + {85,121} + + tcc_grossini_dance_05.png + + frame + {{2,2},{75,109}} + offset + {-1,-1} + rotated + + sourceColorRect + {{4,7},{75,109}} + sourceSize + {85,121} + + tcc_grossini_dance_08.png + + frame + {{2,132},{51,109}} + offset + {0,-1} + rotated + + sourceColorRect + {{17,7},{51,109}} + sourceSize + {85,121} + + + metadata + + format + 2 + realTextureFileName + tcc_issue_1.png + size + {128,256} + smartupdate + $TexturePacker:SmartUpdate:c3afd366ca69339ec4a9ff84d5650213$ + textureFileName + tcc_issue_1.png + + + diff --git a/tests/cpp-tests/Resources/animations/tcc_issue_1.png b/tests/cpp-tests/Resources/animations/tcc_issue_1.png new file mode 100644 index 0000000000..1e5c2a9998 Binary files /dev/null and b/tests/cpp-tests/Resources/animations/tcc_issue_1.png differ diff --git a/tests/cpp-tests/Resources/animations/tcc_issue_2.plist b/tests/cpp-tests/Resources/animations/tcc_issue_2.plist new file mode 100644 index 0000000000..71deccb4de --- /dev/null +++ b/tests/cpp-tests/Resources/animations/tcc_issue_2.plist @@ -0,0 +1,61 @@ + + + + + frames + + tcc_grossini_dance_13.png + + frame + {{2,52},{51,109}} + offset + {0,-1} + rotated + + sourceColorRect + {{17,7},{51,109}} + sourceSize + {85,121} + + tcc_grossinis_sister1.png + + frame + {{2,2},{48,113}} + offset + {-1,-11} + rotated + + sourceColorRect + {{1,24},{48,113}} + sourceSize + {52,139} + + tcc_grossinis_sister2.png + + frame + {{2,105},{54,126}} + offset + {-1,-2} + rotated + + sourceColorRect + {{0,8},{54,126}} + sourceSize + {56,138} + + + metadata + + format + 2 + realTextureFileName + tcc_issue_2.png + size + {128,256} + smartupdate + $TexturePacker:SmartUpdate:d3eced1b14f9fe83f301cafc8863eb51$ + textureFileName + tcc_issue_2.png + + + diff --git a/tests/cpp-tests/Resources/animations/tcc_issue_2.png b/tests/cpp-tests/Resources/animations/tcc_issue_2.png new file mode 100644 index 0000000000..efbe1e09e2 Binary files /dev/null and b/tests/cpp-tests/Resources/animations/tcc_issue_2.png differ diff --git a/tests/cpp-tests/Resources/background-music-aac.mp3 b/tests/cpp-tests/Resources/background-music-aac.mp3 new file mode 100644 index 0000000000..c1de365baf Binary files /dev/null and b/tests/cpp-tests/Resources/background-music-aac.mp3 differ diff --git a/tests/cpp-tests/Resources/background-music-aac.wav b/tests/cpp-tests/Resources/background-music-aac.wav new file mode 100644 index 0000000000..db5624cd76 Binary files /dev/null and b/tests/cpp-tests/Resources/background-music-aac.wav differ diff --git a/tests/cpp-tests/Resources/ccb/fileLookup.plist b/tests/cpp-tests/Resources/ccb/fileLookup.plist new file mode 100644 index 0000000000..7a04cd9ea7 --- /dev/null +++ b/tests/cpp-tests/Resources/ccb/fileLookup.plist @@ -0,0 +1,13 @@ + + + + + filenames + + metadata + + version + 1 + + + diff --git a/tests/cpp-tests/Resources/ccs-res b/tests/cpp-tests/Resources/ccs-res index 0f5e0dff1a..f1beaa4774 160000 --- a/tests/cpp-tests/Resources/ccs-res +++ b/tests/cpp-tests/Resources/ccs-res @@ -1 +1 @@ -Subproject commit 0f5e0dff1a7545eef7bbe8f23d4b232d0d2d6ae3 +Subproject commit f1beaa4774ee49b5bd3fc20730773cd818959e61 diff --git a/tests/cpp-tests/Resources/effect2.mp3 b/tests/cpp-tests/Resources/effect2.mp3 new file mode 100644 index 0000000000..5e574a897c Binary files /dev/null and b/tests/cpp-tests/Resources/effect2.mp3 differ diff --git a/tests/cpp-tests/Resources/fonts/Schwarzwald Regular.ttf b/tests/cpp-tests/Resources/fonts/Schwarzwald Regular.ttf new file mode 100644 index 0000000000..1062de0d1c Binary files /dev/null and b/tests/cpp-tests/Resources/fonts/Schwarzwald Regular.ttf differ diff --git a/tests/cpp-tests/Resources/fonts/Schwarzwald_Regular.eot b/tests/cpp-tests/Resources/fonts/Schwarzwald_Regular.eot new file mode 100644 index 0000000000..0c7ff2eacb Binary files /dev/null and b/tests/cpp-tests/Resources/fonts/Schwarzwald_Regular.eot differ diff --git a/tests/cpp-tests/Resources/fonts/konqa32-hd.fnt b/tests/cpp-tests/Resources/fonts/konqa32-hd.fnt new file mode 100644 index 0000000000..eb65a6c573 --- /dev/null +++ b/tests/cpp-tests/Resources/fonts/konqa32-hd.fnt @@ -0,0 +1,96 @@ +info face="KonQaBlack" size=64 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 +common lineHeight=79 base=26 scaleW=512 scaleH=512 pages=1 packed=0 +page id=0 file="konqa32-hd.png" +chars count=91 +char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=63 xadvance=32 page=0 chnl=0 +char id=36 x=0 y=0 width=34 height=72 xoffset=2 yoffset=0 xadvance=36 page=0 chnl=0 +char id=81 x=34 y=0 width=38 height=59 xoffset=2 yoffset=11 xadvance=39 page=0 chnl=0 +char id=64 x=72 y=0 width=36 height=55 xoffset=3 yoffset=10 xadvance=39 page=0 chnl=0 +char id=124 x=108 y=0 width=14 height=55 xoffset=4 yoffset=11 xadvance=20 page=0 chnl=0 +char id=63 x=122 y=0 width=35 height=54 xoffset=2 yoffset=10 xadvance=36 page=0 chnl=0 +char id=56 x=157 y=0 width=36 height=54 xoffset=1 yoffset=10 xadvance=36 page=0 chnl=0 +char id=90 x=193 y=0 width=38 height=54 xoffset=2 yoffset=10 xadvance=38 page=0 chnl=0 +char id=89 x=231 y=0 width=35 height=54 xoffset=2 yoffset=10 xadvance=36 page=0 chnl=0 +char id=87 x=266 y=0 width=54 height=54 xoffset=2 yoffset=10 xadvance=55 page=0 chnl=0 +char id=86 x=320 y=0 width=35 height=54 xoffset=2 yoffset=10 xadvance=37 page=0 chnl=0 +char id=85 x=355 y=0 width=38 height=54 xoffset=2 yoffset=10 xadvance=38 page=0 chnl=0 +char id=84 x=393 y=0 width=35 height=54 xoffset=2 yoffset=10 xadvance=37 page=0 chnl=0 +char id=82 x=428 y=0 width=37 height=54 xoffset=2 yoffset=10 xadvance=39 page=0 chnl=0 +char id=79 x=465 y=0 width=38 height=54 xoffset=2 yoffset=10 xadvance=38 page=0 chnl=0 +char id=92 x=0 y=72 width=33 height=53 xoffset=4 yoffset=11 xadvance=39 page=0 chnl=0 +char id=47 x=33 y=72 width=34 height=53 xoffset=4 yoffset=11 xadvance=39 page=0 chnl=0 +char id=33 x=67 y=72 width=17 height=53 xoffset=2 yoffset=11 xadvance=18 page=0 chnl=0 +char id=48 x=84 y=72 width=40 height=53 xoffset=2 yoffset=11 xadvance=40 page=0 chnl=0 +char id=57 x=124 y=72 width=35 height=53 xoffset=2 yoffset=11 xadvance=35 page=0 chnl=0 +char id=55 x=159 y=72 width=35 height=53 xoffset=2 yoffset=11 xadvance=35 page=0 chnl=0 +char id=54 x=194 y=72 width=36 height=53 xoffset=1 yoffset=11 xadvance=37 page=0 chnl=0 +char id=53 x=230 y=72 width=35 height=53 xoffset=2 yoffset=11 xadvance=36 page=0 chnl=0 +char id=52 x=265 y=72 width=36 height=53 xoffset=2 yoffset=11 xadvance=36 page=0 chnl=0 +char id=51 x=301 y=72 width=34 height=53 xoffset=2 yoffset=11 xadvance=35 page=0 chnl=0 +char id=50 x=335 y=72 width=36 height=53 xoffset=2 yoffset=11 xadvance=37 page=0 chnl=0 +char id=49 x=371 y=72 width=23 height=53 xoffset=2 yoffset=11 xadvance=24 page=0 chnl=0 +char id=88 x=394 y=72 width=38 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=83 x=432 y=72 width=37 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=80 x=469 y=72 width=36 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=78 x=0 y=125 width=39 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=77 x=39 y=125 width=53 height=53 xoffset=2 yoffset=11 xadvance=53 page=0 chnl=0 +char id=76 x=92 y=125 width=35 height=53 xoffset=1 yoffset=11 xadvance=36 page=0 chnl=0 +char id=75 x=127 y=125 width=36 height=53 xoffset=2 yoffset=11 xadvance=37 page=0 chnl=0 +char id=74 x=163 y=125 width=30 height=53 xoffset=2 yoffset=11 xadvance=30 page=0 chnl=0 +char id=73 x=193 y=125 width=20 height=53 xoffset=1 yoffset=11 xadvance=19 page=0 chnl=0 +char id=72 x=213 y=125 width=38 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=71 x=251 y=125 width=36 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=70 x=287 y=125 width=37 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=69 x=324 y=125 width=36 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=68 x=360 y=125 width=36 height=53 xoffset=2 yoffset=11 xadvance=36 page=0 chnl=0 +char id=67 x=396 y=125 width=36 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=66 x=432 y=125 width=36 height=53 xoffset=2 yoffset=11 xadvance=38 page=0 chnl=0 +char id=65 x=468 y=125 width=36 height=53 xoffset=2 yoffset=11 xadvance=39 page=0 chnl=0 +char id=38 x=0 y=178 width=46 height=51 xoffset=2 yoffset=15 xadvance=47 page=0 chnl=0 +char id=37 x=46 y=178 width=52 height=51 xoffset=0 yoffset=15 xadvance=50 page=0 chnl=0 +char id=106 x=98 y=178 width=19 height=42 xoffset=2 yoffset=22 xadvance=19 page=0 chnl=0 +char id=125 x=117 y=178 width=19 height=41 xoffset=4 yoffset=23 xadvance=20 page=0 chnl=0 +char id=123 x=136 y=178 width=19 height=41 xoffset=0 yoffset=23 xadvance=20 page=0 chnl=0 +char id=93 x=155 y=178 width=19 height=41 xoffset=4 yoffset=23 xadvance=20 page=0 chnl=0 +char id=91 x=174 y=178 width=19 height=41 xoffset=0 yoffset=23 xadvance=20 page=0 chnl=0 +char id=41 x=193 y=178 width=20 height=41 xoffset=3 yoffset=23 xadvance=20 page=0 chnl=0 +char id=40 x=213 y=178 width=21 height=41 xoffset=-1 yoffset=23 xadvance=20 page=0 chnl=0 +char id=122 x=234 y=178 width=29 height=41 xoffset=2 yoffset=23 xadvance=30 page=0 chnl=0 +char id=121 x=263 y=178 width=28 height=41 xoffset=2 yoffset=23 xadvance=30 page=0 chnl=0 +char id=120 x=291 y=178 width=26 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=119 x=317 y=178 width=40 height=41 xoffset=2 yoffset=23 xadvance=41 page=0 chnl=0 +char id=118 x=357 y=178 width=26 height=41 xoffset=2 yoffset=23 xadvance=27 page=0 chnl=0 +char id=117 x=383 y=178 width=27 height=41 xoffset=2 yoffset=23 xadvance=29 page=0 chnl=0 +char id=116 x=410 y=178 width=26 height=41 xoffset=2 yoffset=23 xadvance=27 page=0 chnl=0 +char id=115 x=436 y=178 width=29 height=41 xoffset=2 yoffset=23 xadvance=31 page=0 chnl=0 +char id=114 x=465 y=178 width=26 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=113 x=0 y=229 width=27 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=112 x=27 y=229 width=29 height=41 xoffset=1 yoffset=23 xadvance=29 page=0 chnl=0 +char id=111 x=56 y=229 width=27 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=110 x=83 y=229 width=27 height=41 xoffset=2 yoffset=23 xadvance=29 page=0 chnl=0 +char id=109 x=110 y=229 width=41 height=41 xoffset=2 yoffset=23 xadvance=42 page=0 chnl=0 +char id=108 x=151 y=229 width=19 height=41 xoffset=2 yoffset=23 xadvance=20 page=0 chnl=0 +char id=107 x=170 y=229 width=28 height=41 xoffset=2 yoffset=23 xadvance=30 page=0 chnl=0 +char id=105 x=198 y=229 width=14 height=41 xoffset=2 yoffset=23 xadvance=15 page=0 chnl=0 +char id=104 x=212 y=229 width=26 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=103 x=238 y=229 width=27 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=102 x=265 y=229 width=27 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=101 x=292 y=229 width=26 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=100 x=318 y=229 width=26 height=41 xoffset=2 yoffset=23 xadvance=27 page=0 chnl=0 +char id=99 x=344 y=229 width=27 height=41 xoffset=2 yoffset=23 xadvance=29 page=0 chnl=0 +char id=98 x=371 y=229 width=27 height=41 xoffset=2 yoffset=23 xadvance=28 page=0 chnl=0 +char id=97 x=398 y=229 width=29 height=41 xoffset=1 yoffset=23 xadvance=30 page=0 chnl=0 +char id=94 x=427 y=229 width=40 height=39 xoffset=2 yoffset=13 xadvance=42 page=0 chnl=0 +char id=43 x=467 y=229 width=30 height=33 xoffset=2 yoffset=31 xadvance=32 page=0 chnl=0 +char id=61 x=0 y=270 width=31 height=27 xoffset=3 yoffset=31 xadvance=34 page=0 chnl=0 +char id=59 x=31 y=270 width=16 height=27 xoffset=1 yoffset=53 xadvance=16 page=0 chnl=0 +char id=58 x=47 y=270 width=14 height=25 xoffset=2 yoffset=39 xadvance=16 page=0 chnl=0 +char id=42 x=61 y=270 width=21 height=21 xoffset=10 yoffset=12 xadvance=39 page=0 chnl=0 +char id=34 x=82 y=270 width=26 height=21 xoffset=3 yoffset=13 xadvance=28 page=0 chnl=0 +char id=126 x=108 y=270 width=40 height=14 xoffset=6 yoffset=38 xadvance=50 page=0 chnl=0 +char id=44 x=148 y=270 width=15 height=14 xoffset=2 yoffset=58 xadvance=17 page=0 chnl=0 +char id=39 x=163 y=270 width=15 height=14 xoffset=2 yoffset=10 xadvance=17 page=0 chnl=0 +char id=96 x=178 y=270 width=16 height=14 xoffset=2 yoffset=10 xadvance=18 page=0 chnl=0 +char id=45 x=194 y=270 width=30 height=11 xoffset=3 yoffset=34 xadvance=34 page=0 chnl=0 +char id=46 x=224 y=270 width=13 height=11 xoffset=0 yoffset=53 xadvance=15 page=0 chnl=0 +char id=95 x=237 y=270 width=30 height=10 xoffset=2 yoffset=55 xadvance=34 page=0 chnl=0 diff --git a/tests/cpp-tests/Resources/fonts/konqa32-hd.png b/tests/cpp-tests/Resources/fonts/konqa32-hd.png new file mode 100644 index 0000000000..051e8d5bd3 Binary files /dev/null and b/tests/cpp-tests/Resources/fonts/konqa32-hd.png differ diff --git a/tests/cpp-tests/Resources/fonts/larabie-16-hd.plist b/tests/cpp-tests/Resources/fonts/larabie-16-hd.plist new file mode 100644 index 0000000000..acbb422896 --- /dev/null +++ b/tests/cpp-tests/Resources/fonts/larabie-16-hd.plist @@ -0,0 +1,16 @@ + + + + + version + 1 + textureFilename + larabie-16-hd.png + itemWidth + 20 + itemHeight + 40 + firstChar + 65 + + diff --git a/tests/cpp-tests/Resources/fonts/larabie-16-hd.png b/tests/cpp-tests/Resources/fonts/larabie-16-hd.png new file mode 100644 index 0000000000..7aac30647d Binary files /dev/null and b/tests/cpp-tests/Resources/fonts/larabie-16-hd.png differ diff --git a/tests/cpp-tests/Resources/fonts/markerFelt-hd.fnt b/tests/cpp-tests/Resources/fonts/markerFelt-hd.fnt new file mode 100644 index 0000000000..ee5dba70ce --- /dev/null +++ b/tests/cpp-tests/Resources/fonts/markerFelt-hd.fnt @@ -0,0 +1,3770 @@ +info face="MarkerFelt-Thin" size=50 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=2,2 +common lineHeight=54 base=43 scaleW=512 scaleH=256 pages=1 packed=0 +page id=0 file="markerFelt.png" +chars count=95 +char id=106 x=2 y=2 width=13 height=50 xoffset=-3 yoffset=4 xadvance=10 page=0 chnl=0 letter="j" +char id=87 x=17 y=2 width=48 height=48 xoffset=0 yoffset=0 xadvance=48 page=0 chnl=0 letter="W" +char id=81 x=67 y=2 width=30 height=48 xoffset=2 yoffset=1 xadvance=29 page=0 chnl=0 letter="Q" +char id=77 x=99 y=2 width=45 height=47 xoffset=2 yoffset=0 xadvance=46 page=0 chnl=0 letter="M" +char id=84 x=146 y=2 width=25 height=47 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=0 letter="T" +char id=104 x=173 y=2 width=22 height=47 xoffset=2 yoffset=0 xadvance=24 page=0 chnl=0 letter="h" +char id=102 x=197 y=2 width=21 height=47 xoffset=0 yoffset=0 xadvance=18 page=0 chnl=0 letter="f" +char id=91 x=220 y=2 width=19 height=47 xoffset=1 yoffset=-1 xadvance=20 page=0 chnl=0 letter="[" +char id=93 x=241 y=2 width=19 height=47 xoffset=1 yoffset=-1 xadvance=20 page=0 chnl=0 letter="]" +char id=90 x=262 y=2 width=32 height=46 xoffset=0 yoffset=0 xadvance=30 page=0 chnl=0 letter="Z" +char id=88 x=296 y=2 width=31 height=46 xoffset=0 yoffset=1 xadvance=30 page=0 chnl=0 letter="X" +char id=89 x=329 y=2 width=31 height=46 xoffset=1 yoffset=0 xadvance=30 page=0 chnl=0 letter="Y" +char id=65 x=362 y=2 width=30 height=46 xoffset=1 yoffset=0 xadvance=31 page=0 chnl=0 letter="A" +char id=75 x=394 y=2 width=29 height=46 xoffset=1 yoffset=0 xadvance=28 page=0 chnl=0 letter="K" +char id=78 x=425 y=2 width=28 height=46 xoffset=2 yoffset=0 xadvance=30 page=0 chnl=0 letter="N" +char id=53 x=455 y=2 width=27 height=46 xoffset=1 yoffset=2 xadvance=28 page=0 chnl=0 letter="5" +char id=86 x=2 y=54 width=27 height=46 xoffset=0 yoffset=1 xadvance=27 page=0 chnl=0 letter="V" +char id=85 x=31 y=54 width=26 height=46 xoffset=1 yoffset=1 xadvance=27 page=0 chnl=0 letter="U" +char id=83 x=59 y=54 width=25 height=46 xoffset=0 yoffset=0 xadvance=24 page=0 chnl=0 letter="S" +char id=72 x=86 y=54 width=24 height=46 xoffset=1 yoffset=1 xadvance=25 page=0 chnl=0 letter="H" +char id=48 x=112 y=54 width=24 height=46 xoffset=3 yoffset=1 xadvance=28 page=0 chnl=0 letter="0" +char id=68 x=138 y=54 width=23 height=46 xoffset=2 yoffset=1 xadvance=24 page=0 chnl=0 letter="D" +char id=76 x=163 y=54 width=22 height=46 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=0 letter="L" +char id=74 x=187 y=54 width=22 height=46 xoffset=0 yoffset=1 xadvance=22 page=0 chnl=0 letter="J" +char id=63 x=211 y=54 width=21 height=46 xoffset=0 yoffset=1 xadvance=20 page=0 chnl=0 letter="?" +char id=56 x=234 y=54 width=21 height=46 xoffset=4 yoffset=0 xadvance=28 page=0 chnl=0 letter="8" +char id=69 x=257 y=54 width=20 height=46 xoffset=2 yoffset=1 xadvance=22 page=0 chnl=0 letter="E" +char id=108 x=279 y=54 width=8 height=46 xoffset=1 yoffset=1 xadvance=10 page=0 chnl=0 letter="l" +char id=124 x=289 y=54 width=8 height=46 xoffset=1 yoffset=1 xadvance=10 page=0 chnl=0 letter="|" +char id=82 x=299 y=54 width=30 height=45 xoffset=1 yoffset=1 xadvance=28 page=0 chnl=0 letter="R" +char id=52 x=331 y=54 width=29 height=45 xoffset=0 yoffset=2 xadvance=28 page=0 chnl=0 letter="4" +char id=50 x=362 y=54 width=28 height=45 xoffset=1 yoffset=1 xadvance=28 page=0 chnl=0 letter="2" +char id=92 x=392 y=54 width=27 height=45 xoffset=0 yoffset=1 xadvance=26 page=0 chnl=0 letter="\" +char id=47 x=421 y=54 width=26 height=45 xoffset=0 yoffset=1 xadvance=26 page=0 chnl=0 letter="/" +char id=71 x=449 y=54 width=26 height=45 xoffset=1 yoffset=1 xadvance=24 page=0 chnl=0 letter="G" +char id=55 x=477 y=54 width=25 height=45 xoffset=2 yoffset=2 xadvance=28 page=0 chnl=0 letter="7" +char id=51 x=2 y=102 width=25 height=45 xoffset=3 yoffset=1 xadvance=28 page=0 chnl=0 letter="3" +char id=107 x=29 y=102 width=25 height=45 xoffset=2 yoffset=1 xadvance=24 page=0 chnl=0 letter="k" +char id=66 x=56 y=102 width=24 height=45 xoffset=1 yoffset=2 xadvance=24 page=0 chnl=0 letter="B" +char id=36 x=82 y=102 width=24 height=45 xoffset=2 yoffset=1 xadvance=26 page=0 chnl=0 letter="$" +char id=80 x=108 y=102 width=23 height=45 xoffset=2 yoffset=1 xadvance=22 page=0 chnl=0 letter="P" +char id=123 x=133 y=102 width=20 height=45 xoffset=1 yoffset=1 xadvance=20 page=0 chnl=0 letter="{" +char id=125 x=155 y=102 width=20 height=45 xoffset=1 yoffset=1 xadvance=20 page=0 chnl=0 letter="}" +char id=70 x=177 y=102 width=20 height=45 xoffset=2 yoffset=1 xadvance=21 page=0 chnl=0 letter="F" +char id=49 x=199 y=102 width=15 height=45 xoffset=6 yoffset=1 xadvance=28 page=0 chnl=0 letter="1" +char id=40 x=216 y=102 width=12 height=45 xoffset=2 yoffset=1 xadvance=13 page=0 chnl=0 letter="(" +char id=41 x=230 y=102 width=11 height=45 xoffset=1 yoffset=1 xadvance=13 page=0 chnl=0 letter=")" +char id=73 x=243 y=102 width=11 height=45 xoffset=1 yoffset=1 xadvance=12 page=0 chnl=0 letter="I" +char id=33 x=256 y=102 width=9 height=45 xoffset=1 yoffset=1 xadvance=10 page=0 chnl=0 letter="!" +char id=64 x=267 y=102 width=44 height=44 xoffset=1 yoffset=1 xadvance=45 page=0 chnl=0 letter="@" +char id=37 x=313 y=102 width=34 height=44 xoffset=1 yoffset=2 xadvance=35 page=0 chnl=0 letter="%" +char id=38 x=349 y=102 width=30 height=44 xoffset=1 yoffset=2 xadvance=28 page=0 chnl=0 letter="&" +char id=79 x=381 y=102 width=26 height=44 xoffset=2 yoffset=2 xadvance=27 page=0 chnl=0 letter="O" +char id=54 x=409 y=102 width=23 height=44 xoffset=3 yoffset=2 xadvance=28 page=0 chnl=0 letter="6" +char id=57 x=434 y=102 width=23 height=44 xoffset=3 yoffset=2 xadvance=28 page=0 chnl=0 letter="9" +char id=67 x=459 y=102 width=23 height=44 xoffset=1 yoffset=2 xadvance=22 page=0 chnl=0 letter="C" +char id=105 x=484 y=102 width=9 height=44 xoffset=2 yoffset=3 xadvance=10 page=0 chnl=0 letter="i" +char id=100 x=2 y=149 width=20 height=43 xoffset=1 yoffset=3 xadvance=22 page=0 chnl=0 letter="d" +char id=113 x=24 y=149 width=20 height=43 xoffset=1 yoffset=13 xadvance=22 page=0 chnl=0 letter="q" +char id=112 x=46 y=149 width=20 height=43 xoffset=2 yoffset=13 xadvance=22 page=0 chnl=0 letter="p" +char id=98 x=68 y=149 width=20 height=43 xoffset=2 yoffset=3 xadvance=22 page=0 chnl=0 letter="b" +char id=116 x=90 y=149 width=22 height=41 xoffset=-1 yoffset=6 xadvance=18 page=0 chnl=0 letter="t" +char id=103 x=114 y=149 width=19 height=41 xoffset=1 yoffset=13 xadvance=21 page=0 chnl=0 letter="g" +char id=121 x=135 y=149 width=24 height=40 xoffset=-0 yoffset=14 xadvance=24 page=0 chnl=0 letter="y" +char id=59 x=161 y=149 width=12 height=37 xoffset=-3 yoffset=14 xadvance=10 page=0 chnl=0 letter=";" +char id=119 x=175 y=149 width=39 height=34 xoffset=-1 yoffset=13 xadvance=36 page=0 chnl=0 letter="w" +char id=118 x=216 y=149 width=26 height=34 xoffset=-1 yoffset=13 xadvance=22 page=0 chnl=0 letter="v" +char id=122 x=244 y=149 width=24 height=34 xoffset=1 yoffset=13 xadvance=24 page=0 chnl=0 letter="z" +char id=110 x=270 y=149 width=23 height=34 xoffset=2 yoffset=13 xadvance=24 page=0 chnl=0 letter="n" +char id=120 x=295 y=149 width=22 height=34 xoffset=-0 yoffset=13 xadvance=20 page=0 chnl=0 letter="x" +char id=114 x=319 y=149 width=21 height=34 xoffset=1 yoffset=12 xadvance=19 page=0 chnl=0 letter="r" +char id=117 x=342 y=149 width=20 height=34 xoffset=1 yoffset=13 xadvance=20 page=0 chnl=0 letter="u" +char id=109 x=364 y=149 width=35 height=33 xoffset=2 yoffset=14 xadvance=36 page=0 chnl=0 letter="m" +char id=97 x=401 y=149 width=23 height=33 xoffset=0 yoffset=14 xadvance=23 page=0 chnl=0 letter="a" +char id=111 x=426 y=149 width=20 height=33 xoffset=1 yoffset=13 xadvance=20 page=0 chnl=0 letter="o" +char id=101 x=448 y=149 width=20 height=33 xoffset=1 yoffset=13 xadvance=19 page=0 chnl=0 letter="e" +char id=99 x=470 y=149 width=18 height=33 xoffset=1 yoffset=13 xadvance=19 page=0 chnl=0 letter="c" +char id=115 x=490 y=149 width=19 height=32 xoffset=0 yoffset=15 xadvance=18 page=0 chnl=0 letter="s" +char id=62 x=2 y=194 width=18 height=31 xoffset=2 yoffset=15 xadvance=19 page=0 chnl=0 letter=">" +char id=60 x=22 y=194 width=17 height=31 xoffset=1 yoffset=15 xadvance=19 page=0 chnl=0 letter="<" +char id=58 x=41 y=194 width=10 height=30 xoffset=1 yoffset=16 xadvance=12 page=0 chnl=0 letter=":" +char id=35 x=53 y=194 width=27 height=29 xoffset=1 yoffset=11 xadvance=28 page=0 chnl=0 letter="#" +char id=43 x=82 y=194 width=21 height=24 xoffset=1 yoffset=10 xadvance=22 page=0 chnl=0 letter="+" +char id=42 x=105 y=194 width=23 height=22 xoffset=1 yoffset=6 xadvance=23 page=0 chnl=0 letter="*" +char id=61 x=130 y=194 width=18 height=20 xoffset=2 yoffset=13 xadvance=20 page=0 chnl=0 letter="=" +char id=34 x=150 y=194 width=14 height=18 xoffset=1 yoffset=1 xadvance=16 page=0 chnl=0 letter=""" +char id=39 x=166 y=194 width=7 height=17 xoffset=1 yoffset=1 xadvance=8 page=0 chnl=0 letter="'" +char id=94 x=175 y=194 width=16 height=14 xoffset=0 yoffset=0 xadvance=15 page=0 chnl=0 letter="^" +char id=96 x=193 y=194 width=11 height=14 xoffset=0 yoffset=1 xadvance=10 page=0 chnl=0 letter="`" +char id=44 x=206 y=194 width=10 height=13 xoffset=-1 yoffset=39 xadvance=10 page=0 chnl=0 letter="," +char id=95 x=218 y=194 width=24 height=12 xoffset=1 yoffset=43 xadvance=24 page=0 chnl=0 letter="_" +char id=45 x=244 y=194 width=17 height=12 xoffset=1 yoffset=21 xadvance=18 page=0 chnl=0 letter="-" +char id=46 x=263 y=194 width=8 height=12 xoffset=1 yoffset=34 xadvance=10 page=0 chnl=0 letter="." +char id=126 x=273 y=194 width=17 height=11 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=0 letter="~" +char id=32 x=292 y=194 width=0 height=0 xoffset=12 yoffset=63 xadvance=12 page=0 chnl=0 letter="space" +kernings count=3670 +kerning first=106 second=106 amount=3 +kerning first=106 second=102 amount=2 +kerning first=106 second=63 amount=1 +kerning first=106 second=56 amount=-1 +kerning first=106 second=108 amount=1 +kerning first=106 second=107 amount=1 +kerning first=106 second=49 amount=-4 +kerning first=106 second=40 amount=1 +kerning first=106 second=33 amount=1 +kerning first=106 second=105 amount=1 +kerning first=106 second=100 amount=1 +kerning first=106 second=112 amount=1 +kerning first=106 second=98 amount=1 +kerning first=106 second=116 amount=3 +kerning first=106 second=103 amount=1 +kerning first=106 second=121 amount=2 +kerning first=106 second=59 amount=3 +kerning first=106 second=119 amount=3 +kerning first=106 second=118 amount=3 +kerning first=106 second=122 amount=1 +kerning first=106 second=110 amount=1 +kerning first=106 second=120 amount=2 +kerning first=106 second=114 amount=2 +kerning first=106 second=117 amount=1 +kerning first=106 second=97 amount=2 +kerning first=106 second=111 amount=2 +kerning first=106 second=101 amount=1 +kerning first=106 second=99 amount=1 +kerning first=106 second=115 amount=2 +kerning first=106 second=34 amount=1 +kerning first=106 second=39 amount=2 +kerning first=106 second=44 amount=3 +kerning first=106 second=46 amount=1 +kerning first=87 second=87 amount=1 +kerning first=87 second=81 amount=-3 +kerning first=87 second=102 amount=-2 +kerning first=87 second=93 amount=1 +kerning first=87 second=90 amount=-2 +kerning first=87 second=88 amount=2 +kerning first=87 second=89 amount=1 +kerning first=87 second=65 amount=-6 +kerning first=87 second=75 amount=2 +kerning first=87 second=53 amount=-2 +kerning first=87 second=86 amount=2 +kerning first=87 second=85 amount=1 +kerning first=87 second=83 amount=-2 +kerning first=87 second=48 amount=-4 +kerning first=87 second=76 amount=2 +kerning first=87 second=74 amount=-5 +kerning first=87 second=56 amount=-3 +kerning first=87 second=108 amount=2 +kerning first=87 second=82 amount=2 +kerning first=87 second=52 amount=-5 +kerning first=87 second=50 amount=-4 +kerning first=87 second=92 amount=1 +kerning first=87 second=47 amount=-6 +kerning first=87 second=71 amount=-2 +kerning first=87 second=55 amount=-1 +kerning first=87 second=51 amount=-3 +kerning first=87 second=107 amount=1 +kerning first=87 second=66 amount=2 +kerning first=87 second=80 amount=1 +kerning first=87 second=49 amount=-5 +kerning first=87 second=41 amount=1 +kerning first=87 second=73 amount=2 +kerning first=87 second=33 amount=1 +kerning first=87 second=64 amount=-6 +kerning first=87 second=79 amount=-2 +kerning first=87 second=54 amount=-4 +kerning first=87 second=57 amount=-4 +kerning first=87 second=67 amount=-2 +kerning first=87 second=100 amount=-4 +kerning first=87 second=113 amount=-4 +kerning first=87 second=112 amount=-2 +kerning first=87 second=116 amount=-1 +kerning first=87 second=103 amount=-4 +kerning first=87 second=59 amount=-3 +kerning first=87 second=122 amount=-4 +kerning first=87 second=110 amount=-2 +kerning first=87 second=120 amount=-2 +kerning first=87 second=114 amount=-2 +kerning first=87 second=117 amount=-2 +kerning first=87 second=109 amount=-3 +kerning first=87 second=97 amount=-3 +kerning first=87 second=111 amount=-4 +kerning first=87 second=101 amount=-5 +kerning first=87 second=99 amount=-4 +kerning first=87 second=115 amount=-4 +kerning first=87 second=58 amount=-4 +kerning first=87 second=35 amount=-2 +kerning first=87 second=34 amount=3 +kerning first=87 second=39 amount=3 +kerning first=87 second=44 amount=-8 +kerning first=87 second=45 amount=-4 +kerning first=87 second=46 amount=-6 +kerning first=81 second=106 amount=6 +kerning first=81 second=77 amount=2 +kerning first=81 second=104 amount=3 +kerning first=81 second=102 amount=1 +kerning first=81 second=93 amount=1 +kerning first=81 second=90 amount=3 +kerning first=81 second=88 amount=4 +kerning first=81 second=89 amount=-3 +kerning first=81 second=65 amount=3 +kerning first=81 second=75 amount=2 +kerning first=81 second=78 amount=2 +kerning first=81 second=86 amount=-1 +kerning first=81 second=72 amount=3 +kerning first=81 second=68 amount=2 +kerning first=81 second=76 amount=2 +kerning first=81 second=56 amount=-1 +kerning first=81 second=69 amount=2 +kerning first=81 second=108 amount=4 +kerning first=81 second=82 amount=2 +kerning first=81 second=50 amount=2 +kerning first=81 second=92 amount=-2 +kerning first=81 second=47 amount=3 +kerning first=81 second=55 amount=2 +kerning first=81 second=51 amount=-2 +kerning first=81 second=107 amount=4 +kerning first=81 second=66 amount=2 +kerning first=81 second=80 amount=3 +kerning first=81 second=70 amount=2 +kerning first=81 second=49 amount=-5 +kerning first=81 second=40 amount=1 +kerning first=81 second=41 amount=3 +kerning first=81 second=73 amount=3 +kerning first=81 second=33 amount=3 +kerning first=81 second=54 amount=-1 +kerning first=81 second=57 amount=-2 +kerning first=81 second=67 amount=1 +kerning first=81 second=105 amount=3 +kerning first=81 second=112 amount=3 +kerning first=81 second=98 amount=4 +kerning first=81 second=116 amount=3 +kerning first=81 second=103 amount=1 +kerning first=81 second=121 amount=2 +kerning first=81 second=59 amount=7 +kerning first=81 second=119 amount=3 +kerning first=81 second=118 amount=3 +kerning first=81 second=122 amount=4 +kerning first=81 second=110 amount=4 +kerning first=81 second=120 amount=4 +kerning first=81 second=114 amount=4 +kerning first=81 second=117 amount=2 +kerning first=81 second=97 amount=4 +kerning first=81 second=111 amount=1 +kerning first=81 second=99 amount=2 +kerning first=81 second=115 amount=2 +kerning first=81 second=58 amount=3 +kerning first=81 second=44 amount=7 +kerning first=81 second=46 amount=4 +kerning first=77 second=106 amount=2 +kerning first=77 second=104 amount=1 +kerning first=77 second=90 amount=2 +kerning first=77 second=88 amount=3 +kerning first=77 second=65 amount=1 +kerning first=77 second=75 amount=1 +kerning first=77 second=48 amount=-2 +kerning first=77 second=56 amount=-2 +kerning first=77 second=69 amount=1 +kerning first=77 second=108 amount=2 +kerning first=77 second=50 amount=1 +kerning first=77 second=47 amount=2 +kerning first=77 second=51 amount=-1 +kerning first=77 second=107 amount=2 +kerning first=77 second=66 amount=1 +kerning first=77 second=80 amount=2 +kerning first=77 second=70 amount=1 +kerning first=77 second=49 amount=-5 +kerning first=77 second=41 amount=2 +kerning first=77 second=73 amount=2 +kerning first=77 second=33 amount=2 +kerning first=77 second=54 amount=-2 +kerning first=77 second=57 amount=-1 +kerning first=77 second=105 amount=2 +kerning first=77 second=112 amount=1 +kerning first=77 second=98 amount=2 +kerning first=77 second=116 amount=2 +kerning first=77 second=59 amount=3 +kerning first=77 second=119 amount=2 +kerning first=77 second=118 amount=2 +kerning first=77 second=122 amount=2 +kerning first=77 second=110 amount=2 +kerning first=77 second=120 amount=3 +kerning first=77 second=114 amount=2 +kerning first=77 second=97 amount=2 +kerning first=77 second=115 amount=1 +kerning first=77 second=58 amount=2 +kerning first=77 second=44 amount=2 +kerning first=77 second=46 amount=3 +kerning first=84 second=87 amount=2 +kerning first=84 second=81 amount=-2 +kerning first=84 second=102 amount=-3 +kerning first=84 second=93 amount=1 +kerning first=84 second=90 amount=-2 +kerning first=84 second=88 amount=2 +kerning first=84 second=65 amount=-6 +kerning first=84 second=75 amount=2 +kerning first=84 second=53 amount=-2 +kerning first=84 second=86 amount=2 +kerning first=84 second=85 amount=1 +kerning first=84 second=83 amount=-1 +kerning first=84 second=48 amount=-3 +kerning first=84 second=76 amount=1 +kerning first=84 second=74 amount=-7 +kerning first=84 second=56 amount=-3 +kerning first=84 second=108 amount=2 +kerning first=84 second=82 amount=2 +kerning first=84 second=52 amount=-7 +kerning first=84 second=50 amount=-5 +kerning first=84 second=92 amount=1 +kerning first=84 second=47 amount=-6 +kerning first=84 second=51 amount=-4 +kerning first=84 second=107 amount=1 +kerning first=84 second=66 amount=2 +kerning first=84 second=80 amount=1 +kerning first=84 second=49 amount=-4 +kerning first=84 second=41 amount=1 +kerning first=84 second=73 amount=2 +kerning first=84 second=33 amount=2 +kerning first=84 second=64 amount=-8 +kerning first=84 second=54 amount=-3 +kerning first=84 second=57 amount=-3 +kerning first=84 second=100 amount=-6 +kerning first=84 second=113 amount=-7 +kerning first=84 second=112 amount=-6 +kerning first=84 second=98 amount=1 +kerning first=84 second=116 amount=-3 +kerning first=84 second=103 amount=-6 +kerning first=84 second=121 amount=-6 +kerning first=84 second=59 amount=-4 +kerning first=84 second=119 amount=-5 +kerning first=84 second=118 amount=-5 +kerning first=84 second=122 amount=-5 +kerning first=84 second=110 amount=-6 +kerning first=84 second=120 amount=-5 +kerning first=84 second=114 amount=-6 +kerning first=84 second=117 amount=-6 +kerning first=84 second=109 amount=-7 +kerning first=84 second=97 amount=-5 +kerning first=84 second=111 amount=-6 +kerning first=84 second=101 amount=-7 +kerning first=84 second=99 amount=-6 +kerning first=84 second=115 amount=-6 +kerning first=84 second=58 amount=-6 +kerning first=84 second=35 amount=-4 +kerning first=84 second=34 amount=2 +kerning first=84 second=39 amount=3 +kerning first=84 second=44 amount=-5 +kerning first=84 second=45 amount=-7 +kerning first=84 second=46 amount=-5 +kerning first=104 second=106 amount=1 +kerning first=104 second=102 amount=1 +kerning first=104 second=63 amount=-2 +kerning first=104 second=108 amount=1 +kerning first=104 second=52 amount=1 +kerning first=104 second=92 amount=-6 +kerning first=104 second=107 amount=1 +kerning first=104 second=49 amount=-7 +kerning first=104 second=40 amount=1 +kerning first=104 second=41 amount=1 +kerning first=104 second=33 amount=2 +kerning first=104 second=64 amount=1 +kerning first=104 second=105 amount=2 +kerning first=104 second=100 amount=2 +kerning first=104 second=113 amount=2 +kerning first=104 second=112 amount=2 +kerning first=104 second=98 amount=1 +kerning first=104 second=116 amount=3 +kerning first=104 second=103 amount=2 +kerning first=104 second=121 amount=2 +kerning first=104 second=59 amount=2 +kerning first=104 second=119 amount=3 +kerning first=104 second=118 amount=3 +kerning first=104 second=122 amount=2 +kerning first=104 second=110 amount=2 +kerning first=104 second=120 amount=3 +kerning first=104 second=114 amount=2 +kerning first=104 second=117 amount=3 +kerning first=104 second=109 amount=1 +kerning first=104 second=97 amount=3 +kerning first=104 second=111 amount=3 +kerning first=104 second=101 amount=2 +kerning first=104 second=99 amount=3 +kerning first=104 second=115 amount=3 +kerning first=104 second=58 amount=2 +kerning first=104 second=35 amount=2 +kerning first=104 second=34 amount=-5 +kerning first=104 second=39 amount=-5 +kerning first=104 second=45 amount=2 +kerning first=104 second=46 amount=2 +kerning first=102 second=106 amount=4 +kerning first=102 second=104 amount=3 +kerning first=102 second=102 amount=4 +kerning first=102 second=93 amount=2 +kerning first=102 second=53 amount=1 +kerning first=102 second=48 amount=2 +kerning first=102 second=63 amount=1 +kerning first=102 second=108 amount=4 +kerning first=102 second=50 amount=-2 +kerning first=102 second=92 amount=2 +kerning first=102 second=47 amount=-2 +kerning first=102 second=55 amount=-2 +kerning first=102 second=107 amount=4 +kerning first=102 second=49 amount=-5 +kerning first=102 second=40 amount=4 +kerning first=102 second=41 amount=2 +kerning first=102 second=33 amount=4 +kerning first=102 second=54 amount=1 +kerning first=102 second=57 amount=1 +kerning first=102 second=105 amount=4 +kerning first=102 second=100 amount=2 +kerning first=102 second=113 amount=2 +kerning first=102 second=112 amount=4 +kerning first=102 second=98 amount=3 +kerning first=102 second=116 amount=5 +kerning first=102 second=103 amount=2 +kerning first=102 second=121 amount=5 +kerning first=102 second=59 amount=3 +kerning first=102 second=119 amount=6 +kerning first=102 second=118 amount=6 +kerning first=102 second=122 amount=2 +kerning first=102 second=110 amount=4 +kerning first=102 second=120 amount=4 +kerning first=102 second=114 amount=4 +kerning first=102 second=117 amount=4 +kerning first=102 second=109 amount=3 +kerning first=102 second=97 amount=3 +kerning first=102 second=111 amount=3 +kerning first=102 second=101 amount=2 +kerning first=102 second=99 amount=2 +kerning first=102 second=115 amount=2 +kerning first=102 second=58 amount=2 +kerning first=102 second=35 amount=3 +kerning first=102 second=34 amount=3 +kerning first=102 second=39 amount=3 +kerning first=102 second=45 amount=-4 +kerning first=102 second=46 amount=-1 +kerning first=93 second=106 amount=2 +kerning first=93 second=104 amount=1 +kerning first=93 second=90 amount=2 +kerning first=93 second=88 amount=3 +kerning first=93 second=65 amount=1 +kerning first=93 second=75 amount=1 +kerning first=93 second=78 amount=1 +kerning first=93 second=86 amount=1 +kerning first=93 second=83 amount=1 +kerning first=93 second=48 amount=-1 +kerning first=93 second=56 amount=-1 +kerning first=93 second=69 amount=1 +kerning first=93 second=108 amount=2 +kerning first=93 second=82 amount=1 +kerning first=93 second=50 amount=1 +kerning first=93 second=47 amount=2 +kerning first=93 second=55 amount=1 +kerning first=93 second=107 amount=2 +kerning first=93 second=66 amount=1 +kerning first=93 second=80 amount=2 +kerning first=93 second=70 amount=1 +kerning first=93 second=49 amount=-5 +kerning first=93 second=41 amount=2 +kerning first=93 second=73 amount=2 +kerning first=93 second=33 amount=2 +kerning first=93 second=54 amount=-1 +kerning first=93 second=67 amount=1 +kerning first=93 second=105 amount=2 +kerning first=93 second=112 amount=2 +kerning first=93 second=98 amount=2 +kerning first=93 second=116 amount=2 +kerning first=93 second=103 amount=1 +kerning first=93 second=121 amount=1 +kerning first=93 second=59 amount=2 +kerning first=93 second=119 amount=2 +kerning first=93 second=118 amount=2 +kerning first=93 second=122 amount=2 +kerning first=93 second=110 amount=2 +kerning first=93 second=120 amount=3 +kerning first=93 second=114 amount=2 +kerning first=93 second=117 amount=1 +kerning first=93 second=97 amount=3 +kerning first=93 second=111 amount=1 +kerning first=93 second=99 amount=1 +kerning first=93 second=115 amount=2 +kerning first=93 second=58 amount=2 +kerning first=93 second=34 amount=1 +kerning first=93 second=39 amount=1 +kerning first=93 second=44 amount=1 +kerning first=93 second=46 amount=3 +kerning first=90 second=87 amount=2 +kerning first=90 second=81 amount=-2 +kerning first=90 second=104 amount=1 +kerning first=90 second=102 amount=-3 +kerning first=90 second=93 amount=2 +kerning first=90 second=88 amount=2 +kerning first=90 second=89 amount=1 +kerning first=90 second=65 amount=-1 +kerning first=90 second=75 amount=2 +kerning first=90 second=78 amount=1 +kerning first=90 second=53 amount=-1 +kerning first=90 second=86 amount=2 +kerning first=90 second=85 amount=2 +kerning first=90 second=83 amount=-1 +kerning first=90 second=48 amount=-3 +kerning first=90 second=68 amount=1 +kerning first=90 second=76 amount=2 +kerning first=90 second=74 amount=-5 +kerning first=90 second=63 amount=-1 +kerning first=90 second=56 amount=-3 +kerning first=90 second=69 amount=1 +kerning first=90 second=108 amount=2 +kerning first=90 second=82 amount=2 +kerning first=90 second=52 amount=-8 +kerning first=90 second=50 amount=-2 +kerning first=90 second=92 amount=2 +kerning first=90 second=51 amount=-3 +kerning first=90 second=107 amount=2 +kerning first=90 second=66 amount=2 +kerning first=90 second=80 amount=2 +kerning first=90 second=49 amount=-4 +kerning first=90 second=41 amount=2 +kerning first=90 second=73 amount=2 +kerning first=90 second=33 amount=2 +kerning first=90 second=64 amount=-4 +kerning first=90 second=54 amount=-3 +kerning first=90 second=57 amount=-3 +kerning first=90 second=105 amount=1 +kerning first=90 second=100 amount=-2 +kerning first=90 second=113 amount=-3 +kerning first=90 second=112 amount=-2 +kerning first=90 second=98 amount=2 +kerning first=90 second=116 amount=-3 +kerning first=90 second=103 amount=-2 +kerning first=90 second=121 amount=-4 +kerning first=90 second=59 amount=-1 +kerning first=90 second=119 amount=-3 +kerning first=90 second=118 amount=-3 +kerning first=90 second=122 amount=-1 +kerning first=90 second=110 amount=-1 +kerning first=90 second=114 amount=-1 +kerning first=90 second=117 amount=-2 +kerning first=90 second=109 amount=-3 +kerning first=90 second=111 amount=-2 +kerning first=90 second=101 amount=-2 +kerning first=90 second=99 amount=-2 +kerning first=90 second=115 amount=-1 +kerning first=90 second=58 amount=-2 +kerning first=90 second=35 amount=-6 +kerning first=90 second=34 amount=3 +kerning first=90 second=39 amount=3 +kerning first=90 second=45 amount=-11 +kerning first=88 second=106 amount=1 +kerning first=88 second=81 amount=-2 +kerning first=88 second=84 amount=-3 +kerning first=88 second=102 amount=-2 +kerning first=88 second=90 amount=2 +kerning first=88 second=88 amount=2 +kerning first=88 second=65 amount=1 +kerning first=88 second=83 amount=-1 +kerning first=88 second=48 amount=-2 +kerning first=88 second=74 amount=-3 +kerning first=88 second=63 amount=-3 +kerning first=88 second=56 amount=-2 +kerning first=88 second=69 amount=1 +kerning first=88 second=108 amount=2 +kerning first=88 second=52 amount=-5 +kerning first=88 second=47 amount=2 +kerning first=88 second=71 amount=-1 +kerning first=88 second=51 amount=-2 +kerning first=88 second=107 amount=2 +kerning first=88 second=80 amount=1 +kerning first=88 second=49 amount=-6 +kerning first=88 second=41 amount=2 +kerning first=88 second=73 amount=1 +kerning first=88 second=33 amount=1 +kerning first=88 second=64 amount=-1 +kerning first=88 second=79 amount=-2 +kerning first=88 second=54 amount=-3 +kerning first=88 second=57 amount=-3 +kerning first=88 second=105 amount=2 +kerning first=88 second=112 amount=1 +kerning first=88 second=98 amount=2 +kerning first=88 second=116 amount=-2 +kerning first=88 second=121 amount=-3 +kerning first=88 second=59 amount=2 +kerning first=88 second=118 amount=-2 +kerning first=88 second=122 amount=2 +kerning first=88 second=110 amount=2 +kerning first=88 second=120 amount=3 +kerning first=88 second=114 amount=1 +kerning first=88 second=97 amount=2 +kerning first=88 second=115 amount=1 +kerning first=88 second=58 amount=1 +kerning first=88 second=35 amount=-6 +kerning first=88 second=44 amount=3 +kerning first=88 second=45 amount=-5 +kerning first=88 second=46 amount=3 +kerning first=89 second=106 amount=1 +kerning first=89 second=87 amount=3 +kerning first=89 second=81 amount=-1 +kerning first=89 second=77 amount=1 +kerning first=89 second=84 amount=1 +kerning first=89 second=104 amount=2 +kerning first=89 second=102 amount=-2 +kerning first=89 second=93 amount=2 +kerning first=89 second=88 amount=3 +kerning first=89 second=89 amount=2 +kerning first=89 second=65 amount=-6 +kerning first=89 second=75 amount=3 +kerning first=89 second=78 amount=2 +kerning first=89 second=86 amount=3 +kerning first=89 second=85 amount=3 +kerning first=89 second=72 amount=2 +kerning first=89 second=48 amount=-2 +kerning first=89 second=68 amount=2 +kerning first=89 second=76 amount=3 +kerning first=89 second=74 amount=-6 +kerning first=89 second=56 amount=-2 +kerning first=89 second=69 amount=2 +kerning first=89 second=108 amount=3 +kerning first=89 second=82 amount=3 +kerning first=89 second=52 amount=-5 +kerning first=89 second=50 amount=-4 +kerning first=89 second=92 amount=3 +kerning first=89 second=47 amount=-3 +kerning first=89 second=51 amount=-3 +kerning first=89 second=107 amount=2 +kerning first=89 second=66 amount=3 +kerning first=89 second=80 amount=2 +kerning first=89 second=70 amount=1 +kerning first=89 second=49 amount=-3 +kerning first=89 second=41 amount=2 +kerning first=89 second=73 amount=3 +kerning first=89 second=33 amount=3 +kerning first=89 second=64 amount=-7 +kerning first=89 second=54 amount=-3 +kerning first=89 second=57 amount=-2 +kerning first=89 second=105 amount=2 +kerning first=89 second=100 amount=-5 +kerning first=89 second=113 amount=-4 +kerning first=89 second=112 amount=-2 +kerning first=89 second=98 amount=2 +kerning first=89 second=116 amount=-2 +kerning first=89 second=103 amount=-5 +kerning first=89 second=121 amount=-1 +kerning first=89 second=59 amount=-4 +kerning first=89 second=122 amount=-5 +kerning first=89 second=110 amount=-2 +kerning first=89 second=120 amount=-2 +kerning first=89 second=114 amount=-2 +kerning first=89 second=117 amount=-2 +kerning first=89 second=109 amount=-3 +kerning first=89 second=97 amount=-4 +kerning first=89 second=111 amount=-4 +kerning first=89 second=101 amount=-5 +kerning first=89 second=99 amount=-5 +kerning first=89 second=115 amount=-5 +kerning first=89 second=58 amount=-5 +kerning first=89 second=35 amount=-3 +kerning first=89 second=34 amount=4 +kerning first=89 second=39 amount=4 +kerning first=89 second=44 amount=-8 +kerning first=89 second=45 amount=-6 +kerning first=89 second=46 amount=-8 +kerning first=65 second=87 amount=-3 +kerning first=65 second=84 amount=-4 +kerning first=65 second=102 amount=-3 +kerning first=65 second=93 amount=-1 +kerning first=65 second=88 amount=1 +kerning first=65 second=89 amount=-6 +kerning first=65 second=53 amount=-2 +kerning first=65 second=86 amount=-4 +kerning first=65 second=83 amount=1 +kerning first=65 second=63 amount=-3 +kerning first=65 second=56 amount=-2 +kerning first=65 second=108 amount=1 +kerning first=65 second=92 amount=-7 +kerning first=65 second=71 amount=1 +kerning first=65 second=51 amount=-3 +kerning first=65 second=49 amount=-7 +kerning first=65 second=54 amount=-1 +kerning first=65 second=57 amount=-1 +kerning first=65 second=67 amount=1 +kerning first=65 second=105 amount=1 +kerning first=65 second=100 amount=1 +kerning first=65 second=113 amount=1 +kerning first=65 second=116 amount=-3 +kerning first=65 second=103 amount=2 +kerning first=65 second=59 amount=2 +kerning first=65 second=122 amount=1 +kerning first=65 second=110 amount=1 +kerning first=65 second=120 amount=2 +kerning first=65 second=114 amount=1 +kerning first=65 second=117 amount=2 +kerning first=65 second=97 amount=2 +kerning first=65 second=111 amount=2 +kerning first=65 second=101 amount=1 +kerning first=65 second=99 amount=2 +kerning first=65 second=34 amount=-7 +kerning first=65 second=39 amount=-7 +kerning first=65 second=44 amount=2 +kerning first=65 second=46 amount=2 +kerning first=75 second=106 amount=2 +kerning first=75 second=77 amount=1 +kerning first=75 second=84 amount=-2 +kerning first=75 second=104 amount=2 +kerning first=75 second=102 amount=-1 +kerning first=75 second=90 amount=3 +kerning first=75 second=88 amount=3 +kerning first=75 second=65 amount=2 +kerning first=75 second=75 amount=2 +kerning first=75 second=78 amount=2 +kerning first=75 second=53 amount=2 +kerning first=75 second=72 amount=1 +kerning first=75 second=76 amount=1 +kerning first=75 second=74 amount=-1 +kerning first=75 second=63 amount=-3 +kerning first=75 second=69 amount=2 +kerning first=75 second=108 amount=3 +kerning first=75 second=82 amount=2 +kerning first=75 second=52 amount=-5 +kerning first=75 second=50 amount=2 +kerning first=75 second=47 amount=2 +kerning first=75 second=55 amount=2 +kerning first=75 second=107 amount=2 +kerning first=75 second=66 amount=2 +kerning first=75 second=80 amount=2 +kerning first=75 second=70 amount=2 +kerning first=75 second=49 amount=-5 +kerning first=75 second=40 amount=1 +kerning first=75 second=41 amount=3 +kerning first=75 second=73 amount=2 +kerning first=75 second=33 amount=2 +kerning first=75 second=54 amount=-1 +kerning first=75 second=67 amount=2 +kerning first=75 second=105 amount=2 +kerning first=75 second=100 amount=2 +kerning first=75 second=113 amount=1 +kerning first=75 second=112 amount=2 +kerning first=75 second=98 amount=2 +kerning first=75 second=116 amount=-2 +kerning first=75 second=103 amount=2 +kerning first=75 second=121 amount=-2 +kerning first=75 second=59 amount=2 +kerning first=75 second=122 amount=3 +kerning first=75 second=110 amount=2 +kerning first=75 second=120 amount=4 +kerning first=75 second=114 amount=2 +kerning first=75 second=117 amount=2 +kerning first=75 second=97 amount=3 +kerning first=75 second=111 amount=2 +kerning first=75 second=101 amount=2 +kerning first=75 second=99 amount=2 +kerning first=75 second=115 amount=3 +kerning first=75 second=58 amount=2 +kerning first=75 second=35 amount=-7 +kerning first=75 second=44 amount=3 +kerning first=75 second=45 amount=-7 +kerning first=75 second=46 amount=4 +kerning first=78 second=106 amount=2 +kerning first=78 second=87 amount=2 +kerning first=78 second=104 amount=1 +kerning first=78 second=102 amount=1 +kerning first=78 second=93 amount=1 +kerning first=78 second=90 amount=2 +kerning first=78 second=88 amount=2 +kerning first=78 second=65 amount=1 +kerning first=78 second=75 amount=2 +kerning first=78 second=86 amount=2 +kerning first=78 second=85 amount=1 +kerning first=78 second=83 amount=1 +kerning first=78 second=48 amount=-1 +kerning first=78 second=76 amount=2 +kerning first=78 second=69 amount=1 +kerning first=78 second=108 amount=2 +kerning first=78 second=82 amount=2 +kerning first=78 second=92 amount=1 +kerning first=78 second=47 amount=2 +kerning first=78 second=107 amount=2 +kerning first=78 second=66 amount=2 +kerning first=78 second=80 amount=2 +kerning first=78 second=49 amount=-4 +kerning first=78 second=41 amount=2 +kerning first=78 second=73 amount=2 +kerning first=78 second=33 amount=2 +kerning first=78 second=54 amount=-1 +kerning first=78 second=57 amount=-1 +kerning first=78 second=105 amount=2 +kerning first=78 second=112 amount=1 +kerning first=78 second=98 amount=2 +kerning first=78 second=116 amount=2 +kerning first=78 second=103 amount=1 +kerning first=78 second=121 amount=2 +kerning first=78 second=59 amount=2 +kerning first=78 second=119 amount=3 +kerning first=78 second=118 amount=2 +kerning first=78 second=122 amount=2 +kerning first=78 second=110 amount=2 +kerning first=78 second=120 amount=3 +kerning first=78 second=114 amount=2 +kerning first=78 second=117 amount=1 +kerning first=78 second=97 amount=3 +kerning first=78 second=111 amount=1 +kerning first=78 second=99 amount=1 +kerning first=78 second=115 amount=2 +kerning first=78 second=58 amount=2 +kerning first=78 second=34 amount=2 +kerning first=78 second=39 amount=2 +kerning first=78 second=46 amount=2 +kerning first=53 second=81 amount=-2 +kerning first=53 second=90 amount=-2 +kerning first=53 second=65 amount=-5 +kerning first=53 second=86 amount=1 +kerning first=53 second=83 amount=-2 +kerning first=53 second=74 amount=-3 +kerning first=53 second=63 amount=-1 +kerning first=53 second=47 amount=-7 +kerning first=53 second=71 amount=-1 +kerning first=53 second=64 amount=-3 +kerning first=53 second=79 amount=-2 +kerning first=53 second=100 amount=-2 +kerning first=53 second=113 amount=-2 +kerning first=53 second=112 amount=-2 +kerning first=53 second=103 amount=-2 +kerning first=53 second=59 amount=-2 +kerning first=53 second=122 amount=-3 +kerning first=53 second=110 amount=-1 +kerning first=53 second=120 amount=-1 +kerning first=53 second=114 amount=-2 +kerning first=53 second=117 amount=-1 +kerning first=53 second=109 amount=-2 +kerning first=53 second=97 amount=-1 +kerning first=53 second=111 amount=-1 +kerning first=53 second=101 amount=-2 +kerning first=53 second=99 amount=-2 +kerning first=53 second=115 amount=-2 +kerning first=53 second=58 amount=-3 +kerning first=53 second=35 amount=-2 +kerning first=53 second=34 amount=1 +kerning first=53 second=39 amount=1 +kerning first=53 second=44 amount=-8 +kerning first=53 second=45 amount=-2 +kerning first=53 second=46 amount=-6 +kerning first=86 second=87 amount=2 +kerning first=86 second=81 amount=-2 +kerning first=86 second=104 amount=1 +kerning first=86 second=102 amount=-2 +kerning first=86 second=93 amount=2 +kerning first=86 second=90 amount=-1 +kerning first=86 second=88 amount=2 +kerning first=86 second=89 amount=1 +kerning first=86 second=65 amount=-7 +kerning first=86 second=75 amount=2 +kerning first=86 second=78 amount=1 +kerning first=86 second=53 amount=-1 +kerning first=86 second=86 amount=2 +kerning first=86 second=85 amount=2 +kerning first=86 second=83 amount=-1 +kerning first=86 second=48 amount=-3 +kerning first=86 second=68 amount=1 +kerning first=86 second=76 amount=2 +kerning first=86 second=74 amount=-5 +kerning first=86 second=56 amount=-3 +kerning first=86 second=69 amount=1 +kerning first=86 second=108 amount=2 +kerning first=86 second=82 amount=2 +kerning first=86 second=52 amount=-4 +kerning first=86 second=50 amount=-4 +kerning first=86 second=92 amount=2 +kerning first=86 second=47 amount=-6 +kerning first=86 second=51 amount=-3 +kerning first=86 second=107 amount=2 +kerning first=86 second=66 amount=2 +kerning first=86 second=80 amount=2 +kerning first=86 second=49 amount=-4 +kerning first=86 second=41 amount=2 +kerning first=86 second=73 amount=2 +kerning first=86 second=33 amount=2 +kerning first=86 second=64 amount=-5 +kerning first=86 second=54 amount=-3 +kerning first=86 second=57 amount=-3 +kerning first=86 second=105 amount=1 +kerning first=86 second=100 amount=-4 +kerning first=86 second=113 amount=-4 +kerning first=86 second=112 amount=-2 +kerning first=86 second=98 amount=2 +kerning first=86 second=103 amount=-4 +kerning first=86 second=59 amount=-3 +kerning first=86 second=122 amount=-4 +kerning first=86 second=110 amount=-2 +kerning first=86 second=120 amount=-2 +kerning first=86 second=114 amount=-2 +kerning first=86 second=117 amount=-2 +kerning first=86 second=109 amount=-2 +kerning first=86 second=97 amount=-3 +kerning first=86 second=111 amount=-3 +kerning first=86 second=101 amount=-4 +kerning first=86 second=99 amount=-4 +kerning first=86 second=115 amount=-4 +kerning first=86 second=58 amount=-4 +kerning first=86 second=35 amount=-2 +kerning first=86 second=34 amount=3 +kerning first=86 second=39 amount=3 +kerning first=86 second=44 amount=-7 +kerning first=86 second=45 amount=-4 +kerning first=86 second=46 amount=-7 +kerning first=85 second=106 amount=1 +kerning first=85 second=87 amount=2 +kerning first=85 second=84 amount=1 +kerning first=85 second=102 amount=2 +kerning first=85 second=93 amount=1 +kerning first=85 second=88 amount=2 +kerning first=85 second=89 amount=1 +kerning first=85 second=65 amount=-3 +kerning first=85 second=75 amount=2 +kerning first=85 second=86 amount=2 +kerning first=85 second=85 amount=2 +kerning first=85 second=68 amount=1 +kerning first=85 second=76 amount=2 +kerning first=85 second=63 amount=1 +kerning first=85 second=56 amount=-1 +kerning first=85 second=108 amount=2 +kerning first=85 second=82 amount=2 +kerning first=85 second=50 amount=-2 +kerning first=85 second=92 amount=2 +kerning first=85 second=47 amount=-2 +kerning first=85 second=71 amount=1 +kerning first=85 second=51 amount=-1 +kerning first=85 second=107 amount=2 +kerning first=85 second=66 amount=2 +kerning first=85 second=80 amount=1 +kerning first=85 second=49 amount=-4 +kerning first=85 second=40 amount=1 +kerning first=85 second=41 amount=1 +kerning first=85 second=73 amount=2 +kerning first=85 second=33 amount=2 +kerning first=85 second=54 amount=-1 +kerning first=85 second=57 amount=-1 +kerning first=85 second=67 amount=1 +kerning first=85 second=105 amount=1 +kerning first=85 second=112 amount=1 +kerning first=85 second=98 amount=2 +kerning first=85 second=116 amount=3 +kerning first=85 second=121 amount=2 +kerning first=85 second=119 amount=3 +kerning first=85 second=118 amount=3 +kerning first=85 second=110 amount=1 +kerning first=85 second=120 amount=2 +kerning first=85 second=114 amount=1 +kerning first=85 second=117 amount=1 +kerning first=85 second=97 amount=1 +kerning first=85 second=34 amount=2 +kerning first=85 second=39 amount=3 +kerning first=85 second=44 amount=-4 +kerning first=85 second=46 amount=-2 +kerning first=83 second=106 amount=1 +kerning first=83 second=104 amount=1 +kerning first=83 second=90 amount=2 +kerning first=83 second=88 amount=1 +kerning first=83 second=89 amount=-2 +kerning first=83 second=53 amount=1 +kerning first=83 second=83 amount=2 +kerning first=83 second=74 amount=1 +kerning first=83 second=108 amount=2 +kerning first=83 second=71 amount=1 +kerning first=83 second=107 amount=2 +kerning first=83 second=49 amount=-5 +kerning first=83 second=40 amount=1 +kerning first=83 second=41 amount=1 +kerning first=83 second=33 amount=2 +kerning first=83 second=67 amount=2 +kerning first=83 second=105 amount=2 +kerning first=83 second=100 amount=2 +kerning first=83 second=113 amount=2 +kerning first=83 second=112 amount=1 +kerning first=83 second=98 amount=1 +kerning first=83 second=116 amount=-1 +kerning first=83 second=103 amount=2 +kerning first=83 second=121 amount=2 +kerning first=83 second=119 amount=3 +kerning first=83 second=118 amount=3 +kerning first=83 second=122 amount=1 +kerning first=83 second=110 amount=2 +kerning first=83 second=120 amount=2 +kerning first=83 second=114 amount=2 +kerning first=83 second=117 amount=2 +kerning first=83 second=97 amount=3 +kerning first=83 second=111 amount=2 +kerning first=83 second=101 amount=2 +kerning first=83 second=99 amount=2 +kerning first=83 second=115 amount=2 +kerning first=83 second=46 amount=2 +kerning first=72 second=106 amount=2 +kerning first=72 second=87 amount=1 +kerning first=72 second=81 amount=2 +kerning first=72 second=104 amount=2 +kerning first=72 second=102 amount=2 +kerning first=72 second=93 amount=1 +kerning first=72 second=88 amount=2 +kerning first=72 second=75 amount=2 +kerning first=72 second=86 amount=2 +kerning first=72 second=85 amount=1 +kerning first=72 second=72 amount=2 +kerning first=72 second=76 amount=2 +kerning first=72 second=56 amount=-2 +kerning first=72 second=69 amount=1 +kerning first=72 second=108 amount=2 +kerning first=72 second=82 amount=2 +kerning first=72 second=52 amount=1 +kerning first=72 second=92 amount=1 +kerning first=72 second=71 amount=2 +kerning first=72 second=51 amount=-2 +kerning first=72 second=107 amount=2 +kerning first=72 second=66 amount=2 +kerning first=72 second=80 amount=1 +kerning first=72 second=49 amount=-5 +kerning first=72 second=40 amount=2 +kerning first=72 second=41 amount=1 +kerning first=72 second=73 amount=2 +kerning first=72 second=33 amount=2 +kerning first=72 second=79 amount=2 +kerning first=72 second=57 amount=-1 +kerning first=72 second=67 amount=2 +kerning first=72 second=105 amount=2 +kerning first=72 second=100 amount=2 +kerning first=72 second=113 amount=2 +kerning first=72 second=112 amount=1 +kerning first=72 second=98 amount=2 +kerning first=72 second=116 amount=3 +kerning first=72 second=103 amount=2 +kerning first=72 second=121 amount=1 +kerning first=72 second=59 amount=1 +kerning first=72 second=119 amount=3 +kerning first=72 second=118 amount=2 +kerning first=72 second=110 amount=2 +kerning first=72 second=120 amount=2 +kerning first=72 second=114 amount=2 +kerning first=72 second=117 amount=2 +kerning first=72 second=97 amount=2 +kerning first=72 second=111 amount=2 +kerning first=72 second=101 amount=2 +kerning first=72 second=99 amount=2 +kerning first=72 second=115 amount=1 +kerning first=72 second=35 amount=2 +kerning first=72 second=34 amount=2 +kerning first=72 second=39 amount=2 +kerning first=72 second=45 amount=2 +kerning first=72 second=46 amount=1 +kerning first=48 second=87 amount=-3 +kerning first=48 second=77 amount=-3 +kerning first=48 second=84 amount=-2 +kerning first=48 second=104 amount=-1 +kerning first=48 second=93 amount=-3 +kerning first=48 second=90 amount=-2 +kerning first=48 second=88 amount=-3 +kerning first=48 second=89 amount=-5 +kerning first=48 second=65 amount=-4 +kerning first=48 second=75 amount=-2 +kerning first=48 second=78 amount=-2 +kerning first=48 second=86 amount=-3 +kerning first=48 second=85 amount=-1 +kerning first=48 second=68 amount=-2 +kerning first=48 second=76 amount=-2 +kerning first=48 second=74 amount=-1 +kerning first=48 second=63 amount=-1 +kerning first=48 second=69 amount=-1 +kerning first=48 second=82 amount=-2 +kerning first=48 second=92 amount=-4 +kerning first=48 second=47 amount=-3 +kerning first=48 second=66 amount=-1 +kerning first=48 second=80 amount=-1 +kerning first=48 second=70 amount=-2 +kerning first=48 second=41 amount=-3 +kerning first=48 second=73 amount=-1 +kerning first=48 second=64 amount=-2 +kerning first=48 second=98 amount=-1 +kerning first=48 second=116 amount=1 +kerning first=48 second=119 amount=2 +kerning first=48 second=118 amount=1 +kerning first=48 second=122 amount=-2 +kerning first=48 second=109 amount=-1 +kerning first=48 second=115 amount=-1 +kerning first=48 second=58 amount=-2 +kerning first=48 second=34 amount=-1 +kerning first=48 second=39 amount=-1 +kerning first=48 second=44 amount=-4 +kerning first=48 second=46 amount=-2 +kerning first=68 second=106 amount=1 +kerning first=68 second=87 amount=1 +kerning first=68 second=84 amount=2 +kerning first=68 second=104 amount=1 +kerning first=68 second=102 amount=1 +kerning first=68 second=90 amount=-2 +kerning first=68 second=65 amount=-4 +kerning first=68 second=75 amount=1 +kerning first=68 second=53 amount=-1 +kerning first=68 second=86 amount=1 +kerning first=68 second=85 amount=1 +kerning first=68 second=76 amount=1 +kerning first=68 second=74 amount=-2 +kerning first=68 second=63 amount=2 +kerning first=68 second=108 amount=2 +kerning first=68 second=82 amount=1 +kerning first=68 second=52 amount=-1 +kerning first=68 second=50 amount=-2 +kerning first=68 second=47 amount=-6 +kerning first=68 second=107 amount=2 +kerning first=68 second=66 amount=1 +kerning first=68 second=80 amount=1 +kerning first=68 second=49 amount=-3 +kerning first=68 second=40 amount=1 +kerning first=68 second=73 amount=1 +kerning first=68 second=33 amount=2 +kerning first=68 second=64 amount=-2 +kerning first=68 second=54 amount=-1 +kerning first=68 second=67 amount=1 +kerning first=68 second=105 amount=2 +kerning first=68 second=112 amount=1 +kerning first=68 second=98 amount=2 +kerning first=68 second=116 amount=2 +kerning first=68 second=121 amount=2 +kerning first=68 second=119 amount=3 +kerning first=68 second=118 amount=3 +kerning first=68 second=110 amount=1 +kerning first=68 second=120 amount=1 +kerning first=68 second=114 amount=1 +kerning first=68 second=117 amount=1 +kerning first=68 second=101 amount=-1 +kerning first=68 second=34 amount=3 +kerning first=68 second=39 amount=3 +kerning first=68 second=44 amount=-8 +kerning first=68 second=46 amount=-6 +kerning first=76 second=106 amount=2 +kerning first=76 second=87 amount=-4 +kerning first=76 second=84 amount=-4 +kerning first=76 second=104 amount=1 +kerning first=76 second=102 amount=-2 +kerning first=76 second=90 amount=2 +kerning first=76 second=88 amount=2 +kerning first=76 second=89 amount=-6 +kerning first=76 second=53 amount=1 +kerning first=76 second=86 amount=-4 +kerning first=76 second=83 amount=2 +kerning first=76 second=63 amount=-3 +kerning first=76 second=108 amount=2 +kerning first=76 second=52 amount=-3 +kerning first=76 second=92 amount=-7 +kerning first=76 second=47 amount=1 +kerning first=76 second=107 amount=2 +kerning first=76 second=49 amount=-6 +kerning first=76 second=41 amount=1 +kerning first=76 second=33 amount=2 +kerning first=76 second=54 amount=-1 +kerning first=76 second=67 amount=1 +kerning first=76 second=105 amount=2 +kerning first=76 second=100 amount=1 +kerning first=76 second=113 amount=2 +kerning first=76 second=112 amount=2 +kerning first=76 second=98 amount=1 +kerning first=76 second=116 amount=-2 +kerning first=76 second=103 amount=2 +kerning first=76 second=121 amount=-2 +kerning first=76 second=59 amount=1 +kerning first=76 second=122 amount=2 +kerning first=76 second=110 amount=2 +kerning first=76 second=120 amount=3 +kerning first=76 second=114 amount=2 +kerning first=76 second=117 amount=2 +kerning first=76 second=97 amount=3 +kerning first=76 second=111 amount=2 +kerning first=76 second=101 amount=2 +kerning first=76 second=99 amount=2 +kerning first=76 second=115 amount=3 +kerning first=76 second=58 amount=1 +kerning first=76 second=35 amount=-7 +kerning first=76 second=34 amount=-7 +kerning first=76 second=39 amount=-7 +kerning first=76 second=44 amount=1 +kerning first=76 second=45 amount=-7 +kerning first=76 second=46 amount=3 +kerning first=74 second=106 amount=1 +kerning first=74 second=87 amount=3 +kerning first=74 second=77 amount=1 +kerning first=74 second=84 amount=1 +kerning first=74 second=104 amount=2 +kerning first=74 second=102 amount=1 +kerning first=74 second=93 amount=2 +kerning first=74 second=88 amount=3 +kerning first=74 second=89 amount=2 +kerning first=74 second=75 amount=2 +kerning first=74 second=78 amount=2 +kerning first=74 second=86 amount=3 +kerning first=74 second=85 amount=2 +kerning first=74 second=72 amount=1 +kerning first=74 second=68 amount=2 +kerning first=74 second=76 amount=2 +kerning first=74 second=63 amount=1 +kerning first=74 second=56 amount=-2 +kerning first=74 second=69 amount=2 +kerning first=74 second=108 amount=2 +kerning first=74 second=82 amount=2 +kerning first=74 second=92 amount=2 +kerning first=74 second=71 amount=1 +kerning first=74 second=51 amount=-2 +kerning first=74 second=107 amount=2 +kerning first=74 second=66 amount=3 +kerning first=74 second=80 amount=2 +kerning first=74 second=49 amount=-3 +kerning first=74 second=41 amount=2 +kerning first=74 second=73 amount=2 +kerning first=74 second=33 amount=2 +kerning first=74 second=54 amount=-1 +kerning first=74 second=57 amount=-1 +kerning first=74 second=67 amount=1 +kerning first=74 second=105 amount=2 +kerning first=74 second=98 amount=2 +kerning first=74 second=116 amount=3 +kerning first=74 second=121 amount=2 +kerning first=74 second=119 amount=3 +kerning first=74 second=118 amount=3 +kerning first=74 second=120 amount=1 +kerning first=74 second=114 amount=1 +kerning first=74 second=97 amount=1 +kerning first=74 second=111 amount=1 +kerning first=74 second=115 amount=1 +kerning first=74 second=34 amount=3 +kerning first=74 second=39 amount=3 +kerning first=63 second=87 amount=2 +kerning first=63 second=84 amount=2 +kerning first=63 second=102 amount=-1 +kerning first=63 second=93 amount=1 +kerning first=63 second=90 amount=-2 +kerning first=63 second=88 amount=1 +kerning first=63 second=65 amount=-4 +kerning first=63 second=75 amount=1 +kerning first=63 second=53 amount=-2 +kerning first=63 second=86 amount=2 +kerning first=63 second=85 amount=1 +kerning first=63 second=48 amount=-2 +kerning first=63 second=74 amount=-5 +kerning first=63 second=63 amount=2 +kerning first=63 second=56 amount=-1 +kerning first=63 second=108 amount=2 +kerning first=63 second=82 amount=1 +kerning first=63 second=52 amount=-5 +kerning first=63 second=50 amount=-2 +kerning first=63 second=92 amount=1 +kerning first=63 second=47 amount=-3 +kerning first=63 second=51 amount=-1 +kerning first=63 second=107 amount=1 +kerning first=63 second=66 amount=2 +kerning first=63 second=80 amount=1 +kerning first=63 second=49 amount=-3 +kerning first=63 second=73 amount=1 +kerning first=63 second=33 amount=2 +kerning first=63 second=64 amount=-6 +kerning first=63 second=54 amount=-2 +kerning first=63 second=57 amount=-2 +kerning first=63 second=105 amount=2 +kerning first=63 second=100 amount=-3 +kerning first=63 second=113 amount=-3 +kerning first=63 second=98 amount=2 +kerning first=63 second=103 amount=-3 +kerning first=63 second=59 amount=-2 +kerning first=63 second=119 amount=2 +kerning first=63 second=118 amount=1 +kerning first=63 second=122 amount=-3 +kerning first=63 second=97 amount=-2 +kerning first=63 second=111 amount=-3 +kerning first=63 second=101 amount=-4 +kerning first=63 second=99 amount=-4 +kerning first=63 second=115 amount=-3 +kerning first=63 second=58 amount=-3 +kerning first=63 second=35 amount=-1 +kerning first=63 second=34 amount=2 +kerning first=63 second=39 amount=3 +kerning first=63 second=44 amount=-2 +kerning first=63 second=45 amount=-5 +kerning first=63 second=46 amount=-3 +kerning first=56 second=106 amount=-2 +kerning first=56 second=87 amount=-3 +kerning first=56 second=81 amount=-3 +kerning first=56 second=77 amount=-4 +kerning first=56 second=84 amount=-3 +kerning first=56 second=104 amount=-2 +kerning first=56 second=102 amount=-5 +kerning first=56 second=93 amount=-3 +kerning first=56 second=90 amount=-3 +kerning first=56 second=88 amount=-3 +kerning first=56 second=89 amount=-4 +kerning first=56 second=65 amount=-4 +kerning first=56 second=75 amount=-3 +kerning first=56 second=78 amount=-3 +kerning first=56 second=86 amount=-2 +kerning first=56 second=85 amount=-3 +kerning first=56 second=83 amount=-2 +kerning first=56 second=72 amount=-3 +kerning first=56 second=68 amount=-3 +kerning first=56 second=76 amount=-3 +kerning first=56 second=74 amount=-2 +kerning first=56 second=63 amount=-2 +kerning first=56 second=69 amount=-3 +kerning first=56 second=108 amount=-2 +kerning first=56 second=82 amount=-3 +kerning first=56 second=92 amount=-3 +kerning first=56 second=47 amount=-4 +kerning first=56 second=71 amount=-2 +kerning first=56 second=107 amount=-2 +kerning first=56 second=66 amount=-3 +kerning first=56 second=80 amount=-3 +kerning first=56 second=70 amount=-3 +kerning first=56 second=40 amount=-2 +kerning first=56 second=41 amount=-3 +kerning first=56 second=73 amount=-3 +kerning first=56 second=33 amount=-2 +kerning first=56 second=64 amount=-3 +kerning first=56 second=79 amount=-3 +kerning first=56 second=67 amount=-2 +kerning first=56 second=105 amount=-2 +kerning first=56 second=100 amount=-2 +kerning first=56 second=113 amount=-2 +kerning first=56 second=112 amount=-3 +kerning first=56 second=98 amount=-2 +kerning first=56 second=116 amount=-4 +kerning first=56 second=103 amount=-2 +kerning first=56 second=121 amount=-2 +kerning first=56 second=59 amount=-5 +kerning first=56 second=119 amount=-2 +kerning first=56 second=118 amount=-2 +kerning first=56 second=122 amount=-4 +kerning first=56 second=110 amount=-2 +kerning first=56 second=120 amount=-3 +kerning first=56 second=114 amount=-2 +kerning first=56 second=117 amount=-2 +kerning first=56 second=109 amount=-3 +kerning first=56 second=97 amount=-1 +kerning first=56 second=111 amount=-2 +kerning first=56 second=101 amount=-2 +kerning first=56 second=99 amount=-2 +kerning first=56 second=115 amount=-2 +kerning first=56 second=58 amount=-4 +kerning first=56 second=35 amount=-3 +kerning first=56 second=34 amount=-2 +kerning first=56 second=39 amount=-2 +kerning first=56 second=44 amount=-6 +kerning first=56 second=45 amount=-3 +kerning first=56 second=46 amount=-3 +kerning first=69 second=87 amount=2 +kerning first=69 second=81 amount=-1 +kerning first=69 second=102 amount=-2 +kerning first=69 second=93 amount=1 +kerning first=69 second=90 amount=1 +kerning first=69 second=88 amount=2 +kerning first=69 second=75 amount=2 +kerning first=69 second=86 amount=2 +kerning first=69 second=85 amount=1 +kerning first=69 second=48 amount=-2 +kerning first=69 second=76 amount=2 +kerning first=69 second=74 amount=-3 +kerning first=69 second=63 amount=-1 +kerning first=69 second=56 amount=-2 +kerning first=69 second=108 amount=2 +kerning first=69 second=82 amount=2 +kerning first=69 second=52 amount=-1 +kerning first=69 second=92 amount=1 +kerning first=69 second=51 amount=-1 +kerning first=69 second=107 amount=1 +kerning first=69 second=66 amount=2 +kerning first=69 second=80 amount=1 +kerning first=69 second=49 amount=-4 +kerning first=69 second=41 amount=1 +kerning first=69 second=73 amount=2 +kerning first=69 second=33 amount=2 +kerning first=69 second=64 amount=-1 +kerning first=69 second=54 amount=-3 +kerning first=69 second=57 amount=-2 +kerning first=69 second=105 amount=1 +kerning first=69 second=98 amount=1 +kerning first=69 second=121 amount=-2 +kerning first=69 second=118 amount=-1 +kerning first=69 second=120 amount=2 +kerning first=69 second=97 amount=1 +kerning first=69 second=35 amount=-1 +kerning first=69 second=34 amount=2 +kerning first=69 second=39 amount=2 +kerning first=69 second=46 amount=1 +kerning first=108 second=106 amount=2 +kerning first=108 second=104 amount=1 +kerning first=108 second=102 amount=2 +kerning first=108 second=93 amount=2 +kerning first=108 second=63 amount=2 +kerning first=108 second=108 amount=3 +kerning first=108 second=50 amount=1 +kerning first=108 second=92 amount=2 +kerning first=108 second=47 amount=2 +kerning first=108 second=107 amount=2 +kerning first=108 second=49 amount=-4 +kerning first=108 second=40 amount=1 +kerning first=108 second=41 amount=2 +kerning first=108 second=33 amount=2 +kerning first=108 second=105 amount=2 +kerning first=108 second=100 amount=1 +kerning first=108 second=113 amount=1 +kerning first=108 second=112 amount=2 +kerning first=108 second=98 amount=2 +kerning first=108 second=116 amount=3 +kerning first=108 second=103 amount=2 +kerning first=108 second=121 amount=3 +kerning first=108 second=59 amount=3 +kerning first=108 second=119 amount=4 +kerning first=108 second=118 amount=3 +kerning first=108 second=122 amount=2 +kerning first=108 second=110 amount=2 +kerning first=108 second=120 amount=3 +kerning first=108 second=114 amount=2 +kerning first=108 second=117 amount=2 +kerning first=108 second=97 amount=2 +kerning first=108 second=111 amount=2 +kerning first=108 second=101 amount=1 +kerning first=108 second=99 amount=2 +kerning first=108 second=115 amount=2 +kerning first=108 second=58 amount=2 +kerning first=108 second=35 amount=1 +kerning first=108 second=34 amount=3 +kerning first=108 second=39 amount=3 +kerning first=108 second=44 amount=3 +kerning first=108 second=45 amount=1 +kerning first=108 second=46 amount=3 +kerning first=82 second=106 amount=3 +kerning first=82 second=77 amount=2 +kerning first=82 second=104 amount=2 +kerning first=82 second=93 amount=1 +kerning first=82 second=90 amount=3 +kerning first=82 second=88 amount=4 +kerning first=82 second=89 amount=-2 +kerning first=82 second=65 amount=2 +kerning first=82 second=75 amount=2 +kerning first=82 second=78 amount=2 +kerning first=82 second=53 amount=1 +kerning first=82 second=72 amount=2 +kerning first=82 second=68 amount=1 +kerning first=82 second=76 amount=2 +kerning first=82 second=74 amount=-2 +kerning first=82 second=63 amount=-1 +kerning first=82 second=69 amount=2 +kerning first=82 second=108 amount=3 +kerning first=82 second=82 amount=2 +kerning first=82 second=52 amount=-7 +kerning first=82 second=50 amount=2 +kerning first=82 second=92 amount=-1 +kerning first=82 second=47 amount=3 +kerning first=82 second=55 amount=2 +kerning first=82 second=107 amount=3 +kerning first=82 second=66 amount=2 +kerning first=82 second=80 amount=3 +kerning first=82 second=70 amount=2 +kerning first=82 second=49 amount=-5 +kerning first=82 second=40 amount=1 +kerning first=82 second=41 amount=3 +kerning first=82 second=73 amount=3 +kerning first=82 second=33 amount=3 +kerning first=82 second=54 amount=-2 +kerning first=82 second=57 amount=-1 +kerning first=82 second=67 amount=2 +kerning first=82 second=105 amount=3 +kerning first=82 second=100 amount=2 +kerning first=82 second=113 amount=1 +kerning first=82 second=112 amount=2 +kerning first=82 second=98 amount=3 +kerning first=82 second=103 amount=2 +kerning first=82 second=121 amount=-2 +kerning first=82 second=59 amount=3 +kerning first=82 second=122 amount=3 +kerning first=82 second=110 amount=3 +kerning first=82 second=120 amount=4 +kerning first=82 second=114 amount=3 +kerning first=82 second=117 amount=2 +kerning first=82 second=97 amount=4 +kerning first=82 second=111 amount=2 +kerning first=82 second=101 amount=2 +kerning first=82 second=99 amount=2 +kerning first=82 second=115 amount=3 +kerning first=82 second=58 amount=3 +kerning first=82 second=35 amount=-5 +kerning first=82 second=44 amount=4 +kerning first=82 second=45 amount=-9 +kerning first=82 second=46 amount=5 +kerning first=52 second=106 amount=2 +kerning first=52 second=87 amount=-2 +kerning first=52 second=81 amount=2 +kerning first=52 second=84 amount=-3 +kerning first=52 second=104 amount=1 +kerning first=52 second=102 amount=1 +kerning first=52 second=93 amount=-3 +kerning first=52 second=90 amount=-4 +kerning first=52 second=88 amount=-3 +kerning first=52 second=89 amount=-4 +kerning first=52 second=65 amount=-2 +kerning first=52 second=86 amount=-2 +kerning first=52 second=85 amount=1 +kerning first=52 second=83 amount=-2 +kerning first=52 second=72 amount=2 +kerning first=52 second=63 amount=-2 +kerning first=52 second=69 amount=1 +kerning first=52 second=108 amount=2 +kerning first=52 second=92 amount=-3 +kerning first=52 second=47 amount=-4 +kerning first=52 second=71 amount=2 +kerning first=52 second=107 amount=2 +kerning first=52 second=66 amount=1 +kerning first=52 second=80 amount=1 +kerning first=52 second=40 amount=2 +kerning first=52 second=41 amount=-1 +kerning first=52 second=73 amount=1 +kerning first=52 second=33 amount=2 +kerning first=52 second=79 amount=1 +kerning first=52 second=67 amount=2 +kerning first=52 second=105 amount=2 +kerning first=52 second=100 amount=2 +kerning first=52 second=113 amount=2 +kerning first=52 second=112 amount=1 +kerning first=52 second=98 amount=1 +kerning first=52 second=116 amount=2 +kerning first=52 second=103 amount=2 +kerning first=52 second=121 amount=1 +kerning first=52 second=119 amount=3 +kerning first=52 second=118 amount=2 +kerning first=52 second=122 amount=-2 +kerning first=52 second=110 amount=2 +kerning first=52 second=114 amount=2 +kerning first=52 second=117 amount=2 +kerning first=52 second=97 amount=2 +kerning first=52 second=111 amount=2 +kerning first=52 second=101 amount=2 +kerning first=52 second=99 amount=2 +kerning first=52 second=115 amount=1 +kerning first=52 second=35 amount=2 +kerning first=52 second=34 amount=-3 +kerning first=52 second=39 amount=-3 +kerning first=52 second=44 amount=-4 +kerning first=52 second=45 amount=3 +kerning first=52 second=46 amount=-4 +kerning first=50 second=106 amount=1 +kerning first=50 second=81 amount=-1 +kerning first=50 second=90 amount=2 +kerning first=50 second=88 amount=2 +kerning first=50 second=74 amount=-3 +kerning first=50 second=108 amount=1 +kerning first=50 second=47 amount=1 +kerning first=50 second=107 amount=1 +kerning first=50 second=41 amount=1 +kerning first=50 second=105 amount=1 +kerning first=50 second=98 amount=1 +kerning first=50 second=119 amount=2 +kerning first=50 second=118 amount=2 +kerning first=50 second=122 amount=1 +kerning first=50 second=110 amount=1 +kerning first=50 second=120 amount=2 +kerning first=50 second=97 amount=2 +kerning first=50 second=115 amount=1 +kerning first=50 second=35 amount=-1 +kerning first=50 second=34 amount=1 +kerning first=50 second=39 amount=2 +kerning first=50 second=45 amount=-4 +kerning first=50 second=46 amount=2 +kerning first=92 second=87 amount=-5 +kerning first=92 second=81 amount=-2 +kerning first=92 second=84 amount=-4 +kerning first=92 second=102 amount=-3 +kerning first=92 second=93 amount=-1 +kerning first=92 second=88 amount=1 +kerning first=92 second=89 amount=-6 +kerning first=92 second=86 amount=-5 +kerning first=92 second=85 amount=-3 +kerning first=92 second=83 amount=-1 +kerning first=92 second=48 amount=-3 +kerning first=92 second=74 amount=-3 +kerning first=92 second=63 amount=-5 +kerning first=92 second=56 amount=-2 +kerning first=92 second=108 amount=1 +kerning first=92 second=52 amount=-4 +kerning first=92 second=92 amount=-9 +kerning first=92 second=71 amount=-2 +kerning first=92 second=51 amount=-2 +kerning first=92 second=49 amount=-7 +kerning first=92 second=64 amount=-1 +kerning first=92 second=79 amount=-3 +kerning first=92 second=54 amount=-4 +kerning first=92 second=57 amount=-3 +kerning first=92 second=116 amount=-3 +kerning first=92 second=121 amount=-4 +kerning first=92 second=59 amount=1 +kerning first=92 second=119 amount=-1 +kerning first=92 second=118 amount=-2 +kerning first=92 second=122 amount=2 +kerning first=92 second=110 amount=1 +kerning first=92 second=120 amount=3 +kerning first=92 second=114 amount=1 +kerning first=92 second=97 amount=2 +kerning first=92 second=115 amount=1 +kerning first=92 second=58 amount=1 +kerning first=92 second=35 amount=-5 +kerning first=92 second=34 amount=-12 +kerning first=92 second=39 amount=-9 +kerning first=92 second=44 amount=2 +kerning first=92 second=45 amount=-4 +kerning first=92 second=46 amount=3 +kerning first=47 second=87 amount=1 +kerning first=47 second=81 amount=-3 +kerning first=47 second=102 amount=-4 +kerning first=47 second=90 amount=-2 +kerning first=47 second=88 amount=1 +kerning first=47 second=65 amount=-8 +kerning first=47 second=75 amount=1 +kerning first=47 second=53 amount=-2 +kerning first=47 second=86 amount=1 +kerning first=47 second=83 amount=-2 +kerning first=47 second=48 amount=-4 +kerning first=47 second=76 amount=1 +kerning first=47 second=74 amount=-9 +kerning first=47 second=63 amount=-2 +kerning first=47 second=56 amount=-4 +kerning first=47 second=52 amount=-9 +kerning first=47 second=50 amount=-6 +kerning first=47 second=47 amount=-12 +kerning first=47 second=71 amount=-2 +kerning first=47 second=55 amount=-1 +kerning first=47 second=51 amount=-5 +kerning first=47 second=66 amount=1 +kerning first=47 second=49 amount=-5 +kerning first=47 second=40 amount=-1 +kerning first=47 second=64 amount=-10 +kerning first=47 second=79 amount=-2 +kerning first=47 second=54 amount=-4 +kerning first=47 second=57 amount=-4 +kerning first=47 second=67 amount=-2 +kerning first=47 second=100 amount=-7 +kerning first=47 second=113 amount=-7 +kerning first=47 second=112 amount=-4 +kerning first=47 second=116 amount=-4 +kerning first=47 second=103 amount=-7 +kerning first=47 second=121 amount=-3 +kerning first=47 second=59 amount=-6 +kerning first=47 second=119 amount=-3 +kerning first=47 second=118 amount=-3 +kerning first=47 second=122 amount=-7 +kerning first=47 second=110 amount=-5 +kerning first=47 second=120 amount=-4 +kerning first=47 second=114 amount=-5 +kerning first=47 second=117 amount=-5 +kerning first=47 second=109 amount=-5 +kerning first=47 second=97 amount=-6 +kerning first=47 second=111 amount=-7 +kerning first=47 second=101 amount=-8 +kerning first=47 second=99 amount=-8 +kerning first=47 second=115 amount=-7 +kerning first=47 second=58 amount=-7 +kerning first=47 second=35 amount=-5 +kerning first=47 second=34 amount=3 +kerning first=47 second=39 amount=3 +kerning first=47 second=44 amount=-8 +kerning first=47 second=45 amount=-9 +kerning first=47 second=46 amount=-10 +kerning first=71 second=106 amount=2 +kerning first=71 second=81 amount=2 +kerning first=71 second=84 amount=-3 +kerning first=71 second=104 amount=2 +kerning first=71 second=102 amount=1 +kerning first=71 second=93 amount=-4 +kerning first=71 second=90 amount=-3 +kerning first=71 second=88 amount=-3 +kerning first=71 second=89 amount=-4 +kerning first=71 second=75 amount=1 +kerning first=71 second=78 amount=1 +kerning first=71 second=53 amount=-2 +kerning first=71 second=86 amount=-1 +kerning first=71 second=85 amount=2 +kerning first=71 second=83 amount=-2 +kerning first=71 second=72 amount=3 +kerning first=71 second=48 amount=1 +kerning first=71 second=68 amount=1 +kerning first=71 second=76 amount=1 +kerning first=71 second=74 amount=1 +kerning first=71 second=63 amount=-1 +kerning first=71 second=56 amount=-2 +kerning first=71 second=69 amount=2 +kerning first=71 second=108 amount=3 +kerning first=71 second=82 amount=1 +kerning first=71 second=52 amount=2 +kerning first=71 second=50 amount=-5 +kerning first=71 second=92 amount=-4 +kerning first=71 second=47 amount=-3 +kerning first=71 second=71 amount=3 +kerning first=71 second=55 amount=-4 +kerning first=71 second=51 amount=-3 +kerning first=71 second=107 amount=3 +kerning first=71 second=66 amount=2 +kerning first=71 second=80 amount=2 +kerning first=71 second=70 amount=1 +kerning first=71 second=49 amount=-6 +kerning first=71 second=40 amount=3 +kerning first=71 second=73 amount=2 +kerning first=71 second=33 amount=3 +kerning first=71 second=64 amount=2 +kerning first=71 second=79 amount=2 +kerning first=71 second=57 amount=-1 +kerning first=71 second=67 amount=3 +kerning first=71 second=105 amount=3 +kerning first=71 second=100 amount=3 +kerning first=71 second=113 amount=3 +kerning first=71 second=112 amount=2 +kerning first=71 second=98 amount=2 +kerning first=71 second=116 amount=3 +kerning first=71 second=103 amount=3 +kerning first=71 second=121 amount=2 +kerning first=71 second=119 amount=3 +kerning first=71 second=118 amount=2 +kerning first=71 second=122 amount=-3 +kerning first=71 second=110 amount=3 +kerning first=71 second=114 amount=2 +kerning first=71 second=117 amount=3 +kerning first=71 second=109 amount=2 +kerning first=71 second=97 amount=2 +kerning first=71 second=111 amount=3 +kerning first=71 second=101 amount=3 +kerning first=71 second=99 amount=3 +kerning first=71 second=115 amount=2 +kerning first=71 second=35 amount=3 +kerning first=71 second=34 amount=-2 +kerning first=71 second=39 amount=-2 +kerning first=71 second=44 amount=-5 +kerning first=71 second=45 amount=3 +kerning first=71 second=46 amount=-4 +kerning first=55 second=106 amount=-2 +kerning first=55 second=81 amount=-4 +kerning first=55 second=77 amount=-2 +kerning first=55 second=104 amount=-1 +kerning first=55 second=102 amount=-5 +kerning first=55 second=90 amount=-4 +kerning first=55 second=89 amount=-1 +kerning first=55 second=65 amount=-9 +kerning first=55 second=78 amount=-1 +kerning first=55 second=83 amount=-3 +kerning first=55 second=72 amount=-2 +kerning first=55 second=68 amount=-1 +kerning first=55 second=74 amount=-7 +kerning first=55 second=63 amount=-3 +kerning first=55 second=69 amount=-1 +kerning first=55 second=47 amount=-11 +kerning first=55 second=71 amount=-3 +kerning first=55 second=70 amount=-2 +kerning first=55 second=40 amount=-2 +kerning first=55 second=64 amount=-10 +kerning first=55 second=79 amount=-3 +kerning first=55 second=67 amount=-3 +kerning first=55 second=105 amount=-1 +kerning first=55 second=100 amount=-8 +kerning first=55 second=113 amount=-8 +kerning first=55 second=112 amount=-6 +kerning first=55 second=116 amount=-5 +kerning first=55 second=103 amount=-8 +kerning first=55 second=121 amount=-4 +kerning first=55 second=59 amount=-7 +kerning first=55 second=119 amount=-4 +kerning first=55 second=118 amount=-4 +kerning first=55 second=122 amount=-8 +kerning first=55 second=110 amount=-6 +kerning first=55 second=120 amount=-5 +kerning first=55 second=114 amount=-6 +kerning first=55 second=117 amount=-6 +kerning first=55 second=109 amount=-6 +kerning first=55 second=97 amount=-7 +kerning first=55 second=111 amount=-8 +kerning first=55 second=101 amount=-9 +kerning first=55 second=99 amount=-8 +kerning first=55 second=115 amount=-8 +kerning first=55 second=58 amount=-8 +kerning first=55 second=35 amount=-5 +kerning first=55 second=39 amount=1 +kerning first=55 second=44 amount=-10 +kerning first=55 second=45 amount=-9 +kerning first=55 second=46 amount=-12 +kerning first=51 second=77 amount=-2 +kerning first=51 second=84 amount=-1 +kerning first=51 second=93 amount=-1 +kerning first=51 second=90 amount=-4 +kerning first=51 second=89 amount=-2 +kerning first=51 second=65 amount=-4 +kerning first=51 second=75 amount=-1 +kerning first=51 second=78 amount=-2 +kerning first=51 second=83 amount=-2 +kerning first=51 second=68 amount=-2 +kerning first=51 second=76 amount=-1 +kerning first=51 second=74 amount=-1 +kerning first=51 second=63 amount=-1 +kerning first=51 second=92 amount=-1 +kerning first=51 second=47 amount=-6 +kerning first=51 second=70 amount=-1 +kerning first=51 second=41 amount=-2 +kerning first=51 second=64 amount=-2 +kerning first=51 second=59 amount=-1 +kerning first=51 second=122 amount=-4 +kerning first=51 second=120 amount=-2 +kerning first=51 second=109 amount=-1 +kerning first=51 second=58 amount=-2 +kerning first=51 second=44 amount=-8 +kerning first=51 second=46 amount=-5 +kerning first=107 second=106 amount=3 +kerning first=107 second=104 amount=2 +kerning first=107 second=102 amount=2 +kerning first=107 second=53 amount=1 +kerning first=107 second=108 amount=3 +kerning first=107 second=52 amount=-3 +kerning first=107 second=50 amount=2 +kerning first=107 second=92 amount=-4 +kerning first=107 second=47 amount=3 +kerning first=107 second=55 amount=2 +kerning first=107 second=107 amount=3 +kerning first=107 second=49 amount=-5 +kerning first=107 second=40 amount=2 +kerning first=107 second=41 amount=3 +kerning first=107 second=33 amount=2 +kerning first=107 second=105 amount=3 +kerning first=107 second=100 amount=2 +kerning first=107 second=113 amount=2 +kerning first=107 second=112 amount=3 +kerning first=107 second=98 amount=3 +kerning first=107 second=116 amount=3 +kerning first=107 second=103 amount=3 +kerning first=107 second=121 amount=4 +kerning first=107 second=59 amount=3 +kerning first=107 second=119 amount=5 +kerning first=107 second=118 amount=5 +kerning first=107 second=122 amount=4 +kerning first=107 second=110 amount=3 +kerning first=107 second=120 amount=5 +kerning first=107 second=114 amount=3 +kerning first=107 second=117 amount=3 +kerning first=107 second=109 amount=2 +kerning first=107 second=97 amount=4 +kerning first=107 second=111 amount=3 +kerning first=107 second=101 amount=2 +kerning first=107 second=99 amount=3 +kerning first=107 second=115 amount=3 +kerning first=107 second=58 amount=3 +kerning first=107 second=35 amount=1 +kerning first=107 second=34 amount=-2 +kerning first=107 second=39 amount=-2 +kerning first=107 second=44 amount=4 +kerning first=107 second=45 amount=-3 +kerning first=107 second=46 amount=4 +kerning first=66 second=90 amount=-3 +kerning first=66 second=89 amount=-2 +kerning first=66 second=65 amount=-2 +kerning first=66 second=53 amount=-2 +kerning first=66 second=72 amount=1 +kerning first=66 second=56 amount=-3 +kerning first=66 second=108 amount=1 +kerning first=66 second=50 amount=-5 +kerning first=66 second=47 amount=-4 +kerning first=66 second=71 amount=2 +kerning first=66 second=55 amount=-2 +kerning first=66 second=51 amount=-4 +kerning first=66 second=107 amount=1 +kerning first=66 second=49 amount=-5 +kerning first=66 second=40 amount=1 +kerning first=66 second=41 amount=-1 +kerning first=66 second=33 amount=1 +kerning first=66 second=57 amount=-2 +kerning first=66 second=67 amount=2 +kerning first=66 second=105 amount=1 +kerning first=66 second=100 amount=1 +kerning first=66 second=113 amount=1 +kerning first=66 second=116 amount=2 +kerning first=66 second=103 amount=2 +kerning first=66 second=119 amount=2 +kerning first=66 second=122 amount=-2 +kerning first=66 second=110 amount=1 +kerning first=66 second=114 amount=1 +kerning first=66 second=117 amount=2 +kerning first=66 second=111 amount=2 +kerning first=66 second=101 amount=1 +kerning first=66 second=99 amount=1 +kerning first=66 second=35 amount=2 +kerning first=66 second=44 amount=-7 +kerning first=66 second=45 amount=2 +kerning first=66 second=46 amount=-4 +kerning first=80 second=106 amount=1 +kerning first=80 second=87 amount=3 +kerning first=80 second=77 amount=1 +kerning first=80 second=84 amount=3 +kerning first=80 second=104 amount=2 +kerning first=80 second=93 amount=2 +kerning first=80 second=88 amount=3 +kerning first=80 second=89 amount=2 +kerning first=80 second=65 amount=-5 +kerning first=80 second=75 amount=3 +kerning first=80 second=78 amount=2 +kerning first=80 second=86 amount=3 +kerning first=80 second=85 amount=3 +kerning first=80 second=72 amount=1 +kerning first=80 second=68 amount=2 +kerning first=80 second=76 amount=2 +kerning first=80 second=74 amount=-5 +kerning first=80 second=63 amount=2 +kerning first=80 second=69 amount=2 +kerning first=80 second=108 amount=3 +kerning first=80 second=82 amount=3 +kerning first=80 second=52 amount=-4 +kerning first=80 second=50 amount=-2 +kerning first=80 second=92 amount=2 +kerning first=80 second=47 amount=-8 +kerning first=80 second=71 amount=1 +kerning first=80 second=107 amount=3 +kerning first=80 second=66 amount=3 +kerning first=80 second=80 amount=2 +kerning first=80 second=70 amount=1 +kerning first=80 second=49 amount=-2 +kerning first=80 second=40 amount=1 +kerning first=80 second=41 amount=2 +kerning first=80 second=73 amount=3 +kerning first=80 second=33 amount=3 +kerning first=80 second=64 amount=-4 +kerning first=80 second=79 amount=1 +kerning first=80 second=54 amount=-1 +kerning first=80 second=67 amount=1 +kerning first=80 second=105 amount=3 +kerning first=80 second=100 amount=-2 +kerning first=80 second=113 amount=-2 +kerning first=80 second=98 amount=3 +kerning first=80 second=116 amount=1 +kerning first=80 second=103 amount=-2 +kerning first=80 second=121 amount=2 +kerning first=80 second=119 amount=3 +kerning first=80 second=118 amount=3 +kerning first=80 second=122 amount=-2 +kerning first=80 second=111 amount=-2 +kerning first=80 second=101 amount=-3 +kerning first=80 second=99 amount=-2 +kerning first=80 second=115 amount=-2 +kerning first=80 second=58 amount=-2 +kerning first=80 second=34 amount=4 +kerning first=80 second=39 amount=4 +kerning first=80 second=44 amount=-9 +kerning first=80 second=45 amount=-3 +kerning first=80 second=46 amount=-9 +kerning first=123 second=32 amount=2 +kerning first=125 second=112 amount=1 +kerning first=125 second=110 amount=1 +kerning first=125 second=109 amount=2 +kerning first=125 second=111 amount=2 +kerning first=70 second=87 amount=2 +kerning first=70 second=93 amount=1 +kerning first=70 second=90 amount=-2 +kerning first=70 second=88 amount=2 +kerning first=70 second=65 amount=-4 +kerning first=70 second=75 amount=2 +kerning first=70 second=53 amount=-2 +kerning first=70 second=86 amount=2 +kerning first=70 second=85 amount=2 +kerning first=70 second=83 amount=-1 +kerning first=70 second=48 amount=-1 +kerning first=70 second=76 amount=2 +kerning first=70 second=74 amount=-5 +kerning first=70 second=63 amount=-1 +kerning first=70 second=56 amount=-3 +kerning first=70 second=108 amount=2 +kerning first=70 second=82 amount=2 +kerning first=70 second=50 amount=-5 +kerning first=70 second=92 amount=1 +kerning first=70 second=47 amount=-6 +kerning first=70 second=51 amount=-5 +kerning first=70 second=107 amount=1 +kerning first=70 second=66 amount=2 +kerning first=70 second=80 amount=1 +kerning first=70 second=49 amount=-4 +kerning first=70 second=41 amount=1 +kerning first=70 second=73 amount=2 +kerning first=70 second=33 amount=2 +kerning first=70 second=64 amount=-1 +kerning first=70 second=54 amount=-2 +kerning first=70 second=57 amount=-3 +kerning first=70 second=105 amount=1 +kerning first=70 second=98 amount=2 +kerning first=70 second=59 amount=-1 +kerning first=70 second=122 amount=-4 +kerning first=70 second=120 amount=-2 +kerning first=70 second=109 amount=-1 +kerning first=70 second=58 amount=-2 +kerning first=70 second=34 amount=2 +kerning first=70 second=39 amount=3 +kerning first=70 second=44 amount=-7 +kerning first=70 second=46 amount=-7 +kerning first=49 second=106 amount=-6 +kerning first=49 second=87 amount=-7 +kerning first=49 second=81 amount=-8 +kerning first=49 second=77 amount=-8 +kerning first=49 second=84 amount=-8 +kerning first=49 second=104 amount=-7 +kerning first=49 second=102 amount=-7 +kerning first=49 second=93 amount=-8 +kerning first=49 second=90 amount=-6 +kerning first=49 second=88 amount=-5 +kerning first=49 second=89 amount=-8 +kerning first=49 second=65 amount=-7 +kerning first=49 second=75 amount=-7 +kerning first=49 second=78 amount=-7 +kerning first=49 second=86 amount=-7 +kerning first=49 second=85 amount=-7 +kerning first=49 second=83 amount=-7 +kerning first=49 second=72 amount=-7 +kerning first=49 second=68 amount=-8 +kerning first=49 second=76 amount=-7 +kerning first=49 second=74 amount=-8 +kerning first=49 second=63 amount=-8 +kerning first=49 second=69 amount=-7 +kerning first=49 second=108 amount=-6 +kerning first=49 second=82 amount=-7 +kerning first=49 second=92 amount=-7 +kerning first=49 second=47 amount=-6 +kerning first=49 second=71 amount=-7 +kerning first=49 second=107 amount=-6 +kerning first=49 second=66 amount=-7 +kerning first=49 second=80 amount=-6 +kerning first=49 second=70 amount=-7 +kerning first=49 second=40 amount=-8 +kerning first=49 second=41 amount=-6 +kerning first=49 second=73 amount=-6 +kerning first=49 second=33 amount=-6 +kerning first=49 second=64 amount=-9 +kerning first=49 second=79 amount=-8 +kerning first=49 second=67 amount=-7 +kerning first=49 second=105 amount=-6 +kerning first=49 second=100 amount=-7 +kerning first=49 second=113 amount=-7 +kerning first=49 second=112 amount=-7 +kerning first=49 second=98 amount=-6 +kerning first=49 second=116 amount=-6 +kerning first=49 second=103 amount=-7 +kerning first=49 second=121 amount=-7 +kerning first=49 second=59 amount=-6 +kerning first=49 second=119 amount=-6 +kerning first=49 second=118 amount=-6 +kerning first=49 second=122 amount=-6 +kerning first=49 second=110 amount=-6 +kerning first=49 second=120 amount=-5 +kerning first=49 second=114 amount=-6 +kerning first=49 second=117 amount=-7 +kerning first=49 second=109 amount=-8 +kerning first=49 second=97 amount=-5 +kerning first=49 second=111 amount=-7 +kerning first=49 second=101 amount=-7 +kerning first=49 second=99 amount=-7 +kerning first=49 second=115 amount=-6 +kerning first=49 second=58 amount=-6 +kerning first=49 second=35 amount=-8 +kerning first=49 second=34 amount=-7 +kerning first=49 second=39 amount=-7 +kerning first=49 second=44 amount=-6 +kerning first=49 second=45 amount=-8 +kerning first=49 second=46 amount=-5 +kerning first=40 second=106 amount=2 +kerning first=40 second=87 amount=2 +kerning first=40 second=81 amount=-2 +kerning first=40 second=104 amount=1 +kerning first=40 second=93 amount=2 +kerning first=40 second=90 amount=2 +kerning first=40 second=88 amount=2 +kerning first=40 second=89 amount=1 +kerning first=40 second=65 amount=1 +kerning first=40 second=75 amount=2 +kerning first=40 second=78 amount=1 +kerning first=40 second=86 amount=3 +kerning first=40 second=85 amount=2 +kerning first=40 second=48 amount=-2 +kerning first=40 second=68 amount=1 +kerning first=40 second=76 amount=2 +kerning first=40 second=74 amount=-1 +kerning first=40 second=56 amount=-2 +kerning first=40 second=69 amount=1 +kerning first=40 second=108 amount=2 +kerning first=40 second=82 amount=2 +kerning first=40 second=52 amount=-2 +kerning first=40 second=92 amount=2 +kerning first=40 second=47 amount=2 +kerning first=40 second=51 amount=-2 +kerning first=40 second=107 amount=2 +kerning first=40 second=66 amount=2 +kerning first=40 second=80 amount=2 +kerning first=40 second=49 amount=-4 +kerning first=40 second=41 amount=2 +kerning first=40 second=73 amount=2 +kerning first=40 second=33 amount=2 +kerning first=40 second=64 amount=-2 +kerning first=40 second=54 amount=-3 +kerning first=40 second=57 amount=-2 +kerning first=40 second=105 amount=1 +kerning first=40 second=112 amount=1 +kerning first=40 second=98 amount=2 +kerning first=40 second=59 amount=2 +kerning first=40 second=122 amount=2 +kerning first=40 second=110 amount=2 +kerning first=40 second=120 amount=3 +kerning first=40 second=114 amount=2 +kerning first=40 second=97 amount=2 +kerning first=40 second=58 amount=1 +kerning first=40 second=35 amount=-2 +kerning first=40 second=34 amount=3 +kerning first=40 second=39 amount=3 +kerning first=40 second=44 amount=2 +kerning first=40 second=45 amount=-2 +kerning first=40 second=46 amount=2 +kerning first=41 second=106 amount=2 +kerning first=41 second=81 amount=2 +kerning first=41 second=104 amount=1 +kerning first=41 second=102 amount=2 +kerning first=41 second=85 amount=1 +kerning first=41 second=83 amount=1 +kerning first=41 second=72 amount=2 +kerning first=41 second=74 amount=1 +kerning first=41 second=63 amount=2 +kerning first=41 second=56 amount=-1 +kerning first=41 second=69 amount=1 +kerning first=41 second=108 amount=2 +kerning first=41 second=52 amount=1 +kerning first=41 second=50 amount=-1 +kerning first=41 second=71 amount=2 +kerning first=41 second=55 amount=-1 +kerning first=41 second=107 amount=2 +kerning first=41 second=66 amount=1 +kerning first=41 second=80 amount=1 +kerning first=41 second=49 amount=-4 +kerning first=41 second=40 amount=2 +kerning first=41 second=73 amount=1 +kerning first=41 second=33 amount=2 +kerning first=41 second=79 amount=2 +kerning first=41 second=67 amount=2 +kerning first=41 second=105 amount=2 +kerning first=41 second=100 amount=2 +kerning first=41 second=113 amount=2 +kerning first=41 second=112 amount=2 +kerning first=41 second=98 amount=1 +kerning first=41 second=116 amount=4 +kerning first=41 second=103 amount=2 +kerning first=41 second=121 amount=3 +kerning first=41 second=59 amount=2 +kerning first=41 second=119 amount=4 +kerning first=41 second=118 amount=4 +kerning first=41 second=110 amount=2 +kerning first=41 second=120 amount=2 +kerning first=41 second=114 amount=2 +kerning first=41 second=117 amount=2 +kerning first=41 second=109 amount=1 +kerning first=41 second=97 amount=2 +kerning first=41 second=111 amount=2 +kerning first=41 second=101 amount=2 +kerning first=41 second=99 amount=2 +kerning first=41 second=115 amount=1 +kerning first=41 second=35 amount=2 +kerning first=41 second=34 amount=2 +kerning first=41 second=39 amount=2 +kerning first=41 second=44 amount=-1 +kerning first=41 second=45 amount=2 +kerning first=73 second=106 amount=2 +kerning first=73 second=87 amount=2 +kerning first=73 second=104 amount=1 +kerning first=73 second=102 amount=1 +kerning first=73 second=93 amount=1 +kerning first=73 second=90 amount=2 +kerning first=73 second=88 amount=2 +kerning first=73 second=65 amount=1 +kerning first=73 second=75 amount=2 +kerning first=73 second=86 amount=2 +kerning first=73 second=85 amount=2 +kerning first=73 second=83 amount=1 +kerning first=73 second=72 amount=1 +kerning first=73 second=76 amount=2 +kerning first=73 second=63 amount=1 +kerning first=73 second=56 amount=-1 +kerning first=73 second=108 amount=2 +kerning first=73 second=82 amount=2 +kerning first=73 second=92 amount=1 +kerning first=73 second=47 amount=2 +kerning first=73 second=71 amount=1 +kerning first=73 second=107 amount=2 +kerning first=73 second=66 amount=2 +kerning first=73 second=80 amount=2 +kerning first=73 second=49 amount=-4 +kerning first=73 second=41 amount=2 +kerning first=73 second=73 amount=2 +kerning first=73 second=33 amount=2 +kerning first=73 second=54 amount=-1 +kerning first=73 second=67 amount=1 +kerning first=73 second=105 amount=2 +kerning first=73 second=113 amount=1 +kerning first=73 second=112 amount=1 +kerning first=73 second=98 amount=2 +kerning first=73 second=116 amount=3 +kerning first=73 second=103 amount=1 +kerning first=73 second=121 amount=2 +kerning first=73 second=59 amount=3 +kerning first=73 second=119 amount=3 +kerning first=73 second=118 amount=3 +kerning first=73 second=122 amount=2 +kerning first=73 second=110 amount=2 +kerning first=73 second=120 amount=3 +kerning first=73 second=114 amount=2 +kerning first=73 second=117 amount=1 +kerning first=73 second=97 amount=2 +kerning first=73 second=111 amount=2 +kerning first=73 second=99 amount=1 +kerning first=73 second=115 amount=2 +kerning first=73 second=58 amount=2 +kerning first=73 second=34 amount=2 +kerning first=73 second=39 amount=2 +kerning first=73 second=44 amount=2 +kerning first=73 second=46 amount=2 +kerning first=33 second=106 amount=2 +kerning first=33 second=87 amount=2 +kerning first=33 second=81 amount=1 +kerning first=33 second=84 amount=1 +kerning first=33 second=104 amount=1 +kerning first=33 second=102 amount=2 +kerning first=33 second=93 amount=3 +kerning first=33 second=90 amount=2 +kerning first=33 second=88 amount=2 +kerning first=33 second=89 amount=1 +kerning first=33 second=65 amount=1 +kerning first=33 second=75 amount=2 +kerning first=33 second=78 amount=1 +kerning first=33 second=53 amount=4 +kerning first=33 second=86 amount=3 +kerning first=33 second=85 amount=2 +kerning first=33 second=83 amount=3 +kerning first=33 second=72 amount=1 +kerning first=33 second=68 amount=1 +kerning first=33 second=76 amount=2 +kerning first=33 second=74 amount=2 +kerning first=33 second=63 amount=2 +kerning first=33 second=69 amount=1 +kerning first=33 second=108 amount=2 +kerning first=33 second=82 amount=2 +kerning first=33 second=52 amount=2 +kerning first=33 second=92 amount=2 +kerning first=33 second=47 amount=2 +kerning first=33 second=71 amount=2 +kerning first=33 second=107 amount=2 +kerning first=33 second=66 amount=2 +kerning first=33 second=80 amount=2 +kerning first=33 second=49 amount=-4 +kerning first=33 second=40 amount=2 +kerning first=33 second=41 amount=2 +kerning first=33 second=73 amount=4 +kerning first=33 second=33 amount=2 +kerning first=33 second=79 amount=1 +kerning first=33 second=67 amount=2 +kerning first=33 second=105 amount=2 +kerning first=33 second=100 amount=2 +kerning first=33 second=113 amount=2 +kerning first=33 second=112 amount=1 +kerning first=33 second=98 amount=2 +kerning first=33 second=116 amount=3 +kerning first=33 second=103 amount=2 +kerning first=33 second=121 amount=3 +kerning first=33 second=59 amount=3 +kerning first=33 second=119 amount=4 +kerning first=33 second=118 amount=3 +kerning first=33 second=122 amount=2 +kerning first=33 second=110 amount=2 +kerning first=33 second=120 amount=3 +kerning first=33 second=114 amount=2 +kerning first=33 second=117 amount=2 +kerning first=33 second=97 amount=3 +kerning first=33 second=111 amount=2 +kerning first=33 second=101 amount=2 +kerning first=33 second=99 amount=2 +kerning first=33 second=115 amount=3 +kerning first=33 second=58 amount=2 +kerning first=33 second=35 amount=1 +kerning first=33 second=43 amount=2 +kerning first=33 second=34 amount=2 +kerning first=33 second=39 amount=3 +kerning first=33 second=44 amount=3 +kerning first=33 second=45 amount=2 +kerning first=33 second=46 amount=2 +kerning first=64 second=106 amount=1 +kerning first=64 second=87 amount=-2 +kerning first=64 second=81 amount=1 +kerning first=64 second=84 amount=-4 +kerning first=64 second=102 amount=2 +kerning first=64 second=93 amount=-7 +kerning first=64 second=90 amount=-3 +kerning first=64 second=88 amount=-3 +kerning first=64 second=89 amount=-5 +kerning first=64 second=65 amount=-2 +kerning first=64 second=86 amount=-2 +kerning first=64 second=72 amount=2 +kerning first=64 second=74 amount=1 +kerning first=64 second=63 amount=-3 +kerning first=64 second=56 amount=-2 +kerning first=64 second=108 amount=1 +kerning first=64 second=52 amount=1 +kerning first=64 second=50 amount=-6 +kerning first=64 second=92 amount=-7 +kerning first=64 second=47 amount=-3 +kerning first=64 second=71 amount=2 +kerning first=64 second=55 amount=-4 +kerning first=64 second=51 amount=-3 +kerning first=64 second=107 amount=1 +kerning first=64 second=49 amount=-8 +kerning first=64 second=40 amount=2 +kerning first=64 second=41 amount=-2 +kerning first=64 second=33 amount=1 +kerning first=64 second=79 amount=1 +kerning first=64 second=57 amount=-2 +kerning first=64 second=67 amount=2 +kerning first=64 second=105 amount=1 +kerning first=64 second=100 amount=2 +kerning first=64 second=113 amount=2 +kerning first=64 second=116 amount=3 +kerning first=64 second=103 amount=2 +kerning first=64 second=121 amount=1 +kerning first=64 second=119 amount=3 +kerning first=64 second=118 amount=2 +kerning first=64 second=122 amount=-1 +kerning first=64 second=110 amount=1 +kerning first=64 second=114 amount=1 +kerning first=64 second=117 amount=2 +kerning first=64 second=97 amount=1 +kerning first=64 second=111 amount=2 +kerning first=64 second=101 amount=1 +kerning first=64 second=99 amount=2 +kerning first=64 second=35 amount=2 +kerning first=64 second=34 amount=-5 +kerning first=64 second=39 amount=-5 +kerning first=64 second=44 amount=-7 +kerning first=64 second=45 amount=2 +kerning first=64 second=46 amount=-4 +kerning first=79 second=106 amount=1 +kerning first=79 second=81 amount=1 +kerning first=79 second=102 amount=2 +kerning first=79 second=93 amount=-1 +kerning first=79 second=88 amount=-1 +kerning first=79 second=89 amount=-3 +kerning first=79 second=65 amount=-2 +kerning first=79 second=72 amount=2 +kerning first=79 second=56 amount=-2 +kerning first=79 second=108 amount=1 +kerning first=79 second=50 amount=-3 +kerning first=79 second=92 amount=-2 +kerning first=79 second=47 amount=-2 +kerning first=79 second=71 amount=2 +kerning first=79 second=55 amount=-2 +kerning first=79 second=51 amount=-2 +kerning first=79 second=107 amount=1 +kerning first=79 second=49 amount=-5 +kerning first=79 second=40 amount=1 +kerning first=79 second=41 amount=-1 +kerning first=79 second=33 amount=2 +kerning first=79 second=79 amount=1 +kerning first=79 second=57 amount=-1 +kerning first=79 second=67 amount=2 +kerning first=79 second=105 amount=1 +kerning first=79 second=100 amount=1 +kerning first=79 second=113 amount=2 +kerning first=79 second=112 amount=1 +kerning first=79 second=98 amount=1 +kerning first=79 second=116 amount=3 +kerning first=79 second=103 amount=2 +kerning first=79 second=121 amount=3 +kerning first=79 second=59 amount=1 +kerning first=79 second=119 amount=4 +kerning first=79 second=118 amount=3 +kerning first=79 second=110 amount=2 +kerning first=79 second=120 amount=2 +kerning first=79 second=114 amount=2 +kerning first=79 second=117 amount=2 +kerning first=79 second=97 amount=2 +kerning first=79 second=111 amount=2 +kerning first=79 second=101 amount=1 +kerning first=79 second=99 amount=2 +kerning first=79 second=35 amount=2 +kerning first=79 second=44 amount=-3 +kerning first=79 second=45 amount=2 +kerning first=54 second=106 amount=-2 +kerning first=54 second=87 amount=-2 +kerning first=54 second=81 amount=-2 +kerning first=54 second=77 amount=-3 +kerning first=54 second=104 amount=-1 +kerning first=54 second=102 amount=-2 +kerning first=54 second=93 amount=-3 +kerning first=54 second=90 amount=-2 +kerning first=54 second=88 amount=-3 +kerning first=54 second=89 amount=-3 +kerning first=54 second=65 amount=-4 +kerning first=54 second=75 amount=-1 +kerning first=54 second=78 amount=-2 +kerning first=54 second=86 amount=-2 +kerning first=54 second=83 amount=-1 +kerning first=54 second=72 amount=-2 +kerning first=54 second=68 amount=-2 +kerning first=54 second=76 amount=-1 +kerning first=54 second=74 amount=-1 +kerning first=54 second=69 amount=-1 +kerning first=54 second=82 amount=-1 +kerning first=54 second=92 amount=-3 +kerning first=54 second=47 amount=-3 +kerning first=54 second=66 amount=-1 +kerning first=54 second=80 amount=-1 +kerning first=54 second=70 amount=-2 +kerning first=54 second=40 amount=-1 +kerning first=54 second=41 amount=-3 +kerning first=54 second=73 amount=-1 +kerning first=54 second=64 amount=-2 +kerning first=54 second=79 amount=-2 +kerning first=54 second=100 amount=-1 +kerning first=54 second=113 amount=-1 +kerning first=54 second=112 amount=-2 +kerning first=54 second=98 amount=-1 +kerning first=54 second=121 amount=-1 +kerning first=54 second=59 amount=-3 +kerning first=54 second=118 amount=-2 +kerning first=54 second=122 amount=-3 +kerning first=54 second=110 amount=-1 +kerning first=54 second=120 amount=-2 +kerning first=54 second=114 amount=-2 +kerning first=54 second=109 amount=-2 +kerning first=54 second=97 amount=-1 +kerning first=54 second=101 amount=-1 +kerning first=54 second=115 amount=-2 +kerning first=54 second=58 amount=-3 +kerning first=54 second=35 amount=-1 +kerning first=54 second=44 amount=-5 +kerning first=54 second=45 amount=-1 +kerning first=54 second=46 amount=-3 +kerning first=57 second=87 amount=-3 +kerning first=57 second=81 amount=-1 +kerning first=57 second=77 amount=-3 +kerning first=57 second=84 amount=-2 +kerning first=57 second=104 amount=-1 +kerning first=57 second=93 amount=-4 +kerning first=57 second=90 amount=-3 +kerning first=57 second=88 amount=-4 +kerning first=57 second=89 amount=-5 +kerning first=57 second=65 amount=-4 +kerning first=57 second=75 amount=-2 +kerning first=57 second=78 amount=-2 +kerning first=57 second=86 amount=-3 +kerning first=57 second=85 amount=-1 +kerning first=57 second=83 amount=-2 +kerning first=57 second=68 amount=-2 +kerning first=57 second=76 amount=-2 +kerning first=57 second=74 amount=-2 +kerning first=57 second=63 amount=-1 +kerning first=57 second=69 amount=-2 +kerning first=57 second=82 amount=-2 +kerning first=57 second=92 amount=-4 +kerning first=57 second=47 amount=-4 +kerning first=57 second=66 amount=-2 +kerning first=57 second=80 amount=-2 +kerning first=57 second=70 amount=-2 +kerning first=57 second=41 amount=-4 +kerning first=57 second=73 amount=-2 +kerning first=57 second=64 amount=-2 +kerning first=57 second=79 amount=-1 +kerning first=57 second=100 amount=-1 +kerning first=57 second=98 amount=-1 +kerning first=57 second=116 amount=1 +kerning first=57 second=59 amount=-1 +kerning first=57 second=119 amount=1 +kerning first=57 second=118 amount=1 +kerning first=57 second=122 amount=-2 +kerning first=57 second=109 amount=-1 +kerning first=57 second=101 amount=-1 +kerning first=57 second=115 amount=-1 +kerning first=57 second=58 amount=-2 +kerning first=57 second=34 amount=-1 +kerning first=57 second=44 amount=-5 +kerning first=57 second=46 amount=-3 +kerning first=67 second=106 amount=2 +kerning first=67 second=81 amount=2 +kerning first=67 second=104 amount=2 +kerning first=67 second=102 amount=2 +kerning first=67 second=93 amount=-1 +kerning first=67 second=88 amount=-1 +kerning first=67 second=89 amount=-2 +kerning first=67 second=85 amount=1 +kerning first=67 second=83 amount=2 +kerning first=67 second=74 amount=2 +kerning first=67 second=56 amount=-1 +kerning first=67 second=69 amount=1 +kerning first=67 second=108 amount=2 +kerning first=67 second=52 amount=2 +kerning first=67 second=50 amount=-3 +kerning first=67 second=92 amount=-1 +kerning first=67 second=47 amount=-1 +kerning first=67 second=71 amount=2 +kerning first=67 second=55 amount=-2 +kerning first=67 second=51 amount=-2 +kerning first=67 second=107 amount=2 +kerning first=67 second=66 amount=1 +kerning first=67 second=80 amount=1 +kerning first=67 second=49 amount=-5 +kerning first=67 second=40 amount=2 +kerning first=67 second=73 amount=1 +kerning first=67 second=33 amount=2 +kerning first=67 second=64 amount=1 +kerning first=67 second=79 amount=1 +kerning first=67 second=67 amount=3 +kerning first=67 second=105 amount=2 +kerning first=67 second=100 amount=2 +kerning first=67 second=113 amount=2 +kerning first=67 second=112 amount=2 +kerning first=67 second=98 amount=2 +kerning first=67 second=116 amount=3 +kerning first=67 second=103 amount=3 +kerning first=67 second=121 amount=3 +kerning first=67 second=119 amount=4 +kerning first=67 second=118 amount=4 +kerning first=67 second=110 amount=2 +kerning first=67 second=120 amount=2 +kerning first=67 second=114 amount=2 +kerning first=67 second=117 amount=3 +kerning first=67 second=109 amount=1 +kerning first=67 second=97 amount=2 +kerning first=67 second=111 amount=3 +kerning first=67 second=101 amount=2 +kerning first=67 second=99 amount=2 +kerning first=67 second=35 amount=1 +kerning first=67 second=34 amount=1 +kerning first=67 second=39 amount=1 +kerning first=67 second=44 amount=-2 +kerning first=105 second=106 amount=2 +kerning first=105 second=104 amount=2 +kerning first=105 second=102 amount=2 +kerning first=105 second=93 amount=2 +kerning first=105 second=63 amount=2 +kerning first=105 second=108 amount=2 +kerning first=105 second=50 amount=1 +kerning first=105 second=92 amount=2 +kerning first=105 second=47 amount=2 +kerning first=105 second=107 amount=2 +kerning first=105 second=49 amount=-4 +kerning first=105 second=40 amount=2 +kerning first=105 second=41 amount=2 +kerning first=105 second=33 amount=3 +kerning first=105 second=105 amount=2 +kerning first=105 second=100 amount=1 +kerning first=105 second=113 amount=1 +kerning first=105 second=112 amount=2 +kerning first=105 second=98 amount=2 +kerning first=105 second=116 amount=3 +kerning first=105 second=103 amount=1 +kerning first=105 second=121 amount=4 +kerning first=105 second=59 amount=3 +kerning first=105 second=119 amount=5 +kerning first=105 second=118 amount=4 +kerning first=105 second=122 amount=2 +kerning first=105 second=110 amount=2 +kerning first=105 second=120 amount=3 +kerning first=105 second=114 amount=3 +kerning first=105 second=117 amount=2 +kerning first=105 second=109 amount=2 +kerning first=105 second=97 amount=2 +kerning first=105 second=111 amount=2 +kerning first=105 second=101 amount=1 +kerning first=105 second=99 amount=1 +kerning first=105 second=115 amount=2 +kerning first=105 second=58 amount=2 +kerning first=105 second=35 amount=2 +kerning first=105 second=34 amount=2 +kerning first=105 second=39 amount=2 +kerning first=105 second=44 amount=3 +kerning first=105 second=46 amount=3 +kerning first=100 second=106 amount=1 +kerning first=100 second=102 amount=2 +kerning first=100 second=93 amount=1 +kerning first=100 second=63 amount=1 +kerning first=100 second=56 amount=-1 +kerning first=100 second=108 amount=2 +kerning first=100 second=92 amount=1 +kerning first=100 second=47 amount=2 +kerning first=100 second=107 amount=2 +kerning first=100 second=49 amount=-4 +kerning first=100 second=41 amount=1 +kerning first=100 second=33 amount=2 +kerning first=100 second=105 amount=1 +kerning first=100 second=113 amount=1 +kerning first=100 second=112 amount=1 +kerning first=100 second=98 amount=2 +kerning first=100 second=116 amount=3 +kerning first=100 second=103 amount=1 +kerning first=100 second=121 amount=2 +kerning first=100 second=59 amount=2 +kerning first=100 second=119 amount=3 +kerning first=100 second=118 amount=3 +kerning first=100 second=122 amount=2 +kerning first=100 second=110 amount=1 +kerning first=100 second=120 amount=3 +kerning first=100 second=114 amount=1 +kerning first=100 second=117 amount=1 +kerning first=100 second=97 amount=2 +kerning first=100 second=111 amount=1 +kerning first=100 second=99 amount=1 +kerning first=100 second=115 amount=2 +kerning first=100 second=58 amount=1 +kerning first=100 second=34 amount=2 +kerning first=100 second=39 amount=2 +kerning first=100 second=44 amount=2 +kerning first=100 second=46 amount=2 +kerning first=113 second=106 amount=6 +kerning first=113 second=104 amount=1 +kerning first=113 second=102 amount=2 +kerning first=113 second=108 amount=2 +kerning first=113 second=52 amount=1 +kerning first=113 second=92 amount=-4 +kerning first=113 second=47 amount=2 +kerning first=113 second=107 amount=2 +kerning first=113 second=49 amount=-7 +kerning first=113 second=40 amount=2 +kerning first=113 second=41 amount=1 +kerning first=113 second=33 amount=2 +kerning first=113 second=105 amount=2 +kerning first=113 second=100 amount=2 +kerning first=113 second=112 amount=2 +kerning first=113 second=98 amount=1 +kerning first=113 second=116 amount=3 +kerning first=113 second=103 amount=1 +kerning first=113 second=121 amount=3 +kerning first=113 second=59 amount=4 +kerning first=113 second=119 amount=4 +kerning first=113 second=118 amount=4 +kerning first=113 second=122 amount=2 +kerning first=113 second=110 amount=2 +kerning first=113 second=120 amount=2 +kerning first=113 second=114 amount=2 +kerning first=113 second=117 amount=2 +kerning first=113 second=109 amount=1 +kerning first=113 second=97 amount=2 +kerning first=113 second=111 amount=2 +kerning first=113 second=101 amount=1 +kerning first=113 second=99 amount=2 +kerning first=113 second=115 amount=2 +kerning first=113 second=58 amount=1 +kerning first=113 second=35 amount=1 +kerning first=113 second=44 amount=4 +kerning first=113 second=45 amount=1 +kerning first=113 second=46 amount=2 +kerning first=112 second=106 amount=1 +kerning first=112 second=104 amount=1 +kerning first=112 second=102 amount=2 +kerning first=112 second=93 amount=-2 +kerning first=112 second=63 amount=-2 +kerning first=112 second=108 amount=2 +kerning first=112 second=52 amount=2 +kerning first=112 second=50 amount=-1 +kerning first=112 second=92 amount=-6 +kerning first=112 second=107 amount=2 +kerning first=112 second=49 amount=-7 +kerning first=112 second=40 amount=2 +kerning first=112 second=33 amount=2 +kerning first=112 second=64 amount=1 +kerning first=112 second=105 amount=2 +kerning first=112 second=100 amount=2 +kerning first=112 second=113 amount=1 +kerning first=112 second=98 amount=1 +kerning first=112 second=116 amount=3 +kerning first=112 second=103 amount=2 +kerning first=112 second=59 amount=1 +kerning first=112 second=119 amount=3 +kerning first=112 second=118 amount=2 +kerning first=112 second=110 amount=2 +kerning first=112 second=120 amount=1 +kerning first=112 second=114 amount=2 +kerning first=112 second=117 amount=2 +kerning first=112 second=97 amount=2 +kerning first=112 second=111 amount=2 +kerning first=112 second=101 amount=2 +kerning first=112 second=99 amount=2 +kerning first=112 second=115 amount=2 +kerning first=112 second=35 amount=2 +kerning first=112 second=34 amount=-5 +kerning first=112 second=39 amount=-5 +kerning first=112 second=44 amount=-2 +kerning first=112 second=45 amount=2 +kerning first=98 second=102 amount=1 +kerning first=98 second=93 amount=-2 +kerning first=98 second=63 amount=-2 +kerning first=98 second=56 amount=-1 +kerning first=98 second=108 amount=1 +kerning first=98 second=52 amount=1 +kerning first=98 second=92 amount=-7 +kerning first=98 second=107 amount=1 +kerning first=98 second=49 amount=-7 +kerning first=98 second=40 amount=1 +kerning first=98 second=33 amount=1 +kerning first=98 second=105 amount=1 +kerning first=98 second=100 amount=1 +kerning first=98 second=113 amount=2 +kerning first=98 second=112 amount=1 +kerning first=98 second=116 amount=2 +kerning first=98 second=103 amount=2 +kerning first=98 second=119 amount=2 +kerning first=98 second=118 amount=2 +kerning first=98 second=110 amount=2 +kerning first=98 second=120 amount=2 +kerning first=98 second=114 amount=2 +kerning first=98 second=117 amount=2 +kerning first=98 second=97 amount=3 +kerning first=98 second=111 amount=2 +kerning first=98 second=101 amount=2 +kerning first=98 second=99 amount=2 +kerning first=98 second=115 amount=2 +kerning first=98 second=35 amount=1 +kerning first=98 second=34 amount=-6 +kerning first=98 second=39 amount=-6 +kerning first=98 second=45 amount=2 +kerning first=98 second=46 amount=1 +kerning first=116 second=106 amount=3 +kerning first=116 second=104 amount=3 +kerning first=116 second=102 amount=4 +kerning first=116 second=93 amount=-3 +kerning first=116 second=48 amount=2 +kerning first=116 second=63 amount=2 +kerning first=116 second=108 amount=3 +kerning first=116 second=52 amount=-1 +kerning first=116 second=50 amount=-1 +kerning first=116 second=92 amount=-2 +kerning first=116 second=55 amount=-2 +kerning first=116 second=107 amount=3 +kerning first=116 second=49 amount=-5 +kerning first=116 second=40 amount=3 +kerning first=116 second=33 amount=4 +kerning first=116 second=54 amount=1 +kerning first=116 second=57 amount=1 +kerning first=116 second=105 amount=3 +kerning first=116 second=100 amount=1 +kerning first=116 second=113 amount=2 +kerning first=116 second=112 amount=3 +kerning first=116 second=98 amount=3 +kerning first=116 second=116 amount=4 +kerning first=116 second=103 amount=2 +kerning first=116 second=121 amount=5 +kerning first=116 second=59 amount=2 +kerning first=116 second=119 amount=6 +kerning first=116 second=118 amount=5 +kerning first=116 second=122 amount=2 +kerning first=116 second=110 amount=3 +kerning first=116 second=120 amount=4 +kerning first=116 second=114 amount=4 +kerning first=116 second=117 amount=3 +kerning first=116 second=109 amount=3 +kerning first=116 second=97 amount=3 +kerning first=116 second=111 amount=2 +kerning first=116 second=101 amount=1 +kerning first=116 second=99 amount=1 +kerning first=116 second=115 amount=2 +kerning first=116 second=58 amount=1 +kerning first=116 second=35 amount=3 +kerning first=116 second=34 amount=2 +kerning first=116 second=39 amount=2 +kerning first=116 second=45 amount=-3 +kerning first=116 second=32 amount=2 +kerning first=103 second=106 amount=5 +kerning first=103 second=104 amount=1 +kerning first=103 second=102 amount=2 +kerning first=103 second=53 amount=1 +kerning first=103 second=108 amount=2 +kerning first=103 second=52 amount=1 +kerning first=103 second=92 amount=-4 +kerning first=103 second=47 amount=2 +kerning first=103 second=107 amount=2 +kerning first=103 second=49 amount=-6 +kerning first=103 second=40 amount=1 +kerning first=103 second=41 amount=2 +kerning first=103 second=33 amount=1 +kerning first=103 second=105 amount=2 +kerning first=103 second=100 amount=2 +kerning first=103 second=113 amount=1 +kerning first=103 second=112 amount=1 +kerning first=103 second=98 amount=2 +kerning first=103 second=116 amount=3 +kerning first=103 second=103 amount=2 +kerning first=103 second=121 amount=2 +kerning first=103 second=59 amount=5 +kerning first=103 second=119 amount=3 +kerning first=103 second=118 amount=3 +kerning first=103 second=122 amount=2 +kerning first=103 second=110 amount=2 +kerning first=103 second=120 amount=3 +kerning first=103 second=114 amount=2 +kerning first=103 second=117 amount=2 +kerning first=103 second=97 amount=3 +kerning first=103 second=111 amount=2 +kerning first=103 second=101 amount=2 +kerning first=103 second=99 amount=2 +kerning first=103 second=115 amount=2 +kerning first=103 second=58 amount=2 +kerning first=103 second=35 amount=1 +kerning first=103 second=34 amount=-1 +kerning first=103 second=44 amount=4 +kerning first=103 second=45 amount=1 +kerning first=103 second=46 amount=2 +kerning first=121 second=106 amount=2 +kerning first=121 second=104 amount=2 +kerning first=121 second=102 amount=3 +kerning first=121 second=93 amount=-6 +kerning first=121 second=108 amount=2 +kerning first=121 second=50 amount=-3 +kerning first=121 second=92 amount=-4 +kerning first=121 second=47 amount=-4 +kerning first=121 second=55 amount=-5 +kerning first=121 second=51 amount=-2 +kerning first=121 second=107 amount=2 +kerning first=121 second=49 amount=-7 +kerning first=121 second=40 amount=2 +kerning first=121 second=41 amount=-1 +kerning first=121 second=33 amount=2 +kerning first=121 second=64 amount=-1 +kerning first=121 second=105 amount=2 +kerning first=121 second=112 amount=2 +kerning first=121 second=98 amount=2 +kerning first=121 second=116 amount=4 +kerning first=121 second=121 amount=3 +kerning first=121 second=59 amount=1 +kerning first=121 second=119 amount=4 +kerning first=121 second=118 amount=4 +kerning first=121 second=110 amount=2 +kerning first=121 second=120 amount=3 +kerning first=121 second=114 amount=3 +kerning first=121 second=117 amount=2 +kerning first=121 second=109 amount=2 +kerning first=121 second=97 amount=2 +kerning first=121 second=111 amount=1 +kerning first=121 second=35 amount=2 +kerning first=121 second=44 amount=-4 +kerning first=121 second=46 amount=-4 +kerning first=121 second=32 amount=3 +kerning first=59 second=106 amount=1 +kerning first=59 second=87 amount=-1 +kerning first=59 second=84 amount=-4 +kerning first=59 second=102 amount=1 +kerning first=59 second=93 amount=-2 +kerning first=59 second=89 amount=-4 +kerning first=59 second=53 amount=-1 +kerning first=59 second=86 amount=-2 +kerning first=59 second=74 amount=-5 +kerning first=59 second=63 amount=-2 +kerning first=59 second=56 amount=-2 +kerning first=59 second=52 amount=-2 +kerning first=59 second=92 amount=-5 +kerning first=59 second=71 amount=1 +kerning first=59 second=51 amount=-3 +kerning first=59 second=49 amount=-8 +kerning first=59 second=33 amount=1 +kerning first=59 second=64 amount=-2 +kerning first=59 second=54 amount=-1 +kerning first=59 second=57 amount=-1 +kerning first=59 second=67 amount=1 +kerning first=59 second=105 amount=1 +kerning first=59 second=112 amount=1 +kerning first=59 second=116 amount=2 +kerning first=59 second=121 amount=2 +kerning first=59 second=59 amount=1 +kerning first=59 second=119 amount=3 +kerning first=59 second=118 amount=3 +kerning first=59 second=110 amount=1 +kerning first=59 second=120 amount=1 +kerning first=59 second=114 amount=2 +kerning first=59 second=117 amount=1 +kerning first=59 second=34 amount=-2 +kerning first=59 second=39 amount=-1 +kerning first=59 second=44 amount=2 +kerning first=59 second=45 amount=-3 +kerning first=119 second=106 amount=3 +kerning first=119 second=104 amount=2 +kerning first=119 second=102 amount=2 +kerning first=119 second=93 amount=-6 +kerning first=119 second=63 amount=2 +kerning first=119 second=108 amount=3 +kerning first=119 second=50 amount=-2 +kerning first=119 second=92 amount=-3 +kerning first=119 second=47 amount=-3 +kerning first=119 second=55 amount=-5 +kerning first=119 second=107 amount=3 +kerning first=119 second=49 amount=-6 +kerning first=119 second=40 amount=2 +kerning first=119 second=33 amount=3 +kerning first=119 second=64 amount=-2 +kerning first=119 second=105 amount=3 +kerning first=119 second=112 amount=3 +kerning first=119 second=98 amount=2 +kerning first=119 second=116 amount=3 +kerning first=119 second=121 amount=4 +kerning first=119 second=59 amount=2 +kerning first=119 second=119 amount=5 +kerning first=119 second=118 amount=5 +kerning first=119 second=110 amount=3 +kerning first=119 second=120 amount=3 +kerning first=119 second=114 amount=3 +kerning first=119 second=117 amount=3 +kerning first=119 second=109 amount=2 +kerning first=119 second=35 amount=2 +kerning first=119 second=34 amount=2 +kerning first=119 second=39 amount=2 +kerning first=119 second=44 amount=-4 +kerning first=119 second=46 amount=-4 +kerning first=118 second=106 amount=4 +kerning first=118 second=104 amount=3 +kerning first=118 second=102 amount=4 +kerning first=118 second=93 amount=-5 +kerning first=118 second=48 amount=2 +kerning first=118 second=63 amount=2 +kerning first=118 second=108 amount=3 +kerning first=118 second=50 amount=-1 +kerning first=118 second=92 amount=-2 +kerning first=118 second=47 amount=-2 +kerning first=118 second=55 amount=-4 +kerning first=118 second=107 amount=3 +kerning first=118 second=49 amount=-5 +kerning first=118 second=40 amount=3 +kerning first=118 second=33 amount=4 +kerning first=118 second=54 amount=1 +kerning first=118 second=57 amount=1 +kerning first=118 second=105 amount=4 +kerning first=118 second=100 amount=2 +kerning first=118 second=113 amount=2 +kerning first=118 second=112 amount=4 +kerning first=118 second=98 amount=3 +kerning first=118 second=116 amount=4 +kerning first=118 second=103 amount=2 +kerning first=118 second=121 amount=5 +kerning first=118 second=59 amount=3 +kerning first=118 second=119 amount=6 +kerning first=118 second=118 amount=6 +kerning first=118 second=122 amount=2 +kerning first=118 second=110 amount=4 +kerning first=118 second=120 amount=4 +kerning first=118 second=114 amount=4 +kerning first=118 second=117 amount=4 +kerning first=118 second=109 amount=3 +kerning first=118 second=97 amount=3 +kerning first=118 second=111 amount=2 +kerning first=118 second=101 amount=1 +kerning first=118 second=99 amount=1 +kerning first=118 second=115 amount=2 +kerning first=118 second=58 amount=2 +kerning first=118 second=35 amount=3 +kerning first=118 second=34 amount=2 +kerning first=118 second=39 amount=3 +kerning first=118 second=44 amount=-4 +kerning first=118 second=46 amount=-3 +kerning first=118 second=32 amount=2 +kerning first=122 second=106 amount=2 +kerning first=122 second=104 amount=1 +kerning first=122 second=102 amount=3 +kerning first=122 second=108 amount=2 +kerning first=122 second=52 amount=-2 +kerning first=122 second=50 amount=1 +kerning first=122 second=92 amount=-4 +kerning first=122 second=47 amount=3 +kerning first=122 second=107 amount=2 +kerning first=122 second=49 amount=-6 +kerning first=122 second=40 amount=2 +kerning first=122 second=41 amount=2 +kerning first=122 second=33 amount=2 +kerning first=122 second=105 amount=2 +kerning first=122 second=100 amount=1 +kerning first=122 second=113 amount=1 +kerning first=122 second=112 amount=2 +kerning first=122 second=98 amount=2 +kerning first=122 second=116 amount=4 +kerning first=122 second=103 amount=1 +kerning first=122 second=121 amount=3 +kerning first=122 second=59 amount=2 +kerning first=122 second=119 amount=4 +kerning first=122 second=118 amount=4 +kerning first=122 second=122 amount=2 +kerning first=122 second=110 amount=2 +kerning first=122 second=120 amount=3 +kerning first=122 second=114 amount=2 +kerning first=122 second=117 amount=2 +kerning first=122 second=109 amount=1 +kerning first=122 second=97 amount=3 +kerning first=122 second=111 amount=1 +kerning first=122 second=99 amount=1 +kerning first=122 second=115 amount=2 +kerning first=122 second=58 amount=2 +kerning first=122 second=35 amount=2 +kerning first=122 second=44 amount=1 +kerning first=122 second=45 amount=-2 +kerning first=122 second=46 amount=3 +kerning first=122 second=32 amount=2 +kerning first=110 second=106 amount=2 +kerning first=110 second=104 amount=1 +kerning first=110 second=102 amount=2 +kerning first=110 second=63 amount=-3 +kerning first=110 second=108 amount=2 +kerning first=110 second=52 amount=1 +kerning first=110 second=50 amount=1 +kerning first=110 second=92 amount=-6 +kerning first=110 second=47 amount=3 +kerning first=110 second=55 amount=1 +kerning first=110 second=107 amount=2 +kerning first=110 second=49 amount=-6 +kerning first=110 second=40 amount=1 +kerning first=110 second=41 amount=2 +kerning first=110 second=33 amount=2 +kerning first=110 second=105 amount=2 +kerning first=110 second=100 amount=2 +kerning first=110 second=113 amount=1 +kerning first=110 second=112 amount=2 +kerning first=110 second=98 amount=2 +kerning first=110 second=116 amount=3 +kerning first=110 second=103 amount=2 +kerning first=110 second=121 amount=2 +kerning first=110 second=59 amount=2 +kerning first=110 second=119 amount=3 +kerning first=110 second=118 amount=3 +kerning first=110 second=122 amount=2 +kerning first=110 second=110 amount=2 +kerning first=110 second=120 amount=3 +kerning first=110 second=114 amount=2 +kerning first=110 second=117 amount=2 +kerning first=110 second=97 amount=3 +kerning first=110 second=111 amount=2 +kerning first=110 second=101 amount=1 +kerning first=110 second=99 amount=2 +kerning first=110 second=115 amount=2 +kerning first=110 second=58 amount=2 +kerning first=110 second=35 amount=1 +kerning first=110 second=34 amount=-2 +kerning first=110 second=39 amount=-3 +kerning first=110 second=45 amount=2 +kerning first=110 second=46 amount=3 +kerning first=120 second=106 amount=3 +kerning first=120 second=104 amount=2 +kerning first=120 second=102 amount=1 +kerning first=120 second=93 amount=-1 +kerning first=120 second=53 amount=-1 +kerning first=120 second=63 amount=1 +kerning first=120 second=108 amount=3 +kerning first=120 second=52 amount=-3 +kerning first=120 second=92 amount=-3 +kerning first=120 second=47 amount=2 +kerning first=120 second=107 amount=3 +kerning first=120 second=49 amount=-6 +kerning first=120 second=40 amount=2 +kerning first=120 second=33 amount=3 +kerning first=120 second=64 amount=-3 +kerning first=120 second=105 amount=3 +kerning first=120 second=112 amount=3 +kerning first=120 second=98 amount=2 +kerning first=120 second=116 amount=2 +kerning first=120 second=121 amount=4 +kerning first=120 second=59 amount=2 +kerning first=120 second=119 amount=5 +kerning first=120 second=118 amount=5 +kerning first=120 second=122 amount=1 +kerning first=120 second=110 amount=3 +kerning first=120 second=120 amount=3 +kerning first=120 second=114 amount=3 +kerning first=120 second=117 amount=3 +kerning first=120 second=109 amount=2 +kerning first=120 second=97 amount=1 +kerning first=120 second=35 amount=2 +kerning first=120 second=34 amount=1 +kerning first=120 second=39 amount=2 +kerning first=120 second=44 amount=2 +kerning first=120 second=45 amount=-3 +kerning first=120 second=46 amount=2 +kerning first=120 second=32 amount=2 +kerning first=114 second=106 amount=3 +kerning first=114 second=104 amount=2 +kerning first=114 second=102 amount=2 +kerning first=114 second=93 amount=-5 +kerning first=114 second=48 amount=1 +kerning first=114 second=63 amount=2 +kerning first=114 second=108 amount=3 +kerning first=114 second=52 amount=-2 +kerning first=114 second=50 amount=-2 +kerning first=114 second=92 amount=-3 +kerning first=114 second=47 amount=-6 +kerning first=114 second=55 amount=-4 +kerning first=114 second=107 amount=3 +kerning first=114 second=49 amount=-6 +kerning first=114 second=40 amount=3 +kerning first=114 second=33 amount=3 +kerning first=114 second=64 amount=-2 +kerning first=114 second=105 amount=3 +kerning first=114 second=113 amount=1 +kerning first=114 second=112 amount=3 +kerning first=114 second=98 amount=2 +kerning first=114 second=116 amount=2 +kerning first=114 second=103 amount=1 +kerning first=114 second=121 amount=4 +kerning first=114 second=59 amount=2 +kerning first=114 second=119 amount=5 +kerning first=114 second=118 amount=5 +kerning first=114 second=122 amount=1 +kerning first=114 second=110 amount=3 +kerning first=114 second=120 amount=3 +kerning first=114 second=114 amount=3 +kerning first=114 second=117 amount=3 +kerning first=114 second=109 amount=3 +kerning first=114 second=97 amount=1 +kerning first=114 second=111 amount=1 +kerning first=114 second=35 amount=3 +kerning first=114 second=34 amount=3 +kerning first=114 second=39 amount=3 +kerning first=114 second=44 amount=-7 +kerning first=114 second=45 amount=-4 +kerning first=114 second=46 amount=-6 +kerning first=117 second=106 amount=2 +kerning first=117 second=104 amount=1 +kerning first=117 second=102 amount=2 +kerning first=117 second=93 amount=-2 +kerning first=117 second=63 amount=-2 +kerning first=117 second=56 amount=-1 +kerning first=117 second=108 amount=2 +kerning first=117 second=52 amount=1 +kerning first=117 second=50 amount=-1 +kerning first=117 second=92 amount=-4 +kerning first=117 second=51 amount=-1 +kerning first=117 second=107 amount=2 +kerning first=117 second=49 amount=-7 +kerning first=117 second=40 amount=2 +kerning first=117 second=33 amount=2 +kerning first=117 second=105 amount=2 +kerning first=117 second=100 amount=2 +kerning first=117 second=113 amount=1 +kerning first=117 second=112 amount=2 +kerning first=117 second=98 amount=1 +kerning first=117 second=116 amount=4 +kerning first=117 second=103 amount=1 +kerning first=117 second=121 amount=3 +kerning first=117 second=59 amount=1 +kerning first=117 second=119 amount=4 +kerning first=117 second=118 amount=4 +kerning first=117 second=110 amount=2 +kerning first=117 second=120 amount=2 +kerning first=117 second=114 amount=2 +kerning first=117 second=117 amount=2 +kerning first=117 second=109 amount=1 +kerning first=117 second=97 amount=2 +kerning first=117 second=111 amount=2 +kerning first=117 second=101 amount=1 +kerning first=117 second=99 amount=1 +kerning first=117 second=115 amount=1 +kerning first=117 second=35 amount=2 +kerning first=117 second=34 amount=-4 +kerning first=117 second=39 amount=-4 +kerning first=117 second=44 amount=-1 +kerning first=117 second=45 amount=1 +kerning first=109 second=106 amount=2 +kerning first=109 second=104 amount=1 +kerning first=109 second=102 amount=1 +kerning first=109 second=63 amount=-3 +kerning first=109 second=56 amount=-2 +kerning first=109 second=108 amount=3 +kerning first=109 second=50 amount=1 +kerning first=109 second=92 amount=-6 +kerning first=109 second=47 amount=3 +kerning first=109 second=55 amount=1 +kerning first=109 second=51 amount=-1 +kerning first=109 second=107 amount=2 +kerning first=109 second=49 amount=-6 +kerning first=109 second=41 amount=2 +kerning first=109 second=33 amount=2 +kerning first=109 second=54 amount=-1 +kerning first=109 second=57 amount=-1 +kerning first=109 second=105 amount=2 +kerning first=109 second=100 amount=1 +kerning first=109 second=112 amount=2 +kerning first=109 second=98 amount=2 +kerning first=109 second=116 amount=3 +kerning first=109 second=121 amount=2 +kerning first=109 second=59 amount=4 +kerning first=109 second=119 amount=3 +kerning first=109 second=118 amount=3 +kerning first=109 second=122 amount=2 +kerning first=109 second=110 amount=2 +kerning first=109 second=120 amount=3 +kerning first=109 second=114 amount=2 +kerning first=109 second=97 amount=3 +kerning first=109 second=111 amount=1 +kerning first=109 second=115 amount=1 +kerning first=109 second=58 amount=2 +kerning first=109 second=34 amount=-1 +kerning first=109 second=39 amount=-2 +kerning first=109 second=44 amount=3 +kerning first=109 second=46 amount=3 +kerning first=97 second=106 amount=2 +kerning first=97 second=104 amount=1 +kerning first=97 second=48 amount=-2 +kerning first=97 second=63 amount=-4 +kerning first=97 second=108 amount=2 +kerning first=97 second=50 amount=1 +kerning first=97 second=92 amount=-7 +kerning first=97 second=47 amount=3 +kerning first=97 second=55 amount=1 +kerning first=97 second=107 amount=2 +kerning first=97 second=49 amount=-6 +kerning first=97 second=41 amount=2 +kerning first=97 second=33 amount=2 +kerning first=97 second=54 amount=-2 +kerning first=97 second=57 amount=-1 +kerning first=97 second=105 amount=2 +kerning first=97 second=100 amount=1 +kerning first=97 second=112 amount=2 +kerning first=97 second=98 amount=2 +kerning first=97 second=116 amount=1 +kerning first=97 second=103 amount=1 +kerning first=97 second=59 amount=2 +kerning first=97 second=119 amount=1 +kerning first=97 second=118 amount=1 +kerning first=97 second=122 amount=2 +kerning first=97 second=110 amount=2 +kerning first=97 second=120 amount=3 +kerning first=97 second=114 amount=2 +kerning first=97 second=117 amount=1 +kerning first=97 second=97 amount=3 +kerning first=97 second=111 amount=1 +kerning first=97 second=99 amount=1 +kerning first=97 second=115 amount=2 +kerning first=97 second=58 amount=2 +kerning first=97 second=34 amount=-5 +kerning first=97 second=39 amount=-5 +kerning first=97 second=44 amount=2 +kerning first=97 second=46 amount=3 +kerning first=111 second=106 amount=2 +kerning first=111 second=104 amount=2 +kerning first=111 second=102 amount=2 +kerning first=111 second=93 amount=-1 +kerning first=111 second=53 amount=1 +kerning first=111 second=63 amount=-2 +kerning first=111 second=108 amount=2 +kerning first=111 second=52 amount=2 +kerning first=111 second=92 amount=-6 +kerning first=111 second=47 amount=1 +kerning first=111 second=107 amount=2 +kerning first=111 second=49 amount=-7 +kerning first=111 second=40 amount=2 +kerning first=111 second=33 amount=2 +kerning first=111 second=64 amount=1 +kerning first=111 second=105 amount=2 +kerning first=111 second=100 amount=3 +kerning first=111 second=113 amount=2 +kerning first=111 second=112 amount=2 +kerning first=111 second=98 amount=2 +kerning first=111 second=116 amount=4 +kerning first=111 second=103 amount=3 +kerning first=111 second=121 amount=2 +kerning first=111 second=59 amount=1 +kerning first=111 second=119 amount=3 +kerning first=111 second=118 amount=3 +kerning first=111 second=110 amount=2 +kerning first=111 second=120 amount=2 +kerning first=111 second=114 amount=2 +kerning first=111 second=117 amount=3 +kerning first=111 second=109 amount=1 +kerning first=111 second=97 amount=3 +kerning first=111 second=111 amount=3 +kerning first=111 second=101 amount=2 +kerning first=111 second=99 amount=2 +kerning first=111 second=115 amount=2 +kerning first=111 second=35 amount=2 +kerning first=111 second=34 amount=-5 +kerning first=111 second=39 amount=-4 +kerning first=111 second=45 amount=2 +kerning first=111 second=46 amount=1 +kerning first=101 second=106 amount=3 +kerning first=101 second=104 amount=3 +kerning first=101 second=102 amount=3 +kerning first=101 second=53 amount=3 +kerning first=101 second=63 amount=-1 +kerning first=101 second=56 amount=1 +kerning first=101 second=108 amount=3 +kerning first=101 second=52 amount=2 +kerning first=101 second=50 amount=2 +kerning first=101 second=92 amount=-5 +kerning first=101 second=47 amount=4 +kerning first=101 second=55 amount=2 +kerning first=101 second=51 amount=1 +kerning first=101 second=107 amount=3 +kerning first=101 second=49 amount=-5 +kerning first=101 second=40 amount=2 +kerning first=101 second=41 amount=3 +kerning first=101 second=33 amount=3 +kerning first=101 second=64 amount=2 +kerning first=101 second=57 amount=1 +kerning first=101 second=105 amount=3 +kerning first=101 second=100 amount=3 +kerning first=101 second=113 amount=2 +kerning first=101 second=112 amount=3 +kerning first=101 second=98 amount=3 +kerning first=101 second=116 amount=4 +kerning first=101 second=103 amount=3 +kerning first=101 second=121 amount=3 +kerning first=101 second=59 amount=3 +kerning first=101 second=119 amount=4 +kerning first=101 second=118 amount=4 +kerning first=101 second=122 amount=3 +kerning first=101 second=110 amount=3 +kerning first=101 second=120 amount=4 +kerning first=101 second=114 amount=3 +kerning first=101 second=117 amount=3 +kerning first=101 second=109 amount=2 +kerning first=101 second=97 amount=4 +kerning first=101 second=111 amount=3 +kerning first=101 second=101 amount=3 +kerning first=101 second=99 amount=3 +kerning first=101 second=115 amount=4 +kerning first=101 second=58 amount=3 +kerning first=101 second=35 amount=2 +kerning first=101 second=34 amount=-2 +kerning first=101 second=39 amount=-2 +kerning first=101 second=44 amount=2 +kerning first=101 second=45 amount=2 +kerning first=101 second=46 amount=3 +kerning first=99 second=106 amount=2 +kerning first=99 second=104 amount=2 +kerning first=99 second=102 amount=2 +kerning first=99 second=93 amount=-2 +kerning first=99 second=53 amount=2 +kerning first=99 second=63 amount=-3 +kerning first=99 second=108 amount=2 +kerning first=99 second=52 amount=1 +kerning first=99 second=50 amount=-1 +kerning first=99 second=92 amount=-7 +kerning first=99 second=107 amount=2 +kerning first=99 second=49 amount=-7 +kerning first=99 second=40 amount=1 +kerning first=99 second=33 amount=2 +kerning first=99 second=105 amount=2 +kerning first=99 second=100 amount=2 +kerning first=99 second=113 amount=2 +kerning first=99 second=112 amount=2 +kerning first=99 second=98 amount=2 +kerning first=99 second=116 amount=3 +kerning first=99 second=103 amount=2 +kerning first=99 second=121 amount=1 +kerning first=99 second=119 amount=2 +kerning first=99 second=118 amount=2 +kerning first=99 second=110 amount=2 +kerning first=99 second=120 amount=1 +kerning first=99 second=114 amount=2 +kerning first=99 second=117 amount=2 +kerning first=99 second=97 amount=3 +kerning first=99 second=111 amount=2 +kerning first=99 second=101 amount=2 +kerning first=99 second=99 amount=2 +kerning first=99 second=115 amount=3 +kerning first=99 second=58 amount=1 +kerning first=99 second=35 amount=1 +kerning first=99 second=34 amount=-4 +kerning first=99 second=39 amount=-4 +kerning first=99 second=45 amount=1 +kerning first=99 second=46 amount=2 +kerning first=115 second=106 amount=2 +kerning first=115 second=104 amount=1 +kerning first=115 second=102 amount=2 +kerning first=115 second=53 amount=2 +kerning first=115 second=63 amount=-2 +kerning first=115 second=108 amount=2 +kerning first=115 second=92 amount=-6 +kerning first=115 second=47 amount=2 +kerning first=115 second=107 amount=2 +kerning first=115 second=49 amount=-6 +kerning first=115 second=40 amount=2 +kerning first=115 second=41 amount=2 +kerning first=115 second=33 amount=2 +kerning first=115 second=105 amount=2 +kerning first=115 second=100 amount=2 +kerning first=115 second=113 amount=2 +kerning first=115 second=112 amount=2 +kerning first=115 second=98 amount=2 +kerning first=115 second=116 amount=3 +kerning first=115 second=103 amount=2 +kerning first=115 second=121 amount=2 +kerning first=115 second=59 amount=1 +kerning first=115 second=119 amount=3 +kerning first=115 second=118 amount=3 +kerning first=115 second=122 amount=2 +kerning first=115 second=110 amount=2 +kerning first=115 second=120 amount=3 +kerning first=115 second=114 amount=2 +kerning first=115 second=117 amount=2 +kerning first=115 second=109 amount=2 +kerning first=115 second=97 amount=3 +kerning first=115 second=111 amount=2 +kerning first=115 second=101 amount=2 +kerning first=115 second=99 amount=2 +kerning first=115 second=115 amount=3 +kerning first=115 second=58 amount=1 +kerning first=115 second=35 amount=1 +kerning first=115 second=34 amount=-4 +kerning first=115 second=39 amount=-3 +kerning first=115 second=46 amount=2 +kerning first=58 second=87 amount=-2 +kerning first=58 second=77 amount=-1 +kerning first=58 second=84 amount=-5 +kerning first=58 second=93 amount=-3 +kerning first=58 second=89 amount=-4 +kerning first=58 second=65 amount=-1 +kerning first=58 second=53 amount=-1 +kerning first=58 second=86 amount=-2 +kerning first=58 second=48 amount=-1 +kerning first=58 second=74 amount=-4 +kerning first=58 second=63 amount=-3 +kerning first=58 second=56 amount=-2 +kerning first=58 second=52 amount=-2 +kerning first=58 second=50 amount=-2 +kerning first=58 second=92 amount=-6 +kerning first=58 second=55 amount=-2 +kerning first=58 second=51 amount=-3 +kerning first=58 second=49 amount=-8 +kerning first=58 second=64 amount=-2 +kerning first=58 second=54 amount=-2 +kerning first=58 second=57 amount=-2 +kerning first=58 second=116 amount=2 +kerning first=58 second=121 amount=2 +kerning first=58 second=119 amount=3 +kerning first=58 second=118 amount=3 +kerning first=58 second=120 amount=1 +kerning first=58 second=114 amount=1 +kerning first=58 second=58 amount=-1 +kerning first=58 second=34 amount=-5 +kerning first=58 second=39 amount=-1 +kerning first=58 second=45 amount=-3 +kerning first=35 second=106 amount=1 +kerning first=35 second=81 amount=1 +kerning first=35 second=102 amount=2 +kerning first=35 second=93 amount=-5 +kerning first=35 second=90 amount=-5 +kerning first=35 second=88 amount=-3 +kerning first=35 second=89 amount=-2 +kerning first=35 second=65 amount=-3 +kerning first=35 second=53 amount=-1 +kerning first=35 second=85 amount=1 +kerning first=35 second=72 amount=1 +kerning first=35 second=74 amount=-2 +kerning first=35 second=63 amount=2 +kerning first=35 second=56 amount=-1 +kerning first=35 second=108 amount=1 +kerning first=35 second=50 amount=-3 +kerning first=35 second=92 amount=-3 +kerning first=35 second=47 amount=-5 +kerning first=35 second=71 amount=2 +kerning first=35 second=55 amount=-3 +kerning first=35 second=51 amount=-1 +kerning first=35 second=107 amount=1 +kerning first=35 second=49 amount=-7 +kerning first=35 second=40 amount=1 +kerning first=35 second=41 amount=-2 +kerning first=35 second=33 amount=2 +kerning first=35 second=79 amount=1 +kerning first=35 second=57 amount=-1 +kerning first=35 second=67 amount=2 +kerning first=35 second=105 amount=1 +kerning first=35 second=113 amount=1 +kerning first=35 second=112 amount=1 +kerning first=35 second=116 amount=3 +kerning first=35 second=103 amount=1 +kerning first=35 second=121 amount=3 +kerning first=35 second=119 amount=3 +kerning first=35 second=118 amount=3 +kerning first=35 second=122 amount=-1 +kerning first=35 second=110 amount=1 +kerning first=35 second=120 amount=2 +kerning first=35 second=114 amount=1 +kerning first=35 second=117 amount=2 +kerning first=35 second=109 amount=1 +kerning first=35 second=97 amount=1 +kerning first=35 second=111 amount=1 +kerning first=35 second=99 amount=1 +kerning first=35 second=34 amount=1 +kerning first=35 second=39 amount=1 +kerning first=35 second=44 amount=-10 +kerning first=35 second=46 amount=-5 +kerning first=42 second=93 amount=2 +kerning first=42 second=83 amount=3 +kerning first=42 second=113 amount=2 +kerning first=42 second=103 amount=2 +kerning first=34 second=106 amount=1 +kerning first=34 second=87 amount=2 +kerning first=34 second=84 amount=1 +kerning first=34 second=102 amount=-3 +kerning first=34 second=93 amount=2 +kerning first=34 second=90 amount=-2 +kerning first=34 second=88 amount=2 +kerning first=34 second=89 amount=1 +kerning first=34 second=65 amount=-6 +kerning first=34 second=75 amount=2 +kerning first=34 second=53 amount=-2 +kerning first=34 second=86 amount=3 +kerning first=34 second=85 amount=2 +kerning first=34 second=48 amount=-1 +kerning first=34 second=76 amount=2 +kerning first=34 second=74 amount=-9 +kerning first=34 second=63 amount=2 +kerning first=34 second=56 amount=-1 +kerning first=34 second=108 amount=2 +kerning first=34 second=82 amount=2 +kerning first=34 second=52 amount=-5 +kerning first=34 second=50 amount=-2 +kerning first=34 second=92 amount=3 +kerning first=34 second=47 amount=-3 +kerning first=34 second=51 amount=-1 +kerning first=34 second=107 amount=1 +kerning first=34 second=66 amount=2 +kerning first=34 second=80 amount=1 +kerning first=34 second=49 amount=-3 +kerning first=34 second=41 amount=1 +kerning first=34 second=73 amount=2 +kerning first=34 second=33 amount=2 +kerning first=34 second=64 amount=-7 +kerning first=34 second=54 amount=-2 +kerning first=34 second=57 amount=-1 +kerning first=34 second=105 amount=1 +kerning first=34 second=100 amount=-4 +kerning first=34 second=113 amount=-3 +kerning first=34 second=112 amount=1 +kerning first=34 second=98 amount=2 +kerning first=34 second=116 amount=-3 +kerning first=34 second=103 amount=-3 +kerning first=34 second=121 amount=3 +kerning first=34 second=119 amount=2 +kerning first=34 second=118 amount=3 +kerning first=34 second=122 amount=-2 +kerning first=34 second=110 amount=1 +kerning first=34 second=120 amount=2 +kerning first=34 second=117 amount=1 +kerning first=34 second=109 amount=1 +kerning first=34 second=97 amount=-3 +kerning first=34 second=111 amount=-2 +kerning first=34 second=101 amount=-4 +kerning first=34 second=99 amount=-3 +kerning first=34 second=115 amount=-3 +kerning first=34 second=35 amount=-3 +kerning first=34 second=34 amount=2 +kerning first=34 second=39 amount=2 +kerning first=34 second=44 amount=-5 +kerning first=34 second=45 amount=-3 +kerning first=34 second=46 amount=-4 +kerning first=39 second=87 amount=3 +kerning first=39 second=84 amount=2 +kerning first=39 second=104 amount=1 +kerning first=39 second=102 amount=-2 +kerning first=39 second=93 amount=2 +kerning first=39 second=90 amount=-2 +kerning first=39 second=88 amount=3 +kerning first=39 second=89 amount=2 +kerning first=39 second=65 amount=-6 +kerning first=39 second=75 amount=2 +kerning first=39 second=78 amount=1 +kerning first=39 second=53 amount=-1 +kerning first=39 second=86 amount=3 +kerning first=39 second=85 amount=2 +kerning first=39 second=68 amount=1 +kerning first=39 second=76 amount=2 +kerning first=39 second=74 amount=-9 +kerning first=39 second=63 amount=3 +kerning first=39 second=69 amount=1 +kerning first=39 second=108 amount=2 +kerning first=39 second=82 amount=2 +kerning first=39 second=52 amount=-4 +kerning first=39 second=50 amount=-2 +kerning first=39 second=92 amount=3 +kerning first=39 second=47 amount=-9 +kerning first=39 second=107 amount=2 +kerning first=39 second=66 amount=2 +kerning first=39 second=80 amount=2 +kerning first=39 second=49 amount=-3 +kerning first=39 second=41 amount=2 +kerning first=39 second=73 amount=2 +kerning first=39 second=33 amount=2 +kerning first=39 second=64 amount=-10 +kerning first=39 second=54 amount=-1 +kerning first=39 second=105 amount=2 +kerning first=39 second=100 amount=-4 +kerning first=39 second=113 amount=-4 +kerning first=39 second=98 amount=2 +kerning first=39 second=116 amount=-3 +kerning first=39 second=103 amount=-1 +kerning first=39 second=121 amount=3 +kerning first=39 second=59 amount=-2 +kerning first=39 second=118 amount=1 +kerning first=39 second=122 amount=-1 +kerning first=39 second=114 amount=-2 +kerning first=39 second=97 amount=-3 +kerning first=39 second=111 amount=-4 +kerning first=39 second=101 amount=-4 +kerning first=39 second=99 amount=-4 +kerning first=39 second=115 amount=-4 +kerning first=39 second=58 amount=-2 +kerning first=39 second=35 amount=-2 +kerning first=39 second=34 amount=2 +kerning first=39 second=39 amount=3 +kerning first=39 second=44 amount=-6 +kerning first=39 second=45 amount=-4 +kerning first=39 second=46 amount=-2 +kerning first=44 second=106 amount=3 +kerning first=44 second=87 amount=-5 +kerning first=44 second=81 amount=-4 +kerning first=44 second=84 amount=-3 +kerning first=44 second=102 amount=-2 +kerning first=44 second=90 amount=3 +kerning first=44 second=88 amount=3 +kerning first=44 second=89 amount=-6 +kerning first=44 second=65 amount=2 +kerning first=44 second=86 amount=-5 +kerning first=44 second=85 amount=-3 +kerning first=44 second=83 amount=-2 +kerning first=44 second=48 amount=-3 +kerning first=44 second=74 amount=-3 +kerning first=44 second=63 amount=-4 +kerning first=44 second=56 amount=-2 +kerning first=44 second=108 amount=2 +kerning first=44 second=52 amount=-5 +kerning first=44 second=50 amount=2 +kerning first=44 second=92 amount=-9 +kerning first=44 second=47 amount=3 +kerning first=44 second=71 amount=-3 +kerning first=44 second=55 amount=2 +kerning first=44 second=51 amount=-2 +kerning first=44 second=107 amount=2 +kerning first=44 second=80 amount=2 +kerning first=44 second=70 amount=1 +kerning first=44 second=49 amount=-6 +kerning first=44 second=41 amount=2 +kerning first=44 second=73 amount=1 +kerning first=44 second=33 amount=1 +kerning first=44 second=64 amount=-2 +kerning first=44 second=79 amount=-3 +kerning first=44 second=54 amount=-4 +kerning first=44 second=57 amount=-3 +kerning first=44 second=105 amount=1 +kerning first=44 second=113 amount=-2 +kerning first=44 second=98 amount=2 +kerning first=44 second=116 amount=-3 +kerning first=44 second=121 amount=-4 +kerning first=44 second=59 amount=4 +kerning first=44 second=119 amount=-1 +kerning first=44 second=118 amount=-3 +kerning first=44 second=122 amount=3 +kerning first=44 second=110 amount=1 +kerning first=44 second=120 amount=3 +kerning first=44 second=114 amount=2 +kerning first=44 second=109 amount=-2 +kerning first=44 second=97 amount=2 +kerning first=44 second=58 amount=2 +kerning first=44 second=35 amount=-5 +kerning first=44 second=34 amount=-5 +kerning first=44 second=39 amount=-8 +kerning first=44 second=44 amount=2 +kerning first=44 second=45 amount=-5 +kerning first=44 second=46 amount=2 +kerning first=45 second=87 amount=-2 +kerning first=45 second=81 amount=2 +kerning first=45 second=84 amount=-4 +kerning first=45 second=93 amount=-8 +kerning first=45 second=90 amount=-5 +kerning first=45 second=88 amount=-5 +kerning first=45 second=89 amount=-6 +kerning first=45 second=65 amount=-2 +kerning first=45 second=53 amount=-3 +kerning first=45 second=86 amount=-2 +kerning first=45 second=83 amount=-3 +kerning first=45 second=72 amount=2 +kerning first=45 second=63 amount=-2 +kerning first=45 second=56 amount=-4 +kerning first=45 second=108 amount=1 +kerning first=45 second=52 amount=2 +kerning first=45 second=50 amount=-9 +kerning first=45 second=92 amount=-8 +kerning first=45 second=47 amount=-4 +kerning first=45 second=71 amount=2 +kerning first=45 second=55 amount=-5 +kerning first=45 second=51 amount=-4 +kerning first=45 second=107 amount=1 +kerning first=45 second=49 amount=-8 +kerning first=45 second=40 amount=2 +kerning first=45 second=41 amount=-2 +kerning first=45 second=33 amount=1 +kerning first=45 second=79 amount=1 +kerning first=45 second=57 amount=-3 +kerning first=45 second=67 amount=2 +kerning first=45 second=105 amount=1 +kerning first=45 second=100 amount=2 +kerning first=45 second=113 amount=2 +kerning first=45 second=116 amount=2 +kerning first=45 second=103 amount=2 +kerning first=45 second=119 amount=2 +kerning first=45 second=118 amount=1 +kerning first=45 second=122 amount=-4 +kerning first=45 second=110 amount=1 +kerning first=45 second=120 amount=-1 +kerning first=45 second=114 amount=1 +kerning first=45 second=117 amount=2 +kerning first=45 second=111 amount=2 +kerning first=45 second=101 amount=1 +kerning first=45 second=99 amount=2 +kerning first=45 second=58 amount=-1 +kerning first=45 second=35 amount=2 +kerning first=45 second=34 amount=-3 +kerning first=45 second=39 amount=-2 +kerning first=45 second=44 amount=-6 +kerning first=45 second=45 amount=1 +kerning first=45 second=46 amount=-6 +kerning first=46 second=106 amount=1 +kerning first=46 second=87 amount=-4 +kerning first=46 second=84 amount=-3 +kerning first=46 second=104 amount=1 +kerning first=46 second=102 amount=-2 +kerning first=46 second=90 amount=3 +kerning first=46 second=88 amount=3 +kerning first=46 second=89 amount=-5 +kerning first=46 second=65 amount=2 +kerning first=46 second=53 amount=2 +kerning first=46 second=86 amount=-2 +kerning first=46 second=85 amount=-1 +kerning first=46 second=48 amount=-2 +kerning first=46 second=74 amount=-1 +kerning first=46 second=63 amount=-4 +kerning first=46 second=108 amount=2 +kerning first=46 second=52 amount=-6 +kerning first=46 second=50 amount=2 +kerning first=46 second=92 amount=-11 +kerning first=46 second=47 amount=3 +kerning first=46 second=55 amount=2 +kerning first=46 second=107 amount=2 +kerning first=46 second=80 amount=1 +kerning first=46 second=49 amount=-6 +kerning first=46 second=41 amount=2 +kerning first=46 second=73 amount=1 +kerning first=46 second=33 amount=1 +kerning first=46 second=79 amount=-1 +kerning first=46 second=54 amount=-2 +kerning first=46 second=105 amount=2 +kerning first=46 second=100 amount=2 +kerning first=46 second=112 amount=1 +kerning first=46 second=98 amount=1 +kerning first=46 second=116 amount=-3 +kerning first=46 second=103 amount=1 +kerning first=46 second=121 amount=-3 +kerning first=46 second=59 amount=2 +kerning first=46 second=118 amount=-2 +kerning first=46 second=122 amount=2 +kerning first=46 second=110 amount=2 +kerning first=46 second=120 amount=3 +kerning first=46 second=114 amount=2 +kerning first=46 second=117 amount=1 +kerning first=46 second=97 amount=3 +kerning first=46 second=111 amount=1 +kerning first=46 second=101 amount=1 +kerning first=46 second=99 amount=2 +kerning first=46 second=115 amount=3 +kerning first=46 second=58 amount=2 +kerning first=46 second=35 amount=-9 +kerning first=46 second=34 amount=-9 +kerning first=46 second=39 amount=-2 +kerning first=46 second=44 amount=1 +kerning first=46 second=45 amount=-4 +kerning first=46 second=46 amount=2 +kerning first=126 second=33 amount=-2 +kerning first=126 second=32 amount=-3 +kerning first=32 second=53 amount=-2 +kerning first=32 second=83 amount=1 +kerning first=32 second=123 amount=2 diff --git a/tests/cpp-tests/Resources/fonts/markerFelt-hd.png b/tests/cpp-tests/Resources/fonts/markerFelt-hd.png new file mode 100644 index 0000000000..3988cfdf65 Binary files /dev/null and b/tests/cpp-tests/Resources/fonts/markerFelt-hd.png differ diff --git a/tests/cpp-tests/Resources/fonts/tuffy_bold_italic-charmap-hd.plist b/tests/cpp-tests/Resources/fonts/tuffy_bold_italic-charmap-hd.plist new file mode 100644 index 0000000000..7b08e639f2 --- /dev/null +++ b/tests/cpp-tests/Resources/fonts/tuffy_bold_italic-charmap-hd.plist @@ -0,0 +1,16 @@ + + + + + version + 1 + textureFilename + tuffy_bold_italic-charmap-hd.png + itemHeight + 128 + itemWidth + 96 + firstChar + 32 + + diff --git a/tests/cpp-tests/Resources/fonts/tuffy_bold_italic-charmap-hd.png b/tests/cpp-tests/Resources/fonts/tuffy_bold_italic-charmap-hd.png new file mode 100644 index 0000000000..8167faf6c4 Binary files /dev/null and b/tests/cpp-tests/Resources/fonts/tuffy_bold_italic-charmap-hd.png differ diff --git a/tests/cpp-tests/proj.android-studio/app/build.gradle b/tests/cpp-tests/proj.android-studio/app/build.gradle index a9d15e0eef..31cd5e2674 100644 --- a/tests/cpp-tests/proj.android-studio/app/build.gradle +++ b/tests/cpp-tests/proj.android-studio/app/build.gradle @@ -21,17 +21,30 @@ android { assets.srcDir "assets" } + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' - compile 'com.android.support:support-v4:22.1.1' compile project(':libcocos2dx') } diff --git a/tests/cpp-tests/proj.android-studio/app/jni/Android.mk b/tests/cpp-tests/proj.android-studio/app/jni/Android.mk index 074dc23dd6..a0396a022c 100644 --- a/tests/cpp-tests/proj.android-studio/app/jni/Android.mk +++ b/tests/cpp-tests/proj.android-studio/app/jni/Android.mk @@ -125,6 +125,7 @@ LOCAL_SRC_FILES := main.cpp \ ../../../Classes/ShaderTest/ShaderTest.cpp \ ../../../Classes/ShaderTest/ShaderTest2.cpp \ ../../../Classes/SpineTest/SpineTest.cpp \ +../../../Classes/Scene3DTest/Scene3DTest.cpp \ ../../../Classes/Sprite3DTest/DrawNode3D.cpp \ ../../../Classes/Sprite3DTest/Sprite3DTest.cpp \ ../../../Classes/SpritePolygonTest/SpritePolygonTest.cpp \ diff --git a/tests/cpp-tests/proj.android-studio/app/project.properties b/tests/cpp-tests/proj.android-studio/app/project.properties new file mode 100644 index 0000000000..f049142c17 --- /dev/null +++ b/tests/cpp-tests/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/tests/cpp-tests/proj.android-studio/build-cfg.json b/tests/cpp-tests/proj.android-studio/build-cfg.json new file mode 100644 index 0000000000..98dbc8533f --- /dev/null +++ b/tests/cpp-tests/proj.android-studio/build-cfg.json @@ -0,0 +1,16 @@ +{ + "ndk_module_path" :[ + "../../..", + "../../../cocos", + "../../../external" + ], + "copy_resources": [ + { + "from": "../Resources", + "to": "", + "exclude": [ + "*.gz" + ] + } + ] +} diff --git a/tests/cpp-tests/proj.android-studio/gradlew b/tests/cpp-tests/proj.android-studio/gradlew old mode 100644 new mode 100755 diff --git a/tests/cpp-tests/proj.android-studio/proj.android-studio.iml b/tests/cpp-tests/proj.android-studio/proj.android-studio.iml deleted file mode 100644 index 2f6243b627..0000000000 --- a/tests/cpp-tests/proj.android-studio/proj.android-studio.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/cpp-tests/proj.android-studio/settings.gradle b/tests/cpp-tests/proj.android-studio/settings.gradle index 25a3ed500d..20644fa006 100644 --- a/tests/cpp-tests/proj.android-studio/settings.gradle +++ b/tests/cpp-tests/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../../../cocos/platform/android/libcocos2dx') -include ':app' +include ':CppTests' +project(':CppTests').projectDir = new File(settingsDir, 'app') diff --git a/tests/cpp-tests/proj.win10/App.xaml b/tests/cpp-tests/proj.win10/App.xaml new file mode 100644 index 0000000000..62de149dd6 --- /dev/null +++ b/tests/cpp-tests/proj.win10/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/tests/cpp-tests/proj.win10/App.xaml.cpp b/tests/cpp-tests/proj.win10/App.xaml.cpp new file mode 100644 index 0000000000..f702179939 --- /dev/null +++ b/tests/cpp-tests/proj.win10/App.xaml.cpp @@ -0,0 +1,21 @@ +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; + +App::App() +{ + InitializeComponent(); +} + +void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +{ + if (mPage == nullptr) + { + mPage = ref new OpenGLESPage(&mOpenGLES); + } + + // Place the page in the current window and ensure that it is active. + Windows::UI::Xaml::Window::Current->Content = mPage; + Windows::UI::Xaml::Window::Current->Activate(); +} diff --git a/tests/cpp-tests/proj.win10/App.xaml.h b/tests/cpp-tests/proj.win10/App.xaml.h new file mode 100644 index 0000000000..8697d3d824 --- /dev/null +++ b/tests/cpp-tests/proj.win10/App.xaml.h @@ -0,0 +1,19 @@ +#pragma once + +#include "app.g.h" +#include "OpenGLES.h" +#include "openglespage.xaml.h" + +namespace cocos2d +{ + ref class App sealed + { + public: + App(); + virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; + + private: + OpenGLESPage^ mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/tests/cpp-tests/proj.win10/Assets/Logo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/Logo.scale-100.png new file mode 100644 index 0000000000..e26771cb33 Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/Logo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/SmallLogo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/SmallLogo.scale-100.png new file mode 100644 index 0000000000..1eb0d9d528 Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/SmallLogo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/SplashScreen.scale-100.png b/tests/cpp-tests/proj.win10/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000000..c951e031bd Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/SplashScreen.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/StoreLogo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000000..dcb672712c Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/StoreLogo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/WideLogo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/WideLogo.scale-100.png new file mode 100644 index 0000000000..9dd94b628c Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/WideLogo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Package.appxmanifest b/tests/cpp-tests/proj.win10/Package.appxmanifest new file mode 100644 index 0000000000..1a3dabe758 --- /dev/null +++ b/tests/cpp-tests/proj.win10/Package.appxmanifest @@ -0,0 +1,30 @@ + + + + + + cpp-tests + Microsoft Open Technologies, Inc. + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win10/cpp-tests.vcxproj b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj new file mode 100644 index 0000000000..ecee9bdf58 --- /dev/null +++ b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj @@ -0,0 +1,742 @@ + + + + {c1307b42-d00a-4b88-bcdd-0a16a81ff4c1} + cpp_tests + en-US + 14.0 + true + Windows Store + 8.2 + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + Application + true + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cpp-tests_TemporaryKey.pfx + False + x86 + + + false + + + false + + + false + + + false + + + false + + + false + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056;4800; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + ProgramDatabase + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + false + ProgramDatabase + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + + + + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056;4800; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + ProgramDatabase + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + + + + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056;4800; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + EditAndContinue + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + + + + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + App.xaml + + + + + Designer + + + + + Designer + + + + + + + + + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + App.xaml + + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + + + {0c32d479-46d5-46c3-9aa9-0a8ff8320516} + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win10/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj.filters new file mode 100644 index 0000000000..038cf9ce01 --- /dev/null +++ b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj.filters @@ -0,0 +1,1782 @@ + + + + + 97d8d08c-848a-420e-aab1-5061457b491f + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Assets + + + Assets + + + Assets + + + Assets + + + {72a5938d-b456-4ee5-a76a-5e28c0cf30b5} + + + {81d00d76-81ec-4274-8e14-0066561a59f3} + + + {12320dbd-8679-44e8-b002-10cfd1f0ab8d} + + + {ec79851d-4b4e-4cca-a60a-db3bd19e9df0} + + + {c71ed4ef-b44c-4efa-a557-96d792c4082f} + + + {a762d21f-dab4-4e65-9635-8a2d1c3720a5} + + + {ff2c6e21-2e15-47ba-8e8a-d32db4c4bd7d} + + + {bddbff12-4011-4071-86c3-d2d4b01d9f07} + + + {142a60f8-f519-453f-9641-13c42af61fbc} + + + {0a14dee6-42c3-4144-a086-30bcae298e81} + + + {36c8d894-0028-4d9a-b9c1-3d2b121630da} + + + {ef5441af-f919-4af7-b130-f69ad71bf475} + + + {1a800ef0-fbc5-47ad-903d-48cb2e6e884a} + + + {e05a72bb-7eed-46a8-8216-1714220c79bf} + + + {6990fa3c-1895-48ec-9823-c82132260315} + + + {4264a752-8ba3-4123-a8e4-10099dc9cf7f} + + + {440a9c5a-db16-4c28-99ee-58ff0f719ba2} + + + {d73c786c-4cfe-4e17-9d9a-322375186ec7} + + + {4fdbcbde-1a04-49bc-a560-0b23a61c9850} + + + {583443c6-166b-4693-a2d1-ad846f6813bc} + + + {54e78cdc-cc15-4d83-8d3c-ff77beae1446} + + + {8e16d7fe-b605-4eaf-9474-ec8a1298abdc} + + + {e5b0399b-acae-4f23-9a37-063323e86386} + + + {afcfb524-ce73-49ba-89ce-cb99287eda6c} + + + {8a60f5bf-9873-44fc-aa4d-29056ae1c370} + + + {d8bbe73e-03bd-4262-b49f-402a14f8a13d} + + + {8a4d0c1b-0951-4965-8740-e430dde2fbe8} + + + {0bf42589-4ced-4603-a901-e773767d83f7} + + + {ff1dcf6c-41df-4b5c-aa35-80f52ecc34eb} + + + {7fda7040-9402-4f45-b141-22a74978c3d2} + + + {64eae2a4-f1f2-4d57-af0e-f417669bf6ab} + + + {9f2342f7-9cfa-4897-8610-5aba7d2a8eda} + + + {618404c5-9e20-4c6b-ba9c-11699ba3c45c} + + + {a6a92123-dd2f-4c1e-9780-a8183491b3d2} + + + {ee4418eb-5a74-4ba6-a3d9-361793492383} + + + {50348955-c1df-4e27-ba81-7f1f7a7f7d0b} + + + {a3022a16-5125-46fe-bbbf-88b6327fdf90} + + + {c182d51b-571a-41b9-93c4-2f16a9a6e382} + + + {24c2bc37-1b31-4844-981f-d0b842636df1} + + + {a8c99d83-bb5b-4732-9654-5c4a46833584} + + + {df4917f4-0ed9-483b-9133-71d60ba8a4fd} + + + {0648a349-fa88-45e2-8304-58576ac063b2} + + + {a52b46b5-e7f9-4780-938f-98e58d702db3} + + + {1a5d3f8b-3643-47e1-a6d9-7dad49dcb624} + + + {ae687fa8-7a8d-4b9c-9618-3191c9be1927} + + + {b39e1877-a9c0-4c7c-acc9-a685ad2daf3b} + + + {53ec3574-9cb7-4e7b-af67-e7f7f9e6a0e6} + + + {3a131364-6664-4c15-a66e-2dbdf2b296b9} + + + {8d4ad0bf-81d4-4767-ac71-39b5c75b72ba} + + + {d93b735e-696c-43b7-9a79-993ca680b953} + + + {19e37819-45ae-474d-86d9-46104d51e247} + + + {aa8d908d-05dd-4dd3-9cd7-1a381e167ba8} + + + {6a181335-c139-4928-84f0-40c3373befb8} + + + {6135b950-f660-4f73-8c40-bbc31c6e2863} + + + {43e4143b-0be4-4800-9cd3-9293bb1006ce} + + + {1716fd6e-cd96-4bea-96d0-37d57dd602c5} + + + {718a904b-d90b-4aa0-944f-81a69d287ea5} + + + {1ec92552-3f16-4080-ba2f-a171b3a7f92c} + + + {cf755f22-4dbd-427a-b92a-f7ef14f72990} + + + {8240d810-c3a1-403c-8d60-f83ca945bf34} + + + {f2357ab1-759e-42fa-87f3-1e33a775c912} + + + {c84d9ab4-0f15-4a7e-b214-238249f06204} + + + {e45b72a6-fe38-4c7a-986a-424d303b847f} + + + {7ec771c0-0344-43e9-9ae8-0f8a278791a2} + + + {878bc3fc-cc88-43cb-85b7-f64c31c527b6} + + + {340b2acb-098d-441d-9737-6788ea17541a} + + + {ff68b4b0-3bdf-4813-8552-b79af838c8a3} + + + {a60b411f-fae8-461b-afe7-8e8033d2153c} + + + {4d8e2aef-dfcc-45f6-a027-8aea00cafa29} + + + {82b1b84a-5a70-4309-a1bc-5bed28b93fca} + + + {f796e4f7-2eb3-4692-8c9c-235210efed10} + + + {6d95ed56-5c1c-46d3-9e80-79240ebd5072} + + + {bfb4a411-50bc-4c85-a672-e36f3cbc81b7} + + + {128e1a02-7a70-4b1e-940d-3ff988396f58} + + + {44105a0d-741e-48b5-9d78-0402eec04cfc} + + + {c278bd7b-bfd0-4f93-b080-68276c138f64} + + + {bdf10730-fe07-490e-8494-421b4a73f708} + + + {67e286b7-a1a6-49c2-ad15-6cdc9ed53007} + + + {314aae2a-4e9f-40d3-96a7-6792101fbc83} + + + {ab6bb602-44bb-49dc-8bf7-b1a894a51281} + + + {9601d114-2994-4921-aa77-68b5d5dda079} + + + {9697d5ba-4925-4f8a-b03c-f6e077bb235e} + + + {2c6bf95b-0dc3-4dd1-9261-b09abbf7a5ef} + + + {8ee0bd19-66cb-44af-8909-148cea32993e} + + + {87d01b39-db32-43ea-a3b7-fa78270496f2} + + + {6e5ff90e-737d-4fed-83c4-4019f1cdbfd0} + + + {4ce89c31-a7c7-4f75-8ba2-20728bec004c} + + + {10f3d541-41ea-423a-b299-a7cd56831c67} + + + {ac122973-5abd-4170-8c04-2fe623c34b0b} + + + {aa6b6c58-a9e1-432c-9752-8a8ecab14af6} + + + {c5823b1e-ba02-4371-8d45-279252a56fd4} + + + {b66c0e30-ce97-4366-98e7-61b6e8d167d3} + + + {4e7d6608-39de-4031-8f21-606927329eb2} + + + {ba9c4da6-6f31-49fe-b873-62dcff471d92} + + + {ccc87a7c-9e62-4035-a4c5-f7a5880139a8} + + + {8d6fe7eb-ba6c-4cea-93b2-1adaf2c8e2ae} + + + {dd49a12b-b5dd-415e-9a98-7b63a46b9028} + + + {96b173ca-93d1-4d81-8df4-c958f51e606f} + + + {e4ee8bfa-2eac-4778-bfb5-006fc95020b5} + + + {119e04c5-5d54-4972-aeb8-9bb32f7a33ac} + + + {04b6873a-ec2a-4695-80b5-df70a54a37d5} + + + {3df38e07-ce63-44fa-900b-e20d39848bad} + + + {e5a446a6-fee6-4802-952b-eb18a397f446} + + + {16c5df56-4880-4bf2-a626-fc8974cd9df3} + + + {5e03116b-9f99-4db3-808a-b36aaae5dae0} + + + {baf5dbe8-8801-4333-a8c2-6f96fbe31b5d} + + + {11da21cc-bd40-4f2c-8bf9-5056772f1ba0} + + + {733a8fe7-3fee-43e8-9437-d220158bb48b} + + + {ac191442-d014-4327-84cc-e31d233cb5ed} + + + {684498f9-817b-4058-a932-0cd4d9cde9eb} + + + {8af92cb5-8107-4998-8fa8-f7e959146a06} + + + {62e7ccf1-beeb-4f93-b069-5a81e62776a4} + + + {2d74d632-649d-4d94-bf6a-cfa01315a5b0} + + + {82556440-cf2a-45b7-8a23-718c25ad9007} + + + {842b8441-0677-46fd-ac69-effbe83b0776} + + + {ea7e291b-1de5-4be5-9f59-c92dfcb5dac5} + + + {b1107d06-46fc-4b73-9776-8d8c988aba40} + + + {cef7e8dc-ebcd-4eab-ad0a-1e885fa26373} + + + {b70087b3-b070-48f9-9be0-41226092dcb8} + + + {f10b76ee-8c87-4b9f-b8af-ace7a38bb6f2} + + + {568809dd-eb65-4bb2-90d2-251313e5b67e} + + + {1830aea4-07f5-466e-928c-a67a02083535} + + + {a34bc185-d0fa-4e93-b289-954abaedcaae} + + + + + + + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes\ActionManagerTest + + + Classes\ActionsEaseTest + + + Classes\ActionsProgressTest + + + Classes\ActionsTest + + + Classes\AllocatorTest + + + Classes\BillBoardTest + + + Classes\Box2DTest + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest\Bug-458 + + + Classes\BugsTest\Bug-458 + + + Classes\Camera3DTest + + + Classes\ChipmunkTest + + + Classes\ClickAndMoveTest + + + Classes\ClippingNodeTest + + + Classes\CocosDenshionTest + + + Classes\CocosStudio3DTest + + + Classes\ConfigurationTest + + + Classes\ConsoleTest + + + Classes\CurrentLanguageTest + + + Classes\DataVisitorTest + + + Classes\DrawPrimitivesTest + + + Classes\EffectsAdvancedTest + + + Classes\EffectsTest + + + Classes\ExtensionsTest + + + Classes\ExtensionsTest\CocosBuilderTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocoStudioActionTimelineTest + + + Classes\ExtensionsTest\CocoStudioArmatureTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioSceneTest + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlButtonTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlColourPicker + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlPotentiometerTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSliderTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlStepperTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSwitchTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NotificationCenterTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\FileUtilsTest + + + Classes\InputTest + + + Classes\FontTest + + + Classes\IntervalTest + + + Classes\LabelTest + + + Classes\LabelTest + + + Classes\LayerTest + + + Classes\LightTest + + + Classes\MenuTest + + + Classes\MotionStreakTest + + + Classes\MutiTouchTest + + + Classes\NewEventDispatcherTest + + + Classes\NewRendererTest + + + Classes\NodeTest + + + Classes\OpenURLTest + + + Classes\ParallaxTest + + + Classes\Particle3DTest + + + Classes\ParticleTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PhysicsTest + + + Classes\ReleasePoolTest + + + Classes\RenderTextureTest + + + Classes\RotateWorldTest + + + Classes\SceneTest + + + Classes\SchedulerTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\SpineTest + + + Classes\Sprite3DTest + + + Classes\Sprite3DTest + + + Classes\SpriteTest + + + Classes\TerrainTest + + + Classes\TextInputTest + + + Classes\Texture2dTest + + + Classes\TextureCacheTest + + + Classes\TexturePackerEncryptionTest + + + Classes\TileMapTest + + + Classes\TileMapTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TransitionsTest + + + Classes\UITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest\CocostudioParserTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UIFocusTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIRichTextTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UnitTest + + + Classes\UnitTest + + + Classes\UserDefaultTest + + + Classes\ZwoptexTest + + + + + + + Classes\SpritePolygonTest + + + Classes\Scene3DTest + + + Classes\MaterialSystemTest + + + Classes\NewAudioEngineTest + + + Classes\Physics3DTest + + + + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes\ActionManagerTest + + + Classes\ActionsEaseTest + + + Classes\ActionsProgressTest + + + Classes\ActionsTest + + + Classes\AllocatorTest + + + Classes\BillBoardTest + + + Classes\Box2DTest + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest\Bug-458 + + + Classes\BugsTest\Bug-458 + + + Classes\Camera3DTest + + + Classes\ChipmunkTest + + + Classes\ClickAndMoveTest + + + Classes\ClippingNodeTest + + + Classes\CocosDenshionTest + + + Classes\CocosStudio3DTest + + + Classes\ConfigurationTest + + + Classes\ConsoleTest + + + Classes\CurrentLanguageTest + + + Classes\DataVisitorTest + + + Classes\DrawPrimitivesTest + + + Classes\EffectsAdvancedTest + + + Classes\EffectsTest + + + Classes\ExtensionsTest + + + Classes\ExtensionsTest\CocosBuilderTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\LabelTest + + + Classes\ExtensionsTest\CocosBuilderTest\LabelTest + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\ParticleSystemTest + + + Classes\ExtensionsTest\CocosBuilderTest\ParticleSystemTest + + + Classes\ExtensionsTest\CocosBuilderTest\ScrollViewTest + + + Classes\ExtensionsTest\CocosBuilderTest\ScrollViewTest + + + Classes\ExtensionsTest\CocosBuilderTest\SpriteTest + + + Classes\ExtensionsTest\CocosBuilderTest\SpriteTest + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocoStudioActionTimelineTest + + + Classes\ExtensionsTest\CocoStudioArmatureTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioSceneTest + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlButtonTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlColourPicker + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlPotentiometerTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSliderTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlStepperTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSwitchTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NotificationCenterTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\FileUtilsTest + + + Classes\InputTest + + + Classes\FontTest + + + Classes\IntervalTest + + + Classes\LabelTest + + + Classes\LabelTest + + + Classes\LayerTest + + + Classes\LightTest + + + Classes\MenuTest + + + Classes\MotionStreakTest + + + Classes\MutiTouchTest + + + Classes\NewEventDispatcherTest + + + Classes\NewRendererTest + + + Classes\NodeTest + + + Classes\OpenURLTest + + + Classes\ParallaxTest + + + Classes\Particle3DTest + + + Classes\ParticleTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PhysicsTest + + + Classes\ReleasePoolTest + + + Classes\RenderTextureTest + + + Classes\RotateWorldTest + + + Classes\SceneTest + + + Classes\SchedulerTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\SpineTest + + + Classes\Sprite3DTest + + + Classes\Sprite3DTest + + + Classes\SpriteTest + + + Classes\TerrainTest + + + Classes\TextInputTest + + + Classes\Texture2dTest + + + Classes\TextureCacheTest + + + Classes\TexturePackerEncryptionTest + + + Classes\TileMapTest + + + Classes\TileMapTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TransitionsTest + + + Classes\UITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest\CocostudioParserTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UIFocusTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIRichTextTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UnitTest + + + Classes\UnitTest + + + Classes\UserDefaultTest + + + Classes\ZwoptexTest + + + + + + + Classes\SpritePolygonTest + + + Classes\Scene3DTest + + + Classes\MaterialSystemTest + + + Classes\NewAudioEngineTest + + + Classes\Physics3DTest + + + + + Assets + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win10/cpp-tests_TemporaryKey.pfx b/tests/cpp-tests/proj.win10/cpp-tests_TemporaryKey.pfx new file mode 100644 index 0000000000..908e16588f Binary files /dev/null and b/tests/cpp-tests/proj.win10/cpp-tests_TemporaryKey.pfx differ diff --git a/tests/cpp-tests/proj.win10/resources.props b/tests/cpp-tests/proj.win10/resources.props new file mode 100644 index 0000000000..27ed663949 --- /dev/null +++ b/tests/cpp-tests/proj.win10/resources.props @@ -0,0 +1,19 @@ + + + + + + <_CustomResource Include="..\Resources\**\*"> + Assets\Resources\%(RecursiveDir)%(FileName)%(Extension) + true + + + + + + + + + + + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems index 273ff343a2..f0e6ca19a6 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems @@ -110,6 +110,7 @@ + @@ -376,6 +377,7 @@ + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters index 75b451a0c7..62e5be59d8 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters @@ -787,6 +787,9 @@ Classes\Physics3DTest + + Classes\NewAudioEngineTest + Classes\Scene3DTest @@ -1749,6 +1752,9 @@ Classes\Physics3DTest + + Classes\NewAudioEngineTest + Classes\Scene3DTest diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj index a4b34f4c3c..db50b67dd4 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Windows/cpp-tests.Windows.vcxproj @@ -111,8 +111,8 @@ %(DisableSpecificWarnings) pch.h pch.h - CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false false @@ -130,8 +130,8 @@ %(DisableSpecificWarnings) pch.h pch.h - CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false false @@ -149,8 +149,8 @@ %(DisableSpecificWarnings) pch.h pch.h - CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) - CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) false false @@ -177,6 +177,9 @@ {3b26a12d-3a44-47ea-82d2-282660fc844d} + + {ec2b1292-2d8c-4feb-a84b-2550b32c1ae7} + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj index b54b35bd68..209d85d0b5 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.WindowsPhone/cpp-tests.WindowsPhone.vcxproj @@ -83,8 +83,8 @@ pch.h %(DisableSpecificWarnings) %(DisableSpecificWarnings) - CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) - CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use Use false @@ -105,8 +105,8 @@ pch.h %(DisableSpecificWarnings) %(DisableSpecificWarnings) - CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) - CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + CC_WINDOWS_PHONE_8_1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) Use Use false @@ -115,7 +115,7 @@ True - x86 + arm false @@ -146,6 +146,9 @@ {22f798d8-bfff-4754-996f-a5395343d5ec} + + {e35634bd-b91b-4a6d-b957-96f56dd065f9} + diff --git a/tests/game-controller-test/.cocos-project.json b/tests/game-controller-test/.cocos-project.json index 91621fd443..b0a3b0127b 100644 --- a/tests/game-controller-test/.cocos-project.json +++ b/tests/game-controller-test/.cocos-project.json @@ -6,7 +6,8 @@ }, "project_type": "cpp", "android_cfg": { - "project_path": "proj.android" + "project_path": "proj.android", + "studio_proj_path" : "proj.android-studio" }, "engine_dir": "../../" } diff --git a/tests/game-controller-test/proj.android-studio/app/build.gradle b/tests/game-controller-test/proj.android-studio/app/build.gradle index 3c733eb12d..42af47e8f4 100644 --- a/tests/game-controller-test/proj.android-studio/app/build.gradle +++ b/tests/game-controller-test/proj.android-studio/app/build.gradle @@ -20,17 +20,30 @@ android { assets.srcDir "assets" } + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' - compile 'com.android.support:support-v4:22.1.1' compile project(':libcocos2dx_with_controller') } diff --git a/tests/game-controller-test/proj.android-studio/app/project.properties b/tests/game-controller-test/proj.android-studio/app/project.properties new file mode 100644 index 0000000000..f049142c17 --- /dev/null +++ b/tests/game-controller-test/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/tests/game-controller-test/proj.android-studio/build-cfg.json b/tests/game-controller-test/proj.android-studio/build-cfg.json new file mode 100644 index 0000000000..98dbc8533f --- /dev/null +++ b/tests/game-controller-test/proj.android-studio/build-cfg.json @@ -0,0 +1,16 @@ +{ + "ndk_module_path" :[ + "../../..", + "../../../cocos", + "../../../external" + ], + "copy_resources": [ + { + "from": "../Resources", + "to": "", + "exclude": [ + "*.gz" + ] + } + ] +} diff --git a/tests/game-controller-test/proj.android-studio/gradlew b/tests/game-controller-test/proj.android-studio/gradlew old mode 100644 new mode 100755 diff --git a/tests/game-controller-test/proj.android-studio/proj.android-studio.iml b/tests/game-controller-test/proj.android-studio/proj.android-studio.iml deleted file mode 100644 index 2f6243b627..0000000000 --- a/tests/game-controller-test/proj.android-studio/proj.android-studio.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/game-controller-test/proj.android-studio/settings.gradle b/tests/game-controller-test/proj.android-studio/settings.gradle index d2f6c77247..f8b8e3329d 100644 --- a/tests/game-controller-test/proj.android-studio/settings.gradle +++ b/tests/game-controller-test/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx_with_controller' project(':libcocos2dx_with_controller').projectDir = new File(settingsDir, '../../../cocos/platform/android/libcocos2dx-with-controller') -include ':app' +include ':GameControllerTest' +project(':GameControllerTest').projectDir = new File(settingsDir, 'app') diff --git a/tests/js-tests/.cocos-project.json b/tests/js-tests/.cocos-project.json index bd34889d3f..353080810c 100644 --- a/tests/js-tests/.cocos-project.json +++ b/tests/js-tests/.cocos-project.json @@ -18,7 +18,8 @@ "target_name": "js-tests Mac" }, "android_cfg": { - "project_path": "project/proj.android" + "project_path": "project/proj.android", + "studio_proj_path" : "project/proj.android-studio" }, "web_cfg": { "project_path": "", diff --git a/tests/js-tests/project.json b/tests/js-tests/project.json index 1c1cd0bea3..a014ce397f 100644 --- a/tests/js-tests/project.json +++ b/tests/js-tests/project.json @@ -188,6 +188,7 @@ "src/SpritePolygonTest/SpritePolygonTest.js", "src/MaterialSystemTest/MaterialSystemTest.js", - "src/TerrainTest/TerrainTest.js" + "src/TerrainTest/TerrainTest.js", + "src/Physics3DTest/Physics3DTest.js" ] } diff --git a/tests/js-tests/project/CMakeLists.txt b/tests/js-tests/project/CMakeLists.txt index e7274e7751..04afe8b7e9 100644 --- a/tests/js-tests/project/CMakeLists.txt +++ b/tests/js-tests/project/CMakeLists.txt @@ -79,6 +79,7 @@ pre_build(${APP_NAME} COMMAND ${CMAKE_COMMAND} -E remove ${APP_BIN_DIR}${RES_PREFIX}/*.js COMMAND ${CMAKE_COMMAND} -E remove ${APP_BIN_DIR}${RES_PREFIX}/*.json COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../../cpp-tests/Resources ${APP_BIN_DIR}${RES_PREFIX}/res + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../res ${APP_BIN_DIR}${RES_PREFIX}/res COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../src ${APP_BIN_DIR}${RES_PREFIX}/src COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../../../cocos/scripting/js-bindings/script ${APP_BIN_DIR}${RES_PREFIX}/script COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../main.js ${APP_BIN_DIR}${RES_PREFIX}/main.js diff --git a/tests/js-tests/project/Classes/AppDelegate.cpp b/tests/js-tests/project/Classes/AppDelegate.cpp index edbcae902c..06b6438871 100644 --- a/tests/js-tests/project/Classes/AppDelegate.cpp +++ b/tests/js-tests/project/Classes/AppDelegate.cpp @@ -10,6 +10,8 @@ #include "jsb_cocos2dx_3d_auto.hpp" #include "jsb_cocos2dx_3d_extension_auto.hpp" #include "jsb_cocos2dx_experimental.hpp" +#include "jsb_cocos2dx_physics3d_auto.hpp" +#include "physics3d/jsb_cocos2dx_physics3d_manual.h" #include "experimental/jsb_cocos2dx_experimental_manual.h" #include "3d/jsb_cocos2dx_3d_manual.h" #include "extension/jsb_cocos2dx_extension_manual.h" @@ -35,8 +37,11 @@ #include "platform/ios/JavaScriptObjCBridge.h" #endif -#if(CC_TARGET_PLATFORM != CC_PLATFORM_WP8) #include "js_Effect3D_bindings.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include "jsb_cocos2dx_experimental_webView_auto.hpp" +#include "experimental/jsb_cocos2dx_experimental_webView_manual.h" #endif USING_NS_CC; @@ -65,7 +70,7 @@ bool AppDelegate::applicationDidFinishLaunching() auto director = Director::getInstance(); auto glview = director->getOpenGLView(); if(!glview) { -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) glview = cocos2d::GLViewImpl::create("js-tests"); #else glview = cocos2d::GLViewImpl::createWithRect("js-tests", Rect(0,0,900,640)); @@ -109,6 +114,9 @@ bool AppDelegate::applicationDidFinishLaunching() sc->addRegisterCallback(register_all_cocos2dx_experimental); sc->addRegisterCallback(register_all_cocos2dx_experimental_manual); + + sc->addRegisterCallback(register_all_cocos2dx_physics3d); + sc->addRegisterCallback(register_all_cocos2dx_physics3d_manual); #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) sc->addRegisterCallback(JavascriptJavaBridge::_js_register); @@ -117,8 +125,11 @@ bool AppDelegate::applicationDidFinishLaunching() #endif sc->addRegisterCallback(register_DrawNode3D_bindings); -#if(CC_TARGET_PLATFORM != CC_PLATFORM_WP8) sc->addRegisterCallback(register_Effect3D_bindings); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + sc->addRegisterCallback(register_all_cocos2dx_experimental_webView); + sc->addRegisterCallback(register_all_cocos2dx_experimental_webView_manual); #endif sc->start(); diff --git a/tests/js-tests/project/Classes/js_Effect3D_bindings.cpp b/tests/js-tests/project/Classes/js_Effect3D_bindings.cpp index f83aeca744..b4de7b6830 100644 --- a/tests/js-tests/project/Classes/js_Effect3D_bindings.cpp +++ b/tests/js-tests/project/Classes/js_Effect3D_bindings.cpp @@ -66,7 +66,7 @@ protected: float _outlineWidth; //weak reference EffectSprite3D* _sprite; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) EventListenerCustom* _backToForegroundListener; #endif @@ -227,7 +227,7 @@ Effect3DOutline::Effect3DOutline() , _outlineColor(1, 1, 1) , _sprite(nullptr) { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) _backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom*) { @@ -244,7 +244,7 @@ Effect3DOutline::Effect3DOutline() Effect3DOutline::~Effect3DOutline() { -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundListener); #endif } diff --git a/tests/js-tests/project/proj.android-studio/app/build.gradle b/tests/js-tests/project/proj.android-studio/app/build.gradle index 74f9d2621a..e840b5a973 100644 --- a/tests/js-tests/project/proj.android-studio/app/build.gradle +++ b/tests/js-tests/project/proj.android-studio/app/build.gradle @@ -21,17 +21,30 @@ android { assets.srcDir "assets" } + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' - compile 'com.android.support:support-v4:22.1.1' compile project(':libcocos2dx') } diff --git a/tests/js-tests/project/proj.android-studio/app/project.properties b/tests/js-tests/project/proj.android-studio/app/project.properties new file mode 100644 index 0000000000..f049142c17 --- /dev/null +++ b/tests/js-tests/project/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/tests/js-tests/project/proj.android-studio/build-cfg.json b/tests/js-tests/project/proj.android-studio/build-cfg.json new file mode 100644 index 0000000000..19598e33d5 --- /dev/null +++ b/tests/js-tests/project/proj.android-studio/build-cfg.json @@ -0,0 +1,36 @@ +{ + "copy_resources": [ + { + "from": "../../src", + "to": "src" + }, + { + "from": "../../../cpp-tests/Resources/", + "to": "res/", + "exclude": [ + "*.gz" + ] + }, + { + "from": "../../main.js", + "to": "" + }, + { + "from": "../../project.json", + "to": "" + }, + { + "from": "../../../../cocos/scripting/js-bindings/script", + "to": "script" + }, + { + "from": "../../resjs", + "to": "res/" + } + ], + "ndk_module_path": [ + "../../../..", + "../../../../cocos", + "../../../../external" + ] +} diff --git a/tests/js-tests/project/proj.android-studio/gradlew b/tests/js-tests/project/proj.android-studio/gradlew old mode 100644 new mode 100755 diff --git a/tests/js-tests/project/proj.android-studio/proj.android-studio.iml b/tests/js-tests/project/proj.android-studio/proj.android-studio.iml deleted file mode 100644 index 2f6243b627..0000000000 --- a/tests/js-tests/project/proj.android-studio/proj.android-studio.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/js-tests/project/proj.android-studio/settings.gradle b/tests/js-tests/project/proj.android-studio/settings.gradle index 1de06f6b29..05e6a4191f 100644 --- a/tests/js-tests/project/proj.android-studio/settings.gradle +++ b/tests/js-tests/project/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../../../../cocos/platform/android/libcocos2dx') -include ':app' +include ':JSTests' +project(':JSTests').projectDir = new File(settingsDir, 'app') diff --git a/tests/js-tests/project/proj.android/build-cfg.json b/tests/js-tests/project/proj.android/build-cfg.json index 4010cc7cdb..19598e33d5 100644 --- a/tests/js-tests/project/proj.android/build-cfg.json +++ b/tests/js-tests/project/proj.android/build-cfg.json @@ -6,7 +6,10 @@ }, { "from": "../../../cpp-tests/Resources/", - "to": "res/" + "to": "res/", + "exclude": [ + "*.gz" + ] }, { "from": "../../main.js", @@ -19,6 +22,10 @@ { "from": "../../../../cocos/scripting/js-bindings/script", "to": "script" + }, + { + "from": "../../resjs", + "to": "res/" } ], "ndk_module_path": [ diff --git a/tests/js-tests/project/proj.win32/js-tests.vcxproj b/tests/js-tests/project/proj.win32/js-tests.vcxproj index 1ba9f89b31..e6ffa52dba 100644 --- a/tests/js-tests/project/proj.win32/js-tests.vcxproj +++ b/tests/js-tests/project/proj.win32/js-tests.vcxproj @@ -121,7 +121,8 @@ xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\js-bindings\script\*" "$(OutDir) xcopy "$(ProjectDir)..\..\src" "$(OutDir)\src\" /e /Y xcopy "$(ProjectDir)..\..\..\cpp-tests\Resources" "$(OutDir)\res\" /e /Y copy "$(ProjectDir)..\..\main.js" "$(OutDir)" -copy "$(ProjectDir)..\..\project.json" "$(OutDir)" +copy "$(ProjectDir)..\..\project.json" "$(OutDir)" +xcopy "$(ProjectDir)..\..\resjs" "$(OutDir)\res\" /e /Y Copy js and resource files. @@ -182,7 +183,8 @@ xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\js-bindings\script\*" "$(OutDir) xcopy "$(ProjectDir)..\..\src" "$(OutDir)\src\" /e /Y xcopy "$(ProjectDir)..\..\..\cpp-tests\Resources" "$(OutDir)\res\" /e /Y copy "$(ProjectDir)..\..\main.js" "$(OutDir)" -copy "$(ProjectDir)..\..\project.json" "$(OutDir)" +copy "$(ProjectDir)..\..\project.json" "$(OutDir)" +xcopy "$(ProjectDir)..\..\resjs" "$(OutDir)\res\" /e /Y Copy js and resource files. diff --git a/tests/js-tests/project/proj.win8.1-universal/App.Windows/js-tests.Windows.vcxproj b/tests/js-tests/project/proj.win8.1-universal/App.Windows/js-tests.Windows.vcxproj index 14c9ea25f5..057df48bb8 100644 --- a/tests/js-tests/project/proj.win8.1-universal/App.Windows/js-tests.Windows.vcxproj +++ b/tests/js-tests/project/proj.win8.1-universal/App.Windows/js-tests.Windows.vcxproj @@ -123,6 +123,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -136,6 +137,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) @@ -149,6 +151,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -162,6 +165,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) @@ -175,6 +179,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -186,6 +191,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) echo "Copying Windows 8.1 Universal App CPP template files" diff --git a/tests/js-tests/project/proj.win8.1-universal/App.WindowsPhone/js-tests.WindowsPhone.vcxproj b/tests/js-tests/project/proj.win8.1-universal/App.WindowsPhone/js-tests.WindowsPhone.vcxproj index b9b5a08fcb..bad622cc1f 100644 --- a/tests/js-tests/project/proj.win8.1-universal/App.WindowsPhone/js-tests.WindowsPhone.vcxproj +++ b/tests/js-tests/project/proj.win8.1-universal/App.WindowsPhone/js-tests.WindowsPhone.vcxproj @@ -89,6 +89,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -98,6 +99,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) @@ -107,6 +109,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) @@ -116,6 +119,7 @@ pch.h $(ProjectDir)..\..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) false + CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions) diff --git a/tests/js-tests/resjs/Shaders/example_Blur.fsh b/tests/js-tests/resjs/Shaders/example_Blur.fsh new file mode 100644 index 0000000000..9bb423200d --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Blur.fsh @@ -0,0 +1,27 @@ +// Shader taken from: http://webglsamples.googlecode.com/hg/electricflower/electricflower.html + +#ifdef GL_ES +precision mediump float; +#endif + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +uniform vec2 blurSize; +uniform vec4 substract; + +void main() { + vec4 sum = vec4(0.0); + sum += texture2D(CC_Texture0, v_texCoord - 4.0 * blurSize) * 0.05; + sum += texture2D(CC_Texture0, v_texCoord - 3.0 * blurSize) * 0.09; + sum += texture2D(CC_Texture0, v_texCoord - 2.0 * blurSize) * 0.12; + sum += texture2D(CC_Texture0, v_texCoord - 1.0 * blurSize) * 0.15; + sum += texture2D(CC_Texture0, v_texCoord ) * 0.16; + sum += texture2D(CC_Texture0, v_texCoord + 1.0 * blurSize) * 0.15; + sum += texture2D(CC_Texture0, v_texCoord + 2.0 * blurSize) * 0.12; + sum += texture2D(CC_Texture0, v_texCoord + 3.0 * blurSize) * 0.09; + sum += texture2D(CC_Texture0, v_texCoord + 4.0 * blurSize) * 0.05; + + gl_FragColor = (sum - substract) * v_fragmentColor; +} + diff --git a/tests/js-tests/resjs/Shaders/example_ColorBars.fsh b/tests/js-tests/resjs/Shaders/example_ColorBars.fsh new file mode 100644 index 0000000000..10b36d5017 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_ColorBars.fsh @@ -0,0 +1,43 @@ +// http://www.cocos2d-iphone.org + +#ifdef GL_ES +precision lowp float; +#endif + +varying vec2 v_texCoord; + +vec4 getColorByCoord(int y){ + if(y < 5){ + if(y == 0){ + return vec4(1,0,0,1); + } else if(y == 1){ + return vec4(0,1,0,1); + } else if(y == 2){ + return vec4(0,0,1,1); + } else if(y == 3){ + return vec4(0,1,1,1); + } else{ + return vec4(1,0,1,1); + } + } else { + if(y == 5){ + return vec4(1,1,0,1); + } else if(y == 6){ + return vec4(1,1,1,1); + } else if(y == 7){ + return vec4(1,0.5,0,1); + } else if(y == 8){ + return vec4(1,0.5,0.5,1); + }else { + return vec4(0.5,0.5,1,1); + } + } +} + +void main(void) { + // inline to prevent "float" loss and keep using lowp + //int y = int( mod(( (gl_FragCoord.y+gl_FragCoord.x)*mod(CC_Time[0],5.0)) / 10.0, 10.0 ) ); + //int y = int( mod( CC_Time[3] + (gl_FragCoord.y + gl_FragCoord.x) / 10.0, 10.0 ) ); + int y = int( mod(gl_FragCoord.y / 10.0, 10.0 ) ); + gl_FragColor = getColorByCoord(y) * texture2D(CC_Texture0, v_texCoord); +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_ColorBars.vsh b/tests/js-tests/resjs/Shaders/example_ColorBars.vsh new file mode 100644 index 0000000000..71dea345f4 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_ColorBars.vsh @@ -0,0 +1,18 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; +attribute vec2 a_texCoord; + +#ifdef GL_ES +varying mediump vec2 v_texCoord; +#else +varying vec2 v_texCoord; +#endif + +void main() +{ + //gl_Position = CC_MVPMatrix * a_position; + gl_Position = (CC_PMatrix * CC_MVMatrix) * a_position; + v_texCoord = a_texCoord; +} + diff --git a/tests/js-tests/resjs/Shaders/example_Flower.fsh b/tests/js-tests/resjs/Shaders/example_Flower.fsh new file mode 100644 index 0000000000..9440e89425 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Flower.fsh @@ -0,0 +1,34 @@ +// Shader from http://www.iquilezles.org/apps/shadertoy/ + +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 center; +uniform vec2 resolution; + +//float u( float x ) { return 0.5+0.5*sign(x); } +float u( float x ) { return (x>0.0)?1.0:0.0; } +//float u( float x ) { return abs(x)/x; } + +void main(void) +{ + float time = CC_Time[1]; + vec2 p = 2.0 * (gl_FragCoord.xy - center.xy) / resolution.xy; + + float a = atan(p.x,p.y); + float r = length(p)*.75; + + float w = cos(3.1415927*time-r*2.0); + float h = 0.5+0.5*cos(12.0*a-w*7.0+r*8.0); + float d = 0.25+0.75*pow(h,1.0*r)*(0.7+0.3*w); + + float col = u( d-r ) * sqrt(1.0-r/d)*r*2.5; + col *= 1.25+0.25*cos((12.0*a-w*7.0+r*8.0)/2.0); + col *= 1.0 - 0.35*(0.5+0.5*sin(r*30.0))*(0.5+0.5*cos(12.0*a-w*7.0+r*8.0)); + gl_FragColor = vec4( + col, + col-h*0.5+r*.2 + 0.35*h*(1.0-r), + col-h*r + 0.1*h*(1.0-r), + 1.0); +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Flower.vsh b/tests/js-tests/resjs/Shaders/example_Flower.vsh new file mode 100644 index 0000000000..359ef1e855 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Flower.vsh @@ -0,0 +1,8 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; + +void main() +{ + gl_Position = CC_MVPMatrix * a_position; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Heart.fsh b/tests/js-tests/resjs/Shaders/example_Heart.fsh new file mode 100644 index 0000000000..3dbe33ef52 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Heart.fsh @@ -0,0 +1,33 @@ +// Shader from http://www.iquilezles.org/apps/shadertoy/ + +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 center; +uniform vec2 resolution; + +void main(void) +{ + float time = CC_Time[1]; + vec2 p = 2.0 * (gl_FragCoord.xy - center.xy) / resolution.xy; + + // animate + float tt = mod(time,2.0)/2.0; + float ss = pow(tt,.2)*0.5 + 0.5; + ss -= ss*0.2*sin(tt*6.2831*5.0)*exp(-tt*6.0); + p *= vec2(0.5,1.5) + ss*vec2(0.5,-0.5); + + + float a = atan(p.x,p.y)/3.141593; + float r = length(p); + + // shape + float h = abs(a); + float d = (13.0*h - 22.0*h*h + 10.0*h*h*h)/(6.0-5.0*h); + + // color + float f = step(r,d) * pow(1.0-r/d,0.25); + + gl_FragColor = vec4(f,0.0,0.0,f); +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Heart.vsh b/tests/js-tests/resjs/Shaders/example_Heart.vsh new file mode 100644 index 0000000000..359ef1e855 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Heart.vsh @@ -0,0 +1,8 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; + +void main() +{ + gl_Position = CC_MVPMatrix * a_position; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Julia.fsh b/tests/js-tests/resjs/Shaders/example_Julia.fsh new file mode 100644 index 0000000000..4d16aa0371 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Julia.fsh @@ -0,0 +1,29 @@ +// Shader from http://www.iquilezles.org/apps/shadertoy/ + +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 center; +uniform vec2 resolution; + +void main(void) +{ + float time = CC_Time[1]; + vec2 p = 2.0 * (gl_FragCoord.xy - center.xy) / resolution.xy; + vec2 cc = vec2( cos(.25*time), sin(.25*time*1.423) ); + + float dmin = 1000.0; + vec2 z = p*vec2(1.33,1.0); + for( int i=0; i<64; i++ ) + { + z = cc + vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y ); + float m2 = dot(z,z); + if( m2>100.0 ) break; + dmin=min(dmin,m2); + } + + float color = sqrt(sqrt(dmin))*0.7; + gl_FragColor = vec4(color,color,color,1.0); +} + diff --git a/tests/js-tests/resjs/Shaders/example_Julia.vsh b/tests/js-tests/resjs/Shaders/example_Julia.vsh new file mode 100644 index 0000000000..359ef1e855 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Julia.vsh @@ -0,0 +1,8 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; + +void main() +{ + gl_Position = CC_MVPMatrix * a_position; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Mandelbrot.fsh b/tests/js-tests/resjs/Shaders/example_Mandelbrot.fsh new file mode 100644 index 0000000000..51cef3b3a0 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Mandelbrot.fsh @@ -0,0 +1,41 @@ +// Shader from http://www.iquilezles.org/apps/shadertoy/ + +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 center; +uniform vec2 resolution; + +void main(void) +{ + vec2 p = 2.0 * (gl_FragCoord.xy - center.xy) / resolution.xy; + p.x *= resolution.x/resolution.y; + + float zoo = .62+.38*sin(.1*CC_Time[1]); + float coa = cos( 0.1*(1.0-zoo)*CC_Time[1] ); + float sia = sin( 0.1*(1.0-zoo)*CC_Time[1] ); + zoo = pow( zoo,8.0); + vec2 xy = vec2( p.x*coa-p.y*sia, p.x*sia+p.y*coa); + vec2 cc = vec2(-.745,.186) + xy*zoo; + + vec2 z = vec2(0.0); + vec2 z2 = z*z; + float m2; + float co = 0.0; + + for( int i=0; i<256; i++ ) + { + z = cc + vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y ); + m2 = dot(z,z); + if( m2>1024.0 ) break; + co += 1.0; + } + co = co + 1.0 - log2(.5*log2(m2)); + + co = sqrt(co/256.0); + gl_FragColor = vec4( .5+.5*cos(6.2831*co+0.0), + .5+.5*cos(6.2831*co+0.4), + .5+.5*cos(6.2831*co+0.7), + 1.0 ); +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Mandelbrot.vsh b/tests/js-tests/resjs/Shaders/example_Mandelbrot.vsh new file mode 100644 index 0000000000..359ef1e855 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Mandelbrot.vsh @@ -0,0 +1,8 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; + +void main() +{ + gl_Position = CC_MVPMatrix * a_position; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Monjori.fsh b/tests/js-tests/resjs/Shaders/example_Monjori.fsh new file mode 100644 index 0000000000..a830a24817 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Monjori.fsh @@ -0,0 +1,35 @@ +// Shader from http://www.iquilezles.org/apps/shadertoy/ + +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 center; +uniform vec2 resolution; + +void main(void) +{ + vec2 p = 2.0 * (gl_FragCoord.xy - center.xy) / resolution.xy; + float a = CC_Time[1]*40.0; + float d,e,f,g=1.0/40.0,h,i,r,q; + e=400.0*(p.x*0.5+0.5); + f=400.0*(p.y*0.5+0.5); + i=200.0+sin(e*g+a/150.0)*20.0; + d=200.0+cos(f*g/2.0)*18.0+cos(e*g)*7.0; + r=sqrt(pow(i-e,2.0)+pow(d-f,2.0)); + q=f/r; + e=(r*cos(q))-a/2.0;f=(r*sin(q))-a/2.0; + d=sin(e*g)*176.0+sin(e*g)*164.0+r; + h=((f+d)+a/2.0)*g; + i=cos(h+r*p.x/1.3)*(e+e+a)+cos(q*g*6.0)*(r+h/3.0); + h=sin(f*g)*144.0-sin(e*g)*212.0*p.x; + h=(h+(f-e)*q+sin(r-(a+h)/7.0)*10.0+i/4.0)*g; + i+=cos(h*2.3*sin(a/350.0-q))*184.0*sin(q-(r*4.3+a/12.0)*g)+tan(r*g+h)*184.0*cos(r*g+h); + i=mod(i/5.6,256.0)/64.0; + if(i<0.0) i+=4.0; + if(i>=2.0) i=4.0-i; + d=r/350.0; + d+=sin(d*d*8.0)*0.52; + f=(sin(a*g)+1.0)/2.0; + gl_FragColor=vec4(vec3(f*i/1.6,i/2.0+d/13.0,i)*d*p.x+vec3(i/1.3+d/8.0,i/2.0+d/18.0,i)*d*(1.0-p.x),1.0); +} diff --git a/tests/js-tests/resjs/Shaders/example_Monjori.vsh b/tests/js-tests/resjs/Shaders/example_Monjori.vsh new file mode 100644 index 0000000000..359ef1e855 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Monjori.vsh @@ -0,0 +1,8 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; + +void main() +{ + gl_Position = CC_MVPMatrix * a_position; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Outline.fsh b/tests/js-tests/resjs/Shaders/example_Outline.fsh new file mode 100644 index 0000000000..0bac52235c --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Outline.fsh @@ -0,0 +1,27 @@ +varying vec2 v_texCoord; +varying vec4 v_fragmentColor; + +uniform vec3 u_outlineColor; +uniform float u_threshold; +uniform float u_radius; + +void main() +{ + float radius = u_radius; + vec4 accum = vec4(0.0); + vec4 normal = vec4(0.0); + + normal = texture2D(CC_Texture0, vec2(v_texCoord.x, v_texCoord.y)); + + accum += texture2D(CC_Texture0, vec2(v_texCoord.x - radius, v_texCoord.y - radius)); + accum += texture2D(CC_Texture0, vec2(v_texCoord.x + radius, v_texCoord.y - radius)); + accum += texture2D(CC_Texture0, vec2(v_texCoord.x + radius, v_texCoord.y + radius)); + accum += texture2D(CC_Texture0, vec2(v_texCoord.x - radius, v_texCoord.y + radius)); + + accum *= u_threshold; + accum.rgb = u_outlineColor * accum.a; + + normal = ( accum * (1.0 - normal.a)) + (normal * normal.a); + + gl_FragColor = v_fragmentColor * normal; +} diff --git a/tests/js-tests/resjs/Shaders/example_Outline.vsh b/tests/js-tests/resjs/Shaders/example_Outline.vsh new file mode 100644 index 0000000000..8cda2a8438 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Outline.vsh @@ -0,0 +1,13 @@ +attribute vec4 a_position; +attribute vec2 a_texCoord; +attribute vec4 a_color; + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +void main() +{ + gl_Position = CC_PMatrix * CC_MVMatrix * a_position; + v_fragmentColor = a_color; + v_texCoord = a_texCoord; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Outline_noMVP.vsh b/tests/js-tests/resjs/Shaders/example_Outline_noMVP.vsh new file mode 100644 index 0000000000..0bcce55b80 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Outline_noMVP.vsh @@ -0,0 +1,13 @@ +attribute vec4 a_position; +attribute vec2 a_texCoord; +attribute vec4 a_color; + +varying vec4 v_fragmentColor; +varying vec2 v_texCoord; + +void main() +{ + gl_Position = CC_PMatrix * a_position; + v_fragmentColor = a_color; + v_texCoord = a_texCoord; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Plasma.fsh b/tests/js-tests/resjs/Shaders/example_Plasma.fsh new file mode 100644 index 0000000000..db7671e1f8 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Plasma.fsh @@ -0,0 +1,22 @@ +// Shader from http://www.iquilezles.org/apps/shadertoy/ + +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 center; +uniform vec2 resolution; + +void main(void) +{ + float time = CC_Time[1]; + float x = gl_FragCoord.x - (center.x - resolution.x / 2.0); + float y = gl_FragCoord.y - (center.y - resolution.y / 2.0); + float mov0 = x+y+cos(sin(time)*2.)*100.+sin(x/100.)*1000.; + float mov1 = y / resolution.y / 0.2 + time; + float mov2 = x / resolution.x / 0.2; + float c1 = abs(sin(mov1+time)/2.+mov2/2.-mov1-mov2+time); + float c2 = abs(sin(c1+sin(mov0/1000.+time)+sin(y/40.+time)+sin((x+y)/100.)*3.)); + float c3 = abs(sin(c2+cos(mov1+mov2+c2)+cos(mov2)+sin(x/1000.))); + gl_FragColor = vec4( c1,c2,c3,1.0); +} diff --git a/tests/js-tests/resjs/Shaders/example_Plasma.vsh b/tests/js-tests/resjs/Shaders/example_Plasma.vsh new file mode 100644 index 0000000000..359ef1e855 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Plasma.vsh @@ -0,0 +1,8 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; + +void main() +{ + gl_Position = CC_MVPMatrix * a_position; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Twist.fsh b/tests/js-tests/resjs/Shaders/example_Twist.fsh new file mode 100644 index 0000000000..15eb3106c7 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Twist.fsh @@ -0,0 +1,26 @@ +// Shader from here: http://www.iquilezles.org/ + +#ifdef GL_ES +precision highp float; +#endif + +uniform vec2 resolution; +uniform sampler2D tex0; +uniform sampler2D tex1; + +void main(void) +{ + float time = CC_Time[1]; + vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / resolution.xy; + vec2 uv; + + float a = atan(p.y,p.x); + float r = sqrt(dot(p,p)); + + uv.x = r - CC_Time[2]; + uv.y = sin(a*10.0 + 2.0*CC_CosTime[0]; + + vec3 col = (.5+.5*uv.y)*texture2D(tex0,uv).xyz; + + gl_FragColor = vec4(col,1.0); +} \ No newline at end of file diff --git a/tests/js-tests/resjs/Shaders/example_Twist.vsh b/tests/js-tests/resjs/Shaders/example_Twist.vsh new file mode 100644 index 0000000000..359ef1e855 --- /dev/null +++ b/tests/js-tests/resjs/Shaders/example_Twist.vsh @@ -0,0 +1,8 @@ +// http://www.cocos2d-iphone.org + +attribute vec4 a_position; + +void main() +{ + gl_Position = CC_MVPMatrix * a_position; +} \ No newline at end of file diff --git a/tests/js-tests/resjs/ccb/HelloCocosBuilder.ccb b/tests/js-tests/resjs/ccb/HelloCocosBuilder.ccb new file mode 100644 index 0000000000..4bca8c2685 --- /dev/null +++ b/tests/js-tests/resjs/ccb/HelloCocosBuilder.ccb @@ -0,0 +1,3920 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + HelloCocosBuilder.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + animatedProperties + + 0 + + 1 + + + baseClass + CCLayer + children + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + mBurstSprite + memberVarAssignmentType + 1 + properties + + + name + position + type + Position + value + + 50 + 50 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 2.5 + 2.5 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/burst.png + + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 52 + 84 + 236 + + + + name + endColor + type + Color3 + value + + 149 + 0 + 202 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 1.3666666746139526 + type + 4 + value + + 0.0 + 0.0 + + + + easing + + type + 1 + + name + scale + time + 2.4000000953674316 + type + 4 + value + + 0.5 + 0.5 + + + + name + scale + type + 4 + + + 1 + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 13.75 + 79.375 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 0.5 + 0.5 + + name + scale + type + ScaleLock + value + + 0.5 + 0.5 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/logo-icon.png + + + + seqExpanded + + + + animatedProperties + + 0 + + position + + keyframes + + + easing + + type + 9 + + time + 0.40000000596046448 + type + 3 + value + + 82.5 + 137.5 + + + + easing + + type + 1 + + name + position + time + 1.9666666984558105 + type + 3 + value + + 60.416667938232422 + 83.75 + + + + name + position + type + 3 + + rotation + + keyframes + + + easing + + type + 9 + + name + rotation + time + 0.40000000596046448 + type + 2 + value + 38.5 + + + easing + + type + 1 + + name + rotation + time + 1.9666666984558105 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + baseValue + + 60.416667938232422 + 83.75 + + name + position + type + Position + value + + 60.416667938232422 + 83.75 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/logo.png + + + + + + animatedProperties + + 0 + + position + + keyframes + + + easing + + opt + 2 + type + 3 + + time + 1.2666666507720947 + type + 3 + value + + 130.625 + 69.0625 + + + + easing + + type + 1 + + name + position + time + 2 + type + 3 + value + + 60.520832061767578 + 69.0625 + + + + name + position + type + 3 + + + + baseClass + CCLabelBMFont + children + + customClass + + displayName + CCLabelBMFont + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + baseValue + + 60.520832061767578 + 69.0625 + + name + position + type + Position + value + + 60.520832061767578 + 69.0625 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fntFile + type + FntFile + value + ccb/markerfelt24shadow.fnt + + + name + color + type + Color3 + value + + 124 + 18 + 86 + + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + name + string + type + Text + value + Graphical editor for cocos2d + + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 0.30000001192092896 + type + 4 + value + + 0.0 + 0.30000001192092896 + + + + easing + + type + 1 + + name + scale + time + 0.96666663885116577 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + 1 + + rotation + + keyframes + + + easing + + type + 10 + + name + rotation + time + 0.60000002384185791 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 1.3333333730697632 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 2.0999999046325684 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 2.9000000953674316 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 28.125 + 57.1875 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onMenuTestClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Menus & Items + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 1 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 40 + 14 + 1 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 254 + 255 + 254 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 0.46666666865348816 + type + 4 + value + + 0.0 + 0.30000001192092896 + + + + easing + + type + 1 + + name + scale + time + 1.1333333253860474 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + 1 + + rotation + + keyframes + + + easing + + type + 10 + + name + rotation + time + 4.4666666984558105 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 5.1999998092651367 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 5.9666666984558105 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 6.7666668891906738 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 71.875 + 57.1875 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onSpriteTestClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Sprites & 9 Slice + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 1 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 40 + 14 + 1 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 0.63333332538604736 + type + 4 + value + + 0.0 + 0.30000001192092896 + + + + easing + + type + 1 + + name + scale + time + 1.2666666507720947 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + 1 + + rotation + + keyframes + + + easing + + type + 10 + + name + rotation + time + 5.7666668891906738 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 6.5 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 7.2666668891906738 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 8.0333337783813477 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 28.125 + 41.5625 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onButtonTestClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Buttons & Labels + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 1 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 40 + 14 + 1 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 0.80000001192092896 + type + 4 + value + + 0.0 + 0.30000001192092896 + + + + easing + + type + 1 + + name + scale + time + 1.4666666984558105 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + 1 + + rotation + + keyframes + + + easing + + type + 10 + + name + rotation + time + 2.5 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 3.2333333492279053 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 4 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 4.8000001907348633 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 7.1666665077209473 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 7.9000000953674316 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 8.6666669845581055 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 9.4666662216186523 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 71.875 + 41.5625 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onAnimationsTestClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Animations + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 1 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 40 + 14 + 1 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 0.96666663885116577 + type + 4 + value + + 0.0 + 0.30000001192092896 + + + + easing + + type + 1 + + name + scale + time + 1.6333333253860474 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + 1 + + rotation + + keyframes + + + easing + + type + 10 + + name + rotation + time + 1.1000000238418579 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 1.8333333730697632 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 2.5999999046325684 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 3.4000000953674316 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 28.125 + 25.9375 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onParticleSystemTestClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Particle Systems + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 1 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 40 + 14 + 1 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 1.1333333253860474 + type + 4 + value + + 0.0 + 0.30000001192092896 + + + + easing + + type + 1 + + name + scale + time + 1.7999999523162842 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + 1 + + rotation + + keyframes + + + easing + + type + 10 + + name + rotation + time + 5.9333333969116211 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 6.6666665077209473 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 7.4333333969116211 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 8.2333335876464844 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 71.875 + 25.9375 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onScrollViewTestClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Scroll Views + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 1 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 40 + 14 + 1 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + animatedProperties + + 0 + + opacity + + keyframes + + + easing + + type + 1 + + name + opacity + time + 1.2333333492279053 + type + 5 + value + 0 + + + easing + + type + 1 + + name + opacity + time + 1.7000000476837158 + type + 5 + value + 255 + + + name + opacity + type + 5 + + position + + keyframes + + + easing + + opt + 2 + type + 3 + + time + 1.2333333492279053 + type + 3 + value + + -35 + -69 + + + + easing + + type + 1 + + name + position + time + 1.8666666746139526 + type + 3 + value + + 0.0 + 0.0 + + + + name + position + type + 3 + + rotation + + keyframes + + + easing + + opt + 2 + type + 3 + + time + 1.2333333492279053 + type + 2 + value + 21.5 + + + easing + + type + 1 + + name + rotation + time + 1.8666666746139526 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + baseValue + + 0.0 + 0.0 + + name + position + type + Position + value + + 0.0 + 0.0 + 3 + + + + name + anchorPoint + type + Point + value + + 1 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/jungle-right.png + + + + baseValue + 255 + name + opacity + type + Byte + value + 255 + + + + + animatedProperties + + 0 + + opacity + + keyframes + + + easing + + type + 1 + + name + opacity + time + 1.2333333492279053 + type + 5 + value + 0 + + + easing + + type + 1 + + name + opacity + time + 1.7000000476837158 + type + 5 + value + 255 + + + name + opacity + type + 5 + + position + + keyframes + + + easing + + opt + 2 + type + 3 + + name + position + time + 1.3999999761581421 + type + 3 + value + + -85 + -118 + + + + easing + + type + 1 + + name + position + time + 2 + type + 3 + value + + 0.0 + 0.0 + + + + name + position + type + 3 + + rotation + + keyframes + + + easing + + opt + 2 + type + 3 + + name + rotation + time + 1.3999999761581421 + type + 2 + value + -34 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + baseValue + + 0.0 + 0.0 + + name + position + type + Position + value + + 0.0 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/jungle-left.png + + + + baseValue + 255 + name + opacity + type + Byte + value + 255 + + + + + animatedProperties + + 0 + + scale + + keyframes + + + easing + + type + 9 + + name + scale + time + 0.96666663885116577 + type + 4 + value + + 0.0 + 0.30000001192092896 + + + + easing + + type + 1 + + name + scale + time + 1.6333333253860474 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + 1 + + rotation + + keyframes + + + easing + + type + 10 + + name + rotation + time + 1.1000000238418579 + type + 2 + value + 0.0 + + + easing + + type + 10 + + name + rotation + time + 1.8333333730697632 + type + 2 + value + -3 + + + easing + + type + 10 + + name + rotation + time + 2.5999999046325684 + type + 2 + value + 3 + + + easing + + type + 1 + + name + rotation + time + 3.4000000953674316 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 28.100000381469727 + 10.3125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onTimelineCallbackSoundClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Timeline Callback&sound + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 1 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 40 + 14 + 1 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + customClass + HelloCocosBuilderLayer + customProperties + + + name + mCustomPropertyInt + optimized + + type + 0 + value + 123 + + + name + mCustomPropertyFloat + optimized + + type + 1 + value + 123.440002 + + + name + mCustomPropertyBoolean + optimized + + type + 2 + value + 1 + + + name + mCustomPropertyString + optimized + + type + 3 + value + Hello Custom Property. + + + displayName + HelloCocosBuilder + jsController + HelloCocosBuilderLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + + notes + + + height + 131 + text + Welcome to CocosBuilder! + +Check out the Example Xcode project to understand how to connect objects with your code. + width + 191 + xPos + 28 + yPos + 26 + + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 3 + name + Default Timeline + offset + 0.0 + position + 3 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 10 + name + Wiggly buttons + offset + 0.0 + position + 10 + resolution + 30 + scale + 128 + sequenceId + 1 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/HelloCocosBuilder.ccbi b/tests/js-tests/resjs/ccb/HelloCocosBuilder.ccbi new file mode 100644 index 0000000000..c8c8763257 Binary files /dev/null and b/tests/js-tests/resjs/ccb/HelloCocosBuilder.ccbi differ diff --git a/tests/js-tests/resjs/ccb/animated-grossini.plist b/tests/js-tests/resjs/ccb/animated-grossini.plist new file mode 100644 index 0000000000..2319e72b12 --- /dev/null +++ b/tests/js-tests/resjs/ccb/animated-grossini.plist @@ -0,0 +1,139 @@ + + + + + frames + + grossini-arm-l.png + + frame + {{2,64},{28,26}} + offset + {2,-2} + rotated + + sourceColorRect + {{4,5},{28,26}} + sourceSize + {32,32} + + grossini-arm-r.png + + frame + {{32,78},{28,26}} + offset + {-2,-2} + rotated + + sourceColorRect + {{0,5},{28,26}} + sourceSize + {32,32} + + grossini-body.png + + frame + {{2,2},{23,43}} + offset + {0,0} + rotated + + sourceColorRect + {{2,1},{23,43}} + sourceSize + {27,45} + + grossini-eyes-0.png + + frame + {{2,92},{23,4}} + offset + {0,0} + rotated + + sourceColorRect + {{1,1},{23,4}} + sourceSize + {25,6} + + grossini-eyes-1.png + + frame + {{2,98},{23,4}} + offset + {0,0} + rotated + + sourceColorRect + {{1,1},{23,4}} + sourceSize + {25,6} + + grossini-eyes-2.png + + frame + {{60,40},{23,2}} + offset + {0,-1} + rotated + + sourceColorRect + {{1,3},{23,2}} + sourceSize + {25,6} + + grossini-head.png + + frame + {{2,27},{35,40}} + offset + {0,2} + rotated + + sourceColorRect + {{0,0},{35,40}} + sourceSize + {35,44} + + grossini-leg-l.png + + frame + {{44,40},{14,36}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{14,36}} + sourceSize + {14,36} + + grossini-leg-r.png + + frame + {{47,2},{14,36}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{14,36}} + sourceSize + {14,36} + + + metadata + + format + 2 + realTextureFileName + animated-grossini.png + size + {64,128} + smartupdate + $TexturePacker:SmartUpdate:f64bf1dbb50597d8a1599f1b397b6fdd$ + textureFileName + animated-grossini.png + + + diff --git a/tests/js-tests/resjs/ccb/animated-grossini.png b/tests/js-tests/resjs/ccb/animated-grossini.png new file mode 100644 index 0000000000..89736acdab Binary files /dev/null and b/tests/js-tests/resjs/ccb/animated-grossini.png differ diff --git a/tests/js-tests/resjs/ccb/btn-a-0.png b/tests/js-tests/resjs/ccb/btn-a-0.png new file mode 100644 index 0000000000..66a5d3df71 Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-a-0.png differ diff --git a/tests/js-tests/resjs/ccb/btn-a-1.png b/tests/js-tests/resjs/ccb/btn-a-1.png new file mode 100644 index 0000000000..33f8a0c3f0 Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-a-1.png differ diff --git a/tests/js-tests/resjs/ccb/btn-a-2.png b/tests/js-tests/resjs/ccb/btn-a-2.png new file mode 100644 index 0000000000..c8532b3e23 Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-a-2.png differ diff --git a/tests/js-tests/resjs/ccb/btn-b-0.png b/tests/js-tests/resjs/ccb/btn-b-0.png new file mode 100644 index 0000000000..abd7d9a00b Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-b-0.png differ diff --git a/tests/js-tests/resjs/ccb/btn-b-1.png b/tests/js-tests/resjs/ccb/btn-b-1.png new file mode 100644 index 0000000000..b55f91e77c Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-b-1.png differ diff --git a/tests/js-tests/resjs/ccb/btn-b-2.png b/tests/js-tests/resjs/ccb/btn-b-2.png new file mode 100644 index 0000000000..d47c7b6283 Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-b-2.png differ diff --git a/tests/js-tests/resjs/ccb/btn-back-0.png b/tests/js-tests/resjs/ccb/btn-back-0.png new file mode 100644 index 0000000000..9caae52746 Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-back-0.png differ diff --git a/tests/js-tests/resjs/ccb/btn-back-1.png b/tests/js-tests/resjs/ccb/btn-back-1.png new file mode 100644 index 0000000000..6c7cf5f97a Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-back-1.png differ diff --git a/tests/js-tests/resjs/ccb/btn-test-0.png b/tests/js-tests/resjs/ccb/btn-test-0.png new file mode 100644 index 0000000000..2777fd1d5e Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-test-0.png differ diff --git a/tests/js-tests/resjs/ccb/btn-test-1.png b/tests/js-tests/resjs/ccb/btn-test-1.png new file mode 100644 index 0000000000..b3be2a8616 Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-test-1.png differ diff --git a/tests/js-tests/resjs/ccb/btn-test-2.png b/tests/js-tests/resjs/ccb/btn-test-2.png new file mode 100644 index 0000000000..eab72947de Binary files /dev/null and b/tests/js-tests/resjs/ccb/btn-test-2.png differ diff --git a/tests/js-tests/resjs/ccb/burst.png b/tests/js-tests/resjs/ccb/burst.png new file mode 100644 index 0000000000..8681474538 Binary files /dev/null and b/tests/js-tests/resjs/ccb/burst.png differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestAnimations.ccb b/tests/js-tests/resjs/ccb/ccb/TestAnimations.ccb new file mode 100644 index 0000000000..798f1fc8ac --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestAnimations.ccb @@ -0,0 +1,3578 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 1 + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 52 + 84 + 236 + + + + name + endColor + type + Color3 + value + + 149 + 0 + 202 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + baseClass + CCBFile + children + + customClass + + displayName + Background animation + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 50 + 4 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestAnimationsSub.ccb + + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + baseClass + CCNode + children + + + baseClass + CCControlButton + children + + customClass + + displayName + Idle Button + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + -150 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onCCControlButtonIdleClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Idle + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 0 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 100 + 48 + 0 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + + + baseClass + CCControlButton + children + + customClass + + displayName + Wave Button + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + -50 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onCCControlButtonWaveClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Wave + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 0 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 100 + 48 + 0 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + + + baseClass + CCControlButton + children + + customClass + + displayName + Jump Button + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onCCControlButtonJumpClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Jump + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 0 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 100 + 48 + 0 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + + + baseClass + CCControlButton + children + + customClass + + displayName + Funky Button + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 150 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onCCControlButtonFunkyClicked + 1 + 32 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + Funky + + + name + titleTTF|1 + type + FontTTF + value + MarkerFelt-Thin + + + name + titleTTFSize|1 + type + FloatScale + value + + 18 + 0 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.40000000596046448 + + + + name + preferedSize + type + Size + value + + 100 + 48 + 0 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + + + customClass + + displayName + Buttons + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 15 + 4 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + + + animatedProperties + + 0 + + position + + keyframes + + + easing + + opt + 2 + type + 9 + + name + position + time + 0.0 + type + 3 + value + + 24.375 + 120 + + + + easing + + type + 1 + + name + position + time + 2 + type + 3 + value + + 50 + 50 + + + + name + position + type + 3 + + rotation + + keyframes + + + easing + + type + 1 + + time + 0.0 + type + 2 + value + -46.75 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCNode + children + + + animatedProperties + + 0 + + rotation + + keyframes + + + easing + + type + 9 + + time + 0.53333336114883423 + type + 2 + value + 40.25 + + + easing + + type + 1 + + name + rotation + time + 1.9666666984558105 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 3 + + rotation + + keyframes + + + easing + + type + 9 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 1 + type + 2 + value + 77.25 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + Leg right + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + -6 + -18 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.89999997615814209 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/animated-grossini.plist + grossini-leg-r.png + + + + seqExpanded + + + + animatedProperties + + 0 + + rotation + + keyframes + + + easing + + type + 9 + + time + 0.53333336114883423 + type + 2 + value + -47.5 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 3 + + rotation + + keyframes + + + easing + + type + 9 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 1 + type + 2 + value + -86.25 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + Leg left + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 6 + -18 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.89999997615814209 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/animated-grossini.plist + grossini-leg-l.png + + + + seqExpanded + + + + animatedProperties + + 0 + + rotation + + keyframes + + + easing + + type + 1 + + time + 0.89999997615814209 + type + 2 + value + 86 + + + easing + + type + 1 + + time + 1.4333332777023315 + type + 2 + value + -30.446964263916016 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 1 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 7.9666666984558105 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 8.8666667938232422 + type + 2 + value + -20.5 + + + easing + + type + 1 + + name + rotation + time + 9.8666667938232422 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 2 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + time + 0.96666663885116577 + type + 2 + value + 109.5 + + + easing + + type + 1 + + time + 1.2666666507720947 + type + 2 + value + 72.599998474121094 + + + easing + + type + 1 + + time + 1.5333333015441895 + type + 2 + value + 93.699996948242188 + + + easing + + type + 1 + + time + 1.8333333730697632 + type + 2 + value + 64.966659545898438 + + + easing + + type + 1 + + name + rotation + time + 2.2333333492279053 + type + 2 + value + 90.25 + + + easing + + type + 1 + + name + rotation + time + 3 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 3 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 1 + type + 2 + value + 89.75 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + Arm right + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + -9 + 10 + 0 + + + + name + anchorPoint + type + Point + value + + 0.80000001192092896 + 0.80000001192092896 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/animated-grossini.plist + grossini-arm-r.png + + + + + + animatedProperties + + 0 + + rotation + + keyframes + + + easing + + type + 1 + + time + 0.89999997615814209 + type + 2 + value + -95.25 + + + easing + + type + 1 + + time + 1.4333332777023315 + type + 2 + value + 28.431812286376953 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 1 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 7.9666666984558105 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 8.8666667938232422 + type + 2 + value + 20.75 + + + easing + + type + 1 + + name + rotation + time + 9.8666667938232422 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 2 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 0.5 + type + 2 + value + 18.75 + + + easing + + type + 1 + + name + rotation + time + 2.2999999523162842 + type + 2 + value + 18.75 + + + easing + + type + 1 + + name + rotation + time + 3 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + 3 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 1 + type + 2 + value + -96.5 + + + easing + + type + 1 + + name + rotation + time + 2 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + Arm left + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 9 + 10 + 0 + + + + name + anchorPoint + type + Point + value + + 0.20000000298023224 + 0.80000001192092896 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/animated-grossini.plist + grossini-arm-l.png + + + + + + animatedProperties + + 4 + + opacity + + keyframes + + + easing + + type + 1 + + name + opacity + time + 1 + type + 5 + value + 255 + + + easing + + type + 1 + + name + opacity + time + 2.2333333492279053 + type + 5 + value + 0 + + + easing + + type + 1 + + name + opacity + time + 4.0333333015441895 + type + 5 + value + 255 + + + easing + + type + 1 + + name + opacity + time + 4.5 + type + 5 + value + 127 + + + easing + + type + 1 + + name + opacity + time + 4.8666667938232422 + type + 5 + value + 255 + + + name + opacity + type + 5 + + scale + + keyframes + + + easing + + type + 1 + + name + scale + time + 1.7333333492279053 + type + 4 + value + + 1 + 1 + + + + easing + + type + 10 + + name + scale + time + 2.4000000953674316 + type + 4 + value + + 2 + 0.5 + + + + easing + + type + 1 + + name + scale + time + 3.4333333969116211 + type + 4 + value + + 1 + 1 + + + + name + scale + type + 4 + + + + baseClass + CCSprite + children + + customClass + + displayName + Body + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + baseValue + + 1 + 1 + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/animated-grossini.plist + grossini-body.png + + + + baseValue + 255 + name + opacity + type + Byte + value + 255 + + + + + animatedProperties + + 4 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 2.4000000953674316 + type + 2 + value + 720 + + + easing + + type + 1 + + name + rotation + time + 5 + type + 2 + value + 0.0 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + + animatedProperties + + 1 + + displayFrame + + keyframes + + + easing + + type + 0 + + name + displayFrame + time + 3.6333334445953369 + type + 7 + value + + grossini-eyes-0.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 3.8333332538604736 + type + 7 + value + + grossini-eyes-1.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 4.0333333015441895 + type + 7 + value + + grossini-eyes-2.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 4.2333331108093262 + type + 7 + value + + grossini-eyes-1.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 4.4333333969116211 + type + 7 + value + + grossini-eyes-0.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 6.0999999046325684 + type + 7 + value + + grossini-eyes-0.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 6.3000001907348633 + type + 7 + value + + grossini-eyes-1.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 6.5 + type + 7 + value + + grossini-eyes-2.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 6.6999998092651367 + type + 7 + value + + grossini-eyes-1.png + ccb/animated-grossini.plist + + + + easing + + type + 0 + + name + displayFrame + time + 6.9000000953674316 + type + 7 + value + + grossini-eyes-0.png + ccb/animated-grossini.plist + + + + name + displayFrame + type + 7 + + position + + keyframes + + + easing + + type + 1 + + name + position + time + 0.60000002384185791 + type + 3 + value + + 17.5 + 23 + + + + easing + + type + 1 + + name + position + time + 1 + type + 3 + value + + 16 + 23 + + + + easing + + type + 1 + + name + position + time + 1.3333333730697632 + type + 3 + value + + 17.5 + 23 + + + + easing + + type + 1 + + name + position + time + 2.2666666507720947 + type + 3 + value + + 17.5 + 23 + + + + easing + + type + 1 + + name + position + time + 2.5 + type + 3 + value + + 19 + 23 + + + + easing + + type + 1 + + name + position + time + 2.9666666984558105 + type + 3 + value + + 17.5 + 23 + + + + name + position + type + 3 + + + 4 + + color + + keyframes + + + easing + + type + 1 + + name + color + time + 0.86666667461395264 + type + 6 + value + + 255 + 255 + 255 + + + + easing + + type + 1 + + name + color + time + 1.3333333730697632 + type + 6 + value + + 143 + 243 + 40 + + + + easing + + type + 1 + + name + color + time + 1.8333333730697632 + type + 6 + value + + 223 + 80 + 22 + + + + easing + + type + 1 + + name + color + time + 2.4666666984558105 + type + 6 + value + + 33 + 79 + 251 + + + + easing + + type + 1 + + name + color + time + 3.0333333015441895 + type + 6 + value + + 223 + 88 + 233 + + + + easing + + type + 1 + + name + color + time + 3.3666665554046631 + type + 6 + value + + 255 + 255 + 255 + + + + name + color + type + 6 + + + + baseClass + CCSprite + children + + customClass + + displayName + Eyes + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + baseValue + + 17.5 + 23 + + name + position + type + Position + value + + 17.5 + 23 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + baseValue + + grossini-eyes-0.png + ccb/animated-grossini.plist + + name + displayFrame + type + SpriteFrame + value + + ccb/animated-grossini.plist + grossini-eyes-0.png + + + + baseValue + + 255 + 255 + 255 + + name + color + type + Color3 + value + + 255 + 255 + 255 + + + + seqExpanded + + + + customClass + + displayName + Head + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 34 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/animated-grossini.plist + grossini-head.png + + + + + + customClass + + displayName + Grossini + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + baseValue + + 50 + 50 + + name + position + type + Position + value + + 50 + 50 + 4 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 0.0 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + seqExpanded + + + + customClass + TestAnimationsLayer + displayName + TestAnimations + jsController + TestAnimationsLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + selected + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 2 + name + Intro + offset + 0.0 + position + 1.7000000476837158 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 10 + name + Idle + offset + 5.734375 + position + 6.9000000953674316 + resolution + 30 + scale + 128 + sequenceId + 1 + soundChannel + + keyframes + + type + 9 + + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 3 + name + Wave + offset + 0.0 + position + 3 + resolution + 30 + scale + 128 + sequenceId + 2 + soundChannel + + keyframes + + type + 9 + + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 2 + name + Jump + offset + 0.0 + position + 2 + resolution + 30 + scale + 128 + sequenceId + 3 + soundChannel + + keyframes + + type + 9 + + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 5 + name + Funky + offset + 0.0 + position + 5 + resolution + 30 + scale + 128 + sequenceId + 4 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestAnimations.ccbi b/tests/js-tests/resjs/ccb/ccb/TestAnimations.ccbi new file mode 100644 index 0000000000..78bb159ae6 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestAnimations.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestAnimationsSub.ccb b/tests/js-tests/resjs/ccb/ccb/TestAnimationsSub.ccb new file mode 100644 index 0000000000..701d00c261 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestAnimationsSub.ccb @@ -0,0 +1,443 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + animatedProperties + + 0 + + color + + keyframes + + + easing + + type + 1 + + name + color + time + 0.0 + type + 6 + value + + 0 + 0 + 0 + + + + easing + + type + 1 + + name + color + time + 4.8333334922790527 + type + 6 + value + + 255 + 254 + 255 + + + + name + color + type + 6 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 10 + type + 2 + value + 360 + + + name + rotation + type + 2 + + + 1 + + rotation + + keyframes + + + easing + + type + 1 + + name + rotation + time + 0.0 + type + 2 + value + 0.0 + + + easing + + type + 1 + + name + rotation + time + 10 + type + 2 + value + 360 + + + name + rotation + type + 2 + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 2.5 + 2.5 + + 1 + + + + baseValue + 0.0 + name + rotation + type + Degrees + value + 360 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/burst.png + + + + name + opacity + type + Byte + value + 100 + + + baseValue + + 255 + 254 + 255 + + name + color + type + Color3 + value + + 255 + 254 + 255 + + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + seqExpanded + + + + customClass + + displayName + CCLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 1024 + name + iPhone Landscape + scale + 1 + width + 1024 + + + centeredOrigin + + ext + ipad hd + height + 2048 + name + iPad Landscape + scale + 2 + width + 2048 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 10 + name + Intro + offset + 0.0 + position + 10 + resolution + 30 + scale + 32 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + 1 + length + 10 + name + Loop + offset + 0.0 + position + 2.7999999523162842 + resolution + 30 + scale + 32 + sequenceId + 1 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestAnimationsSub.ccbi b/tests/js-tests/resjs/ccb/ccb/TestAnimationsSub.ccbi new file mode 100644 index 0000000000..a76b3ad225 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestAnimationsSub.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestButtons.ccb b/tests/js-tests/resjs/ccb/ccb/TestButtons.ccb new file mode 100644 index 0000000000..599d4e5ae3 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestButtons.ccb @@ -0,0 +1,927 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + TestButtons.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 52 + 84 + 236 + + + + name + endColor + type + Color3 + value + + 149 + 0 + 202 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + baseClass + CCNode + children + + + baseClass + CCControlButton + children + + customClass + + displayName + CCControlButton + memberVarAssignmentName + + memberVarAssignmentType + 1 + properties + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + ccControl + type + BlockCCControl + value + + onCCControlButtonClicked + 1 + 511 + + + + name + enabled + type + Check + value + + + + name + title|1 + type + String + value + CCControlButton + + + name + titleTTF|1 + type + FontTTF + value + Helvetica-Bold + + + name + titleTTFSize|1 + type + FloatScale + value + + 12 + 0 + + + + name + labelAnchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + preferedSize + type + Size + value + + 200 + 48 + 0 + + + + name + zoomOnTouchDown + type + Check + value + + + + name + backgroundSpriteFrame|1 + type + SpriteFrame + value + + + ccb/btn-test-0.png + + + + name + titleColor|1 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|2 + type + SpriteFrame + value + + + ccb/btn-test-1.png + + + + name + titleColor|2 + type + Color3 + value + + 255 + 255 + 255 + + + + name + backgroundSpriteFrame|3 + type + SpriteFrame + value + + + + + + + name + titleColor|3 + type + Color3 + value + + 255 + 255 + 255 + + + + + + baseClass + CCLabelBMFont + children + + customClass + + displayName + CCLabelBMFont + memberVarAssignmentName + mCCControlEventLabel + memberVarAssignmentType + 1 + properties + + + name + position + type + Position + value + + 0.0 + -50 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fntFile + type + FntFile + value + ccb/markerfelt24shadow.fnt + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + name + string + type + Text + value + No event received yet + + + + + customClass + + displayName + CCNode + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 25 + 4 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 1 + -2 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 78.125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + comic andy.ttf + + + name + fontSize + type + FloatScale + value + + 50 + 1 + + + + name + dimensions + type + Size + value + + 40 + 20 + 1 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 1 + + + name + verticalAlignment + type + IntegerLabeled + value + 1 + + + name + string + type + Text + value + Custom TTF + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 50 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 80 + 15 + 1 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 1 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Center aligned: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + + + + + customClass + TestButtonsLayer + displayName + TestButtons + jsController + TestButtonsLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestButtons.ccbi b/tests/js-tests/resjs/ccb/ccb/TestButtons.ccbi new file mode 100644 index 0000000000..ab4b3f6092 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestButtons.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestHeader.ccb b/tests/js-tests/resjs/ccb/ccb/TestHeader.ccb new file mode 100644 index 0000000000..0f4bbf1444 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestHeader.ccb @@ -0,0 +1,621 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + TestHeader.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerColor + children + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + mTestTitleLabelTTF + memberVarAssignmentType + 2 + properties + + + name + position + type + Position + value + + 50 + 57.5 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + MarkerFelt-Wide + + + name + fontSize + type + FloatScale + value + + 24 + 0 + + + + name + dimensions + type + Size + value + + 0.0 + 0.0 + 0 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 2 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Title will be replaced in code + + + + + baseClass + CCMenu + children + + + baseClass + CCMenuItemImage + children + + customClass + + displayName + CCMenuItemImage + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + -2 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + block + type + Block + value + + onBackClicked + 1 + + + + name + isEnabled + type + Check + value + + + + name + normalSpriteFrame + type + SpriteFrame + value + + + ccb/btn-back-0.png + + + + name + selectedSpriteFrame + type + SpriteFrame + value + + + ccb/btn-back-1.png + + + + name + disabledSpriteFrame + type + SpriteFrame + value + + + + + + + + + customClass + + displayName + CCMenu + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 30 + 19 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + + + customClass + + displayName + CCLayerColor + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 4 + + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + color + type + Color3 + value + + 0 + 0 + 0 + + + + name + opacity + type + Byte + value + 127 + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + + + customClass + TestHeaderLayer + displayName + TestHeader + jsController + TestHeaderLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 40 + 3 + + + + name + anchorPoint + type + Point + value + + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + selected + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 40 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + + height + 40 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestHeader.ccbi b/tests/js-tests/resjs/ccb/ccb/TestHeader.ccbi new file mode 100644 index 0000000000..11b4da5db5 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestHeader.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestLabels.ccb b/tests/js-tests/resjs/ccb/ccb/TestLabels.ccb new file mode 100644 index 0000000000..8373201904 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestLabels.ccb @@ -0,0 +1,899 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + TestLabels.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 52 + 84 + 236 + + + + name + endColor + type + Color3 + value + + 149 + 0 + 202 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + baseClass + CCLabelBMFont + children + + customClass + + displayName + CCLabelBMFont + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 71.666664123535156 + 73.75 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fntFile + type + FntFile + value + ccb/markerfelt24shadow.fnt + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + name + string + type + Text + value + Bitmap font + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 55.625 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 80 + 15 + 1 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 0 + + + name + verticalAlignment + type + IntegerLabeled + value + 1 + + + name + string + type + Text + value + Left aligned: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 36.875 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 80 + 15 + 1 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 1 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Center aligned: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 18.125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 80 + 15 + 1 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 2 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Right aligned: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 32.5 + 76.25 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + comic andy.ttf + + + name + fontSize + type + FloatScale + value + + 50 + 1 + + + + name + dimensions + type + Size + value + + 40 + 20 + 1 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 1 + + + name + verticalAlignment + type + IntegerLabeled + value + 1 + + + name + string + type + Text + value + Custom TTF + + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + customClass + TestLabelsLayer + displayName + CCLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestLabels.ccbi b/tests/js-tests/resjs/ccb/ccb/TestLabels.ccbi new file mode 100644 index 0000000000..202234d2a6 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestLabels.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestMenus.ccb b/tests/js-tests/resjs/ccb/ccb/TestMenus.ccb new file mode 100644 index 0000000000..297d4961e1 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestMenus.ccb @@ -0,0 +1,1139 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + TestMenus.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 52 + 84 + 236 + + + + name + endColor + type + Color3 + value + + 149 + 0 + 202 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + baseClass + CCMenu + children + + + baseClass + CCMenuItemImage + children + + customClass + + displayName + CCMenuItemImage + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 20.833333969116211 + 5 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + block + type + Block + value + + onMenuItemAClicked + 1 + + + + name + isEnabled + type + Check + value + + + + name + normalSpriteFrame + type + SpriteFrame + value + + + ccb/btn-a-0.png + + + + name + selectedSpriteFrame + type + SpriteFrame + value + + + ccb/btn-a-1.png + + + + name + disabledSpriteFrame + type + SpriteFrame + value + + + ccb/btn-a-2.png + + + + + + baseClass + CCMenuItemImage + children + + customClass + + displayName + CCMenuItemImage + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 5 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + block + type + Block + value + + onMenuItemBClicked + 1 + + + + name + isEnabled + type + Check + value + + + + name + normalSpriteFrame + type + SpriteFrame + value + + + ccb/btn-b-0.png + + + + name + selectedSpriteFrame + type + SpriteFrame + value + + + ccb/btn-b-1.png + + + + name + disabledSpriteFrame + type + SpriteFrame + value + + + ccb/btn-b-2.png + + + + + + baseClass + CCMenuItemImage + children + + customClass + + displayName + CCMenuItemImage + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 79.166664123535156 + 5 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + block + type + Block + value + + pressedC: + 1 + + + + name + isEnabled + type + Check + value + + + + name + normalSpriteFrame + type + SpriteFrame + value + + + ccb/btn-a-0.png + + + + name + selectedSpriteFrame + type + SpriteFrame + value + + + ccb/btn-a-1.png + + + + name + disabledSpriteFrame + type + SpriteFrame + value + + + ccb/btn-a-2.png + + + + + + customClass + + displayName + CCMenu + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 3.125 + 4 + + + + name + contentSize + type + Size + value + + 100 + 1000 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + + + baseClass + CCLabelBMFont + children + + customClass + + displayName + CCLabelBMFont + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 20.416666030883789 + 53.125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fntFile + type + FntFile + value + ccb/markerfelt24shadow.fnt + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + name + string + type + Text + value + A + + + + + + baseClass + CCLabelBMFont + children + + customClass + + displayName + CCLabelBMFont + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 49.583332061767578 + 53.125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fntFile + type + FntFile + value + ccb/markerfelt24shadow.fnt + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + name + string + type + Text + value + B + + + + + + baseClass + CCLabelBMFont + children + + customClass + + displayName + CCLabelBMFont + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 78.75 + 53.125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fntFile + type + FntFile + value + ccb/markerfelt24shadow.fnt + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + name + string + type + Text + value + C + + + + + + baseClass + CCLabelBMFont + children + + customClass + + displayName + CCLabelBMFont + memberVarAssignmentName + mMenuItemStatusLabelBMFont + memberVarAssignmentType + 1 + properties + + + name + position + type + Position + value + + 50 + 20.9375 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fntFile + type + FntFile + value + ccb/markerfelt24shadow.fnt + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + name + string + type + Text + value + No button pressed yet + + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + customClass + TestMenusLayer + displayName + TestMenus + jsController + TestMenusLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + selected + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestMenus.ccbi b/tests/js-tests/resjs/ccb/ccb/TestMenus.ccbi new file mode 100644 index 0000000000..b46cd53c75 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestMenus.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestParticleSystems.ccb b/tests/js-tests/resjs/ccb/ccb/TestParticleSystems.ccb new file mode 100644 index 0000000000..66da822173 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestParticleSystems.ccb @@ -0,0 +1,1122 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + TestParticleSystems.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 52 + 84 + 236 + + + + name + endColor + type + Color3 + value + + 149 + 0 + 202 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + baseClass + CCParticleSystemQuad + children + + customClass + + displayName + CCParticleSystemQuad + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 29.166666030883789 + 30.9375 + 4 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + emitterMode + type + IntegerLabeled + value + 0 + + + name + posVar + type + Point + value + + 40 + 20 + + + + name + emissionRate + type + Float + value + 80 + + + name + duration + type + Float + value + -1 + + + name + totalParticles + type + Integer + value + 250 + + + name + life + type + FloatVar + value + + 3 + 0.25 + + + + name + startSize + type + FloatVar + value + + 54 + 10 + + + + name + endSize + type + FloatVar + value + + 0.0 + 0.0 + + + + name + startSpin + type + FloatVar + value + + 0.0 + 0.0 + + + + name + endSpin + type + FloatVar + value + + 0.0 + 0.0 + + + + name + angle + type + FloatVar + value + + 90 + 10 + + + + name + startColor + type + Color4FVar + value + + + 0.75999999046325684 + 0.25 + 0.11999999731779099 + 255 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + name + endColor + type + Color4FVar + value + + + 0.0 + 0.0 + 0.0 + 255 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + name + blendFunc + type + Blendmode + value + + 1 + 1 + + + + name + gravity + type + Point + value + + 0.0 + 0.0 + + + + name + speed + type + FloatVar + value + + 60 + 20 + + + + name + tangentialAccel + type + FloatVar + value + + 0.0 + 0.0 + + + + name + radialAccel + type + FloatVar + value + + 0.0 + 0.0 + + + + name + texture + type + Texture + value + ccb/particle-fire.png + + + + + baseClass + CCParticleSystemQuad + children + + customClass + + displayName + CCParticleSystemQuad + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 70.833335876464844 + 48.125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + emitterMode + type + IntegerLabeled + value + 1 + + + name + posVar + type + Point + value + + 40 + 20 + + + + name + emissionRate + type + Float + value + 40 + + + name + duration + type + Float + value + -1 + + + name + totalParticles + type + Integer + value + 100 + + + name + life + type + FloatVar + value + + 3 + 0.25 + + + + name + startSize + type + FloatVar + value + + 54 + 10 + + + + name + endSize + type + FloatVar + value + + 0.0 + 0.0 + + + + name + startSpin + type + FloatVar + value + + 0.0 + 320 + + + + name + endSpin + type + FloatVar + value + + 0.0 + 320 + + + + name + angle + type + FloatVar + value + + 0.0 + 360 + + + + name + startColor + type + Color4FVar + value + + + 0.33126017451286316 + 0.75999999046325684 + 0.59423065185546875 + 1 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + name + endColor + type + Color4FVar + value + + + 0.0 + 0.0 + 0.0 + 255 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + + + name + blendFunc + type + Blendmode + value + + 1 + 1 + + + + name + startRadius + type + FloatVar + value + + 70 + 0.0 + + + + name + endRadius + type + FloatVar + value + + 0.0 + 0.0 + + + + name + rotatePerSecond + type + FloatVar + value + + 60 + 20 + + + + name + texture + type + Texture + value + ccb/particle-snow.png + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 29.166666030883789 + 10.3125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 0.0 + 0.0 + 0 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 0 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Gravity mode + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 70.833335876464844 + 10.3125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 0.0 + 0.0 + 0 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 0 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Radius mode + + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + customClass + TestParticleSystemsLayer + displayName + CCLayer + jsController + TestParticleSystemsLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + selected + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestParticleSystems.ccbi b/tests/js-tests/resjs/ccb/ccb/TestParticleSystems.ccbi new file mode 100644 index 0000000000..6917215c04 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestParticleSystems.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestScrollViews.ccb b/tests/js-tests/resjs/ccb/ccb/TestScrollViews.ccb new file mode 100644 index 0000000000..337adccf29 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestScrollViews.ccb @@ -0,0 +1,535 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + TestScrollViews.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerColor + children + + customClass + + displayName + CCLayerColor + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + color + type + Color3 + value + + 106 + 90 + 84 + + + + name + opacity + type + Byte + value + 255 + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + + + baseClass + CCScrollView + children + + customClass + + displayName + CCScrollView + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 50 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + Float + value + 1 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + container + type + CCBFile + value + ccb/ccb/TestScrollViewsContentA.ccb + + + name + direction + type + IntegerLabeled + value + 2 + + + name + clipsToBounds + type + Check + value + + + + name + bounces + type + Check + value + + + + + + baseClass + CCScrollView + children + + customClass + + displayName + CCScrollView + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 0.0 + 4 + + + + name + contentSize + type + Size + value + + 50 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + Float + value + 1 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + container + type + CCBFile + value + ccb/ccb/TestScrollViewsContentA.ccb + + + name + direction + type + IntegerLabeled + value + 2 + + + name + clipsToBounds + type + Check + value + + + + name + bounces + type + Check + value + + + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + customClass + TestScrollViewsLayer + displayName + TestScrollViews + jsController + TestScrollViewsLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + selected + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestScrollViews.ccbi b/tests/js-tests/resjs/ccb/ccb/TestScrollViews.ccbi new file mode 100644 index 0000000000..96741d8bf3 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestScrollViews.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestScrollViewsContentA.ccb b/tests/js-tests/resjs/ccb/ccb/TestScrollViewsContentA.ccb new file mode 100644 index 0000000000..f6b2d1cc04 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestScrollViewsContentA.ccb @@ -0,0 +1,212 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCNode + children + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/flower.jpg + + + + name + blendFunc + type + Blendmode + value + + 770 + 771 + + + + + + customClass + + displayName + CCNode + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 1024 + 1024 + 0 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 1024 + name + Custom + scale + 1 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestScrollViewsContentA.ccbi b/tests/js-tests/resjs/ccb/ccb/TestScrollViewsContentA.ccbi new file mode 100644 index 0000000000..e40d878a19 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestScrollViewsContentA.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestSprites.ccb b/tests/js-tests/resjs/ccb/ccb/TestSprites.ccb new file mode 100644 index 0000000000..03f1ae9fd4 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestSprites.ccb @@ -0,0 +1,1639 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + exportFlattenPaths + + exportPath + TestSprites.ccbi + exportPlugIn + ccbi + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 52 + 84 + 236 + + + + name + endColor + type + Color3 + value + + 149 + 0 + 202 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + baseClass + CCNode + children + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + -60 + 10 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 0.40000000596046448 + 0.40000000596046448 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/logo-icon.png + + + + name + opacity + type + Byte + value + 127 + + + name + color + type + Color3 + value + + 90 + 90 + 90 + + + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 5 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 0.5 + 0.5 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/logo-icon.png + + + + name + color + type + Color3 + value + + 63 + 255 + 39 + + + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 60 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 0.60000002384185791 + 0.60000002384185791 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/logo-icon.png + + + + + + customClass + + displayName + CCNode + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 26.666666030883789 + 67.1875 + 4 + + + + name + contentSize + type + Size + value + + 0.0 + 0.0 + 1 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + + + baseClass + CCNode + children + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + -50 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/grossini-generic.plist + grossini_dance_generic_05.png + + + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/grossini-generic.plist + grossini_dance_generic_06.png + + + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 0.0 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/grossini-generic.plist + grossini_dance_generic_13.png + + + + + + baseClass + CCSprite + children + + customClass + + displayName + CCSprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 352.15463256835938 + 60.877250671386719 + 0 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + ccb/grossini-generic.plist + grossini_dance_generic_13.png + + + + + + customClass + + displayName + CCNode + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 20.208333969116211 + 20.9375 + 4 + + + + name + anchorPoint + type + Point + value + + 0.0 + 0.0 + + + + name + scale + type + ScaleLock + value + + 0.75999999046325684 + 0.75999999046325684 + + 1 + + + + name + rotation + type + Degrees + value + -12 + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + + + baseClass + CCScale9Sprite + children + + customClass + + displayName + CCScale9Sprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 74.166664123535156 + 65.625 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + spriteFrame + type + SpriteFrame + value + + + ccb/scale-9-demo.png + + + + name + preferedSize + type + Size + value + + 150 + 120 + 0 + + + + name + opacity + type + Byte + value + 200 + + + name + color + type + Color3 + value + + 255 + 158 + 47 + + + + name + insetLeft + type + Float + value + 0.0 + + + name + insetTop + type + Float + value + 0.0 + + + name + insetRight + type + Float + value + 0.0 + + + name + insetBottom + type + Float + value + 0.0 + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 29.375 + 47.8125 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 0.0 + 0.0 + 0 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 0 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Opacity, color & blend mode + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 74.375 + 79.0625 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 0.0 + 0.0 + 0 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 0 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + CCScale9Sprite + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50.416667938232422 + 19.6875 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 12 + 1 + + + + name + dimensions + type + Size + value + + 0.0 + 0.0 + 0 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 0 + + + name + verticalAlignment + type + IntegerLabeled + value + 0 + + + name + string + type + Text + value + Sprite sheet & transformation + + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + baseClass + CCScale9Sprite + children + + customClass + + displayName + CCScale9Sprite + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 82.083328247070312 + 29.6875 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 1 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + spriteFrame + type + SpriteFrame + value + + + ccb/scale-9-demo.png + + + + name + preferedSize + type + Size + value + + 150 + 120 + 0 + + + + name + opacity + type + Byte + value + 255 + + + name + color + type + Color3 + value + + 254 + 255 + 254 + + + + name + insetLeft + type + Float + value + 0.0 + + + name + insetTop + type + Float + value + 0.0 + + + name + insetRight + type + Float + value + 0.0 + + + name + insetBottom + type + Float + value + 0.0 + + + + + customClass + TestSpritesLayer + displayName + CCLayer + jsController + TestSpritesLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + selected + + + notes + + resolutions + + + centeredOrigin + + ext + + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad hd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + type + 10 + + chainedSequenceId + -1 + length + 10 + name + Default Timeline + offset + 0.0 + position + 0.0 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestSprites.ccbi b/tests/js-tests/resjs/ccb/ccb/TestSprites.ccbi new file mode 100644 index 0000000000..9d0fabf4c1 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestSprites.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccb/TestTimelineCallback.ccb b/tests/js-tests/resjs/ccb/ccb/TestTimelineCallback.ccb new file mode 100644 index 0000000000..46abd370d9 --- /dev/null +++ b/tests/js-tests/resjs/ccb/ccb/TestTimelineCallback.ccb @@ -0,0 +1,839 @@ + + + + + centeredOrigin + + currentResolution + 0 + currentSequenceId + 0 + fileType + CocosBuilder + fileVersion + 4 + guides + + jsControlled + + nodeGraph + + baseClass + CCLayer + children + + + animatedProperties + + 0 + + visible + + keyframes + + + easing + + type + 0 + + name + visible + time + 0.0 + type + 1 + value + + + + name + visible + type + 1 + + + + baseClass + CCLayerGradient + children + + customClass + + displayName + CCLayerGradient + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + baseValue + 1 + name + visible + type + Check + value + + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + name + startColor + type + Color3 + value + + 19 + 0 + 255 + + + + name + endColor + type + Color3 + value + + 255 + 33 + 249 + + + + name + vector + type + Point + value + + 0.0 + -1 + + + + + + baseClass + CCMenu + children + + customClass + + displayName + CCMenu + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 50 + 30 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + + + baseClass + CCLabelTTF + children + + customClass + + displayName + CCLabelTTF + memberVarAssignmentName + helloLabel + memberVarAssignmentType + 1 + properties + + + name + position + type + Position + value + + 50 + 50 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + fontName + type + FontTTF + value + Helvetica + + + name + fontSize + type + FloatScale + value + + 20 + 1 + + + + name + dimensions + type + Size + value + + 40 + 20 + 1 + + + + name + horizontalAlignment + type + IntegerLabeled + value + 1 + + + name + verticalAlignment + type + IntegerLabeled + value + 1 + + + name + string + type + Text + value + Test Callbacks + + + + + + animatedProperties + + 0 + + position + + keyframes + + + easing + + type + 1 + + name + position + time + 0.0 + type + 3 + value + + 10 + 10 + + + + easing + + type + 1 + + name + position + time + 1 + type + 3 + value + + 10 + 90 + + + + easing + + type + 1 + + name + position + time + 2 + type + 3 + value + + 90 + 90 + + + + easing + + type + 1 + + name + position + time + 3 + type + 3 + value + + 90 + 10 + + + + easing + + type + 1 + + name + position + time + 4 + type + 3 + value + + 10 + 10 + + + + name + position + type + 3 + + + + baseClass + CCSprite + children + + customClass + + displayName + ccbParticleStars + memberVarAssignmentName + + memberVarAssignmentType + 1 + properties + + + baseValue + + 10 + 10 + + name + position + type + Position + value + + 90 + 10 + 4 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + displayFrame + type + SpriteFrame + value + + + ccb/ccbParticleStars.png + + + + seqExpanded + + + + baseClass + CCBFile + children + + customClass + + displayName + CCBFile + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + position + type + Position + value + + 0.0 + 0.0 + 1 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ccbFile + type + CCBFile + value + ccb/ccb/TestHeader.ccb + + + + + customClass + TimelineCallbackTestLayer + displayName + CCLayer + jsController + TestTimelineLayer + memberVarAssignmentName + + memberVarAssignmentType + 0 + properties + + + name + contentSize + type + Size + value + + 100 + 100 + 1 + + + + name + anchorPoint + type + Point + value + + 0.5 + 0.5 + + + + name + scale + type + ScaleLock + value + + 1 + 1 + + 0 + + + + name + ignoreAnchorPointForPosition + type + Check + value + + + + name + touchEnabled + platform + iOS + type + Check + value + + + + name + mouseEnabled + platform + Mac + type + Check + value + + + + selected + + + notes + + resolutions + + + centeredOrigin + + ext + iphone + height + 320 + name + iPhone Landscape + scale + 1 + width + 480 + + + centeredOrigin + + ext + ipad iphonehd + height + 768 + name + iPad Landscape + scale + 2 + width + 1024 + + + sequences + + + autoPlay + + callbackChannel + + keyframes + + + easing + + type + 0 + + time + 1 + type + 10 + value + + onCallback1 + 1 + + + + easing + + type + 0 + + time + 3 + type + 10 + value + + onCallback2 + 1 + + + + type + 10 + + chainedSequenceId + 0 + length + 4 + name + Default Timeline + offset + 0.85765171051025391 + position + 3 + resolution + 30 + scale + 128 + sequenceId + 0 + soundChannel + + keyframes + + + easing + + type + 0 + + time + 1 + type + 9 + value + + ccb/gem-0.wav + 1 + 0.0 + 1 + + + + easing + + type + 0 + + time + 3 + type + 9 + value + + ccb/gem-1.wav + 1 + 0.0 + 1 + + + + type + 9 + + + + stageBorder + 0 + + diff --git a/tests/js-tests/resjs/ccb/ccb/TestTimelineCallback.ccbi b/tests/js-tests/resjs/ccb/ccb/TestTimelineCallback.ccbi new file mode 100644 index 0000000000..d27a66662d Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccb/TestTimelineCallback.ccbi differ diff --git a/tests/js-tests/resjs/ccb/ccbParticleStars.png b/tests/js-tests/resjs/ccb/ccbParticleStars.png new file mode 100644 index 0000000000..f493dcc334 Binary files /dev/null and b/tests/js-tests/resjs/ccb/ccbParticleStars.png differ diff --git a/tests/js-tests/resjs/ccb/comic andy.ttf b/tests/js-tests/resjs/ccb/comic andy.ttf new file mode 100644 index 0000000000..a68e94d66d Binary files /dev/null and b/tests/js-tests/resjs/ccb/comic andy.ttf differ diff --git a/tests/js-tests/resjs/ccb/fileLookup.plist b/tests/js-tests/resjs/ccb/fileLookup.plist new file mode 100644 index 0000000000..7a04cd9ea7 --- /dev/null +++ b/tests/js-tests/resjs/ccb/fileLookup.plist @@ -0,0 +1,13 @@ + + + + + filenames + + metadata + + version + 1 + + + diff --git a/tests/js-tests/resjs/ccb/flower.jpg b/tests/js-tests/resjs/ccb/flower.jpg new file mode 100644 index 0000000000..38e3a5faba Binary files /dev/null and b/tests/js-tests/resjs/ccb/flower.jpg differ diff --git a/tests/js-tests/resjs/ccb/gem-0.wav b/tests/js-tests/resjs/ccb/gem-0.wav new file mode 100644 index 0000000000..13382b4a2f Binary files /dev/null and b/tests/js-tests/resjs/ccb/gem-0.wav differ diff --git a/tests/js-tests/resjs/ccb/gem-1.wav b/tests/js-tests/resjs/ccb/gem-1.wav new file mode 100644 index 0000000000..5a60849ce6 Binary files /dev/null and b/tests/js-tests/resjs/ccb/gem-1.wav differ diff --git a/tests/js-tests/resjs/ccb/grossini-generic.plist b/tests/js-tests/resjs/ccb/grossini-generic.plist new file mode 100644 index 0000000000..ca256a58cc --- /dev/null +++ b/tests/js-tests/resjs/ccb/grossini-generic.plist @@ -0,0 +1,282 @@ + + + + + frames + + grossini_dance_generic_01.png + + aliases + + spriteColorRect + {{17, 7}, {51, 109}} + spriteOffset + {0, 0} + spriteSize + {85, 121} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{2, 125}, {121, 85}} + textureRotated + + + grossini_dance_generic_02.png + + aliases + + spriteColorRect + {{5, 7}, {63, 109}} + spriteOffset + {0, 0} + spriteSize + {85, 121} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{299, 2}, {85, 121}} + textureRotated + + + grossini_dance_generic_03.png + + aliases + + spriteColorRect + {{5, 7}, {63, 109}} + spriteOffset + {-6, -1} + spriteSize + {63, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{2, 236}, {109, 63}} + textureRotated + + + grossini_dance_generic_04.png + + aliases + + spriteColorRect + {{5, 7}, {75, 109}} + spriteOffset + {0, -1} + spriteSize + {75, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{202, 125}, {75, 109}} + textureRotated + + + grossini_dance_generic_05.png + + aliases + + spriteColorRect + {{5, 7}, {75, 109}} + spriteOffset + {0, -1} + spriteSize + {75, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{125, 125}, {75, 109}} + textureRotated + + + grossini_dance_generic_06.png + + aliases + + spriteColorRect + {{5, 7}, {63, 109}} + spriteOffset + {0, 0} + spriteSize + {85, 121} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{212, 2}, {85, 121}} + textureRotated + + + grossini_dance_generic_07.png + + aliases + + spriteColorRect + {{5, 7}, {63, 109}} + spriteOffset + {-6, -1} + spriteSize + {63, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{279, 125}, {63, 109}} + textureRotated + + + grossini_dance_generic_08.png + + aliases + + spriteColorRect + {{17, 7}, {51, 109}} + spriteOffset + {0, -1} + spriteSize + {51, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{409, 125}, {51, 109}} + textureRotated + + + grossini_dance_generic_09.png + + aliases + + spriteColorRect + {{17, 7}, {51, 109}} + spriteOffset + {0, -1} + spriteSize + {51, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{224, 236}, {109, 51}} + textureRotated + + + grossini_dance_generic_10.png + + aliases + + spriteColorRect + {{17, 7}, {63, 109}} + spriteOffset + {6, -1} + spriteSize + {63, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{344, 125}, {63, 109}} + textureRotated + + + grossini_dance_generic_11.png + + aliases + + spriteColorRect + {{17, 7}, {63, 109}} + spriteOffset + {6, -1} + spriteSize + {63, 109} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{113, 236}, {109, 63}} + textureRotated + + + grossini_dance_generic_12.png + + aliases + + spriteColorRect + {{17, 10}, {51, 107}} + spriteOffset + {0, 0} + spriteSize + {85, 121} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{2, 2}, {85, 121}} + textureRotated + + + grossini_dance_generic_13.png + + aliases + + spriteColorRect + {{17, 7}, {51, 109}} + spriteOffset + {0, 0} + spriteSize + {85, 121} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{386, 2}, {121, 85}} + textureRotated + + + grossini_dance_generic_14.png + + aliases + + spriteColorRect + {{17, 10}, {51, 107}} + spriteOffset + {0, 0} + spriteSize + {85, 121} + spriteSourceSize + {85, 121} + spriteTrimmed + + textureRect + {{89, 2}, {121, 85}} + textureRotated + + + + metadata + + format + 3 + size + {512, 512} + + + diff --git a/tests/js-tests/resjs/ccb/grossini-generic.png b/tests/js-tests/resjs/ccb/grossini-generic.png new file mode 100644 index 0000000000..5c0bbc67c8 Binary files /dev/null and b/tests/js-tests/resjs/ccb/grossini-generic.png differ diff --git a/tests/js-tests/resjs/ccb/jungle-left.png b/tests/js-tests/resjs/ccb/jungle-left.png new file mode 100644 index 0000000000..79bbf20334 Binary files /dev/null and b/tests/js-tests/resjs/ccb/jungle-left.png differ diff --git a/tests/js-tests/resjs/ccb/jungle-right.png b/tests/js-tests/resjs/ccb/jungle-right.png new file mode 100644 index 0000000000..8da61b9f58 Binary files /dev/null and b/tests/js-tests/resjs/ccb/jungle-right.png differ diff --git a/tests/js-tests/resjs/ccb/jungle.png b/tests/js-tests/resjs/ccb/jungle.png new file mode 100644 index 0000000000..b3ddd92d2b Binary files /dev/null and b/tests/js-tests/resjs/ccb/jungle.png differ diff --git a/tests/js-tests/resjs/ccb/logo-icon.png b/tests/js-tests/resjs/ccb/logo-icon.png new file mode 100644 index 0000000000..c668736dc7 Binary files /dev/null and b/tests/js-tests/resjs/ccb/logo-icon.png differ diff --git a/tests/js-tests/resjs/ccb/logo.png b/tests/js-tests/resjs/ccb/logo.png new file mode 100644 index 0000000000..a4cd20c20e Binary files /dev/null and b/tests/js-tests/resjs/ccb/logo.png differ diff --git a/tests/js-tests/resjs/ccb/markerfelt24shadow.fnt b/tests/js-tests/resjs/ccb/markerfelt24shadow.fnt new file mode 100644 index 0000000000..2685fbcab6 --- /dev/null +++ b/tests/js-tests/resjs/ccb/markerfelt24shadow.fnt @@ -0,0 +1,3732 @@ +info face="MarkerFelt-Thin" size=24 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=2,2 +common lineHeight=26 base=21 scaleW=256 scaleH=256 pages=1 packed=0 +page id=0 file="markerfelt24shadow.png" +chars count=95 +char id=106 x=2 y=2 width=10 height=27 xoffset=-2 yoffset=1 xadvance=5 page=0 chnl=0 letter="j" +char id=87 x=14 y=2 width=27 height=26 xoffset=0 yoffset=-1 xadvance=23 page=0 chnl=0 letter="W" +char id=81 x=43 y=2 width=18 height=26 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="Q" +char id=72 x=63 y=2 width=15 height=26 xoffset=1 yoffset=-1 xadvance=12 page=0 chnl=0 letter="H" +char id=77 x=80 y=2 width=25 height=25 xoffset=1 yoffset=-0 xadvance=22 page=0 chnl=0 letter="M" +char id=37 x=107 y=2 width=20 height=25 xoffset=1 yoffset=-0 xadvance=17 page=0 chnl=0 letter="%" +char id=88 x=129 y=2 width=19 height=25 xoffset=0 yoffset=-0 xadvance=15 page=0 chnl=0 letter="X" +char id=89 x=150 y=2 width=19 height=25 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="Y" +char id=90 x=171 y=2 width=19 height=25 xoffset=0 yoffset=-1 xadvance=14 page=0 chnl=0 letter="Z" +char id=65 x=192 y=2 width=18 height=25 xoffset=1 yoffset=-0 xadvance=15 page=0 chnl=0 letter="A" +char id=75 x=212 y=2 width=18 height=25 xoffset=1 yoffset=-0 xadvance=13 page=0 chnl=0 letter="K" +char id=52 x=232 y=2 width=18 height=25 xoffset=0 yoffset=-0 xadvance=14 page=0 chnl=0 letter="4" +char id=78 x=2 y=31 width=17 height=25 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="N" +char id=86 x=21 y=31 width=17 height=25 xoffset=0 yoffset=-0 xadvance=13 page=0 chnl=0 letter="V" +char id=53 x=40 y=31 width=17 height=25 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="5" +char id=71 x=59 y=31 width=16 height=25 xoffset=0 yoffset=-0 xadvance=12 page=0 chnl=0 letter="G" +char id=79 x=77 y=31 width=16 height=25 xoffset=1 yoffset=-0 xadvance=13 page=0 chnl=0 letter="O" +char id=83 x=95 y=31 width=16 height=25 xoffset=0 yoffset=-0 xadvance=12 page=0 chnl=0 letter="S" +char id=84 x=113 y=31 width=16 height=25 xoffset=0 yoffset=-0 xadvance=12 page=0 chnl=0 letter="T" +char id=85 x=131 y=31 width=16 height=25 xoffset=1 yoffset=-0 xadvance=13 page=0 chnl=0 letter="U" +char id=51 x=149 y=31 width=16 height=25 xoffset=1 yoffset=-1 xadvance=14 page=0 chnl=0 letter="3" +char id=55 x=167 y=31 width=16 height=25 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="7" +char id=66 x=185 y=31 width=15 height=25 xoffset=1 yoffset=-0 xadvance=12 page=0 chnl=0 letter="B" +char id=67 x=202 y=31 width=15 height=25 xoffset=0 yoffset=-0 xadvance=11 page=0 chnl=0 letter="C" +char id=68 x=219 y=31 width=15 height=25 xoffset=1 yoffset=-0 xadvance=12 page=0 chnl=0 letter="D" +char id=80 x=236 y=31 width=15 height=25 xoffset=1 yoffset=-0 xadvance=11 page=0 chnl=0 letter="P" +char id=104 x=2 y=58 width=15 height=25 xoffset=1 yoffset=-0 xadvance=11 page=0 chnl=0 letter="h" +char id=54 x=19 y=58 width=15 height=25 xoffset=2 yoffset=-0 xadvance=14 page=0 chnl=0 letter="6" +char id=57 x=36 y=58 width=15 height=25 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="9" +char id=48 x=53 y=58 width=15 height=25 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="0" +char id=74 x=70 y=58 width=14 height=25 xoffset=0 yoffset=-0 xadvance=10 page=0 chnl=0 letter="J" +char id=76 x=86 y=58 width=14 height=25 xoffset=1 yoffset=-0 xadvance=10 page=0 chnl=0 letter="L" +char id=102 x=102 y=58 width=14 height=25 xoffset=0 yoffset=-0 xadvance=9 page=0 chnl=0 letter="f" +char id=56 x=118 y=58 width=14 height=25 xoffset=2 yoffset=-0 xadvance=14 page=0 chnl=0 letter="8" +char id=63 x=134 y=58 width=14 height=25 xoffset=0 yoffset=-0 xadvance=10 page=0 chnl=0 letter="?" +char id=69 x=150 y=58 width=13 height=25 xoffset=1 yoffset=-0 xadvance=10 page=0 chnl=0 letter="E" +char id=70 x=165 y=58 width=13 height=25 xoffset=1 yoffset=-0 xadvance=10 page=0 chnl=0 letter="F" +char id=91 x=180 y=58 width=13 height=25 xoffset=0 yoffset=-0 xadvance=9 page=0 chnl=0 letter="[" +char id=93 x=195 y=58 width=13 height=25 xoffset=0 yoffset=-0 xadvance=9 page=0 chnl=0 letter="]" +char id=123 x=210 y=58 width=13 height=25 xoffset=0 yoffset=-1 xadvance=9 page=0 chnl=0 letter="{" +char id=125 x=225 y=58 width=13 height=25 xoffset=0 yoffset=-1 xadvance=9 page=0 chnl=0 letter="}" +char id=49 x=240 y=58 width=11 height=25 xoffset=3 yoffset=-0 xadvance=14 page=0 chnl=0 letter="1" +char id=40 x=2 y=85 width=10 height=25 xoffset=1 yoffset=-1 xadvance=6 page=0 chnl=0 letter="(" +char id=41 x=14 y=85 width=10 height=25 xoffset=1 yoffset=-1 xadvance=6 page=0 chnl=0 letter=")" +char id=108 x=26 y=85 width=8 height=25 xoffset=1 yoffset=-0 xadvance=5 page=0 chnl=0 letter="l" +char id=124 x=36 y=85 width=8 height=25 xoffset=1 yoffset=-0 xadvance=5 page=0 chnl=0 letter="|" +char id=64 x=46 y=85 width=25 height=24 xoffset=1 yoffset=-0 xadvance=22 page=0 chnl=0 letter="@" +char id=82 x=73 y=85 width=18 height=24 xoffset=1 yoffset=1 xadvance=14 page=0 chnl=0 letter="R" +char id=38 x=93 y=85 width=18 height=24 xoffset=1 yoffset=1 xadvance=13 page=0 chnl=0 letter="&" +char id=50 x=113 y=85 width=17 height=24 xoffset=1 yoffset=-0 xadvance=14 page=0 chnl=0 letter="2" +char id=47 x=132 y=85 width=17 height=24 xoffset=0 yoffset=-0 xadvance=12 page=0 chnl=0 letter="/" +char id=92 x=151 y=85 width=17 height=24 xoffset=0 yoffset=-0 xadvance=13 page=0 chnl=0 letter="\" +char id=107 x=170 y=85 width=16 height=24 xoffset=1 yoffset=1 xadvance=12 page=0 chnl=0 letter="k" +char id=36 x=188 y=85 width=16 height=24 xoffset=1 yoffset=1 xadvance=13 page=0 chnl=0 letter="$" +char id=73 x=206 y=85 width=9 height=24 xoffset=1 yoffset=-0 xadvance=6 page=0 chnl=0 letter="I" +char id=105 x=217 y=85 width=8 height=24 xoffset=1 yoffset=1 xadvance=5 page=0 chnl=0 letter="i" +char id=33 x=227 y=85 width=8 height=24 xoffset=1 yoffset=1 xadvance=5 page=0 chnl=0 letter="!" +char id=121 x=237 y=85 width=16 height=23 xoffset=-0 yoffset=6 xadvance=11 page=0 chnl=0 letter="y" +char id=98 x=2 y=112 width=14 height=23 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=0 letter="b" +char id=100 x=18 y=112 width=14 height=23 xoffset=0 yoffset=2 xadvance=10 page=0 chnl=0 letter="d" +char id=112 x=34 y=112 width=14 height=23 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 letter="p" +char id=113 x=50 y=112 width=14 height=23 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 letter="q" +char id=103 x=66 y=112 width=13 height=23 xoffset=1 yoffset=5 xadvance=10 page=0 chnl=0 letter="g" +char id=116 x=81 y=112 width=14 height=22 xoffset=-1 yoffset=3 xadvance=9 page=0 chnl=0 letter="t" +char id=59 x=97 y=112 width=10 height=20 xoffset=-1 yoffset=7 xadvance=5 page=0 chnl=0 letter=";" +char id=119 x=109 y=112 width=23 height=19 xoffset=-1 yoffset=6 xadvance=17 page=0 chnl=0 letter="w" +char id=109 x=134 y=112 width=21 height=19 xoffset=1 yoffset=6 xadvance=17 page=0 chnl=0 letter="m" +char id=118 x=157 y=112 width=16 height=19 xoffset=-1 yoffset=6 xadvance=11 page=0 chnl=0 letter="v" +char id=122 x=175 y=112 width=16 height=19 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=0 letter="z" +char id=97 x=193 y=112 width=15 height=19 xoffset=0 yoffset=6 xadvance=11 page=0 chnl=0 letter="a" +char id=110 x=210 y=112 width=15 height=19 xoffset=1 yoffset=6 xadvance=12 page=0 chnl=0 letter="n" +char id=111 x=227 y=112 width=14 height=19 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=0 letter="o" +char id=114 x=2 y=137 width=14 height=19 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=0 letter="r" +char id=120 x=18 y=137 width=14 height=19 xoffset=-0 yoffset=6 xadvance=10 page=0 chnl=0 letter="x" +char id=99 x=34 y=137 width=13 height=19 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=0 letter="c" +char id=101 x=49 y=137 width=13 height=19 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=0 letter="e" +char id=115 x=64 y=137 width=13 height=19 xoffset=0 yoffset=6 xadvance=9 page=0 chnl=0 letter="s" +char id=117 x=79 y=137 width=13 height=19 xoffset=1 yoffset=6 xadvance=10 page=0 chnl=0 letter="u" +char id=60 x=94 y=137 width=12 height=18 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=0 letter="<" +char id=62 x=108 y=137 width=12 height=18 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=0 letter=">" +char id=58 x=122 y=137 width=8 height=18 xoffset=1 yoffset=6 xadvance=6 page=0 chnl=0 letter=":" +char id=35 x=132 y=137 width=17 height=17 xoffset=0 yoffset=5 xadvance=14 page=0 chnl=0 letter="#" +char id=43 x=151 y=137 width=14 height=15 xoffset=0 yoffset=4 xadvance=11 page=0 chnl=0 letter="+" +char id=42 x=167 y=137 width=15 height=13 xoffset=0 yoffset=3 xadvance=11 page=0 chnl=0 letter="*" +char id=61 x=184 y=137 width=12 height=12 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=0 letter="=" +char id=34 x=198 y=137 width=11 height=12 xoffset=0 yoffset=-0 xadvance=7 page=0 chnl=0 letter=""" +char id=39 x=211 y=137 width=7 height=11 xoffset=0 yoffset=-0 xadvance=4 page=0 chnl=0 letter="'" +char id=96 x=220 y=137 width=9 height=10 xoffset=0 yoffset=-0 xadvance=5 page=0 chnl=0 letter="`" +char id=44 x=231 y=137 width=9 height=10 xoffset=-1 yoffset=17 xadvance=5 page=0 chnl=0 letter="," +char id=94 x=242 y=137 width=11 height=9 xoffset=0 yoffset=-0 xadvance=7 page=0 chnl=0 letter="^" +char id=46 x=2 y=158 width=8 height=9 xoffset=1 yoffset=15 xadvance=5 page=0 chnl=0 letter="." +char id=95 x=12 y=158 width=15 height=8 xoffset=0 yoffset=21 xadvance=12 page=0 chnl=0 letter="_" +char id=45 x=29 y=158 width=12 height=8 xoffset=1 yoffset=10 xadvance=9 page=0 chnl=0 letter="-" +char id=126 x=43 y=158 width=12 height=8 xoffset=0 yoffset=-0 xadvance=8 page=0 chnl=0 letter="~" +char id=32 x=57 y=158 width=0 height=0 xoffset=6 yoffset=41 xadvance=6 page=0 chnl=0 letter="space" +kernings count=3632 +kerning first=106 second=106 amount=2 +kerning first=106 second=102 amount=1 +kerning first=106 second=56 amount=-1 +kerning first=106 second=63 amount=1 +kerning first=106 second=49 amount=-2 +kerning first=106 second=40 amount=1 +kerning first=106 second=108 amount=1 +kerning first=106 second=107 amount=1 +kerning first=106 second=105 amount=1 +kerning first=106 second=33 amount=1 +kerning first=106 second=121 amount=1 +kerning first=106 second=98 amount=1 +kerning first=106 second=100 amount=1 +kerning first=106 second=112 amount=1 +kerning first=106 second=103 amount=1 +kerning first=106 second=116 amount=1 +kerning first=106 second=59 amount=2 +kerning first=106 second=119 amount=2 +kerning first=106 second=118 amount=2 +kerning first=106 second=122 amount=1 +kerning first=106 second=97 amount=1 +kerning first=106 second=110 amount=1 +kerning first=106 second=111 amount=1 +kerning first=106 second=114 amount=1 +kerning first=106 second=120 amount=1 +kerning first=106 second=99 amount=1 +kerning first=106 second=101 amount=1 +kerning first=106 second=115 amount=1 +kerning first=106 second=117 amount=1 +kerning first=106 second=34 amount=1 +kerning first=106 second=39 amount=1 +kerning first=106 second=44 amount=1 +kerning first=106 second=46 amount=1 +kerning first=87 second=87 amount=1 +kerning first=87 second=81 amount=-1 +kerning first=87 second=88 amount=1 +kerning first=87 second=89 amount=1 +kerning first=87 second=90 amount=-1 +kerning first=87 second=65 amount=-3 +kerning first=87 second=75 amount=1 +kerning first=87 second=52 amount=-2 +kerning first=87 second=86 amount=1 +kerning first=87 second=53 amount=-1 +kerning first=87 second=71 amount=-1 +kerning first=87 second=79 amount=-1 +kerning first=87 second=83 amount=-1 +kerning first=87 second=85 amount=1 +kerning first=87 second=51 amount=-2 +kerning first=87 second=55 amount=-1 +kerning first=87 second=66 amount=1 +kerning first=87 second=67 amount=-1 +kerning first=87 second=80 amount=1 +kerning first=87 second=54 amount=-2 +kerning first=87 second=57 amount=-2 +kerning first=87 second=48 amount=-2 +kerning first=87 second=74 amount=-2 +kerning first=87 second=76 amount=1 +kerning first=87 second=102 amount=-1 +kerning first=87 second=56 amount=-2 +kerning first=87 second=93 amount=1 +kerning first=87 second=49 amount=-2 +kerning first=87 second=41 amount=1 +kerning first=87 second=108 amount=1 +kerning first=87 second=64 amount=-3 +kerning first=87 second=82 amount=1 +kerning first=87 second=50 amount=-2 +kerning first=87 second=47 amount=-3 +kerning first=87 second=92 amount=1 +kerning first=87 second=107 amount=1 +kerning first=87 second=73 amount=1 +kerning first=87 second=33 amount=1 +kerning first=87 second=100 amount=-2 +kerning first=87 second=112 amount=-1 +kerning first=87 second=113 amount=-2 +kerning first=87 second=103 amount=-2 +kerning first=87 second=116 amount=-1 +kerning first=87 second=59 amount=-2 +kerning first=87 second=109 amount=-1 +kerning first=87 second=122 amount=-2 +kerning first=87 second=97 amount=-1 +kerning first=87 second=110 amount=-1 +kerning first=87 second=111 amount=-2 +kerning first=87 second=114 amount=-1 +kerning first=87 second=120 amount=-1 +kerning first=87 second=99 amount=-2 +kerning first=87 second=101 amount=-2 +kerning first=87 second=115 amount=-2 +kerning first=87 second=117 amount=-1 +kerning first=87 second=58 amount=-2 +kerning first=87 second=35 amount=-1 +kerning first=87 second=34 amount=1 +kerning first=87 second=39 amount=2 +kerning first=87 second=44 amount=-4 +kerning first=87 second=46 amount=-3 +kerning first=87 second=45 amount=-2 +kerning first=81 second=106 amount=3 +kerning first=81 second=72 amount=1 +kerning first=81 second=77 amount=1 +kerning first=81 second=88 amount=2 +kerning first=81 second=89 amount=-1 +kerning first=81 second=90 amount=1 +kerning first=81 second=65 amount=1 +kerning first=81 second=75 amount=1 +kerning first=81 second=78 amount=1 +kerning first=81 second=86 amount=-1 +kerning first=81 second=51 amount=-1 +kerning first=81 second=55 amount=1 +kerning first=81 second=66 amount=1 +kerning first=81 second=67 amount=1 +kerning first=81 second=68 amount=1 +kerning first=81 second=80 amount=1 +kerning first=81 second=104 amount=1 +kerning first=81 second=54 amount=-1 +kerning first=81 second=57 amount=-1 +kerning first=81 second=76 amount=1 +kerning first=81 second=102 amount=1 +kerning first=81 second=56 amount=-1 +kerning first=81 second=69 amount=1 +kerning first=81 second=70 amount=1 +kerning first=81 second=93 amount=1 +kerning first=81 second=49 amount=-2 +kerning first=81 second=40 amount=1 +kerning first=81 second=41 amount=1 +kerning first=81 second=108 amount=2 +kerning first=81 second=82 amount=1 +kerning first=81 second=50 amount=1 +kerning first=81 second=47 amount=1 +kerning first=81 second=92 amount=-1 +kerning first=81 second=107 amount=2 +kerning first=81 second=73 amount=1 +kerning first=81 second=105 amount=2 +kerning first=81 second=33 amount=2 +kerning first=81 second=121 amount=1 +kerning first=81 second=98 amount=2 +kerning first=81 second=112 amount=2 +kerning first=81 second=103 amount=1 +kerning first=81 second=116 amount=1 +kerning first=81 second=59 amount=3 +kerning first=81 second=119 amount=1 +kerning first=81 second=118 amount=1 +kerning first=81 second=122 amount=2 +kerning first=81 second=97 amount=2 +kerning first=81 second=110 amount=2 +kerning first=81 second=111 amount=1 +kerning first=81 second=114 amount=2 +kerning first=81 second=120 amount=2 +kerning first=81 second=99 amount=1 +kerning first=81 second=115 amount=1 +kerning first=81 second=117 amount=1 +kerning first=81 second=58 amount=2 +kerning first=81 second=44 amount=3 +kerning first=81 second=46 amount=2 +kerning first=72 second=106 amount=1 +kerning first=72 second=87 amount=1 +kerning first=72 second=81 amount=1 +kerning first=72 second=72 amount=1 +kerning first=72 second=88 amount=1 +kerning first=72 second=75 amount=1 +kerning first=72 second=52 amount=1 +kerning first=72 second=86 amount=1 +kerning first=72 second=71 amount=1 +kerning first=72 second=79 amount=1 +kerning first=72 second=85 amount=1 +kerning first=72 second=51 amount=-1 +kerning first=72 second=66 amount=1 +kerning first=72 second=67 amount=1 +kerning first=72 second=80 amount=1 +kerning first=72 second=104 amount=1 +kerning first=72 second=57 amount=-1 +kerning first=72 second=76 amount=1 +kerning first=72 second=102 amount=1 +kerning first=72 second=56 amount=-1 +kerning first=72 second=69 amount=1 +kerning first=72 second=93 amount=1 +kerning first=72 second=49 amount=-2 +kerning first=72 second=40 amount=1 +kerning first=72 second=41 amount=1 +kerning first=72 second=108 amount=1 +kerning first=72 second=82 amount=1 +kerning first=72 second=92 amount=1 +kerning first=72 second=107 amount=1 +kerning first=72 second=73 amount=1 +kerning first=72 second=105 amount=1 +kerning first=72 second=33 amount=1 +kerning first=72 second=121 amount=1 +kerning first=72 second=98 amount=1 +kerning first=72 second=100 amount=1 +kerning first=72 second=112 amount=1 +kerning first=72 second=113 amount=1 +kerning first=72 second=103 amount=1 +kerning first=72 second=116 amount=2 +kerning first=72 second=59 amount=1 +kerning first=72 second=119 amount=1 +kerning first=72 second=118 amount=1 +kerning first=72 second=97 amount=1 +kerning first=72 second=110 amount=1 +kerning first=72 second=111 amount=1 +kerning first=72 second=114 amount=1 +kerning first=72 second=120 amount=1 +kerning first=72 second=99 amount=1 +kerning first=72 second=101 amount=1 +kerning first=72 second=115 amount=1 +kerning first=72 second=117 amount=1 +kerning first=72 second=35 amount=1 +kerning first=72 second=34 amount=1 +kerning first=72 second=39 amount=1 +kerning first=72 second=46 amount=1 +kerning first=72 second=45 amount=1 +kerning first=77 second=106 amount=1 +kerning first=77 second=88 amount=1 +kerning first=77 second=90 amount=1 +kerning first=77 second=65 amount=1 +kerning first=77 second=51 amount=-1 +kerning first=77 second=66 amount=1 +kerning first=77 second=80 amount=1 +kerning first=77 second=104 amount=1 +kerning first=77 second=54 amount=-1 +kerning first=77 second=57 amount=-1 +kerning first=77 second=48 amount=-1 +kerning first=77 second=56 amount=-1 +kerning first=77 second=69 amount=1 +kerning first=77 second=70 amount=1 +kerning first=77 second=49 amount=-3 +kerning first=77 second=41 amount=1 +kerning first=77 second=108 amount=1 +kerning first=77 second=47 amount=1 +kerning first=77 second=107 amount=1 +kerning first=77 second=73 amount=1 +kerning first=77 second=105 amount=1 +kerning first=77 second=33 amount=1 +kerning first=77 second=98 amount=1 +kerning first=77 second=112 amount=1 +kerning first=77 second=116 amount=1 +kerning first=77 second=59 amount=1 +kerning first=77 second=119 amount=1 +kerning first=77 second=118 amount=1 +kerning first=77 second=122 amount=1 +kerning first=77 second=97 amount=1 +kerning first=77 second=110 amount=1 +kerning first=77 second=114 amount=1 +kerning first=77 second=120 amount=1 +kerning first=77 second=115 amount=1 +kerning first=77 second=58 amount=1 +kerning first=77 second=44 amount=1 +kerning first=77 second=46 amount=1 +kerning first=88 second=106 amount=1 +kerning first=88 second=81 amount=-1 +kerning first=88 second=88 amount=1 +kerning first=88 second=90 amount=1 +kerning first=88 second=65 amount=1 +kerning first=88 second=52 amount=-2 +kerning first=88 second=71 amount=-1 +kerning first=88 second=79 amount=-1 +kerning first=88 second=83 amount=-1 +kerning first=88 second=84 amount=-1 +kerning first=88 second=51 amount=-1 +kerning first=88 second=80 amount=1 +kerning first=88 second=54 amount=-1 +kerning first=88 second=57 amount=-1 +kerning first=88 second=48 amount=-1 +kerning first=88 second=74 amount=-2 +kerning first=88 second=102 amount=-1 +kerning first=88 second=56 amount=-1 +kerning first=88 second=63 amount=-2 +kerning first=88 second=69 amount=1 +kerning first=88 second=49 amount=-3 +kerning first=88 second=41 amount=1 +kerning first=88 second=108 amount=1 +kerning first=88 second=64 amount=-1 +kerning first=88 second=47 amount=1 +kerning first=88 second=107 amount=1 +kerning first=88 second=73 amount=1 +kerning first=88 second=105 amount=1 +kerning first=88 second=33 amount=1 +kerning first=88 second=121 amount=-2 +kerning first=88 second=98 amount=1 +kerning first=88 second=112 amount=1 +kerning first=88 second=116 amount=-1 +kerning first=88 second=59 amount=1 +kerning first=88 second=118 amount=-1 +kerning first=88 second=122 amount=1 +kerning first=88 second=97 amount=1 +kerning first=88 second=110 amount=1 +kerning first=88 second=114 amount=1 +kerning first=88 second=120 amount=1 +kerning first=88 second=115 amount=1 +kerning first=88 second=58 amount=1 +kerning first=88 second=35 amount=-3 +kerning first=88 second=44 amount=1 +kerning first=88 second=46 amount=1 +kerning first=88 second=45 amount=-3 +kerning first=89 second=106 amount=1 +kerning first=89 second=87 amount=1 +kerning first=89 second=81 amount=-1 +kerning first=89 second=72 amount=1 +kerning first=89 second=77 amount=1 +kerning first=89 second=88 amount=1 +kerning first=89 second=89 amount=1 +kerning first=89 second=65 amount=-3 +kerning first=89 second=75 amount=1 +kerning first=89 second=52 amount=-3 +kerning first=89 second=78 amount=1 +kerning first=89 second=86 amount=2 +kerning first=89 second=84 amount=1 +kerning first=89 second=85 amount=1 +kerning first=89 second=51 amount=-2 +kerning first=89 second=66 amount=1 +kerning first=89 second=68 amount=1 +kerning first=89 second=80 amount=1 +kerning first=89 second=104 amount=1 +kerning first=89 second=54 amount=-1 +kerning first=89 second=57 amount=-1 +kerning first=89 second=48 amount=-1 +kerning first=89 second=74 amount=-3 +kerning first=89 second=76 amount=1 +kerning first=89 second=102 amount=-1 +kerning first=89 second=56 amount=-1 +kerning first=89 second=69 amount=1 +kerning first=89 second=70 amount=1 +kerning first=89 second=93 amount=1 +kerning first=89 second=49 amount=-2 +kerning first=89 second=41 amount=1 +kerning first=89 second=108 amount=1 +kerning first=89 second=64 amount=-3 +kerning first=89 second=82 amount=1 +kerning first=89 second=50 amount=-2 +kerning first=89 second=47 amount=-1 +kerning first=89 second=92 amount=1 +kerning first=89 second=107 amount=1 +kerning first=89 second=73 amount=1 +kerning first=89 second=105 amount=1 +kerning first=89 second=33 amount=1 +kerning first=89 second=121 amount=-1 +kerning first=89 second=98 amount=1 +kerning first=89 second=100 amount=-2 +kerning first=89 second=112 amount=-1 +kerning first=89 second=113 amount=-2 +kerning first=89 second=103 amount=-2 +kerning first=89 second=116 amount=-1 +kerning first=89 second=59 amount=-2 +kerning first=89 second=109 amount=-1 +kerning first=89 second=122 amount=-2 +kerning first=89 second=97 amount=-2 +kerning first=89 second=110 amount=-1 +kerning first=89 second=111 amount=-2 +kerning first=89 second=114 amount=-1 +kerning first=89 second=120 amount=-1 +kerning first=89 second=99 amount=-2 +kerning first=89 second=101 amount=-3 +kerning first=89 second=115 amount=-2 +kerning first=89 second=117 amount=-1 +kerning first=89 second=58 amount=-2 +kerning first=89 second=35 amount=-1 +kerning first=89 second=34 amount=2 +kerning first=89 second=39 amount=2 +kerning first=89 second=44 amount=-4 +kerning first=89 second=46 amount=-4 +kerning first=89 second=45 amount=-3 +kerning first=90 second=87 amount=1 +kerning first=90 second=81 amount=-1 +kerning first=90 second=88 amount=1 +kerning first=90 second=89 amount=1 +kerning first=90 second=65 amount=-1 +kerning first=90 second=75 amount=1 +kerning first=90 second=52 amount=-4 +kerning first=90 second=78 amount=1 +kerning first=90 second=86 amount=1 +kerning first=90 second=53 amount=-1 +kerning first=90 second=83 amount=-1 +kerning first=90 second=85 amount=1 +kerning first=90 second=51 amount=-2 +kerning first=90 second=66 amount=1 +kerning first=90 second=68 amount=1 +kerning first=90 second=80 amount=1 +kerning first=90 second=104 amount=1 +kerning first=90 second=54 amount=-1 +kerning first=90 second=57 amount=-1 +kerning first=90 second=48 amount=-1 +kerning first=90 second=74 amount=-2 +kerning first=90 second=76 amount=1 +kerning first=90 second=102 amount=-1 +kerning first=90 second=56 amount=-1 +kerning first=90 second=63 amount=-1 +kerning first=90 second=69 amount=1 +kerning first=90 second=93 amount=1 +kerning first=90 second=49 amount=-2 +kerning first=90 second=41 amount=1 +kerning first=90 second=108 amount=1 +kerning first=90 second=64 amount=-2 +kerning first=90 second=82 amount=1 +kerning first=90 second=50 amount=-1 +kerning first=90 second=92 amount=1 +kerning first=90 second=107 amount=1 +kerning first=90 second=73 amount=1 +kerning first=90 second=105 amount=1 +kerning first=90 second=33 amount=1 +kerning first=90 second=121 amount=-2 +kerning first=90 second=98 amount=1 +kerning first=90 second=100 amount=-1 +kerning first=90 second=112 amount=-1 +kerning first=90 second=113 amount=-1 +kerning first=90 second=103 amount=-1 +kerning first=90 second=116 amount=-2 +kerning first=90 second=59 amount=-1 +kerning first=90 second=119 amount=-1 +kerning first=90 second=109 amount=-1 +kerning first=90 second=118 amount=-1 +kerning first=90 second=122 amount=-1 +kerning first=90 second=110 amount=-1 +kerning first=90 second=111 amount=-1 +kerning first=90 second=114 amount=-1 +kerning first=90 second=99 amount=-1 +kerning first=90 second=101 amount=-1 +kerning first=90 second=115 amount=-1 +kerning first=90 second=117 amount=-1 +kerning first=90 second=58 amount=-1 +kerning first=90 second=35 amount=-3 +kerning first=90 second=34 amount=1 +kerning first=90 second=39 amount=2 +kerning first=90 second=45 amount=-5 +kerning first=65 second=87 amount=-2 +kerning first=65 second=88 amount=1 +kerning first=65 second=89 amount=-3 +kerning first=65 second=86 amount=-2 +kerning first=65 second=53 amount=-1 +kerning first=65 second=83 amount=1 +kerning first=65 second=84 amount=-2 +kerning first=65 second=51 amount=-2 +kerning first=65 second=67 amount=1 +kerning first=65 second=54 amount=-1 +kerning first=65 second=57 amount=-1 +kerning first=65 second=102 amount=-1 +kerning first=65 second=56 amount=-1 +kerning first=65 second=63 amount=-1 +kerning first=65 second=93 amount=-1 +kerning first=65 second=49 amount=-3 +kerning first=65 second=108 amount=1 +kerning first=65 second=92 amount=-3 +kerning first=65 second=100 amount=1 +kerning first=65 second=113 amount=1 +kerning first=65 second=103 amount=1 +kerning first=65 second=116 amount=-1 +kerning first=65 second=59 amount=1 +kerning first=65 second=122 amount=1 +kerning first=65 second=97 amount=1 +kerning first=65 second=110 amount=1 +kerning first=65 second=111 amount=1 +kerning first=65 second=120 amount=1 +kerning first=65 second=99 amount=1 +kerning first=65 second=101 amount=1 +kerning first=65 second=117 amount=1 +kerning first=65 second=34 amount=-3 +kerning first=65 second=39 amount=-3 +kerning first=65 second=44 amount=1 +kerning first=65 second=46 amount=1 +kerning first=75 second=106 amount=1 +kerning first=75 second=72 amount=1 +kerning first=75 second=77 amount=1 +kerning first=75 second=88 amount=1 +kerning first=75 second=90 amount=1 +kerning first=75 second=65 amount=1 +kerning first=75 second=75 amount=1 +kerning first=75 second=52 amount=-2 +kerning first=75 second=78 amount=1 +kerning first=75 second=53 amount=1 +kerning first=75 second=84 amount=-1 +kerning first=75 second=55 amount=1 +kerning first=75 second=66 amount=1 +kerning first=75 second=67 amount=1 +kerning first=75 second=80 amount=1 +kerning first=75 second=104 amount=1 +kerning first=75 second=54 amount=-1 +kerning first=75 second=74 amount=-1 +kerning first=75 second=76 amount=1 +kerning first=75 second=102 amount=-1 +kerning first=75 second=63 amount=-1 +kerning first=75 second=69 amount=1 +kerning first=75 second=70 amount=1 +kerning first=75 second=49 amount=-2 +kerning first=75 second=40 amount=1 +kerning first=75 second=41 amount=1 +kerning first=75 second=108 amount=1 +kerning first=75 second=82 amount=1 +kerning first=75 second=50 amount=1 +kerning first=75 second=47 amount=1 +kerning first=75 second=107 amount=1 +kerning first=75 second=73 amount=1 +kerning first=75 second=105 amount=1 +kerning first=75 second=33 amount=1 +kerning first=75 second=121 amount=-1 +kerning first=75 second=98 amount=1 +kerning first=75 second=100 amount=1 +kerning first=75 second=112 amount=1 +kerning first=75 second=113 amount=1 +kerning first=75 second=103 amount=1 +kerning first=75 second=116 amount=-1 +kerning first=75 second=59 amount=1 +kerning first=75 second=122 amount=1 +kerning first=75 second=97 amount=2 +kerning first=75 second=110 amount=1 +kerning first=75 second=111 amount=1 +kerning first=75 second=114 amount=1 +kerning first=75 second=120 amount=2 +kerning first=75 second=99 amount=1 +kerning first=75 second=101 amount=1 +kerning first=75 second=115 amount=1 +kerning first=75 second=117 amount=1 +kerning first=75 second=58 amount=1 +kerning first=75 second=35 amount=-3 +kerning first=75 second=44 amount=1 +kerning first=75 second=46 amount=2 +kerning first=75 second=45 amount=-4 +kerning first=52 second=106 amount=1 +kerning first=52 second=87 amount=-1 +kerning first=52 second=81 amount=1 +kerning first=52 second=72 amount=1 +kerning first=52 second=88 amount=-2 +kerning first=52 second=89 amount=-2 +kerning first=52 second=90 amount=-2 +kerning first=52 second=65 amount=-1 +kerning first=52 second=86 amount=-1 +kerning first=52 second=71 amount=1 +kerning first=52 second=79 amount=1 +kerning first=52 second=83 amount=-1 +kerning first=52 second=84 amount=-2 +kerning first=52 second=85 amount=1 +kerning first=52 second=67 amount=1 +kerning first=52 second=80 amount=1 +kerning first=52 second=104 amount=1 +kerning first=52 second=102 amount=1 +kerning first=52 second=63 amount=-1 +kerning first=52 second=69 amount=1 +kerning first=52 second=93 amount=-2 +kerning first=52 second=40 amount=1 +kerning first=52 second=41 amount=-1 +kerning first=52 second=108 amount=1 +kerning first=52 second=47 amount=-2 +kerning first=52 second=92 amount=-2 +kerning first=52 second=107 amount=1 +kerning first=52 second=73 amount=1 +kerning first=52 second=105 amount=1 +kerning first=52 second=33 amount=1 +kerning first=52 second=98 amount=1 +kerning first=52 second=100 amount=1 +kerning first=52 second=112 amount=1 +kerning first=52 second=113 amount=1 +kerning first=52 second=103 amount=1 +kerning first=52 second=116 amount=1 +kerning first=52 second=119 amount=1 +kerning first=52 second=118 amount=1 +kerning first=52 second=122 amount=-1 +kerning first=52 second=97 amount=1 +kerning first=52 second=110 amount=1 +kerning first=52 second=111 amount=1 +kerning first=52 second=114 amount=1 +kerning first=52 second=99 amount=1 +kerning first=52 second=101 amount=1 +kerning first=52 second=115 amount=1 +kerning first=52 second=117 amount=1 +kerning first=52 second=35 amount=1 +kerning first=52 second=34 amount=-2 +kerning first=52 second=39 amount=-1 +kerning first=52 second=44 amount=-2 +kerning first=52 second=46 amount=-2 +kerning first=52 second=45 amount=1 +kerning first=78 second=106 amount=1 +kerning first=78 second=87 amount=1 +kerning first=78 second=88 amount=1 +kerning first=78 second=90 amount=1 +kerning first=78 second=65 amount=1 +kerning first=78 second=75 amount=1 +kerning first=78 second=86 amount=1 +kerning first=78 second=83 amount=1 +kerning first=78 second=85 amount=1 +kerning first=78 second=66 amount=1 +kerning first=78 second=80 amount=1 +kerning first=78 second=104 amount=1 +kerning first=78 second=54 amount=-1 +kerning first=78 second=48 amount=-1 +kerning first=78 second=76 amount=1 +kerning first=78 second=102 amount=1 +kerning first=78 second=69 amount=1 +kerning first=78 second=93 amount=1 +kerning first=78 second=49 amount=-2 +kerning first=78 second=41 amount=1 +kerning first=78 second=108 amount=1 +kerning first=78 second=82 amount=1 +kerning first=78 second=47 amount=1 +kerning first=78 second=92 amount=1 +kerning first=78 second=107 amount=1 +kerning first=78 second=73 amount=1 +kerning first=78 second=105 amount=1 +kerning first=78 second=33 amount=1 +kerning first=78 second=121 amount=1 +kerning first=78 second=98 amount=1 +kerning first=78 second=112 amount=1 +kerning first=78 second=103 amount=1 +kerning first=78 second=116 amount=1 +kerning first=78 second=59 amount=1 +kerning first=78 second=119 amount=1 +kerning first=78 second=118 amount=1 +kerning first=78 second=122 amount=1 +kerning first=78 second=97 amount=1 +kerning first=78 second=110 amount=1 +kerning first=78 second=111 amount=1 +kerning first=78 second=114 amount=1 +kerning first=78 second=120 amount=1 +kerning first=78 second=99 amount=1 +kerning first=78 second=115 amount=1 +kerning first=78 second=117 amount=1 +kerning first=78 second=58 amount=1 +kerning first=78 second=34 amount=1 +kerning first=78 second=39 amount=1 +kerning first=78 second=46 amount=1 +kerning first=86 second=87 amount=1 +kerning first=86 second=81 amount=-1 +kerning first=86 second=88 amount=1 +kerning first=86 second=89 amount=1 +kerning first=86 second=90 amount=-1 +kerning first=86 second=65 amount=-3 +kerning first=86 second=75 amount=1 +kerning first=86 second=52 amount=-2 +kerning first=86 second=78 amount=1 +kerning first=86 second=86 amount=1 +kerning first=86 second=53 amount=-1 +kerning first=86 second=83 amount=-1 +kerning first=86 second=85 amount=1 +kerning first=86 second=51 amount=-2 +kerning first=86 second=66 amount=1 +kerning first=86 second=68 amount=1 +kerning first=86 second=80 amount=1 +kerning first=86 second=104 amount=1 +kerning first=86 second=54 amount=-2 +kerning first=86 second=57 amount=-1 +kerning first=86 second=48 amount=-1 +kerning first=86 second=74 amount=-2 +kerning first=86 second=76 amount=1 +kerning first=86 second=102 amount=-1 +kerning first=86 second=56 amount=-1 +kerning first=86 second=69 amount=1 +kerning first=86 second=93 amount=1 +kerning first=86 second=49 amount=-2 +kerning first=86 second=41 amount=1 +kerning first=86 second=108 amount=1 +kerning first=86 second=64 amount=-3 +kerning first=86 second=82 amount=1 +kerning first=86 second=50 amount=-2 +kerning first=86 second=47 amount=-3 +kerning first=86 second=92 amount=1 +kerning first=86 second=107 amount=1 +kerning first=86 second=73 amount=1 +kerning first=86 second=105 amount=1 +kerning first=86 second=33 amount=1 +kerning first=86 second=98 amount=1 +kerning first=86 second=100 amount=-2 +kerning first=86 second=112 amount=-1 +kerning first=86 second=113 amount=-2 +kerning first=86 second=103 amount=-2 +kerning first=86 second=59 amount=-1 +kerning first=86 second=109 amount=-1 +kerning first=86 second=122 amount=-2 +kerning first=86 second=97 amount=-1 +kerning first=86 second=110 amount=-1 +kerning first=86 second=111 amount=-2 +kerning first=86 second=114 amount=-1 +kerning first=86 second=120 amount=-1 +kerning first=86 second=99 amount=-2 +kerning first=86 second=101 amount=-2 +kerning first=86 second=115 amount=-2 +kerning first=86 second=117 amount=-1 +kerning first=86 second=58 amount=-2 +kerning first=86 second=35 amount=-1 +kerning first=86 second=34 amount=2 +kerning first=86 second=39 amount=2 +kerning first=86 second=44 amount=-3 +kerning first=86 second=46 amount=-3 +kerning first=86 second=45 amount=-2 +kerning first=53 second=81 amount=-1 +kerning first=53 second=90 amount=-1 +kerning first=53 second=65 amount=-3 +kerning first=53 second=86 amount=1 +kerning first=53 second=71 amount=-1 +kerning first=53 second=79 amount=-1 +kerning first=53 second=83 amount=-1 +kerning first=53 second=74 amount=-1 +kerning first=53 second=63 amount=-1 +kerning first=53 second=64 amount=-2 +kerning first=53 second=47 amount=-3 +kerning first=53 second=100 amount=-1 +kerning first=53 second=112 amount=-1 +kerning first=53 second=113 amount=-1 +kerning first=53 second=103 amount=-1 +kerning first=53 second=59 amount=-1 +kerning first=53 second=109 amount=-1 +kerning first=53 second=122 amount=-1 +kerning first=53 second=97 amount=-1 +kerning first=53 second=110 amount=-1 +kerning first=53 second=111 amount=-1 +kerning first=53 second=114 amount=-1 +kerning first=53 second=120 amount=-1 +kerning first=53 second=99 amount=-1 +kerning first=53 second=101 amount=-1 +kerning first=53 second=115 amount=-1 +kerning first=53 second=117 amount=-1 +kerning first=53 second=58 amount=-1 +kerning first=53 second=35 amount=-1 +kerning first=53 second=34 amount=1 +kerning first=53 second=39 amount=1 +kerning first=53 second=44 amount=-4 +kerning first=53 second=46 amount=-3 +kerning first=53 second=45 amount=-1 +kerning first=71 second=106 amount=1 +kerning first=71 second=81 amount=1 +kerning first=71 second=72 amount=1 +kerning first=71 second=88 amount=-1 +kerning first=71 second=89 amount=-2 +kerning first=71 second=90 amount=-1 +kerning first=71 second=75 amount=1 +kerning first=71 second=52 amount=1 +kerning first=71 second=86 amount=-1 +kerning first=71 second=53 amount=-1 +kerning first=71 second=71 amount=1 +kerning first=71 second=79 amount=1 +kerning first=71 second=83 amount=-1 +kerning first=71 second=84 amount=-1 +kerning first=71 second=85 amount=1 +kerning first=71 second=51 amount=-1 +kerning first=71 second=55 amount=-2 +kerning first=71 second=66 amount=1 +kerning first=71 second=67 amount=1 +kerning first=71 second=68 amount=1 +kerning first=71 second=80 amount=1 +kerning first=71 second=104 amount=1 +kerning first=71 second=57 amount=-1 +kerning first=71 second=48 amount=1 +kerning first=71 second=74 amount=1 +kerning first=71 second=76 amount=1 +kerning first=71 second=102 amount=1 +kerning first=71 second=56 amount=-1 +kerning first=71 second=63 amount=-1 +kerning first=71 second=69 amount=1 +kerning first=71 second=70 amount=1 +kerning first=71 second=93 amount=-2 +kerning first=71 second=49 amount=-3 +kerning first=71 second=40 amount=1 +kerning first=71 second=108 amount=1 +kerning first=71 second=64 amount=1 +kerning first=71 second=82 amount=1 +kerning first=71 second=50 amount=-2 +kerning first=71 second=47 amount=-1 +kerning first=71 second=92 amount=-2 +kerning first=71 second=107 amount=1 +kerning first=71 second=73 amount=1 +kerning first=71 second=105 amount=1 +kerning first=71 second=33 amount=1 +kerning first=71 second=121 amount=1 +kerning first=71 second=98 amount=1 +kerning first=71 second=100 amount=1 +kerning first=71 second=112 amount=1 +kerning first=71 second=113 amount=1 +kerning first=71 second=103 amount=1 +kerning first=71 second=116 amount=1 +kerning first=71 second=119 amount=2 +kerning first=71 second=109 amount=1 +kerning first=71 second=118 amount=1 +kerning first=71 second=122 amount=-1 +kerning first=71 second=97 amount=1 +kerning first=71 second=110 amount=1 +kerning first=71 second=111 amount=2 +kerning first=71 second=114 amount=1 +kerning first=71 second=99 amount=1 +kerning first=71 second=101 amount=1 +kerning first=71 second=115 amount=1 +kerning first=71 second=117 amount=1 +kerning first=71 second=35 amount=1 +kerning first=71 second=34 amount=-1 +kerning first=71 second=39 amount=-1 +kerning first=71 second=44 amount=-3 +kerning first=71 second=46 amount=-2 +kerning first=71 second=45 amount=2 +kerning first=79 second=106 amount=1 +kerning first=79 second=81 amount=1 +kerning first=79 second=72 amount=1 +kerning first=79 second=88 amount=-1 +kerning first=79 second=89 amount=-1 +kerning first=79 second=65 amount=-1 +kerning first=79 second=71 amount=1 +kerning first=79 second=79 amount=1 +kerning first=79 second=51 amount=-1 +kerning first=79 second=55 amount=-1 +kerning first=79 second=67 amount=1 +kerning first=79 second=57 amount=-1 +kerning first=79 second=102 amount=1 +kerning first=79 second=56 amount=-1 +kerning first=79 second=93 amount=-1 +kerning first=79 second=49 amount=-2 +kerning first=79 second=40 amount=1 +kerning first=79 second=41 amount=-1 +kerning first=79 second=108 amount=1 +kerning first=79 second=50 amount=-1 +kerning first=79 second=47 amount=-1 +kerning first=79 second=92 amount=-1 +kerning first=79 second=107 amount=1 +kerning first=79 second=105 amount=1 +kerning first=79 second=33 amount=1 +kerning first=79 second=121 amount=1 +kerning first=79 second=100 amount=1 +kerning first=79 second=112 amount=1 +kerning first=79 second=113 amount=1 +kerning first=79 second=103 amount=1 +kerning first=79 second=116 amount=2 +kerning first=79 second=59 amount=1 +kerning first=79 second=119 amount=2 +kerning first=79 second=118 amount=2 +kerning first=79 second=97 amount=1 +kerning first=79 second=110 amount=1 +kerning first=79 second=111 amount=1 +kerning first=79 second=114 amount=1 +kerning first=79 second=120 amount=1 +kerning first=79 second=99 amount=1 +kerning first=79 second=101 amount=1 +kerning first=79 second=117 amount=1 +kerning first=79 second=35 amount=1 +kerning first=79 second=44 amount=-1 +kerning first=79 second=45 amount=1 +kerning first=83 second=106 amount=1 +kerning first=83 second=88 amount=1 +kerning first=83 second=89 amount=-1 +kerning first=83 second=90 amount=1 +kerning first=83 second=53 amount=1 +kerning first=83 second=71 amount=1 +kerning first=83 second=83 amount=1 +kerning first=83 second=67 amount=1 +kerning first=83 second=104 amount=1 +kerning first=83 second=74 amount=1 +kerning first=83 second=49 amount=-2 +kerning first=83 second=40 amount=1 +kerning first=83 second=41 amount=1 +kerning first=83 second=108 amount=1 +kerning first=83 second=107 amount=1 +kerning first=83 second=105 amount=1 +kerning first=83 second=33 amount=1 +kerning first=83 second=121 amount=1 +kerning first=83 second=98 amount=1 +kerning first=83 second=100 amount=1 +kerning first=83 second=112 amount=1 +kerning first=83 second=113 amount=1 +kerning first=83 second=103 amount=1 +kerning first=83 second=116 amount=-1 +kerning first=83 second=119 amount=1 +kerning first=83 second=118 amount=1 +kerning first=83 second=122 amount=1 +kerning first=83 second=97 amount=1 +kerning first=83 second=110 amount=1 +kerning first=83 second=111 amount=1 +kerning first=83 second=114 amount=1 +kerning first=83 second=120 amount=1 +kerning first=83 second=99 amount=1 +kerning first=83 second=101 amount=1 +kerning first=83 second=115 amount=1 +kerning first=83 second=117 amount=1 +kerning first=83 second=46 amount=1 +kerning first=84 second=87 amount=1 +kerning first=84 second=81 amount=-1 +kerning first=84 second=88 amount=1 +kerning first=84 second=90 amount=-1 +kerning first=84 second=65 amount=-3 +kerning first=84 second=75 amount=1 +kerning first=84 second=52 amount=-3 +kerning first=84 second=86 amount=1 +kerning first=84 second=53 amount=-1 +kerning first=84 second=83 amount=-1 +kerning first=84 second=85 amount=1 +kerning first=84 second=51 amount=-2 +kerning first=84 second=66 amount=1 +kerning first=84 second=80 amount=1 +kerning first=84 second=54 amount=-2 +kerning first=84 second=57 amount=-1 +kerning first=84 second=48 amount=-1 +kerning first=84 second=74 amount=-3 +kerning first=84 second=76 amount=1 +kerning first=84 second=102 amount=-1 +kerning first=84 second=56 amount=-1 +kerning first=84 second=93 amount=1 +kerning first=84 second=49 amount=-2 +kerning first=84 second=108 amount=1 +kerning first=84 second=64 amount=-4 +kerning first=84 second=82 amount=1 +kerning first=84 second=50 amount=-2 +kerning first=84 second=47 amount=-3 +kerning first=84 second=92 amount=1 +kerning first=84 second=107 amount=1 +kerning first=84 second=73 amount=1 +kerning first=84 second=33 amount=1 +kerning first=84 second=121 amount=-3 +kerning first=84 second=98 amount=1 +kerning first=84 second=100 amount=-3 +kerning first=84 second=112 amount=-3 +kerning first=84 second=113 amount=-3 +kerning first=84 second=103 amount=-3 +kerning first=84 second=116 amount=-2 +kerning first=84 second=59 amount=-2 +kerning first=84 second=119 amount=-2 +kerning first=84 second=109 amount=-3 +kerning first=84 second=118 amount=-2 +kerning first=84 second=122 amount=-3 +kerning first=84 second=97 amount=-3 +kerning first=84 second=110 amount=-3 +kerning first=84 second=111 amount=-3 +kerning first=84 second=114 amount=-3 +kerning first=84 second=120 amount=-2 +kerning first=84 second=99 amount=-3 +kerning first=84 second=101 amount=-3 +kerning first=84 second=115 amount=-3 +kerning first=84 second=117 amount=-3 +kerning first=84 second=58 amount=-3 +kerning first=84 second=35 amount=-2 +kerning first=84 second=34 amount=1 +kerning first=84 second=39 amount=1 +kerning first=84 second=44 amount=-2 +kerning first=84 second=46 amount=-2 +kerning first=84 second=45 amount=-3 +kerning first=85 second=106 amount=1 +kerning first=85 second=87 amount=1 +kerning first=85 second=88 amount=1 +kerning first=85 second=89 amount=1 +kerning first=85 second=65 amount=-1 +kerning first=85 second=75 amount=1 +kerning first=85 second=86 amount=1 +kerning first=85 second=71 amount=1 +kerning first=85 second=84 amount=1 +kerning first=85 second=85 amount=1 +kerning first=85 second=51 amount=-1 +kerning first=85 second=66 amount=1 +kerning first=85 second=67 amount=1 +kerning first=85 second=68 amount=1 +kerning first=85 second=80 amount=1 +kerning first=85 second=54 amount=-1 +kerning first=85 second=57 amount=-1 +kerning first=85 second=76 amount=1 +kerning first=85 second=102 amount=1 +kerning first=85 second=56 amount=-1 +kerning first=85 second=63 amount=1 +kerning first=85 second=93 amount=1 +kerning first=85 second=49 amount=-2 +kerning first=85 second=40 amount=1 +kerning first=85 second=41 amount=1 +kerning first=85 second=108 amount=1 +kerning first=85 second=82 amount=1 +kerning first=85 second=50 amount=-1 +kerning first=85 second=47 amount=-1 +kerning first=85 second=92 amount=1 +kerning first=85 second=107 amount=1 +kerning first=85 second=73 amount=1 +kerning first=85 second=105 amount=1 +kerning first=85 second=33 amount=1 +kerning first=85 second=121 amount=1 +kerning first=85 second=98 amount=1 +kerning first=85 second=112 amount=1 +kerning first=85 second=116 amount=1 +kerning first=85 second=119 amount=2 +kerning first=85 second=118 amount=1 +kerning first=85 second=97 amount=1 +kerning first=85 second=110 amount=1 +kerning first=85 second=114 amount=1 +kerning first=85 second=120 amount=1 +kerning first=85 second=117 amount=1 +kerning first=85 second=34 amount=1 +kerning first=85 second=39 amount=1 +kerning first=85 second=44 amount=-2 +kerning first=85 second=46 amount=-1 +kerning first=51 second=77 amount=-1 +kerning first=51 second=89 amount=-1 +kerning first=51 second=90 amount=-2 +kerning first=51 second=65 amount=-2 +kerning first=51 second=75 amount=-1 +kerning first=51 second=78 amount=-1 +kerning first=51 second=83 amount=-1 +kerning first=51 second=84 amount=-1 +kerning first=51 second=68 amount=-1 +kerning first=51 second=74 amount=-1 +kerning first=51 second=76 amount=-1 +kerning first=51 second=63 amount=-1 +kerning first=51 second=70 amount=-1 +kerning first=51 second=93 amount=-1 +kerning first=51 second=41 amount=-1 +kerning first=51 second=64 amount=-1 +kerning first=51 second=47 amount=-3 +kerning first=51 second=92 amount=-1 +kerning first=51 second=59 amount=-1 +kerning first=51 second=109 amount=-1 +kerning first=51 second=122 amount=-2 +kerning first=51 second=120 amount=-1 +kerning first=51 second=58 amount=-1 +kerning first=51 second=44 amount=-4 +kerning first=51 second=46 amount=-3 +kerning first=55 second=106 amount=-1 +kerning first=55 second=81 amount=-2 +kerning first=55 second=72 amount=-1 +kerning first=55 second=77 amount=-1 +kerning first=55 second=89 amount=-1 +kerning first=55 second=90 amount=-2 +kerning first=55 second=65 amount=-4 +kerning first=55 second=78 amount=-1 +kerning first=55 second=71 amount=-1 +kerning first=55 second=79 amount=-1 +kerning first=55 second=83 amount=-2 +kerning first=55 second=67 amount=-1 +kerning first=55 second=68 amount=-1 +kerning first=55 second=104 amount=-1 +kerning first=55 second=74 amount=-3 +kerning first=55 second=102 amount=-2 +kerning first=55 second=63 amount=-1 +kerning first=55 second=69 amount=-1 +kerning first=55 second=70 amount=-1 +kerning first=55 second=40 amount=-1 +kerning first=55 second=64 amount=-5 +kerning first=55 second=47 amount=-5 +kerning first=55 second=105 amount=-1 +kerning first=55 second=121 amount=-2 +kerning first=55 second=100 amount=-4 +kerning first=55 second=112 amount=-3 +kerning first=55 second=113 amount=-4 +kerning first=55 second=103 amount=-4 +kerning first=55 second=116 amount=-2 +kerning first=55 second=59 amount=-3 +kerning first=55 second=119 amount=-2 +kerning first=55 second=109 amount=-3 +kerning first=55 second=118 amount=-2 +kerning first=55 second=122 amount=-4 +kerning first=55 second=97 amount=-3 +kerning first=55 second=110 amount=-3 +kerning first=55 second=111 amount=-4 +kerning first=55 second=114 amount=-3 +kerning first=55 second=120 amount=-3 +kerning first=55 second=99 amount=-4 +kerning first=55 second=101 amount=-4 +kerning first=55 second=115 amount=-4 +kerning first=55 second=117 amount=-3 +kerning first=55 second=58 amount=-4 +kerning first=55 second=35 amount=-3 +kerning first=55 second=39 amount=1 +kerning first=55 second=44 amount=-5 +kerning first=55 second=46 amount=-6 +kerning first=55 second=45 amount=-4 +kerning first=66 second=72 amount=1 +kerning first=66 second=89 amount=-1 +kerning first=66 second=90 amount=-1 +kerning first=66 second=65 amount=-1 +kerning first=66 second=53 amount=-1 +kerning first=66 second=71 amount=1 +kerning first=66 second=51 amount=-2 +kerning first=66 second=55 amount=-1 +kerning first=66 second=67 amount=1 +kerning first=66 second=57 amount=-1 +kerning first=66 second=56 amount=-1 +kerning first=66 second=49 amount=-3 +kerning first=66 second=40 amount=1 +kerning first=66 second=41 amount=-1 +kerning first=66 second=108 amount=1 +kerning first=66 second=50 amount=-2 +kerning first=66 second=47 amount=-2 +kerning first=66 second=107 amount=1 +kerning first=66 second=105 amount=1 +kerning first=66 second=33 amount=1 +kerning first=66 second=100 amount=1 +kerning first=66 second=113 amount=1 +kerning first=66 second=103 amount=1 +kerning first=66 second=116 amount=1 +kerning first=66 second=119 amount=1 +kerning first=66 second=122 amount=-1 +kerning first=66 second=110 amount=1 +kerning first=66 second=111 amount=1 +kerning first=66 second=114 amount=1 +kerning first=66 second=99 amount=1 +kerning first=66 second=101 amount=1 +kerning first=66 second=117 amount=1 +kerning first=66 second=35 amount=1 +kerning first=66 second=44 amount=-3 +kerning first=66 second=46 amount=-2 +kerning first=66 second=45 amount=1 +kerning first=67 second=106 amount=1 +kerning first=67 second=81 amount=1 +kerning first=67 second=88 amount=-1 +kerning first=67 second=89 amount=-1 +kerning first=67 second=52 amount=1 +kerning first=67 second=71 amount=1 +kerning first=67 second=79 amount=1 +kerning first=67 second=83 amount=1 +kerning first=67 second=85 amount=1 +kerning first=67 second=51 amount=-1 +kerning first=67 second=55 amount=-1 +kerning first=67 second=66 amount=1 +kerning first=67 second=67 amount=1 +kerning first=67 second=80 amount=1 +kerning first=67 second=104 amount=1 +kerning first=67 second=74 amount=1 +kerning first=67 second=102 amount=1 +kerning first=67 second=56 amount=-1 +kerning first=67 second=69 amount=1 +kerning first=67 second=93 amount=-1 +kerning first=67 second=49 amount=-2 +kerning first=67 second=40 amount=1 +kerning first=67 second=108 amount=1 +kerning first=67 second=64 amount=1 +kerning first=67 second=50 amount=-1 +kerning first=67 second=47 amount=-1 +kerning first=67 second=92 amount=-1 +kerning first=67 second=107 amount=1 +kerning first=67 second=73 amount=1 +kerning first=67 second=105 amount=1 +kerning first=67 second=33 amount=1 +kerning first=67 second=121 amount=1 +kerning first=67 second=98 amount=1 +kerning first=67 second=100 amount=1 +kerning first=67 second=112 amount=1 +kerning first=67 second=113 amount=1 +kerning first=67 second=103 amount=1 +kerning first=67 second=116 amount=1 +kerning first=67 second=119 amount=2 +kerning first=67 second=109 amount=1 +kerning first=67 second=118 amount=2 +kerning first=67 second=97 amount=1 +kerning first=67 second=110 amount=1 +kerning first=67 second=111 amount=1 +kerning first=67 second=114 amount=1 +kerning first=67 second=120 amount=1 +kerning first=67 second=99 amount=1 +kerning first=67 second=101 amount=1 +kerning first=67 second=117 amount=1 +kerning first=67 second=35 amount=1 +kerning first=67 second=34 amount=1 +kerning first=67 second=39 amount=1 +kerning first=67 second=44 amount=-1 +kerning first=68 second=106 amount=1 +kerning first=68 second=87 amount=1 +kerning first=68 second=90 amount=-1 +kerning first=68 second=65 amount=-2 +kerning first=68 second=75 amount=1 +kerning first=68 second=52 amount=-1 +kerning first=68 second=86 amount=1 +kerning first=68 second=53 amount=-1 +kerning first=68 second=84 amount=1 +kerning first=68 second=85 amount=1 +kerning first=68 second=66 amount=1 +kerning first=68 second=67 amount=1 +kerning first=68 second=80 amount=1 +kerning first=68 second=104 amount=1 +kerning first=68 second=54 amount=-1 +kerning first=68 second=74 amount=-1 +kerning first=68 second=102 amount=1 +kerning first=68 second=63 amount=1 +kerning first=68 second=49 amount=-2 +kerning first=68 second=40 amount=1 +kerning first=68 second=108 amount=1 +kerning first=68 second=64 amount=-1 +kerning first=68 second=82 amount=1 +kerning first=68 second=50 amount=-1 +kerning first=68 second=47 amount=-3 +kerning first=68 second=107 amount=1 +kerning first=68 second=73 amount=1 +kerning first=68 second=105 amount=1 +kerning first=68 second=33 amount=1 +kerning first=68 second=121 amount=1 +kerning first=68 second=98 amount=1 +kerning first=68 second=112 amount=1 +kerning first=68 second=116 amount=1 +kerning first=68 second=119 amount=1 +kerning first=68 second=118 amount=1 +kerning first=68 second=110 amount=1 +kerning first=68 second=114 amount=1 +kerning first=68 second=120 amount=1 +kerning first=68 second=101 amount=-1 +kerning first=68 second=117 amount=1 +kerning first=68 second=34 amount=1 +kerning first=68 second=39 amount=1 +kerning first=68 second=44 amount=-4 +kerning first=68 second=46 amount=-3 +kerning first=80 second=106 amount=1 +kerning first=80 second=87 amount=1 +kerning first=80 second=72 amount=1 +kerning first=80 second=77 amount=1 +kerning first=80 second=88 amount=1 +kerning first=80 second=89 amount=1 +kerning first=80 second=65 amount=-2 +kerning first=80 second=75 amount=1 +kerning first=80 second=52 amount=-2 +kerning first=80 second=78 amount=1 +kerning first=80 second=86 amount=1 +kerning first=80 second=71 amount=1 +kerning first=80 second=79 amount=1 +kerning first=80 second=84 amount=1 +kerning first=80 second=85 amount=1 +kerning first=80 second=66 amount=1 +kerning first=80 second=67 amount=1 +kerning first=80 second=68 amount=1 +kerning first=80 second=80 amount=1 +kerning first=80 second=104 amount=1 +kerning first=80 second=54 amount=-1 +kerning first=80 second=74 amount=-3 +kerning first=80 second=76 amount=1 +kerning first=80 second=63 amount=1 +kerning first=80 second=69 amount=1 +kerning first=80 second=70 amount=1 +kerning first=80 second=93 amount=1 +kerning first=80 second=49 amount=-1 +kerning first=80 second=40 amount=1 +kerning first=80 second=41 amount=1 +kerning first=80 second=108 amount=1 +kerning first=80 second=64 amount=-2 +kerning first=80 second=82 amount=1 +kerning first=80 second=50 amount=-1 +kerning first=80 second=47 amount=-4 +kerning first=80 second=92 amount=1 +kerning first=80 second=107 amount=1 +kerning first=80 second=73 amount=1 +kerning first=80 second=105 amount=1 +kerning first=80 second=33 amount=1 +kerning first=80 second=121 amount=1 +kerning first=80 second=98 amount=1 +kerning first=80 second=100 amount=-1 +kerning first=80 second=113 amount=-1 +kerning first=80 second=103 amount=-1 +kerning first=80 second=116 amount=1 +kerning first=80 second=119 amount=1 +kerning first=80 second=118 amount=1 +kerning first=80 second=122 amount=-1 +kerning first=80 second=111 amount=-1 +kerning first=80 second=99 amount=-1 +kerning first=80 second=101 amount=-1 +kerning first=80 second=115 amount=-1 +kerning first=80 second=58 amount=-1 +kerning first=80 second=34 amount=2 +kerning first=80 second=39 amount=2 +kerning first=80 second=44 amount=-4 +kerning first=80 second=46 amount=-4 +kerning first=80 second=45 amount=-2 +kerning first=104 second=106 amount=1 +kerning first=104 second=52 amount=1 +kerning first=104 second=102 amount=1 +kerning first=104 second=63 amount=-1 +kerning first=104 second=49 amount=-3 +kerning first=104 second=40 amount=1 +kerning first=104 second=108 amount=1 +kerning first=104 second=64 amount=1 +kerning first=104 second=92 amount=-3 +kerning first=104 second=107 amount=1 +kerning first=104 second=105 amount=1 +kerning first=104 second=33 amount=1 +kerning first=104 second=121 amount=1 +kerning first=104 second=98 amount=1 +kerning first=104 second=100 amount=1 +kerning first=104 second=112 amount=1 +kerning first=104 second=113 amount=1 +kerning first=104 second=103 amount=1 +kerning first=104 second=116 amount=1 +kerning first=104 second=59 amount=1 +kerning first=104 second=119 amount=1 +kerning first=104 second=109 amount=1 +kerning first=104 second=118 amount=1 +kerning first=104 second=122 amount=1 +kerning first=104 second=97 amount=1 +kerning first=104 second=110 amount=1 +kerning first=104 second=111 amount=1 +kerning first=104 second=114 amount=1 +kerning first=104 second=120 amount=1 +kerning first=104 second=99 amount=1 +kerning first=104 second=101 amount=1 +kerning first=104 second=115 amount=1 +kerning first=104 second=117 amount=1 +kerning first=104 second=58 amount=1 +kerning first=104 second=35 amount=1 +kerning first=104 second=34 amount=-2 +kerning first=104 second=39 amount=-2 +kerning first=104 second=46 amount=1 +kerning first=104 second=45 amount=1 +kerning first=54 second=106 amount=-1 +kerning first=54 second=87 amount=-1 +kerning first=54 second=81 amount=-1 +kerning first=54 second=72 amount=-1 +kerning first=54 second=77 amount=-1 +kerning first=54 second=88 amount=-2 +kerning first=54 second=89 amount=-2 +kerning first=54 second=90 amount=-1 +kerning first=54 second=65 amount=-2 +kerning first=54 second=75 amount=-1 +kerning first=54 second=78 amount=-1 +kerning first=54 second=86 amount=-1 +kerning first=54 second=79 amount=-1 +kerning first=54 second=83 amount=-1 +kerning first=54 second=66 amount=-1 +kerning first=54 second=68 amount=-1 +kerning first=54 second=80 amount=-1 +kerning first=54 second=104 amount=-1 +kerning first=54 second=74 amount=-1 +kerning first=54 second=76 amount=-1 +kerning first=54 second=102 amount=-1 +kerning first=54 second=69 amount=-1 +kerning first=54 second=70 amount=-1 +kerning first=54 second=93 amount=-1 +kerning first=54 second=40 amount=-1 +kerning first=54 second=41 amount=-1 +kerning first=54 second=64 amount=-1 +kerning first=54 second=82 amount=-1 +kerning first=54 second=47 amount=-2 +kerning first=54 second=92 amount=-2 +kerning first=54 second=73 amount=-1 +kerning first=54 second=121 amount=-1 +kerning first=54 second=98 amount=-1 +kerning first=54 second=100 amount=-1 +kerning first=54 second=112 amount=-1 +kerning first=54 second=113 amount=-1 +kerning first=54 second=59 amount=-1 +kerning first=54 second=109 amount=-1 +kerning first=54 second=118 amount=-1 +kerning first=54 second=122 amount=-2 +kerning first=54 second=97 amount=-1 +kerning first=54 second=110 amount=-1 +kerning first=54 second=114 amount=-1 +kerning first=54 second=120 amount=-1 +kerning first=54 second=101 amount=-1 +kerning first=54 second=115 amount=-1 +kerning first=54 second=58 amount=-2 +kerning first=54 second=35 amount=-1 +kerning first=54 second=44 amount=-2 +kerning first=54 second=46 amount=-1 +kerning first=54 second=45 amount=-1 +kerning first=57 second=87 amount=-1 +kerning first=57 second=81 amount=-1 +kerning first=57 second=77 amount=-1 +kerning first=57 second=88 amount=-2 +kerning first=57 second=89 amount=-2 +kerning first=57 second=90 amount=-1 +kerning first=57 second=65 amount=-2 +kerning first=57 second=75 amount=-1 +kerning first=57 second=78 amount=-1 +kerning first=57 second=86 amount=-2 +kerning first=57 second=79 amount=-1 +kerning first=57 second=83 amount=-1 +kerning first=57 second=84 amount=-1 +kerning first=57 second=85 amount=-1 +kerning first=57 second=66 amount=-1 +kerning first=57 second=68 amount=-1 +kerning first=57 second=80 amount=-1 +kerning first=57 second=104 amount=-1 +kerning first=57 second=74 amount=-1 +kerning first=57 second=76 amount=-1 +kerning first=57 second=63 amount=-1 +kerning first=57 second=69 amount=-1 +kerning first=57 second=70 amount=-1 +kerning first=57 second=93 amount=-2 +kerning first=57 second=41 amount=-2 +kerning first=57 second=64 amount=-1 +kerning first=57 second=82 amount=-1 +kerning first=57 second=47 amount=-2 +kerning first=57 second=92 amount=-2 +kerning first=57 second=73 amount=-1 +kerning first=57 second=98 amount=-1 +kerning first=57 second=100 amount=-1 +kerning first=57 second=116 amount=1 +kerning first=57 second=59 amount=-1 +kerning first=57 second=119 amount=1 +kerning first=57 second=109 amount=-1 +kerning first=57 second=118 amount=1 +kerning first=57 second=122 amount=-1 +kerning first=57 second=101 amount=-1 +kerning first=57 second=115 amount=-1 +kerning first=57 second=58 amount=-1 +kerning first=57 second=34 amount=-1 +kerning first=57 second=44 amount=-3 +kerning first=57 second=46 amount=-2 +kerning first=48 second=87 amount=-1 +kerning first=48 second=77 amount=-1 +kerning first=48 second=88 amount=-1 +kerning first=48 second=89 amount=-2 +kerning first=48 second=90 amount=-1 +kerning first=48 second=65 amount=-2 +kerning first=48 second=75 amount=-1 +kerning first=48 second=78 amount=-1 +kerning first=48 second=86 amount=-1 +kerning first=48 second=84 amount=-1 +kerning first=48 second=85 amount=-1 +kerning first=48 second=66 amount=-1 +kerning first=48 second=68 amount=-1 +kerning first=48 second=80 amount=-1 +kerning first=48 second=104 amount=-1 +kerning first=48 second=74 amount=-1 +kerning first=48 second=76 amount=-1 +kerning first=48 second=63 amount=-1 +kerning first=48 second=69 amount=-1 +kerning first=48 second=70 amount=-1 +kerning first=48 second=93 amount=-2 +kerning first=48 second=41 amount=-1 +kerning first=48 second=64 amount=-1 +kerning first=48 second=82 amount=-1 +kerning first=48 second=47 amount=-1 +kerning first=48 second=92 amount=-2 +kerning first=48 second=73 amount=-1 +kerning first=48 second=116 amount=1 +kerning first=48 second=119 amount=1 +kerning first=48 second=109 amount=-1 +kerning first=48 second=118 amount=1 +kerning first=48 second=122 amount=-1 +kerning first=48 second=115 amount=-1 +kerning first=48 second=58 amount=-1 +kerning first=48 second=34 amount=-1 +kerning first=48 second=39 amount=-1 +kerning first=48 second=44 amount=-2 +kerning first=48 second=46 amount=-1 +kerning first=74 second=106 amount=1 +kerning first=74 second=87 amount=1 +kerning first=74 second=72 amount=1 +kerning first=74 second=77 amount=1 +kerning first=74 second=88 amount=1 +kerning first=74 second=89 amount=1 +kerning first=74 second=75 amount=1 +kerning first=74 second=78 amount=1 +kerning first=74 second=86 amount=1 +kerning first=74 second=71 amount=1 +kerning first=74 second=84 amount=1 +kerning first=74 second=85 amount=1 +kerning first=74 second=51 amount=-1 +kerning first=74 second=66 amount=1 +kerning first=74 second=67 amount=1 +kerning first=74 second=68 amount=1 +kerning first=74 second=80 amount=1 +kerning first=74 second=104 amount=1 +kerning first=74 second=54 amount=-1 +kerning first=74 second=57 amount=-1 +kerning first=74 second=76 amount=1 +kerning first=74 second=102 amount=1 +kerning first=74 second=56 amount=-1 +kerning first=74 second=63 amount=1 +kerning first=74 second=69 amount=1 +kerning first=74 second=93 amount=1 +kerning first=74 second=49 amount=-2 +kerning first=74 second=41 amount=1 +kerning first=74 second=108 amount=1 +kerning first=74 second=82 amount=1 +kerning first=74 second=92 amount=1 +kerning first=74 second=107 amount=1 +kerning first=74 second=73 amount=1 +kerning first=74 second=105 amount=1 +kerning first=74 second=33 amount=1 +kerning first=74 second=121 amount=1 +kerning first=74 second=98 amount=1 +kerning first=74 second=116 amount=1 +kerning first=74 second=119 amount=1 +kerning first=74 second=118 amount=1 +kerning first=74 second=97 amount=1 +kerning first=74 second=111 amount=1 +kerning first=74 second=114 amount=1 +kerning first=74 second=120 amount=1 +kerning first=74 second=115 amount=1 +kerning first=74 second=34 amount=1 +kerning first=74 second=39 amount=1 +kerning first=76 second=106 amount=1 +kerning first=76 second=87 amount=-2 +kerning first=76 second=88 amount=1 +kerning first=76 second=89 amount=-3 +kerning first=76 second=90 amount=1 +kerning first=76 second=52 amount=-1 +kerning first=76 second=86 amount=-2 +kerning first=76 second=53 amount=1 +kerning first=76 second=83 amount=1 +kerning first=76 second=84 amount=-2 +kerning first=76 second=67 amount=1 +kerning first=76 second=104 amount=1 +kerning first=76 second=54 amount=-1 +kerning first=76 second=102 amount=-1 +kerning first=76 second=63 amount=-2 +kerning first=76 second=49 amount=-3 +kerning first=76 second=41 amount=1 +kerning first=76 second=108 amount=1 +kerning first=76 second=47 amount=1 +kerning first=76 second=92 amount=-4 +kerning first=76 second=107 amount=1 +kerning first=76 second=105 amount=1 +kerning first=76 second=33 amount=1 +kerning first=76 second=121 amount=-1 +kerning first=76 second=98 amount=1 +kerning first=76 second=100 amount=1 +kerning first=76 second=112 amount=1 +kerning first=76 second=113 amount=1 +kerning first=76 second=103 amount=1 +kerning first=76 second=116 amount=-1 +kerning first=76 second=59 amount=1 +kerning first=76 second=122 amount=1 +kerning first=76 second=97 amount=1 +kerning first=76 second=110 amount=1 +kerning first=76 second=111 amount=1 +kerning first=76 second=114 amount=1 +kerning first=76 second=120 amount=1 +kerning first=76 second=99 amount=1 +kerning first=76 second=101 amount=1 +kerning first=76 second=115 amount=1 +kerning first=76 second=117 amount=1 +kerning first=76 second=58 amount=1 +kerning first=76 second=35 amount=-4 +kerning first=76 second=34 amount=-3 +kerning first=76 second=39 amount=-3 +kerning first=76 second=44 amount=1 +kerning first=76 second=46 amount=1 +kerning first=76 second=45 amount=-4 +kerning first=102 second=106 amount=2 +kerning first=102 second=53 amount=1 +kerning first=102 second=55 amount=-1 +kerning first=102 second=104 amount=1 +kerning first=102 second=54 amount=1 +kerning first=102 second=57 amount=1 +kerning first=102 second=48 amount=1 +kerning first=102 second=102 amount=2 +kerning first=102 second=93 amount=1 +kerning first=102 second=49 amount=-2 +kerning first=102 second=40 amount=2 +kerning first=102 second=41 amount=1 +kerning first=102 second=108 amount=2 +kerning first=102 second=50 amount=-1 +kerning first=102 second=47 amount=-1 +kerning first=102 second=92 amount=1 +kerning first=102 second=107 amount=2 +kerning first=102 second=105 amount=2 +kerning first=102 second=33 amount=2 +kerning first=102 second=121 amount=2 +kerning first=102 second=98 amount=1 +kerning first=102 second=100 amount=1 +kerning first=102 second=112 amount=2 +kerning first=102 second=113 amount=1 +kerning first=102 second=103 amount=1 +kerning first=102 second=116 amount=2 +kerning first=102 second=59 amount=1 +kerning first=102 second=119 amount=3 +kerning first=102 second=109 amount=1 +kerning first=102 second=118 amount=3 +kerning first=102 second=122 amount=1 +kerning first=102 second=97 amount=2 +kerning first=102 second=110 amount=2 +kerning first=102 second=111 amount=1 +kerning first=102 second=114 amount=2 +kerning first=102 second=120 amount=2 +kerning first=102 second=99 amount=1 +kerning first=102 second=101 amount=1 +kerning first=102 second=115 amount=1 +kerning first=102 second=117 amount=2 +kerning first=102 second=58 amount=1 +kerning first=102 second=35 amount=2 +kerning first=102 second=34 amount=2 +kerning first=102 second=39 amount=2 +kerning first=102 second=46 amount=-1 +kerning first=102 second=45 amount=-2 +kerning first=56 second=106 amount=-1 +kerning first=56 second=87 amount=-1 +kerning first=56 second=81 amount=-1 +kerning first=56 second=72 amount=-2 +kerning first=56 second=77 amount=-2 +kerning first=56 second=88 amount=-1 +kerning first=56 second=89 amount=-2 +kerning first=56 second=90 amount=-1 +kerning first=56 second=65 amount=-2 +kerning first=56 second=75 amount=-1 +kerning first=56 second=78 amount=-2 +kerning first=56 second=86 amount=-1 +kerning first=56 second=71 amount=-1 +kerning first=56 second=79 amount=-1 +kerning first=56 second=83 amount=-1 +kerning first=56 second=84 amount=-1 +kerning first=56 second=85 amount=-1 +kerning first=56 second=66 amount=-1 +kerning first=56 second=67 amount=-1 +kerning first=56 second=68 amount=-2 +kerning first=56 second=80 amount=-1 +kerning first=56 second=104 amount=-1 +kerning first=56 second=74 amount=-1 +kerning first=56 second=76 amount=-2 +kerning first=56 second=102 amount=-2 +kerning first=56 second=63 amount=-1 +kerning first=56 second=69 amount=-1 +kerning first=56 second=70 amount=-2 +kerning first=56 second=93 amount=-1 +kerning first=56 second=40 amount=-1 +kerning first=56 second=41 amount=-2 +kerning first=56 second=108 amount=-1 +kerning first=56 second=64 amount=-1 +kerning first=56 second=82 amount=-1 +kerning first=56 second=47 amount=-2 +kerning first=56 second=92 amount=-1 +kerning first=56 second=107 amount=-1 +kerning first=56 second=73 amount=-1 +kerning first=56 second=105 amount=-1 +kerning first=56 second=33 amount=-1 +kerning first=56 second=121 amount=-1 +kerning first=56 second=98 amount=-1 +kerning first=56 second=100 amount=-1 +kerning first=56 second=112 amount=-1 +kerning first=56 second=113 amount=-1 +kerning first=56 second=103 amount=-1 +kerning first=56 second=116 amount=-2 +kerning first=56 second=59 amount=-2 +kerning first=56 second=119 amount=-1 +kerning first=56 second=109 amount=-1 +kerning first=56 second=118 amount=-1 +kerning first=56 second=122 amount=-2 +kerning first=56 second=97 amount=-1 +kerning first=56 second=110 amount=-1 +kerning first=56 second=111 amount=-1 +kerning first=56 second=114 amount=-1 +kerning first=56 second=120 amount=-2 +kerning first=56 second=99 amount=-1 +kerning first=56 second=101 amount=-1 +kerning first=56 second=115 amount=-1 +kerning first=56 second=117 amount=-1 +kerning first=56 second=58 amount=-2 +kerning first=56 second=35 amount=-2 +kerning first=56 second=34 amount=-1 +kerning first=56 second=39 amount=-1 +kerning first=56 second=44 amount=-3 +kerning first=56 second=46 amount=-2 +kerning first=56 second=45 amount=-1 +kerning first=63 second=87 amount=1 +kerning first=63 second=88 amount=1 +kerning first=63 second=90 amount=-1 +kerning first=63 second=65 amount=-2 +kerning first=63 second=75 amount=1 +kerning first=63 second=52 amount=-2 +kerning first=63 second=86 amount=1 +kerning first=63 second=53 amount=-1 +kerning first=63 second=84 amount=1 +kerning first=63 second=85 amount=1 +kerning first=63 second=51 amount=-1 +kerning first=63 second=66 amount=1 +kerning first=63 second=80 amount=1 +kerning first=63 second=54 amount=-1 +kerning first=63 second=57 amount=-1 +kerning first=63 second=48 amount=-1 +kerning first=63 second=74 amount=-2 +kerning first=63 second=102 amount=-1 +kerning first=63 second=56 amount=-1 +kerning first=63 second=63 amount=1 +kerning first=63 second=49 amount=-2 +kerning first=63 second=108 amount=1 +kerning first=63 second=64 amount=-3 +kerning first=63 second=82 amount=1 +kerning first=63 second=50 amount=-1 +kerning first=63 second=47 amount=-2 +kerning first=63 second=107 amount=1 +kerning first=63 second=73 amount=1 +kerning first=63 second=105 amount=1 +kerning first=63 second=33 amount=1 +kerning first=63 second=98 amount=1 +kerning first=63 second=100 amount=-2 +kerning first=63 second=113 amount=-1 +kerning first=63 second=103 amount=-1 +kerning first=63 second=59 amount=-1 +kerning first=63 second=119 amount=1 +kerning first=63 second=118 amount=1 +kerning first=63 second=122 amount=-1 +kerning first=63 second=97 amount=-1 +kerning first=63 second=111 amount=-1 +kerning first=63 second=99 amount=-2 +kerning first=63 second=101 amount=-2 +kerning first=63 second=115 amount=-2 +kerning first=63 second=58 amount=-1 +kerning first=63 second=35 amount=-1 +kerning first=63 second=34 amount=1 +kerning first=63 second=39 amount=1 +kerning first=63 second=44 amount=-1 +kerning first=63 second=46 amount=-1 +kerning first=63 second=45 amount=-2 +kerning first=69 second=87 amount=1 +kerning first=69 second=81 amount=-1 +kerning first=69 second=88 amount=1 +kerning first=69 second=90 amount=1 +kerning first=69 second=75 amount=1 +kerning first=69 second=52 amount=-1 +kerning first=69 second=86 amount=1 +kerning first=69 second=85 amount=1 +kerning first=69 second=51 amount=-1 +kerning first=69 second=66 amount=1 +kerning first=69 second=80 amount=1 +kerning first=69 second=54 amount=-1 +kerning first=69 second=57 amount=-1 +kerning first=69 second=48 amount=-1 +kerning first=69 second=74 amount=-1 +kerning first=69 second=76 amount=1 +kerning first=69 second=102 amount=-1 +kerning first=69 second=56 amount=-1 +kerning first=69 second=63 amount=-1 +kerning first=69 second=93 amount=1 +kerning first=69 second=49 amount=-2 +kerning first=69 second=41 amount=1 +kerning first=69 second=108 amount=1 +kerning first=69 second=64 amount=-1 +kerning first=69 second=82 amount=1 +kerning first=69 second=92 amount=1 +kerning first=69 second=107 amount=1 +kerning first=69 second=73 amount=1 +kerning first=69 second=105 amount=1 +kerning first=69 second=33 amount=1 +kerning first=69 second=121 amount=-1 +kerning first=69 second=98 amount=1 +kerning first=69 second=118 amount=-1 +kerning first=69 second=97 amount=1 +kerning first=69 second=120 amount=1 +kerning first=69 second=35 amount=-1 +kerning first=69 second=34 amount=1 +kerning first=69 second=39 amount=1 +kerning first=69 second=46 amount=1 +kerning first=70 second=87 amount=1 +kerning first=70 second=88 amount=1 +kerning first=70 second=90 amount=-1 +kerning first=70 second=65 amount=-2 +kerning first=70 second=75 amount=1 +kerning first=70 second=86 amount=1 +kerning first=70 second=53 amount=-1 +kerning first=70 second=83 amount=-1 +kerning first=70 second=85 amount=1 +kerning first=70 second=51 amount=-2 +kerning first=70 second=66 amount=1 +kerning first=70 second=80 amount=1 +kerning first=70 second=54 amount=-1 +kerning first=70 second=57 amount=-1 +kerning first=70 second=48 amount=-1 +kerning first=70 second=74 amount=-2 +kerning first=70 second=76 amount=1 +kerning first=70 second=56 amount=-1 +kerning first=70 second=63 amount=-1 +kerning first=70 second=93 amount=1 +kerning first=70 second=49 amount=-2 +kerning first=70 second=41 amount=1 +kerning first=70 second=108 amount=1 +kerning first=70 second=64 amount=-1 +kerning first=70 second=82 amount=1 +kerning first=70 second=50 amount=-3 +kerning first=70 second=47 amount=-3 +kerning first=70 second=92 amount=1 +kerning first=70 second=107 amount=1 +kerning first=70 second=73 amount=1 +kerning first=70 second=105 amount=1 +kerning first=70 second=33 amount=1 +kerning first=70 second=98 amount=1 +kerning first=70 second=59 amount=-1 +kerning first=70 second=109 amount=-1 +kerning first=70 second=122 amount=-2 +kerning first=70 second=120 amount=-1 +kerning first=70 second=58 amount=-1 +kerning first=70 second=34 amount=1 +kerning first=70 second=39 amount=1 +kerning first=70 second=44 amount=-3 +kerning first=70 second=46 amount=-3 +kerning first=93 second=106 amount=1 +kerning first=93 second=88 amount=1 +kerning first=93 second=90 amount=1 +kerning first=93 second=65 amount=1 +kerning first=93 second=75 amount=1 +kerning first=93 second=78 amount=1 +kerning first=93 second=86 amount=1 +kerning first=93 second=83 amount=1 +kerning first=93 second=55 amount=1 +kerning first=93 second=66 amount=1 +kerning first=93 second=67 amount=1 +kerning first=93 second=80 amount=1 +kerning first=93 second=104 amount=1 +kerning first=93 second=54 amount=-1 +kerning first=93 second=56 amount=-1 +kerning first=93 second=69 amount=1 +kerning first=93 second=70 amount=1 +kerning first=93 second=49 amount=-3 +kerning first=93 second=41 amount=1 +kerning first=93 second=108 amount=1 +kerning first=93 second=82 amount=1 +kerning first=93 second=50 amount=1 +kerning first=93 second=47 amount=1 +kerning first=93 second=107 amount=1 +kerning first=93 second=73 amount=1 +kerning first=93 second=105 amount=1 +kerning first=93 second=33 amount=1 +kerning first=93 second=121 amount=1 +kerning first=93 second=98 amount=1 +kerning first=93 second=112 amount=1 +kerning first=93 second=103 amount=1 +kerning first=93 second=116 amount=1 +kerning first=93 second=59 amount=1 +kerning first=93 second=119 amount=1 +kerning first=93 second=118 amount=1 +kerning first=93 second=122 amount=1 +kerning first=93 second=97 amount=1 +kerning first=93 second=110 amount=1 +kerning first=93 second=111 amount=1 +kerning first=93 second=114 amount=1 +kerning first=93 second=120 amount=2 +kerning first=93 second=99 amount=1 +kerning first=93 second=115 amount=1 +kerning first=93 second=117 amount=1 +kerning first=93 second=58 amount=1 +kerning first=93 second=34 amount=1 +kerning first=93 second=39 amount=1 +kerning first=93 second=44 amount=1 +kerning first=93 second=46 amount=1 +kerning first=123 second=32 amount=1 +kerning first=125 second=112 amount=1 +kerning first=125 second=109 amount=1 +kerning first=125 second=110 amount=1 +kerning first=125 second=111 amount=1 +kerning first=49 second=106 amount=-3 +kerning first=49 second=87 amount=-3 +kerning first=49 second=81 amount=-4 +kerning first=49 second=72 amount=-4 +kerning first=49 second=77 amount=-4 +kerning first=49 second=88 amount=-3 +kerning first=49 second=89 amount=-4 +kerning first=49 second=90 amount=-3 +kerning first=49 second=65 amount=-3 +kerning first=49 second=75 amount=-3 +kerning first=49 second=78 amount=-3 +kerning first=49 second=86 amount=-3 +kerning first=49 second=71 amount=-4 +kerning first=49 second=79 amount=-4 +kerning first=49 second=83 amount=-3 +kerning first=49 second=84 amount=-4 +kerning first=49 second=85 amount=-4 +kerning first=49 second=66 amount=-3 +kerning first=49 second=67 amount=-4 +kerning first=49 second=68 amount=-4 +kerning first=49 second=80 amount=-3 +kerning first=49 second=104 amount=-3 +kerning first=49 second=74 amount=-4 +kerning first=49 second=76 amount=-3 +kerning first=49 second=102 amount=-4 +kerning first=49 second=63 amount=-4 +kerning first=49 second=69 amount=-3 +kerning first=49 second=70 amount=-3 +kerning first=49 second=93 amount=-4 +kerning first=49 second=40 amount=-4 +kerning first=49 second=41 amount=-3 +kerning first=49 second=108 amount=-3 +kerning first=49 second=64 amount=-4 +kerning first=49 second=82 amount=-3 +kerning first=49 second=47 amount=-3 +kerning first=49 second=92 amount=-4 +kerning first=49 second=107 amount=-3 +kerning first=49 second=73 amount=-3 +kerning first=49 second=105 amount=-3 +kerning first=49 second=33 amount=-3 +kerning first=49 second=121 amount=-3 +kerning first=49 second=98 amount=-3 +kerning first=49 second=100 amount=-4 +kerning first=49 second=112 amount=-3 +kerning first=49 second=113 amount=-4 +kerning first=49 second=103 amount=-3 +kerning first=49 second=116 amount=-3 +kerning first=49 second=59 amount=-3 +kerning first=49 second=119 amount=-3 +kerning first=49 second=109 amount=-4 +kerning first=49 second=118 amount=-3 +kerning first=49 second=122 amount=-3 +kerning first=49 second=97 amount=-3 +kerning first=49 second=110 amount=-3 +kerning first=49 second=111 amount=-3 +kerning first=49 second=114 amount=-3 +kerning first=49 second=120 amount=-2 +kerning first=49 second=99 amount=-3 +kerning first=49 second=101 amount=-4 +kerning first=49 second=115 amount=-3 +kerning first=49 second=117 amount=-3 +kerning first=49 second=58 amount=-3 +kerning first=49 second=35 amount=-4 +kerning first=49 second=34 amount=-3 +kerning first=49 second=39 amount=-3 +kerning first=49 second=44 amount=-3 +kerning first=49 second=46 amount=-3 +kerning first=49 second=45 amount=-4 +kerning first=40 second=106 amount=1 +kerning first=40 second=87 amount=1 +kerning first=40 second=81 amount=-1 +kerning first=40 second=88 amount=1 +kerning first=40 second=89 amount=1 +kerning first=40 second=90 amount=1 +kerning first=40 second=65 amount=1 +kerning first=40 second=75 amount=1 +kerning first=40 second=52 amount=-1 +kerning first=40 second=78 amount=1 +kerning first=40 second=86 amount=1 +kerning first=40 second=85 amount=1 +kerning first=40 second=51 amount=-1 +kerning first=40 second=66 amount=1 +kerning first=40 second=68 amount=1 +kerning first=40 second=80 amount=1 +kerning first=40 second=104 amount=1 +kerning first=40 second=54 amount=-2 +kerning first=40 second=57 amount=-1 +kerning first=40 second=48 amount=-1 +kerning first=40 second=74 amount=-1 +kerning first=40 second=76 amount=1 +kerning first=40 second=56 amount=-1 +kerning first=40 second=69 amount=1 +kerning first=40 second=93 amount=1 +kerning first=40 second=49 amount=-2 +kerning first=40 second=41 amount=1 +kerning first=40 second=108 amount=1 +kerning first=40 second=64 amount=-1 +kerning first=40 second=82 amount=1 +kerning first=40 second=47 amount=1 +kerning first=40 second=92 amount=1 +kerning first=40 second=107 amount=1 +kerning first=40 second=73 amount=1 +kerning first=40 second=105 amount=1 +kerning first=40 second=33 amount=1 +kerning first=40 second=98 amount=1 +kerning first=40 second=112 amount=1 +kerning first=40 second=59 amount=1 +kerning first=40 second=122 amount=1 +kerning first=40 second=97 amount=1 +kerning first=40 second=110 amount=1 +kerning first=40 second=114 amount=1 +kerning first=40 second=120 amount=1 +kerning first=40 second=58 amount=1 +kerning first=40 second=35 amount=-1 +kerning first=40 second=34 amount=1 +kerning first=40 second=39 amount=1 +kerning first=40 second=44 amount=1 +kerning first=40 second=46 amount=1 +kerning first=40 second=45 amount=-1 +kerning first=41 second=106 amount=1 +kerning first=41 second=81 amount=1 +kerning first=41 second=72 amount=1 +kerning first=41 second=52 amount=1 +kerning first=41 second=71 amount=1 +kerning first=41 second=79 amount=1 +kerning first=41 second=83 amount=1 +kerning first=41 second=85 amount=1 +kerning first=41 second=55 amount=-1 +kerning first=41 second=66 amount=1 +kerning first=41 second=67 amount=1 +kerning first=41 second=80 amount=1 +kerning first=41 second=104 amount=1 +kerning first=41 second=74 amount=1 +kerning first=41 second=102 amount=1 +kerning first=41 second=56 amount=-1 +kerning first=41 second=63 amount=1 +kerning first=41 second=69 amount=1 +kerning first=41 second=49 amount=-2 +kerning first=41 second=40 amount=1 +kerning first=41 second=108 amount=1 +kerning first=41 second=50 amount=-1 +kerning first=41 second=107 amount=1 +kerning first=41 second=73 amount=1 +kerning first=41 second=105 amount=1 +kerning first=41 second=33 amount=1 +kerning first=41 second=121 amount=1 +kerning first=41 second=98 amount=1 +kerning first=41 second=100 amount=1 +kerning first=41 second=112 amount=1 +kerning first=41 second=113 amount=1 +kerning first=41 second=103 amount=1 +kerning first=41 second=116 amount=2 +kerning first=41 second=59 amount=1 +kerning first=41 second=119 amount=2 +kerning first=41 second=109 amount=1 +kerning first=41 second=118 amount=2 +kerning first=41 second=97 amount=1 +kerning first=41 second=110 amount=1 +kerning first=41 second=111 amount=1 +kerning first=41 second=114 amount=1 +kerning first=41 second=120 amount=1 +kerning first=41 second=99 amount=1 +kerning first=41 second=101 amount=1 +kerning first=41 second=115 amount=1 +kerning first=41 second=117 amount=1 +kerning first=41 second=35 amount=1 +kerning first=41 second=34 amount=1 +kerning first=41 second=39 amount=1 +kerning first=41 second=44 amount=-1 +kerning first=41 second=45 amount=1 +kerning first=108 second=106 amount=1 +kerning first=108 second=104 amount=1 +kerning first=108 second=102 amount=1 +kerning first=108 second=63 amount=1 +kerning first=108 second=93 amount=1 +kerning first=108 second=49 amount=-2 +kerning first=108 second=40 amount=1 +kerning first=108 second=41 amount=1 +kerning first=108 second=108 amount=1 +kerning first=108 second=50 amount=1 +kerning first=108 second=47 amount=1 +kerning first=108 second=92 amount=1 +kerning first=108 second=107 amount=1 +kerning first=108 second=105 amount=1 +kerning first=108 second=33 amount=1 +kerning first=108 second=121 amount=1 +kerning first=108 second=98 amount=1 +kerning first=108 second=100 amount=1 +kerning first=108 second=112 amount=1 +kerning first=108 second=113 amount=1 +kerning first=108 second=103 amount=1 +kerning first=108 second=116 amount=2 +kerning first=108 second=59 amount=2 +kerning first=108 second=119 amount=2 +kerning first=108 second=118 amount=2 +kerning first=108 second=122 amount=1 +kerning first=108 second=97 amount=1 +kerning first=108 second=110 amount=1 +kerning first=108 second=111 amount=1 +kerning first=108 second=114 amount=1 +kerning first=108 second=120 amount=1 +kerning first=108 second=99 amount=1 +kerning first=108 second=101 amount=1 +kerning first=108 second=115 amount=1 +kerning first=108 second=117 amount=1 +kerning first=108 second=58 amount=1 +kerning first=108 second=35 amount=1 +kerning first=108 second=34 amount=1 +kerning first=108 second=39 amount=1 +kerning first=108 second=44 amount=1 +kerning first=108 second=46 amount=1 +kerning first=108 second=45 amount=1 +kerning first=64 second=106 amount=1 +kerning first=64 second=87 amount=-1 +kerning first=64 second=81 amount=1 +kerning first=64 second=72 amount=1 +kerning first=64 second=88 amount=-2 +kerning first=64 second=89 amount=-2 +kerning first=64 second=90 amount=-1 +kerning first=64 second=65 amount=-1 +kerning first=64 second=52 amount=1 +kerning first=64 second=86 amount=-1 +kerning first=64 second=71 amount=1 +kerning first=64 second=79 amount=1 +kerning first=64 second=84 amount=-2 +kerning first=64 second=51 amount=-2 +kerning first=64 second=55 amount=-2 +kerning first=64 second=67 amount=1 +kerning first=64 second=57 amount=-1 +kerning first=64 second=74 amount=1 +kerning first=64 second=102 amount=1 +kerning first=64 second=56 amount=-1 +kerning first=64 second=63 amount=-1 +kerning first=64 second=93 amount=-3 +kerning first=64 second=49 amount=-4 +kerning first=64 second=40 amount=1 +kerning first=64 second=41 amount=-1 +kerning first=64 second=108 amount=1 +kerning first=64 second=50 amount=-3 +kerning first=64 second=47 amount=-1 +kerning first=64 second=92 amount=-3 +kerning first=64 second=107 amount=1 +kerning first=64 second=105 amount=1 +kerning first=64 second=33 amount=1 +kerning first=64 second=121 amount=1 +kerning first=64 second=100 amount=1 +kerning first=64 second=113 amount=1 +kerning first=64 second=103 amount=1 +kerning first=64 second=116 amount=1 +kerning first=64 second=119 amount=1 +kerning first=64 second=118 amount=1 +kerning first=64 second=122 amount=-1 +kerning first=64 second=97 amount=1 +kerning first=64 second=110 amount=1 +kerning first=64 second=111 amount=1 +kerning first=64 second=114 amount=1 +kerning first=64 second=99 amount=1 +kerning first=64 second=101 amount=1 +kerning first=64 second=117 amount=1 +kerning first=64 second=35 amount=1 +kerning first=64 second=34 amount=-2 +kerning first=64 second=39 amount=-2 +kerning first=64 second=44 amount=-3 +kerning first=64 second=46 amount=-2 +kerning first=64 second=45 amount=1 +kerning first=82 second=106 amount=1 +kerning first=82 second=72 amount=1 +kerning first=82 second=77 amount=1 +kerning first=82 second=88 amount=2 +kerning first=82 second=89 amount=-1 +kerning first=82 second=90 amount=2 +kerning first=82 second=65 amount=1 +kerning first=82 second=75 amount=1 +kerning first=82 second=52 amount=-3 +kerning first=82 second=78 amount=1 +kerning first=82 second=53 amount=1 +kerning first=82 second=55 amount=1 +kerning first=82 second=66 amount=1 +kerning first=82 second=67 amount=1 +kerning first=82 second=68 amount=1 +kerning first=82 second=80 amount=1 +kerning first=82 second=104 amount=1 +kerning first=82 second=54 amount=-1 +kerning first=82 second=57 amount=-1 +kerning first=82 second=74 amount=-1 +kerning first=82 second=76 amount=1 +kerning first=82 second=63 amount=-1 +kerning first=82 second=69 amount=1 +kerning first=82 second=70 amount=1 +kerning first=82 second=93 amount=1 +kerning first=82 second=49 amount=-2 +kerning first=82 second=40 amount=1 +kerning first=82 second=41 amount=1 +kerning first=82 second=108 amount=2 +kerning first=82 second=82 amount=1 +kerning first=82 second=50 amount=1 +kerning first=82 second=47 amount=1 +kerning first=82 second=107 amount=1 +kerning first=82 second=73 amount=1 +kerning first=82 second=105 amount=1 +kerning first=82 second=33 amount=1 +kerning first=82 second=121 amount=-1 +kerning first=82 second=98 amount=1 +kerning first=82 second=100 amount=1 +kerning first=82 second=112 amount=1 +kerning first=82 second=113 amount=1 +kerning first=82 second=103 amount=1 +kerning first=82 second=59 amount=1 +kerning first=82 second=122 amount=1 +kerning first=82 second=97 amount=2 +kerning first=82 second=110 amount=1 +kerning first=82 second=111 amount=1 +kerning first=82 second=114 amount=1 +kerning first=82 second=120 amount=2 +kerning first=82 second=99 amount=1 +kerning first=82 second=101 amount=1 +kerning first=82 second=115 amount=1 +kerning first=82 second=117 amount=1 +kerning first=82 second=58 amount=1 +kerning first=82 second=35 amount=-3 +kerning first=82 second=44 amount=2 +kerning first=82 second=46 amount=2 +kerning first=82 second=45 amount=-4 +kerning first=50 second=106 amount=1 +kerning first=50 second=81 amount=-1 +kerning first=50 second=88 amount=1 +kerning first=50 second=90 amount=1 +kerning first=50 second=74 amount=-1 +kerning first=50 second=41 amount=1 +kerning first=50 second=108 amount=1 +kerning first=50 second=47 amount=1 +kerning first=50 second=107 amount=1 +kerning first=50 second=105 amount=1 +kerning first=50 second=119 amount=1 +kerning first=50 second=118 amount=1 +kerning first=50 second=122 amount=1 +kerning first=50 second=97 amount=1 +kerning first=50 second=110 amount=1 +kerning first=50 second=120 amount=1 +kerning first=50 second=115 amount=1 +kerning first=50 second=35 amount=-1 +kerning first=50 second=34 amount=1 +kerning first=50 second=39 amount=1 +kerning first=50 second=46 amount=1 +kerning first=50 second=45 amount=-2 +kerning first=47 second=87 amount=1 +kerning first=47 second=81 amount=-2 +kerning first=47 second=88 amount=1 +kerning first=47 second=90 amount=-1 +kerning first=47 second=65 amount=-4 +kerning first=47 second=75 amount=1 +kerning first=47 second=52 amount=-4 +kerning first=47 second=86 amount=1 +kerning first=47 second=53 amount=-1 +kerning first=47 second=71 amount=-1 +kerning first=47 second=79 amount=-1 +kerning first=47 second=83 amount=-1 +kerning first=47 second=51 amount=-2 +kerning first=47 second=55 amount=-1 +kerning first=47 second=66 amount=1 +kerning first=47 second=67 amount=-1 +kerning first=47 second=54 amount=-2 +kerning first=47 second=57 amount=-2 +kerning first=47 second=48 amount=-2 +kerning first=47 second=74 amount=-4 +kerning first=47 second=102 amount=-2 +kerning first=47 second=56 amount=-2 +kerning first=47 second=63 amount=-1 +kerning first=47 second=49 amount=-2 +kerning first=47 second=40 amount=-1 +kerning first=47 second=64 amount=-5 +kerning first=47 second=50 amount=-3 +kerning first=47 second=47 amount=-6 +kerning first=47 second=121 amount=-2 +kerning first=47 second=100 amount=-3 +kerning first=47 second=112 amount=-2 +kerning first=47 second=113 amount=-3 +kerning first=47 second=103 amount=-3 +kerning first=47 second=116 amount=-2 +kerning first=47 second=59 amount=-3 +kerning first=47 second=119 amount=-1 +kerning first=47 second=109 amount=-2 +kerning first=47 second=118 amount=-1 +kerning first=47 second=122 amount=-3 +kerning first=47 second=97 amount=-3 +kerning first=47 second=110 amount=-2 +kerning first=47 second=111 amount=-3 +kerning first=47 second=114 amount=-2 +kerning first=47 second=120 amount=-2 +kerning first=47 second=99 amount=-4 +kerning first=47 second=101 amount=-4 +kerning first=47 second=115 amount=-4 +kerning first=47 second=117 amount=-2 +kerning first=47 second=58 amount=-3 +kerning first=47 second=35 amount=-2 +kerning first=47 second=34 amount=1 +kerning first=47 second=39 amount=1 +kerning first=47 second=44 amount=-4 +kerning first=47 second=46 amount=-5 +kerning first=47 second=45 amount=-4 +kerning first=92 second=87 amount=-3 +kerning first=92 second=81 amount=-1 +kerning first=92 second=88 amount=1 +kerning first=92 second=89 amount=-3 +kerning first=92 second=52 amount=-2 +kerning first=92 second=86 amount=-2 +kerning first=92 second=71 amount=-1 +kerning first=92 second=79 amount=-1 +kerning first=92 second=83 amount=-1 +kerning first=92 second=84 amount=-2 +kerning first=92 second=85 amount=-1 +kerning first=92 second=51 amount=-1 +kerning first=92 second=54 amount=-2 +kerning first=92 second=57 amount=-1 +kerning first=92 second=48 amount=-1 +kerning first=92 second=74 amount=-1 +kerning first=92 second=102 amount=-2 +kerning first=92 second=56 amount=-1 +kerning first=92 second=63 amount=-2 +kerning first=92 second=93 amount=-1 +kerning first=92 second=49 amount=-3 +kerning first=92 second=108 amount=1 +kerning first=92 second=64 amount=-1 +kerning first=92 second=92 amount=-4 +kerning first=92 second=121 amount=-2 +kerning first=92 second=116 amount=-1 +kerning first=92 second=59 amount=1 +kerning first=92 second=118 amount=-1 +kerning first=92 second=122 amount=1 +kerning first=92 second=97 amount=1 +kerning first=92 second=110 amount=1 +kerning first=92 second=114 amount=1 +kerning first=92 second=120 amount=1 +kerning first=92 second=115 amount=1 +kerning first=92 second=58 amount=1 +kerning first=92 second=35 amount=-3 +kerning first=92 second=34 amount=-6 +kerning first=92 second=39 amount=-4 +kerning first=92 second=44 amount=1 +kerning first=92 second=46 amount=1 +kerning first=92 second=45 amount=-2 +kerning first=107 second=106 amount=1 +kerning first=107 second=52 amount=-1 +kerning first=107 second=53 amount=1 +kerning first=107 second=55 amount=1 +kerning first=107 second=104 amount=1 +kerning first=107 second=102 amount=1 +kerning first=107 second=49 amount=-2 +kerning first=107 second=40 amount=1 +kerning first=107 second=41 amount=1 +kerning first=107 second=108 amount=1 +kerning first=107 second=50 amount=1 +kerning first=107 second=47 amount=1 +kerning first=107 second=92 amount=-2 +kerning first=107 second=107 amount=1 +kerning first=107 second=105 amount=1 +kerning first=107 second=33 amount=1 +kerning first=107 second=121 amount=2 +kerning first=107 second=98 amount=1 +kerning first=107 second=100 amount=1 +kerning first=107 second=112 amount=1 +kerning first=107 second=113 amount=1 +kerning first=107 second=103 amount=1 +kerning first=107 second=116 amount=1 +kerning first=107 second=59 amount=2 +kerning first=107 second=119 amount=2 +kerning first=107 second=109 amount=1 +kerning first=107 second=118 amount=2 +kerning first=107 second=122 amount=2 +kerning first=107 second=97 amount=2 +kerning first=107 second=110 amount=2 +kerning first=107 second=111 amount=1 +kerning first=107 second=114 amount=1 +kerning first=107 second=120 amount=2 +kerning first=107 second=99 amount=1 +kerning first=107 second=101 amount=1 +kerning first=107 second=115 amount=2 +kerning first=107 second=117 amount=1 +kerning first=107 second=58 amount=1 +kerning first=107 second=35 amount=1 +kerning first=107 second=34 amount=-1 +kerning first=107 second=39 amount=-1 +kerning first=107 second=44 amount=2 +kerning first=107 second=46 amount=2 +kerning first=107 second=45 amount=-2 +kerning first=73 second=106 amount=1 +kerning first=73 second=87 amount=1 +kerning first=73 second=72 amount=1 +kerning first=73 second=88 amount=1 +kerning first=73 second=90 amount=1 +kerning first=73 second=65 amount=1 +kerning first=73 second=75 amount=1 +kerning first=73 second=86 amount=1 +kerning first=73 second=71 amount=1 +kerning first=73 second=83 amount=1 +kerning first=73 second=85 amount=1 +kerning first=73 second=66 amount=1 +kerning first=73 second=67 amount=1 +kerning first=73 second=80 amount=1 +kerning first=73 second=54 amount=-1 +kerning first=73 second=76 amount=1 +kerning first=73 second=102 amount=1 +kerning first=73 second=56 amount=-1 +kerning first=73 second=93 amount=1 +kerning first=73 second=49 amount=-2 +kerning first=73 second=41 amount=1 +kerning first=73 second=108 amount=1 +kerning first=73 second=82 amount=1 +kerning first=73 second=47 amount=1 +kerning first=73 second=92 amount=1 +kerning first=73 second=107 amount=1 +kerning first=73 second=73 amount=1 +kerning first=73 second=105 amount=1 +kerning first=73 second=33 amount=1 +kerning first=73 second=121 amount=1 +kerning first=73 second=98 amount=1 +kerning first=73 second=112 amount=1 +kerning first=73 second=113 amount=1 +kerning first=73 second=103 amount=1 +kerning first=73 second=116 amount=1 +kerning first=73 second=59 amount=1 +kerning first=73 second=119 amount=1 +kerning first=73 second=118 amount=1 +kerning first=73 second=122 amount=1 +kerning first=73 second=97 amount=1 +kerning first=73 second=110 amount=1 +kerning first=73 second=111 amount=1 +kerning first=73 second=114 amount=1 +kerning first=73 second=120 amount=1 +kerning first=73 second=99 amount=1 +kerning first=73 second=115 amount=1 +kerning first=73 second=117 amount=1 +kerning first=73 second=58 amount=1 +kerning first=73 second=34 amount=1 +kerning first=73 second=39 amount=1 +kerning first=73 second=44 amount=1 +kerning first=73 second=46 amount=1 +kerning first=105 second=106 amount=1 +kerning first=105 second=104 amount=1 +kerning first=105 second=102 amount=1 +kerning first=105 second=63 amount=1 +kerning first=105 second=93 amount=1 +kerning first=105 second=49 amount=-2 +kerning first=105 second=40 amount=1 +kerning first=105 second=41 amount=1 +kerning first=105 second=108 amount=1 +kerning first=105 second=47 amount=1 +kerning first=105 second=92 amount=1 +kerning first=105 second=107 amount=1 +kerning first=105 second=105 amount=1 +kerning first=105 second=33 amount=1 +kerning first=105 second=121 amount=2 +kerning first=105 second=98 amount=1 +kerning first=105 second=100 amount=1 +kerning first=105 second=112 amount=1 +kerning first=105 second=113 amount=1 +kerning first=105 second=103 amount=1 +kerning first=105 second=116 amount=2 +kerning first=105 second=59 amount=2 +kerning first=105 second=119 amount=2 +kerning first=105 second=109 amount=1 +kerning first=105 second=118 amount=2 +kerning first=105 second=122 amount=1 +kerning first=105 second=97 amount=1 +kerning first=105 second=110 amount=1 +kerning first=105 second=111 amount=1 +kerning first=105 second=114 amount=1 +kerning first=105 second=120 amount=1 +kerning first=105 second=99 amount=1 +kerning first=105 second=115 amount=1 +kerning first=105 second=117 amount=1 +kerning first=105 second=58 amount=1 +kerning first=105 second=35 amount=1 +kerning first=105 second=34 amount=1 +kerning first=105 second=39 amount=1 +kerning first=105 second=44 amount=1 +kerning first=105 second=46 amount=1 +kerning first=33 second=106 amount=1 +kerning first=33 second=87 amount=1 +kerning first=33 second=81 amount=1 +kerning first=33 second=72 amount=1 +kerning first=33 second=88 amount=1 +kerning first=33 second=89 amount=1 +kerning first=33 second=90 amount=1 +kerning first=33 second=65 amount=1 +kerning first=33 second=75 amount=1 +kerning first=33 second=52 amount=1 +kerning first=33 second=78 amount=1 +kerning first=33 second=86 amount=1 +kerning first=33 second=53 amount=2 +kerning first=33 second=71 amount=1 +kerning first=33 second=79 amount=1 +kerning first=33 second=83 amount=1 +kerning first=33 second=84 amount=1 +kerning first=33 second=85 amount=1 +kerning first=33 second=66 amount=1 +kerning first=33 second=67 amount=1 +kerning first=33 second=68 amount=1 +kerning first=33 second=80 amount=1 +kerning first=33 second=104 amount=1 +kerning first=33 second=74 amount=1 +kerning first=33 second=76 amount=1 +kerning first=33 second=102 amount=1 +kerning first=33 second=63 amount=1 +kerning first=33 second=69 amount=1 +kerning first=33 second=93 amount=1 +kerning first=33 second=49 amount=-2 +kerning first=33 second=40 amount=1 +kerning first=33 second=41 amount=1 +kerning first=33 second=108 amount=1 +kerning first=33 second=82 amount=1 +kerning first=33 second=47 amount=1 +kerning first=33 second=92 amount=1 +kerning first=33 second=107 amount=1 +kerning first=33 second=73 amount=2 +kerning first=33 second=105 amount=1 +kerning first=33 second=33 amount=1 +kerning first=33 second=121 amount=1 +kerning first=33 second=98 amount=1 +kerning first=33 second=100 amount=1 +kerning first=33 second=112 amount=1 +kerning first=33 second=113 amount=1 +kerning first=33 second=103 amount=1 +kerning first=33 second=116 amount=2 +kerning first=33 second=59 amount=1 +kerning first=33 second=119 amount=2 +kerning first=33 second=118 amount=2 +kerning first=33 second=122 amount=1 +kerning first=33 second=97 amount=1 +kerning first=33 second=110 amount=1 +kerning first=33 second=111 amount=1 +kerning first=33 second=114 amount=1 +kerning first=33 second=120 amount=1 +kerning first=33 second=99 amount=1 +kerning first=33 second=101 amount=1 +kerning first=33 second=115 amount=1 +kerning first=33 second=117 amount=1 +kerning first=33 second=58 amount=1 +kerning first=33 second=35 amount=1 +kerning first=33 second=43 amount=1 +kerning first=33 second=34 amount=1 +kerning first=33 second=39 amount=1 +kerning first=33 second=44 amount=1 +kerning first=33 second=46 amount=1 +kerning first=33 second=45 amount=1 +kerning first=121 second=106 amount=1 +kerning first=121 second=51 amount=-1 +kerning first=121 second=55 amount=-3 +kerning first=121 second=104 amount=1 +kerning first=121 second=102 amount=1 +kerning first=121 second=93 amount=-3 +kerning first=121 second=49 amount=-3 +kerning first=121 second=40 amount=1 +kerning first=121 second=41 amount=-1 +kerning first=121 second=108 amount=1 +kerning first=121 second=64 amount=-1 +kerning first=121 second=50 amount=-2 +kerning first=121 second=47 amount=-2 +kerning first=121 second=92 amount=-2 +kerning first=121 second=107 amount=1 +kerning first=121 second=105 amount=1 +kerning first=121 second=33 amount=1 +kerning first=121 second=121 amount=1 +kerning first=121 second=98 amount=1 +kerning first=121 second=112 amount=1 +kerning first=121 second=116 amount=2 +kerning first=121 second=59 amount=1 +kerning first=121 second=119 amount=2 +kerning first=121 second=109 amount=1 +kerning first=121 second=118 amount=2 +kerning first=121 second=97 amount=1 +kerning first=121 second=110 amount=1 +kerning first=121 second=111 amount=1 +kerning first=121 second=114 amount=1 +kerning first=121 second=120 amount=1 +kerning first=121 second=117 amount=1 +kerning first=121 second=35 amount=1 +kerning first=121 second=44 amount=-2 +kerning first=121 second=46 amount=-2 +kerning first=121 second=32 amount=1 +kerning first=98 second=52 amount=1 +kerning first=98 second=102 amount=1 +kerning first=98 second=56 amount=-1 +kerning first=98 second=63 amount=-1 +kerning first=98 second=93 amount=-1 +kerning first=98 second=49 amount=-4 +kerning first=98 second=40 amount=1 +kerning first=98 second=108 amount=1 +kerning first=98 second=92 amount=-3 +kerning first=98 second=107 amount=1 +kerning first=98 second=105 amount=1 +kerning first=98 second=33 amount=1 +kerning first=98 second=100 amount=1 +kerning first=98 second=112 amount=1 +kerning first=98 second=113 amount=1 +kerning first=98 second=103 amount=1 +kerning first=98 second=116 amount=1 +kerning first=98 second=119 amount=1 +kerning first=98 second=118 amount=1 +kerning first=98 second=97 amount=1 +kerning first=98 second=110 amount=1 +kerning first=98 second=111 amount=1 +kerning first=98 second=114 amount=1 +kerning first=98 second=120 amount=1 +kerning first=98 second=99 amount=1 +kerning first=98 second=101 amount=1 +kerning first=98 second=115 amount=1 +kerning first=98 second=117 amount=1 +kerning first=98 second=35 amount=1 +kerning first=98 second=34 amount=-3 +kerning first=98 second=39 amount=-3 +kerning first=98 second=46 amount=1 +kerning first=98 second=45 amount=1 +kerning first=100 second=106 amount=1 +kerning first=100 second=102 amount=1 +kerning first=100 second=56 amount=-1 +kerning first=100 second=63 amount=1 +kerning first=100 second=93 amount=1 +kerning first=100 second=49 amount=-2 +kerning first=100 second=41 amount=1 +kerning first=100 second=108 amount=1 +kerning first=100 second=47 amount=1 +kerning first=100 second=92 amount=1 +kerning first=100 second=107 amount=1 +kerning first=100 second=105 amount=1 +kerning first=100 second=33 amount=1 +kerning first=100 second=121 amount=1 +kerning first=100 second=98 amount=1 +kerning first=100 second=112 amount=1 +kerning first=100 second=113 amount=1 +kerning first=100 second=103 amount=1 +kerning first=100 second=116 amount=1 +kerning first=100 second=59 amount=1 +kerning first=100 second=119 amount=2 +kerning first=100 second=118 amount=1 +kerning first=100 second=122 amount=1 +kerning first=100 second=97 amount=1 +kerning first=100 second=110 amount=1 +kerning first=100 second=111 amount=1 +kerning first=100 second=114 amount=1 +kerning first=100 second=120 amount=1 +kerning first=100 second=99 amount=1 +kerning first=100 second=115 amount=1 +kerning first=100 second=117 amount=1 +kerning first=100 second=58 amount=1 +kerning first=100 second=34 amount=1 +kerning first=100 second=39 amount=1 +kerning first=100 second=44 amount=1 +kerning first=100 second=46 amount=1 +kerning first=112 second=106 amount=1 +kerning first=112 second=52 amount=1 +kerning first=112 second=104 amount=1 +kerning first=112 second=102 amount=1 +kerning first=112 second=63 amount=-1 +kerning first=112 second=93 amount=-1 +kerning first=112 second=49 amount=-3 +kerning first=112 second=40 amount=1 +kerning first=112 second=108 amount=1 +kerning first=112 second=50 amount=-1 +kerning first=112 second=92 amount=-3 +kerning first=112 second=107 amount=1 +kerning first=112 second=105 amount=1 +kerning first=112 second=33 amount=1 +kerning first=112 second=98 amount=1 +kerning first=112 second=100 amount=1 +kerning first=112 second=113 amount=1 +kerning first=112 second=103 amount=1 +kerning first=112 second=116 amount=2 +kerning first=112 second=119 amount=1 +kerning first=112 second=118 amount=1 +kerning first=112 second=97 amount=1 +kerning first=112 second=110 amount=1 +kerning first=112 second=111 amount=1 +kerning first=112 second=114 amount=1 +kerning first=112 second=120 amount=1 +kerning first=112 second=99 amount=1 +kerning first=112 second=101 amount=1 +kerning first=112 second=115 amount=1 +kerning first=112 second=117 amount=1 +kerning first=112 second=35 amount=1 +kerning first=112 second=34 amount=-2 +kerning first=112 second=39 amount=-2 +kerning first=112 second=44 amount=-1 +kerning first=112 second=45 amount=1 +kerning first=113 second=106 amount=3 +kerning first=113 second=52 amount=1 +kerning first=113 second=104 amount=1 +kerning first=113 second=102 amount=1 +kerning first=113 second=49 amount=-3 +kerning first=113 second=40 amount=1 +kerning first=113 second=41 amount=1 +kerning first=113 second=108 amount=1 +kerning first=113 second=47 amount=1 +kerning first=113 second=92 amount=-2 +kerning first=113 second=107 amount=1 +kerning first=113 second=105 amount=1 +kerning first=113 second=33 amount=1 +kerning first=113 second=121 amount=1 +kerning first=113 second=98 amount=1 +kerning first=113 second=100 amount=1 +kerning first=113 second=112 amount=1 +kerning first=113 second=103 amount=1 +kerning first=113 second=116 amount=2 +kerning first=113 second=59 amount=2 +kerning first=113 second=119 amount=2 +kerning first=113 second=109 amount=1 +kerning first=113 second=118 amount=2 +kerning first=113 second=122 amount=1 +kerning first=113 second=97 amount=1 +kerning first=113 second=110 amount=1 +kerning first=113 second=111 amount=1 +kerning first=113 second=114 amount=1 +kerning first=113 second=120 amount=1 +kerning first=113 second=99 amount=1 +kerning first=113 second=101 amount=1 +kerning first=113 second=115 amount=1 +kerning first=113 second=117 amount=1 +kerning first=113 second=58 amount=1 +kerning first=113 second=35 amount=1 +kerning first=113 second=44 amount=2 +kerning first=113 second=46 amount=1 +kerning first=113 second=45 amount=1 +kerning first=103 second=106 amount=3 +kerning first=103 second=52 amount=1 +kerning first=103 second=53 amount=1 +kerning first=103 second=104 amount=1 +kerning first=103 second=102 amount=1 +kerning first=103 second=49 amount=-3 +kerning first=103 second=40 amount=1 +kerning first=103 second=41 amount=1 +kerning first=103 second=108 amount=1 +kerning first=103 second=47 amount=1 +kerning first=103 second=92 amount=-2 +kerning first=103 second=107 amount=1 +kerning first=103 second=105 amount=1 +kerning first=103 second=33 amount=1 +kerning first=103 second=121 amount=1 +kerning first=103 second=98 amount=1 +kerning first=103 second=100 amount=1 +kerning first=103 second=112 amount=1 +kerning first=103 second=113 amount=1 +kerning first=103 second=103 amount=1 +kerning first=103 second=116 amount=2 +kerning first=103 second=59 amount=2 +kerning first=103 second=119 amount=2 +kerning first=103 second=118 amount=2 +kerning first=103 second=122 amount=1 +kerning first=103 second=97 amount=1 +kerning first=103 second=110 amount=1 +kerning first=103 second=111 amount=1 +kerning first=103 second=114 amount=1 +kerning first=103 second=120 amount=1 +kerning first=103 second=99 amount=1 +kerning first=103 second=101 amount=1 +kerning first=103 second=115 amount=1 +kerning first=103 second=117 amount=1 +kerning first=103 second=58 amount=1 +kerning first=103 second=35 amount=1 +kerning first=103 second=34 amount=-1 +kerning first=103 second=44 amount=2 +kerning first=103 second=46 amount=1 +kerning first=103 second=45 amount=1 +kerning first=116 second=106 amount=2 +kerning first=116 second=52 amount=-1 +kerning first=116 second=55 amount=-1 +kerning first=116 second=104 amount=1 +kerning first=116 second=54 amount=1 +kerning first=116 second=57 amount=1 +kerning first=116 second=48 amount=1 +kerning first=116 second=102 amount=2 +kerning first=116 second=63 amount=1 +kerning first=116 second=93 amount=-1 +kerning first=116 second=49 amount=-3 +kerning first=116 second=40 amount=2 +kerning first=116 second=108 amount=2 +kerning first=116 second=50 amount=-1 +kerning first=116 second=92 amount=-1 +kerning first=116 second=107 amount=2 +kerning first=116 second=105 amount=2 +kerning first=116 second=33 amount=2 +kerning first=116 second=121 amount=2 +kerning first=116 second=98 amount=1 +kerning first=116 second=100 amount=1 +kerning first=116 second=112 amount=2 +kerning first=116 second=113 amount=1 +kerning first=116 second=103 amount=1 +kerning first=116 second=116 amount=2 +kerning first=116 second=59 amount=1 +kerning first=116 second=119 amount=3 +kerning first=116 second=109 amount=1 +kerning first=116 second=118 amount=3 +kerning first=116 second=122 amount=1 +kerning first=116 second=97 amount=1 +kerning first=116 second=110 amount=2 +kerning first=116 second=111 amount=1 +kerning first=116 second=114 amount=2 +kerning first=116 second=120 amount=2 +kerning first=116 second=99 amount=1 +kerning first=116 second=101 amount=1 +kerning first=116 second=115 amount=1 +kerning first=116 second=117 amount=2 +kerning first=116 second=58 amount=1 +kerning first=116 second=35 amount=1 +kerning first=116 second=34 amount=1 +kerning first=116 second=39 amount=1 +kerning first=116 second=45 amount=-1 +kerning first=116 second=32 amount=1 +kerning first=59 second=106 amount=1 +kerning first=59 second=87 amount=-1 +kerning first=59 second=89 amount=-2 +kerning first=59 second=52 amount=-1 +kerning first=59 second=86 amount=-1 +kerning first=59 second=53 amount=-1 +kerning first=59 second=84 amount=-2 +kerning first=59 second=51 amount=-1 +kerning first=59 second=67 amount=1 +kerning first=59 second=54 amount=-1 +kerning first=59 second=57 amount=-1 +kerning first=59 second=74 amount=-2 +kerning first=59 second=102 amount=1 +kerning first=59 second=56 amount=-1 +kerning first=59 second=63 amount=-1 +kerning first=59 second=93 amount=-1 +kerning first=59 second=49 amount=-4 +kerning first=59 second=64 amount=-1 +kerning first=59 second=92 amount=-2 +kerning first=59 second=105 amount=1 +kerning first=59 second=33 amount=1 +kerning first=59 second=121 amount=1 +kerning first=59 second=112 amount=1 +kerning first=59 second=116 amount=1 +kerning first=59 second=59 amount=1 +kerning first=59 second=119 amount=2 +kerning first=59 second=118 amount=1 +kerning first=59 second=110 amount=1 +kerning first=59 second=114 amount=1 +kerning first=59 second=120 amount=1 +kerning first=59 second=117 amount=1 +kerning first=59 second=34 amount=-1 +kerning first=59 second=44 amount=1 +kerning first=59 second=45 amount=-1 +kerning first=119 second=106 amount=1 +kerning first=119 second=55 amount=-2 +kerning first=119 second=104 amount=1 +kerning first=119 second=102 amount=1 +kerning first=119 second=63 amount=1 +kerning first=119 second=93 amount=-3 +kerning first=119 second=49 amount=-3 +kerning first=119 second=40 amount=1 +kerning first=119 second=108 amount=1 +kerning first=119 second=64 amount=-1 +kerning first=119 second=50 amount=-1 +kerning first=119 second=47 amount=-2 +kerning first=119 second=92 amount=-1 +kerning first=119 second=107 amount=1 +kerning first=119 second=105 amount=1 +kerning first=119 second=33 amount=1 +kerning first=119 second=121 amount=2 +kerning first=119 second=98 amount=1 +kerning first=119 second=112 amount=1 +kerning first=119 second=116 amount=1 +kerning first=119 second=59 amount=1 +kerning first=119 second=119 amount=2 +kerning first=119 second=109 amount=1 +kerning first=119 second=118 amount=2 +kerning first=119 second=110 amount=1 +kerning first=119 second=114 amount=1 +kerning first=119 second=120 amount=1 +kerning first=119 second=117 amount=1 +kerning first=119 second=35 amount=1 +kerning first=119 second=34 amount=1 +kerning first=119 second=39 amount=1 +kerning first=119 second=44 amount=-2 +kerning first=119 second=46 amount=-2 +kerning first=109 second=106 amount=1 +kerning first=109 second=51 amount=-1 +kerning first=109 second=55 amount=1 +kerning first=109 second=104 amount=1 +kerning first=109 second=54 amount=-1 +kerning first=109 second=57 amount=-1 +kerning first=109 second=102 amount=1 +kerning first=109 second=56 amount=-1 +kerning first=109 second=63 amount=-2 +kerning first=109 second=49 amount=-3 +kerning first=109 second=41 amount=1 +kerning first=109 second=108 amount=1 +kerning first=109 second=50 amount=1 +kerning first=109 second=47 amount=1 +kerning first=109 second=92 amount=-3 +kerning first=109 second=107 amount=1 +kerning first=109 second=105 amount=1 +kerning first=109 second=33 amount=1 +kerning first=109 second=121 amount=1 +kerning first=109 second=98 amount=1 +kerning first=109 second=100 amount=1 +kerning first=109 second=112 amount=1 +kerning first=109 second=116 amount=1 +kerning first=109 second=59 amount=2 +kerning first=109 second=119 amount=1 +kerning first=109 second=118 amount=1 +kerning first=109 second=122 amount=1 +kerning first=109 second=97 amount=1 +kerning first=109 second=110 amount=1 +kerning first=109 second=111 amount=1 +kerning first=109 second=114 amount=1 +kerning first=109 second=120 amount=2 +kerning first=109 second=115 amount=1 +kerning first=109 second=58 amount=1 +kerning first=109 second=39 amount=-1 +kerning first=109 second=44 amount=2 +kerning first=109 second=46 amount=1 +kerning first=118 second=106 amount=2 +kerning first=118 second=55 amount=-2 +kerning first=118 second=104 amount=1 +kerning first=118 second=54 amount=1 +kerning first=118 second=57 amount=1 +kerning first=118 second=48 amount=1 +kerning first=118 second=102 amount=2 +kerning first=118 second=63 amount=1 +kerning first=118 second=93 amount=-2 +kerning first=118 second=49 amount=-3 +kerning first=118 second=40 amount=2 +kerning first=118 second=108 amount=2 +kerning first=118 second=50 amount=-1 +kerning first=118 second=47 amount=-1 +kerning first=118 second=92 amount=-1 +kerning first=118 second=107 amount=2 +kerning first=118 second=105 amount=2 +kerning first=118 second=33 amount=2 +kerning first=118 second=121 amount=2 +kerning first=118 second=98 amount=1 +kerning first=118 second=100 amount=1 +kerning first=118 second=112 amount=2 +kerning first=118 second=113 amount=1 +kerning first=118 second=103 amount=1 +kerning first=118 second=116 amount=2 +kerning first=118 second=59 amount=1 +kerning first=118 second=119 amount=3 +kerning first=118 second=109 amount=1 +kerning first=118 second=118 amount=3 +kerning first=118 second=122 amount=1 +kerning first=118 second=97 amount=1 +kerning first=118 second=110 amount=2 +kerning first=118 second=111 amount=1 +kerning first=118 second=114 amount=2 +kerning first=118 second=120 amount=2 +kerning first=118 second=99 amount=1 +kerning first=118 second=101 amount=1 +kerning first=118 second=115 amount=1 +kerning first=118 second=117 amount=2 +kerning first=118 second=58 amount=1 +kerning first=118 second=35 amount=2 +kerning first=118 second=34 amount=1 +kerning first=118 second=39 amount=1 +kerning first=118 second=44 amount=-2 +kerning first=118 second=46 amount=-1 +kerning first=118 second=32 amount=1 +kerning first=122 second=106 amount=1 +kerning first=122 second=52 amount=-1 +kerning first=122 second=104 amount=1 +kerning first=122 second=102 amount=1 +kerning first=122 second=49 amount=-3 +kerning first=122 second=40 amount=1 +kerning first=122 second=41 amount=1 +kerning first=122 second=108 amount=1 +kerning first=122 second=50 amount=1 +kerning first=122 second=47 amount=1 +kerning first=122 second=92 amount=-2 +kerning first=122 second=107 amount=1 +kerning first=122 second=105 amount=1 +kerning first=122 second=33 amount=1 +kerning first=122 second=121 amount=2 +kerning first=122 second=98 amount=1 +kerning first=122 second=100 amount=1 +kerning first=122 second=112 amount=1 +kerning first=122 second=103 amount=1 +kerning first=122 second=116 amount=2 +kerning first=122 second=59 amount=1 +kerning first=122 second=119 amount=2 +kerning first=122 second=109 amount=1 +kerning first=122 second=118 amount=2 +kerning first=122 second=122 amount=1 +kerning first=122 second=97 amount=1 +kerning first=122 second=110 amount=1 +kerning first=122 second=111 amount=1 +kerning first=122 second=114 amount=1 +kerning first=122 second=120 amount=1 +kerning first=122 second=99 amount=1 +kerning first=122 second=115 amount=1 +kerning first=122 second=117 amount=1 +kerning first=122 second=58 amount=1 +kerning first=122 second=35 amount=1 +kerning first=122 second=44 amount=1 +kerning first=122 second=46 amount=1 +kerning first=122 second=45 amount=-1 +kerning first=122 second=32 amount=1 +kerning first=97 second=106 amount=1 +kerning first=97 second=55 amount=1 +kerning first=97 second=104 amount=1 +kerning first=97 second=54 amount=-1 +kerning first=97 second=57 amount=-1 +kerning first=97 second=48 amount=-1 +kerning first=97 second=63 amount=-2 +kerning first=97 second=49 amount=-3 +kerning first=97 second=41 amount=1 +kerning first=97 second=108 amount=1 +kerning first=97 second=50 amount=1 +kerning first=97 second=47 amount=1 +kerning first=97 second=92 amount=-4 +kerning first=97 second=107 amount=1 +kerning first=97 second=105 amount=1 +kerning first=97 second=33 amount=1 +kerning first=97 second=98 amount=1 +kerning first=97 second=100 amount=1 +kerning first=97 second=112 amount=1 +kerning first=97 second=116 amount=1 +kerning first=97 second=59 amount=1 +kerning first=97 second=119 amount=1 +kerning first=97 second=118 amount=1 +kerning first=97 second=122 amount=1 +kerning first=97 second=97 amount=1 +kerning first=97 second=110 amount=1 +kerning first=97 second=111 amount=1 +kerning first=97 second=114 amount=1 +kerning first=97 second=120 amount=2 +kerning first=97 second=99 amount=1 +kerning first=97 second=115 amount=1 +kerning first=97 second=117 amount=1 +kerning first=97 second=58 amount=1 +kerning first=97 second=34 amount=-3 +kerning first=97 second=39 amount=-2 +kerning first=97 second=44 amount=1 +kerning first=97 second=46 amount=1 +kerning first=110 second=106 amount=1 +kerning first=110 second=52 amount=1 +kerning first=110 second=55 amount=1 +kerning first=110 second=104 amount=1 +kerning first=110 second=102 amount=1 +kerning first=110 second=63 amount=-1 +kerning first=110 second=49 amount=-3 +kerning first=110 second=40 amount=1 +kerning first=110 second=41 amount=1 +kerning first=110 second=108 amount=1 +kerning first=110 second=50 amount=1 +kerning first=110 second=47 amount=1 +kerning first=110 second=92 amount=-3 +kerning first=110 second=107 amount=1 +kerning first=110 second=105 amount=1 +kerning first=110 second=33 amount=1 +kerning first=110 second=121 amount=1 +kerning first=110 second=98 amount=1 +kerning first=110 second=100 amount=1 +kerning first=110 second=112 amount=1 +kerning first=110 second=113 amount=1 +kerning first=110 second=103 amount=1 +kerning first=110 second=116 amount=1 +kerning first=110 second=59 amount=1 +kerning first=110 second=119 amount=1 +kerning first=110 second=118 amount=1 +kerning first=110 second=122 amount=1 +kerning first=110 second=97 amount=1 +kerning first=110 second=110 amount=1 +kerning first=110 second=111 amount=1 +kerning first=110 second=114 amount=1 +kerning first=110 second=120 amount=2 +kerning first=110 second=99 amount=1 +kerning first=110 second=101 amount=1 +kerning first=110 second=115 amount=1 +kerning first=110 second=117 amount=1 +kerning first=110 second=58 amount=1 +kerning first=110 second=35 amount=1 +kerning first=110 second=34 amount=-1 +kerning first=110 second=39 amount=-1 +kerning first=110 second=46 amount=1 +kerning first=110 second=45 amount=1 +kerning first=111 second=106 amount=1 +kerning first=111 second=52 amount=1 +kerning first=111 second=53 amount=1 +kerning first=111 second=104 amount=1 +kerning first=111 second=102 amount=1 +kerning first=111 second=63 amount=-1 +kerning first=111 second=93 amount=-1 +kerning first=111 second=49 amount=-3 +kerning first=111 second=40 amount=1 +kerning first=111 second=108 amount=1 +kerning first=111 second=64 amount=1 +kerning first=111 second=47 amount=1 +kerning first=111 second=92 amount=-3 +kerning first=111 second=107 amount=1 +kerning first=111 second=105 amount=1 +kerning first=111 second=33 amount=1 +kerning first=111 second=121 amount=1 +kerning first=111 second=98 amount=1 +kerning first=111 second=100 amount=1 +kerning first=111 second=112 amount=1 +kerning first=111 second=113 amount=1 +kerning first=111 second=103 amount=1 +kerning first=111 second=116 amount=2 +kerning first=111 second=59 amount=1 +kerning first=111 second=119 amount=1 +kerning first=111 second=109 amount=1 +kerning first=111 second=118 amount=1 +kerning first=111 second=97 amount=1 +kerning first=111 second=110 amount=1 +kerning first=111 second=111 amount=1 +kerning first=111 second=114 amount=1 +kerning first=111 second=120 amount=1 +kerning first=111 second=99 amount=1 +kerning first=111 second=101 amount=1 +kerning first=111 second=115 amount=1 +kerning first=111 second=117 amount=1 +kerning first=111 second=35 amount=1 +kerning first=111 second=34 amount=-2 +kerning first=111 second=39 amount=-2 +kerning first=111 second=46 amount=1 +kerning first=111 second=45 amount=1 +kerning first=114 second=106 amount=1 +kerning first=114 second=52 amount=-1 +kerning first=114 second=55 amount=-2 +kerning first=114 second=104 amount=1 +kerning first=114 second=48 amount=1 +kerning first=114 second=102 amount=1 +kerning first=114 second=63 amount=1 +kerning first=114 second=93 amount=-3 +kerning first=114 second=49 amount=-3 +kerning first=114 second=40 amount=1 +kerning first=114 second=108 amount=1 +kerning first=114 second=64 amount=-1 +kerning first=114 second=50 amount=-1 +kerning first=114 second=47 amount=-3 +kerning first=114 second=92 amount=-1 +kerning first=114 second=107 amount=1 +kerning first=114 second=105 amount=1 +kerning first=114 second=33 amount=1 +kerning first=114 second=121 amount=2 +kerning first=114 second=98 amount=1 +kerning first=114 second=112 amount=1 +kerning first=114 second=113 amount=1 +kerning first=114 second=103 amount=1 +kerning first=114 second=116 amount=1 +kerning first=114 second=59 amount=1 +kerning first=114 second=119 amount=2 +kerning first=114 second=109 amount=1 +kerning first=114 second=118 amount=2 +kerning first=114 second=122 amount=1 +kerning first=114 second=97 amount=1 +kerning first=114 second=110 amount=1 +kerning first=114 second=111 amount=1 +kerning first=114 second=114 amount=2 +kerning first=114 second=120 amount=2 +kerning first=114 second=117 amount=1 +kerning first=114 second=35 amount=1 +kerning first=114 second=34 amount=1 +kerning first=114 second=39 amount=2 +kerning first=114 second=44 amount=-3 +kerning first=114 second=46 amount=-3 +kerning first=114 second=45 amount=-2 +kerning first=120 second=106 amount=1 +kerning first=120 second=52 amount=-1 +kerning first=120 second=53 amount=-1 +kerning first=120 second=104 amount=1 +kerning first=120 second=102 amount=1 +kerning first=120 second=63 amount=1 +kerning first=120 second=93 amount=-1 +kerning first=120 second=49 amount=-3 +kerning first=120 second=40 amount=1 +kerning first=120 second=108 amount=1 +kerning first=120 second=64 amount=-1 +kerning first=120 second=47 amount=1 +kerning first=120 second=92 amount=-1 +kerning first=120 second=107 amount=1 +kerning first=120 second=105 amount=1 +kerning first=120 second=33 amount=1 +kerning first=120 second=121 amount=2 +kerning first=120 second=98 amount=1 +kerning first=120 second=112 amount=1 +kerning first=120 second=116 amount=1 +kerning first=120 second=59 amount=1 +kerning first=120 second=119 amount=2 +kerning first=120 second=109 amount=1 +kerning first=120 second=118 amount=2 +kerning first=120 second=122 amount=1 +kerning first=120 second=97 amount=1 +kerning first=120 second=110 amount=1 +kerning first=120 second=114 amount=1 +kerning first=120 second=120 amount=1 +kerning first=120 second=117 amount=1 +kerning first=120 second=35 amount=1 +kerning first=120 second=34 amount=1 +kerning first=120 second=39 amount=1 +kerning first=120 second=44 amount=1 +kerning first=120 second=46 amount=1 +kerning first=120 second=45 amount=-1 +kerning first=120 second=32 amount=1 +kerning first=99 second=106 amount=1 +kerning first=99 second=52 amount=1 +kerning first=99 second=53 amount=1 +kerning first=99 second=104 amount=1 +kerning first=99 second=102 amount=1 +kerning first=99 second=63 amount=-1 +kerning first=99 second=93 amount=-1 +kerning first=99 second=49 amount=-4 +kerning first=99 second=40 amount=1 +kerning first=99 second=108 amount=1 +kerning first=99 second=50 amount=-1 +kerning first=99 second=92 amount=-3 +kerning first=99 second=107 amount=1 +kerning first=99 second=105 amount=1 +kerning first=99 second=33 amount=1 +kerning first=99 second=121 amount=1 +kerning first=99 second=98 amount=1 +kerning first=99 second=100 amount=1 +kerning first=99 second=112 amount=1 +kerning first=99 second=113 amount=1 +kerning first=99 second=103 amount=1 +kerning first=99 second=116 amount=1 +kerning first=99 second=119 amount=1 +kerning first=99 second=118 amount=1 +kerning first=99 second=97 amount=1 +kerning first=99 second=110 amount=1 +kerning first=99 second=111 amount=1 +kerning first=99 second=114 amount=1 +kerning first=99 second=120 amount=1 +kerning first=99 second=99 amount=1 +kerning first=99 second=101 amount=1 +kerning first=99 second=115 amount=1 +kerning first=99 second=117 amount=1 +kerning first=99 second=58 amount=1 +kerning first=99 second=35 amount=1 +kerning first=99 second=34 amount=-2 +kerning first=99 second=39 amount=-2 +kerning first=99 second=46 amount=1 +kerning first=99 second=45 amount=1 +kerning first=101 second=106 amount=1 +kerning first=101 second=52 amount=1 +kerning first=101 second=53 amount=1 +kerning first=101 second=51 amount=1 +kerning first=101 second=55 amount=1 +kerning first=101 second=104 amount=1 +kerning first=101 second=57 amount=1 +kerning first=101 second=102 amount=1 +kerning first=101 second=63 amount=-1 +kerning first=101 second=49 amount=-2 +kerning first=101 second=40 amount=1 +kerning first=101 second=41 amount=1 +kerning first=101 second=108 amount=2 +kerning first=101 second=64 amount=1 +kerning first=101 second=50 amount=1 +kerning first=101 second=47 amount=2 +kerning first=101 second=92 amount=-2 +kerning first=101 second=107 amount=1 +kerning first=101 second=105 amount=2 +kerning first=101 second=33 amount=1 +kerning first=101 second=121 amount=1 +kerning first=101 second=98 amount=1 +kerning first=101 second=100 amount=2 +kerning first=101 second=112 amount=1 +kerning first=101 second=113 amount=1 +kerning first=101 second=103 amount=1 +kerning first=101 second=116 amount=2 +kerning first=101 second=59 amount=1 +kerning first=101 second=119 amount=2 +kerning first=101 second=109 amount=1 +kerning first=101 second=118 amount=2 +kerning first=101 second=122 amount=1 +kerning first=101 second=97 amount=2 +kerning first=101 second=110 amount=2 +kerning first=101 second=111 amount=2 +kerning first=101 second=114 amount=1 +kerning first=101 second=120 amount=2 +kerning first=101 second=99 amount=1 +kerning first=101 second=101 amount=1 +kerning first=101 second=115 amount=2 +kerning first=101 second=117 amount=1 +kerning first=101 second=58 amount=1 +kerning first=101 second=35 amount=1 +kerning first=101 second=34 amount=-1 +kerning first=101 second=39 amount=-1 +kerning first=101 second=44 amount=1 +kerning first=101 second=46 amount=2 +kerning first=101 second=45 amount=1 +kerning first=115 second=106 amount=1 +kerning first=115 second=53 amount=1 +kerning first=115 second=104 amount=1 +kerning first=115 second=102 amount=1 +kerning first=115 second=63 amount=-1 +kerning first=115 second=49 amount=-3 +kerning first=115 second=40 amount=1 +kerning first=115 second=41 amount=1 +kerning first=115 second=108 amount=1 +kerning first=115 second=47 amount=1 +kerning first=115 second=92 amount=-3 +kerning first=115 second=107 amount=1 +kerning first=115 second=105 amount=1 +kerning first=115 second=33 amount=1 +kerning first=115 second=121 amount=1 +kerning first=115 second=98 amount=1 +kerning first=115 second=100 amount=1 +kerning first=115 second=112 amount=1 +kerning first=115 second=113 amount=1 +kerning first=115 second=103 amount=1 +kerning first=115 second=116 amount=2 +kerning first=115 second=59 amount=1 +kerning first=115 second=119 amount=1 +kerning first=115 second=109 amount=1 +kerning first=115 second=118 amount=1 +kerning first=115 second=122 amount=1 +kerning first=115 second=97 amount=1 +kerning first=115 second=110 amount=1 +kerning first=115 second=111 amount=1 +kerning first=115 second=114 amount=1 +kerning first=115 second=120 amount=1 +kerning first=115 second=99 amount=1 +kerning first=115 second=101 amount=1 +kerning first=115 second=115 amount=1 +kerning first=115 second=117 amount=1 +kerning first=115 second=58 amount=1 +kerning first=115 second=35 amount=1 +kerning first=115 second=34 amount=-2 +kerning first=115 second=39 amount=-2 +kerning first=115 second=46 amount=1 +kerning first=117 second=106 amount=1 +kerning first=117 second=52 amount=1 +kerning first=117 second=51 amount=-1 +kerning first=117 second=104 amount=1 +kerning first=117 second=102 amount=1 +kerning first=117 second=56 amount=-1 +kerning first=117 second=63 amount=-1 +kerning first=117 second=93 amount=-1 +kerning first=117 second=49 amount=-3 +kerning first=117 second=40 amount=1 +kerning first=117 second=108 amount=1 +kerning first=117 second=50 amount=-1 +kerning first=117 second=92 amount=-2 +kerning first=117 second=107 amount=1 +kerning first=117 second=105 amount=1 +kerning first=117 second=33 amount=1 +kerning first=117 second=121 amount=1 +kerning first=117 second=98 amount=1 +kerning first=117 second=100 amount=1 +kerning first=117 second=112 amount=1 +kerning first=117 second=113 amount=1 +kerning first=117 second=103 amount=1 +kerning first=117 second=116 amount=2 +kerning first=117 second=59 amount=1 +kerning first=117 second=119 amount=2 +kerning first=117 second=109 amount=1 +kerning first=117 second=118 amount=2 +kerning first=117 second=97 amount=1 +kerning first=117 second=110 amount=1 +kerning first=117 second=111 amount=1 +kerning first=117 second=114 amount=1 +kerning first=117 second=120 amount=1 +kerning first=117 second=99 amount=1 +kerning first=117 second=101 amount=1 +kerning first=117 second=115 amount=1 +kerning first=117 second=117 amount=1 +kerning first=117 second=35 amount=1 +kerning first=117 second=34 amount=-2 +kerning first=117 second=39 amount=-2 +kerning first=117 second=44 amount=-1 +kerning first=117 second=45 amount=1 +kerning first=58 second=87 amount=-1 +kerning first=58 second=77 amount=-1 +kerning first=58 second=89 amount=-2 +kerning first=58 second=65 amount=-1 +kerning first=58 second=52 amount=-1 +kerning first=58 second=86 amount=-1 +kerning first=58 second=53 amount=-1 +kerning first=58 second=84 amount=-2 +kerning first=58 second=51 amount=-1 +kerning first=58 second=55 amount=-1 +kerning first=58 second=54 amount=-1 +kerning first=58 second=57 amount=-1 +kerning first=58 second=48 amount=-1 +kerning first=58 second=74 amount=-2 +kerning first=58 second=56 amount=-1 +kerning first=58 second=63 amount=-1 +kerning first=58 second=93 amount=-1 +kerning first=58 second=49 amount=-4 +kerning first=58 second=64 amount=-1 +kerning first=58 second=50 amount=-1 +kerning first=58 second=92 amount=-3 +kerning first=58 second=121 amount=1 +kerning first=58 second=116 amount=1 +kerning first=58 second=119 amount=1 +kerning first=58 second=118 amount=1 +kerning first=58 second=114 amount=1 +kerning first=58 second=120 amount=1 +kerning first=58 second=58 amount=-1 +kerning first=58 second=34 amount=-2 +kerning first=58 second=39 amount=-1 +kerning first=58 second=45 amount=-2 +kerning first=35 second=106 amount=1 +kerning first=35 second=81 amount=1 +kerning first=35 second=72 amount=1 +kerning first=35 second=88 amount=-2 +kerning first=35 second=89 amount=-1 +kerning first=35 second=90 amount=-3 +kerning first=35 second=65 amount=-1 +kerning first=35 second=53 amount=-1 +kerning first=35 second=71 amount=1 +kerning first=35 second=79 amount=1 +kerning first=35 second=85 amount=1 +kerning first=35 second=51 amount=-1 +kerning first=35 second=55 amount=-1 +kerning first=35 second=67 amount=1 +kerning first=35 second=57 amount=-1 +kerning first=35 second=74 amount=-1 +kerning first=35 second=102 amount=1 +kerning first=35 second=56 amount=-1 +kerning first=35 second=63 amount=1 +kerning first=35 second=93 amount=-2 +kerning first=35 second=49 amount=-3 +kerning first=35 second=40 amount=1 +kerning first=35 second=41 amount=-1 +kerning first=35 second=108 amount=1 +kerning first=35 second=50 amount=-1 +kerning first=35 second=47 amount=-2 +kerning first=35 second=92 amount=-1 +kerning first=35 second=107 amount=1 +kerning first=35 second=105 amount=1 +kerning first=35 second=33 amount=1 +kerning first=35 second=121 amount=1 +kerning first=35 second=112 amount=1 +kerning first=35 second=113 amount=1 +kerning first=35 second=103 amount=1 +kerning first=35 second=116 amount=1 +kerning first=35 second=119 amount=2 +kerning first=35 second=109 amount=1 +kerning first=35 second=118 amount=2 +kerning first=35 second=122 amount=-1 +kerning first=35 second=97 amount=1 +kerning first=35 second=110 amount=1 +kerning first=35 second=111 amount=1 +kerning first=35 second=114 amount=1 +kerning first=35 second=120 amount=1 +kerning first=35 second=117 amount=1 +kerning first=35 second=34 amount=1 +kerning first=35 second=39 amount=1 +kerning first=35 second=44 amount=-5 +kerning first=35 second=46 amount=-3 +kerning first=42 second=83 amount=1 +kerning first=42 second=93 amount=1 +kerning first=42 second=113 amount=1 +kerning first=42 second=103 amount=1 +kerning first=34 second=106 amount=1 +kerning first=34 second=87 amount=1 +kerning first=34 second=88 amount=1 +kerning first=34 second=89 amount=1 +kerning first=34 second=90 amount=-1 +kerning first=34 second=65 amount=-3 +kerning first=34 second=75 amount=1 +kerning first=34 second=52 amount=-3 +kerning first=34 second=86 amount=1 +kerning first=34 second=53 amount=-1 +kerning first=34 second=84 amount=1 +kerning first=34 second=85 amount=1 +kerning first=34 second=66 amount=1 +kerning first=34 second=80 amount=1 +kerning first=34 second=54 amount=-1 +kerning first=34 second=57 amount=-1 +kerning first=34 second=48 amount=-1 +kerning first=34 second=74 amount=-4 +kerning first=34 second=76 amount=1 +kerning first=34 second=102 amount=-1 +kerning first=34 second=56 amount=-1 +kerning first=34 second=63 amount=1 +kerning first=34 second=93 amount=1 +kerning first=34 second=49 amount=-2 +kerning first=34 second=41 amount=1 +kerning first=34 second=108 amount=1 +kerning first=34 second=64 amount=-3 +kerning first=34 second=82 amount=1 +kerning first=34 second=50 amount=-1 +kerning first=34 second=47 amount=-1 +kerning first=34 second=92 amount=1 +kerning first=34 second=107 amount=1 +kerning first=34 second=73 amount=1 +kerning first=34 second=105 amount=1 +kerning first=34 second=33 amount=1 +kerning first=34 second=121 amount=2 +kerning first=34 second=98 amount=1 +kerning first=34 second=100 amount=-2 +kerning first=34 second=112 amount=1 +kerning first=34 second=113 amount=-1 +kerning first=34 second=103 amount=-1 +kerning first=34 second=116 amount=-1 +kerning first=34 second=119 amount=1 +kerning first=34 second=109 amount=1 +kerning first=34 second=118 amount=1 +kerning first=34 second=122 amount=-1 +kerning first=34 second=97 amount=-2 +kerning first=34 second=110 amount=1 +kerning first=34 second=111 amount=-1 +kerning first=34 second=120 amount=1 +kerning first=34 second=99 amount=-2 +kerning first=34 second=101 amount=-2 +kerning first=34 second=115 amount=-1 +kerning first=34 second=117 amount=1 +kerning first=34 second=35 amount=-1 +kerning first=34 second=34 amount=1 +kerning first=34 second=39 amount=1 +kerning first=34 second=44 amount=-3 +kerning first=34 second=46 amount=-2 +kerning first=34 second=45 amount=-1 +kerning first=39 second=87 amount=1 +kerning first=39 second=88 amount=1 +kerning first=39 second=89 amount=1 +kerning first=39 second=90 amount=-1 +kerning first=39 second=65 amount=-3 +kerning first=39 second=75 amount=1 +kerning first=39 second=52 amount=-2 +kerning first=39 second=78 amount=1 +kerning first=39 second=86 amount=1 +kerning first=39 second=53 amount=-1 +kerning first=39 second=84 amount=1 +kerning first=39 second=85 amount=1 +kerning first=39 second=66 amount=1 +kerning first=39 second=68 amount=1 +kerning first=39 second=80 amount=1 +kerning first=39 second=104 amount=1 +kerning first=39 second=54 amount=-1 +kerning first=39 second=74 amount=-4 +kerning first=39 second=76 amount=1 +kerning first=39 second=102 amount=-1 +kerning first=39 second=63 amount=1 +kerning first=39 second=69 amount=1 +kerning first=39 second=93 amount=1 +kerning first=39 second=49 amount=-1 +kerning first=39 second=41 amount=1 +kerning first=39 second=108 amount=1 +kerning first=39 second=64 amount=-5 +kerning first=39 second=82 amount=1 +kerning first=39 second=50 amount=-1 +kerning first=39 second=47 amount=-4 +kerning first=39 second=92 amount=2 +kerning first=39 second=107 amount=1 +kerning first=39 second=73 amount=1 +kerning first=39 second=105 amount=1 +kerning first=39 second=33 amount=1 +kerning first=39 second=121 amount=1 +kerning first=39 second=98 amount=1 +kerning first=39 second=100 amount=-2 +kerning first=39 second=113 amount=-2 +kerning first=39 second=103 amount=-1 +kerning first=39 second=116 amount=-1 +kerning first=39 second=59 amount=-1 +kerning first=39 second=118 amount=1 +kerning first=39 second=122 amount=-1 +kerning first=39 second=97 amount=-1 +kerning first=39 second=111 amount=-2 +kerning first=39 second=114 amount=-1 +kerning first=39 second=99 amount=-2 +kerning first=39 second=101 amount=-2 +kerning first=39 second=115 amount=-2 +kerning first=39 second=58 amount=-1 +kerning first=39 second=35 amount=-1 +kerning first=39 second=34 amount=1 +kerning first=39 second=39 amount=1 +kerning first=39 second=44 amount=-3 +kerning first=39 second=46 amount=-1 +kerning first=39 second=45 amount=-2 +kerning first=44 second=106 amount=1 +kerning first=44 second=87 amount=-3 +kerning first=44 second=81 amount=-2 +kerning first=44 second=88 amount=1 +kerning first=44 second=89 amount=-3 +kerning first=44 second=90 amount=1 +kerning first=44 second=65 amount=1 +kerning first=44 second=52 amount=-2 +kerning first=44 second=86 amount=-2 +kerning first=44 second=71 amount=-1 +kerning first=44 second=79 amount=-2 +kerning first=44 second=83 amount=-1 +kerning first=44 second=84 amount=-1 +kerning first=44 second=85 amount=-1 +kerning first=44 second=51 amount=-1 +kerning first=44 second=55 amount=1 +kerning first=44 second=80 amount=1 +kerning first=44 second=54 amount=-2 +kerning first=44 second=57 amount=-2 +kerning first=44 second=48 amount=-1 +kerning first=44 second=74 amount=-2 +kerning first=44 second=102 amount=-1 +kerning first=44 second=56 amount=-1 +kerning first=44 second=63 amount=-2 +kerning first=44 second=49 amount=-3 +kerning first=44 second=41 amount=1 +kerning first=44 second=108 amount=1 +kerning first=44 second=64 amount=-1 +kerning first=44 second=50 amount=1 +kerning first=44 second=47 amount=2 +kerning first=44 second=92 amount=-4 +kerning first=44 second=107 amount=1 +kerning first=44 second=73 amount=1 +kerning first=44 second=105 amount=1 +kerning first=44 second=33 amount=1 +kerning first=44 second=121 amount=-2 +kerning first=44 second=98 amount=1 +kerning first=44 second=113 amount=-1 +kerning first=44 second=116 amount=-1 +kerning first=44 second=59 amount=2 +kerning first=44 second=119 amount=-1 +kerning first=44 second=109 amount=-1 +kerning first=44 second=118 amount=-1 +kerning first=44 second=122 amount=1 +kerning first=44 second=97 amount=1 +kerning first=44 second=110 amount=1 +kerning first=44 second=114 amount=1 +kerning first=44 second=120 amount=1 +kerning first=44 second=58 amount=1 +kerning first=44 second=35 amount=-2 +kerning first=44 second=34 amount=-2 +kerning first=44 second=39 amount=-4 +kerning first=44 second=44 amount=1 +kerning first=44 second=46 amount=1 +kerning first=44 second=45 amount=-2 +kerning first=46 second=106 amount=1 +kerning first=46 second=87 amount=-2 +kerning first=46 second=88 amount=1 +kerning first=46 second=89 amount=-2 +kerning first=46 second=90 amount=2 +kerning first=46 second=65 amount=1 +kerning first=46 second=52 amount=-3 +kerning first=46 second=86 amount=-1 +kerning first=46 second=53 amount=1 +kerning first=46 second=79 amount=-1 +kerning first=46 second=84 amount=-2 +kerning first=46 second=85 amount=-1 +kerning first=46 second=55 amount=1 +kerning first=46 second=80 amount=1 +kerning first=46 second=104 amount=1 +kerning first=46 second=54 amount=-1 +kerning first=46 second=48 amount=-1 +kerning first=46 second=74 amount=-1 +kerning first=46 second=102 amount=-1 +kerning first=46 second=63 amount=-2 +kerning first=46 second=49 amount=-3 +kerning first=46 second=41 amount=1 +kerning first=46 second=108 amount=1 +kerning first=46 second=50 amount=1 +kerning first=46 second=47 amount=1 +kerning first=46 second=92 amount=-5 +kerning first=46 second=107 amount=1 +kerning first=46 second=73 amount=1 +kerning first=46 second=105 amount=1 +kerning first=46 second=33 amount=1 +kerning first=46 second=121 amount=-2 +kerning first=46 second=98 amount=1 +kerning first=46 second=100 amount=1 +kerning first=46 second=112 amount=1 +kerning first=46 second=103 amount=1 +kerning first=46 second=116 amount=-1 +kerning first=46 second=59 amount=1 +kerning first=46 second=118 amount=-1 +kerning first=46 second=122 amount=1 +kerning first=46 second=97 amount=1 +kerning first=46 second=110 amount=1 +kerning first=46 second=111 amount=1 +kerning first=46 second=114 amount=1 +kerning first=46 second=120 amount=1 +kerning first=46 second=99 amount=1 +kerning first=46 second=115 amount=1 +kerning first=46 second=117 amount=1 +kerning first=46 second=58 amount=1 +kerning first=46 second=35 amount=-4 +kerning first=46 second=34 amount=-4 +kerning first=46 second=39 amount=-1 +kerning first=46 second=44 amount=1 +kerning first=46 second=46 amount=1 +kerning first=46 second=45 amount=-2 +kerning first=45 second=87 amount=-1 +kerning first=45 second=81 amount=1 +kerning first=45 second=72 amount=1 +kerning first=45 second=88 amount=-2 +kerning first=45 second=89 amount=-3 +kerning first=45 second=90 amount=-2 +kerning first=45 second=65 amount=-1 +kerning first=45 second=52 amount=1 +kerning first=45 second=86 amount=-1 +kerning first=45 second=53 amount=-1 +kerning first=45 second=71 amount=1 +kerning first=45 second=79 amount=1 +kerning first=45 second=83 amount=-2 +kerning first=45 second=84 amount=-2 +kerning first=45 second=51 amount=-2 +kerning first=45 second=55 amount=-3 +kerning first=45 second=67 amount=1 +kerning first=45 second=57 amount=-1 +kerning first=45 second=56 amount=-2 +kerning first=45 second=63 amount=-1 +kerning first=45 second=93 amount=-4 +kerning first=45 second=49 amount=-4 +kerning first=45 second=40 amount=1 +kerning first=45 second=41 amount=-1 +kerning first=45 second=108 amount=1 +kerning first=45 second=50 amount=-4 +kerning first=45 second=47 amount=-2 +kerning first=45 second=92 amount=-4 +kerning first=45 second=107 amount=1 +kerning first=45 second=105 amount=1 +kerning first=45 second=33 amount=1 +kerning first=45 second=100 amount=1 +kerning first=45 second=113 amount=1 +kerning first=45 second=103 amount=1 +kerning first=45 second=116 amount=1 +kerning first=45 second=119 amount=1 +kerning first=45 second=118 amount=1 +kerning first=45 second=122 amount=-2 +kerning first=45 second=110 amount=1 +kerning first=45 second=111 amount=1 +kerning first=45 second=114 amount=1 +kerning first=45 second=120 amount=-1 +kerning first=45 second=99 amount=1 +kerning first=45 second=101 amount=1 +kerning first=45 second=117 amount=1 +kerning first=45 second=58 amount=-1 +kerning first=45 second=35 amount=1 +kerning first=45 second=34 amount=-1 +kerning first=45 second=39 amount=-1 +kerning first=45 second=44 amount=-3 +kerning first=45 second=46 amount=-3 +kerning first=45 second=45 amount=1 +kerning first=126 second=33 amount=-1 +kerning first=126 second=32 amount=-1 +kerning first=32 second=53 amount=-1 +kerning first=32 second=83 amount=1 +kerning first=32 second=123 amount=1 diff --git a/tests/js-tests/resjs/ccb/markerfelt24shadow.png b/tests/js-tests/resjs/ccb/markerfelt24shadow.png new file mode 100644 index 0000000000..5bab028496 Binary files /dev/null and b/tests/js-tests/resjs/ccb/markerfelt24shadow.png differ diff --git a/tests/js-tests/resjs/ccb/particle-fire.png b/tests/js-tests/resjs/ccb/particle-fire.png new file mode 100644 index 0000000000..81c6d2410b Binary files /dev/null and b/tests/js-tests/resjs/ccb/particle-fire.png differ diff --git a/tests/js-tests/resjs/ccb/particle-smoke.png b/tests/js-tests/resjs/ccb/particle-smoke.png new file mode 100644 index 0000000000..a289b1371e Binary files /dev/null and b/tests/js-tests/resjs/ccb/particle-smoke.png differ diff --git a/tests/js-tests/resjs/ccb/particle-snow.png b/tests/js-tests/resjs/ccb/particle-snow.png new file mode 100644 index 0000000000..9e12963498 Binary files /dev/null and b/tests/js-tests/resjs/ccb/particle-snow.png differ diff --git a/tests/js-tests/resjs/ccb/particle-stars.png b/tests/js-tests/resjs/ccb/particle-stars.png new file mode 100644 index 0000000000..f493dcc334 Binary files /dev/null and b/tests/js-tests/resjs/ccb/particle-stars.png differ diff --git a/tests/js-tests/resjs/ccb/scale-9-demo.png b/tests/js-tests/resjs/ccb/scale-9-demo.png new file mode 100644 index 0000000000..ee4537207f Binary files /dev/null and b/tests/js-tests/resjs/ccb/scale-9-demo.png differ diff --git a/tests/js-tests/src/ActionsTest/ActionsTest.js b/tests/js-tests/src/ActionsTest/ActionsTest.js index 8fae9eecaa..7952e6c8a5 100644 --- a/tests/js-tests/src/ActionsTest/ActionsTest.js +++ b/tests/js-tests/src/ActionsTest/ActionsTest.js @@ -974,7 +974,7 @@ var ActionAnimate = ActionsDemo.extend({ // var animation = new cc.Animation(); for (var i = 1; i < 15; i++) { - var frameName = "res/Images/grossini_dance_" + ((i < 10) ? ("0" + i) : i) + ".png"; + var frameName = "Images/grossini_dance_" + ((i < 10) ? ("0" + i) : i) + ".png"; animation.addSpriteFrameWithFile(frameName); } animation.setDelayPerUnit(2.8 / 14); @@ -2559,7 +2559,7 @@ var Issue1438 = ActionsDemo.extend({ // Add 60 frames for (var j = 0; j < 4; j++) { for (var i = 1; i < 15; i++) { - var frameName = "res/Images/grossini_dance_" + ((i < 10) ? ("0" + i) : i) + ".png"; + var frameName = "Images/grossini_dance_" + ((i < 10) ? ("0" + i) : i) + ".png"; animation.addSpriteFrameWithFile(frameName); } } diff --git a/tests/js-tests/src/CocoStudioTest/ArmatureTest/ArmatureTest.js b/tests/js-tests/src/CocoStudioTest/ArmatureTest/ArmatureTest.js index 8881ff875f..60d38c45bb 100644 --- a/tests/js-tests/src/CocoStudioTest/ArmatureTest/ArmatureTest.js +++ b/tests/js-tests/src/CocoStudioTest/ArmatureTest/ArmatureTest.js @@ -558,9 +558,9 @@ var TestParticleDisplay = ArmatureTestLayer.extend({ this.armature.getAnimation().setSpeedScale(0.5); this.addChild(this.armature); - var p1 = new cc.ParticleSystem("res/Particles/SmallSun.plist"); + var p1 = new cc.ParticleSystem("Particles/SmallSun.plist"); p1.setTotalParticles(30); - var p2 = new cc.ParticleSystem("res/Particles/SmallSun.plist"); + var p2 = new cc.ParticleSystem("Particles/SmallSun.plist"); p2.setTotalParticles(30); var bone = new ccs.Bone("p1"); bone.addDisplay(p1, 0); diff --git a/tests/js-tests/src/CocoStudioTest/ComponentsTest/ComponentsTestScene.js b/tests/js-tests/src/CocoStudioTest/ComponentsTest/ComponentsTestScene.js index 5d13cf29bb..3051d2b3b2 100644 --- a/tests/js-tests/src/CocoStudioTest/ComponentsTest/ComponentsTestScene.js +++ b/tests/js-tests/src/CocoStudioTest/ComponentsTest/ComponentsTestScene.js @@ -42,7 +42,7 @@ var ComponentsTestLayer = cc.LayerColor.extend({ createGameScene: function () { var root = new cc.Node(); var winSize = cc.director.getWinSize(); - var player = new cc.Sprite("res/components/Player.png", cc.rect(0, 0, 27, 40)); + var player = new cc.Sprite("components/Player.png", cc.rect(0, 0, 27, 40)); player.x = 30; player.y = winSize.height / 2; root.addChild(player, 1, 1); @@ -59,7 +59,7 @@ var ComponentsTestLayer = cc.LayerColor.extend({ }, toExtensionsMainLayer: function (sender) { - cc.audioEngine.stopMusic("res/Sound/background-music-aac.wav"); + cc.audioEngine.stopMusic("background-music-aac.wav"); var scene = new CocoStudioTestScene(); scene.runThisTest(); } diff --git a/tests/js-tests/src/CocoStudioTest/ComponentsTest/PlayerController.js b/tests/js-tests/src/CocoStudioTest/ComponentsTest/PlayerController.js index 03dc538619..d49f7c1526 100644 --- a/tests/js-tests/src/CocoStudioTest/ComponentsTest/PlayerController.js +++ b/tests/js-tests/src/CocoStudioTest/ComponentsTest/PlayerController.js @@ -44,14 +44,14 @@ var PlayerController = ccs.ComController.extend({ onTouchesEnded: function (touch, event) { var location = touch[0].getLocation(); - var projectile = new cc.Sprite("res/components/Projectile.png", cc.rect(0, 0, 20, 20)); + var projectile = new cc.Sprite("components/Projectile.png", cc.rect(0, 0, 20, 20)); this.getOwner().parent.addChild(projectile, 1, 4); var com = ProjectileController.create(); projectile.addComponent(com); com.move(location.x, location.y); - this.getOwner().getComponent("Audio").playEffect("res/Sound/pew-pew-lei.wav"); + this.getOwner().getComponent("Audio").playEffect("pew-pew-lei.wav"); }, onExit:function(){ cc.eventManager.removeListener(this._listener1); diff --git a/tests/js-tests/src/CocoStudioTest/ComponentsTest/SceneController.js b/tests/js-tests/src/CocoStudioTest/ComponentsTest/SceneController.js index e244174e99..ea4a515ea1 100644 --- a/tests/js-tests/src/CocoStudioTest/ComponentsTest/SceneController.js +++ b/tests/js-tests/src/CocoStudioTest/ComponentsTest/SceneController.js @@ -43,7 +43,7 @@ var SceneController = ccs.ComController.extend({ this._addTargetTime = 1; this._targets = []; this._projectiles = []; - this.getOwner().getComponent("Audio").playBackgroundMusic("res/Sound/background-music-aac.wav", true); + this.getOwner().getComponent("Audio").playBackgroundMusic("background-music-aac.wav", true); this.getOwner().getComponent("CCComAttribute").setInt("KillCount", 0); }, @@ -60,7 +60,7 @@ var SceneController = ccs.ComController.extend({ }, addTarget: function () { - var target = new cc.Sprite("res/components/Target.png", cc.rect(0, 0, 27, 40)); + var target = new cc.Sprite("components/Target.png", cc.rect(0, 0, 27, 40)); this.getOwner().addChild(target, 1, 2); target.addComponent(EnemyController.create()); target.tag = 2; diff --git a/tests/js-tests/src/CocoStudioTest/CustomTest/CustomImageScene/CustomImageScene.js b/tests/js-tests/src/CocoStudioTest/CustomTest/CustomImageScene/CustomImageScene.js index 57042f3e62..32193417af 100644 --- a/tests/js-tests/src/CocoStudioTest/CustomTest/CustomImageScene/CustomImageScene.js +++ b/tests/js-tests/src/CocoStudioTest/CustomTest/CustomImageScene/CustomImageScene.js @@ -33,7 +33,7 @@ var CustomImageLayer = cc.Layer.extend({ customImageViewReader, customImageViewReader.setProperties); - var layout = guiReader.widgetFromJsonFile("res/cocosui/CustomImageViewTest/NewProject_2_1.ExportJson"); + var layout = guiReader.widgetFromJsonFile("css-res/cocosui/CustomImageViewTest/NewProject_2_1.ExportJson"); this.addChild(layout); } }); diff --git a/tests/js-tests/src/CocoStudioTest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.js b/tests/js-tests/src/CocoStudioTest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.js index 772f2c1c2e..3b150a183f 100644 --- a/tests/js-tests/src/CocoStudioTest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.js +++ b/tests/js-tests/src/CocoStudioTest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.js @@ -35,7 +35,7 @@ var CustomParticleWidgetLayer = cc.Layer.extend({ var custom = CustomParticleWidget.create(); custom.setPosition(cc.p(370, 210)); - custom.setParticlePlist("res/Particles/BoilingFoam.plist"); + custom.setParticlePlist("Particles/BoilingFoam.plist"); this.addChild(custom, 10, -1); } diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UIButtonTest/UIButtonTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UIButtonTest/UIButtonTest.js index cfff52221a..e782f88291 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UIButtonTest/UIButtonTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UIButtonTest/UIButtonTest.js @@ -27,7 +27,7 @@ var UIButtonEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/Button/Button_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UIButton/Button_1.json"); this._mainNode.addChild(root); var back_label = ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UICheckBoxTest/UICheckBoxTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UICheckBoxTest/UICheckBoxTest.js index d5f89573a4..e9b09bd745 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UICheckBoxTest/UICheckBoxTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UICheckBoxTest/UICheckBoxTest.js @@ -29,7 +29,7 @@ var UICheckBoxEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); var left_button = new ccui.Button(); - left_button.loadTextures("res/Images/b1.png", "res/Images/b2.png", ""); + left_button.loadTextures("Images/b1.png", "Images/b2.png", ""); left_button.x = 240-50; left_button.y = 50; left_button.anchorX = 0.5; @@ -38,7 +38,7 @@ var UICheckBoxEditorTest = UIBaseLayer.extend({ this._mainNode.addChild(left_button, 999); var right_button = new ccui.Button(); - right_button.loadTextures("res/Images/f1.png", "res/Images/f2.png", ""); + right_button.loadTextures("Images/f1.png", "Images/f2.png", ""); right_button.x = 240+50; right_button.y = 50; right_button.anchorX = 0.5; @@ -86,7 +86,7 @@ var UICheckBoxEditorTest = UIBaseLayer.extend({ var UICheckBoxOldTest = UICheckBoxEditorTest.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/CheckBox/checkbox_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UICheckBox/checkbox_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); @@ -100,7 +100,7 @@ var UICheckBoxOldTest = UICheckBoxEditorTest.extend({ var UICheckBoxNewTest = UICheckBoxEditorTest.extend({ ctor: function () { this._super(); - var root = ccs.load("res/cocosui/CCS/CheckBox/MainScene.json"); + var root = ccs.load("ccs-res/cocosui/UIEditorTest/UICheckBox/MainScene.json"); this._mainNode.addChild(root.node); var checkbox = ccui.helper.seekWidgetByName(root.node, "CheckBox_1"); checkbox.addEventListener(this.selectedStateEvent,this); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UIImageViewTest/UIImageViewTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UIImageViewTest/UIImageViewTest.js index f92f400761..30a8b24e6a 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UIImageViewTest/UIImageViewTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UIImageViewTest/UIImageViewTest.js @@ -27,7 +27,7 @@ var UIImageViewEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/ImageView/ImageView_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UIImageView/ImageView_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UILayoutTest/UILayoutTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UILayoutTest/UILayoutTest.js index 6284598fca..399c64315c 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UILayoutTest/UILayoutTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UILayoutTest/UILayoutTest.js @@ -24,15 +24,15 @@ THE SOFTWARE. ****************************************************************************/ var LAYOUT_RES = [ - "res/cocosui/CCS/Layout/Layout/layout_1.json", - "res/cocosui/CCS/Layout/Color/color_1.json", - "res/cocosui/CCS/Layout/Gradient_Color/gradient_color_1.json", - "res/cocosui/CCS/Layout/BackgroundImage/backgroundimage_1.json", - "res/cocosui/CCS/Layout/Scale9/scale9.json", - "res/cocosui/CCS/Layout/Linear_Vertical/linear_vertical.json", - "res/cocosui/CCS/Layout/Linear_Horizontal/linear_horizontal.json", - "res/cocosui/CCS/Layout/Relative_Align_Parent/relative_align_parent.json", - "res/cocosui/CCS/Layout/Relative_Align_Location/relative_align_location.json" + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/layout_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/color_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/gradient_color_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/backgroundimage_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/scale9.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/linear_vertical.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/linear_horizontal.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/relative_align_parent.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/relative_align_location.json" ]; var LAYOUT_INDEX = 0; var UILayoutEditorTest = UIBaseLayer.extend({ @@ -45,7 +45,7 @@ var UILayoutEditorTest = UIBaseLayer.extend({ back_label.addTouchEventListener(this.backEvent, this); var left_button = new ccui.Button(); - left_button.loadTextures("res/Images/b1.png", "res/Images/b2.png", ""); + left_button.loadTextures("Images/b1.png", "Images/b2.png", ""); left_button.x = 240-50; left_button.y = 50; left_button.anchorX = 0.5; @@ -55,7 +55,7 @@ var UILayoutEditorTest = UIBaseLayer.extend({ this._mainNode.addChild(left_button); var right_button = new ccui.Button(); - right_button.loadTextures("res/Images/f1.png", "res/Images/f2.png", ""); + right_button.loadTextures("Images/f1.png", "Images/f2.png", ""); right_button.x = 240+50; right_button.y = 50; right_button.zOrder = 999; diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UIListViewTest/UIListViewTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UIListViewTest/UIListViewTest.js index 54201c6dcb..11aad78a66 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UIListViewTest/UIListViewTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UIListViewTest/UIListViewTest.js @@ -24,8 +24,8 @@ THE SOFTWARE. ****************************************************************************/ var LISTVIEW_RES = [ - "res/cocosui/CCS/ListView/Vertical/vertical_1.json", - "res/cocosui/CCS/ListView/Horizontal/horizontal_1.json" + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/vertical_1.json", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/horizontal_1.json" ]; var LISTVIEW_INDEX = 0; var UIListViewEditorTest = UIBaseLayer.extend({ @@ -41,7 +41,7 @@ var UIListViewEditorTest = UIBaseLayer.extend({ listView.addEventListener(this.selectedItemEvent,this); var left_button = new ccui.Button(); - left_button.loadTextures("res/Images/b1.png", "res/Images/b2.png", ""); + left_button.loadTextures("Images/b1.png", "Images/b2.png", ""); left_button.x = 240-50; left_button.y = 50; left_button.anchorX = 0.5; @@ -51,7 +51,7 @@ var UIListViewEditorTest = UIBaseLayer.extend({ this._mainNode.addChild(left_button); var right_button = new ccui.Button(); - right_button.loadTextures("res/Images/f1.png", "res/Images/f2.png", ""); + right_button.loadTextures("Images/f1.png", "Images/f2.png", ""); right_button.x = 240+50; right_button.y = 50; right_button.zOrder = 999; diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UILoadingBarTest/UILoadingBarTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UILoadingBarTest/UILoadingBarTest.js index 677f71301b..6be9d13de9 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UILoadingBarTest/UILoadingBarTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UILoadingBarTest/UILoadingBarTest.js @@ -30,7 +30,7 @@ var UILoadingBarEditorTest = UIBaseLayer.extend({ _loadingBar_right_to_left:null, ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/LoadingBar/loadingbar_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UILoadingBar/loadingbar_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UINodeContainerTest/UINodeContainerTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UINodeContainerTest/UINodeContainerTest.js index f2f047cb0c..d03af69b74 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UINodeContainerTest/UINodeContainerTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UINodeContainerTest/UINodeContainerTest.js @@ -27,13 +27,13 @@ var UIWidgetAddNodeEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/WidgetAddNode/widget_add_node.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UIWidgetAddNode/widget_add_node.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); back_label.addTouchEventListener(this.backEvent,this); - var sprite = new cc.Sprite("res/cocosui/ccicon.png"); + var sprite = new cc.Sprite("ccs-res/cocosui/ccicon.png"); sprite.x = 240; sprite.y = 160; root.addNode(sprite,9999); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UIPageViewTest/UIPageViewTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UIPageViewTest/UIPageViewTest.js index f50749bfe0..94c20a1838 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UIPageViewTest/UIPageViewTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UIPageViewTest/UIPageViewTest.js @@ -27,7 +27,7 @@ var UIPageViewEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/PageView/pageview_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UIPageView/pageview_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UIRichTextTest/UIRichTextTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UIRichTextTest/UIRichTextTest.js index 16c0ce2324..6a1f9a0617 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UIRichTextTest/UIRichTextTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UIRichTextTest/UIRichTextTest.js @@ -35,7 +35,7 @@ var UIRichTextTest = UISceneEditor.extend({ var widgetSize = this._widget.getContentSize(); var button = new ccui.Button(); button.setTouchEnabled(true); - button.loadTextures("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png", ""); + button.loadTextures("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png", ""); button.setTitleText("switch"); button.setPosition(cc.p(widgetSize.width / 2, widgetSize.height / 2 + button.getContentSize().height * 2.5)); button.addTouchEventListener(this.touchEvent,this); @@ -53,9 +53,9 @@ var UIRichTextTest = UISceneEditor.extend({ var re4 = new ccui.RichElementText(4, cc.color.GREEN, 255, "And green. ", "Helvetica", 10); var re5 = new ccui.RichElementText(5, cc.color.RED, 255, "Last one is red ", "Helvetica", 10); - var reimg = new ccui.RichElementImage(6, cc.color.WHITE, 255, "res/cocosui/sliderballnormal.png"); + var reimg = new ccui.RichElementImage(6, cc.color.WHITE, 255, "ccs-res/cocosui/sliderballnormal.png"); - ccs.armatureDataManager.addArmatureFileInfo("res/cocosui/100/100.ExportJson"); + ccs.armatureDataManager.addArmatureFileInfo("ccs-res/cocosui/100/100.ExportJson"); var pAr = new ccs.Armature("100"); pAr.getAnimation().play("Animation1"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UIScrollViewTest/UIScrollViewTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UIScrollViewTest/UIScrollViewTest.js index 6bf63a4bfc..9a3d2bfcac 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UIScrollViewTest/UIScrollViewTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UIScrollViewTest/UIScrollViewTest.js @@ -25,9 +25,9 @@ ****************************************************************************/ var SCROLLVIEW_RES = [ - "res/cocosui/CCS/ScrollView/Vertical/vertical_1.json", - "res/cocosui/CCS/ScrollView/Horizontal/horizontal_1.json", - "res/cocosui/CCS/ScrollView/Both/both_1.json" + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/vertical_1.json", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/horizontal_1.json", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/both_1.json" ]; var SCROLLVIEW_INDEX = 0; var UIScrollViewEditorTest = UIBaseLayer.extend({ @@ -40,7 +40,7 @@ var UIScrollViewEditorTest = UIBaseLayer.extend({ back_label.addTouchEventListener(this.backEvent, this); var left_button = new ccui.Button(); - left_button.loadTextures("res/Images/b1.png", "res/Images/b2.png", ""); + left_button.loadTextures("Images/b1.png", "Images/b2.png", ""); left_button.x = 240-50; left_button.y = 50; left_button.anchorX = 0.5; @@ -50,7 +50,7 @@ var UIScrollViewEditorTest = UIBaseLayer.extend({ this._mainNode.addChild(left_button); var right_button = new ccui.Button(); - right_button.loadTextures("res/Images/f1.png", "res/Images/f2.png", ""); + right_button.loadTextures("Images/f1.png", "Images/f2.png", ""); right_button.x = 240+50; right_button.y = 50; right_button.zOrder = 999; diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UISliderTest/UISliderTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UISliderTest/UISliderTest.js index 727e9cddc3..5540ba681f 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UISliderTest/UISliderTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UISliderTest/UISliderTest.js @@ -27,7 +27,7 @@ var UISliderEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/Slider/slider_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UISlider/slider_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UITextAtlasTest/UITextAtlasTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UITextAtlasTest/UITextAtlasTest.js index d7aed9254c..8871058d71 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UITextAtlasTest/UITextAtlasTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UITextAtlasTest/UITextAtlasTest.js @@ -28,7 +28,7 @@ var UITextAtlasEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/LabelAtlas/labelatlas_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UILabelAtlas/labelatlas_1.json"); this._mainNode.addChild(root); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UITextBMFontTest/UITextBMFontTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UITextBMFontTest/UITextBMFontTest.js index 1b23e535e6..830038a63e 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UITextBMFontTest/UITextBMFontTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UITextBMFontTest/UITextBMFontTest.js @@ -28,7 +28,7 @@ var UITextBMFontEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/LabelBMFont/labelbmfont_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UILabelBMFont/labelbmfont_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UITextFieldTest/UITextFieldTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UITextFieldTest/UITextFieldTest.js index e8fa7a86a1..ff1d443fbc 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UITextFieldTest/UITextFieldTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UITextFieldTest/UITextFieldTest.js @@ -27,7 +27,7 @@ var UITextFieldEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/TextField/textfield_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UITextField/textfield_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/GUITest/UITextTest/UITextTest.js b/tests/js-tests/src/CocoStudioTest/GUITest/UITextTest/UITextTest.js index ecadf762f1..46b7c20a60 100644 --- a/tests/js-tests/src/CocoStudioTest/GUITest/UITextTest/UITextTest.js +++ b/tests/js-tests/src/CocoStudioTest/GUITest/UITextTest/UITextTest.js @@ -28,7 +28,7 @@ var UITextEditorTest = UIBaseLayer.extend({ ctor: function () { this._super(); - var root = this._parseUIFile("res/cocosui/CCS/Label/label_1.json"); + var root = this._parseUIFile("ccs-res/cocosui/UIEditorTest/UILabel/label_1.json"); this._mainNode.addChild(root); var back_label =ccui.helper.seekWidgetByName(root, "back"); diff --git a/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js b/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js index 5fbd215ebc..f59b8ec35c 100644 --- a/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js +++ b/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js @@ -27,22 +27,22 @@ var g_parsersTests = [ { title: "cocostudio 1.3", test: function(){ - new CocostudioParserJsonScene("res/cocosui/CCS/ccs1_3/CCSV1_3_1.ExportJson").runThisTest(); + new CocostudioParserJsonScene("ccs-res/cocosui/UIEditorTest/cocostudio1_3/CocostudioV1_3_1.ExportJson").runThisTest(); } },{ title: "cocostudio 1.4", test: function(){ - new CocostudioParserJsonScene("res/cocosui/CCS/ccs1_4/CCS1_4_1.ExportJson").runThisTest(); + new CocostudioParserJsonScene("ccs-res/cocosui/UIEditorTest/cocostudio1_4/Cocostudio1_4_1.ExportJson").runThisTest(); } },{ title: "cocostudio 1.5", test: function(){ - new CocostudioParserJsonScene("res/cocosui/CCS/ccs1_5/CCS1_5_1.ExportJson").runThisTest(); + new CocostudioParserJsonScene("ccs-res/cocosui/UIEditorTest/cocostudio1_5/Cocostudio1_5_1.ExportJson").runThisTest(); } },{ title: "cocostudio 2.1", test: function(){ - new CocostudioParserJsonScene("res/cocosui/CCS/2.1/MainScene.json").runThisTest(); + new CocostudioParserJsonScene("ccs-res/cocosui/UIEditorTest/2.1/MainScene.json").runThisTest(); } } ]; diff --git a/tests/js-tests/src/CocoStudioTest/SceneTest/SceneEditorTest.js b/tests/js-tests/src/CocoStudioTest/SceneTest/SceneEditorTest.js index 7a4238df2b..451a961640 100644 --- a/tests/js-tests/src/CocoStudioTest/SceneTest/SceneEditorTest.js +++ b/tests/js-tests/src/CocoStudioTest/SceneTest/SceneEditorTest.js @@ -151,7 +151,7 @@ var LoadSceneEdtiorFileTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/LoadSceneEdtiorFileTest/FishJoy2.json"; + file = "ccs-res/scenetest/LoadSceneEdtiorFileTest/FishJoy2.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -183,7 +183,7 @@ var SpriteComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/SpriteComponentTest/SpriteComponentTest.json"; + file = "ccs-res/scenetest/SpriteComponentTest/SpriteComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -219,7 +219,7 @@ var ArmatureComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/ArmatureComponentTest/ArmatureComponentTest.json"; + file = "ccs-res/scenetest/ArmatureComponentTest/ArmatureComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -254,7 +254,7 @@ var UIComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/UIComponentTest/UIComponentTest.json"; + file = "ccs-res/scenetest/UIComponentTest/UIComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -299,7 +299,7 @@ var TmxMapComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/TmxMapComponentTest/TmxMapComponentTest.json"; + file = "ccs-res/scenetest/TmxMapComponentTest/TmxMapComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -340,7 +340,7 @@ var ParticleComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/ParticleComponentTest/ParticleComponentTest.json"; + file = "ccs-res/scenetest/ParticleComponentTest/ParticleComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -374,7 +374,7 @@ var EffectComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/EffectComponentTest/EffectComponentTest.json"; + file = "ccs-res/scenetest/EffectComponentTest/EffectComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -414,7 +414,7 @@ var BackgroundComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/BackgroundComponentTest/BackgroundComponentTest.json"; + file = "ccs-res/scenetest/BackgroundComponentTest/BackgroundComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -450,7 +450,7 @@ var AttributeComponentTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/AttributeComponentTest/AttributeComponentTest.json"; + file = "ccs-res/scenetest/AttributeComponentTest/AttributeComponentTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); @@ -488,7 +488,7 @@ var TriggerTest = SceneEditorTestLayer.extend({ onEnter: function () { this._super(); var node, - file = "res/scenetest/TriggerTest/TriggerTest.json"; + file = "ccs-res/scenetest/TriggerTest/TriggerTest.json"; if(cocoStudioOldApiFlag == 0){ cc.log("ccs.load : %s", file); var json = ccs.load(file); diff --git a/tests/js-tests/src/CocosDenshionTest/CocosDenshionTest.js b/tests/js-tests/src/CocosDenshionTest/CocosDenshionTest.js index b076eca8e1..aa877b9d1d 100644 --- a/tests/js-tests/src/CocosDenshionTest/CocosDenshionTest.js +++ b/tests/js-tests/src/CocosDenshionTest/CocosDenshionTest.js @@ -26,8 +26,8 @@ var audioEngine = cc.audioEngine; -var MUSIC_FILE = cc.sys.os == cc.sys.OS_WP8 || cc.sys.os == cc.sys.OS_WINRT ? "res/Sound/background-music-aac.wav" : "res/Sound/background.mp3"; -var EFFECT_FILE = cc.sys.os == cc.sys.OS_WP8 || cc.sys.os == cc.sys.OS_WINRT ? "res/Sound/pew-pew-lei.wav" : "res/Sound/effect2.mp3"; +var MUSIC_FILE = cc.sys.os == cc.sys.OS_WINRT ? "background.wav" : "background.mp3"; +var EFFECT_FILE = cc.sys.os == cc.sys.OS_WINRT ? "effect1.wav" : "effect2.mp3"; var _DenshionTests = [ 'Music Test' diff --git a/tests/js-tests/src/EaseActionsTest/EaseActionsTest.js b/tests/js-tests/src/EaseActionsTest/EaseActionsTest.js index 3abf9b7cfa..47e5558ddb 100644 --- a/tests/js-tests/src/EaseActionsTest/EaseActionsTest.js +++ b/tests/js-tests/src/EaseActionsTest/EaseActionsTest.js @@ -738,7 +738,7 @@ var SchedulerTest = EaseSpriteDemo.extend({ var emitter = new cc.ParticleFireworks(); emitter.setTotalParticles(250); - emitter.texture = cc.textureCache.addImage("res/Images/fire.png"); + emitter.texture = cc.textureCache.addImage("Images/fire.png"); this.addChild(emitter); //----end13---- }, diff --git a/tests/js-tests/src/ExtensionsTest/AssetsManagerTest/AssetsManagerTest.js b/tests/js-tests/src/ExtensionsTest/AssetsManagerTest/AssetsManagerTest.js index acd1c664fe..46436680f1 100644 --- a/tests/js-tests/src/ExtensionsTest/AssetsManagerTest/AssetsManagerTest.js +++ b/tests/js-tests/src/ExtensionsTest/AssetsManagerTest/AssetsManagerTest.js @@ -39,7 +39,7 @@ var AssetsManagerTestLayer = BaseTestLayer.extend({ ctor : function (spritePath) { this._super(); this._spritePath = spritePath; - cc.loader.resPath = "res/"; + cc.loader.resPath = "../cpp-tests/Resources/"; }, getTitle : function() { @@ -115,12 +115,12 @@ var AssetsManagerLoaderScene = TestScene.extend({ icon.y = cc.winSize.height/2; layer.addChild(icon); - this._loadingBar = new ccui.LoadingBar("res/cocosui/sliderProgress.png"); + this._loadingBar = new ccui.LoadingBar("ccs-res/cocosui/sliderProgress.png"); this._loadingBar.x = cc.visibleRect.center.x; this._loadingBar.y = cc.visibleRect.top.y - 40; layer.addChild(this._loadingBar); - this._fileLoadingBar = new ccui.LoadingBar("res/cocosui/sliderProgress.png"); + this._fileLoadingBar = new ccui.LoadingBar("ccs-res/cocosui/sliderProgress.png"); this._fileLoadingBar.x = cc.visibleRect.center.x; this._fileLoadingBar.y = cc.visibleRect.top.y - 80; layer.addChild(this._fileLoadingBar); diff --git a/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.js b/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.js index 2dcbb3b344..b39a926a4f 100644 --- a/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.js +++ b/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.js @@ -26,9 +26,16 @@ var CocosBuilderTestScene = TestScene.extend({ runThisTest:function(){ - cc.BuilderReader.setResourcePath("res/"); + if (cc.sys.isNative) + { + cc.BuilderReader.setResourcePath("res/"); + } + else + { + cc.BuilderReader.setResourcePath(ccbjs); + } - var node = cc.BuilderReader.load("res/ccb/HelloCocosBuilder.ccbi", this); + var node = cc.BuilderReader.load(ccbjs + "ccb/HelloCocosBuilder.ccbi", this); if(node != null) { this.addChild(node); diff --git a/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.js b/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.js index 66bd4aaceb..a5eaf3baa4 100644 --- a/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.js +++ b/tests/js-tests/src/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.js @@ -26,7 +26,14 @@ cc.BuilderReader.registerController("HelloCocosBuilderLayer", { _openTest : function(ccbFileName) { - cc.BuilderReader.setResourcePath("res/"); + if (cc.sys.isNative) + { + cc.BuilderReader.setResourcePath("res/"); + } + else + { + cc.BuilderReader.setResourcePath(ccbjs); + } var node = cc.BuilderReader.load(ccbFileName, this); this["mTestTitleLabelTTF"].setString(ccbFileName); @@ -39,31 +46,31 @@ cc.BuilderReader.registerController("HelloCocosBuilderLayer", { }, "onMenuTestClicked" : function() { - this._openTest("res/ccb/ccb/TestMenus.ccbi"); + this._openTest(ccbjs + "ccb/ccb/TestMenus.ccbi"); }, "onSpriteTestClicked" : function() { - this._openTest("res/ccb/ccb/TestSprites.ccbi"); + this._openTest(ccbjs + "ccb/ccb/TestSprites.ccbi"); }, "onButtonTestClicked" : function() { - this._openTest("res/ccb/ccb/TestButtons.ccbi"); + this._openTest(ccbjs + "ccb/ccb/TestButtons.ccbi"); }, "onAnimationsTestClicked" : function() { - this._openTest("res/ccb/ccb/TestAnimations.ccbi"); + this._openTest(ccbjs + "ccb/ccb/TestAnimations.ccbi"); }, "onParticleSystemTestClicked" : function() { - this._openTest("res/ccb/ccb/TestParticleSystems.ccbi"); + this._openTest(ccbjs + "ccb/ccb/TestParticleSystems.ccbi"); }, "onScrollViewTestClicked" : function() { - this._openTest("res/ccb/ccb/TestScrollViews.ccbi"); + this._openTest(ccbjs + "ccb/ccb/TestScrollViews.ccbi"); }, "onTimelineCallbackSoundClicked" : function() { - this._openTest("res/ccb/ccb/TestTimelineCallback.ccbi"); + this._openTest(ccbjs + "ccb/ccb/TestTimelineCallback.ccbi"); } }); diff --git a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlColourPickerTest/CCControlColourPickerTest.js b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlColourPickerTest/CCControlColourPickerTest.js index f5a834050c..b9acc449d7 100644 --- a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlColourPickerTest/CCControlColourPickerTest.js +++ b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlColourPickerTest/CCControlColourPickerTest.js @@ -53,7 +53,7 @@ var ControlColourPickerTest = ControlScene.extend({ layer_width += colourPicker.width; // Add the black background for the text - var background = new cc.Scale9Sprite("res/extensions/buttonBackground.png"); + var background = new cc.Scale9Sprite("extensions/buttonBackground.png"); background.width = 150; background.height = 50; background.x = layer_width + background.width / 2.0; diff --git a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.js b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.js index a6d842206f..d15fe14cba 100644 --- a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.js +++ b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.js @@ -38,7 +38,7 @@ var ControlPotentiometerTest = ControlScene.extend({ var layer_width = 0; // Add the black background for the text - var background = new cc.Scale9Sprite("res/extensions/buttonBackground.png"); + var background = new cc.Scale9Sprite("extensions/buttonBackground.png"); background.width = 80; background.height = 50; background.x = layer_width + background.width / 2.0; @@ -54,9 +54,9 @@ var ControlPotentiometerTest = ControlScene.extend({ layer.addChild(this._displayValueLabel); // Add the slider - var potentiometer = new cc.ControlPotentiometer("res/extensions/potentiometerTrack.png" - , "res/extensions/potentiometerProgress.png" - , "res/extensions/potentiometerButton.png"); + var potentiometer = new cc.ControlPotentiometer("extensions/potentiometerTrack.png" + , "extensions/potentiometerProgress.png" + , "extensions/potentiometerButton.png"); potentiometer.x = layer_width + 10 + potentiometer.width / 2; potentiometer.y = 0; diff --git a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.js b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.js index 90e6d20ec5..f0ae16f751 100644 --- a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.js +++ b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.js @@ -40,7 +40,7 @@ var ControlSliderTest = ControlScene.extend({ this.addChild(this._displayValueLabel); // Add the slider - var slider = new cc.ControlSlider("res/extensions/sliderTrack.png", "res/extensions/sliderProgress.png", "res/extensions/sliderThumb.png"); + var slider = new cc.ControlSlider("extensions/sliderTrack.png", "extensions/sliderProgress.png", "extensions/sliderThumb.png"); slider.anchorX = 0.5; slider.anchorY = 1.0; slider.setMinimumValue(0.0); // Sets the min value of range @@ -52,7 +52,7 @@ var ControlSliderTest = ControlScene.extend({ // When the value of the slider will change, the given selector will be call slider.addTargetWithActionForControlEvents(this, this.valueChanged, cc.CONTROL_EVENT_VALUECHANGED); - var restrictSlider = new cc.ControlSlider("res/extensions/sliderTrack.png", "res/extensions/sliderProgress.png", "res/extensions/sliderThumb.png"); + var restrictSlider = new cc.ControlSlider("extensions/sliderTrack.png", "extensions/sliderProgress.png", "extensions/sliderThumb.png"); restrictSlider.anchorX = 0.5; restrictSlider.anchorY = 1.0; restrictSlider.setMinimumValue(0.0); // Sets the min value of range diff --git a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.js b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.js index 5f4e7708f6..8bd2acfba7 100644 --- a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.js +++ b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.js @@ -36,7 +36,7 @@ var ControlStepperTest = ControlScene.extend({ var layer_width = 0; // Add the black background for the text - var background = new cc.Scale9Sprite("res/extensions/buttonBackground.png"); + var background = new cc.Scale9Sprite("extensions/buttonBackground.png"); background.width = 100; background.height = 50; background.x = layer_width + background.width / 2.0; @@ -72,8 +72,8 @@ var ControlStepperTest = ControlScene.extend({ return false; }, makeControlStepper:function () { - var minusSprite = new cc.Sprite("res/extensions/stepper-minus.png"); - var plusSprite = new cc.Sprite("res/extensions/stepper-plus.png"); + var minusSprite = new cc.Sprite("extensions/stepper-minus.png"); + var plusSprite = new cc.Sprite("extensions/stepper-plus.png"); return new cc.ControlStepper(minusSprite, plusSprite); }, diff --git a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.js b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.js index c9f76819b0..a855fa5f03 100644 --- a/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.js +++ b/tests/js-tests/src/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.js @@ -37,7 +37,7 @@ var ControlSwitchTest = ControlScene.extend({ var layer_width = 0; // Add the black background for the text - var background = new cc.Scale9Sprite("res/extensions/buttonBackground.png"); + var background = new cc.Scale9Sprite("extensions/buttonBackground.png"); background.width = 80; background.height = 50; background.x = layer_width + background.width / 2.0; @@ -56,10 +56,10 @@ var ControlSwitchTest = ControlScene.extend({ // Create the switch var switchControl = new cc.ControlSwitch ( - new cc.Sprite("res/extensions/switch-mask.png"), - new cc.Sprite("res/extensions/switch-on.png"), - new cc.Sprite("res/extensions/switch-off.png"), - new cc.Sprite("res/extensions/switch-thumb.png"), + new cc.Sprite("extensions/switch-mask.png"), + new cc.Sprite("extensions/switch-on.png"), + new cc.Sprite("extensions/switch-off.png"), + new cc.Sprite("extensions/switch-thumb.png"), new cc.LabelTTF("On", "Arial-BoldMT", 16), new cc.LabelTTF("Off", "Arial-BoldMT", 16) ); diff --git a/tests/js-tests/src/ExtensionsTest/EditBoxTest/EditBoxTest.js b/tests/js-tests/src/ExtensionsTest/EditBoxTest/EditBoxTest.js index 97f87c9b02..c16feac7d8 100644 --- a/tests/js-tests/src/ExtensionsTest/EditBoxTest/EditBoxTest.js +++ b/tests/js-tests/src/ExtensionsTest/EditBoxTest/EditBoxTest.js @@ -37,7 +37,7 @@ var EditBoxTestLayer = cc.Layer.extend({ }, init: function () { - this._box1 = new cc.EditBox(cc.size(170, 50), new cc.Scale9Sprite("res/extensions/green_edit.png"), new cc.Scale9Sprite("res/extensions/orange_edit.png")); + this._box1 = new cc.EditBox(cc.size(170, 50), new cc.Scale9Sprite("extensions/green_edit.png"), new cc.Scale9Sprite("extensions/orange_edit.png")); this._box1.setString("EditBoxs"); this._box1.x = 220; this._box1.y = 50; @@ -45,7 +45,7 @@ var EditBoxTestLayer = cc.Layer.extend({ this._box1.setDelegate(this); this.addChild(this._box1); - this._box2 = new cc.EditBox(cc.size(130, 40), new cc.Scale9Sprite("res/extensions/green_edit.png")); + this._box2 = new cc.EditBox(cc.size(130, 40), new cc.Scale9Sprite("extensions/green_edit.png")); this._box2.setString("EditBox Sample"); this._box2.x = 220; this._box2.y = 190; @@ -56,7 +56,7 @@ var EditBoxTestLayer = cc.Layer.extend({ this._box2.setDelegate(this); this.addChild(this._box2); - this._box3 = new cc.EditBox(cc.size(65, 40), new cc.Scale9Sprite("res/extensions/orange_edit.png")); + this._box3 = new cc.EditBox(cc.size(65, 40), new cc.Scale9Sprite("extensions/orange_edit.png")); this._box3.setString("Image"); this._box3.x = 220; this._box3.y = 250; @@ -64,7 +64,7 @@ var EditBoxTestLayer = cc.Layer.extend({ this._box3.setDelegate(this); this.addChild(this._box3); - this._box4 = new cc.EditBox(cc.size(180, 40), new cc.Scale9Sprite("res/extensions/yellow_edit.png")); + this._box4 = new cc.EditBox(cc.size(180, 40), new cc.Scale9Sprite("extensions/yellow_edit.png")); this._box4.setPlaceholderFontColor(cc.color(255, 0, 0)); this._box4.setPlaceHolder("Tooltip:"); this._box4.x = 40; diff --git a/tests/js-tests/src/ExtensionsTest/S9SpriteTest/S9SpriteTest.js b/tests/js-tests/src/ExtensionsTest/S9SpriteTest/S9SpriteTest.js index b0efb1d6e6..a348222f4e 100644 --- a/tests/js-tests/src/ExtensionsTest/S9SpriteTest/S9SpriteTest.js +++ b/tests/js-tests/src/ExtensionsTest/S9SpriteTest/S9SpriteTest.js @@ -113,8 +113,8 @@ var S9BatchNodeBasic = S9SpriteTestDemo.extend({ cc.log("S9BatchNodeBasic ..."); - var batchNode = new cc.SpriteBatchNode("res/Images/blocks9.png"); - cc.log("batchNode created with : " + "res/Images/blocks9.png"); + var batchNode = new cc.SpriteBatchNode("Images/blocks9.png"); + cc.log("batchNode created with : " + "Images/blocks9.png"); var blocks = new cc.Scale9Sprite(); cc.log("... created"); @@ -207,8 +207,8 @@ var S9BatchNodeScaledNoInsets = S9SpriteTestDemo.extend({ cc.log("S9BatchNodeScaledNoInsets ..."); // scaled without insets - var batchNode_scaled = new cc.SpriteBatchNode("res/Images/blocks9.png"); - cc.log("batchNode_scaled created with : " + "res/Images/blocks9.png"); + var batchNode_scaled = new cc.SpriteBatchNode("Images/blocks9.png"); + cc.log("batchNode_scaled created with : " + "Images/blocks9.png"); var blocks_scaled = new cc.Scale9Sprite(); cc.log("... created"); @@ -312,8 +312,8 @@ var S9BatchNodeScaleWithCapInsets = S9SpriteTestDemo.extend({ cc.log("S9BatchNodeScaleWithCapInsets ..."); - var batchNode_scaled_with_insets = new cc.SpriteBatchNode("res/Images/blocks9.png"); - cc.log("batchNode_scaled_with_insets created with : " + "res/Images/blocks9.png"); + var batchNode_scaled_with_insets = new cc.SpriteBatchNode("Images/blocks9.png"); + cc.log("batchNode_scaled_with_insets created with : " + "Images/blocks9.png"); var blocks_scaled_with_insets = new cc.Scale9Sprite(); cc.log("... created"); diff --git a/tests/js-tests/src/FacebookTest/FacebookTestsManager.js b/tests/js-tests/src/FacebookTest/FacebookTestsManager.js index 7de1057755..da6177b523 100644 --- a/tests/js-tests/src/FacebookTest/FacebookTestsManager.js +++ b/tests/js-tests/src/FacebookTest/FacebookTestsManager.js @@ -43,8 +43,8 @@ FacebookTestScene = TestScene.extend({ if(!cc.sys.isNative) { //browser cc.loader.loadJs('', [ - "../../frameworks/cocos2d-html5/external/pluginx/platform/facebook_sdk.js", - "../../frameworks/cocos2d-html5/external/pluginx/platform/facebook.js" + "../../../web/external/pluginx/platform/facebook_sdk.js", + "../../../web/external/pluginx/platform/facebook.js" ], function() { var layer = nextFacebookTest(); self.addChild(layer); diff --git a/tests/js-tests/src/GUITest/UIButtonTest/UIButtonTest.js b/tests/js-tests/src/GUITest/UIButtonTest/UIButtonTest.js index 2596a4f6b5..50f90d2586 100644 --- a/tests/js-tests/src/GUITest/UIButtonTest/UIButtonTest.js +++ b/tests/js-tests/src/GUITest/UIButtonTest/UIButtonTest.js @@ -34,7 +34,7 @@ var UIButtonTest = UIScene.extend({ // Create the button var button = new ccui.Button(); button.setTouchEnabled(true); - button.loadTextures("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png", ""); + button.loadTextures("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png", ""); button.x = widgetSize.width / 2.0; button.y = widgetSize.height / 2.0; button.addTouchEventListener(this.touchEvent, this); @@ -79,7 +79,7 @@ var UIButtonTest_Scale9 = UIScene.extend({ var button = new ccui.Button(); button.setTouchEnabled(true); button.setScale9Enabled(true); - button.loadTextures("res/cocosui/button.png", "res/cocosui/buttonHighlighted.png", ""); + button.loadTextures("ccs-res/cocosui/button.png", "ccs-res/cocosui/buttonHighlighted.png", ""); button.x = this._widget.width / 2.0; button.y = this._widget.height / 2.0; button.setContentSize(cc.size(150, 48)); @@ -124,7 +124,7 @@ var UIButtonTest_PressedAction = UIScene.extend({ var button = new ccui.Button(); button.setTouchEnabled(true); button.setPressedActionEnabled(true); - button.loadTextures("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png", ""); + button.loadTextures("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png", ""); button.x = widgetSize.width / 2; button.y = widgetSize.height / 2; button.addTouchEventListener(this.touchEvent ,this); @@ -165,7 +165,7 @@ var UIButtonTest_Title = UIScene.extend({ // Create the text button var textButton = new ccui.Button(); textButton.setTouchEnabled(true); - textButton.loadTextures("res/cocosui/backtotopnormal.png", "res/cocosui/backtotoppressed.png", ""); + textButton.loadTextures("ccs-res/cocosui/backtotopnormal.png", "ccs-res/cocosui/backtotoppressed.png", ""); textButton.setTitleText("Title Button"); textButton.x = widgetSize.width / 2.0; textButton.y = widgetSize.height / 2.0; @@ -218,8 +218,8 @@ var UIButtonTestRemoveSelf = UIScene.extend({ this._mainNode.addChild(layout); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png", - "res/cocosui/animationbuttonpressed.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", + "ccs-res/cocosui/animationbuttonpressed.png"); button.setPosition(layout.width / 2.0, layout.height / 2.0); button.addTouchEventListener(this.touchEvent, this); layout.addChild(button); @@ -264,8 +264,8 @@ var UIButtonTestSwitchScale9 = UIScene.extend({ this._bottomDisplayLabel.setString(""); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png", - "res/cocosui/animationbuttonpressed.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", + "ccs-res/cocosui/animationbuttonpressed.png"); button.setPosition(widgetSize.width / 2.0, widgetSize.height / 2.0); button.addTouchEventListener(this.touchEvent, this); button.setTitleText("Button Title"); @@ -313,7 +313,7 @@ var UIButtonTestZoomScale = UIScene.extend({ this._bottomDisplayLabel.setString(""); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png"); button.setPosition(widgetSize.width / 2.0, widgetSize.height / 2.0 ); button.setPressedActionEnabled(true); button.addClickEventListener(function () { @@ -324,9 +324,9 @@ var UIButtonTestZoomScale = UIScene.extend({ button.setZoomScale(-0.5); var slider = new ccui.Slider(); - slider.loadBarTexture("res/cocosui/sliderTrack.png"); - slider.loadSlidBallTextures("res/cocosui/sliderThumb.png", "res/cocosui/sliderThumb.png", ""); - slider.loadProgressBarTexture("res/cocosui/sliderProgress.png"); + slider.loadBarTexture("ccs-res/cocosui/sliderTrack.png"); + slider.loadSlidBallTextures("ccs-res/cocosui/sliderThumb.png", "ccs-res/cocosui/sliderThumb.png", ""); + slider.loadProgressBarTexture("ccs-res/cocosui/sliderProgress.png"); slider.setPosition(widgetSize.width / 2.0 , widgetSize.height / 2.0 - 50); slider.addEventListener(this.sliderEvent, this); slider.setPercent(button.getZoomScale() * 100); @@ -382,7 +382,7 @@ var UIButtonIgnoreContentSizeTest = UIScene.extend({ this._bottomDisplayLabel.setString(""); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png"); button.ignoreContentAdaptWithSize(false); button.setContentSize(200,100); button.setNormalizedPosition(0.3, 0.5); @@ -396,7 +396,7 @@ var UIButtonIgnoreContentSizeTest = UIScene.extend({ this.addChild(button); // Create the button - var button2 = new ccui.Button("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png"); + var button2 = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png"); button2.ignoreContentAdaptWithSize(false); button2.setContentSize(200,100); button2.setNormalizedPosition(0.8, 0.5); @@ -425,10 +425,10 @@ var UIButtonTitleEffectTest = UIScene.extend({ this._bottomDisplayLabel.setString(""); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png"); button.setNormalizedPosition(0.3, 0.5); button.setTitleText("PLAY GAME"); - //button.setTitleFontName("fonts/Marker Felt.ttf"); + //button.setTitleFontName("Marker Felt"); button.setZoomScale(0.3); button.setScale(2.0); button.setPressedActionEnabled(true); @@ -438,7 +438,7 @@ var UIButtonTitleEffectTest = UIScene.extend({ this.addChild(button); // Create the button - var button2 = new ccui.Button("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png"); + var button2 = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png"); button2.setNormalizedPosition(0.8, 0.5); button2.setTitleText("PLAY GAME"); var title2 = button2.getTitleRenderer(); @@ -459,10 +459,10 @@ var UIButtonFlipTest = UIScene.extend({ this._bottomDisplayLabel.setString(""); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png"); button.setNormalizedPosition(0.3, 0.5); button.setTitleText("PLAY GAME"); - //button.setTitleFontName("fonts/Marker Felt.ttf"); + //button.setTitleFontName("Marker Felt"); button.setZoomScale(0.3); button.setScale(2.0); button.setFlippedX(true); @@ -474,7 +474,7 @@ var UIButtonFlipTest = UIScene.extend({ this.addChild(titleLabel); // Create the button - var button2 = new ccui.Button("res/cocosui/animationbuttonnormal.png", "res/cocosui/animationbuttonpressed.png"); + var button2 = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png", "ccs-res/cocosui/animationbuttonpressed.png"); button2.setNormalizedPosition(0.8, 0.5); button2.setTitleText("PLAY GAME"); button2.setFlippedY(true); @@ -506,14 +506,14 @@ var UIButtonNormalDefaultTest = UIScene.extend({ this._mainNode.addChild(alert); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png"); button.setPosition(widgetSize.width / 2.0 - 80, widgetSize.height / 2.0 + 40); button.setZoomScale(0.4); button.setPressedActionEnabled(true); this._mainNode.addChild(button); // Create the button - var buttonScale9 = new ccui.Button("res/cocosui/button.png"); + var buttonScale9 = new ccui.Button("ccs-res/cocosui/button.png"); // open scale9 render buttonScale9.setScale9Enabled(true); buttonScale9.setPosition(widgetSize.width / 2.0 + 50, widgetSize.height / 2.0 + 40); @@ -541,7 +541,7 @@ var UIButtonDisableDefaultTest = UIScene.extend({ this._mainNode.addChild(alert); // Create the button - var button = new ccui.Button("res/cocosui/animationbuttonnormal.png"); + var button = new ccui.Button("ccs-res/cocosui/animationbuttonnormal.png"); button.setPosition(widgetSize.width / 2.0 - 80, widgetSize.height / 2.0 + 40); button.setZoomScale(0.4); button.setPressedActionEnabled(true); @@ -552,7 +552,7 @@ var UIButtonDisableDefaultTest = UIScene.extend({ this._mainNode.addChild(button); // Create the button - var buttonScale9 = new ccui.Button("res/cocosui/button.png"); + var buttonScale9 = new ccui.Button("ccs-res/cocosui/button.png"); // open scale9 render buttonScale9.setScale9Enabled(true); buttonScale9.setPosition(widgetSize.width / 2.0 + 50, widgetSize.height / 2.0 + 40); diff --git a/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js b/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js index 4ed941f959..0140ec0d38 100644 --- a/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js +++ b/tests/js-tests/src/GUITest/UICheckBoxTest/UICheckBoxTest.js @@ -34,11 +34,11 @@ var UICheckBoxTest = UIScene.extend({ // Create the checkbox var checkBox = new ccui.CheckBox(); checkBox.setTouchEnabled(true); - checkBox.loadTextures("res/cocosui/check_box_normal.png", - "res/cocosui/check_box_normal_press.png", - "res/cocosui/check_box_active.png", - "res/cocosui/check_box_normal_disable.png", - "res/cocosui/check_box_active_disable.png"); + checkBox.loadTextures("ccs-res/cocosui/check_box_normal.png", + "ccs-res/cocosui/check_box_normal_press.png", + "ccs-res/cocosui/check_box_active.png", + "ccs-res/cocosui/check_box_normal_disable.png", + "ccs-res/cocosui/check_box_active_disable.png"); checkBox.x = widgetSize.width / 2.0; checkBox.y = widgetSize.height / 2.0; checkBox.addEventListener(this.selectedStateEvent, this); @@ -85,14 +85,14 @@ var UICheckBoxDefaultBehaviorTest = UIScene.extend({ this._mainNode.addChild(alert); // Create the checkbox - var checkBox = new ccui.CheckBox("res/cocosui/check_box_normal.png", "res/cocosui/check_box_active.png"); + var checkBox = new ccui.CheckBox("ccs-res/cocosui/check_box_normal.png", "ccs-res/cocosui/check_box_active.png"); checkBox.setPosition(cc.p(widgetSize.width / 2 - 50, widgetSize.height / 2)); this._mainNode.addChild(checkBox); // Create the checkbox - var checkBox2 = new ccui.CheckBox("res/cocosui/check_box_normal.png", "res/cocosui/check_box_active.png"); + var checkBox2 = new ccui.CheckBox("ccs-res/cocosui/check_box_normal.png", "ccs-res/cocosui/check_box_active.png"); checkBox2.setPosition(cc.p(widgetSize.width / 2 - 150, widgetSize.height / 2)); checkBox2.ignoreContentAdaptWithSize(false); checkBox2.setZoomScale(0.5); @@ -102,13 +102,13 @@ var UICheckBoxDefaultBehaviorTest = UIScene.extend({ // Create the checkbox - var checkBoxDisabled = new ccui.CheckBox("res/cocosui/check_box_normal.png", "res/cocosui/check_box_active.png"); + var checkBoxDisabled = new ccui.CheckBox("ccs-res/cocosui/check_box_normal.png", "ccs-res/cocosui/check_box_active.png"); checkBoxDisabled.setPosition(cc.p(widgetSize.width / 2 + 20, widgetSize.height / 2)); checkBoxDisabled.setEnabled(false); checkBoxDisabled.setBright(false); this._mainNode.addChild(checkBoxDisabled); - var checkBoxDisabled2 = new ccui.CheckBox("res/cocosui/check_box_normal.png", "res/cocosui/check_box_active.png"); + var checkBoxDisabled2 = new ccui.CheckBox("ccs-res/cocosui/check_box_normal.png", "ccs-res/cocosui/check_box_active.png"); checkBoxDisabled2.setPosition(cc.p(widgetSize.width / 2 + 70, widgetSize.height / 2)); checkBoxDisabled2.setBright(false); checkBoxDisabled2.setSelected(true); diff --git a/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js b/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js index 6facfd3db3..7ba67664ec 100644 --- a/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js +++ b/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js @@ -128,7 +128,7 @@ var UIFocusTestHorizontal = UIFocusTestBase.extend({ var count = 3; for (var i=0; i 0 && this._camera){ + var touch = touches[0]; + var delta = touch.getDelta(); + + this._angle -= cc.degreesToRadians(delta.x); + this._camera.setPosition3D(cc.math.vec3(100*Math.sin(this._angle), 50, 100*Math.cos(this._angle))); + this._camera.lookAt(cc.math.vec3(0, 0, 0), cc.math.vec3(0, 1, 0)); + + if(delta.x * delta.x + delta.y + delta.y > 16) + this._needShootBox = false; + } + }, + + onTouchesEnded:function(touches, event){ + if(!this._needShootBox) + return; + if(touches.length > 0){ + var location = touches[0].getLocationInView(); + + var nearP = cc.math.vec3(location.x, location.y, -1); + var farP = cc.math.vec3(location.x, location.y, 1); + nearP = this._camera.unproject(nearP); + farP = this._camera.unproject(farP); + + var dir = cc.math.vec3Sub(farP, nearP); + this.shootBox(cc.math.vec3Add(this._camera.getPosition3D(), cc.math.vec3(dir.x*10, dir.y*10, dir.z*10))); + } + }, + + shootBox:function(des){ + var rbDes = cc.physics3DRigidBodyDes(); + var linearVel = cc.math.vec3Sub(des, this._camera.getPosition3D()); + linearVel.normalize(); + linearVel.x *= 100; + linearVel.y *= 100; + linearVel.z *= 100; + + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(0.5, 0.5, 0.5)); + var v = this._camera.getPosition3D(); + rbDes.originalTransform[12] = v.x; + rbDes.originalTransform[13] = v.y; + rbDes.originalTransform[14] = v.z; + var sprite = cc.PhysicsSprite3D.create("Sprite3DTest/box.c3t", rbDes); + sprite.setTexture("Images/Icon.png"); + + var rigidBody = sprite.getPhysicsObj(); + rigidBody.setLinearFactor(cc.math.vec3(1, 1, 1)); + rigidBody.setLinearVelocity(linearVel); + rigidBody.setAngularVelocity(cc.math.vec3(0, 0, 0)); + rigidBody.setCcdMotionThreshold(0.5); + rigidBody.setCcdSweptSphereRadius(0.4); + + this.addChild(sprite); + sprite.setPosition3D(this._camera.getPosition3D()); + sprite.setScale(0.5); + sprite.syncToNode(); + sprite.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE); + sprite.setCameraMask(cc.CameraFlag.USER1); + }, + + // + // Menu + // + onEnter:function () { + this._super(); + + var label = new cc.LabelTTF(this._title, "Arial", 28); + this.addChild(label, 100, BASE_TEST_TITLE_TAG); + label.x = winSize.width / 2; + label.y = winSize.height - 50; + + var label2 = new cc.LabelTTF(this._subtitle, "Thonburi", 16); + this.addChild(label2, 101, BASE_TEST_SUBTITLE_TAG); + label2.x = winSize.width / 2; + label2.y = winSize.height - 80; + + var item1 = new cc.MenuItemImage(s_pathB1, s_pathB2, this.onBackCallback, this); + var item2 = new cc.MenuItemImage(s_pathR1, s_pathR2, this.onRestartCallback, this); + var item3 = new cc.MenuItemImage(s_pathF1, s_pathF2, this.onNextCallback, this); + + item1.tag = BASE_TEST_MENUITEM_PREV_TAG; + item2.tag = BASE_TEST_MENUITEM_RESET_TAG; + item3.tag = BASE_TEST_MENUITEM_NEXT_TAG; + + var menu = new cc.Menu(item1, item2, item3); + + menu.x = 0; + menu.y = 0; + var width = item2.width, height = item2.height; + item1.x = winSize.width/2 - width*2; + item1.y = height/2 ; + item2.x = winSize.width/2; + item2.y = height/2 ; + item3.x = winSize.width/2 + width*2; + item3.y = height/2 ; + + this.addChild(menu, 102, BASE_TEST_MENU_TAG); + }, + + onRestartCallback:function (sender) { + var s = new Physics3DTestScene(); + s.addChild(restartPhysics3DTest()); + director.runScene(s); + }, + + onNextCallback:function (sender) { + var s = new Physics3DTestScene(); + s.addChild(nextPhysics3DTest()); + director.runScene(s); + }, + + onBackCallback:function (sender) { + var s = new Physics3DTestScene(); + s.addChild(previousPhysics3DTest()); + director.runScene(s); + } +}); + +var Physics3DTestScene = cc.Scene.extend({ + ctor:function () { + this._super(); + + var label = new cc.LabelTTF("Main Menu", "Arial", 20); + var menuItem = new cc.MenuItemLabel(label, this.onMainMenuCallback, this); + + var menu = new cc.Menu(menuItem); + menu.x = 0; + menu.y = 0; + menuItem.x = winSize.width - 50; + menuItem.y = 25; + this.addChild(menu); + + this.initWithPhysics(); + this.getPhysics3DWorld().setDebugDrawEnable(false); + physicsScene = this; + }, + onMainMenuCallback:function () { + var scene = new cc.Scene(); + var layer = new TestController(); + scene.addChild(layer); + director.runScene(scene); + }, + runThisTest:function (num) { + Physics3DTestIdx = (num || num == 0) ? (num - 1) : -1; + var layer = nextPhysics3DTest(); + this.addChild(layer); + + director.runScene(this); + } +}); + +var BasicPhysics3DDemo = Physics3DTestDemo.extend({ + _subtitle:"Basic Physics3D", + + ctor:function(){ + this._super(); + + var rbDes = cc.physics3DRigidBodyDes(); + rbDes.mass = 0; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(60, 1, 60)); + + var floor = cc.PhysicsSprite3D.create("Sprite3DTest/box.c3t", rbDes); + floor.setTexture("Sprite3DTest/plane.png"); + floor.setScaleX(60); + floor.setScaleZ(60); + this.addChild(floor); + floor.setCameraMask(cc.CameraFlag.USER1); + floor.syncToNode(); + //static object sync is not needed + floor.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.NONE); + + //create several boxes using PhysicsSprite3D + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(0.8, 0.8, 0.8)); + var start_x = START_POS_X - ARRAY_SIZE_X/2; + var start_y = START_POS_Y; + var start_z = START_POS_Z - ARRAY_SIZE_Z/2; + + for(var k = 0; k < ARRAY_SIZE_Y; ++k){ + for(var i = 0; i < ARRAY_SIZE_X; ++i){ + for(var j = 0; j < ARRAY_SIZE_Z; ++j){ + var x = i + start_x, + y = 5 + k + start_y, + z = j + start_z; + var sprite = cc.PhysicsSprite3D.create("Sprite3DTest/box.c3t", rbDes); + sprite.setTexture("Images/CyanSquare.png"); + sprite.setPosition3D(cc.math.vec3(x, y, z)); + sprite.syncToNode(); + sprite.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE); + sprite.setCameraMask(cc.CameraFlag.USER1); + sprite.setScale(0.8); + this.addChild(sprite); + } + } + } + + physicsScene.setPhysics3DDebugCamera(this._camera); + } +}); + +var Physics3DConstraintDemo = Physics3DTestDemo.extend({ + _subtitle:"Physics3D Constraint", + + ctor:function(){ + this._super(); + + //PhysicsSprite3d = Sprite3D + Physics3DComponent + var rbDes = cc.physics3DRigidBodyDes(); + rbDes.disableSleep = true; + rbDes.mass = 10; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(5, 5, 5)); + + var rigidBody = cc.Physics3DRigidBody.create(rbDes); + var quat = cc.math.quaternion(cc.math.vec3(0, 1, 0), cc.degreesToRadians(180)); + var component = cc.Physics3DComponent.create(rigidBody, cc.math.vec3(0, -3, 0), quat); + + var sprite = new jsb.Sprite3D("Sprite3DTest/orc.c3b"); + sprite.addComponent(component); + this.addChild(sprite); + sprite.setCameraMask(cc.CameraFlag.USER1); + sprite.setScale(0.4); + sprite.setPosition3D(cc.math.vec3(-20, 5, 0)); + component.syncToNode(); + component.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE); + + physicsScene.setPhysics3DDebugCamera(this._camera); + + //create point to point constraint + var constraint = cc.Physics3DPointToPointConstraint.create(rigidBody, cc.math.vec3(2.5, 2.5, 2.5)); + physicsScene.getPhysics3DWorld().addPhysics3DConstraint(constraint); + + //create hinge constraint + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(8, 8, 1)); + rigidBody = cc.Physics3DRigidBody.create(rbDes); + component = cc.Physics3DComponent.create(rigidBody); + sprite = new jsb.Sprite3D("Sprite3DTest/box.c3t"); + sprite.setTexture("Sprite3DTest/plane.png"); + sprite.setScaleX(8); + sprite.setScaleZ(8); + sprite.setPosition3D(cc.math.vec3(5, 0, 0)); + sprite.addComponent(component); + sprite.setCameraMask(cc.CameraFlag.USER1); + this.addChild(sprite); + component.syncToNode(); + rigidBody.setAngularVelocity(cc.math.vec3(0, 3, 0)); + constraint = cc.Physics3DHingeConstraint.create(rigidBody, cc.math.vec3(4, 4, 0.5), cc.math.vec3(0, 1, 0)); + physicsScene.getPhysics3DWorld().addPhysics3DConstraint(constraint); + + //create slider constraint + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(3, 2, 3)); + rigidBody = cc.Physics3DRigidBody.create(rbDes); + component = cc.Physics3DComponent.create(rigidBody); + sprite = new jsb.Sprite3D("Sprite3DTest/box.c3t"); + sprite.setTexture("Sprite3DTest/plane.png"); + sprite.setScaleX(3); + sprite.setScaleZ(3); + sprite.setPosition3D(cc.math.vec3(30, 15, 0)); + sprite.addComponent(component); + sprite.setCameraMask(cc.CameraFlag.USER1); + this.addChild(sprite); + component.syncToNode(); + rigidBody.setLinearVelocity(cc.math.vec3(0, 3, 0)); + + rbDes.mass = 0; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(3, 3, 3)); + var rigidBodyB = cc.Physics3DRigidBody.create(rbDes); + component = cc.Physics3DComponent.create(rigidBodyB); + sprite = new jsb.Sprite3D("Sprite3DTest/box.c3t"); + sprite.setTexture("Sprite3DTest/plane.png"); + sprite.setScale(3); + sprite.setPosition3D(cc.math.vec3(30, 5, 0)); + sprite.addComponent(component); + sprite.setCameraMask(cc.CameraFlag.USER1); + this.addChild(sprite); + component.syncToNode(); + + var frameInA = [-4.37114e-08, 1, 0, 0, -1, -4.37114e-08, 0, 0, 0, 0, 1, 0, 0, -5, 0, 1]; + var frameInB = [-4.37114e-08, 1, 0, 0, -1, -4.37114e-08, 0, 0, 0, 0, 1, 0, 0, 5, 0, 1]; + constraint = cc.Physics3DSliderConstraint.create(rigidBody, rigidBodyB, frameInA, frameInB, false); + physicsScene.getPhysics3DWorld().addPhysics3DConstraint(constraint); + constraint.setLowerLinLimit(-5); + constraint.setUpperLinLimit(5); + + //create ConeTwist constraint + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(3, 3, 3)); + rigidBody = cc.Physics3DRigidBody.create(rbDes); + component = cc.Physics3DComponent.create(rigidBody); + sprite = new jsb.Sprite3D("Sprite3DTest/box.c3t"); + sprite.setTexture("Sprite3DTest/plane.png"); + sprite.setScale(3); + sprite.setPosition3D(cc.math.vec3(-10, 5, 5)); + sprite.addComponent(component); + sprite.setCameraMask(cc.CameraFlag.USER1); + this.addChild(sprite); + component.syncToNode(); + + frameInA = [-4.37114e-08, 1, 0, 0, -1, -4.37114e-08, 0, 0, 0, 0, 1, 0, 0, -10, 0, 1]; + constraint = cc.Physics3DConeTwistConstraint.create(rigidBody, frameInA); + physicsScene.getPhysics3DWorld().addPhysics3DConstraint(constraint, true); + constraint.setLimit(cc.degreesToRadians(10), cc.degreesToRadians(10), cc.degreesToRadians(40)); + + //create 6 dof constraint + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(3, 3, 3)); + rigidBody = cc.Physics3DRigidBody.create(rbDes); + component = cc.Physics3DComponent.create(rigidBody); + sprite = new jsb.Sprite3D("Sprite3DTest/box.c3t"); + sprite.setTexture("Sprite3DTest/plane.png"); + sprite.setScale(3); + sprite.setPosition3D(cc.math.vec3(30, -5, 0)); + sprite.addComponent(component); + sprite.setCameraMask(cc.CameraFlag.USER1); + this.addChild(sprite); + component.syncToNode(); + + frameInA = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; + constraint = cc.Physics3D6DofConstraint.create(rigidBody, frameInA, false); + physicsScene.getPhysics3DWorld().addPhysics3DConstraint(constraint); + constraint.setAngularLowerLimit(cc.math.vec3(0, 0, 0)); + constraint.setAngularUpperLimit(cc.math.vec3(0, 0, 0)); + constraint.setLinearLowerLimit(cc.math.vec3(-10, 0, 0)); + constraint.setLinearUpperLimit(cc.math.vec3(10, 0, 0)); + } +}); + +var Physics3DKinematicDemo = Physics3DTestDemo.extend({ + _subtitle:"Physics3D Kinematic", + + ctor:function(){ + this._super(); + + var rbDes = cc.physics3DRigidBodyDes(); + rbDes.mass = 0; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(60, 1, 60)); + + var floor = cc.PhysicsSprite3D.create("Sprite3DTest/box.c3t", rbDes); + floor.setTexture("Sprite3DTest/plane.png"); + floor.setScaleX(60); + floor.setScaleZ(60); + floor.setPosition3D(cc.math.vec3(0, -1, 0)); + this.addChild(floor); + floor.setCameraMask(cc.CameraFlag.USER1); + floor.syncToNode(); + //static object sync is not needed + floor.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.NONE); + + //create Kinematics + for(let i = 0; i < 3; ++i){ + rbDes.mass = 0; + rbDes.shape = cc.Physics3DShape.createBox(cc.math.vec3(2, 2, 2)); + + let sprite = cc.PhysicsSprite3D.create("Sprite3DTest/box.c3t", rbDes); + sprite.setTexture("Images/CyanSquare.png"); + sprite.setCameraMask(cc.CameraFlag.USER1); + let rigidBody = sprite.getPhysicsObj(); + rigidBody.setKinematic(true); + + this.addChild(sprite); + + sprite.setScale(2); + sprite.setPosition3D(cc.math.vec3(-15, 0, 15-15*i)); + let moveby = cc.moveBy(2+i, cc.math.vec3(30, 0, 0)); + sprite.runAction(cc.sequence(moveby, moveby.reverse()).repeatForever()); + } + + //create Dynamic + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createSphere(0.5); + var start_x = START_POS_X - ARRAY_SIZE_X/2; + var start_y = START_POS_Y + 5; + var start_z = START_POS_Z - ARRAY_SIZE_Z/2; + + for(var k = 0; k < ARRAY_SIZE_Y; ++k){ + for(var i = 0; i < ARRAY_SIZE_X; ++i){ + for(var j = 0; j < ARRAY_SIZE_Z; ++j){ + var x = i + start_x, + y = 5 + k + start_y, + z = j + start_z; + + rbDes.originalTransform[12] = x; + rbDes.originalTransform[13] = y; + rbDes.originalTransform[14] = z; + + var sprite = cc.PhysicsSprite3D.create("Sprite3DTest/sphere.c3b", rbDes); + sprite.setTexture("Sprite3DTest/plane.png"); + sprite.setPosition3D(cc.math.vec3(x, y, z)); + sprite.syncToNode(); + sprite.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE); + sprite.setCameraMask(cc.CameraFlag.USER1); + sprite.setScale(1/sprite.getContentSize().width); + this.addChild(sprite); + } + } + } + + physicsScene.setPhysics3DDebugCamera(this._camera); + } +}); + +var Physics3DCollisionCallbackDemo = Physics3DTestDemo.extend({ + _subtitle:"Physics3D CollisionCallback", + + ctor:function(){ + this._super(); + + var rbDes = cc.physics3DRigidBodyDes(); + + var scale = 2; + var trianglesList = jsb.Bundle3D.getTrianglesList("Sprite3DTest/boss.c3b"); + + for(var i = 0; i < trianglesList.length; ++i){ + trianglesList[i].x *= scale; + trianglesList[i].y *= scale; + trianglesList[i].z *= scale; + } + + rbDes.mass = 0; + rbDes.shape = cc.Physics3DShape.createMesh(trianglesList, trianglesList.length/3); + + var rigidBody = cc.Physics3DRigidBody.create(rbDes); + var component = cc.Physics3DComponent.create(rigidBody); + var sprite = new jsb.Sprite3D("Sprite3DTest/boss.c3b"); + sprite.addComponent(component); + sprite.setRotation3D(cc.math.vec3(-90, 0, 0)); + sprite.setScale(scale); + sprite.setCameraMask(cc.CameraFlag.USER1); + this.addChild(sprite); + + rigidBody.setCollisionCallback(function(collisionInfo){ + if(collisionInfo.collisionPointList.length > 0 && collisionInfo.objA.getMask() != 0){ + var ps = jsb.PUParticleSystem3D.create("Particle3D/scripts/mp_hit_04.pu"); + ps.setPosition3D(collisionInfo.collisionPointList[0].worldPositionOnB); + ps.setScale(0.05); + ps.startParticleSystem(); + ps.setCameraMask(2); + this.addChild(ps); + + ps.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(function(){ + ps.removeFromParent(); + }))); + + collisionInfo.objA.setMask(0); + } + + }, this); + + physicsScene.setPhysics3DDebugCamera(this._camera); + } +}); + +var Physics3DTerrainDemo = Physics3DTestDemo.extend({ + _subtitle:"Physics3D Terrain", + + ctor:function(){ + this._super(); + + var r = jsb.Terrain.detailMap("TerrainTest/dirt.jpg"), + g = jsb.Terrain.detailMap("TerrainTest/Grass2.jpg", 10), + b = jsb.Terrain.detailMap("TerrainTest/road.jpg"), + a = jsb.Terrain.detailMap("TerrainTest/GreenSkin.jpg", 20); + var data = jsb.Terrain.terrainData( + "TerrainTest/heightmap129.jpg", + "TerrainTest/alphamap.png", + [r, g, b, a], + cc.size(32,32), + 20, + 1 + ); + + var terrain = jsb.Terrain.create(data, jsb.Terrain.CrackFixedType.SKIRT); + terrain.setSkirtHeightRatio(3); + terrain.setLODDistance(64, 128, 192); + terrain.setMaxDetailMapAmount(4); + terrain.setCameraMask(2); + terrain.setDrawWire(false); + + var rbDes = cc.physics3DRigidBodyDes(); + rbDes.mass = 0; + + var heightData = terrain.getHeightData(); + var size = terrain.getTerrainSize(); + rbDes.shape = cc.Physics3DShape.createHeightfield(size.width, size.height, heightData, 1.0, terrain.getMinHeight(), terrain.getMaxHeight(), true, false, true); + var rigidBody = cc.Physics3DRigidBody.create(rbDes); + var component = cc.Physics3DComponent.create(rigidBody); + terrain.addComponent(component); + component.syncToNode(); + component.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.NONE); + + this.addChild(terrain); + + //create several spheres + rbDes.mass = 1; + rbDes.shape = cc.Physics3DShape.createSphere(0.5); + var start_x = START_POS_X - ARRAY_SIZE_X/2 + 5; + var start_y = START_POS_Y + 20; + var start_z = START_POS_Z - ARRAY_SIZE_Z/2; + + for(var k = 0; k < ARRAY_SIZE_Y; ++k){ + for(var i = 0; i < ARRAY_SIZE_X; ++i){ + for(var j = 0; j < ARRAY_SIZE_Z; ++j){ + var x = i + start_x, + y = 5 + k + start_y, + z = j + start_z; + + var sprite = cc.PhysicsSprite3D.create("Sprite3DTest/sphere.c3b", rbDes); + sprite.setTexture("Sprite3DTest/plane.png"); + sprite.setPosition3D(cc.math.vec3(x, y, z)); + sprite.syncToNode(); + sprite.setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE); + sprite.setCameraMask(cc.CameraFlag.USER1); + sprite.setScale(1/sprite.getContentSize().width); + this.addChild(sprite); + } + } + } + + //create mesh + var trianglesList = jsb.Bundle3D.getTrianglesList("Sprite3DTest/boss.c3b"); + rbDes.mass = 0; + rbDes.shape = cc.Physics3DShape.createMesh(trianglesList, trianglesList.length/3); + rigidBody = cc.Physics3DRigidBody.create(rbDes); + component = cc.Physics3DComponent.create(rigidBody); + var sprite = new jsb.Sprite3D("Sprite3DTest/boss.c3b"); + sprite.addComponent(component); + sprite.setRotation3D(cc.math.vec3(-90, 0, 0)); + sprite.setPosition3D(cc.math.vec3(0, 15, 0)); + sprite.setCameraMask(2); + this.addChild(sprite); + + + physicsScene.setPhysics3DDebugCamera(this._camera); + } +}); + +// +// Flow control +// +var arrayOfPhysics3DTest = [ + BasicPhysics3DDemo, + Physics3DConstraintDemo, + Physics3DKinematicDemo, + Physics3DCollisionCallbackDemo, + Physics3DTerrainDemo +]; + +var nextPhysics3DTest = function () { + Physics3DTestIdx++; + Physics3DTestIdx = Physics3DTestIdx % arrayOfPhysics3DTest.length; + + return new arrayOfPhysics3DTest[Physics3DTestIdx ](); +}; +var previousPhysics3DTest = function () { + Physics3DTestIdx--; + if (Physics3DTestIdx < 0) + Physics3DTestIdx += arrayOfPhysics3DTest.length; + + return new arrayOfPhysics3DTest[Physics3DTestIdx ](); +}; +var restartPhysics3DTest = function () { + return new arrayOfPhysics3DTest[Physics3DTestIdx ](); +}; diff --git a/tests/js-tests/src/Presentation/Presentation.js b/tests/js-tests/src/Presentation/Presentation.js index 8d82ee231f..0cc54bdc4b 100644 --- a/tests/js-tests/src/Presentation/Presentation.js +++ b/tests/js-tests/src/Presentation/Presentation.js @@ -25,7 +25,7 @@ var presentationSceneIdx = -1; var centerPos = cc.p(0,0); // will be updated later -var images_path = 'res/Presentation/'; +var images_path = 'Presentation/'; //------------------------------------------------------------------ // @@ -481,7 +481,7 @@ var ParticlesPage = function() { meteor.x = winSize.width*3/4; meteor.y = winSize.height/2; - var flower = new cc.ParticleSystem("res/Particles/Flower.plist"); + var flower = new cc.ParticleSystem("Particles/Flower.plist"); this.addChild( flower ); flower.x = centerPos.x; flower.y = centerPos.y; diff --git a/tests/js-tests/src/SceneTest/SceneTest.js b/tests/js-tests/src/SceneTest/SceneTest.js index 50df170891..cf622438d6 100644 --- a/tests/js-tests/src/SceneTest/SceneTest.js +++ b/tests/js-tests/src/SceneTest/SceneTest.js @@ -43,8 +43,17 @@ var SceneTestLayer1 = cc.Layer.extend({ var item3 = new cc.MenuItemFont("Quit", function () { cc.log("quit!") }, this); + var item4 = new cc.MenuItemFont("setNotificationNode", function () { + var layerTemp = new cc.LayerColor(cc.color(0, 255, 255, 120)); + cc.director.setNotificationNode(layerTemp); + cc.log("setNotificationNode!"); + }, this); + var item5 = new cc.MenuItemFont("clearNotificationNode", function () { + cc.log("clearNotificationNode!"); + cc.director.setNotificationNode(null); + }, this); - var menu = new cc.Menu(item1, item2, item3); + var menu = new cc.Menu(item1, item2, item3, item4, item5); menu.alignItemsVertically(); this.addChild(menu); diff --git a/tests/js-tests/src/SchedulerTest/SchedulerTest.js b/tests/js-tests/src/SchedulerTest/SchedulerTest.js index ac0c3c96f5..d7cbf1618e 100644 --- a/tests/js-tests/src/SchedulerTest/SchedulerTest.js +++ b/tests/js-tests/src/SchedulerTest/SchedulerTest.js @@ -557,9 +557,9 @@ var SchedulerTimeScale = SchedulerTestLayer.extend({ var action2 = action.clone(); var action3 = action.clone(); - var grossini = new cc.Sprite("res/Images/grossini.png"); - var tamara = new cc.Sprite("res/Images/grossinis_sister1.png"); - var kathia = new cc.Sprite("res/Images/grossinis_sister2.png"); + var grossini = new cc.Sprite("Images/grossini.png"); + var tamara = new cc.Sprite("Images/grossinis_sister1.png"); + var kathia = new cc.Sprite("Images/grossinis_sister2.png"); grossini.setActionManager(this._newActionManager); grossini.setScheduler(this._newScheduler); @@ -589,9 +589,9 @@ var SchedulerTimeScale = SchedulerTestLayer.extend({ slider = new ccui.Slider(); slider.setTouchEnabled(true); - slider.loadBarTexture("res/cocosui/sliderTrack.png"); - slider.loadSlidBallTextures("res/cocosui/sliderThumb.png", "res/cocosui/sliderThumb.png", ""); - slider.loadProgressBarTexture("res/cocosui/sliderProgress.png"); + slider.loadBarTexture("ccs-res/cocosui/sliderTrack.png"); + slider.loadSlidBallTextures("ccs-res/cocosui/sliderThumb.png", "ccs-res/cocosui/sliderThumb.png", ""); + slider.loadProgressBarTexture("ccs-res/cocosui/sliderProgress.png"); slider.x = cc.winSize.width / 2.0; slider.y = cc.winSize.height / 3.0 * 2; slider.addEventListener(this.sliderEventForGrossini, this); @@ -605,9 +605,9 @@ var SchedulerTimeScale = SchedulerTestLayer.extend({ slider = new ccui.Slider(); slider.setTouchEnabled(true); - slider.loadBarTexture("res/cocosui/sliderTrack.png"); - slider.loadSlidBallTextures("res/cocosui/sliderThumb.png", "res/cocosui/sliderThumb.png", ""); - slider.loadProgressBarTexture("res/cocosui/sliderProgress.png"); + slider.loadBarTexture("ccs-res/cocosui/sliderTrack.png"); + slider.loadSlidBallTextures("ccs-res/cocosui/sliderThumb.png", "ccs-res/cocosui/sliderThumb.png", ""); + slider.loadProgressBarTexture("ccs-res/cocosui/sliderProgress.png"); slider.x = cc.winSize.width / 2.0; slider.y = cc.winSize.height / 3.0; slider.addEventListener(this.sliderEventForGlobal, this); diff --git a/tests/js-tests/src/SpineTest/SpineTest.js b/tests/js-tests/src/SpineTest/SpineTest.js index f88cd68949..1fa337c461 100644 --- a/tests/js-tests/src/SpineTest/SpineTest.js +++ b/tests/js-tests/src/SpineTest/SpineTest.js @@ -87,7 +87,7 @@ var SpineTestLayerNormal = SpineTestLayer.extend({ // Make Spine's Animated skeleton Node // You need 'json + atlas + image' resource files to make it. // No JS binding for spine-c in this version. So, only file loading is supported. - var spineBoy = new sp.SkeletonAnimation('res/skeletons/spineboy.json', 'res/skeletons/spineboy.atlas'); + var spineBoy = new sp.SkeletonAnimation('spine/spineboy.json', 'spine/spineboy.atlas'); spineBoy.setPosition(cc.p(size.width / 2, size.height / 2 - 150)); spineBoy.setMix('walk', 'jump', 0.2); spineBoy.setMix('jump', 'run', 0.2); @@ -203,7 +203,7 @@ var SpineTestLayerFFD = SpineTestLayer.extend({ ctor: function(){ this._super(cc.color(0,0,0,255), cc.color(98,99,117,255)); - var skeletonNode = new sp.SkeletonAnimation("res/skeletons/goblins-ffd.json", "res/skeletons/goblins-ffd.atlas", 1.5); + var skeletonNode = new sp.SkeletonAnimation("spine/goblins-ffd.json", "spine/goblins-ffd.atlas", 1.5); skeletonNode.setAnimation(0, "walk", true); skeletonNode.setSkin("goblin"); @@ -247,7 +247,7 @@ var SpineTestPerformanceLayer = SpineTestLayer.extend({ event: cc.EventListener.TOUCH_ONE_BY_ONE, onTouchBegan: function(touch, event){ var pos = self.convertToNodeSpace(touch.getLocation()); - var skeletonNode = new sp.SkeletonAnimation("res/skeletons/goblins-ffd.json", "res/skeletons/goblins-ffd.atlas", 1.5); + var skeletonNode = new sp.SkeletonAnimation("spine/goblins-ffd.json", "spine/goblins-ffd.atlas", 1.5); skeletonNode.setAnimation(0, "walk", true); skeletonNode.setSkin("goblin"); diff --git a/tests/js-tests/src/SpriteTest/SpriteTest.js b/tests/js-tests/src/SpriteTest/SpriteTest.js index 3909bd49bc..fc5ca5e63b 100644 --- a/tests/js-tests/src/SpriteTest/SpriteTest.js +++ b/tests/js-tests/src/SpriteTest/SpriteTest.js @@ -5343,7 +5343,7 @@ var SpriteBlendFuncTest = SpriteTestDemo.extend({ var destTitles = ["ZERO", "ONE", "SRC_COLOR", "ONE_MINUS_SRC_COLOR", "SRC_ALPHA", "ONE_MINUS_SRC_ALPHA"], srcTitles = ["ZERO", "ONE", "DST_COLOR", "ONE_MINUS_DST_COLOR", "SRC_ALPHA", "ONE_MINUS_SRC_ALPHA"]; - var sourceImg = "res/Images/dot.png", destImg = "res/Images/wood.jpg"; + var sourceImg = "Images/dot.png", destImg = "Images/wood.jpg"; var sourceTexture = cc.textureCache.addImage(sourceImg); sourceTexture.handleLoadedTexture(true); var sourceSprite = new cc.Sprite(sourceImg); diff --git a/tests/js-tests/src/TextureCacheTest/TextureCacheTest.js b/tests/js-tests/src/TextureCacheTest/TextureCacheTest.js index f28860582c..9de4c638c3 100644 --- a/tests/js-tests/src/TextureCacheTest/TextureCacheTest.js +++ b/tests/js-tests/src/TextureCacheTest/TextureCacheTest.js @@ -74,57 +74,57 @@ var TextureCacheTest = TextureCacheTestBase.extend({ var texCache = cc.textureCache; // load textrues - texCache.addImageAsync("res/Images/HelloWorld.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_01.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_02.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_03.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_04.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_05.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_06.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_07.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_08.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_09.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_10.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_11.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_12.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_13.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/grossini_dance_14.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/background1.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/background2.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/background3.png", this.loadingCallBack, this); - texCache.addImageAsync("res/Images/blocks.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/HelloWorld.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_01.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_02.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_03.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_04.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_05.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_06.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_07.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_08.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_09.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_10.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_11.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_12.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_13.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/grossini_dance_14.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/background1.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/background2.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/background3.png", this.loadingCallBack, this); + texCache.addImageAsync("Images/blocks.png", this.loadingCallBack, this); }, addSprite:function () { var size = cc.director.getWinSize(); // create sprites - var bg = new cc.Sprite("res/Images/HelloWorld.png"); + var bg = new cc.Sprite("Images/HelloWorld.png"); bg.x = size.width / 2; bg.y = size.height / 2; //bg.scale = 1.7; - var s1 = new cc.Sprite("res/Images/grossini.png"); - var s2 = new cc.Sprite("res/Images/grossini_dance_01.png"); - var s3 = new cc.Sprite("res/Images/grossini_dance_02.png"); - var s4 = new cc.Sprite("res/Images/grossini_dance_03.png"); - var s5 = new cc.Sprite("res/Images/grossini_dance_04.png"); - var s6 = new cc.Sprite("res/Images/grossini_dance_05.png"); - var s7 = new cc.Sprite("res/Images/grossini_dance_06.png"); - var s8 = new cc.Sprite("res/Images/grossini_dance_07.png"); - var s9 = new cc.Sprite("res/Images/grossini_dance_08.png"); - var s10 = new cc.Sprite("res/Images/grossini_dance_09.png"); - var s11 = new cc.Sprite("res/Images/grossini_dance_10.png"); - var s12 = new cc.Sprite("res/Images/grossini_dance_11.png"); - var s13 = new cc.Sprite("res/Images/grossini_dance_12.png"); - var s14 = new cc.Sprite("res/Images/grossini_dance_13.png"); - var s15 = new cc.Sprite("res/Images/grossini_dance_14.png"); + var s1 = new cc.Sprite("Images/grossini.png"); + var s2 = new cc.Sprite("Images/grossini_dance_01.png"); + var s3 = new cc.Sprite("Images/grossini_dance_02.png"); + var s4 = new cc.Sprite("Images/grossini_dance_03.png"); + var s5 = new cc.Sprite("Images/grossini_dance_04.png"); + var s6 = new cc.Sprite("Images/grossini_dance_05.png"); + var s7 = new cc.Sprite("Images/grossini_dance_06.png"); + var s8 = new cc.Sprite("Images/grossini_dance_07.png"); + var s9 = new cc.Sprite("Images/grossini_dance_08.png"); + var s10 = new cc.Sprite("Images/grossini_dance_09.png"); + var s11 = new cc.Sprite("Images/grossini_dance_10.png"); + var s12 = new cc.Sprite("Images/grossini_dance_11.png"); + var s13 = new cc.Sprite("Images/grossini_dance_12.png"); + var s14 = new cc.Sprite("Images/grossini_dance_13.png"); + var s15 = new cc.Sprite("Images/grossini_dance_14.png"); // just loading textures to slow down - var s16 = new cc.Sprite("res/Images/background1.png"); - var s17 = new cc.Sprite("res/Images/background2.png"); - var s18 = new cc.Sprite("res/Images/background3.png"); - var s19 = new cc.Sprite("res/Images/blocks.png"); + var s16 = new cc.Sprite("Images/background1.png"); + var s17 = new cc.Sprite("Images/background2.png"); + var s18 = new cc.Sprite("Images/background3.png"); + var s19 = new cc.Sprite("Images/blocks.png"); s1.x = 50; s1.y = 50; diff --git a/tests/js-tests/src/tests-main.js b/tests/js-tests/src/tests-main.js index 11e930c843..eb632b6722 100644 --- a/tests/js-tests/src/tests-main.js +++ b/tests/js-tests/src/tests-main.js @@ -530,6 +530,14 @@ var testNames = [ return new PerformanceTestScene(); } }, + { + title:"Physics3D Test", + platforms: PLATFORM_JSB, + linksrc:"src/Physics3DTest/Physics3DTest.js", + testScene:function () { + return new Physics3DTestScene(); + } + }, { title:"ProgressActions Test", platforms: PLATFORM_ALL, diff --git a/tests/js-tests/src/tests_resources.js b/tests/js-tests/src/tests_resources.js index b17d38166c..943d7e3d89 100644 --- a/tests/js-tests/src/tests_resources.js +++ b/tests/js-tests/src/tests_resources.js @@ -1,6 +1,12 @@ // Resources prefix var s_resprefix = ""; +var ccbjs = ""; +if (!cc.sys.isNative) +{ + ccbjs = "../../js-tests/resjs/"; +} + var s_pathGrossini = "Images/grossini.png"; var s_pathSister1 = "Images/grossinis_sister1.png"; var s_pathSister2 = "Images/grossinis_sister2.png"; @@ -59,40 +65,40 @@ var s_tcc_issue_2 = "animations/tcc_issue_2.png"; var s_tcc_issue_1_plist = "animations/tcc_issue_1.plist"; var s_tcc_issue_2_plist = "animations/tcc_issue_2.plist"; -var s_Cowboy_json = "armatuCowboy.ExportJson"; -var s_Cowboy_plist = "armatuCowboy0.plist"; -var s_Cowboy_png = "armatuCowboy0.png"; -var s_hero_json = "armatuhero.ExportJson"; -var s_hero0_plist = "armatuhero0.plist"; -var s_hero0_png = "armatuhero0.png"; -var s_horse_json = "armatuhorse.ExportJson"; -var s_horse0_plist = "armatuhorse0.plist"; -var s_horse0_png = "armatuhorse0.png"; -var s_bear_json = "armatubear.ExportJson"; -var s_bear0_plist = "armatubear0.plist"; -var s_bear0_png = "armatubear0.png"; -var s_blood_plist = "armatublood.plist"; -var s_HeroAnimation_json = "armatuHeroAnimation.ExportJson"; -var s_HeroAnimation0_plist = "armatuHeroAnimation0.plist"; -var s_HeroAnimation0_png = "armatuHeroAnimation0.png"; -var s_cyborg_plist = "armatucyborg.plist"; -var s_cyborg_png = "armatucyborg.png"; -var s_cyborg_xml = "armatucyborg.xml"; -var s_Dragon_plist = "armatuDragon.plist"; -var s_Dragon_png = "armatuDragon.png"; -var s_Dragon_xml = "armatuDragon.xml"; -var s_knight_plist = "armatuknight.plist"; -var s_knight_png = "armatuknight.png"; -var s_knight_xml = "armatuknight.xml"; -var s_robot_plist = "armaturobot.plist"; -var s_robot_png = "armaturobot.png"; -var s_robot_xml = "armaturobot.xml"; -var s_weapon_plist = "armatuweapon.plist"; -var s_weapon_png = "armatuweapon.png"; -var s_weapon_xml = "armatuweapon.xml"; -var s_testEasing_json = "armatutestEasing.ExportJson"; -var s_testEasing0_plist = "armatutestEasing0.plist"; -var s_testEasing0_png = "armatutestEasing0.png"; +var s_Cowboy_json = "ccs-res/armature/Cowboy.ExportJson"; +var s_Cowboy_plist = "ccs-res/armature/Cowboy0.plist"; +var s_Cowboy_png = "ccs-res/armature/Cowboy0.png"; +var s_hero_json = "ccs-res/armature/hero.ExportJson"; +var s_hero0_plist = "ccs-res/armature/hero0.plist"; +var s_hero0_png = "ccs-res/armature/hero0.png"; +var s_horse_json = "ccs-res/armature/horse.ExportJson"; +var s_horse0_plist = "ccs-res/armature/horse0.plist"; +var s_horse0_png = "ccs-res/armature/horse0.png"; +var s_bear_json = "ccs-res/armature/bear.ExportJson"; +var s_bear0_plist = "ccs-res/armature/bear0.plist"; +var s_bear0_png = "ccs-res/armature/bear0.png"; +var s_blood_plist = "ccs-res/armature/blood.plist"; +var s_HeroAnimation_json = "ccs-res/armature/HeroAnimation.ExportJson"; +var s_HeroAnimation0_plist = "ccs-res/armature/HeroAnimation0.plist"; +var s_HeroAnimation0_png = "ccs-res/armature/HeroAnimation0.png"; +var s_cyborg_plist = "ccs-res/armature/cyborg.plist"; +var s_cyborg_png = "ccs-res/armature/cyborg.png"; +var s_cyborg_xml = "ccs-res/armature/cyborg.xml"; +var s_Dragon_plist = "ccs-res/armature/Dragon.plist"; +var s_Dragon_png = "ccs-res/armature/Dragon.png"; +var s_Dragon_xml = "ccs-res/armature/Dragon.xml"; +var s_knight_plist = "ccs-res/armature/knight.plist"; +var s_knight_png = "ccs-res/armature/knight.png"; +var s_knight_xml = "ccs-res/armature/knight.xml"; +var s_robot_plist = "ccs-res/armature/robot.plist"; +var s_robot_png = "ccs-res/armature/robot.png"; +var s_robot_xml = "ccs-res/armature/robot.xml"; +var s_weapon_plist = "ccs-res/armature/weapon.plist"; +var s_weapon_png = "ccs-res/armature/weapon.png"; +var s_weapon_xml = "ccs-res/armature/weapon.xml"; +var s_testEasing_json = "ccs-res/armature/testEasing.ExportJson"; +var s_testEasing0_plist = "ccs-res/armature/testEasing0.plist"; +var s_testEasing0_png = "ccs-res/armature/testEasing0.png"; var s_s9s_blocks9 = "Images/blocks9ss.png"; var s_s9s_blocks9_plist = "Images/blocks9ss.plist"; @@ -149,7 +155,7 @@ var s_tileISOOffsetPng = "TileMaps/tile_iso_offset.png"; var s_tileISOOffsetTmx = "TileMaps/tile_iso_offset.tmx"; var s_fnTuffyBoldItalicCharmapPng = "fonts/tuffy_bold_italic-charmap.png"; -var s_fpsImages = "fonts/fps_images.png"; +var s_fpsImages = "fps_images.png"; var s_bitmapFontTest = "fonts/bitmapFontTest.png"; var s_bitmapFontTest2 = "fonts/bitmapFontTest2.png"; var s_bitmapFontTest3 = "fonts/bitmapFontTest3.png"; @@ -315,25 +321,25 @@ var g_s9s_blocks = [ var g_opengl_resources = [ //preload shader source - "Shaders/example_Outline.fsh", - "Shaders/example_Outline.vsh", - "Shaders/example_Blur.fsh", - "Shaders/example_ColorBars.fsh", - "Shaders/example_ColorBars.vsh", - "Shaders/example_Flower.fsh", - "Shaders/example_Flower.vsh", - "Shaders/example_Heart.fsh", - "Shaders/example_Heart.vsh", - "Shaders/example_Julia.fsh", - "Shaders/example_Julia.vsh", - "Shaders/example_Mandelbrot.fsh", - "Shaders/example_Mandelbrot.vsh", - "Shaders/example_Monjori.fsh", - "Shaders/example_Monjori.vsh", - "Shaders/example_Plasma.fsh", - "Shaders/example_Plasma.vsh", - "Shaders/example_Twist.fsh", - "Shaders/example_Twist.vsh", + ccbjs + "Shaders/example_Outline.fsh", + ccbjs + "Shaders/example_Outline.vsh", + ccbjs + "Shaders/example_Blur.fsh", + ccbjs + "Shaders/example_ColorBars.fsh", + ccbjs + "Shaders/example_ColorBars.vsh", + ccbjs + "Shaders/example_Flower.fsh", + ccbjs + "Shaders/example_Flower.vsh", + ccbjs + "Shaders/example_Heart.fsh", + ccbjs + "Shaders/example_Heart.vsh", + ccbjs + "Shaders/example_Julia.fsh", + ccbjs + "Shaders/example_Julia.vsh", + ccbjs + "Shaders/example_Mandelbrot.fsh", + ccbjs + "Shaders/example_Mandelbrot.vsh", + ccbjs + "Shaders/example_Monjori.fsh", + ccbjs + "Shaders/example_Monjori.vsh", + ccbjs + "Shaders/example_Plasma.fsh", + ccbjs + "Shaders/example_Plasma.vsh", + ccbjs + "Shaders/example_Twist.fsh", + ccbjs + "Shaders/example_Twist.vsh", "fonts/west_england-64.fnt", "fonts/west_england-64.png" @@ -393,10 +399,10 @@ var g_box2d = [ ]; var g_cocosdeshion = [ - "Sound/background.mp3", - "Sound/effect2.mp3" - //"Sound/background.ogg", //one sound only, cc.audio can auto select other format to load if the sound format isn't supported on some browser. - //"Sound/effect2.ogg" + "background.mp3", + "effect2.mp3" + //"background.ogg", //one sound only, cc.audio can auto select other format to load if the sound format isn't supported on some browser. + //"effect2.ogg" ]; var g_parallax = [ @@ -450,22 +456,22 @@ var g_fonts = [ { type:"font", name:"Thonburi", - srcs:["fonts/Thonburi.eot", "fonts/Thonburi.ttf"] + srcs:["../cpp-tests/Resources/fonts/Thonburi.eot", "../cpp-tests/Resources/fonts/Thonburi.ttf"] }, { type:"font", name:"Schwarzwald Regular", - srcs:["fonts/Schwarzwald_Regular.eot", "fonts/Schwarzwald Regular.ttf"] + srcs:["../cpp-tests/Resources/fonts/Schwarzwald_Regular.eot", "../cpp-tests/Resources/fonts/Schwarzwald Regular.ttf"] }, { type:"font", name:"ThonburiBold", - srcs:["fonts/ThonburiBold.eot", "fonts/ThonburiBold.ttf"] + srcs:["../cpp-tests/Resources/fonts/ThonburiBold.eot", "../cpp-tests/Resources/fonts/ThonburiBold.ttf"] }, { type:"font", name:"Courier New", - srcs:["fonts/Courier New.eot", "fonts/Courier New.ttf"] + srcs:["../cpp-tests/Resources/fonts/Courier New.eot", "../cpp-tests/Resources/fonts/Courier New.ttf"] } ]; @@ -478,46 +484,46 @@ var g_extensions = [ s_extensions_ribbon, //ccbi resource - "ccb/HelloCocosBuilder.ccbi", - "ccb/ccb/TestAnimations.ccbi", - "ccb/ccb/TestAnimationsSub.ccbi", - "ccb/ccb/TestButtons.ccbi", - "ccb/ccb/TestHeader.ccbi", - "ccb/ccb/TestLabels.ccbi", - "ccb/ccb/TestMenus.ccbi", - "ccb/ccb/TestParticleSystems.ccbi", - "ccb/ccb/TestScrollViews.ccbi", - "ccb/ccb/TestScrollViewsContentA.ccbi", - "ccb/ccb/TestSprites.ccbi", + ccbjs + "ccb/HelloCocosBuilder.ccbi", + ccbjs + "ccb/ccb/TestAnimations.ccbi", + ccbjs + "ccb/ccb/TestAnimationsSub.ccbi", + ccbjs + "ccb/ccb/TestButtons.ccbi", + ccbjs + "ccb/ccb/TestHeader.ccbi", + ccbjs + "ccb/ccb/TestLabels.ccbi", + ccbjs + "ccb/ccb/TestMenus.ccbi", + ccbjs + "ccb/ccb/TestParticleSystems.ccbi", + ccbjs + "ccb/ccb/TestScrollViews.ccbi", + ccbjs + "ccb/ccb/TestScrollViewsContentA.ccbi", + ccbjs + "ccb/ccb/TestSprites.ccbi", - "ccb/ccbParticleStars.png", - "ccb/btn-test-0.png", - "ccb/animated-grossini.png", - "ccb/btn-a-0.png", - "ccb/btn-a-1.png", - "ccb/btn-a-2.png", - "ccb/btn-b-0.png", - "ccb/btn-b-1.png", - "ccb/btn-b-2.png", - "ccb/btn-back-0.png", - "ccb/btn-back-1.png", - "ccb/btn-test-0.png", - "ccb/btn-test-1.png", - "ccb/btn-test-2.png", - "ccb/burst.png", - "ccb/flower.jpg", - "ccb/grossini-generic.png", - "ccb/jungle.png", - "ccb/jungle-left.png", - "ccb/jungle-right.png", - "ccb/logo.png", - "ccb/logo-icon.png", - "ccb/markerfelt24shadow.png", - "ccb/particle-fire.png", - "ccb/particle-smoke.png", - "ccb/particle-snow.png", - "ccb/particle-stars.png", - "ccb/scale-9-demo.png", + ccbjs + "ccb/ccbParticleStars.png", + ccbjs + "ccb/btn-test-0.png", + ccbjs + "ccb/animated-grossini.png", + ccbjs + "ccb/btn-a-0.png", + ccbjs + "ccb/btn-a-1.png", + ccbjs + "ccb/btn-a-2.png", + ccbjs + "ccb/btn-b-0.png", + ccbjs + "ccb/btn-b-1.png", + ccbjs + "ccb/btn-b-2.png", + ccbjs + "ccb/btn-back-0.png", + ccbjs + "ccb/btn-back-1.png", + ccbjs + "ccb/btn-test-0.png", + ccbjs + "ccb/btn-test-1.png", + ccbjs + "ccb/btn-test-2.png", + ccbjs + "ccb/burst.png", + ccbjs + "ccb/flower.jpg", + ccbjs + "ccb/grossini-generic.png", + ccbjs + "ccb/jungle.png", + ccbjs + "ccb/jungle-left.png", + ccbjs + "ccb/jungle-right.png", + ccbjs + "ccb/logo.png", + ccbjs + "ccb/logo-icon.png", + ccbjs + "ccb/markerfelt24shadow.png", + ccbjs + "ccb/particle-fire.png", + ccbjs + "ccb/particle-smoke.png", + ccbjs + "ccb/particle-snow.png", + ccbjs + "ccb/particle-stars.png", + ccbjs + "ccb/scale-9-demo.png", "extensions/green_edit.png", "extensions/orange_edit.png", "extensions/yellow_edit.png", @@ -538,10 +544,10 @@ var g_extensions = [ "extensions/CCControlColourPickerSpriteSheet.plist", "extensions/CCControlColourPickerSpriteSheet.png", - "ccb/markerfelt24shadow.fnt", + ccbjs + "ccb/markerfelt24shadow.fnt", - "ccb/grossini-generic.plist", - "ccb/animated-grossini.plist" + ccbjs + "ccb/grossini-generic.plist", + ccbjs + "ccb/animated-grossini.plist" ]; var g_cocoStudio = [ @@ -587,380 +593,380 @@ var g_cocoStudio = [ "Images/b2.png", "Images/f1.png", "Images/f2.png", - "cocosui/CCS/Button/background.png", - "cocosui/CCS/Button/buttonBackground.png", - "cocosui/CCS/Button/buttonHighlighted.png", - "cocosui/CCS/Button/button_n.png", - "cocosui/CCS/Button/button_p.png", - "cocosui/CCS/Button/ribbon.png", - "cocosui/CCS/Button/Button_1.json", - "cocosui/CCS/CheckBox/background.png", - "cocosui/CCS/CheckBox/buttonBackground.png", - "cocosui/CCS/CheckBox/ribbon.png", - "cocosui/CCS/CheckBox/selected01.png", - "cocosui/CCS/CheckBox/selected02.png", - "cocosui/CCS/CheckBox/checkbox_1.json", - "cocosui/CCS/CheckBox/MainScene.json", - "cocosui/CCS/CheckBox/Default/CheckBox_Disable.png", - "cocosui/CCS/CheckBox/img/btn_music.png", - "cocosui/CCS/CheckBox/img/btn_sound_off.png", - "cocosui/CCS/ImageView/background.png", - "cocosui/CCS/ImageView/buttonBackground.png", - "cocosui/CCS/ImageView/buttonHighlighted.png", - "cocosui/CCS/ImageView/GUI/image.png", - "cocosui/CCS/ImageView/ribbon.png", - "cocosui/CCS/ImageView/ImageView_1.json", - "cocosui/CCS/LabelAtlas/background.png", - "cocosui/CCS/LabelAtlas/buttonBackground.png", - "cocosui/CCS/LabelAtlas/GUI/labelatlasimg.png", - "cocosui/CCS/LabelAtlas/ribbon.png", - "cocosui/CCS/LabelAtlas/labelatlas_1.json", - "cocosui/CCS/LabelBMFont/background.png", - "cocosui/CCS/LabelBMFont/buttonBackground.png", - "cocosui/CCS/LabelBMFont/GUI/missing-font.fnt", - "cocosui/CCS/LabelBMFont/GUI/missing-font.png", - "cocosui/CCS/LabelBMFont/ribbon.png", - "cocosui/CCS/LabelBMFont/labelbmfont_1.json", - "cocosui/CCS/Label/background.png", - "cocosui/CCS/Label/buttonBackground.png", - "cocosui/CCS/Label/ribbon.png", - "cocosui/CCS/Label/label_1.json", - "cocosui/CCS/Layout/BackgroundImage/background.png", - "cocosui/CCS/Layout/BackgroundImage/buttonBackground.png", - "cocosui/CCS/Layout/BackgroundImage/button_n.png", - "cocosui/CCS/Layout/BackgroundImage/button_p.png", - "cocosui/CCS/Layout/BackgroundImage/GUI/image.png", - "cocosui/CCS/Layout/BackgroundImage/Hello.png", - "cocosui/CCS/Layout/BackgroundImage/ribbon.png", - "cocosui/CCS/Layout/BackgroundImage/selected01.png", - "cocosui/CCS/Layout/BackgroundImage/selected02.png", - "cocosui/CCS/Layout/BackgroundImage/backgroundimage_1.json", - "cocosui/CCS/Layout/Color/background.png", - "cocosui/CCS/Layout/Color/buttonBackground.png", - "cocosui/CCS/Layout/Color/button_n.png", - "cocosui/CCS/Layout/Color/button_p.png", - "cocosui/CCS/Layout/Color/GUI/image.png", - "cocosui/CCS/Layout/Color/ribbon.png", - "cocosui/CCS/Layout/Color/selected01.png", - "cocosui/CCS/Layout/Color/selected02.png", - "cocosui/CCS/Layout/Color/color_1.json", - "cocosui/CCS/Layout/Layout/background.png", - "cocosui/CCS/Layout/Layout/buttonBackground.png", - "cocosui/CCS/Layout/Layout/button_n.png", - "cocosui/CCS/Layout/Layout/button_p.png", - "cocosui/CCS/Layout/Layout/GUI/image.png", - "cocosui/CCS/Layout/Layout/ribbon.png", - "cocosui/CCS/Layout/Layout/selected01.png", - "cocosui/CCS/Layout/Layout/selected02.png", - "cocosui/CCS/Layout/Layout/layout_1.json", - "cocosui/CCS/Layout/Gradient_Color/background.png", - "cocosui/CCS/Layout/Gradient_Color/buttonBackground.png", - "cocosui/CCS/Layout/Gradient_Color/button_n.png", - "cocosui/CCS/Layout/Gradient_Color/button_p.png", - "cocosui/CCS/Layout/Gradient_Color/GUI/image.png", - "cocosui/CCS/Layout/Gradient_Color/ribbon.png", - "cocosui/CCS/Layout/Gradient_Color/selected01.png", - "cocosui/CCS/Layout/Gradient_Color/selected02.png", - "cocosui/CCS/Layout/Gradient_Color/gradient_color_1.json", - "cocosui/CCS/Layout/Linear_Horizontal/background.png", - "cocosui/CCS/Layout/Linear_Horizontal/buttonBackground.png", - "cocosui/CCS/Layout/Linear_Horizontal/button_n.png", - "cocosui/CCS/Layout/Linear_Horizontal/button_p.png", - "cocosui/CCS/Layout/Linear_Horizontal/GUI/image.png", - "cocosui/CCS/Layout/Linear_Horizontal/ribbon.png", - "cocosui/CCS/Layout/Linear_Horizontal/selected01.png", - "cocosui/CCS/Layout/Linear_Horizontal/selected02.png", - "cocosui/CCS/Layout/Linear_Horizontal/linear_horizontal.json", - "cocosui/CCS/Layout/Linear_Vertical/background.png", - "cocosui/CCS/Layout/Linear_Vertical/buttonBackground.png", - "cocosui/CCS/Layout/Linear_Vertical/button_n.png", - "cocosui/CCS/Layout/Linear_Vertical/button_p.png", - "cocosui/CCS/Layout/Linear_Vertical/GUI/image.png", - "cocosui/CCS/Layout/Linear_Vertical/ribbon.png", - "cocosui/CCS/Layout/Linear_Vertical/selected01.png", - "cocosui/CCS/Layout/Linear_Vertical/selected02.png", - "cocosui/CCS/Layout/Linear_Vertical/linear_vertical.json", - "cocosui/CCS/Layout/Relative_Align_Location/background.png", - "cocosui/CCS/Layout/Relative_Align_Location/buttonBackground.png", - "cocosui/CCS/Layout/Relative_Align_Location/button_n.png", - "cocosui/CCS/Layout/Relative_Align_Location/button_p.png", - "cocosui/CCS/Layout/Relative_Align_Location/GUI/image.png", - "cocosui/CCS/Layout/Relative_Align_Location/ribbon.png", - "cocosui/CCS/Layout/Relative_Align_Location/selected01.png", - "cocosui/CCS/Layout/Relative_Align_Location/selected02.png", - "cocosui/CCS/Layout/Relative_Align_Location/relative_align_location.json", - "cocosui/CCS/Layout/Relative_Align_Parent/background.png", - "cocosui/CCS/Layout/Relative_Align_Parent/buttonBackground.png", - "cocosui/CCS/Layout/Relative_Align_Parent/button_n.png", - "cocosui/CCS/Layout/Relative_Align_Parent/button_p.png", - "cocosui/CCS/Layout/Relative_Align_Parent/GUI/image.png", - "cocosui/CCS/Layout/Relative_Align_Parent/ribbon.png", - "cocosui/CCS/Layout/Relative_Align_Parent/selected01.png", - "cocosui/CCS/Layout/Relative_Align_Parent/selected02.png", - "cocosui/CCS/Layout/Relative_Align_Parent/relative_align_parent.json", - "cocosui/CCS/Layout/Scale9/background.png", - "cocosui/CCS/Layout/Scale9/buttonBackground.png", - "cocosui/CCS/Layout/Scale9/button_n.png", - "cocosui/CCS/Layout/Scale9/button_p.png", - "cocosui/CCS/Layout/Scale9/GUI/image.png", - "cocosui/CCS/Layout/Scale9/ribbon.png", - "cocosui/CCS/Layout/Scale9/selected01.png", - "cocosui/CCS/Layout/Scale9/selected02.png", - "cocosui/CCS/Layout/Scale9/slider_bar.png", - "cocosui/CCS/Layout/Scale9/scale9.json", - "cocosui/CCS/ListView/Horizontal/background.png", - "cocosui/CCS/ListView/Horizontal/buttonBackground.png", - "cocosui/CCS/ListView/Horizontal/button_p.png", - "cocosui/CCS/ListView/Horizontal/GUI/button.png", - "cocosui/CCS/ListView/Horizontal/GUI/image.png", - "cocosui/CCS/ListView/Horizontal/ribbon.png", - "cocosui/CCS/ListView/Horizontal/horizontal_1.json", - "cocosui/CCS/ListView/Vertical/background.png", - "cocosui/CCS/ListView/Vertical/buttonBackground.png", - "cocosui/CCS/ListView/Vertical/button_p.png", - "cocosui/CCS/ListView/Vertical/GUI/button.png", - "cocosui/CCS/ListView/Vertical/GUI/image.png", - "cocosui/CCS/ListView/Vertical/ribbon.png", - "cocosui/CCS/ListView/Vertical/vertical_1.json", - "cocosui/CCS/LoadingBar/background.png", - "cocosui/CCS/LoadingBar/buttonBackground.png", - "cocosui/CCS/LoadingBar/GUI/loadingbar.png", - "cocosui/CCS/LoadingBar/ribbon.png", - "cocosui/CCS/LoadingBar/loadingbar_1.json", - "cocosui/CCS/PageView/background.png", - "cocosui/CCS/PageView/buttonBackground.png", - "cocosui/CCS/PageView/button_n.png", - "cocosui/CCS/PageView/ribbon.png", - "cocosui/CCS/PageView/pageview_1.json", - "cocosui/CCS/ScrollView/Both/background.png", - "cocosui/CCS/ScrollView/Both/buttonBackground.png", - "cocosui/CCS/ScrollView/Both/button_n.png", - "cocosui/CCS/ScrollView/Both/button_p.png", - "cocosui/CCS/ScrollView/Both/GUI/image.png", - "cocosui/CCS/ScrollView/Both/ribbon.png", - "cocosui/CCS/ScrollView/Both/selected01.png", - "cocosui/CCS/ScrollView/Both/selected02.png", - "cocosui/CCS/ScrollView/Both/both_1.json", - "cocosui/CCS/ScrollView/Horizontal/background.png", - "cocosui/CCS/ScrollView/Horizontal/buttonBackground.png", - "cocosui/CCS/ScrollView/Horizontal/button_n.png", - "cocosui/CCS/ScrollView/Horizontal/button_p.png", - "cocosui/CCS/ScrollView/Horizontal/GUI/image.png", - "cocosui/CCS/ScrollView/Horizontal/ribbon.png", - "cocosui/CCS/ScrollView/Horizontal/selected01.png", - "cocosui/CCS/ScrollView/Horizontal/selected02.png", - "cocosui/CCS/ScrollView/Horizontal/horizontal_1.json", - "cocosui/CCS/ScrollView/Vertical/background.png", - "cocosui/CCS/ScrollView/Vertical/buttonBackground.png", - "cocosui/CCS/ScrollView/Vertical/button_n.png", - "cocosui/CCS/ScrollView/Vertical/button_p.png", - "cocosui/CCS/ScrollView/Vertical/GUI/image.png", - "cocosui/CCS/ScrollView/Vertical/ribbon.png", - "cocosui/CCS/ScrollView/Vertical/selected01.png", - "cocosui/CCS/ScrollView/Vertical/selected02.png", - "cocosui/CCS/ScrollView/Vertical/vertical_1.json", - "cocosui/CCS/Slider/2014-1-26 11-42-09.png", - "cocosui/CCS/Slider/2014-1-26 11-43-52.png", - "cocosui/CCS/Slider/background.png", - "cocosui/CCS/Slider/buttonBackground.png", - "cocosui/CCS/Slider/ribbon.png", - "cocosui/CCS/Slider/silder_progressBar.png", - "cocosui/CCS/Slider/slider_bar.png", - "cocosui/CCS/Slider/slider_bar_button.png", - "cocosui/CCS/Slider/slider_1.json", - "cocosui/CCS/TextField/background.png", - "cocosui/CCS/TextField/buttonBackground.png", - "cocosui/CCS/TextField/ribbon.png", - "cocosui/CCS/TextField/textfield_1.json", - "cocosui/CCS/WidgetAddNode/background.png", - "cocosui/CCS/WidgetAddNode/buttonBackground.png", - "cocosui/CCS/WidgetAddNode/ribbon.png", - "cocosui/CCS/WidgetAddNode/widget_add_node.json", - "Sound/background-music-aac.wav", - "Sound/pew-pew-lei.wav", + "ccs-res/cocosui/UIEditorTest/UIButton/background.png", + "ccs-res/cocosui/UIEditorTest/UIButton/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIButton/buttonHighlighted.png", + "ccs-res/cocosui/UIEditorTest/UIButton/button_n.png", + "ccs-res/cocosui/UIEditorTest/UIButton/button_p.png", + "ccs-res/cocosui/UIEditorTest/UIButton/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIButton/Button_1.json", + "ccs-res/cocosui/UIEditorTest/UICheckBox/background.png", + "ccs-res/cocosui/UIEditorTest/UICheckBox/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UICheckBox/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UICheckBox/selected01.png", + "ccs-res/cocosui/UIEditorTest/UICheckBox/selected02.png", + "ccs-res/cocosui/UIEditorTest/UICheckBox/checkbox_1.json", + "ccs-res/cocosui/UIEditorTest/UICheckBox/MainScene.json", + "ccs-res/cocosui/UIEditorTest/UICheckBox/Default/CheckBox_Disable.png", + "ccs-res/cocosui/UIEditorTest/UICheckBox/img/btn_music.png", + "ccs-res/cocosui/UIEditorTest/UICheckBox/img/btn_sound_off.png", + "ccs-res/cocosui/UIEditorTest/UIImageView/background.png", + "ccs-res/cocosui/UIEditorTest/UIImageView/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIImageView/buttonHighlighted.png", + "ccs-res/cocosui/UIEditorTest/UIImageView/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UIImageView/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIImageView/ImageView_1.json", + "ccs-res/cocosui/UIEditorTest/UILabelAtlas/background.png", + "ccs-res/cocosui/UIEditorTest/UILabelAtlas/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILabelAtlas/GUI/labelatlasimg.png", + "ccs-res/cocosui/UIEditorTest/UILabelAtlas/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILabelAtlas/labelatlas_1.json", + "ccs-res/cocosui/UIEditorTest/UILabelBMFont/background.png", + "ccs-res/cocosui/UIEditorTest/UILabelBMFont/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILabelBMFont/GUI/missing-font.fnt", + "ccs-res/cocosui/UIEditorTest/UILabelBMFont/GUI/missing-font.png", + "ccs-res/cocosui/UIEditorTest/UILabelBMFont/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILabelBMFont/labelbmfont_1.json", + "ccs-res/cocosui/UIEditorTest/UILabel/background.png", + "ccs-res/cocosui/UIEditorTest/UILabel/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILabel/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILabel/label_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/Hello.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/BackgroundImage/backgroundimage_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Color/color_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Layout/layout_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Gradient_Color/gradient_color_1.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Horizontal_Layout/linear_horizontal.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Linear_Vertical_Layout/linear_vertical.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Location/relative_align_location.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Relative_Align_Parent/relative_align_parent.json", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/background.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/button_n.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/button_p.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/selected01.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/selected02.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/slider_bar.png", + "ccs-res/cocosui/UIEditorTest/UILayout/Scale9_BackgroundImage/scale9.json", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/background.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/button_p.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/GUI/button.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Horizontal/horizontal_1.json", + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/background.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/button_p.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/GUI/button.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIListView/Vertical/vertical_1.json", + "ccs-res/cocosui/UIEditorTest/UILoadingBar/background.png", + "ccs-res/cocosui/UIEditorTest/UILoadingBar/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UILoadingBar/GUI/loadingbar.png", + "ccs-res/cocosui/UIEditorTest/UILoadingBar/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UILoadingBar/loadingbar_1.json", + "ccs-res/cocosui/UIEditorTest/UIPageView/background.png", + "ccs-res/cocosui/UIEditorTest/UIPageView/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIPageView/button_n.png", + "ccs-res/cocosui/UIEditorTest/UIPageView/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIPageView/pageview_1.json", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/background.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/button_n.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/button_p.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/selected01.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/selected02.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Both/both_1.json", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/background.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/button_n.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/button_p.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/selected01.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/selected02.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Horizontal/horizontal_1.json", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/background.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/button_n.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/button_p.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/GUI/image.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/selected01.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/selected02.png", + "ccs-res/cocosui/UIEditorTest/UIScrollView/Vertical/vertical_1.json", + "ccs-res/cocosui/UIEditorTest/UISlider/2014-1-26 11-42-09.png", + "ccs-res/cocosui/UIEditorTest/UISlider/2014-1-26 11-43-52.png", + "ccs-res/cocosui/UIEditorTest/UISlider/background.png", + "ccs-res/cocosui/UIEditorTest/UISlider/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UISlider/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UISlider/silder_progressBar.png", + "ccs-res/cocosui/UIEditorTest/UISlider/slider_bar.png", + "ccs-res/cocosui/UIEditorTest/UISlider/slider_bar_button.png", + "ccs-res/cocosui/UIEditorTest/UISlider/slider_1.json", + "ccs-res/cocosui/UIEditorTest/UITextField/background.png", + "ccs-res/cocosui/UIEditorTest/UITextField/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UITextField/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UITextField/textfield_1.json", + "ccs-res/cocosui/UIEditorTest/UIWidgetAddNode/background.png", + "ccs-res/cocosui/UIEditorTest/UIWidgetAddNode/buttonBackground.png", + "ccs-res/cocosui/UIEditorTest/UIWidgetAddNode/ribbon.png", + "ccs-res/cocosui/UIEditorTest/UIWidgetAddNode/widget_add_node.json", + "background-music-aac.wav", + "pew-pew-lei.wav", //Components "components/Player.png", "components/Projectile.png", "components/Target.png", //Scene - "scenetest/ArmatureComponentTest/ArmatureComponentTest.json", - "scenetest/ArmatureComponentTest/fishes/blowFish/Blowfish.ExportJson", - "scenetest/ArmatureComponentTest/fishes/blowFish/Blowfish0.plist", - "scenetest/ArmatureComponentTest/fishes/blowFish/Blowfish0.png", - "scenetest/ArmatureComponentTest/fishes/Butterflyfish/Butterflyfish.ExportJson", - "scenetest/ArmatureComponentTest/fishes/Butterflyfish/Butterflyfish0.plist", - "scenetest/ArmatureComponentTest/fishes/Butterflyfish/Butterflyfish0.png", - "scenetest/ArmatureComponentTest/Images/startMenuBG.png", - "scenetest/AttributeComponentTest/AttributeComponentTest.json", - "scenetest/AttributeComponentTest/grossinis_sister1.png", - "scenetest/AttributeComponentTest/grossinis_sister2.png", - "scenetest/AttributeComponentTest/PlayerAttribute.json", - "scenetest/BackgroundComponentTest/BackgroundComponentTest.json", - "scenetest/BackgroundComponentTest/Images/startMenuBG.png", - "scenetest/BackgroundComponentTest/Misc/music_logo.mp3", - "scenetest/BackgroundComponentTest/Misc/music_logo.wav", - "scenetest/BackgroundComponentTest/Particles/qipao01.plist", - "scenetest/BackgroundComponentTest/Particles/qipao01.png", - "scenetest/BackgroundComponentTest/startMenu/Fish_UI/starMenuButton01.png", - "scenetest/BackgroundComponentTest/startMenu/Fish_UI/starMenuButton02.png", - "scenetest/BackgroundComponentTest/startMenu/Fish_UI/ui_logo_001-hd.png", - "scenetest/BackgroundComponentTest/startMenu/startMenu_1.json", - "scenetest/EffectComponentTest/CowBoy/Cowboy.ExportJson", - "scenetest/EffectComponentTest/CowBoy/Cowboy0.plist", - "scenetest/EffectComponentTest/CowBoy/Cowboy0.png", - "scenetest/EffectComponentTest/EffectComponentTest.json", - "scenetest/EffectComponentTest/pew-pew-lei.wav", - "scenetest/LoadSceneEdtiorFileTest/fishes/blowFish/Blowfish.ExportJson", - "scenetest/LoadSceneEdtiorFileTest/fishes/blowFish/Blowfish0.plist", - "scenetest/LoadSceneEdtiorFileTest/fishes/blowFish/Blowfish0.png", - "scenetest/LoadSceneEdtiorFileTest/fishes/Butterflyfish/Butterflyfish.ExportJson", - "scenetest/LoadSceneEdtiorFileTest/fishes/Butterflyfish/Butterflyfish0.plist", - "scenetest/LoadSceneEdtiorFileTest/fishes/Butterflyfish/Butterflyfish0.png", - "scenetest/LoadSceneEdtiorFileTest/FishJoy2.json", - "scenetest/LoadSceneEdtiorFileTest/Images/startMenuBG.png", - "scenetest/LoadSceneEdtiorFileTest/Misc/music_logo.mp3", - "scenetest/LoadSceneEdtiorFileTest/Misc/music_logo.wav", - "scenetest/LoadSceneEdtiorFileTest/Particles/qipao01.plist", - "scenetest/LoadSceneEdtiorFileTest/Particles/qipao01.png", - "scenetest/LoadSceneEdtiorFileTest/startMenu/Fish_UI/starMenuButton01.png", - "scenetest/LoadSceneEdtiorFileTest/startMenu/Fish_UI/starMenuButton02.png", - "scenetest/LoadSceneEdtiorFileTest/startMenu/Fish_UI/ui_logo_001-hd.png", - "scenetest/LoadSceneEdtiorFileTest/startMenu/startMenu_1.json", - "scenetest/ParticleComponentTest/ParticleComponentTest.json", - "scenetest/ParticleComponentTest/SmallSun.plist", - "scenetest/ParticleComponentTest/Upsidedown.plist", - "scenetest/SpriteComponentTest/grossinis_sister1.png", - "scenetest/SpriteComponentTest/grossinis_sister2.png", - "scenetest/SpriteComponentTest/SpriteComponentTest.json", - "scenetest/TmxMapComponentTest/iso-test.png", - "scenetest/TmxMapComponentTest/iso-test.tmx", - "scenetest/TmxMapComponentTest/TmxMapComponentTest.json", - "scenetest/TriggerTest/fishes/blowFish/Blowfish.ExportJson", - "scenetest/TriggerTest/fishes/blowFish/Blowfish0.plist", - "scenetest/TriggerTest/fishes/blowFish/Blowfish0.png", - "scenetest/TriggerTest/fishes/Butterflyfish/Butterflyfish.ExportJson", - "scenetest/TriggerTest/fishes/Butterflyfish/Butterflyfish0.plist", - "scenetest/TriggerTest/fishes/Butterflyfish/Butterflyfish0.png", - "scenetest/TriggerTest/Images/startMenuBG.png", - "scenetest/TriggerTest/TriggerTest.json", - "scenetest/UIComponentTest/fishes/blowFish/Blowfish.ExportJson", - "scenetest/UIComponentTest/fishes/blowFish/Blowfish0.plist", - "scenetest/UIComponentTest/fishes/blowFish/Blowfish0.png", - "scenetest/UIComponentTest/fishes/Butterflyfish/Butterflyfish.ExportJson", - "scenetest/UIComponentTest/fishes/Butterflyfish/Butterflyfish0.plist", - "scenetest/UIComponentTest/fishes/Butterflyfish/Butterflyfish0.png", - "scenetest/UIComponentTest/Images/startMenuBG.png", - "scenetest/UIComponentTest/starMenuButton/starMenuButton.ExportJson", - "scenetest/UIComponentTest/starMenuButton/starMenuButton0.plist", - "scenetest/UIComponentTest/starMenuButton/starMenuButton0.png", - "scenetest/UIComponentTest/UIComponentTest.json", + "ccs-res/scenetest/ArmatureComponentTest/ArmatureComponentTest.json", + "ccs-res/scenetest/ArmatureComponentTest/fishes/blowFish/Blowfish.ExportJson", + "ccs-res/scenetest/ArmatureComponentTest/fishes/blowFish/Blowfish0.plist", + "ccs-res/scenetest/ArmatureComponentTest/fishes/blowFish/Blowfish0.png", + "ccs-res/scenetest/ArmatureComponentTest/fishes/Butterflyfish/Butterflyfish.ExportJson", + "ccs-res/scenetest/ArmatureComponentTest/fishes/Butterflyfish/Butterflyfish0.plist", + "ccs-res/scenetest/ArmatureComponentTest/fishes/Butterflyfish/Butterflyfish0.png", + "ccs-res/scenetest/ArmatureComponentTest/Images/startMenuBG.png", + "ccs-res/scenetest/AttributeComponentTest/AttributeComponentTest.json", + "ccs-res/scenetest/AttributeComponentTest/grossinis_sister1.png", + "ccs-res/scenetest/AttributeComponentTest/grossinis_sister2.png", + "ccs-res/scenetest/AttributeComponentTest/PlayerAttribute.json", + "ccs-res/scenetest/BackgroundComponentTest/BackgroundComponentTest.json", + "ccs-res/scenetest/BackgroundComponentTest/Images/startMenuBG.png", + "ccs-res/scenetest/BackgroundComponentTest/Misc/music_logo.mp3", + "ccs-res/scenetest/BackgroundComponentTest/Misc/music_logo.wav", + "ccs-res/scenetest/BackgroundComponentTest/Particles/qipao01.plist", + "ccs-res/scenetest/BackgroundComponentTest/Particles/qipao01.png", + "ccs-res/scenetest/BackgroundComponentTest/startMenu/Fish_UI/starMenuButton01.png", + "ccs-res/scenetest/BackgroundComponentTest/startMenu/Fish_UI/starMenuButton02.png", + "ccs-res/scenetest/BackgroundComponentTest/startMenu/Fish_UI/ui_logo_001-hd.png", + "ccs-res/scenetest/BackgroundComponentTest/startMenu/startMenu_1.json", + "ccs-res/scenetest/EffectComponentTest/CowBoy/Cowboy.ExportJson", + "ccs-res/scenetest/EffectComponentTest/CowBoy/Cowboy0.plist", + "ccs-res/scenetest/EffectComponentTest/CowBoy/Cowboy0.png", + "ccs-res/scenetest/EffectComponentTest/EffectComponentTest.json", + "ccs-res/scenetest/EffectComponentTest/pew-pew-lei.wav", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/fishes/blowFish/Blowfish.ExportJson", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/fishes/blowFish/Blowfish0.plist", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/fishes/blowFish/Blowfish0.png", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/fishes/Butterflyfish/Butterflyfish.ExportJson", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/fishes/Butterflyfish/Butterflyfish0.plist", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/fishes/Butterflyfish/Butterflyfish0.png", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/FishJoy2.json", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/Images/startMenuBG.png", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/Misc/music_logo.mp3", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/Misc/music_logo.wav", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/Particles/qipao01.plist", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/Particles/qipao01.png", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/startMenu/Fish_UI/starMenuButton01.png", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/startMenu/Fish_UI/starMenuButton02.png", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/startMenu/Fish_UI/ui_logo_001-hd.png", + "ccs-res/scenetest/LoadSceneEdtiorFileTest/startMenu/startMenu_1.json", + "ccs-res/scenetest/ParticleComponentTest/ParticleComponentTest.json", + "ccs-res/scenetest/ParticleComponentTest/SmallSun.plist", + "ccs-res/scenetest/ParticleComponentTest/Upsidedown.plist", + "ccs-res/scenetest/SpriteComponentTest/grossinis_sister1.png", + "ccs-res/scenetest/SpriteComponentTest/grossinis_sister2.png", + "ccs-res/scenetest/SpriteComponentTest/SpriteComponentTest.json", + "ccs-res/scenetest/TmxMapComponentTest/iso-test.png", + "ccs-res/scenetest/TmxMapComponentTest/iso-test.tmx", + "ccs-res/scenetest/TmxMapComponentTest/TmxMapComponentTest.json", + "ccs-res/scenetest/TriggerTest/fishes/blowFish/Blowfish.ExportJson", + "ccs-res/scenetest/TriggerTest/fishes/blowFish/Blowfish0.plist", + "ccs-res/scenetest/TriggerTest/fishes/blowFish/Blowfish0.png", + "ccs-res/scenetest/TriggerTest/fishes/Butterflyfish/Butterflyfish.ExportJson", + "ccs-res/scenetest/TriggerTest/fishes/Butterflyfish/Butterflyfish0.plist", + "ccs-res/scenetest/TriggerTest/fishes/Butterflyfish/Butterflyfish0.png", + "ccs-res/scenetest/TriggerTest/Images/startMenuBG.png", + "ccs-res/scenetest/TriggerTest/TriggerTest.json", + "ccs-res/scenetest/UIComponentTest/fishes/blowFish/Blowfish.ExportJson", + "ccs-res/scenetest/UIComponentTest/fishes/blowFish/Blowfish0.plist", + "ccs-res/scenetest/UIComponentTest/fishes/blowFish/Blowfish0.png", + "ccs-res/scenetest/UIComponentTest/fishes/Butterflyfish/Butterflyfish.ExportJson", + "ccs-res/scenetest/UIComponentTest/fishes/Butterflyfish/Butterflyfish0.plist", + "ccs-res/scenetest/UIComponentTest/fishes/Butterflyfish/Butterflyfish0.png", + "ccs-res/scenetest/UIComponentTest/Images/startMenuBG.png", + "ccs-res/scenetest/UIComponentTest/starMenuButton/starMenuButton.ExportJson", + "ccs-res/scenetest/UIComponentTest/starMenuButton/starMenuButton0.plist", + "ccs-res/scenetest/UIComponentTest/starMenuButton/starMenuButton0.png", + "ccs-res/scenetest/UIComponentTest/UIComponentTest.json", //parser - "cocosui/CCS/ccs1_3/CCSV1_3_1.ExportJson", - "cocosui/CCS/ccs1_3/CocostudioV1_30.plist", - "cocosui/CCS/ccs1_3/CocostudioV1_30.png", - "cocosui/CCS/ccs1_3/SmallSun.plist", - "cocosui/CCS/ccs1_3/GUI/labelatlasimg.png", - "cocosui/CCS/ccs1_3/GUI/missing-font.fnt", - "cocosui/CCS/ccs1_3/GUI/missing-font.png", - "cocosui/CCS/ccs1_4/CCS1_4_1.ExportJson", - "cocosui/CCS/ccs1_4/Cocostudio1_40.plist", - "cocosui/CCS/ccs1_4/Cocostudio1_40.png", - "cocosui/CCS/ccs1_4/SmallSun.plist", - "cocosui/CCS/ccs1_4/GUI/labelatlasimg.png", - "cocosui/CCS/ccs1_4/GUI/missing-font.fnt", - "cocosui/CCS/ccs1_4/GUI/missing-font.png", - "cocosui/CCS/ccs1_5/CCS1_5_1.ExportJson", - "cocosui/CCS/ccs1_5/Cocostudio1_50.plist", - "cocosui/CCS/ccs1_5/Cocostudio1_50.png", - "cocosui/CCS/ccs1_5/SmallSun.plist", - "cocosui/CCS/ccs1_5/GUI/labelatlasimg.png", - "cocosui/CCS/ccs1_5/GUI/missing-font.fnt", - "cocosui/CCS/ccs1_5/GUI/missing-font.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_3/CocostudioV1_3_1.ExportJson", + "ccs-res/cocosui/UIEditorTest/cocostudio1_3/CocostudioV1_30.plist", + "ccs-res/cocosui/UIEditorTest/cocostudio1_3/CocostudioV1_30.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_3/SmallSun.plist", + "ccs-res/cocosui/UIEditorTest/cocostudio1_3/GUI/labelatlasimg.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_3/GUI/missing-font.fnt", + "ccs-res/cocosui/UIEditorTest/cocostudio1_3/GUI/missing-font.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_4/Cocostudio1_4_1.ExportJson", + "ccs-res/cocosui/UIEditorTest/cocostudio1_4/Cocostudio1_40.plist", + "ccs-res/cocosui/UIEditorTest/cocostudio1_4/Cocostudio1_40.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_4/SmallSun.plist", + "ccs-res/cocosui/UIEditorTest/cocostudio1_4/GUI/labelatlasimg.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_4/GUI/missing-font.fnt", + "ccs-res/cocosui/UIEditorTest/cocostudio1_4/GUI/missing-font.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_5/Cocostudio1_5_1.ExportJson", + "ccs-res/cocosui/UIEditorTest/cocostudio1_5/Cocostudio1_50.plist", + "ccs-res/cocosui/UIEditorTest/cocostudio1_5/Cocostudio1_50.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_5/SmallSun.plist", + "ccs-res/cocosui/UIEditorTest/cocostudio1_5/GUI/labelatlasimg.png", + "ccs-res/cocosui/UIEditorTest/cocostudio1_5/GUI/missing-font.fnt", + "ccs-res/cocosui/UIEditorTest/cocostudio1_5/GUI/missing-font.png", - "cocosui/CCS/2.1/MainScene.json", - "cocosui/CCS/2.1/plist1/Plist.plist", - "cocosui/CCS/2.1/Plist/ui.plist", - "cocosui/CCS/2.1/LoadingBar/pipe2.png", - "cocosui/CCS/2.1/Slider/2013-8-13 15-44-11.png", - "cocosui/CCS/2.1/Slider/teehanlax - iOS 6 - iPhone_slider01.png", - "cocosui/CCS/2.1/particle/blue.plist", - "cocosui/CCS/2.1/Default/Slider_Back.png", - "cocosui/CCS/2.1/Default/SliderNode_Normal.png", - "cocosui/CCS/2.1/Default/SliderNode_Press.png", - "cocosui/CCS/2.1/Default/SliderNode_Disable.png", - "cocosui/CCS/2.1/Default/Slider_PressBar.png", - "cocosui/CCS/2.1/Default/defaultParticle.plist", - "cocosui/CCS/2.1/Default/TextAtlas.png", - "cocosui/CCS/2.1/fonts_weapon_001-hd.png", - "cocosui/CCS/2.1/FNT/futura.fnt", - "cocosui/CCS/2.1/Default/defaultBMFont.fnt", - "cocosui/CCS/2.1/FNT/Heiti18.fnt", + "ccs-res/cocosui/UIEditorTest/2.1/MainScene.json", + "ccs-res/cocosui/UIEditorTest/2.1/plist1/Plist.plist", + "ccs-res/cocosui/UIEditorTest/2.1/Plist/ui.plist", + "ccs-res/cocosui/UIEditorTest/2.1/LoadingBar/pipe2.png", + "ccs-res/cocosui/UIEditorTest/2.1/Slider/2013-8-13 15-44-11.png", + "ccs-res/cocosui/UIEditorTest/2.1/Slider/teehanlax - iOS 6 - iPhone_slider01.png", + "ccs-res/cocosui/UIEditorTest/2.1/particle/blue.plist", + "ccs-res/cocosui/UIEditorTest/2.1/Default/Slider_Back.png", + "ccs-res/cocosui/UIEditorTest/2.1/Default/SliderNode_Normal.png", + "ccs-res/cocosui/UIEditorTest/2.1/Default/SliderNode_Press.png", + "ccs-res/cocosui/UIEditorTest/2.1/Default/SliderNode_Disable.png", + "ccs-res/cocosui/UIEditorTest/2.1/Default/Slider_PressBar.png", + "ccs-res/cocosui/UIEditorTest/2.1/Default/defaultParticle.plist", + "ccs-res/cocosui/UIEditorTest/2.1/Default/TextAtlas.png", + "ccs-res/cocosui/UIEditorTest/2.1/fonts_weapon_001-hd.png", + "ccs-res/cocosui/UIEditorTest/2.1/FNT/futura.fnt", + "ccs-res/cocosui/UIEditorTest/2.1/Default/defaultBMFont.fnt", + "ccs-res/cocosui/UIEditorTest/2.1/FNT/Heiti18.fnt", "Particles/BoilingFoam.plist", - "cocosui/CustomImageViewTest/NewProject_2_1.ExportJson", - "cocosui/CustomImageViewTest/NewProject_20.plist", - "cocosui/CustomImageViewTest/NewProject_20.png" + "ccs-res/cocosui/CustomImageViewTest/NewProject_2_1.ExportJson", + "ccs-res/cocosui/CustomImageViewTest/NewProject_20.plist", + "ccs-res/cocosui/CustomImageViewTest/NewProject_20.png" ]; var g_ui = [ - "cocosui/switch-mask.png", - "cocosui/animationbuttonnormal.png", - "cocosui/animationbuttonpressed.png", - "cocosui/arrow.png", - "cocosui/b11.png", - "cocosui/backtotopnormal.png", - "cocosui/backtotoppressed.png", - "cocosui/bitmapFontTest2.fnt", - "cocosui/bitmapFontTest2.png", - "cocosui/button.png", - "cocosui/buttonHighlighted.png", - "cocosui/ccicon.png", - "cocosui/check_box_active.png", - "cocosui/check_box_active_disable.png", - "cocosui/check_box_active_press.png", - "cocosui/check_box_normal.png", - "cocosui/check_box_normal_disable.png", - "cocosui/check_box_normal_press.png", - "cocosui/CloseNormal.png", - "cocosui/CloseSelected.png", - "cocosui/green_edit.png", - "cocosui/grossini-aliases.png", - "cocosui/Hello.png", - "cocosui/labelatlas.png", - "cocosui/loadingbar.png", - {type:"font", name:"Marker Felt", srcs:["cocosui/Marker Felt.ttf"]}, - "cocosui/scrollviewbg.png", - "cocosui/slidbar.png", - "cocosui/sliderballnormal.png", - "cocosui/sliderballpressed.png", - "cocosui/sliderProgress.png", - "cocosui/sliderProgress2.png", - "cocosui/sliderThumb.png", - "cocosui/sliderTrack.png", - "cocosui/sliderTrack2.png", - "cocosui/slider_bar_active_9patch.png", - "cocosui/UITest/b1.png", - "cocosui/UITest/b2.png", - "cocosui/UITest/background.png", - "cocosui/UITest/buttonBackground.png", - "cocosui/UITest/f1.png", - "cocosui/UITest/f2.png", - "cocosui/UITest/r1.png", - "cocosui/UITest/r2.png", - "cocosui/UITest/ribbon.png", - "cocosui/UITest/UITest.json", - "cocosui/100/100.ExportJson", - "cocosui/100/1000.plist", - "cocosui/100/1000.png", + "ccs-res/cocosui/switch-mask.png", + "ccs-res/cocosui/animationbuttonnormal.png", + "ccs-res/cocosui/animationbuttonpressed.png", + "ccs-res/cocosui/arrow.png", + "ccs-res/cocosui/b11.png", + "ccs-res/cocosui/backtotopnormal.png", + "ccs-res/cocosui/backtotoppressed.png", + "ccs-res/cocosui/bitmapFontTest2.fnt", + "ccs-res/cocosui/bitmapFontTest2.png", + "ccs-res/cocosui/button.png", + "ccs-res/cocosui/buttonHighlighted.png", + "ccs-res/cocosui/ccicon.png", + "ccs-res/cocosui/check_box_active.png", + "ccs-res/cocosui/check_box_active_disable.png", + "ccs-res/cocosui/check_box_active_press.png", + "ccs-res/cocosui/check_box_normal.png", + "ccs-res/cocosui/check_box_normal_disable.png", + "ccs-res/cocosui/check_box_normal_press.png", + "ccs-res/cocosui/CloseNormal.png", + "ccs-res/cocosui/CloseSelected.png", + "ccs-res/cocosui/green_edit.png", + "ccs-res/cocosui/grossini-aliases.png", + "ccs-res/cocosui/Hello.png", + "ccs-res/cocosui/labelatlas.png", + "ccs-res/cocosui/loadingbar.png", + {type:"font", name:"Marker Felt", srcs:["../cpp-tests/Resources/fonts/Marker Felt.ttf"]}, + "ccs-res/cocosui/scrollviewbg.png", + "ccs-res/cocosui/slidbar.png", + "ccs-res/cocosui/sliderballnormal.png", + "ccs-res/cocosui/sliderballpressed.png", + "ccs-res/cocosui/sliderProgress.png", + "ccs-res/cocosui/sliderProgress2.png", + "ccs-res/cocosui/sliderThumb.png", + "ccs-res/cocosui/sliderTrack.png", + "ccs-res/cocosui/sliderTrack2.png", + "ccs-res/cocosui/slider_bar_active_9patch.png", + "ccs-res/cocosui/UITest/b1.png", + "ccs-res/cocosui/UITest/b2.png", + "ccs-res/cocosui/UITest/background.png", + "ccs-res/cocosui/UITest/buttonBackground.png", + "ccs-res/cocosui/UITest/f1.png", + "ccs-res/cocosui/UITest/f2.png", + "ccs-res/cocosui/UITest/r1.png", + "ccs-res/cocosui/UITest/r2.png", + "ccs-res/cocosui/UITest/ribbon.png", + "ccs-res/cocosui/UITest/UITest.json", + "ccs-res/cocosui/100/100.ExportJson", + "ccs-res/cocosui/100/1000.plist", + "ccs-res/cocosui/100/1000.png", s_s9s_blocks9_plist, - "cocosui/CloseSelected.png" + "ccs-res/cocosui/CloseSelected.png" ]; var g_performace = [ "animations/crystals.plist", "animations/crystals.png", - "Images/fps_images.png", + "fps_images.png", "Images/spritesheet1.png", "Images/sprites_test/sprite-0-0.png", "Images/sprites_test/sprite-0-1.png", @@ -1075,18 +1081,18 @@ var g_tilemaps = [ ]; var g_spine = [ - "skeletons/spineboy.atlas", - "skeletons/spineboy.json", - "skeletons/spineboy.png", - "skeletons/sprite.png", - "skeletons/goblins-ffd.png", - "skeletons/goblins-ffd.atlas", - "skeletons/goblins-ffd.json" + "spine/spineboy.atlas", + "spine/spineboy.json", + "spine/spineboy.png", + "spine/sprite.png", + "spine/goblins-ffd.png", + "spine/goblins-ffd.atlas", + "spine/goblins-ffd.json" ]; var g_ccs2 = [ "ActionTimeline/boy_1.csb", "ActionTimeline/armature/Cowboy0.plist", - "cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.fnt", - "cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.png" + "ccs-res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.fnt", + "ccs-res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.png" ]; diff --git a/tests/lua-empty-test/.cocos-project.json b/tests/lua-empty-test/.cocos-project.json index 470ad30447..94e6c01188 100644 --- a/tests/lua-empty-test/.cocos-project.json +++ b/tests/lua-empty-test/.cocos-project.json @@ -25,7 +25,8 @@ "target_name": "lua-empty-test Mac" }, "android_cfg": { - "project_path": "project/proj.android" + "project_path": "project/proj.android", + "studio_proj_path" : "project/proj.android-studio" }, "engine_dir": "../../" } diff --git a/tests/lua-empty-test/project/proj.android-studio/app/build.gradle b/tests/lua-empty-test/project/proj.android-studio/app/build.gradle index 4ceac41ff7..0f0cf520eb 100644 --- a/tests/lua-empty-test/project/proj.android-studio/app/build.gradle +++ b/tests/lua-empty-test/project/proj.android-studio/app/build.gradle @@ -21,17 +21,30 @@ android { assets.srcDir "assets" } + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' - compile 'com.android.support:support-v4:22.1.1' compile project(':libcocos2dx') } diff --git a/tests/lua-empty-test/project/proj.android-studio/app/project.properties b/tests/lua-empty-test/project/proj.android-studio/app/project.properties new file mode 100644 index 0000000000..f049142c17 --- /dev/null +++ b/tests/lua-empty-test/project/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/tests/lua-empty-test/project/proj.android-studio/build-cfg.json b/tests/lua-empty-test/project/proj.android-studio/build-cfg.json new file mode 100644 index 0000000000..92b544334b --- /dev/null +++ b/tests/lua-empty-test/project/proj.android-studio/build-cfg.json @@ -0,0 +1,21 @@ +{ + "ndk_module_path" :[ + "../../../..", + "../../../../cocos", + "../../../../external" + ], + "copy_resources": [ + { + "from": "../../src", + "to": "src" + }, + { + "from": "../../res", + "to": "res" + }, + { + "from": "../../../../cocos/scripting/lua-bindings/script/", + "to": "src/cocos" + } + ] +} diff --git a/tests/lua-empty-test/project/proj.android-studio/gradlew b/tests/lua-empty-test/project/proj.android-studio/gradlew old mode 100644 new mode 100755 diff --git a/tests/lua-empty-test/project/proj.android-studio/proj.android-studio.iml b/tests/lua-empty-test/project/proj.android-studio/proj.android-studio.iml deleted file mode 100644 index 2f6243b627..0000000000 --- a/tests/lua-empty-test/project/proj.android-studio/proj.android-studio.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/lua-empty-test/project/proj.android-studio/settings.gradle b/tests/lua-empty-test/project/proj.android-studio/settings.gradle index 1de06f6b29..11316ebf9c 100644 --- a/tests/lua-empty-test/project/proj.android-studio/settings.gradle +++ b/tests/lua-empty-test/project/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../../../../cocos/platform/android/libcocos2dx') -include ':app' +include ':LuaEmptyTest' +project(':LuaEmptyTest').projectDir = new File(settingsDir, 'app') diff --git a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj index 7750d25d6f..6c9ceecd58 100644 --- a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj +++ b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj @@ -1,4 +1,4 @@ - + @@ -99,11 +99,12 @@ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) $(OutDir);$(SolutionDir)$(Configuration).win32;%(AdditionalLibraryDirectories) true Windows MachineX86 + libcmt.lib;%(IgnoreSpecificDefaultLibraries) xcopy "$(ProjectDir)..\..\res" "$(OutDir)res" /D /E /I /F /Y @@ -149,11 +150,12 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) $(OutDir);$(SolutionDir)$(Configuration).win32;%(AdditionalLibraryDirectories) Windows MachineX86 true + libcmt.lib diff --git a/tests/lua-game-controller-test/.cocos-project.json b/tests/lua-game-controller-test/.cocos-project.json index 570b02f99b..7f6266d7c2 100644 --- a/tests/lua-game-controller-test/.cocos-project.json +++ b/tests/lua-game-controller-test/.cocos-project.json @@ -7,6 +7,7 @@ "project_type": "lua", "has_native": true, "android_cfg": { - "project_path": "project/proj.android" + "project_path": "project/proj.android", + "studio_proj_path" : "project/proj.android-studio" } } diff --git a/tests/lua-game-controller-test/project/proj.android-studio/app/build.gradle b/tests/lua-game-controller-test/project/proj.android-studio/app/build.gradle index cd6ebd5ebd..93f28feecc 100644 --- a/tests/lua-game-controller-test/project/proj.android-studio/app/build.gradle +++ b/tests/lua-game-controller-test/project/proj.android-studio/app/build.gradle @@ -20,17 +20,30 @@ android { assets.srcDir "assets" } + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' - compile 'com.android.support:support-v4:22.1.1' compile project(':libcocos2dx_with_controller') } diff --git a/tests/lua-game-controller-test/project/proj.android-studio/app/project.properties b/tests/lua-game-controller-test/project/proj.android-studio/app/project.properties new file mode 100644 index 0000000000..f049142c17 --- /dev/null +++ b/tests/lua-game-controller-test/project/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/tests/lua-game-controller-test/project/proj.android-studio/build-cfg.json b/tests/lua-game-controller-test/project/proj.android-studio/build-cfg.json new file mode 100644 index 0000000000..71c3d466a0 --- /dev/null +++ b/tests/lua-game-controller-test/project/proj.android-studio/build-cfg.json @@ -0,0 +1,28 @@ +{ + "ndk_module_path" :[ + "../../../..", + "../../../../cocos", + "../../../../external" + ], + "copy_resources": [ + { + "from": "../../src", + "to": "src" + }, + { + "from": "../../res", + "to": "res" + }, + { + "from": "../../../../cocos/scripting/lua-bindings/script/", + "to": "src/cocos" + }, + { + "from": "../../../game-controller-test/Resources", + "to": "res", + "exclude": [ + "*.gz" + ] + } + ] +} diff --git a/tests/lua-game-controller-test/project/proj.android-studio/gradlew b/tests/lua-game-controller-test/project/proj.android-studio/gradlew old mode 100644 new mode 100755 diff --git a/tests/lua-game-controller-test/project/proj.android-studio/proj.android-studio.iml b/tests/lua-game-controller-test/project/proj.android-studio/proj.android-studio.iml deleted file mode 100644 index 2f6243b627..0000000000 --- a/tests/lua-game-controller-test/project/proj.android-studio/proj.android-studio.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/lua-game-controller-test/project/proj.android-studio/settings.gradle b/tests/lua-game-controller-test/project/proj.android-studio/settings.gradle index 5b5eda1247..57e3fb0330 100644 --- a/tests/lua-game-controller-test/project/proj.android-studio/settings.gradle +++ b/tests/lua-game-controller-test/project/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx_with_controller' project(':libcocos2dx_with_controller').projectDir = new File(settingsDir, '../../../../cocos/platform/android/libcocos2dx-with-controller') -include ':app' +include ':LuaGameControllerTest' +project(':LuaGameControllerTest').projectDir = new File(settingsDir, 'app') diff --git a/tests/lua-tests/.cocos-project.json b/tests/lua-tests/.cocos-project.json index aaef81cc15..1a0b053d27 100644 --- a/tests/lua-tests/.cocos-project.json +++ b/tests/lua-tests/.cocos-project.json @@ -25,7 +25,8 @@ "target_name": "lua-tests Mac" }, "android_cfg": { - "project_path": "project/proj.android" + "project_path": "project/proj.android", + "studio_proj_path" : "project/proj.android-studio" }, "engine_dir": "../../" } diff --git a/tests/lua-tests/project/Classes/lua_module_register.h b/tests/lua-tests/project/Classes/lua_module_register.h index 1f560f4ac3..446d0a0950 100644 --- a/tests/lua-tests/project/Classes/lua_module_register.h +++ b/tests/lua-tests/project/Classes/lua_module_register.h @@ -10,6 +10,7 @@ #include "cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h" #include "3d/lua_cocos2dx_3d_manual.h" #include "audioengine/lua_cocos2dx_audioengine_manual.h" +#include "physics3d/lua_cocos2dx_physics3d_manual.h" int lua_module_register(lua_State* L) @@ -24,6 +25,9 @@ int lua_module_register(lua_State* L) register_cocosdenshion_module(L); register_cocos3d_module(L); register_audioengine_module(L); +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + register_physics3d_module(L); +#endif return 1; } diff --git a/tests/lua-tests/project/proj.android-studio/app/build.gradle b/tests/lua-tests/project/proj.android-studio/app/build.gradle index b6512722bf..26e73665c4 100644 --- a/tests/lua-tests/project/proj.android-studio/app/build.gradle +++ b/tests/lua-tests/project/proj.android-studio/app/build.gradle @@ -21,17 +21,30 @@ android { assets.srcDir "assets" } + signingConfigs { + + release { + if (project.hasProperty("RELEASE_STORE_FILE")) { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyAlias RELEASE_KEY_ALIAS + keyPassword RELEASE_KEY_PASSWORD + } + } + } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + if (project.hasProperty("RELEASE_STORE_FILE")) { + signingConfig signingConfigs.release + } } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.1.1' - compile 'com.android.support:support-v4:22.1.1' compile project(':libcocos2dx') } diff --git a/tests/lua-tests/project/proj.android-studio/app/project.properties b/tests/lua-tests/project/proj.android-studio/app/project.properties new file mode 100644 index 0000000000..f049142c17 --- /dev/null +++ b/tests/lua-tests/project/proj.android-studio/app/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/tests/lua-tests/project/proj.android-studio/build-cfg.json b/tests/lua-tests/project/proj.android-studio/build-cfg.json new file mode 100644 index 0000000000..41ae5ae199 --- /dev/null +++ b/tests/lua-tests/project/proj.android-studio/build-cfg.json @@ -0,0 +1,28 @@ +{ + "ndk_module_path" :[ + "../../../..", + "../../../../cocos", + "../../../../external" + ], + "copy_resources": [ + { + "from": "../../src", + "to": "src" + }, + { + "from": "../../res/cocosbuilderRes", + "to": "res/cocosbuilderRes" + }, + { + "from": "../../../cpp-tests/Resources", + "to": "res", + "exclude": [ + "*.gz" + ] + }, + { + "from": "../../../../cocos/scripting/lua-bindings/script/", + "to": "src/cocos" + } + ] +} diff --git a/tests/lua-tests/project/proj.android-studio/gradlew b/tests/lua-tests/project/proj.android-studio/gradlew old mode 100644 new mode 100755 diff --git a/tests/lua-tests/project/proj.android-studio/proj.android-studio.iml b/tests/lua-tests/project/proj.android-studio/proj.android-studio.iml deleted file mode 100644 index 2f6243b627..0000000000 --- a/tests/lua-tests/project/proj.android-studio/proj.android-studio.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/lua-tests/project/proj.android-studio/settings.gradle b/tests/lua-tests/project/proj.android-studio/settings.gradle index 1de06f6b29..6087728e42 100644 --- a/tests/lua-tests/project/proj.android-studio/settings.gradle +++ b/tests/lua-tests/project/proj.android-studio/settings.gradle @@ -1,3 +1,4 @@ include ':libcocos2dx' project(':libcocos2dx').projectDir = new File(settingsDir, '../../../../cocos/platform/android/libcocos2dx') -include ':app' +include ':LuaTests' +project(':LuaTests').projectDir = new File(settingsDir, 'app') diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj index c0c8031646..054c4e89fa 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj @@ -1,4 +1,4 @@ - + @@ -77,7 +77,7 @@ OldStyle EnableFastChecks Disabled - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) 4267;4251;4244;%(DisableSpecificWarnings) true @@ -86,7 +86,8 @@ MachineX86 true $(OutDir);$(SolutionDir)$(Configuration).win32;%(AdditionalLibraryDirectories) - libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) + libcmt.lib 0x0409 @@ -129,7 +130,7 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y ProgramDatabase - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) 4267;4251;4244;%(DisableSpecificWarnings) true @@ -137,8 +138,9 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y Windows MachineX86 $(OutDir);$(SolutionDir)$(Configuration).win32;%(AdditionalLibraryDirectories) - libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) true + libcmt.lib 0x0409 diff --git a/tests/lua-tests/src/MaterialSystemTest/MaterialSystemTest.lua b/tests/lua-tests/src/MaterialSystemTest/MaterialSystemTest.lua new file mode 100644 index 0000000000..c3450dec81 --- /dev/null +++ b/tests/lua-tests/src/MaterialSystemTest/MaterialSystemTest.lua @@ -0,0 +1,347 @@ + +local function printProperties( properties, indent ) + --Print the name and ID of the current namespace. + local spacename = properties:getNamespace() + local id = properties:getId() + local chindentTable = {} + local i = 1 + for i = 1, indent * 2 do + chindentTable[i] = ' ' + end + chindentTable[i] = '\0' + local chindent = table.concat(chindentTable) + + print(string.format("%sNamespace: %s ID: %s\n%s{", chindent, spacename, id, chindent)) + + --Print all properties in this namespace. + local name = properties:getNextProperty() + local value = nil + while name ~= nil do + value = properties:getString(name) + print(string.format("%s%s = %s", chindent, name, value)) + name = properties:getNextProperty() + end + + local space = properties:getNextNamespace() + while space ~= nil do + printProperties(space, indent+1) + space = properties:getNextNamespace() + end + + print(string.format("%s}\n",chindent)) +end + +---------------------------------------- +----MaterialSystemBaseTest +---------------------------------------- +local MaterialSystemBaseTest = class("MaterialSystemBaseTest", function () + local layer = cc.Layer:create() + return layer +end) + +function MaterialSystemBaseTest:ctor() + + Helper.initWithLayer(self) + Helper.titleLabel:setString(self:title()) + Helper.subtitleLabel:setString(self:subtitle()) + + local function onNodeEvent(event) + if "enter" == event then + self:onEnter() + elseif "exit" == event then + self:onExit() + end + end + + self:registerScriptHandler(onNodeEvent) +end + +function MaterialSystemBaseTest:title() + return "Material System" +end + +function MaterialSystemBaseTest:subtitle() + return "" +end + +function MaterialSystemBaseTest:onEnter() + +end + +function MaterialSystemBaseTest:onExit() + +end + +---------------------------------------- +----Material_Sprite3DTest +---------------------------------------- +local Material_Sprite3DTest = class("Material_Sprite3DTest", MaterialSystemBaseTest) + +function Material_Sprite3DTest:subtitle() + return "Material System on Sprite3D" +end + +function Material_Sprite3DTest:onEnter() + local sprite = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite:setScale(8.0) + sprite:setTexture("Sprite3DTest/boss.png") + self:addChild(sprite) + sprite:setNormalizedPosition(cc.p(0.5,0.5)) +end + + +---------------------------------------- +----Material_MultipleSprite3D +---------------------------------------- +local Material_MultipleSprite3D = class("Material_MultipleSprite3D", MaterialSystemBaseTest) + +function Material_MultipleSprite3D:subtitle() + return "Sprites with multiple meshes" +end + +function Material_MultipleSprite3D:onEnter() + local names = + { + "Sprite3DTest/ReskinGirl.c3b", + "Sprite3DTest/ReskinGirl.c3b", + "Sprite3DTest/ReskinGirl.c3b", + "Sprite3DTest/ReskinGirl.c3b", + "Sprite3DTest/ReskinGirl.c3b", + "Sprite3DTest/ReskinGirl.c3b", + "Sprite3DTest/ReskinGirl.c3b", + "Sprite3DTest/ReskinGirl.c3b", + } + + local totalNames = #names + + local size = cc.Director:getInstance():getWinSize() + + for i = 1 , totalNames do + local sprite = cc.Sprite3D:create(names[i]) + self:addChild(sprite) + sprite:setPosition(cc.p((size.width/(totalNames+1)) * i, size.height/4)) + sprite:setScale(3) + end +end + +---------------------------------------- +----Material_2DEffects +---------------------------------------- +local Material_2DEffects = class("Material_2DEffects", MaterialSystemBaseTest) + +function Material_2DEffects:subtitle() + return "Testing effects on Sprite" +end + +function Material_2DEffects:onEnter() + local properties = cc.Properties:createNonRefCounted("Materials/2d_effects.material#sample") + + -- Print the properties of every namespace within this one. + -- TODO + printProperties(properties, 0) + + local mat1 = cc.Material:createWithProperties(properties) + + local spriteBlur = cc.Sprite:create("Images/grossini.png") + spriteBlur:setNormalizedPosition(cc.p(0.2, 0.5)) + self:addChild(spriteBlur) + spriteBlur:setGLProgramState(mat1:getTechniqueByName("blur"):getPassByIndex(0):getGLProgramState()) + + local spriteOutline = cc.Sprite:create("Images/grossini.png") + spriteOutline:setNormalizedPosition(cc.p(0.4, 0.5)) + self:addChild(spriteOutline) + spriteOutline:setGLProgramState(mat1:getTechniqueByName("outline"):getPassByIndex(0):getGLProgramState()) + + local spriteNoise = cc.Sprite:create("Images/grossini.png") + spriteNoise:setNormalizedPosition(cc.p(0.6, 0.5)) + self:addChild(spriteNoise) + spriteNoise:setGLProgramState(mat1:getTechniqueByName("noise"):getPassByIndex(0):getGLProgramState()) + + local spriteEdgeDetect = cc.Sprite:create("Images/grossini.png") + spriteEdgeDetect:setNormalizedPosition(cc.p(0.8, 0.5)) + self:addChild(spriteEdgeDetect) + spriteEdgeDetect:setGLProgramState(mat1:getTechniqueByName("edge_detect"):getPassByIndex(0):getGLProgramState()) +end + +---------------------------------------- +----Material_setTechnique +---------------------------------------- +local Material_setTechnique = class("Material_setTechnique", MaterialSystemBaseTest) + +function Material_setTechnique:subtitle() + return "Testing setTechnique()" +end + +function Material_setTechnique:onEnter() + local sprite = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite:setScale(6) + self:addChild(sprite) + sprite:setNormalizedPosition(cc.p(0.5,0.5)) + + local mat = cc.Material:createWithFilename("Materials/3d_effects.material") + sprite:setMaterial(mat) + + --lights + local light1 = cc.AmbientLight:create(cc.c3b(255, 0, 0)) + self:addChild(light1) + + local light2 = cc.DirectionLight:create(cc.vec3(-1,1,0), cc.c3b(0, 255, 0)) + self:addChild(light2) + local techniqueState = 0 + local scheduler = cc.Director:getInstance():getScheduler() + self._schedulerEntry = scheduler:scheduleScriptFunc(function(dt) + if 0 == techniqueState then + sprite:getMaterial(0):setTechnique("lit") + elseif 1 == techniqueState then + sprite:getMaterial(0):setTechnique("normal") + elseif 2 == techniqueState then + sprite:getMaterial(0):setTechnique("outline") + end + + techniqueState = techniqueState + 1 + if techniqueState > 2 then + techniqueState = 0 + end + end, 1, false) + + + local rot = cc.RotateBy:create(5, cc.vec3(30,60,270)) + local repeatAction = cc.RepeatForever:create(rot) + sprite:runAction(repeatAction) +end + +function Material_setTechnique:onExit() + local scheduler = cc.Director:getInstance():getScheduler() + scheduler:unscheduleScriptEntry(self._schedulerEntry) +end + +---------------------------------------- +----Material_clone +---------------------------------------- +local Material_clone = class("Material_clone", MaterialSystemBaseTest) + +function Material_clone:subtitle() + return "Testing material:clone()" +end + +function Material_clone:onEnter() + local sprite = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite:setScale(3) + self:addChild(sprite) + sprite:setNormalizedPosition(cc.p(0.25, 0.5)) + + local mat = cc.Material:createWithFilename("Materials/3d_effects.material") + sprite:setMaterial(mat) + + local rot = cc.RotateBy:create(5, cc.vec3(360,240,120)) + local repeatAction = cc.RepeatForever:create(rot) + sprite:runAction(repeatAction) + + -- sprite 2... using same material + local sprite2 = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite2:setScale(3) + self:addChild(sprite2) + sprite2:setNormalizedPosition(cc.p(0.5, 0.5)) + sprite2:setMaterial(mat) + sprite2:runAction(repeatAction:clone()) + + -- sprite 3... using cloned material + local sprite3 = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite3:setScale(3) + self:addChild(sprite3) + sprite3:setNormalizedPosition(cc.p(0.75, 0.5)) + local mat2 = mat:clone() + sprite3:setMaterial(mat2) + sprite3:runAction(repeatAction:clone()) + + -- testing clone + -- should affect both sprite 1 and sprite 2 + mat:setTechnique("outline") +end + +---------------------------------------- +----Material_clone +---------------------------------------- +local Material_clone = class("Material_clone", MaterialSystemBaseTest) + +function Material_clone:subtitle() + return "Testing material->clone()" +end + +function Material_clone:onEnter() + local sprite = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite:setScale(3) + self:addChild(sprite) + sprite:setNormalizedPosition(cc.p(0.25, 0.5)) + + local mat = cc.Material:createWithFilename("Materials/3d_effects.material") + sprite:setMaterial(mat) + + local rot = cc.RotateBy:create(5, cc.vec3(360,240,120)) + local repeatAction = cc.RepeatForever:create(rot) + sprite:runAction(repeatAction) + + -- sprite 2... using same material + local sprite2 = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite2:setScale(3) + self:addChild(sprite2) + sprite2:setNormalizedPosition(cc.p(0.5, 0.5)) + sprite2:setMaterial(mat) + sprite2:runAction(repeatAction:clone()) + + -- sprite 3... using cloned material + local sprite3 = cc.Sprite3D:create("Sprite3DTest/boss1.obj") + sprite3:setScale(3) + self:addChild(sprite3) + sprite3:setNormalizedPosition(cc.p(0.75, 0.5)) + local mat2 = mat:clone() + sprite3:setMaterial(mat2) + sprite3:runAction(repeatAction:clone()) + + -- testing clone + -- should affect both sprite 1 and sprite 2 + mat:setTechnique("outline") +end + +---------------------------------------- +----Material_parsePerformance +---------------------------------------- +local Material_parsePerformance = class("Material_parsePerformance", MaterialSystemBaseTest) + +function Material_parsePerformance:subtitle() + return "Testing parsing performance" +end + +function Material_parsePerformance:onEnter() + local begin = os.clock() + + for i = 1,5000 do + cc.Material:createWithFilename("Materials/2d_effects.material") + cc.Material:createWithFilename("Materials/3d_effects.material") + end + + print("Parsing took: ", os.clock() - begin) +end + +---------------------------------------- +----Material_clone +---------------------------------------- +function MaterialSystemTest() + + local scene = cc.Scene:createWithPhysics() + + Helper.createFunctionTable = + { + Material_2DEffects.create, + Material_setTechnique.create, + Material_clone.create, + Material_MultipleSprite3D.create, + Material_Sprite3DTest.create, + Material_parsePerformance.create, + } + + scene:addChild(Material_2DEffects.create()) + scene:addChild(CreateBackMenuItem()) + + return scene +end \ No newline at end of file diff --git a/tests/lua-tests/src/Physics3DTest/Physics3DTest.lua b/tests/lua-tests/src/Physics3DTest/Physics3DTest.lua new file mode 100644 index 0000000000..0e47383996 --- /dev/null +++ b/tests/lua-tests/src/Physics3DTest/Physics3DTest.lua @@ -0,0 +1,712 @@ + +local START_POS_X = -0.5 +local START_POS_Y = -2.5 +local START_POS_Z = -0.5 + +local ARRAY_SIZE_X = 4 +local ARRAY_SIZE_Y = 3 +local ARRAY_SIZE_Z = 4 +---------------------------------------- +----Physics3DTestDemo +---------------------------------------- +local Physics3DTestDemo = class("Physics3DTestDemo", function () + -- body + local layer = cc.Layer:create() + return layer +end) + +function Physics3DTestDemo:ctor() + + Helper.initWithLayer(self) + Helper.titleLabel:setString(self:title()) + Helper.subtitleLabel:setString(self:subtitle()) + + local function onNodeEvent(event) + if "enter" == event then + self:onEnter() + elseif "exit" == event then + self:onExit() + end + end + + self:registerScriptHandler(onNodeEvent) +end + +function Physics3DTestDemo:title() + return "Physics3D Test" +end + +function Physics3DTestDemo:subtitle() + return "" +end + +function Physics3DTestDemo:shootBox(des) + local rbDes = {} + local cameraPosition = self._camera:getPosition3D() + local linearVec = cc.vec3normalize(cc.vec3(des.x - cameraPosition.x, des.y - cameraPosition.y, des.z - cameraPosition.z)) + linearVec = cc.vec3(linearVec.x * 100, linearVec.y * 100, linearVec.z * 100) + + rbDes.originalTransform = cc.mat4.translate(cc.mat4.createIdentity(), self._camera:getPosition3D()) + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(0.5, 0.5, 0.5)) + + local sprite = cc.PhysicsSprite3D:create("Sprite3DTest/box.c3t", rbDes) + sprite:setTexture("Images/Icon.png") + + local rigidBody = sprite:getPhysicsObj() + rigidBody:setLinearFactor(cc.vec3(1.0, 1.0, 1.0)) + rigidBody:setLinearVelocity(linearVec) + rigidBody:setAngularVelocity(cc.vec3(0.0, 0.0, 0.0)) + rigidBody:setCcdMotionThreshold(0.5) + rigidBody:setCcdSweptSphereRadius(0.4) + + self:addChild(sprite) + sprite:setPosition3D(self._camera:getPosition3D()) + sprite:setScale(0.5) + sprite:syncToNode() + + --optimize, only sync node to physics + sprite:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE) --sync node to physics + + sprite:setCameraMask(cc.CameraFlag.USER1) +end + +function Physics3DTestDemo:onEnter() + local scene = cc.Director:getInstance():getRunningScene() + if nil ~= scene then + self._physicsScene = scene + local physics3DWorld = scene:getPhysics3DWorld() + physics3DWorld:setDebugDrawEnable(false) + + local size = cc.Director:getInstance():getWinSize() + self._camera = cc.Camera:createPerspective(30.0, size.width / size.height, 1.0, 1000.0) + self._camera:setPosition3D(cc.vec3(0.0, 50.0, 100.0)) + self._camera:lookAt(cc.vec3(0.0, 0.0, 0.0), cc.vec3(0.0, 1.0, 0.0)) + self._camera:setCameraFlag(cc.CameraFlag.USER1) + self:addChild(self._camera) + + if Helper.index ~= 2 then + local listener = cc.EventListenerTouchAllAtOnce:create() + listener:registerScriptHandler(function(touches, event) + self._needShootBox = true + end,cc.Handler.EVENT_TOUCHES_BEGAN) + + listener:registerScriptHandler(function(touches, event) + + if #touches > 0 and self._camera ~= nil then + local touch = touches[1] + local delta = touch:getDelta() + + self._angle = self._angle - delta.x * math.pi / 180.0 + self._camera:setPosition3D(cc.vec3(100.0 * math.sin(self._angle), 50.0, 100.0 * math.cos(self._angle))) + self._camera:lookAt(cc.vec3(0.0, 0.0, 0.0), cc.vec3(0.0, 1.0, 0.0)) + + if (delta.x * delta.x + delta.y * delta.y) > 16 then + self._needShootBox = false + end + end + end, cc.Handler.EVENT_TOUCHES_MOVED) + + listener:registerScriptHandler(function(touches, event) + if self._needShootBox == false then + return + end + + if #touches > 0 then + local location = touches[1]:getLocationInView() + local nearP = cc.vec3(location.x, location.y, -1.0) + local farP = cc.vec3(location.x, location.y, 1.0) + nearP = self._camera:unproject(nearP) + farP = self._camera:unproject(farP) + + local dir = cc.vec3(farP.x - nearP.x, farP.y - nearP.y, farP.z - nearP.z) + local cameraPosition = self._camera:getPosition3D() + self:shootBox(cc.vec3(cameraPosition.x + dir.x * 10, cameraPosition.y + dir.y * 10, cameraPosition.z + dir.z * 10)) + end + end, cc.Handler.EVENT_TOUCHES_ENDED) + + local eventDispatcher = self:getEventDispatcher() + eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self) + end + + local ttfConfig = {} + ttfConfig.fontFilePath = "fonts/arial.ttf" + ttfConfig.fontSize = 10 + local label = cc.Label:createWithTTF(ttfConfig,"DebugDraw OFF") + local menuItem = cc.MenuItemLabel:create(label) + menuItem:registerScriptTapHandler(function (tag, sender) + if physics3DWorld:isDebugDrawEnabled() then + physics3DWorld:setDebugDrawEnable(false) + label:setString("DebugDraw OFF") + else + physics3DWorld:setDebugDrawEnable(true) + label:setString("DebugDraw ON") + end + end) + + local menu = cc.Menu:create(menuItem) + menu:setPosition(cc.p(0.0,0.0)) + menuItem:setAnchorPoint(cc.p(0.0, 1.0)) + menuItem:setPosition(cc.p(VisibleRect:left().x, VisibleRect:top().y-50)) + self:addChild(menu) + + self._angle = 0.0 + + self:extend() + end +end + +function Physics3DTestDemo:onExit() + +end + +function Physics3DTestDemo:extend() + +end + +---------------------------------------- +----BasicPhysics3DDemo +---------------------------------------- +local BasicPhysics3DDemo = class("BasicPhysics3DDemo", Physics3DTestDemo) + +function BasicPhysics3DDemo:subtitle() + return "Basic Physics3D" +end + +function BasicPhysics3DDemo:extend() + local rbDes = {} + rbDes.mass = 0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(60.0, 1.0, 60.0)) + + local floor = cc.PhysicsSprite3D:create("Sprite3DTest/box.c3t", rbDes) + floor:setTexture("Sprite3DTest/plane.png") + floor:setScaleX(60) + floor:setScaleZ(60) + self:addChild(floor) + floor:setCameraMask(cc.CameraFlag.USER1) + floor:syncToNode() + floor:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.NONE) + + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(0.8, 0.8, 0.8)) + + local start_x = START_POS_X - ARRAY_SIZE_X/2 + local start_y = START_POS_Y + local start_z = START_POS_Z - ARRAY_SIZE_Z/2 + + for k = 1, ARRAY_SIZE_Y do + for i = 1, ARRAY_SIZE_X do + for j = 1, ARRAY_SIZE_Z do + local x = 1.0 * (i - 1) + start_x + local y = 5.0+1.0 * (k - 1) + start_y + local z = 1.0 * (j - 1) + start_z + + local sprite = cc.PhysicsSprite3D:create("Sprite3DTest/box.c3t", rbDes) + sprite:setTexture("Images/CyanSquare.png") + sprite:setPosition3D(cc.vec3(x, y, z)) + sprite:syncToNode() + sprite:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE) + sprite:setCameraMask(cc.CameraFlag.USER1) + sprite:setScale(0.8) + self:addChild(sprite) + end + end + end + + self._physicsScene:setPhysics3DDebugCamera(self._camera) +end + +---------------------------------------- +----Physics3DConstraintDemo +---------------------------------------- +local Physics3DConstraintDemo = class("Physics3DConstraintDemo", Physics3DTestDemo) + +function Physics3DConstraintDemo:subtitle() + return "Physics3D Constraint" +end + +function Physics3DConstraintDemo:extend() + + local listener = cc.EventListenerTouchAllAtOnce:create() + listener:registerScriptHandler(function(touches, event) + if nil ~= self._camera then + local touch = touches[1] + local location = touch:getLocationInView() + local nearP = cc.vec3(location.x, location.y, 0.0) + local farP = cc.vec3(location.x, location.y, 1.0) + + local size = cc.Director:getInstance():getWinSize() + nearP = self._camera:unproject(size, nearP, nearP) + farP = self._camera:unproject(size, farP, farP) + + local physicsWorld = self._physicsScene:getPhysics3DWorld() + local hitResult = {} + local ret = false + ret, hitResult = physicsWorld:rayCast(nearP, farP, hitResult) + if true == ret and nil ~= hitResult.hitObj and hitResult.hitObj:getObjType() == cc.Physics3DObject.PhysicsObjType.RIGID_BODY then + local mat = cc.mat4.getInversed(hitResult.hitObj:getWorldTransform()) + local position = {x = 0, y = 0, z = 0} + position = cc.mat4.transformVector(mat, cc.vec4(hitResult.hitPosition.x, hitResult.hitPosition.y, hitResult.hitPosition.z, 1.0),position) + + self._constraint = cc.Physics3DPointToPointConstraint:create(hitResult.hitObj, position) + physicsWorld:addPhysics3DConstraint(self._constraint, true) + self._pickingDistance = math.sqrt(math.pow(hitResult.hitPosition.x - nearP.x, 2) + math.pow(hitResult.hitPosition.y - nearP.y, 2) + math.pow(hitResult.hitPosition.z - nearP.z, 2)) + return + end + end + self._needShootBox = false + end,cc.Handler.EVENT_TOUCHES_BEGAN) + + listener:registerScriptHandler(function(touches, event) + + if self._constraint ~= nil then + local touch = touches[1] + local location = touch:getLocationInView() + local nearP = cc.vec3(location.x, location.y, 0.0) + local farP = cc.vec3(location.x, location.y, 1.0) + + local size = cc.Director:getInstance():getWinSize() + nearP = self._camera:unproject(size, nearP, nearP) + farP = self._camera:unproject(size, farP, farP) + local dir = cc.vec3normalize(cc.vec3(farP.x - nearP.x, farP.y - nearP.y, farP.z - nearP.z)) + self._constraint:setPivotPointInB(cc.vec3(nearP.x + dir.x * self._pickingDistance, nearP.y + dir.y * self._pickingDistance, nearP.z + dir.z * self._pickingDistance)) + return + end + + if #touches > 0 and self._camera ~= nil then + local touch = touches[1] + local delta = touch:getDelta() + + self._angle = self._angle - delta.x * math.pi / 180.0 + self._camera:setPosition3D(cc.vec3(100.0 * math.sin(self._angle), 50.0, 100.0 * math.cos(self._angle))) + self._camera:lookAt(cc.vec3(0.0, 0.0, 0.0), cc.vec3(0.0, 1.0, 0.0)) + + if (delta.x * delta.x + delta.y * delta.y) > 16 then + self._needShootBox = false + end + end + end, cc.Handler.EVENT_TOUCHES_MOVED) + + listener:registerScriptHandler(function(touches, event) + + if self._constraint ~= nil then + self._physicsScene:getPhysics3DWorld():removePhysics3DConstraint(self._constraint) + self._constraint = nil + return + end + + if self._needShootBox == false then + return + end + + if #touches > 0 then + local location = touches[1]:getLocationInView() + local nearP = cc.vec3(location.x, location.y, -1.0) + local farP = cc.vec3(location.x, location.y, 1.0) + nearP = self._camera:unproject(nearP) + farP = self._camera:unproject(farP) + + local dir = cc.vec3(farP.x - nearP.x, farP.y - nearP.y, farP.z - nearP.z) + local cameraPosition = self._camera:getPosition3D() + self:shootBox(cc.vec3(cameraPosition.x + dir.x * 10, cameraPosition.y + dir.y * 10, cameraPosition.z + dir.z * 10)) + end + end, cc.Handler.EVENT_TOUCHES_ENDED) + + local eventDispatcher = self:getEventDispatcher() + eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self) + + local rbDes = {} + rbDes.disableSleep = true + --create box + local sprite = cc.Sprite3D:create("Sprite3DTest/orc.c3b") + rbDes.mass = 10.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(5.0, 5.0, 5.0)) + local rigidBody = cc.Physics3DRigidBody:create(rbDes) + + local quat = cc.quaternion_createFromAxisAngle(cc.vec3(0, 1, 0), math.pi) + local component = cc.Physics3DComponent:create(rigidBody, cc.vec3(0.0, -3.0, 0.0), quat) + + sprite:addComponent(component) + self:addChild(sprite) + sprite:setCameraMask(cc.CameraFlag.USER1) + sprite:setScale(0.4) + sprite:setPosition3D(cc.vec3(-20.0, 5.0, 0.0)) + --sync node position to physics + component:syncToNode() + --physics controlled, we will not set position for it, so we can skip sync node position to physics + component:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE) + + self._physicsScene:setPhysics3DDebugCamera(self._camera) + + local physicsWorld = self._physicsScene:getPhysics3DWorld() + --create point to point constraint + local constraint = cc.Physics3DPointToPointConstraint:create(rigidBody, cc.vec3(2.5, 2.5, 2.5)) + physicsWorld:addPhysics3DConstraint(constraint) + + --create hinge constraint + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(8.0, 8.0, 1.0)) + rigidBody = cc.Physics3DRigidBody:create(rbDes) + component = cc.Physics3DComponent:create(rigidBody) + sprite = cc.Sprite3D:create("Sprite3DTest/box.c3t") + sprite:setTexture("Sprite3DTest/plane.png") + sprite:setScaleX(8.0) + sprite:setScaleY(8.0) + sprite:setPosition3D(cc.vec3(5.0, 0.0, 0.0)) + sprite:addComponent(component) + sprite:setCameraMask(cc.CameraFlag.USER1) + self:addChild(sprite) + component:syncToNode() + rigidBody:setAngularVelocity(cc.vec3(0,3,0)) + constraint = cc.Physics3DHingeConstraint:create(rigidBody, cc.vec3(4.0, 4.0, 0.5), cc.vec3(0.0, 1.0, 0.0)) + physicsWorld:addPhysics3DConstraint(constraint) + + --create slider constraint + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(3.0, 2.0, 3.0)) + rigidBody = cc.Physics3DRigidBody:create(rbDes) + component = cc.Physics3DComponent:create(rigidBody) + sprite = cc.Sprite3D:create("Sprite3DTest/box.c3t") + sprite:setTexture("Sprite3DTest/plane.png") + sprite:setScaleX(3.0) + sprite:setScaleZ(3.0) + sprite:setPosition3D(cc.vec3(30.0, 15.0, 0.0)) + sprite:addComponent(component) + sprite:setCameraMask(cc.CameraFlag.USER1) + self:addChild(sprite) + component:syncToNode() + rigidBody:setLinearVelocity(cc.vec3(0,3,0)) + + rbDes.mass = 0.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(3.0, 3.0, 3.0)) + local rigidBodyB = cc.Physics3DRigidBody:create(rbDes) + component = cc.Physics3DComponent:create(rigidBodyB) + sprite = cc.Sprite3D:create("Sprite3DTest/box.c3t") + sprite:setTexture("Sprite3DTest/plane.png") + sprite:setScale(3.0) + sprite:setPosition3D(cc.vec3(30.0, 5.0, 0.0)) + sprite:addComponent(component) + sprite:setCameraMask(cc.CameraFlag.USER1) + self:addChild(sprite) + component:syncToNode() + + local frameInA = cc.mat4.createRotationZ(cc.mat4.createIdentity(), math.pi / 2) + local frameInB = frameInA + frameInA[14] = -5.0 + frameInB[14] = 5.0 + constraint = cc.Physics3DSliderConstraint:create(rigidBody, rigidBodyB, frameInA, frameInB, false) + physicsWorld:addPhysics3DConstraint(constraint) + constraint:setLowerLinLimit(-5.0) + constraint:setUpperLinLimit(5.0) + + --create ConeTwist constraint + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(3.0, 3.0, 3.0)) + rigidBody = cc.Physics3DRigidBody:create(rbDes) + component = cc.Physics3DComponent:create(rigidBody) + sprite = cc.Sprite3D:create("Sprite3DTest/box.c3t") + sprite:setTexture("Sprite3DTest/plane.png") + sprite:setScale(3.0) + sprite:setPosition3D(cc.vec3(-10.0, 5.0, 0.0)) + sprite:addComponent(component) + sprite:setCameraMask(cc.CameraFlag.USER1) + self:addChild(sprite) + component:syncToNode() + + frameInA = cc.mat4.createRotationZ(frameInA, math.pi / 2) + frameInA[13] = 0.0 + frameInA[14] = -10.0 + frameInA[15] = 0.0 + constraint = cc.Physics3DConeTwistConstraint:create(rigidBody, frameInA) + physicsWorld:addPhysics3DConstraint(constraint, true) + constraint:setLimit(math.pi / 180 * 10, math.pi / 180 * 10, math.pi / 180 * 40) + + --reate 6 dof constraint + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(3.0, 3.0, 3.0)) + rigidBody = cc.Physics3DRigidBody:create(rbDes) + component = cc.Physics3DComponent:create(rigidBody) + sprite = cc.Sprite3D:create("Sprite3DTest/box.c3t") + sprite:setTexture("Sprite3DTest/plane.png") + sprite:setScale(3.0) + sprite:setPosition3D(cc.vec3(30.0, -5.0, 0.0)) + sprite:addComponent(component) + sprite:setCameraMask(cc.CameraFlag.USER1) + self:addChild(sprite) + component:syncToNode() + frameInA = cc.mat4.setIdentity(frameInA) + constraint = cc.Physics3D6DofConstraint:create(rigidBody, frameInA, false) + physicsWorld:addPhysics3DConstraint(constraint) + constraint:setAngularLowerLimit(cc.vec3(0,0,0)) + constraint:setAngularUpperLimit(cc.vec3(0,0,0)) + constraint:setLinearLowerLimit(cc.vec3(-10,0,0)) + constraint:setLinearUpperLimit(cc.vec3(10,0,0)) +end + +---------------------------------------- +----Physics3DKinematicDemo +---------------------------------------- +local Physics3DKinematicDemo = class("Physics3DKinematicDemo", Physics3DTestDemo) + +function Physics3DKinematicDemo:subtitle() + return "Physics3D Kinematic" +end + +function Physics3DKinematicDemo:extend() + local rbDes = {} + rbDes.mass = 0.0 + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(60.0, 1.0, 60.0)) + local floor = cc.PhysicsSprite3D:create("Sprite3DTest/box.c3t", rbDes) + floor:setTexture("Sprite3DTest/plane.png") + floor:setScaleX(60) + floor:setScaleZ(60) + floor:setPosition3D(cc.vec3(0.0, -1.0, 0.0)) + self:addChild(floor) + floor:setCameraMask(cc.CameraFlag.USER1) + floor:syncToNode() + --static object sync is not needed + floor:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.NONE) + + for i=1, 3 do + + rbDes.mass = 0.0 --kinematic objects. zero mass so that it can not be affected by other dynamic objects + rbDes.shape = cc.Physics3DShape:createBox(cc.vec3(2.0, 2.0, 2.0)) + + local sprite = cc.PhysicsSprite3D:create("Sprite3DTest/box.c3t", rbDes) + sprite:setTexture("Images/CyanSquare.png") + sprite:setCameraMask(cc.CameraFlag.USER1) + local rigidBody = sprite:getPhysicsObj() + rigidBody:setKinematic(true) + + self:addChild(sprite) + + sprite:setScale(2.0) + sprite:setPosition3D(cc.vec3(-15.0, 0.0, 15.0 - 15.0 * (i - 1) )) + local moveby = cc.MoveBy:create(2.0 + (i - 1), cc.vec3(30.0, 0.0, 0.0)) + sprite:runAction(cc.RepeatForever:create(cc.Sequence:create(moveby, moveby:reverse()))) + end + + --create Dynamic + --create several spheres + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createSphere(0.5) + local start_x = START_POS_X - ARRAY_SIZE_X/2 + local start_y = START_POS_Y + 5.0 + local start_z = START_POS_Z - ARRAY_SIZE_Z/2 + + for k = 1,ARRAY_SIZE_Y do + for i = 1,ARRAY_SIZE_X do + for j = 1,ARRAY_SIZE_Z do + local x = 1.0 * (i - 1) + start_x + local y = 5.0 + 1.0 * (k - 1) + start_y + local z = 1.0 * (j - 1) + start_z + if rbDes.originalTransform == nil then + rbDes.originalTransform = cc.mat4.createIdentity() + else + rbDes.originalTransform = cc.mat4.setIdentity(rbDes.originalTransform) + end + + rbDes.originalTransform = cc.mat4.translate(rbDes.originalTransform, cc.vec3(x, y, z)) + + local sprite = cc.PhysicsSprite3D:create("Sprite3DTest/sphere.c3b", rbDes) + sprite:setTexture("Sprite3DTest/plane.png") + sprite:setCameraMask(cc.CameraFlag.USER1) + sprite:setScale(1.00 / sprite:getContentSize().width) + self:addChild(sprite) + sprite:setPosition3D(cc.vec3(x, y, z)) + sprite:syncToNode() + sprite:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE) + end + end + end + + self._physicsScene:setPhysics3DDebugCamera(self._camera) +end + +---------------------------------------- +----Physics3DCollisionCallbackDemo +---------------------------------------- +local Physics3DCollisionCallbackDemo = class("Physics3DCollisionCallbackDemo", Physics3DTestDemo) + +function Physics3DCollisionCallbackDemo:subtitle() + return "Physics3D CollisionCallback" +end + +function Physics3DCollisionCallbackDemo:extend() + local rbDes = {} + + local scale = 2.0 + local trianglesList = cc.Bundle3D:getTrianglesList("Sprite3DTest/boss.c3b") + for i = 1, #trianglesList do + trianglesList[i] = {x = trianglesList[i].x * scale, y = trianglesList[i].y * scale, z = trianglesList[i].z * scale} + end + + rbDes.mass = 0.0 + rbDes.shape = cc.Physics3DShape:createMesh(trianglesList, math.floor(#trianglesList / 3)) + local rigidBody = cc.Physics3DRigidBody:create(rbDes) + local component = cc.Physics3DComponent:create(rigidBody) + local sprite = cc.Sprite3D:create("Sprite3DTest/boss.c3b") + sprite:addComponent(component) + sprite:setRotation3D(cc.vec3(-90.0, 0.0, 0.0)) + sprite:setScale(scale) + sprite:setCameraMask(cc.CameraFlag.USER1) + self:addChild(sprite) + + rigidBody:setCollisionCallback(function (collisionInfo) + if nil ~= collisionInfo.collisionPointList and #collisionInfo.collisionPointList > 0 then + if collisionInfo.objA:getMask() ~= 0 then + local ps = cc.PUParticleSystem3D:create("Particle3D/scripts/mp_hit_04.pu") + ps:setPosition3D(collisionInfo.collisionPointList[1].worldPositionOnB) + ps:setScale(0.05) + ps:startParticleSystem() + ps:setCameraMask(2) + self:addChild(ps) + ps:runAction(cc.Sequence:create(cc.DelayTime:create(1.0), cc.CallFunc:create(function() + ps:removeFromParent() + end))) + collisionInfo.objA:setMask(0) + end + end + end) + + self._physicsScene:setPhysics3DDebugCamera(self._camera) +end + +---------------------------------------- +----Physics3DTerrainDemo +---------------------------------------- +local Physics3DTerrainDemo = class("Physics3DTerrainDemo", Physics3DTestDemo) + +function Physics3DTerrainDemo:subtitle() + return "Physics3D Terrain" +end + +function Physics3DTerrainDemo:extend() + + local detailMapR = { _detailMapSrc = "TerrainTest/dirt.jpg", _detailMapSize = 35} + local detailMapG = { _detailMapSrc = "TerrainTest/Grass2.jpg", _detailMapSize = 10} + local detailMapB = { _detailMapSrc = "TerrainTest/road.jpg", _detailMapSize = 35} + local detailMapA = { _detailMapSrc = "TerrainTest/GreenSkin.jpg", _detailMapSize = 20} + local terrainData = { _heightMapSrc = "TerrainTest/heightmap129.jpg", _alphaMapSrc = "TerrainTest/alphamap.png" , _detailMaps = {detailMapR, detailMapG, detailMapB, detailMapA}, _detailMapAmount = 4, _mapHeight = 20.0, _mapScale = 1.0, _chunkSize = cc.size(32,32)} + + local terrain = cc.Terrain:create(terrainData,cc.Terrain.CrackFixedType.SKIRT) + terrain:setMaxDetailMapAmount(4) + terrain:setCameraMask(2) + terrain:setDrawWire(false) + + terrain:setSkirtHeightRatio(3) + terrain:setLODDistance(64,128,192) + terrain:setCameraMask(cc.CameraFlag.USER1) + + --create terrain + local rbDes = {} + rbDes.mass = 0.0 + local heidata = terrain:getHeightData() + local size = terrain:getTerrainSize() + rbDes.shape = cc.Physics3DShape:createHeightfield(size.width, size.height, heidata, 1.0, terrain:getMinHeight(), terrain:getMaxHeight(), true, false, true) + local rigidBody = cc.Physics3DRigidBody:create(rbDes) + local component = cc.Physics3DComponent:create(rigidBody) + terrain:addComponent(component) + self:addChild(terrain) + component:syncToNode() + component:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.NONE) + + --create several spheres + rbDes.mass = 1.0 + rbDes.shape = cc.Physics3DShape:createSphere(0.5) + local start_x = START_POS_X - ARRAY_SIZE_X/2 + 5.0 + local start_y = START_POS_Y + 20.0 + local start_z = START_POS_Z - ARRAY_SIZE_Z/2 + + for k = 1, ARRAY_SIZE_Y do + for i = 1, ARRAY_SIZE_X do + for j = 1, ARRAY_SIZE_Z do + local x = 1.0 * (i - 1) + start_x + local y = 5.0+1.0 * (k - 1) + start_y + local z = 1.0 * (j - 1) + start_z + + local sprite = cc.PhysicsSprite3D:create("Sprite3DTest/sphere.c3b", rbDes) + sprite:setTexture("Sprite3DTest/plane.png") + sprite:setCameraMask(cc.CameraFlag.USER1) + sprite:setScale(1.0 / sprite:getContentSize().width) + sprite:setPosition3D(cc.vec3(x, y, z)) + self:addChild(sprite) + sprite:syncToNode() + sprite:setSyncFlag(cc.Physics3DComponent.PhysicsSyncFlag.PHYSICS_TO_NODE) + end + end + end + + --create mesh + local trianglesList = cc.Bundle3D:getTrianglesList("Sprite3DTest/boss.c3b") + + rbDes.mass = 0.0 + rbDes.shape = cc.Physics3DShape:createMesh(trianglesList, math.floor(#trianglesList / 3)) + local rigidBody = cc.Physics3DRigidBody:create(rbDes) + local component = cc.Physics3DComponent:create(rigidBody) + local sprite = cc.Sprite3D:create("Sprite3DTest/boss.c3b") + sprite:addComponent(component) + sprite:setRotation3D(cc.vec3(-90.0, 0.0, 0.0)) + sprite:setPosition3D(cc.vec3(0.0, 15.0, 0.0)) + sprite:setCameraMask(2) + self:addChild(sprite) + + local shapeList = {} + local localTrans = cc.mat4.createIdentity() + local bodyshape = cc.Physics3DShape:createBox(cc.vec3(2.0, 4.0, 2.0)) + localTrans = cc.mat4.createTranslation(0.0, 2.0, 0.0, localTrans) + table.insert(shapeList, {bodyshape, localTrans}) + + local headshape = cc.Physics3DShape:createSphere(1.5) + localTrans = cc.mat4.createTranslation(0.6, 5.0, -1.5, localTrans) + table.insert(shapeList, {headshape, localTrans}) + + local lhandshape = cc.Physics3DShape:createBox(cc.vec3(1.0, 3.0, 1.0)) + localTrans = cc.mat4.createRotation(cc.vec3(1.0, 0.0, 0.0), 15.0 * math.pi / 180, localTrans) + localTrans[13] = -1.5 + localTrans[14] = 2.5 + localTrans[15] = -2.5 + table.insert(shapeList, {lhandshape, localTrans}) + + local rhandshape = cc.Physics3DShape:createBox(cc.vec3(1.0, 3.0, 1.0)) + localTrans = cc.mat4.createRotation(cc.vec3(1.0, 0.0, 0.0), -15.0 * math.pi / 180, localTrans) + localTrans[13] = 2.0 + localTrans[14] = 2.5 + localTrans[15] = 1.0 + table.insert(shapeList, {rhandshape, localTrans}) + + rbDes.mass = 10.0 + rbDes.shape = cc.Physics3DShape:createCompoundShape(shapeList) + rigidBody = cc.Physics3DRigidBody:create(rbDes) + component = cc.Physics3DComponent:create(rigidBody) + local sprite = cc.Sprite3D:create("Sprite3DTest/orc.c3b") + sprite:addComponent(component) + sprite:setRotation3D(cc.vec3(0.0, 180.0, 0.0)) + sprite:setPosition3D(cc.vec3(-5.0, 20.0, 0.0)) + sprite:setScale(0.4) + sprite:setCameraMask(2) + self:addChild(sprite) + + self._physicsScene:setPhysics3DDebugCamera(self._camera) +end + +function Physics3DTest() + + Helper.usePhysics = true + + local scene = cc.Scene:createWithPhysics() + + Helper.createFunctionTable = + { + BasicPhysics3DDemo.create, + Physics3DConstraintDemo.create, + Physics3DKinematicDemo.create, + Physics3DCollisionCallbackDemo.create, + Physics3DTerrainDemo.create, + } + + scene:addChild(BasicPhysics3DDemo.create()) + scene:addChild(CreateBackMenuItem()) + + return scene +end \ No newline at end of file diff --git a/tests/lua-tests/src/Scene3DTest/Scene3DTest.lua b/tests/lua-tests/src/Scene3DTest/Scene3DTest.lua new file mode 100644 index 0000000000..355930382a --- /dev/null +++ b/tests/lua-tests/src/Scene3DTest/Scene3DTest.lua @@ -0,0 +1,680 @@ + +local GAME_LAYER = +{ + LAYER_SKYBOX = 1, + LAYER_GAME = 2, + LAYER_UI = 3, + LAYER_ACTOR = 4, + LAYER_ZOOM = 5, + LAYER_OSD = 6, + LAYER_COUNT = 7, +} + +local s_CF = +{ + cc.CameraFlag.DEFAULT, + cc.CameraFlag.USER1, + cc.CameraFlag.USER2, + cc.CameraFlag.USER3, + cc.CameraFlag.USER4, + cc.CameraFlag.USER5, +} + +local s_CM = +{ + s_CF[1], + s_CF[2], + s_CF[3], + s_CF[4], + s_CF[5], + s_CF[6], +} + + +---------------------------------------- +----TerrainWalkThru +---------------------------------------- + +local PLAER_STATE = +{ + LEFT = 0, + RIGHT = 1, + IDLE = 2, + FORWARD = 3, + BACKWARD = 4, +} + +local PLAYER_HEIGHT = 0 + +local camera_offset = cc.vec3(0, 45, 60) + +local Player = class("Player", function(file, cam, terrain) + local sprite = cc.Sprite3D:create(file) + if nil ~= sprite then + sprite._headingAngle = 0 + sprite._playerState = PLAER_STATE.IDLE + sprite._cam = cam + sprite._terrain = terrain + end + return sprite +end) + +function Player:ctor() + -- body + self:init() +end + +function Player:init() + self._headingAxis = cc.vec3(0.0, 0.0, 0.0) + self:scheduleUpdateWithPriorityLua(function(dt) + local curPos = self:getPosition3D() + if self._playerState == PLAER_STATE.IDLE then + + elseif self._playerState == PLAER_STATE.FORWARD then + local newFaceDir = cc.vec3( self._targetPos.x - curPos.x, self._targetPos.y - curPos.y, self._targetPos.z - curPos.z) + newFaceDir.y = 0.0 + newFaceDir = cc.vec3normalize(newFaceDir) + local offset = cc.vec3(newFaceDir.x * 25.0 * dt, newFaceDir.y * 25.0 * dt, newFaceDir.z * 25.0 * dt) + curPos = cc.vec3(curPos.x + offset.x, curPos.y + offset.y, curPos.z + offset.z) + self:setPosition3D(curPos) + elseif self._playerState == PLAER_STATE.BACKWARD then + + local transform = self:getNodeToWorldTransform() + local forward_vec = cc.vec3(-transform[9], -transform[10], -transform[11]) + forward_vec = cc.vec3normalize(forward_vec) + self:setPosition3D(cc.vec3(curPos.x - forward_vec.x * 15 * dt, curPos.y - forward_vec.y * 15 * dt, curPos.z - forward_vec.z * 15 *dt)) + elseif self._playerState == PLAER_STATE.LEFT then + player:setRotation3D(cc.vec3(curPos.x, curPos.y + 25 * dt, curPos.z)) + elseif self._playerState == PLAER_STATE.RIGHT then + player:setRotation3D(cc.vec3(curPos.x, curPos.y - 25 * dt, curPos.z)) + end + + local normal = cc.vec3(0.0, 0.0, 0.0) + local player_h, normal = self._terrain:getHeight(self:getPositionX(), self:getPositionZ(), normal) + self:setPositionY(player_h + PLAYER_HEIGHT) + + --need to scriptfile + local q2 = cc.quaternion_createFromAxisAngle(cc.vec3(0, 1, 0), -math.pi) + local headingQ = cc.quaternion_createFromAxisAngle(self._headingAxis, self._headingAngle) + local x = headingQ.w * q2.x + headingQ.x * q2.w + headingQ.y * q2.z - headingQ.z * q2.y + local y = headingQ.w * q2.y - headingQ.x * q2.z + headingQ.y * q2.w + headingQ.z * q2.x + local z = headingQ.w * q2.z + headingQ.x * q2.y - headingQ.y * q2.x + headingQ.z * q2.w + local w = headingQ.w * q2.w - headingQ.x * q2.x - headingQ.y * q2.y - headingQ.z * q2.z + headingQ = cc.quaternion(x, y, z, w) + self:setRotationQuat(headingQ) + + local vec_offset = cc.vec4(camera_offset.x, camera_offset.y, camera_offset.z, 1) + local transform = self:getNodeToWorldTransform() + local dst = cc.vec4(0.0, 0.0, 0.0, 0.0) + vec_offset = mat4_transformVector(transform, vec_offset, dst) + local playerPos = self:getPosition3D() + self._cam:setPosition3D(cc.vec3(playerPos.x + camera_offset.x, playerPos.y + camera_offset.y, playerPos.z + camera_offset.z)) + self:updateState() + end, 0) + + self:registerScriptHandler(function (event) + -- body + if "exit" == event then + self:unscheduleUpdate() + end + end) +end + +function Player:updateState() + if self._playerState == PLAER_STATE.FORWARD then + local player_pos = cc.p(self:getPositionX(),self:getPositionZ()) + local targetPos = cc.p(self._targetPos.x, self._targetPos.z) + local dist = cc.pGetDistance(player_pos, targetPos) + if dist < 1 then + self._playerState = PLAER_STATE.IDLE + end + end +end + +local TerrainWalkThru = class("TerrainWalkThru", function () + local layer = cc.Layer:create() + Helper.initWithLayer(layer) + return layer +end) + +function TerrainWalkThru:ctor() + -- body + local function onNodeEvent(event) + if "enter" == event then + self:onEnter() + elseif "exit" == event then + self:onExit() + end + end + self:registerScriptHandler(onNodeEvent) +end + +function TerrainWalkThru:onEnter() + self:init() +end + +function TerrainWalkThru:onExit() + +end + +function TerrainWalkThru:init() + Helper.titleLabel:setString(self:title()) + Helper.subtitleLabel:setString(self:subtitle()) + + local listener = cc.EventListenerTouchAllAtOnce:create() + + listener:registerScriptHandler(function (touches, event) + + end,cc.Handler.EVENT_TOUCHES_BEGAN) + + listener:registerScriptHandler(function (touches, event) + + local touch = touches[1] + local location = touch:getLocationInView() + if self._camera ~= nil then + if self._player ~= nil then + local nearP = cc.vec3(location.x, location.y, 0.0) + local farP = cc.vec3(location.x, location.y, 1.0) + + local size = cc.Director:getInstance():getWinSize() + nearP = self._camera:unproject(size, nearP, nearP) + farP = self._camera:unproject(size, farP, farP) + local dir = cc.vec3(farP.x - nearP.x, farP.y - nearP.y, farP.z - nearP.z) + dir = cc.vec3normalize(dir) + + local rayStep = cc.vec3(15 * dir.x, 15 * dir.y, 15 * dir.z) + local rayPos = nearP + local rayStartPosition = nearP + local lastRayPosition = rayPos + rayPos = cc.vec3(rayPos.x + rayStep.x, rayPos.y + rayStep.y, rayPos.z + rayStep.z) + -- Linear search - Loop until find a point inside and outside the terrain Vector3 + local height = self._terrain:getHeight(rayPos.x, rayPos.z) + + while rayPos.y > height do + lastRayPosition = rayPos + rayPos = cc.vec3(rayPos.x + rayStep.x, rayPos.y + rayStep.y, rayPos.z + rayStep.z) + height = self._terrain:getHeight(rayPos.x,rayPos.z) + end + + local startPosition = lastRayPosition + local endPosition = rayPos + + for i = 1, 32 do + -- Binary search pass + local middlePoint = cc.vec3(0.5 * (startPosition.x + endPosition.x), 0.5 * (startPosition.y + endPosition.y), 0.5 * (startPosition.z + endPosition.z)) + if (middlePoint.y < height) then + endPosition = middlePoint + else + startPosition = middlePoint + end + end + + local collisionPoint = cc.vec3(0.5 * (startPosition.x + endPosition.x), 0.5 * (startPosition.y + endPosition.y), 0.5 * (startPosition.z + endPosition.z)) + local playerPos = self._player:getPosition3D() + dir = cc.vec3(collisionPoint.x - playerPos.x, collisionPoint.y - playerPos.y, collisionPoint.z - playerPos.z) + dir.y = 0 + dir = cc.vec3normalize(dir) + self._player._headingAngle = -1 * math.acos(-dir.z) + + self._player._headingAxis = vec3_cross(dir, cc.vec3(0, 0, -1), self._player._headingAxis) + self._player._targetPos = collisionPoint + -- self._player:forward() + self._player._playerState = PLAER_STATE.FORWARD + end + end + end,cc.Handler.EVENT_TOUCHES_ENDED) + + local eventDispatcher = self:getEventDispatcher() + eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self) + + local visibleSize = cc.Director:getInstance():getVisibleSize() + self._camera = cc.Camera:createPerspective(60, visibleSize.width/visibleSize.height, 0.1, 200) + self._camera:setCameraFlag(cc.CameraFlag.USER1) + self:addChild(self._camera) + + local detailMapR = { _detailMapSrc = "TerrainTest/dirt.jpg", _detailMapSize = 35} + local detailMapG = { _detailMapSrc = "TerrainTest/Grass2.jpg", _detailMapSize = 10} + local detailMapB = { _detailMapSrc = "TerrainTest/road.jpg", _detailMapSize = 35} + local detailMapA = { _detailMapSrc = "TerrainTest/GreenSkin.jpg", _detailMapSize = 20} + local terrainData = { _heightMapSrc = "TerrainTest/heightmap16.jpg", _alphaMapSrc = "TerrainTest/alphamap.png" , _detailMaps = {detailMapR, detailMapG, detailMapB, detailMapA}, _detailMapAmount = 4, _mapHeight = 40.0, _mapScale = 2.0 } + + self._terrain = cc.Terrain:create(terrainData,cc.Terrain.CrackFixedType.SKIRT) + self._terrain:setMaxDetailMapAmount(4) + self._terrain:setCameraMask(2) + self._terrain:setDrawWire(false) + + self._terrain:setSkirtHeightRatio(3) + self._terrain:setLODDistance(64,128,192) + + self._player = Player:create("Sprite3DTest/girl.c3b", self._camera, self._terrain) + self._player:setCameraMask(2) + self._player:setScale(0.08) + self._player:setPositionY(self._terrain:getHeight(self._player:getPositionX(), self._player:getPositionZ()) + PLAYER_HEIGHT) + + --add Particle3D for test blend + local rootps = cc.PUParticleSystem3D:create("Particle3D/scripts/mp_torch.pu") + rootps:setCameraMask(cc.CameraFlag.USER1) + rootps:setScale(30.0) + rootps:startParticleSystem() + self._player:addChild(rootps) + + --add BillBoard for test blend + local billboard = cc.BillBoard:create("Images/btn-play-normal.png") + billboard:setPosition3D(cc.vec3(0,180,0)) + billboard:setCameraMask(cc.CameraFlag.USER1) + self._player:addChild(billboard) + + local animation = cc.Animation3D:create("Sprite3DTest/girl.c3b","Take 001") + if nil ~= animation then + local animate = cc.Animate3D:create(animation) + self._player:runAction(cc.RepeatForever:create(animate)) + end + + local playerPos = self._player:getPosition3D() + self._camera:setPosition3D(cc.vec3(playerPos.x + camera_offset.x, playerPos.y + camera_offset.y, playerPos.z + camera_offset.z)) + self._camera:setRotation3D(cc.vec3(-45,0,0)) + + self:addChild(self._player) + self:addChild(self._terrain) + + self:extend() +end + +function TerrainWalkThru:title() + return "Player walk around in terrain" +end + +function TerrainWalkThru:subtitle() + return "touch to move" +end + +function TerrainWalkThru:extend() + +end + +---------------------------------------- +----Scene3DTest +---------------------------------------- +local Scene3DTest = class("Scene3DTest", TerrainWalkThru) + +function Scene3DTest:create3DWorld() + -- terrain and player has been create in TerrainWalkThru:init + -- we only need override there camera mask + self._terrain:setCameraMask(s_CM[GAME_LAYER.LAYER_GAME]) + self._player:setCameraMask(s_CM[GAME_LAYER.LAYER_GAME]) + self._player:setScale(self._player:getScale() * 1.5) + + --add two Sprite3D monster, one is transparent + local playerPos = self._player:getPosition3D() + local monster = cc.Sprite3D:create("Sprite3DTest/orc.c3b") + monster:setRotation3D(cc.vec3(0,180,0)) + monster:setPosition3D(cc.vec3(playerPos.x + 50, playerPos.y - 10, playerPos.z)) + monster:setCameraMask(s_CM[GAME_LAYER.LAYER_GAME]) + monster:setOpacity(128) + self:addChild(monster) + monster = cc.Sprite3D:create("Sprite3DTest/orc.c3b") + monster:setRotation3D(cc.vec3(0,180,0)) + monster:setPosition3D(cc.vec3(playerPos.x - 50, playerPos.y - 5, playerPos.z)) + monster:setCameraMask(s_CM[GAME_LAYER.LAYER_GAME]) + self:addChild(monster) + + --add a particle 3d above player + local rootps = cc.PUParticleSystem3D:create("Particle3D/scripts/blackHole.pu", "Particle3D/materials/pu_mediapack_01.material") + rootps:setScale(2) + rootps:setPosition3D(cc.vec3(0, 150, 0)) + rootps:setCameraMask(s_CM[GAME_LAYER.LAYER_GAME]) + local moveby = cc.MoveBy:create(2.0, cc.p(50.0, 0.0)) + local moveby1 = cc.MoveBy:create(2.0, cc.p(-50.0, 0.0)) + rootps:runAction(cc.RepeatForever:create(cc.Sequence:create(moveby, moveby1))) + rootps:startParticleSystem() + self._player:addChild(rootps, 0) + + --then, create skybox + --create and set our custom shader + local shader = cc.GLProgram:createWithFilenames("Sprite3DTest/cube_map.vert", "Sprite3DTest/cube_map.frag") + local state = cc.GLProgramState:create(shader) + + --create the second texture for cylinder + self._textureCube = cc.TextureCube:create("Sprite3DTest/skybox/left.jpg", "Sprite3DTest/skybox/right.jpg", + "Sprite3DTest/skybox/top.jpg", "Sprite3DTest/skybox/bottom.jpg", + "Sprite3DTest/skybox/front.jpg", "Sprite3DTest/skybox/back.jpg") + + --set texture parameters + local tRepeatParams = { magFilter = gl.LINEAR , minFilter = gl.LINEAR , wrapS = gl.MIRRORED_REPEAT , wrapT = gl.MIRRORED_REPEAT } + self._textureCube:setTexParameters(tRepeatParams) + + --pass the texture sampler to our custom shader + state:setUniformTexture("u_cubeTex", self._textureCube) + + --add skybox + self._skyBox = cc.Skybox:create() + self._skyBox:setCameraMask(s_CM[GAME_LAYER.LAYER_SKYBOX]) + self._skyBox:setTexture(self._textureCube) + self._skyBox:setScale(700.0) + self:addChild(self._skyBox) + + local targetPlatform = cc.Application:getInstance():getTargetPlatform() + if targetPlatform == cc.PLATFORM_OS_ANDROID or targetPlatform == cc.PLATFORM_OS_WINRT or targetPlatform == cc.PLATFORM_OS_WP8 then + self._backToForegroundListener = cc.EventListenerCustom:create("event_renderer_recreated", function (eventCustom) + + local state = self._skyBox:getGLProgramState() + local glProgram = state:getGLProgram() + glProgram:reset() + glProgram:initWithFilenames("Sprite3DTest/cube_map.vert", "Sprite3DTest/cube_map.frag") + glProgram:link() + glProgram:updateUniforms() + + self._textureCube:reloadTexture() + + local tRepeatParams = { magFilter = gl.NEAREST , minFilter = gl.NEAREST , wrapS = gl.MIRRORED_REPEAT , wrapT = gl.MIRRORED_REPEAT } + self._textureCube:setTexParameters(tRepeatParams) + state:setUniformTexture("u_cubeTex", self._textureCube) + + self._skyBox:reload() + self._skyBox:setTexture(self._textureCube) + end) + cc.Director:getInstance():getEventDispatcher():addEventListenerWithFixedPriority(self._backToForegroundListener, 1) + end +end + +function Scene3DTest:createUI() + --add player button + local showLeftDlgItem = cc.MenuItemImage:create("Images/Pea.png", "Images/Pea.png") + showLeftDlgItem:registerScriptTapHandler(function (tag, sender) + if nil ~= self._playerDlg then + self._playerDlg:setVisible(not self._playerDlg:isVisible()) + end + end) + showLeftDlgItem:setPosition(VisibleRect:left().x + 30, VisibleRect:top().y - 30) + + local ttfConfig = { fontFilePath = "fonts/arial.ttf", fontSize = 20} + local descItem = cc.MenuItemLabel:create(cc.Label:createWithTTF(ttfConfig, "Description")) + descItem:registerScriptTapHandler(function(tag, sender) + if nil ~= self._descDlg then + self._descDlg:setVisible(not self._descDlg:isVisible()) + end + end) + descItem:setPosition(cc.p(VisibleRect:right().x - 50, VisibleRect:top().y - 25)) + + local backItem = cc.MenuItemLabel:create(cc.Label:createWithTTF(ttfConfig, "Back")) + backItem:setPosition(cc.p(VisibleRect:right().x - 50, VisibleRect:bottom().y + 25)) + + local menu = cc.Menu:create(showLeftDlgItem, descItem, backItem) + menu:setPosition(cc.p(0.0, 0.0)) + menu:setCameraMask(s_CM[GAME_LAYER.LAYER_UI], true) + self:addChild(menu) +end + +function Scene3DTest:createPlayerDlg() + cc.SpriteFrameCache:getInstance():addSpriteFrames(s_s9s_ui_plist) + + local dlgSize = cc.size(190, 240) + local pos = VisibleRect:center() + local margin = 10 + + --first, create dialog ui part, include background, title and buttons + self._playerDlg = ccui.Scale9Sprite:createWithSpriteFrameName("button_actived.png") + self._playerDlg:setContentSize(dlgSize) + self._playerDlg:setAnchorPoint(cc.p(1, 0.5)) + pos.y = pos.y - margin + pos.x = pos.x - margin + self._playerDlg:setPosition(pos) + + --title + local title = cc.Label:createWithTTF("Player Dialog","fonts/arial.ttf",16) + title:setPosition(dlgSize.width / 2, dlgSize.height - margin * 2) + self._playerDlg:addChild(title) + + --player background + local bgSize = cc.size(110, 180) + local bgPos = cc.p(margin, dlgSize.height / 2 - margin) + local playerBg = ccui.Scale9Sprite:createWithSpriteFrameName("item_bg.png") + playerBg:setContentSize(bgSize) + playerBg:setAnchorPoint(cc.p(0, 0.5)) + playerBg:setPosition(bgPos) + self._playerDlg:addChild(playerBg) + + --item background and item + local itemSize = cc.size(48, 48) + local itemAnchor = cc.p(0, 1) + local itemPos = cc.p(bgPos.x + bgSize.width + margin, bgPos.y + bgSize.height / 2) + local itemBg = ccui.Scale9Sprite:createWithSpriteFrameName("item_bg.png") + itemBg:setContentSize(itemSize) + itemBg:setAnchorPoint(itemAnchor) + itemBg:setPosition(itemPos) + self._playerDlg:addChild(itemBg) + + local item = ccui.Button:create("crystal.png", "", "", ccui.TextureResType.plistType) + item:setScale(1.5) + item:setAnchorPoint(itemAnchor) + item:setPosition(itemPos) + item:addClickEventListener(function(sender) + if self._detailDlg ~= nil then + self._detailDlg:setVisible(not self._detailDlg:isVisible()) + end + end) + self._playerDlg:addChild(item) + + --after add ui element, add player dialog to scene + self._playerDlg:setCameraMask(s_CM[GAME_LAYER.LAYER_UI]) + self:addChild(self._playerDlg) + + --second, add 3d actor, which on dialog layer + local girl = cc.Sprite3D:create("Sprite3DTest/girl.c3b") + girl:setScale(0.5) + girl:setPosition(bgSize.width / 2, margin * 2) + girl:setCameraMask(s_CM[GAME_LAYER.LAYER_ACTOR]) + playerBg:addChild(girl) + + --third, add zoom in/out button, which is 2d ui element and over 3d actor + local zoomIn = ccui.Button:create("cocosui/animationbuttonnormal.png","cocosui/animationbuttonpressed.png") + zoomIn:setScale(0.5) + zoomIn:setAnchorPoint(cc.p(1, 1)) + zoomIn:setPosition(cc.p(bgSize.width / 2 - margin / 2, bgSize.height - margin)) + zoomIn:addClickEventListener(function(sender) + girl:setScale(girl:getScale() * 2) + end) + zoomIn:setTitleText("Zoom In") + zoomIn:setCameraMask(s_CM[GAME_LAYER.LAYER_ZOOM]) + playerBg:addChild(zoomIn) + + local zoomOut = ccui.Button:create("cocosui/animationbuttonnormal.png", "cocosui/animationbuttonpressed.png") + zoomOut:setScale(0.5) + zoomOut:setAnchorPoint(cc.p(0, 1)) + zoomOut:setPosition(cc.p(bgSize.width / 2 + margin / 2, bgSize.height - margin)) + zoomOut:addClickEventListener(function(sender) + girl:setScale(girl:getScale() / 2) + end) + zoomOut:setTitleText("Zoom Out") + zoomOut:setCameraMask(s_CM[GAME_LAYER.LAYER_ZOOM]) + playerBg:addChild(zoomOut) +end + +function Scene3DTest:createDetailDlg() + cc.SpriteFrameCache:getInstance():addSpriteFrames(s_s9s_ui_plist) + + local dlgSize = cc.size(190, 240) + local pos = VisibleRect:center() + local margin = 10 + + --create dialog + self._detailDlg = ccui.Scale9Sprite:createWithSpriteFrameName("button_actived.png") + self._detailDlg:setContentSize(dlgSize) + self._detailDlg:setAnchorPoint(cc.p(0, 0.5)) + self._detailDlg:setOpacity(224) + pos.y = pos.y - margin + pos.x = pos.x + margin + self._detailDlg:setPosition(pos) + + -- title + local title = cc.Label:createWithTTF("Detail Dialog","fonts/arial.ttf",16) + title:setPosition(dlgSize.width / 2, dlgSize.height - margin * 2) + self._detailDlg:addChild(title) + + -- add a spine ffd animation on it + local skeletonNode = sp.SkeletonAnimation:create("spine/goblins-ffd.json", "spine/goblins-ffd.atlas", 1.5) + skeletonNode:setAnimation(0, "walk", true) + skeletonNode:setSkin("goblin") + + skeletonNode:setScale(0.25) + local windowSize = cc.Director:getInstance():getWinSize() + skeletonNode:setPosition(cc.p(dlgSize.width / 2, 20)) + self._detailDlg:addChild(skeletonNode) + + local listener = cc.EventListenerTouchOneByOne:create() + listener:registerScriptHandler(function (touch, event) + if (not skeletonNode:getDebugBonesEnabled()) then + skeletonNode:setDebugBonesEnabled(true) + elseif skeletonNode:getTimeScale() == 1 then + skeletonNode:setTimeScale(0.3) + else + skeletonNode:setTimeScale(1) + skeletonNode:setDebugBonesEnabled(false) + end + + return true + end,cc.Handler.EVENT_TOUCH_BEGAN ) + + local eventDispatcher = self:getEventDispatcher() + eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self) + + --after add ui element, add dialog to scene + self._detailDlg:setCameraMask(s_CM[GAME_LAYER.LAYER_UI]) + self:addChild(self._detailDlg) +end + +function Scene3DTest:createDescDlg() + cc.SpriteFrameCache:getInstance():addSpriteFrames(s_s9s_ui_plist) + + local dlgSize = cc.size(440, 240) + local pos = VisibleRect:center() + local margin = 10 + + --create dialog + self._descDlg = ccui.Scale9Sprite:createWithSpriteFrameName("button_actived.png") + self._descDlg:setContentSize(dlgSize) + self._descDlg:setOpacity(224) + self._descDlg:setPosition(pos) + + --title + local title = cc.Label:createWithTTF("Description Dialog","fonts/arial.ttf",16) + title:setPosition(dlgSize.width / 2, dlgSize.height - margin * 2) + self._descDlg:addChild(title) + + --add a label to retain description text + local textSize = cc.size(400, 220) + local desc = "Scene 3D test for 2D and 3D mix rendering.\n" .. + "\n" .. + "- Game world composite with terrain, skybox and 3D objects.\n" .. + "- UI composite with 2D nodes.\n" .. + "- Click the icon at the topleft conner, will show a player dialog which" .. + "there is a 3D sprite on it.\n" .. + "- There are two button to zoom the player model, which should keep above" .. + "on 3D model.\n" .. + "- This description dialog should above all other elements.\n" .. + "\n" .. + "Click \"Description\" button to hide this dialog.\n" + + local text = cc.Label:createWithSystemFont(desc, "Helvetica", 12, textSize) + text:setAnchorPoint(cc.p(0, 1)) + text:setPosition(margin, dlgSize.height - (20 + margin)) + self._descDlg:addChild(text) + + --after add ui element, add dialog to scene + self._descDlg:setCameraMask(s_CM[GAME_LAYER.LAYER_OSD]) + self:addChild(self._descDlg) +end + +function Scene3DTest:extend() + self._playerDlg = nil + self._detailDlg = nil + self._descDlg = nil + self._gameCameras = {nil, nil, nil, nil, nil, nil} + + cc.Director:getInstance():setDisplayStats(false) + + local ca = nil + local visibleSize = cc.Director:getInstance():getVisibleSize() + --first, create a camera to look the skybox + ca = cc.Camera:createPerspective(60, visibleSize.width / visibleSize.height, 10, 1000) + ca:setPosition3D(cc.vec3(0.0, 0.0, 50.0)) + ca:setCameraFlag(s_CF[GAME_LAYER.LAYER_SKYBOX]) + ca:setDepth(GAME_LAYER.LAYER_SKYBOX) + self._gameCameras[GAME_LAYER.LAYER_SKYBOX] = ca + self:addChild(ca) + + -- second, create a camera to look the 3D game scene + -- it has been create in TerrainWalkThru:init + ca = self._camera + ca:setCameraFlag(s_CF[GAME_LAYER.LAYER_GAME]) + ca:setDepth(GAME_LAYER.LAYER_GAME) + self._gameCameras[GAME_LAYER.LAYER_GAME] = ca + + --third, use the default camera to look 2D base UI layer + local scene = cc.Director:getInstance():getRunningScene() + ca = scene:getDefaultCamera() + ca:setCameraFlag(s_CF[GAME_LAYER.LAYER_UI]) + ca:setDepth(GAME_LAYER.LAYER_UI) + self._gameCameras[GAME_LAYER.LAYER_UI] = ca + + --forth, create a camera to look the 3D model in dialogs + ca = cc.Camera:create() + ca:setCameraFlag(s_CF[GAME_LAYER.LAYER_ACTOR]) + ca:setDepth(GAME_LAYER.LAYER_ACTOR) + self._gameCameras[GAME_LAYER.LAYER_ACTOR] = ca + self:addChild(ca) + + -- fifth, create a camera to look the UI element over on the 3D models + ca = cc.Camera:create() + ca:setCameraFlag(s_CF[GAME_LAYER.LAYER_ZOOM]) + ca:setDepth(GAME_LAYER.LAYER_ZOOM) + self._gameCameras[GAME_LAYER.LAYER_ZOOM] = ca + self:addChild(ca) + + --sixth, create a camera to look the OSD UI + ca = cc.Camera:create() + ca:setCameraFlag(s_CF[GAME_LAYER.LAYER_OSD]) + ca:setDepth(GAME_LAYER.LAYER_OSD) + self._gameCameras[GAME_LAYER.LAYER_OSD] = ca + self:addChild(ca) + + self:create3DWorld() + self:createUI() + self:createPlayerDlg() + self:createDetailDlg() + self:createDescDlg() + + self._playerDlg:setVisible(false) + self._detailDlg:setVisible(false) +end + +function Scene3DTest:title() + return "" +end + +function Scene3DTest:subtitle() + return "" +end + +function Scene3DTest:onExit() + local targetPlatform = cc.Application:getInstance():getTargetPlatform() + if targetPlatform == cc.PLATFORM_OS_ANDROID or targetPlatform == cc.PLATFORM_OS_WINRT or targetPlatform == cc.PLATFORM_OS_WP8 then + cc.Director:getInstance():getEventDispatcher():removeEventListener(self._backToForegroundListener) + end +end + + + +function Scene3DTestMain() + local scene = cc.Scene:create() + + Helper.createFunctionTable = + { + Scene3DTest.create, + } + + scene:addChild(Scene3DTest.create()) + scene:addChild(CreateBackMenuItem()) + + return scene +end diff --git a/tests/lua-tests/src/TerrainTest/TerrainTest.lua b/tests/lua-tests/src/TerrainTest/TerrainTest.lua index 85b2b048b3..09a84544cd 100644 --- a/tests/lua-tests/src/TerrainTest/TerrainTest.lua +++ b/tests/lua-tests/src/TerrainTest/TerrainTest.lua @@ -69,6 +69,12 @@ function TerrainSimple:init() local eventDispatcher = self:getEventDispatcher() eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self) + + --add Particle3D for test blend + local rootps = cc.PUParticleSystem3D:create("Particle3D/scripts/mp_torch.pu") + rootps:setCameraMask(cc.CameraFlag.USER1) + rootps:startParticleSystem() + self:addChild(rootps, 0, 0) end function TerrainSimple:title() @@ -272,7 +278,6 @@ function TerrainWalkThru:init() local terrainData = { _heightMapSrc = "TerrainTest/heightmap16.jpg", _alphaMapSrc = "TerrainTest/alphamap.png" , _detailMaps = {detailMapR, detailMapG, detailMapB, detailMapA}, _detailMapAmount = 4, _mapHeight = 40.0, _mapScale = 2.0 } self._terrain = cc.Terrain:create(terrainData,cc.Terrain.CrackFixedType.SKIRT) - self._terrain:setLODDistance(1000.2, 6.4, 9.6) self._terrain:setMaxDetailMapAmount(4) self._terrain:setCameraMask(2) self._terrain:setDrawWire(false) @@ -285,6 +290,19 @@ function TerrainWalkThru:init() self._player:setScale(0.08) self._player:setPositionY(self._terrain:getHeight(self._player:getPositionX(), self._player:getPositionZ()) + PLAYER_HEIGHT) + --add Particle3D for test blend + local rootps = cc.PUParticleSystem3D:create("Particle3D/scripts/mp_torch.pu") + rootps:setCameraMask(cc.CameraFlag.USER1) + rootps:setScale(30.0) + rootps:startParticleSystem() + self._player:addChild(rootps) + + --add BillBoard for test blend + local billboard = cc.BillBoard:create("Images/btn-play-normal.png") + billboard:setPosition3D(cc.vec3(0,180,0)) + billboard:setCameraMask(cc.CameraFlag.USER1) + self._player:addChild(billboard) + local animation = cc.Animation3D:create("Sprite3DTest/girl.c3b","Take 001") if nil ~= animation then local animate = cc.Animate3D:create(animation) diff --git a/tests/lua-tests/src/helper.lua b/tests/lua-tests/src/helper.lua index 84dbc49827..a3b95a2536 100644 --- a/tests/lua-tests/src/helper.lua +++ b/tests/lua-tests/src/helper.lua @@ -28,30 +28,6 @@ function CreateEnumTable(tbl, index) return enumTable end --- back menu callback -local function MainMenuCallback() - local scene = cc.Scene:create() - scene:addChild(CreateTestMenu()) - - cc.Director:getInstance():replaceScene(scene) -end - --- add the menu item for back to main menu -function CreateBackMenuItem() - local label = cc.Label:createWithTTF("MainMenu", s_arialPath, 20) - label:setAnchorPoint(cc.p(0.5, 0.5)) - local MenuItem = cc.MenuItemLabel:create(label) - MenuItem:registerScriptTapHandler(MainMenuCallback) - - local s = cc.Director:getInstance():getWinSize() - local Menu = cc.Menu:create() - Menu:addChild(MenuItem) - Menu:setPosition(0, 0) - MenuItem:setPosition(s.width - 50, 25) - - return Menu -end - Helper = { index = 1, createFunctioinTable = nil, @@ -59,6 +35,7 @@ Helper = { titleLabel = nil, subtitleLabel = nil } + function Helper.nextAction() Helper.index = Helper.index + 1 if Helper.index > table.getn(Helper.createFunctionTable) then @@ -131,6 +108,30 @@ function Helper.initWithLayer(layer) layer:addChild(background, -10) end +-- back menu callback +local function MainMenuCallback() + local scene = cc.Scene:create() + scene:addChild(CreateTestMenu()) + Helper.usePhysics = false + cc.Director:getInstance():replaceScene(scene) +end + +-- add the menu item for back to main menu +function CreateBackMenuItem() + local label = cc.Label:createWithTTF("MainMenu", s_arialPath, 20) + label:setAnchorPoint(cc.p(0.5, 0.5)) + local MenuItem = cc.MenuItemLabel:create(label) + MenuItem:registerScriptTapHandler(MainMenuCallback) + + local s = cc.Director:getInstance():getWinSize() + local Menu = cc.Menu:create() + Menu:addChild(MenuItem) + Menu:setPosition(0, 0) + MenuItem:setPosition(s.width - 50, 25) + + return Menu +end + function createTestLayer(title, subtitle) local layer = cc.Layer:create() Helper.initWithLayer(layer) diff --git a/tests/lua-tests/src/mainMenu.lua b/tests/lua-tests/src/mainMenu.lua index eb00acd95b..cf62be51d0 100644 --- a/tests/lua-tests/src/mainMenu.lua +++ b/tests/lua-tests/src/mainMenu.lua @@ -60,6 +60,9 @@ require "NewAudioEngineTest/NewAudioEngineTest" require "CocosStudio3DTest/CocosStudio3DTest" require "WebViewTest/WebViewTest" require "SpritePolygonTest/SpritePolygonTest" +require "Physics3DTest/Physics3DTest" +require "Scene3DTest/Scene3DTest" +require "MaterialSystemTest/MaterialSystemTest" local LINE_SPACE = 40 @@ -108,6 +111,7 @@ local _allTests = { { isSupported = true, name = "LayerTest" , create_func = LayerTestMain }, { isSupported = true, name = "LightTest" , create_func = LightTestMain }, { isSupported = true, name = "LuaBridgeTest" , create_func = LuaBridgeMainTest }, + { isSupported = true, name = "MaterialSystemTest" , create_func = MaterialSystemTest }, { isSupported = true, name = "MenuTest" , create_func = MenuTestMain }, { isSupported = true, name = "MotionStreakTest" , create_func = MotionStreakTest }, { isSupported = false, name = "MutiTouchTest" , create_func= MutiTouchTestMain }, @@ -119,12 +123,14 @@ local _allTests = { { isSupported = true, name = "Particle3D (PU)" , create_func = Particle3DTest }, { isSupported = true, name = "PerformanceTest" , create_func= PerformanceTestMain }, { isSupported = true, name = "PhysicsTest" , create_func = PhysicsTest }, + { isSupported = true, name = "Physics3DTest" , create_func = Physics3DTest }, { isSupported = true, name = "RenderTextureTest" , create_func = RenderTextureTestMain }, { isSupported = true, name = "RotateWorldTest" , create_func = RotateWorldTest }, { isSupported = true, name = "SceneTest" , create_func = SceneTestMain }, + { isSupported = true, name = "Scene3DTest" , create_func= Scene3DTestMain }, { isSupported = true, name = "SpineTest" , create_func = SpineTestMain }, { isSupported = false, name = "SchdulerTest" , create_func= SchdulerTestMain }, - { isSupported = false, name = "ShaderTest" , create_func= ShaderTestMain }, + { isSupported = false, name = "ShaderTest" , create_func= ShaderTestMain }, { isSupported = true, name = "Sprite3DTest" , create_func = Sprite3DTest }, { isSupported = true, name = "TerrainTest" , create_func = TerrainTest }, { isSupported = true, name = "SpriteTest" , create_func = SpriteTest }, @@ -198,13 +204,17 @@ function CreateTestMenu() if cc.PLATFORM_OS_IPHONE ~= targetPlatform and cc.PLATFORM_OS_ANDROID ~= targetPlatform then testMenuItem:setEnabled(false) end - end + end if obj.name == "WebViewTest" then if cc.PLATFORM_OS_IPHONE ~= targetPlatform and cc.PLATFORM_OS_ANDROID ~= targetPlatform then testMenuItem:setEnabled(false) end - end + end + + if obj.name == "Physics3DTest" and nil == cc.Physics3DComponent then + testMenuItem:setEnabled(false) + end testMenuItem:registerScriptTapHandler(menuCallback) testMenuItem:setPosition(cc.p(s.width / 2, (s.height - (index) * LINE_SPACE))) diff --git a/tests/lua-tests/src/testResource.lua b/tests/lua-tests/src/testResource.lua index 466082560f..b125786b74 100644 --- a/tests/lua-tests/src/testResource.lua +++ b/tests/lua-tests/src/testResource.lua @@ -45,3 +45,5 @@ s_markerFeltFontPath = "fonts/Marker Felt.ttf" s_arialPath = "fonts/arial.ttf" s_thonburiPath = "fonts/Thonburi.ttf" s_tahomaPath = "fonts/tahoma.ttf" + +s_s9s_ui_plist = "Images/ui.plist" diff --git a/tools/cocos2d-console b/tools/cocos2d-console index b09e7d9c8c..caaaef354e 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit b09e7d9c8c9d00804ae46fff882b35b96d287882 +Subproject commit caaaef354e1e91f312676ee3086aff3a485b2d9d diff --git a/tools/jenkins-scripts/daily-build.py b/tools/jenkins-scripts/daily-build.py index 1927826709..83f74443dc 100644 --- a/tools/jenkins-scripts/daily-build.py +++ b/tools/jenkins-scripts/daily-build.py @@ -22,15 +22,13 @@ else: # this scripts in your local machine remote_build = 1 -def download_3rd_library(branch): +def download_3rd_library(): #run download-deps.py print("prepare to downloading ...") os.system('python download-deps.py -r no') def sync_remote_repo(): - global workspace - global branch #reset path to workspace root os.system("cd " + workspace) @@ -50,7 +48,6 @@ def sync_remote_repo(): def gen_scripting_bindings(): - global branch # Generate binding glue codes if(branch == 'v3' or branch == 'v4-develop'): ret = os.system("python tools/jenkins-scripts/slave-scripts/gen_jsb.py") @@ -59,31 +56,34 @@ def gen_scripting_bindings(): def do_build_slaves(): - global branch - global node_name - jenkins_script_path = "tools" + os.sep + "jenkins-scripts" + os.sep + "slave-scripts" + os.sep + js_tests_build_scripts = "" if(branch == 'v3' or branch == 'v4-develop'): slave_build_scripts = "" if(node_name == 'android') or (node_name == 'android_bak'): - # patch_cpp_empty_test() slave_build_scripts = jenkins_script_path + "android-build.sh" elif(node_name == 'win32' or node_name == 'win32_win7' or node_name == 'win32_bak'): - slave_build_scripts = jenkins_script_path + "win32-vs2013-build.bat" + slave_build_scripts = jenkins_script_path + "win32-build.bat" + js_tests_build_scripts = jenkins_script_path + "win32-js-build.bat" elif(node_name == 'windows-universal' or node_name == 'windows-universal_bak'): slave_build_scripts = jenkins_script_path + "windows-universal.bat" + js_tests_build_scripts = jenkins_script_path + "windows-js-universal.bat" elif(node_name == 'ios_mac' or node_name == 'ios' or node_name == 'ios_bak'): slave_build_scripts = jenkins_script_path + "ios-build.sh" + js_tests_build_scripts = jenkins_script_path + "ios-js-build.sh" elif(node_name == 'mac' or node_name == 'mac_bak'): slave_build_scripts = jenkins_script_path + "mac-build.sh" + js_tests_build_scripts = jenkins_script_path + "mac-js-build.sh" elif(node_name == 'linux_centos' or node_name == 'linux' or node_name == 'linux_bak'): slave_build_scripts = jenkins_script_path + "linux-build.sh" elif(node_name == 'wp8'): - if(branch == 'v3'): + if(branch != 'v4'): slave_build_scripts = jenkins_script_path + "wp8-v3.bat" ret = os.system(slave_build_scripts) + js_test_ret = os.system(js_tests_build_scripts) + ret = ret + js_test_ret #get build result print "build finished and return " + str(ret) @@ -91,16 +91,11 @@ def do_build_slaves(): def main(): - global workspace - global branch - global node_name - global remote_build - if remote_build == 1: #syntronize local git repository with remote and merge the PR sync_remote_repo() #copy check_current_3rd_libs - download_3rd_library(branch) + download_3rd_library() #generate jsb and luabindings gen_scripting_bindings() diff --git a/tools/jenkins-scripts/do-pull-request-builder.py b/tools/jenkins-scripts/do-pull-request-builder.py index 1b923a3ab9..06a8c56a9b 100755 --- a/tools/jenkins-scripts/do-pull-request-builder.py +++ b/tools/jenkins-scripts/do-pull-request-builder.py @@ -37,20 +37,24 @@ def do_build_slaves(): global node_name jenkins_script_path = "tools" + os.sep + "jenkins-scripts" + os.sep + "slave-scripts" + os.sep + js_tests_build_scripts = "" if(branch != 'v1' and branch != 'v2'): slave_build_scripts = "" if(node_name == 'android') or (node_name == 'android_bak'): - # patch_cpp_empty_test() slave_build_scripts = jenkins_script_path + "android-build.sh" elif(node_name == 'win32' or node_name == 'win32_win7' or node_name == 'win32_bak'): - slave_build_scripts = jenkins_script_path + "win32-vs2013-build.bat" + slave_build_scripts = jenkins_script_path + "win32-build.bat" + js_tests_build_scripts = jenkins_script_path + "win32-js-build.bat" elif(node_name == 'windows-universal' or node_name == 'windows-universal_bak'): slave_build_scripts = jenkins_script_path + "windows-universal.bat" + js_tests_build_scripts = jenkins_script_path + "windows-js-universal.bat" elif(node_name == 'ios_mac' or node_name == 'ios' or node_name == 'ios_bak'): slave_build_scripts = jenkins_script_path + "ios-build.sh" + js_tests_build_scripts = jenkins_script_path + "ios-js-build.sh" elif(node_name == 'mac' or node_name == 'mac_bak'): slave_build_scripts = jenkins_script_path + "mac-build.sh" + js_tests_build_scripts = jenkins_script_path + "mac-js-build.sh" elif(node_name == 'linux_centos' or node_name == 'linux' or node_name == 'linux_bak'): slave_build_scripts = jenkins_script_path + "linux-build.sh" elif(node_name == 'wp8'): @@ -58,6 +62,8 @@ def do_build_slaves(): slave_build_scripts = jenkins_script_path + "wp8-v3.bat" ret = os.system(slave_build_scripts) + js_test_ret = os.system(js_tests_build_scripts) + ret = ret + js_test_ret #get build result print "build finished and return " + str(ret) diff --git a/tools/jenkins-scripts/master-scripts/job-comment-trigger.py b/tools/jenkins-scripts/master-scripts/job-comment-trigger.py index ae772689ce..ac44dbd145 100644 --- a/tools/jenkins-scripts/master-scripts/job-comment-trigger.py +++ b/tools/jenkins-scripts/master-scripts/job-comment-trigger.py @@ -75,7 +75,7 @@ def main(): #set commit status to pending target_url = os.environ['JOB_PULL_REQUEST_BUILD_URL'] - if(action == 'closed' or action == 'assigned' or branch == 'v2'): + if(action == 'closed' or action == 'assigned' or branch == 'v2' or branch == 'v3-doc'): print 'pull request #' + str(pr_num) + ' is ' + action + ', no build triggered' return(0) diff --git a/tools/jenkins-scripts/master-scripts/job-trigger.py b/tools/jenkins-scripts/master-scripts/job-trigger.py index dd30f6c23f..38369e4944 100755 --- a/tools/jenkins-scripts/master-scripts/job-trigger.py +++ b/tools/jenkins-scripts/master-scripts/job-trigger.py @@ -76,7 +76,7 @@ def main(): print 'Can not find build in queue' if(action == 'closed' or action == 'labeled' - or action == 'assigned' or action == 'unlabeled' or branch == 'v2'): + or action == 'assigned' or action == 'unlabeled' or branch == 'v2' or branch == 'v3-doc'): print 'pull request #' + str(pr_num) + ' is ' + action + ', no build triggered' return(0) diff --git a/tools/jenkins-scripts/slave-scripts/android-build.sh b/tools/jenkins-scripts/slave-scripts/android-build.sh index 5c86082518..bfad2d3a49 100755 --- a/tools/jenkins-scripts/slave-scripts/android-build.sh +++ b/tools/jenkins-scripts/slave-scripts/android-build.sh @@ -2,4 +2,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" COCOS2DX_ROOT="$DIR"/../../.. cd ${COCOS2DX_ROOT} -python build/android-build.py -p 10 cpp-tests lua-tests +python build/android-build.py -p 10 cpp-tests lua-tests js-tests diff --git a/tools/jenkins-scripts/slave-scripts/gen_jsb.py b/tools/jenkins-scripts/slave-scripts/gen_jsb.py index 1403b49400..4f69233e0c 100755 --- a/tools/jenkins-scripts/slave-scripts/gen_jsb.py +++ b/tools/jenkins-scripts/slave-scripts/gen_jsb.py @@ -4,7 +4,7 @@ import os import sys ret = 0 -genbindings_dirs = ['tolua'] +genbindings_dirs = ['tolua', 'tojs'] for item in genbindings_dirs: os.chdir("tools/" + item) ret = os.system('python genbindings.py') @@ -12,5 +12,5 @@ for item in genbindings_dirs: if(ret != 0): ret = 1 break - + sys.exit(ret) diff --git a/tools/jenkins-scripts/slave-scripts/ios-js-build.sh b/tools/jenkins-scripts/slave-scripts/ios-js-build.sh new file mode 100755 index 0000000000..1c3ca79613 --- /dev/null +++ b/tools/jenkins-scripts/slave-scripts/ios-js-build.sh @@ -0,0 +1,7 @@ +#put xctool.sh into your PATH +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +COCOS2DX_ROOT="$DIR"/../../.. +xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests iOS" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" clean | xcpretty +xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests iOS" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build | xcpretty +#the following commands must not be removed +xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests iOS" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build diff --git a/tools/jenkins-scripts/slave-scripts/mac-js-build.sh b/tools/jenkins-scripts/slave-scripts/mac-js-build.sh new file mode 100755 index 0000000000..5a686724d0 --- /dev/null +++ b/tools/jenkins-scripts/slave-scripts/mac-js-build.sh @@ -0,0 +1,22 @@ +#put xctool.sh into your PATH + +####### +# Cmake build +####### +# DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# COCOS2DX_ROOT="$DIR"/../../.. +# cd ${COCOS2DX_ROOT} +# mkdir mac-build +# cd mac-build +# cmake .. +# make -j4 + +####### +# xcode build +####### +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +COCOS2DX_ROOT="$DIR"/../../.. +xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests Mac" clean | xcpretty +xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests Mac" build | xcpretty +#xcpretty has a bug, some xcodebuid fails return value would be treated as 0. +xcodebuild -project "$COCOS2DX_ROOT"/build/cocos2d_js_tests.xcodeproj -scheme "js-tests Mac" build diff --git a/tools/jenkins-scripts/slave-scripts/win32-build.bat b/tools/jenkins-scripts/slave-scripts/win32-build.bat new file mode 100644 index 0000000000..7f29e5337d --- /dev/null +++ b/tools/jenkins-scripts/slave-scripts/win32-build.bat @@ -0,0 +1,2 @@ +call "%VS120COMNTOOLS%vsvars32.bat" +msbuild build\cocos2d-win32.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m diff --git a/tools/jenkins-scripts/slave-scripts/win32-js-build.bat b/tools/jenkins-scripts/slave-scripts/win32-js-build.bat new file mode 100644 index 0000000000..4325164a05 --- /dev/null +++ b/tools/jenkins-scripts/slave-scripts/win32-js-build.bat @@ -0,0 +1,2 @@ +call "%VS120COMNTOOLS%vsvars32.bat" +msbuild build\cocos2d-js-win32.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m diff --git a/tools/jenkins-scripts/slave-scripts/win32-vs2013-build.bat b/tools/jenkins-scripts/slave-scripts/win32-vs2013-build.bat deleted file mode 100755 index 945812c170..0000000000 --- a/tools/jenkins-scripts/slave-scripts/win32-vs2013-build.bat +++ /dev/null @@ -1,2 +0,0 @@ -call "%VS120COMNTOOLS%vsvars32.bat" -msbuild build\cocos2d-win32.vc2013.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m diff --git a/tools/jenkins-scripts/slave-scripts/windows-js-universal.bat b/tools/jenkins-scripts/slave-scripts/windows-js-universal.bat new file mode 100755 index 0000000000..efb44a152f --- /dev/null +++ b/tools/jenkins-scripts/slave-scripts/windows-js-universal.bat @@ -0,0 +1,2 @@ +call "%VS120COMNTOOLS%vsvars32.bat" +msbuild build\cocos2d-js-win8.1-universal.sln /t:Build /p:Platform="Win32" /p:Configuration="Release" /m diff --git a/tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h b/tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h index 76e9671243..253fffd927 100755 --- a/tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h +++ b/tools/simulator/frameworks/runtime-src/Classes/lua_module_register.h @@ -10,9 +10,9 @@ #include "spine/lua_cocos2dx_spine_manual.hpp" #include "3d/lua_cocos2dx_3d_manual.h" #include "audioengine/lua_cocos2dx_audioengine_manual.h" -#include "lua/quick/lua_cocos2dx_quick_manual.hpp" +#include "physics3d/lua_cocos2dx_physics3d_manual.h" -int lua_module_register(lua_State* L) +static int lua_module_register(lua_State* L) { //Dont' change the module register order unless you know what your are doing register_cocosdenshion_module(L); @@ -24,6 +24,9 @@ int lua_module_register(lua_State* L) register_spine_module(L); register_cocos3d_module(L); register_audioengine_module(L); +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + register_physics3d_module(L); +#endif return 1; } diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj index 30633aecc9..cb6d726a63 100644 --- a/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj +++ b/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj @@ -1,4 +1,4 @@ - + @@ -21,6 +21,8 @@ Unicode v110 v120 + v140 + v140_xp Application @@ -28,6 +30,8 @@ Unicode v110 v120 + v140 + v140_xp @@ -84,7 +88,7 @@ MachineX86 true $(OutDir);$(EngineRoot)external\spidermonkey\prebuilt\win32;%(AdditionalLibraryDirectories) - libcurl_imp.lib;lua51.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies) $(ProjectDir)../../../runtime/win32/$(TargetName).pdb $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) @@ -149,7 +153,7 @@ xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" Windows MachineX86 $(OutDir);$(EngineRoot)external\spidermonkey\prebuilt\win32;%(AdditionalLibraryDirectories) - libcurl_imp.lib;lua51.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies) false $(OutDir)$(ProjectName).exe @@ -238,4 +242,4 @@ xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" - \ No newline at end of file + diff --git a/tools/simulator/libsimulator/lib/AppLang.cpp b/tools/simulator/libsimulator/lib/AppLang.cpp index 437ca8bdd8..b5a95494eb 100644 --- a/tools/simulator/libsimulator/lib/AppLang.cpp +++ b/tools/simulator/libsimulator/lib/AppLang.cpp @@ -33,7 +33,7 @@ void AppLang::readLocalizationFile() if (_docRootjson.Parse<0>(fileContent.c_str()).HasParseError()) { - cocos2d::log("[WARNING]:read json file %s failed because of %s", _localizationFileName.c_str(), _docRootjson.GetParseError()); + cocos2d::log("[WARNING]:read json file %s failed because of %d", _localizationFileName.c_str(), _docRootjson.GetParseError()); return; } } diff --git a/tools/simulator/libsimulator/lib/runtime/ConfigParser.cpp b/tools/simulator/libsimulator/lib/runtime/ConfigParser.cpp index cfdb60eb6f..2d345dfe8c 100644 --- a/tools/simulator/libsimulator/lib/runtime/ConfigParser.cpp +++ b/tools/simulator/libsimulator/lib/runtime/ConfigParser.cpp @@ -51,7 +51,7 @@ void ConfigParser::readConfig(const string &filepath) return; if (_docRootjson.Parse<0>(fileContent.c_str()).HasParseError()) { - cocos2d::log("read json file %s failed because of %s", fullPathFile.c_str(), _docRootjson.GetParseError()); + cocos2d::log("read json file %s failed because of %d", fullPathFile.c_str(), _docRootjson.GetParseError()); return; } diff --git a/tools/simulator/libsimulator/lib/runtime/FileServer.cpp b/tools/simulator/libsimulator/lib/runtime/FileServer.cpp index b1476681c2..4b189877d5 100644 --- a/tools/simulator/libsimulator/lib/runtime/FileServer.cpp +++ b/tools/simulator/libsimulator/lib/runtime/FileServer.cpp @@ -222,17 +222,17 @@ void FileServer::stop() _writeEndThread = true; _responseEndThread = true; - if(_receiveRunning) + if (_receiveRunning && _receiveThread.joinable()) { _receiveThread.join(); } - if (_writeRunning) + if (_writeRunning && _writeThread.joinable()) { _writeThread.join(); } - if (_responseRunning) + if (_responseRunning && _responseThread.joinable()) { _responseThread.join(); } diff --git a/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj b/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj index e44617b9ce..fe88156831 100644 --- a/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj +++ b/tools/simulator/libsimulator/proj.win32/libsimulator.vcxproj @@ -21,6 +21,8 @@ true v120 v120_xp + v140 + v140_xp Unicode @@ -28,6 +30,8 @@ false v120 v120_xp + v140 + v140_xp true Unicode @@ -56,7 +60,7 @@ NotUsing Level3 Disabled - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions);_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS $(ProjectDir);$(ProjectDir)..\lib\protobuf-lite;$(ProjectDir)..\lib;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) @@ -80,7 +84,7 @@ MinSpace true true - COCOS2D_DEBUG=1;WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) + COCOS2D_DEBUG=1;WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions);_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS true $(ProjectDir);$(ProjectDir)..\lib\protobuf-lite;$(ProjectDir)..\lib;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) CompileAsCpp diff --git a/tools/tojs/cocos2dx_3d.ini b/tools/tojs/cocos2dx_3d.ini index 4245fd6d2d..c582da19a2 100644 --- a/tools/tojs/cocos2dx_3d.ini +++ b/tools/tojs/cocos2dx_3d.ini @@ -22,11 +22,11 @@ cxxgenerator_headers = extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s # what headers to parse -headers = %(cocosdir)s/cocos/cocos2d.h +headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/3d/CCBundle3D.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = Animate3D Sprite3D Animation3D Skeleton3D ^Mesh$ AttachNode BillBoard Sprite3DCache TextureCube Skybox Terrain +classes = Animate3D Sprite3D Animation3D Skeleton3D ^Mesh$ AttachNode BillBoard Sprite3DCache TextureCube Skybox Terrain Bundle3D classes_need_extend = Sprite3D @@ -43,7 +43,8 @@ skip = Skeleton3D::[create], Sprite3DCache::[addSprite3DData getSpriteData], Animation3D::[getBoneCurves], TextureCube::[setTexParameters], - Terrain::[getAABB getQuadTree create getHeightData] + Terrain::[getAABB getQuadTree create getHeightData], + Bundle3D::[getTrianglesList calculateAABB] rename_functions = diff --git a/tools/tojs/cocos2dx_experimental_webView.ini b/tools/tojs/cocos2dx_experimental_webView.ini new file mode 100644 index 0000000000..4bb1ff6d1a --- /dev/null +++ b/tools/tojs/cocos2dx_experimental_webView.ini @@ -0,0 +1,62 @@ +[cocos2dx_experimental_webView] +# the prefix to be added to the generated functions. You might or might not use this in your own +# templates +prefix = cocos2dx_experimental_webView + +# create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`) +# all classes will be embedded in that namespace +target_namespace = ccui + +macro_judgement = #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + +android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include +android_flags = -D_SIZE_T_DEFINED_ + +clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include +clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ + +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android + +cocos_flags = -DANDROID + +cxxgenerator_headers = + +# extra arguments for clang +extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s + +# what headers to parse +headers = %(cocosdir)s/cocos/ui/UIWebView.h + +# what classes to produce code for. You can use regular expressions here. When testing the regular +# expression, it will be enclosed in "^$", like this: "^Menu*$". +classes = WebView + +# what should we skip? in the format ClassName::[function function] +# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also +# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just +# add a single "*" as functions. See bellow for several examples. A special class name is "*", which +# will apply to all class names. This is a convenience wildcard to be able to skip similar named +# functions from all classes. + +skip = WebView::[setOnShouldStartLoading setOnDidFinishLoading setOnDidFailLoading setOnJSCallback loadData] + +rename_functions = + +rename_classes = + +# for all class names, should we remove something when registering in the target VM? +remove_prefix = + +# classes for which there will be no "parent" lookup +classes_have_no_parents = + +# base classes which will be skipped when their sub-classes found them. +base_classes_to_skip = + +# classes that create no constructor +# Set is special and we will use a hand-written constructor +abstract_classes = + +# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'. +script_control_cpp = no + diff --git a/tools/tojs/cocos2dx_physics3d.ini b/tools/tojs/cocos2dx_physics3d.ini new file mode 100644 index 0000000000..893c8a69d1 --- /dev/null +++ b/tools/tojs/cocos2dx_physics3d.ini @@ -0,0 +1,66 @@ +[cocos2dx_physics3d] +# the prefix to be added to the generated functions. You might or might not use this in your own +# templates +prefix = cocos2dx_physics3d + +# create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`) +# all classes will be embedded in that namespace +target_namespace = cc + +android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include +android_flags = -D_SIZE_T_DEFINED_ + +clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include +clang_flags = -nostdinc -x c++ -std=c++11 -D CC_ENABLE_BULLET_INTEGRATION -D CC_USE_3D_PHYSICS + +win32_clang_flags = -U __SSE__ + +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external + +cocos_flags = -DANDROID + +cxxgenerator_headers = + +# extra arguments for clang +extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s + +# what headers to parse +headers = %(cocosdir)s/cocos/physics3d/CCPhysics3D.h + +# what classes to produce code for. You can use regular expressions here. When testing the regular +# expression, it will be enclosed in "^$", like this: "^Menu*$". +classes = Physics3DWorld Physics3DShape PhysicsSprite3D Physics3DObject Physics3DRigidBody Physics3DShapesk Physics3DComponent Physics3DConstraint Physics3DPointToPointConstraint Physics3DHingeConstraint Physics3DSliderConstraint Physics3DConeTwistConstraint Physics3D6DofConstraint + +# what should we skip? in the format ClassName::[function function] +# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also +# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just +# add a single "*" as functions. See bellow for several examples. A special class name is "*", which +# will apply to all class names. This is a convenience wildcard to be able to skip similar named +# functions from all classes. + +skip = Physics3DShape::[createCompoundShape createMesh createHeightfield], + Physics3DObject::[setCollisionCallback], + Physics3DWorld::[getPhysicsObjects], + Physics3DConeTwistConstraint::[setMotorTarget setMotorTargetInConstraintSpace], + PhysicsSprite3D::[create], + Physics3DRigidBody::[create] + +rename_functions = + +rename_classes = + +# for all class names, should we remove something when registering in the target VM? +remove_prefix = + +# classes for which there will be no "parent" lookup +classes_have_no_parents = + +# base classes which will be skipped when their sub-classes found them. +base_classes_to_skip = Ref + +# classes that create no constructor +# Set is special and we will use a hand-written constructor +abstract_classes = Physics3DObject + +# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'. +script_control_cpp = no diff --git a/tools/tojs/genbindings.py b/tools/tojs/genbindings.py index 11f861df39..2cf83dcc31 100755 --- a/tools/tojs/genbindings.py +++ b/tools/tojs/genbindings.py @@ -142,7 +142,9 @@ def main(): 'cocos2dx_spine.ini' : ('cocos2dx_spine', 'jsb_cocos2dx_spine_auto'), \ 'cocos2dx_3d.ini' : ('cocos2dx_3d', 'jsb_cocos2dx_3d_auto'), \ 'cocos2dx_3d_ext.ini' : ('cocos2dx_3d_extension', 'jsb_cocos2dx_3d_extension_auto'), \ - 'cocos2dx_experimental.ini' : ('cocos2dx_experimental', 'jsb_cocos2dx_experimental') + 'cocos2dx_experimental_webView.ini' : ('cocos2dx_experimental_webView', 'jsb_cocos2dx_experimental_webView_auto'), \ + 'cocos2dx_experimental.ini' : ('cocos2dx_experimental', 'jsb_cocos2dx_experimental'), \ + 'cocos2dx_physics3d.ini' : ('cocos2dx_physics3d', 'jsb_cocos2dx_physics3d_auto') } target = 'spidermonkey' generator_py = '%s/generator.py' % cxx_generator_root @@ -153,9 +155,9 @@ def main(): command = '%s %s %s -s %s -t %s -o %s -n %s' % (python_bin, generator_py, cfg, args[0], target, output_dir, args[1]) _run_cmd(command) - if platform == 'win32': - with _pushd(output_dir): - _run_cmd('dos2unix *') + # if platform == 'win32': + # with _pushd(output_dir): + # _run_cmd('dos2unix *') custom_cmd_args = {} @@ -167,9 +169,9 @@ def main(): print 'Generating bindings for %s...' % (key[:-4]) command = '%s %s %s -s %s -t %s -o %s -n %s' % (python_bin, generator_py, cfg, args[0], target, output_dir, args[1]) _run_cmd(command) - if platform == 'win32': - with _pushd(output_dir): - _run_cmd('dos2unix *') + # if platform == 'win32': + # with _pushd(output_dir): + # _run_cmd('dos2unix *') print '----------------------------------------' print 'Generating javascript bindings succeeds.' diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index a4a584b03f..3a5c0900eb 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/2d/CCProtectedNode.h % # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* .*TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewImpl GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console GLProgramCache GLProgramState Device ClippingRectangleNode .*Light$ AsyncTaskPool SpritePolygonCache +classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* .*TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewImpl GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console GLProgramCache GLProgramState Device ClippingRectangleNode .*Light$ AsyncTaskPool SpritePolygonCache RenderState Material Properties Technique Pass # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -140,7 +140,9 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS SpritePolygonCache::[addSpritePolygonCache getSpritePolygonCache], EventListenerCustom::[init], EventListener::[init], - RotateTo::[calculateAngles] + RotateTo::[calculateAngles], + RenderState::[finalize setStateBlock], + Properties::[createNonRefCounted] rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], ProgressTimer::[setReverseProgress=setReverseDirection], diff --git a/tools/tolua/cocos2dx_3d.ini b/tools/tolua/cocos2dx_3d.ini index bc477cc2a2..95cb26d185 100644 --- a/tools/tolua/cocos2dx_3d.ini +++ b/tools/tolua/cocos2dx_3d.ini @@ -22,11 +22,11 @@ cxxgenerator_headers = extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s # what headers to parse -headers = %(cocosdir)s/cocos/cocos2d.h +headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/3d/CCBundle3D.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = Animate3D Sprite3D Animation3D Skeleton3D ^Mesh$ AttachNode BillBoard Sprite3DCache TextureCube Skybox Terrain +classes = Animate3D Sprite3D Animation3D Skeleton3D ^Mesh$ AttachNode BillBoard Sprite3DCache TextureCube Skybox Terrain Bundle3D # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -41,7 +41,8 @@ skip = Mesh::[create getAABB getVertexBuffer hasVertexAttrib getSkin getMeshInde Animation3D::[getBoneCurveByName getBoneCurves], BillBoard::[draw], Sprite3DCache::[addSprite3DData getSpriteData], - Terrain::[lookForIndicesLODSkrit lookForIndicesLOD insertIndicesLOD insertIndicesLODSkirt getIntersectionPoint getAABB getQuadTree create getHeight getHeightData] + Terrain::[lookForIndicesLODSkrit lookForIndicesLOD insertIndicesLOD insertIndicesLODSkirt getIntersectionPoint getAABB getQuadTree create ^getHeight$], + Bundle3D::[calculateAABB loadMeshDatas getTrianglesList] rename_functions = diff --git a/tools/tolua/cocos2dx_physics3d.ini b/tools/tolua/cocos2dx_physics3d.ini new file mode 100644 index 0000000000..d6bbfb74f4 --- /dev/null +++ b/tools/tolua/cocos2dx_physics3d.ini @@ -0,0 +1,71 @@ +[cocos2dx_physics3d] +# the prefix to be added to the generated functions. You might or might not use this in your own +# templates +prefix = cocos2dx_physics3d + +# create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`) +# all classes will be embedded in that namespace +target_namespace = cc + +macro_judgement = #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + +android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include +android_flags = -D_SIZE_T_DEFINED_ + +clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include +clang_flags = -nostdinc -x c++ -std=c++11 -D CC_ENABLE_BULLET_INTEGRATION + +win32_clang_flags = -U __SSE__ + +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external + +cocos_flags = -DANDROID + +cxxgenerator_headers = + +# extra arguments for clang +extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s + +# what headers to parse +headers = %(cocosdir)s/cocos/physics3d/CCPhysics3D.h + +# what classes to produce code for. You can use regular expressions here. When testing the regular +# expression, it will be enclosed in "^$", like this: "^Menu*$". +classes = Physics3DWorld Physics3DShape PhysicsSprite3D Physics3DObject Physics3DRigidBody Physics3DShapesk Physics3DComponent Physics3DConstraint Physics3DPointToPointConstraint Physics3DHingeConstraint Physics3DSliderConstraint Physics3DConeTwistConstraint Physics3D6DofConstraint + +# what should we skip? in the format ClassName::[function function] +# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also +# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just +# add a single "*" as functions. See bellow for several examples. A special class name is "*", which +# will apply to all class names. This is a convenience wildcard to be able to skip similar named +# functions from all classes. + +skip = Physics3DWorld::[getPhysicsObjects getPhysicsObject init rayCast sweepShape create], + Physics3DShape::[createCompoundShape createMesh createHeightfield], + PhysicsSprite3D::[create], + Physics3DComponent::[setTransformInPhysics create], + Physics3DRigidBody::[create], + Physics3DHingeConstraint::[setMotorTarget], + Physics3DConeTwistConstraint::[setMotorTarget setMotorTargetInConstraintSpace], + Physics3DObject::[setCollisionCallback] + +rename_functions = + +rename_classes = + +# for all class names, should we remove something when registering in the target VM? +remove_prefix = + +# classes for which there will be no "parent" lookup +classes_have_no_parents = + +# base classes which will be skipped when their sub-classes found them. +base_classes_to_skip = + +# classes that create no constructor +# Set is special and we will use a hand-written constructor +abstract_classes = Physics3DObject + +# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'. +script_control_cpp = no + diff --git a/tools/tolua/genbindings.py b/tools/tolua/genbindings.py index abe05e5f08..da62efb385 100755 --- a/tools/tolua/genbindings.py +++ b/tools/tolua/genbindings.py @@ -148,6 +148,7 @@ def main(): 'cocos2dx_audioengine.ini': ('cocos2dx_audioengine', 'lua_cocos2dx_audioengine_auto'), \ 'cocos2dx_csloader.ini' : ('cocos2dx_csloader', 'lua_cocos2dx_csloader_auto'), \ 'cocos2dx_experimental_webview.ini' : ('cocos2dx_experimental_webview', 'lua_cocos2dx_experimental_webview_auto'), \ + 'cocos2dx_physics3d.ini' : ('cocos2dx_physics3d', 'lua_cocos2dx_physics3d_auto'), \ } target = 'lua' generator_py = '%s/generator.py' % cxx_generator_root diff --git a/tools/travis-scripts/generate-bindings.sh b/tools/travis-scripts/generate-bindings.sh index d5fa15dfef..7c51476415 100755 --- a/tools/travis-scripts/generate-bindings.sh +++ b/tools/travis-scripts/generate-bindings.sh @@ -20,7 +20,7 @@ TOLUA_ROOT="$PROJECT_ROOT/tools/tolua" TOJS_ROOT="$PROJECT_ROOT/tools/tojs" LUA_AUTO_GENERATED_DIR="$PROJECT_ROOT/cocos/scripting/lua-bindings/auto" JS_AUTO_GENERATED_DIR="$PROJECT_ROOT/cocos/scripting/js-bindings/auto" -COMMITTAG="[AUTO]: updating luabinding & jsbinding automatically" +COMMITTAG="[ci skip][AUTO]: updating luabinding & jsbinding automatically" ELAPSEDSECS=`date +%s` COCOS_BRANCH="update_lua_bindings_$ELAPSEDSECS" COCOS_ROBOT_REMOTE="https://${GH_USER}:${GH_PASSWORD}@github.com/${GH_USER}/cocos2d-x.git"